Ignore:
Timestamp:
Aug 14, 2009, 6:14:00 PM (16 years ago)
Author:
[email protected]
Message:

Remove AST nodes from use within the Runtime (outside of parsing), stage 1
https://bugs.webkit.org/show_bug.cgi?id=28330

Reviewed by Oliver Hunt.

Remove the EvalNode and ProgramNode from use in the runtime. They still exist
after this patch, but are hidden behind EvalExecutable and FunctionExecutable,
and are also still reachable behind CodeBlock::m_ownerNode.

The next step will be to beat back FunctionBodyNode in the same fashion.
Then remove the usage via CodeBlock, then only construct these nodes only on
demand during bytecode generation.

(JSC::GlobalCodeBlock::GlobalCodeBlock):
(JSC::GlobalCodeBlock::~GlobalCodeBlock):
(JSC::ProgramCodeBlock::ProgramCodeBlock):
(JSC::EvalCodeBlock::EvalCodeBlock):
(JSC::FunctionCodeBlock::FunctionCodeBlock):
(JSC::NativeCodeBlock::NativeCodeBlock):

  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::get):

  • debugger/Debugger.cpp:

(JSC::evaluateInGlobalCallFrame):

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluate):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::callEval):
(JSC::Interpreter::execute):

  • interpreter/Interpreter.h:
  • parser/Nodes.cpp:

(JSC::FunctionBodyNode::createNativeThunk):
(JSC::FunctionBodyNode::generateBytecode):
(JSC::FunctionBodyNode::bytecodeForExceptionInfoReparse):

  • parser/Parser.h:

(JSC::Parser::parse):
(JSC::Parser::reparse):
(JSC::Parser::parseFunctionFromGlobalCode):
(JSC::::parse):

  • runtime/Completion.cpp:

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

  • runtime/Error.cpp:

(JSC::throwError):

  • runtime/Error.h:
  • runtime/Executable.h: Added.

(JSC::TemplateExecutable::TemplateExecutable):
(JSC::TemplateExecutable::markAggregate):
(JSC::TemplateExecutable::sourceURL):
(JSC::TemplateExecutable::lineNo):
(JSC::TemplateExecutable::bytecode):
(JSC::TemplateExecutable::jitCode):
(JSC::EvalExecutable::EvalExecutable):
(JSC::ProgramExecutable::ProgramExecutable):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunction):

  • runtime/FunctionConstructor.h:
  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::numericCompareFunction):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::markChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::codeBlocks):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

File:
1 edited

Legend:

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

    r47236 r47304  
    20492049    RefPtr<FunctionBodyNode> body = new FunctionBodyNode(globalData);
    20502050    globalData->parser->arena().reset();
    2051     body->m_code.set(new CodeBlock(body.get()));
     2051    body->m_code.set(new NativeCodeBlock(body.get()));
    20522052    body->m_jitCode = JITCode(JITCode::HostFunction(globalData->jitStubs.ctiNativeCallThunk()));
    20532053    return body.release();
     
    20872087    JSGlobalObject* globalObject = scopeChain.globalObject();
    20882088
    2089     m_code.set(new CodeBlock(this, FunctionCode, source().provider(), source().startOffset()));
     2089    m_code.set(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset()));
    20902090
    20912091    OwnPtr<BytecodeGenerator> generator(new BytecodeGenerator(this, globalObject->debugger(), scopeChain, &m_code->symbolTable(), m_code.get()));
     
    21132113    JSGlobalObject* globalObject = scopeChain.globalObject();
    21142114
    2115     m_code.set(new CodeBlock(this, FunctionCode, source().provider(), source().startOffset()));
     2115    m_code.set(new FunctionCodeBlock(this, FunctionCode, source().provider(), source().startOffset()));
    21162116
    21172117    OwnPtr<BytecodeGenerator> generator(new BytecodeGenerator(this, globalObject->debugger(), scopeChain, &m_code->symbolTable(), m_code.get()));
Note: See TracChangeset for help on using the changeset viewer.