Changeset 171614 in webkit
- Timestamp:
- Jul 25, 2014, 2:26:20 PM (11 years ago)
- Location:
- branches/ftlopt/Source/JavaScriptCore
- Files:
-
- 2 deleted
- 35 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ftlopt/Source/JavaScriptCore/CMakeLists.txt
r171495 r171614 435 435 runtime/JSPromiseReaction.cpp 436 436 runtime/JSPromisePrototype.cpp 437 runtime/JSPropertyNameIterator.cpp438 437 runtime/JSProxy.cpp 439 438 runtime/JSScope.cpp -
branches/ftlopt/Source/JavaScriptCore/ChangeLog
r171611 r171614 1 2014-07-25 Mark Hahnenberg <[email protected]> 2 3 Remove JSPropertyNameIterator 4 https://bugs.webkit.org/show_bug.cgi?id=135066 5 6 Reviewed by Geoffrey Garen. 7 8 It has been replaced by JSPropertyNameEnumerator. 9 10 * JavaScriptCore.order: 11 * bytecode/BytecodeBasicBlock.cpp: 12 (JSC::isBranch): 13 * bytecode/BytecodeList.json: 14 * bytecode/BytecodeUseDef.h: 15 (JSC::computeUsesForBytecodeOffset): 16 (JSC::computeDefsForBytecodeOffset): 17 * bytecode/CodeBlock.cpp: 18 (JSC::CodeBlock::dumpBytecode): 19 * bytecode/PreciseJumpTargets.cpp: 20 (JSC::getJumpTargetsForBytecodeOffset): 21 * bytecompiler/BytecodeGenerator.cpp: 22 (JSC::BytecodeGenerator::emitGetPropertyNames): Deleted. 23 (JSC::BytecodeGenerator::emitNextPropertyName): Deleted. 24 * bytecompiler/BytecodeGenerator.h: 25 * interpreter/Interpreter.cpp: 26 * interpreter/Register.h: 27 * jit/JIT.cpp: 28 (JSC::JIT::privateCompileMainPass): 29 (JSC::JIT::privateCompileSlowCases): 30 * jit/JIT.h: 31 * jit/JITOpcodes.cpp: 32 (JSC::JIT::emit_op_get_pnames): Deleted. 33 (JSC::JIT::emit_op_next_pname): Deleted. 34 * jit/JITOpcodes32_64.cpp: 35 (JSC::JIT::emit_op_get_pnames): Deleted. 36 (JSC::JIT::emit_op_next_pname): Deleted. 37 * jit/JITOperations.cpp: 38 * jit/JITPropertyAccess.cpp: 39 (JSC::JIT::emit_op_get_by_pname): Deleted. 40 (JSC::JIT::emitSlow_op_get_by_pname): Deleted. 41 * jit/JITPropertyAccess32_64.cpp: 42 (JSC::JIT::emit_op_get_by_pname): Deleted. 43 (JSC::JIT::emitSlow_op_get_by_pname): Deleted. 44 * llint/LLIntOffsetsExtractor.cpp: 45 * llint/LLIntSlowPaths.cpp: 46 (JSC::LLInt::LLINT_SLOW_PATH_DECL): Deleted. 47 * llint/LLIntSlowPaths.h: 48 * llint/LowLevelInterpreter.asm: 49 * llint/LowLevelInterpreter32_64.asm: 50 * llint/LowLevelInterpreter64.asm: 51 * runtime/CommonSlowPaths.cpp: 52 * runtime/JSPropertyNameIterator.cpp: 53 (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Deleted. 54 (JSC::JSPropertyNameIterator::create): Deleted. 55 (JSC::JSPropertyNameIterator::destroy): Deleted. 56 (JSC::JSPropertyNameIterator::get): Deleted. 57 (JSC::JSPropertyNameIterator::visitChildren): Deleted. 58 * runtime/JSPropertyNameIterator.h: 59 (JSC::JSPropertyNameIterator::createStructure): Deleted. 60 (JSC::JSPropertyNameIterator::size): Deleted. 61 (JSC::JSPropertyNameIterator::setCachedStructure): Deleted. 62 (JSC::JSPropertyNameIterator::cachedStructure): Deleted. 63 (JSC::JSPropertyNameIterator::setCachedPrototypeChain): Deleted. 64 (JSC::JSPropertyNameIterator::cachedPrototypeChain): Deleted. 65 (JSC::JSPropertyNameIterator::finishCreation): Deleted. 66 (JSC::Register::propertyNameIterator): Deleted. 67 (JSC::StructureRareData::enumerationCache): Deleted. 68 (JSC::StructureRareData::setEnumerationCache): Deleted. 69 * runtime/Structure.cpp: 70 (JSC::Structure::addPropertyWithoutTransition): 71 (JSC::Structure::removePropertyWithoutTransition): 72 * runtime/Structure.h: 73 * runtime/StructureInlines.h: 74 (JSC::Structure::setEnumerationCache): Deleted. 75 (JSC::Structure::enumerationCache): Deleted. 76 * runtime/StructureRareData.cpp: 77 (JSC::StructureRareData::visitChildren): 78 * runtime/StructureRareData.h: 79 * runtime/VM.cpp: 80 (JSC::VM::VM): 81 1 82 2014-07-25 Saam Barati <[email protected]> 2 83 -
branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.order
r163027 r171614 1355 1355 __ZN3JSC14jsIsObjectTypeEPNS_9ExecStateENS_7JSValueE 1356 1356 __ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE 1357 __ZN3JSC22JSPropertyNameIterator6createEPNS_9ExecStateEPNS_8JSObjectE1358 1357 __ZN3JSC8JSObject16getPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE 1359 1358 __ZN3JSC8JSObject19getOwnPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE … … 1639 1638 __ZN3JSC8Watchdog9isEnabledEv 1640 1639 __ZN3JSC3JIT16emit_op_jeq_nullEPNS_11InstructionE 1641 __ZN3JSC3JIT18emit_op_get_pnamesEPNS_11InstructionE1642 1640 __ZN3JSC3JIT11emit_op_jmpEPNS_11InstructionE 1643 __ZN3JSC3JIT20emit_op_get_by_pnameEPNS_11InstructionE1644 1641 __ZN3JSC3JIT22compileGetDirectOffsetENS_12X86Registers10RegisterIDES2_S2_S2_NS0_15FinalObjectModeE 1645 1642 __ZN3JSC3JIT17emit_op_new_arrayEPNS_11InstructionE 1646 1643 __ZN3JSC3JIT17emit_op_nstricteqEPNS_11InstructionE 1647 __ZN3JSC3JIT18emit_op_next_pnameEPNS_11InstructionE1648 1644 __ZN3JSC3JIT11emit_op_incEPNS_11InstructionE 1649 1645 __ZN3JSC3JIT13emit_op_jlessEPNS_11InstructionE … … 1664 1660 __ZN3JSC23MacroAssemblerX86Common12branchDoubleENS0_15DoubleConditionENS_12X86Registers13XMMRegisterIDES3_ 1665 1661 __ZN3JSC12X86Assembler23X86InstructionFormatter9twoByteOpENS0_15TwoByteOpcodeIDEiNS_12X86Registers10RegisterIDE 1666 __ZN3JSC3JIT24emitSlow_op_get_by_pnameEPNS_11InstructionERPNS_13SlowCaseEntryE1667 1662 __ZN3JSC3JIT21emitSlow_op_nstricteqEPNS_11InstructionERPNS_13SlowCaseEntryE 1668 1663 __ZN3JSC3JIT15emitSlow_op_incEPNS_11InstructionERPNS_13SlowCaseEntryE … … 1676 1671 _cti_op_jtrue 1677 1672 _cti_op_is_object 1678 _cti_op_get_pnames1679 1673 __ZN3JSC8JSString12toThisObjectEPNS_6JSCellEPNS_9ExecStateE 1680 1674 __ZN3JSC12StringObjectC1ERNS_2VMEPNS_9StructureE … … 2624 2618 __ZN3JSC13JSFinalObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE 2625 2619 __ZN3JSC17StructureRareData13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE 2626 __ZN3JSC22JSPropertyNameIterator13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE2627 2620 __ZN3JSC14StructureChain13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE 2628 2621 __ZN3JSC14MarkStackArray6expandEv … … 2668 2661 __ZN3JSC17SharedSymbolTable7destroyEPNS_6JSCellE 2669 2662 __ZN3JSC10JSFunction7destroyEPNS_6JSCellE 2670 __ZN3JSC22JSPropertyNameIterator7destroyEPNS_6JSCellE2671 2663 __ZN3JSC19ResolveGlobalStatus10computeForEPNS_9CodeBlockEiPNS_16ResolveOperationERNS_10IdentifierE 2672 2664 __ZN3JSC13GetByIdStatus10computeForERNS_2VMEPNS_9StructureERNS_10IdentifierE … … 4943 4935 _llint_slow_path_get_by_val 4944 4936 _llint_slow_path_get_argument_by_val 4945 _llint_slow_path_get_by_pname4946 4937 _llint_slow_path_put_by_val 4947 4938 _llint_slow_path_del_by_val … … 4971 4962 _llint_slow_path_strcat 4972 4963 _llint_slow_path_to_primitive 4973 _llint_slow_path_get_pnames4974 _llint_slow_path_next_pname4975 4964 _llint_slow_path_push_with_scope 4976 4965 _llint_slow_path_pop_scope … … 5039 5028 _llint_op_get_by_val 5040 5029 _llint_op_get_argument_by_val 5041 _llint_op_get_by_pname5042 5030 _llint_op_put_by_val 5043 5031 _llint_op_jmp … … 5054 5042 _llint_op_ret_object_or_this 5055 5043 _llint_op_to_primitive 5056 _llint_op_next_pname5057 5044 _llint_op_catch 5058 5045 _llint_op_get_scoped_var … … 5112 5099 _llint_generic_return_point 5113 5100 _llint_op_strcat 5114 _llint_op_get_pnames5115 5101 _llint_op_push_with_scope 5116 5102 _llint_op_pop_scope -
branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r171495 r171614 681 681 <ClCompile Include="..\runtime\JSPromiseReaction.cpp" /> 682 682 <ClCompile Include="..\runtime\JSPromisePrototype.cpp" /> 683 <ClCompile Include="..\runtime\JSPropertyNameIterator.cpp" />684 683 <ClCompile Include="..\runtime\JSProxy.cpp" /> 685 684 <ClCompile Include="..\runtime\JSScope.cpp" /> … … 1372 1371 <ClInclude Include="..\runtime\JSPromiseReaction.h" /> 1373 1372 <ClInclude Include="..\runtime\JSPromisePrototype.h" /> 1374 <ClInclude Include="..\runtime\JSPropertyNameIterator.h" />1375 1373 <ClInclude Include="..\runtime\JSProxy.h" /> 1376 1374 <ClInclude Include="..\runtime\JSScope.h" /> -
branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
r170399 r171614 649 649 <Filter>runtime</Filter> 650 650 </ClCompile> 651 <ClCompile Include="..\runtime\JSPropertyNameIterator.cpp">652 <Filter>runtime</Filter>653 </ClCompile>654 651 <ClCompile Include="..\runtime\JSProxy.cpp"> 655 652 <Filter>runtime</Filter> … … 2305 2302 </ClInclude> 2306 2303 <ClInclude Include="..\runtime\JSONObject.h"> 2307 <Filter>runtime</Filter>2308 </ClInclude>2309 <ClInclude Include="..\runtime\JSPropertyNameIterator.h">2310 2304 <Filter>runtime</Filter> 2311 2305 </ClInclude> -
branches/ftlopt/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r171605 r171614 1732 1732 A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; }; 1733 1733 A72701B90DADE94900E548D7 /* ExceptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A72701B30DADE94900E548D7 /* ExceptionHelpers.h */; }; 1734 A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */; };1735 1734 A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1736 1735 A729009C17976C6000317298 /* MacroAssemblerARMv7.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A729009B17976C6000317298 /* MacroAssemblerARMv7.cpp */; }; … … 3405 3404 A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = "<group>"; }; 3406 3405 A72701B30DADE94900E548D7 /* ExceptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHelpers.h; sourceTree = "<group>"; }; 3407 A727FF650DA3053B00E548D7 /* JSPropertyNameIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPropertyNameIterator.h; sourceTree = "<group>"; };3408 A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPropertyNameIterator.cpp; sourceTree = "<group>"; };3409 3406 A729009B17976C6000317298 /* MacroAssemblerARMv7.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssemblerARMv7.cpp; sourceTree = "<group>"; }; 3410 3407 A7299D9B17D12837005F5FF9 /* JSSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSet.cpp; sourceTree = "<group>"; }; … … 4800 4797 7C008CDC1871258D00955C24 /* JSPromiseReaction.cpp */, 4801 4798 7C008CDD1871258D00955C24 /* JSPromiseReaction.h */, 4802 A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */,4803 A727FF650DA3053B00E548D7 /* JSPropertyNameIterator.h */,4804 4799 862553CE16136AA5009F17D0 /* JSProxy.cpp */, 4805 4800 862553CF16136AA5009F17D0 /* JSProxy.h */, … … 7981 7976 7C184E1E17BEE22E007CB63A /* JSPromisePrototype.cpp in Sources */, 7982 7977 7C008CDE1871258D00955C24 /* JSPromiseReaction.cpp in Sources */, 7983 A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */,7984 7978 862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */, 7985 7979 9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */, -
branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeBasicBlock.cpp
r163844 r171614 53 53 case op_switch_char: 54 54 case op_switch_string: 55 case op_get_pnames:56 case op_next_pname:57 55 case op_check_has_instance: 58 56 return true; -
branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeList.json
r171605 r171614 71 71 { "name" : "op_get_by_val", "length" : 6 }, 72 72 { "name" : "op_get_argument_by_val", "length" : 6 }, 73 { "name" : "op_get_by_pname", "length" : 7 },74 73 { "name" : "op_put_by_val", "length" : 5 }, 75 74 { "name" : "op_put_by_val_direct", "length" : 5 }, … … 109 108 { "name" : "op_strcat", "length" : 4 }, 110 109 { "name" : "op_to_primitive", "length" : 3 }, 111 { "name" : "op_get_pnames", "length" : 6 },112 { "name" : "op_next_pname", "length" : 7 },113 110 { "name" : "op_resolve_scope", "length" : 6 }, 114 111 { "name" : "op_get_from_scope", "length" : 8 }, -
branches/ftlopt/Source/JavaScriptCore/bytecode/BytecodeUseDef.h
r171605 r171614 147 147 case op_new_array_with_size: 148 148 case op_create_this: 149 case op_get_pnames:150 149 case op_del_by_id: 151 150 case op_unsigned: { … … 195 194 return; 196 195 } 197 case op_get_direct_pname: 198 case op_next_pname: { 196 case op_get_direct_pname: { 199 197 functor(codeBlock, instruction, opcodeID, instruction[2].u.operand); 200 198 functor(codeBlock, instruction, opcodeID, instruction[3].u.operand); 201 199 functor(codeBlock, instruction, opcodeID, instruction[4].u.operand); 202 200 functor(codeBlock, instruction, opcodeID, instruction[5].u.operand); 203 return;204 }205 case op_get_by_pname: {206 functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);207 functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);208 functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);209 functor(codeBlock, instruction, opcodeID, instruction[5].u.operand);210 functor(codeBlock, instruction, opcodeID, instruction[6].u.operand);211 201 return; 212 202 } … … 317 307 case op_get_structure_property_enumerator: 318 308 case op_next_enumerator_pname: 319 case op_next_pname:320 309 case op_resolve_scope: 321 310 case op_strcat: … … 345 334 case op_get_by_val: 346 335 case op_get_argument_by_val: 347 case op_get_by_pname:348 336 case op_get_arguments_length: 349 337 case op_typeof: … … 395 383 return; 396 384 } 397 case op_get_pnames: {398 functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);399 functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);400 functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);401 return;402 }403 385 case op_enter: { 404 386 for (unsigned i = codeBlock->m_numVars; i--;) -
branches/ftlopt/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r171611 r171614 1120 1120 break; 1121 1121 } 1122 case op_get_by_pname: {1123 int r0 = (++it)->u.operand;1124 int r1 = (++it)->u.operand;1125 int r2 = (++it)->u.operand;1126 int r3 = (++it)->u.operand;1127 int r4 = (++it)->u.operand;1128 int r5 = (++it)->u.operand;1129 printLocationAndOp(out, exec, location, it, "get_by_pname");1130 out.printf("%s, %s, %s, %s, %s, %s", registerName(r0).data(), registerName(r1).data(), registerName(r2).data(), registerName(r3).data(), registerName(r4).data(), registerName(r5).data());1131 break;1132 }1133 1122 case op_put_by_val: { 1134 1123 int r0 = (++it)->u.operand; … … 1375 1364 printLocationAndOp(out, exec, location, it, "to_primitive"); 1376 1365 out.printf("%s, %s", registerName(r0).data(), registerName(r1).data()); 1377 break;1378 }1379 case op_get_pnames: {1380 int r0 = it[1].u.operand;1381 int r1 = it[2].u.operand;1382 int r2 = it[3].u.operand;1383 int r3 = it[4].u.operand;1384 int offset = it[5].u.operand;1385 printLocationAndOp(out, exec, location, it, "get_pnames");1386 out.printf("%s, %s, %s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), registerName(r2).data(), registerName(r3).data(), offset, location + offset);1387 it += OPCODE_LENGTH(op_get_pnames) - 1;1388 break;1389 }1390 case op_next_pname: {1391 int dest = it[1].u.operand;1392 int base = it[2].u.operand;1393 int i = it[3].u.operand;1394 int size = it[4].u.operand;1395 int iter = it[5].u.operand;1396 int offset = it[6].u.operand;1397 printLocationAndOp(out, exec, location, it, "next_pname");1398 out.printf("%s, %s, %s, %s, %s, %d(->%d)", registerName(dest).data(), registerName(base).data(), registerName(i).data(), registerName(size).data(), registerName(iter).data(), offset, location + offset);1399 it += OPCODE_LENGTH(op_next_pname) - 1;1400 1366 break; 1401 1367 } -
branches/ftlopt/Source/JavaScriptCore/bytecode/PreciseJumpTargets.cpp
r163844 r171614 74 74 break; 75 75 } 76 case op_get_pnames:77 out.append(bytecodeOffset + current[5].u.operand);78 break;79 case op_next_pname:80 out.append(bytecodeOffset + current[6].u.operand);81 break;82 76 case op_check_has_instance: 83 77 out.append(bytecodeOffset + current[4].u.operand); -
branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r171605 r171614 2287 2287 } 2288 2288 2289 RegisterID* BytecodeGenerator::emitGetPropertyNames(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, Label* breakTarget)2290 {2291 size_t begin = instructions().size();2292 2293 emitOpcode(op_get_pnames);2294 instructions().append(dst->index());2295 instructions().append(base->index());2296 instructions().append(i->index());2297 instructions().append(size->index());2298 instructions().append(breakTarget->bind(begin, instructions().size()));2299 return dst;2300 }2301 2302 RegisterID* BytecodeGenerator::emitNextPropertyName(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, RegisterID* iter, Label* target)2303 {2304 size_t begin = instructions().size();2305 2306 emitOpcode(op_next_pname);2307 instructions().append(dst->index());2308 instructions().append(base->index());2309 instructions().append(i->index());2310 instructions().append(size->index());2311 instructions().append(iter->index());2312 instructions().append(target->bind(begin, instructions().size()));2313 return dst;2314 }2315 2316 2289 TryData* BytecodeGenerator::pushTry(Label* start) 2317 2290 { -
branches/ftlopt/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r171605 r171614 488 488 void emitPopScopes(int targetScopeDepth); 489 489 490 RegisterID* emitGetPropertyNames(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, Label* breakTarget);491 RegisterID* emitNextPropertyName(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, RegisterID* iter, Label* target);492 493 490 RegisterID* emitHasIndexedProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName); 494 491 RegisterID* emitHasStructureProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName, RegisterID* enumerator); -
branches/ftlopt/Source/JavaScriptCore/interpreter/Interpreter.cpp
r170564 r171614 48 48 #include "JSNameScope.h" 49 49 #include "JSNotAnObject.h" 50 #include "JSPropertyNameIterator.h"51 50 #include "JSStackInlines.h" 52 51 #include "JSString.h" -
branches/ftlopt/Source/JavaScriptCore/interpreter/Register.h
r165676 r171614 40 40 class JSActivation; 41 41 class JSObject; 42 class JSPropertyNameIterator;43 42 class JSScope; 44 43 … … 64 63 CodeBlock* codeBlock() const; 65 64 JSObject* function() const; 66 JSPropertyNameIterator* propertyNameIterator() const;67 65 JSScope* scope() const; 68 66 int32_t unboxedInt32() const; -
branches/ftlopt/Source/JavaScriptCore/jit/JIT.cpp
r171605 r171614 220 220 DEFINE_OP(op_get_by_val) 221 221 DEFINE_OP(op_get_argument_by_val) 222 DEFINE_OP(op_get_by_pname)223 DEFINE_OP(op_get_pnames)224 222 DEFINE_OP(op_check_has_instance) 225 223 DEFINE_OP(op_instanceof) … … 259 257 DEFINE_OP(op_new_object) 260 258 DEFINE_OP(op_new_regexp) 261 DEFINE_OP(op_next_pname)262 259 DEFINE_OP(op_not) 263 260 DEFINE_OP(op_nstricteq) … … 392 389 DEFINE_SLOWCASE_OP(op_get_by_val) 393 390 DEFINE_SLOWCASE_OP(op_get_argument_by_val) 394 DEFINE_SLOWCASE_OP(op_get_by_pname)395 391 DEFINE_SLOWCASE_OP(op_check_has_instance) 396 392 DEFINE_SLOWCASE_OP(op_instanceof) -
branches/ftlopt/Source/JavaScriptCore/jit/JIT.h
r171605 r171614 57 57 class FunctionExecutable; 58 58 class JIT; 59 class JSPropertyNameIterator;60 59 class Identifier; 61 60 class Interpreter; … … 484 483 void emit_op_get_by_val(Instruction*); 485 484 void emit_op_get_argument_by_val(Instruction*); 486 void emit_op_get_by_pname(Instruction*);487 485 void emit_op_init_lazy_reg(Instruction*); 488 486 void emit_op_check_has_instance(Instruction*); … … 522 520 void emit_op_new_object(Instruction*); 523 521 void emit_op_new_regexp(Instruction*); 524 void emit_op_get_pnames(Instruction*);525 void emit_op_next_pname(Instruction*);526 522 void emit_op_not(Instruction*); 527 523 void emit_op_nstricteq(Instruction*); … … 585 581 void emitSlow_op_get_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&); 586 582 void emitSlow_op_get_argument_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&); 587 void emitSlow_op_get_by_pname(Instruction*, Vector<SlowCaseEntry>::iterator&);588 583 void emitSlow_op_check_has_instance(Instruction*, Vector<SlowCaseEntry>::iterator&); 589 584 void emitSlow_op_instanceof(Instruction*, Vector<SlowCaseEntry>::iterator&); -
branches/ftlopt/Source/JavaScriptCore/jit/JITOpcodes.cpp
r171605 r171614 38 38 #include "JSFunction.h" 39 39 #include "JSPropertyNameEnumerator.h" 40 #include "JSPropertyNameIterator.h"41 40 #include "LinkBuffer.h" 42 41 #include "MaxFrameExtentForSlowPathCall.h" … … 458 457 callOperationNoExceptionCheck(operationThrow, regT0); 459 458 jumpToExceptionHandler(); 460 }461 462 void JIT::emit_op_get_pnames(Instruction* currentInstruction)463 {464 int dst = currentInstruction[1].u.operand;465 int base = currentInstruction[2].u.operand;466 int i = currentInstruction[3].u.operand;467 int size = currentInstruction[4].u.operand;468 int breakTarget = currentInstruction[5].u.operand;469 470 JumpList isNotObject;471 472 emitGetVirtualRegister(base, regT0);473 if (!m_codeBlock->isKnownNotImmediate(base))474 isNotObject.append(emitJumpIfNotJSCell(regT0));475 if (base != m_codeBlock->thisRegister().offset() || m_codeBlock->isStrictMode())476 isNotObject.append(emitJumpIfCellNotObject(regT0));477 478 // We could inline the case where you have a valid cache, but479 // this call doesn't seem to be hot.480 Label isObject(this);481 callOperation(operationGetPNames, regT0);482 emitStoreCell(dst, returnValueGPR);483 load32(Address(regT0, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStringsSize)), regT3);484 store64(tagTypeNumberRegister, addressFor(i));485 store32(TrustedImm32(Int32Tag), intTagFor(size));486 store32(regT3, intPayloadFor(size));487 Jump end = jump();488 489 isNotObject.link(this);490 move(regT0, regT1);491 and32(TrustedImm32(~TagBitUndefined), regT1);492 addJump(branch32(Equal, regT1, TrustedImm32(ValueNull)), breakTarget);493 callOperation(operationToObject, base, regT0);494 jump().linkTo(isObject, this);495 496 end.link(this);497 }498 499 void JIT::emit_op_next_pname(Instruction* currentInstruction)500 {501 int dst = currentInstruction[1].u.operand;502 int base = currentInstruction[2].u.operand;503 int i = currentInstruction[3].u.operand;504 int size = currentInstruction[4].u.operand;505 int it = currentInstruction[5].u.operand;506 int target = currentInstruction[6].u.operand;507 508 JumpList callHasProperty;509 510 Label begin(this);511 load32(intPayloadFor(i), regT0);512 Jump end = branch32(Equal, regT0, intPayloadFor(size));513 514 // Grab key @ i515 loadPtr(addressFor(it), regT1);516 loadPtr(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStrings)), regT2);517 518 load64(BaseIndex(regT2, regT0, TimesEight), regT2);519 520 emitPutVirtualRegister(dst, regT2);521 522 // Increment i523 add32(TrustedImm32(1), regT0);524 store32(regT0, intPayloadFor(i));525 526 // Verify that i is valid:527 emitGetVirtualRegister(base, regT0);528 529 // Test base's structure530 emitLoadStructure(regT0, regT2, regT3);531 callHasProperty.append(branchPtr(NotEqual, regT2, Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))));532 533 // Test base's prototype chain534 loadPtr(Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedPrototypeChain))), regT3);535 loadPtr(Address(regT3, OBJECT_OFFSETOF(StructureChain, m_vector)), regT3);536 addJump(branchTestPtr(Zero, Address(regT3)), target);537 538 Label checkPrototype(this);539 load64(Address(regT2, Structure::prototypeOffset()), regT2);540 callHasProperty.append(emitJumpIfNotJSCell(regT2));541 emitLoadStructure(regT2, regT2, regT1);542 callHasProperty.append(branchPtr(NotEqual, regT2, Address(regT3)));543 addPtr(TrustedImm32(sizeof(Structure*)), regT3);544 branchTestPtr(NonZero, Address(regT3)).linkTo(checkPrototype, this);545 546 // Continue loop.547 addJump(jump(), target);548 549 // Slow case: Ask the object if i is valid.550 callHasProperty.link(this);551 emitGetVirtualRegister(dst, regT1);552 callOperation(operationHasProperty, regT0, regT1);553 554 // Test for valid key.555 addJump(branchTest32(NonZero, regT0), target);556 jump().linkTo(begin, this);557 558 // End of loop.559 end.link(this);560 459 } 561 460 -
branches/ftlopt/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r171605 r171614 38 38 #include "JSFunction.h" 39 39 #include "JSPropertyNameEnumerator.h" 40 #include "JSPropertyNameIterator.h"41 40 #include "JSVariableObject.h" 42 41 #include "LinkBuffer.h" … … 770 769 } 771 770 772 void JIT::emit_op_get_pnames(Instruction* currentInstruction)773 {774 int dst = currentInstruction[1].u.operand;775 int base = currentInstruction[2].u.operand;776 int i = currentInstruction[3].u.operand;777 int size = currentInstruction[4].u.operand;778 int breakTarget = currentInstruction[5].u.operand;779 780 JumpList isNotObject;781 782 emitLoad(base, regT1, regT0);783 if (!m_codeBlock->isKnownNotImmediate(base))784 isNotObject.append(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));785 if (VirtualRegister(base) != m_codeBlock->thisRegister() || m_codeBlock->isStrictMode())786 isNotObject.append(emitJumpIfCellNotObject(regT0));787 788 // We could inline the case where you have a valid cache, but789 // this call doesn't seem to be hot.790 Label isObject(this);791 callOperation(operationGetPNames, regT0);792 emitStoreCell(dst, returnValueGPR);793 load32(Address(regT0, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStringsSize)), regT3);794 store32(TrustedImm32(Int32Tag), intTagFor(i));795 store32(TrustedImm32(0), intPayloadFor(i));796 store32(TrustedImm32(Int32Tag), intTagFor(size));797 store32(regT3, payloadFor(size));798 Jump end = jump();799 800 isNotObject.link(this);801 addJump(branch32(Equal, regT1, TrustedImm32(JSValue::NullTag)), breakTarget);802 addJump(branch32(Equal, regT1, TrustedImm32(JSValue::UndefinedTag)), breakTarget);803 callOperation(operationToObject, base, regT1, regT0);804 jump().linkTo(isObject, this);805 806 end.link(this);807 }808 809 void JIT::emit_op_next_pname(Instruction* currentInstruction)810 {811 int dst = currentInstruction[1].u.operand;812 int base = currentInstruction[2].u.operand;813 int i = currentInstruction[3].u.operand;814 int size = currentInstruction[4].u.operand;815 int it = currentInstruction[5].u.operand;816 int target = currentInstruction[6].u.operand;817 818 JumpList callHasProperty;819 820 Label begin(this);821 load32(intPayloadFor(i), regT0);822 Jump end = branch32(Equal, regT0, intPayloadFor(size));823 824 // Grab key @ i825 loadPtr(payloadFor(it), regT1);826 loadPtr(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStrings)), regT2);827 load32(BaseIndex(regT2, regT0, TimesEight), regT2);828 store32(TrustedImm32(JSValue::CellTag), tagFor(dst));829 store32(regT2, payloadFor(dst));830 831 // Increment i832 add32(TrustedImm32(1), regT0);833 store32(regT0, intPayloadFor(i));834 835 // Verify that i is valid:836 loadPtr(payloadFor(base), regT0);837 838 // Test base's structure839 loadPtr(Address(regT0, JSCell::structureIDOffset()), regT2);840 callHasProperty.append(branchPtr(NotEqual, regT2, Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))));841 842 // Test base's prototype chain843 loadPtr(Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedPrototypeChain))), regT3);844 loadPtr(Address(regT3, OBJECT_OFFSETOF(StructureChain, m_vector)), regT3);845 addJump(branchTestPtr(Zero, Address(regT3)), target);846 847 Label checkPrototype(this);848 callHasProperty.append(branch32(Equal, Address(regT2, Structure::prototypeOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), TrustedImm32(JSValue::NullTag)));849 loadPtr(Address(regT2, Structure::prototypeOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT2);850 loadPtr(Address(regT2, JSCell::structureIDOffset()), regT2);851 callHasProperty.append(branchPtr(NotEqual, regT2, Address(regT3)));852 addPtr(TrustedImm32(sizeof(Structure*)), regT3);853 branchTestPtr(NonZero, Address(regT3)).linkTo(checkPrototype, this);854 855 // Continue loop.856 addJump(jump(), target);857 858 // Slow case: Ask the object if i is valid.859 callHasProperty.link(this);860 loadPtr(addressFor(dst), regT1);861 callOperation(operationHasProperty, regT0, regT1);862 863 // Test for valid key.864 addJump(branchTest32(NonZero, regT0), target);865 jump().linkTo(begin, this);866 867 // End of loop.868 end.link(this);869 }870 871 771 void JIT::emit_op_push_with_scope(Instruction* currentInstruction) 872 772 { -
branches/ftlopt/Source/JavaScriptCore/jit/JITOperations.cpp
r171605 r171614 46 46 #include "JSNameScope.h" 47 47 #include "JSPropertyNameEnumerator.h" 48 #include "JSPropertyNameIterator.h"49 48 #include "JSStackInlines.h" 50 49 #include "JSWithScope.h" … … 1617 1616 } 1618 1617 1619 JSCell* JIT_OPERATION operationGetPNames(ExecState* exec, JSObject* obj)1620 {1621 VM& vm = exec->vm();1622 NativeCallFrameTracer tracer(&vm, exec);1623 1624 Structure* structure = obj->structure(vm);1625 JSPropertyNameIterator* jsPropertyNameIterator = structure->enumerationCache();1626 if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(exec))1627 jsPropertyNameIterator = JSPropertyNameIterator::create(exec, obj);1628 return jsPropertyNameIterator;1629 }1630 1631 1618 EncodedJSValue JIT_OPERATION operationInstanceOf(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedProto) 1632 1619 { -
branches/ftlopt/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r171605 r171614 36 36 #include "JSArray.h" 37 37 #include "JSFunction.h" 38 #include "JSPropertyNameIterator.h"39 38 #include "JSVariableObject.h" 40 39 #include "LinkBuffer.h" … … 261 260 signExtend32ToPtr(offset, offset); 262 261 load64(BaseIndex(scratch, offset, TimesEight, (firstOutOfLineOffset - 2) * sizeof(EncodedJSValue)), result); 263 }264 265 void JIT::emit_op_get_by_pname(Instruction* currentInstruction)266 {267 int dst = currentInstruction[1].u.operand;268 int base = currentInstruction[2].u.operand;269 int property = currentInstruction[3].u.operand;270 unsigned expected = currentInstruction[4].u.operand;271 int iter = currentInstruction[5].u.operand;272 int i = currentInstruction[6].u.operand;273 274 emitGetVirtualRegister(property, regT0);275 addSlowCase(branch64(NotEqual, regT0, addressFor(expected)));276 emitGetVirtualRegisters(base, regT0, iter, regT1);277 emitJumpSlowCaseIfNotJSCell(regT0, base);278 279 // Test base's structure280 emitLoadStructure(regT0, regT2, regT3);281 addSlowCase(branchPtr(NotEqual, regT2, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure))));282 load32(addressFor(i), regT3);283 sub32(TrustedImm32(1), regT3);284 addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots))));285 Jump inlineProperty = branch32(Below, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)));286 add32(TrustedImm32(firstOutOfLineOffset), regT3);287 sub32(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)), regT3);288 inlineProperty.link(this);289 compileGetDirectOffset(regT0, regT0, regT3, regT1);290 291 emitPutVirtualRegister(dst, regT0);292 }293 294 void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)295 {296 int dst = currentInstruction[1].u.operand;297 int base = currentInstruction[2].u.operand;298 int property = currentInstruction[3].u.operand;299 300 linkSlowCase(iter);301 linkSlowCaseIfNotJSCell(iter, base);302 linkSlowCase(iter);303 linkSlowCase(iter);304 305 emitGetVirtualRegister(base, regT0);306 emitGetVirtualRegister(property, regT1);307 callOperation(operationGetByValGeneric, dst, regT0, regT1);308 262 } 309 263 -
branches/ftlopt/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r171605 r171614 36 36 #include "JSArray.h" 37 37 #include "JSFunction.h" 38 #include "JSPropertyNameIterator.h"39 38 #include "JSVariableObject.h" 40 39 #include "LinkBuffer.h" … … 607 606 } 608 607 609 void JIT::emit_op_get_by_pname(Instruction* currentInstruction)610 {611 int dst = currentInstruction[1].u.operand;612 int base = currentInstruction[2].u.operand;613 int property = currentInstruction[3].u.operand;614 unsigned expected = currentInstruction[4].u.operand;615 int iter = currentInstruction[5].u.operand;616 int i = currentInstruction[6].u.operand;617 618 emitLoad2(property, regT1, regT0, base, regT3, regT2);619 emitJumpSlowCaseIfNotJSCell(property, regT1);620 addSlowCase(branchPtr(NotEqual, regT0, payloadFor(expected)));621 // Property registers are now available as the property is known622 emitJumpSlowCaseIfNotJSCell(base, regT3);623 emitLoadPayload(iter, regT1);624 625 // Test base's structure626 loadPtr(Address(regT2, JSCell::structureIDOffset()), regT0);627 addSlowCase(branchPtr(NotEqual, regT0, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure))));628 load32(addressFor(i), regT3);629 sub32(TrustedImm32(1), regT3);630 addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots))));631 Jump inlineProperty = branch32(Below, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)));632 add32(TrustedImm32(firstOutOfLineOffset), regT3);633 sub32(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)), regT3);634 inlineProperty.link(this);635 compileGetDirectOffset(regT2, regT1, regT0, regT3);636 637 emitStore(dst, regT1, regT0);638 }639 640 void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)641 {642 int dst = currentInstruction[1].u.operand;643 int base = currentInstruction[2].u.operand;644 int property = currentInstruction[3].u.operand;645 646 linkSlowCaseIfNotJSCell(iter, property);647 linkSlowCase(iter);648 linkSlowCaseIfNotJSCell(iter, base);649 linkSlowCase(iter);650 linkSlowCase(iter);651 652 emitLoad(base, regT1, regT0);653 emitLoad(property, regT3, regT2);654 callOperation(operationGetByValGeneric, dst, regT1, regT0, regT3, regT2);655 }656 657 608 void JIT::emitVarInjectionCheck(bool needsVarInjectionChecks) 658 609 { -
branches/ftlopt/Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
r163225 r171614 40 40 #include "JSGlobalObject.h" 41 41 #include "JSObject.h" 42 #include "JSPropertyNameIterator.h"43 42 #include "JSStack.h" 44 43 #include "JSString.h" -
branches/ftlopt/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r170855 r171614 45 45 #include "JSGlobalObjectFunctions.h" 46 46 #include "JSNameScope.h" 47 #include "JSPropertyNameIterator.h"48 47 #include "JSStackInlines.h" 49 48 #include "JSString.h" … … 769 768 } 770 769 771 LLINT_SLOW_PATH_DECL(slow_path_get_by_pname)772 {773 LLINT_BEGIN();774 LLINT_RETURN(getByVal(exec, LLINT_OP_C(2).jsValue(), LLINT_OP_C(3).jsValue()));775 }776 777 770 LLINT_SLOW_PATH_DECL(slow_path_put_by_val) 778 771 { … … 1283 1276 } 1284 1277 1285 LLINT_SLOW_PATH_DECL(slow_path_get_pnames)1286 {1287 LLINT_BEGIN();1288 JSValue v = LLINT_OP(2).jsValue();1289 if (v.isUndefinedOrNull()) {1290 pc += pc[5].u.operand;1291 LLINT_END();1292 }1293 1294 JSObject* o = v.toObject(exec);1295 Structure* structure = o->structure();1296 JSPropertyNameIterator* jsPropertyNameIterator = structure->enumerationCache();1297 if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(exec))1298 jsPropertyNameIterator = JSPropertyNameIterator::create(exec, o);1299 1300 LLINT_OP(1) = JSValue(jsPropertyNameIterator);1301 LLINT_OP(2) = JSValue(o);1302 LLINT_OP(3) = Register::withInt(0);1303 LLINT_OP(4) = Register::withInt(jsPropertyNameIterator->size());1304 1305 pc += OPCODE_LENGTH(op_get_pnames);1306 LLINT_END();1307 }1308 1309 LLINT_SLOW_PATH_DECL(slow_path_next_pname)1310 {1311 LLINT_BEGIN();1312 JSObject* base = asObject(LLINT_OP(2).jsValue());1313 JSString* property = asString(LLINT_OP(1).jsValue());1314 if (base->hasProperty(exec, Identifier(exec, property->value(exec)))) {1315 // Go to target.1316 pc += pc[6].u.operand;1317 } // Else, don't change the PC, so the interpreter will reloop.1318 LLINT_END();1319 }1320 1321 1278 LLINT_SLOW_PATH_DECL(slow_path_push_with_scope) 1322 1279 { -
branches/ftlopt/Source/JavaScriptCore/llint/LLIntSlowPaths.h
r170836 r171614 79 79 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_val); 80 80 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_argument_by_val); 81 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_pname);82 81 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val); 83 82 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_direct); … … 110 109 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat); 111 110 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive); 112 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_pnames);113 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_next_pname);114 111 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope); 115 112 LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_pop_scope); -
branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r171605 r171614 1136 1136 1137 1137 1138 _llint_op_get_pnames:1139 traceExecution()1140 callSlowPath(_llint_slow_path_get_pnames)1141 dispatch(0) # The slow_path either advances the PC or jumps us to somewhere else.1142 1143 1144 1138 _llint_op_push_with_scope: 1145 1139 traceExecution() -
branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
r170382 r171614 1614 1614 1615 1615 1616 _llint_op_get_by_pname:1617 traceExecution()1618 loadi 12[PC], t01619 loadConstantOrVariablePayload(t0, CellTag, t1, .opGetByPnameSlow)1620 loadi 16[PC], t01621 bpneq t1, PayloadOffset[cfr, t0, 8], .opGetByPnameSlow1622 loadi 8[PC], t01623 loadConstantOrVariablePayload(t0, CellTag, t2, .opGetByPnameSlow)1624 loadi 20[PC], t01625 loadi PayloadOffset[cfr, t0, 8], t31626 loadp JSCell::m_structureID[t2], t01627 bpneq t0, JSPropertyNameIterator::m_cachedStructure[t3], .opGetByPnameSlow1628 loadi 24[PC], t01629 loadi [cfr, t0, 8], t01630 subi 1, t01631 biaeq t0, JSPropertyNameIterator::m_numCacheableSlots[t3], .opGetByPnameSlow1632 bilt t0, JSPropertyNameIterator::m_cachedStructureInlineCapacity[t3], .opGetByPnameInlineProperty1633 addi firstOutOfLineOffset, t01634 subi JSPropertyNameIterator::m_cachedStructureInlineCapacity[t3], t01635 .opGetByPnameInlineProperty:1636 loadPropertyAtVariableOffset(t0, t2, t1, t3)1637 loadi 4[PC], t01638 storei t1, TagOffset[cfr, t0, 8]1639 storei t3, PayloadOffset[cfr, t0, 8]1640 dispatch(7)1641 1642 .opGetByPnameSlow:1643 callSlowPath(_llint_slow_path_get_by_pname)1644 dispatch(7)1645 1646 1647 1616 macro contiguousPutByVal(storeCallback) 1648 1617 biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds … … 2040 2009 callSlowPath(_slow_path_to_primitive) 2041 2010 dispatch(3) 2042 2043 2044 _llint_op_next_pname:2045 traceExecution()2046 loadi 12[PC], t12047 loadi 16[PC], t22048 loadi PayloadOffset[cfr, t1, 8], t02049 bieq t0, PayloadOffset[cfr, t2, 8], .opNextPnameEnd2050 loadi 20[PC], t22051 loadi PayloadOffset[cfr, t2, 8], t22052 loadp JSPropertyNameIterator::m_jsStrings[t2], t32053 loadi [t3, t0, 8], t32054 addi 1, t02055 storei t0, PayloadOffset[cfr, t1, 8]2056 loadi 4[PC], t12057 storei CellTag, TagOffset[cfr, t1, 8]2058 storei t3, PayloadOffset[cfr, t1, 8]2059 loadi 8[PC], t32060 loadi PayloadOffset[cfr, t3, 8], t32061 loadp JSCell::m_structureID[t3], t12062 bpneq t1, JSPropertyNameIterator::m_cachedStructure[t2], .opNextPnameSlow2063 loadp JSPropertyNameIterator::m_cachedPrototypeChain[t2], t02064 loadp StructureChain::m_vector[t0], t02065 btpz [t0], .opNextPnameTarget2066 .opNextPnameCheckPrototypeLoop:2067 bieq Structure::m_prototype + TagOffset[t1], NullTag, .opNextPnameSlow2068 loadp Structure::m_prototype + PayloadOffset[t1], t22069 loadp JSCell::m_structureID[t2], t12070 bpneq t1, [t0], .opNextPnameSlow2071 addp 4, t02072 btpnz [t0], .opNextPnameCheckPrototypeLoop2073 .opNextPnameTarget:2074 dispatchBranch(24[PC])2075 2076 .opNextPnameEnd:2077 dispatch(7)2078 2079 .opNextPnameSlow:2080 callSlowPath(_llint_slow_path_next_pname) # This either keeps the PC where it was (causing us to loop) or sets it to target.2081 dispatch(0)2082 2011 2083 2012 -
branches/ftlopt/Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
r170382 r171614 1446 1446 callSlowPath(_llint_slow_path_get_argument_by_val) 1447 1447 dispatch(6) 1448 1449 1450 _llint_op_get_by_pname:1451 traceExecution()1452 loadisFromInstruction(3, t1)1453 loadConstantOrVariable(t1, t0)1454 loadisFromInstruction(4, t1)1455 assertNotConstant(t1)1456 bqneq t0, [cfr, t1, 8], .opGetByPnameSlow1457 loadisFromInstruction(2, t2)1458 loadisFromInstruction(5, t3)1459 loadConstantOrVariableCell(t2, t0, .opGetByPnameSlow)1460 assertNotConstant(t3)1461 loadq [cfr, t3, 8], t11462 loadStructureWithScratch(t0, t2, t3)1463 bpneq t2, JSPropertyNameIterator::m_cachedStructure[t1], .opGetByPnameSlow1464 loadisFromInstruction(6, t3)1465 loadi PayloadOffset[cfr, t3, 8], t31466 subi 1, t31467 biaeq t3, JSPropertyNameIterator::m_numCacheableSlots[t1], .opGetByPnameSlow1468 bilt t3, JSPropertyNameIterator::m_cachedStructureInlineCapacity[t1], .opGetByPnameInlineProperty1469 addi firstOutOfLineOffset, t31470 subi JSPropertyNameIterator::m_cachedStructureInlineCapacity[t1], t31471 .opGetByPnameInlineProperty:1472 loadPropertyAtVariableOffset(t3, t0, t0)1473 loadisFromInstruction(1, t1)1474 storeq t0, [cfr, t1, 8]1475 dispatch(7)1476 1477 .opGetByPnameSlow:1478 callSlowPath(_llint_slow_path_get_by_pname)1479 dispatch(7)1480 1448 1481 1449 … … 1873 1841 callSlowPath(_slow_path_to_primitive) 1874 1842 dispatch(3) 1875 1876 1877 _llint_op_next_pname:1878 traceExecution()1879 loadisFromInstruction(3, t1)1880 loadisFromInstruction(4, t2)1881 assertNotConstant(t1)1882 assertNotConstant(t2)1883 loadi PayloadOffset[cfr, t1, 8], t01884 bieq t0, PayloadOffset[cfr, t2, 8], .opNextPnameEnd1885 loadisFromInstruction(5, t2)1886 assertNotConstant(t2)1887 loadp [cfr, t2, 8], t21888 loadp JSPropertyNameIterator::m_jsStrings[t2], t31889 loadq [t3, t0, 8], t31890 addi 1, t01891 storei t0, PayloadOffset[cfr, t1, 8]1892 loadisFromInstruction(1, t1)1893 storeq t3, [cfr, t1, 8]1894 loadisFromInstruction(2, t3)1895 assertNotConstant(t3)1896 loadq [cfr, t3, 8], t31897 loadStructureWithScratch(t3, t1, t0)1898 bpneq t1, JSPropertyNameIterator::m_cachedStructure[t2], .opNextPnameSlow1899 loadp JSPropertyNameIterator::m_cachedPrototypeChain[t2], t01900 loadp StructureChain::m_vector[t0], t01901 btpz [t0], .opNextPnameTarget1902 .opNextPnameCheckPrototypeLoop:1903 bqeq Structure::m_prototype[t1], ValueNull, .opNextPnameSlow1904 loadq Structure::m_prototype[t1], t21905 loadStructureWithScratch(t2, t1, t3)1906 bpneq t1, [t0], .opNextPnameSlow1907 addp 8, t01908 btpnz [t0], .opNextPnameCheckPrototypeLoop1909 .opNextPnameTarget:1910 dispatchIntIndirect(6)1911 1912 .opNextPnameEnd:1913 dispatch(7)1914 1915 .opNextPnameSlow:1916 callSlowPath(_llint_slow_path_next_pname) # This either keeps the PC where it was (causing us to loop) or sets it to target.1917 dispatch(0)1918 1843 1919 1844 -
branches/ftlopt/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r171605 r171614 46 46 #include "JSNameScope.h" 47 47 #include "JSPropertyNameEnumerator.h" 48 #include "JSPropertyNameIterator.h"49 48 #include "JSString.h" 50 49 #include "JSWithScope.h" -
branches/ftlopt/Source/JavaScriptCore/runtime/Structure.cpp
r171605 r171614 717 717 PropertyOffset Structure::addPropertyWithoutTransition(VM& vm, PropertyName propertyName, unsigned attributes) 718 718 { 719 ASSERT(!enumerationCache());720 721 719 DeferGC deferGC(vm.heap); 722 720 materializePropertyMapIfNecessaryForPinning(vm, deferGC); … … 730 728 { 731 729 ASSERT(isUncacheableDictionary()); 732 ASSERT(!enumerationCache());733 730 734 731 DeferGC deferGC(vm.heap); -
branches/ftlopt/Source/JavaScriptCore/runtime/Structure.h
r171605 r171614 282 282 } 283 283 284 void setEnumerationCache(VM&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h.285 JSPropertyNameIterator* enumerationCache(); // Defined in JSPropertyNameIterator.h.286 287 284 void setCachedStructurePropertyNameEnumerator(VM&, JSPropertyNameEnumerator*); 288 285 void setCachedGenericPropertyNameEnumerator(VM&, JSPropertyNameEnumerator*); -
branches/ftlopt/Source/JavaScriptCore/runtime/StructureInlines.h
r170855 r171614 131 131 } 132 132 133 inline void Structure::setEnumerationCache(VM& vm, JSPropertyNameIterator* enumerationCache)134 {135 ASSERT(!isDictionary());136 if (!hasRareData())137 allocateRareData(vm);138 rareData()->setEnumerationCache(vm, this, enumerationCache);139 }140 141 inline JSPropertyNameIterator* Structure::enumerationCache()142 {143 if (!hasRareData())144 return 0;145 return rareData()->enumerationCache();146 }147 148 133 inline JSValue Structure::prototypeForLookup(JSGlobalObject* globalObject) const 149 134 { -
branches/ftlopt/Source/JavaScriptCore/runtime/StructureRareData.cpp
r171605 r171614 28 28 29 29 #include "JSPropertyNameEnumerator.h" 30 #include "JSPropertyNameIterator.h"31 30 #include "JSString.h" 32 31 #include "JSCInlines.h" … … 69 68 visitor.append(&thisObject->m_previous); 70 69 visitor.append(&thisObject->m_objectToStringValue); 71 visitor.append(&thisObject->m_enumerationCache);72 70 visitor.append(&thisObject->m_cachedStructurePropertyNameEnumerator); 73 71 visitor.append(&thisObject->m_cachedGenericPropertyNameEnumerator); -
branches/ftlopt/Source/JavaScriptCore/runtime/StructureRareData.h
r171605 r171614 35 35 36 36 class JSPropertyNameEnumerator; 37 class JSPropertyNameIterator;38 37 class Structure; 39 38 … … 58 57 void setObjectToStringValue(VM&, const JSCell* owner, JSString* value); 59 58 60 JSPropertyNameIterator* enumerationCache();61 void setEnumerationCache(VM&, const Structure* owner, JSPropertyNameIterator* value);62 63 59 DECLARE_EXPORT_INFO; 64 60 … … 77 73 WriteBarrier<Structure> m_previous; 78 74 WriteBarrier<JSString> m_objectToStringValue; 79 WriteBarrier<JSPropertyNameIterator> m_enumerationCache;80 75 WriteBarrier<JSPropertyNameEnumerator> m_cachedStructurePropertyNameEnumerator; 81 76 WriteBarrier<JSPropertyNameEnumerator> m_cachedGenericPropertyNameEnumerator; -
branches/ftlopt/Source/JavaScriptCore/runtime/VM.cpp
r171605 r171614 66 66 #include "JSPromiseReaction.h" 67 67 #include "JSPropertyNameEnumerator.h" 68 #include "JSPropertyNameIterator.h"69 68 #include "JSWithScope.h" 70 69 #include "Lexer.h" … … 259 258 stringStructure.set(*this, JSString::createStructure(*this, 0, jsNull())); 260 259 notAnObjectStructure.set(*this, JSNotAnObject::createStructure(*this, 0, jsNull())); 261 propertyNameIteratorStructure.set(*this, JSPropertyNameIterator::createStructure(*this, 0, jsNull()));262 260 propertyNameEnumeratorStructure.set(*this, JSPropertyNameEnumerator::createStructure(*this, 0, jsNull())); 263 261 getterSetterStructure.set(*this, GetterSetter::createStructure(*this, 0, jsNull()));
Note:
See TracChangeset
for help on using the changeset viewer.