Changeset 169979 in webkit


Ignore:
Timestamp:
Jun 14, 2014 1:38:45 PM (10 years ago)
Author:
weinig@apple.com
Message:

Store DOM constants directly in the JS object rather than jumping through a custom accessor
https://bugs.webkit.org/show_bug.cgi?id=133898

Reviewed by Oliver Hunt.

Source/JavaScriptCore:

  • runtime/Lookup.h:

(JSC::HashTableValue::attributes):
Switch attributes to be stored as an unsigned rather than an unsigned char, since there is no difference in memory use
and will make adding more flags possibles.

(JSC::HashTableValue::propertyGetter):
(JSC::HashTableValue::propertyPutter):
Change assertion to use BuiltinOrFunctionOrConstant.

(JSC::HashTableValue::constantInteger):
Added.

(JSC::getStaticPropertySlot):
(JSC::getStaticValueSlot):
Use PropertySlot::setValue() for constants during static lookup.

(JSC::reifyStaticProperties):
Put the constant directly on the object when eagerly reifying.

  • runtime/PropertySlot.h:

Add ConstantInteger flag and BuiltinOrFunctionOrConstant helper.

Source/WebCore:
Instead of implementing constants as custom accessors that just happen to return a value,
we now store the constant directly in the HashTableValue array (where the GetValueFunc used
to be).

  • For the case where the constant is accessed via the static table (still in use for instances and some prototypes), the static lookup function will set the value on the property slot, instead of passing a function pointer.
  • For the case where the constant is eagerly reified (most prototypes and all constructors) the constant is put directly in the object.

In micro benchmarks this looks to be around a 4x speedup on the use of DOM constants.

This also removes support for constant strings in IDL, which we had no uses of.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
Remove code to generate forward declaration of constant accessor functions.

(GenerateImplementation):
Remove code to generate implementation of constant accessor functions.

(GenerateHashTableValueArray):
Plant the constant directly in the value array.

  • bindings/scripts/IDLParser.pm:

(parseConstValue):
Remove support for constant strings.

  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestObj.h:
  • bindings/scripts/test/ObjC/DOMTestObj.h:
  • bindings/scripts/test/TestObj.idl:

Update test results.

