Changeset 169979 in webkit
- Timestamp:
- Jun 14, 2014 1:38:45 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r169973 r169979 1 2014-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 1 30 2014-06-14 Michael Saboff <msaboff@apple.com> 2 31 -
trunk/Source/JavaScriptCore/runtime/Lookup.h
r169789 r169979 25 25 #include "CallFrame.h" 26 26 #include "CustomGetterSetter.h" 27 #include "Identifier.h" 27 28 #include "IdentifierInlines.h" 28 29 #include "Intrinsic.h" 29 #include "Identifier.h"30 30 #include "JSGlobalObject.h" 31 31 #include "PropertySlot.h" … … 48 48 struct HashTableValue { 49 49 const char* m_key; // property name 50 unsigned charm_attributes; // JSObject attributes50 unsigned m_attributes; // JSObject attributes 51 51 Intrinsic m_intrinsic; 52 52 intptr_t m_value1; 53 53 intptr_t m_value2; 54 54 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; } 63 58 BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_value1); } 64 59 NativeFunction function() const { ASSERT(m_attributes & Function); return reinterpret_cast<NativeFunction>(m_value1); } 65 60 unsigned char functionLength() const { ASSERT(m_attributes & Function); return static_cast<unsigned char>(m_value2); } 66 61 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; } 69 66 70 67 intptr_t lexerValue() const { ASSERT(!m_attributes); return m_value1; } … … 72 69 73 70 struct HashTable { 74 75 71 mutable int numberOfValues; 76 72 int indexMask; … … 226 222 return setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot); 227 223 224 if (entry->attributes() & ConstantInteger) { 225 slot.setValue(thisObj, entry->attributes(), jsNumber(entry->constantInteger())); 226 return true; 227 } 228 228 229 slot.setCacheableCustom(thisObj, entry->attributes(), entry->propertyGetter()); 229 230 return true; … … 261 262 262 263 ASSERT(!(entry->attributes() & BuiltinOrFunction)); 264 265 if (entry->attributes() & ConstantInteger) { 266 slot.setValue(thisObj, entry->attributes(), jsNumber(entry->constantInteger())); 267 return true; 268 } 263 269 264 270 slot.setCacheableCustom(thisObj, entry->attributes(), entry->propertyGetter()); … … 315 321 } 316 322 323 if (value.attributes() & ConstantInteger) { 324 thisObj.putDirect(vm, propertyName, jsNumber(value.constantInteger()), value.attributes()); 325 continue; 326 } 327 317 328 if (value.attributes() & Accessor) { 318 329 RELEASE_ASSERT_NOT_REACHED(); -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r169668 r169979 45 45 CustomAccessor = 1 << 6, 46 46 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 47 48 BuiltinOrFunction = Builtin | Function, // helper only used by static hashtables 49 BuiltinOrFunctionOrConstant = Builtin | Function | ConstantInteger, // helper only used by static hashtables 48 50 }; 49 51 -
trunk/Source/WebCore/ChangeLog
r169978 r169979 1 2014-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 1 44 2014-06-14 Anders Carlsson <andersca@apple.com> 2 45 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r169954 r169979 1298 1298 } 1299 1299 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 1311 1300 my $conditionalString = $codeGenerator->GenerateConditionalString($interface); 1312 1301 push(@headerContent, "\n} // namespace WebCore\n\n"); … … 1790 1779 my %conditionals = (); 1791 1780 1792 # FIXME: we should not need a function for every constant.1793 1781 foreach my $constant (@{$interface->constants}) { 1794 1782 my $name = $constant->name; 1795 1783 push(@hashKeys, $name); 1796 my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($name); 1797 push(@hashValue1, $getter); 1784 push(@hashValue1, $constant->value); 1798 1785 push(@hashValue2, "0"); 1799 push(@hashSpecials, "DontDelete | ReadOnly ");1786 push(@hashSpecials, "DontDelete | ReadOnly | ConstantInteger"); 1800 1787 1801 1788 my $implementedBy = $constant->extendedAttributes->{"ImplementedBy"}; … … 1893 1880 my $hashSize = $numFunctions + $numConstants + $numPrototypeAttributes; 1894 1881 1895 # FIXME: we should not need a function for every constant.1896 1882 foreach my $constant (@{$interface->constants}) { 1897 1883 my $name = $constant->name; 1884 1898 1885 push(@hashKeys, $name); 1899 my $getter = "js" . $interfaceName . $codeGenerator->WK_ucfirst($name); 1900 push(@hashValue1, $getter); 1886 push(@hashValue1, $constant->value); 1901 1887 push(@hashValue2, "0"); 1902 push(@hashSpecials, "DontDelete | ReadOnly ");1888 push(@hashSpecials, "DontDelete | ReadOnly | ConstantInteger"); 1903 1889 1904 1890 my $conditional = $constant->extendedAttributes->{"Conditional"}; … … 2885 2871 # die "Can't generate binding for class with cached attribute and custom mark." if (($numCachedAttributes > 0) and ($interface->extendedAttributes->{"JSCustomMarkFunction"})); 2886 2872 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 2913 2873 if ($indexedGetterFunction) { 2914 2874 if ($indexedGetterFunction->signature->type eq "DOMString") { … … 4081 4041 if ("@$specials[$i]" =~ m/Function/) { 4082 4042 $firstTargetType = "static_cast<NativeFunction>"; 4043 } elsif ("@$specials[$i]" =~ m/ConstantInteger/) { 4044 $firstTargetType = ""; 4083 4045 } else { 4084 4046 $firstTargetType = "static_cast<PropertySlot::GetValueFunc>"; -
trunk/Source/WebCore/bindings/scripts/IDLParser.pm
r156808 r169979 906 906 return $self->parseFloatLiteral(); 907 907 } 908 # backward compatibility909 if ($next->type() == StringToken) {910 return $self->getToken()->value();911 }912 908 if ($next->type() == IntegerToken) { 913 909 return $self->getToken()->value(); -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
r169954 r169979 94 94 { 95 95 #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) }, 112 112 #else 113 113 { 0, 0, NoIntrinsic, 0, 0 }, … … 312 312 #endif 313 313 #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) }, 330 330 #else 331 331 { 0, 0, NoIntrinsic, 0, 0 }, … … 901 901 #endif 902 902 903 // Constant getters904 905 #if ENABLE(Condition22) || ENABLE(Condition23)906 EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT1(ExecState*, JSObject*, EncodedJSValue, PropertyName)907 {908 return JSValue::encode(jsNumber(1));909 }910 911 #endif912 #if ENABLE(Condition22) || ENABLE(Condition23)913 EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT2(ExecState*, JSObject*, EncodedJSValue, PropertyName)914 {915 return JSValue::encode(jsNumber(2));916 }917 918 #endif919 #if ENABLE(Condition11) || ENABLE(Condition12)920 EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT1(ExecState*, JSObject*, EncodedJSValue, PropertyName)921 {922 return JSValue::encode(jsNumber(1));923 }924 925 #endif926 #if ENABLE(Condition11) || ENABLE(Condition12)927 EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT2(ExecState*, JSObject*, EncodedJSValue, PropertyName)928 {929 return JSValue::encode(jsNumber(2));930 }931 932 #endif933 903 bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) 934 904 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
r169954 r169979 248 248 #endif 249 249 JSC::EncodedJSValue jsTestInterfaceConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 250 // Constants251 252 #if ENABLE(Condition22) || ENABLE(Condition23)253 JSC::EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);254 #endif255 #if ENABLE(Condition22) || ENABLE(Condition23)256 JSC::EncodedJSValue jsTestInterfaceIMPLEMENTSCONSTANT2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);257 #endif258 #if ENABLE(Condition11) || ENABLE(Condition12)259 JSC::EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT1(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);260 #endif261 #if ENABLE(Condition11) || ENABLE(Condition12)262 JSC::EncodedJSValue jsTestInterfaceSUPPLEMENTALCONSTANT2(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);263 #endif264 250 265 251 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r169954 r169979 123 123 /* Hash table for constructor */ 124 124 125 static const struct CompactHashIndex JSTestObjConstructorTableIndex[3 9] = {126 { -1, -1 }, 127 { 9, 34 },128 { 2 1, -1 },125 static const struct CompactHashIndex JSTestObjConstructorTableIndex[38] = { 126 { -1, -1 }, 127 { 8, 34 }, 128 { 20, -1 }, 129 129 { 2, -1 }, 130 130 { 1, -1 }, … … 134 134 { -1, -1 }, 135 135 { 0, -1 }, 136 { 1 2, -1 },137 { 1 6, -1 },136 { 11, -1 }, 137 { 15, -1 }, 138 138 { 5, 32 }, 139 139 { -1, -1 }, … … 143 143 { -1, -1 }, 144 144 { -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 }, 146 153 { 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 }, 155 155 { -1, -1 }, 156 156 { -1, -1 }, 157 157 { 4, -1 }, 158 158 { 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 }, 165 164 }; 166 165 … … 169 168 { 170 169 #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) }, 172 171 #else 173 172 { 0, 0, NoIntrinsic, 0, 0 }, 174 173 #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) }, 188 186 { "staticReadOnlyLongAttr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) }, 189 187 { "staticStringAttr", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) }, … … 201 199 }; 202 200 203 static const HashTable JSTestObjConstructorTable = { 2 3, 31, true, JSTestObjConstructorTableValues, 0, JSTestObjConstructorTableIndex };201 static const HashTable JSTestObjConstructorTable = { 22, 31, true, JSTestObjConstructorTableValues, 0, JSTestObjConstructorTableIndex }; 204 202 205 203 #if ENABLE(Condition1) … … 212 210 COMPILE_ASSERT(8 == TestObj::CONST_VALUE_8, TestObjEnumCONST_VALUE_8IsWrongUseDoNotCheckConstants); 213 211 COMPILE_ASSERT(-1 == TestObj::CONST_VALUE_9, TestObjEnumCONST_VALUE_9IsWrongUseDoNotCheckConstants); 214 COMPILE_ASSERT("my constant string" == TestObj::CONST_VALUE_10, TestObjEnumCONST_VALUE_10IsWrongUseDoNotCheckConstants);215 212 COMPILE_ASSERT(0xffffffff == TestObj::CONST_VALUE_11, TestObjEnumCONST_VALUE_11IsWrongUseDoNotCheckConstants); 216 213 COMPILE_ASSERT(0x01 == TestObj::CONST_VALUE_12, TestObjEnumCONST_VALUE_12IsWrongUseDoNotCheckConstants); … … 281 278 { -1, -1 }, 282 279 { 47, -1 }, 283 { 7 3, -1 },280 { 72, -1 }, 284 281 { -1, -1 }, 285 282 { 41, -1 }, … … 293 290 { -1, -1 }, 294 291 { -1, -1 }, 295 { 10 2, -1 },292 { 101, -1 }, 296 293 { -1, -1 }, 297 294 { -1, -1 }, … … 302 299 { -1, -1 }, 303 300 { -1, -1 }, 304 { 1 10, -1 },301 { 109, -1 }, 305 302 { -1, -1 }, 306 303 { -1, -1 }, … … 319 316 { -1, -1 }, 320 317 { -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 }, 326 322 { 100, -1 }, 323 { 99, -1 }, 327 324 { -1, -1 }, 328 325 { -1, -1 }, … … 337 334 { -1, -1 }, 338 335 { 5, -1 }, 339 { 13 4, -1 },336 { 133, -1 }, 340 337 { -1, -1 }, 341 338 { -1, -1 }, … … 351 348 { -1, -1 }, 352 349 { -1, -1 }, 353 { 9 3, -1 },354 { 8 7, -1 },350 { 92, -1 }, 351 { 86, -1 }, 355 352 { -1, -1 }, 356 353 { -1, -1 }, … … 368 365 { -1, -1 }, 369 366 { -1, -1 }, 370 { 11 7, -1 },371 { -1, -1 }, 372 { -1, -1 }, 373 { 7 8, -1 },374 { 70, -1 },367 { 116, -1 }, 368 { -1, -1 }, 369 { -1, -1 }, 370 { 77, -1 }, 371 { 69, -1 }, 375 372 { -1, -1 }, 376 373 { 25, -1 }, … … 386 383 { -1, -1 }, 387 384 { -1, -1 }, 388 { 9 6, -1 },389 { -1, -1 }, 390 { -1, -1 }, 391 { -1, -1 }, 392 { 11 4, -1 },385 { 95, -1 }, 386 { -1, -1 }, 387 { -1, -1 }, 388 { -1, -1 }, 389 { 113, -1 }, 393 390 { -1, -1 }, 394 391 { 6, -1 }, … … 400 397 { -1, -1 }, 401 398 { -1, -1 }, 402 { 8 6, -1 },399 { 85, -1 }, 403 400 { -1, -1 }, 404 401 { -1, -1 }, … … 409 406 { 51, -1 }, 410 407 { -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 }, 411 426 { 71, -1 }, 412 427 { -1, -1 }, … … 416 431 { -1, -1 }, 417 432 { -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 }, 419 556 { -1, -1 }, 420 557 { -1, -1 }, … … 423 560 { -1, -1 }, 424 561 { 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 }, 566 563 { -1, -1 }, 567 564 { -1, -1 }, … … 572 569 { -1, -1 }, 573 570 { -1, -1 }, 574 { 7 6, -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 { 8 4, -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 }, 584 581 { -1, -1 }, 585 582 { -1, -1 }, … … 604 601 { 0, -1 }, 605 602 { -1, -1 }, 606 { 9 9, -1 },603 { 98, -1 }, 607 604 { -1, -1 }, 608 605 { -1, -1 }, … … 613 610 { -1, -1 }, 614 611 { -1, -1 }, 615 { 12 4, -1 },612 { 123, -1 }, 616 613 { -1, -1 }, 617 614 { 35, -1 }, … … 627 624 { -1, -1 }, 628 625 { -1, -1 }, 629 { 8 8, -1 },626 { 87, -1 }, 630 627 { -1, -1 }, 631 628 { -1, -1 }, … … 634 631 { -1, -1 }, 635 632 { 46, 521 }, 636 { 80, -1 },633 { 79, -1 }, 637 634 { -1, -1 }, 638 635 { -1, -1 }, … … 642 639 { -1, -1 }, 643 640 { -1, -1 }, 644 { 6 9, -1 },641 { 68, -1 }, 645 642 { -1, -1 }, 646 643 { 62, -1 }, … … 652 649 { -1, -1 }, 653 650 { -1, -1 }, 654 { 9 5, -1 },651 { 94, -1 }, 655 652 { -1, -1 }, 656 653 { -1, -1 }, … … 668 665 { -1, -1 }, 669 666 { 57, -1 }, 670 { 6 8, -1 },671 { -1, -1 }, 672 { -1, -1 }, 673 { 10 7, 527 },674 { -1, -1 }, 675 { 10 8, -1 },667 { 67, -1 }, 668 { -1, -1 }, 669 { -1, -1 }, 670 { 106, 527 }, 671 { -1, -1 }, 672 { 107, -1 }, 676 673 { -1, -1 }, 677 674 { -1, -1 }, … … 693 690 { -1, -1 }, 694 691 { -1, -1 }, 695 { 11 2, -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 { 11 8, -1 },705 { -1, -1 }, 706 { -1, -1 }, 707 { -1, -1 }, 708 { -1, -1 }, 709 { -1, -1 }, 710 { -1, -1 }, 711 { -1, -1 }, 712 { 7 9, -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 }, 713 710 { -1, -1 }, 714 711 { -1, -1 }, … … 717 714 { 52, -1 }, 718 715 { -1, -1 }, 719 { 7 4, -1 },720 { 13 2, -1 },716 { 73, -1 }, 717 { 131, -1 }, 721 718 { -1, -1 }, 722 719 { -1, -1 }, … … 724 721 { 54, 516 }, 725 722 { -1, -1 }, 726 { 8 5, -1 },723 { 84, -1 }, 727 724 { 9, -1 }, 728 725 { -1, -1 }, 729 726 { -1, -1 }, 730 727 { -1, -1 }, 731 { 10 5, -1 },728 { 104, -1 }, 732 729 { 29, -1 }, 733 730 { -1, -1 }, … … 750 747 { -1, -1 }, 751 748 { -1, -1 }, 752 { 10 9, -1 },749 { 108, -1 }, 753 750 { 13, 514 }, 754 751 { 40, -1 }, 755 { 11 1, -1 },752 { 110, -1 }, 756 753 { -1, -1 }, 757 754 { 7, 525 }, 758 755 { -1, -1 }, 759 { 12 5, -1 },760 { 10 6, -1 },761 { 7 5, 520 },762 { -1, -1 }, 763 { 12 2, -1 },764 { 8 3, -1 },765 { -1, -1 }, 766 { -1, -1 }, 767 { -1, -1 }, 768 { 11 9, -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 }, 769 766 { -1, -1 }, 770 767 { 10, 519 }, … … 776 773 { 63, -1 }, 777 774 { 66, -1 }, 778 { 81, -1 }, 779 { 91, -1 }, 780 { 94, -1 }, 775 { 80, -1 }, 776 { 90, -1 }, 777 { 93, -1 }, 778 { 96, -1 }, 781 779 { 97, -1 }, 782 { 98, -1 },783 { 1 04, -1 },780 { 103, -1 }, 781 { 114, -1 }, 784 782 { 115, -1 }, 785 { 116, -1 }, 786 { 121, -1 }, 787 { 129, -1 }, 788 { 133, -1 }, 783 { 120, -1 }, 784 { 128, -1 }, 785 { 132, -1 }, 789 786 }; 790 787 … … 865 862 { "attributeWithReservedEnumType", DontDelete | CustomAccessor, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjAttributeWithReservedEnumType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjAttributeWithReservedEnumType) }, 866 863 #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) }, 868 865 #else 869 866 { 0, 0, NoIntrinsic, 0, 0 }, 870 867 #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) }, 884 880 { "voidMethod", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethod), (intptr_t) (0) }, 885 881 { "voidMethodWithArgs", JSC::Function, NoIntrinsic, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionVoidMethodWithArgs), (intptr_t) (3) }, … … 958 954 }; 959 955 960 static const HashTable JSTestObjPrototypeTable = { 13 6, 511, true, JSTestObjPrototypeTableValues, 0, JSTestObjPrototypeTableIndex };956 static const HashTable JSTestObjPrototypeTable = { 135, 511, true, JSTestObjPrototypeTableValues, 0, JSTestObjPrototypeTableIndex }; 961 957 const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) }; 962 958 … … 4659 4655 } 4660 4656 4661 // Constant getters4662 4663 #if ENABLE(Condition1)4664 EncodedJSValue jsTestObjCONDITIONAL_CONST(ExecState*, JSObject*, EncodedJSValue, PropertyName)4665 {4666 return JSValue::encode(jsNumber(0));4667 }4668 4669 #endif4670 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 4735 4657 bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) 4736 4658 { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
r169954 r169979 373 373 void setJSTestObjAttributeWithReservedEnumType(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::EncodedJSValue); 374 374 JSC::EncodedJSValue jsTestObjConstructor(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName); 375 // Constants376 377 #if ENABLE(Condition1)378 JSC::EncodedJSValue jsTestObjCONDITIONAL_CONST(JSC::ExecState*, JSC::JSObject*, JSC::EncodedJSValue, JSC::PropertyName);379 #endif380 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);393 375 394 376 } // namespace WebCore -
trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
r165676 r169979 51 51 DOM_CONST_VALUE_8 = 8, 52 52 DOM_CONST_VALUE_9 = -1, 53 DOM_CONST_VALUE_10 = "my constant string",54 53 DOM_CONST_VALUE_11 = 0xffffffff, 55 54 DOM_CONST_VALUE_12 = 0x01, -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r168302 r169979 246 246 const unsigned short CONST_VALUE_8 = 8; 247 247 const short CONST_VALUE_9 = -1; 248 const DOMString CONST_VALUE_10 = "my constant string";249 248 const unsigned short CONST_VALUE_11 = 0xffffffff; 250 249 const unsigned short CONST_VALUE_12 = 0x01;
Note: See TracChangeset
for help on using the changeset viewer.