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


Ignore:
Timestamp:
Oct 28, 2007, 9:53:26 PM (18 years ago)
Author:
eseidel
Message:

2007-10-28 Eric Seidel <[email protected]>

Reviewed by darin.


Inline UString::Rep::deref() for a 0.8% improvement in SunSpider
Add virtual keyword to a few virtual functions previously unmarked.

  • kjs/internal.h: (KJS::StringImp::type): (KJS::NumberImp::type):
  • kjs/ustring.h: (KJS::UString::Rep::deref):
File:
1 edited

Legend:

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

    r27107 r27209  
    5252    UString value() const { return val; }
    5353
    54     JSType type() const { return StringType; }
     54    virtual JSType type() const { return StringType; }
    5555
    56     JSValue* toPrimitive(ExecState*, JSType preferred = UnspecifiedType) const;
    57     bool getPrimitiveNumber(ExecState*, double& number) const;
    58     bool toBoolean(ExecState *exec) const;
    59     double toNumber(ExecState *exec) const;
    60     UString toString(ExecState *exec) const;
    61     JSObject *toObject(ExecState *exec) const;
     56    virtual JSValue* toPrimitive(ExecState*, JSType preferred = UnspecifiedType) const;
     57    virtual bool getPrimitiveNumber(ExecState*, double& number) const;
     58    virtual bool toBoolean(ExecState *exec) const;
     59    virtual double toNumber(ExecState *exec) const;
     60    virtual UString toString(ExecState *exec) const;
     61    virtual JSObject *toObject(ExecState *exec) const;
    6262
    6363  private:
     
    7171    double value() const { return val; }
    7272
    73     JSType type() const { return NumberType; }
     73    virtual JSType type() const { return NumberType; }
    7474
    75     JSValue* toPrimitive(ExecState*, JSType preferred = UnspecifiedType) const;
    76     bool getPrimitiveNumber(ExecState*, double& number) const;
    77     bool toBoolean(ExecState *exec) const;
    78     double toNumber(ExecState *exec) const;
    79     UString toString(ExecState *exec) const;
    80     JSObject *toObject(ExecState *exec) const;
     75    virtual JSValue* toPrimitive(ExecState*, JSType preferred = UnspecifiedType) const;
     76    virtual bool getPrimitiveNumber(ExecState*, double& number) const;
     77    virtual bool toBoolean(ExecState *exec) const;
     78    virtual double toNumber(ExecState *exec) const;
     79    virtual UString toString(ExecState *exec) const;
     80    virtual JSObject *toObject(ExecState *exec) const;
    8181   
    8282    void* operator new(size_t size)
Note: See TracChangeset for help on using the changeset viewer.