Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (195861 => 195862)
--- trunk/Source/_javascript_Core/ChangeLog 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-01-30 00:01:48 UTC (rev 195862)
@@ -1,3 +1,96 @@
+2016-01-29 Saam barati <sbar...@apple.com>
+
+ Remove our notion of having a single activation register
+ https://bugs.webkit.org/show_bug.cgi?id=153673
+
+ Reviewed by Filip Pizlo.
+
+ We have many functions lurking around where we think a function
+ might only have one activation register. This is clearly wrong
+ now that ES6 has block scoping. This patch removes this false notion.
+
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::CodeBlock):
+ * bytecode/CodeBlock.h:
+ (JSC::CodeBlock::scopeRegister):
+ (JSC::CodeBlock::codeType):
+ (JSC::CodeBlock::setActivationRegister): Deleted.
+ (JSC::CodeBlock::activationRegister): Deleted.
+ (JSC::CodeBlock::uncheckedActivationRegister): Deleted.
+ (JSC::CodeBlock::needsActivation): Deleted.
+ * bytecode/ExecutableInfo.h:
+ (JSC::ExecutableInfo::ExecutableInfo):
+ (JSC::ExecutableInfo::usesEval):
+ (JSC::ExecutableInfo::isStrictMode):
+ (JSC::ExecutableInfo::isConstructor):
+ (JSC::ExecutableInfo::isClassContext):
+ (JSC::ExecutableInfo::needsActivation): Deleted.
+ * bytecode/UnlinkedCodeBlock.cpp:
+ (JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
+ * bytecode/UnlinkedCodeBlock.h:
+ (JSC::UnlinkedCodeBlock::isArrowFunctionContext):
+ (JSC::UnlinkedCodeBlock::isClassContext):
+ (JSC::UnlinkedCodeBlock::setThisRegister):
+ (JSC::UnlinkedCodeBlock::setScopeRegister):
+ (JSC::UnlinkedCodeBlock::usesGlobalObject):
+ (JSC::UnlinkedCodeBlock::setGlobalObjectRegister):
+ (JSC::UnlinkedCodeBlock::thisRegister):
+ (JSC::UnlinkedCodeBlock::scopeRegister):
+ (JSC::UnlinkedCodeBlock::addPropertyAccessInstruction):
+ (JSC::UnlinkedCodeBlock::needsFullScopeChain): Deleted.
+ (JSC::UnlinkedCodeBlock::setActivationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::activationRegister): Deleted.
+ (JSC::UnlinkedCodeBlock::hasActivationRegister): Deleted.
+ * bytecode/UnlinkedFunctionExecutable.cpp:
+ (JSC::generateUnlinkedFunctionCodeBlock):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ (JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
+ * bytecompiler/BytecodeGenerator.h:
+ (JSC::BytecodeGenerator::destinationForAssignResult):
+ (JSC::BytecodeGenerator::leftHandSideNeedsCopy):
+ (JSC::BytecodeGenerator::emitNodeForLeftHandSide):
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::inliningCost):
+ (JSC::DFG::ByteCodeParser::parseCodeBlock):
+ * dfg/DFGGraph.h:
+ (JSC::DFG::Graph::hasExitSite):
+ (JSC::DFG::Graph::activationRegister): Deleted.
+ (JSC::DFG::Graph::uncheckedActivationRegister): Deleted.
+ (JSC::DFG::Graph::machineActivationRegister): Deleted.
+ (JSC::DFG::Graph::uncheckedMachineActivationRegister): Deleted.
+ * dfg/DFGStackLayoutPhase.cpp:
+ (JSC::DFG::StackLayoutPhase::run):
+ * interpreter/CallFrame.cpp:
+ (JSC::CallFrame::callSiteIndex):
+ (JSC::CallFrame::stack):
+ (JSC::CallFrame::callerFrame):
+ (JSC::CallFrame::friendlyFunctionName):
+ (JSC::CallFrame::hasActivation): Deleted.
+ (JSC::CallFrame::uncheckedActivation): Deleted.
+ (JSC::CallFrame::lexicalEnvironment): Deleted.
+ (JSC::CallFrame::lexicalEnvironmentOrNullptr): Deleted.
+ (JSC::CallFrame::setActivation): Deleted.
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::scope):
+ (JSC::ExecState::setCallerFrame):
+ (JSC::ExecState::setScope):
+ (JSC::ExecState::init):
+ * interpreter/Register.h:
+ * llint/LLIntSlowPaths.cpp:
+ (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+ * runtime/Executable.h:
+ (JSC::ScriptExecutable::usesEval):
+ (JSC::ScriptExecutable::usesArguments):
+ (JSC::ScriptExecutable::isArrowFunctionContext):
+ (JSC::ScriptExecutable::isStrictMode):
+ (JSC::ScriptExecutable::derivedContextType):
+ (JSC::ScriptExecutable::needsActivation): Deleted.
+ * runtime/JSLexicalEnvironment.h:
+ (JSC::asActivation):
+ (JSC::Register::lexicalEnvironment): Deleted.
+
2016-01-29 Filip Pizlo <fpi...@apple.com>
Air:fixObviousSpills should handle floats and doubles
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -586,8 +586,6 @@
static_cast<unsigned long>(instructions().size()),
static_cast<unsigned long>(instructions().size() * sizeof(Instruction)),
m_numParameters, m_numCalleeLocals, m_numVars);
- if (needsActivation() && codeType() == FunctionCode)
- out.printf("; lexical environment in r%d", activationRegister().offset());
out.printf("\n");
StubInfoMap stubInfos;
@@ -1750,7 +1748,6 @@
, m_hasBeenCompiledWithFTL(false)
, m_isConstructor(other.m_isConstructor)
, m_isStrictMode(other.m_isStrictMode)
- , m_needsActivation(other.m_needsActivation)
, m_codeType(other.m_codeType)
, m_unlinkedCode(*other.m_vm, this, other.m_unlinkedCode.get())
, m_hasDebuggerStatement(false)
@@ -1761,7 +1758,6 @@
, m_instructions(other.m_instructions)
, m_thisRegister(other.m_thisRegister)
, m_scopeRegister(other.m_scopeRegister)
- , m_lexicalEnvironmentRegister(other.m_lexicalEnvironmentRegister)
, m_hash(other.m_hash)
, m_source(other.m_source)
, m_sourceOffset(other.m_sourceOffset)
@@ -1817,7 +1813,6 @@
, m_hasBeenCompiledWithFTL(false)
, m_isConstructor(unlinkedCodeBlock->isConstructor())
, m_isStrictMode(unlinkedCodeBlock->isStrictMode())
- , m_needsActivation(unlinkedCodeBlock->hasActivationRegister() && unlinkedCodeBlock->codeType() == FunctionCode)
, m_codeType(unlinkedCodeBlock->codeType())
, m_unlinkedCode(m_globalObject->vm(), this, unlinkedCodeBlock)
, m_hasDebuggerStatement(false)
@@ -1827,7 +1822,6 @@
, m_vm(unlinkedCodeBlock->vm())
, m_thisRegister(unlinkedCodeBlock->thisRegister())
, m_scopeRegister(unlinkedCodeBlock->scopeRegister())
- , m_lexicalEnvironmentRegister(unlinkedCodeBlock->activationRegister())
, m_source(sourceProvider)
, m_sourceOffset(sourceOffset)
, m_firstLineColumnOffset(firstLineColumnOffset)
@@ -2334,7 +2328,6 @@
, m_hasBeenCompiledWithFTL(false)
, m_isConstructor(false)
, m_isStrictMode(false)
- , m_needsActivation(false)
, m_codeType(FunctionCode)
, m_hasDebuggerStatement(false)
, m_steppingMode(SteppingModeDisabled)
Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -351,28 +351,6 @@
{
return m_scopeRegister;
}
-
- void setActivationRegister(VirtualRegister activationRegister)
- {
- m_lexicalEnvironmentRegister = activationRegister;
- }
-
- VirtualRegister activationRegister() const
- {
- ASSERT(m_lexicalEnvironmentRegister.isValid());
- return m_lexicalEnvironmentRegister;
- }
-
- VirtualRegister uncheckedActivationRegister()
- {
- return m_lexicalEnvironmentRegister;
- }
-
- bool needsActivation() const
- {
- ASSERT(m_lexicalEnvironmentRegister.isValid() == m_needsActivation);
- return m_needsActivation;
- }
CodeType codeType() const
{
@@ -898,7 +876,6 @@
bool m_hasBeenCompiledWithFTL : 1;
bool m_isConstructor : 1;
bool m_isStrictMode : 1;
- bool m_needsActivation : 1;
unsigned m_codeType : 2; // CodeType
// Internal methods for use by validation code. It would be private if it wasn't
@@ -1039,7 +1016,6 @@
RefCountedArray<Instruction> m_instructions;
VirtualRegister m_thisRegister;
VirtualRegister m_scopeRegister;
- VirtualRegister m_lexicalEnvironmentRegister;
mutable CodeBlockHash m_hash;
RefPtr<SourceProvider> m_source;
Modified: trunk/Source/_javascript_Core/bytecode/ExecutableInfo.h (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/ExecutableInfo.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/ExecutableInfo.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -35,9 +35,8 @@
// FIXME: These flags, ParserModes and propagation to XXXCodeBlocks should be reorganized.
// https://bugs.webkit.org/show_bug.cgi?id=151547
struct ExecutableInfo {
- ExecutableInfo(bool needsActivation, bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind, SuperBinding superBinding, SourceParseMode parseMode, DerivedContextType derivedContextType, bool isArrowFunctionContext, bool isClassContext)
- : m_needsActivation(needsActivation)
- , m_usesEval(usesEval)
+ ExecutableInfo(bool usesEval, bool isStrictMode, bool isConstructor, bool isBuiltinFunction, ConstructorKind constructorKind, SuperBinding superBinding, SourceParseMode parseMode, DerivedContextType derivedContextType, bool isArrowFunctionContext, bool isClassContext)
+ : m_usesEval(usesEval)
, m_isStrictMode(isStrictMode)
, m_isConstructor(isConstructor)
, m_isBuiltinFunction(isBuiltinFunction)
@@ -52,7 +51,6 @@
ASSERT(m_superBinding == static_cast<unsigned>(superBinding));
}
- bool needsActivation() const { return m_needsActivation; }
bool usesEval() const { return m_usesEval; }
bool isStrictMode() const { return m_isStrictMode; }
bool isConstructor() const { return m_isConstructor; }
@@ -65,7 +63,6 @@
bool isClassContext() const { return m_isClassContext; }
private:
- unsigned m_needsActivation : 1;
unsigned m_usesEval : 1;
unsigned m_isStrictMode : 1;
unsigned m_isConstructor : 1;
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -58,7 +58,6 @@
, m_numParameters(0)
, m_vm(vm)
, m_globalObjectRegister(VirtualRegister())
- , m_needsFullScopeChain(info.needsActivation())
, m_usesEval(info.usesEval())
, m_isStrictMode(info.isStrictMode())
, m_isConstructor(info.isConstructor())
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedCodeBlock.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -123,8 +123,6 @@
bool isArrowFunctionContext() const { return m_isArrowFunctionContext; }
bool isClassContext() const { return m_isClassContext; }
- bool needsFullScopeChain() const { return m_needsFullScopeChain; }
-
void addExpressionInfo(unsigned instructionOffset, int divot,
int startOffset, int endOffset, unsigned line, unsigned column);
@@ -135,7 +133,6 @@
// Special registers
void setThisRegister(VirtualRegister thisRegister) { m_thisRegister = thisRegister; }
void setScopeRegister(VirtualRegister scopeRegister) { m_scopeRegister = scopeRegister; }
- void setActivationRegister(VirtualRegister activationRegister) { m_lexicalEnvironmentRegister = activationRegister; }
bool usesGlobalObject() const { return m_globalObjectRegister.isValid(); }
void setGlobalObjectRegister(VirtualRegister globalObjectRegister) { m_globalObjectRegister = globalObjectRegister; }
@@ -292,8 +289,6 @@
VirtualRegister thisRegister() const { return m_thisRegister; }
VirtualRegister scopeRegister() const { return m_scopeRegister; }
- VirtualRegister activationRegister() const { return m_lexicalEnvironmentRegister; }
- bool hasActivationRegister() const { return m_lexicalEnvironmentRegister.isValid(); }
void addPropertyAccessInstruction(unsigned propertyAccessInstruction)
{
@@ -383,10 +378,8 @@
VirtualRegister m_thisRegister;
VirtualRegister m_scopeRegister;
- VirtualRegister m_lexicalEnvironmentRegister;
VirtualRegister m_globalObjectRegister;
- unsigned m_needsFullScopeChain : 1;
unsigned m_usesEval : 1;
unsigned m_isStrictMode : 1;
unsigned m_isConstructor : 1;
Modified: trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecode/UnlinkedFunctionExecutable.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -69,7 +69,7 @@
bool isClassContext = executable->superBinding() == SuperBinding::Needed;
UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode,
- ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), executable->superBinding(), parseMode, executable->derivedContextType(), false, isClassContext));
+ ExecutableInfo(function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction, executable->constructorKind(), executable->superBinding(), parseMode, executable->derivedContextType(), false, isClassContext));
auto generator(std::make_unique<BytecodeGenerator>(vm, function.get(), result, debuggerMode, profilerMode, executable->parentScopeTDZVariables()));
error = generator->generate();
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -240,7 +240,7 @@
SourceParseMode parseMode = codeBlock->parseMode();
bool containsArrowOrEvalButNotInArrowBlock = needsToUpdateArrowFunctionContext() && !m_codeBlock->isArrowFunction();
- bool shouldCaptureSomeOfTheThings = m_shouldEmitDebugHooks || m_codeBlock->needsFullScopeChain() || containsArrowOrEvalButNotInArrowBlock;
+ bool shouldCaptureSomeOfTheThings = m_shouldEmitDebugHooks || functionNode->needsActivation() || containsArrowOrEvalButNotInArrowBlock;
bool shouldCaptureAllOfTheThings = m_shouldEmitDebugHooks || codeBlock->usesEval();
bool needsArguments = (functionNode->usesArguments() || codeBlock->usesEval() || (functionNode->usesArrowFunction() && !codeBlock->isArrowFunction()));
@@ -661,14 +661,11 @@
moduleEnvironmentSymbolTable->setUsesNonStrictEval(m_usesNonStrictEval);
moduleEnvironmentSymbolTable->setScopeType(SymbolTable::ScopeType::LexicalScope);
- bool shouldCaptureSomeOfTheThings = m_shouldEmitDebugHooks || m_codeBlock->needsFullScopeChain();
bool shouldCaptureAllOfTheThings = m_shouldEmitDebugHooks || codeBlock->usesEval();
if (shouldCaptureAllOfTheThings)
moduleProgramNode->varDeclarations().markAllVariablesAsCaptured();
auto captures = [&] (UniquedStringImpl* uid) -> bool {
- if (!shouldCaptureSomeOfTheThings)
- return false;
return moduleProgramNode->captures(uid);
};
auto lookUpVarKind = [&] (UniquedStringImpl* uid, const VariableEnvironmentEntry& entry) -> VarKind {
@@ -962,7 +959,6 @@
void BytecodeGenerator::initializeVarLexicalEnvironment(int symbolTableConstantIndex)
{
RELEASE_ASSERT(m_lexicalEnvironmentRegister);
- m_codeBlock->setActivationRegister(m_lexicalEnvironmentRegister->virtualRegister());
emitOpcode(op_create_lexical_environment);
instructions().append(m_lexicalEnvironmentRegister->index());
instructions().append(scopeRegister()->index());
Modified: trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (195861 => 195862)
--- trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -354,7 +354,7 @@
RegisterID* destinationForAssignResult(RegisterID* dst)
{
- if (dst && dst != ignoredResult() && m_codeBlock->needsFullScopeChain())
+ if (dst && dst != ignoredResult())
return dst->isTemporary() ? dst : newTemporary();
return 0;
}
@@ -465,7 +465,7 @@
ALWAYS_INLINE bool leftHandSideNeedsCopy(bool rightHasAssignments, bool rightIsPure)
{
- return (m_codeType != FunctionCode || m_codeBlock->needsFullScopeChain() || rightHasAssignments) && !rightIsPure;
+ return (m_codeType != FunctionCode || rightHasAssignments) && !rightIsPure;
}
ALWAYS_INLINE PassRefPtr<RegisterID> emitNodeForLeftHandSide(ExpressionNode* n, bool rightHasAssignments, bool rightIsPure)
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -1338,7 +1338,6 @@
dataLog(" Might inline function: ", mightInlineFunctionFor(codeBlock, kind), "\n");
dataLog(" Might compile function: ", mightCompileFunctionFor(codeBlock, kind), "\n");
dataLog(" Is supported for inlining: ", isSupportedForInlining(codeBlock), "\n");
- dataLog(" Needs activation: ", codeBlock->ownerScriptExecutable()->needsActivation(), "\n");
dataLog(" Is inlining candidate: ", codeBlock->ownerScriptExecutable()->isInliningCandidate(), "\n");
}
if (!canInline(capabilityLevel)) {
@@ -4909,7 +4908,6 @@
" ", inlineCallFrame()->directCaller);
}
dataLog(
- ": needsActivation = ", codeBlock->needsActivation(),
", isStrictMode = ", codeBlock->ownerScriptExecutable()->isStrictMode(), "\n");
codeBlock->baselineVersion()->dumpBytecode();
}
Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (195861 => 195862)
--- trunk/Source/_javascript_Core/dfg/DFGGraph.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -398,26 +398,6 @@
return hasExitSite(node->origin.semantic, exitKind);
}
- VirtualRegister activationRegister()
- {
- return m_profiledBlock->activationRegister();
- }
-
- VirtualRegister uncheckedActivationRegister()
- {
- return m_profiledBlock->uncheckedActivationRegister();
- }
-
- VirtualRegister machineActivationRegister()
- {
- return m_profiledBlock->activationRegister();
- }
-
- VirtualRegister uncheckedMachineActivationRegister()
- {
- return m_profiledBlock->uncheckedActivationRegister();
- }
-
ValueProfile* valueProfileFor(Node*);
MethodOfGettingAValueProfile methodOfGettingAValueProfileFor(Node*);
Modified: trunk/Source/_javascript_Core/dfg/DFGStackLayoutPhase.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/dfg/DFGStackLayoutPhase.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/dfg/DFGStackLayoutPhase.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -173,8 +173,6 @@
data->machineLocal = assign(allocation, data->local);
}
- // This register is never valid for DFG code blocks.
- codeBlock()->setActivationRegister(VirtualRegister());
if (LIKELY(!m_graph.hasDebuggerEnabled()))
codeBlock()->setScopeRegister(VirtualRegister());
else
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -84,20 +84,6 @@
return CallSiteIndex(callSiteAsRawBits());
}
-bool CallFrame::hasActivation() const
-{
- JSValue activation = uncheckedActivation();
- return !!activation && activation.isCell();
-}
-
-JSValue CallFrame::uncheckedActivation() const
-{
- CodeBlock* codeBlock = this->codeBlock();
- RELEASE_ASSERT(codeBlock->needsActivation());
- VirtualRegister activationRegister = codeBlock->activationRegister();
- return registers()[activationRegister.offset()].jsValue();
-}
-
#ifndef NDEBUG
JSStack* CallFrame::stack()
{
@@ -208,28 +194,6 @@
return static_cast<CallFrame*>(callerFrameOrVMEntryFrame());
}
-JSLexicalEnvironment* CallFrame::lexicalEnvironment() const
-{
- CodeBlock* codeBlock = this->codeBlock();
- RELEASE_ASSERT(codeBlock->needsActivation());
- VirtualRegister activationRegister = codeBlock->activationRegister();
- return registers()[activationRegister.offset()].Register::lexicalEnvironment();
-}
-
-JSLexicalEnvironment* CallFrame::lexicalEnvironmentOrNullptr() const
-{
- CodeBlock* codeBlock = this->codeBlock();
- return codeBlock->needsActivation() ? lexicalEnvironment() : nullptr;
-}
-
-void CallFrame::setActivation(JSLexicalEnvironment* lexicalEnvironment)
-{
- CodeBlock* codeBlock = this->codeBlock();
- RELEASE_ASSERT(codeBlock->needsActivation());
- VirtualRegister activationRegister = codeBlock->activationRegister();
- registers()[activationRegister.offset()] = lexicalEnvironment;
-}
-
String CallFrame::friendlyFunctionName()
{
CodeBlock* codeBlock = this->codeBlock();
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (195861 => 195862)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -34,7 +34,6 @@
namespace JSC {
class Arguments;
- class JSLexicalEnvironment;
class Interpreter;
class JSScope;
@@ -75,11 +74,6 @@
return this[scopeRegisterOffset].Register::scope();
}
- bool hasActivation() const;
- JSLexicalEnvironment* lexicalEnvironment() const;
- JSLexicalEnvironment* lexicalEnvironmentOrNullptr() const;
- JSValue uncheckedActivation() const;
-
// Global object in which execution began.
JS_EXPORT_PRIVATE JSGlobalObject* vmEntryGlobalObject();
@@ -164,7 +158,6 @@
void setCallerFrame(CallFrame* frame) { callerFrameAndPC().callerFrame = frame; }
void setScope(int scopeRegisterOffset, JSScope* scope) { static_cast<Register*>(this)[scopeRegisterOffset] = scope; }
- void setActivation(JSLexicalEnvironment*);
ALWAYS_INLINE void init(CodeBlock* codeBlock, Instruction* vPC,
CallFrame* callerFrame, int argc, JSObject* callee)
Modified: trunk/Source/_javascript_Core/interpreter/Register.h (195861 => 195862)
--- trunk/Source/_javascript_Core/interpreter/Register.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/interpreter/Register.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -60,7 +60,6 @@
Register& operator=(JSObject*);
int32_t i() const;
- JSLexicalEnvironment* lexicalEnvironment() const;
CallFrame* callFrame() const;
CodeBlock* codeBlock() const;
JSObject* object() const;
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (195861 => 195862)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2016-01-30 00:01:48 UTC (rev 195862)
@@ -1031,7 +1031,6 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- ASSERT(codeBlock->codeType() != FunctionCode || !codeBlock->needsActivation() || exec->hasActivation());
JSScope* scope = exec->uncheckedR(pc[2].u.operand).Register::scope();
#if LLINT_SLOW_PATH_TRACING
dataLogF("Creating function!\n");
@@ -1043,7 +1042,6 @@
{
LLINT_BEGIN();
CodeBlock* codeBlock = exec->codeBlock();
- ASSERT(codeBlock->codeType() != FunctionCode || !codeBlock->needsActivation() || exec->hasActivation());
JSScope* scope = exec->uncheckedR(pc[2].u.operand).Register::scope();
#if LLINT_SLOW_PATH_TRACING
dataLogF("Creating function!\n");
Modified: trunk/Source/_javascript_Core/runtime/Executable.h (195861 => 195862)
--- trunk/Source/_javascript_Core/runtime/Executable.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/runtime/Executable.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -348,7 +348,6 @@
bool usesEval() const { return m_features & EvalFeature; }
bool usesArguments() const { return m_features & ArgumentsFeature; }
- bool needsActivation() const { return m_hasCapturedVariables || m_features & (EvalFeature | WithFeature); }
bool isArrowFunctionContext() const { return m_isArrowFunctionContext; }
bool isStrictMode() const { return m_features & StrictModeFeature; }
DerivedContextType derivedContextType() const { return m_derivedContextType; }
@@ -458,7 +457,7 @@
DECLARE_INFO;
- ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext() , false); }
+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext() , false); }
unsigned numVariables() { return m_unlinkedEvalCodeBlock->numVariables(); }
unsigned numberOfFunctionDecls() { return m_unlinkedEvalCodeBlock->numberOfFunctionDecls(); }
@@ -512,7 +511,7 @@
DECLARE_INFO;
- ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false); }
+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ProgramMode, derivedContextType(), isArrowFunctionContext(), false); }
private:
friend class ExecutableBase;
@@ -553,7 +552,7 @@
DECLARE_INFO;
- ExecutableInfo executableInfo() const { return ExecutableInfo(needsActivation(), usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ModuleEvaluateMode, derivedContextType(), isArrowFunctionContext(), false); }
+ ExecutableInfo executableInfo() const { return ExecutableInfo(usesEval(), isStrictMode(), false, false, ConstructorKind::None, SuperBinding::NotNeeded, SourceParseMode::ModuleEvaluateMode, derivedContextType(), isArrowFunctionContext(), false); }
UnlinkedModuleProgramCodeBlock* unlinkedModuleProgramCodeBlock() { return m_unlinkedModuleProgramCodeBlock.get(); }
Modified: trunk/Source/_javascript_Core/runtime/JSLexicalEnvironment.h (195861 => 195862)
--- trunk/Source/_javascript_Core/runtime/JSLexicalEnvironment.h 2016-01-29 23:58:18 UTC (rev 195861)
+++ trunk/Source/_javascript_Core/runtime/JSLexicalEnvironment.h 2016-01-30 00:01:48 UTC (rev 195862)
@@ -89,11 +89,6 @@
return jsCast<JSLexicalEnvironment*>(asObject(value));
}
-ALWAYS_INLINE JSLexicalEnvironment* Register::lexicalEnvironment() const
-{
- return asActivation(jsValue());
-}
-
} // namespace JSC
#endif // JSLexicalEnvironment_h