blob: f56877dbbdda7f0cdfbbee3ec7ef0f6b94459e7f [file] [log] [blame]
weinig@apple.com3412bb42008-09-01 21:22:54 +00001/*
fpizlo@apple.com31be38f2013-02-16 05:31:00 +00002 * Copyright (C) 2008, 2009, 2012, 2013 Apple Inc. All rights reserved.
weinig@apple.com3412bb42008-09-01 21:22:54 +00003 *
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
darin@apple.coma9778f92008-11-16 04:40:06 +000026#ifndef Structure_h
27#define Structure_h
weinig@apple.com3412bb42008-09-01 21:22:54 +000028
barraclough@apple.comdfe18a52011-10-15 01:25:53 +000029#include "ClassInfo.h"
fpizlo@apple.comd8dd0532012-09-13 04:18:52 +000030#include "IndexingType.h"
mhahnenberg@apple.comc1bc9d32013-01-24 21:39:55 +000031#include "JSCJSValue.h"
oliver@apple.comed66e772011-04-05 01:33:58 +000032#include "JSCell.h"
mjs@apple.com4fab8112008-09-10 08:42:43 +000033#include "JSType.h"
barraclough@apple.com38d3c752012-05-12 00:39:43 +000034#include "PropertyName.h"
ggaren@apple.coma850b062009-10-09 18:14:08 +000035#include "PropertyNameArray.h"
akling@apple.com85b26822013-03-06 12:52:16 +000036#include "PropertyOffset.h"
ggaren@apple.com5236be22009-10-17 05:52:20 +000037#include "Protect.h"
mhahnenberg@apple.comdc3d1482013-02-01 23:10:49 +000038#include "StructureRareData.h"
darin@apple.coma9778f92008-11-16 04:40:06 +000039#include "StructureTransitionTable.h"
hausmann@webkit.orgf580f322009-09-09 14:56:12 +000040#include "JSTypeInfo.h"
fpizlo@apple.com04e41152012-06-15 22:14:53 +000041#include "Watchpoint.h"
ggaren@apple.comf03cbce2011-04-10 02:32:07 +000042#include "Weak.h"
weinig@apple.com3412bb42008-09-01 21:22:54 +000043#include <wtf/PassRefPtr.h>
44#include <wtf/RefCounted.h>
benjamin@webkit.orgcff06e42012-08-30 21:23:51 +000045#include <wtf/text/StringImpl.h>
weinig@apple.com3412bb42008-09-01 21:22:54 +000046
weinig@apple.comc13fb9f2008-10-31 00:12:50 +000047
cwzwarich@webkit.org3f782f62008-09-08 01:28:33 +000048namespace JSC {
weinig@apple.com3412bb42008-09-01 21:22:54 +000049
fpizlo@apple.com34cee202013-02-16 20:07:05 +000050class LLIntOffsetsExtractor;
51class PropertyNameArray;
52class PropertyNameArrayData;
akling@apple.com85b26822013-03-06 12:52:16 +000053class PropertyTable;
fpizlo@apple.com34cee202013-02-16 20:07:05 +000054class StructureChain;
55class SlotVisitor;
56class JSString;
weinig@apple.com3412bb42008-09-01 21:22:54 +000057
fpizlo@apple.com34cee202013-02-16 20:07:05 +000058// The out-of-line property storage capacity to use when first allocating out-of-line
59// storage. Note that all objects start out without having any out-of-line storage;
60// this comes into play only on the first property store that exhausts inline storage.
61static const unsigned initialOutOfLineCapacity = 4;
fpizlo@apple.com1ffdcff2012-07-19 00:30:34 +000062
fpizlo@apple.com34cee202013-02-16 20:07:05 +000063// The factor by which to grow out-of-line storage when it is exhausted, after the
64// initial allocation.
65static const unsigned outOfLineGrowthFactor = 2;
fpizlo@apple.com1ffdcff2012-07-19 00:30:34 +000066
fpizlo@apple.com34cee202013-02-16 20:07:05 +000067class Structure : public JSCell {
68public:
69 friend class StructureTransitionTable;
commit-queue@webkit.org6c25c522011-08-09 20:46:17 +000070
fpizlo@apple.com34cee202013-02-16 20:07:05 +000071 typedef JSCell Base;
commit-queue@webkit.org6c25c522011-08-09 20:46:17 +000072
fpizlo@apple.com34cee202013-02-16 20:07:05 +000073 static Structure* create(JSGlobalData&, JSGlobalObject*, JSValue prototype, const TypeInfo&, const ClassInfo*, IndexingType = NonArray, unsigned inlineCapacity = 0);
weinig@apple.com22294302008-09-09 06:55:39 +000074
fpizlo@apple.com34cee202013-02-16 20:07:05 +000075protected:
76 void finishCreation(JSGlobalData& globalData)
mhahnenberg@apple.comb44a7f02012-07-26 23:27:53 +000077 {
fpizlo@apple.com34cee202013-02-16 20:07:05 +000078 Base::finishCreation(globalData);
79 ASSERT(m_prototype);
80 ASSERT(m_prototype.isObject() || m_prototype.isNull());
mhahnenberg@apple.comb44a7f02012-07-26 23:27:53 +000081 }
fpizlo@apple.com34cee202013-02-16 20:07:05 +000082
83 void finishCreation(JSGlobalData& globalData, CreatingEarlyCellTag)
mhahnenberg@apple.comb44a7f02012-07-26 23:27:53 +000084 {
fpizlo@apple.com34cee202013-02-16 20:07:05 +000085 Base::finishCreation(globalData, this, CreatingEarlyCell);
86 ASSERT(m_prototype);
87 ASSERT(m_prototype.isNull());
mhahnenberg@apple.comb44a7f02012-07-26 23:27:53 +000088 ASSERT(!globalData.structureStructure);
mhahnenberg@apple.comb44a7f02012-07-26 23:27:53 +000089 }
90
fpizlo@apple.com34cee202013-02-16 20:07:05 +000091public:
92 static void dumpStatistics();
93
94 JS_EXPORT_PRIVATE static Structure* addPropertyTransition(JSGlobalData&, Structure*, PropertyName, unsigned attributes, JSCell* specificValue, PropertyOffset&);
95 JS_EXPORT_PRIVATE static Structure* addPropertyTransitionToExistingStructure(Structure*, PropertyName, unsigned attributes, JSCell* specificValue, PropertyOffset&);
96 static Structure* removePropertyTransition(JSGlobalData&, Structure*, PropertyName, PropertyOffset&);
97 JS_EXPORT_PRIVATE static Structure* changePrototypeTransition(JSGlobalData&, Structure*, JSValue prototype);
98 JS_EXPORT_PRIVATE static Structure* despecifyFunctionTransition(JSGlobalData&, Structure*, PropertyName);
99 static Structure* attributeChangeTransition(JSGlobalData&, Structure*, PropertyName, unsigned attributes);
100 static Structure* toCacheableDictionaryTransition(JSGlobalData&, Structure*);
101 static Structure* toUncacheableDictionaryTransition(JSGlobalData&, Structure*);
102 static Structure* sealTransition(JSGlobalData&, Structure*);
103 static Structure* freezeTransition(JSGlobalData&, Structure*);
104 static Structure* preventExtensionsTransition(JSGlobalData&, Structure*);
105 static Structure* nonPropertyTransition(JSGlobalData&, Structure*, NonPropertyTransition);
106
107 bool isSealed(JSGlobalData&);
108 bool isFrozen(JSGlobalData&);
109 bool isExtensible() const { return !m_preventExtensions; }
110 bool didTransition() const { return m_didTransition; }
akling@apple.com85b26822013-03-06 12:52:16 +0000111 bool putWillGrowOutOfLineStorage();
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000112 JS_EXPORT_PRIVATE size_t suggestedNewOutOfLineStorageCapacity();
fpizlo@apple.com74d43ae2011-09-17 23:33:01 +0000113
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000114 Structure* flattenDictionaryStructure(JSGlobalData&, JSObject*);
115
116 static const bool needsDestruction = true;
117 static const bool hasImmortalStructure = true;
118 static void destroy(JSCell*);
119
120 // These should be used with caution.
121 JS_EXPORT_PRIVATE PropertyOffset addPropertyWithoutTransition(JSGlobalData&, PropertyName, unsigned attributes, JSCell* specificValue);
122 PropertyOffset removePropertyWithoutTransition(JSGlobalData&, PropertyName);
123 void setPrototypeWithoutTransition(JSGlobalData& globalData, JSValue prototype) { m_prototype.set(globalData, this, prototype); }
124
125 bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; }
126 bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; }
127
128 bool propertyAccessesAreCacheable() { return m_dictionaryKind != UncachedDictionaryKind && !typeInfo().prohibitsPropertyCaching(); }
129
130 // Type accessors.
131 const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; }
132 bool isObject() const { return typeInfo().isObject(); }
133
134 IndexingType indexingType() const { return m_indexingType & AllArrayTypes; }
135 IndexingType indexingTypeIncludingHistory() const { return m_indexingType; }
136
137 bool mayInterceptIndexedAccesses() const
mhahnenberg@apple.com9f04ed42013-02-02 03:57:42 +0000138 {
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000139 return !!(indexingTypeIncludingHistory() & MayHaveIndexedAccessors);
140 }
141
142 bool anyObjectInChainMayInterceptIndexedAccesses() const;
143
144 bool needsSlowPutIndexing() const;
145 NonPropertyTransition suggestedArrayStorageTransition() const;
146
147 JSGlobalObject* globalObject() const { return m_globalObject.get(); }
148 void setGlobalObject(JSGlobalData& globalData, JSGlobalObject* globalObject) { m_globalObject.set(globalData, this, globalObject); }
149
150 JSValue storedPrototype() const { return m_prototype.get(); }
151 JSValue prototypeForLookup(ExecState*) const;
152 JSValue prototypeForLookup(JSGlobalObject*) const;
153 JSValue prototypeForLookup(CodeBlock*) const;
154 StructureChain* prototypeChain(JSGlobalData&, JSGlobalObject*) const;
155 StructureChain* prototypeChain(ExecState*) const;
156 static void visitChildren(JSCell*, SlotVisitor&);
157
158 // Will just the prototype chain intercept this property access?
159 bool prototypeChainMayInterceptStoreTo(JSGlobalData&, PropertyName);
160
161 bool transitionDidInvolveSpecificValue() const { return !!m_specificValueInPrevious; }
162
163 Structure* previousID() const
164 {
165 ASSERT(structure()->classInfo() == &s_info);
166 if (typeInfo().structureHasRareData())
167 return rareData()->previousID();
168 return previous();
169 }
170 bool transitivelyTransitionedFrom(Structure* structureToFind);
171
172 unsigned outOfLineCapacity() const
173 {
174 ASSERT(checkOffsetConsistency());
175
176 unsigned outOfLineSize = this->outOfLineSize();
177
178 if (!outOfLineSize)
179 return 0;
180
181 if (outOfLineSize <= initialOutOfLineCapacity)
182 return initialOutOfLineCapacity;
183
184 ASSERT(outOfLineSize > initialOutOfLineCapacity);
185 COMPILE_ASSERT(outOfLineGrowthFactor == 2, outOfLineGrowthFactor_is_two);
186 return WTF::roundUpToPowerOfTwo(outOfLineSize);
187 }
188 unsigned outOfLineSize() const
189 {
190 ASSERT(checkOffsetConsistency());
191 ASSERT(structure()->classInfo() == &s_info);
192
193 return numberOfOutOfLineSlotsForLastOffset(m_offset);
194 }
195 bool hasInlineStorage() const
196 {
197 return !!m_inlineCapacity;
198 }
199 unsigned inlineCapacity() const
200 {
201 return m_inlineCapacity;
202 }
203 unsigned inlineSize() const
204 {
205 return std::min<unsigned>(m_offset + 1, m_inlineCapacity);
206 }
207 unsigned totalStorageSize() const
208 {
209 return numberOfSlotsForLastOffset(m_offset, m_inlineCapacity);
210 }
211 unsigned totalStorageCapacity() const
212 {
213 ASSERT(structure()->classInfo() == &s_info);
214 return outOfLineCapacity() + inlineCapacity();
mhahnenberg@apple.com9f04ed42013-02-02 03:57:42 +0000215 }
216
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000217 PropertyOffset firstValidOffset() const
218 {
219 if (hasInlineStorage())
220 return 0;
221 return firstOutOfLineOffset;
222 }
223 PropertyOffset lastValidOffset() const
224 {
225 return m_offset;
226 }
227 bool isValidOffset(PropertyOffset offset) const
228 {
229 return offset >= firstValidOffset()
230 && offset <= lastValidOffset();
231 }
232
233 bool masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject);
234
235 PropertyOffset get(JSGlobalData&, PropertyName);
236 PropertyOffset get(JSGlobalData&, const WTF::String& name);
237 JS_EXPORT_PRIVATE PropertyOffset get(JSGlobalData&, PropertyName, unsigned& attributes, JSCell*& specificValue);
238
239 bool hasGetterSetterProperties() const { return m_hasGetterSetterProperties; }
240 bool hasReadOnlyOrGetterSetterPropertiesExcludingProto() const { return m_hasReadOnlyOrGetterSetterPropertiesExcludingProto; }
241 void setHasGetterSetterProperties(bool is__proto__)
242 {
243 m_hasGetterSetterProperties = true;
244 if (!is__proto__)
245 m_hasReadOnlyOrGetterSetterPropertiesExcludingProto = true;
246 }
247 void setContainsReadOnlyProperties()
248 {
249 m_hasReadOnlyOrGetterSetterPropertiesExcludingProto = true;
250 }
251
252 bool hasNonEnumerableProperties() const { return m_hasNonEnumerableProperties; }
253
254 bool isEmpty() const
255 {
256 ASSERT(checkOffsetConsistency());
257 return !JSC::isValidOffset(m_offset);
258 }
259
260 JS_EXPORT_PRIVATE void despecifyDictionaryFunction(JSGlobalData&, PropertyName);
261 void disableSpecificFunctionTracking() { m_specificFunctionThrashCount = maxSpecificFunctionThrashCount; }
262
263 void setEnumerationCache(JSGlobalData&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h.
264 JSPropertyNameIterator* enumerationCache(); // Defined in JSPropertyNameIterator.h.
265 void getPropertyNamesFromStructure(JSGlobalData&, PropertyNameArray&, EnumerationMode);
266
267 JSString* objectToStringValue()
mhahnenberg@apple.com9f04ed42013-02-02 03:57:42 +0000268 {
269 if (!typeInfo().structureHasRareData())
270 return 0;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000271 return rareData()->objectToStringValue();
mhahnenberg@apple.com9f04ed42013-02-02 03:57:42 +0000272 }
273
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000274 void setObjectToStringValue(JSGlobalData& globalData, const JSCell* owner, JSString* value)
275 {
276 if (!typeInfo().structureHasRareData())
277 allocateRareData(globalData);
278 rareData()->setObjectToStringValue(globalData, owner, value);
279 }
280
281 bool staticFunctionsReified()
282 {
283 return m_staticFunctionReified;
284 }
285
286 void setStaticFunctionsReified()
287 {
288 m_staticFunctionReified = true;
289 }
290
291 const ClassInfo* classInfo() const { return m_classInfo; }
292
293 static ptrdiff_t prototypeOffset()
294 {
295 return OBJECT_OFFSETOF(Structure, m_prototype);
296 }
297
298 static ptrdiff_t globalObjectOffset()
299 {
300 return OBJECT_OFFSETOF(Structure, m_globalObject);
301 }
302
303 static ptrdiff_t typeInfoFlagsOffset()
304 {
305 return OBJECT_OFFSETOF(Structure, m_typeInfo) + TypeInfo::flagsOffset();
306 }
307
308 static ptrdiff_t typeInfoTypeOffset()
309 {
310 return OBJECT_OFFSETOF(Structure, m_typeInfo) + TypeInfo::typeOffset();
311 }
312
313 static ptrdiff_t classInfoOffset()
314 {
315 return OBJECT_OFFSETOF(Structure, m_classInfo);
316 }
317
318 static ptrdiff_t indexingTypeOffset()
319 {
320 return OBJECT_OFFSETOF(Structure, m_indexingType);
321 }
322
323 static Structure* createStructure(JSGlobalData&);
324
325 bool transitionWatchpointSetHasBeenInvalidated() const
326 {
327 return m_transitionWatchpointSet.hasBeenInvalidated();
328 }
329
330 bool transitionWatchpointSetIsStillValid() const
331 {
332 return m_transitionWatchpointSet.isStillValid();
333 }
334
335 void addTransitionWatchpoint(Watchpoint* watchpoint) const
336 {
337 ASSERT(transitionWatchpointSetIsStillValid());
338 m_transitionWatchpointSet.add(watchpoint);
339 }
340
341 void notifyTransitionFromThisStructure() const
342 {
343 m_transitionWatchpointSet.notifyWrite();
344 }
345
346 static JS_EXPORTDATA const ClassInfo s_info;
347
348private:
349 friend class LLIntOffsetsExtractor;
350
351 JS_EXPORT_PRIVATE Structure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const TypeInfo&, const ClassInfo*, IndexingType, unsigned inlineCapacity);
352 Structure(JSGlobalData&);
353 Structure(JSGlobalData&, const Structure*);
354
355 static Structure* create(JSGlobalData&, const Structure*);
356
357 typedef enum {
358 NoneDictionaryKind = 0,
359 CachedDictionaryKind = 1,
360 UncachedDictionaryKind = 2
361 } DictionaryKind;
362 static Structure* toDictionaryTransition(JSGlobalData&, Structure*, DictionaryKind);
363
364 PropertyOffset putSpecificValue(JSGlobalData&, PropertyName, unsigned attributes, JSCell* specificValue);
365 PropertyOffset remove(PropertyName);
366
akling@apple.com85b26822013-03-06 12:52:16 +0000367 void createPropertyMap(JSGlobalData&, unsigned keyCount = 0);
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000368 void checkConsistency();
369
370 bool despecifyFunction(JSGlobalData&, PropertyName);
371 void despecifyAllFunctions(JSGlobalData&);
372
akling@apple.com85b26822013-03-06 12:52:16 +0000373 WriteBarrier<PropertyTable>& propertyTable();
374 PropertyTable* takePropertyTableOrCloneIfPinned(JSGlobalData&, Structure* owner);
375 PropertyTable* copyPropertyTable(JSGlobalData&, Structure* owner);
376 PropertyTable* copyPropertyTableForPinning(JSGlobalData&, Structure* owner);
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000377 JS_EXPORT_PRIVATE void materializePropertyMap(JSGlobalData&);
378 void materializePropertyMapIfNecessary(JSGlobalData& globalData)
379 {
380 ASSERT(structure()->classInfo() == &s_info);
381 ASSERT(checkOffsetConsistency());
akling@apple.com85b26822013-03-06 12:52:16 +0000382 if (!propertyTable() && previousID())
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000383 materializePropertyMap(globalData);
384 }
385 void materializePropertyMapIfNecessaryForPinning(JSGlobalData& globalData)
386 {
387 ASSERT(structure()->classInfo() == &s_info);
388 checkOffsetConsistency();
akling@apple.com85b26822013-03-06 12:52:16 +0000389 if (!propertyTable())
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000390 materializePropertyMap(globalData);
391 }
392
393 void setPreviousID(JSGlobalData& globalData, Structure* transition, Structure* structure)
394 {
395 if (typeInfo().structureHasRareData())
396 rareData()->setPreviousID(globalData, transition, structure);
397 else
398 m_previousOrRareData.set(globalData, transition, structure);
399 }
400
401 void clearPreviousID()
402 {
403 if (typeInfo().structureHasRareData())
404 rareData()->clearPreviousID();
405 else
406 m_previousOrRareData.clear();
407 }
408
409 int transitionCount() const
410 {
411 // Since the number of transitions is always the same as m_offset, we keep the size of Structure down by not storing both.
412 return numberOfSlotsForLastOffset(m_offset, m_inlineCapacity);
413 }
414
415 bool isValid(JSGlobalObject*, StructureChain* cachedPrototypeChain) const;
416 bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const;
417
418 void pin();
419
420 Structure* previous() const
421 {
422 ASSERT(!typeInfo().structureHasRareData());
423 return static_cast<Structure*>(m_previousOrRareData.get());
424 }
425
426 StructureRareData* rareData() const
427 {
428 ASSERT(typeInfo().structureHasRareData());
429 return static_cast<StructureRareData*>(m_previousOrRareData.get());
430 }
431
akling@apple.com85b26822013-03-06 12:52:16 +0000432 bool checkOffsetConsistency() const;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000433
434 void allocateRareData(JSGlobalData&);
435 void cloneRareDataFrom(JSGlobalData&, const Structure*);
436
437 static const int s_maxTransitionLength = 64;
438
439 static const unsigned maxSpecificFunctionThrashCount = 3;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000440
441 WriteBarrier<JSGlobalObject> m_globalObject;
442 WriteBarrier<Unknown> m_prototype;
443 mutable WriteBarrier<StructureChain> m_cachedPrototypeChain;
444
445 WriteBarrier<JSCell> m_previousOrRareData;
446
447 RefPtr<StringImpl> m_nameInPrevious;
448 WriteBarrier<JSCell> m_specificValueInPrevious;
449
450 const ClassInfo* m_classInfo;
451
452 StructureTransitionTable m_transitionTable;
453
akling@apple.com85b26822013-03-06 12:52:16 +0000454 // Should be accessed through propertyTable(). During GC, it may be set to 0 by another thread.
455 WriteBarrier<PropertyTable> m_propertyTableUnsafe;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000456
457 mutable InlineWatchpointSet m_transitionWatchpointSet;
458
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000459 COMPILE_ASSERT(firstOutOfLineOffset < 256, firstOutOfLineOffset_fits);
460
461 // m_offset does not account for anonymous slots
462 PropertyOffset m_offset;
463
akling@apple.comb76b00b2013-03-06 19:43:24 +0000464 TypeInfo m_typeInfo;
465 IndexingType m_indexingType;
466
467 uint8_t m_inlineCapacity;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000468 unsigned m_dictionaryKind : 2;
469 bool m_isPinnedPropertyTable : 1;
470 bool m_hasGetterSetterProperties : 1;
471 bool m_hasReadOnlyOrGetterSetterPropertiesExcludingProto : 1;
472 bool m_hasNonEnumerableProperties : 1;
akling@apple.comb76b00b2013-03-06 19:43:24 +0000473 unsigned m_attributesInPrevious : 14;
fpizlo@apple.com34cee202013-02-16 20:07:05 +0000474 unsigned m_specificFunctionThrashCount : 2;
475 unsigned m_preventExtensions : 1;
476 unsigned m_didTransition : 1;
477 unsigned m_staticFunctionReified;
478};
479
cwzwarich@webkit.org3f782f62008-09-08 01:28:33 +0000480} // namespace JSC
weinig@apple.com3412bb42008-09-01 21:22:54 +0000481
darin@apple.coma9778f92008-11-16 04:40:06 +0000482#endif // Structure_h