Changeset 2821 in webkit for trunk/JavaScriptCore/kjs/internal.h


Ignore:
Timestamp:
Nov 21, 2002, 10:59:09 PM (23 years ago)
Author:
darin
Message:

top level:

  • Site/Internal/Design/CFURL.rtf: Added.

Tools:

  • Scripts/last-update: Added. Script for Trey that tells you when you last did a cvs update, based on most-recently updated ChangeLog.

JavaScriptCore:

  • stop garbage collecting the ActivationImp objects, gets 3% on iBench
  • pave the way to separate the argument lists from scope chains
  • kjs/context.h: Added. Moved ContextImp here so it can use things defined in function.h
  • kjs/scope_chain.h: Added. Starting as a copy of List, to be improved.
  • kjs/scope_chain.cpp: Added. Starting as a copy of List, to be improved.
  • JavaScriptCore.pbproj/project.pbxproj: Rearranged things, added context.h.
  • kjs/function.cpp: (FunctionImp::call): Pass InterpreterImp, not ExecState, to ContextImp. (DeclaredFunctionImp::DeclaredFunctionImp): List -> ScopeChain. (ActivationImp::createArgumentsObject): ArgumentList -> List. (GlobalFuncImp::call): Pass InterpreterImp, not an ExecState, to ContextImp.
  • kjs/function.h: List -> ScopeChain.
  • kjs/function_object.cpp: (FunctionObjectImp::construct): List -> ScopeChain.
  • kjs/internal.cpp: (ContextImp::ContextImp): Set the context in the interpreter. (ContextImp::~ContextImp): Set the context in the interpreter to the caller. (ContextImp::mark): Mark all the activation objects. (InterpreterImp::InterpreterImp): Initialize context to 0. (InterpreterImp::mark): Mark the top context. (InterpreterImp::evaluate): Pass InterpreterImp to ContextImp.
  • kjs/internal.h: Move ContextImp to its own header. Add setContext to InterpreterImp.
  • kjs/interpreter.cpp: (Context::scopeChain): List -> ScopeChain.
  • kjs/interpreter.h: List -> ScopeChain.
  • kjs/nodes.cpp: (ResolveNode::evaluateReference): List -> ScopeChain. (FuncDeclNode::processFuncDecl): List -> ScopeChain. (FuncExprNode::evaluate): List -> ScopeChain.
  • kjs/object.cpp: List -> ScopeChain.
  • kjs/object.h: List -> ScopeChain.
  • kjs/types.h: Remove needsMarking features from List.
  • kjs/types.cpp: Ditto.

WebCore:

  • khtml/ecma/kjs_dom.cpp: (DOMNode::eventHandlerScope): List -> ScopeChain.
  • khtml/ecma/kjs_dom.h: List -> ScopeChain.
  • khtml/ecma/kjs_events.cpp: (JSEventListener::handleEvent): List -> ScopeChain.
  • khtml/ecma/kjs_html.cpp: (KJS::HTMLElement::eventHandlerScope): List -> ScopeChain.
  • khtml/ecma/kjs_html.h: List -> ScopeChain.
  • force-js-clean-timestamp: Not sure this is required, but better safe than sorry.
File:
1 edited

Legend:

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

    r2792 r2821  
    3030#include "types.h"
    3131#include "interpreter.h"
     32#include "scope_chain.h"
    3233
    3334#define I18N_NOOP(s) s
     
    195196
    196197  /**
    197    * @short Execution context.
    198    */
    199   class ContextImp {
    200   public:
    201     ContextImp(Object &glob, ExecState *exec, Object &thisV, CodeType type = GlobalCode,
    202                ContextImp *_callingContext = 0L, FunctionImp *func = 0L, const ArgumentList *args = 0);
    203     ~ContextImp();
    204 
    205     const List scopeChain() const { return scope; }
    206     Object variableObject() const { return variable; }
    207     void setVariableObject(const Object &v) { variable = v; }
    208     Object thisValue() const { return thisVal; }
    209     ContextImp *callingContext() { return callingCon; }
    210     ObjectImp *activationObject() { return activation.imp(); }
    211     FunctionImp *function() const { return _function; }
    212     const ArgumentList *arguments() const { return _arguments; }
    213 
    214     void pushScope(const Object &s);
    215     void popScope();
    216     LabelStack *seenLabels() { return &ls; }
    217 
    218   private:
    219 
    220     List scope;
    221     Object variable;
    222     Object thisVal;
    223     ContextImp *callingCon;
    224     Object activation;
    225     FunctionImp *_function;
    226     const ArgumentList *_arguments;
    227 
    228     LabelStack ls;
    229     CodeType codeType;
    230   };
    231 
    232   /**
    233198   * @internal
    234199   *
     
    309274    InterpreterImp *nextInterpreter() const { return next; }
    310275    InterpreterImp *prevInterpreter() const { return prev; }
     276   
     277    void setContext(ContextImp *c) { _context = c; }
    311278
    312279  private:
     
    360327    static InterpreterImp* s_hook;
    361328    InterpreterImp *next, *prev;
     329   
     330    ContextImp *_context;
    362331
    363332    int recursion;
Note: See TracChangeset for help on using the changeset viewer.