]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/Lookup.h
JavaScriptCore-903.tar.gz
[apple/javascriptcore.git] / runtime / Lookup.h
index dd36400622424b51826e452718006ff41c38e6fc..43184e56dcaaed5e54a3daaa3165e7bc45f9a031 100644 (file)
@@ -53,9 +53,10 @@ namespace JSC {
     typedef PropertySlot::GetValueFunc GetFunction;
     typedef void (*PutFunction)(ExecState*, JSObject* baseObject, JSValue value);
 
-    class HashEntry : public FastAllocBase {
+    class HashEntry {
+        WTF_MAKE_FAST_ALLOCATED;
     public:
-        void initialize(UString::Rep* key, unsigned char attributes, intptr_t v1, intptr_t v2
+        void initialize(StringImpl* key, unsigned char attributes, intptr_t v1, intptr_t v2
 #if ENABLE(JIT)
                         , ThunkGenerator generator = 0
 #endif
@@ -71,12 +72,12 @@ namespace JSC {
             m_next = 0;
         }
 
-        void setKey(UString::Rep* key) { m_key = key; }
-        UString::Rep* key() const { return m_key; }
+        void setKey(StringImpl* key) { m_key = key; }
+        StringImpl* key() const { return m_key; }
 
         unsigned char attributes() const { return m_attributes; }
 
-#if ENABLE(JIT)
+#if ENABLE(JIT) && ENABLE(JIT_OPTIMIZE_NATIVE_CALL)
         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; }
@@ -91,7 +92,7 @@ namespace JSC {
         HashEntry* next() const { return m_next; }
 
     private:
-        UString::Rep* m_key;
+        StringImpl* m_key;
         unsigned char m_attributes; // JSObject attributes
 
         union {
@@ -159,13 +160,13 @@ namespace JSC {
         {
             ASSERT(table);
 
-            const HashEntry* entry = &table[identifier.ustring().rep()->existingHash() & compactHashSizeMask];
+            const HashEntry* entry = &table[identifier.impl()->existingHash() & compactHashSizeMask];
 
             if (!entry->key())
                 return 0;
 
             do {
-                if (entry->key() == identifier.ustring().rep())
+                if (entry->key() == identifier.impl())
                     return entry;
                 entry = entry->next();
             } while (entry);
@@ -311,9 +312,9 @@ namespace JSC {
 
         if (entry->attributes() & Function) { // function: put as override property
             if (LIKELY(value.isCell()))
-                thisObj->putDirectFunction(propertyName, value.asCell());
+                thisObj->putDirectFunction(exec->globalData(), propertyName, value.asCell());
             else
-                thisObj->putDirect(propertyName, value);
+                thisObj->putDirect(exec->globalData(), propertyName, value);
         } else if (!(entry->attributes() & ReadOnly))
             entry->propertyPutter()(exec, thisObj, value);