Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #include "config.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/config.h`/
27 #include "Structure.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h`/
28
29 #include "Identifier.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.h`/
30 #include "JSObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h`/
31 #include "JSPropertyNameIterator.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSPropertyNameIterator.h`/
32 #include "Lookup.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Lookup.h`/
33 #include "PropertyNameArray.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/PropertyNameArray.h`/
34 #include "StructureChain.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StructureChain.h`/
35 #include <wtf/RefCountedLeakCounter.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.h`/
36 #include <wtf/RefPtr.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtr.h`/
37
38 #if ENABLEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:57:9`!(JSC_MULTIPLE_THREADS)
39 #include <wtf/Threading.h>
40 #endif
41
42 #define DUMP_STRUCTURE_ID_STATISTICScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:42:9`! 0
43
44 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
45 #define DO_PROPERTYMAP_CONSTENCY_CHECK 0
46 #else
47 #define DO_PROPERTYMAP_CONSTENCY_CHECKcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:47:9`! 0
48 #endif
49
50 using namespace WTFcxx . . $ `<built-in>:467:9`!;
51
52 namespace JSCcxx . . $ `<built-in>:463:9`! {
53
54 // Choose a number for the following so that most property maps are smaller,
55 // but it's not going to blow out the stack to allocate this number of pointers.
56 static const int smallMapThresholdcxx . . $ QTJSC/smallMapThreshold. = 1024;
57
58 // The point at which the function call overhead of the qsort implementation
59 // becomes small compared to the inefficiency of insertion sort.
60 static const unsigned tinyMapThresholdcxx . . $ QTJSC/tinyMapThreshold. = 20;
61
62 static const unsigned newTableSizecxx . . $ QTJSC/newTableSize. = 16;
63
64 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
65 static WTF::RefCountedLeakCounter structureCounter("Structure");
66
67 #if ENABLE(JSC_MULTIPLE_THREADS)
68 static Mutex& ignoreSetMutex = *(new Mutex);
69 #endif
70
71 static bool shouldIgnoreLeaks;
72 static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);
73 #endif
74
75 #if DUMP_STRUCTURE_ID_STATISTICScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:42:9`!
76 static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>);
77 #endif
78
79 static int comparePropertyMapEntryIndicescxx . . $ QTJSC/comparePropertyMapEntryIndices(9148c8c3ff42c9d8).(const void* a, const void* b);
80
81 void Structurecxx . . $ QTJSC/Structure#::dumpStatisticscxx . . $ QTJSC/Structure#dumpStatistics(49f6e7a06ebc5aa8).()
82 {
83 #if DUMP_STRUCTURE_ID_STATISTICScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:42:9`!
84 unsigned numberLeaf = 0;
85 unsigned numberUsingSingleSlot = 0;
86 unsigned numberSingletons = 0;
87 unsigned numberWithPropertyMaps = 0;
88 unsigned totalPropertyMapsSize = 0;
89
90 HashSet<Structure*>::const_iterator end = liveStructureSet.end();
91 for (HashSet<Structure*>::const_iterator it = liveStructureSet.begin(); it != end; ++it) {
92 Structure* structure = *it;
93 if (structure->m_usingSingleTransitionSlot) {
94 if (!structure->m_transitions.singleTransition)
95 ++numberLeaf;
96 else
97 ++numberUsingSingleSlot;
98
99 if (!structure->m_previous && !structure->m_transitions.singleTransition)
100 ++numberSingletons;
101 }
102
103 if (structure->m_propertyTable) {
104 ++numberWithPropertyMaps;
105 totalPropertyMapsSize += PropertyMapHashTable::allocationSize(structure->m_propertyTable->size);
106 if (structure->m_propertyTable->deletedOffsets)
107 totalPropertyMapsSize += (structure->m_propertyTable->deletedOffsets->capacity() * sizeof(unsigned));
108 }
109 }
110
111 printf("Number of live Structures: %d\n", liveStructureSet.size());
112 printf("Number of Structures using the single item optimization for transition map: %d\n", numberUsingSingleSlot);
113 printf("Number of Structures that are leaf nodes: %d\n", numberLeaf);
114 printf("Number of Structures that singletons: %d\n", numberSingletons);
115 printf("Number of Structures with PropertyMaps: %d\n", numberWithPropertyMaps);
116
117 printf("Size of a single Structures: %d\n", static_cast<unsigned>(sizeof(Structure)));
118 printf("Size of sum of all property maps: %d\n", totalPropertyMapsSize);
119 printf("Size of average of all property maps: %f\n", static_cast<double>(totalPropertyMapsSize) / static_cast<double>(liveStructureSet.size()));
120 #else
121 printf("Dumping Structure statistics is not enabled.\n");
122 #endif
123 }
124
125 Structurecxx . . $ QTJSC/Structure#::Structurecxx . . $ QTJSC/Structure#Structure(1d44a51be903f81a).(JSValuecxx . . $ QTJSC/JSValue# prototype, const TypeInfocxx . . $ QTJSC/TypeInfo#& typeInfo)
126 : m_typeInfocxx . . $ QTJSC/Structure#m_typeInfo.(typeInfo)
127 , m_prototypecxx . . $ QTJSC/Structure#m_prototype.(prototype)
128 , m_specificValueInPreviouscxx . . $ QTJSC/Structure#m_specificValueInPrevious.(0)
129 , m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.(0)
130 , m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.(JSObjectcxx . . $ QTJSC/JSObject#::inlineStorageCapacitycxx . . $ QTJSC/JSObject#inlineStorageCapacity.)
131 , m_offsetcxx . . $ QTJSC/Structure#m_offset.(noOffsetcxx . . $ QTJSC/Structure#noOffset.)
132 , m_dictionaryKindcxx . . $ QTJSC/Structure#m_dictionaryKind.(NoneDictionaryKindcxx . . $ QTJSC/Structure#NoneDictionaryKind.)
133 , m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable.(false)
134 , m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.(false)
135 , m_attributesInPreviouscxx . . $ QTJSC/Structure#m_attributesInPrevious.(0)
136 , m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.(0)
137 {
138 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_prototype);
139 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_prototype.isObject() || m_prototype.isNull());
140
141 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
142 #if ENABLE(JSC_MULTIPLE_THREADS)
143 MutexLocker protect(ignoreSetMutex);
144 #endif
145 if (shouldIgnoreLeaks)
146 ignoreSet.add(this);
147 else
148 structureCounter.increment();
149 #endif
150
151 #if DUMP_STRUCTURE_ID_STATISTICScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:42:9`!
152 liveStructureSet.add(this);
153 #endif
154 }
155
156 Structurecxx . . $ QTJSC/Structure#::~cxx . . $ QTJSC/Structure#`~Structure`(49f6e7a06ebc5aa8).Structurecxx . . $ QTJSC/Structure#()
157 {
158 if (m_previous) {
159 if (m_nameInPrevious) {
160 unsigned attrInPrev = m_attributesInPreviouscxx . . $ QTJSC/Structure#m_attributesInPrevious.;
161 m_previous->table.remove(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(m_nameInPrevious.get()), attrInPrev), m_specificValueInPrevious);
162 } else
163 m_previous->table.removeAnonymousSlotTransition(m_anonymousSlotsInPrevious);
164
165 }
166
167 if (m_enumerationCache)
168 m_enumerationCache->setCachedStructure(0);
169
170 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.) {
171 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
172 for (unsigned i = 1; i <= entryCount; i++) {
173 if (UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* key = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].keycxx . . $ QTJSC/PropertyMapEntry#key.)
174 key->derefcxx . . $ QTJSC/UStringImpl#deref(49f6e7a06ebc5aa8).();
175 }
176
177 delete m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets;
178 fastFreecxx . . $ fastFree(5d22bdacc48458e8).(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.);
179 }
180
181 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
182 #if ENABLE(JSC_MULTIPLE_THREADS)
183 MutexLocker protect(ignoreSetMutex);
184 #endif
185 HashSet<Structure*>::iterator it = ignoreSet.find(this);
186 if (it != ignoreSet.end())
187 ignoreSet.remove(it);
188 else
189 structureCounter.decrement();
190 #endif
191
192 #if DUMP_STRUCTURE_ID_STATISTICScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:42:9`!
193 liveStructureSet.remove(this);
194 #endif
195 }
196
197 void Structurecxx . . $ QTJSC/Structure#::startIgnoringLeakscxx . . $ QTJSC/Structure#startIgnoringLeaks(49f6e7a06ebc5aa8).()
198 {
199 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
200 shouldIgnoreLeaks = true;
201 #endif
202 }
203
204 void Structurecxx . . $ QTJSC/Structure#::stopIgnoringLeakscxx . . $ QTJSC/Structure#stopIgnoringLeaks(49f6e7a06ebc5aa8).()
205 {
206 #ifndef NDEBUGcxx . . $ `<built-in>:472:9`!
207 shouldIgnoreLeaks = false;
208 #endif
209 }
210
211 static bool isPowerOf2cxx . . $ QTJSC/isPowerOf2(dfa6e707f7696010).(unsigned v)
212 {
213 // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html
214
215 return !(v & (v - 1)) && v;
216 }
217
218 static unsigned nextPowerOf2cxx . . $ QTJSC/nextPowerOf2(2141b656ce2cc063).(unsigned v)
219 {
220 // Taken from http://www.cs.utk.edu/~vose/c-stuff/bithacks.html
221 // Devised by Sean Anderson, Sepember 14, 2001
222
223 v--;
224 v |= v >> 1;
225 v |= v >> 2;
226 v |= v >> 4;
227 v |= v >> 8;
228 v |= v >> 16;
229 v++;
230
231 return v;
232 }
233
234 static unsigned sizeForKeyCountcxx . . $ QTJSC/sizeForKeyCount(ea88b852781e8a38).(size_t keyCount)
235 {
236 if (keyCount == notFoundcxx . . $ notFound.)
237 return newTableSizecxx . . $ QTJSC/newTableSize.;
238
239 if (keyCount < 8)
240 return newTableSizecxx . . $ QTJSC/newTableSize.;
241
242 if (isPowerOf2cxx . . $ QTJSC/isPowerOf2(dfa6e707f7696010).(keyCount))
243 return keyCount * 4;
244
245 return nextPowerOf2cxx . . $ QTJSC/nextPowerOf2(2141b656ce2cc063).(keyCount) * 2;
246 }
247
248 void Structurecxx . . $ QTJSC/Structure#::materializePropertyMapcxx . . $ QTJSC/Structure#materializePropertyMap(49f6e7a06ebc5aa8).()
249 {
250 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_propertyTable);
251
252 Vectorcxx . . $ Vector#<Structurecxx . . $ QTJSC/Structure#*, 8> structures;
253 structures.append(this);
254
255 Structurecxx . . $ QTJSC/Structure#* structure = this;
256
257 // Search for the last Structure with a property table.
258 while ((structure = structure->previousIDcxx . . $ QTJSC/Structure#previousID(a25848528202c7a).())) {
259 if (structure->m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable.) {
260 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(structure->m_propertyTable);
261 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!structure->m_previous);
262
263 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable. = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
264 break;
265 }
266
267 structures.append(structure);
268 }
269
270 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
271 createPropertyMapHashTablecxx . . $ QTJSC/Structure#createPropertyMapHashTable(cb2f890c2fdad230).(sizeForKeyCountcxx . . $ QTJSC/sizeForKeyCount(ea88b852781e8a38).(m_offsetcxx . . $ QTJSC/Structure#m_offset. + 1));
272 else {
273 if (sizeForKeyCountcxx . . $ QTJSC/sizeForKeyCount(ea88b852781e8a38).(m_offsetcxx . . $ QTJSC/Structure#m_offset. + 1) > m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size.)
274 rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(cb2f890c2fdad230).(sizeForKeyCountcxx . . $ QTJSC/sizeForKeyCount(ea88b852781e8a38).(m_offsetcxx . . $ QTJSC/Structure#m_offset. + 1)); // This could be made more efficient by combining with the copy above.
275 }
276
277 for (ptrdiff_t i = structures.size() - 2; i >= 0; --i) {
278 structure = structures[i];
279 if (!structure->m_nameInPrevious) {
280 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount. += structure->m_anonymousSlotsInPreviouscxx . . $ QTJSC/Structure#m_anonymousSlotsInPrevious.;
281 continue;
282 }
283 structure->m_nameInPrevious->ref();
284 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry# entry(structure->m_nameInPrevious.get(), structure->m_offsetcxx . . $ QTJSC/Structure#m_offset., structure->m_attributesInPreviouscxx . . $ QTJSC/Structure#m_attributesInPrevious., structure->m_specificValueInPreviouscxx . . $ QTJSC/Structure#m_specificValueInPrevious., ++m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->lastIndexUsedcxx . . $ QTJSC/PropertyMapHashTable#lastIndexUsed.);
285 insertIntoPropertyMapHashTablecxx . . $ QTJSC/Structure#insertIntoPropertyMapHashTable(f1f56f76eb063039).(entry);
286 }
287 }
288
289 void Structurecxx . . $ QTJSC/Structure#::growPropertyStorageCapacitycxx . . $ QTJSC/Structure#growPropertyStorageCapacity(49f6e7a06ebc5aa8).()
290 {
291 if (m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity. == JSObjectcxx . . $ QTJSC/JSObject#::inlineStorageCapacitycxx . . $ QTJSC/JSObject#inlineStorageCapacity.)
292 m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity. = JSObjectcxx . . $ QTJSC/JSObject#::nonInlineBaseStorageCapacitycxx . . $ QTJSC/JSObject#nonInlineBaseStorageCapacity.;
293 else
294 m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity. *= 2;
295 }
296
297 void Structurecxx . . $ QTJSC/Structure#::despecifyDictionaryFunctioncxx . . $ QTJSC/Structure#despecifyDictionaryFunction(d7ed36c5537ed570).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName)
298 {
299 const UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = propertyName._ustring.rep();
300
301 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
302
303 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isDictionary());
304 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
305
306 unsigned i = rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
307
308 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
309 ++numProbes;
310 #endif
311
312 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
313 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(entryIndex != emptyEntryIndex);
314
315 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
316 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
317 return;
318 }
319
320 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
321 ++numCollisions;
322 #endif
323
324 unsigned k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
325
326 while (1) {
327 i += k;
328
329 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
330 ++numRehashes;
331 #endif
332
333 entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
334 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(entryIndex != emptyEntryIndex);
335
336 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
337 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
338 return;
339 }
340 }
341 }
342
343 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::addPropertyTransitionToExistingStructurecxx . . $ QTJSC/Structure#addPropertyTransitionToExistingStructure(19ad4c8c24dcc83e).(Structurecxx . . $ QTJSC/Structure#* structure, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, unsigned attributes, JSCellcxx . . $ QTJSC/JSCell#* specificValue, size_t& offset)
344 {
345 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!structure->isDictionary());
346 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(structure->typeInfo().type() == ObjectType);
347
348 if (Structurecxx . . $ QTJSC/Structure#* existingTransition = structure->table.get(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(propertyName.ustringcxx . . $ QTJSC/Identifier#ustring(de21ee9ecbd506fd).().repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).()), attributes), specificValue)) {
349 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(existingTransition->m_offset != noOffset);
350 offset = existingTransition->m_offsetcxx . . $ QTJSC/Structure#m_offset.;
351 return existingTransition;
352 }
353
354 return 0;
355 }
356
357 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::addPropertyTransitioncxx . . $ QTJSC/Structure#addPropertyTransition(19ad4c8c24dcc83e).(Structurecxx . . $ QTJSC/Structure#* structure, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, unsigned attributes, JSCellcxx . . $ QTJSC/JSCell#* specificValue, size_t& offset)
358 {
359 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!structure->isDictionary());
360 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(structure->typeInfo().type() == ObjectType);
361 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificValue, offset));
362
363 if (structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount. == maxSpecificFunctionThrashCountcxx . . $ QTJSC/Structure#maxSpecificFunctionThrashCount.)
364 specificValue = 0;
365
366 if (structure->transitionCountcxx . . $ QTJSC/Structure#transitionCount(4f2304c4a29b870b).() > s_maxTransitionLengthcxx . . $ QTJSC/Structure#s_maxTransitionLength.) {
367 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = toCacheableDictionaryTransition(structure);
368 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(structure != transition);
369 offset = transition->put(propertyName, attributes, specificValue);
370 if (transition->propertyStorageSize() >cxx . . $ QTJSC/`operator>`(11610d830df66bbf). transition->propertyStorageCapacity())
371 transition->growPropertyStorageCapacity();
372 return transition.release();
373 }
374
375 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(structure->m_prototype, structure->typeInfo());
376
377 transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain;
378 transition->m_previous = structure;
379 transition->m_nameInPrevious = propertyName.ustringcxx . . $ QTJSC/Identifier#ustring(de21ee9ecbd506fd).().repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).();
380 transition->m_attributesInPrevious = attributes;
381 transition->m_specificValueInPrevious = specificValue;
382 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
383 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
384 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
385 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.;
386
387 if (structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.) {
388 if (structure->m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable.)
389 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
390 else {
391 transition->m_propertyTable = structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.;
392 structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable. = 0;
393 }
394 } else {
395 if (structure->m_previous)
396 transition->materializePropertyMap();
397 else
398 transition->createPropertyMapHashTable();
399 }
400
401 offset = transition->put(propertyName, attributes, specificValue);
402 if (transition->propertyStorageSize() >cxx . . $ QTJSC/`operator>`(11610d830df66bbf). transition->propertyStorageCapacity())
403 transition->growPropertyStorageCapacity();
404
405 transition->m_offset = offset;
406
407 structure->table.add(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(propertyName.ustringcxx . . $ QTJSC/Identifier#ustring(de21ee9ecbd506fd).().repcxx . . $ QTJSC/UString#rep(eff8ac5d0836371c).()), attributes), transition.get(), specificValue);
408 return transition.release();
409 }
410
411 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::removePropertyTransitioncxx . . $ QTJSC/Structure#removePropertyTransition(da3846f25ff07923).(Structurecxx . . $ QTJSC/Structure#* structure, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, size_t& offset)
412 {
413 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!structure->isUncacheableDictionary());
414
415 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = toUncacheableDictionaryTransition(structure);
416
417 offset = transition->remove(propertyName);
418
419 return transition.release();
420 }
421
422 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::changePrototypeTransitioncxx . . $ QTJSC/Structure#changePrototypeTransition(8aa264da460ed3b0).(Structurecxx . . $ QTJSC/Structure#* structure, JSValuecxx . . $ QTJSC/JSValue# prototype)
423 {
424 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(prototype, structure->typeInfo());
425
426 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
427 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
428 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
429 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.;
430
431 // Don't set m_offset, as one can not transition to this.
432
433 structure->materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
434 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
435 transition->m_isPinnedPropertyTable = true;
436
437 return transition.release();
438 }
439
440 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::despecifyFunctionTransitioncxx . . $ QTJSC/Structure#despecifyFunctionTransition(ec50b0781d1a4215).(Structurecxx . . $ QTJSC/Structure#* structure, const Identifiercxx . . $ QTJSC/Identifier#& replaceFunction)
441 {
442 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(structure->m_specificFunctionThrashCount < maxSpecificFunctionThrashCount);
443 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(structure->storedPrototype(), structure->typeInfo());
444
445 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
446 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
447 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
448 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount. + 1;
449
450 // Don't set m_offset, as one can not transition to this.
451
452 structure->materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
453 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
454 transition->m_isPinnedPropertyTable = true;
455
456 if (transition->m_specificFunctionThrashCount ==cxx . . $ QTJSC/`operator==`(8208a731c2dadbc2). maxSpecificFunctionThrashCountcxx . . $ QTJSC/Structure#maxSpecificFunctionThrashCount.)
457 transition->despecifyAllFunctions();
458 else {
459 bool removed = transition->despecifyFunction(replaceFunction);
460 ASSERT_UNUSEDcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:186:9`!(removed, removed);
461 }
462
463 return transition.release();
464 }
465
466 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::addAnonymousSlotsTransitioncxx . . $ QTJSC/Structure#addAnonymousSlotsTransition(751f9511696b41d1).(Structurecxx . . $ QTJSC/Structure#* structure, unsigned count)
467 {
468 if (Structurecxx . . $ QTJSC/Structure#* transition = structure->table.getAnonymousSlotTransition(count)) {
469 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(transition->storedPrototype() == structure->storedPrototype());
470 return transition;
471 }
472 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(count);
473 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(count < ((1<<6) - 2));
474 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(structure->m_prototype, structure->typeInfo());
475
476 transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain;
477 transition->m_previous = structure;
478 transition->m_nameInPrevious = 0;
479 transition->m_attributesInPrevious = 0;
480 transition->m_anonymousSlotsInPrevious = count;
481 transition->m_specificValueInPrevious = 0;
482 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
483 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
484 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
485 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.;
486
487 if (structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.) {
488 if (structure->m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable.)
489 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
490 else {
491 transition->m_propertyTable = structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.;
492 structure->m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable. = 0;
493 }
494 } else {
495 if (structure->m_previous)
496 transition->materializePropertyMap();
497 else
498 transition->createPropertyMapHashTable();
499 }
500
501 transition->addAnonymousSlots(count);
502 if (transition->propertyStorageSize() >cxx . . $ QTJSC/`operator>`(11610d830df66bbf). transition->propertyStorageCapacity())
503 transition->growPropertyStorageCapacity();
504
505 structure->table.addAnonymousSlotTransition(count, transition.get());
506 return transition.release();
507 }
508
509 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::getterSetterTransitioncxx . . $ QTJSC/Structure#getterSetterTransition(a778feb3ce88ec9c).(Structurecxx . . $ QTJSC/Structure#* structure)
510 {
511 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(structure->storedPrototype(), structure->typeInfo());
512 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
513 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
514 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
515 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.;
516
517 // Don't set m_offset, as one can not transition to this.
518
519 structure->materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
520 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
521 transition->m_isPinnedPropertyTable = true;
522
523 return transition.release();
524 }
525
526 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::toDictionaryTransitioncxx . . $ QTJSC/Structure#toDictionaryTransition(4cad7cbafafd13c4).(Structurecxx . . $ QTJSC/Structure#* structure, DictionaryKindcxx . . $ QTJSC/Structure#DictionaryKind# kind)
527 {
528 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!structure->isUncacheableDictionary());
529
530 RefPtrcxx . . $ RefPtr#<Structurecxx . . $ QTJSC/Structure#> transition = create(structure->m_prototype, structure->typeInfo());
531 transition->m_dictionaryKind = kind;
532 transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacitycxx . . $ QTJSC/Structure#m_propertyStorageCapacity.;
533 transition->m_hasGetterSetterProperties = structure->m_hasGetterSetterPropertiescxx . . $ QTJSC/Structure#m_hasGetterSetterProperties.;
534 transition->m_hasNonEnumerableProperties = structure->m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties.;
535 transition->m_specificFunctionThrashCount = structure->m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount.;
536
537 structure->materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
538 transition->m_propertyTable = structure->copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).();
539 transition->m_isPinnedPropertyTable = true;
540
541 return transition.release();
542 }
543
544 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::toCacheableDictionaryTransitioncxx . . $ QTJSC/Structure#toCacheableDictionaryTransition(a778feb3ce88ec9c).(Structurecxx . . $ QTJSC/Structure#* structure)
545 {
546 return toDictionaryTransition(structure, CachedDictionaryKindcxx . . $ QTJSC/Structure#CachedDictionaryKind.);
547 }
548
549 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::toUncacheableDictionaryTransitioncxx . . $ QTJSC/Structure#toUncacheableDictionaryTransition(a778feb3ce88ec9c).(Structurecxx . . $ QTJSC/Structure#* structure)
550 {
551 return toDictionaryTransition(structure, UncachedDictionaryKindcxx . . $ QTJSC/Structure#UncachedDictionaryKind.);
552 }
553
554 PassRefPtrcxx . . $ PassRefPtr#<Structurecxx . . $ QTJSC/Structure#> Structurecxx . . $ QTJSC/Structure#::flattenDictionaryStructurecxx . . $ QTJSC/Structure#flattenDictionaryStructure(1afadfc984d37344).(JSObjectcxx . . $ QTJSC/JSObject#* object)
555 {
556 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isDictionary());
557 if (isUncacheableDictionarycxx . . $ QTJSC/Structure#isUncacheableDictionary(50ce9a9e25b4a850).()) {
558 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
559 Vector<PropertyMapEntry*> sortedPropertyEntries(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount.);
560 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#** p = sortedPropertyEntries.data();
561 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
562 for (unsigned i = 1; i <= entryCount; i++) {
563 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].keycxx . . $ QTJSC/PropertyMapEntry#key.)
564 *p++ = &m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i];
565 }
566 size_t propertyCount = p - sortedPropertyEntries.data();
567 qsortcxx . . $ qsort(ebb60b13a65e77d7).(sortedPropertyEntries.data(), propertyCount, sizeof(PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#*), comparePropertyMapEntryIndicescxx . . $ QTJSC/comparePropertyMapEntryIndices(9148c8c3ff42c9d8).);
568 sortedPropertyEntries.resize(propertyCount);
569
570 // We now have the properties currently defined on this object
571 // in the order that they are expected to be in, but we need to
572 // reorder the storage, so we have to copy the current values out
573 Vector<JSValue> values(propertyCount);
574 unsigned anonymousSlotCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount.;
575 for (unsigned i = 0; i < propertyCount; i++) {
576 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#* entry = sortedPropertyEntries[i];
577 values[i] = object->getDirectOffsetcxx . . $ QTJSC/JSObject#getDirectOffset(e9dec2041b7a6b55).(entry->offsetcxx . . $ QTJSC/PropertyMapEntry#offset.);
578 // Update property table to have the new property offsets
579 entry->offsetcxx . . $ QTJSC/PropertyMapEntry#offset. = anonymousSlotCount + i;
580 entry->indexcxx . . $ QTJSC/PropertyMapEntry#index. = i;
581 }
582
583 // Copy the original property values into their final locations
584 for (unsigned i = 0; i < propertyCount; i++)
585 object->putDirectOffsetcxx . . $ QTJSC/JSObject#putDirectOffset(3158aa3e980d8b6b).(anonymousSlotCount + i, values[i]);
586
587 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets) {
588 delete m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets;
589 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets = 0;
590 }
591 }
592
593 m_dictionaryKindcxx . . $ QTJSC/Structure#m_dictionaryKind. = NoneDictionaryKindcxx . . $ QTJSC/Structure#NoneDictionaryKind.;
594 return this;
595 }
596
597 size_t Structurecxx . . $ QTJSC/Structure#::addPropertyWithoutTransitioncxx . . $ QTJSC/Structure#addPropertyWithoutTransition(b2a1ca9f57524f01).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName, unsigned attributes, JSCellcxx . . $ QTJSC/JSCell#* specificValue)
598 {
599 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_enumerationCache);
600
601 if (m_specificFunctionThrashCountcxx . . $ QTJSC/Structure#m_specificFunctionThrashCount. == maxSpecificFunctionThrashCountcxx . . $ QTJSC/Structure#maxSpecificFunctionThrashCount.)
602 specificValue = 0;
603
604 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
605
606 m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable. = true;
607
608 size_t offset = putcxx . . $ QTJSC/Structure#put(b2a1ca9f57524f01).(propertyName, attributes, specificValue);
609 if (propertyStorageSizecxx . . $ QTJSC/Structure#propertyStorageSize(ddd8539a2fcdd4ce).() > propertyStorageCapacitycxx . . $ QTJSC/Structure#propertyStorageCapacity(ddd8539a2fcdd4ce).())
610 growPropertyStorageCapacitycxx . . $ QTJSC/Structure#growPropertyStorageCapacity(49f6e7a06ebc5aa8).();
611 return offset;
612 }
613
614 size_t Structurecxx . . $ QTJSC/Structure#::removePropertyWithoutTransitioncxx . . $ QTJSC/Structure#removePropertyWithoutTransition(308a741d5d193e69).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName)
615 {
616 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isUncacheableDictionary());
617 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_enumerationCache);
618
619 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
620
621 m_isPinnedPropertyTablecxx . . $ QTJSC/Structure#m_isPinnedPropertyTable. = true;
622 size_t offset = removecxx . . $ QTJSC/Structure#remove(308a741d5d193e69).(propertyName);
623 return offset;
624 }
625
626 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
627
628 static int numProbes;
629 static int numCollisions;
630 static int numRehashes;
631 static int numRemoves;
632
633 struct PropertyMapStatisticsExitLogger {
634 ~PropertyMapStatisticsExitLogger();
635 };
636
637 static PropertyMapStatisticsExitLogger logger;
638
639 PropertyMapStatisticsExitLogger::~PropertyMapStatisticsExitLogger()
640 {
641 printf("\nJSC::PropertyMap statistics\n\n");
642 printf("%d probes\n", numProbes);
643 printf("%d collisions (%.1f%%)\n", numCollisions, 100.0 * numCollisions / numProbes);
644 printf("%d rehashes\n", numRehashes);
645 printf("%d removes\n", numRemoves);
646 }
647
648 #endif
649
650 static const unsigned deletedSentinelIndexcxx . . $ QTJSC/deletedSentinelIndex. = 1;
651
652 #if !DO_PROPERTYMAP_CONSTENCY_CHECKcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:47:9`!
653
654 inline void Structurecxx . . $ QTJSC/Structure#::checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).()
655 {
656 }
657
658 #endif
659
660 PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#* Structurecxx . . $ QTJSC/Structure#::copyPropertyTablecxx . . $ QTJSC/Structure#copyPropertyTable(cf49f541019b76b).()
661 {
662 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
663 return 0;
664
665 size_t tableSize = PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#::allocationSizecxx . . $ QTJSC/PropertyMapHashTable#allocationSize(1892545c1754497d).(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size.);
666 PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#* newTable = static_cast<PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#*>(fastMalloccxx . . $ fastMalloc(bfcfa4d6b7f7ef64).(tableSize));
667 memcpy(newTable, m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable., tableSize);
668
669 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
670 for (unsigned i = 1; i <= entryCount; ++i) {
671 if (UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* key = newTable->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].keycxx . . $ QTJSC/PropertyMapEntry#key.)
672 key->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).();
673 }
674
675 // Copy the deletedOffsets vector.
676 if (m_propertyTable->deletedOffsets)
677 newTable->deletedOffsets = new Vector<unsigned>(*m_propertyTable->deletedOffsets);
678
679 newTable->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount. = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount.;
680 return newTable;
681 }
682
683 size_t Structurecxx . . $ QTJSC/Structure#::getcxx . . $ QTJSC/Structure#get(fef5c6c00deec754).(const UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep, unsigned& attributes, JSCellcxx . . $ QTJSC/JSCell#*& specificValue)
684 {
685 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
686 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
687 return notFoundcxx . . $ notFound.;
688
689 unsigned i = rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
690
691 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
692 ++numProbes;
693 #endif
694
695 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
696 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
697 return notFoundcxx . . $ notFound.;
698
699 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
700 attributes = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].attributescxx . . $ QTJSC/PropertyMapEntry#attributes.;
701 specificValue = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue.;
702 return m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].offsetcxx . . $ QTJSC/PropertyMapEntry#offset.;
703 }
704
705 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
706 ++numCollisions;
707 #endif
708
709 unsigned k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
710
711 while (1) {
712 i += k;
713
714 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
715 ++numRehashes;
716 #endif
717
718 entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
719 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
720 return notFoundcxx . . $ notFound.;
721
722 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
723 attributes = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].attributescxx . . $ QTJSC/PropertyMapEntry#attributes.;
724 specificValue = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue.;
725 return m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].offsetcxx . . $ QTJSC/PropertyMapEntry#offset.;
726 }
727 }
728 }
729
730 bool Structurecxx . . $ QTJSC/Structure#::despecifyFunctioncxx . . $ QTJSC/Structure#despecifyFunction(2df46756334b417a).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName)
731 {
732 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!propertyName.isNull());
733
734 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
735 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
736 return false;
737
738 UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = propertyName._ustring.rep();
739
740 unsigned i = rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
741
742 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
743 ++numProbes;
744 #endif
745
746 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
747 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
748 return false;
749
750 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
751 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable->entries()[entryIndex - 1].specificValue);
752 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
753 return true;
754 }
755
756 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
757 ++numCollisions;
758 #endif
759
760 unsigned k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
761
762 while (1) {
763 i += k;
764
765 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
766 ++numRehashes;
767 #endif
768
769 entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
770 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
771 return false;
772
773 if (rep == m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
774 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable->entries()[entryIndex - 1].specificValue);
775 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
776 return true;
777 }
778 }
779 }
780
781 void Structurecxx . . $ QTJSC/Structure#::despecifyAllFunctionscxx . . $ QTJSC/Structure#despecifyAllFunctions(49f6e7a06ebc5aa8).()
782 {
783 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
784 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
785 return;
786
787 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
788 for (unsigned i = 1; i <= entryCount; ++i)
789 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
790 }
791
792 size_t Structurecxx . . $ QTJSC/Structure#::putcxx . . $ QTJSC/Structure#put(b2a1ca9f57524f01).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName, unsigned attributes, JSCellcxx . . $ QTJSC/JSCell#* specificValue)
793 {
794 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!propertyName.isNull());
795 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(get(propertyName) == notFound);
796
797 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
798
799 if (attributes & DontEnumcxx . . $ QTJSC/DontEnum.)
800 m_hasNonEnumerablePropertiescxx . . $ QTJSC/Structure#m_hasNonEnumerableProperties. = true;
801
802 UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = propertyName._ustring.rep();
803
804 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
805 createPropertyMapHashTablecxx . . $ QTJSC/Structure#createPropertyMapHashTable(49f6e7a06ebc5aa8).();
806
807 // FIXME: Consider a fast case for tables with no deleted sentinels.
808
809 unsigned i = rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
810 unsigned k = 0;
811 bool foundDeletedElement = false;
812 unsigned deletedElementIndex = 0; // initialize to make the compiler happy
813
814 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
815 ++numProbes;
816 #endif
817
818 while (1) {
819 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
820 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
821 break;
822
823 if (entryIndex == deletedSentinelIndexcxx . . $ QTJSC/deletedSentinelIndex.) {
824 // If we find a deleted-element sentinel, remember it for use later.
825 if (!foundDeletedElement) {
826 foundDeletedElement = true;
827 deletedElementIndex = i;
828 }
829 }
830
831 if (k == 0) {
832 k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
833 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
834 ++numCollisions;
835 #endif
836 }
837
838 i += k;
839
840 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
841 ++numRehashes;
842 #endif
843 }
844
845 // Figure out which entry to use.
846 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount. + 2;
847 if (foundDeletedElement) {
848 i = deletedElementIndex;
849 --m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
850
851 // Since we're not making the table bigger, we can't use the entry one past
852 // the end that we were planning on using, so search backwards for the empty
853 // slot that we can use. We know it will be there because we did at least one
854 // deletion in the past that left an entry empty.
855 while (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[--entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.) { }
856 }
857
858 // Create a new hash table entry.
859 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.] = entryIndex;
860
861 // Create a new hash table entry.
862 rep->refcxx . . $ QTJSC/UStringImpl#ref(b56a90d0afa3b8ee).();
863 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key. = rep;
864 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].attributescxx . . $ QTJSC/PropertyMapEntry#attributes. = attributes;
865 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = specificValue;
866 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].indexcxx . . $ QTJSC/PropertyMapEntry#index. = ++m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->lastIndexUsedcxx . . $ QTJSC/PropertyMapHashTable#lastIndexUsed.;
867
868 unsigned newOffset;
869 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets && !m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets->isEmpty()) {
870 newOffset = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets->last();
871 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets->removeLast();
872 } else
873 newOffset = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount.;
874 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].offsetcxx . . $ QTJSC/PropertyMapEntry#offset. = newOffset;
875
876 ++m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount.;
877
878 if ((m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.) * 2 >= m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size.)
879 expandPropertyMapHashTablecxx . . $ QTJSC/Structure#expandPropertyMapHashTable(49f6e7a06ebc5aa8).();
880
881 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
882 return newOffset;
883 }
884
885 void Structurecxx . . $ QTJSC/Structure#::addAnonymousSlotscxx . . $ QTJSC/Structure#addAnonymousSlots(cb2f890c2fdad230).(unsigned count)
886 {
887 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount. += count;
888 }
889
890 bool Structurecxx . . $ QTJSC/Structure#::hasTransitioncxx . . $ QTJSC/Structure#hasTransition(26b4d1c86e42eebb).(UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep, unsigned attributes)
891 {
892 return table.hasTransition(StructureTransitionTableHash::Key(RefPtr<UString::Rep>(rep), attributes));
893 }
894
895 size_t Structurecxx . . $ QTJSC/Structure#::removecxx . . $ QTJSC/Structure#remove(308a741d5d193e69).(const Identifiercxx . . $ QTJSC/Identifier#& propertyName)
896 {
897 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!propertyName.isNull());
898
899 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
900
901 UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* rep = propertyName._ustring.rep();
902
903 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
904 return notFoundcxx . . $ notFound.;
905
906 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
907 ++numProbes;
908 ++numRemoves;
909 #endif
910
911 // Find the thing to remove.
912 unsigned i = rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
913 unsigned k = 0;
914 unsigned entryIndex;
915 UStringcxx . . $ QTJSC/UString#::Repcxx . . $ QTJSC/UString#Rep#* key = 0;
916 while (1) {
917 entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
918 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
919 return notFoundcxx . . $ notFound.;
920
921 key = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key.;
922 if (rep == key)
923 break;
924
925 if (k == 0) {
926 k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(rep->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
927 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
928 ++numCollisions;
929 #endif
930 }
931
932 i += k;
933
934 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
935 ++numRehashes;
936 #endif
937 }
938
939 // Replace this one element with the deleted sentinel. Also clear out
940 // the entry so we can iterate all the entries as needed.
941 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.] = deletedSentinelIndexcxx . . $ QTJSC/deletedSentinelIndex.;
942
943 size_t offset = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].offsetcxx . . $ QTJSC/PropertyMapEntry#offset.;
944
945 key->derefcxx . . $ QTJSC/UStringImpl#deref(49f6e7a06ebc5aa8).();
946 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].keycxx . . $ QTJSC/PropertyMapEntry#key. = 0;
947 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].attributescxx . . $ QTJSC/PropertyMapEntry#attributes. = 0;
948 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].specificValuecxx . . $ QTJSC/PropertyMapEntry#specificValue. = 0;
949 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1].offsetcxx . . $ QTJSC/PropertyMapEntry#offset. = 0;
950
951 if (!m_propertyTable->deletedOffsets)
952 m_propertyTable->deletedOffsets = new Vector<unsigned>;
953 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets->append(offset);
954
955 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable->keyCount >= 1);
956 --m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount.;
957 ++m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
958
959 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount. * 4 >= m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size.)
960 rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(49f6e7a06ebc5aa8).();
961
962 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
963 return offset;
964 }
965
966 void Structurecxx . . $ QTJSC/Structure#::insertIntoPropertyMapHashTablecxx . . $ QTJSC/Structure#insertIntoPropertyMapHashTable(f1f56f76eb063039).(const PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#& entry)
967 {
968 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
969
970 unsigned i = entry.keycxx . . $ QTJSC/PropertyMapEntry#key.->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).();
971 unsigned k = 0;
972
973 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
974 ++numProbes;
975 #endif
976
977 while (1) {
978 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.];
979 if (entryIndex == emptyEntryIndexcxx . . $ QTJSC/Structure#emptyEntryIndex.)
980 break;
981
982 if (k == 0) {
983 k = 1 | doubleHashcxx . . $ QTWTF/doubleHash(2141b656ce2cc063).(entry.keycxx . . $ QTJSC/PropertyMapEntry#key.->existingHashcxx . . $ QTJSC/UStringImpl#existingHash(ddd8539a2fcdd4ce).());
984 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
985 ++numCollisions;
986 #endif
987 }
988
989 i += k;
990
991 #if DUMP_PROPERTYMAP_STATScxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.h:44:9`!
992 ++numRehashes;
993 #endif
994 }
995
996 unsigned entryIndex = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + 2;
997 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entryIndicescxx . . $ QTJSC/PropertyMapHashTable#entryIndices.[i & m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask.] = entryIndex;
998 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[entryIndex - 1] =cxx . . $ QTJSC/PropertyMapEntry#`operator=`(686212bc59fad191). entry;
999
1000 ++m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount.;
1001 }
1002
1003 void Structurecxx . . $ QTJSC/Structure#::createPropertyMapHashTablecxx . . $ QTJSC/Structure#createPropertyMapHashTable(49f6e7a06ebc5aa8).()
1004 {
1005 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(sizeForKeyCount(7) == newTableSize);
1006 createPropertyMapHashTablecxx . . $ QTJSC/Structure#createPropertyMapHashTable(cb2f890c2fdad230).(newTableSizecxx . . $ QTJSC/newTableSize.);
1007 }
1008
1009 void Structurecxx . . $ QTJSC/Structure#::createPropertyMapHashTablecxx . . $ QTJSC/Structure#createPropertyMapHashTable(cb2f890c2fdad230).(unsigned newTableSize)
1010 {
1011 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(!m_propertyTable);
1012 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isPowerOf2(newTableSize));
1013
1014 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
1015
1016 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable. = static_cast<PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#*>(fastZeroedMalloccxx . . $ fastZeroedMalloc(bfcfa4d6b7f7ef64).(PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#::allocationSizecxx . . $ QTJSC/PropertyMapHashTable#allocationSize(1892545c1754497d).(newTableSize)));
1017 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size. = newTableSize;
1018 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask. = newTableSize - 1;
1019
1020 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
1021 }
1022
1023 void Structurecxx . . $ QTJSC/Structure#::expandPropertyMapHashTablecxx . . $ QTJSC/Structure#expandPropertyMapHashTable(49f6e7a06ebc5aa8).()
1024 {
1025 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
1026 rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(cb2f890c2fdad230).(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size. * 2);
1027 }
1028
1029 void Structurecxx . . $ QTJSC/Structure#::rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(49f6e7a06ebc5aa8).()
1030 {
1031 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
1032 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable->size);
1033 rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(cb2f890c2fdad230).(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size.);
1034 }
1035
1036 void Structurecxx . . $ QTJSC/Structure#::rehashPropertyMapHashTablecxx . . $ QTJSC/Structure#rehashPropertyMapHashTable(cb2f890c2fdad230).(unsigned newTableSize)
1037 {
1038 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_propertyTable);
1039 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(isPowerOf2(newTableSize));
1040
1041 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
1042
1043 PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#* oldTable = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.;
1044
1045 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable. = static_cast<PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#*>(fastZeroedMalloccxx . . $ fastZeroedMalloc(bfcfa4d6b7f7ef64).(PropertyMapHashTablecxx . . $ QTJSC/PropertyMapHashTable#::allocationSizecxx . . $ QTJSC/PropertyMapHashTable#allocationSize(1892545c1754497d).(newTableSize)));
1046 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizecxx . . $ QTJSC/PropertyMapHashTable#size. = newTableSize;
1047 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->sizeMaskcxx . . $ QTJSC/PropertyMapHashTable#sizeMask. = newTableSize - 1;
1048 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount. = oldTable->anonymousSlotCountcxx . . $ QTJSC/PropertyMapHashTable#anonymousSlotCount.;
1049
1050 unsigned lastIndexUsed = 0;
1051 unsigned entryCount = oldTable->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + oldTable->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
1052 for (unsigned i = 1; i <= entryCount; ++i) {
1053 if (oldTable->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].keycxx . . $ QTJSC/PropertyMapEntry#key.) {
1054 lastIndexUsed = maxcxx . . $ QTWTF/max(2a338fce5842aa6a).(oldTable->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].indexcxx . . $ QTJSC/PropertyMapEntry#index., lastIndexUsed);
1055 insertIntoPropertyMapHashTablecxx . . $ QTJSC/Structure#insertIntoPropertyMapHashTable(f1f56f76eb063039).(oldTable->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i]);
1056 }
1057 }
1058 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->lastIndexUsedcxx . . $ QTJSC/PropertyMapHashTable#lastIndexUsed. = lastIndexUsed;
1059 m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedOffsets = oldTable->deletedOffsets;
1060
1061 fastFreecxx . . $ fastFree(5d22bdacc48458e8).(oldTable);
1062
1063 checkConsistencycxx . . $ QTJSC/Structure#checkConsistency(49f6e7a06ebc5aa8).();
1064 }
1065
1066 int comparePropertyMapEntryIndicescxx . . $ QTJSC/comparePropertyMapEntryIndices(9148c8c3ff42c9d8).(const void* a, const void* b)
1067 {
1068 unsigned ia = static_cast<PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#* const*>(a)[0]->indexcxx . . $ QTJSC/PropertyMapEntry#index.;
1069 unsigned ib = static_cast<PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#* const*>(b)[0]->indexcxx . . $ QTJSC/PropertyMapEntry#index.;
1070 if (ia < ib)
1071 return -1;
1072 if (ia > ib)
1073 return +1;
1074 return 0;
1075 }
1076
1077 void Structurecxx . . $ QTJSC/Structure#::getPropertyNamescxx . . $ QTJSC/Structure#getPropertyNames(e313ad74d8bfac2f).(PropertyNameArraycxx . . $ QTJSC/PropertyNameArray#& propertyNames, EnumerationModecxx . . $ QTJSC/EnumerationMode# mode)
1078 {
1079 materializePropertyMapIfNecessarycxx . . $ QTJSC/Structure#materializePropertyMapIfNecessary(49f6e7a06ebc5aa8).();
1080 if (!m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.)
1081 return;
1082
1083 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. < tinyMapThresholdcxx . . $ QTJSC/tinyMapThreshold.) {
1084 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#* a[tinyMapThresholdcxx . . $ QTJSC/tinyMapThreshold.];
1085 int i = 0;
1086 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
1087 for (unsigned k = 1; k <= entryCount; k++) {
1088 ASSERTcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h:184:9`!(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[k].attributes & DontEnum));
1089 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[k].keycxx . . $ QTJSC/PropertyMapEntry#key. && (!(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[k].attributescxx . . $ QTJSC/PropertyMapEntry#attributes. & DontEnumcxx . . $ QTJSC/DontEnum.) || (mode == IncludeDontEnumPropertiescxx . . $ QTJSC/IncludeDontEnumProperties.))) {
1090 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#* value = &m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[k];
1091 int j;
1092 for (j = i - 1; j >= 0 && a[j]->indexcxx . . $ QTJSC/PropertyMapEntry#index. > value->indexcxx . . $ QTJSC/PropertyMapEntry#index.; --j)
1093 a[j + 1] = a[j];
1094 a[j + 1] = value;
1095 ++i;
1096 }
1097 }
1098 if (!propertyNames.sizecxx . . $ QTJSC/PropertyNameArray#size(fe4d2d262d4164a8).()) {
1099 for (int k = 0; k < i; ++k)
1100 propertyNames.addKnownUniquecxx . . $ QTJSC/PropertyNameArray#addKnownUnique(f38096febece923b).(a[k]->keycxx . . $ QTJSC/PropertyMapEntry#key.);
1101 } else {
1102 for (int k = 0; k < i; ++k)
1103 propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(f38096febece923b).(a[k]->keycxx . . $ QTJSC/PropertyMapEntry#key.);
1104 }
1105
1106 return;
1107 }
1108
1109 // Allocate a buffer to use to sort the keys.
1110 Vectorcxx . . $ Vector#<PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#*, smallMapThresholdcxx . . $ QTJSC/smallMapThreshold.> sortedEnumerables(m_propertyTable->keyCount);
1111
1112 // Get pointers to the enumerable entries in the buffer.
1113 PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#** p = sortedEnumerables.data();
1114 unsigned entryCount = m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->keyCountcxx . . $ QTJSC/PropertyMapHashTable#keyCount. + m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->deletedSentinelCountcxx . . $ QTJSC/PropertyMapHashTable#deletedSentinelCount.;
1115 for (unsigned i = 1; i <= entryCount; i++) {
1116 if (m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].keycxx . . $ QTJSC/PropertyMapEntry#key. && (!(m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i].attributescxx . . $ QTJSC/PropertyMapEntry#attributes. & DontEnumcxx . . $ QTJSC/DontEnum.) || (mode == IncludeDontEnumPropertiescxx . . $ QTJSC/IncludeDontEnumProperties.)))
1117 *p++ = &m_propertyTablecxx . . $ QTJSC/Structure#m_propertyTable.->entriescxx . . $ QTJSC/PropertyMapHashTable#entries(c756222fc8ee585c).()[i];
1118 }
1119
1120 size_t enumerableCount = p - sortedEnumerables.data();
1121 // Sort the entries by index.
1122 qsortcxx . . $ qsort(ebb60b13a65e77d7).(sortedEnumerables.data(), enumerableCount, sizeof(PropertyMapEntrycxx . . $ QTJSC/PropertyMapEntry#*), comparePropertyMapEntryIndicescxx . . $ QTJSC/comparePropertyMapEntryIndices(9148c8c3ff42c9d8).);
1123 sortedEnumerables.resize(enumerableCount);
1124
1125 // Put the keys of the sorted entries into the list.
1126 if (!propertyNames.sizecxx . . $ QTJSC/PropertyNameArray#size(fe4d2d262d4164a8).()) {
1127 for (size_t i = 0; i <cxx . . $ QTJSC/`operator<`(11610d830df66bbf). sortedEnumerables.size(); ++i)
1128 propertyNames.addKnownUniquecxx . . $ QTJSC/PropertyNameArray#addKnownUnique(f38096febece923b).(sortedEnumerables[i]->key);
1129 } else {
1130 for (size_t i = 0; i <cxx . . $ QTJSC/`operator<`(11610d830df66bbf). sortedEnumerables.size(); ++i)
1131 propertyNames.addcxx . . $ QTJSC/PropertyNameArray#add(d7ed36c5537ed570).(sortedEnumerables[i]->key);
1132 }
1133 }
1134
1135 #if DO_PROPERTYMAP_CONSTENCY_CHECKcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp:47:9`!
1136
1137 void Structure::checkConsistency()
1138 {
1139 if (!m_propertyTable)
1140 return;
1141
1142 ASSERT(m_propertyTable->size >= newTableSize);
1143 ASSERT(m_propertyTable->sizeMask);
1144 ASSERT(m_propertyTable->size == m_propertyTable->sizeMask + 1);
1145 ASSERT(!(m_propertyTable->size & m_propertyTable->sizeMask));
1146
1147 ASSERT(m_propertyTable->keyCount <= m_propertyTable->size / 2);
1148 ASSERT(m_propertyTable->deletedSentinelCount <= m_propertyTable->size / 4);
1149
1150 ASSERT(m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount <= m_propertyTable->size / 2);
1151
1152 unsigned indexCount = 0;
1153 unsigned deletedIndexCount = 0;
1154 for (unsigned a = 0; a != m_propertyTable->size; ++a) {
1155 unsigned entryIndex = m_propertyTable->entryIndices[a];
1156 if (entryIndex == emptyEntryIndex)
1157 continue;
1158 if (entryIndex == deletedSentinelIndex) {
1159 ++deletedIndexCount;
1160 continue;
1161 }
1162 ASSERT(entryIndex > deletedSentinelIndex);
1163 ASSERT(entryIndex - 1 <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount);
1164 ++indexCount;
1165
1166 for (unsigned b = a + 1; b != m_propertyTable->size; ++b)
1167 ASSERT(m_propertyTable->entryIndices[b] != entryIndex);
1168 }
1169 ASSERT(indexCount == m_propertyTable->keyCount);
1170 ASSERT(deletedIndexCount == m_propertyTable->deletedSentinelCount);
1171
1172 ASSERT(m_propertyTable->entries()[0].key == 0);
1173
1174 unsigned nonEmptyEntryCount = 0;
1175 for (unsigned c = 1; c <= m_propertyTable->keyCount + m_propertyTable->deletedSentinelCount; ++c) {
1176 ASSERT(m_hasNonEnumerableProperties || !(m_propertyTable->entries()[c].attributes & DontEnum));
1177 UString::Rep* rep = m_propertyTable->entries()[c].key;
1178 if (!rep)
1179 continue;
1180 ++nonEmptyEntryCount;
1181 unsigned i = rep->existingHash();
1182 unsigned k = 0;
1183 unsigned entryIndex;
1184 while (1) {
1185 entryIndex = m_propertyTable->entryIndices[i & m_propertyTable->sizeMask];
1186 ASSERT(entryIndex != emptyEntryIndex);
1187 if (rep == m_propertyTable->entries()[entryIndex - 1].key)
1188 break;
1189 if (k == 0)
1190 k = 1 | doubleHash(rep->existingHash());
1191 i += k;
1192 }
1193 ASSERT(entryIndex == c + 1);
1194 }
1195
1196 ASSERT(nonEmptyEntryCount == m_propertyTable->keyCount);
1197 }
1198
1199 #endif // DO_PROPERTYMAP_CONSTENCY_CHECK
1200
1201 } // namespace JSC