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


Ignore:
Timestamp:
Nov 20, 2002, 4:55:08 PM (23 years ago)
Author:
darin
Message:
  • created argument list objects only on demand for a 7.5% speedup
  • kjs/function.h: Change ActivationImp around.
  • kjs/function.cpp: (FunctionImp::call): Pass a pointer to the arguments list to avoid ref/unref. (FunctionImp::get): Get the function pointer from the context directly, not the activation object. (ArgumentsImp::ArgumentsImp): Add an overload that takes no arguments. (ActivationImp::ActivationImp): Store a context pointer and an arguments object pointer. (ActivationImp::get): Special case for arguments, create it and return it. (ActivationImp::put): Special case for arguments, can't be set. (ActivationImp::hasProperty): Special case for arguments, return true. (ActivationImp::deleteProperty): Special case for arguments, refuse to delete. (ActivationImp::mark): Mark the arguments object. (ActivationImp::createArgumentsObject): Do the work of actually creating it. (GlobalFuncImp::call): Use stack-based objects for the ContextImp and ExecState.
  • kjs/internal.h: Keep function and arguments pointer in the context.
  • kjs/internal.cpp: (ContextImp::ContextImp): Don't pass in the func and args when making an ActivationImp. (InterpreterImp::evaluate): Use stack-based objects here.
  • kjs/types.h: Add ArgumentList as a synonym for List, soon to be separate.
File:
1 edited

Legend:

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

    r2783 r2792  
    200200  public:
    201201    ContextImp(Object &glob, ExecState *exec, Object &thisV, CodeType type = GlobalCode,
    202                ContextImp *_callingContext = 0L, FunctionImp *func = 0L, const List &args = List());
    203     virtual ~ContextImp();
     202               ContextImp *_callingContext = 0L, FunctionImp *func = 0L, const ArgumentList *args = 0);
     203    ~ContextImp();
    204204
    205205    const List scopeChain() const { return scope; }
     
    209209    ContextImp *callingContext() { return callingCon; }
    210210    ObjectImp *activationObject() { return activation.imp(); }
     211    FunctionImp *function() const { return _function; }
     212    const ArgumentList *arguments() const { return _arguments; }
    211213
    212214    void pushScope(const Object &s);
     
    221223    ContextImp *callingCon;
    222224    Object activation;
    223 
     225    FunctionImp *_function;
     226    const ArgumentList *_arguments;
    224227
    225228    LabelStack ls;
Note: See TracChangeset for help on using the changeset viewer.