tizen beta release
[framework/web/webkit-efl.git] / Source / JavaScriptCore / API / JSObjectRef.cpp
index 42ac99c..3e10993 100755 (executable)
@@ -124,7 +124,7 @@ JSObjectRef JSObjectMakeFunction(JSContextRef ctx, JSStringRef name, unsigned pa
         args.append(jsString(exec, parameterNames[i]->ustring()));
     args.append(jsString(exec, body->ustring()));
 
-    JSObject* result = constructFunction(exec, exec->lexicalGlobalObject(), args, nameID, sourceURL->ustring(), startingLineNumber);
+    JSObject* result = constructFunction(exec, exec->lexicalGlobalObject(), args, nameID, sourceURL->ustring(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber::first()));
     if (exec->hadException()) {
         if (exception)
             *exception = toRef(exec, exec->exception());
@@ -274,10 +274,10 @@ void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef prope
     JSValue jsValue = toJS(exec, value);
 
     if (attributes && !jsObject->hasProperty(exec, name))
-        jsObject->putWithAttributes(exec, name, jsValue, attributes);
+        jsObject->methodTable()->putWithAttributes(jsObject, exec, name, jsValue, attributes);
     else {
         PutPropertySlot slot;
-        jsObject->putVirtual(exec, name, jsValue, slot);
+        jsObject->methodTable()->put(jsObject, exec, name, jsValue, slot);
     }
 
     if (exec->hadException()) {
@@ -312,7 +312,7 @@ void JSObjectSetPropertyAtIndex(JSContextRef ctx, JSObjectRef object, unsigned p
     JSObject* jsObject = toJS(object);
     JSValue jsValue = toJS(exec, value);
     
-    jsObject->putVirtual(exec, propertyIndex, jsValue);
+    jsObject->methodTable()->putByIndex(jsObject, exec, propertyIndex, jsValue);
     if (exec->hadException()) {
         if (exception)
             *exception = toRef(exec, exec->exception());
@@ -327,7 +327,7 @@ bool JSObjectDeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef pr
 
     JSObject* jsObject = toJS(object);
 
-    bool result = jsObject->deletePropertyVirtual(exec, propertyName->identifier(&exec->globalData()));
+    bool result = jsObject->methodTable()->deleteProperty(jsObject, exec, propertyName->identifier(&exec->globalData()));
     if (exec->hadException()) {
         if (exception)
             *exception = toRef(exec, exec->exception());
@@ -454,7 +454,7 @@ bool JSObjectIsConstructor(JSContextRef, JSObjectRef object)
 {
     JSObject* jsObject = toJS(object);
     ConstructData constructData;
-    return jsObject->getConstructDataVirtual(constructData) != ConstructTypeNone;
+    return jsObject->methodTable()->getConstructData(jsObject, constructData) != ConstructTypeNone;
 }
 
 JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
@@ -465,7 +465,7 @@ JSObjectRef JSObjectCallAsConstructor(JSContextRef ctx, JSObjectRef object, size
     JSObject* jsObject = toJS(object);
 
     ConstructData constructData;
-    ConstructType constructType = jsObject->getConstructDataVirtual(constructData);
+    ConstructType constructType = jsObject->methodTable()->getConstructData(jsObject, constructData);
     if (constructType == ConstructTypeNone)
         return 0;
 
@@ -506,7 +506,7 @@ JSPropertyNameArrayRef JSObjectCopyPropertyNames(JSContextRef ctx, JSObjectRef o
 
     JSPropertyNameArrayRef propertyNames = new OpaqueJSPropertyNameArray(globalData);
     PropertyNameArray array(globalData);
-    jsObject->getPropertyNames(exec, array);
+    jsObject->methodTable()->getPropertyNames(jsObject, exec, array, ExcludeDontEnumProperties);
 
     size_t size = array.size();
     propertyNames->array.reserveInitialCapacity(size);
@@ -578,12 +578,11 @@ bool JSSetArrayElement(JSContextRef context, JSObjectRef object, int index, JSVa
 #if ENABLE(TIZEN_JS_EXT_API)
     ExecState* ex = toJS(context);
     JSObject* obj = toJS(object);
+    PutPropertySlot slot;
+    Identifier propertyName;
+    
+    obj->methodTable()->putByIndex(obj, ex, index, toJS(ex, vp));
 
-#if ENABLE(TIZEN_DAILY_UPVERSIONING)
-    obj->putVirtual(ex, index, toJS(ex, vp));
-#else
-    obj->put(ex, index, toJS(ex, vp));
-#endif
     return TRUE;
 #else
     return FALSE;
@@ -654,11 +653,8 @@ bool JSSetArrayElementInArrayList(JSContextRef context, JSObjectRef object, cons
     Identifier ident(ex, strIndex);
     PutPropertySlot slot;
 
-#if ENABLE(TIZEN_DAILY_UPVERSIONING)
-    obj->putVirtual(ex, ident, toJS(ex, vp), slot);
-#else
-    obj->put(ex, ident, toJS(ex, vp), slot);
-#endif
+    //typedef void (*PutFunctionPtr)(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
+    obj->methodTable()->put(obj, ex, ident, toJS(ex, vp), slot);
 
     return TRUE;
 #else