Ignore:
Timestamp:
Aug 24, 2009, 7:53:51 PM (16 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=28691
Do not retain ScopeNodes outside of parsing

Reviewed by Oliver Adler & Darin Hunt.

There is now no need for these to exist outside of parsing - their use in the runtime is replaced by Executable types.

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::get):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitNewFunction):
(JSC::BytecodeGenerator::emitNewFunctionExpression):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::makeFunction):

  • debugger/Debugger.cpp:

(JSC::Debugger::recompileAllJSFunctions):
(JSC::evaluateInGlobalCallFrame):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluate):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):
(JSC::Interpreter::prepareForRepeatCall):
(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • parser/Nodes.cpp:

(JSC::ScopeNodeData::ScopeNodeData):
(JSC::ProgramNode::create):
(JSC::EvalNode::create):
(JSC::FunctionBodyNode::create):

  • parser/Nodes.h:

(JSC::ScopeNode::adoptData):
(JSC::FunctionBodyNode::parameterCount):

  • parser/Parser.cpp:
  • parser/Parser.h:

(JSC::Parser::arena):
(JSC::Parser::Parser):
(JSC::Parser::parse):

  • runtime/ArrayPrototype.cpp:

(JSC::isNumericCompareFunction):
(JSC::arrayProtoFuncSort):

  • runtime/Completion.cpp:

(JSC::checkSyntax):
(JSC::evaluate):

  • runtime/Executable.cpp:

(JSC::FunctionExecutable::~FunctionExecutable):
(JSC::EvalExecutable::compile):
(JSC::ProgramExecutable::checkSyntax):
(JSC::ProgramExecutable::compile):
(JSC::FunctionExecutable::compile):
(JSC::EvalExecutable::generateJITCode):
(JSC::ProgramExecutable::generateJITCode):
(JSC::FunctionExecutable::generateJITCode):
(JSC::FunctionExecutable::reparseExceptionInfo):
(JSC::EvalExecutable::reparseExceptionInfo):
(JSC::FunctionExecutable::recompile):
(JSC::FunctionExecutable::fromGlobalCode):
(JSC::FunctionExecutable::copyParameters):
(JSC::FunctionExecutable::paramString):

  • runtime/Executable.h:

(JSC::ScriptExecutable::ScriptExecutable):
(JSC::ScriptExecutable::sourceID):
(JSC::ScriptExecutable::sourceURL):
(JSC::ScriptExecutable::lineNo):
(JSC::ScriptExecutable::lastLine):
(JSC::ScriptExecutable::usesEval):
(JSC::ScriptExecutable::usesArguments):
(JSC::ScriptExecutable::needsActivation):
(JSC::ScriptExecutable::recordParse):
(JSC::EvalExecutable::bytecode):
(JSC::EvalExecutable::jitCode):
(JSC::ProgramExecutable::bytecode):
(JSC::ProgramExecutable::reparseExceptionInfo):
(JSC::ProgramExecutable::jitCode):
(JSC::FunctionExecutable::FunctionExecutable):
(JSC::FunctionExecutable::make):
(JSC::FunctionExecutable::bytecode):
(JSC::FunctionExecutable::isGenerated):
(JSC::FunctionExecutable::name):
(JSC::FunctionExecutable::parameterCount):
(JSC::FunctionExecutable::jitCode):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::numericCompareFunction):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Nodes.cpp

    r47667 r47738  
    20372037}
    20382038
    2039 void FunctionBodyNode::reparseDataIfNecessary(ScopeChainNode* scopeChainNode)
    2040 {
    2041     // This branch is only necessary since you can still create a non-stub FunctionBodyNode by
    2042     // calling Parser::parse<FunctionBodyNode>().   
    2043     if (!data())
    2044         scopeChainNode->globalData->parser->reparseInPlace(scopeChainNode->globalData, this);
    2045     ASSERT(data());
    2046 }
    2047 
    20482039RegisterID* FunctionBodyNode::emitBytecode(BytecodeGenerator& generator, RegisterID*)
    20492040{
     
    20632054}
    20642055
    2065 UString FunctionBodyNode::paramString() const
    2066 {
    2067     UString s("");
    2068     for (size_t pos = 0; pos < m_parameterCount; ++pos) {
    2069         if (!s.isEmpty())
    2070             s += ", ";
    2071         s += parameters()[pos].ustring();
    2072     }
    2073 
    2074     return s;
    2075 }
    2076 
    20772056Identifier* FunctionBodyNode::copyParameters()
    20782057{
Note: See TracChangeset for help on using the changeset viewer.