Ignore:
Timestamp:
Mar 21, 2008, 4:14:49 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Oliver Hunt.

Consolidate static identifier initializers within CommonIdentifiers.

No reliably measurable change on SunSpider; maybe a tiny improvement (within 0.2%).

  • kjs/CommonIdentifiers.h: Added static identifiers that were lazily initialized throughout the code.
  • kjs/date_object.cpp: (KJS::DateObjectImp::DateObjectImp):
  • kjs/function_object.cpp: (KJS::FunctionPrototype::FunctionPrototype):
  • kjs/object_object.cpp: (KJS::ObjectPrototype::ObjectPrototype):
  • kjs/regexp_object.cpp: (KJS::RegExpPrototype::RegExpPrototype): Use the values from CommonIdentifiers.
  • kjs/lookup.h: Caching the identifier in a static wasn't a win on SunSpider, removed it.
  • kjs/value.h: (KJS::jsNaN): We already have a shared NaN value, no need for a duplicate here.
  • wtf/MathExtras.h: (wtf_atan2): Having local variables for numeric_limits constants is good for readability, but there is no reason to keep them static.
File:
1 edited

Legend:

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

    r30871 r31208  
    2828// ways without repeating the list.
    2929#define KJS_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
     30    macro(__defineGetter__) \
     31    macro(__defineSetter__) \
     32    macro(__lookupGetter__) \
     33    macro(__lookupSetter__) \
     34    macro(apply) \
    3035    macro(arguments) \
     36    macro(call) \
    3137    macro(callee) \
    3238    macro(caller) \
     39    macro(compile) \
    3340    macro(constructor) \
     41    macro(eval) \
     42    macro(exec) \
    3443    macro(fromCharCode) \
    3544    macro(global) \
     45    macro(hasOwnProperty) \
    3646    macro(ignoreCase) \
    3747    macro(index) \
    3848    macro(input) \
     49    macro(isPrototypeOf) \
    3950    macro(length) \
    4051    macro(message) \
    4152    macro(multiline) \
    4253    macro(name) \
     54    macro(parse) \
     55    macro(propertyIsEnumerable) \
    4356    macro(prototype) \
    4457    macro(source) \
     58    macro(test) \
    4559    macro(toExponential) \
    4660    macro(toFixed) \
     
    4862    macro(toPrecision) \
    4963    macro(toString) \
    50     macro(valueOf) \
    51     macro(eval)
     64    macro(UTC) \
     65    macro(valueOf)
    5266
    5367namespace KJS {
Note: See TracChangeset for help on using the changeset viewer.