Changeset 27100 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Oct 26, 2007, 3:36:45 AM (18 years ago)
Author:
mjs
Message:

Windows build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r27097 r27100  
    181181static inline int currentSourceId(ExecState* exec)
    182182{
    183     return exec->context()->currentBody()->sourceId();
     183    return exec->currentBody()->sourceId();
    184184}
    185185
     
    187187static inline const UString& currentSourceURL(ExecState* exec)
    188188{
    189     return exec->context()->currentBody()->sourceURL();
     189    return exec->currentBody()->sourceURL();
    190190}
    191191
     
    371371JSValue *ThisNode::evaluate(ExecState *exec)
    372372{
    373   return exec->context()->thisValue();
     373  return exec->thisValue();
    374374}
    375375
     
    379379JSValue *ResolveNode::evaluate(ExecState *exec)
    380380{
    381   const ScopeChain& chain = exec->context()->scopeChain();
     381  const ScopeChain& chain = exec->scopeChain();
    382382  ScopeChainIterator iter = chain.begin();
    383383  ScopeChainIterator end = chain.end();
     
    649649JSValue *FunctionCallResolveNode::evaluate(ExecState *exec)
    650650{
    651   const ScopeChain& chain = exec->context()->scopeChain();
     651  const ScopeChain& chain = exec->scopeChain();
    652652  ScopeChainIterator iter = chain.begin();
    653653  ScopeChainIterator end = chain.end();
     
    792792JSValue *PostfixResolveNode::evaluate(ExecState *exec)
    793793{
    794   const ScopeChain& chain = exec->context()->scopeChain();
     794  const ScopeChain& chain = exec->scopeChain();
    795795  ScopeChainIterator iter = chain.begin();
    796796  ScopeChainIterator end = chain.end();
     
    894894JSValue *DeleteResolveNode::evaluate(ExecState *exec)
    895895{
    896   const ScopeChain& chain = exec->context()->scopeChain();
     896  const ScopeChain& chain = exec->scopeChain();
    897897  ScopeChainIterator iter = chain.begin();
    898898  ScopeChainIterator end = chain.end();
     
    999999JSValue *TypeOfResolveNode::evaluate(ExecState *exec)
    10001000{
    1001   const ScopeChain& chain = exec->context()->scopeChain();
     1001  const ScopeChain& chain = exec->scopeChain();
    10021002  ScopeChainIterator iter = chain.begin();
    10031003  ScopeChainIterator end = chain.end();
     
    10371037JSValue *PrefixResolveNode::evaluate(ExecState *exec)
    10381038{
    1039   const ScopeChain& chain = exec->context()->scopeChain();
     1039  const ScopeChain& chain = exec->scopeChain();
    10401040  ScopeChainIterator iter = chain.begin();
    10411041  ScopeChainIterator end = chain.end();
     
    16111611JSValue *AssignResolveNode::evaluate(ExecState *exec)
    16121612{
    1613   const ScopeChain& chain = exec->context()->scopeChain();
     1613  const ScopeChain& chain = exec->scopeChain();
    16141614  ScopeChainIterator iter = chain.begin();
    16151615  ScopeChainIterator end = chain.end();
     
    18051805JSValue* VarDeclNode::evaluate(ExecState* exec)
    18061806{
    1807     const ScopeChain& chain = exec->context()->scopeChain();
    1808     JSObject* variableObject = exec->context()->variableObject();
     1807    const ScopeChain& chain = exec->scopeChain();
     1808    JSObject* variableObject = exec->variableObject();
    18091809
    18101810    ASSERT(!chain.isEmpty());
     
    18151815        JSValue* val = init ? init->evaluate(exec) : jsUndefined();
    18161816        int flags = Internal;
    1817         if (exec->context()->codeType() != EvalCode)
     1817        if (exec->codeType() != EvalCode)
    18181818            flags |= DontDelete;
    18191819        if (varType == VarDeclNode::Constant)
     
    19841984
    19851985  do {
    1986     exec->context()->pushIteration();
     1986    exec->pushIteration();
    19871987    c = statement->execute(exec);
    1988     exec->context()->popIteration();
     1988    exec->popIteration();
    19891989   
    19901990    if (exec->dynamicInterpreter()->timedOut())
     
    20332033      return Completion(Normal, value);
    20342034
    2035     exec->context()->pushIteration();
     2035    exec->pushIteration();
    20362036    c = statement->execute(exec);
    2037     exec->context()->popIteration();
     2037    exec->popIteration();
    20382038
    20392039    if (exec->dynamicInterpreter()->timedOut())
     
    20792079    }
    20802080
    2081     exec->context()->pushIteration();
     2081    exec->pushIteration();
    20822082    Completion c = statement->execute(exec);
    2083     exec->context()->popIteration();
     2083    exec->popIteration();
    20842084    if (c.isValueCompletion())
    20852085      cval = c.value();
     
    21752175        const Identifier &ident = static_cast<ResolveNode *>(lexpr.get())->identifier();
    21762176
    2177         const ScopeChain& chain = exec->context()->scopeChain();
     2177        const ScopeChain& chain = exec->scopeChain();
    21782178        ScopeChainIterator iter = chain.begin();
    21792179        ScopeChainIterator end = chain.end();
     
    22182218    KJS_CHECKEXCEPTION
    22192219
    2220     exec->context()->pushIteration();
     2220    exec->pushIteration();
    22212221    c = statement->execute(exec);
    2222     exec->context()->popIteration();
     2222    exec->popIteration();
    22232223    if (c.isValueCompletion())
    22242224      retval = c.value();
     
    22432243  KJS_BREAKPOINT;
    22442244
    2245   if (ident.isEmpty() && !exec->context()->inIteration())
     2245  if (ident.isEmpty() && !exec->inIteration())
    22462246    return createErrorCompletion(exec, SyntaxError, "Invalid continue statement.");
    2247   if (!ident.isEmpty() && !exec->context()->seenLabels()->contains(ident))
     2247  if (!ident.isEmpty() && !exec->seenLabels()->contains(ident))
    22482248    return createErrorCompletion(exec, SyntaxError, "Label %s not found.", ident);
    22492249  return Completion(Continue, &ident);
     
    22572257  KJS_BREAKPOINT;
    22582258
    2259   if (ident.isEmpty() && !exec->context()->inIteration() &&
    2260       !exec->context()->inSwitch())
     2259  if (ident.isEmpty() && !exec->inIteration() &&
     2260      !exec->inSwitch())
    22612261    return createErrorCompletion(exec, SyntaxError, "Invalid break statement.");
    2262   if (!ident.isEmpty() && !exec->context()->seenLabels()->contains(ident))
     2262  if (!ident.isEmpty() && !exec->seenLabels()->contains(ident))
    22632263    return createErrorCompletion(exec, SyntaxError, "Label %s not found.");
    22642264  return Completion(Break, &ident);
     
    22722272  KJS_BREAKPOINT;
    22732273
    2274   CodeType codeType = exec->context()->codeType();
     2274  CodeType codeType = exec->codeType();
    22752275  if (codeType != FunctionCode)
    22762276    return createErrorCompletion(exec, SyntaxError, "Invalid return statement.");
     
    23022302  JSObject *o = v->toObject(exec);
    23032303  KJS_CHECKEXCEPTION
    2304   exec->context()->pushScope(o);
     2304  exec->pushScope(o);
    23052305  Completion res = statement->execute(exec);
    2306   exec->context()->popScope();
     2306  exec->popScope();
    23072307
    23082308  return res;
     
    24762476  KJS_CHECKEXCEPTION
    24772477
    2478   exec->context()->pushSwitch();
     2478  exec->pushSwitch();
    24792479  Completion res = block->evalBlock(exec,v);
    2480   exec->context()->popSwitch();
     2480  exec->popSwitch();
    24812481
    24822482  if ((res.complType() == Break) && ls.contains(res.target()))
     
    24962496Completion LabelNode::execute(ExecState *exec)
    24972497{
    2498   if (!exec->context()->seenLabels()->push(label))
     2498  if (!exec->seenLabels()->push(label))
    24992499    return createErrorCompletion(exec, SyntaxError, "Duplicated label %s found.", label);
    25002500  Completion e = statement->execute(exec);
    2501   exec->context()->seenLabels()->pop();
     2501  exec->seenLabels()->pop();
    25022502
    25032503  if ((e.complType() == Break) && (e.target() == label))
     
    25452545    JSObject *obj = new JSObject;
    25462546    obj->put(exec, exceptionIdent, c.value(), DontDelete);
    2547     exec->context()->pushScope(obj);
     2547    exec->pushScope(obj);
    25482548    c = catchBlock->execute(exec);
    2549     exec->context()->popScope();
     2549    exec->popScope();
    25502550  }
    25512551
     
    26112611    size_t i, size;
    26122612
    2613     Context* context = exec->context();
    2614     JSObject* variableObject = context->variableObject();
     2613    JSObject* variableObject = exec->variableObject();
    26152614
    26162615    int minAttributes = Internal | DontDelete;
     
    26252624    }
    26262625
    2627     const List& args = *context->arguments();
     2626    const List& args = *exec->arguments();
    26282627    for (i = 0, size = m_parameters.size(); i < size; ++i)
    26292628        variableObject->put(exec, m_parameters[i], args[i], DontDelete);
     
    26392638    size_t i, size;
    26402639
    2641     Context* context = exec->context();
    2642     JSObject* variableObject = context->variableObject();
     2640    JSObject* variableObject = exec->variableObject();
    26432641   
    2644     int minAttributes = Internal | (exec->context()->codeType() != EvalCode ? DontDelete : 0);
     2642    int minAttributes = Internal | (exec->codeType() != EvalCode ? DontDelete : 0);
    26452643
    26462644    for (i = 0, size = m_varStack.size(); i < size; ++i) {
     
    26852683        initializeDeclarationStacks(exec);
    26862684
    2687     if (exec->context()->codeType() == FunctionCode)
     2685    if (exec->codeType() == FunctionCode)
    26882686        processDeclarationsFunctionCode(exec);
    26892687    else
     
    27122710FunctionImp* FuncDeclNode::makeFunction(ExecState* exec)
    27132711{
    2714   FunctionImp *func = new FunctionImp(exec, ident, body.get(), exec->context()->scopeChain());
     2712  FunctionImp *func = new FunctionImp(exec, ident, body.get(), exec->scopeChain());
    27152713
    27162714  JSObject *proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());
     
    27382736JSValue *FuncExprNode::evaluate(ExecState *exec)
    27392737{
    2740   Context *context = exec->context();
    27412738  bool named = !ident.isNull();
    27422739  JSObject *functionScopeObject = 0;
     
    27472744    // be contained as single property in an anonymous object.
    27482745    functionScopeObject = new JSObject;
    2749     context->pushScope(functionScopeObject);
    2750   }
    2751 
    2752   FunctionImp* func = new FunctionImp(exec, ident, body.get(), context->scopeChain());
     2746    exec->pushScope(functionScopeObject);
     2747  }
     2748
     2749  FunctionImp* func = new FunctionImp(exec, ident, body.get(), exec->scopeChain());
    27532750  JSObject* proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());
    27542751  proto->put(exec, exec->propertyNames().constructor, func, ReadOnly | DontDelete | DontEnum);
     
    27562753
    27572754  if (named) {
    2758     functionScopeObject->put(exec, ident, func, Internal | ReadOnly | (context->codeType() == EvalCode ? 0 : DontDelete));
    2759     context->popScope();
     2755    functionScopeObject->put(exec, ident, func, Internal | ReadOnly | (exec->codeType() == EvalCode ? 0 : DontDelete));
     2756    exec->popScope();
    27602757  }
    27612758
Note: See TracChangeset for help on using the changeset viewer.