#endif
namespace JSC {
-
// Hash table generated by the create_hash_table script.
struct HashTableValue {
const char* key; // property name
unsigned char attributes; // JSObject attributes
intptr_t value1;
intptr_t value2;
+#if ENABLE(JIT)
+ ThunkGenerator generator;
+#endif
};
// FIXME: There is no reason this get function can't be simpler.
class HashEntry : public FastAllocBase {
public:
- void initialize(UString::Rep* key, unsigned char attributes, intptr_t v1, intptr_t v2)
+ void initialize(UString::Rep* key, unsigned char attributes, intptr_t v1, intptr_t v2
+#if ENABLE(JIT)
+ , ThunkGenerator generator = 0
+#endif
+ )
{
m_key = key;
m_attributes = attributes;
m_u.store.value1 = v1;
m_u.store.value2 = v2;
+#if ENABLE(JIT)
+ m_u.function.generator = generator;
+#endif
m_next = 0;
}
unsigned char attributes() const { return m_attributes; }
+#if ENABLE(JIT)
+ ThunkGenerator generator() const { ASSERT(m_attributes & Function); return m_u.function.generator; }
+#endif
NativeFunction function() const { ASSERT(m_attributes & Function); return m_u.function.functionValue; }
unsigned char functionLength() const { ASSERT(m_attributes & Function); return static_cast<unsigned char>(m_u.function.length); }
struct {
NativeFunction functionValue;
intptr_t length; // number of arguments for function
+#if ENABLE(JIT)
+ ThunkGenerator generator;
+#endif
} function;
struct {
GetFunction get;
if (entry->attributes() & Function)
setUpStaticFunctionSlot(exec, entry, thisObj, propertyName, slot);
else
- slot.setCustom(thisObj, entry->propertyGetter());
+ slot.setCacheableCustom(thisObj, entry->propertyGetter());
return true;
}
ASSERT(!(entry->attributes() & Function));
- slot.setCustom(thisObj, entry->propertyGetter());
+ slot.setCacheableCustom(thisObj, entry->propertyGetter());
return true;
}