runtime/IntendedStructureChain.cpp
runtime/InternalFunction.cpp
runtime/JSAPIValueWrapper.cpp
- runtime/JSActivation.cpp
+ runtime/JSLexicalEnvironment.cpp
runtime/JSArgumentsIterator.cpp
runtime/JSArray.cpp
runtime/JSArrayBuffer.cpp
+2014-09-11 Oliver Hunt <oliver@apple.com>
+
+ Rename activation to be more in line with spec language
+ https://bugs.webkit.org/show_bug.cgi?id=136721
+
+ Reviewed by Michael Saboff.
+
+ Somewhat bigger than the last one, but still just a rename.
+
+ * CMakeLists.txt:
+ * JavaScriptCore.order:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
+ * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
+ * JavaScriptCore.xcodeproj/project.pbxproj:
+ * bytecode/BytecodeList.json:
+ * bytecode/BytecodeUseDef.h:
+ (JSC::computeUsesForBytecodeOffset):
+ (JSC::computeDefsForBytecodeOffset):
+ * bytecode/CallVariant.h:
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::CodeBlock):
+ (JSC::CodeBlock::finalizeUnconditionally):
+ (JSC::CodeBlock::isCaptured):
+ (JSC::CodeBlock::nameForRegister):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::setActivationRegister):
+ (JSC::CodeBlock::activationRegister):
+ (JSC::CodeBlock::uncheckedActivationRegister):
+ (JSC::CodeBlock::needsActivation):
+ * bytecode/Instruction.h:
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedCodeBlock::setActivationRegister):
+ (JSC::UnlinkedCodeBlock::activationRegister):
+ (JSC::UnlinkedCodeBlock::hasActivationRegister):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::emitReturn):
+ * bytecompiler/BytecodeGenerator.h:
+ * debugger/DebuggerCallFrame.cpp:
+ (JSC::DebuggerCallFrame::scope):
+ * debugger/DebuggerScope.cpp:
+ (JSC::DebuggerScope::isFunctionOrEvalScope):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ * dfg/DFGCapabilities.cpp:
+ (JSC::DFG::capabilityLevel):
+ * dfg/DFGGraph.cpp:
+ (JSC::DFG::Graph::tryGetActivation):
+ (JSC::DFG::Graph::tryGetRegisters):
+ * dfg/DFGGraph.h:
+ * dfg/DFGNodeType.h:
+ * dfg/DFGOperations.cpp:
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * interpreter/CallFrame.cpp:
+ (JSC::CallFrame::lexicalEnvironment):
+ (JSC::CallFrame::setActivation):
+ (JSC::CallFrame::activation): Deleted.
+ * interpreter/CallFrame.h:
+ * interpreter/Interpreter.cpp:
+ (JSC::unwindCallFrame):
+ * interpreter/Register.h:
+ * jit/JIT.cpp:
+ (JSC::JIT::privateCompileMainPass):
+ * jit/JIT.h:
+ * jit/JITOpcodes.cpp:
+ (JSC::JIT::emit_op_tear_off_lexical_environment):
+ (JSC::JIT::emit_op_tear_off_arguments):
+ (JSC::JIT::emit_op_create_lexical_environment):
+ (JSC::JIT::emit_op_tear_off_activation): Deleted.
+ (JSC::JIT::emit_op_create_activation): Deleted.
+ * jit/JITOpcodes32_64.cpp:
+ (JSC::JIT::emit_op_tear_off_lexical_environment):
+ (JSC::JIT::emit_op_tear_off_arguments):
+ (JSC::JIT::emit_op_create_lexical_environment):
+ (JSC::JIT::emit_op_tear_off_activation): Deleted.
+ (JSC::JIT::emit_op_create_activation): Deleted.
+ * jit/JITOperations.cpp:
+ * jit/JITOperations.h:
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * llint/LLIntSlowPaths.h:
+ * llint/LowLevelInterpreter32_64.asm:
+ * llint/LowLevelInterpreter64.asm:
+ * runtime/Arguments.cpp:
+ (JSC::Arguments::visitChildren):
+ (JSC::Arguments::tearOff):
+ (JSC::Arguments::didTearOffActivation):
+ * runtime/Arguments.h:
+ (JSC::Arguments::offsetOfActivation):
+ (JSC::Arguments::argument):
+ (JSC::Arguments::finishCreation):
+ * runtime/CommonSlowPaths.cpp:
+ * runtime/JSFunction.h:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::reset):
+ (JSC::JSGlobalObject::visitChildren):
+ * runtime/JSGlobalObject.h:
+ (JSC::JSGlobalObject::activationStructure):
+ * runtime/JSLexicalEnvironment.cpp: Renamed from Source/JavaScriptCore/runtime/JSActivation.cpp.
+ (JSC::JSLexicalEnvironment::visitChildren):
+ (JSC::JSLexicalEnvironment::symbolTableGet):
+ (JSC::JSLexicalEnvironment::symbolTablePut):
+ (JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):
+ (JSC::JSLexicalEnvironment::symbolTablePutWithAttributes):
+ (JSC::JSLexicalEnvironment::getOwnPropertySlot):
+ (JSC::JSLexicalEnvironment::put):
+ (JSC::JSLexicalEnvironment::deleteProperty):
+ (JSC::JSLexicalEnvironment::toThis):
+ (JSC::JSLexicalEnvironment::argumentsGetter):
+ * runtime/JSLexicalEnvironment.h: Renamed from Source/JavaScriptCore/runtime/JSActivation.h.
+ (JSC::JSLexicalEnvironment::create):
+ (JSC::JSLexicalEnvironment::createStructure):
+ (JSC::JSLexicalEnvironment::JSLexicalEnvironment):
+ (JSC::asActivation):
+ (JSC::Register::lexicalEnvironment):
+ (JSC::JSLexicalEnvironment::registersOffset):
+ (JSC::JSLexicalEnvironment::tearOff):
+ (JSC::JSLexicalEnvironment::isTornOff):
+ (JSC::JSLexicalEnvironment::storageOffset):
+ (JSC::JSLexicalEnvironment::storage):
+ (JSC::JSLexicalEnvironment::allocationSize):
+ (JSC::JSLexicalEnvironment::isValidIndex):
+ (JSC::JSLexicalEnvironment::isValid):
+ (JSC::JSLexicalEnvironment::registerAt):
+ * runtime/JSObject.h:
+ * runtime/JSScope.cpp:
+ (JSC::abstractAccess):
+ * runtime/JSScope.h:
+ (JSC::ResolveOp::ResolveOp):
+ * runtime/JSSymbolTableObject.cpp:
+ * runtime/StrictEvalActivation.h:
+ (JSC::StrictEvalActivation::create):
+ * runtime/VM.cpp:
+
2014-09-11 László Langó <llango.u-szeged@partner.samsung.com>
[JavaScriptCore] Fix FTL on platform EFL.
__ZN3WTF9HashTableINSt3__14pairIPN3JSC8JSObjectEjEENS_12KeyValuePairIS6_NS3_4WeakINS3_9StructureEEEEENS_24KeyValuePairKeyExtractorISB_EENS_8PairHashIS5_jEENS_18HashMapValueTraitsINS_10HashTraitsIS6_EENSH_ISA_EEEESI_E3addINS_17HashMapTranslatorISK_SF_EES6_NS3_8PassWeakIS9_EEEENS_18HashTableAddResultINS_17HashTableIteratorIS6_SB_SD_SF_SK_SI_EEEERKT0_RKT1_
__ZN3WTF9HashTableINSt3__14pairIPN3JSC8JSObjectEjEENS_12KeyValuePairIS6_NS3_4WeakINS3_9StructureEEEEENS_24KeyValuePairKeyExtractorISB_EENS_8PairHashIS5_jEENS_18HashMapValueTraitsINS_10HashTraitsIS6_EENSH_ISA_EEEESI_E6lookupINS_22IdentityHashTranslatorISF_EES6_EEPSB_RKT0_
__ZN3WTF9HashTableINSt3__14pairIPN3JSC8JSObjectEjEENS_12KeyValuePairIS6_NS3_4WeakINS3_9StructureEEEEENS_24KeyValuePairKeyExtractorISB_EENS_8PairHashIS5_jEENS_18HashMapValueTraitsINS_10HashTraitsIS6_EENSH_ISA_EEEESI_E6rehashEi
-__ZN3JSC12JSActivation6createERNS_2VMEPNS_9ExecStateEPNS_9CodeBlockE
__ZNK3JSC7JSValue3getEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE
__ZNK3JSC19BracketAccessorNode10isLocationEv
__ZNK3JSC19BracketAccessorNode21isBracketAccessorNodeEv
__ZN3JSC17AssignBracketNode12emitBytecodeERNS_17BytecodeGeneratorEPNS_10RegisterIDE
__ZN3JSC17BytecodeGenerator12emitPutByValEPNS_10RegisterIDES2_S2_
__ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEPNS_6RegExpE
-__ZN3JSC12JSActivation18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE
-__ZN3JSC12JSActivation14symbolTableGetENS_12PropertyNameERNS_12PropertySlotE
__ZN3JSC17ObjectConstructor18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE
__ZN3JSC21getStaticFunctionSlotINS_8JSObjectEEEbPNS_9ExecStateEPKNS_9HashTableEPS1_NS_12PropertyNameERNS_12PropertySlotE
__ZN3JSC14ArrayPrototype18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameERNS_12PropertySlotE
__ZN3JSC9CodeBlock29stronglyVisitStrongReferencesERNS_11SlotVisitorE
__ZN3JSC13EvalCodeCache14visitAggregateERNS_11SlotVisitorE
__ZN3JSC9CodeBlock27stronglyVisitWeakReferencesERNS_11SlotVisitorE
-__ZN3JSC12JSActivation13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC9CodeBlock31performTracingFixpointIterationERNS_11SlotVisitorE
__ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC18RegExpMatchesArray13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC22jsMakeNontrivialStringIPKcN3WTF6StringES2_S4_S2_S4_EENS_7JSValueEPNS_9ExecStateET_T0_T1_T2_T3_T4_
__ZN3WTF13tryMakeStringIPKcNS_6StringES2_S3_S2_S3_EENS_10PassRefPtrINS_10StringImplEEET_T0_T1_T2_T3_T4_
__ZN3JSC4Yarr12ByteCompiler26alternativeBodyDisjunctionEb
-__ZN3JSC9Arguments20didTearOffActivationEPNS_9ExecStateEPNS_12JSActivationE
__ZN3JSC3JIT24emit_op_create_argumentsEPNS_11InstructionE
__ZN3JSC3JIT16emit_op_new_funcEPNS_11InstructionE
_cti_op_create_arguments
__ZN3JSC3DFG12GPRTemporaryC1EPNS0_14SpeculativeJITERNS0_23SpeculateIntegerOperandE
__ZN3JSC3DFG12GPRTemporaryC2EPNS0_14SpeculativeJITERNS0_23SpeculateIntegerOperandE
__ZN3JSC23MacroAssemblerX86Common9compare32ENS0_19RelationalConditionENS_12X86Registers10RegisterIDENS_22AbstractMacroAssemblerINS_12X86AssemblerEE12TrustedImm32ES3_
-__ZN3JSC12JSActivation3putEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE
-__ZN3JSC12JSActivation14symbolTablePutEPNS_9ExecStateENS_12PropertyNameENS_7JSValueEb
_cti_op_mod
__ZN3JSC3DFG14SpeculativeJIT21compileObjectEqualityEPNS0_4NodeE
__ZN3JSCL24dateProtoFuncToUTCStringEPNS_9ExecStateE
__ZN3WTF5DequeINS_19FunctionWithContextELm0EE6removeEm
__ZN3JSC17BytecodeGenerator20emitLoadGlobalObjectEPNS_10RegisterIDE
__ZN3JSC4Yarr13YarrGeneratorILNS0_18YarrJITCompileModeE1EE29generatePatternCharacterFixedEm
-__ZN3JSC12JSActivation15argumentsGetterEPNS_9ExecStateENS_7JSValueENS_12PropertyNameE
__ZN3JSCL21dateProtoFuncSetMonthEPNS_9ExecStateE
_operationCompareLess
__ZN3JSCL23dateProtoFuncSetUTCDateEPNS_9ExecStateE
__ZN3JSC17BytecodeGenerator35emitThrowExpressionTooDeepExceptionEv
__ZN3JSC22createOutOfMemoryErrorEPNS_14JSGlobalObjectE
__ZN3JSCL17mathProtoFuncACosEPNS_9ExecStateE
-__ZN3JSC12JSActivation14deletePropertyEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameE
__ZN3JSC11JSNameScope3putEPNS_6JSCellEPNS_9ExecStateENS_12PropertyNameENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC14symbolTablePutINS_11JSNameScopeEEEbPT_PNS_9ExecStateENS_12PropertyNameENS_7JSValueEb
__ZN3JSC15NameConstructor11getCallDataEPNS_6JSCellERNS_8CallDataE
<ClCompile Include="..\runtime\IntendedStructureChain.cpp" />
<ClCompile Include="..\runtime\InternalFunction.cpp" />
<ClCompile Include="..\runtime\JSAPIValueWrapper.cpp" />
- <ClCompile Include="..\runtime\JSActivation.cpp" />
+ <ClCompile Include="..\runtime\JSLexicalEnvironment.cpp" />
<ClCompile Include="..\runtime\JSArgumentsIterator.cpp" />
<ClCompile Include="..\runtime\JSArray.cpp" />
<ClCompile Include="..\runtime\JSArrayIterator.cpp" />
<ClInclude Include="..\runtime\InternalFunction.h" />
<ClInclude Include="..\runtime\Intrinsic.h" />
<ClInclude Include="..\runtime\JSAPIValueWrapper.h" />
- <ClInclude Include="..\runtime\JSActivation.h" />
+ <ClInclude Include="..\runtime\JSLexicalEnvironment.h" />
<ClInclude Include="..\runtime\JSArgumentsIterator.h" />
<ClInclude Include="..\runtime\JSArray.h" />
<ClInclude Include="..\runtime\JSArrayBuffer.h" />
<ClCompile Include="..\runtime\InternalFunction.cpp">
<Filter>runtime</Filter>
</ClCompile>
- <ClCompile Include="..\runtime\JSActivation.cpp">
+ <ClCompile Include="..\runtime\JSLexicalEnvironment.cpp">
<Filter>runtime</Filter>
</ClCompile>
<ClCompile Include="..\runtime\JSAPIValueWrapper.cpp">
<ClInclude Include="..\runtime\Intrinsic.h">
<Filter>runtime</Filter>
</ClInclude>
- <ClInclude Include="..\runtime\JSActivation.h">
+ <ClInclude Include="..\runtime\JSLexicalEnvironment.h">
<Filter>runtime</Filter>
</ClInclude>
<ClInclude Include="..\runtime\JSAPIValueWrapper.h">
0FFFC96014EF90BD00C72532 /* DFGVirtualRegisterAllocationPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FFFC95414EF909500C72532 /* DFGVirtualRegisterAllocationPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC0894D50FAFBA2D00001865 /* JSAPIValueWrapper.cpp */; };
140566D6107EC271005DBC8D /* JSFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A85E0255597D01FF60F7 /* JSFunction.cpp */; };
- 140B7D1D0DC69AF7009C42B8 /* JSActivation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DA818F0D99FD2000B0A4FB /* JSActivation.cpp */; };
+ 140B7D1D0DC69AF7009C42B8 /* JSLexicalEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */; };
140D17D70E8AD4A9000CD17D /* JSBasePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 140D17D60E8AD4A9000CD17D /* JSBasePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
141211310A48794D00480255 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 932F5BD90822A1C700736975 /* JavaScriptCore.framework */; };
141211340A48795800480255 /* minidom.c in Sources */ = {isa = PBXBuildFile; fileRef = 141211020A48780900480255 /* minidom.c */; };
554076FB18DA58AD00EFF7F2 /* IntendedStructureChain.h in Headers */ = {isa = PBXBuildFile; fileRef = A78853F817972629001440E4 /* IntendedStructureChain.h */; };
554076FC18DA58AD00EFF7F2 /* InternalFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = BC11667A0E199C05008066DD /* InternalFunction.h */; };
554076FE18DA58AD00EFF7F2 /* Intrinsic.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BF642A148DB2B5004DE36A /* Intrinsic.h */; };
- 5540771818DA58AD00EFF7F2 /* JSActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA818E0D99FD2000B0A4FB /* JSActivation.h */; settings = {ATTRIBUTES = (); }; };
+ 5540771818DA58AD00EFF7F2 /* JSLexicalEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */; settings = {ATTRIBUTES = (); }; };
5540771918DA58AD00EFF7F2 /* JSAPIValueWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = BC0894D60FAFBA2D00001865 /* JSAPIValueWrapper.h */; };
5540771B18DA58AD00EFF7F2 /* JSArgumentsIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = A76140CC182982CB00750624 /* JSArgumentsIterator.h */; };
5540771C18DA58AD00EFF7F2 /* JSArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* JSArray.h */; };
BC18C4130E16F5CD00B34460 /* JavaScript.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAA8B4A0D32C39A0041BCFF /* JavaScript.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CAA8B4B0D32C39A0041BCFF /* JavaScriptCore.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */; };
- BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA818E0D99FD2000B0A4FB /* JSActivation.h */; settings = {ATTRIBUTES = (); }; };
+ BC18C4160E16F5CD00B34460 /* JSLexicalEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */; settings = {ATTRIBUTES = (); }; };
BC18C4170E16F5CD00B34460 /* JSArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 938772E5038BFE19008635CE /* JSArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
BC18C4180E16F5CD00B34460 /* JSBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 142711380A460BBB0080EEEA /* JSBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
BC18C4190E16F5CD00B34460 /* JSCallbackConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1440F8AC0A508D200005F061 /* JSCallbackConstructor.h */; };
14D844A216AA2C7000A65AF0 /* PrototypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrototypeMap.cpp; sourceTree = "<group>"; };
14D844A316AA2C7000A65AF0 /* PrototypeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrototypeMap.h; sourceTree = "<group>"; };
14D857740A4696C80032146C /* testapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = testapi.js; path = API/tests/testapi.js; sourceTree = "<group>"; };
- 14DA818E0D99FD2000B0A4FB /* JSActivation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSActivation.h; sourceTree = "<group>"; };
- 14DA818F0D99FD2000B0A4FB /* JSActivation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSActivation.cpp; sourceTree = "<group>"; };
+ 14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSLexicalEnvironment.h; sourceTree = "<group>"; };
+ 14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSLexicalEnvironment.cpp; sourceTree = "<group>"; };
14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = JSGlobalObject.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
14DF04D916B3996D0016A513 /* StaticPropertyAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StaticPropertyAnalysis.h; sourceTree = "<group>"; };
14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WeakBlock.cpp; sourceTree = "<group>"; };
BC9BB95B0E19680600DF8855 /* InternalFunction.cpp */,
BC11667A0E199C05008066DD /* InternalFunction.h */,
86BF642A148DB2B5004DE36A /* Intrinsic.h */,
- 14DA818F0D99FD2000B0A4FB /* JSActivation.cpp */,
- 14DA818E0D99FD2000B0A4FB /* JSActivation.h */,
+ 14DA818F0D99FD2000B0A4FB /* JSLexicalEnvironment.cpp */,
+ 14DA818E0D99FD2000B0A4FB /* JSLexicalEnvironment.h */,
A76140CB182982CB00750624 /* JSArgumentsIterator.cpp */,
A76140CC182982CB00750624 /* JSArgumentsIterator.h */,
93ADFCE60CCBD7AC00D30B08 /* JSArray.cpp */,
554075DA18DA58AD00EFF7F2 /* DatePrototype.h in Headers */,
5540767118DA58AD00EFF7F2 /* ErrorConstructor.h in Headers */,
5540769118DA58AD00EFF7F2 /* ConsolePrototype.h in Headers */,
- 5540771818DA58AD00EFF7F2 /* JSActivation.h in Headers */,
+ 5540771818DA58AD00EFF7F2 /* JSLexicalEnvironment.h in Headers */,
5540771B18DA58AD00EFF7F2 /* JSArgumentsIterator.h in Headers */,
5540772218DA58AD00EFF7F2 /* JSArrayIterator.h in Headers */,
5540774818DA58AD00EFF7F2 /* JSGlobalObjectDebuggable.h in Headers */,
0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,
0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */,
A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
- BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */,
+ BC18C4160E16F5CD00B34460 /* JSLexicalEnvironment.h in Headers */,
840480131021A1D9008E7F01 /* JSAPIValueWrapper.h in Headers */,
0F3B7E2919A11B8000D9BC56 /* CallEdgeProfileInlines.h in Headers */,
C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */,
14A23D750F4E1ABB0023CDAD /* JITStubs.cpp in Sources */,
0F5EF91E16878F7A003E5C25 /* JITThunks.cpp in Sources */,
0FC712E217CD8791008CC93C /* JITToDFGDeferredCompilationCallback.cpp in Sources */,
- 140B7D1D0DC69AF7009C42B8 /* JSActivation.cpp in Sources */,
+ 140B7D1D0DC69AF7009C42B8 /* JSLexicalEnvironment.cpp in Sources */,
140566C4107EC255005DBC8D /* JSAPIValueWrapper.cpp in Sources */,
C2CF39C116E15A8100DD69BE /* JSAPIWrapperObject.mm in Sources */,
A76140D1182982CB00750624 /* JSArgumentsIterator.cpp in Sources */,
"macroNameComponent" : "BYTECODE", "asmPrefix" : "llint_",
"bytecodes" : [
{ "name" : "op_enter", "length" : 1 },
- { "name" : "op_create_activation", "length" : 2 },
+ { "name" : "op_create_lexical_environment", "length" : 2 },
{ "name" : "op_touch_entry", "length" : 1 },
{ "name" : "op_init_lazy_reg", "length" : 2 },
{ "name" : "op_create_arguments", "length" : 2 },
{ "name" : "op_call", "length" : 9 },
{ "name" : "op_call_eval", "length" : 9 },
{ "name" : "op_call_varargs", "length" : 9 },
- { "name" : "op_tear_off_activation", "length" : 2 },
+ { "name" : "op_tear_off_lexical_environment", "length" : 2 },
{ "name" : "op_tear_off_arguments", "length" : 3 },
{ "name" : "op_ret", "length" : 2 },
{ "name" : "op_ret_object_or_this", "length" : 3 },
return;
case op_new_func:
case op_new_captured_func:
- case op_create_activation:
+ case op_create_lexical_environment:
case op_create_arguments:
case op_to_this:
- case op_tear_off_activation:
+ case op_tear_off_lexical_environment:
case op_profile_will_call:
case op_profile_did_call:
case op_profile_type:
case op_next_enumerator_pname:
case op_resolve_scope:
case op_strcat:
- case op_tear_off_activation:
+ case op_tear_off_lexical_environment:
case op_to_primitive:
case op_catch:
case op_create_this:
case op_to_this:
case op_get_callee:
case op_init_lazy_reg:
- case op_create_activation:
+ case op_create_lexical_environment:
case op_create_arguments:
case op_del_by_id:
case op_del_by_val:
// callee in one of the following four forms:
//
// JSFunction callee: This means that we expect the callsite to always call a particular function
-// instance, that is associated with a particular activation. This pinpoints not just the code
-// that will be called (i.e. the executable) but also the scope within which the code runs.
+// instance, that is associated with a particular lexical environment. This pinpoints not
+// just the code that will be called (i.e. the executable) but also the scope within which
+// the code runs.
//
// Executable callee: This corresponds to a call to a closure. In this case, we know that the
// callsite will call a JSFunction, but we do not know which particular JSFunction. We do know
#include "Interpreter.h"
#include "JIT.h"
#include "JITStubs.h"
-#include "JSActivation.h"
#include "JSCJSValue.h"
#include "JSFunction.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "LLIntEntrypoint.h"
#include "LowLevelInterpreter.h"
unmodifiedArgumentsRegister(argumentsRegister()).offset());
}
if (needsActivation() && codeType() == FunctionCode)
- out.printf("; activation in r%d", activationRegister().offset());
+ out.printf("; lexical environment in r%d", activationRegister().offset());
out.printf("\n");
StubInfoMap stubInfos;
printLocationAndOp(out, exec, location, it, "touch_entry");
break;
}
- case op_create_activation: {
+ case op_create_lexical_environment: {
int r0 = (++it)->u.operand;
- printLocationOpAndRegisterOperand(out, exec, location, it, "create_activation", r0);
+ printLocationOpAndRegisterOperand(out, exec, location, it, "create_lexical_environment", r0);
break;
}
case op_create_arguments: {
break;
}
- case op_tear_off_activation: {
+ case op_tear_off_lexical_environment: {
int r0 = (++it)->u.operand;
- printLocationOpAndRegisterOperand(out, exec, location, it, "tear_off_activation", r0);
+ printLocationOpAndRegisterOperand(out, exec, location, it, "tear_off_lexical_environment", r0);
break;
}
case op_tear_off_arguments: {
, m_instructions(other.m_instructions)
, m_thisRegister(other.m_thisRegister)
, m_argumentsRegister(other.m_argumentsRegister)
- , m_activationRegister(other.m_activationRegister)
+ , m_lexicalEnvironmentRegister(other.m_lexicalEnvironmentRegister)
, m_isStrictMode(other.m_isStrictMode)
, m_needsActivation(other.m_needsActivation)
, m_mayBeExecuting(false)
, m_vm(unlinkedCodeBlock->vm())
, m_thisRegister(unlinkedCodeBlock->thisRegister())
, m_argumentsRegister(unlinkedCodeBlock->argumentsRegister())
- , m_activationRegister(unlinkedCodeBlock->activationRegister())
+ , m_lexicalEnvironmentRegister(unlinkedCodeBlock->activationRegister())
, m_isStrictMode(unlinkedCodeBlock->isStrictMode())
, m_needsActivation(unlinkedCodeBlock->hasActivationRegister() && unlinkedCodeBlock->codeType() == FunctionCode)
, m_mayBeExecuting(false)
ResolveOp op = JSScope::abstractResolve(m_globalObject->globalExec(), needsActivation(), scope, ident, Get, type);
instructions[i + 3].u.operand = op.type;
instructions[i + 4].u.operand = op.depth;
- if (op.activation)
- instructions[i + 5].u.activation.set(*vm(), ownerExecutable, op.activation);
+ if (op.lexicalEnvironment)
+ instructions[i + 5].u.lexicalEnvironment.set(*vm(), ownerExecutable, op.lexicalEnvironment);
break;
}
// FIXME: handle other values for op.type here, and also consider what to do when we can't statically determine the globalID
// https://bugs.webkit.org/show_bug.cgi?id=135184
if (op.type == ClosureVar)
- symbolTable = op.activation->symbolTable();
+ symbolTable = op.lexicalEnvironment->symbolTable();
else if (op.type == GlobalVar)
symbolTable = m_globalObject.get()->symbolTable();
curInstruction[2].u.jsCell.clear();
break;
case op_resolve_scope: {
- WriteBarrierBase<JSActivation>& activation = curInstruction[5].u.activation;
- if (!activation || Heap::isMarked(activation.get()))
+ WriteBarrierBase<JSLexicalEnvironment>& lexicalEnvironment = curInstruction[5].u.lexicalEnvironment;
+ if (!lexicalEnvironment || Heap::isMarked(lexicalEnvironment.get()))
break;
if (Options::verboseOSR())
- dataLogF("Clearing dead activation %p.\n", activation.get());
- activation.clear();
+ dataLogF("Clearing dead lexicalEnvironment %p.\n", lexicalEnvironment.get());
+ lexicalEnvironment.clear();
break;
}
case op_get_from_scope:
if (inlineCallFrame)
return inlineCallFrame->capturedVars.get(operand.toLocal());
- // The activation object isn't in the captured region, but it's "captured"
+ // The lexical environment object isn't in the captured region, but it's "captured"
// in the sense that stores to its location can be observed indirectly.
if (needsActivation() && operand == activationRegister())
return true;
}
}
if (needsActivation() && virtualRegister == activationRegister())
- return ASCIILiteral("activation");
+ return ASCIILiteral("lexical environment");
if (virtualRegister == thisRegister())
return ASCIILiteral("this");
if (usesArguments()) {
}
void setActivationRegister(VirtualRegister activationRegister)
{
- m_activationRegister = activationRegister;
+ m_lexicalEnvironmentRegister = activationRegister;
}
VirtualRegister activationRegister() const
{
- ASSERT(m_activationRegister.isValid());
- return m_activationRegister;
+ ASSERT(m_lexicalEnvironmentRegister.isValid());
+ return m_lexicalEnvironmentRegister;
}
VirtualRegister uncheckedActivationRegister()
{
- return m_activationRegister;
+ return m_lexicalEnvironmentRegister;
}
bool usesArguments() const { return m_argumentsRegister.isValid(); }
bool needsActivation() const
{
- ASSERT(m_activationRegister.isValid() == m_needsActivation);
+ ASSERT(m_lexicalEnvironmentRegister.isValid() == m_needsActivation);
return m_needsActivation;
}
WriteBarrier<SymbolTable> m_symbolTable;
VirtualRegister m_thisRegister;
VirtualRegister m_argumentsRegister;
- VirtualRegister m_activationRegister;
+ VirtualRegister m_lexicalEnvironmentRegister;
bool m_isStrictMode;
bool m_needsActivation;
ArrayAllocationProfile* arrayAllocationProfile;
ObjectAllocationProfile* objectAllocationProfile;
VariableWatchpointSet* watchpointSet;
- WriteBarrierBase<JSActivation> activation;
+ WriteBarrierBase<JSLexicalEnvironment> lexicalEnvironment;
void* pointer;
bool* predicatePointer;
ToThisStatus toThisStatus;
// Special registers
void setThisRegister(VirtualRegister thisRegister) { m_thisRegister = thisRegister; }
- void setActivationRegister(VirtualRegister activationRegister) { m_activationRegister = activationRegister; }
+ void setActivationRegister(VirtualRegister activationRegister) { m_lexicalEnvironmentRegister = activationRegister; }
void setArgumentsRegister(VirtualRegister argumentsRegister) { m_argumentsRegister = argumentsRegister; }
bool usesArguments() const { return m_argumentsRegister.isValid(); }
CodeType codeType() const { return m_codeType; }
VirtualRegister thisRegister() const { return m_thisRegister; }
- VirtualRegister activationRegister() const { return m_activationRegister; }
- bool hasActivationRegister() const { return m_activationRegister.isValid(); }
+ VirtualRegister activationRegister() const { return m_lexicalEnvironmentRegister; }
+ bool hasActivationRegister() const { return m_lexicalEnvironmentRegister.isValid(); }
void addPropertyAccessInstruction(unsigned propertyAccessInstruction)
{
VirtualRegister m_thisRegister;
VirtualRegister m_argumentsRegister;
- VirtualRegister m_activationRegister;
+ VirtualRegister m_lexicalEnvironmentRegister;
VirtualRegister m_globalObjectRegister;
bool m_needsFullScopeChain : 1;
#include "BytecodeGenerator.h"
#include "Interpreter.h"
-#include "JSActivation.h"
#include "JSFunction.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "LowLevelInterpreter.h"
#include "JSCInlines.h"
, m_scopeNode(programNode)
, m_codeBlock(vm, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
- , m_activationRegister(0)
+ , m_lexicalEnvironmentRegister(0)
, m_emptyValueRegister(0)
, m_globalObjectRegister(0)
, m_finallyDepth(0)
, m_symbolTable(codeBlock->symbolTable())
, m_scopeNode(functionBody)
, m_codeBlock(vm, codeBlock)
- , m_activationRegister(0)
+ , m_lexicalEnvironmentRegister(0)
, m_emptyValueRegister(0)
, m_globalObjectRegister(0)
, m_finallyDepth(0)
emitOpcode(op_enter);
if (m_codeBlock->needsFullScopeChain() || m_shouldEmitDebugHooks) {
- m_activationRegister = addVar();
- emitInitLazyRegister(m_activationRegister);
- m_codeBlock->setActivationRegister(m_activationRegister->virtualRegister());
- emitOpcode(op_create_activation);
- instructions().append(m_activationRegister->index());
+ m_lexicalEnvironmentRegister = addVar();
+ emitInitLazyRegister(m_lexicalEnvironmentRegister);
+ m_codeBlock->setActivationRegister(m_lexicalEnvironmentRegister->virtualRegister());
+ emitOpcode(op_create_lexical_environment);
+ instructions().append(m_lexicalEnvironmentRegister->index());
}
m_symbolTable->setCaptureStart(virtualRegisterForLocal(m_codeBlock->m_numVars).offset());
, m_scopeNode(evalNode)
, m_codeBlock(vm, codeBlock)
, m_thisRegister(CallFrame::thisArgumentOffset())
- , m_activationRegister(0)
+ , m_lexicalEnvironmentRegister(0)
, m_emptyValueRegister(0)
, m_globalObjectRegister(0)
, m_finallyDepth(0)
RegisterID* BytecodeGenerator::emitReturn(RegisterID* src)
{
- if (m_activationRegister) {
- emitOpcode(op_tear_off_activation);
- instructions().append(m_activationRegister->index());
+ if (m_lexicalEnvironmentRegister) {
+ emitOpcode(op_tear_off_lexical_environment);
+ instructions().append(m_lexicalEnvironmentRegister->index());
}
if (m_codeBlock->usesArguments() && m_codeBlock->numParameters() != 1 && !isStrictMode()) {
emitOpcode(op_tear_off_arguments);
instructions().append(m_codeBlock->argumentsRegister().offset());
- instructions().append(m_activationRegister ? m_activationRegister->index() : emitLoad(0, JSValue())->index());
+ instructions().append(m_lexicalEnvironmentRegister ? m_lexicalEnvironmentRegister->index() : emitLoad(0, JSValue())->index());
}
// Constructors use op_ret_object_or_this to check the result is an
RegisterID m_ignoredResultRegister;
RegisterID m_thisRegister;
RegisterID m_calleeRegister;
- RegisterID* m_activationRegister;
+ RegisterID* m_lexicalEnvironmentRegister;
RegisterID* m_emptyValueRegister;
RegisterID* m_globalObjectRegister;
Vector<Identifier, 16> m_watchableVariables;
#include "DebuggerEvalEnabler.h"
#include "DebuggerScope.h"
#include "Interpreter.h"
-#include "JSActivation.h"
#include "JSFunction.h"
+#include "JSLexicalEnvironment.h"
#include "JSCInlines.h"
#include "Parser.h"
#include "StackVisitor.h"
CodeBlock* codeBlock = m_callFrame->codeBlock();
if (codeBlock && codeBlock->needsActivation() && !m_callFrame->hasActivation()) {
ASSERT(!m_callFrame->scope()->isWithScope());
- JSActivation* activation = JSActivation::create(vm, m_callFrame, codeBlock);
- m_callFrame->setActivation(activation);
- m_callFrame->setScope(activation);
+ JSLexicalEnvironment* lexicalEnvironment = JSLexicalEnvironment::create(vm, m_callFrame, codeBlock);
+ m_callFrame->setActivation(lexicalEnvironment);
+ m_callFrame->setScope(lexicalEnvironment);
}
m_scope.set(vm, DebuggerScope::create(vm, m_callFrame->scope()));
#include "config.h"
#include "DebuggerScope.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "JSCInlines.h"
#include "JSWithScope.h"
bool DebuggerScope::isFunctionOrEvalScope() const
{
// In the current debugger implementation, every function or eval will create an
- // activation object. Hence, an activation object implies a function or eval scope.
+ // lexical environment object. Hence, a lexical environment object implies a
+ // function or eval scope.
return m_scope->isActivationObject();
}
#include "DFGJITCode.h"
#include "GetByIdStatus.h"
#include "Heap.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "JSCInlines.h"
#include "PreciseJumpTargets.h"
#include "PutByIdStatus.h"
break;
case ClosureVar:
case ClosureVarWithVarInjectionChecks: {
- JSActivation* activation = currentInstruction[5].u.activation.get();
- if (activation
- && activation->symbolTable()->m_functionEnteredOnce.isStillValid()) {
- addToGraph(FunctionReentryWatchpoint, OpInfo(activation->symbolTable()));
- set(VirtualRegister(dst), weakJSConstant(activation));
+ JSLexicalEnvironment* lexicalEnvironment = currentInstruction[5].u.lexicalEnvironment.get();
+ if (lexicalEnvironment
+ && lexicalEnvironment->symbolTable()->m_functionEnteredOnce.isStillValid()) {
+ addToGraph(FunctionReentryWatchpoint, OpInfo(lexicalEnvironment->symbolTable()));
+ set(VirtualRegister(dst), weakJSConstant(lexicalEnvironment));
break;
}
set(VirtualRegister(dst), getScope(depth));
case ClosureVar:
case ClosureVarWithVarInjectionChecks: {
Node* scopeNode = get(VirtualRegister(scope));
- if (JSActivation* activation = m_graph.tryGetActivation(scopeNode)) {
- SymbolTable* symbolTable = activation->symbolTable();
+ if (JSLexicalEnvironment* lexicalEnvironment = m_graph.tryGetActivation(scopeNode)) {
+ SymbolTable* symbolTable = lexicalEnvironment->symbolTable();
ConcurrentJITLocker locker(symbolTable->m_lock);
SymbolTable::Map::iterator iter = symbolTable->find(locker, uid);
ASSERT(iter != symbolTable->end(locker));
NEXT_OPCODE(op_init_lazy_reg);
}
- case op_create_activation: {
+ case op_create_lexical_environment: {
set(VirtualRegister(currentInstruction[1].u.operand), addToGraph(CreateActivation, get(VirtualRegister(currentInstruction[1].u.operand))));
- NEXT_OPCODE(op_create_activation);
+ NEXT_OPCODE(op_create_lexical_environment);
}
case op_create_arguments: {
NEXT_OPCODE(op_create_arguments);
}
- case op_tear_off_activation: {
+ case op_tear_off_lexical_environment: {
addToGraph(TearOffActivation, get(VirtualRegister(currentInstruction[1].u.operand)));
- NEXT_OPCODE(op_tear_off_activation);
+ NEXT_OPCODE(op_tear_off_lexical_environment);
}
case op_tear_off_arguments: {
return CannotCompile;
case op_new_regexp:
- case op_create_activation:
- case op_tear_off_activation:
+ case op_create_lexical_environment:
+ case op_tear_off_lexical_environment:
case op_new_func:
case op_new_captured_func:
case op_new_func_exp:
#include "FullBytecodeLiveness.h"
#include "FunctionExecutableDump.h"
#include "JIT.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "MaxFrameExtentForSlowPathCall.h"
#include "OperandsInlines.h"
#include "JSCInlines.h"
return tryGetConstantProperty(base.m_value, base.m_structure, offset);
}
-JSActivation* Graph::tryGetActivation(Node* node)
+JSLexicalEnvironment* Graph::tryGetActivation(Node* node)
{
- return node->dynamicCastConstant<JSActivation*>();
+ return node->dynamicCastConstant<JSLexicalEnvironment*>();
}
WriteBarrierBase<Unknown>* Graph::tryGetRegisters(Node* node)
{
- JSActivation* activation = tryGetActivation(node);
- if (!activation)
+ JSLexicalEnvironment* lexicalEnvironment = tryGetActivation(node);
+ if (!lexicalEnvironment)
return 0;
- if (!activation->isTornOff())
+ if (!lexicalEnvironment->isTornOff())
return 0;
- return activation->registers();
+ return lexicalEnvironment->registers();
}
JSArrayBufferView* Graph::tryGetFoldableView(Node* node)
JSValue tryGetConstantProperty(JSValue base, const StructureAbstractValue&, PropertyOffset);
JSValue tryGetConstantProperty(const AbstractValue&, PropertyOffset);
- JSActivation* tryGetActivation(Node*);
+ JSLexicalEnvironment* tryGetActivation(Node*);
WriteBarrierBase<Unknown>* tryGetRegisters(Node*);
JSArrayBufferView* tryGetFoldableView(Node*);
macro(CreateActivation, NodeResultJS) \
macro(TearOffActivation, NodeMustGenerate) \
\
- /* Nodes used for arguments. Similar to activation support, only it makes even less */\
+ /* Nodes used for arguments. Similar to lexical environment support, only it makes even less */\
/* sense. */\
macro(CreateArguments, NodeResultJS) \
macro(PhantomArguments, NodeResultJS) \
#include "Interpreter.h"
#include "JIT.h"
#include "JITExceptions.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "VM.h"
#include "JSNameScope.h"
#include "NameInstance.h"
#include "DFGSlowPathGenerator.h"
#include "Debugger.h"
#include "GetterSetter.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "JSPropertyNameEnumerator.h"
#include "ObjectPrototype.h"
#include "JSCInlines.h"
JITCompiler::Jump notCreated = m_jit.branch32(JITCompiler::Equal, activationValueTagGPR, TrustedImm32(JSValue::EmptyValueTag));
SymbolTable* symbolTable = m_jit.symbolTableFor(node->origin.semantic);
- int registersOffset = JSActivation::registersOffset(symbolTable);
+ int registersOffset = JSLexicalEnvironment::registersOffset(symbolTable);
int bytecodeCaptureStart = symbolTable->captureStart();
int machineCaptureStart = m_jit.graph().m_machineCaptureStart;
activationValuePayloadGPR, registersOffset + (bytecodeCaptureStart - i) * sizeof(Register) + OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)));
}
m_jit.addPtr(TrustedImm32(registersOffset), activationValuePayloadGPR, scratchGPR);
- m_jit.storePtr(scratchGPR, JITCompiler::Address(activationValuePayloadGPR, JSActivation::offsetOfRegisters()));
+ m_jit.storePtr(scratchGPR, JITCompiler::Address(activationValuePayloadGPR, JSLexicalEnvironment::offsetOfRegisters()));
notCreated.link(&m_jit);
noResult(node);
JITCompiler::Jump notCreated = m_jit.branchTest64(JITCompiler::Zero, activationValueGPR);
SymbolTable* symbolTable = m_jit.symbolTableFor(node->origin.semantic);
- int registersOffset = JSActivation::registersOffset(symbolTable);
+ int registersOffset = JSLexicalEnvironment::registersOffset(symbolTable);
int bytecodeCaptureStart = symbolTable->captureStart();
int machineCaptureStart = m_jit.graph().m_machineCaptureStart;
registersOffset + (bytecodeCaptureStart - i) * sizeof(Register)));
}
m_jit.addPtr(TrustedImm32(registersOffset), activationValueGPR, scratchGPR);
- m_jit.storePtr(scratchGPR, JITCompiler::Address(activationValueGPR, JSActivation::offsetOfRegisters()));
+ m_jit.storePtr(scratchGPR, JITCompiler::Address(activationValueGPR, JSLexicalEnvironment::offsetOfRegisters()));
notCreated.link(&m_jit);
noResult(node);
#include "CallFrameInlines.h"
#include "CodeBlock.h"
#include "Interpreter.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "JSCInlines.h"
#include "VMEntryScope.h"
#include <wtf/StringPrintStream.h>
return static_cast<CallFrame*>(callerFrameOrVMEntryFrame());
}
-JSActivation* CallFrame::activation() const
+JSLexicalEnvironment* CallFrame::lexicalEnvironment() const
{
CodeBlock* codeBlock = this->codeBlock();
RELEASE_ASSERT(codeBlock->needsActivation());
VirtualRegister activationRegister = codeBlock->activationRegister();
- return registers()[activationRegister.offset()].Register::activation();
+ return registers()[activationRegister.offset()].Register::lexicalEnvironment();
}
-void CallFrame::setActivation(JSActivation* activation)
+void CallFrame::setActivation(JSLexicalEnvironment* lexicalEnvironment)
{
CodeBlock* codeBlock = this->codeBlock();
RELEASE_ASSERT(codeBlock->needsActivation());
VirtualRegister activationRegister = codeBlock->activationRegister();
- registers()[activationRegister.offset()] = activation;
+ registers()[activationRegister.offset()] = lexicalEnvironment;
}
void CallFrame::dump(PrintStream& out)
namespace JSC {
class Arguments;
- class JSActivation;
+ class JSLexicalEnvironment;
class Interpreter;
class JSScope;
}
bool hasActivation() const { return !!uncheckedActivation(); }
- JSActivation* activation() const;
+ JSLexicalEnvironment* lexicalEnvironment() const;
JSValue uncheckedActivation() const;
// Global object in which execution began.
void setCallerFrame(CallFrame* frame) { callerFrameAndPC().callerFrame = frame; }
void setScope(JSScope* scope) { static_cast<Register*>(this)[JSStack::ScopeChain] = scope; }
- void setActivation(JSActivation*);
+ void setActivation(JSLexicalEnvironment*);
ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC, JSScope* scope,
CallFrame* callerFrame, int argc, JSObject* callee)
#include "EvalCodeCache.h"
#include "ExceptionHelpers.h"
#include "GetterSetter.h"
-#include "JSActivation.h"
#include "JSArray.h"
#include "JSBoundFunction.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "JSNotAnObject.h"
#include "JSStackInlines.h"
ASSERT(!callFrame->hadException());
}
- JSValue activation;
+ JSValue lexicalEnvironment;
if (codeBlock->codeType() == FunctionCode && codeBlock->needsActivation()) {
#if ENABLE(DFG_JIT)
RELEASE_ASSERT(!visitor->isInlinedFrame());
#endif
- activation = callFrame->uncheckedActivation();
- // Protect against the activation not being created, or the variable still being
+ lexicalEnvironment = callFrame->uncheckedActivation();
+ // Protect against the lexical environment not being created, or the variable still being
// initialized to Undefined inside op_enter.
- if (activation && activation.isCell()) {
- JSActivation* activationObject = jsCast<JSActivation*>(activation);
+ if (lexicalEnvironment && lexicalEnvironment.isCell()) {
+ JSLexicalEnvironment* activationObject = jsCast<JSLexicalEnvironment*>(lexicalEnvironment);
// Protect against throwing exceptions after tear-off.
if (!activationObject->isTornOff())
activationObject->tearOff(*scope->vm());
if (codeBlock->codeType() == FunctionCode && codeBlock->usesArguments()) {
if (Arguments* arguments = visitor->existingArguments()) {
- if (activation && activation.isCell())
- arguments->didTearOffActivation(callFrame, jsCast<JSActivation*>(activation));
+ if (lexicalEnvironment && lexicalEnvironment.isCell())
+ arguments->didTearOffActivation(callFrame, jsCast<JSLexicalEnvironment*>(lexicalEnvironment));
#if ENABLE(DFG_JIT)
else if (visitor->isInlinedFrame())
arguments->tearOff(callFrame, visitor->inlineCallFrame());
class CodeBlock;
class ExecState;
- class JSActivation;
+ class JSLexicalEnvironment;
class JSObject;
class JSScope;
Register& operator=(JSScope*);
int32_t i() const;
- JSActivation* activation() const;
+ JSLexicalEnvironment* lexicalEnvironment() const;
CallFrame* callFrame() const;
CodeBlock* codeBlock() const;
JSObject* function() const;
DEFINE_OP(op_div)
DEFINE_OP(op_end)
DEFINE_OP(op_enter)
- DEFINE_OP(op_create_activation)
+ DEFINE_OP(op_create_lexical_environment)
DEFINE_OP(op_eq)
DEFINE_OP(op_eq_null)
case op_get_by_id_out_of_line:
DEFINE_OP(op_switch_char)
DEFINE_OP(op_switch_imm)
DEFINE_OP(op_switch_string)
- DEFINE_OP(op_tear_off_activation)
+ DEFINE_OP(op_tear_off_lexical_environment)
DEFINE_OP(op_tear_off_arguments)
DEFINE_OP(op_throw)
DEFINE_OP(op_throw_static_error)
void emit_op_div(Instruction*);
void emit_op_end(Instruction*);
void emit_op_enter(Instruction*);
- void emit_op_create_activation(Instruction*);
+ void emit_op_create_lexical_environment(Instruction*);
void emit_op_eq(Instruction*);
void emit_op_eq_null(Instruction*);
void emit_op_get_by_id(Instruction*);
void emit_op_switch_char(Instruction*);
void emit_op_switch_imm(Instruction*);
void emit_op_switch_string(Instruction*);
- void emit_op_tear_off_activation(Instruction*);
+ void emit_op_tear_off_lexical_environment(Instruction*);
void emit_op_tear_off_arguments(Instruction*);
void emit_op_throw(Instruction*);
void emit_op_throw_static_error(Instruction*);
emitPutVirtualRegister(dst);
}
-void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
+void JIT::emit_op_tear_off_lexical_environment(Instruction* currentInstruction)
{
- int activation = currentInstruction[1].u.operand;
- Jump activationNotCreated = branchTest64(Zero, addressFor(activation));
- emitGetVirtualRegister(activation, regT0);
+ int lexicalEnvironment = currentInstruction[1].u.operand;
+ Jump activationNotCreated = branchTest64(Zero, addressFor(lexicalEnvironment));
+ emitGetVirtualRegister(lexicalEnvironment, regT0);
callOperation(operationTearOffActivation, regT0);
activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
int arguments = currentInstruction[1].u.operand;
- int activation = currentInstruction[2].u.operand;
+ int lexicalEnvironment = currentInstruction[2].u.operand;
Jump argsNotCreated = branchTest64(Zero, Address(callFrameRegister, sizeof(Register) * (unmodifiedArgumentsRegister(VirtualRegister(arguments)).offset())));
emitGetVirtualRegister(unmodifiedArgumentsRegister(VirtualRegister(arguments)).offset(), regT0);
- emitGetVirtualRegister(activation, regT1);
+ emitGetVirtualRegister(lexicalEnvironment, regT1);
callOperation(operationTearOffArguments, regT0, regT1);
argsNotCreated.link(this);
}
emitEnterOptimizationCheck();
}
-void JIT::emit_op_create_activation(Instruction* currentInstruction)
+void JIT::emit_op_create_lexical_environment(Instruction* currentInstruction)
{
int dst = currentInstruction[1].u.operand;
emitStoreBool(dst, regT0);
}
-void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
+void JIT::emit_op_tear_off_lexical_environment(Instruction* currentInstruction)
{
- int activation = currentInstruction[1].u.operand;
- Jump activationNotCreated = branch32(Equal, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
- emitLoadPayload(activation, regT0);
+ int lexicalEnvironment = currentInstruction[1].u.operand;
+ Jump activationNotCreated = branch32(Equal, tagFor(lexicalEnvironment), TrustedImm32(JSValue::EmptyValueTag));
+ emitLoadPayload(lexicalEnvironment, regT0);
callOperation(operationTearOffActivation, regT0);
activationNotCreated.link(this);
}
void JIT::emit_op_tear_off_arguments(Instruction* currentInstruction)
{
VirtualRegister arguments = VirtualRegister(currentInstruction[1].u.operand);
- int activation = currentInstruction[2].u.operand;
+ int lexicalEnvironment = currentInstruction[2].u.operand;
Jump argsNotCreated = branch32(Equal, tagFor(unmodifiedArgumentsRegister(arguments).offset()), TrustedImm32(JSValue::EmptyValueTag));
emitLoadPayload(unmodifiedArgumentsRegister(VirtualRegister(arguments)).offset(), regT0);
- emitLoadPayload(activation, regT1);
+ emitLoadPayload(lexicalEnvironment, regT1);
callOperation(operationTearOffArguments, regT0, regT1);
argsNotCreated.link(this);
}
slowPathCall.call();
}
-void JIT::emit_op_create_activation(Instruction* currentInstruction)
+void JIT::emit_op_create_lexical_environment(Instruction* currentInstruction)
{
- int activation = currentInstruction[1].u.operand;
+ int lexicalEnvironment = currentInstruction[1].u.operand;
callOperation(operationCreateActivation, 0);
- emitStoreCell(activation, returnValueGPR);
+ emitStoreCell(lexicalEnvironment, returnValueGPR);
}
void JIT::emit_op_create_arguments(Instruction* currentInstruction)
{
VM& vm = exec->vm();
NativeCallFrameTracer tracer(&vm, exec);
- JSActivation* activation = JSActivation::create(vm, exec, exec->registers() + offset, exec->codeBlock());
- exec->setScope(activation);
- return activation;
+ JSLexicalEnvironment* lexicalEnvironment = JSLexicalEnvironment::create(vm, exec, exec->registers() + offset, exec->codeBlock());
+ exec->setScope(lexicalEnvironment);
+ return lexicalEnvironment;
}
JSCell* JIT_OPERATION operationCreateArguments(ExecState* exec)
NativeCallFrameTracer tracer(&vm, exec);
ASSERT(exec->codeBlock()->needsActivation());
- jsCast<JSActivation*>(activationCell)->tearOff(vm);
+ jsCast<JSLexicalEnvironment*>(activationCell)->tearOff(vm);
}
void JIT_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell)
{
ASSERT(exec->codeBlock()->usesArguments());
if (activationCell) {
- jsCast<Arguments*>(argumentsCell)->didTearOffActivation(exec, jsCast<JSActivation*>(activationCell));
+ jsCast<Arguments*>(argumentsCell)->didTearOffActivation(exec, jsCast<JSLexicalEnvironment*>(activationCell));
return;
}
jsCast<Arguments*>(argumentsCell)->tearOff(exec);
Idc: const Identifier*
J: EncodedJSValue
Jcp: const JSValue*
- Jsa: JSActivation*
+ Jsa: JSLexicalEnvironment*
Jss: JSString*
O: JSObject*
P: pointer (char*)
#include "Interpreter.h"
#include "JIT.h"
#include "JITExceptions.h"
-#include "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "JSCInlines.h"
#include "JSCJSValue.h"
#include "JSGlobalObjectFunctions.h"
#endif
// This stack check is done in the prologue for a function call, and the
// CallFrame is not completely set up yet. For example, if the frame needs
- // an activation object, the activation object will only be set up after
- // we start executing the function. If we need to throw a StackOverflowError
- // here, then we need to tell the prologue to start the stack unwinding from
- // the caller frame (which is fully set up) instead. To do that, we return
- // the caller's CallFrame in the second return value.
+ // a lexical environment object, the lexical environment object will only be
+ // set up after we start executing the function. If we need to throw a
+ // StackOverflowError here, then we need to tell the prologue to start the
+ // stack unwinding from the caller frame (which is fully set up) instead.
+ // To do that, we return the caller's CallFrame in the second return value.
//
// If the stack check succeeds and we don't need to throw the error, then
// we'll return 0 instead. The prologue will check for a non-zero value
LLINT_RETURN_TWO(pc, exec);
}
-LLINT_SLOW_PATH_DECL(slow_path_create_activation)
+LLINT_SLOW_PATH_DECL(slow_path_create_lexical_environment)
{
LLINT_BEGIN();
#if LLINT_SLOW_PATH_TRACING
- dataLogF("Creating an activation, exec = %p!\n", exec);
+ dataLogF("Creating an lexicalEnvironment, exec = %p!\n", exec);
#endif
- JSActivation* activation = JSActivation::create(vm, exec, exec->codeBlock());
- exec->setScope(activation);
- LLINT_RETURN(JSValue(activation));
+ JSLexicalEnvironment* lexicalEnvironment = JSLexicalEnvironment::create(vm, exec, exec->codeBlock());
+ exec->setScope(lexicalEnvironment);
+ LLINT_RETURN(JSValue(lexicalEnvironment));
}
LLINT_SLOW_PATH_DECL(slow_path_new_object)
LLINT_CALL_RETURN(exec, execCallee, LLInt::getCodePtr(getHostCallReturnValue));
}
-LLINT_SLOW_PATH_DECL(slow_path_tear_off_activation)
+LLINT_SLOW_PATH_DECL(slow_path_tear_off_lexical_environment)
{
LLINT_BEGIN();
ASSERT(exec->codeBlock()->needsActivation());
- jsCast<JSActivation*>(LLINT_OP(1).jsValue())->tearOff(vm);
+ jsCast<JSLexicalEnvironment*>(LLINT_OP(1).jsValue())->tearOff(vm);
LLINT_END();
}
ASSERT(exec->codeBlock()->usesArguments());
Arguments* arguments = jsCast<Arguments*>(exec->uncheckedR(unmodifiedArgumentsRegister(VirtualRegister(pc[1].u.operand)).offset()).jsValue());
if (JSValue activationValue = LLINT_OP_C(2).jsValue())
- arguments->didTearOffActivation(exec, jsCast<JSActivation*>(activationValue));
+ arguments->didTearOffActivation(exec, jsCast<JSLexicalEnvironment*>(activationValue));
else
arguments->tearOff(exec);
LLINT_END();
LLINT_SLOW_PATH_HIDDEN_DECL(loop_osr);
LLINT_SLOW_PATH_HIDDEN_DECL(replace);
LLINT_SLOW_PATH_HIDDEN_DECL(stack_check);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_create_activation);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_create_lexical_environment);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_object);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_new_array_with_size);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_varargs);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_construct_varargs);
LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_call_eval);
-LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_activation);
+LLINT_SLOW_PATH_HIDDEN_DECL(slow_path_tear_off_lexical_environment);
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);
dispatch(1)
-_llint_op_create_activation:
+_llint_op_create_lexical_environment:
traceExecution()
loadi 4[PC], t0
- callSlowPath(_llint_slow_path_create_activation)
+ callSlowPath(_llint_slow_path_create_lexical_environment)
dispatch(2)
end
-_llint_op_tear_off_activation:
+_llint_op_tear_off_lexical_environment:
traceExecution()
loadi 4[PC], t0
bieq TagOffset[cfr, t0, 8], EmptyValueTag, .opTearOffActivationNotCreated
- callSlowPath(_llint_slow_path_tear_off_activation)
+ callSlowPath(_llint_slow_path_tear_off_lexical_environment)
.opTearOffActivationNotCreated:
dispatch(2)
bineq CodeBlock::m_codeType[t1], FunctionCode, .loop
btbz CodeBlock::m_needsActivation[t1], .loop
- loadi CodeBlock::m_activationRegister[t1], t1
+ loadi CodeBlock::m_lexicalEnvironmentRegister[t1], t1
# Need to conditionally skip over one scope.
bieq TagOffset[cfr, t1, 8], EmptyValueTag, .noActivation
dispatch(1)
-_llint_op_create_activation:
+_llint_op_create_lexical_environment:
traceExecution()
loadisFromInstruction(1, t0)
- callSlowPath(_llint_slow_path_create_activation)
+ callSlowPath(_llint_slow_path_create_lexical_environment)
dispatch(2)
end
-_llint_op_tear_off_activation:
+_llint_op_tear_off_lexical_environment:
traceExecution()
loadisFromInstruction(1, t0)
btqz [cfr, t0, 8], .opTearOffActivationNotCreated
- callSlowPath(_llint_slow_path_tear_off_activation)
+ callSlowPath(_llint_slow_path_tear_off_lexical_environment)
.opTearOffActivationNotCreated:
dispatch(2)
#include "Arguments.h"
#include "CopyVisitorInlines.h"
-#include "JSActivation.h"
#include "JSArgumentsIterator.h"
#include "JSFunction.h"
#include "JSGlobalObject.h"
#include "JSCInlines.h"
+#include "JSLexicalEnvironment.h"
using namespace std;
thisObject->m_slowArgumentData.get(), SlowArgumentData::sizeForNumArguments(thisObject->m_numArguments));
}
visitor.append(&thisObject->m_callee);
- visitor.append(&thisObject->m_activation);
+ visitor.append(&thisObject->m_lexicalEnvironment);
}
void Arguments::copyBackingStore(JSCell* cell, CopyVisitor& visitor, CopyToken token)
allocateRegisterArray(callFrame->vm());
m_registers = m_registerArray.get() - CallFrame::offsetFor(1) - 1;
- // If we have a captured argument that logically aliases activation storage,
- // but we optimize away the activation, the argument needs to tear off into
+ // If we have a captured argument that logically aliases lexical environment storage,
+ // but we optimize away the lexicalEnvironment, the argument needs to tear off into
// our storage. The simplest way to do this is to revert it to Normal status.
- if (m_slowArgumentData && !m_activation) {
+ if (m_slowArgumentData && !m_lexicalEnvironment) {
for (size_t i = 0; i < m_numArguments; ++i) {
if (m_slowArgumentData->slowArguments()[i].status != SlowArgument::Captured)
continue;
trySetArgument(callFrame->vm(), i, callFrame->argumentAfterCapture(i));
}
-void Arguments::didTearOffActivation(ExecState* exec, JSActivation* activation)
+void Arguments::didTearOffActivation(ExecState* exec, JSLexicalEnvironment* lexicalEnvironment)
{
- RELEASE_ASSERT(activation);
+ RELEASE_ASSERT(lexicalEnvironment);
if (isTornOff())
return;
if (!m_numArguments)
return;
- m_activation.set(exec->vm(), this, activation);
+ m_lexicalEnvironment.set(exec->vm(), this, lexicalEnvironment);
tearOff(exec);
}
#define Arguments_h
#include "CodeOrigin.h"
-#include "JSActivation.h"
#include "JSFunction.h"
#include "JSGlobalObject.h"
+#include "JSLexicalEnvironment.h"
#include "Interpreter.h"
#include "ObjectConstructor.h"
#include "WriteBarrierInlines.h"
void tearOff(CallFrame*);
void tearOff(CallFrame*, InlineCallFrame*);
bool isTornOff() const { return m_registerArray.get(); }
- void didTearOffActivation(ExecState*, JSActivation*);
+ void didTearOffActivation(ExecState*, JSLexicalEnvironment*);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(ArgumentsType, StructureFlags), info());
}
- static ptrdiff_t offsetOfActivation() { return OBJECT_OFFSETOF(Arguments, m_activation); }
+ static ptrdiff_t offsetOfActivation() { return OBJECT_OFFSETOF(Arguments, m_lexicalEnvironment); }
static ptrdiff_t offsetOfNumArguments() { return OBJECT_OFFSETOF(Arguments, m_numArguments); }
static ptrdiff_t offsetOfOverrodeLength() { return OBJECT_OFFSETOF(Arguments, m_overrodeLength); }
static ptrdiff_t offsetOfIsStrictMode() { return OBJECT_OFFSETOF(Arguments, m_isStrictMode); }
void init(CallFrame*);
- WriteBarrier<JSActivation> m_activation;
+ WriteBarrier<JSLexicalEnvironment> m_lexicalEnvironment;
unsigned m_numArguments;
return m_registers[CallFrame::argumentOffset(argument)];
int index = m_slowArgumentData->slowArguments()[argument].index;
- if (!m_activation || m_slowArgumentData->slowArguments()[argument].status != SlowArgument::Captured)
+ if (!m_lexicalEnvironment || m_slowArgumentData->slowArguments()[argument].status != SlowArgument::Captured)
return m_registers[index];
- return m_activation->registerAt(index - m_slowArgumentData->bytecodeToMachineCaptureOffset());
+ return m_lexicalEnvironment->registerAt(index - m_slowArgumentData->bytecodeToMachineCaptureOffset());
}
inline void Arguments::finishCreation(CallFrame* callFrame)
codeBlock->framePointerOffsetToGetActivationRegisters());
}
- // The bytecode generator omits op_tear_off_activation in cases of no
+ // The bytecode generator omits op_tear_off_lexical_environment in cases of no
// declared parameters, so we need to tear off immediately.
if (m_isStrictMode || !callee->jsExecutable()->parameterCount())
tearOff(callFrame);
m_isStrictMode = jsCast<FunctionExecutable*>(inlineCallFrame->executable.get())->isStrictMode();
ASSERT(!jsCast<FunctionExecutable*>(inlineCallFrame->executable.get())->symbolTable(inlineCallFrame->specializationKind())->slowArguments());
- // The bytecode generator omits op_tear_off_activation in cases of no
+ // The bytecode generator omits op_tear_off_lexical_environment in cases of no
// declared parameters, so we need to tear off immediately.
if (m_isStrictMode || !callee->jsExecutable()->parameterCount())
tearOff(callFrame, inlineCallFrame);
#include "Interpreter.h"
#include "JIT.h"
#include "JITStubs.h"
-#include "JSActivation.h"
#include "JSCJSValue.h"
#include "JSGlobalObjectFunctions.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "JSPropertyNameEnumerator.h"
#include "JSString.h"
class ExecutableBase;
class FunctionExecutable;
class FunctionPrototype;
-class JSActivation;
+class JSLexicalEnvironment;
class JSGlobalObject;
class LLIntOffsetsExtractor;
class NativeExecutable;
#include "HeapIterationScope.h"
#include "Interpreter.h"
#include "JSAPIWrapperObject.h"
-#include "JSActivation.h"
#include "JSArgumentsIterator.h"
#include "JSArrayBuffer.h"
#include "JSArrayBufferConstructor.h"
#include "JSGenericTypedArrayViewInlines.h"
#include "JSGenericTypedArrayViewPrototypeInlines.h"
#include "JSGlobalObjectFunctions.h"
+#include "JSLexicalEnvironment.h"
#include "JSLock.h"
#include "JSMap.h"
#include "JSMapIterator.h"
m_typedArrays[toIndex(TypeDataView)].structure.set(vm, this, JSDataView::createStructure(vm, this, m_typedArrays[toIndex(TypeDataView)].prototype.get()));
m_nameScopeStructure.set(vm, this, JSNameScope::createStructure(vm, this, jsNull()));
- m_activationStructure.set(vm, this, JSActivation::createStructure(vm, this));
+ m_lexicalEnvironmentStructure.set(vm, this, JSLexicalEnvironment::createStructure(vm, this));
m_strictEvalActivationStructure.set(vm, this, StrictEvalActivation::createStructure(vm, this, jsNull()));
m_debuggerScopeStructure.set(m_vm, this, DebuggerScope::createStructure(m_vm, this));
m_withScopeStructure.set(vm, this, JSWithScope::createStructure(vm, this, jsNull()));
visitor.append(&thisObject->m_debuggerScopeStructure);
visitor.append(&thisObject->m_withScopeStructure);
visitor.append(&thisObject->m_strictEvalActivationStructure);
- visitor.append(&thisObject->m_activationStructure);
+ visitor.append(&thisObject->m_lexicalEnvironmentStructure);
visitor.append(&thisObject->m_nameScopeStructure);
visitor.append(&thisObject->m_argumentsStructure);
for (unsigned i = 0; i < NumberOfIndexingShapes; ++i)
WriteBarrier<Structure> m_debuggerScopeStructure;
WriteBarrier<Structure> m_withScopeStructure;
WriteBarrier<Structure> m_strictEvalActivationStructure;
- WriteBarrier<Structure> m_activationStructure;
+ WriteBarrier<Structure> m_lexicalEnvironmentStructure;
WriteBarrier<Structure> m_nameScopeStructure;
WriteBarrier<Structure> m_argumentsStructure;
Structure* debuggerScopeStructure() const { return m_debuggerScopeStructure.get(); }
Structure* withScopeStructure() const { return m_withScopeStructure.get(); }
Structure* strictEvalActivationStructure() const { return m_strictEvalActivationStructure.get(); }
- Structure* activationStructure() const { return m_activationStructure.get(); }
+ Structure* activationStructure() const { return m_lexicalEnvironmentStructure.get(); }
Structure* nameScopeStructure() const { return m_nameScopeStructure.get(); }
Structure* argumentsStructure() const { return m_argumentsStructure.get(); }
Structure* originalArrayStructureForIndexingType(IndexingType indexingType) const
/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* (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 "JSActivation.h"
+#include "JSLexicalEnvironment.h"
#include "Arguments.h"
#include "Interpreter.h"
namespace JSC {
-const ClassInfo JSActivation::s_info = { "JSActivation", &Base::s_info, 0, CREATE_METHOD_TABLE(JSActivation) };
+const ClassInfo JSLexicalEnvironment::s_info = { "JSLexicalEnvironment", &Base::s_info, 0, CREATE_METHOD_TABLE(JSLexicalEnvironment) };
-void JSActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
+void JSLexicalEnvironment::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
- JSActivation* thisObject = jsCast<JSActivation*>(cell);
+ JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->storage()[i]);
}
-inline bool JSActivation::symbolTableGet(PropertyName propertyName, PropertySlot& slot)
+inline bool JSLexicalEnvironment::symbolTableGet(PropertyName propertyName, PropertySlot& slot)
{
SymbolTableEntry entry = symbolTable()->inlineGet(propertyName.uid());
if (entry.isNull())
return true;
}
-inline bool JSActivation::symbolTableGet(PropertyName propertyName, PropertyDescriptor& descriptor)
+inline bool JSLexicalEnvironment::symbolTableGet(PropertyName propertyName, PropertyDescriptor& descriptor)
{
SymbolTableEntry entry = symbolTable()->inlineGet(propertyName.uid());
if (entry.isNull())
return true;
}
-inline bool JSActivation::symbolTablePut(ExecState* exec, PropertyName propertyName, JSValue value, bool shouldThrow)
+inline bool JSLexicalEnvironment::symbolTablePut(ExecState* exec, PropertyName propertyName, JSValue value, bool shouldThrow)
{
VM& vm = exec->vm();
ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
return true;
}
-void JSActivation::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
+void JSLexicalEnvironment::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
- JSActivation* thisObject = jsCast<JSActivation*>(object);
+ JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(object);
CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(thisObject->m_registers));
if (shouldIncludeDontEnumProperties(mode) && !thisObject->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()))
JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
-inline bool JSActivation::symbolTablePutWithAttributes(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes)
+inline bool JSLexicalEnvironment::symbolTablePutWithAttributes(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes)
{
ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
return true;
}
-bool JSActivation::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
+bool JSLexicalEnvironment::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
- JSActivation* thisObject = jsCast<JSActivation*>(object);
+ JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(object);
if (propertyName == exec->propertyNames().arguments) {
// Defend against the inspector asking for the arguments object after it has been optimized out.
return true;
}
- // We don't call through to JSObject because there's no way to give an
- // activation object getter properties or a prototype.
+ // We don't call through to JSObject because there's no way to give a
+ // lexical environment object getter properties or a prototype.
ASSERT(!thisObject->hasGetterSetterProperties());
ASSERT(thisObject->prototype().isNull());
return false;
}
-void JSActivation::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
+void JSLexicalEnvironment::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
{
- JSActivation* thisObject = jsCast<JSActivation*>(cell);
+ JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(cell);
ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(thisObject));
if (thisObject->symbolTablePut(exec, propertyName, value, slot.isStrictMode()))
// We don't call through to JSObject because __proto__ and getter/setter
// properties are non-standard extensions that other implementations do not
- // expose in the activation object.
+ // expose in the lexicalEnvironment object.
ASSERT(!thisObject->hasGetterSetterProperties());
thisObject->putOwnDataProperty(exec->vm(), propertyName, value, slot);
}
-bool JSActivation::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName)
+bool JSLexicalEnvironment::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName)
{
if (propertyName == exec->propertyNames().arguments)
return false;
return Base::deleteProperty(cell, exec, propertyName);
}
-JSValue JSActivation::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode)
+JSValue JSLexicalEnvironment::toThis(JSCell*, ExecState* exec, ECMAMode ecmaMode)
{
if (ecmaMode == StrictMode)
return jsUndefined();
return exec->globalThisValue();
}
-EncodedJSValue JSActivation::argumentsGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
+EncodedJSValue JSLexicalEnvironment::argumentsGetter(ExecState*, JSObject* slotBase, EncodedJSValue, PropertyName)
{
- JSActivation* activation = jsCast<JSActivation*>(slotBase);
- CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers));
- ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()));
- if (activation->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()))
+ JSLexicalEnvironment* lexicalEnvironment = jsCast<JSLexicalEnvironment*>(slotBase);
+ CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(lexicalEnvironment->m_registers));
+ ASSERT(!lexicalEnvironment->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()));
+ if (lexicalEnvironment->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval()))
return JSValue::encode(jsUndefined());
VirtualRegister argumentsRegister = callFrame->codeBlock()->argumentsRegister();
/*
- * Copyright (C) 2008, 2009, 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2013, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef JSActivation_h
-#define JSActivation_h
+#ifndef JSLexicalEnvironment_h
+#define JSLexicalEnvironment_h
#include "CodeBlock.h"
#include "CopiedSpaceInlines.h"
class Register;
-class JSActivation : public JSEnvironmentRecord {
+class JSLexicalEnvironment : public JSEnvironmentRecord {
private:
- JSActivation(VM&, CallFrame*, Register*, SymbolTable*);
+ JSLexicalEnvironment(VM&, CallFrame*, Register*, SymbolTable*);
public:
typedef JSEnvironmentRecord Base;
- static JSActivation* create(VM& vm, CallFrame* callFrame, Register* registers, CodeBlock* codeBlock)
+ static JSLexicalEnvironment* create(VM& vm, CallFrame* callFrame, Register* registers, CodeBlock* codeBlock)
{
SymbolTable* symbolTable = codeBlock->symbolTable();
ASSERT(codeBlock->codeType() == FunctionCode);
- JSActivation* activation = new (
+ JSLexicalEnvironment* lexicalEnvironment = new (
NotNull,
- allocateCell<JSActivation>(
+ allocateCell<JSLexicalEnvironment>(
vm.heap,
allocationSize(symbolTable)
)
- ) JSActivation(vm, callFrame, registers, symbolTable);
- activation->finishCreation(vm);
- return activation;
+ ) JSLexicalEnvironment(vm, callFrame, registers, symbolTable);
+ lexicalEnvironment->finishCreation(vm);
+ return lexicalEnvironment;
}
- static JSActivation* create(VM& vm, CallFrame* callFrame, CodeBlock* codeBlock)
+ static JSLexicalEnvironment* create(VM& vm, CallFrame* callFrame, CodeBlock* codeBlock)
{
return create(vm, callFrame, callFrame->registers() + codeBlock->framePointerOffsetToGetActivationRegisters(), codeBlock);
}
extern int activationCount;
extern int allTheThingsCount;
-inline JSActivation::JSActivation(VM& vm, CallFrame* callFrame, Register* registers, SymbolTable* symbolTable)
+inline JSLexicalEnvironment::JSLexicalEnvironment(VM& vm, CallFrame* callFrame, Register* registers, SymbolTable* symbolTable)
: Base(
vm,
callFrame->lexicalGlobalObject()->activationStructure(),
new (NotNull, &storage[i]) WriteBarrier<Unknown>;
}
-JSActivation* asActivation(JSValue);
+JSLexicalEnvironment* asActivation(JSValue);
-inline JSActivation* asActivation(JSValue value)
+inline JSLexicalEnvironment* asActivation(JSValue value)
{
- ASSERT(asObject(value)->inherits(JSActivation::info()));
- return jsCast<JSActivation*>(asObject(value));
+ ASSERT(asObject(value)->inherits(JSLexicalEnvironment::info()));
+ return jsCast<JSLexicalEnvironment*>(asObject(value));
}
-ALWAYS_INLINE JSActivation* Register::activation() const
+ALWAYS_INLINE JSLexicalEnvironment* Register::lexicalEnvironment() const
{
return asActivation(jsValue());
}
-inline int JSActivation::registersOffset(SymbolTable* symbolTable)
+inline int JSLexicalEnvironment::registersOffset(SymbolTable* symbolTable)
{
return storageOffset() + ((symbolTable->captureCount() - symbolTable->captureStart() - 1) * sizeof(WriteBarrier<Unknown>));
}
-inline void JSActivation::tearOff(VM& vm)
+inline void JSLexicalEnvironment::tearOff(VM& vm)
{
ASSERT(!isTornOff());
ASSERT(isTornOff());
}
-inline bool JSActivation::isTornOff()
+inline bool JSLexicalEnvironment::isTornOff()
{
return m_registers == reinterpret_cast_ptr<WriteBarrierBase<Unknown>*>(
reinterpret_cast<char*>(this) + registersOffset(symbolTable()));
}
-inline size_t JSActivation::storageOffset()
+inline size_t JSLexicalEnvironment::storageOffset()
{
- return WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSActivation));
+ return WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSLexicalEnvironment));
}
-inline WriteBarrier<Unknown>* JSActivation::storage()
+inline WriteBarrier<Unknown>* JSLexicalEnvironment::storage()
{
return reinterpret_cast_ptr<WriteBarrier<Unknown>*>(
reinterpret_cast<char*>(this) + storageOffset());
}
-inline size_t JSActivation::allocationSize(SymbolTable* symbolTable)
+inline size_t JSLexicalEnvironment::allocationSize(SymbolTable* symbolTable)
{
- size_t objectSizeInBytes = WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSActivation));
+ size_t objectSizeInBytes = WTF::roundUpToMultipleOf<sizeof(WriteBarrier<Unknown>)>(sizeof(JSLexicalEnvironment));
size_t storageSizeInBytes = symbolTable->captureCount() * sizeof(WriteBarrier<Unknown>);
return objectSizeInBytes + storageSizeInBytes;
}
-inline bool JSActivation::isValidIndex(int index) const
+inline bool JSLexicalEnvironment::isValidIndex(int index) const
{
if (index > symbolTable()->captureStart())
return false;
return true;
}
-inline bool JSActivation::isValid(const SymbolTableEntry& entry) const
+inline bool JSLexicalEnvironment::isValid(const SymbolTableEntry& entry) const
{
return isValidIndex(entry.getIndex());
}
-inline WriteBarrierBase<Unknown>& JSActivation::registerAt(int index) const
+inline WriteBarrierBase<Unknown>& JSLexicalEnvironment::registerAt(int index) const
{
ASSERT(isValidIndex(index));
return Base::registerAt(index);
} // namespace JSC
-#endif // JSActivation_h
+#endif // JSLexicalEnvironment_h
// - assumes the object contains no own getter/setter properties.
// - provides no special handling for __proto__
// - does not walk the prototype chain (to check for accessors or non-writable properties).
- // This is used by JSActivation.
+ // This is used by JSLexicalEnvironment.
bool putOwnDataProperty(VM&, PropertyName, JSValue, PutPropertySlot&);
// Fast access to known property offsets.
#include "config.h"
#include "JSScope.h"
-#include "JSActivation.h"
#include "JSGlobalObject.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "JSWithScope.h"
#include "JSCInlines.h"
// Returns true if we found enough information to terminate optimization.
static inline bool abstractAccess(ExecState* exec, JSScope* scope, const Identifier& ident, GetOrPut getOrPut, size_t depth, bool& needsVarInjectionChecks, ResolveOp& op)
{
- if (JSActivation* activation = jsDynamicCast<JSActivation*>(scope)) {
+ if (JSLexicalEnvironment* lexicalEnvironment = jsDynamicCast<JSLexicalEnvironment*>(scope)) {
if (ident == exec->propertyNames().arguments) {
- // We know the property will be at this activation scope, but we don't know how to cache it.
+ // We know the property will be at this lexical environment scope, but we don't know how to cache it.
op = ResolveOp(Dynamic, 0, 0, 0, 0, 0);
return true;
}
- SymbolTableEntry entry = activation->symbolTable()->get(ident.impl());
+ SymbolTableEntry entry = lexicalEnvironment->symbolTable()->get(ident.impl());
if (entry.isReadOnly() && getOrPut == Put) {
- // We know the property will be at this activation scope, but we don't know how to cache it.
+ // We know the property will be at this lexical environment scope, but we don't know how to cache it.
op = ResolveOp(Dynamic, 0, 0, 0, 0, 0);
return true;
}
if (!entry.isNull()) {
- op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, 0, activation, entry.watchpointSet(), entry.getIndex());
+ op = ResolveOp(makeType(ClosureVar, needsVarInjectionChecks), depth, 0, lexicalEnvironment, entry.watchpointSet(), entry.getIndex());
return true;
}
- if (activation->symbolTable()->usesNonStrictEval())
+ if (lexicalEnvironment->symbolTable()->usesNonStrictEval())
needsVarInjectionChecks = true;
return false;
}
}
struct ResolveOp {
- ResolveOp(ResolveType type, size_t depth, Structure* structure, JSActivation* activation, VariableWatchpointSet* watchpointSet, uintptr_t operand)
+ ResolveOp(ResolveType type, size_t depth, Structure* structure, JSLexicalEnvironment* lexicalEnvironment, VariableWatchpointSet* watchpointSet, uintptr_t operand)
: type(type)
, depth(depth)
, structure(structure)
- , activation(activation)
+ , lexicalEnvironment(lexicalEnvironment)
, watchpointSet(watchpointSet)
, operand(operand)
{
ResolveType type;
size_t depth;
Structure* structure;
- JSActivation* activation;
+ JSLexicalEnvironment* lexicalEnvironment;
VariableWatchpointSet* watchpointSet;
uintptr_t operand;
};
#include "config.h"
#include "JSSymbolTableObject.h"
-#include "JSActivation.h"
#include "JSGlobalObject.h"
+#include "JSLexicalEnvironment.h"
#include "JSNameScope.h"
#include "JSCInlines.h"
#include "PropertyNameArray.h"
static StrictEvalActivation* create(ExecState* exec)
{
- StrictEvalActivation* activation = new (NotNull, allocateCell<StrictEvalActivation>(*exec->heap())) StrictEvalActivation(exec);
- activation->finishCreation(exec->vm());
- return activation;
+ StrictEvalActivation* lexicalEnvironment = new (NotNull, allocateCell<StrictEvalActivation>(*exec->heap())) StrictEvalActivation(exec);
+ lexicalEnvironment->finishCreation(exec->vm());
+ return lexicalEnvironment;
}
static bool deleteProperty(JSCell*, ExecState*, PropertyName);
#include "Interpreter.h"
#include "JITCode.h"
#include "JSAPIValueWrapper.h"
-#include "JSActivation.h"
#include "JSArray.h"
#include "JSCInlines.h"
#include "JSFunction.h"
#include "JSGlobalObjectFunctions.h"
+#include "JSLexicalEnvironment.h"
#include "JSLock.h"
#include "JSNameScope.h"
#include "JSNotAnObject.h"