Diff
Modified: branches/ftlopt/Source/_javascript_Core/CMakeLists.txt (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/CMakeLists.txt 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/CMakeLists.txt 2014-07-25 21:26:20 UTC (rev 171614)
@@ -434,7 +434,6 @@
runtime/JSPromiseFunctions.cpp
runtime/JSPromiseReaction.cpp
runtime/JSPromisePrototype.cpp
- runtime/JSPropertyNameIterator.cpp
runtime/JSProxy.cpp
runtime/JSScope.cpp
runtime/JSSegmentedVariableObject.cpp
Modified: branches/ftlopt/Source/_javascript_Core/ChangeLog (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/ChangeLog 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/ChangeLog 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1,3 +1,84 @@
+2014-07-25 Mark Hahnenberg <[email protected]>
+
+ Remove JSPropertyNameIterator
+ https://bugs.webkit.org/show_bug.cgi?id=135066
+
+ Reviewed by Geoffrey Garen.
+
+ It has been replaced by JSPropertyNameEnumerator.
+
+ * _javascript_Core.order:
+ * bytecode/BytecodeBasicBlock.cpp:
+ (JSC::isBranch):
+ * bytecode/BytecodeList.json:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ * bytecode/PreciseJumpTargets.cpp:
+ (JSC::getJumpTargetsForBytecodeOffset):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::emitGetPropertyNames): Deleted.
+ (JSC::BytecodeGenerator::emitNextPropertyName): Deleted.
+ * bytecompiler/BytecodeGenerator.h:
+ * interpreter/Interpreter.cpp:
+ * interpreter/Register.h:
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ (JSC::JIT::privateCompileSlowCases):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_get_pnames): Deleted.
+ (JSC::JIT::emit_op_next_pname): Deleted.
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_get_pnames): Deleted.
+ (JSC::JIT::emit_op_next_pname): Deleted.
+ * jit/JITOperations.cpp:
+ * jit/JITPropertyAccess.cpp:
+ (JSC::JIT::emit_op_get_by_pname): Deleted.
+ (JSC::JIT::emitSlow_op_get_by_pname): Deleted.
+ * jit/JITPropertyAccess32_64.cpp:
+ (JSC::JIT::emit_op_get_by_pname): Deleted.
+ (JSC::JIT::emitSlow_op_get_by_pname): Deleted.
+ * llint/LLIntOffsetsExtractor.cpp:
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL): Deleted.
+ * llint/LLIntSlowPaths.h:
+ * llint/LowLevelInterpreter.asm:
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/CommonSlowPaths.cpp:
+ * runtime/JSPropertyNameIterator.cpp:
+ (JSC::JSPropertyNameIterator::JSPropertyNameIterator): Deleted.
+ (JSC::JSPropertyNameIterator::create): Deleted.
+ (JSC::JSPropertyNameIterator::destroy): Deleted.
+ (JSC::JSPropertyNameIterator::get): Deleted.
+ (JSC::JSPropertyNameIterator::visitChildren): Deleted.
+ * runtime/JSPropertyNameIterator.h:
+ (JSC::JSPropertyNameIterator::createStructure): Deleted.
+ (JSC::JSPropertyNameIterator::size): Deleted.
+ (JSC::JSPropertyNameIterator::setCachedStructure): Deleted.
+ (JSC::JSPropertyNameIterator::cachedStructure): Deleted.
+ (JSC::JSPropertyNameIterator::setCachedPrototypeChain): Deleted.
+ (JSC::JSPropertyNameIterator::cachedPrototypeChain): Deleted.
+ (JSC::JSPropertyNameIterator::finishCreation): Deleted.
+ (JSC::Register::propertyNameIterator): Deleted.
+ (JSC::StructureRareData::enumerationCache): Deleted.
+ (JSC::StructureRareData::setEnumerationCache): Deleted.
+ * runtime/Structure.cpp:
+ (JSC::Structure::addPropertyWithoutTransition):
+ (JSC::Structure::removePropertyWithoutTransition):
+ * runtime/Structure.h:
+ * runtime/StructureInlines.h:
+ (JSC::Structure::setEnumerationCache): Deleted.
+ (JSC::Structure::enumerationCache): Deleted.
+ * runtime/StructureRareData.cpp:
+ (JSC::StructureRareData::visitChildren):
+ * runtime/StructureRareData.h:
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+
2014-07-25 Saam Barati <[email protected]>
Fix 32-bit build breakage for type profiling
Modified: branches/ftlopt/Source/_javascript_Core/_javascript_Core.order (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/_javascript_Core.order 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/_javascript_Core.order 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1354,7 +1354,6 @@
__ZN3JSC17BytecodeGenerator7emitIncEPNS_10RegisterIDE
__ZN3JSC14jsIsObjectTypeEPNS_9ExecStateENS_7JSValueE
__ZN3JSC6JSCell11getCallDataEPS0_RNS_8CallDataE
-__ZN3JSC22JSPropertyNameIterator6createEPNS_9ExecStateEPNS_8JSObjectE
__ZN3JSC8JSObject16getPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject19getOwnPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject27getOwnNonIndexPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
@@ -1638,13 +1637,10 @@
__ZN3JSC3JIT17emit_op_loop_hintEPNS_11InstructionE
__ZN3JSC8Watchdog9isEnabledEv
__ZN3JSC3JIT16emit_op_jeq_nullEPNS_11InstructionE
-__ZN3JSC3JIT18emit_op_get_pnamesEPNS_11InstructionE
__ZN3JSC3JIT11emit_op_jmpEPNS_11InstructionE
-__ZN3JSC3JIT20emit_op_get_by_pnameEPNS_11InstructionE
__ZN3JSC3JIT22compileGetDirectOffsetENS_12X86Registers10RegisterIDES2_S2_S2_NS0_15FinalObjectModeE
__ZN3JSC3JIT17emit_op_new_arrayEPNS_11InstructionE
__ZN3JSC3JIT17emit_op_nstricteqEPNS_11InstructionE
-__ZN3JSC3JIT18emit_op_next_pnameEPNS_11InstructionE
__ZN3JSC3JIT11emit_op_incEPNS_11InstructionE
__ZN3JSC3JIT13emit_op_jlessEPNS_11InstructionE
__ZN3JSC3JIT24emitSlow_op_convert_thisEPNS_11InstructionERPNS_13SlowCaseEntryE
@@ -1663,7 +1659,6 @@
__ZN3JSC12X86Assembler23X86InstructionFormatter11twoByteOp64ENS0_15TwoByteOpcodeIDEiNS_12X86Registers10RegisterIDE
__ZN3JSC23MacroAssemblerX86Common12branchDoubleENS0_15DoubleConditionENS_12X86Registers13XMMRegisterIDES3_
__ZN3JSC12X86Assembler23X86InstructionFormatter9twoByteOpENS0_15TwoByteOpcodeIDEiNS_12X86Registers10RegisterIDE
-__ZN3JSC3JIT24emitSlow_op_get_by_pnameEPNS_11InstructionERPNS_13SlowCaseEntryE
__ZN3JSC3JIT21emitSlow_op_nstricteqEPNS_11InstructionERPNS_13SlowCaseEntryE
__ZN3JSC3JIT15emitSlow_op_incEPNS_11InstructionERPNS_13SlowCaseEntryE
__ZN3JSC3JIT17emitSlow_op_jlessEPNS_11InstructionERPNS_13SlowCaseEntryE
@@ -1675,7 +1670,6 @@
_cti_op_stricteq
_cti_op_jtrue
_cti_op_is_object
-_cti_op_get_pnames
__ZN3JSC8JSString12toThisObjectEPNS_6JSCellEPNS_9ExecStateE
__ZN3JSC12StringObjectC1ERNS_2VMEPNS_9StructureE
__ZNK3JSC6JSCell11toPrimitiveEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
@@ -2623,7 +2617,6 @@
__ZN3WTF7HashMapImPN3JSC21GCAwareJITStubRoutineENS_7IntHashImEENS_10HashTraitsImEENS6_IS3_EEE4findERKm
__ZN3JSC13JSFinalObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC17StructureRareData13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
-__ZN3JSC22JSPropertyNameIterator13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC14StructureChain13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC14MarkStackArray6expandEv
__ZN3JSC17ProgramExecutable13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
@@ -2667,7 +2660,6 @@
__ZN3JSC17ProgramExecutable7destroyEPNS_6JSCellE
__ZN3JSC17SharedSymbolTable7destroyEPNS_6JSCellE
__ZN3JSC10JSFunction7destroyEPNS_6JSCellE
-__ZN3JSC22JSPropertyNameIterator7destroyEPNS_6JSCellE
__ZN3JSC19ResolveGlobalStatus10computeForEPNS_9CodeBlockEiPNS_16ResolveOperationERNS_10IdentifierE
__ZN3JSC13GetByIdStatus10computeForERNS_2VMEPNS_9StructureERNS_10IdentifierE
__ZN3JSC3DFG14SpeculativeJIT23emitObjectOrOtherBranchENS0_4EdgeEjj
@@ -4942,7 +4934,6 @@
_llint_slow_path_del_by_id
_llint_slow_path_get_by_val
_llint_slow_path_get_argument_by_val
-_llint_slow_path_get_by_pname
_llint_slow_path_put_by_val
_llint_slow_path_del_by_val
_llint_slow_path_put_by_index
@@ -4970,8 +4961,6 @@
_llint_slow_path_tear_off_arguments
_llint_slow_path_strcat
_llint_slow_path_to_primitive
-_llint_slow_path_get_pnames
-_llint_slow_path_next_pname
_llint_slow_path_push_with_scope
_llint_slow_path_pop_scope
_llint_slow_path_push_name_scope
@@ -5038,7 +5027,6 @@
_llint_op_put_by_id_transition_normal_out_of_line
_llint_op_get_by_val
_llint_op_get_argument_by_val
-_llint_op_get_by_pname
_llint_op_put_by_val
_llint_op_jmp
_llint_op_jeq_null
@@ -5053,7 +5041,6 @@
_llint_op_call_put_result
_llint_op_ret_object_or_this
_llint_op_to_primitive
-_llint_op_next_pname
_llint_op_catch
_llint_op_get_scoped_var
_llint_op_put_scoped_var
@@ -5111,7 +5098,6 @@
_llint_op_call_eval
_llint_generic_return_point
_llint_op_strcat
-_llint_op_get_pnames
_llint_op_push_with_scope
_llint_op_pop_scope
_llint_op_push_name_scope
Modified: branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2014-07-25 21:26:20 UTC (rev 171614)
@@ -680,7 +680,6 @@
<ClCompile Include="..\runtime\JSPromiseFunctions.cpp" />
<ClCompile Include="..\runtime\JSPromiseReaction.cpp" />
<ClCompile Include="..\runtime\JSPromisePrototype.cpp" />
- <ClCompile Include="..\runtime\JSPropertyNameIterator.cpp" />
<ClCompile Include="..\runtime\JSProxy.cpp" />
<ClCompile Include="..\runtime\JSScope.cpp" />
<ClCompile Include="..\runtime\JSSegmentedVariableObject.cpp" />
@@ -1371,7 +1370,6 @@
<ClInclude Include="..\runtime\JSPromiseFunctions.h" />
<ClInclude Include="..\runtime\JSPromiseReaction.h" />
<ClInclude Include="..\runtime\JSPromisePrototype.h" />
- <ClInclude Include="..\runtime\JSPropertyNameIterator.h" />
<ClInclude Include="..\runtime\JSProxy.h" />
<ClInclude Include="..\runtime\JSScope.h" />
<ClInclude Include="..\runtime\JSSegmentedVariableObject.h" />
Modified: branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2014-07-25 21:26:20 UTC (rev 171614)
@@ -648,9 +648,6 @@
<ClCompile Include="..\runtime\JSONObject.cpp">
<Filter>runtime</Filter>
</ClCompile>
- <ClCompile Include="..\runtime\JSPropertyNameIterator.cpp">
- <Filter>runtime</Filter>
- </ClCompile>
<ClCompile Include="..\runtime\JSProxy.cpp">
<Filter>runtime</Filter>
</ClCompile>
@@ -2306,9 +2303,6 @@
<ClInclude Include="..\runtime\JSONObject.h">
<Filter>runtime</Filter>
</ClInclude>
- <ClInclude Include="..\runtime\JSPropertyNameIterator.h">
- <Filter>runtime</Filter>
- </ClInclude>
<ClInclude Include="..\runtime\JSProxy.h">
<Filter>runtime</Filter>
</ClInclude>
Modified: branches/ftlopt/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1731,7 +1731,6 @@
A72028BA1797603D0098028C /* JSFunctionInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A72028B91797603D0098028C /* JSFunctionInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A72700780DAC605600E548D7 /* JSNotAnObject.cpp */; };
A72701B90DADE94900E548D7 /* ExceptionHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = A72701B30DADE94900E548D7 /* ExceptionHelpers.h */; };
- A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */; };
A7280A2811557E3000D56957 /* JSObjectRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = A79EDB0811531CD60019E912 /* JSObjectRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
A729009C17976C6000317298 /* MacroAssemblerARMv7.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A729009B17976C6000317298 /* MacroAssemblerARMv7.cpp */; };
A7299D9D17D12837005F5FF9 /* JSSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7299D9B17D12837005F5FF9 /* JSSet.cpp */; };
@@ -3404,8 +3403,6 @@
A72700770DAC605600E548D7 /* JSNotAnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSNotAnObject.h; sourceTree = "<group>"; };
A72700780DAC605600E548D7 /* JSNotAnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotAnObject.cpp; sourceTree = "<group>"; };
A72701B30DADE94900E548D7 /* ExceptionHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionHelpers.h; sourceTree = "<group>"; };
- A727FF650DA3053B00E548D7 /* JSPropertyNameIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPropertyNameIterator.h; sourceTree = "<group>"; };
- A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPropertyNameIterator.cpp; sourceTree = "<group>"; };
A729009B17976C6000317298 /* MacroAssemblerARMv7.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssemblerARMv7.cpp; sourceTree = "<group>"; };
A7299D9B17D12837005F5FF9 /* JSSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSet.cpp; sourceTree = "<group>"; };
A7299D9C17D12837005F5FF9 /* JSSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSet.h; sourceTree = "<group>"; };
@@ -4799,8 +4796,6 @@
7C184E1D17BEE22E007CB63A /* JSPromisePrototype.h */,
7C008CDC1871258D00955C24 /* JSPromiseReaction.cpp */,
7C008CDD1871258D00955C24 /* JSPromiseReaction.h */,
- A727FF660DA3053B00E548D7 /* JSPropertyNameIterator.cpp */,
- A727FF650DA3053B00E548D7 /* JSPropertyNameIterator.h */,
862553CE16136AA5009F17D0 /* JSProxy.cpp */,
862553CF16136AA5009F17D0 /* JSProxy.h */,
14874AE115EBDE4A002E3587 /* JSScope.cpp */,
@@ -7980,7 +7975,6 @@
7C008CD2186F8A9300955C24 /* JSPromiseFunctions.cpp in Sources */,
7C184E1E17BEE22E007CB63A /* JSPromisePrototype.cpp in Sources */,
7C008CDE1871258D00955C24 /* JSPromiseReaction.cpp in Sources */,
- A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */,
862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */,
9928FF3B18AC4AEC00B8CF12 /* JSReplayInputs.cpp in Sources */,
14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */,
Modified: branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeBasicBlock.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeBasicBlock.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeBasicBlock.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -52,8 +52,6 @@
case op_switch_imm:
case op_switch_char:
case op_switch_string:
- case op_get_pnames:
- case op_next_pname:
case op_check_has_instance:
return true;
default:
Modified: branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeList.json (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeList.json 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeList.json 2014-07-25 21:26:20 UTC (rev 171614)
@@ -70,7 +70,6 @@
{ "name" : "op_del_by_id", "length" : 4 },
{ "name" : "op_get_by_val", "length" : 6 },
{ "name" : "op_get_argument_by_val", "length" : 6 },
- { "name" : "op_get_by_pname", "length" : 7 },
{ "name" : "op_put_by_val", "length" : 5 },
{ "name" : "op_put_by_val_direct", "length" : 5 },
{ "name" : "op_del_by_val", "length" : 4 },
@@ -108,8 +107,6 @@
{ "name" : "op_construct_varargs", "length" : 9 },
{ "name" : "op_strcat", "length" : 4 },
{ "name" : "op_to_primitive", "length" : 3 },
- { "name" : "op_get_pnames", "length" : 6 },
- { "name" : "op_next_pname", "length" : 7 },
{ "name" : "op_resolve_scope", "length" : 6 },
{ "name" : "op_get_from_scope", "length" : 8 },
{ "name" : "op_get_from_scope_with_profile", "length" : 9 },
Modified: branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeUseDef.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeUseDef.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecode/BytecodeUseDef.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -146,7 +146,6 @@
case op_captured_mov:
case op_new_array_with_size:
case op_create_this:
- case op_get_pnames:
case op_del_by_id:
case op_unsigned: {
functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
@@ -194,22 +193,13 @@
functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
return;
}
- case op_get_direct_pname:
- case op_next_pname: {
+ case op_get_direct_pname: {
functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);
functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
functor(codeBlock, instruction, opcodeID, instruction[5].u.operand);
return;
}
- case op_get_by_pname: {
- functor(codeBlock, instruction, opcodeID, instruction[2].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[5].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[6].u.operand);
- return;
- }
case op_switch_string:
case op_switch_char:
case op_switch_imm: {
@@ -316,7 +306,6 @@
case op_get_direct_pname:
case op_get_structure_property_enumerator:
case op_next_enumerator_pname:
- case op_next_pname:
case op_resolve_scope:
case op_strcat:
case op_tear_off_activation:
@@ -344,7 +333,6 @@
case op_instanceof:
case op_get_by_val:
case op_get_argument_by_val:
- case op_get_by_pname:
case op_get_arguments_length:
case op_typeof:
case op_is_undefined:
@@ -394,12 +382,6 @@
functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
return;
}
- case op_get_pnames: {
- functor(codeBlock, instruction, opcodeID, instruction[1].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[3].u.operand);
- functor(codeBlock, instruction, opcodeID, instruction[4].u.operand);
- return;
- }
case op_enter: {
for (unsigned i = codeBlock->m_numVars; i--;)
functor(codeBlock, instruction, opcodeID, virtualRegisterForLocal(i).offset());
Modified: branches/ftlopt/Source/_javascript_Core/bytecode/CodeBlock.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecode/CodeBlock.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecode/CodeBlock.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1119,17 +1119,6 @@
dumpValueProfiling(out, it, hasPrintedProfiling);
break;
}
- case op_get_by_pname: {
- int r0 = (++it)->u.operand;
- int r1 = (++it)->u.operand;
- int r2 = (++it)->u.operand;
- int r3 = (++it)->u.operand;
- int r4 = (++it)->u.operand;
- int r5 = (++it)->u.operand;
- printLocationAndOp(out, exec, location, it, "get_by_pname");
- 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());
- break;
- }
case op_put_by_val: {
int r0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
@@ -1376,29 +1365,6 @@
out.printf("%s, %s", registerName(r0).data(), registerName(r1).data());
break;
}
- case op_get_pnames: {
- int r0 = it[1].u.operand;
- int r1 = it[2].u.operand;
- int r2 = it[3].u.operand;
- int r3 = it[4].u.operand;
- int offset = it[5].u.operand;
- printLocationAndOp(out, exec, location, it, "get_pnames");
- out.printf("%s, %s, %s, %s, %d(->%d)", registerName(r0).data(), registerName(r1).data(), registerName(r2).data(), registerName(r3).data(), offset, location + offset);
- it += OPCODE_LENGTH(op_get_pnames) - 1;
- break;
- }
- case op_next_pname: {
- int dest = it[1].u.operand;
- int base = it[2].u.operand;
- int i = it[3].u.operand;
- int size = it[4].u.operand;
- int iter = it[5].u.operand;
- int offset = it[6].u.operand;
- printLocationAndOp(out, exec, location, it, "next_pname");
- 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);
- it += OPCODE_LENGTH(op_next_pname) - 1;
- break;
- }
case op_get_enumerable_length: {
int dst = it[1].u.operand;
int base = it[2].u.operand;
Modified: branches/ftlopt/Source/_javascript_Core/bytecode/PreciseJumpTargets.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecode/PreciseJumpTargets.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecode/PreciseJumpTargets.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -73,12 +73,6 @@
out.append(bytecodeOffset + current[2].u.operand);
break;
}
- case op_get_pnames:
- out.append(bytecodeOffset + current[5].u.operand);
- break;
- case op_next_pname:
- out.append(bytecodeOffset + current[6].u.operand);
- break;
case op_check_has_instance:
out.append(bytecodeOffset + current[4].u.operand);
break;
Modified: branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -2286,33 +2286,6 @@
emitComplexPopScopes(&m_scopeContextStack.last(), &m_scopeContextStack.last() - scopeDelta);
}
-RegisterID* BytecodeGenerator::emitGetPropertyNames(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, Label* breakTarget)
-{
- size_t begin = instructions().size();
-
- emitOpcode(op_get_pnames);
- instructions().append(dst->index());
- instructions().append(base->index());
- instructions().append(i->index());
- instructions().append(size->index());
- instructions().append(breakTarget->bind(begin, instructions().size()));
- return dst;
-}
-
-RegisterID* BytecodeGenerator::emitNextPropertyName(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, RegisterID* iter, Label* target)
-{
- size_t begin = instructions().size();
-
- emitOpcode(op_next_pname);
- instructions().append(dst->index());
- instructions().append(base->index());
- instructions().append(i->index());
- instructions().append(size->index());
- instructions().append(iter->index());
- instructions().append(target->bind(begin, instructions().size()));
- return dst;
-}
-
TryData* BytecodeGenerator::pushTry(Label* start)
{
TryData tryData;
Modified: branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -487,9 +487,6 @@
PassRefPtr<Label> emitJumpIfNotFunctionApply(RegisterID* cond, Label* target);
void emitPopScopes(int targetScopeDepth);
- RegisterID* emitGetPropertyNames(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, Label* breakTarget);
- RegisterID* emitNextPropertyName(RegisterID* dst, RegisterID* base, RegisterID* i, RegisterID* size, RegisterID* iter, Label* target);
-
RegisterID* emitHasIndexedProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName);
RegisterID* emitHasStructureProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName, RegisterID* enumerator);
RegisterID* emitHasGenericProperty(RegisterID* dst, RegisterID* base, RegisterID* propertyName);
Modified: branches/ftlopt/Source/_javascript_Core/interpreter/Interpreter.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/interpreter/Interpreter.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/interpreter/Interpreter.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -47,7 +47,6 @@
#include "JSBoundFunction.h"
#include "JSNameScope.h"
#include "JSNotAnObject.h"
-#include "JSPropertyNameIterator.h"
#include "JSStackInlines.h"
#include "JSString.h"
#include "JSWithScope.h"
Modified: branches/ftlopt/Source/_javascript_Core/interpreter/Register.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/interpreter/Register.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/interpreter/Register.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -39,7 +39,6 @@
class ExecState;
class JSActivation;
class JSObject;
- class JSPropertyNameIterator;
class JSScope;
typedef ExecState CallFrame;
@@ -63,7 +62,6 @@
CallFrame* callFrame() const;
CodeBlock* codeBlock() const;
JSObject* function() const;
- JSPropertyNameIterator* propertyNameIterator() const;
JSScope* scope() const;
int32_t unboxedInt32() const;
int64_t unboxedInt52() const;
Modified: branches/ftlopt/Source/_javascript_Core/jit/JIT.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JIT.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JIT.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -219,8 +219,6 @@
DEFINE_OP(op_get_arguments_length)
DEFINE_OP(op_get_by_val)
DEFINE_OP(op_get_argument_by_val)
- DEFINE_OP(op_get_by_pname)
- DEFINE_OP(op_get_pnames)
DEFINE_OP(op_check_has_instance)
DEFINE_OP(op_instanceof)
DEFINE_OP(op_is_undefined)
@@ -258,7 +256,6 @@
DEFINE_OP(op_new_func_exp)
DEFINE_OP(op_new_object)
DEFINE_OP(op_new_regexp)
- DEFINE_OP(op_next_pname)
DEFINE_OP(op_not)
DEFINE_OP(op_nstricteq)
DEFINE_OP(op_pop_scope)
@@ -391,7 +388,6 @@
DEFINE_SLOWCASE_OP(op_get_arguments_length)
DEFINE_SLOWCASE_OP(op_get_by_val)
DEFINE_SLOWCASE_OP(op_get_argument_by_val)
- DEFINE_SLOWCASE_OP(op_get_by_pname)
DEFINE_SLOWCASE_OP(op_check_has_instance)
DEFINE_SLOWCASE_OP(op_instanceof)
DEFINE_SLOWCASE_OP(op_jfalse)
Modified: branches/ftlopt/Source/_javascript_Core/jit/JIT.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JIT.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JIT.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -56,7 +56,6 @@
class CodeBlock;
class FunctionExecutable;
class JIT;
- class JSPropertyNameIterator;
class Identifier;
class Interpreter;
class JSScope;
@@ -483,7 +482,6 @@
void emit_op_get_arguments_length(Instruction*);
void emit_op_get_by_val(Instruction*);
void emit_op_get_argument_by_val(Instruction*);
- void emit_op_get_by_pname(Instruction*);
void emit_op_init_lazy_reg(Instruction*);
void emit_op_check_has_instance(Instruction*);
void emit_op_instanceof(Instruction*);
@@ -521,8 +519,6 @@
void emit_op_new_func_exp(Instruction*);
void emit_op_new_object(Instruction*);
void emit_op_new_regexp(Instruction*);
- void emit_op_get_pnames(Instruction*);
- void emit_op_next_pname(Instruction*);
void emit_op_not(Instruction*);
void emit_op_nstricteq(Instruction*);
void emit_op_pop_scope(Instruction*);
@@ -584,7 +580,6 @@
void emitSlow_op_get_arguments_length(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_get_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_get_argument_by_val(Instruction*, Vector<SlowCaseEntry>::iterator&);
- void emitSlow_op_get_by_pname(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_check_has_instance(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_instanceof(Instruction*, Vector<SlowCaseEntry>::iterator&);
void emitSlow_op_jfalse(Instruction*, Vector<SlowCaseEntry>::iterator&);
Modified: branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -37,7 +37,6 @@
#include "JSCell.h"
#include "JSFunction.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "LinkBuffer.h"
#include "MaxFrameExtentForSlowPathCall.h"
#include "RepatchBuffer.h"
@@ -459,106 +458,6 @@
jumpToExceptionHandler();
}
-void JIT::emit_op_get_pnames(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int i = currentInstruction[3].u.operand;
- int size = currentInstruction[4].u.operand;
- int breakTarget = currentInstruction[5].u.operand;
-
- JumpList isNotObject;
-
- emitGetVirtualRegister(base, regT0);
- if (!m_codeBlock->isKnownNotImmediate(base))
- isNotObject.append(emitJumpIfNotJSCell(regT0));
- if (base != m_codeBlock->thisRegister().offset() || m_codeBlock->isStrictMode())
- isNotObject.append(emitJumpIfCellNotObject(regT0));
-
- // We could inline the case where you have a valid cache, but
- // this call doesn't seem to be hot.
- Label isObject(this);
- callOperation(operationGetPNames, regT0);
- emitStoreCell(dst, returnValueGPR);
- load32(Address(regT0, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStringsSize)), regT3);
- store64(tagTypeNumberRegister, addressFor(i));
- store32(TrustedImm32(Int32Tag), intTagFor(size));
- store32(regT3, intPayloadFor(size));
- Jump end = jump();
-
- isNotObject.link(this);
- move(regT0, regT1);
- and32(TrustedImm32(~TagBitUndefined), regT1);
- addJump(branch32(Equal, regT1, TrustedImm32(ValueNull)), breakTarget);
- callOperation(operationToObject, base, regT0);
- jump().linkTo(isObject, this);
-
- end.link(this);
-}
-
-void JIT::emit_op_next_pname(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int i = currentInstruction[3].u.operand;
- int size = currentInstruction[4].u.operand;
- int it = currentInstruction[5].u.operand;
- int target = currentInstruction[6].u.operand;
-
- JumpList callHasProperty;
-
- Label begin(this);
- load32(intPayloadFor(i), regT0);
- Jump end = branch32(Equal, regT0, intPayloadFor(size));
-
- // Grab key @ i
- loadPtr(addressFor(it), regT1);
- loadPtr(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStrings)), regT2);
-
- load64(BaseIndex(regT2, regT0, TimesEight), regT2);
-
- emitPutVirtualRegister(dst, regT2);
-
- // Increment i
- add32(TrustedImm32(1), regT0);
- store32(regT0, intPayloadFor(i));
-
- // Verify that i is valid:
- emitGetVirtualRegister(base, regT0);
-
- // Test base's structure
- emitLoadStructure(regT0, regT2, regT3);
- callHasProperty.append(branchPtr(NotEqual, regT2, Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))));
-
- // Test base's prototype chain
- loadPtr(Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedPrototypeChain))), regT3);
- loadPtr(Address(regT3, OBJECT_OFFSETOF(StructureChain, m_vector)), regT3);
- addJump(branchTestPtr(Zero, Address(regT3)), target);
-
- Label checkPrototype(this);
- load64(Address(regT2, Structure::prototypeOffset()), regT2);
- callHasProperty.append(emitJumpIfNotJSCell(regT2));
- emitLoadStructure(regT2, regT2, regT1);
- callHasProperty.append(branchPtr(NotEqual, regT2, Address(regT3)));
- addPtr(TrustedImm32(sizeof(Structure*)), regT3);
- branchTestPtr(NonZero, Address(regT3)).linkTo(checkPrototype, this);
-
- // Continue loop.
- addJump(jump(), target);
-
- // Slow case: Ask the object if i is valid.
- callHasProperty.link(this);
- emitGetVirtualRegister(dst, regT1);
- callOperation(operationHasProperty, regT0, regT1);
-
- // Test for valid key.
- addJump(branchTest32(NonZero, regT0), target);
- jump().linkTo(begin, this);
-
- // End of loop.
- end.link(this);
-}
-
void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
{
emitGetVirtualRegister(currentInstruction[1].u.operand, regT0);
Modified: branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JITOpcodes32_64.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -37,7 +37,6 @@
#include "JSCell.h"
#include "JSFunction.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "JSVariableObject.h"
#include "LinkBuffer.h"
#include "MaxFrameExtentForSlowPathCall.h"
@@ -769,105 +768,6 @@
jumpToExceptionHandler();
}
-void JIT::emit_op_get_pnames(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int i = currentInstruction[3].u.operand;
- int size = currentInstruction[4].u.operand;
- int breakTarget = currentInstruction[5].u.operand;
-
- JumpList isNotObject;
-
- emitLoad(base, regT1, regT0);
- if (!m_codeBlock->isKnownNotImmediate(base))
- isNotObject.append(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
- if (VirtualRegister(base) != m_codeBlock->thisRegister() || m_codeBlock->isStrictMode())
- isNotObject.append(emitJumpIfCellNotObject(regT0));
-
- // We could inline the case where you have a valid cache, but
- // this call doesn't seem to be hot.
- Label isObject(this);
- callOperation(operationGetPNames, regT0);
- emitStoreCell(dst, returnValueGPR);
- load32(Address(regT0, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStringsSize)), regT3);
- store32(TrustedImm32(Int32Tag), intTagFor(i));
- store32(TrustedImm32(0), intPayloadFor(i));
- store32(TrustedImm32(Int32Tag), intTagFor(size));
- store32(regT3, payloadFor(size));
- Jump end = jump();
-
- isNotObject.link(this);
- addJump(branch32(Equal, regT1, TrustedImm32(JSValue::NullTag)), breakTarget);
- addJump(branch32(Equal, regT1, TrustedImm32(JSValue::UndefinedTag)), breakTarget);
- callOperation(operationToObject, base, regT1, regT0);
- jump().linkTo(isObject, this);
-
- end.link(this);
-}
-
-void JIT::emit_op_next_pname(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int i = currentInstruction[3].u.operand;
- int size = currentInstruction[4].u.operand;
- int it = currentInstruction[5].u.operand;
- int target = currentInstruction[6].u.operand;
-
- JumpList callHasProperty;
-
- Label begin(this);
- load32(intPayloadFor(i), regT0);
- Jump end = branch32(Equal, regT0, intPayloadFor(size));
-
- // Grab key @ i
- loadPtr(payloadFor(it), regT1);
- loadPtr(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_jsStrings)), regT2);
- load32(BaseIndex(regT2, regT0, TimesEight), regT2);
- store32(TrustedImm32(JSValue::CellTag), tagFor(dst));
- store32(regT2, payloadFor(dst));
-
- // Increment i
- add32(TrustedImm32(1), regT0);
- store32(regT0, intPayloadFor(i));
-
- // Verify that i is valid:
- loadPtr(payloadFor(base), regT0);
-
- // Test base's structure
- loadPtr(Address(regT0, JSCell::structureIDOffset()), regT2);
- callHasProperty.append(branchPtr(NotEqual, regT2, Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure)))));
-
- // Test base's prototype chain
- loadPtr(Address(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedPrototypeChain))), regT3);
- loadPtr(Address(regT3, OBJECT_OFFSETOF(StructureChain, m_vector)), regT3);
- addJump(branchTestPtr(Zero, Address(regT3)), target);
-
- Label checkPrototype(this);
- callHasProperty.append(branch32(Equal, Address(regT2, Structure::prototypeOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.tag)), TrustedImm32(JSValue::NullTag)));
- loadPtr(Address(regT2, Structure::prototypeOffset() + OBJECT_OFFSETOF(JSValue, u.asBits.payload)), regT2);
- loadPtr(Address(regT2, JSCell::structureIDOffset()), regT2);
- callHasProperty.append(branchPtr(NotEqual, regT2, Address(regT3)));
- addPtr(TrustedImm32(sizeof(Structure*)), regT3);
- branchTestPtr(NonZero, Address(regT3)).linkTo(checkPrototype, this);
-
- // Continue loop.
- addJump(jump(), target);
-
- // Slow case: Ask the object if i is valid.
- callHasProperty.link(this);
- loadPtr(addressFor(dst), regT1);
- callOperation(operationHasProperty, regT0, regT1);
-
- // Test for valid key.
- addJump(branchTest32(NonZero, regT0), target);
- jump().linkTo(begin, this);
-
- // End of loop.
- end.link(this);
-}
-
void JIT::emit_op_push_with_scope(Instruction* currentInstruction)
{
emitLoad(currentInstruction[1].u.operand, regT1, regT0);
Modified: branches/ftlopt/Source/_javascript_Core/jit/JITOperations.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JITOperations.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JITOperations.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -45,7 +45,6 @@
#include "JSGlobalObjectFunctions.h"
#include "JSNameScope.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "JSStackInlines.h"
#include "JSWithScope.h"
#include "ObjectConstructor.h"
@@ -1616,18 +1615,6 @@
return JSValue::encode(result);
}
-JSCell* JIT_OPERATION operationGetPNames(ExecState* exec, JSObject* obj)
-{
- VM& vm = exec->vm();
- NativeCallFrameTracer tracer(&vm, exec);
-
- Structure* structure = obj->structure(vm);
- JSPropertyNameIterator* jsPropertyNameIterator = structure->enumerationCache();
- if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(exec))
- jsPropertyNameIterator = JSPropertyNameIterator::create(exec, obj);
- return jsPropertyNameIterator;
-}
-
EncodedJSValue JIT_OPERATION operationInstanceOf(ExecState* exec, EncodedJSValue encodedValue, EncodedJSValue encodedProto)
{
VM& vm = exec->vm();
Modified: branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -35,7 +35,6 @@
#include "JITInlines.h"
#include "JSArray.h"
#include "JSFunction.h"
-#include "JSPropertyNameIterator.h"
#include "JSVariableObject.h"
#include "LinkBuffer.h"
#include "RepatchBuffer.h"
@@ -262,51 +261,6 @@
load64(BaseIndex(scratch, offset, TimesEight, (firstOutOfLineOffset - 2) * sizeof(EncodedJSValue)), result);
}
-void JIT::emit_op_get_by_pname(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int property = currentInstruction[3].u.operand;
- unsigned expected = currentInstruction[4].u.operand;
- int iter = currentInstruction[5].u.operand;
- int i = currentInstruction[6].u.operand;
-
- emitGetVirtualRegister(property, regT0);
- addSlowCase(branch64(NotEqual, regT0, addressFor(expected)));
- emitGetVirtualRegisters(base, regT0, iter, regT1);
- emitJumpSlowCaseIfNotJSCell(regT0, base);
-
- // Test base's structure
- emitLoadStructure(regT0, regT2, regT3);
- addSlowCase(branchPtr(NotEqual, regT2, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure))));
- load32(addressFor(i), regT3);
- sub32(TrustedImm32(1), regT3);
- addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots))));
- Jump inlineProperty = branch32(Below, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)));
- add32(TrustedImm32(firstOutOfLineOffset), regT3);
- sub32(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)), regT3);
- inlineProperty.link(this);
- compileGetDirectOffset(regT0, regT0, regT3, regT1);
-
- emitPutVirtualRegister(dst, regT0);
-}
-
-void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int property = currentInstruction[3].u.operand;
-
- linkSlowCase(iter);
- linkSlowCaseIfNotJSCell(iter, base);
- linkSlowCase(iter);
- linkSlowCase(iter);
-
- emitGetVirtualRegister(base, regT0);
- emitGetVirtualRegister(property, regT1);
- callOperation(operationGetByValGeneric, dst, regT0, regT1);
-}
-
void JIT::emit_op_put_by_val(Instruction* currentInstruction)
{
int base = currentInstruction[1].u.operand;
Modified: branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/jit/JITPropertyAccess32_64.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -35,7 +35,6 @@
#include "JITInlines.h"
#include "JSArray.h"
#include "JSFunction.h"
-#include "JSPropertyNameIterator.h"
#include "JSVariableObject.h"
#include "LinkBuffer.h"
#include "RepatchBuffer.h"
@@ -606,54 +605,6 @@
load32(BaseIndex(base, offset, TimesEight, OBJECT_OFFSETOF(JSValue, u.asBits.tag) + (firstOutOfLineOffset - 2) * sizeof(EncodedJSValue)), resultTag);
}
-void JIT::emit_op_get_by_pname(Instruction* currentInstruction)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int property = currentInstruction[3].u.operand;
- unsigned expected = currentInstruction[4].u.operand;
- int iter = currentInstruction[5].u.operand;
- int i = currentInstruction[6].u.operand;
-
- emitLoad2(property, regT1, regT0, base, regT3, regT2);
- emitJumpSlowCaseIfNotJSCell(property, regT1);
- addSlowCase(branchPtr(NotEqual, regT0, payloadFor(expected)));
- // Property registers are now available as the property is known
- emitJumpSlowCaseIfNotJSCell(base, regT3);
- emitLoadPayload(iter, regT1);
-
- // Test base's structure
- loadPtr(Address(regT2, JSCell::structureIDOffset()), regT0);
- addSlowCase(branchPtr(NotEqual, regT0, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructure))));
- load32(addressFor(i), regT3);
- sub32(TrustedImm32(1), regT3);
- addSlowCase(branch32(AboveOrEqual, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_numCacheableSlots))));
- Jump inlineProperty = branch32(Below, regT3, Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)));
- add32(TrustedImm32(firstOutOfLineOffset), regT3);
- sub32(Address(regT1, OBJECT_OFFSETOF(JSPropertyNameIterator, m_cachedStructureInlineCapacity)), regT3);
- inlineProperty.link(this);
- compileGetDirectOffset(regT2, regT1, regT0, regT3);
-
- emitStore(dst, regT1, regT0);
-}
-
-void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
-{
- int dst = currentInstruction[1].u.operand;
- int base = currentInstruction[2].u.operand;
- int property = currentInstruction[3].u.operand;
-
- linkSlowCaseIfNotJSCell(iter, property);
- linkSlowCase(iter);
- linkSlowCaseIfNotJSCell(iter, base);
- linkSlowCase(iter);
- linkSlowCase(iter);
-
- emitLoad(base, regT1, regT0);
- emitLoad(property, regT3, regT2);
- callOperation(operationGetByValGeneric, dst, regT1, regT0, regT3, regT2);
-}
-
void JIT::emitVarInjectionCheck(bool needsVarInjectionChecks)
{
if (!needsVarInjectionChecks)
Modified: branches/ftlopt/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -39,7 +39,6 @@
#include "VM.h"
#include "JSGlobalObject.h"
#include "JSObject.h"
-#include "JSPropertyNameIterator.h"
#include "JSStack.h"
#include "JSString.h"
#include "JSTypeInfo.h"
Modified: branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -44,7 +44,6 @@
#include "JSCJSValue.h"
#include "JSGlobalObjectFunctions.h"
#include "JSNameScope.h"
-#include "JSPropertyNameIterator.h"
#include "JSStackInlines.h"
#include "JSString.h"
#include "JSWithScope.h"
@@ -768,12 +767,6 @@
LLINT_RETURN_PROFILED(op_get_argument_by_val, getByVal(exec, arguments, LLINT_OP_C(3).jsValue()));
}
-LLINT_SLOW_PATH_DECL(slow_path_get_by_pname)
-{
- LLINT_BEGIN();
- LLINT_RETURN(getByVal(exec, LLINT_OP_C(2).jsValue(), LLINT_OP_C(3).jsValue()));
-}
-
LLINT_SLOW_PATH_DECL(slow_path_put_by_val)
{
LLINT_BEGIN();
@@ -1282,42 +1275,6 @@
LLINT_RETURN(LLINT_OP_C(2).jsValue().toPrimitive(exec));
}
-LLINT_SLOW_PATH_DECL(slow_path_get_pnames)
-{
- LLINT_BEGIN();
- JSValue v = LLINT_OP(2).jsValue();
- if (v.isUndefinedOrNull()) {
- pc += pc[5].u.operand;
- LLINT_END();
- }
-
- JSObject* o = v.toObject(exec);
- Structure* structure = o->structure();
- JSPropertyNameIterator* jsPropertyNameIterator = structure->enumerationCache();
- if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(exec))
- jsPropertyNameIterator = JSPropertyNameIterator::create(exec, o);
-
- LLINT_OP(1) = JSValue(jsPropertyNameIterator);
- LLINT_OP(2) = JSValue(o);
- LLINT_OP(3) = Register::withInt(0);
- LLINT_OP(4) = Register::withInt(jsPropertyNameIterator->size());
-
- pc += OPCODE_LENGTH(op_get_pnames);
- LLINT_END();
-}
-
-LLINT_SLOW_PATH_DECL(slow_path_next_pname)
-{
- LLINT_BEGIN();
- JSObject* base = asObject(LLINT_OP(2).jsValue());
- JSString* property = asString(LLINT_OP(1).jsValue());
- if (base->hasProperty(exec, Identifier(exec, property->value(exec)))) {
- // Go to target.
- pc += pc[6].u.operand;
- } // Else, don't change the PC, so the interpreter will reloop.
- LLINT_END();
-}
-
LLINT_SLOW_PATH_DECL(slow_path_push_with_scope)
{
LLINT_BEGIN();
Modified: branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LLIntSlowPaths.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -78,7 +78,6 @@
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_id);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_val);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_argument_by_val);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_by_pname);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_put_by_val_direct);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_del_by_val);
@@ -109,8 +108,6 @@
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_arguments);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_strcat);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_to_primitive);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_get_pnames);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_next_pname);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_with_scope);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_pop_scope);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_push_name_scope);
Modified: branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter.asm (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter.asm 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1135,12 +1135,6 @@
dispatch(4)
-_llint_op_get_pnames:
- traceExecution()
- callSlowPath(_llint_slow_path_get_pnames)
- dispatch(0) # The slow_path either advances the PC or jumps us to somewhere else.
-
-
_llint_op_push_with_scope:
traceExecution()
callSlowPath(_llint_slow_path_push_with_scope)
Modified: branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter32_64.asm 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1613,37 +1613,6 @@
dispatch(6)
-_llint_op_get_by_pname:
- traceExecution()
- loadi 12[PC], t0
- loadConstantOrVariablePayload(t0, CellTag, t1, .opGetByPnameSlow)
- loadi 16[PC], t0
- bpneq t1, PayloadOffset[cfr, t0, 8], .opGetByPnameSlow
- loadi 8[PC], t0
- loadConstantOrVariablePayload(t0, CellTag, t2, .opGetByPnameSlow)
- loadi 20[PC], t0
- loadi PayloadOffset[cfr, t0, 8], t3
- loadp JSCell::m_structureID[t2], t0
- bpneq t0, JSPropertyNameIterator::m_cachedStructure[t3], .opGetByPnameSlow
- loadi 24[PC], t0
- loadi [cfr, t0, 8], t0
- subi 1, t0
- biaeq t0, JSPropertyNameIterator::m_numCacheableSlots[t3], .opGetByPnameSlow
- bilt t0, JSPropertyNameIterator::m_cachedStructureInlineCapacity[t3], .opGetByPnameInlineProperty
- addi firstOutOfLineOffset, t0
- subi JSPropertyNameIterator::m_cachedStructureInlineCapacity[t3], t0
-.opGetByPnameInlineProperty:
- loadPropertyAtVariableOffset(t0, t2, t1, t3)
- loadi 4[PC], t0
- storei t1, TagOffset[cfr, t0, 8]
- storei t3, PayloadOffset[cfr, t0, 8]
- dispatch(7)
-
-.opGetByPnameSlow:
- callSlowPath(_llint_slow_path_get_by_pname)
- dispatch(7)
-
-
macro contiguousPutByVal(storeCallback)
biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds
.storeResult:
@@ -2041,46 +2010,6 @@
dispatch(3)
-_llint_op_next_pname:
- traceExecution()
- loadi 12[PC], t1
- loadi 16[PC], t2
- loadi PayloadOffset[cfr, t1, 8], t0
- bieq t0, PayloadOffset[cfr, t2, 8], .opNextPnameEnd
- loadi 20[PC], t2
- loadi PayloadOffset[cfr, t2, 8], t2
- loadp JSPropertyNameIterator::m_jsStrings[t2], t3
- loadi [t3, t0, 8], t3
- addi 1, t0
- storei t0, PayloadOffset[cfr, t1, 8]
- loadi 4[PC], t1
- storei CellTag, TagOffset[cfr, t1, 8]
- storei t3, PayloadOffset[cfr, t1, 8]
- loadi 8[PC], t3
- loadi PayloadOffset[cfr, t3, 8], t3
- loadp JSCell::m_structureID[t3], t1
- bpneq t1, JSPropertyNameIterator::m_cachedStructure[t2], .opNextPnameSlow
- loadp JSPropertyNameIterator::m_cachedPrototypeChain[t2], t0
- loadp StructureChain::m_vector[t0], t0
- btpz [t0], .opNextPnameTarget
-.opNextPnameCheckPrototypeLoop:
- bieq Structure::m_prototype + TagOffset[t1], NullTag, .opNextPnameSlow
- loadp Structure::m_prototype + PayloadOffset[t1], t2
- loadp JSCell::m_structureID[t2], t1
- bpneq t1, [t0], .opNextPnameSlow
- addp 4, t0
- btpnz [t0], .opNextPnameCheckPrototypeLoop
-.opNextPnameTarget:
- dispatchBranch(24[PC])
-
-.opNextPnameEnd:
- dispatch(7)
-
-.opNextPnameSlow:
- callSlowPath(_llint_slow_path_next_pname) # This either keeps the PC where it was (causing us to loop) or sets it to target.
- dispatch(0)
-
-
_llint_op_catch:
# This is where we end up from the JIT's throw trampoline (because the
# machine code return address will be set to _llint_op_catch), and from
Modified: branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1447,38 +1447,6 @@
dispatch(6)
-_llint_op_get_by_pname:
- traceExecution()
- loadisFromInstruction(3, t1)
- loadConstantOrVariable(t1, t0)
- loadisFromInstruction(4, t1)
- assertNotConstant(t1)
- bqneq t0, [cfr, t1, 8], .opGetByPnameSlow
- loadisFromInstruction(2, t2)
- loadisFromInstruction(5, t3)
- loadConstantOrVariableCell(t2, t0, .opGetByPnameSlow)
- assertNotConstant(t3)
- loadq [cfr, t3, 8], t1
- loadStructureWithScratch(t0, t2, t3)
- bpneq t2, JSPropertyNameIterator::m_cachedStructure[t1], .opGetByPnameSlow
- loadisFromInstruction(6, t3)
- loadi PayloadOffset[cfr, t3, 8], t3
- subi 1, t3
- biaeq t3, JSPropertyNameIterator::m_numCacheableSlots[t1], .opGetByPnameSlow
- bilt t3, JSPropertyNameIterator::m_cachedStructureInlineCapacity[t1], .opGetByPnameInlineProperty
- addi firstOutOfLineOffset, t3
- subi JSPropertyNameIterator::m_cachedStructureInlineCapacity[t1], t3
-.opGetByPnameInlineProperty:
- loadPropertyAtVariableOffset(t3, t0, t0)
- loadisFromInstruction(1, t1)
- storeq t0, [cfr, t1, 8]
- dispatch(7)
-
-.opGetByPnameSlow:
- callSlowPath(_llint_slow_path_get_by_pname)
- dispatch(7)
-
-
macro contiguousPutByVal(storeCallback)
biaeq t3, -sizeof IndexingHeader + IndexingHeader::u.lengths.publicLength[t0], .outOfBounds
.storeResult:
@@ -1874,49 +1842,6 @@
dispatch(3)
-_llint_op_next_pname:
- traceExecution()
- loadisFromInstruction(3, t1)
- loadisFromInstruction(4, t2)
- assertNotConstant(t1)
- assertNotConstant(t2)
- loadi PayloadOffset[cfr, t1, 8], t0
- bieq t0, PayloadOffset[cfr, t2, 8], .opNextPnameEnd
- loadisFromInstruction(5, t2)
- assertNotConstant(t2)
- loadp [cfr, t2, 8], t2
- loadp JSPropertyNameIterator::m_jsStrings[t2], t3
- loadq [t3, t0, 8], t3
- addi 1, t0
- storei t0, PayloadOffset[cfr, t1, 8]
- loadisFromInstruction(1, t1)
- storeq t3, [cfr, t1, 8]
- loadisFromInstruction(2, t3)
- assertNotConstant(t3)
- loadq [cfr, t3, 8], t3
- loadStructureWithScratch(t3, t1, t0)
- bpneq t1, JSPropertyNameIterator::m_cachedStructure[t2], .opNextPnameSlow
- loadp JSPropertyNameIterator::m_cachedPrototypeChain[t2], t0
- loadp StructureChain::m_vector[t0], t0
- btpz [t0], .opNextPnameTarget
-.opNextPnameCheckPrototypeLoop:
- bqeq Structure::m_prototype[t1], ValueNull, .opNextPnameSlow
- loadq Structure::m_prototype[t1], t2
- loadStructureWithScratch(t2, t1, t3)
- bpneq t1, [t0], .opNextPnameSlow
- addp 8, t0
- btpnz [t0], .opNextPnameCheckPrototypeLoop
-.opNextPnameTarget:
- dispatchIntIndirect(6)
-
-.opNextPnameEnd:
- dispatch(7)
-
-.opNextPnameSlow:
- callSlowPath(_llint_slow_path_next_pname) # This either keeps the PC where it was (causing us to loop) or sets it to target.
- dispatch(0)
-
-
_llint_op_catch:
# This is where we end up from the JIT's throw trampoline (because the
# machine code return address will be set to _llint_op_catch), and from
Modified: branches/ftlopt/Source/_javascript_Core/runtime/CommonSlowPaths.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/CommonSlowPaths.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -45,7 +45,6 @@
#include "JSGlobalObjectFunctions.h"
#include "JSNameScope.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "JSString.h"
#include "JSWithScope.h"
#include "LLIntCommon.h"
Deleted: branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "JSPropertyNameIterator.h"
-
-#include "JSCInlines.h"
-#include "JSGlobalObject.h"
-#include <wtf/StdLibExtras.h>
-
-namespace JSC {
-
-const ClassInfo JSPropertyNameIterator::s_info = { "JSPropertyNameIterator", 0, 0, 0, CREATE_METHOD_TABLE(JSPropertyNameIterator) };
-
-inline JSPropertyNameIterator::JSPropertyNameIterator(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlots)
- : JSCell(exec->vm(), exec->vm().propertyNameIteratorStructure.get())
- , m_numCacheableSlots(numCacheableSlots)
- , m_jsStringsSize(propertyNameArrayData->propertyNameVector().size())
- , m_jsStrings(m_jsStringsSize ? std::make_unique<WriteBarrier<Unknown>[]>(m_jsStringsSize) : nullptr)
-{
-}
-
-JSPropertyNameIterator* JSPropertyNameIterator::create(ExecState* exec, JSObject* o)
-{
- ASSERT(!o->structure()->enumerationCache() ||
- o->structure()->enumerationCache()->cachedStructure() != o->structure() ||
- o->structure()->enumerationCache()->cachedPrototypeChain() != o->structure()->prototypeChain(exec));
-
- VM& vm = exec->vm();
-
- PropertyNameArray propertyNames(exec);
- o->methodTable()->getPropertyNames(o, exec, propertyNames, ExcludeDontEnumProperties);
- size_t numCacheableSlots = 0;
- if (!o->structure()->hasNonEnumerableProperties() && !o->structure()->hasGetterSetterProperties()
- && !o->structure()->isUncacheableDictionary() && !o->structure()->typeInfo().overridesGetPropertyNames())
- numCacheableSlots = propertyNames.numCacheableSlots();
-
- JSPropertyNameIterator* jsPropertyNameIterator = new (NotNull, allocateCell<JSPropertyNameIterator>(vm.heap)) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots);
- jsPropertyNameIterator->finishCreation(vm, propertyNames.data(), o);
-
- if (o->structure()->isDictionary())
- return jsPropertyNameIterator;
-
- if (o->structure()->typeInfo().overridesGetPropertyNames())
- return jsPropertyNameIterator;
-
- if (hasIndexedProperties(o->indexingType()))
- return jsPropertyNameIterator;
-
- size_t count = normalizePrototypeChain(exec, o);
- StructureChain* structureChain = o->structure()->prototypeChain(exec);
- WriteBarrier<Structure>* structure = structureChain->head();
- for (size_t i = 0; i < count; ++i) {
- if (structure[i]->typeInfo().overridesGetPropertyNames())
- return jsPropertyNameIterator;
- }
-
- jsPropertyNameIterator->setCachedPrototypeChain(vm, structureChain);
- jsPropertyNameIterator->setCachedStructure(vm, o->structure());
- o->structure()->setEnumerationCache(vm, jsPropertyNameIterator);
- return jsPropertyNameIterator;
-}
-
-void JSPropertyNameIterator::destroy(JSCell* cell)
-{
- static_cast<JSPropertyNameIterator*>(cell)->JSPropertyNameIterator::~JSPropertyNameIterator();
-}
-
-JSValue JSPropertyNameIterator::get(ExecState* exec, JSObject* base, size_t i)
-{
- JSValue identifier = m_jsStrings[i].get();
- if (m_cachedStructure.get() == base->structure() && m_cachedPrototypeChain.get() == base->structure()->prototypeChain(exec))
- return identifier;
-
- if (!base->hasProperty(exec, Identifier(exec, asString(identifier)->value(exec))))
- return JSValue();
- return identifier;
-}
-
-void JSPropertyNameIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
- JSPropertyNameIterator* thisObject = jsCast<JSPropertyNameIterator*>(cell);
- ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
- visitor.appendValues(thisObject->m_jsStrings.get(), thisObject->m_jsStringsSize);
- visitor.append(&thisObject->m_cachedPrototypeChain);
-}
-
-} // namespace JSC
Deleted: branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/JSPropertyNameIterator.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -1,120 +0,0 @@
-/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef JSPropertyNameIterator_h
-#define JSPropertyNameIterator_h
-
-#include "JSObject.h"
-#include "JSString.h"
-#include "PropertyNameArray.h"
-#include <memory>
-
-namespace JSC {
-
- class Identifier;
- class JSObject;
- class LLIntOffsetsExtractor;
-
- class JSPropertyNameIterator : public JSCell {
- friend class JIT;
-
- public:
- typedef JSCell Base;
-
- static JSPropertyNameIterator* create(ExecState*, JSObject*);
-
- static const bool needsDestruction = true;
- static const bool hasImmortalStructure = true;
- static void destroy(JSCell*);
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- return Structure::create(vm, globalObject, prototype, TypeInfo(CellType, StructureFlags), info());
- }
-
- static void visitChildren(JSCell*, SlotVisitor&);
-
- JSValue get(ExecState*, JSObject*, size_t i);
- size_t size() { return m_jsStringsSize; }
-
- void setCachedStructure(VM& vm, Structure* structure)
- {
- ASSERT(!m_cachedStructure);
- ASSERT(structure);
- m_cachedStructure.set(vm, this, structure);
- }
- Structure* cachedStructure() { return m_cachedStructure.get(); }
-
- void setCachedPrototypeChain(VM& vm, StructureChain* cachedPrototypeChain) { m_cachedPrototypeChain.set(vm, this, cachedPrototypeChain); }
- StructureChain* cachedPrototypeChain() { return m_cachedPrototypeChain.get(); }
-
- DECLARE_EXPORT_INFO;
-
- protected:
- static const unsigned StructureFlags = OverridesVisitChildren | StructureIsImmortal;
-
- void finishCreation(VM& vm, PropertyNameArrayData* propertyNameArrayData, JSObject* object)
- {
- Base::finishCreation(vm);
- PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector();
- for (size_t i = 0; i < m_jsStringsSize; ++i)
- m_jsStrings[i].set(vm, this, jsOwnedString(&vm, propertyNameVector[i].string()));
- m_cachedStructureInlineCapacity = object->structure()->inlineCapacity();
- }
-
- private:
- friend class LLIntOffsetsExtractor;
-
- JSPropertyNameIterator(ExecState*, PropertyNameArrayData* propertyNameArrayData, size_t numCacheableSlot);
-
- WriteBarrier<Structure> m_cachedStructure;
- WriteBarrier<StructureChain> m_cachedPrototypeChain;
- uint32_t m_numCacheableSlots;
- uint32_t m_jsStringsSize;
- unsigned m_cachedStructureInlineCapacity;
- std::unique_ptr<WriteBarrier<Unknown>[]> m_jsStrings;
- };
-
- ALWAYS_INLINE JSPropertyNameIterator* Register::propertyNameIterator() const
- {
- return jsCast<JSPropertyNameIterator*>(jsValue().asCell());
- }
-
- inline JSPropertyNameIterator* StructureRareData::enumerationCache()
- {
- return m_enumerationCache.get();
- }
-
- inline void StructureRareData::setEnumerationCache(VM& vm, const Structure*, JSPropertyNameIterator* value)
- {
- m_enumerationCache.set(vm, this, value);
- }
-
-} // namespace JSC
-
-#endif // JSPropertyNameIterator_h
Modified: branches/ftlopt/Source/_javascript_Core/runtime/Structure.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/Structure.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/Structure.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -716,8 +716,6 @@
PropertyOffset Structure::addPropertyWithoutTransition(VM& vm, PropertyName propertyName, unsigned attributes)
{
- ASSERT(!enumerationCache());
-
DeferGC deferGC(vm.heap);
materializePropertyMapIfNecessaryForPinning(vm, deferGC);
@@ -729,7 +727,6 @@
PropertyOffset Structure::removePropertyWithoutTransition(VM& vm, PropertyName propertyName)
{
ASSERT(isUncacheableDictionary());
- ASSERT(!enumerationCache());
DeferGC deferGC(vm.heap);
materializePropertyMapIfNecessaryForPinning(vm, deferGC);
Modified: branches/ftlopt/Source/_javascript_Core/runtime/Structure.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/Structure.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/Structure.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -281,9 +281,6 @@
return !JSC::isValidOffset(m_offset);
}
- void setEnumerationCache(VM&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h.
- JSPropertyNameIterator* enumerationCache(); // Defined in JSPropertyNameIterator.h.
-
void setCachedStructurePropertyNameEnumerator(VM&, JSPropertyNameEnumerator*);
void setCachedGenericPropertyNameEnumerator(VM&, JSPropertyNameEnumerator*);
JSPropertyNameEnumerator* cachedStructurePropertyNameEnumerator() const;
Modified: branches/ftlopt/Source/_javascript_Core/runtime/StructureInlines.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/StructureInlines.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/StructureInlines.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -130,21 +130,6 @@
return false;
}
-inline void Structure::setEnumerationCache(VM& vm, JSPropertyNameIterator* enumerationCache)
-{
- ASSERT(!isDictionary());
- if (!hasRareData())
- allocateRareData(vm);
- rareData()->setEnumerationCache(vm, this, enumerationCache);
-}
-
-inline JSPropertyNameIterator* Structure::enumerationCache()
-{
- if (!hasRareData())
- return 0;
- return rareData()->enumerationCache();
-}
-
inline JSValue Structure::prototypeForLookup(JSGlobalObject* globalObject) const
{
if (isObject())
Modified: branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -27,7 +27,6 @@
#include "StructureRareData.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "JSString.h"
#include "JSCInlines.h"
@@ -68,7 +67,6 @@
JSCell::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_previous);
visitor.append(&thisObject->m_objectToStringValue);
- visitor.append(&thisObject->m_enumerationCache);
visitor.append(&thisObject->m_cachedStructurePropertyNameEnumerator);
visitor.append(&thisObject->m_cachedGenericPropertyNameEnumerator);
}
Modified: branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.h (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.h 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/StructureRareData.h 2014-07-25 21:26:20 UTC (rev 171614)
@@ -34,7 +34,6 @@
namespace JSC {
class JSPropertyNameEnumerator;
-class JSPropertyNameIterator;
class Structure;
class StructureRareData : public JSCell {
@@ -57,9 +56,6 @@
JSString* objectToStringValue() const;
void setObjectToStringValue(VM&, const JSCell* owner, JSString* value);
- JSPropertyNameIterator* enumerationCache();
- void setEnumerationCache(VM&, const Structure* owner, JSPropertyNameIterator* value);
-
DECLARE_EXPORT_INFO;
JSPropertyNameEnumerator* cachedStructurePropertyNameEnumerator() const;
@@ -76,7 +72,6 @@
WriteBarrier<Structure> m_previous;
WriteBarrier<JSString> m_objectToStringValue;
- WriteBarrier<JSPropertyNameIterator> m_enumerationCache;
WriteBarrier<JSPropertyNameEnumerator> m_cachedStructurePropertyNameEnumerator;
WriteBarrier<JSPropertyNameEnumerator> m_cachedGenericPropertyNameEnumerator;
Modified: branches/ftlopt/Source/_javascript_Core/runtime/VM.cpp (171613 => 171614)
--- branches/ftlopt/Source/_javascript_Core/runtime/VM.cpp 2014-07-25 20:55:17 UTC (rev 171613)
+++ branches/ftlopt/Source/_javascript_Core/runtime/VM.cpp 2014-07-25 21:26:20 UTC (rev 171614)
@@ -65,7 +65,6 @@
#include "JSPromiseDeferred.h"
#include "JSPromiseReaction.h"
#include "JSPropertyNameEnumerator.h"
-#include "JSPropertyNameIterator.h"
#include "JSWithScope.h"
#include "Lexer.h"
#include "Lookup.h"
@@ -258,7 +257,6 @@
terminatedExecutionErrorStructure.set(*this, TerminatedExecutionError::createStructure(*this, 0, jsNull()));
stringStructure.set(*this, JSString::createStructure(*this, 0, jsNull()));
notAnObjectStructure.set(*this, JSNotAnObject::createStructure(*this, 0, jsNull()));
- propertyNameIteratorStructure.set(*this, JSPropertyNameIterator::createStructure(*this, 0, jsNull()));
propertyNameEnumeratorStructure.set(*this, JSPropertyNameEnumerator::createStructure(*this, 0, jsNull()));
getterSetterStructure.set(*this, GetterSetter::createStructure(*this, 0, jsNull()));
apiWrapperStructure.set(*this, JSAPIValueWrapper::createStructure(*this, 0, jsNull()));