Ignore:
Timestamp:
Nov 18, 2002, 2:49:26 PM (23 years ago)
Author:
darin
Message:
  • simplified the ExecState class, which was showing up in profiles

Sped up JavaScript iBench by 6%.

  • kjs/interpreter.h: Removed the level of indirection, and made it all inline.
  • kjs/interpreter.cpp: Removed ExecState implementation from here altogether.
  • fixed an oversight in my sort speedup
  • kjs/array_object.h: Add pushUndefinedObjectsToEnd.
  • kjs/array_object.cpp: (ArrayInstanceImp::sort): Call pushUndefinedObjectsToEnd. (ArrayInstanceImp::pushUndefinedObjectsToEnd): Added. Pushes all undefined to the end of the array.
File:
1 edited

Legend:

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

    r1024 r2738  
    369369    friend class GlobalFuncImp;
    370370  public:
    371     virtual ~ExecState();
    372 
    373371    /**
    374372     * Returns the interpreter associated with this execution state
     
    376374     * @return The interpreter executing the script
    377375     */
    378     Interpreter *interpreter() const;
     376    Interpreter *interpreter() const { return _interpreter; }
    379377
    380378    /**
     
    383381     * @return The current execution state context
    384382     */
    385     const Context context() const;
    386 
    387     void setException(const Value &e);
    388     void clearException();
    389     Value exception() const;
    390     bool hadException() const;
     383    const Context context() const { return _context; }
     384
     385    void setException(const Value &e) { _exception = e; }
     386    void clearException() { _exception = Value(); }
     387    Value exception() const { return _exception; }
     388    bool hadException() const { return !_exception.isNull(); }
    391389
    392390  private:
    393     ExecState(Interpreter *interp, ContextImp *con);
    394     ExecStateImp *rep;
     391    ExecState(Interpreter *interp, ContextImp *con)
     392        : _interpreter(interp), _context(con) { }
     393    Interpreter *_interpreter;
     394    ContextImp *_context;
     395    Value _exception;
    395396  };
    396397
Note: See TracChangeset for help on using the changeset viewer.