Changeset 26620 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 15, 2007, 1:41:39 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by Darin Adler.


Removed the concept of AnonymousCode. It was unused, and it doesn't
exist in the ECMA spec.


[ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]

  • kjs/Context.cpp: (KJS::Context::Context):
  • kjs/function.h: (KJS::):
  • kjs/nodes.cpp: (ReturnNode::execute):
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r26619 r26620  
     12007-10-15  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Darin Adler.
     4       
     5        Removed the concept of AnonymousCode. It was unused, and it doesn't
     6        exist in the ECMA spec.
     7       
     8        [ Patch broken off from http://bugs.webkit.org/show_bug.cgi?id=14868 ]
     9
     10        * kjs/Context.cpp:
     11        (KJS::Context::Context):
     12        * kjs/function.h:
     13        (KJS::):
     14        * kjs/nodes.cpp:
     15        (ReturnNode::execute):
     16
    1172007-10-15  Geoffrey Garen  <[email protected]>
    218
  • trunk/JavaScriptCore/kjs/Context.cpp

    r25534 r26620  
    4343   
    4444    // create and initialize activation object (ECMA 10.1.6)
    45     if (type == FunctionCode || type == AnonymousCode ) {
     45    if (type == FunctionCode) {
    4646        m_activation = new ActivationImp(func, *args);
    4747        m_variable = m_activation;
     
    6666        break;
    6767    case FunctionCode:
    68     case AnonymousCode:
    69         if (type == FunctionCode) {
    70             scope = func->scope();
    71             scope.push(m_activation);
    72         } else {
    73             scope.clear();
    74             scope.push(glob);
    75             scope.push(m_activation);
    76         }
     68        scope = func->scope();
     69        scope.push(m_activation);
    7770        m_variable = m_activation; // TODO: DontDelete ? (ECMA 10.2.3)
    7871        m_thisVal = thisV;
    7972        break;
    8073    }
    81    
     74
    8275    m_interpreter->setContext(this);
    8376}
  • trunk/JavaScriptCore/kjs/function.h

    r24394 r26620  
    3535  class FunctionPrototype;
    3636
    37   enum CodeType { GlobalCode,
    38                   EvalCode,
    39                   FunctionCode,
    40                   AnonymousCode };
     37  enum CodeType {
     38      GlobalCode,
     39      EvalCode,
     40      FunctionCode,
     41  };
    4142
    4243  class InternalFunctionImp : public JSObject {
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r26617 r26620  
    21082108
    21092109  CodeType codeType = exec->context()->codeType();
    2110   if (codeType != FunctionCode && codeType != AnonymousCode ) {
     2110  if (codeType != FunctionCode)
    21112111    return createErrorCompletion(exec, SyntaxError, "Invalid return statement.");
    2112   }
    21132112
    21142113  if (!value)
Note: See TracChangeset for help on using the changeset viewer.