Changeset 43138 in webkit for trunk/JavaScriptCore/API/APICast.h


Ignore:
Timestamp:
May 1, 2009, 9:52:36 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-05-01 Sam Weinig <[email protected]>

Roll out JavaScriptCore API number marshaling.

  • API/APICast.h: (toJS): (toRef):
  • API/JSBase.cpp: (JSEvaluateScript): (JSCheckScriptSyntax):
  • API/JSCallbackConstructor.cpp: (JSC::constructJSCallback):
  • API/JSCallbackFunction.cpp: (JSC::JSCallbackFunction::call):
  • API/JSCallbackObjectFunctions.h: (JSC::::getOwnPropertySlot): (JSC::::put): (JSC::::deleteProperty): (JSC::::construct): (JSC::::hasInstance): (JSC::::call): (JSC::::toNumber): (JSC::::toString): (JSC::::staticValueGetter): (JSC::::callbackGetter):
  • API/JSObjectRef.cpp: (JSObjectMakeFunction): (JSObjectMakeArray): (JSObjectMakeDate): (JSObjectMakeError): (JSObjectMakeRegExp): (JSObjectGetPrototype): (JSObjectSetPrototype): (JSObjectGetProperty): (JSObjectSetProperty): (JSObjectGetPropertyAtIndex): (JSObjectSetPropertyAtIndex): (JSObjectDeleteProperty): (JSObjectCallAsFunction): (JSObjectCallAsConstructor):
  • API/JSValueRef.cpp: (JSValueGetType): (JSValueIsUndefined): (JSValueIsNull): (JSValueIsBoolean): (JSValueIsNumber): (JSValueIsString): (JSValueIsObject): (JSValueIsObjectOfClass): (JSValueIsEqual): (JSValueIsStrictEqual): (JSValueIsInstanceOfConstructor): (JSValueMakeUndefined): (JSValueMakeNull): (JSValueMakeBoolean): (JSValueMakeNumber): (JSValueMakeString): (JSValueToBoolean): (JSValueToNumber): (JSValueToStringCopy): (JSValueToObject): (JSValueProtect): (JSValueUnprotect):
  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
  • runtime/JSNumberCell.cpp:
  • runtime/JSNumberCell.h:
  • runtime/JSValue.h:

WebCore:

2009-05-01 Sam Weinig <[email protected]>

Roll out JavaScriptCore API number marshaling.

  • bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::isEqual):
  • inspector/JavaScriptProfile.cpp: (WebCore::getHeadCallback):
  • inspector/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::getParent): (WebCore::getHead):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/APICast.h

    r43130 r43138  
    2727#define APICast_h
    2828
    29 #include "JSNumberCell.h"
    3029#include "JSValue.h"
    31 #include <wtf/Platform.h>
    3230
    3331namespace JSC {
     
    5856}
    5957
    60 inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v)
     58inline JSC::JSValue toJS(JSValueRef v)
    6159{
    62     JSC::JSValue jsValue = JSC::JSValue::decode(reinterpret_cast<JSC::EncodedJSValue>(const_cast<OpaqueJSValue*>(v)));
    63 #if !USE(ALTERNATE_JSIMMEDIATE)
    64     if (jsValue && jsValue.isNumber()) {
    65         ASSERT(jsValue.isAPIMangledNumber());
    66         return JSC::jsNumber(exec, jsValue.uncheckedGetNumber());
    67     }
    68 #endif
    69     return jsValue;
     60    return JSC::JSValue::decode(reinterpret_cast<JSC::EncodedJSValue>(const_cast<OpaqueJSValue*>(v)));
    7061}
    7162
     
    8576}
    8677
    87 inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v)
     78inline JSValueRef toRef(JSC::JSValue v)
    8879{
    89 #if !USE(ALTERNATE_JSIMMEDIATE)
    90     if (v && v.isNumber()) {
    91         ASSERT(!v.isAPIMangledNumber());
    92         return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(JSC::jsAPIMangledNumber(exec, v.uncheckedGetNumber())));
    93     }
    94 #endif
    9580    return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(v));
     81}
     82
     83inline JSValueRef* toRef(JSC::JSValue* v)
     84{
     85    return reinterpret_cast<JSValueRef*>(v);
    9686}
    9787
Note: See TracChangeset for help on using the changeset viewer.