Ignore:
Timestamp:
Aug 18, 2002, 12:21:26 AM (23 years ago)
Author:
mjs
Message:

Separated Completion from Value and made it a pure stack
object. This removed another 160,000 of the remaining 580,000
garbage collected object allocations.

6% speed increas on cvs-js-performance test.

  • kjs/completion.cpp: Added. New implementation that doesn't require a ValueImp *. (Completion::Completion): (Completion::complType): (Completion::value): (Completion::target): (Completion::isValueCompletion):
  • kjs/completion.h: Added.
  • kjs/function.cpp: (GlobalFuncImp::call): Removed some (apparently mistaken) uses of Completion as a Value.
  • kjs/internal.cpp:
  • kjs/internal.h:
  • kjs/types.cpp: Removed Completion stuff.
  • kjs/types.h: Removed Completion stuff.
  • JavaScriptCore.pbproj/project.pbxproj: Added new header.
File:
1 edited

Legend:

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

    r1850 r1859  
    330330    tos = prev;
    331331  }
    332 }
    333 
    334 // ------------------------------ CompletionImp --------------------------------
    335 
    336 CompletionImp::CompletionImp(ComplType c, const Value& v, const UString& t)
    337   : comp(c), val(v.imp()), tar(t)
    338 {
    339 }
    340 
    341 CompletionImp::~CompletionImp()
    342 {
    343 }
    344 
    345 void CompletionImp::mark()
    346 {
    347   ValueImp::mark();
    348 
    349   if (val && !val->marked())
    350     val->mark();
    351 }
    352 
    353 Value CompletionImp::toPrimitive(ExecState */*exec*/, Type /*preferredType*/) const
    354 {
    355   // invalid for Completion
    356   assert(false);
    357   return Value();
    358 }
    359 
    360 bool CompletionImp::toBoolean(ExecState */*exec*/) const
    361 {
    362   // invalid for Completion
    363   assert(false);
    364   return false;
    365 }
    366 
    367 double CompletionImp::toNumber(ExecState */*exec*/) const
    368 {
    369   // invalid for Completion
    370   assert(false);
    371   return 0;
    372 }
    373 
    374 UString CompletionImp::toString(ExecState */*exec*/) const
    375 {
    376   // invalid for Completion
    377   assert(false);
    378   return UString::null;
    379 }
    380 
    381 Object CompletionImp::toObject(ExecState */*exec*/) const
    382 {
    383   // invalid for Completion
    384   assert(false);
    385   return Object();
    386332}
    387333
Note: See TracChangeset for help on using the changeset viewer.