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


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

    r1850 r1859  
    143143  // ---------------------------------------------------------------------------
    144144
    145   class CompletionImp : public ValueImp {
    146   public:
    147     Type type() const { return CompletionType; }
    148 
    149     CompletionImp(ComplType c, const Value& v, const UString& t);
    150     virtual ~CompletionImp();
    151     virtual void mark();
    152 
    153     Value toPrimitive(ExecState *exec, Type preferred = UnspecifiedType) const;
    154     bool toBoolean(ExecState *exec) const;
    155     double toNumber(ExecState *exec) const;
    156     UString toString(ExecState *exec) const;
    157     Object toObject(ExecState *exec) const;
    158 
    159     ComplType complType() const { return comp; }
    160     Value value() const { return Value(val); }
    161     UString target() const { return tar; }
    162 
    163   private:
    164     ComplType comp;
    165     ValueImp * val;
    166     UString tar;
    167   };
    168 
    169   inline Completion::Completion(CompletionImp *imp) : Value(imp) { }
    170 
    171145  /**
    172146   * @internal
Note: See TracChangeset for help on using the changeset viewer.