Ignore:
Timestamp:
Oct 24, 2008, 9:22:51 AM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-10-24 Darin Adler <Darin Adler>

  • API/APICast.h:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackFunction.cpp:
  • API/JSCallbackFunction.h:
  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp:
  • API/JSValueRef.cpp:
  • VM/CTI.cpp:
  • VM/CTI.h:
  • VM/CodeBlock.cpp:
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp:
  • VM/CodeGenerator.h:
  • VM/ExceptionHelpers.cpp:
  • VM/ExceptionHelpers.h:
  • VM/JSPropertyNameIterator.cpp:
  • VM/JSPropertyNameIterator.h:
  • VM/Machine.cpp:
  • VM/Machine.h:
  • VM/Register.h:
  • kjs/ArgList.cpp:
  • kjs/ArgList.h:
  • kjs/Arguments.cpp:
  • kjs/Arguments.h:
  • kjs/ArrayConstructor.cpp:
  • kjs/ArrayPrototype.cpp:
  • kjs/BooleanConstructor.cpp:
  • kjs/BooleanConstructor.h:
  • kjs/BooleanObject.h:
  • kjs/BooleanPrototype.cpp:
  • kjs/CallData.cpp:
  • kjs/CallData.h:
  • kjs/ConstructData.cpp:
  • kjs/ConstructData.h:
  • kjs/DateConstructor.cpp:
  • kjs/DateInstance.h:
  • kjs/DatePrototype.cpp:
  • kjs/DatePrototype.h:
  • kjs/DebuggerCallFrame.cpp:
  • kjs/DebuggerCallFrame.h:
  • kjs/ErrorConstructor.cpp:
  • kjs/ErrorPrototype.cpp:
  • kjs/ExecState.cpp:
  • kjs/ExecState.h:
  • kjs/FunctionConstructor.cpp:
  • kjs/FunctionPrototype.cpp:
  • kjs/FunctionPrototype.h:
  • kjs/GetterSetter.cpp:
  • kjs/GetterSetter.h:
  • kjs/InternalFunction.h:
  • kjs/JSActivation.cpp:
  • kjs/JSActivation.h:
  • kjs/JSArray.cpp:
  • kjs/JSArray.h:
  • kjs/JSCell.cpp:
  • kjs/JSCell.h:
  • kjs/JSFunction.cpp:
  • kjs/JSFunction.h:
  • kjs/JSGlobalData.h:
  • kjs/JSGlobalObject.cpp:
  • kjs/JSGlobalObject.h:
  • kjs/JSGlobalObjectFunctions.cpp:
  • kjs/JSGlobalObjectFunctions.h:
  • kjs/JSImmediate.cpp:
  • kjs/JSImmediate.h:
  • kjs/JSNotAnObject.cpp:
  • kjs/JSNotAnObject.h:
  • kjs/JSNumberCell.cpp:
  • kjs/JSNumberCell.h:
  • kjs/JSObject.cpp:
  • kjs/JSObject.h:
  • kjs/JSStaticScopeObject.cpp:
  • kjs/JSStaticScopeObject.h:
  • kjs/JSString.cpp:
  • kjs/JSString.h:
  • kjs/JSValue.h:
  • kjs/JSVariableObject.h:
  • kjs/JSWrapperObject.h:
  • kjs/MathObject.cpp:
  • kjs/MathObject.h:
  • kjs/NativeErrorConstructor.cpp:
  • kjs/NumberConstructor.cpp:
  • kjs/NumberConstructor.h:
  • kjs/NumberObject.cpp:
  • kjs/NumberObject.h:
  • kjs/NumberPrototype.cpp:
  • kjs/ObjectConstructor.cpp:
  • kjs/ObjectPrototype.cpp:
  • kjs/ObjectPrototype.h:
  • kjs/PropertyMap.h:
  • kjs/PropertySlot.cpp:
  • kjs/PropertySlot.h:
  • kjs/RegExpConstructor.cpp:
  • kjs/RegExpConstructor.h:
  • kjs/RegExpMatchesArray.h:
  • kjs/RegExpObject.cpp:
  • kjs/RegExpObject.h:
  • kjs/RegExpPrototype.cpp:
  • kjs/Shell.cpp:
  • kjs/StringConstructor.cpp:
  • kjs/StringObject.cpp:
  • kjs/StringObject.h:
  • kjs/StringObjectThatMasqueradesAsUndefined.h:
  • kjs/StringPrototype.cpp:
  • kjs/StructureID.cpp:
  • kjs/StructureID.h:
  • kjs/collector.cpp:
  • kjs/collector.h:
  • kjs/completion.h:
  • kjs/grammar.y:
  • kjs/interpreter.cpp:
  • kjs/interpreter.h:
  • kjs/lookup.cpp:
  • kjs/lookup.h:
  • kjs/nodes.h:
  • kjs/operations.cpp:
  • kjs/operations.h:
  • kjs/protect.h:
  • profiler/ProfileGenerator.cpp:
  • profiler/Profiler.cpp:
  • profiler/Profiler.h: Use JSValue* instead of JSValuePtr.

