Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h

raw symbols SCIP
1 /*
2 * Copyright (C) 1999-2001 Harri Porten ([email protected])
3 * Copyright (C) 2001 Peter Kelly ([email protected])
4 * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Apple Inc. All rights reserved.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23 #ifndef JSValue_h
24 #define JSValue_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h:24:9`!
25
26 #include "CallData.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CallData.h`/
27 #include "ConstructData.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/ConstructData.h`/
28 #include <stddef.h> // for size_t
29 #include <stdint.h>
30 #include <wtf/AlwaysInline.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h`/
31 #include <wtf/Assertions.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h`/
32 #include <wtf/HashTraits.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTraits.h`/
33 #include <wtf/MathExtras.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h`/
34
35 namespace JSCcxx . . $ QTJSC/ {
36
37 class Identifiercxx . . $ QTJSC/Identifier#;
38 class JSCellcxx . . $ QTJSC/JSCell#;
39 class JSGlobalDatacxx . . $ QTJSC/JSGlobalData#;
40 class JSImmediatecxx . . $ QTJSC/JSImmediate#;
41 class JSObjectcxx . . $ QTJSC/JSObject#;
42 class JSStringcxx . . $ QTJSC/JSString#;
43 class PropertySlotcxx . . $ QTJSC/PropertySlot#;
44 class PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#;
45 class UStringcxx . . $ QTJSC/UString#;
46
47 struct ClassInfocxx . . $ QTJSC/ClassInfo#;
48 struct Instructioncxx . . $ QTJSC/Instruction#;
49
50 enum PreferredPrimitiveTypecxx . . $ QTJSC/PreferredPrimitiveType# { NoPreferencecxx . . $ QTJSC/NoPreference., PreferNumbercxx . . $ QTJSC/PreferNumber., PreferStringcxx . . $ QTJSC/PreferString. };
51
52 #if USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(JSVALUE32_64)
53 typedef int64_t EncodedJSValue;
54 #else
55 typedef void* EncodedJSValuecxx . . $ QTJSC/EncodedJSValue#;
56 #endif
57
58 double nonInlineNaNcxx . . $ QTJSC/nonInlineNaN(31fa7155c10fdd13).();
59 int32_tcxx . . $ int32_t# toInt32SlowCasecxx . . $ QTJSC/toInt32SlowCase(b3bf83f442ac9fa7).(double, bool& ok);
60 uint32_tcxx . . $ uint32_t# toUInt32SlowCasecxx . . $ QTJSC/toUInt32SlowCase(38c7aa8fca72fcd5).(double, bool& ok);
61
62 class JSValuecxx . . $ QTJSC/JSValue# {
63 friend class JSImmediatecxx . . $ QTJSC/JSImmediate#;
64 friend struct EncodedJSValueHashTraitscxx . . $ QTJSC/EncodedJSValueHashTraits#;
65 friend class JITcxx . . $ QTJSC/JIT#;
66 friend class JITStubscxx . . $ QTJSC/JITStubs#;
67 friend class JITStubCallcxx . . $ QTJSC/JITStubCall#;
68
69 public:
70 static EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# encodecxx . . $ QTJSC/JSValue#encode(48544357535317c5).(JSValuecxx . . $ QTJSC/JSValue# value);
71 static JSValuecxx . . $ QTJSC/JSValue# decodecxx . . $ QTJSC/JSValue#decode(921aba6f6725337d).(EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# ptr);
72 #if !USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(JSVALUE32_64)
73 private:
74 static JSValuecxx . . $ QTJSC/JSValue# makeImmediatecxx . . $ QTJSC/JSValue#makeImmediate(48382e65e89b9a3).(intptr_tcxx . . $ intptr_t# value);
75 intptr_tcxx . . $ intptr_t# immediateValuecxx . . $ QTJSC/JSValue#immediateValue(da6335ded91d79c2).();
76 public:
77 #endif
78 enum JSNullTagcxx . . $ QTJSC/JSValue#JSNullTag# { JSNullcxx . . $ QTJSC/JSValue#JSNull. };
79 enum JSUndefinedTagcxx . . $ QTJSC/JSValue#JSUndefinedTag# { JSUndefinedcxx . . $ QTJSC/JSValue#JSUndefined. };
80 enum JSTrueTagcxx . . $ QTJSC/JSValue#JSTrueTag# { JSTruecxx . . $ QTJSC/JSValue#JSTrue. };
81 enum JSFalseTagcxx . . $ QTJSC/JSValue#JSFalseTag# { JSFalsecxx . . $ QTJSC/JSValue#JSFalse. };
82 enum EncodeAsDoubleTagcxx . . $ QTJSC/JSValue#EncodeAsDoubleTag# { EncodeAsDoublecxx . . $ QTJSC/JSValue#EncodeAsDouble. };
83
84 JSValuecxx . . $ QTJSC/JSValue#JSValue(49f6e7a06ebc5aa8).();
85 JSValuecxx . . $ QTJSC/JSValue#JSValue(37ab548c3cdfc9e9).(JSNullTagcxx . . $ QTJSC/JSValue#JSNullTag#);
86 JSValuecxx . . $ QTJSC/JSValue#JSValue(5f552fe036637431).(JSUndefinedTagcxx . . $ QTJSC/JSValue#JSUndefinedTag#);
87 JSValuecxx . . $ QTJSC/JSValue#JSValue(5bd6d0ca826b6bde).(JSTrueTagcxx . . $ QTJSC/JSValue#JSTrueTag#);
88 JSValuecxx . . $ QTJSC/JSValue#JSValue(8b2a8a8ac6f8a35a).(JSFalseTagcxx . . $ QTJSC/JSValue#JSFalseTag#);
89 JSValuecxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64).(JSCellcxx . . $ QTJSC/JSCell#* ptr);
90 JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(const JSCellcxx . . $ QTJSC/JSCell#* ptr);
91
92 // Numbers
93 JSValuecxx . . $ QTJSC/JSValue#JSValue(5fe54dd8cb234ce6).(EncodeAsDoubleTagcxx . . $ QTJSC/JSValue#EncodeAsDoubleTag#, ExecStatecxx . . $ QTJSC/ExecState#*, double);
94 JSValuecxx . . $ QTJSC/JSValue#JSValue(33eae00a62075347).(ExecStatecxx . . $ QTJSC/ExecState#*, double);
95 JSValuecxx . . $ QTJSC/JSValue#JSValue(6a1e3ba498d3f383).(ExecStatecxx . . $ QTJSC/ExecState#*, char);
96 JSValuecxx . . $ QTJSC/JSValue#JSValue(431e2dbec511728e).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned char);
97 JSValuecxx . . $ QTJSC/JSValue#JSValue(85b9461a0539e308).(ExecStatecxx . . $ QTJSC/ExecState#*, short);
98 JSValuecxx . . $ QTJSC/JSValue#JSValue(fae765621880a10f).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned short);
99 JSValuecxx . . $ QTJSC/JSValue#JSValue(4670b007b83e7883).(ExecStatecxx . . $ QTJSC/ExecState#*, int);
100 JSValuecxx . . $ QTJSC/JSValue#JSValue(7dbbf77d47108298).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned);
101 JSValuecxx . . $ QTJSC/JSValue#JSValue(47ec9b1e7154582e).(ExecStatecxx . . $ QTJSC/ExecState#*, long);
102 JSValuecxx . . $ QTJSC/JSValue#JSValue(5296ab2051074c5a).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned long);
103 JSValuecxx . . $ QTJSC/JSValue#JSValue(81444fa371ee5a97).(ExecStatecxx . . $ QTJSC/ExecState#*, long long);
104 JSValuecxx . . $ QTJSC/JSValue#JSValue(1c6990820eb95d48).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned long long);
105 JSValuecxx . . $ QTJSC/JSValue#JSValue(61f1d91c89410fd3).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, double);
106 JSValuecxx . . $ QTJSC/JSValue#JSValue(22b54ecaa1089487).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, int);
107 JSValuecxx . . $ QTJSC/JSValue#JSValue(59a652c37c73989d).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, unsigned);
108
109 operatorcxx . . $ QTJSC/JSValue#`operator bool`(50ce9a9e25b4a850). bool() const;
110 bool operatorcxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64).==(const JSValuecxx . . $ QTJSC/JSValue#& other) const;
111 bool operatorcxx . . $ QTJSC/JSValue#`operator!=`(b7c0ea8ebb120a64).!=(const JSValuecxx . . $ QTJSC/JSValue#& other) const;
112
113 bool isInt32cxx . . $ QTJSC/JSValue#isInt32(50ce9a9e25b4a850).() const;
114 bool isUInt32cxx . . $ QTJSC/JSValue#isUInt32(50ce9a9e25b4a850).() const;
115 bool isDoublecxx . . $ QTJSC/JSValue#isDouble(50ce9a9e25b4a850).() const;
116 bool isTruecxx . . $ QTJSC/JSValue#isTrue(50ce9a9e25b4a850).() const;
117 bool isFalsecxx . . $ QTJSC/JSValue#isFalse(50ce9a9e25b4a850).() const;
118
119 int32_tcxx . . $ int32_t# asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).() const;
120 uint32_tcxx . . $ uint32_t# asUInt32cxx . . $ QTJSC/JSValue#asUInt32(ddd8539a2fcdd4ce).() const;
121 double asDoublecxx . . $ QTJSC/JSValue#asDouble(21b6c25e127938e2).() const;
122
123 // Querying the type.
124 bool isUndefinedcxx . . $ QTJSC/JSValue#isUndefined(50ce9a9e25b4a850).() const;
125 bool isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).() const;
126 bool isUndefinedOrNullcxx . . $ QTJSC/JSValue#isUndefinedOrNull(50ce9a9e25b4a850).() const;
127 bool isBooleancxx . . $ QTJSC/JSValue#isBoolean(50ce9a9e25b4a850).() const;
128 bool isNumbercxx . . $ QTJSC/JSValue#isNumber(50ce9a9e25b4a850).() const;
129 bool isStringcxx . . $ QTJSC/JSValue#isString(50ce9a9e25b4a850).() const;
130 bool isGetterSettercxx . . $ QTJSC/JSValue#isGetterSetter(50ce9a9e25b4a850).() const;
131 bool isObjectcxx . . $ QTJSC/JSValue#isObject(50ce9a9e25b4a850).() const;
132 bool inheritscxx . . $ QTJSC/JSValue#inherits(7eca403b06d48463).(const ClassInfocxx . . $ QTJSC/ClassInfo#*) const;
133
134 // Extracting the value.
135 bool getBooleancxx . . $ QTJSC/JSValue#getBoolean(dadd4ad61e27fbc).(bool&) const;
136 bool getBooleancxx . . $ QTJSC/JSValue#getBoolean(50ce9a9e25b4a850).() const; // false if not a boolean
137 bool getNumbercxx . . $ QTJSC/JSValue#getNumber(c49d02341edf1b7e).(double&) const;
138 double uncheckedGetNumbercxx . . $ QTJSC/JSValue#uncheckedGetNumber(21b6c25e127938e2).() const;
139 bool getStringcxx . . $ QTJSC/JSValue#getString(4ed3c128543e83ef).(ExecStatecxx . . $ QTJSC/ExecState#* exec, UStringcxx . . $ QTJSC/UString#&) const;
140 UStringcxx . . $ QTJSC/UString# getStringcxx . . $ QTJSC/JSValue#getString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const; // null string if not a string
141 JSObjectcxx . . $ QTJSC/JSObject#* getObjectcxx . . $ QTJSC/JSValue#getObject(8ac23ea934d7a115).() const; // 0 if not an object
142
143 CallTypecxx . . $ QTJSC/CallType# getCallDatacxx . . $ QTJSC/JSValue#getCallData(9482040cf952d29d).(CallDatacxx . . $ QTJSC/CallData#&);
144 ConstructTypecxx . . $ QTJSC/ConstructType# getConstructDatacxx . . $ QTJSC/JSValue#getConstructData(80014d68d6143eea).(ConstructDatacxx . . $ QTJSC/ConstructData#&);
145
146 // Extracting integer values.
147 bool getUInt32cxx . . $ QTJSC/JSValue#getUInt32(186fade19594183d).(uint32_tcxx . . $ uint32_t#&) const;
148
149 // Basic conversions.
150 JSValuecxx . . $ QTJSC/JSValue# toPrimitivecxx . . $ QTJSC/JSValue#toPrimitive(9c1c7f5535dadf1e).(ExecStatecxx . . $ QTJSC/ExecState#*, PreferredPrimitiveTypecxx . . $ QTJSC/PreferredPrimitiveType# = NoPreferencecxx . . $ QTJSC/NoPreference.) const;
151 bool getPrimitiveNumbercxx . . $ QTJSC/JSValue#getPrimitiveNumber(5ae801b0dd2b44e9).(ExecStatecxx . . $ QTJSC/ExecState#*, double& number, JSValuecxx . . $ QTJSC/JSValue#&);
152
153 bool toBooleancxx . . $ QTJSC/JSValue#toBoolean(9608304f86fd7dc).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
154
155 // toNumber conversion is expected to be side effect free if an exception has
156 // been set in the ExecState already.
157 double toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
158 JSValuecxx . . $ QTJSC/JSValue# toJSNumbercxx . . $ QTJSC/JSValue#toJSNumber(3edd4bd77d4e7240).(ExecStatecxx . . $ QTJSC/ExecState#*) const; // Fast path for when you expect that the value is an immediate number.
159 UStringcxx . . $ QTJSC/UString# toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
160 UStringcxx . . $ QTJSC/UString# toPrimitiveStringcxx . . $ QTJSC/JSValue#toPrimitiveString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
161 JSObjectcxx . . $ QTJSC/JSObject#* toObjectcxx . . $ QTJSC/JSValue#toObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
162
163 // Integer conversions.
164 double toIntegercxx . . $ QTJSC/JSValue#toInteger(1fd034e372fd1279).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
165 double toIntegerPreserveNaNcxx . . $ QTJSC/JSValue#toIntegerPreserveNaN(1fd034e372fd1279).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
166 int32_tcxx . . $ int32_t# toInt32cxx . . $ QTJSC/JSValue#toInt32(895d7d37bda6b54c).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
167 int32_tcxx . . $ int32_t# toInt32cxx . . $ QTJSC/JSValue#toInt32(40f4d5204427f018).(ExecStatecxx . . $ QTJSC/ExecState#*, bool& ok) const;
168 uint32_tcxx . . $ uint32_t# toUInt32cxx . . $ QTJSC/JSValue#toUInt32(fedcfd78cee4cc89).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
169 uint32_tcxx . . $ uint32_t# toUInt32cxx . . $ QTJSC/JSValue#toUInt32(4a1b4e7228c0955f).(ExecStatecxx . . $ QTJSC/ExecState#*, bool& ok) const;
170
171 #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JSC_ZOMBIES)
172 bool isZombie() const;
173 #endif
174
175 // Floating point conversions (this is a convenience method for webcore;
176 // signle precision float is not a representation used in JS or JSC).
177 float toFloatcxx . . $ QTJSC/JSValue#toFloat(ae2f8729d7e9b74).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const { return static_cast<float>(toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec)); }
178
179 // Object operations, with the toObject operation included.
180 JSValuecxx . . $ QTJSC/JSValue# getcxx . . $ QTJSC/JSValue#get(ccadc8db5e9d2977).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName) const;
181 JSValuecxx . . $ QTJSC/JSValue# getcxx . . $ QTJSC/JSValue#get(28aeb44443172ea7).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&) const;
182 JSValuecxx . . $ QTJSC/JSValue# getcxx . . $ QTJSC/JSValue#get(2d9c2221088d2593).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned propertyName) const;
183 JSValuecxx . . $ QTJSC/JSValue# getcxx . . $ QTJSC/JSValue#get(5f1b85e2b25f159b).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&) const;
184 void putcxx . . $ QTJSC/JSValue#put(dfb3133dafbe9ff4).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, JSValuecxx . . $ QTJSC/JSValue#, PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#&);
185 void putcxx . . $ QTJSC/JSValue#put(b1b60585cf3bb95).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned propertyName, JSValuecxx . . $ QTJSC/JSValue#);
186
187 bool needsThisConversioncxx . . $ QTJSC/JSValue#needsThisConversion(50ce9a9e25b4a850).() const;
188 JSObjectcxx . . $ QTJSC/JSObject#* toThisObjectcxx . . $ QTJSC/JSValue#toThisObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
189 UStringcxx . . $ QTJSC/UString# toThisStringcxx . . $ QTJSC/JSValue#toThisString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
190 JSStringcxx . . $ QTJSC/JSString#* toThisJSStringcxx . . $ QTJSC/JSValue#toThisJSString(193b2cc77222fd6b).(ExecStatecxx . . $ QTJSC/ExecState#*);
191
192 static bool equalcxx . . $ QTJSC/JSValue#equal(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
193 static bool equalSlowCasecxx . . $ QTJSC/JSValue#equalSlowCase(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
194 static bool equalSlowCaseInlinecxx . . $ QTJSC/JSValue#equalSlowCaseInline(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
195 static bool strictEqualcxx . . $ QTJSC/JSValue#strictEqual(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
196 static bool strictEqualSlowCasecxx . . $ QTJSC/JSValue#strictEqualSlowCase(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
197 static bool strictEqualSlowCaseInlinecxx . . $ QTJSC/JSValue#strictEqualSlowCaseInline(658e1865c47113e6).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2);
198
199 JSValuecxx . . $ QTJSC/JSValue# getJSNumbercxx . . $ QTJSC/JSValue#getJSNumber(ad9afe69d7bf6378).(); // JSValue() if this is not a JSNumber or number object
200
201 bool isCellcxx . . $ QTJSC/JSValue#isCell(50ce9a9e25b4a850).() const;
202 JSCellcxx . . $ QTJSC/JSCell#* asCellcxx . . $ QTJSC/JSValue#asCell(60510463d9a84528).() const;
203
204 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
205 char* description();
206 #endif
207
208 private:
209 enum HashTableDeletedValueTagcxx . . $ QTJSC/JSValue#HashTableDeletedValueTag# { HashTableDeletedValuecxx . . $ QTJSC/JSValue#HashTableDeletedValue. };
210 JSValuecxx . . $ QTJSC/JSValue#JSValue(b38ba8aa1f4f35fe).(HashTableDeletedValueTagcxx . . $ QTJSC/JSValue#HashTableDeletedValueTag#);
211
212 inline const JSValuecxx . . $ QTJSC/JSValue# asValuecxx . . $ QTJSC/JSValue#asValue(2b3a0f51c71d9b1b).() const { return *this; }
213 JSObjectcxx . . $ QTJSC/JSObject#* toObjectSlowCasecxx . . $ QTJSC/JSValue#toObjectSlowCase(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
214 JSObjectcxx . . $ QTJSC/JSObject#* toThisObjectSlowCasecxx . . $ QTJSC/JSValue#toThisObjectSlowCase(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
215
216 enumcxx . . $ QTJSC/JSValue#$anonymous_type_0# { Int32Tagcxx . . $ QTJSC/JSValue#Int32Tag. = 0xffffffff };
217 enumcxx . . $ QTJSC/JSValue#$anonymous_type_1# { CellTagcxx . . $ QTJSC/JSValue#CellTag. = 0xfffffffe };
218 enumcxx . . $ QTJSC/JSValue#$anonymous_type_2# { TrueTagcxx . . $ QTJSC/JSValue#TrueTag. = 0xfffffffd };
219 enumcxx . . $ QTJSC/JSValue#$anonymous_type_3# { FalseTagcxx . . $ QTJSC/JSValue#FalseTag. = 0xfffffffc };
220 enumcxx . . $ QTJSC/JSValue#$anonymous_type_4# { NullTagcxx . . $ QTJSC/JSValue#NullTag. = 0xfffffffb };
221 enumcxx . . $ QTJSC/JSValue#$anonymous_type_5# { UndefinedTagcxx . . $ QTJSC/JSValue#UndefinedTag. = 0xfffffffa };
222 enumcxx . . $ QTJSC/JSValue#$anonymous_type_6# { EmptyValueTagcxx . . $ QTJSC/JSValue#EmptyValueTag. = 0xfffffff9 };
223 enumcxx . . $ QTJSC/JSValue#$anonymous_type_7# { DeletedValueTagcxx . . $ QTJSC/JSValue#DeletedValueTag. = 0xfffffff8 };
224
225 enumcxx . . $ QTJSC/JSValue#$anonymous_type_8# { LowestTagcxx . . $ QTJSC/JSValue#LowestTag. = DeletedValueTagcxx . . $ QTJSC/JSValue#DeletedValueTag. };
226
227 uint32_tcxx . . $ uint32_t# tagcxx . . $ QTJSC/JSValue#tag(ddd8539a2fcdd4ce).() const;
228 int32_tcxx . . $ int32_t# payloadcxx . . $ QTJSC/JSValue#payload(455f465bc33b4cdf).() const;
229
230 JSObjectcxx . . $ QTJSC/JSObject#* synthesizePrototypecxx . . $ QTJSC/JSValue#synthesizePrototype(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
231 JSObjectcxx . . $ QTJSC/JSObject#* synthesizeObjectcxx . . $ QTJSC/JSValue#synthesizeObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const;
232
233 #if USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(JSVALUE32_64)
234 union {
235 EncodedJSValue asEncodedJSValue;
236 double asDouble;
237 #if CPU(BIG_ENDIAN)
238 struct {
239 int32_t tag;
240 int32_t payload;
241 } asBits;
242 #else
243 struct {
244 int32_t payload;
245 int32_t tag;
246 } asBits;
247 #endif
248 } u;
249 #else // USE(JSVALUE32_64)
250 JSCellcxx . . $ QTJSC/JSCell#* m_ptrcxx . . $ QTJSC/JSValue#m_ptr.;
251 #endif // USE(JSVALUE32_64)
252 };
253
254 #if USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(JSVALUE32_64)
255 typedef IntHash<EncodedJSValue> EncodedJSValueHash;
256
257 struct EncodedJSValueHashTraits : HashTraits<EncodedJSValue> {
258 static const bool emptyValueIsZero = false;
259 static EncodedJSValue emptyValue() { return JSValue::encode(JSValue()); }
260 static void constructDeletedValue(EncodedJSValue& slot) { slot = JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
261 static bool isDeletedValue(EncodedJSValue value) { return value == JSValue::encode(JSValue(JSValue::HashTableDeletedValue)); }
262 };
263 #else
264 typedef PtrHashcxx . . $ PtrHash#<EncodedJSValuecxx . . $ QTJSC/EncodedJSValue#> EncodedJSValueHashcxx . . $ QTJSC/EncodedJSValueHash#;
265
266 struct EncodedJSValueHashTraitscxx . . $ QTJSC/EncodedJSValueHashTraits# : HashTraits<EncodedJSValue> {
267 static void constructDeletedValuecxx . . $ QTJSC/EncodedJSValueHashTraits#constructDeletedValue(97646db72107e31).(EncodedJSValuecxx . . $ QTJSC/EncodedJSValue#& slot) { slot = JSValuecxx . . $ QTJSC/JSValue#::encodecxx . . $ QTJSC/JSValue#encode(48544357535317c5).(JSValuecxx . . $ QTJSC/JSValue#JSValue(b38ba8aa1f4f35fe).(JSValuecxx . . $ QTJSC/JSValue#::HashTableDeletedValuecxx . . $ QTJSC/JSValue#HashTableDeletedValue.)); }
268 static bool isDeletedValuecxx . . $ QTJSC/EncodedJSValueHashTraits#isDeletedValue(db00c6a08f501612).(EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# value) { return value == JSValuecxx . . $ QTJSC/JSValue#::encodecxx . . $ QTJSC/JSValue#encode(48544357535317c5).(JSValuecxx . . $ QTJSC/JSValue#JSValue(b38ba8aa1f4f35fe).(JSValuecxx . . $ QTJSC/JSValue#::HashTableDeletedValuecxx . . $ QTJSC/JSValue#HashTableDeletedValue.)); }
269 };
270 #endif
271
272 // Stand-alone helper functions.
273 inline JSValuecxx . . $ QTJSC/JSValue# jsNullcxx . . $ QTJSC/jsNull(ad9afe69d7bf6378).()
274 {
275 return JSValuecxx . . $ QTJSC/JSValue#JSValue(37ab548c3cdfc9e9).(JSValuecxx . . $ QTJSC/JSValue#::JSNullcxx . . $ QTJSC/JSValue#JSNull.);
276 }
277
278 inline JSValuecxx . . $ QTJSC/JSValue# jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).()
279 {
280 return JSValuecxx . . $ QTJSC/JSValue#JSValue(5f552fe036637431).(JSValuecxx . . $ QTJSC/JSValue#::JSUndefinedcxx . . $ QTJSC/JSValue#JSUndefined.);
281 }
282
283 inline JSValuecxx . . $ QTJSC/JSValue# jsBooleancxx . . $ QTJSC/jsBoolean(b805946c4147dfe1).(bool b)
284 {
285 return b ? JSValuecxx . . $ QTJSC/JSValue#JSValue(5bd6d0ca826b6bde).(JSValuecxx . . $ QTJSC/JSValue#::JSTruecxx . . $ QTJSC/JSValue#JSTrue.) : JSValuecxx . . $ QTJSC/JSValue#JSValue(8b2a8a8ac6f8a35a).(JSValuecxx . . $ QTJSC/JSValue#::JSFalsecxx . . $ QTJSC/JSValue#JSFalse.);
286 }
287
288 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsDoubleNumbercxx . . $ QTJSC/jsDoubleNumber(88e66938454912cb).(ExecStatecxx . . $ QTJSC/ExecState#* exec, double d)
289 {
290 return JSValuecxx . . $ QTJSC/JSValue#JSValue(5fe54dd8cb234ce6).(JSValuecxx . . $ QTJSC/JSValue#::EncodeAsDoublecxx . . $ QTJSC/JSValue#EncodeAsDouble., exec, d);
291 }
292
293 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(88e66938454912cb).(ExecStatecxx . . $ QTJSC/ExecState#* exec, double d)
294 {
295 return JSValuecxx . . $ QTJSC/JSValue#JSValue(33eae00a62075347).(exec, d);
296 }
297
298 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(fac52a0ef4962231).(ExecStatecxx . . $ QTJSC/ExecState#* exec, char i)
299 {
300 return JSValuecxx . . $ QTJSC/JSValue#JSValue(6a1e3ba498d3f383).(exec, i);
301 }
302
303 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(882f7eb1ab0aa116).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned char i)
304 {
305 return JSValuecxx . . $ QTJSC/JSValue#JSValue(431e2dbec511728e).(exec, i);
306 }
307
308 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(8ed3816d835ea7ed).(ExecStatecxx . . $ QTJSC/ExecState#* exec, short i)
309 {
310 return JSValuecxx . . $ QTJSC/JSValue#JSValue(85b9461a0539e308).(exec, i);
311 }
312
313 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(53408485f3468e44).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned short i)
314 {
315 return JSValuecxx . . $ QTJSC/JSValue#JSValue(fae765621880a10f).(exec, i);
316 }
317
318 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(1201607e1a2ad33d).(ExecStatecxx . . $ QTJSC/ExecState#* exec, int i)
319 {
320 return JSValuecxx . . $ QTJSC/JSValue#JSValue(4670b007b83e7883).(exec, i);
321 }
322
323 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(bf7e02f8c8245e31).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned i)
324 {
325 return JSValuecxx . . $ QTJSC/JSValue#JSValue(7dbbf77d47108298).(exec, i);
326 }
327
328 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(14e307958da6fa2c).(ExecStatecxx . . $ QTJSC/ExecState#* exec, long i)
329 {
330 return JSValuecxx . . $ QTJSC/JSValue#JSValue(47ec9b1e7154582e).(exec, i);
331 }
332
333 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(bdb4a03c934d5200).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned long i)
334 {
335 return JSValuecxx . . $ QTJSC/JSValue#JSValue(5296ab2051074c5a).(exec, i);
336 }
337
338 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(690f89657b3ee448).(ExecStatecxx . . $ QTJSC/ExecState#* exec, long long i)
339 {
340 return JSValuecxx . . $ QTJSC/JSValue#JSValue(81444fa371ee5a97).(exec, i);
341 }
342
343 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(4649552d112e8450).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned long long i)
344 {
345 return JSValuecxx . . $ QTJSC/JSValue#JSValue(1c6990820eb95d48).(exec, i);
346 }
347
348 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(cd43e1c860546154).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, double d)
349 {
350 return JSValuecxx . . $ QTJSC/JSValue#JSValue(61f1d91c89410fd3).(globalData, d);
351 }
352
353 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(62a703931ed784f0).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, int i)
354 {
355 return JSValuecxx . . $ QTJSC/JSValue#JSValue(22b54ecaa1089487).(globalData, i);
356 }
357
358 ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSValuecxx . . $ QTJSC/JSValue# jsNumbercxx . . $ QTJSC/jsNumber(986151d6ab13d041).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, unsigned i)
359 {
360 return JSValuecxx . . $ QTJSC/JSValue#JSValue(59a652c37c73989d).(globalData, i);
361 }
362
363 inline bool operatorcxx . . $ QTJSC/`operator==`(8208a731c2dadbc2).==(const JSValuecxx . . $ QTJSC/JSValue# a, const JSCellcxx . . $ QTJSC/JSCell#* b) { return a ==cxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64). JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(b); }
364 inline bool operatorcxx . . $ QTJSC/`operator==`(5e10d8f38fa82016).==(const JSCellcxx . . $ QTJSC/JSCell#* a, const JSValuecxx . . $ QTJSC/JSValue# b) { return JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(a) ==cxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64). b; }
365
366 inline bool operatorcxx . . $ QTJSC/`operator!=`(8208a731c2dadbc2).!=(const JSValuecxx . . $ QTJSC/JSValue# a, const JSCellcxx . . $ QTJSC/JSCell#* b) { return a !=cxx . . $ QTJSC/JSValue#`operator!=`(b7c0ea8ebb120a64). JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(b); }
367 inline bool operatorcxx . . $ QTJSC/`operator!=`(5e10d8f38fa82016).!=(const JSCellcxx . . $ QTJSC/JSCell#* a, const JSValuecxx . . $ QTJSC/JSValue# b) { return JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(a) !=cxx . . $ QTJSC/JSValue#`operator!=`(b7c0ea8ebb120a64). b; }
368
369 inline int32_tcxx . . $ int32_t# toInt32cxx . . $ QTJSC/toInt32(620b9ac44d2573a6).(double val)
370 {
371 if (!(val >= -2147483648.0 && val < 2147483648.0)) {
372 bool ignored;
373 return toInt32SlowCasecxx . . $ QTJSC/toInt32SlowCase(b3bf83f442ac9fa7).(val, ignored);
374 }
375 return static_cast<int32_tcxx . . $ int32_t#>(val);
376 }
377
378 inline uint32_tcxx . . $ uint32_t# toUInt32cxx . . $ QTJSC/toUInt32(91a40ab43b4b81b).(double val)
379 {
380 if (!(val >= 0.0 && val < 4294967296.0)) {
381 bool ignored;
382 return toUInt32SlowCasecxx . . $ QTJSC/toUInt32SlowCase(38c7aa8fca72fcd5).(val, ignored);
383 }
384 return static_cast<uint32_tcxx . . $ uint32_t#>(val);
385 }
386
387 // FIXME: We should deprecate this and just use JSValue::asCell() instead.
388 JSCellcxx . . $ QTJSC/JSCell#* asCellcxx . . $ QTJSC/asCell(31485abf284d9c5).(JSValuecxx . . $ QTJSC/JSValue#);
389
390 inline JSCellcxx . . $ QTJSC/JSCell#* asCellcxx . . $ QTJSC/asCell(31485abf284d9c5).(JSValuecxx . . $ QTJSC/JSValue# value)
391 {
392 return value.asCellcxx . . $ QTJSC/JSValue#asCell(60510463d9a84528).();
393 }
394
395 ALWAYS_INLINEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! int32_tcxx . . $ int32_t# JSValuecxx . . $ QTJSC/JSValue#::toInt32cxx . . $ QTJSC/JSValue#toInt32(895d7d37bda6b54c).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const
396 {
397 if (isInt32cxx . . $ QTJSC/JSValue#isInt32(50ce9a9e25b4a850).())
398 return asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).();
399 bool ignored;
400 return toInt32SlowCasecxx . . $ QTJSC/toInt32SlowCase(b3bf83f442ac9fa7).(toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec), ignored);
401 }
402
403 inline uint32_tcxx . . $ uint32_t# JSValuecxx . . $ QTJSC/JSValue#::toUInt32cxx . . $ QTJSC/JSValue#toUInt32(fedcfd78cee4cc89).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const
404 {
405 if (isUInt32cxx . . $ QTJSC/JSValue#isUInt32(50ce9a9e25b4a850).())
406 return asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).();
407 bool ignored;
408 return toUInt32SlowCasecxx . . $ QTJSC/toUInt32SlowCase(38c7aa8fca72fcd5).(toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec), ignored);
409 }
410
411 inline int32_tcxx . . $ int32_t# JSValuecxx . . $ QTJSC/JSValue#::toInt32cxx . . $ QTJSC/JSValue#toInt32(40f4d5204427f018).(ExecStatecxx . . $ QTJSC/ExecState#* exec, bool& ok) const
412 {
413 if (isInt32cxx . . $ QTJSC/JSValue#isInt32(50ce9a9e25b4a850).()) {
414 ok = true;
415 return asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).();
416 }
417 return toInt32SlowCasecxx . . $ QTJSC/toInt32SlowCase(b3bf83f442ac9fa7).(toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec), ok);
418 }
419
420 inline uint32_tcxx . . $ uint32_t# JSValuecxx . . $ QTJSC/JSValue#::toUInt32cxx . . $ QTJSC/JSValue#toUInt32(4a1b4e7228c0955f).(ExecStatecxx . . $ QTJSC/ExecState#* exec, bool& ok) const
421 {
422 if (isUInt32cxx . . $ QTJSC/JSValue#isUInt32(50ce9a9e25b4a850).()) {
423 ok = true;
424 return asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).();
425 }
426 return toUInt32SlowCasecxx . . $ QTJSC/toUInt32SlowCase(38c7aa8fca72fcd5).(toNumbercxx . . $ QTJSC/JSValue#toNumber(1fd034e372fd1279).(exec), ok);
427 }
428
429 #if USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(JSVALUE32_64)
430 inline JSValue jsNaN(ExecState* exec)
431 {
432 return JSValue(exec, nonInlineNaN());
433 }
434
435 // JSValue member functions.
436 inline EncodedJSValue JSValue::encode(JSValue value)
437 {
438 return value.u.asEncodedJSValue;
439 }
440
441 inline JSValue JSValue::decode(EncodedJSValue encodedJSValue)
442 {
443 JSValue v;
444 v.u.asEncodedJSValue = encodedJSValue;
445 #if ENABLE(JSC_ZOMBIES)
446 ASSERT(!v.isZombie());
447 #endif
448 return v;
449 }
450
451 inline JSValue::JSValue()
452 {
453 u.asBits.tag = EmptyValueTag;
454 u.asBits.payload = 0;
455 }
456
457 inline JSValue::JSValue(JSNullTag)
458 {
459 u.asBits.tag = NullTag;
460 u.asBits.payload = 0;
461 }
462
463 inline JSValue::JSValue(JSUndefinedTag)
464 {
465 u.asBits.tag = UndefinedTag;
466 u.asBits.payload = 0;
467 }
468
469 inline JSValue::JSValue(JSTrueTag)
470 {
471 u.asBits.tag = TrueTag;
472 u.asBits.payload = 0;
473 }
474
475 inline JSValue::JSValue(JSFalseTag)
476 {
477 u.asBits.tag = FalseTag;
478 u.asBits.payload = 0;
479 }
480
481 inline JSValue::JSValue(HashTableDeletedValueTag)
482 {
483 u.asBits.tag = DeletedValueTag;
484 u.asBits.payload = 0;
485 }
486
487 inline JSValue::JSValue(JSCell* ptr)
488 {
489 if (ptr)
490 u.asBits.tag = CellTag;
491 else
492 u.asBits.tag = EmptyValueTag;
493 u.asBits.payload = reinterpret_cast<int32_t>(ptr);
494 #if ENABLE(JSC_ZOMBIES)
495 ASSERT(!isZombie());
496 #endif
497 }
498
499 inline JSValue::JSValue(const JSCell* ptr)
500 {
501 if (ptr)
502 u.asBits.tag = CellTag;
503 else
504 u.asBits.tag = EmptyValueTag;
505 u.asBits.payload = reinterpret_cast<int32_t>(const_cast<JSCell*>(ptr));
506 #if ENABLE(JSC_ZOMBIES)
507 ASSERT(!isZombie());
508 #endif
509 }
510
511 inline JSValue::operator bool() const
512 {
513 ASSERT(tag() != DeletedValueTag);
514 return tag() != EmptyValueTag;
515 }
516
517 inline bool JSValue::operator==(const JSValue& other) const
518 {
519 return u.asEncodedJSValue == other.u.asEncodedJSValue;
520 }
521
522 inline bool JSValue::operator!=(const JSValue& other) const
523 {
524 return u.asEncodedJSValue != other.u.asEncodedJSValue;
525 }
526
527 inline bool JSValue::isUndefined() const
528 {
529 return tag() == UndefinedTag;
530 }
531
532 inline bool JSValue::isNull() const
533 {
534 return tag() == NullTag;
535 }
536
537 inline bool JSValue::isUndefinedOrNull() const
538 {
539 return isUndefined() || isNull();
540 }
541
542 inline bool JSValue::isCell() const
543 {
544 return tag() == CellTag;
545 }
546
547 inline bool JSValue::isInt32() const
548 {
549 return tag() == Int32Tag;
550 }
551
552 inline bool JSValue::isUInt32() const
553 {
554 return tag() == Int32Tag && asInt32() > -1;
555 }
556
557 inline bool JSValue::isDouble() const
558 {
559 return tag() < LowestTag;
560 }
561
562 inline bool JSValue::isTrue() const
563 {
564 return tag() == TrueTag;
565 }
566
567 inline bool JSValue::isFalse() const
568 {
569 return tag() == FalseTag;
570 }
571
572 inline uint32_t JSValue::tag() const
573 {
574 return u.asBits.tag;
575 }
576
577 inline int32_t JSValue::payload() const
578 {
579 return u.asBits.payload;
580 }
581
582 inline int32_t JSValue::asInt32() const
583 {
584 ASSERT(isInt32());
585 return u.asBits.payload;
586 }
587
588 inline uint32_t JSValue::asUInt32() const
589 {
590 ASSERT(isUInt32());
591 return u.asBits.payload;
592 }
593
594 inline double JSValue::asDouble() const
595 {
596 ASSERT(isDouble());
597 return u.asDouble;
598 }
599
600 ALWAYS_INLINE JSCell* JSValue::asCell() const
601 {
602 ASSERT(isCell());
603 return reinterpret_cast<JSCell*>(u.asBits.payload);
604 }
605
606 ALWAYS_INLINE JSValue::JSValue(EncodeAsDoubleTag, ExecState*, double d)
607 {
608 u.asDouble = d;
609 }
610
611 inline JSValue::JSValue(ExecState* exec, double d)
612 {
613 const int32_t asInt32 = static_cast<int32_t>(d);
614 if (asInt32 != d || (!asInt32 && std::signbit(d))) { // true for -0.0
615 u.asDouble = d;
616 return;
617 }
618 *this = JSValue(exec, static_cast<int32_t>(d));
619 }
620
621 inline JSValue::JSValue(ExecState* exec, char i)
622 {
623 *this = JSValue(exec, static_cast<int32_t>(i));
624 }
625
626 inline JSValue::JSValue(ExecState* exec, unsigned char i)
627 {
628 *this = JSValue(exec, static_cast<int32_t>(i));
629 }
630
631 inline JSValue::JSValue(ExecState* exec, short i)
632 {
633 *this = JSValue(exec, static_cast<int32_t>(i));
634 }
635
636 inline JSValue::JSValue(ExecState* exec, unsigned short i)
637 {
638 *this = JSValue(exec, static_cast<int32_t>(i));
639 }
640
641 inline JSValue::JSValue(ExecState*, int i)
642 {
643 u.asBits.tag = Int32Tag;
644 u.asBits.payload = i;
645 }
646
647 inline JSValue::JSValue(ExecState* exec, unsigned i)
648 {
649 if (static_cast<int32_t>(i) < 0) {
650 *this = JSValue(exec, static_cast<double>(i));
651 return;
652 }
653 *this = JSValue(exec, static_cast<int32_t>(i));
654 }
655
656 inline JSValue::JSValue(ExecState* exec, long i)
657 {
658 if (static_cast<int32_t>(i) != i) {
659 *this = JSValue(exec, static_cast<double>(i));
660 return;
661 }
662 *this = JSValue(exec, static_cast<int32_t>(i));
663 }
664
665 inline JSValue::JSValue(ExecState* exec, unsigned long i)
666 {
667 if (static_cast<uint32_t>(i) != i) {
668 *this = JSValue(exec, static_cast<double>(i));
669 return;
670 }
671 *this = JSValue(exec, static_cast<uint32_t>(i));
672 }
673
674 inline JSValue::JSValue(ExecState* exec, long long i)
675 {
676 if (static_cast<int32_t>(i) != i) {
677 *this = JSValue(exec, static_cast<double>(i));
678 return;
679 }
680 *this = JSValue(exec, static_cast<int32_t>(i));
681 }
682
683 inline JSValue::JSValue(ExecState* exec, unsigned long long i)
684 {
685 if (static_cast<uint32_t>(i) != i) {
686 *this = JSValue(exec, static_cast<double>(i));
687 return;
688 }
689 *this = JSValue(exec, static_cast<uint32_t>(i));
690 }
691
692 inline JSValue::JSValue(JSGlobalData* globalData, double d)
693 {
694 const int32_t asInt32 = static_cast<int32_t>(d);
695 if (asInt32 != d || (!asInt32 && std::signbit(d))) { // true for -0.0
696 u.asDouble = d;
697 return;
698 }
699 *this = JSValue(globalData, static_cast<int32_t>(d));
700 }
701
702 inline JSValue::JSValue(JSGlobalData*, int i)
703 {
704 u.asBits.tag = Int32Tag;
705 u.asBits.payload = i;
706 }
707
708 inline JSValue::JSValue(JSGlobalData* globalData, unsigned i)
709 {
710 if (static_cast<int32_t>(i) < 0) {
711 *this = JSValue(globalData, static_cast<double>(i));
712 return;
713 }
714 *this = JSValue(globalData, static_cast<int32_t>(i));
715 }
716
717 inline bool JSValue::isNumber() const
718 {
719 return isInt32() || isDouble();
720 }
721
722 inline bool JSValue::isBoolean() const
723 {
724 return isTrue() || isFalse();
725 }
726
727 inline bool JSValue::getBoolean(bool& v) const
728 {
729 if (isTrue()) {
730 v = true;
731 return true;
732 }
733 if (isFalse()) {
734 v = false;
735 return true;
736 }
737
738 return false;
739 }
740
741 inline bool JSValue::getBoolean() const
742 {
743 ASSERT(isBoolean());
744 return tag() == TrueTag;
745 }
746
747 inline double JSValue::uncheckedGetNumber() const
748 {
749 ASSERT(isNumber());
750 return isInt32() ? asInt32() : asDouble();
751 }
752
753 ALWAYS_INLINE JSValue JSValue::toJSNumber(ExecState* exec) const
754 {
755 return isNumber() ? asValue() : jsNumber(exec, this->toNumber(exec));
756 }
757
758 inline bool JSValue::getNumber(double& result) const
759 {
760 if (isInt32()) {
761 result = asInt32();
762 return true;
763 }
764 if (isDouble()) {
765 result = asDouble();
766 return true;
767 }
768 return false;
769 }
770
771 #else // USE(JSVALUE32_64)
772
773 // JSValue member functions.
774 inline EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# JSValuecxx . . $ QTJSC/JSValue#::encodecxx . . $ QTJSC/JSValue#encode(48544357535317c5).(JSValuecxx . . $ QTJSC/JSValue# value)
775 {
776 EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# r;
777 memcpy(&r, &value.m_ptrcxx . . $ QTJSC/JSValue#m_ptr., sizeof(r));
778 return r;
779 }
780
781 inline JSValuecxx . . $ QTJSC/JSValue# JSValuecxx . . $ QTJSC/JSValue#::decodecxx . . $ QTJSC/JSValue#decode(921aba6f6725337d).(EncodedJSValuecxx . . $ QTJSC/EncodedJSValue# ptr)
782 {
783 JSCellcxx . . $ QTJSC/JSCell# *cellPtr;
784 memcpy(&cellPtr, &ptr, sizeof(cellPtr));
785 return JSValuecxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64).(cellPtr);
786 }
787
788 inline JSValuecxx . . $ QTJSC/JSValue# JSValuecxx . . $ QTJSC/JSValue#::makeImmediatecxx . . $ QTJSC/JSValue#makeImmediate(48382e65e89b9a3).(intptr_tcxx . . $ intptr_t# value)
789 {
790 JSCellcxx . . $ QTJSC/JSCell# *cellPtr;
791 memcpy(&cellPtr, &value, sizeof(cellPtr));
792 return JSValuecxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64).(cellPtr);
793 }
794
795 inline intptr_tcxx . . $ intptr_t# JSValuecxx . . $ QTJSC/JSValue#::immediateValuecxx . . $ QTJSC/JSValue#immediateValue(da6335ded91d79c2).()
796 {
797 intptr_tcxx . . $ intptr_t# v;
798 memcpy(&v, &m_ptrcxx . . $ QTJSC/JSValue#m_ptr., sizeof(v));
799 return v;
800 }
801
802 // 0x0 can never occur naturally because it has a tag of 00, indicating a pointer value, but a payload of 0x0, which is in the (invalid) zero page.
803 inline JSValuecxx . . $ QTJSC/JSValue#::JSValuecxx . . $ QTJSC/JSValue#JSValue(49f6e7a06ebc5aa8).()
804 : m_ptrcxx . . $ QTJSC/JSValue#m_ptr.(0)
805 {
806 }
807
808 // 0x4 can never occur naturally because it has a tag of 00, indicating a pointer value, but a payload of 0x4, which is in the (invalid) zero page.
809 inline JSValuecxx . . $ QTJSC/JSValue#::JSValuecxx . . $ QTJSC/JSValue#JSValue(b38ba8aa1f4f35fe).(HashTableDeletedValueTagcxx . . $ QTJSC/JSValue#HashTableDeletedValueTag#)
810 : m_ptrcxx . . $ QTJSC/JSValue#m_ptr.(reinterpret_cast<JSCellcxx . . $ QTJSC/JSCell#*>(0x4))
811 {
812 }
813
814 inline JSValuecxx . . $ QTJSC/JSValue#::JSValuecxx . . $ QTJSC/JSValue#JSValue(c6d88d3bdacccd64).(JSCellcxx . . $ QTJSC/JSCell#* ptr)
815 : m_ptrcxx . . $ QTJSC/JSValue#m_ptr.(ptr)
816 {
817 #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JSC_ZOMBIES)
818 ASSERT(!isZombie());
819 #endif
820 }
821
822 inline JSValuecxx . . $ QTJSC/JSValue#::JSValuecxx . . $ QTJSC/JSValue#JSValue(6c4a669c2a9495fd).(const JSCellcxx . . $ QTJSC/JSCell#* ptr)
823 : m_ptrcxx . . $ QTJSC/JSValue#m_ptr.(const_cast<JSCellcxx . . $ QTJSC/JSCell#*>(ptr))
824 {
825 #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JSC_ZOMBIES)
826 ASSERT(!isZombie());
827 #endif
828 }
829
830 inline JSValuecxx . . $ QTJSC/JSValue#::operatorcxx . . $ QTJSC/JSValue#`operator bool`(50ce9a9e25b4a850). bool() const
831 {
832 return m_ptrcxx . . $ QTJSC/JSValue#m_ptr.;
833 }
834
835 inline bool JSValuecxx . . $ QTJSC/JSValue#::operatorcxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64).==(const JSValuecxx . . $ QTJSC/JSValue#& other) const
836 {
837 return m_ptrcxx . . $ QTJSC/JSValue#m_ptr. == other.m_ptrcxx . . $ QTJSC/JSValue#m_ptr.;
838 }
839
840 inline bool JSValuecxx . . $ QTJSC/JSValue#::operatorcxx . . $ QTJSC/JSValue#`operator!=`(b7c0ea8ebb120a64).!=(const JSValuecxx . . $ QTJSC/JSValue#& other) const
841 {
842 return m_ptrcxx . . $ QTJSC/JSValue#m_ptr. != other.m_ptrcxx . . $ QTJSC/JSValue#m_ptr.;
843 }
844
845 inline bool JSValuecxx . . $ QTJSC/JSValue#::isUndefinedcxx . . $ QTJSC/JSValue#isUndefined(50ce9a9e25b4a850).() const
846 {
847 return asValuecxx . . $ QTJSC/JSValue#asValue(2b3a0f51c71d9b1b).() ==cxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64). jsUndefinedcxx . . $ QTJSC/jsUndefined(ad9afe69d7bf6378).();
848 }
849
850 inline bool JSValuecxx . . $ QTJSC/JSValue#::isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).() const
851 {
852 return asValuecxx . . $ QTJSC/JSValue#asValue(2b3a0f51c71d9b1b).() ==cxx . . $ QTJSC/JSValue#`operator==`(b7c0ea8ebb120a64). jsNullcxx . . $ QTJSC/jsNull(ad9afe69d7bf6378).();
853 }
854 #endif // USE(JSVALUE32_64)
855
856 } // namespace JSC
857
858 #endif // JSValue_h