-// -*- mode: c++; c-basic-offset: 4 -*-
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#include "config.h"
#include "JSObjectRef.h"
+#include "JSObjectRefPrivate.h"
-#include <wtf/Platform.h>
#include "APICast.h"
-#include "JSValueRef.h"
+#include "CodeBlock.h"
+#include "DateConstructor.h"
+#include "ErrorConstructor.h"
+#include "FunctionConstructor.h"
+#include "Identifier.h"
+#include "InitializeThreading.h"
+#include "JSArray.h"
#include "JSCallbackConstructor.h"
#include "JSCallbackFunction.h"
#include "JSCallbackObject.h"
#include "JSClassRef.h"
+#include "JSFunction.h"
#include "JSGlobalObject.h"
-
+#include "JSObject.h"
+#include "JSRetainPtr.h"
+#include "JSString.h"
+#include "JSValueRef.h"
+#include "ObjectPrototype.h"
#include "PropertyNameArray.h"
-#include "function.h"
-#include "function_object.h"
-#include "identifier.h"
-#include "internal.h"
-#include "object.h"
-#include "object_object.h"
+#include "RegExpConstructor.h"
-using namespace KJS;
+using namespace JSC;
JSClassRef JSClassCreate(const JSClassDefinition* definition)
{
- JSLock lock;
- JSClassRef jsClass = (definition->attributes & kJSClassAttributeNoAutomaticPrototype)
+ initializeThreading();
+ RefPtr<OpaqueJSClass> jsClass = (definition->attributes & kJSClassAttributeNoAutomaticPrototype)
? OpaqueJSClass::createNoAutomaticPrototype(definition)
: OpaqueJSClass::create(definition);
- return JSClassRetain(jsClass);
+ return jsClass.release().leakRef();
}
JSClassRef JSClassRetain(JSClassRef jsClass)
{
- JSLock lock;
jsClass->ref();
return jsClass;
}
void JSClassRelease(JSClassRef jsClass)
{
- JSLock lock;
jsClass->deref();
}
JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef jsClass, void* data)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
if (!jsClass)
- return toRef(new JSObject(exec->lexicalGlobalObject()->objectPrototype())); // slightly more efficient
+ return toRef(constructEmptyObject(exec));
- JSValue* jsPrototype = jsClass->prototype(ctx);
- if (!jsPrototype)
- jsPrototype = exec->lexicalGlobalObject()->objectPrototype();
+ JSCallbackObject<JSObjectWithGlobalObject>* object = new (exec) JSCallbackObject<JSObjectWithGlobalObject>(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackObjectStructure(), jsClass, data);
+ if (JSObject* prototype = jsClass->prototype(exec))
+ object->setPrototype(exec->globalData(), prototype);
- return toRef(new JSCallbackObject<JSObject>(exec, jsClass, jsPrototype, data));
+ return toRef(object);
}
JSObjectRef JSObjectMakeFunctionWithCallback(JSContextRef ctx, JSStringRef name, JSObjectCallAsFunctionCallback callAsFunction)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
- Identifier nameID = name ? Identifier(toJS(name)) : Identifier("anonymous");
+ APIEntryShim entryShim(exec);
+
+ Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous");
- return toRef(new JSCallbackFunction(exec, callAsFunction, nameID));
+ return toRef(new (exec) JSCallbackFunction(exec, exec->lexicalGlobalObject(), callAsFunction, nameID));
}
JSObjectRef JSObjectMakeConstructor(JSContextRef ctx, JSClassRef jsClass, JSObjectCallAsConstructorCallback callAsConstructor)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
-
- JSValue* jsPrototype = jsClass
- ? jsClass->prototype(ctx)
- : exec->dynamicGlobalObject()->objectPrototype();
-
- JSCallbackConstructor* constructor = new JSCallbackConstructor(exec, jsClass, callAsConstructor);
- constructor->putDirect(exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
+ APIEntryShim entryShim(exec);
+
+ JSValue jsPrototype = jsClass ? jsClass->prototype(exec) : 0;
+ if (!jsPrototype)
+ jsPrototype = exec->lexicalGlobalObject()->objectPrototype();
+
+ JSCallbackConstructor* constructor = new (exec) JSCallbackConstructor(exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor);
+ constructor->putDirect(exec->globalData(), exec->propertyNames().prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
return toRef(constructor);
}
JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned parameterCount, const JSStringRef parameterNames[], JSStringRef body, JSStringRef sourceURL, int startingLineNumber, JSValueRef* exception)
{
- JSLock lock;
-
ExecState* exec = toJS(ctx);
- UString::Rep* bodyRep = toJS(body);
- UString::Rep* sourceURLRep = sourceURL ? toJS(sourceURL) : &UString::Rep::null;
-
- Identifier nameID = name ? Identifier(toJS(name)) : Identifier("anonymous");
+ APIEntryShim entryShim(exec);
+
+ Identifier nameID = name ? name->identifier(&exec->globalData()) : Identifier(exec, "anonymous");
- List args;
+ MarkedArgumentBuffer args;
for (unsigned i = 0; i < parameterCount; i++)
- args.append(jsString(UString(toJS(parameterNames[i]))));
- args.append(jsString(UString(bodyRep)));
+ args.append(jsString(exec, parameterNames[i]->ustring()));
+ args.append(jsString(exec, body->ustring()));
+
+ JSObject* result = constructFunction(exec, exec->lexicalGlobalObject(), args, nameID, sourceURL->ustring(), startingLineNumber);
+ if (exec->hadException()) {
+ if (exception)
+ *exception = toRef(exec, exec->exception());
+ exec->clearException();
+ result = 0;
+ }
+ return toRef(result);
+}
+
+JSObjectRef JSObjectMakeArray(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
+ JSObject* result;
+ if (argumentCount) {
+ MarkedArgumentBuffer argList;
+ for (size_t i = 0; i < argumentCount; ++i)
+ argList.append(toJS(exec, arguments[i]));
+
+ result = constructArray(exec, argList);
+ } else
+ result = constructEmptyArray(exec);
+
+ if (exec->hadException()) {
+ if (exception)
+ *exception = toRef(exec, exec->exception());
+ exec->clearException();
+ result = 0;
+ }
+
+ return toRef(result);
+}
+
+JSObjectRef JSObjectMakeDate(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
+ MarkedArgumentBuffer argList;
+ for (size_t i = 0; i < argumentCount; ++i)
+ argList.append(toJS(exec, arguments[i]));
+
+ JSObject* result = constructDate(exec, exec->lexicalGlobalObject(), argList);
+ if (exec->hadException()) {
+ if (exception)
+ *exception = toRef(exec, exec->exception());
+ exec->clearException();
+ result = 0;
+ }
+
+ return toRef(result);
+}
+
+JSObjectRef JSObjectMakeError(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
+ JSValue message = argumentCount ? toJS(exec, arguments[0]) : jsUndefined();
+ Structure* errorStructure = exec->lexicalGlobalObject()->errorStructure();
+ JSObject* result = ErrorInstance::create(exec, errorStructure, message);
+
+ if (exec->hadException()) {
+ if (exception)
+ *exception = toRef(exec, exec->exception());
+ exec->clearException();
+ result = 0;
+ }
+
+ return toRef(result);
+}
+
+JSObjectRef JSObjectMakeRegExp(JSContextRef ctx, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
- JSObject* result = exec->dynamicGlobalObject()->functionConstructor()->construct(exec, args, nameID, UString(sourceURLRep), startingLineNumber);
+ MarkedArgumentBuffer argList;
+ for (size_t i = 0; i < argumentCount; ++i)
+ argList.append(toJS(exec, arguments[i]));
+
+ JSObject* result = constructRegExp(exec, exec->lexicalGlobalObject(), argList);
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
result = 0;
}
+
return toRef(result);
}
-JSValueRef JSObjectGetPrototype(JSContextRef, JSObjectRef object)
+JSValueRef JSObjectGetPrototype(JSContextRef ctx, JSObjectRef object)
{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- return toRef(jsObject->prototype());
+ return toRef(exec, jsObject->prototype());
}
-void JSObjectSetPrototype(JSContextRef, JSObjectRef object, JSValueRef value)
+void JSObjectSetPrototype(JSContextRef ctx, JSObjectRef object, JSValueRef value)
{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- JSValue* jsValue = toJS(value);
+ JSValue jsValue = toJS(exec, value);
- jsObject->setPrototype(jsValue);
+ jsObject->setPrototypeWithCycleCheck(exec->globalData(), jsValue.isObject() ? jsValue : jsNull());
}
bool JSObjectHasProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- UString::Rep* nameRep = toJS(propertyName);
- return jsObject->hasProperty(exec, Identifier(nameRep));
+ return jsObject->hasProperty(exec, propertyName->identifier(&exec->globalData()));
}
JSValueRef JSObjectGetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- UString::Rep* nameRep = toJS(propertyName);
- JSValue* jsValue = jsObject->get(exec, Identifier(nameRep));
+ JSValue jsValue = jsObject->get(exec, propertyName->identifier(&exec->globalData()));
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
}
- return toRef(jsValue);
+ return toRef(exec, jsValue);
}
void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- UString::Rep* nameRep = toJS(propertyName);
- JSValue* jsValue = toJS(value);
-
- jsObject->put(exec, Identifier(nameRep), jsValue, attributes);
+ Identifier name(propertyName->identifier(&exec->globalData()));
+ JSValue jsValue = toJS(exec, value);
+
+ if (attributes && !jsObject->hasProperty(exec, name))
+ jsObject->putWithAttributes(exec, name, jsValue, attributes);
+ else {
+ PutPropertySlot slot;
+ jsObject->put(exec, name, jsValue, slot);
+ }
+
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
}
}
JSValueRef JSObjectGetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- JSValue* jsValue = jsObject->get(exec, propertyIndex);
+ JSValue jsValue = jsObject->get(exec, propertyIndex);
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
}
- return toRef(jsValue);
+ return toRef(exec, jsValue);
}
void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned propertyIndex, JSValueRef value, JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- JSValue* jsValue = toJS(value);
+ JSValue jsValue = toJS(exec, value);
jsObject->put(exec, propertyIndex, jsValue);
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
}
}
bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
- UString::Rep* nameRep = toJS(propertyName);
- bool result = jsObject->deleteProperty(exec, Identifier(nameRep));
+ bool result = jsObject->deleteProperty(exec, propertyName->identifier(&exec->globalData()));
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
}
return result;
{
JSObject* jsObject = toJS(object);
- if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info))
+ if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info))
return static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivate();
- else if (jsObject->inherits(&JSCallbackObject<JSObject>::info))
- return static_cast<JSCallbackObject<JSObject>*>(jsObject)->getPrivate();
+ if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info))
+ return static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivate();
return 0;
}
{
JSObject* jsObject = toJS(object);
- if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::info)) {
+ if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) {
static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivate(data);
return true;
- } else if (jsObject->inherits(&JSCallbackObject<JSObject>::info)) {
- static_cast<JSCallbackObject<JSObject>*>(jsObject)->setPrivate(data);
+ }
+ if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
+ static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivate(data);
return true;
}
return false;
}
-bool JSObjectIsFunction(JSContextRef, JSObjectRef object)
+JSValueRef JSObjectGetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+ JSObject* jsObject = toJS(object);
+ JSValue result;
+ Identifier name(propertyName->identifier(&exec->globalData()));
+ if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info))
+ result = static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->getPrivateProperty(name);
+ else if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info))
+ result = static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->getPrivateProperty(name);
+ return toRef(exec, result);
+}
+
+bool JSObjectSetPrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value)
+{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+ JSObject* jsObject = toJS(object);
+ JSValue jsValue = value ? toJS(exec, value) : JSValue();
+ Identifier name(propertyName->identifier(&exec->globalData()));
+ if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) {
+ static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
+ return true;
+ }
+ if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
+ static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->setPrivateProperty(exec->globalData(), name, jsValue);
+ return true;
+ }
+ return false;
+}
+
+bool JSObjectDeletePrivateProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName)
{
+ ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
JSObject* jsObject = toJS(object);
- return jsObject->implementsCall();
+ Identifier name(propertyName->identifier(&exec->globalData()));
+ if (jsObject->inherits(&JSCallbackObject<JSGlobalObject>::s_info)) {
+ static_cast<JSCallbackObject<JSGlobalObject>*>(jsObject)->deletePrivateProperty(name);
+ return true;
+ }
+ if (jsObject->inherits(&JSCallbackObject<JSObjectWithGlobalObject>::s_info)) {
+ static_cast<JSCallbackObject<JSObjectWithGlobalObject>*>(jsObject)->deletePrivateProperty(name);
+ return true;
+ }
+ return false;
+}
+
+bool JSObjectIsFunction(JSContextRef, JSObjectRef object)
+{
+ CallData callData;
+ return toJS(object)->getCallData(callData) != CallTypeNone;
}
JSValueRef JSObjectCallAsFunction(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
JSObject* jsThisObject = toJS(thisObject);
if (!jsThisObject)
- jsThisObject = exec->dynamicGlobalObject();
-
- List argList;
+ jsThisObject = exec->globalThisValue();
+
+ MarkedArgumentBuffer argList;
for (size_t i = 0; i < argumentCount; i++)
- argList.append(toJS(arguments[i]));
+ argList.append(toJS(exec, arguments[i]));
- JSValueRef result = toRef(jsObject->call(exec, jsThisObject, argList)); // returns NULL if object->implementsCall() is false
+ CallData callData;
+ CallType callType = jsObject->getCallData(callData);
+ if (callType == CallTypeNone)
+ return 0;
+
+ JSValueRef result = toRef(exec, call(exec, jsObject, callType, callData, jsThisObject, argList));
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
result = 0;
}
bool JSObjectIsConstructor(JSContextRef, JSObjectRef object)
{
JSObject* jsObject = toJS(object);
- return jsObject->implementsConstruct();
+ ConstructData constructData;
+ return jsObject->getConstructData(constructData) != ConstructTypeNone;
}
JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSLock lock;
ExecState* exec = toJS(ctx);
+ APIEntryShim entryShim(exec);
+
JSObject* jsObject = toJS(object);
-
- List argList;
+
+ ConstructData constructData;
+ ConstructType constructType = jsObject->getConstructData(constructData);
+ if (constructType == ConstructTypeNone)
+ return 0;
+
+ MarkedArgumentBuffer argList;
for (size_t i = 0; i < argumentCount; i++)
- argList.append(toJS(arguments[i]));
-
- JSObjectRef result = toRef(jsObject->construct(exec, argList)); // returns NULL if object->implementsCall() is false
+ argList.append(toJS(exec, arguments[i]));
+ JSObjectRef result = toRef(construct(exec, jsObject, constructType, constructData, argList));
if (exec->hadException()) {
if (exception)
- *exception = toRef(exec->exception());
+ *exception = toRef(exec, exec->exception());
exec->clearException();
result = 0;
}
return result;
}
-struct OpaqueJSPropertyNameArray
-{
- OpaqueJSPropertyNameArray() : refCount(0)
+struct OpaqueJSPropertyNameArray {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ OpaqueJSPropertyNameArray(JSGlobalData* globalData)
+ : refCount(0)
+ , globalData(globalData)
{
}
unsigned refCount;
- PropertyNameArray array;
+ JSGlobalData* globalData;
+ Vector<JSRetainPtr<JSStringRef> > array;
};
JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef object)
{
- JSLock lock;
JSObject* jsObject = toJS(object);
ExecState* exec = toJS(ctx);
-
- JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray();
- jsObject->getPropertyNames(exec, propertyNames->array);
+ APIEntryShim entryShim(exec);
+
+ JSGlobalData* globalData = &exec->globalData();
+
+ JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(globalData);
+ PropertyNameArray array(globalData);
+ jsObject->getPropertyNames(exec, array);
+
+ size_t size = array.size();
+ propertyNames->array.reserveInitialCapacity(size);
+ for (size_t i = 0; i < size; ++i)
+ propertyNames->array.append(JSRetainPtr<JSStringRef>(Adopt, OpaqueJSString::create(array[i].ustring()).leakRef()));
return JSPropertyNameArrayRetain(propertyNames);
}
JSPropertyNameArrayRef JSPropertyNameArrayRetain(JSPropertyNameArrayRef array)
{
- JSLock lock;
++array->refCount;
return array;
}
void JSPropertyNameArrayRelease(JSPropertyNameArrayRef array)
{
- JSLock lock;
- if (--array->refCount == 0)
+ if (--array->refCount == 0) {
+ APIEntryShim entryShim(array->globalData, false);
delete array;
+ }
}
size_t JSPropertyNameArrayGetCount(JSPropertyNameArrayRef array)
JSStringRef JSPropertyNameArrayGetNameAtIndex(JSPropertyNameArrayRef array, size_t index)
{
- return toRef(array->array[static_cast<unsigned>(index)].ustring().rep());
+ return array->array[static_cast<unsigned>(index)].get();
}
void JSPropertyNameAccumulatorAddName(JSPropertyNameAccumulatorRef array, JSStringRef propertyName)
{
- JSLock lock;
PropertyNameArray* propertyNames = toJS(array);
- UString::Rep* rep = toJS(propertyName);
-
- propertyNames->add(Identifier(rep));
+ APIEntryShim entryShim(propertyNames->globalData());
+ propertyNames->add(propertyName->identifier(propertyNames->globalData()));
}