JavaScriptGlue:

2008-10-24 Darin Adler <Darin Adler>

  • JSObject.cpp: (nativeCallFunction):
  • JSUtils.cpp: (KJSValueToJSObject): (JSObjectKJSValue): (KJSValueToCFTypeInternal): (KJSValueToCFType):
  • JSUtils.h:
  • JSValueWrapper.cpp: (JSValueWrapper::JSValueWrapper): (JSValueWrapper::GetValue): (JSValueWrapper::JSObjectCopyProperty): (JSValueWrapper::JSObjectSetProperty): (JSValueWrapper::JSObjectCallFunction):
  • JSValueWrapper.h:
  • UserObjectImp.cpp: (UserObjectImp::callAsFunction): (UserObjectImp::userObjectGetter): (UserObjectImp::getOwnPropertySlot): (UserObjectImp::put): (UserObjectImp::toPrimitive):
  • UserObjectImp.h: (UserObjectImp::createStructureID): Use JSValue* instead of JSValuePtr.

WebCore:

2008-10-24 Darin Adler <Darin Adler>

  • bindings/js/JSAttrCustom.cpp:
  • bindings/js/JSCSSRuleCustom.cpp:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • bindings/js/JSCSSValueCustom.cpp:
  • bindings/js/JSCanvasPixelArrayCustom.h:
  • bindings/js/JSCanvasRenderingContext2DCustom.cpp:
  • bindings/js/JSClipboardCustom.cpp:
  • bindings/js/JSConsoleCustom.cpp:
  • bindings/js/JSCustomSQLStatementCallback.cpp:
  • bindings/js/JSCustomSQLStatementErrorCallback.cpp:
  • bindings/js/JSCustomSQLTransactionCallback.cpp:
  • bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
  • bindings/js/JSCustomVoidCallback.cpp:
  • bindings/js/JSCustomVoidCallback.h:
  • bindings/js/JSCustomXPathNSResolver.cpp:
  • bindings/js/JSCustomXPathNSResolver.h:
  • bindings/js/JSDOMApplicationCacheCustom.cpp:
  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowCustom.h:
  • bindings/js/JSDOMWindowShell.cpp:
  • bindings/js/JSDOMWindowShell.h:
  • bindings/js/JSDatabaseCustom.cpp:
  • bindings/js/JSDedicatedWorkerCustom.cpp:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSElementCustom.cpp:
  • bindings/js/JSEventCustom.cpp:
  • bindings/js/JSEventListener.cpp:
  • bindings/js/JSEventTarget.cpp:
  • bindings/js/JSEventTarget.h:
  • bindings/js/JSEventTargetBase.h:
  • bindings/js/JSEventTargetNodeCustom.cpp:
  • bindings/js/JSHTMLAllCollection.h:
  • bindings/js/JSHTMLAppletElementCustom.cpp:
  • bindings/js/JSHTMLCollectionCustom.cpp:
  • bindings/js/JSHTMLDocumentCustom.cpp:
  • bindings/js/JSHTMLEmbedElementCustom.cpp:
  • bindings/js/JSHTMLFormElementCustom.cpp:
  • bindings/js/JSHTMLFrameElementCustom.cpp:
  • bindings/js/JSHTMLFrameSetElementCustom.cpp:
  • bindings/js/JSHTMLIFrameElementCustom.cpp:
  • bindings/js/JSHTMLInputElementCustom.cpp:
  • bindings/js/JSHTMLObjectElementCustom.cpp:
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:
  • bindings/js/JSHTMLSelectElementCustom.cpp:
  • bindings/js/JSHTMLSelectElementCustom.h:
  • bindings/js/JSHistoryCustom.cpp:
  • bindings/js/JSImageDataCustom.cpp:
  • bindings/js/JSInspectedObjectWrapper.cpp:
  • bindings/js/JSInspectedObjectWrapper.h:
  • bindings/js/JSInspectorCallbackWrapper.cpp:
  • bindings/js/JSInspectorCallbackWrapper.h:
  • bindings/js/JSJavaScriptCallFrameCustom.cpp:
  • bindings/js/JSLocationCustom.cpp:
  • bindings/js/JSMessagePortCustom.cpp:
  • bindings/js/JSMimeTypeArrayCustom.cpp:
  • bindings/js/JSNamedNodeMapCustom.cpp:
  • bindings/js/JSNamedNodesCollection.cpp:
  • bindings/js/JSNamedNodesCollection.h:
  • bindings/js/JSNavigatorCustom.cpp:
  • bindings/js/JSNodeCustom.cpp:
  • bindings/js/JSNodeFilterCondition.cpp:
  • bindings/js/JSNodeFilterCondition.h:
  • bindings/js/JSNodeFilterCustom.cpp:
  • bindings/js/JSNodeIteratorCustom.cpp:
  • bindings/js/JSNodeListCustom.cpp:
  • bindings/js/JSPluginArrayCustom.cpp:
  • bindings/js/JSPluginCustom.cpp:
  • bindings/js/JSPluginElementFunctions.cpp:
  • bindings/js/JSPluginElementFunctions.h:
  • bindings/js/JSQuarantinedObjectWrapper.cpp:
  • bindings/js/JSQuarantinedObjectWrapper.h:
  • bindings/js/JSRGBColor.cpp:
  • bindings/js/JSRGBColor.h:
  • bindings/js/JSSQLResultSetRowListCustom.cpp:
  • bindings/js/JSSQLTransactionCustom.cpp:
  • bindings/js/JSSVGElementInstanceCustom.cpp:
  • bindings/js/JSSVGLengthCustom.cpp:
  • bindings/js/JSSVGMatrixCustom.cpp:
  • bindings/js/JSSVGPathSegCustom.cpp:
  • bindings/js/JSSVGPathSegListCustom.cpp:
  • bindings/js/JSSVGPointListCustom.cpp:
  • bindings/js/JSSVGTransformListCustom.cpp:
  • bindings/js/JSStorageCustom.cpp:
  • bindings/js/JSStyleSheetCustom.cpp:
  • bindings/js/JSStyleSheetListCustom.cpp:
  • bindings/js/JSTextCustom.cpp:
  • bindings/js/JSTreeWalkerCustom.cpp:
  • bindings/js/JSXMLHttpRequestCustom.cpp:
  • bindings/js/JSXMLHttpRequestUploadCustom.cpp:
  • bindings/js/JSXSLTProcessorCustom.cpp:
  • bindings/js/ScheduledAction.cpp:
  • bindings/js/ScheduledAction.h:
  • bindings/js/ScriptController.cpp:
  • bindings/js/ScriptController.h:
  • bindings/objc/WebScriptObject.mm:
  • bindings/objc/WebScriptObjectPrivate.h:
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/NP_jsobject.cpp:
  • bridge/c/c_instance.cpp:
  • bridge/c/c_instance.h:
  • bridge/c/c_runtime.cpp:
  • bridge/c/c_runtime.h:
  • bridge/c/c_utility.cpp:
  • bridge/c/c_utility.h:
  • bridge/jni/jni_instance.cpp:
  • bridge/jni/jni_instance.h:
  • bridge/jni/jni_jsobject.h:
  • bridge/jni/jni_jsobject.mm:
  • bridge/jni/jni_objc.mm:
  • bridge/jni/jni_runtime.cpp:
  • bridge/jni/jni_runtime.h:
  • bridge/jni/jni_utility.cpp:
  • bridge/jni/jni_utility.h:
  • bridge/objc/WebScriptObject.h:
  • bridge/objc/objc_class.h:
  • bridge/objc/objc_class.mm:
  • bridge/objc/objc_instance.h:
  • bridge/objc/objc_instance.mm:
  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:
  • bridge/objc/objc_utility.h:
  • bridge/objc/objc_utility.mm:
  • bridge/qt/qt_class.cpp:
  • bridge/qt/qt_class.h:
  • bridge/qt/qt_instance.cpp:
  • bridge/qt/qt_instance.h:
  • bridge/qt/qt_runtime.cpp:
  • bridge/qt/qt_runtime.h:
  • bridge/runtime.cpp:
  • bridge/runtime.h:
  • bridge/runtime_array.cpp:
  • bridge/runtime_array.h:
  • bridge/runtime_method.cpp:
  • bridge/runtime_method.h:
  • bridge/runtime_object.cpp:
  • bridge/runtime_object.h:
  • bridge/testqtbindings.cpp:
  • inspector/JavaScriptCallFrame.cpp:
  • inspector/JavaScriptCallFrame.h:
  • inspector/JavaScriptProfile.cpp:
  • inspector/JavaScriptProfile.h:
  • inspector/JavaScriptProfileNode.cpp:
  • inspector/JavaScriptProfileNode.h:
  • loader/FrameLoader.cpp:
  • loader/FrameLoader.h:
  • page/Console.cpp:
  • page/Console.h:
  • plugins/MimeTypeArray.h:
  • plugins/Plugin.h:
  • plugins/PluginArray.h:
  • plugins/PluginView.cpp:
  • xml/XMLHttpRequest.cpp: Use JSValue* instead of JSValuePtr.

