- static StringObject* create(ExecState*, JSString*);
-
- virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
- virtual bool getOwnPropertySlot(ExecState*, unsigned propertyName, PropertySlot&);
- virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
-
- virtual void put(ExecState* exec, const Identifier& propertyName, JSValue, PutPropertySlot&);
- virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
- virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
+ static StringObject* create(VM& vm, Structure* structure)
+ {
+ JSString* string = jsEmptyString(&vm);
+ StringObject* object = new (NotNull, allocateCell<StringObject>(vm.heap)) StringObject(vm, structure);
+ object->finishCreation(vm, string);
+ return object;
+ }
+ static StringObject* create(VM& vm, Structure* structure, JSString* string)
+ {
+ StringObject* object = new (NotNull, allocateCell<StringObject>(vm.heap)) StringObject(vm, structure);
+ object->finishCreation(vm, string);
+ return object;
+ }
+ static StringObject* create(VM&, JSGlobalObject*, JSString*);