Changeset 34821 in webkit for trunk/JavaScriptCore/kjs/lookup.cpp
- Timestamp:
- Jun 26, 2008, 7:53:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/lookup.cpp
r34607 r34821 41 41 } 42 42 43 JSValue* staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot) 44 { 45 // Look for cached value in dynamic map of properties (in JSObject) 46 ASSERT(slot.slotBase()->isObject()); 47 JSObject* thisObj = static_cast<JSObject*>(slot.slotBase()); 48 JSValue* cachedVal = thisObj->getDirect(propertyName); 49 if (cachedVal) 50 return cachedVal; 51 52 const HashEntry* entry = slot.staticEntry(); 53 JSValue* val = new (exec) PrototypeFunction(exec, entry->length, propertyName, entry->functionValue); 54 thisObj->putDirect(propertyName, val, entry->attributes); 55 return val; 43 56 } 57 58 void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot) 59 { 60 ASSERT(entry->attributes & Function); 61 PrototypeFunction* function = new (exec) PrototypeFunction(exec, entry->length, propertyName, entry->functionValue); 62 thisObj->putDirect(propertyName, function, entry->attributes); 63 slot.setValueSlot(thisObj->getDirectLocation(propertyName)); 64 } 65 66 }
Note:
See TracChangeset
for help on using the changeset viewer.