WebKit/mac:

2008-10-24 Darin Adler <Darin Adler>

  • WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
  • WebView/WebScriptDebugDelegate.mm: (-[WebScriptCallFrame _convertValueToObjcValue:]): (-[WebScriptCallFrame exception]): (-[WebScriptCallFrame evaluateWebScript:]):
  • WebView/WebView.mm: (aeDescFromJSValue): (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Use JSValue* instead of JSValuePtr.

WebKit/qt:

2008-10-24 Darin Adler <Darin Adler>

  • Api/qwebframe.cpp: (QWebFrame::evaluateJavaScript): Use JSValue* instead of JSValuePtr.

WebKit/win:

2008-10-24 Darin Adler <Darin Adler>

  • WebScriptCallFrame.cpp: (WebScriptCallFrame::jsValueToString): (WebScriptCallFrame::stringByEvaluatingJavaScriptFromString): (WebScriptCallFrame::valueForVariable): (WebScriptCallFrame::valueByEvaluatingJavaScriptFromString):
  • WebScriptCallFrame.h:
  • WebView.cpp: (WebView::stringByEvaluatingJavaScriptFromString): Use JSValue* instead of JSValuePtr.

WebKit/wx:

2008-10-24 Darin Adler <Darin Adler>

  • WebFrame.cpp: (wxWebFrame::RunScript): Use JSValue* instead of JSValuePtr.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSImmediate.h

    r37812 r37845  
    4040    class UString;
    4141
    42     typedef JSValue* JSValuePtr;
    43 
    44     inline JSValuePtr noValue() { return static_cast<JSValue*>(0); }
    45     inline void* asPointer(JSValuePtr value) { return value; }
     42    inline JSValue* noValue() { return 0; }
     43    inline void* asPointer(JSValue* value) { return value; }
    4644
    4745    /*
    48      * A JSValuePtr is either a pointer to a cell (a heap-allocated object) or an immediate (a type-tagged
    49      * value masquerading as a pointer). The low two bits in a JSValuePtr are available for type tagging
     46     * A JSValue* is either a pointer to a cell (a heap-allocated object) or an immediate (a type-tagged
     47     * value masquerading as a pointer). The low two bits in a JSValue* are available for type tagging
    5048     * because allocator alignment guarantees they will be 00 in cell pointers.
    5149     *
     
    110108 
    111109    public:
    112         static ALWAYS_INLINE bool isImmediate(JSValuePtr v)
     110        static ALWAYS_INLINE bool isImmediate(JSValue* v)
    113111        {
    114112            return rawValue(v) & TagMask;
    115113        }
    116114       
    117         static ALWAYS_INLINE bool isNumber(JSValuePtr v)
     115        static ALWAYS_INLINE bool isNumber(JSValue* v)
    118116        {
    119117            return rawValue(v) & TagBitTypeInteger;
    120118        }
    121119
    122         static ALWAYS_INLINE bool isPositiveNumber(JSValuePtr v)
     120        static ALWAYS_INLINE bool isPositiveNumber(JSValue* v)
    123121        {
    124122            // A single mask to check for the sign bit and the number tag all at once.
     
    126124        }
    127125       
    128         static ALWAYS_INLINE bool isBoolean(JSValuePtr v)
     126        static ALWAYS_INLINE bool isBoolean(JSValue* v)
    129127        {
    130128            return (rawValue(v) & FullTagTypeMask) == FullTagTypeBool;
    131129        }
    132130       
    133         static ALWAYS_INLINE bool isUndefinedOrNull(JSValuePtr v)
     131        static ALWAYS_INLINE bool isUndefinedOrNull(JSValue* v)
    134132        {
    135133            // Undefined and null share the same value, bar the 'undefined' bit in the extended tag.
     
    137135        }
    138136
    139         static bool isNegative(JSValuePtr v)
     137        static bool isNegative(JSValue* v)
    140138        {
    141139            ASSERT(isNumber(v));
     
    143141        }
    144142
    145         static JSValuePtr from(char);
    146         static JSValuePtr from(signed char);
    147         static JSValuePtr from(unsigned char);
    148         static JSValuePtr from(short);
    149         static JSValuePtr from(unsigned short);
    150         static JSValuePtr from(int);
    151         static JSValuePtr from(unsigned);
    152         static JSValuePtr from(long);
    153         static JSValuePtr from(unsigned long);
    154         static JSValuePtr from(long long);
    155         static JSValuePtr from(unsigned long long);
    156         static JSValuePtr from(double);
    157 
    158         static ALWAYS_INLINE bool isEitherImmediate(JSValuePtr v1, JSValuePtr v2)
     143        static JSValue* from(char);
     144        static JSValue* from(signed char);
     145        static JSValue* from(unsigned char);
     146        static JSValue* from(short);
     147        static JSValue* from(unsigned short);
     148        static JSValue* from(int);
     149        static JSValue* from(unsigned);
     150        static JSValue* from(long);
     151        static JSValue* from(unsigned long);
     152        static JSValue* from(long long);
     153        static JSValue* from(unsigned long long);
     154        static JSValue* from(double);
     155
     156        static ALWAYS_INLINE bool isEitherImmediate(JSValue* v1, JSValue* v2)
    159157        {
    160158            return (rawValue(v1) | rawValue(v2)) & TagMask;
    161159        }
    162160
    163         static ALWAYS_INLINE bool isAnyImmediate(JSValuePtr v1, JSValuePtr v2, JSValuePtr v3)
     161        static ALWAYS_INLINE bool isAnyImmediate(JSValue* v1, JSValue* v2, JSValue* v3)
    164162        {
    165163            return (rawValue(v1) | rawValue(v2) | rawValue(v3)) & TagMask;
    166164        }
    167165
    168         static ALWAYS_INLINE bool areBothImmediate(JSValuePtr v1, JSValuePtr v2)
     166        static ALWAYS_INLINE bool areBothImmediate(JSValue* v1, JSValue* v2)
    169167        {
    170168            return isImmediate(v1) & isImmediate(v2);
    171169        }
    172170
    173         static ALWAYS_INLINE bool areBothImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     171        static ALWAYS_INLINE bool areBothImmediateNumbers(JSValue* v1, JSValue* v2)
    174172        {
    175173            return rawValue(v1) & rawValue(v2) & TagBitTypeInteger;
    176174        }
    177175
    178         static ALWAYS_INLINE JSValuePtr andImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     176        static ALWAYS_INLINE JSValue* andImmediateNumbers(JSValue* v1, JSValue* v2)
    179177        {
    180178            ASSERT(areBothImmediateNumbers(v1, v2));
     
    182180        }
    183181
    184         static ALWAYS_INLINE JSValuePtr xorImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     182        static ALWAYS_INLINE JSValue* xorImmediateNumbers(JSValue* v1, JSValue* v2)
    185183        {
    186184            ASSERT(areBothImmediateNumbers(v1, v2));
     
    188186        }
    189187
    190         static ALWAYS_INLINE JSValuePtr orImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     188        static ALWAYS_INLINE JSValue* orImmediateNumbers(JSValue* v1, JSValue* v2)
    191189        {
    192190            ASSERT(areBothImmediateNumbers(v1, v2));
     
    194192        }
    195193
    196         static ALWAYS_INLINE JSValuePtr rightShiftImmediateNumbers(JSValuePtr val, JSValuePtr shift)
     194        static ALWAYS_INLINE JSValue* rightShiftImmediateNumbers(JSValue* val, JSValue* shift)
    197195        {
    198196            ASSERT(areBothImmediateNumbers(val, shift));
     
    200198        }
    201199
    202         static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValuePtr v)
     200        static ALWAYS_INLINE bool canDoFastAdditiveOperations(JSValue* v)
    203201        {
    204202            // Number is non-negative and an operation involving two of these can't overflow.
     
    207205        }
    208206
    209         static ALWAYS_INLINE JSValuePtr addImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     207        static ALWAYS_INLINE JSValue* addImmediateNumbers(JSValue* v1, JSValue* v2)
    210208        {
    211209            ASSERT(canDoFastAdditiveOperations(v1));
     
    214212        }
    215213
    216         static ALWAYS_INLINE JSValuePtr subImmediateNumbers(JSValuePtr v1, JSValuePtr v2)
     214        static ALWAYS_INLINE JSValue* subImmediateNumbers(JSValue* v1, JSValue* v2)
    217215        {
    218216            ASSERT(canDoFastAdditiveOperations(v1));
     
    221219        }
    222220
    223         static ALWAYS_INLINE JSValuePtr incImmediateNumber(JSValuePtr v)
     221        static ALWAYS_INLINE JSValue* incImmediateNumber(JSValue* v)
    224222        {
    225223            ASSERT(canDoFastAdditiveOperations(v));
     
    227225        }
    228226
    229         static ALWAYS_INLINE JSValuePtr decImmediateNumber(JSValuePtr v)
     227        static ALWAYS_INLINE JSValue* decImmediateNumber(JSValue* v)
    230228        {
    231229            ASSERT(canDoFastAdditiveOperations(v));
     
    233231        }
    234232
    235         static double toDouble(JSValuePtr);
    236         static bool toBoolean(JSValuePtr);
    237         static JSObject* toObject(JSValuePtr, ExecState*);
    238         static UString toString(JSValuePtr);
    239 
    240         static bool getUInt32(JSValuePtr, uint32_t&);
    241         static bool getTruncatedInt32(JSValuePtr, int32_t&);
    242         static bool getTruncatedUInt32(JSValuePtr, uint32_t&);
    243 
    244         static int32_t getTruncatedInt32(JSValuePtr);
    245         static uint32_t getTruncatedUInt32(JSValuePtr);
    246 
    247         static JSValuePtr trueImmediate();
    248         static JSValuePtr falseImmediate();
    249         static JSValuePtr undefinedImmediate();
    250         static JSValuePtr nullImmediate();
    251         static JSValuePtr zeroImmediate();
    252         static JSValuePtr oneImmediate();
    253 
    254         static JSValuePtr impossibleValue();
    255        
    256         static JSObject* prototype(JSValuePtr, ExecState*);
     233        static double toDouble(JSValue*);
     234        static bool toBoolean(JSValue*);
     235        static JSObject* toObject(JSValue*, ExecState*);
     236        static UString toString(JSValue*);
     237
     238        static bool getUInt32(JSValue*, uint32_t&);
     239        static bool getTruncatedInt32(JSValue*, int32_t&);
     240        static bool getTruncatedUInt32(JSValue*, uint32_t&);
     241
     242        static int32_t getTruncatedInt32(JSValue*);
     243        static uint32_t getTruncatedUInt32(JSValue*);
     244
     245        static JSValue* trueImmediate();
     246        static JSValue* falseImmediate();
     247        static JSValue* undefinedImmediate();
     248        static JSValue* nullImmediate();
     249        static JSValue* zeroImmediate();
     250        static JSValue* oneImmediate();
     251
     252        static JSValue* impossibleValue();
     253       
     254        static JSObject* prototype(JSValue*, ExecState*);
    257255
    258256    private:
     
    261259        static const unsigned maxImmediateUInt = maxImmediateInt;
    262260
    263         static ALWAYS_INLINE JSValuePtr makeValue(uintptr_t integer)
     261        static ALWAYS_INLINE JSValue* makeValue(uintptr_t integer)
    264262        {
    265263            return reinterpret_cast<JSValue*>(integer);
    266264        }
    267265
    268         static ALWAYS_INLINE JSValuePtr makeInt(int32_t value)
     266        static ALWAYS_INLINE JSValue* makeInt(int32_t value)
    269267        {
    270268            return makeValue((value << IntegerPayloadShift) | TagBitTypeInteger);
    271269        }
    272270       
    273         static ALWAYS_INLINE JSValuePtr makeBool(bool b)
     271        static ALWAYS_INLINE JSValue* makeBool(bool b)
    274272        {
    275273            return makeValue((static_cast<uintptr_t>(b) << ExtendedPayloadShift) | FullTagTypeBool);
    276274        }
    277275       
    278         static ALWAYS_INLINE JSValuePtr makeUndefined()
     276        static ALWAYS_INLINE JSValue* makeUndefined()
    279277        {
    280278            return makeValue(FullTagTypeUndefined);
    281279        }
    282280       
    283         static ALWAYS_INLINE JSValuePtr makeNull()
     281        static ALWAYS_INLINE JSValue* makeNull()
    284282        {
    285283            return makeValue(FullTagTypeNull);
    286284        }
    287285       
    288         static ALWAYS_INLINE int32_t intValue(JSValuePtr v)
     286        static ALWAYS_INLINE int32_t intValue(JSValue* v)
    289287        {
    290288            return static_cast<int32_t>(static_cast<intptr_t>(rawValue(v)) >> IntegerPayloadShift);
    291289        }
    292290       
    293         static ALWAYS_INLINE uint32_t uintValue(JSValuePtr v)
     291        static ALWAYS_INLINE uint32_t uintValue(JSValue* v)
    294292        {
    295293            return static_cast<uint32_t>(rawValue(v) >> IntegerPayloadShift);
    296294        }
    297295       
    298         static ALWAYS_INLINE bool boolValue(JSValuePtr v)
     296        static ALWAYS_INLINE bool boolValue(JSValue* v)
    299297        {
    300298            return rawValue(v) & ExtendedPayloadBitBoolValue;
    301299        }
    302300       
    303         static ALWAYS_INLINE uintptr_t rawValue(JSValuePtr v)
     301        static ALWAYS_INLINE uintptr_t rawValue(JSValue* v)
    304302        {
    305303            return reinterpret_cast<uintptr_t>(v);
     
    309307    };
    310308
    311     ALWAYS_INLINE JSValuePtr JSImmediate::trueImmediate() { return makeBool(true); }
    312     ALWAYS_INLINE JSValuePtr JSImmediate::falseImmediate() { return makeBool(false); }
    313     ALWAYS_INLINE JSValuePtr JSImmediate::undefinedImmediate() { return makeUndefined(); }
    314     ALWAYS_INLINE JSValuePtr JSImmediate::nullImmediate() { return makeNull(); }
    315     ALWAYS_INLINE JSValuePtr JSImmediate::zeroImmediate() { return makeInt(0); }
    316     ALWAYS_INLINE JSValuePtr JSImmediate::oneImmediate() { return makeInt(1); }
     309    ALWAYS_INLINE JSValue* JSImmediate::trueImmediate() { return makeBool(true); }
     310    ALWAYS_INLINE JSValue* JSImmediate::falseImmediate() { return makeBool(false); }
     311    ALWAYS_INLINE JSValue* JSImmediate::undefinedImmediate() { return makeUndefined(); }
     312    ALWAYS_INLINE JSValue* JSImmediate::nullImmediate() { return makeNull(); }
     313    ALWAYS_INLINE JSValue* JSImmediate::zeroImmediate() { return makeInt(0); }
     314    ALWAYS_INLINE JSValue* JSImmediate::oneImmediate() { return makeInt(1); }
    317315
    318316    // This value is impossible because 0x4 is not a valid pointer but a tag of 0 would indicate non-immediate
    319     ALWAYS_INLINE JSValuePtr JSImmediate::impossibleValue() { return makeValue(0x4); }
    320 
    321     ALWAYS_INLINE bool JSImmediate::toBoolean(JSValuePtr v)
     317    ALWAYS_INLINE JSValue* JSImmediate::impossibleValue() { return makeValue(0x4); }
     318
     319    ALWAYS_INLINE bool JSImmediate::toBoolean(JSValue* v)
    322320    {
    323321        ASSERT(isImmediate(v));
     
    328326    }
    329327
    330     ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValuePtr v)
     328    ALWAYS_INLINE uint32_t JSImmediate::getTruncatedUInt32(JSValue* v)
    331329    {
    332330        ASSERT(isNumber(v));
     
    334332    }
    335333
    336     ALWAYS_INLINE JSValuePtr JSImmediate::from(char i)
    337     {
    338         return makeInt(i);
    339     }
    340 
    341     ALWAYS_INLINE JSValuePtr JSImmediate::from(signed char i)
    342     {
    343         return makeInt(i);
    344     }
    345 
    346     ALWAYS_INLINE JSValuePtr JSImmediate::from(unsigned char i)
    347     {
    348         return makeInt(i);
    349     }
    350 
    351     ALWAYS_INLINE JSValuePtr JSImmediate::from(short i)
    352     {
    353         return makeInt(i);
    354     }
    355 
    356     ALWAYS_INLINE JSValuePtr JSImmediate::from(unsigned short i)
    357     {
    358         return makeInt(i);
    359     }
    360 
    361     ALWAYS_INLINE JSValuePtr JSImmediate::from(int i)
     334    ALWAYS_INLINE JSValue* JSImmediate::from(char i)
     335    {
     336        return makeInt(i);
     337    }
     338
     339    ALWAYS_INLINE JSValue* JSImmediate::from(signed char i)
     340    {
     341        return makeInt(i);
     342    }
     343
     344    ALWAYS_INLINE JSValue* JSImmediate::from(unsigned char i)
     345    {
     346        return makeInt(i);
     347    }
     348
     349    ALWAYS_INLINE JSValue* JSImmediate::from(short i)
     350    {
     351        return makeInt(i);
     352    }
     353
     354    ALWAYS_INLINE JSValue* JSImmediate::from(unsigned short i)
     355    {
     356        return makeInt(i);
     357    }
     358
     359    ALWAYS_INLINE JSValue* JSImmediate::from(int i)
    362360    {
    363361        if ((i < minImmediateInt) | (i > maxImmediateInt))
     
    366364    }
    367365
    368     ALWAYS_INLINE JSValuePtr JSImmediate::from(unsigned i)
     366    ALWAYS_INLINE JSValue* JSImmediate::from(unsigned i)
    369367    {
    370368        if (i > maxImmediateUInt)
     
    373371    }
    374372
    375     ALWAYS_INLINE JSValuePtr JSImmediate::from(long i)
     373    ALWAYS_INLINE JSValue* JSImmediate::from(long i)
    376374    {
    377375        if ((i < minImmediateInt) | (i > maxImmediateInt))
     
    380378    }
    381379
    382     ALWAYS_INLINE JSValuePtr JSImmediate::from(unsigned long i)
     380    ALWAYS_INLINE JSValue* JSImmediate::from(unsigned long i)
    383381    {
    384382        if (i > maxImmediateUInt)
     
    387385    }
    388386
    389     ALWAYS_INLINE JSValuePtr JSImmediate::from(long long i)
     387    ALWAYS_INLINE JSValue* JSImmediate::from(long long i)
    390388    {
    391389        if ((i < minImmediateInt) | (i > maxImmediateInt))
     
    394392    }
    395393
    396     ALWAYS_INLINE JSValuePtr JSImmediate::from(unsigned long long i)
     394    ALWAYS_INLINE JSValue* JSImmediate::from(unsigned long long i)
    397395    {
    398396        if (i > maxImmediateUInt)
     
    401399    }
    402400
    403     ALWAYS_INLINE JSValuePtr JSImmediate::from(double d)
     401    ALWAYS_INLINE JSValue* JSImmediate::from(double d)
    404402    {
    405403        const int intVal = static_cast<int>(d);
     
    415413    }
    416414
    417     ALWAYS_INLINE int32_t JSImmediate::getTruncatedInt32(JSValuePtr v)
     415    ALWAYS_INLINE int32_t JSImmediate::getTruncatedInt32(JSValue* v)
    418416    {
    419417        ASSERT(isNumber(v));
     
    421419    }
    422420
    423     ALWAYS_INLINE double JSImmediate::toDouble(JSValuePtr v)
     421    ALWAYS_INLINE double JSImmediate::toDouble(JSValue* v)
    424422    {
    425423        ASSERT(isImmediate(v));
     
    434432    }
    435433
    436     ALWAYS_INLINE bool JSImmediate::getUInt32(JSValuePtr v, uint32_t& i)
     434    ALWAYS_INLINE bool JSImmediate::getUInt32(JSValue* v, uint32_t& i)
    437435    {
    438436        i = uintValue(v);
     
    440438    }
    441439
    442     ALWAYS_INLINE bool JSImmediate::getTruncatedInt32(JSValuePtr v, int32_t& i)
     440    ALWAYS_INLINE bool JSImmediate::getTruncatedInt32(JSValue* v, int32_t& i)
    443441    {
    444442        i = intValue(v);
     
    446444    }
    447445
    448     ALWAYS_INLINE bool JSImmediate::getTruncatedUInt32(JSValuePtr v, uint32_t& i)
     446    ALWAYS_INLINE bool JSImmediate::getTruncatedUInt32(JSValue* v, uint32_t& i)
    449447    {
    450448        return getUInt32(v, i);
    451449    }
    452450
    453     ALWAYS_INLINE JSValuePtr jsUndefined()
     451    ALWAYS_INLINE JSValue* jsUndefined()
    454452    {
    455453        return JSImmediate::undefinedImmediate();
    456454    }
    457455
    458     inline JSValuePtr jsNull()
     456    inline JSValue* jsNull()
    459457    {
    460458        return JSImmediate::nullImmediate();
    461459    }
    462460
    463     inline JSValuePtr jsBoolean(bool b)
     461    inline JSValue* jsBoolean(bool b)
    464462    {
    465463        return b ? JSImmediate::trueImmediate() : JSImmediate::falseImmediate();
Note: See TracChangeset for help on using the changeset viewer.