Location:
trunk/Source
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r169973 r169979  
     12014-06-13  Sam Weinig  <sam@webkit.org>
     2
     3        Store DOM constants directly in the JS object rather than jumping through a custom accessor
     4        https://bugs.webkit.org/show_bug.cgi?id=133898
     5
     6        Reviewed by Oliver Hunt.
     7
     8        * runtime/Lookup.h:
     9        (JSC::HashTableValue::attributes):
     10        Switch attributes to be stored as an unsigned rather than an unsigned char, since there is no difference in memory use
     11        and will make adding more flags possibles.
     12
     13        (JSC::HashTableValue::propertyGetter):
     14        (JSC::HashTableValue::propertyPutter):
     15        Change assertion to use BuiltinOrFunctionOrConstant.
     16
     17        (JSC::HashTableValue::constantInteger):
     18        Added.
     19
     20        (JSC::getStaticPropertySlot):
     21        (JSC::getStaticValueSlot):
     22        Use PropertySlot::setValue() for constants during static lookup.
     23
     24        (JSC::reifyStaticProperties):
     25        Put the constant directly on the object when eagerly reifying.
     26
     27        * runtime/PropertySlot.h:
     28        Add ConstantInteger flag and BuiltinOrFunctionOrConstant helper.
     29
    1302014-06-14  Michael Saboff  <msaboff@apple.com>
    231
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r169789 r169979  
    2525#include "CallFrame.h"
    2626#include "CustomGetterSetter.h"
     27#include "Identifier.h"
    2728#include "IdentifierInlines.h"
    2829#include "Intrinsic.h"
    29 #include "Identifier.h"
    3030#include "JSGlobalObject.h"
    3131#include "PropertySlot.h"
     
    4848    struct HashTableValue {
    4949        const char* m_key; // property name
    50         unsigned char m_attributes; // JSObject attributes
     50        unsigned m_attributes; // JSObject attributes
    5151        Intrinsic m_intrinsic;
    5252        intptr_t m_value1;
    5353        intptr_t m_value2;
    5454
    55         unsigned char attributes() const { return m_attributes; }
    56 
    57         Intrinsic intrinsic() const
    58         {
    59             ASSERT(m_attributes & Function);
    60             return m_intrinsic;
    61         }
    62 
     55        unsigned attributes() const { return m_attributes; }
     56
     57        Intrinsic intrinsic() const { ASSERT(m_attributes & Function); return m_intrinsic; }
    6358        BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_value1); }
    6459        NativeFunction function() const { ASSERT(m_attributes & Function); return reinterpret_cast<NativeFunction>(m_value1); }
    6560        unsigned char functionLength() const { ASSERT(m_attributes & Function); return static_cast<unsigned char>(m_value2); }
    6661
    67         GetFunction propertyGetter() const { ASSERT(!(m_attributes & BuiltinOrFunction)); return reinterpret_cast<GetFunction>(m_value1); }
    68         PutFunction propertyPutter() const { ASSERT(!(m_attributes & BuiltinOrFunction)); return reinterpret_cast<PutFunction>(m_value2); }
     62        GetFunction propertyGetter() const { ASSERT(!(m_attributes & BuiltinOrFunctionOrConstant)); return reinterpret_cast<GetFunction>(m_value1); }
     63        PutFunction propertyPutter() const { ASSERT(!(m_attributes & BuiltinOrFunctionOrConstant)); return reinterpret_cast<PutFunction>(m_value2); }
     64
     65        intptr_t constantInteger() const { ASSERT(m_attributes & ConstantInteger); return m_value1; }
    6966
    7067        intptr_t lexerValue() const { ASSERT(!m_attributes); return m_value1; }
     
    7269
    7370    struct HashTable {
    74 
    7571        mutable int numberOfValues;
    7672        int indexMask;
     
    226222            return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
    227223
     224        if (entry->attributes() & ConstantInteger) {
     225            slot.setValue(thisObj, entry->attributes(), jsNumber(entry->constantInteger()));
     226            return true;
     227        }
     228   
    228229        slot.setCacheableCustom(thisObj, entry->attributes(), entry->propertyGetter());
    229230        return true;
     
    261262
    262263        ASSERT(!(entry->attributes() & BuiltinOrFunction));
     264
     265        if (entry->attributes() & ConstantInteger) {
     266            slot.setValue(thisObj, entry->attributes(), jsNumber(entry->constantInteger()));
     267            return true;
     268        }
    263269
    264270        slot.setCacheableCustom(thisObj, entry->attributes(), entry->propertyGetter());
     
    315321            }
    316322
     323            if (value.attributes() & ConstantInteger) {
     324                thisObj.putDirect(vm, propertyName, jsNumber(value.constantInteger()), value.attributes());
     325                continue;
     326            }
     327
    317328            if (value.attributes() & Accessor) {
    318329                RELEASE_ASSERT_NOT_REACHED();
  • trunk/Source/JavaScriptCore/runtime/PropertySlot.h

    r169668 r169979  
    4545    CustomAccessor    = 1 << 6,
    4646    Builtin           = 1 << 7, // property is a builtin function - only used by static hashtables
     47    ConstantInteger   = 1 << 8, // property is a constant integer - only used by static hashtables
    4748    BuiltinOrFunction = Builtin | Function, // helper only used by static hashtables
     49    BuiltinOrFunctionOrConstant = Builtin | Function | ConstantInteger, // helper only used by static hashtables
    4850};
    4951
  • trunk/Source/WebCore/ChangeLog

    r169978 r169979  
     12014-06-13  Sam Weinig  <sam@webkit.org>
     2
     3        Store DOM constants directly in the JS object rather than jumping through a custom accessor
     4        https://bugs.webkit.org/show_bug.cgi?id=133898
     5
     6        Reviewed by Oliver Hunt.
     7
     8        Instead of implementing constants as custom accessors that just happen to return a value,
     9        we now store the constant directly in the HashTableValue array (where the GetValueFunc used
     10        to be).
     11       
     12        - For the case where the constant is accessed via the static table (still in use for instances
     13          and some prototypes), the static lookup function will set the value on the property slot,
     14          instead of passing a function pointer.
     15        - For the case where the constant is eagerly reified (most prototypes and all constructors) the
     16          constant is put directly in the object.
     17
     18        In micro benchmarks this looks to be around a 4x speedup on the use of DOM constants.
     19
     20        This also removes support for constant strings in IDL, which we had no uses of.
     21
     22        * bindings/scripts/CodeGeneratorJS.pm:
     23        (GenerateHeader):
     24        Remove code to generate forward declaration of constant accessor functions.
     25
     26        (GenerateImplementation):
     27        Remove code to generate implementation of constant accessor functions.
     28
     29        (GenerateHashTableValueArray):
     30        Plant the constant directly in the value array.
     31
     32        * bindings/scripts/IDLParser.pm:
     33        (parseConstValue):
     34        Remove support for constant strings.
     35
     36        * bindings/scripts/test/JS/JSTestInterface.cpp:
     37        * bindings/scripts/test/JS/JSTestInterface.h:
     38        * bindings/scripts/test/JS/JSTestObj.cpp:
     39        * bindings/scripts/test/JS/JSTestObj.h:
     40        * bindings/scripts/test/ObjC/DOMTestObj.h:
     41        * bindings/scripts/test/TestObj.idl:
     42        Update test results.
     43
    1442014-06-14  Anders Carlsson  <andersca@apple.com>
    245
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r169954 r169979  
    12981298    }
    12991299
    1300     if ($numConstants > 0) {
    1301         push(@headerContent,"// Constants\n\n");
    1302         foreach my $constant (@{$interface->constants}) {
    1303             my $conditionalString = $codeGenerator->GenerateConditionalString($constant);
    1304             push(@headerContent, "#if ${conditionalString}\n") if $conditionalString;
    1305             my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($constant->name);
    1306             push(@headerContent, "JSC::EncodedJSValue ${getter}(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);\n");
    1307             push(@headerContent, "#endif\n") if $conditionalString;
    1308         }
    1309     }
    1310 
    13111300    my $conditionalString = $codeGenerator->GenerateConditionalString($interface);
    13121301    push(@headerContent, "\n} // namespace WebCore\n\n");
     
    17901779        my %conditionals = ();
    17911780
    1792         # FIXME: we should not need a function for every constant.
    17931781        foreach my $constant (@{$interface->constants}) {
    17941782            my $name = $constant->name;
    17951783            push(@hashKeys, $name);
    1796             my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($name);
    1797             push(@hashValue1, $getter);
     1784            push(@hashValue1, $constant->value);
    17981785            push(@hashValue2, "0");
    1799             push(@hashSpecials, "DontDelete | ReadOnly");
     1786            push(@hashSpecials, "DontDelete | ReadOnly | ConstantInteger");
    18001787
    18011788            my $implementedBy = $constant->extendedAttributes->{"ImplementedBy"};
     
    18931880    my $hashSize = $numFunctions + $numConstants + $numPrototypeAttributes;
    18941881
    1895     # FIXME: we should not need a function for every constant.
    18961882    foreach my $constant (@{$interface->constants}) {
    18971883        my $name = $constant->name;
     1884
    18981885        push(@hashKeys, $name);
    1899         my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($name);
    1900         push(@hashValue1, $getter);
     1886        push(@hashValue1, $constant->value);
    19011887        push(@hashValue2, "0");
    1902         push(@hashSpecials, "DontDelete | ReadOnly");
     1888        push(@hashSpecials, "DontDelete | ReadOnly | ConstantInteger");
    19031889
    19041890        my $conditional = $constant->extendedAttributes->{"Conditional"};
     
    28852871    # die "Can't generate binding for class with cached attribute and custom mark." if (($numCachedAttributes > 0) and ($interface->extendedAttributes->{"JSCustomMarkFunction"}));
    28862872
    2887     if ($numConstants > 0) {
    2888         push(@implContent, "// Constant getters\n\n");
    2889 
    2890         foreach my $constant (@{$interface->constants}) {
    2891             my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($constant->name);
    2892             my $conditional = $constant->extendedAttributes->{"Conditional"};
    2893 
    2894             if ($conditional) {
    2895                 my $conditionalString = $codeGenerator->GenerateConditionalStringFromAttributeValue($conditional);
    2896                 push(@implContent, "#if ${conditionalString}\n");
    2897             }
    2898 
    2899             if ($constant->type eq "DOMString") {
    2900                 push(@implContent, "EncodedJSValue ${getter}(ExecState* exec, JSObject*, EncodedJSValue, PropertyName)\n");
    2901                 push(@implContent, "{\n");
    2902                 push(@implContent, "    return JSValue::encode(jsStringOrNull(exec, String(" . $constant->value . ")));\n");
    2903             } else {
    2904                 push(@implContent, "EncodedJSValue ${getter}(ExecState*, JSObject*, EncodedJSValue, PropertyName)\n");
    2905                 push(@implContent, "{\n");
    2906                 push(@implContent, "    return JSValue::encode(jsNumber(" . $constant->value . "));\n");
    2907             }
    2908             push(@implContent, "}\n\n");
    2909             push(@implContent, "#endif\n") if $conditional;
    2910         }
    2911     }
    2912 
    29132873    if ($indexedGetterFunction) {
    29142874        if ($indexedGetterFunction->signature->type eq "DOMString") {
     
    40814041        if ("@$specials[$i]" =~ m/Function/) {
    40824042            $firstTargetType = "static_cast<NativeFunction>";
     4043        } elsif ("@$specials[$i]" =~ m/ConstantInteger/) {
     4044            $firstTargetType = "";
    40834045        } else {
    40844046            $firstTargetType = "static_cast<PropertySlot::GetValueFunc>";
  • trunk/Source/WebCore/bindings/scripts/IDLParser.pm

    r156808 r169979  
    906906        return $self->parseFloatLiteral();
    907907    }
    908     # backward compatibility
    909     if ($next->type() == StringToken) {
    910         return $self->getToken()->value();
    911     }
    912908    if ($next->type() == IntegerToken) {
    913909        return $self->getToken()->value();
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r169954 r169979  
    9494{
    9595#if ENABLE(Condition22) || ENABLE(Condition23)
    96     { "IMPLEMENTSCONSTANT1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceIMPLEMENTSCONSTANT1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    97 #else
    98     { 0, 0, NoIntrinsic, 0, 0 },
    99 #endif
    100 #if ENABLE(Condition22) || ENABLE(Condition23)
    101     { "IMPLEMENTSCONSTANT2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceIMPLEMENTSCONSTANT2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    102 #else
    103     { 0, 0, NoIntrinsic, 0, 0 },
    104 #endif
    105 #if ENABLE(Condition11) || ENABLE(Condition12)
    106     { "SUPPLEMENTALCONSTANT1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSUPPLEMENTALCONSTANT1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    107 #else
    108     { 0, 0, NoIntrinsic, 0, 0 },
    109 #endif
    110 #if ENABLE(Condition11) || ENABLE(Condition12)
    111     { "SUPPLEMENTALCONSTANT2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSUPPLEMENTALCONSTANT2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     96    { "IMPLEMENTSCONSTANT1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     97#else
     98    { 0, 0, NoIntrinsic, 0, 0 },
     99#endif
     100#if ENABLE(Condition22) || ENABLE(Condition23)
     101    { "IMPLEMENTSCONSTANT2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
     102#else
     103    { 0, 0, NoIntrinsic, 0, 0 },
     104#endif
     105#if ENABLE(Condition11) || ENABLE(Condition12)
     106    { "SUPPLEMENTALCONSTANT1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     107#else
     108    { 0, 0, NoIntrinsic, 0, 0 },
     109#endif
     110#if ENABLE(Condition11) || ENABLE(Condition12)
     111    { "SUPPLEMENTALCONSTANT2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
    112112#else
    113113    { 0, 0, NoIntrinsic, 0, 0 },
     
    312312#endif
    313313#if ENABLE(Condition22) || ENABLE(Condition23)
    314     { "IMPLEMENTSCONSTANT1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceIMPLEMENTSCONSTANT1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    315 #else
    316     { 0, 0, NoIntrinsic, 0, 0 },
    317 #endif
    318 #if ENABLE(Condition22) || ENABLE(Condition23)
    319     { "IMPLEMENTSCONSTANT2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceIMPLEMENTSCONSTANT2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    320 #else
    321     { 0, 0, NoIntrinsic, 0, 0 },
    322 #endif
    323 #if ENABLE(Condition11) || ENABLE(Condition12)
    324     { "SUPPLEMENTALCONSTANT1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSUPPLEMENTALCONSTANT1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    325 #else
    326     { 0, 0, NoIntrinsic, 0, 0 },
    327 #endif
    328 #if ENABLE(Condition11) || ENABLE(Condition12)
    329     { "SUPPLEMENTALCONSTANT2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestInterfaceSUPPLEMENTALCONSTANT2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     314    { "IMPLEMENTSCONSTANT1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     315#else
     316    { 0, 0, NoIntrinsic, 0, 0 },
     317#endif
     318#if ENABLE(Condition22) || ENABLE(Condition23)
     319    { "IMPLEMENTSCONSTANT2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
     320#else
     321    { 0, 0, NoIntrinsic, 0, 0 },
     322#endif
     323#if ENABLE(Condition11) || ENABLE(Condition12)
     324    { "SUPPLEMENTALCONSTANT1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     325#else
     326    { 0, 0, NoIntrinsic, 0, 0 },
     327#endif
     328#if ENABLE(Condition11) || ENABLE(Condition12)
     329    { "SUPPLEMENTALCONSTANT2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
    330330#else
    331331    { 0, 0, NoIntrinsic, 0, 0 },
     
    901901#endif
    902902
    903 // Constant getters
    904 
    905 #if ENABLE(Condition22) || ENABLE(Condition23)
    906 EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT1(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    907 {
    908     return JSValue::encode(jsNumber(1));
    909 }
    910 
    911 #endif
    912 #if ENABLE(Condition22) || ENABLE(Condition23)
    913 EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT2(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    914 {
    915     return JSValue::encode(jsNumber(2));
    916 }
    917 
    918 #endif
    919 #if ENABLE(Condition11) || ENABLE(Condition12)
    920 EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT1(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    921 {
    922     return JSValue::encode(jsNumber(1));
    923 }
    924 
    925 #endif
    926 #if ENABLE(Condition11) || ENABLE(Condition12)
    927 EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT2(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    928 {
    929     return JSValue::encode(jsNumber(2));
    930 }
    931 
    932 #endif
    933903bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    934904{
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r169954 r169979  
    248248#endif
    249249JSC::EncodedJSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    250 // Constants
    251 
    252 #if ENABLE(Condition22) || ENABLE(Condition23)
    253 JSC::EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    254 #endif
    255 #if ENABLE(Condition22) || ENABLE(Condition23)
    256 JSC::EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    257 #endif
    258 #if ENABLE(Condition11) || ENABLE(Condition12)
    259 JSC::EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    260 #endif
    261 #if ENABLE(Condition11) || ENABLE(Condition12)
    262 JSC::EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    263 #endif
    264250
    265251} // namespace WebCore
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r169954 r169979  
    123123/* Hash table for constructor */
    124124
    125 static const struct CompactHashIndex JSTestObjConstructorTableIndex[39] = {
    126     { -1, -1 },
    127     { 9, 34 },
    128     { 21, -1 },
     125static const struct CompactHashIndex JSTestObjConstructorTableIndex[38] = {
     126    { -1, -1 },
     127    { 8, 34 },
     128    { 20, -1 },
    129129    { 2, -1 },
    130130    { 1, -1 },
     
    134134    { -1, -1 },
    135135    { 0, -1 },
    136     { 12, -1 },
    137     { 16, -1 },
     136    { 11, -1 },
     137    { 15, -1 },
    138138    { 5, 32 },
    139139    { -1, -1 },
     
    143143    { -1, -1 },
    144144    { -1, -1 },
    145     { 10, -1 },
     145    { 9, -1 },
     146    { 18, 37 },
     147    { 14, -1 },
     148    { 3, -1 },
     149    { -1, -1 },
     150    { 10, 33 },
     151    { -1, -1 },
     152    { -1, -1 },
    146153    { 7, 36 },
    147     { 15, -1 },
    148     { 3, -1 },
    149     { -1, -1 },
    150     { 11, 33 },
    151     { -1, -1 },
    152     { -1, -1 },
    153     { 8, 37 },
    154     { 18, -1 },
     154    { 17, -1 },
    155155    { -1, -1 },
    156156    { -1, -1 },
    157157    { 4, -1 },
    158158    { 6, -1 },
    159     { 13, -1 },
    160     { 14, 35 },
    161     { 17, -1 },
    162     { 19, 38 },
    163     { 20, -1 },
    164     { 22, -1 },
     159    { 12, -1 },
     160    { 13, 35 },
     161    { 16, -1 },
     162    { 19, -1 },
     163    { 21, -1 },
    165164};
    166165
     
    169168{
    170169#if ENABLE(Condition1)
    171     { "CONDITIONAL_CONST", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     170    { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
    172171#else
    173172    { 0, 0, NoIntrinsic, 0, 0 },
    174173#endif
    175     { "CONST_VALUE_0", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    176     { "CONST_VALUE_1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    177     { "CONST_VALUE_2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    178     { "CONST_VALUE_4", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    179     { "CONST_VALUE_8", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    180     { "CONST_VALUE_9", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    181     { "CONST_VALUE_10", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    182     { "CONST_VALUE_11", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    183     { "CONST_VALUE_12", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    184     { "CONST_VALUE_13", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    185     { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    186     { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    187     { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     174    { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
     175    { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     176    { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
     177    { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(4), (intptr_t) (0) },
     178    { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(8), (intptr_t) (0) },
     179    { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(-1), (intptr_t) (0) },
     180    { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0xffffffff), (intptr_t) (0) },
     181    { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x01), (intptr_t) (0) },
     182    { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0X20), (intptr_t) (0) },
     183    { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x1abc), (intptr_t) (0) },
     184    { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(15), (intptr_t) (0) },
     185    { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
    188186    { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    189187    { "staticStringAttr", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) },
     
    201199};
    202200
    203 static const HashTable JSTestObjConstructorTable = { 23, 31, true, JSTestObjConstructorTableValues, 0, JSTestObjConstructorTableIndex };
     201static const HashTable JSTestObjConstructorTable = { 22, 31, true, JSTestObjConstructorTableValues, 0, JSTestObjConstructorTableIndex };
    204202
    205203#if ENABLE(Condition1)
     
    212210COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants);
    213211COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants);
    214 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST_VALUE_10IsWrongUseDoNotCheckConstants);
    215212COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants);
    216213COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants);
     
    281278    { -1, -1 },
    282279    { 47, -1 },
    283     { 73, -1 },
     280    { 72, -1 },
    284281    { -1, -1 },
    285282    { 41, -1 },
     
    293290    { -1, -1 },
    294291    { -1, -1 },
    295     { 102, -1 },
     292    { 101, -1 },
    296293    { -1, -1 },
    297294    { -1, -1 },
     
    302299    { -1, -1 },
    303300    { -1, -1 },
    304     { 110, -1 },
     301    { 109, -1 },
    305302    { -1, -1 },
    306303    { -1, -1 },
     
    319316    { -1, -1 },
    320317    { -1, -1 },
    321     { 126, -1 },
    322     { -1, -1 },
    323     { -1, -1 },
    324     { -1, -1 },
    325     { 101, -1 },
     318    { 125, -1 },
     319    { -1, -1 },
     320    { -1, -1 },
     321    { -1, -1 },
    326322    { 100, -1 },
     323    { 99, -1 },
    327324    { -1, -1 },
    328325    { -1, -1 },
     
    337334    { -1, -1 },
    338335    { 5, -1 },
    339     { 134, -1 },
     336    { 133, -1 },
    340337    { -1, -1 },
    341338    { -1, -1 },
     
    351348    { -1, -1 },
    352349    { -1, -1 },
    353     { 93, -1 },
    354     { 87, -1 },
     350    { 92, -1 },
     351    { 86, -1 },
    355352    { -1, -1 },
    356353    { -1, -1 },
     
    368365    { -1, -1 },
    369366    { -1, -1 },
    370     { 117, -1 },
    371     { -1, -1 },
    372     { -1, -1 },
    373     { 78, -1 },
    374     { 70, -1 },
     367    { 116, -1 },
     368    { -1, -1 },
     369    { -1, -1 },
     370    { 77, -1 },
     371    { 69, -1 },
    375372    { -1, -1 },
    376373    { 25, -1 },
     
    386383    { -1, -1 },
    387384    { -1, -1 },
    388     { 96, -1 },
    389     { -1, -1 },
    390     { -1, -1 },
    391     { -1, -1 },
    392     { 114, -1 },
     385    { 95, -1 },
     386    { -1, -1 },
     387    { -1, -1 },
     388    { -1, -1 },
     389    { 113, -1 },
    393390    { -1, -1 },
    394391    { 6, -1 },
     
    400397    { -1, -1 },
    401398    { -1, -1 },
    402     { 86, -1 },
     399    { 85, -1 },
    403400    { -1, -1 },
    404401    { -1, -1 },
     
    409406    { 51, -1 },
    410407    { -1, -1 },
     408    { 70, -1 },
     409    { -1, -1 },
     410    { -1, -1 },
     411    { -1, -1 },
     412    { -1, -1 },
     413    { -1, -1 },
     414    { -1, -1 },
     415    { 91, -1 },
     416    { -1, -1 },
     417    { -1, -1 },
     418    { -1, -1 },
     419    { -1, -1 },
     420    { -1, -1 },
     421    { 126, -1 },
     422    { -1, -1 },
     423    { -1, -1 },
     424    { -1, -1 },
     425    { -1, -1 },
    411426    { 71, -1 },
    412427    { -1, -1 },
     
    416431    { -1, -1 },
    417432    { -1, -1 },
    418     { 92, -1 },
     433    { -1, -1 },
     434    { -1, -1 },
     435    { -1, -1 },
     436    { -1, -1 },
     437    { -1, -1 },
     438    { -1, -1 },
     439    { -1, -1 },
     440    { -1, -1 },
     441    { -1, -1 },
     442    { -1, -1 },
     443    { -1, -1 },
     444    { -1, -1 },
     445    { 24, -1 },
     446    { -1, -1 },
     447    { -1, -1 },
     448    { -1, -1 },
     449    { -1, -1 },
     450    { -1, -1 },
     451    { -1, -1 },
     452    { -1, -1 },
     453    { -1, -1 },
     454    { -1, -1 },
     455    { -1, -1 },
     456    { -1, -1 },
     457    { -1, -1 },
     458    { -1, -1 },
     459    { -1, -1 },
     460    { 88, -1 },
     461    { -1, -1 },
     462    { -1, -1 },
     463    { -1, -1 },
     464    { -1, -1 },
     465    { -1, -1 },
     466    { -1, -1 },
     467    { -1, -1 },
     468    { -1, -1 },
     469    { -1, -1 },
     470    { -1, -1 },
     471    { -1, -1 },
     472    { -1, -1 },
     473    { -1, -1 },
     474    { -1, -1 },
     475    { -1, -1 },
     476    { -1, -1 },
     477    { -1, -1 },
     478    { -1, -1 },
     479    { -1, -1 },
     480    { -1, -1 },
     481    { 81, -1 },
     482    { -1, -1 },
     483    { -1, -1 },
     484    { -1, -1 },
     485    { 3, -1 },
     486    { -1, -1 },
     487    { -1, -1 },
     488    { -1, -1 },
     489    { 45, -1 },
     490    { -1, -1 },
     491    { 76, -1 },
     492    { -1, -1 },
     493    { -1, -1 },
     494    { -1, -1 },
     495    { -1, -1 },
     496    { -1, -1 },
     497    { 36, 526 },
     498    { -1, -1 },
     499    { -1, -1 },
     500    { -1, -1 },
     501    { 8, 512 },
     502    { -1, -1 },
     503    { 129, -1 },
     504    { -1, -1 },
     505    { 58, 528 },
     506    { 134, -1 },
     507    { -1, -1 },
     508    { -1, -1 },
     509    { -1, -1 },
     510    { -1, -1 },
     511    { 64, 524 },
     512    { -1, -1 },
     513    { -1, -1 },
     514    { -1, -1 },
     515    { 130, -1 },
     516    { -1, -1 },
     517    { 102, -1 },
     518    { -1, -1 },
     519    { -1, -1 },
     520    { -1, -1 },
     521    { -1, -1 },
     522    { -1, -1 },
     523    { -1, -1 },
     524    { -1, -1 },
     525    { -1, -1 },
     526    { -1, -1 },
     527    { 39, 515 },
     528    { -1, -1 },
     529    { -1, -1 },
     530    { 112, -1 },
     531    { 89, -1 },
     532    { 119, -1 },
     533    { -1, -1 },
     534    { -1, -1 },
     535    { -1, -1 },
     536    { -1, -1 },
     537    { -1, -1 },
     538    { -1, -1 },
     539    { -1, -1 },
     540    { -1, -1 },
     541    { 34, -1 },
     542    { -1, -1 },
     543    { 18, -1 },
     544    { -1, -1 },
     545    { -1, -1 },
     546    { -1, -1 },
     547    { -1, -1 },
     548    { 61, -1 },
     549    { -1, -1 },
     550    { -1, -1 },
     551    { -1, -1 },
     552    { -1, -1 },
     553    { -1, -1 },
     554    { -1, -1 },
     555    { -1, -1 },
    419556    { -1, -1 },
    420557    { -1, -1 },
     
    423560    { -1, -1 },
    424561    { 127, -1 },
    425     { -1, -1 },
    426     { -1, -1 },
    427     { -1, -1 },
    428     { -1, -1 },
    429     { 72, -1 },
    430     { -1, -1 },
    431     { -1, -1 },
    432     { -1, -1 },
    433     { -1, -1 },
    434     { -1, -1 },
    435     { -1, -1 },
    436     { -1, -1 },
    437     { -1, -1 },
    438     { -1, -1 },
    439     { 67, -1 },
    440     { -1, -1 },
    441     { -1, -1 },
    442     { -1, -1 },
    443     { -1, -1 },
    444     { -1, -1 },
    445     { -1, -1 },
    446     { -1, -1 },
    447     { -1, -1 },
    448     { 24, -1 },
    449     { -1, -1 },
    450     { -1, -1 },
    451     { -1, -1 },
    452     { -1, -1 },
    453     { -1, -1 },
    454     { -1, -1 },
    455     { -1, -1 },
    456     { -1, -1 },
    457     { -1, -1 },
    458     { -1, -1 },
    459     { -1, -1 },
    460     { -1, -1 },
    461     { -1, -1 },
    462     { -1, -1 },
    463     { 89, -1 },
    464     { -1, -1 },
    465     { -1, -1 },
    466     { -1, -1 },
    467     { -1, -1 },
    468     { -1, -1 },
    469     { -1, -1 },
    470     { -1, -1 },
    471     { -1, -1 },
    472     { -1, -1 },
    473     { -1, -1 },
    474     { -1, -1 },
    475     { -1, -1 },
    476     { -1, -1 },
    477     { -1, -1 },
    478     { -1, -1 },
    479     { -1, -1 },
    480     { -1, -1 },
    481     { -1, -1 },
    482     { -1, -1 },
    483     { -1, -1 },
    484     { 82, -1 },
    485     { -1, -1 },
    486     { -1, -1 },
    487     { -1, -1 },
    488     { 3, -1 },
    489     { -1, -1 },
    490     { -1, -1 },
    491     { -1, -1 },
    492     { 45, -1 },
    493     { -1, -1 },
    494     { 77, -1 },
    495     { -1, -1 },
    496     { -1, -1 },
    497     { -1, -1 },
    498     { -1, -1 },
    499     { -1, -1 },
    500     { 36, 526 },
    501     { -1, -1 },
    502     { -1, -1 },
    503     { -1, -1 },
    504     { 8, 512 },
    505     { -1, -1 },
    506     { 130, -1 },
    507     { -1, -1 },
    508     { 58, 528 },
    509     { 135, -1 },
    510     { -1, -1 },
    511     { -1, -1 },
    512     { -1, -1 },
    513     { -1, -1 },
    514     { 64, 524 },
    515     { -1, -1 },
    516     { -1, -1 },
    517     { -1, -1 },
    518     { 131, -1 },
    519     { -1, -1 },
    520     { 103, -1 },
    521     { -1, -1 },
    522     { -1, -1 },
    523     { -1, -1 },
    524     { -1, -1 },
    525     { -1, -1 },
    526     { -1, -1 },
    527     { -1, -1 },
    528     { -1, -1 },
    529     { -1, -1 },
    530     { 39, 515 },
    531     { -1, -1 },
    532     { -1, -1 },
    533     { 113, -1 },
    534     { 90, -1 },
    535     { 120, -1 },
    536     { -1, -1 },
    537     { -1, -1 },
    538     { -1, -1 },
    539     { -1, -1 },
    540     { -1, -1 },
    541     { -1, -1 },
    542     { -1, -1 },
    543     { -1, -1 },
    544     { 34, -1 },
    545     { -1, -1 },
    546     { 18, -1 },
    547     { -1, -1 },
    548     { -1, -1 },
    549     { -1, -1 },
    550     { -1, -1 },
    551     { 61, -1 },
    552     { -1, -1 },
    553     { -1, -1 },
    554     { -1, -1 },
    555     { -1, -1 },
    556     { -1, -1 },
    557     { -1, -1 },
    558     { -1, -1 },
    559     { -1, -1 },
    560     { -1, -1 },
    561     { -1, -1 },
    562     { -1, -1 },
    563     { -1, -1 },
    564     { 128, -1 },
    565     { 123, -1 },
     562    { 122, -1 },
    566563    { -1, -1 },
    567564    { -1, -1 },
     
    572569    { -1, -1 },
    573570    { -1, -1 },
    574     { 76, -1 },
    575     { -1, -1 },
    576     { -1, -1 },
    577     { -1, -1 },
    578     { -1, -1 },
    579     { -1, -1 },
    580     { -1, -1 },
    581     { -1, -1 },
    582     { -1, -1 },
    583     { 84, -1 },
     571    { 75, -1 },
     572    { -1, -1 },
     573    { -1, -1 },
     574    { -1, -1 },
     575    { -1, -1 },
     576    { -1, -1 },
     577    { -1, -1 },
     578    { -1, -1 },
     579    { -1, -1 },
     580    { 83, -1 },
    584581    { -1, -1 },
    585582    { -1, -1 },
     
    604601    { 0, -1 },
    605602    { -1, -1 },
    606     { 99, -1 },
     603    { 98, -1 },
    607604    { -1, -1 },
    608605    { -1, -1 },
     
    613610    { -1, -1 },
    614611    { -1, -1 },
    615     { 124, -1 },
     612    { 123, -1 },
    616613    { -1, -1 },
    617614    { 35, -1 },
     
    627624    { -1, -1 },
    628625    { -1, -1 },
    629     { 88, -1 },
     626    { 87, -1 },
    630627    { -1, -1 },
    631628    { -1, -1 },
     
    634631    { -1, -1 },
    635632    { 46, 521 },
    636     { 80, -1 },
     633    { 79, -1 },
    637634    { -1, -1 },
    638635    { -1, -1 },
     
    642639    { -1, -1 },
    643640    { -1, -1 },
    644     { 69, -1 },
     641    { 68, -1 },
    645642    { -1, -1 },
    646643    { 62, -1 },
     
    652649    { -1, -1 },
    653650    { -1, -1 },
    654     { 95, -1 },
     651    { 94, -1 },
    655652    { -1, -1 },
    656653    { -1, -1 },
     
    668665    { -1, -1 },
    669666    { 57, -1 },
    670     { 68, -1 },
    671     { -1, -1 },
    672     { -1, -1 },
    673     { 107, 527 },
    674     { -1, -1 },
    675     { 108, -1 },
     667    { 67, -1 },
     668    { -1, -1 },
     669    { -1, -1 },
     670    { 106, 527 },
     671    { -1, -1 },
     672    { 107, -1 },
    676673    { -1, -1 },
    677674    { -1, -1 },
     
    693690    { -1, -1 },
    694691    { -1, -1 },
    695     { 112, -1 },
    696     { -1, -1 },
    697     { -1, -1 },
    698     { -1, -1 },
    699     { -1, -1 },
    700     { -1, -1 },
    701     { -1, -1 },
    702     { -1, -1 },
    703     { -1, -1 },
    704     { 118, -1 },
    705     { -1, -1 },
    706     { -1, -1 },
    707     { -1, -1 },
    708     { -1, -1 },
    709     { -1, -1 },
    710     { -1, -1 },
    711     { -1, -1 },
    712     { 79, -1 },
     692    { 111, -1 },
     693    { -1, -1 },
     694    { -1, -1 },
     695    { -1, -1 },
     696    { -1, -1 },
     697    { -1, -1 },
     698    { -1, -1 },
     699    { -1, -1 },
     700    { -1, -1 },
     701    { 117, -1 },
     702    { -1, -1 },
     703    { -1, -1 },
     704    { -1, -1 },
     705    { -1, -1 },
     706    { -1, -1 },
     707    { -1, -1 },
     708    { -1, -1 },
     709    { 78, -1 },
    713710    { -1, -1 },
    714711    { -1, -1 },
     
    717714    { 52, -1 },
    718715    { -1, -1 },
    719     { 74, -1 },
    720     { 132, -1 },
     716    { 73, -1 },
     717    { 131, -1 },
    721718    { -1, -1 },
    722719    { -1, -1 },
     
    724721    { 54, 516 },
    725722    { -1, -1 },
    726     { 85, -1 },
     723    { 84, -1 },
    727724    { 9, -1 },
    728725    { -1, -1 },
    729726    { -1, -1 },
    730727    { -1, -1 },
    731     { 105, -1 },
     728    { 104, -1 },
    732729    { 29, -1 },
    733730    { -1, -1 },
     
    750747    { -1, -1 },
    751748    { -1, -1 },
    752     { 109, -1 },
     749    { 108, -1 },
    753750    { 13, 514 },
    754751    { 40, -1 },
    755     { 111, -1 },
     752    { 110, -1 },
    756753    { -1, -1 },
    757754    { 7, 525 },
    758755    { -1, -1 },
    759     { 125, -1 },
    760     { 106, -1 },
    761     { 75, 520 },
    762     { -1, -1 },
    763     { 122, -1 },
    764     { 83, -1 },
    765     { -1, -1 },
    766     { -1, -1 },
    767     { -1, -1 },
    768     { 119, -1 },
     756    { 124, -1 },
     757    { 105, -1 },
     758    { 74, 520 },
     759    { -1, -1 },
     760    { 121, -1 },
     761    { 82, -1 },
     762    { -1, -1 },
     763    { -1, -1 },
     764    { -1, -1 },
     765    { 118, -1 },
    769766    { -1, -1 },
    770767    { 10, 519 },
     
    776773    { 63, -1 },
    777774    { 66, -1 },
    778     { 81, -1 },
    779     { 91, -1 },
    780     { 94, -1 },
     775    { 80, -1 },
     776    { 90, -1 },
     777    { 93, -1 },
     778    { 96, -1 },
    781779    { 97, -1 },
    782     { 98, -1 },
    783     { 104, -1 },
     780    { 103, -1 },
     781    { 114, -1 },
    784782    { 115, -1 },
    785     { 116, -1 },
    786     { 121, -1 },
    787     { 129, -1 },
    788     { 133, -1 },
     783    { 120, -1 },
     784    { 128, -1 },
     785    { 132, -1 },
    789786};
    790787
     
    865862    { "attributeWithReservedEnumType", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) },
    866863#if ENABLE(Condition1)
    867     { "CONDITIONAL_CONST", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONDITIONAL_CONST), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     864    { "CONDITIONAL_CONST", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
    868865#else
    869866    { 0, 0, NoIntrinsic, 0, 0 },
    870867#endif
    871     { "CONST_VALUE_0", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_0), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    872     { "CONST_VALUE_1", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_1), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    873     { "CONST_VALUE_2", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    874     { "CONST_VALUE_4", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_4), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    875     { "CONST_VALUE_8", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_8), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    876     { "CONST_VALUE_9", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_9), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    877     { "CONST_VALUE_10", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_10), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    878     { "CONST_VALUE_11", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_11), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    879     { "CONST_VALUE_12", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_12), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    880     { "CONST_VALUE_13", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_13), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    881     { "CONST_VALUE_14", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_VALUE_14), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    882     { "CONST_JAVASCRIPT", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCONST_JAVASCRIPT), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    883     { "readonly", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadonly), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
     868    { "CONST_VALUE_0", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
     869    { "CONST_VALUE_1", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(1), (intptr_t) (0) },
     870    { "CONST_VALUE_2", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(2), (intptr_t) (0) },
     871    { "CONST_VALUE_4", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(4), (intptr_t) (0) },
     872    { "CONST_VALUE_8", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(8), (intptr_t) (0) },
     873    { "CONST_VALUE_9", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(-1), (intptr_t) (0) },
     874    { "CONST_VALUE_11", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0xffffffff), (intptr_t) (0) },
     875    { "CONST_VALUE_12", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x01), (intptr_t) (0) },
     876    { "CONST_VALUE_13", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0X20), (intptr_t) (0) },
     877    { "CONST_VALUE_14", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0x1abc), (intptr_t) (0) },
     878    { "CONST_JAVASCRIPT", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(15), (intptr_t) (0) },
     879    { "readonly", DontDelete | ReadOnly | ConstantInteger, NoIntrinsic, (intptr_t)(0), (intptr_t) (0) },
    884880    { "voidMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) },
    885881    { "voidMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) },
     
    958954};
    959955
    960 static const HashTable JSTestObjPrototypeTable = { 136, 511, true, JSTestObjPrototypeTableValues, 0, JSTestObjPrototypeTableIndex };
     956static const HashTable JSTestObjPrototypeTable = { 135, 511, true, JSTestObjPrototypeTableValues, 0, JSTestObjPrototypeTableIndex };
    961957const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
    962958
     
    46594655}
    46604656
    4661 // Constant getters
    4662 
    4663 #if ENABLE(Condition1)
    4664 EncodedJSValue jsTestObjCONDITIONAL_CONST(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4665 {
    4666     return JSValue::encode(jsNumber(0));
    4667 }
    4668 
    4669 #endif
    4670 EncodedJSValue jsTestObjCONST_VALUE_0(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4671 {
    4672     return JSValue::encode(jsNumber(0));
    4673 }
    4674 
    4675 EncodedJSValue jsTestObjCONST_VALUE_1(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4676 {
    4677     return JSValue::encode(jsNumber(1));
    4678 }
    4679 
    4680 EncodedJSValue jsTestObjCONST_VALUE_2(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4681 {
    4682     return JSValue::encode(jsNumber(2));
    4683 }
    4684 
    4685 EncodedJSValue jsTestObjCONST_VALUE_4(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4686 {
    4687     return JSValue::encode(jsNumber(4));
    4688 }
    4689 
    4690 EncodedJSValue jsTestObjCONST_VALUE_8(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4691 {
    4692     return JSValue::encode(jsNumber(8));
    4693 }
    4694 
    4695 EncodedJSValue jsTestObjCONST_VALUE_9(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4696 {
    4697     return JSValue::encode(jsNumber(-1));
    4698 }
    4699 
    4700 EncodedJSValue jsTestObjCONST_VALUE_10(ExecState* exec, JSObject*, EncodedJSValue, PropertyName)
    4701 {
    4702     return JSValue::encode(jsStringOrNull(exec, String("my constant string")));
    4703 }
    4704 
    4705 EncodedJSValue jsTestObjCONST_VALUE_11(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4706 {
    4707     return JSValue::encode(jsNumber(0xffffffff));
    4708 }
    4709 
    4710 EncodedJSValue jsTestObjCONST_VALUE_12(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4711 {
    4712     return JSValue::encode(jsNumber(0x01));
    4713 }
    4714 
    4715 EncodedJSValue jsTestObjCONST_VALUE_13(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4716 {
    4717     return JSValue::encode(jsNumber(0X20));
    4718 }
    4719 
    4720 EncodedJSValue jsTestObjCONST_VALUE_14(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4721 {
    4722     return JSValue::encode(jsNumber(0x1abc));
    4723 }
    4724 
    4725 EncodedJSValue jsTestObjCONST_JAVASCRIPT(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4726 {
    4727     return JSValue::encode(jsNumber(15));
    4728 }
    4729 
    4730 EncodedJSValue jsTestObjReadonly(ExecState*, JSObject*, EncodedJSValue, PropertyName)
    4731 {
    4732     return JSValue::encode(jsNumber(0));
    4733 }
    4734 
    47354657bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
    47364658{
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r169954 r169979  
    373373void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue);
    374374JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    375 // Constants
    376 
    377 #if ENABLE(Condition1)
    378 JSC::EncodedJSValue jsTestObjCONDITIONAL_CONST(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    379 #endif
    380 JSC::EncodedJSValue jsTestObjCONST_VALUE_0(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    381 JSC::EncodedJSValue jsTestObjCONST_VALUE_1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    382 JSC::EncodedJSValue jsTestObjCONST_VALUE_2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    383 JSC::EncodedJSValue jsTestObjCONST_VALUE_4(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    384 JSC::EncodedJSValue jsTestObjCONST_VALUE_8(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    385 JSC::EncodedJSValue jsTestObjCONST_VALUE_9(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    386 JSC::EncodedJSValue jsTestObjCONST_VALUE_10(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    387 JSC::EncodedJSValue jsTestObjCONST_VALUE_11(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    388 JSC::EncodedJSValue jsTestObjCONST_VALUE_12(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    389 JSC::EncodedJSValue jsTestObjCONST_VALUE_13(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    390 JSC::EncodedJSValue jsTestObjCONST_VALUE_14(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    391 JSC::EncodedJSValue jsTestObjCONST_JAVASCRIPT(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    392 JSC::EncodedJSValue jsTestObjReadonly(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);
    393375
    394376} // namespace WebCore
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h

    r165676 r169979  
    5151    DOM_CONST_VALUE_8 = 8,
    5252    DOM_CONST_VALUE_9 = -1,
    53     DOM_CONST_VALUE_10 = "my constant string",
    5453    DOM_CONST_VALUE_11 = 0xffffffff,
    5554    DOM_CONST_VALUE_12 = 0x01,
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r168302 r169979  
    246246    const unsigned short CONST_VALUE_8 = 8;
    247247    const short CONST_VALUE_9 = -1;
    248     const DOMString CONST_VALUE_10 = "my constant string";
    249248    const unsigned short CONST_VALUE_11 = 0xffffffff;
    250249    const unsigned short CONST_VALUE_12 = 0x01;
Note: See TracChangeset for help on using the changeset viewer.