Changeset 230568 in webkit
- Timestamp:
- Apr 12, 2018 6:41:06 AM (6 years ago)
- Location:
- branches/safari-605-branch
- Files:
-
- 7 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-605-branch/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r230239 r230568 343 343 0F5CF9841E9D537700C18692 /* AirLowerStackArgs.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5CF9831E9D537500C18692 /* AirLowerStackArgs.h */; }; 344 344 0F5CF9891E9ED65200C18692 /* AirStackAllocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5CF9871E9ED64E00C18692 /* AirStackAllocation.h */; }; 345 0F5E0FD8207C72730097F0DE /* DFGAbstractInterpreterClobberState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5E0FD6207C72710097F0DE /* DFGAbstractInterpreterClobberState.h */; }; 345 346 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5EF91C16878F78003E5C25 /* JITThunks.h */; settings = {ATTRIBUTES = (Private, ); }; }; 346 347 0F5F08CF146C7633000472A9 /* UnconditionalFinalizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 2345 2346 0F5CF9871E9ED64E00C18692 /* AirStackAllocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AirStackAllocation.h; path = b3/air/AirStackAllocation.h; sourceTree = "<group>"; }; 2346 2347 0F5D085C1B8CF99D001143B4 /* DFGNodeOrigin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGNodeOrigin.cpp; path = dfg/DFGNodeOrigin.cpp; sourceTree = "<group>"; }; 2348 0F5E0FD6207C72710097F0DE /* DFGAbstractInterpreterClobberState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGAbstractInterpreterClobberState.h; path = dfg/DFGAbstractInterpreterClobberState.h; sourceTree = "<group>"; }; 2349 0F5E0FD7207C72710097F0DE /* DFGAbstractInterpreterClobberState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAbstractInterpreterClobberState.cpp; path = dfg/DFGAbstractInterpreterClobberState.cpp; sourceTree = "<group>"; }; 2347 2350 0F5EF91B16878F78003E5C25 /* JITThunks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITThunks.cpp; sourceTree = "<group>"; }; 2348 2351 0F5EF91C16878F78003E5C25 /* JITThunks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITThunks.h; sourceTree = "<group>"; }; … … 7066 7069 A77A423717A0BBFD00A8DB81 /* DFGAbstractHeap.h */, 7067 7070 A704D8FE17A0BAA8006BA554 /* DFGAbstractInterpreter.h */, 7071 0F5E0FD7207C72710097F0DE /* DFGAbstractInterpreterClobberState.cpp */, 7072 0F5E0FD6207C72710097F0DE /* DFGAbstractInterpreterClobberState.h */, 7068 7073 A704D8FF17A0BAA8006BA554 /* DFGAbstractInterpreterInlines.h */, 7069 7074 0F55C19317276E4600CEABFD /* DFGAbstractValue.cpp */, … … 8160 8165 8B3BF5E41E3D368B0076A87A /* AsyncGeneratorPrototype.lut.h in Headers */, 8161 8166 8BC064961E1D845C00B2B8CA /* AsyncIteratorPrototype.h in Headers */, 8167 0F5E0FD8207C72730097F0DE /* DFGAbstractInterpreterClobberState.h in Headers */, 8162 8168 6A38CFAA1E32B5AB0060206F /* AsyncStackTrace.h in Headers */, 8163 8169 0F7CF9571DC125900098CC12 /* AtomicsObject.h in Headers */, -
branches/safari-605-branch/Source/JavaScriptCore/Sources.txt
r230239 r230568 272 272 273 273 dfg/DFGAbstractHeap.cpp 274 dfg/DFGAbstractInterpreterClobberState.cpp 274 275 dfg/DFGAbstractValue.cpp 275 276 dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGAbstractInterpreter.h
r227388 r230568 151 151 private: 152 152 void clobberWorld(const CodeOrigin&, unsigned indexInBlock); 153 void didFoldClobberWorld(); 153 154 154 155 template<typename Functor> … … 156 157 157 158 void clobberStructures(unsigned indexInBlock); 159 void didFoldClobberStructures(); 160 158 161 void observeTransition(unsigned indexInBlock, RegisteredStructure from, RegisteredStructure to); 159 162 void observeTransitions(unsigned indexInBlock, const TransitionVector&); 160 void setDidClobber();161 163 162 164 enum BooleanResult { -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r230536 r230568 30 30 #include "ArrayConstructor.h" 31 31 #include "DFGAbstractInterpreter.h" 32 #include "DFGAbstractInterpreterClobberState.h" 32 33 #include "DOMJITGetterSetter.h" 33 34 #include "DOMJITSignature.h" … … 97 98 ASSERT(m_state.isValid()); 98 99 99 m_state.set DidClobber(false);100 m_state.setClobberState(AbstractInterpreterClobberState::NotClobbered); 100 101 } 101 102 … … 329 330 // itself into a straight-line sequence of GetStack/PutStack. 330 331 // https://bugs.webkit.org/show_bug.cgi?id=143071 331 clobberWorld(node->origin.semantic, clobberLimit); 332 switch (node->op()) { 333 case LoadVarargs: 334 clobberWorld(node->origin.semantic, clobberLimit); 335 break; 336 case ForwardVarargs: 337 break; 338 default: 339 DFG_CRASH(m_graph, node, "Bad opcode"); 340 break; 341 } 332 342 LoadVarargsData* data = node->loadVarargsData(); 333 343 m_state.variables().operand(data->count).setType(SpecInt32Only); … … 609 619 JSValue operand = forNode(node->child1()).value(); 610 620 if (std::optional<double> number = operand.toNumberFromPrimitive()) { 621 switch (node->child1().useKind()) { 622 case Int32Use: 623 case KnownInt32Use: 624 break; 625 default: 626 didFoldClobberWorld(); 627 break; 628 } 611 629 uint32_t value = toUInt32(*number); 612 630 setConstant(node, jsNumber(clz32(value))); … … 1016 1034 JSValue operand = forNode(node->child1()).value(); 1017 1035 if (std::optional<double> number = operand.toNumberFromPrimitive()) { 1036 if (node->child1().useKind() != DoubleRepUse) 1037 didFoldClobberWorld(); 1038 1018 1039 double roundedValue = 0; 1019 1040 if (node->op() == ArithRound) … … 1491 1512 case CompareGreaterEq: 1492 1513 case CompareEq: { 1514 bool isClobbering = node->isBinaryUseKind(UntypedUse); 1515 1516 if (isClobbering) 1517 didFoldClobberWorld(); 1518 1493 1519 JSValue leftConst = forNode(node->child1()).value(); 1494 1520 JSValue rightConst = forNode(node->child2()).value(); … … 1612 1638 } 1613 1639 1614 if ( node->child1().useKind() == UntypedUse || node->child2().useKind() == UntypedUse)1640 if (isClobbering) 1615 1641 clobberWorld(node->origin.semantic, clobberLimit); 1616 1642 forNode(node).setType(SpecBoolean); … … 1699 1725 1700 1726 case StringFromCharCode: 1727 switch (node->child1().useKind()) { 1728 case Int32Use: 1729 break; 1730 case UntypedUse: 1731 clobberWorld(node->origin.semantic, clobberLimit); 1732 break; 1733 default: 1734 DFG_CRASH(m_graph, node, "Bad use kind"); 1735 break; 1736 } 1701 1737 forNode(node).setType(m_graph, SpecString); 1702 1738 break; … … 1759 1795 case Array::DirectArguments: 1760 1796 case Array::ScopedArguments: 1797 if (node->arrayMode().isOutOfBounds()) 1798 clobberWorld(node->origin.semantic, clobberLimit); 1761 1799 forNode(node).makeHeapTop(); 1762 1800 break; … … 2030 2068 JSValue childConst = forNode(node->child1()).value(); 2031 2069 if (childConst && childConst.isNumber()) { 2070 didFoldClobberWorld(); 2032 2071 setConstant(node, childConst); 2033 2072 break; … … 2038 2077 if (!(forNode(node->child1()).m_type & ~(SpecFullNumber | SpecBoolean | SpecString | SpecSymbol))) { 2039 2078 m_state.setFoundConstants(true); 2079 didFoldClobberWorld(); 2040 2080 forNode(node) = forNode(node->child1()); 2041 2081 break; … … 2043 2083 2044 2084 clobberWorld(node->origin.semantic, clobberLimit); 2045 2046 2085 forNode(node).setType(m_graph, SpecHeapTop & ~SpecObject); 2047 2086 break; … … 2051 2090 JSValue childConst = forNode(node->child1()).value(); 2052 2091 if (childConst && childConst.isNumber()) { 2092 didFoldClobberWorld(); 2053 2093 setConstant(node, childConst); 2054 2094 break; … … 2059 2099 if (!(forNode(node->child1()).m_type & ~SpecBytecodeNumber)) { 2060 2100 m_state.setFoundConstants(true); 2101 didFoldClobberWorld(); 2061 2102 forNode(node) = forNode(node->child1()); 2062 2103 break; … … 2102 2143 if (2 <= radix && radix <= 36) { 2103 2144 m_state.setFoundConstants(true); 2145 didFoldClobberWorld(); 2104 2146 forNode(node).set(m_graph, m_graph.m_vm.stringStructure.get()); 2105 2147 break; … … 2145 2187 2146 2188 case Spread: 2147 if (!m_graph.canDoFastSpread(node, forNode(node->child1()))) 2148 clobberWorld(node->origin.semantic, clobberLimit); 2189 switch (node->child1()->op()) { 2190 case PhantomNewArrayBuffer: 2191 case PhantomCreateRest: 2192 break; 2193 default: 2194 if (!m_graph.canDoFastSpread(node, forNode(node->child1()))) 2195 clobberWorld(node->origin.semantic, clobberLimit); 2196 else 2197 didFoldClobberWorld(); 2198 break; 2199 } 2149 2200 2150 2201 forNode(node).set( … … 2236 2287 if (!(source.m_type & ~SpecObject)) { 2237 2288 m_state.setFoundConstants(true); 2289 if (node->op() == ToObject) 2290 didFoldClobberWorld(); 2238 2291 destination = source; 2239 2292 break; … … 2259 2312 case PhantomNewArrayBuffer: 2260 2313 case BottomValue: 2261 m_state.setDidClobber(true); // Prevent constant folding.2262 2314 // This claims to return bottom. 2263 2315 break; … … 2464 2516 case GetById: 2465 2517 case GetByIdFlush: { 2466 if (!node->prediction()) {2467 m_state.setIsValid(false);2468 break;2469 }2470 2471 2518 AbstractValue& value = forNode(node->child1()); 2472 2519 if (value.m_structure.isFinite() … … 2488 2535 } 2489 2536 m_state.setFoundConstants(true); 2537 didFoldClobberWorld(); 2490 2538 forNode(node) = result; 2491 2539 break; … … 2627 2675 case PutStructure: 2628 2676 if (!forNode(node->child1()).m_structure.isClear()) { 2629 if (forNode(node->child1()).m_structure.onlyStructure() == node->transition()->next) 2677 if (forNode(node->child1()).m_structure.onlyStructure() == node->transition()->next) { 2678 didFoldClobberStructures(); 2630 2679 m_state.setFoundConstants(true); 2631 else {2680 } else { 2632 2681 observeTransition( 2633 2682 clobberLimit, node->transition()->previous, node->transition()->next); … … 2642 2691 // FIXME: We don't model the fact that the structureID is nuked, simply because currently 2643 2692 // nobody would currently benefit from having that information. But it's a bug nonetheless. 2693 if (node->op() == NukeStructureAndSetButterfly) 2694 didFoldClobberStructures(); 2644 2695 forNode(node).clear(); // The result is not a JS value. 2645 2696 break; … … 2741 2792 case Arrayify: { 2742 2793 if (node->arrayMode().alreadyChecked(m_graph, node, forNode(node->child1()))) { 2794 didFoldClobberStructures(); 2743 2795 m_state.setFoundConstants(true); 2744 2796 break; … … 2832 2884 2833 2885 if (prototype && canFold) { 2886 switch (node->child1().useKind()) { 2887 case ArrayUse: 2888 case FunctionUse: 2889 case FinalObjectUse: 2890 break; 2891 default: 2892 didFoldClobberWorld(); 2893 break; 2894 } 2834 2895 setConstant(node, *m_graph.freeze(prototype)); 2835 2896 break; … … 2963 3024 AbstractValue resultingValue; 2964 3025 3026 if (node->multiPutByOffsetData().writesStructures()) 3027 didFoldClobberStructures(); 3028 2965 3029 for (unsigned i = node->multiPutByOffsetData().variants.size(); i--;) { 2966 3030 const PutByIdVariant& variant = node->multiPutByOffsetData().variants[i]; … … 3093 3157 m_state.setFoundConstants(true); 3094 3158 3159 didFoldClobberWorld(); 3095 3160 observeTransitions(clobberLimit, transitions); 3096 3161 if (forNode(node->child1()).changeStructure(m_graph, newSet) == Contradiction) … … 3320 3385 && (radix.asNumber() == 0 || radix.asNumber() == 10)) { 3321 3386 m_state.setFoundConstants(true); 3387 if (node->child1().useKind() == UntypedUse) 3388 didFoldClobberWorld(); 3322 3389 forNode(node).setType(SpecInt32Only); 3323 3390 break; … … 3420 3487 { 3421 3488 clobberStructures(clobberLimit); 3489 } 3490 3491 template<typename AbstractStateType> 3492 void AbstractInterpreter<AbstractStateType>::didFoldClobberWorld() 3493 { 3494 didFoldClobberStructures(); 3422 3495 } 3423 3496 … … 3455 3528 { 3456 3529 forAllValues(clobberLimit, AbstractValue::clobberStructuresFor); 3457 setDidClobber(); 3530 m_state.mergeClobberState(AbstractInterpreterClobberState::ClobberedStructures); 3531 m_state.setStructureClobberState(StructuresAreClobbered); 3532 } 3533 3534 template<typename AbstractStateType> 3535 void AbstractInterpreter<AbstractStateType>::didFoldClobberStructures() 3536 { 3537 m_state.mergeClobberState(AbstractInterpreterClobberState::FoldedClobber); 3458 3538 } 3459 3539 … … 3466 3546 3467 3547 ASSERT(!from->dfgShouldWatch()); // We don't need to claim to be in a clobbered state because 'from' was never watchable (during the time we were compiling), hence no constants ever introduced into the DFG IR that ever had a watchable structure would ever have the same structure as from. 3548 3549 m_state.mergeClobberState(AbstractInterpreterClobberState::ObservedTransitions); 3468 3550 } 3469 3551 … … 3472 3554 unsigned clobberLimit, const TransitionVector& vector) 3473 3555 { 3556 if (vector.isEmpty()) 3557 return; 3558 3474 3559 AbstractValue::TransitionsObserver transitionsObserver(vector); 3475 3560 forAllValues(clobberLimit, transitionsObserver); … … 3480 3565 ASSERT(!vector[i].previous->dfgShouldWatch()); 3481 3566 } 3482 } 3483 3484 template<typename AbstractStateType> 3485 void AbstractInterpreter<AbstractStateType>::setDidClobber() 3486 { 3487 m_state.setDidClobber(true); 3488 m_state.setStructureClobberState(StructuresAreClobbered); 3567 3568 m_state.mergeClobberState(AbstractInterpreterClobberState::ObservedTransitions); 3489 3569 } 3490 3570 … … 3586 3666 JSValue child = forNode(node->child1()).value(); 3587 3667 if (std::optional<double> number = child.toNumberFromPrimitive()) { 3668 if (node->child1().useKind() != DoubleRepUse) 3669 didFoldClobberWorld(); 3588 3670 setConstant(node, jsDoubleNumber(equivalentFunction(*number))); 3589 3671 return; -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGAtTailAbstractState.h
r225966 r230568 1 1 /* 2 * Copyright (C) 2013 , 2016Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 #if ENABLE(DFG_JIT) 29 29 30 #include "DFGAbstractInterpreterClobberState.h" 30 31 #include "DFGAbstractValue.h" 31 32 #include "DFGBasicBlock.h" … … 60 61 StructureClobberState structureClobberState() const { return m_block->cfaStructureClobberStateAtTail; } 61 62 62 void setDidClobber(bool) { } 63 void setClobberState(AbstractInterpreterClobberState) { } 64 void mergeClobberState(AbstractInterpreterClobberState) { } 63 65 void setStructureClobberState(StructureClobberState state) { RELEASE_ASSERT(state == m_block->cfaStructureClobberStateAtTail); } 64 66 void setIsValid(bool isValid) { m_block->cfaDidFinish = isValid; } -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGCFAPhase.cpp
r204130 r230568 1 1 /* 2 * Copyright (C) 2011 , 2013-2016Apple Inc. All rights reserved.2 * Copyright (C) 2011-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 30 30 31 31 #include "DFGAbstractInterpreterInlines.h" 32 #include "DFGClobberSet.h" 32 33 #include "DFGGraph.h" 33 34 #include "DFGInPlaceAbstractState.h" … … 164 165 } 165 166 for (unsigned i = 0; i < block->size(); ++i) { 167 Node* node = block->at(i); 166 168 if (m_verbose) { 167 Node* node = block->at(i);168 169 dataLogF(" %s @%u: ", Graph::opName(node->op()), node->index()); 169 170 … … 180 181 break; 181 182 } 183 184 if (m_state.didClobberOrFolded() != writesOverlap(m_graph, node, JSCell_structureID)) 185 DFG_CRASH(m_graph, node, toCString("AI-clobberize disagreement; AI says ", m_state.clobberState(), " while clobberize says ", writeSet(m_graph, node)).data()); 182 186 } 183 187 if (m_verbose) { -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGClobberSet.cpp
r210023 r230568 1 1 /* 2 * Copyright (C) 2013 , 2014Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 159 159 } 160 160 161 ClobberSet writeSet(Graph& graph, Node* node) 162 { 163 ClobberSet result; 164 addWrites(graph, node, result); 165 return result; 166 } 167 161 168 bool readsOverlap(Graph& graph, Node* node, ClobberSet& readSet) 162 169 { -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGClobberSet.h
r207787 r230568 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 114 114 void addReadsAndWrites(Graph&, Node*, ClobberSet& reads, ClobberSet& writes); 115 115 116 ClobberSet writeSet(Graph&, Node*); 117 116 118 bool readsOverlap(Graph&, Node*, ClobberSet&); 117 119 bool writesOverlap(Graph&, Node*, ClobberSet&); -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGClobberize.h
r230536 r230568 954 954 955 955 case Array::ArrayStorage: 956 if (node->arrayMode().isOutOfBounds()) { 957 read(World); 958 write(Heap); 959 return; 960 } 961 read(Butterfly_publicLength); 962 read(Butterfly_vectorLength); 963 read(ArrayStorageProperties); 964 write(ArrayStorageProperties); 965 if (node->arrayMode().mayStoreToHole()) 966 write(Butterfly_publicLength); 967 return; 968 956 969 case Array::SlowPutArrayStorage: 957 // Give up on life for now. 958 read(World); 959 write(Heap); 970 if (node->arrayMode().mayStoreToHole()) { 971 read(World); 972 write(Heap); 973 return; 974 } 975 read(Butterfly_publicLength); 976 read(Butterfly_vectorLength); 977 read(ArrayStorageProperties); 978 write(ArrayStorageProperties); 960 979 return; 961 980 … … 1301 1320 1302 1321 case NewArrayWithSize: 1303 case NewTypedArray:1304 1322 read(HeapObjectCount); 1305 1323 write(HeapObjectCount); 1306 1324 return; 1325 1326 case NewTypedArray: 1327 switch (node->child1().useKind()) { 1328 case Int32Use: 1329 read(HeapObjectCount); 1330 write(HeapObjectCount); 1331 return; 1332 case UntypedUse: 1333 read(World); 1334 write(Heap); 1335 return; 1336 default: 1337 DFG_CRASH(graph, node, "Bad use kind"); 1338 } 1339 break; 1307 1340 1308 1341 case NewArrayWithSpread: { … … 1523 1556 def(PureValue(node)); 1524 1557 return; 1525 1558 1526 1559 case CompareEq: 1527 1560 case CompareLess: … … 1535 1568 } 1536 1569 1537 if (node->op() == CompareEq && node->isBinaryUseKind(ObjectUse)) { 1538 def(PureValue(node)); 1539 return; 1540 } 1541 if (node->child1().useKind() == UntypedUse || node->child1().useKind() == ObjectUse 1542 || node->child2().useKind() == UntypedUse || node->child2().useKind() == ObjectUse) { 1570 if (node->isBinaryUseKind(UntypedUse)) { 1543 1571 read(World); 1544 1572 write(Heap); -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r230536 r230568 762 762 } 763 763 764 case PhantomNewObject: 765 case PhantomNewFunction: 766 case PhantomNewGeneratorFunction: 767 case PhantomNewAsyncGeneratorFunction: 768 case PhantomNewAsyncFunction: 769 case PhantomCreateActivation: 770 case PhantomDirectArguments: 771 case PhantomClonedArguments: 772 case PhantomCreateRest: 773 case PhantomSpread: 774 case PhantomNewArrayWithSpread: 775 case PhantomNewArrayBuffer: 776 case BottomValue: 777 alreadyHandled = true; 778 break; 779 764 780 default: 765 781 break; -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r230536 r230568 686 686 687 687 case StringFromCharCode: 688 if (node->child1()->shouldSpeculateInt32()) 688 if (node->child1()->shouldSpeculateInt32()) { 689 689 fixEdge<Int32Use>(node->child1()); 690 else 690 node->clearFlags(NodeMustGenerate); 691 } else 691 692 fixEdge<UntypedUse>(node->child1()); 692 693 break; -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGInPlaceAbstractState.h
r225966 r230568 1 1 /* 2 * Copyright (C) 2013 , 2016Apple Inc. All rights reserved.2 * Copyright (C) 2013-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 28 28 #if ENABLE(DFG_JIT) 29 29 30 #include "DFGAbstractInterpreterClobberState.h" 30 31 #include "DFGAbstractValue.h" 31 32 #include "DFGBranchDirection.h" … … 91 92 void reset(); 92 93 94 AbstractInterpreterClobberState clobberState() const { return m_clobberState; } 95 96 // Would have the last executed node clobbered things had we not found a way to fold it? 97 bool didClobberOrFolded() const { return clobberState() != AbstractInterpreterClobberState::NotClobbered; } 98 93 99 // Did the last executed node clobber the world? 94 bool didClobber() const { return m_didClobber; }100 bool didClobber() const { return clobberState() == AbstractInterpreterClobberState::ClobberedStructures; } 95 101 96 102 // Are structures currently clobbered? … … 115 121 116 122 // Methods intended to be called from AbstractInterpreter. 117 void setDidClobber(bool didClobber) { m_didClobber = didClobber; } 123 void setClobberState(AbstractInterpreterClobberState state) { m_clobberState = state; } 124 void mergeClobberState(AbstractInterpreterClobberState state) { m_clobberState = mergeClobberStates(m_clobberState, state); } 118 125 void setStructureClobberState(StructureClobberState value) { m_structureClobberState = value; } 119 126 void setIsValid(bool isValid) { m_isValid = isValid; } … … 146 153 147 154 bool m_isValid; 148 bool m_didClobber;155 AbstractInterpreterClobberState m_clobberState; 149 156 StructureClobberState m_structureClobberState; 150 157 -
branches/safari-605-branch/Source/JavaScriptCore/dfg/DFGNodeType.h
r230536 r230568 281 281 macro(StringCharCodeAt, NodeResultInt32) \ 282 282 macro(StringCharAt, NodeResultJS) \ 283 macro(StringFromCharCode, NodeResultJS ) \283 macro(StringFromCharCode, NodeResultJS | NodeMustGenerate) \ 284 284 \ 285 285 /* Nodes for comparison operations. */\
Note: See TracChangeset
for help on using the changeset viewer.