Changeset 16117 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Aug 30, 2006, 11:45:07 AM (19 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed, tweaked by ggaren.


  • kjs/ExecState.cpp: (KJS::ExecState::ExecState):
  • kjs/ExecState.h:
  • kjs/context.h: (KJS::Context::setExecState): (KJS::Context::execState):

LayoutTests:

Reviewed by ggaren.

WebCore:

Reviewed, tweaked by ggaren.


Location:
trunk/JavaScriptCore/kjs
Files:
3 edited

Legend:

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

    r14834 r16117  
    3030namespace KJS  {
    3131
     32  class ExecState;
     33 
    3234  /**
    3335   * @short Execution context.
     
    118120    void mark();
    119121
     122    void setExecState(ExecState* exec) { m_execState = exec; }
     123    ExecState* execState() { return m_execState; }
     124
    120125  private:
    121126    // Contexts are always stack-allocated, and the garbage collector
     
    125130    Context* m_callingContext;
    126131    FunctionBodyNode* m_currentBody;
     132    ExecState* m_execState;
    127133
    128134    FunctionImp* m_function;
  • trunk/JavaScriptCore/kjs/function.cpp

    r15846 r16117  
    8383  if (exec->hadException())
    8484    newExec.setException(exec->exception());
     85  ctx.setExecState(&newExec);
    8586
    8687  // assign user supplied arguments to parameters
     
    819820                       EvalCode,
    820821                       exec->context());
    821        
    822822        ExecState newExec(exec->dynamicInterpreter(), &ctx);
    823823        if (exec->hadException())
    824824            newExec.setException(exec->exception());
     825        ctx.setExecState(&newExec);
    825826       
    826827        // execute the code
  • trunk/JavaScriptCore/kjs/interpreter.cpp

    r15990 r16117  
    471471        Context ctx(globalObj, this, thisObj, progNode.get());
    472472        ExecState newExec(this, &ctx);
     473        ctx.setExecState(&newExec);
    473474        progNode->processVarDecls(&newExec);
    474475        res = progNode->execute(&newExec);
Note: See TracChangeset for help on using the changeset viewer.