Changeset 47519 in webkit for trunk/JavaScriptCore/parser


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/parser/Nodes.h

    r47412 r47519  
    14631463        static PassRefPtr<EvalNode> create(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, const SourceCode&, CodeFeatures, int numConstants);
    14641464
    1465         void partialDestroyData()
    1466         {
    1467             // Eval code needs to hang on to its declaration stacks to keep declaration info alive until Interpreter::execute time,
    1468             // so the entire ScopeNodeData cannot be destoyed.
    1469             children().clear();
    1470         }
    1471 
    14721465    private:
    14731466        EvalNode(JSGlobalData*, SourceElements*, VarStack*, FunctionStack*, const SourceCode&, CodeFeatures, int numConstants);
Note: See TracChangeset for help on using the changeset viewer.