Changeset 2851 in webkit for trunk/JavaScriptCore/kjs/context.h


Ignore:
Timestamp:
Nov 24, 2002, 2:37:44 PM (23 years ago)
Author:
darin
Message:

JavaScriptCore:

  • changed ScopeChain to not ref each item in the chain, and use marking instead; gains 1% on JavaScript iBench
  • kjs/context.h: Return chain by reference.
  • kjs/internal.cpp: (ContextImp::mark): Mark the scope chain.
  • kjs/interpreter.cpp: (Context::scopeChain): Return chain by reference.
  • kjs/interpreter.h: Make some Context methods inline.
  • kjs/nodes.cpp: (ThisNode::evaluate): Get at ContextImp directly. (ResolveNode::evaluateReference): Ditto. (VarDeclNode::evaluate): Ditto. (VarDeclNode::processVarDecls): Ditto. (FuncDeclNode::processFuncDecl): Pass ScopeChain directly to avoid copying. (FuncExprNode::evaluate): Ditto.
  • kjs/object.cpp: Make scope and setScope inline.
  • kjs/object.h: Make scope return a chain by reference. Make scope and setScope both be inline. Use a normal ScopeChain instead of NoRefScopeChain since they are now one and the same.
  • kjs/scope_chain.cpp: Remove all the code to ref and deref objects. Merge NoRefScopeChain in with ScopeChain since they both work this way now.
  • kjs/scope_chain.h: Remove NoRefScopeChain and simplify the ref counts. Make more functions inline.

WebCore:

  • force-js-clean-timestamp: Touch for ScopeChain change.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/context.h

    r2824 r2851  
    3838    ~ContextImp();
    3939
    40     const ScopeChain scopeChain() const { return scope; }
     40    const ScopeChain &scopeChain() const { return scope; }
    4141    Object variableObject() const { return variable; }
    4242    void setVariableObject(const Object &v) { variable = v; }
Note: See TracChangeset for help on using the changeset viewer.