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


Ignore:
Timestamp:
Oct 26, 2007, 1:32:40 AM (18 years ago)
Author:
mjs
Message:

JavaScriptCore:

Reviewed by Oliver.


  • moved Context class into ExecState.{h,cpp} in preparation for merging ExecState and Context classes.
  • kjs/ExecState.h: Moved CodeType enum and Context class here in preparation for merging ExecState and Context.
  • kjs/ExecState.cpp: Moved Context class here from Context.cpp. (KJS::Context::Context): (KJS::Context::~Context): (KJS::Context::mark):
  • kjs/context.h: Removed.
  • kjs/Context.cpp: Removed.
  • kjs/function.h: Removed CodeType enum.
  • kjs/LabelStack.h: Added. Pulled LabelStack class out of internal.h.
  • kjs/internal.h: Removed LabelStack.
  • JavaScriptCore.xcodeproj/project.pbxproj: Added new file, removed ones that are gone.
  • kjs/collector.cpp: Fixed includes.
  • kjs/function.cpp: ditto
  • kjs/internal.cpp: ditto
  • kjs/interpreter.cpp: ditto
  • kjs/lookup.h: ditto
  • kjs/nodes.cpp: ditto

WebCore:

Reviewed by Oliver.

  • bindings/objc/WebScriptObject.mm:
  • bridge/mac/WebCoreScriptDebugger.mm:
File:
1 edited

Legend:

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

    r27095 r27097  
    9191
    9292
    93   /**
    94    * @short The "label set" in Ecma-262 spec
    95    */
    96   class LabelStack : Noncopyable {
    97   public:
    98     LabelStack()
    99       : tos(0)
    100     {
    101     }
    102     ~LabelStack();
    103 
    104     /**
    105      * If id is not empty and is not in the stack already, puts it on top of
    106      * the stack and returns true, otherwise returns false
    107      */
    108     bool push(const Identifier &id);
    109     /**
    110      * Is the id in the stack?
    111      */
    112     bool contains(const Identifier &id) const;
    113     /**
    114      * Removes from the stack the last pushed id (what else?)
    115      */
    116     void pop();
    117 
    118   private:
    119     struct StackElem {
    120       Identifier id;
    121       StackElem *prev;
    122     };
    123 
    124     StackElem *tos;
    125   };
    126 
    127 
    12893  // ---------------------------------------------------------------------------
    12994  //                            Evaluation
     
    150115#endif
    151116
    152 inline LabelStack::~LabelStack()
    153 {
    154     StackElem *prev;
    155     for (StackElem *e = tos; e; e = prev) {
    156         prev = e->prev;
    157         delete e;
    158     }
    159 }
    160 
    161 inline void LabelStack::pop()
    162 {
    163     if (StackElem *e = tos) {
    164         tos = e->prev;
    165         delete e;
    166     }
    167 }
    168 
    169117} // namespace
    170118
Note: See TracChangeset for help on using the changeset viewer.