X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..217a6308cd6a1dc049a0bb69263bd4c91f91c4d0:/runtime/JSCell.cpp diff --git a/runtime/JSCell.cpp b/runtime/JSCell.cpp index 7f9ba88..07b3331 100644 --- a/runtime/JSCell.cpp +++ b/runtime/JSCell.cpp @@ -27,6 +27,7 @@ #include "JSString.h" #include "JSObject.h" #include "NumberObject.h" +#include "Operations.h" #include namespace JSC { @@ -38,7 +39,11 @@ void JSCell::destroy(JSCell* cell) cell->JSCell::~JSCell(); } -bool JSCell::getString(ExecState* exec, UString&stringValue) const +void JSCell::copyBackingStore(JSCell*, CopyVisitor&) +{ +} + +bool JSCell::getString(ExecState* exec, String& stringValue) const { if (!isString()) return false; @@ -46,9 +51,9 @@ bool JSCell::getString(ExecState* exec, UString&stringValue) const return true; } -UString JSCell::getString(ExecState* exec) const +String JSCell::getString(ExecState* exec) const { - return isString() ? static_cast(this)->value(exec) : UString(); + return isString() ? static_cast(this)->value(exec) : String(); } JSObject* JSCell::getObject() @@ -61,17 +66,23 @@ const JSObject* JSCell::getObject() const return isObject() ? static_cast(this) : 0; } -CallType JSCell::getCallData(JSCell*, CallData&) +CallType JSCell::getCallData(JSCell*, CallData& callData) { + callData.js.functionExecutable = 0; + callData.js.scope = 0; + callData.native.function = 0; return CallTypeNone; } -ConstructType JSCell::getConstructData(JSCell*, ConstructData&) +ConstructType JSCell::getConstructData(JSCell*, ConstructData& constructData) { + constructData.js.functionExecutable = 0; + constructData.js.scope = 0; + constructData.native.function = 0; return ConstructTypeNone; } -bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identifier& identifier, PropertySlot& slot) +bool JSCell::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName identifier, PropertySlot& slot) { // This is not a general purpose implementation of getOwnPropertySlot. // It should only be called by JSValue::get. @@ -95,7 +106,7 @@ bool JSCell::getOwnPropertySlotByIndex(JSCell* cell, ExecState* exec, unsigned i return true; } -void JSCell::put(JSCell* cell, ExecState* exec, const Identifier& identifier, JSValue value, PutPropertySlot& slot) +void JSCell::put(JSCell* cell, ExecState* exec, PropertyName identifier, JSValue value, PutPropertySlot& slot) { if (cell->isString()) { JSValue(cell).putToPrimitive(exec, identifier, value, slot); @@ -116,7 +127,7 @@ void JSCell::putByIndex(JSCell* cell, ExecState* exec, unsigned identifier, JSVa thisObject->methodTable()->putByIndex(thisObject, exec, identifier, value, shouldThrow); } -bool JSCell::deleteProperty(JSCell* cell, ExecState* exec, const Identifier& identifier) +bool JSCell::deleteProperty(JSCell* cell, ExecState* exec, PropertyName identifier) { JSObject* thisObject = cell->toObject(exec, exec->lexicalGlobalObject()); return thisObject->methodTable()->deleteProperty(thisObject, exec, identifier); @@ -169,46 +180,56 @@ void slowValidateCell(JSCell* cell) JSValue JSCell::defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return jsUndefined(); } void JSCell::getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); +} + +void JSCell::getOwnNonIndexPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) +{ + RELEASE_ASSERT_NOT_REACHED(); +} + +String JSCell::className(const JSObject*) +{ + RELEASE_ASSERT_NOT_REACHED(); + return String(); } -UString JSCell::className(const JSObject*) +const char* JSCell::className() { - ASSERT_NOT_REACHED(); - return UString(); + return classInfo()->className; } void JSCell::getPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } -bool JSCell::hasInstance(JSObject*, ExecState*, JSValue, JSValue) +bool JSCell::customHasInstance(JSObject*, ExecState*, JSValue) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return false; } -void JSCell::putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned) +void JSCell::putDirectVirtual(JSObject*, ExecState*, PropertyName, JSValue, unsigned) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); } -bool JSCell::defineOwnProperty(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&, bool) +bool JSCell::defineOwnProperty(JSObject*, ExecState*, PropertyName, PropertyDescriptor&, bool) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return false; } -bool JSCell::getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&) +bool JSCell::getOwnPropertyDescriptor(JSObject*, ExecState*, PropertyName, PropertyDescriptor&) { - ASSERT_NOT_REACHED(); + RELEASE_ASSERT_NOT_REACHED(); return false; }