Ignore:
Timestamp:
Aug 19, 2009, 12:54:55 PM (16 years ago)
Author:
[email protected]
Message:

We probably shouldn't be keeping the AST for eval nodes around forevar.

https://bugs.webkit.org/show_bug.cgi?id=28469

Reviewed by Darin Adler.

EvalNodes don't destroyData() (delete their parser data) since they need to hold onto
their varStack. Copy a list of variable onto EvalCodeBlock, and this can go away.

  • bytecode/CodeBlock.h:

(JSC::EvalCodeBlock::variable):
(JSC::EvalCodeBlock::numVariables):
(JSC::EvalCodeBlock::adoptVariables):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • parser/Nodes.h:
  • runtime/Executable.cpp:

(JSC::EvalExecutable::generateBytecode):

  • runtime/Executable.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Executable.h

    r47412 r47519  
    6060        virtual ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*) = 0;
    6161
    62         ScopeNode* astNode() { return m_node.get(); }
    63 
    6462    protected:
    6563        RefPtr<ScopeNode> m_node;
     
    109107            return *m_evalCodeBlock;
    110108        }
    111 
    112         DeclarationStacks::VarStack& varStack() { return m_node->varStack(); }
    113109
    114110        ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
Note: See TracChangeset for help on using the changeset viewer.