| 1 | /* |
| 2 | * Copyright (C) 1999-2001 Harri Porten ([email protected]) |
| 3 | * Copyright (C) 2001 Peter Kelly ([email protected]) |
| 4 | * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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 JSString_h |
| 24 | #define JSString_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSString.h:24:9`! |
| 25 | |
| 26 | #include "CallFrame.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h`/ |
| 27 | #include "CommonIdentifiers.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CommonIdentifiers.h`/ |
| 28 | #include "Identifier.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.h`/ |
| 29 | #include "JSNumberCell.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSNumberCell.h`/ |
| 30 | #include "PropertyDescriptor.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyDescriptor.h`/ |
| 31 | #include "PropertySlot.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertySlot.h`/ |
| 32 | |
| 33 | namespace JSCcxx . . $ QTJSC/ { |
| 34 | |
| 35 | class JSStringcxx . . $ QTJSC/JSString#; |
| 36 | |
| 37 | JSStringcxx . . $ QTJSC/JSString#* jsEmptyStringcxx . . $ QTJSC/jsEmptyString(25c6ef16d739185e).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*); |
| 38 | JSStringcxx . . $ QTJSC/JSString#* jsEmptyStringcxx . . $ QTJSC/jsEmptyString(193b2cc77222fd6b).(ExecStatecxx . . $ QTJSC/ExecState#*); |
| 39 | JSStringcxx . . $ QTJSC/JSString#* jsStringcxx . . $ QTJSC/jsString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const UStringcxx . . $ QTJSC/UString#&); // returns empty string if passed null string |
| 40 | JSStringcxx . . $ QTJSC/JSString#* jsStringcxx . . $ QTJSC/jsString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&); // returns empty string if passed null string |
| 41 | |
| 42 | JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterStringcxx . . $ QTJSC/jsSingleCharacterString(798b61d009c114).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, UCharcxx . . $ UChar#); |
| 43 | JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterStringcxx . . $ QTJSC/jsSingleCharacterString(ccec0c672e7a6fd2).(ExecStatecxx . . $ QTJSC/ExecState#*, UCharcxx . . $ UChar#); |
| 44 | JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(7ff41d81bc820a25).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const UStringcxx . . $ QTJSC/UString#&, unsigned offset); |
| 45 | JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(933fdf172a0cf95c).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&, unsigned offset); |
| 46 | JSStringcxx . . $ QTJSC/JSString#* jsSubstringcxx . . $ QTJSC/jsSubstring(ae7b7b6b099afa3).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const UStringcxx . . $ QTJSC/UString#&, unsigned offset, unsigned length); |
| 47 | JSStringcxx . . $ QTJSC/JSString#* jsSubstringcxx . . $ QTJSC/jsSubstring(83d2e1b0ae358b23).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&, unsigned offset, unsigned length); |
| 48 | |
| 49 | // Non-trivial strings are two or more characters long. |
| 50 | // These functions are faster than just calling jsString. |
| 51 | JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const UStringcxx . . $ QTJSC/UString#&); |
| 52 | JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&); |
| 53 | JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(d56e32c9ed8b7181).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const char*); |
| 54 | JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(e2c2a5e45ecf2c5d).(ExecStatecxx . . $ QTJSC/ExecState#*, const char*); |
| 55 | |
| 56 | // Should be used for strings that are owned by an object that will |
| 57 | // likely outlive the JSValue this makes, such as the parse tree or a |
| 58 | // DOM object that contains a UString |
| 59 | JSStringcxx . . $ QTJSC/JSString#* jsOwnedStringcxx . . $ QTJSC/jsOwnedString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, const UStringcxx . . $ QTJSC/UString#&); |
| 60 | JSStringcxx . . $ QTJSC/JSString#* jsOwnedStringcxx . . $ QTJSC/jsOwnedString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&); |
| 61 | |
| 62 | typedef void (*JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback#)(JSStringcxx . . $ QTJSC/JSString#*, void* context); |
| 63 | JSStringcxx . . $ QTJSC/JSString#* jsStringWithFinalizercxx . . $ QTJSC/jsStringWithFinalizer(1bf9af647d198ef2).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&, JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback# callback, void* context); |
| 64 | |
| 65 | class JS_EXPORTCLASScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/config.h:37:9`! JSStringcxx . . $ QTJSC/JSString# : public JSCellcxx . . $ QTJSC/JSCell# { |
| 66 | public: |
| 67 | friend class JITcxx . . $ QTJSC/JIT#; |
| 68 | friend class JSGlobalDatacxx . . $ QTJSC/JSGlobalData#; |
| 69 | |
| 70 | // A Rope is a string composed of a set of substrings. |
| 71 | class Ropecxx . . $ QTJSC/JSString#Rope# : public RefCounted<Rope> { |
| 72 | public: |
| 73 | // A Rope is composed from a set of smaller strings called Fibers. |
| 74 | // Each Fiber in a rope is either UString::Rep or another Rope. |
| 75 | class Fibercxx . . $ QTJSC/JSString#Rope#Fiber# { |
| 76 | public: |
| 77 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(49f6e7a06ebc5aa8).() : m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.(0) {} |
| 78 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(f38096febece923b).(UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* string) : m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.(reinterpret_cast<intptr_tcxx . . $ intptr_t#>(string)) {} |
| 79 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(8fad27af47e96e1f).(Ropecxx . . $ QTJSC/JSString#Rope#* rope) : m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.(reinterpret_cast<intptr_tcxx . . $ intptr_t#>(rope) | 1) {} |
| 80 | |
| 81 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(5d22bdacc48458e8).(void* nonFiber) : m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.(reinterpret_cast<intptr_tcxx . . $ intptr_t#>(nonFiber)) {} |
| 82 | |
| 83 | void derefcxx . . $ QTJSC/JSString#Rope#Fiber#deref(49f6e7a06ebc5aa8).() |
| 84 | { |
| 85 | if (isRopecxx . . $ QTJSC/JSString#Rope#Fiber#isRope(c9857a73d68e59ba).()) |
| 86 | ropecxx . . $ QTJSC/JSString#Rope#Fiber#rope(df5b0e1d7fcc6802).()->deref(); |
| 87 | else |
| 88 | stringcxx . . $ QTJSC/JSString#Rope#Fiber#string(b56a90d0afa3b8ee).()->derefcxx . . $ QTJSC/UStringImpl#deref(49f6e7a06ebc5aa8).(); |
| 89 | } |
| 90 | |
| 91 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#& refcxx . . $ QTJSC/JSString#Rope#Fiber#ref(8a5e6a974c4ccaa6).() |
| 92 | { |
| 93 | if (isStringcxx . . $ QTJSC/JSString#Rope#Fiber#isString(c9857a73d68e59ba).()) |
| 94 | stringcxx . . $ QTJSC/JSString#Rope#Fiber#string(b56a90d0afa3b8ee).()->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).(); |
| 95 | else |
| 96 | ropecxx . . $ QTJSC/JSString#Rope#Fiber#rope(df5b0e1d7fcc6802).()->ref(); |
| 97 | return *this; |
| 98 | } |
| 99 | |
| 100 | unsigned refAndGetLengthcxx . . $ QTJSC/JSString#Rope#Fiber#refAndGetLength(db52760e79bf9054).() |
| 101 | { |
| 102 | if (isStringcxx . . $ QTJSC/JSString#Rope#Fiber#isString(c9857a73d68e59ba).()) { |
| 103 | UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = stringcxx . . $ QTJSC/JSString#Rope#Fiber#string(b56a90d0afa3b8ee).(); |
| 104 | return rep->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).()->sizecxx . . $ QTJSC/UStringImpl#size(455f465bc33b4cdf).(); |
| 105 | } else { |
| 106 | Ropecxx . . $ QTJSC/JSString#Rope#* r = ropecxx . . $ QTJSC/JSString#Rope#Fiber#rope(df5b0e1d7fcc6802).(); |
| 107 | r->ref(); |
| 108 | return r->stringLengthcxx . . $ QTJSC/JSString#Rope#stringLength(db52760e79bf9054).(); |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | bool isRopecxx . . $ QTJSC/JSString#Rope#Fiber#isRope(c9857a73d68e59ba).() { return m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value. & 1; } |
| 113 | Ropecxx . . $ QTJSC/JSString#Rope#* ropecxx . . $ QTJSC/JSString#Rope#Fiber#rope(df5b0e1d7fcc6802).() { return reinterpret_cast<Ropecxx . . $ QTJSC/JSString#Rope#*>(m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value. & ~1); } |
| 114 | bool isStringcxx . . $ QTJSC/JSString#Rope#Fiber#isString(c9857a73d68e59ba).() { return !isRopecxx . . $ QTJSC/JSString#Rope#Fiber#isRope(c9857a73d68e59ba).(); } |
| 115 | UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* stringcxx . . $ QTJSC/JSString#Rope#Fiber#string(b56a90d0afa3b8ee).() { return reinterpret_cast<UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#*>(m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.); } |
| 116 | |
| 117 | void* nonFibercxx . . $ QTJSC/JSString#Rope#Fiber#nonFiber(50c7df7de5344ebb).() { return reinterpret_cast<void*>(m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.); } |
| 118 | private: |
| 119 | intptr_tcxx . . $ intptr_t# m_valuecxx . . $ QTJSC/JSString#Rope#Fiber#m_value.; |
| 120 | }; |
| 121 | |
| 122 | // Creates a Rope comprising of 'ropeLength' Fibers. |
| 123 | // The Rope is constructed in an uninitialized state - initialize must be called for each Fiber in the Rope. |
| 124 | static PassRefPtrcxx . . $ PassRefPtr#<Ropecxx . . $ QTJSC/JSString#Rope#> createOrNullcxx . . $ QTJSC/JSString#Rope#createOrNull(b271efbd527635c4).(unsigned ropeLength) |
| 125 | { |
| 126 | void* allocation; |
| 127 | if (tryFastMalloccxx . . $ tryFastMalloc(a199d47e2bcba94).(sizeof(Ropecxx . . $ QTJSC/JSString#Rope#) + (ropeLength - 1) * sizeof(Fibercxx . . $ QTJSC/JSString#Rope#Fiber#)).getValuecxx . . $ QTWTF/TryMallocReturnValue#getValue(e5bfd7b2d24a2428).(allocation)) |
| 128 | return adoptRefcxx . . $ adoptRef(e761da608bb8c29c).(new (allocation) Ropecxx . . $ QTJSC/JSString#Rope#Rope(cb2f890c2fdad230).(ropeLength)); |
| 129 | return 0; |
| 130 | } |
| 131 | |
| 132 | ~cxx . . $ QTJSC/JSString#Rope#`~Rope`(49f6e7a06ebc5aa8).Ropecxx . . $ QTJSC/JSString#Rope#(); |
| 133 | void destructNonRecursivecxx . . $ QTJSC/JSString#Rope#destructNonRecursive(49f6e7a06ebc5aa8).(); |
| 134 | |
| 135 | void appendcxx . . $ QTJSC/JSString#Rope#append(d66ed287caac4a5f).(unsigned &index, Fibercxx . . $ QTJSC/JSString#Rope#Fiber#& fiber) |
| 136 | { |
| 137 | m_fiberscxx . . $ QTJSC/JSString#Rope#m_fibers.[index++] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(53f9878e948ca4ab). fiber; |
| 138 | m_stringLengthcxx . . $ QTJSC/JSString#Rope#m_stringLength. += fiber.refAndGetLengthcxx . . $ QTJSC/JSString#Rope#Fiber#refAndGetLength(db52760e79bf9054).(); |
| 139 | } |
| 140 | void appendcxx . . $ QTJSC/JSString#Rope#append(f9b1b71dfd74f6c9).(unsigned &index, const UStringcxx . . $ QTJSC/UString#& string) |
| 141 | { |
| 142 | UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = string.repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).(); |
| 143 | m_fiberscxx . . $ QTJSC/JSString#Rope#m_fibers.[index++] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(fc541412aae2cab1). Fibercxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(f38096febece923b).(rep); |
| 144 | m_stringLengthcxx . . $ QTJSC/JSString#Rope#m_stringLength. += rep->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).()->sizecxx . . $ QTJSC/UStringImpl#size(455f465bc33b4cdf).(); |
| 145 | } |
| 146 | void appendcxx . . $ QTJSC/JSString#Rope#append(66069b31a99c8e0a).(unsigned& index, JSStringcxx . . $ QTJSC/JSString#* jsString) |
| 147 | { |
| 148 | if (jsString->isRopecxx . . $ QTJSC/JSString#isRope(50ce9a9e25b4a850).()) { |
| 149 | for (unsigned i = 0; i < jsString->m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.; ++i) |
| 150 | appendcxx . . $ QTJSC/JSString#Rope#append(d66ed287caac4a5f).(index, jsString->m_fiberscxx . . $ QTJSC/JSString#m_fibers.[i]); |
| 151 | } else |
| 152 | appendcxx . . $ QTJSC/JSString#Rope#append(f9b1b71dfd74f6c9).(index, jsString->stringcxx . . $ QTJSC/JSString#string(e6beeeda30789552).()); |
| 153 | } |
| 154 | |
| 155 | unsigned ropeLengthcxx . . $ QTJSC/JSString#Rope#ropeLength(db52760e79bf9054).() { return m_ropeLengthcxx . . $ QTJSC/JSString#Rope#m_ropeLength.; } |
| 156 | unsigned stringLengthcxx . . $ QTJSC/JSString#Rope#stringLength(db52760e79bf9054).() { return m_stringLengthcxx . . $ QTJSC/JSString#Rope#m_stringLength.; } |
| 157 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber#& fiberscxx . . $ QTJSC/JSString#Rope#fibers(7e1a90947211103c).(unsigned index) { return m_fiberscxx . . $ QTJSC/JSString#Rope#m_fibers.[index]; } |
| 158 | |
| 159 | private: |
| 160 | Ropecxx . . $ QTJSC/JSString#Rope#Rope(cb2f890c2fdad230).(unsigned ropeLength) : m_ropeLengthcxx . . $ QTJSC/JSString#Rope#m_ropeLength.(ropeLength), m_stringLengthcxx . . $ QTJSC/JSString#Rope#m_stringLength.(0) {} |
| 161 | void* operatorcxx . . $ QTJSC/JSString#Rope#`operator new`(7cf5f2fc6057a0cc). new(size_t, void* inPlace) { return inPlace; } |
| 162 | |
| 163 | unsigned m_ropeLengthcxx . . $ QTJSC/JSString#Rope#m_ropeLength.; |
| 164 | unsigned m_stringLengthcxx . . $ QTJSC/JSString#Rope#m_stringLength.; |
| 165 | Fibercxx . . $ QTJSC/JSString#Rope#Fiber# m_fiberscxx . . $ QTJSC/JSString#Rope#m_fibers.[1]; |
| 166 | }; |
| 167 | |
| 168 | ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& value) |
| 169 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 170 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(value.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).()) |
| 171 | , m_value(value) |
| 172 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(0) |
| 173 | { |
| 174 | Heapcxx . . $ QTJSC/Heap#::heapcxx . . $ QTJSC/Heap#heap(4163b73911f9bcad).(this)->reportExtraMemoryCostcxx . . $ QTJSC/Heap#reportExtraMemoryCost(2c44cd906ae4e829).(value.costcxx . . $ QTJSC/UString#cost(fe4d2d262d4164a8).()); |
| 175 | } |
| 176 | |
| 177 | enum HasOtherOwnerTypecxx . . $ QTJSC/JSString#HasOtherOwnerType# { HasOtherOwnercxx . . $ QTJSC/JSString#HasOtherOwner. }; |
| 178 | JSStringcxx . . $ QTJSC/JSString#JSString(39533af1ac05cd80).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& value, HasOtherOwnerTypecxx . . $ QTJSC/JSString#HasOtherOwnerType#) |
| 179 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 180 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(value.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).()) |
| 181 | , m_value(value) |
| 182 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(0) |
| 183 | { |
| 184 | } |
| 185 | JSStringcxx . . $ QTJSC/JSString#JSString(7e994216c7065b5b).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, PassRefPtrcxx . . $ PassRefPtr#<UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#> value, HasOtherOwnerTypecxx . . $ QTJSC/JSString#HasOtherOwnerType#) |
| 186 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 187 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(value->size()) |
| 188 | , m_value(value) |
| 189 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(0) |
| 190 | { |
| 191 | } |
| 192 | JSStringcxx . . $ QTJSC/JSString#JSString(bd3b593c2020179d).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, PassRefPtrcxx . . $ PassRefPtr#<JSStringcxx . . $ QTJSC/JSString#::Ropecxx . . $ QTJSC/JSString#Rope#> rope) |
| 193 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 194 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(rope->stringLength()) |
| 195 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(1) |
| 196 | { |
| 197 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[0] = rope.releaseRef(); |
| 198 | } |
| 199 | // This constructor constructs a new string by concatenating s1 & s2. |
| 200 | // This should only be called with ropeLength <= 3. |
| 201 | JSStringcxx . . $ QTJSC/JSString#JSString(961e17bfe8de9f44).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, unsigned ropeLength, JSStringcxx . . $ QTJSC/JSString#* s1, JSStringcxx . . $ QTJSC/JSString#* s2) |
| 202 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 203 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(s1->lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).() + s2->lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).()) |
| 204 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(ropeLength) |
| 205 | { |
| 206 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength <= s_maxInternalRopeLength); |
| 207 | unsigned index = 0; |
| 208 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(index, s1); |
| 209 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(index, s2); |
| 210 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength == index); |
| 211 | } |
| 212 | // This constructor constructs a new string by concatenating s1 & s2. |
| 213 | // This should only be called with ropeLength <= 3. |
| 214 | JSStringcxx . . $ QTJSC/JSString#JSString(1d49a2fa9e13bc5b).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, unsigned ropeLength, JSStringcxx . . $ QTJSC/JSString#* s1, const UStringcxx . . $ QTJSC/UString#& u2) |
| 215 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 216 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(s1->lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).() + u2.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).()) |
| 217 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(ropeLength) |
| 218 | { |
| 219 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength <= s_maxInternalRopeLength); |
| 220 | unsigned index = 0; |
| 221 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(index, s1); |
| 222 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(f9b1b71dfd74f6c9).(index, u2); |
| 223 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength == index); |
| 224 | } |
| 225 | // This constructor constructs a new string by concatenating s1 & s2. |
| 226 | // This should only be called with ropeLength <= 3. |
| 227 | JSStringcxx . . $ QTJSC/JSString#JSString(b609f62cc492a36e).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, unsigned ropeLength, const UStringcxx . . $ QTJSC/UString#& u1, JSStringcxx . . $ QTJSC/JSString#* s2) |
| 228 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 229 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(u1.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).() + s2->lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).()) |
| 230 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(ropeLength) |
| 231 | { |
| 232 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength <= s_maxInternalRopeLength); |
| 233 | unsigned index = 0; |
| 234 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(f9b1b71dfd74f6c9).(index, u1); |
| 235 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(index, s2); |
| 236 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(ropeLength == index); |
| 237 | } |
| 238 | // This constructor constructs a new string by concatenating v1, v2 & v3. |
| 239 | // This should only be called with ropeLength <= 3 ... which since every |
| 240 | // value must require a ropeLength of at least one implies that the length |
| 241 | // for each value must be exactly 1! |
| 242 | JSStringcxx . . $ QTJSC/JSString#JSString(85610a7c4b5e746).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# v1, JSValuecxx . . $ QTJSC/JSValue# v2, JSValuecxx . . $ QTJSC/JSValue# v3) |
| 243 | : JSCellcxx . . $ QTJSC/JSCell#(exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).().stringStructure.get()) |
| 244 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(0) |
| 245 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(s_maxInternalRopeLengthcxx . . $ QTJSC/JSString#s_maxInternalRopeLength.) |
| 246 | { |
| 247 | unsigned index = 0; |
| 248 | appendValueInConstructAndIncrementLengthcxx . . $ QTJSC/JSString#appendValueInConstructAndIncrementLength(162aa207dc5d8a02).(exec, index, v1); |
| 249 | appendValueInConstructAndIncrementLengthcxx . . $ QTJSC/JSString#appendValueInConstructAndIncrementLength(162aa207dc5d8a02).(exec, index, v2); |
| 250 | appendValueInConstructAndIncrementLengthcxx . . $ QTJSC/JSString#appendValueInConstructAndIncrementLength(162aa207dc5d8a02).(exec, index, v3); |
| 251 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(index == s_maxInternalRopeLength); |
| 252 | } |
| 253 | |
| 254 | JSStringcxx . . $ QTJSC/JSString#JSString(8d2fa24e483001d9).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& value, JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback# finalizer, void* context) |
| 255 | : JSCellcxx . . $ QTJSC/JSCell#(globalData->stringStructure.get()) |
| 256 | , m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.(value.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).()) |
| 257 | , m_value(value) |
| 258 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(0) |
| 259 | { |
| 260 | // nasty hack because we can't union non-POD types |
| 261 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[0] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(fc541412aae2cab1). reinterpret_castcxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(5d22bdacc48458e8).<void*>(reinterpret_cast<ptrdiff_t>(finalizer)); |
| 262 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[1] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(fc541412aae2cab1). contextcxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(5d22bdacc48458e8).; |
| 263 | Heapcxx . . $ QTJSC/Heap#::heapcxx . . $ QTJSC/Heap#heap(4163b73911f9bcad).(this)->reportExtraMemoryCostcxx . . $ QTJSC/Heap#reportExtraMemoryCost(2c44cd906ae4e829).(value.costcxx . . $ QTJSC/UString#cost(fe4d2d262d4164a8).()); |
| 264 | } |
| 265 | |
| 266 | ~cxx . . $ QTJSC/JSString#`~JSString`(49f6e7a06ebc5aa8).JSStringcxx . . $ QTJSC/JSString#() |
| 267 | { |
| 268 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(vptr() == JSGlobalData::jsStringVPtr); |
| 269 | for (unsigned i = 0; i < m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.; ++i) |
| 270 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[i].derefcxx . . $ QTJSC/JSString#Rope#Fiber#deref(49f6e7a06ebc5aa8).(); |
| 271 | |
| 272 | if (!m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength. && m_fiberscxx . . $ QTJSC/JSString#m_fibers.[0].nonFibercxx . . $ QTJSC/JSString#Rope#Fiber#nonFiber(50c7df7de5344ebb).()) { |
| 273 | JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback# finalizer = (JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback#)(m_fiberscxx . . $ QTJSC/JSString#m_fibers.[0].nonFibercxx . . $ QTJSC/JSString#Rope#Fiber#nonFiber(50c7df7de5344ebb).()); |
| 274 | finalizer(this, m_fiberscxx . . $ QTJSC/JSString#m_fibers.[1].nonFibercxx . . $ QTJSC/JSString#Rope#Fiber#nonFiber(50c7df7de5344ebb).()); |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | const UStringcxx . . $ QTJSC/UString#& valuecxx . . $ QTJSC/JSString#value(fc696c135aaf08bd).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const |
| 279 | { |
| 280 | if (isRopecxx . . $ QTJSC/JSString#isRope(50ce9a9e25b4a850).()) |
| 281 | resolveRopecxx . . $ QTJSC/JSString#resolveRope(31a096c468e6ff8e).(exec); |
| 282 | return m_value; |
| 283 | } |
| 284 | const UStringcxx . . $ QTJSC/UString# tryGetValuecxx . . $ QTJSC/JSString#tryGetValue(510791d78c16da69).() const |
| 285 | { |
| 286 | if (isRopecxx . . $ QTJSC/JSString#isRope(50ce9a9e25b4a850).()) |
| 287 | UStringcxx . . $ QTJSC/UString#UString(49f6e7a06ebc5aa8).(); |
| 288 | return m_value; |
| 289 | } |
| 290 | unsigned lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).() { return m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.; } |
| 291 | |
| 292 | bool getStringPropertySlotcxx . . $ QTJSC/JSString#getStringPropertySlot(6f4ef3dbfe7d5ab9).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&); |
| 293 | bool getStringPropertySlotcxx . . $ QTJSC/JSString#getStringPropertySlot(d57d1c8d4b24d235).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&); |
| 294 | bool getStringPropertyDescriptorcxx . . $ QTJSC/JSString#getStringPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#&); |
| 295 | |
| 296 | bool canGetIndexcxx . . $ QTJSC/JSString#canGetIndex(dfa6e707f7696010).(unsigned i) { return i < m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.; } |
| 297 | JSStringcxx . . $ QTJSC/JSString#* getIndexcxx . . $ QTJSC/JSString#getIndex(6705f9a2060d978c).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned); |
| 298 | |
| 299 | static PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> createStructurecxx . . $ QTJSC/JSString#createStructure(da75fbe5e97e240f).(JSValuecxx . . $ QTJSC/JSValue# proto) { return Structure::create(proto, TypeInfocxx . . $ QTJSC/TypeInfo#(StringTypecxx . . $ QTJSC/StringType., OverridesGetOwnPropertySlotcxx . . $ QTJSC/OverridesGetOwnPropertySlot. | NeedsThisConversioncxx . . $ QTJSC/NeedsThisConversion.)); } |
| 300 | |
| 301 | private: |
| 302 | enum VPtrStealingHackTypecxx . . $ QTJSC/JSString#VPtrStealingHackType# { VPtrStealingHackcxx . . $ QTJSC/JSString#VPtrStealingHack. }; |
| 303 | JSStringcxx . . $ QTJSC/JSString#JSString(f1be69e8a5b28139).(VPtrStealingHackTypecxx . . $ QTJSC/JSString#VPtrStealingHackType#) |
| 304 | : JSCellcxx . . $ QTJSC/JSCell#JSCell(32e4947f9059a24a).(0) |
| 305 | , m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.(0) |
| 306 | { |
| 307 | } |
| 308 | |
| 309 | void resolveRopecxx . . $ QTJSC/JSString#resolveRope(31a096c468e6ff8e).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 310 | |
| 311 | void appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(f9b1b71dfd74f6c9).(unsigned& index, const UStringcxx . . $ QTJSC/UString#& string) |
| 312 | { |
| 313 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[index++] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(fc541412aae2cab1). Ropecxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(f38096febece923b).::Fibercxx . . $ QTJSC/JSString#Rope#Fiber#(string.repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).()->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).()); |
| 314 | } |
| 315 | |
| 316 | void appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(unsigned& index, JSStringcxx . . $ QTJSC/JSString#* jsString) |
| 317 | { |
| 318 | if (jsString->isRopecxx . . $ QTJSC/JSString#isRope(50ce9a9e25b4a850).()) { |
| 319 | for (unsigned i = 0; i < jsString->m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.; ++i) |
| 320 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[index++] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(53f9878e948ca4ab). jsString->m_fiberscxx . . $ QTJSC/JSString#m_fibers.[i].refcxx . . $ QTJSC/JSString#Rope#Fiber#ref(8a5e6a974c4ccaa6).(); |
| 321 | } else |
| 322 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(f9b1b71dfd74f6c9).(index, jsString->stringcxx . . $ QTJSC/JSString#string(e6beeeda30789552).()); |
| 323 | } |
| 324 | |
| 325 | void appendValueInConstructAndIncrementLengthcxx . . $ QTJSC/JSString#appendValueInConstructAndIncrementLength(162aa207dc5d8a02).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned& index, JSValuecxx . . $ QTJSC/JSValue# v) |
| 326 | { |
| 327 | if (v.isStringcxx . . $ QTJSC/JSValue#isString(50ce9a9e25b4a850).()) { |
| 328 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(asCell(v)->isString()); |
| 329 | JSStringcxx . . $ QTJSC/JSString#* s = static_cast<JSString*>(asCell(v)); |
| 330 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s->ropeLength() == 1); |
| 331 | appendStringInConstructcxx . . $ QTJSC/JSString#appendStringInConstruct(66069b31a99c8e0a).(index, s); |
| 332 | m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength. += s->lengthcxx . . $ QTJSC/JSString#length(db52760e79bf9054).(); |
| 333 | } else { |
| 334 | UStringcxx . . $ QTJSC/UString# ucxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d).(v.toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(exec)); |
| 335 | m_fiberscxx . . $ QTJSC/JSString#m_fibers.[index++] =cxx . . $ QTJSC/JSString#Rope#Fiber#`operator=`(fc541412aae2cab1). Ropecxx . . $ QTJSC/JSString#Rope#Fiber#Fiber(f38096febece923b).::Fibercxx . . $ QTJSC/JSString#Rope#Fiber#(u.repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).()->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).()); |
| 336 | m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength. += u.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).(); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | virtual JSValuecxx . . $ QTJSC/JSValue# toPrimitivecxx . . $ QTJSC/JSString#toPrimitive(9c1c7f5535dadf1e).(ExecStatecxx . . $ QTJSC/ExecState#*, PreferredPrimitiveTypecxx . . $ QTJSC/PreferredPrimitiveType#) const; |
| 341 | virtual bool getPrimitiveNumbercxx . . $ QTJSC/JSString#getPrimitiveNumber(5ae801b0dd2b44e9).(ExecStatecxx . . $ QTJSC/ExecState#*, double& number, JSValuecxx . . $ QTJSC/JSValue#& value); |
| 342 | virtual bool toBooleancxx . . $ QTJSC/JSString#toBoolean(9608304f86fd7dc).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 343 | virtual double toNumbercxx . . $ QTJSC/JSString#toNumber(1fd034e372fd1279).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 344 | virtual JSObjectcxx . . $ QTJSC/JSObject#* toObjectcxx . . $ QTJSC/JSString#toObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 345 | virtual UStringcxx . . $ QTJSC/UString# toStringcxx . . $ QTJSC/JSString#toString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 346 | |
| 347 | virtual JSObjectcxx . . $ QTJSC/JSObject#* toThisObjectcxx . . $ QTJSC/JSString#toThisObject(8709ed4849a165ab).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 348 | virtual UStringcxx . . $ QTJSC/UString# toThisStringcxx . . $ QTJSC/JSString#toThisString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#*) const; |
| 349 | virtual JSStringcxx . . $ QTJSC/JSString#* toThisJSStringcxx . . $ QTJSC/JSString#toThisJSString(193b2cc77222fd6b).(ExecStatecxx . . $ QTJSC/ExecState#*); |
| 350 | |
| 351 | // Actually getPropertySlot, not getOwnPropertySlot (see JSCell). |
| 352 | virtual bool getOwnPropertySlotcxx . . $ QTJSC/JSString#getOwnPropertySlot(6f4ef3dbfe7d5ab9).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&); |
| 353 | virtual bool getOwnPropertySlotcxx . . $ QTJSC/JSString#getOwnPropertySlot(d57d1c8d4b24d235).(ExecStatecxx . . $ QTJSC/ExecState#*, unsigned propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#&); |
| 354 | virtual bool getOwnPropertyDescriptorcxx . . $ QTJSC/JSString#getOwnPropertyDescriptor(dce4ef7012294c32).(ExecStatecxx . . $ QTJSC/ExecState#*, const Identifiercxx . . $ QTJSC/Identifier#&, PropertyDescriptorcxx . . $ QTJSC/PropertyDescriptor#&); |
| 355 | |
| 356 | static const unsigned s_maxInternalRopeLengthcxx . . $ QTJSC/JSString#s_maxInternalRopeLength. = 3; |
| 357 | |
| 358 | // A string is represented either by a UString or a Rope. |
| 359 | unsigned m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.; |
| 360 | mutable UStringcxx . . $ QTJSC/UString# m_valuecxx . . $ QTJSC/JSString#m_value.; |
| 361 | mutable unsigned m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.; |
| 362 | mutable Ropecxx . . $ QTJSC/JSString#Rope#::Fibercxx . . $ QTJSC/JSString#Rope#Fiber# m_fiberscxx . . $ QTJSC/JSString#m_fibers.[s_maxInternalRopeLengthcxx . . $ QTJSC/JSString#s_maxInternalRopeLength.]; |
| 363 | |
| 364 | bool isRopecxx . . $ QTJSC/JSString#isRope(50ce9a9e25b4a850).() const { return m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength.; } |
| 365 | UStringcxx . . $ QTJSC/UString#& stringcxx . . $ QTJSC/JSString#string(e6beeeda30789552).() { ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!isRope()); return m_value; } |
| 366 | unsigned ropeLengthcxx . . $ QTJSC/JSString#ropeLength(db52760e79bf9054).() { return m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength. ? m_ropeLengthcxx . . $ QTJSC/JSString#m_ropeLength. : 1; } |
| 367 | |
| 368 | friend JSValuecxx . . $ QTJSC/JSValue# jsStringcxx . . $ QTJSC/jsString(1d20702c49229e34).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSStringcxx . . $ QTJSC/JSString#* s1, JSStringcxx . . $ QTJSC/JSString#* s2); |
| 369 | friend JSValuecxx . . $ QTJSC/JSValue# jsStringcxx . . $ QTJSC/jsString(7bff5709425c3996).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& u1, JSStringcxx . . $ QTJSC/JSString#* s2); |
| 370 | friend JSValuecxx . . $ QTJSC/JSValue# jsStringcxx . . $ QTJSC/jsString(d78052f683f48fad).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSStringcxx . . $ QTJSC/JSString#* s1, const UStringcxx . . $ QTJSC/UString#& u2); |
| 371 | friend JSValuecxx . . $ QTJSC/JSValue# jsStringcxx . . $ QTJSC/jsString(6a1e182a4f5bfc39).(ExecStatecxx . . $ QTJSC/ExecState#* exec, Registercxx . . $ QTJSC/Register#* strings, unsigned count); |
| 372 | friend JSValuecxx . . $ QTJSC/JSValue# jsStringcxx . . $ QTJSC/jsString(a346bc844d0fe1c2).(ExecStatecxx . . $ QTJSC/ExecState#* exec, JSValuecxx . . $ QTJSC/JSValue# thisValue, const ArgListcxx . . $ QTJSC/ArgList#& args); |
| 373 | friend JSStringcxx . . $ QTJSC/JSString#* jsStringWithFinalizercxx . . $ QTJSC/jsStringWithFinalizer(1bf9af647d198ef2).(ExecStatecxx . . $ QTJSC/ExecState#*, const UStringcxx . . $ QTJSC/UString#&, JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback# callback, void* context); |
| 374 | }; |
| 375 | |
| 376 | JSStringcxx . . $ QTJSC/JSString#* asStringcxx . . $ QTJSC/asString(3a349c2233e4a703).(JSValuecxx . . $ QTJSC/JSValue#); |
| 377 | |
| 378 | // When an object is created from a different DLL, MSVC changes vptr to a "local" one right after invoking a constructor, |
| 379 | // see <http://groups.google.com/group/microsoft.public.vc.language/msg/55cdcefeaf770212>. |
| 380 | // This breaks isJSString(), and we don't need that hack anyway, so we change vptr back to primary one. |
| 381 | // The below function must be called by any inline function that invokes a JSString constructor. |
| 382 | #if COMPILERcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:39:9`!(MSVC) && !defined(BUILDING_JavaScriptCorecxx . . $ `<built-in>:475:9`!) |
| 383 | inline JSString* fixupVPtr(JSGlobalData* globalData, JSString* string) { string->setVPtr(globalData->jsStringVPtr); return string; } |
| 384 | #else |
| 385 | inline JSStringcxx . . $ QTJSC/JSString#* fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#*, JSStringcxx . . $ QTJSC/JSString#* string) { return string; } |
| 386 | #endif |
| 387 | |
| 388 | inline JSStringcxx . . $ QTJSC/JSString#* asStringcxx . . $ QTJSC/asString(3a349c2233e4a703).(JSValuecxx . . $ QTJSC/JSValue# value) |
| 389 | { |
| 390 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(asCell(value)->isString()); |
| 391 | return static_cast<JSString*>(asCell(value)); |
| 392 | } |
| 393 | |
| 394 | inline JSStringcxx . . $ QTJSC/JSString#* jsEmptyStringcxx . . $ QTJSC/jsEmptyString(25c6ef16d739185e).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData) |
| 395 | { |
| 396 | return globalData->smallStrings.emptyString(globalData); |
| 397 | } |
| 398 | |
| 399 | inline JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterStringcxx . . $ QTJSC/jsSingleCharacterString(798b61d009c114).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, UCharcxx . . $ UChar# c) |
| 400 | { |
| 401 | if (c <= 0xFF) |
| 402 | return globalData->smallStrings.singleCharacterString(globalData, c); |
| 403 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(globalData, UStringcxx . . $ QTJSC/UString#UString(280060e335061cbc).(&c, 1))); |
| 404 | } |
| 405 | |
| 406 | inline JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(7ff41d81bc820a25).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& s, unsigned offset) |
| 407 | { |
| 408 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(offset < static_cast<unsigned>(s.size())); |
| 409 | UCharcxx . . $ UChar# c = s.datacxx . . $ QTJSC/UString#data(9865edf6270d80f8).()[offset]; |
| 410 | if (c <= 0xFF) |
| 411 | return globalData->smallStrings.singleCharacterString(globalData, c); |
| 412 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(globalData, UStringcxx . . $ QTJSC/UString#(UString::Rep::create(s.repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).(), offset, 1)))); |
| 413 | } |
| 414 | |
| 415 | inline JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(d56e32c9ed8b7181).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const char* s) |
| 416 | { |
| 417 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s); |
| 418 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s[0]); |
| 419 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s[1]); |
| 420 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(globalData, scxx . . $ QTJSC/UString#UString(85c52e162fed56f9).)); |
| 421 | } |
| 422 | |
| 423 | inline JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& s) |
| 424 | { |
| 425 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s.size() > 1); |
| 426 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(globalData, s)); |
| 427 | } |
| 428 | |
| 429 | inline JSStringcxx . . $ QTJSC/JSString#* JSStringcxx . . $ QTJSC/JSString#::getIndexcxx . . $ QTJSC/JSString#getIndex(6705f9a2060d978c).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned i) |
| 430 | { |
| 431 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(canGetIndex(i)); |
| 432 | return jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(7ff41d81bc820a25).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), valuecxx . . $ QTJSC/JSString#value(fc696c135aaf08bd).(exec), i); |
| 433 | } |
| 434 | |
| 435 | inline JSStringcxx . . $ QTJSC/JSString#* jsStringcxx . . $ QTJSC/jsString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& s) |
| 436 | { |
| 437 | int size = s.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).(); |
| 438 | if (!size) |
| 439 | return globalData->smallStrings.emptyString(globalData); |
| 440 | if (size == 1) { |
| 441 | UCharcxx . . $ UChar# c = s.datacxx . . $ QTJSC/UString#data(9865edf6270d80f8).()[0]; |
| 442 | if (c <= 0xFF) |
| 443 | return globalData->smallStrings.singleCharacterString(globalData, c); |
| 444 | } |
| 445 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(da2e3d018b4db96).(globalData, s)); |
| 446 | } |
| 447 | |
| 448 | inline JSStringcxx . . $ QTJSC/JSString#* jsStringWithFinalizercxx . . $ QTJSC/jsStringWithFinalizer(1bf9af647d198ef2).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s, JSStringFinalizerCallbackcxx . . $ QTJSC/JSStringFinalizerCallback# callback, void* context) |
| 449 | { |
| 450 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(s.size() && (s.size() > 1 || s.data()[0] > 0xFF)); |
| 451 | JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData = &exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(); |
| 452 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(8d2fa24e483001d9).(globalData, s, callback, context)); |
| 453 | } |
| 454 | |
| 455 | inline JSStringcxx . . $ QTJSC/JSString#* jsSubstringcxx . . $ QTJSC/jsSubstring(ae7b7b6b099afa3).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& s, unsigned offset, unsigned length) |
| 456 | { |
| 457 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(offset <= static_cast<unsigned>(s.size())); |
| 458 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(length <= static_cast<unsigned>(s.size())); |
| 459 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(offset + length <= static_cast<unsigned>(s.size())); |
| 460 | if (!length) |
| 461 | return globalData->smallStrings.emptyString(globalData); |
| 462 | if (length == 1) { |
| 463 | UCharcxx . . $ UChar# c = s.datacxx . . $ QTJSC/UString#data(9865edf6270d80f8).()[offset]; |
| 464 | if (c <= 0xFF) |
| 465 | return globalData->smallStrings.singleCharacterString(globalData, c); |
| 466 | } |
| 467 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(39533af1ac05cd80).(globalData, UStringcxx . . $ QTJSC/UString#(UString::Rep::create(s.repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).(), offset, length)), JSStringcxx . . $ QTJSC/JSString#::HasOtherOwnercxx . . $ QTJSC/JSString#HasOtherOwner.)); |
| 468 | } |
| 469 | |
| 470 | inline JSStringcxx . . $ QTJSC/JSString#* jsOwnedStringcxx . . $ QTJSC/jsOwnedString(cd57c96e3da4d8c2).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, const UStringcxx . . $ QTJSC/UString#& s) |
| 471 | { |
| 472 | int size = s.sizecxx . . $ QTJSC/UString#size(455f465bc33b4cdf).(); |
| 473 | if (!size) |
| 474 | return globalData->smallStrings.emptyString(globalData); |
| 475 | if (size == 1) { |
| 476 | UCharcxx . . $ UChar# c = s.datacxx . . $ QTJSC/UString#data(9865edf6270d80f8).()[0]; |
| 477 | if (c <= 0xFF) |
| 478 | return globalData->smallStrings.singleCharacterString(globalData, c); |
| 479 | } |
| 480 | return fixupVPtrcxx . . $ QTJSC/fixupVPtr(81132cde4228b60e).(globalData, new (globalData) JSStringcxx . . $ QTJSC/JSString#JSString(39533af1ac05cd80).(globalData, s, JSStringcxx . . $ QTJSC/JSString#::HasOtherOwnercxx . . $ QTJSC/JSString#HasOtherOwner.)); |
| 481 | } |
| 482 | |
| 483 | inline JSStringcxx . . $ QTJSC/JSString#* jsEmptyStringcxx . . $ QTJSC/jsEmptyString(193b2cc77222fd6b).(ExecStatecxx . . $ QTJSC/ExecState#* exec) { return jsEmptyStringcxx . . $ QTJSC/jsEmptyString(25c6ef16d739185e).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).()); } |
| 484 | inline JSStringcxx . . $ QTJSC/JSString#* jsStringcxx . . $ QTJSC/jsString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s) { return jsStringcxx . . $ QTJSC/jsString(cd57c96e3da4d8c2).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s); } |
| 485 | inline JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterStringcxx . . $ QTJSC/jsSingleCharacterString(ccec0c672e7a6fd2).(ExecStatecxx . . $ QTJSC/ExecState#* exec, UCharcxx . . $ UChar# c) { return jsSingleCharacterStringcxx . . $ QTJSC/jsSingleCharacterString(798b61d009c114).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), c); } |
| 486 | inline JSStringcxx . . $ QTJSC/JSString#* jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(933fdf172a0cf95c).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s, unsigned offset) { return jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(7ff41d81bc820a25).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s, offset); } |
| 487 | inline JSStringcxx . . $ QTJSC/JSString#* jsSubstringcxx . . $ QTJSC/jsSubstring(83d2e1b0ae358b23).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s, unsigned offset, unsigned length) { return jsSubstringcxx . . $ QTJSC/jsSubstring(ae7b7b6b099afa3).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s, offset, length); } |
| 488 | inline JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s) { return jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(cd57c96e3da4d8c2).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s); } |
| 489 | inline JSStringcxx . . $ QTJSC/JSString#* jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(e2c2a5e45ecf2c5d).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const char* s) { return jsNontrivialStringcxx . . $ QTJSC/jsNontrivialString(d56e32c9ed8b7181).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s); } |
| 490 | inline JSStringcxx . . $ QTJSC/JSString#* jsOwnedStringcxx . . $ QTJSC/jsOwnedString(edccc873576bddf5).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const UStringcxx . . $ QTJSC/UString#& s) { return jsOwnedStringcxx . . $ QTJSC/jsOwnedString(cd57c96e3da4d8c2).(&exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).(), s); } |
| 491 | |
| 492 | ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! bool JSStringcxx . . $ QTJSC/JSString#::getStringPropertySlotcxx . . $ QTJSC/JSString#getStringPropertySlot(6f4ef3dbfe7d5ab9).(ExecStatecxx . . $ QTJSC/ExecState#* exec, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#& slot) |
| 493 | { |
| 494 | if (propertyName ==cxx . . $ QTJSC/`operator==`(38b530dfd324fb30). exec->propertyNamescxx . . $ QTJSC/ExecState#propertyNames(16296db726e31f87).().length) { |
| 495 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(jsNumbercxx . . $ QTJSC/jsNumber(bf7e02f8c8245e31).(exec, m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.)); |
| 496 | return true; |
| 497 | } |
| 498 | |
| 499 | bool isStrictUInt32; |
| 500 | unsigned i = propertyName.toStrictUInt32cxx . . $ QTJSC/Identifier#toStrictUInt32(870b63f89c7fb98).(&isStrictUInt32); |
| 501 | if (isStrictUInt32 && i < m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.) { |
| 502 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(933fdf172a0cf95c).(exec, valuecxx . . $ QTJSC/JSString#value(fc696c135aaf08bd).(exec), i)); |
| 503 | return true; |
| 504 | } |
| 505 | |
| 506 | return false; |
| 507 | } |
| 508 | |
| 509 | ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! bool JSStringcxx . . $ QTJSC/JSString#::getStringPropertySlotcxx . . $ QTJSC/JSString#getStringPropertySlot(d57d1c8d4b24d235).(ExecStatecxx . . $ QTJSC/ExecState#* exec, unsigned propertyName, PropertySlotcxx . . $ QTJSC/PropertySlot#& slot) |
| 510 | { |
| 511 | if (propertyName < m_stringLengthcxx . . $ QTJSC/JSString#m_stringLength.) { |
| 512 | slot.setValuecxx . . $ QTJSC/PropertySlot#setValue(5c2ac18db087b3e6).(jsSingleCharacterSubstringcxx . . $ QTJSC/jsSingleCharacterSubstring(933fdf172a0cf95c).(exec, valuecxx . . $ QTJSC/JSString#value(fc696c135aaf08bd).(exec), propertyName)); |
| 513 | return true; |
| 514 | } |
| 515 | |
| 516 | return false; |
| 517 | } |
| 518 | |
| 519 | inline bool isJSStringcxx . . $ QTJSC/isJSString(b468e0305807c4ec).(JSGlobalDatacxx . . $ QTJSC/JSGlobalData#* globalData, JSValuecxx . . $ QTJSC/JSValue# v) { return v.isCellcxx . . $ QTJSC/JSValue#isCell(50ce9a9e25b4a850).() && v.asCellcxx . . $ QTJSC/JSValue#asCell(60510463d9a84528).()->vptrcxx . . $ QTJSC/JSCell#vptr(50c7df7de5344ebb).() == globalData->jsStringVPtrcxx . . $ QTJSC/JSGlobalData#jsStringVPtr.; } |
| 520 | |
| 521 | // --- JSValue inlines ---------------------------- |
| 522 | |
| 523 | inline JSStringcxx . . $ QTJSC/JSString#* JSValuecxx . . $ QTJSC/JSValue#::toThisJSStringcxx . . $ QTJSC/JSValue#toThisJSString(193b2cc77222fd6b).(ExecStatecxx . . $ QTJSC/ExecState#* exec) |
| 524 | { |
| 525 | return isCellcxx . . $ QTJSC/JSValue#isCell(50ce9a9e25b4a850).() ? asCellcxx . . $ QTJSC/JSValue#asCell(60510463d9a84528).()->toThisJSStringcxx . . $ QTJSC/JSCell#toThisJSString(193b2cc77222fd6b).(exec) : jsStringcxx . . $ QTJSC/jsString(edccc873576bddf5).(exec, toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(exec)); |
| 526 | } |
| 527 | |
| 528 | inline UStringcxx . . $ QTJSC/UString# JSValuecxx . . $ QTJSC/JSValue#::toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const |
| 529 | { |
| 530 | if (isString()) |
| 531 | return static_cast<JSString*>(asCell())->value(exec); |
| 532 | if (isInt32cxx . . $ QTJSC/JSValue#isInt32(50ce9a9e25b4a850).()) |
| 533 | return exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).().numericStrings.add(asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).()); |
| 534 | if (isDoublecxx . . $ QTJSC/JSValue#isDouble(50ce9a9e25b4a850).()) |
| 535 | return exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).().numericStrings.add(asDoublecxx . . $ QTJSC/JSValue#asDouble(21b6c25e127938e2).()); |
| 536 | if (isTruecxx . . $ QTJSC/JSValue#isTrue(50ce9a9e25b4a850).()) |
| 537 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "true"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 538 | if (isFalsecxx . . $ QTJSC/JSValue#isFalse(50ce9a9e25b4a850).()) |
| 539 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "false"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 540 | if (isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 541 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "null"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 542 | if (isUndefinedcxx . . $ QTJSC/JSValue#isUndefined(50ce9a9e25b4a850).()) |
| 543 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "undefined"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 544 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isCell()); |
| 545 | return asCellcxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d).()->toStringcxx . . $ QTJSC/JSCell#toString(9c94f5abb1995042).(exec); |
| 546 | } |
| 547 | |
| 548 | inline UStringcxx . . $ QTJSC/UString# JSValuecxx . . $ QTJSC/JSValue#::toPrimitiveStringcxx . . $ QTJSC/JSValue#toPrimitiveString(9c94f5abb1995042).(ExecStatecxx . . $ QTJSC/ExecState#* exec) const |
| 549 | { |
| 550 | if (isString()) |
| 551 | return static_cast<JSString*>(asCell())->value(exec); |
| 552 | if (isInt32cxx . . $ QTJSC/JSValue#isInt32(50ce9a9e25b4a850).()) |
| 553 | return exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).().numericStrings.add(asInt32cxx . . $ QTJSC/JSValue#asInt32(455f465bc33b4cdf).()); |
| 554 | if (isDoublecxx . . $ QTJSC/JSValue#isDouble(50ce9a9e25b4a850).()) |
| 555 | return exec->globalDatacxx . . $ QTJSC/ExecState#globalData(ae00a65ac2fd4a61).().numericStrings.add(asDoublecxx . . $ QTJSC/JSValue#asDouble(21b6c25e127938e2).()); |
| 556 | if (isTruecxx . . $ QTJSC/JSValue#isTrue(50ce9a9e25b4a850).()) |
| 557 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "true"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 558 | if (isFalsecxx . . $ QTJSC/JSValue#isFalse(50ce9a9e25b4a850).()) |
| 559 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "false"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 560 | if (isNullcxx . . $ QTJSC/JSValue#isNull(50ce9a9e25b4a850).()) |
| 561 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "null"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 562 | if (isUndefinedcxx . . $ QTJSC/JSValue#isUndefined(50ce9a9e25b4a850).()) |
| 563 | returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). "undefined"cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).; |
| 564 | ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isCell()); |
| 565 | return asCellcxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d).()->toPrimitivecxx . . $ QTJSC/JSCell#toPrimitive(9c1c7f5535dadf1e).(exec, NoPreferencecxx . . $ QTJSC/NoPreference.).toStringcxx . . $ QTJSC/JSValue#toString(9c94f5abb1995042).(exec); |
| 566 | } |
| 567 | |
| 568 | } // namespace JSC |
| 569 | |
| 570 | #endif // JSString_h |