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.cpp

    r2256 r2738  
    318318#endif
    319319
    320 // ------------------------------ ExecState --------------------------------------
    321 
    322 namespace KJS {
    323   class ExecStateImp
    324   {
    325   public:
    326     ExecStateImp(Interpreter *interp, ContextImp *con)
    327       : interpreter(interp), context(con) {};
    328     Interpreter *interpreter;
    329     ContextImp *context;
    330     Value exception;
    331   };
    332 };
    333 
    334 ExecState::~ExecState()
    335 {
    336   delete rep;
    337 }
    338 
    339 Interpreter *ExecState::interpreter() const
    340 {
    341   return rep->interpreter;
    342 }
    343 
    344 const Context ExecState::context() const
    345 {
    346   return rep->context;
    347 }
    348 
    349 void ExecState::setException(const Value &e)
    350 {
    351   rep->exception = e;
    352 }
    353 
    354 void ExecState::clearException()
    355 {
    356   rep->exception = Value();
    357 }
    358 
    359 Value ExecState::exception() const
    360 {
    361   return rep->exception;
    362 }
    363 
    364 bool ExecState::hadException() const
    365 {
    366   return !rep->exception.isNull();
    367 }
    368 
    369 ExecState::ExecState(Interpreter *interp, ContextImp *con)
    370 {
    371   rep = new ExecStateImp(interp,con);
    372 }
    373 
    374320void Interpreter::virtual_hook( int, void* )
    375321{ /*BASE::virtual_hook( id, data );*/ }
Note: See TracChangeset for help on using the changeset viewer.