Changeset 172176 in webkit for trunk/Source/JavaScriptCore/dfg
- Timestamp:
- Aug 6, 2014, 2:32:55 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/dfg
- Files:
-
- 2 added
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGAbstractHeap.h
r172129 r172176 54 54 macro(JSObject_butterfly) \ 55 55 macro(JSVariableObject_registers) \ 56 macro(JSPropertyNameEnumerator_cachedPropertyNames) \ 56 57 macro(NamedProperties) \ 57 58 macro(IndexedInt32Properties) \ -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r172129 r172176 1796 1796 } 1797 1797 1798 case In: 1798 case In: { 1799 1799 // FIXME: We can determine when the property definitely exists based on abstract 1800 1800 // value information. … … 1802 1802 forNode(node).setType(SpecBoolean); 1803 1803 break; 1804 1804 } 1805 1806 case GetEnumerableLength: { 1807 forNode(node).setType(SpecInt32); 1808 break; 1809 } 1810 case HasGenericProperty: { 1811 forNode(node).setType(SpecBoolean); 1812 break; 1813 } 1814 case HasStructureProperty: { 1815 forNode(node).setType(SpecBoolean); 1816 break; 1817 } 1818 case HasIndexedProperty: { 1819 ArrayMode mode = node->arrayMode(); 1820 switch (mode.type()) { 1821 case Array::Int32: 1822 case Array::Double: 1823 case Array::Contiguous: 1824 case Array::ArrayStorage: { 1825 break; 1826 } 1827 default: { 1828 clobberWorld(node->origin.semantic, clobberLimit); 1829 break; 1830 } 1831 } 1832 forNode(node).setType(SpecBoolean); 1833 break; 1834 } 1835 case GetDirectPname: { 1836 clobberWorld(node->origin.semantic, clobberLimit); 1837 forNode(node).makeHeapTop(); 1838 break; 1839 } 1840 case GetStructurePropertyEnumerator: { 1841 forNode(node).setType(SpecCell); 1842 break; 1843 } 1844 case GetGenericPropertyEnumerator: { 1845 forNode(node).setType(SpecCell); 1846 break; 1847 } 1848 case GetEnumeratorPname: { 1849 forNode(node).setType(SpecString | SpecOther); 1850 break; 1851 } 1852 case ToIndexString: { 1853 forNode(node).setType(SpecString); 1854 break; 1855 } 1856 1805 1857 case GetGlobalVar: 1806 1858 forNode(node).makeHeapTop(); … … 1867 1919 case Phantom: 1868 1920 case HardPhantom: 1869 case Check:1870 1921 case CountExecution: 1871 1922 case CheckTierUpInLoop: 1872 1923 case CheckTierUpAtReturn: 1873 1924 break; 1925 1926 case Check: { 1927 // Simplify out checks that don't actually do checking. 1928 for (unsigned i = 0; i < AdjacencyList::Size; ++i) { 1929 Edge edge = node->children.child(i); 1930 if (!edge) 1931 break; 1932 if (edge.isProved() || edge.willNotHaveCheck()) { 1933 m_state.setFoundConstants(true); 1934 break; 1935 } 1936 } 1937 break; 1938 } 1874 1939 1875 1940 case StoreBarrier: { -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r172149 r172176 1108 1108 addToGraph(CheckFunction, OpInfo(m_graph.freeze(function)), callTarget, thisArgument); 1109 1109 else { 1110 ASSERT(callLinkStatus.structure());1111 1110 ASSERT(callLinkStatus.executable()); 1112 1111 1113 addToGraph(CheckStructure, OpInfo(m_graph.addStructureSet(callLinkStatus.structure())), callTarget);1114 1112 addToGraph(CheckExecutable, OpInfo(callLinkStatus.executable()), callTarget, thisArgument); 1115 1113 } … … 3209 3207 } 3210 3208 3209 case op_get_enumerable_length: { 3210 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(GetEnumerableLength, 3211 get(VirtualRegister(currentInstruction[2].u.operand)))); 3212 NEXT_OPCODE(op_get_enumerable_length); 3213 } 3214 3215 case op_has_generic_property: { 3216 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(HasGenericProperty, 3217 get(VirtualRegister(currentInstruction[2].u.operand)), 3218 get(VirtualRegister(currentInstruction[3].u.operand)))); 3219 NEXT_OPCODE(op_has_generic_property); 3220 } 3221 3222 case op_has_structure_property: { 3223 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(HasStructureProperty, 3224 get(VirtualRegister(currentInstruction[2].u.operand)), 3225 get(VirtualRegister(currentInstruction[3].u.operand)), 3226 get(VirtualRegister(currentInstruction[4].u.operand)))); 3227 NEXT_OPCODE(op_has_structure_property); 3228 } 3229 3230 case op_has_indexed_property: { 3231 Node* base = get(VirtualRegister(currentInstruction[2].u.operand)); 3232 ArrayMode arrayMode = getArrayModeConsideringSlowPath(currentInstruction[4].u.arrayProfile, Array::Read); 3233 Node* property = get(VirtualRegister(currentInstruction[3].u.operand)); 3234 Node* hasIterableProperty = addToGraph(HasIndexedProperty, OpInfo(arrayMode.asWord()), base, property); 3235 set(VirtualRegister(currentInstruction[1].u.operand), hasIterableProperty); 3236 NEXT_OPCODE(op_has_indexed_property); 3237 } 3238 3239 case op_get_direct_pname: { 3240 SpeculatedType prediction = getPredictionWithoutOSRExit(); 3241 3242 Node* base = get(VirtualRegister(currentInstruction[2].u.operand)); 3243 Node* property = get(VirtualRegister(currentInstruction[3].u.operand)); 3244 Node* index = get(VirtualRegister(currentInstruction[4].u.operand)); 3245 Node* enumerator = get(VirtualRegister(currentInstruction[5].u.operand)); 3246 3247 addVarArgChild(base); 3248 addVarArgChild(property); 3249 addVarArgChild(index); 3250 addVarArgChild(enumerator); 3251 set(VirtualRegister(currentInstruction[1].u.operand), 3252 addToGraph(Node::VarArg, GetDirectPname, OpInfo(0), OpInfo(prediction))); 3253 3254 NEXT_OPCODE(op_get_direct_pname); 3255 } 3256 3257 case op_get_structure_property_enumerator: { 3258 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(GetStructurePropertyEnumerator, 3259 get(VirtualRegister(currentInstruction[2].u.operand)), 3260 get(VirtualRegister(currentInstruction[3].u.operand)))); 3261 NEXT_OPCODE(op_get_structure_property_enumerator); 3262 } 3263 3264 case op_get_generic_property_enumerator: { 3265 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(GetGenericPropertyEnumerator, 3266 get(VirtualRegister(currentInstruction[2].u.operand)), 3267 get(VirtualRegister(currentInstruction[3].u.operand)), 3268 get(VirtualRegister(currentInstruction[4].u.operand)))); 3269 NEXT_OPCODE(op_get_generic_property_enumerator); 3270 } 3271 3272 case op_next_enumerator_pname: { 3273 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(GetEnumeratorPname, 3274 get(VirtualRegister(currentInstruction[2].u.operand)), 3275 get(VirtualRegister(currentInstruction[3].u.operand)))); 3276 NEXT_OPCODE(op_next_enumerator_pname); 3277 } 3278 3279 case op_to_index_string: { 3280 set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(ToIndexString, 3281 get(VirtualRegister(currentInstruction[2].u.operand)))); 3282 NEXT_OPCODE(op_to_index_string); 3283 } 3284 3211 3285 default: 3212 3286 // Parse failed! This should not happen because the capabilities checker -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp
r172129 r172176 194 194 case op_in: 195 195 case op_get_from_scope: 196 case op_get_enumerable_length: 197 case op_has_generic_property: 198 case op_has_structure_property: 199 case op_has_indexed_property: 200 case op_get_direct_pname: 201 case op_get_structure_property_enumerator: 202 case op_get_generic_property_enumerator: 203 case op_next_enumerator_pname: 204 case op_to_index_string: 196 205 return CanCompileAndInline; 197 206 -
trunk/Source/JavaScriptCore/dfg/DFGClobberize.h
r172129 r172176 148 148 return; 149 149 150 case HasGenericProperty: 151 case HasStructureProperty: 152 case GetEnumerableLength: 153 case GetStructurePropertyEnumerator: 154 case GetGenericPropertyEnumerator: { 155 read(World); 156 write(SideState); 157 return; 158 } 159 160 case GetDirectPname: { 161 // This reads and writes world because it can end up calling a generic getByVal 162 // if the Structure changed, which could in turn end up calling a getter. 163 read(World); 164 write(World); 165 return; 166 } 167 168 case ToIndexString: 169 case GetEnumeratorPname: { 170 def(PureValue(node)); 171 return; 172 } 173 174 case HasIndexedProperty: { 175 read(JSObject_butterfly); 176 ArrayMode mode = node->arrayMode(); 177 switch (mode.type()) { 178 case Array::Int32: { 179 if (mode.isInBounds()) { 180 read(Butterfly_publicLength); 181 read(IndexedInt32Properties); 182 def(HeapLocation(HasIndexedPropertyLoc, IndexedInt32Properties, node->child1(), node->child2()), node); 183 return; 184 } 185 read(World); 186 return; 187 } 188 189 case Array::Double: { 190 if (mode.isInBounds()) { 191 read(Butterfly_publicLength); 192 read(IndexedDoubleProperties); 193 def(HeapLocation(HasIndexedPropertyLoc, IndexedDoubleProperties, node->child1(), node->child2()), node); 194 return; 195 } 196 read(World); 197 return; 198 } 199 200 case Array::Contiguous: { 201 if (mode.isInBounds()) { 202 read(Butterfly_publicLength); 203 read(IndexedContiguousProperties); 204 def(HeapLocation(HasIndexedPropertyLoc, IndexedContiguousProperties, node->child1(), node->child2()), node); 205 return; 206 } 207 read(World); 208 return; 209 } 210 211 case Array::ArrayStorage: { 212 if (mode.isInBounds()) { 213 read(Butterfly_vectorLength); 214 read(IndexedArrayStorageProperties); 215 return; 216 } 217 read(World); 218 return; 219 } 220 221 default: { 222 read(World); 223 write(World); 224 return; 225 } 226 } 227 RELEASE_ASSERT_NOT_REACHED(); 228 return; 229 } 230 150 231 case ArithAdd: 151 232 case ArithSub: -
trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r172129 r172176 87 87 Node* node = block->at(indexInBlock); 88 88 89 bool alreadyHandled = false; 89 90 bool eliminated = false; 90 91 … … 174 175 175 176 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 176 eliminated = true; // Don't allow the default constant folder to do things to this.177 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 177 178 178 179 for (unsigned i = 0; i < data.variants.size(); ++i) { … … 182 183 data.variants[i--] = data.variants.last(); 183 184 data.variants.removeLast(); 185 changed = true; 184 186 } 185 187 } … … 190 192 emitGetByOffset( 191 193 indexInBlock, node, baseValue, data.variants[0], data.identifierNumber); 194 changed = true; 192 195 break; 193 196 } … … 201 204 202 205 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 203 eliminated = true; // Don't allow the default constant folder to do things to this.206 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 204 207 205 208 … … 211 214 data.variants[i--] = data.variants.last(); 212 215 data.variants.removeLast(); 216 changed = true; 213 217 continue; 214 218 } … … 219 223 variant.oldStructure(), 220 224 variant.offset()); 225 changed = true; 221 226 } 222 227 } … … 227 232 emitPutByOffset( 228 233 indexInBlock, node, baseValue, data.variants[0], data.identifierNumber); 234 changed = true; 229 235 break; 230 236 } … … 239 245 240 246 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 241 eliminated = true; // Don't allow the default constant folder to do things to this.247 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 242 248 243 249 if (baseValue.m_structure.isTop() || baseValue.m_structure.isClobbered() … … 261 267 if (status.numVariants() == 1) { 262 268 emitGetByOffset(indexInBlock, node, baseValue, status[0], identifierNumber); 269 changed = true; 263 270 break; 264 271 } … … 271 278 data->identifierNumber = identifierNumber; 272 279 node->convertToMultiGetByOffset(data); 280 changed = true; 273 281 break; 274 282 } … … 287 295 288 296 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 289 eliminated = true; // Don't allow the default constant folder to do things to this.297 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 290 298 291 299 if (baseValue.m_structure.isTop() || baseValue.m_structure.isClobbered()) … … 302 310 break; 303 311 312 ASSERT(status.numVariants()); 313 314 if (status.numVariants() > 1 && !isFTL(m_graph.m_plan.mode)) 315 break; 316 317 changed = true; 318 304 319 for (unsigned i = status.numVariants(); i--;) 305 320 addChecks(origin, indexInBlock, status[i].constantChecks()); … … 310 325 } 311 326 312 if (!isFTL(m_graph.m_plan.mode)) 313 break; 327 ASSERT(isFTL(m_graph.m_plan.mode)); 314 328 315 329 MultiPutByOffsetData* data = m_graph.m_multiPutByOffsetData.add(); … … 325 339 326 340 node->convertToIdentity(); 341 changed = true; 327 342 break; 328 343 } … … 355 370 break; 356 371 } 372 373 case Check: { 374 alreadyHandled = true; 375 m_interpreter.execute(indexInBlock); 376 for (unsigned i = 0; i < AdjacencyList::Size; ++i) { 377 Edge edge = node->children.child(i); 378 if (!edge) 379 break; 380 if (edge.isProved() || edge.willNotHaveCheck()) { 381 node->children.removeEdge(i--); 382 changed = true; 383 } 384 } 385 break; 386 } 357 387 358 388 default: 359 389 break; 360 390 } 361 391 362 392 if (eliminated) { 363 393 changed = true; … … 365 395 } 366 396 397 if (alreadyHandled) 398 continue; 399 367 400 m_interpreter.execute(indexInBlock); 368 401 if (!m_state.isValid()) { -
trunk/Source/JavaScriptCore/dfg/DFGDCEPhase.cpp
r172129 r172176 50 50 51 51 // First reset the counts to 0 for all nodes. 52 // 53 // Also take this opportunity to pretend that Check nodes are not NodeMustGenerate. Check 54 // nodes are MustGenerate because they are executed for effect, but they follow the same 55 // DCE rules as nodes that aren't MustGenerate: they only contribute to the ref count of 56 // their children if the edges require checks. Non-checking edges are removed. Note that 57 // for any Checks left over, this phase will turn them back into NodeMustGenerate. 52 58 for (BlockIndex blockIndex = 0; blockIndex < m_graph.numBlocks(); ++blockIndex) { 53 59 BasicBlock* block = m_graph.block(blockIndex); 54 60 if (!block) 55 61 continue; 56 for (unsigned indexInBlock = block->size(); indexInBlock--;) 57 block->at(indexInBlock)->setRefCount(0); 62 for (unsigned indexInBlock = block->size(); indexInBlock--;) { 63 Node* node = block->at(indexInBlock); 64 if (node->op() == Check) 65 node->clearFlags(NodeMustGenerate); 66 node->setRefCount(0); 67 } 58 68 for (unsigned phiIndex = block->phis.size(); phiIndex--;) 59 69 block->phis[phiIndex]->setRefCount(0); … … 120 130 } 121 131 132 // Just do a basic HardPhantom/Phantom/Check clean-up. 133 for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) { 134 BasicBlock* block = m_graph.block(blockIndex); 135 if (!block) 136 continue; 137 unsigned sourceIndex = 0; 138 unsigned targetIndex = 0; 139 while (sourceIndex < block->size()) { 140 Node* node = block->at(sourceIndex++); 141 switch (node->op()) { 142 case Check: 143 case HardPhantom: 144 case Phantom: 145 if (node->children.isEmpty()) 146 continue; 147 break; 148 default: 149 break; 150 } 151 block->at(targetIndex++) = node; 152 } 153 block->resize(targetIndex); 154 } 155 122 156 m_graph.m_refCountState = ExactRefCount; 123 157 … … 130 164 // We may have an "unproved" untyped use for code that is unreachable. The CFA 131 165 // will just not have gotten around to it. 132 if (edge. willNotHaveCheck())166 if (edge.isProved() || edge.willNotHaveCheck()) 133 167 return; 134 168 if (!edge->postfixRef()) … … 146 180 { 147 181 // Don't count edges that are already counted for their type checks. 148 if ( edge.willHaveCheck())182 if (!(edge.isProved() || edge.willNotHaveCheck())) 149 183 return; 150 184 countNode(edge.node()); … … 215 249 Edge edge = m_graph.m_varArgChildren[childIdx]; 216 250 217 if (!edge || edge. willNotHaveCheck())251 if (!edge || edge.isProved() || edge.willNotHaveCheck()) 218 252 continue; 219 253 220 m_insertionSet.insertNode(indexInBlock, SpecNone, Phantom, node->origin, edge);254 m_insertionSet.insertNode(indexInBlock, SpecNone, Check, node->origin, edge); 221 255 } 222 256 … … 227 261 } 228 262 229 node->convertToPhantom(); 230 eliminateIrrelevantPhantomChildren(node); 263 node->convertToCheck(); 264 for (unsigned i = 0; i < AdjacencyList::Size; ++i) { 265 Edge edge = node->children.child(i); 266 if (!edge) 267 continue; 268 if (edge.isProved() || edge.willNotHaveCheck()) 269 node->children.removeEdge(i--); 270 } 231 271 node->setRefCount(1); 232 272 break; … … 237 277 } 238 278 239 void eliminateIrrelevantPhantomChildren(Node* node)240 {241 for (unsigned i = 0; i < AdjacencyList::Size; ++i) {242 Edge edge = node->children.child(i);243 if (!edge)244 continue;245 if (edge.willNotHaveCheck())246 node->children.removeEdge(i--);247 }248 }249 250 279 template<typename VariablesVectorType> 251 280 void cleanVariables(VariablesVectorType& variables) … … 255 284 if (!node) 256 285 continue; 257 if (node->op() != Phantom && node-> shouldGenerate())286 if (node->op() != Phantom && node->op() != Check && node->shouldGenerate()) 258 287 continue; 259 288 if (node->op() == GetLocal) { -
trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp
r171660 r172176 190 190 case GetGetterSetterByOffset: 191 191 case PutByOffset: 192 case GetEnumerableLength: 193 case HasGenericProperty: 194 case HasStructureProperty: 195 case HasIndexedProperty: 196 case GetDirectPname: 192 197 case FiatInt52: 193 198 case BooleanToNumber: … … 214 219 case NewTypedArray: 215 220 case ThrowReferenceError: 221 case GetStructurePropertyEnumerator: 222 case GetGenericPropertyEnumerator: 223 case GetEnumeratorPname: 224 case ToIndexString: 216 225 return true; 217 226 -
trunk/Source/JavaScriptCore/dfg/DFGEdge.cpp
r164229 r172176 1 1 /* 2 * Copyright (C) 2013 Apple Inc. All rights reserved.2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 37 37 { 38 38 if (useKindUnchecked() != UntypedUse) { 39 if ( needsCheck())39 if (!isProved()) 40 40 out.print("Check:"); 41 41 out.print(useKind(), ":"); -
trunk/Source/JavaScriptCore/dfg/DFGEdge.h
r167325 r172176 116 116 return proofStatus() == IsProved; 117 117 } 118 bool needsCheck() const119 {120 return proofStatus() == NeedsCheck;121 }122 118 123 119 bool willNotHaveCheck() const -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r172129 r172176 899 899 } 900 900 901 case CheckExecutable: 901 case CheckExecutable: { 902 fixEdge<FunctionUse>(node->child1()); 903 break; 904 } 905 902 906 case CheckStructure: 903 907 case CheckFunction: … … 1041 1045 } 1042 1046 break; 1047 1048 case GetEnumerableLength: { 1049 fixEdge<CellUse>(node->child1()); 1050 break; 1051 } 1052 case HasGenericProperty: { 1053 fixEdge<StringUse>(node->child2()); 1054 break; 1055 } 1056 case HasStructureProperty: { 1057 fixEdge<StringUse>(node->child2()); 1058 fixEdge<KnownCellUse>(node->child3()); 1059 break; 1060 } 1061 case HasIndexedProperty: { 1062 node->setArrayMode( 1063 node->arrayMode().refine( 1064 m_graph, node, 1065 node->child1()->prediction(), 1066 node->child2()->prediction(), 1067 SpecNone, node->flags())); 1068 1069 blessArrayOperation(node->child1(), node->child2(), node->child3()); 1070 fixEdge<CellUse>(node->child1()); 1071 fixEdge<KnownInt32Use>(node->child2()); 1072 break; 1073 } 1074 case GetDirectPname: { 1075 Edge& base = m_graph.varArgChild(node, 0); 1076 Edge& property = m_graph.varArgChild(node, 1); 1077 Edge& index = m_graph.varArgChild(node, 2); 1078 Edge& enumerator = m_graph.varArgChild(node, 3); 1079 fixEdge<CellUse>(base); 1080 fixEdge<KnownCellUse>(property); 1081 fixEdge<KnownInt32Use>(index); 1082 fixEdge<KnownCellUse>(enumerator); 1083 break; 1084 } 1085 case GetStructurePropertyEnumerator: { 1086 fixEdge<CellUse>(node->child1()); 1087 fixEdge<KnownInt32Use>(node->child2()); 1088 break; 1089 } 1090 case GetGenericPropertyEnumerator: { 1091 fixEdge<CellUse>(node->child1()); 1092 fixEdge<KnownInt32Use>(node->child2()); 1093 fixEdge<KnownCellUse>(node->child3()); 1094 break; 1095 } 1096 case GetEnumeratorPname: { 1097 fixEdge<KnownCellUse>(node->child1()); 1098 fixEdge<KnownInt32Use>(node->child2()); 1099 break; 1100 } 1101 case ToIndexString: { 1102 fixEdge<KnownInt32Use>(node->child1()); 1103 break; 1104 } 1043 1105 1044 1106 #if !ASSERT_DISABLED … … 1544 1606 case KnownCellUse: 1545 1607 case ObjectUse: 1608 case FunctionUse: 1546 1609 case StringUse: 1547 1610 case KnownStringUse: -
trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp
r172129 r172176 158 158 159 159 unsigned refCount = node->refCount(); 160 bool skipped = !refCount;161 160 bool mustGenerate = node->mustGenerate(); 162 161 if (mustGenerate) … … 182 181 // id# - the index in the CodeBlock of an identifier { if codeBlock is passed to dump(), the string representation is displayed }. 183 182 // var# - the index of a var on the global object, used by GetGlobalVar/PutGlobalVar operations. 184 out.printf("% 4d: %s<%c%u:", (int)node->index(), skipped ? " skipped " : " ", mustGenerate ? '!' : ' ', refCount);185 if (node->hasResult() && !skipped && node->hasVirtualRegister())183 out.printf("% 4d:<%c%u:", (int)node->index(), mustGenerate ? '!' : ' ', refCount); 184 if (node->hasResult() && node->hasVirtualRegister() && node->virtualRegister().isValid()) 186 185 out.print(node->virtualRegister()); 187 186 else … … 353 352 out.print(")"); 354 353 355 if (!skipped) { 356 if (node->hasVariableAccessData(*this) && node->tryGetVariableAccessData()) 357 out.print(" predicting ", SpeculationDump(node->tryGetVariableAccessData()->prediction())); 358 else if (node->hasHeapPrediction()) 359 out.print(" predicting ", SpeculationDump(node->getHeapPrediction())); 360 } 354 if (node->hasVariableAccessData(*this) && node->tryGetVariableAccessData()) 355 out.print(" predicting ", SpeculationDump(node->tryGetVariableAccessData()->prediction())); 356 else if (node->hasHeapPrediction()) 357 out.print(" predicting ", SpeculationDump(node->getHeapPrediction())); 361 358 362 359 out.print("\n"); -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
r172129 r172176 109 109 return; 110 110 111 case HasIndexedPropertyLoc: 112 out.print("HasIndexedPorpertyLoc"); 113 return; 114 111 115 case IndexedPropertyLoc: 112 116 out.print("IndexedPorpertyLoc"); -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.h
r172129 r172176 45 45 GetterLoc, 46 46 GlobalVariableLoc, 47 HasIndexedPropertyLoc, 47 48 IndexedPropertyLoc, 48 49 IndexedPropertyStorageLoc, -
trunk/Source/JavaScriptCore/dfg/DFGNode.h
r172129 r172176 1002 1002 { 1003 1003 switch (op()) { 1004 case GetDirectPname: 1004 1005 case GetById: 1005 1006 case GetByIdFlush: … … 1268 1269 case ArrayPush: 1269 1270 case ArrayPop: 1271 case HasIndexedProperty: 1270 1272 return true; 1271 1273 default: -
trunk/Source/JavaScriptCore/dfg/DFGNodeFlags.h
r171613 r172176 70 70 71 71 #define NodeIsFlushed 0x20000 // Used by Graph::computeIsFlushed(), will tell you which local nodes are backwards-reachable from a Flush. 72 73 #define NodeMiscFlag1 0x40000 74 #define NodeMiscFlag2 0x80000 72 75 73 76 typedef uint32_t NodeFlags; -
trunk/Source/JavaScriptCore/dfg/DFGNodeType.h
r171660 r172176 62 62 macro(Phantom, NodeMustGenerate) \ 63 63 macro(HardPhantom, NodeMustGenerate) /* Like Phantom, but we never remove any of its children. */ \ 64 macro(Check, 0) /* Used if we want just a type check but not liveness. DCE eithers kills this or converts it to Phantom. */\64 macro(Check, NodeMustGenerate) /* Used if we want just a type check but not liveness. Non-checking uses will be removed. */\ 65 65 macro(Upsilon, NodeRelevantToOSR) \ 66 66 macro(Phi, NodeRelevantToOSR) \ … … 294 294 macro(StoreBarrier, NodeMustGenerate) \ 295 295 macro(StoreBarrierWithNullCheck, NodeMustGenerate) \ 296 \ 297 /* For-in enumeration opcodes */\ 298 macro(GetEnumerableLength, NodeMustGenerate | NodeResultJS) \ 299 macro(HasIndexedProperty, NodeResultBoolean) \ 300 macro(HasStructureProperty, NodeResultBoolean) \ 301 macro(HasGenericProperty, NodeResultBoolean) \ 302 macro(GetDirectPname, NodeMustGenerate | NodeHasVarArgs | NodeResultJS) \ 303 macro(GetStructurePropertyEnumerator, NodeMustGenerate | NodeResultJS) \ 304 macro(GetGenericPropertyEnumerator, NodeMustGenerate | NodeResultJS) \ 305 macro(GetEnumeratorPname, NodeMustGenerate | NodeResultJS) \ 306 macro(ToIndexString, NodeResultJS) 296 307 297 308 // This enum generates a monotonically increasing id for all Node types, -
trunk/Source/JavaScriptCore/dfg/DFGPhantomRemovalPhase.cpp
r172129 r172176 97 97 while (sourceIndex < block->size()) { 98 98 Node* node = block->at(sourceIndex++); 99 if (node->op() == Phantom) { 99 switch (node->op()) { 100 case Phantom: { 100 101 if (lastNode && (lastNode->origin.forExit != node->origin.forExit || (lastNode->flags() & NodeHasVarArgs))) 101 102 lastNode = nullptr; … … 104 105 if (!edge) 105 106 break; 106 if (edge. useKind() != UntypedUse)107 if (edge.willHaveCheck()) 107 108 continue; // Keep the type check. 108 109 if (edge->flags() & NodeRelevantToOSR) { … … 124 125 } 125 126 127 if (node->children.isEmpty()) { 128 changed = true; 129 continue; 130 } 131 break; 132 } 133 134 case Check: { 135 for (unsigned i = 0; i < AdjacencyList::Size; ++i) { 136 Edge edge = node->children.child(i); 137 if (!edge) 138 break; 139 if (edge.willHaveCheck()) 140 continue; 141 node->children.removeEdge(i--); 142 changed = true; 143 } 144 if (node->children.isEmpty()) { 145 changed = true; 146 continue; 147 } 148 break; 149 } 150 151 case HardPhantom: { 126 152 if (node->children.isEmpty()) 127 153 continue; 154 break; 155 } 156 157 default: 158 break; 128 159 } 129 160 lastNode = node; -
trunk/Source/JavaScriptCore/dfg/DFGPhantomRemovalPhase.h
r172129 r172176 35 35 // Cleans up unnecessary Phantoms and Phanton children. This reduces live ranges, but also, it 36 36 // eliminates many Phantoms entirely. This invalidates liveness analysis. 37 // 38 // This should work over all IR forms; however, in SSA form it's better to run 39 // PhantomCanonicalizationPhase since it's more powerful. 37 40 38 41 bool performPhantomRemoval(Graph&); -
trunk/Source/JavaScriptCore/dfg/DFGPlan.cpp
r172129 r172176 50 50 #include "DFGOSRAvailabilityAnalysisPhase.h" 51 51 #include "DFGOSREntrypointCreationPhase.h" 52 #include "DFGPhantomCanonicalizationPhase.h" 52 53 #include "DFGPhantomRemovalPhase.h" 53 54 #include "DFGPredictionInjectionPhase.h" … … 312 313 } 313 314 314 performPhantomRemoval(dfg); 315 performPhantomRemoval(dfg); // Reduce the graph size a bit. 315 316 performCriticalEdgeBreaking(dfg); 316 317 performLoopPreHeaderCreation(dfg); … … 322 323 performCFA(dfg); 323 324 performConstantFolding(dfg); 325 performPhantomCanonicalization(dfg); // Reduce the graph size a lot. 324 326 if (performStrengthReduction(dfg)) { 325 327 // State-at-tail and state-at-head will be invalid if we did strength reduction since … … 329 331 } 330 332 performLICM(dfg); 331 performPhantom Removal(dfg);333 performPhantomCanonicalization(dfg); 332 334 performIntegerCheckCombining(dfg); 333 335 performGlobalCSE(dfg); … … 338 340 339 341 performStoreBarrierElision(dfg); 340 performPhantom Removal(dfg);342 performPhantomCanonicalization(dfg); 341 343 performLivenessAnalysis(dfg); 342 344 performCFA(dfg); -
trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
r171660 r172176 186 186 case GetByOffset: 187 187 case MultiGetByOffset: 188 case GetDirectPname: 188 189 case Call: 189 190 case Construct: … … 584 585 changed |= setPrediction(SpecBoolean); 585 586 break; 587 588 case GetEnumerableLength: { 589 changed |= setPrediction(SpecInt32); 590 break; 591 } 592 case HasGenericProperty: { 593 changed |= setPrediction(SpecBoolean); 594 break; 595 } 596 case HasStructureProperty: { 597 changed |= setPrediction(SpecBoolean); 598 break; 599 } 600 case HasIndexedProperty: { 601 changed |= setPrediction(SpecBoolean); 602 break; 603 } 604 case GetStructurePropertyEnumerator: { 605 changed |= setPrediction(SpecCell); 606 break; 607 } 608 case GetGenericPropertyEnumerator: { 609 changed |= setPrediction(SpecCell); 610 break; 611 } 612 case GetEnumeratorPname: { 613 changed |= setPrediction(SpecCell | SpecOther); 614 break; 615 } 616 case ToIndexString: { 617 changed |= setPrediction(SpecString); 618 break; 619 } 586 620 587 621 #ifndef NDEBUG -
trunk/Source/JavaScriptCore/dfg/DFGSSALoweringPhase.cpp
r164229 r172176 70 70 switch (m_node->op()) { 71 71 case GetByVal: 72 case HasIndexedProperty: 72 73 lowerBoundsCheck(m_node->child1(), m_node->child2(), m_node->child3()); 73 74 break; -
trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
r171660 r172176 54 54 case CellUse: 55 55 case ObjectUse: 56 case FunctionUse: 56 57 case FinalObjectUse: 57 58 case ObjectOrOtherUse: … … 259 260 case GetGetter: 260 261 case GetSetter: 262 case GetEnumerableLength: 263 case HasGenericProperty: 264 case HasStructureProperty: 265 case HasIndexedProperty: 266 case GetDirectPname: 267 case GetStructurePropertyEnumerator: 268 case GetGenericPropertyEnumerator: 269 case GetEnumeratorPname: 270 case ToIndexString: 261 271 return true; 262 272 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r171662 r172176 713 713 } 714 714 case Array::Arguments: 715 speculationCheck(BadType, JSValueSource::unboxedCell(baseReg), node, 716 m_jit.branch8( 717 MacroAssembler::NotEqual, 718 MacroAssembler::Address(baseReg, JSCell::typeInfoTypeOffset()), 719 MacroAssembler::TrustedImm32(ArgumentsType))); 715 speculateCellTypeWithoutTypeFiltering(node->child1(), baseReg, ArgumentsType); 720 716 721 717 noResult(m_currentNode); 722 718 return; 723 719 default: 724 speculationCheck(BadType, JSValueSource::unboxedCell(baseReg), node, 725 m_jit.branch8( 726 MacroAssembler::NotEqual, 727 MacroAssembler::Address(baseReg, JSCell::typeInfoTypeOffset()), 728 MacroAssembler::TrustedImm32(typeForTypedArrayType(node->arrayMode().typedArrayType())))); 720 speculateCellTypeWithoutTypeFiltering( 721 node->child1(), baseReg, 722 typeForTypedArrayType(node->arrayMode().typedArrayType())); 729 723 noResult(m_currentNode); 730 724 return; … … 4509 4503 } 4510 4504 4505 void SpeculativeJIT::speculateCellTypeWithoutTypeFiltering( 4506 Edge edge, GPRReg cellGPR, JSType jsType) 4507 { 4508 speculationCheck( 4509 BadType, JSValueSource::unboxedCell(cellGPR), edge, 4510 m_jit.branch8( 4511 MacroAssembler::NotEqual, 4512 MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()), 4513 MacroAssembler::TrustedImm32(jsType))); 4514 } 4515 4516 void SpeculativeJIT::speculateCellType( 4517 Edge edge, GPRReg cellGPR, SpeculatedType specType, JSType jsType) 4518 { 4519 DFG_TYPE_CHECK( 4520 JSValueSource::unboxedCell(cellGPR), edge, specType, 4521 m_jit.branch8( 4522 MacroAssembler::NotEqual, 4523 MacroAssembler::Address(cellGPR, JSCell::typeInfoTypeOffset()), 4524 TrustedImm32(jsType))); 4525 } 4526 4511 4527 void SpeculativeJIT::speculateInt32(Edge edge) 4512 4528 { … … 4582 4598 } 4583 4599 4600 void SpeculativeJIT::speculateFunction(Edge edge) 4601 { 4602 if (!needsTypeCheck(edge, SpecFunction)) 4603 return; 4604 4605 SpeculateCellOperand operand(this, edge); 4606 speculateCellType(edge, operand.gpr(), SpecFunction, JSFunctionType); 4607 } 4608 4584 4609 void SpeculativeJIT::speculateFinalObject(Edge edge) 4585 4610 { … … 4588 4613 4589 4614 SpeculateCellOperand operand(this, edge); 4590 GPRReg gpr = operand.gpr(); 4591 DFG_TYPE_CHECK( 4592 JSValueSource::unboxedCell(gpr), edge, SpecFinalObject, m_jit.branch8( 4593 MacroAssembler::NotEqual, 4594 MacroAssembler::Address(gpr, JSCell::typeInfoTypeOffset()), 4595 TrustedImm32(FinalObjectType))); 4615 speculateCellType(edge, operand.gpr(), SpecFinalObject, FinalObjectType); 4596 4616 } 4597 4617 … … 4836 4856 case ObjectUse: 4837 4857 speculateObject(edge); 4858 break; 4859 case FunctionUse: 4860 speculateFunction(edge); 4838 4861 break; 4839 4862 case FinalObjectUse: -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r171613 r172176 1035 1035 return appendCallWithExceptionCheckSetResult(operation, result); 1036 1036 } 1037 JITCompiler::Call callOperation(C_JITOperation_ECZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1038 { 1039 m_jit.setupArgumentsWithExecState(arg1, arg2); 1040 return appendCallWithExceptionCheckSetResult(operation, result); 1041 } 1042 JITCompiler::Call callOperation(C_JITOperation_ECZC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1043 { 1044 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); 1045 return appendCallWithExceptionCheckSetResult(operation, result); 1046 } 1037 1047 JITCompiler::Call callOperation(C_JITOperation_ECC operation, GPRReg result, GPRReg arg1, JSCell* cell) 1038 1048 { … … 1132 1142 m_jit.setupArgumentsExecState(); 1133 1143 return appendCallWithCallFrameRollbackOnExceptionSetResult(operation, result); 1144 } 1145 JITCompiler::Call callOperation(Z_JITOperation_EC operation, GPRReg result, GPRReg arg1) 1146 { 1147 m_jit.setupArgumentsWithExecState(arg1); 1148 return appendCallWithExceptionCheckSetResult(operation, result); 1134 1149 } 1135 1150 … … 1259 1274 return appendCallWithExceptionCheckSetResult(operation, result); 1260 1275 } 1276 JITCompiler::Call callOperation(J_JITOperation_ECZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1277 { 1278 m_jit.setupArgumentsWithExecState(arg1, arg2); 1279 return appendCallWithExceptionCheckSetResult(operation, result); 1280 } 1261 1281 JITCompiler::Call callOperation(J_JITOperation_ESsiCI operation, GPRReg result, StructureStubInfo* stubInfo, GPRReg arg1, const StringImpl* uid) 1262 1282 { … … 1270 1290 } 1271 1291 JITCompiler::Call callOperation(J_JITOperation_EDA operation, GPRReg result, FPRReg arg1, GPRReg arg2) 1292 { 1293 m_jit.setupArgumentsWithExecState(arg1, arg2); 1294 return appendCallWithExceptionCheckSetResult(operation, result); 1295 } 1296 JITCompiler::Call callOperation(J_JITOperation_EJC operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1297 { 1298 m_jit.setupArgumentsWithExecState(arg1, arg2); 1299 return appendCallWithExceptionCheckSetResult(operation, result); 1300 } 1301 JITCompiler::Call callOperation(J_JITOperation_EJZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1272 1302 { 1273 1303 m_jit.setupArgumentsWithExecState(arg1, arg2); … … 1320 1350 { 1321 1351 m_jit.setupArgumentsWithExecState(arg1); 1352 return appendCallWithExceptionCheckSetResult(operation, result); 1353 } 1354 JITCompiler::Call callOperation(C_JITOperation_EJJC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1355 { 1356 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); 1357 return appendCallWithExceptionCheckSetResult(operation, result); 1358 } 1359 JITCompiler::Call callOperation(C_JITOperation_EJZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1360 { 1361 m_jit.setupArgumentsWithExecState(arg1, arg2); 1362 return appendCallWithExceptionCheckSetResult(operation, result); 1363 } 1364 JITCompiler::Call callOperation(C_JITOperation_EJZC operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1365 { 1366 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); 1322 1367 return appendCallWithExceptionCheckSetResult(operation, result); 1323 1368 } … … 1495 1540 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1496 1541 } 1542 JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg resultPayload, GPRReg resultTag, GPRReg arg1) 1543 { 1544 m_jit.setupArgumentsWithExecState(arg1); 1545 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1546 } 1547 JITCompiler::Call callOperation(J_JITOperation_EJC operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2) 1548 { 1549 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2); 1550 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1551 } 1497 1552 JITCompiler::Call callOperation(J_JITOperation_EJssZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2) 1498 1553 { … … 1524 1579 { 1525 1580 m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell)); 1581 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1582 } 1583 JITCompiler::Call callOperation(J_JITOperation_ECZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2) 1584 { 1585 m_jit.setupArgumentsWithExecState(arg1, arg2); 1526 1586 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1527 1587 } … … 2212 2272 void typeCheck(JSValueSource, Edge, SpeculatedType typesPassedThrough, MacroAssembler::Jump jumpToFail); 2213 2273 2274 void speculateCellTypeWithoutTypeFiltering(Edge, GPRReg cellGPR, JSType); 2275 void speculateCellType(Edge, GPRReg cellGPR, SpeculatedType, JSType); 2276 2214 2277 void speculateInt32(Edge); 2215 2278 #if USE(JSVALUE64) … … 2223 2286 void speculateCell(Edge); 2224 2287 void speculateObject(Edge); 2288 void speculateFunction(Edge); 2225 2289 void speculateFinalObject(Edge); 2226 2290 void speculateObjectOrOther(Edge); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r171662 r172176 38 38 #include "GetterSetter.h" 39 39 #include "JSActivation.h" 40 #include "JSPropertyNameEnumerator.h" 40 41 #include "ObjectPrototype.h" 41 42 #include "JSCInlines.h" … … 1785 1786 1786 1787 case MovHint: 1787 case ZombieHint: 1788 case Check: { 1788 case ZombieHint: { 1789 1789 RELEASE_ASSERT_NOT_REACHED(); 1790 1790 break; … … 3701 3701 case CheckExecutable: { 3702 3702 SpeculateCellOperand function(this, node->child1()); 3703 speculateCellType(node->child1(), function.gpr(), SpecFunction, JSFunctionType); 3703 3704 speculationCheck(BadExecutable, JSValueSource::unboxedCell(function.gpr()), node->child1(), m_jit.branchWeakPtr(JITCompiler::NotEqual, JITCompiler::Address(function.gpr(), JSFunction::offsetOfExecutable()), node->executable())); 3704 3705 noResult(node); … … 4602 4603 } 4603 4604 4605 case GetEnumerableLength: { 4606 SpeculateCellOperand base(this, node->child1()); 4607 GPRResult result(this); 4608 GPRReg resultGPR = result.gpr(); 4609 4610 flushRegisters(); 4611 callOperation(operationGetEnumerableLength, resultGPR, base.gpr()); 4612 int32Result(resultGPR, node); 4613 break; 4614 } 4615 case HasGenericProperty: { 4616 JSValueOperand base(this, node->child1()); 4617 SpeculateCellOperand property(this, node->child2()); 4618 GPRResult resultPayload(this); 4619 GPRResult2 resultTag(this); 4620 GPRReg basePayloadGPR = base.payloadGPR(); 4621 GPRReg baseTagGPR = base.tagGPR(); 4622 GPRReg resultPayloadGPR = resultPayload.gpr(); 4623 GPRReg resultTagGPR = resultTag.gpr(); 4624 4625 flushRegisters(); 4626 callOperation(operationHasGenericProperty, resultTagGPR, resultPayloadGPR, baseTagGPR, basePayloadGPR, property.gpr()); 4627 booleanResult(resultPayloadGPR, node); 4628 break; 4629 } 4630 case HasStructureProperty: { 4631 JSValueOperand base(this, node->child1()); 4632 SpeculateCellOperand property(this, node->child2()); 4633 SpeculateCellOperand enumerator(this, node->child3()); 4634 GPRTemporary scratch(this); 4635 GPRResult resultPayload(this); 4636 GPRResult2 resultTag(this); 4637 4638 GPRReg baseTagGPR = base.tagGPR(); 4639 GPRReg basePayloadGPR = base.payloadGPR(); 4640 GPRReg propertyGPR = property.gpr(); 4641 GPRReg scratchGPR = scratch.gpr(); 4642 GPRReg resultPayloadGPR = resultPayload.gpr(); 4643 GPRReg resultTagGPR = resultTag.gpr(); 4644 4645 m_jit.load32(MacroAssembler::Address(basePayloadGPR, JSCell::structureIDOffset()), scratchGPR); 4646 MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 4647 scratchGPR, 4648 MacroAssembler::Address(enumerator.gpr(), JSPropertyNameEnumerator::cachedStructureIDOffset())); 4649 4650 moveTrueTo(resultPayloadGPR); 4651 MacroAssembler::Jump done = m_jit.jump(); 4652 4653 done.link(&m_jit); 4654 4655 addSlowPathGenerator(slowPathCall(wrongStructure, this, operationHasGenericProperty, resultTagGPR, resultPayloadGPR, baseTagGPR, basePayloadGPR, propertyGPR)); 4656 booleanResult(resultPayloadGPR, node); 4657 break; 4658 } 4659 case HasIndexedProperty: { 4660 SpeculateCellOperand base(this, node->child1()); 4661 SpeculateInt32Operand index(this, node->child2()); 4662 GPRResult resultPayload(this); 4663 GPRResult2 resultTag(this); 4664 4665 GPRReg baseGPR = base.gpr(); 4666 GPRReg indexGPR = index.gpr(); 4667 GPRReg resultPayloadGPR = resultPayload.gpr(); 4668 GPRReg resultTagGPR = resultTag.gpr(); 4669 4670 MacroAssembler::JumpList slowCases; 4671 ArrayMode mode = node->arrayMode(); 4672 switch (mode.type()) { 4673 case Array::Int32: 4674 case Array::Contiguous: { 4675 ASSERT(!!node->child3()); 4676 StorageOperand storage(this, node->child3()); 4677 GPRTemporary scratch(this); 4678 4679 GPRReg storageGPR = storage.gpr(); 4680 GPRReg scratchGPR = scratch.gpr(); 4681 4682 slowCases.append(m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()))); 4683 m_jit.load32(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag)), scratchGPR); 4684 slowCases.append(m_jit.branch32(MacroAssembler::Equal, scratchGPR, TrustedImm32(JSValue::EmptyValueTag))); 4685 break; 4686 } 4687 case Array::Double: { 4688 ASSERT(!!node->child3()); 4689 StorageOperand storage(this, node->child3()); 4690 FPRTemporary scratch(this); 4691 FPRReg scratchFPR = scratch.fpr(); 4692 GPRReg storageGPR = storage.gpr(); 4693 4694 slowCases.append(m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength()))); 4695 m_jit.loadDouble(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight), scratchFPR); 4696 slowCases.append(m_jit.branchDouble(MacroAssembler::DoubleNotEqualOrUnordered, scratchFPR, scratchFPR)); 4697 break; 4698 } 4699 case Array::ArrayStorage: { 4700 ASSERT(!!node->child3()); 4701 StorageOperand storage(this, node->child3()); 4702 GPRTemporary scratch(this); 4703 4704 GPRReg storageGPR = storage.gpr(); 4705 GPRReg scratchGPR = scratch.gpr(); 4706 4707 slowCases.append(m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, ArrayStorage::vectorLengthOffset()))); 4708 m_jit.load32(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight, ArrayStorage::vectorOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), scratchGPR); 4709 slowCases.append(m_jit.branch32(MacroAssembler::Equal, scratchGPR, TrustedImm32(JSValue::EmptyValueTag))); 4710 break; 4711 } 4712 default: { 4713 slowCases.append(m_jit.jump()); 4714 break; 4715 } 4716 } 4717 4718 moveTrueTo(resultPayloadGPR); 4719 MacroAssembler::Jump done = m_jit.jump(); 4720 4721 addSlowPathGenerator(slowPathCall(slowCases, this, operationHasIndexedProperty, resultTagGPR, resultPayloadGPR, baseGPR, indexGPR)); 4722 4723 done.link(&m_jit); 4724 booleanResult(resultPayloadGPR, node); 4725 break; 4726 } 4727 case GetDirectPname: { 4728 Edge& baseEdge = m_jit.graph().varArgChild(node, 0); 4729 Edge& propertyEdge = m_jit.graph().varArgChild(node, 1); 4730 Edge& indexEdge = m_jit.graph().varArgChild(node, 2); 4731 Edge& enumeratorEdge = m_jit.graph().varArgChild(node, 3); 4732 4733 SpeculateCellOperand base(this, baseEdge); 4734 SpeculateCellOperand property(this, propertyEdge); 4735 SpeculateInt32Operand index(this, indexEdge); 4736 SpeculateCellOperand enumerator(this, enumeratorEdge); 4737 GPRResult resultPayload(this); 4738 GPRResult2 resultTag(this); 4739 GPRTemporary scratch(this); 4740 4741 GPRReg baseGPR = base.gpr(); 4742 GPRReg propertyGPR = property.gpr(); 4743 GPRReg indexGPR = index.gpr(); 4744 GPRReg enumeratorGPR = enumerator.gpr(); 4745 GPRReg resultTagGPR = resultTag.gpr(); 4746 GPRReg resultPayloadGPR = resultPayload.gpr(); 4747 GPRReg scratchGPR = scratch.gpr(); 4748 4749 // Check the structure 4750 m_jit.load32(MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()), scratchGPR); 4751 MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 4752 scratchGPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedStructureIDOffset())); 4753 4754 // Compute the offset 4755 // If index is less than the enumerator's cached inline storage, then it's an inline access 4756 MacroAssembler::Jump outOfLineAccess = m_jit.branch32(MacroAssembler::AboveOrEqual, 4757 indexGPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedInlineCapacityOffset())); 4758 4759 m_jit.move(indexGPR, scratchGPR); 4760 m_jit.signExtend32ToPtr(scratchGPR, scratchGPR); 4761 m_jit.load32(MacroAssembler::BaseIndex(baseGPR, scratchGPR, MacroAssembler::TimesEight, JSObject::offsetOfInlineStorage() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTagGPR); 4762 m_jit.load32(MacroAssembler::BaseIndex(baseGPR, scratchGPR, MacroAssembler::TimesEight, JSObject::offsetOfInlineStorage() + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayloadGPR); 4763 4764 MacroAssembler::Jump done = m_jit.jump(); 4765 4766 // Otherwise it's out of line 4767 outOfLineAccess.link(&m_jit); 4768 m_jit.move(indexGPR, scratchGPR); 4769 m_jit.sub32(MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedInlineCapacityOffset()), scratchGPR); 4770 m_jit.neg32(scratchGPR); 4771 m_jit.signExtend32ToPtr(scratchGPR, scratchGPR); 4772 // We use resultPayloadGPR as a temporary here. We have to make sure clobber it after getting the 4773 // value out of indexGPR and enumeratorGPR because resultPayloadGPR could reuse either of those registers. 4774 m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSObject::butterflyOffset()), resultPayloadGPR); 4775 int32_t offsetOfFirstProperty = static_cast<int32_t>(offsetInButterfly(firstOutOfLineOffset)) * sizeof(EncodedJSValue); 4776 m_jit.load32(MacroAssembler::BaseIndex(resultPayloadGPR, scratchGPR, MacroAssembler::TimesEight, offsetOfFirstProperty + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), resultTagGPR); 4777 m_jit.load32(MacroAssembler::BaseIndex(resultPayloadGPR, scratchGPR, MacroAssembler::TimesEight, offsetOfFirstProperty + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), resultPayloadGPR); 4778 4779 done.link(&m_jit); 4780 4781 m_jit.move(MacroAssembler::TrustedImm32(JSValue::CellTag), scratchGPR); 4782 addSlowPathGenerator(slowPathCall(wrongStructure, this, operationGetByValCell, resultTagGPR, resultPayloadGPR, baseGPR, scratchGPR, propertyGPR)); 4783 4784 jsValueResult(resultTagGPR, resultPayloadGPR, node); 4785 break; 4786 } 4787 case GetStructurePropertyEnumerator: { 4788 SpeculateCellOperand base(this, node->child1()); 4789 SpeculateInt32Operand length(this, node->child2()); 4790 GPRResult result(this); 4791 GPRReg resultGPR = result.gpr(); 4792 4793 flushRegisters(); 4794 callOperation(operationGetStructurePropertyEnumerator, resultGPR, base.gpr(), length.gpr()); 4795 cellResult(resultGPR, node); 4796 break; 4797 } 4798 case GetGenericPropertyEnumerator: { 4799 SpeculateCellOperand base(this, node->child1()); 4800 SpeculateInt32Operand length(this, node->child2()); 4801 SpeculateCellOperand enumerator(this, node->child3()); 4802 GPRResult result(this); 4803 GPRReg resultGPR = result.gpr(); 4804 4805 flushRegisters(); 4806 callOperation(operationGetGenericPropertyEnumerator, resultGPR, base.gpr(), length.gpr(), enumerator.gpr()); 4807 cellResult(resultGPR, node); 4808 break; 4809 } 4810 case GetEnumeratorPname: { 4811 SpeculateCellOperand enumerator(this, node->child1()); 4812 SpeculateInt32Operand index(this, node->child2()); 4813 GPRTemporary scratch(this); 4814 GPRResult resultPayload(this); 4815 GPRResult2 resultTag(this); 4816 4817 GPRReg enumeratorGPR = enumerator.gpr(); 4818 GPRReg indexGPR = index.gpr(); 4819 GPRReg scratchGPR = scratch.gpr(); 4820 GPRReg resultTagGPR = resultTag.gpr(); 4821 GPRReg resultPayloadGPR = resultPayload.gpr(); 4822 4823 MacroAssembler::Jump inBounds = m_jit.branch32(MacroAssembler::Below, 4824 indexGPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedPropertyNamesLengthOffset())); 4825 4826 m_jit.move(MacroAssembler::TrustedImm32(JSValue::NullTag), resultTagGPR); 4827 m_jit.move(MacroAssembler::TrustedImm32(0), resultPayloadGPR); 4828 4829 MacroAssembler::Jump done = m_jit.jump(); 4830 inBounds.link(&m_jit); 4831 4832 m_jit.loadPtr(MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedPropertyNamesVectorOffset()), scratchGPR); 4833 m_jit.loadPtr(MacroAssembler::BaseIndex(scratchGPR, indexGPR, MacroAssembler::ScalePtr), resultPayloadGPR); 4834 m_jit.move(MacroAssembler::TrustedImm32(JSValue::CellTag), resultTagGPR); 4835 4836 done.link(&m_jit); 4837 jsValueResult(resultTagGPR, resultPayloadGPR, node); 4838 break; 4839 } 4840 case ToIndexString: { 4841 SpeculateInt32Operand index(this, node->child1()); 4842 GPRResult result(this); 4843 GPRReg resultGPR = result.gpr(); 4844 4845 flushRegisters(); 4846 callOperation(operationToIndexString, resultGPR, index.gpr()); 4847 cellResult(resultGPR, node); 4848 break; 4849 } 4850 4604 4851 case ForceOSRExit: { 4605 4852 terminateSpeculativeExecution(InadequateCoverage, JSValueRegs(), 0); … … 4626 4873 case Phantom: 4627 4874 case HardPhantom: 4875 case Check: 4628 4876 DFG_NODE_DO_TO_CHILDREN(m_jit.graph(), node, speculate); 4629 4877 noResult(node); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r171662 r172176 38 38 #include "GetterSetter.h" 39 39 #include "JSCInlines.h" 40 #include "JSPropertyNameEnumerator.h" 40 41 #include "ObjectPrototype.h" 41 42 #include "SpillRegistersMode.h" … … 1870 1871 1871 1872 case MovHint: 1872 case ZombieHint: 1873 case Check: { 1873 case ZombieHint: { 1874 1874 DFG_CRASH(m_jit.graph(), node, "Unexpected node"); 1875 1875 break; … … 3794 3794 case CheckExecutable: { 3795 3795 SpeculateCellOperand function(this, node->child1()); 3796 speculateCellType(node->child1(), function.gpr(), SpecFunction, JSFunctionType); 3796 3797 speculationCheck(BadExecutable, JSValueSource::unboxedCell(function.gpr()), node->child1(), m_jit.branchWeakPtr(JITCompiler::NotEqual, JITCompiler::Address(function.gpr(), JSFunction::offsetOfExecutable()), node->executable())); 3797 3798 noResult(node); … … 4648 4649 case Phantom: 4649 4650 case HardPhantom: 4651 case Check: 4650 4652 DFG_NODE_DO_TO_CHILDREN(m_jit.graph(), node, speculate); 4651 4653 noResult(node); … … 4668 4670 case StoreBarrierWithNullCheck: { 4669 4671 compileStoreBarrier(node); 4672 break; 4673 } 4674 4675 case GetEnumerableLength: { 4676 SpeculateCellOperand base(this, node->child1()); 4677 GPRResult result(this); 4678 GPRReg resultGPR = result.gpr(); 4679 4680 flushRegisters(); 4681 callOperation(operationGetEnumerableLength, resultGPR, base.gpr()); 4682 int32Result(resultGPR, node); 4683 break; 4684 } 4685 case HasGenericProperty: { 4686 JSValueOperand base(this, node->child1()); 4687 SpeculateCellOperand property(this, node->child2()); 4688 GPRResult result(this); 4689 GPRReg resultGPR = result.gpr(); 4690 4691 flushRegisters(); 4692 callOperation(operationHasGenericProperty, resultGPR, base.gpr(), property.gpr()); 4693 jsValueResult(resultGPR, node, DataFormatJSBoolean); 4694 break; 4695 } 4696 case HasStructureProperty: { 4697 JSValueOperand base(this, node->child1()); 4698 SpeculateCellOperand property(this, node->child2()); 4699 SpeculateCellOperand enumerator(this, node->child3()); 4700 GPRTemporary scratch(this); 4701 GPRResult result(this); 4702 4703 GPRReg baseGPR = base.gpr(); 4704 GPRReg propertyGPR = property.gpr(); 4705 GPRReg scratchGPR = scratch.gpr(); 4706 GPRReg resultGPR = result.gpr(); 4707 4708 m_jit.load32(MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()), scratchGPR); 4709 MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 4710 scratchGPR, 4711 MacroAssembler::Address(enumerator.gpr(), JSPropertyNameEnumerator::cachedStructureIDOffset())); 4712 4713 moveTrueTo(resultGPR); 4714 MacroAssembler::Jump done = m_jit.jump(); 4715 4716 done.link(&m_jit); 4717 4718 addSlowPathGenerator(slowPathCall(wrongStructure, this, operationHasGenericProperty, resultGPR, baseGPR, propertyGPR)); 4719 jsValueResult(resultGPR, node, DataFormatJSBoolean); 4720 break; 4721 } 4722 case HasIndexedProperty: { 4723 SpeculateCellOperand base(this, node->child1()); 4724 SpeculateInt32Operand index(this, node->child2()); 4725 GPRResult result(this); 4726 4727 GPRReg baseGPR = base.gpr(); 4728 GPRReg indexGPR = index.gpr(); 4729 GPRReg resultGPR = result.gpr(); 4730 4731 MacroAssembler::JumpList slowCases; 4732 ArrayMode mode = node->arrayMode(); 4733 switch (mode.type()) { 4734 case Array::Int32: 4735 case Array::Contiguous: { 4736 ASSERT(!!node->child3()); 4737 StorageOperand storage(this, node->child3()); 4738 GPRTemporary scratch(this); 4739 4740 GPRReg storageGPR = storage.gpr(); 4741 GPRReg scratchGPR = scratch.gpr(); 4742 4743 MacroAssembler::Jump outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength())); 4744 if (mode.isInBounds()) 4745 speculationCheck(OutOfBounds, JSValueRegs(), 0, outOfBounds); 4746 else 4747 slowCases.append(outOfBounds); 4748 4749 m_jit.load64(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight), scratchGPR); 4750 slowCases.append(m_jit.branchTest64(MacroAssembler::Zero, scratchGPR)); 4751 moveTrueTo(resultGPR); 4752 break; 4753 } 4754 case Array::Double: { 4755 ASSERT(!!node->child3()); 4756 StorageOperand storage(this, node->child3()); 4757 FPRTemporary scratch(this); 4758 FPRReg scratchFPR = scratch.fpr(); 4759 GPRReg storageGPR = storage.gpr(); 4760 4761 MacroAssembler::Jump outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, Butterfly::offsetOfPublicLength())); 4762 if (mode.isInBounds()) 4763 speculationCheck(OutOfBounds, JSValueRegs(), 0, outOfBounds); 4764 else 4765 slowCases.append(outOfBounds); 4766 4767 m_jit.loadDouble(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight), scratchFPR); 4768 slowCases.append(m_jit.branchDouble(MacroAssembler::DoubleNotEqualOrUnordered, scratchFPR, scratchFPR)); 4769 break; 4770 } 4771 case Array::ArrayStorage: { 4772 ASSERT(!!node->child3()); 4773 StorageOperand storage(this, node->child3()); 4774 GPRTemporary scratch(this); 4775 4776 GPRReg storageGPR = storage.gpr(); 4777 GPRReg scratchGPR = scratch.gpr(); 4778 4779 MacroAssembler::Jump outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, indexGPR, MacroAssembler::Address(storageGPR, ArrayStorage::vectorLengthOffset())); 4780 if (mode.isInBounds()) 4781 speculationCheck(OutOfBounds, JSValueRegs(), 0, outOfBounds); 4782 else 4783 slowCases.append(outOfBounds); 4784 4785 m_jit.load64(MacroAssembler::BaseIndex(storageGPR, indexGPR, MacroAssembler::TimesEight, ArrayStorage::vectorOffset()), scratchGPR); 4786 slowCases.append(m_jit.branchTest64(MacroAssembler::Zero, scratchGPR)); 4787 moveTrueTo(resultGPR); 4788 break; 4789 } 4790 default: { 4791 slowCases.append(m_jit.jump()); 4792 break; 4793 } 4794 } 4795 4796 addSlowPathGenerator(slowPathCall(slowCases, this, operationHasIndexedProperty, resultGPR, baseGPR, indexGPR)); 4797 4798 jsValueResult(resultGPR, node, DataFormatJSBoolean); 4799 break; 4800 } 4801 case GetDirectPname: { 4802 Edge& baseEdge = m_jit.graph().varArgChild(node, 0); 4803 Edge& propertyEdge = m_jit.graph().varArgChild(node, 1); 4804 Edge& indexEdge = m_jit.graph().varArgChild(node, 2); 4805 Edge& enumeratorEdge = m_jit.graph().varArgChild(node, 3); 4806 4807 SpeculateCellOperand base(this, baseEdge); 4808 SpeculateCellOperand property(this, propertyEdge); 4809 SpeculateInt32Operand index(this, indexEdge); 4810 SpeculateCellOperand enumerator(this, enumeratorEdge); 4811 GPRResult result(this); 4812 GPRTemporary scratch1(this); 4813 GPRTemporary scratch2(this); 4814 4815 GPRReg baseGPR = base.gpr(); 4816 GPRReg propertyGPR = property.gpr(); 4817 GPRReg indexGPR = index.gpr(); 4818 GPRReg enumeratorGPR = enumerator.gpr(); 4819 GPRReg resultGPR = result.gpr(); 4820 GPRReg scratch1GPR = scratch1.gpr(); 4821 GPRReg scratch2GPR = scratch2.gpr(); 4822 4823 // Check the structure 4824 m_jit.load32(MacroAssembler::Address(baseGPR, JSCell::structureIDOffset()), scratch1GPR); 4825 MacroAssembler::Jump wrongStructure = m_jit.branch32(MacroAssembler::NotEqual, 4826 scratch1GPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedStructureIDOffset())); 4827 4828 // Compute the offset 4829 // If index is less than the enumerator's cached inline storage, then it's an inline access 4830 MacroAssembler::Jump outOfLineAccess = m_jit.branch32(MacroAssembler::AboveOrEqual, 4831 indexGPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedInlineCapacityOffset())); 4832 4833 m_jit.load64(MacroAssembler::BaseIndex(baseGPR, indexGPR, MacroAssembler::TimesEight, JSObject::offsetOfInlineStorage()), resultGPR); 4834 4835 MacroAssembler::Jump done = m_jit.jump(); 4836 4837 // Otherwise it's out of line 4838 outOfLineAccess.link(&m_jit); 4839 m_jit.loadPtr(MacroAssembler::Address(baseGPR, JSObject::butterflyOffset()), scratch2GPR); 4840 m_jit.move(indexGPR, scratch1GPR); 4841 m_jit.sub32(MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedInlineCapacityOffset()), scratch1GPR); 4842 m_jit.neg32(scratch1GPR); 4843 m_jit.signExtend32ToPtr(scratch1GPR, scratch1GPR); 4844 int32_t offsetOfFirstProperty = static_cast<int32_t>(offsetInButterfly(firstOutOfLineOffset)) * sizeof(EncodedJSValue); 4845 m_jit.load64(MacroAssembler::BaseIndex(scratch2GPR, scratch1GPR, MacroAssembler::TimesEight, offsetOfFirstProperty), resultGPR); 4846 4847 done.link(&m_jit); 4848 4849 addSlowPathGenerator(slowPathCall(wrongStructure, this, operationGetByVal, resultGPR, baseGPR, propertyGPR)); 4850 4851 jsValueResult(resultGPR, node); 4852 break; 4853 } 4854 case GetStructurePropertyEnumerator: { 4855 SpeculateCellOperand base(this, node->child1()); 4856 SpeculateInt32Operand length(this, node->child2()); 4857 GPRResult result(this); 4858 GPRReg resultGPR = result.gpr(); 4859 4860 flushRegisters(); 4861 callOperation(operationGetStructurePropertyEnumerator, resultGPR, base.gpr(), length.gpr()); 4862 cellResult(resultGPR, node); 4863 break; 4864 } 4865 case GetGenericPropertyEnumerator: { 4866 SpeculateCellOperand base(this, node->child1()); 4867 SpeculateInt32Operand length(this, node->child2()); 4868 SpeculateCellOperand enumerator(this, node->child3()); 4869 GPRResult result(this); 4870 GPRReg resultGPR = result.gpr(); 4871 4872 flushRegisters(); 4873 callOperation(operationGetGenericPropertyEnumerator, resultGPR, base.gpr(), length.gpr(), enumerator.gpr()); 4874 cellResult(resultGPR, node); 4875 break; 4876 } 4877 case GetEnumeratorPname: { 4878 SpeculateCellOperand enumerator(this, node->child1()); 4879 SpeculateInt32Operand index(this, node->child2()); 4880 GPRTemporary scratch1(this); 4881 GPRTemporary scratch2(this); 4882 GPRResult result(this); 4883 4884 GPRReg enumeratorGPR = enumerator.gpr(); 4885 GPRReg indexGPR = index.gpr(); 4886 GPRReg scratch1GPR = scratch1.gpr(); 4887 GPRReg scratch2GPR = scratch2.gpr(); 4888 GPRReg resultGPR = result.gpr(); 4889 4890 MacroAssembler::Jump inBounds = m_jit.branch32(MacroAssembler::Below, 4891 indexGPR, MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedPropertyNamesLengthOffset())); 4892 4893 m_jit.move(MacroAssembler::TrustedImm32(ValueNull), resultGPR); 4894 4895 MacroAssembler::Jump done = m_jit.jump(); 4896 inBounds.link(&m_jit); 4897 4898 m_jit.loadPtr(MacroAssembler::Address(enumeratorGPR, JSPropertyNameEnumerator::cachedPropertyNamesVectorOffset()), scratch1GPR); 4899 m_jit.move(indexGPR, scratch2GPR); 4900 m_jit.signExtend32ToPtr(scratch2GPR, scratch2GPR); 4901 m_jit.load64(MacroAssembler::BaseIndex(scratch1GPR, scratch2GPR, MacroAssembler::TimesEight), resultGPR); 4902 4903 done.link(&m_jit); 4904 jsValueResult(resultGPR, node); 4905 break; 4906 } 4907 case ToIndexString: { 4908 SpeculateInt32Operand index(this, node->child1()); 4909 GPRResult result(this); 4910 GPRReg resultGPR = result.gpr(); 4911 4912 flushRegisters(); 4913 callOperation(operationToIndexString, resultGPR, index.gpr()); 4914 cellResult(resultGPR, node); 4670 4915 break; 4671 4916 } -
trunk/Source/JavaScriptCore/dfg/DFGUseKind.cpp
r171096 r172176 40 40 case UntypedUse: 41 41 out.print("Untyped"); 42 break;42 return; 43 43 case Int32Use: 44 44 out.print("Int32"); 45 break;45 return; 46 46 case KnownInt32Use: 47 47 out.print("KnownInt32"); 48 break;48 return; 49 49 case Int52RepUse: 50 50 out.print("Int52Rep"); 51 break;51 return; 52 52 case MachineIntUse: 53 53 out.print("MachineInt"); 54 break;54 return; 55 55 case NumberUse: 56 56 out.print("Number"); 57 break;57 return; 58 58 case DoubleRepUse: 59 59 out.print("DoubleRep"); 60 break;60 return; 61 61 case DoubleRepRealUse: 62 62 out.print("DoubleRepReal"); 63 break;63 return; 64 64 case DoubleRepMachineIntUse: 65 65 out.print("DoubleRepMachineInt"); 66 break;66 return; 67 67 case BooleanUse: 68 68 out.print("Boolean"); 69 break;69 return; 70 70 case CellUse: 71 71 out.print("Cell"); 72 break;72 return; 73 73 case KnownCellUse: 74 74 out.print("KnownCell"); 75 break;75 return; 76 76 case ObjectUse: 77 77 out.print("Object"); 78 break; 78 return; 79 case FunctionUse: 80 out.print("Function"); 81 return; 79 82 case FinalObjectUse: 80 83 out.print("FinalObject"); 81 break;84 return; 82 85 case ObjectOrOtherUse: 83 86 out.print("ObjectOrOther"); 84 break;87 return; 85 88 case StringIdentUse: 86 89 out.print("StringIdent"); 87 break;90 return; 88 91 case StringUse: 89 92 out.print("String"); 90 break;93 return; 91 94 case KnownStringUse: 92 95 out.print("KnownString"); 93 break;96 return; 94 97 case StringObjectUse: 95 98 out.print("StringObject"); 96 break;99 return; 97 100 case StringOrStringObjectUse: 98 101 out.print("StringOrStringObject"); 99 break;102 return; 100 103 case NotStringVarUse: 101 104 out.print("NotStringVar"); 102 break;105 return; 103 106 case NotCellUse: 104 107 out.print("NotCell"); 105 break;108 return; 106 109 case OtherUse: 107 110 out.print("Other"); 108 break;111 return; 109 112 case MiscUse: 110 113 out.print("Misc"); 111 break;112 default:114 return; 115 case LastUseKind: 113 116 RELEASE_ASSERT_NOT_REACHED(); 114 break;117 return; 115 118 } 119 RELEASE_ASSERT_NOT_REACHED(); 116 120 } 117 121 -
trunk/Source/JavaScriptCore/dfg/DFGUseKind.h
r171096 r172176 49 49 KnownCellUse, 50 50 ObjectUse, 51 FunctionUse, 51 52 FinalObjectUse, 52 53 ObjectOrOtherUse, … … 90 91 case ObjectUse: 91 92 return SpecObject; 93 case FunctionUse: 94 return SpecFunction; 92 95 case FinalObjectUse: 93 96 return SpecFinalObject; … … 172 175 case KnownCellUse: 173 176 case ObjectUse: 177 case FunctionUse: 174 178 case FinalObjectUse: 175 179 case StringIdentUse:
Note:
See TracChangeset
for help on using the changeset viewer.