weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 1 | /* |
oliver@apple.com | 5fca29f | 2009-08-11 04:35:02 +0000 | [diff] [blame] | 2 | * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 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 | |
darin@apple.com | a9778f9 | 2008-11-16 04:40:06 +0000 | [diff] [blame] | 26 | #ifndef Structure_h |
| 27 | #define Structure_h |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 28 | |
barraclough@apple.com | dfe18a5 | 2011-10-15 01:25:53 +0000 | [diff] [blame] | 29 | #include "ClassInfo.h" |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 30 | #include "JSCell.h" |
mjs@apple.com | 4fab811 | 2008-09-10 08:42:43 +0000 | [diff] [blame] | 31 | #include "JSType.h" |
weinig@apple.com | 2229430 | 2008-09-09 06:55:39 +0000 | [diff] [blame] | 32 | #include "JSValue.h" |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 33 | #include "PropertyMapHashTable.h" |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 34 | #include "PropertyName.h" |
ggaren@apple.com | a850b06 | 2009-10-09 18:14:08 +0000 | [diff] [blame] | 35 | #include "PropertyNameArray.h" |
ggaren@apple.com | 5236be2 | 2009-10-17 05:52:20 +0000 | [diff] [blame] | 36 | #include "Protect.h" |
darin@apple.com | a9778f9 | 2008-11-16 04:40:06 +0000 | [diff] [blame] | 37 | #include "StructureTransitionTable.h" |
hausmann@webkit.org | f580f32 | 2009-09-09 14:56:12 +0000 | [diff] [blame] | 38 | #include "JSTypeInfo.h" |
cwzwarich@webkit.org | 0b51a73 | 2008-11-05 23:21:32 +0000 | [diff] [blame] | 39 | #include "UString.h" |
ggaren@apple.com | f03cbce | 2011-04-10 02:32:07 +0000 | [diff] [blame] | 40 | #include "Weak.h" |
levin@chromium.org | ca509e8 | 2011-04-25 21:48:58 +0000 | [diff] [blame] | 41 | #include <wtf/PassOwnPtr.h> |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 42 | #include <wtf/PassRefPtr.h> |
| 43 | #include <wtf/RefCounted.h> |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 44 | |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 45 | |
cwzwarich@webkit.org | 3f782f6 | 2008-09-08 01:28:33 +0000 | [diff] [blame] | 46 | namespace JSC { |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 47 | |
fpizlo@apple.com | 7bbcaab | 2012-02-22 05:23:19 +0000 | [diff] [blame] | 48 | class LLIntOffsetsExtractor; |
weinig@apple.com | 503d999 | 2008-09-15 07:27:14 +0000 | [diff] [blame] | 49 | class PropertyNameArray; |
weinig@apple.com | 18b17a6 | 2008-09-20 04:35:33 +0000 | [diff] [blame] | 50 | class PropertyNameArrayData; |
oliver@apple.com | 5914421 | 2011-04-04 18:41:15 +0000 | [diff] [blame] | 51 | class StructureChain; |
ggaren@apple.com | 6e1f8c1 | 2011-06-16 22:01:43 +0000 | [diff] [blame] | 52 | class SlotVisitor; |
msaboff@apple.com | 8bbd1b1 | 2012-04-25 00:58:17 +0000 | [diff] [blame] | 53 | class JSString; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 54 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 55 | class Structure : public JSCell { |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 56 | public: |
oliver@apple.com | d32bf7a | 2009-09-10 20:01:57 +0000 | [diff] [blame] | 57 | friend class StructureTransitionTable; |
commit-queue@webkit.org | 6c25c52 | 2011-08-09 20:46:17 +0000 | [diff] [blame] | 58 | |
| 59 | typedef JSCell Base; |
| 60 | |
oliver@apple.com | 8c798d2 | 2011-09-11 21:11:11 +0000 | [diff] [blame] | 61 | static Structure* create(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype, const TypeInfo& typeInfo, const ClassInfo* classInfo) |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 62 | { |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 63 | ASSERT(globalData.structureStructure); |
oliver@apple.com | 23ce68f | 2011-04-25 21:21:28 +0000 | [diff] [blame] | 64 | ASSERT(classInfo); |
ggaren@apple.com | 215589e | 2011-12-19 17:45:13 +0000 | [diff] [blame] | 65 | Structure* structure = new (NotNull, allocateCell<Structure>(globalData.heap)) Structure(globalData, globalObject, prototype, typeInfo, classInfo); |
commit-queue@webkit.org | 403bfdf | 2011-08-26 22:32:53 +0000 | [diff] [blame] | 66 | structure->finishCreation(globalData); |
| 67 | return structure; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 68 | } |
weinig@apple.com | 2229430 | 2008-09-09 06:55:39 +0000 | [diff] [blame] | 69 | |
commit-queue@webkit.org | 403bfdf | 2011-08-26 22:32:53 +0000 | [diff] [blame] | 70 | protected: |
| 71 | void finishCreation(JSGlobalData& globalData) |
| 72 | { |
| 73 | Base::finishCreation(globalData); |
| 74 | ASSERT(m_prototype); |
| 75 | ASSERT(m_prototype.isObject() || m_prototype.isNull()); |
| 76 | } |
| 77 | |
| 78 | void finishCreation(JSGlobalData& globalData, CreatingEarlyCellTag) |
| 79 | { |
| 80 | Base::finishCreation(globalData, this, CreatingEarlyCell); |
| 81 | ASSERT(m_prototype); |
| 82 | ASSERT(m_prototype.isNull()); |
| 83 | ASSERT(!globalData.structureStructure); |
| 84 | } |
| 85 | |
| 86 | public: |
weinig@apple.com | 7b21967 | 2008-10-16 05:31:41 +0000 | [diff] [blame] | 87 | static void dumpStatistics(); |
weinig@apple.com | 7b21967 | 2008-10-16 05:31:41 +0000 | [diff] [blame] | 88 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 89 | JS_EXPORT_PRIVATE static Structure* addPropertyTransition(JSGlobalData&, Structure*, PropertyName, unsigned attributes, JSCell* specificValue, size_t& offset); |
| 90 | JS_EXPORT_PRIVATE static Structure* addPropertyTransitionToExistingStructure(Structure*, PropertyName, unsigned attributes, JSCell* specificValue, size_t& offset); |
| 91 | static Structure* removePropertyTransition(JSGlobalData&, Structure*, PropertyName, size_t& offset); |
morrita@google.com | f0dd2d9 | 2012-01-13 07:23:44 +0000 | [diff] [blame] | 92 | JS_EXPORT_PRIVATE static Structure* changePrototypeTransition(JSGlobalData&, Structure*, JSValue prototype); |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 93 | JS_EXPORT_PRIVATE static Structure* despecifyFunctionTransition(JSGlobalData&, Structure*, PropertyName); |
| 94 | static Structure* attributeChangeTransition(JSGlobalData&, Structure*, PropertyName, unsigned attributes); |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 95 | static Structure* toCacheableDictionaryTransition(JSGlobalData&, Structure*); |
| 96 | static Structure* toUncacheableDictionaryTransition(JSGlobalData&, Structure*); |
| 97 | static Structure* sealTransition(JSGlobalData&, Structure*); |
| 98 | static Structure* freezeTransition(JSGlobalData&, Structure*); |
| 99 | static Structure* preventExtensionsTransition(JSGlobalData&, Structure*); |
barraclough@apple.com | dd99310 | 2011-03-04 22:34:48 +0000 | [diff] [blame] | 100 | |
oliver@apple.com | af134a7 | 2011-04-13 18:48:22 +0000 | [diff] [blame] | 101 | bool isSealed(JSGlobalData&); |
| 102 | bool isFrozen(JSGlobalData&); |
barraclough@apple.com | dd99310 | 2011-03-04 22:34:48 +0000 | [diff] [blame] | 103 | bool isExtensible() const { return !m_preventExtensions; } |
ggaren@apple.com | 21daf64 | 2011-04-26 06:23:14 +0000 | [diff] [blame] | 104 | bool didTransition() const { return m_didTransition; } |
mhahnenberg@apple.com | 921c823 | 2012-05-16 21:21:44 +0000 | [diff] [blame] | 105 | bool shouldGrowPropertyStorage() { return propertyStorageCapacity() == propertyStorageSize(); } |
| 106 | JS_EXPORT_PRIVATE size_t suggestedNewPropertyStorageSize(); |
oliver@apple.com | bd8e770 | 2009-11-10 02:19:04 +0000 | [diff] [blame] | 107 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 108 | Structure* flattenDictionaryStructure(JSGlobalData&, JSObject*); |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 109 | |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 110 | static void destroy(JSCell*); |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 111 | |
weinig@apple.com | 5677e04 | 2008-10-20 21:27:44 +0000 | [diff] [blame] | 112 | // These should be used with caution. |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 113 | JS_EXPORT_PRIVATE size_t addPropertyWithoutTransition(JSGlobalData&, PropertyName, unsigned attributes, JSCell* specificValue); |
| 114 | size_t removePropertyWithoutTransition(JSGlobalData&, PropertyName); |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 115 | void setPrototypeWithoutTransition(JSGlobalData& globalData, JSValue prototype) { m_prototype.set(globalData, this, prototype); } |
oliver@apple.com | ae86589 | 2009-09-21 15:45:13 +0000 | [diff] [blame] | 116 | |
| 117 | bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; } |
| 118 | bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; } |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 119 | |
weinig@apple.com | 58576b2 | 2011-09-16 21:34:20 +0000 | [diff] [blame] | 120 | // Type accessors. |
jberlin@webkit.org | 3d6b468 | 2011-05-03 15:41:28 +0000 | [diff] [blame] | 121 | const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; } |
weinig@apple.com | 58576b2 | 2011-09-16 21:34:20 +0000 | [diff] [blame] | 122 | bool isObject() const { return typeInfo().isObject(); } |
| 123 | |
cwzwarich@webkit.org | bbdd8fb | 2008-09-13 04:57:35 +0000 | [diff] [blame] | 124 | |
oliver@apple.com | 2346a3e | 2011-09-07 19:40:41 +0000 | [diff] [blame] | 125 | JSGlobalObject* globalObject() const { return m_globalObject.get(); } |
oliver@apple.com | ee1bdc8 | 2011-09-06 21:51:00 +0000 | [diff] [blame] | 126 | void setGlobalObject(JSGlobalData& globalData, JSGlobalObject* globalObject) { m_globalObject.set(globalData, this, globalObject); } |
| 127 | |
oliver@apple.com | 168e506 | 2011-01-31 20:07:21 +0000 | [diff] [blame] | 128 | JSValue storedPrototype() const { return m_prototype.get(); } |
ggaren@apple.com | dc067b6 | 2009-05-01 22:43:39 +0000 | [diff] [blame] | 129 | JSValue prototypeForLookup(ExecState*) const; |
fpizlo@apple.com | fd598b9 | 2012-06-08 01:31:21 +0000 | [diff] [blame] | 130 | JSValue prototypeForLookup(JSGlobalObject*) const; |
| 131 | JSValue prototypeForLookup(CodeBlock*) const; |
ggaren@apple.com | c8bc3c8 | 2009-02-25 23:44:07 +0000 | [diff] [blame] | 132 | StructureChain* prototypeChain(ExecState*) const; |
mhahnenberg@apple.com | 982c9ea | 2011-09-23 19:40:09 +0000 | [diff] [blame] | 133 | static void visitChildren(JSCell*, SlotVisitor&); |
oliver@apple.com | e3c5d0e | 2008-09-14 08:18:49 +0000 | [diff] [blame] | 134 | |
jberlin@webkit.org | 3d6b468 | 2011-05-03 15:41:28 +0000 | [diff] [blame] | 135 | Structure* previousID() const { ASSERT(structure()->classInfo() == &s_info); return m_previous.get(); } |
fpizlo@apple.com | 74d43ae | 2011-09-17 23:33:01 +0000 | [diff] [blame] | 136 | bool transitivelyTransitionedFrom(Structure* structureToFind); |
oliver@apple.com | e3c5d0e | 2008-09-14 08:18:49 +0000 | [diff] [blame] | 137 | |
weinig@apple.com | 7aa171a | 2008-10-07 20:49:36 +0000 | [diff] [blame] | 138 | void growPropertyStorageCapacity(); |
jberlin@webkit.org | 3d6b468 | 2011-05-03 15:41:28 +0000 | [diff] [blame] | 139 | unsigned propertyStorageCapacity() const { ASSERT(structure()->classInfo() == &s_info); return m_propertyStorageCapacity; } |
oliver@apple.com | 8c798d2 | 2011-09-11 21:11:11 +0000 | [diff] [blame] | 140 | unsigned propertyStorageSize() const { ASSERT(structure()->classInfo() == &s_info); return (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); } |
mjs@apple.com | 9355370 | 2009-05-09 08:35:57 +0000 | [diff] [blame] | 141 | bool isUsingInlineStorage() const; |
weinig@apple.com | a3b7bbb | 2008-10-30 02:44:46 +0000 | [diff] [blame] | 142 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 143 | size_t get(JSGlobalData&, PropertyName); |
barraclough@apple.com | 5d959c7 | 2011-08-07 03:44:45 +0000 | [diff] [blame] | 144 | size_t get(JSGlobalData&, const UString& name); |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 145 | JS_EXPORT_PRIVATE size_t get(JSGlobalData&, PropertyName, unsigned& attributes, JSCell*& specificValue); |
barraclough@apple.com | 0717324 | 2009-05-23 01:48:32 +0000 | [diff] [blame] | 146 | |
weinig@apple.com | 35ba29b | 2008-10-07 23:49:59 +0000 | [diff] [blame] | 147 | bool hasGetterSetterProperties() const { return m_hasGetterSetterProperties; } |
barraclough@apple.com | 2668db9 | 2012-02-22 23:46:48 +0000 | [diff] [blame] | 148 | bool hasReadOnlyOrGetterSetterPropertiesExcludingProto() const { return m_hasReadOnlyOrGetterSetterPropertiesExcludingProto; } |
barraclough@apple.com | 4f5c0c0 | 2012-02-20 21:14:48 +0000 | [diff] [blame] | 149 | void setHasGetterSetterProperties(bool is__proto__) |
| 150 | { |
| 151 | m_hasGetterSetterProperties = true; |
| 152 | if (!is__proto__) |
barraclough@apple.com | 2668db9 | 2012-02-22 23:46:48 +0000 | [diff] [blame] | 153 | m_hasReadOnlyOrGetterSetterPropertiesExcludingProto = true; |
barraclough@apple.com | 7f154b8 | 2012-02-21 06:17:40 +0000 | [diff] [blame] | 154 | } |
| 155 | void setContainsReadOnlyProperties() |
| 156 | { |
barraclough@apple.com | 2668db9 | 2012-02-22 23:46:48 +0000 | [diff] [blame] | 157 | m_hasReadOnlyOrGetterSetterPropertiesExcludingProto = true; |
barraclough@apple.com | 4f5c0c0 | 2012-02-20 21:14:48 +0000 | [diff] [blame] | 158 | } |
weinig@apple.com | 35ba29b | 2008-10-07 23:49:59 +0000 | [diff] [blame] | 159 | |
oliver@apple.com | 0a4803c | 2009-10-29 01:25:02 +0000 | [diff] [blame] | 160 | bool hasNonEnumerableProperties() const { return m_hasNonEnumerableProperties; } |
oliver@apple.com | 0a4803c | 2009-10-29 01:25:02 +0000 | [diff] [blame] | 161 | |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 162 | bool isEmpty() const { return m_propertyTable ? m_propertyTable->isEmpty() : m_offset == noOffset; } |
weinig@apple.com | a3b7bbb | 2008-10-30 02:44:46 +0000 | [diff] [blame] | 163 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 164 | JS_EXPORT_PRIVATE void despecifyDictionaryFunction(JSGlobalData&, PropertyName); |
ggaren@apple.com | d0d58f4 | 2010-01-07 22:07:36 +0000 | [diff] [blame] | 165 | void disableSpecificFunctionTracking() { m_specificFunctionThrashCount = maxSpecificFunctionThrashCount; } |
barraclough@apple.com | 0717324 | 2009-05-23 01:48:32 +0000 | [diff] [blame] | 166 | |
oliver@apple.com | 8d85705 | 2011-02-15 23:54:06 +0000 | [diff] [blame] | 167 | void setEnumerationCache(JSGlobalData&, JSPropertyNameIterator* enumerationCache); // Defined in JSPropertyNameIterator.h. |
ggaren@apple.com | 978e3e81 | 2010-02-12 02:51:35 +0000 | [diff] [blame] | 168 | JSPropertyNameIterator* enumerationCache(); // Defined in JSPropertyNameIterator.h. |
mhahnenberg@apple.com | 2358ae1 | 2011-11-04 01:32:18 +0000 | [diff] [blame] | 169 | void getPropertyNamesFromStructure(JSGlobalData&, PropertyNameArray&, EnumerationMode); |
mrowe@apple.com | 30d5b45 | 2010-01-30 05:30:33 +0000 | [diff] [blame] | 170 | |
msaboff@apple.com | 8bbd1b1 | 2012-04-25 00:58:17 +0000 | [diff] [blame] | 171 | JSString* objectToStringValue() { return m_objectToStringValue.get(); } |
| 172 | |
| 173 | void setObjectToStringValue(JSGlobalData& globalData, const JSCell* owner, JSString* value) |
| 174 | { |
| 175 | m_objectToStringValue.set(globalData, owner, value); |
| 176 | } |
| 177 | |
barraclough@apple.com | dfe18a5 | 2011-10-15 01:25:53 +0000 | [diff] [blame] | 178 | bool staticFunctionsReified() |
| 179 | { |
| 180 | return m_staticFunctionReified; |
| 181 | } |
| 182 | |
| 183 | void setStaticFunctionsReified() |
| 184 | { |
| 185 | m_staticFunctionReified = true; |
| 186 | } |
| 187 | |
barraclough@apple.com | a5540da | 2011-02-19 21:55:44 +0000 | [diff] [blame] | 188 | const ClassInfo* classInfo() const { return m_classInfo; } |
| 189 | |
barraclough@apple.com | 66184e2 | 2011-03-13 21:16:29 +0000 | [diff] [blame] | 190 | static ptrdiff_t prototypeOffset() |
| 191 | { |
| 192 | return OBJECT_OFFSETOF(Structure, m_prototype); |
| 193 | } |
| 194 | |
| 195 | static ptrdiff_t typeInfoFlagsOffset() |
| 196 | { |
| 197 | return OBJECT_OFFSETOF(Structure, m_typeInfo) + TypeInfo::flagsOffset(); |
| 198 | } |
| 199 | |
| 200 | static ptrdiff_t typeInfoTypeOffset() |
| 201 | { |
| 202 | return OBJECT_OFFSETOF(Structure, m_typeInfo) + TypeInfo::typeOffset(); |
| 203 | } |
| 204 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 205 | static Structure* createStructure(JSGlobalData& globalData) |
oliver@apple.com | bb8da91 | 2011-04-14 03:28:23 +0000 | [diff] [blame] | 206 | { |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 207 | ASSERT(!globalData.structureStructure); |
ggaren@apple.com | 215589e | 2011-12-19 17:45:13 +0000 | [diff] [blame] | 208 | Structure* structure = new (NotNull, allocateCell<Structure>(globalData.heap)) Structure(globalData); |
commit-queue@webkit.org | 403bfdf | 2011-08-26 22:32:53 +0000 | [diff] [blame] | 209 | structure->finishCreation(globalData, CreatingEarlyCell); |
| 210 | return structure; |
oliver@apple.com | bb8da91 | 2011-04-14 03:28:23 +0000 | [diff] [blame] | 211 | } |
oliver@apple.com | 4103716 | 2011-05-14 22:10:01 +0000 | [diff] [blame] | 212 | |
| 213 | static JS_EXPORTDATA const ClassInfo s_info; |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 214 | |
| 215 | private: |
fpizlo@apple.com | 7bbcaab | 2012-02-22 05:23:19 +0000 | [diff] [blame] | 216 | friend class LLIntOffsetsExtractor; |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 217 | |
morrita@google.com | f0dd2d9 | 2012-01-13 07:23:44 +0000 | [diff] [blame] | 218 | JS_EXPORT_PRIVATE Structure(JSGlobalData&, JSGlobalObject*, JSValue prototype, const TypeInfo&, const ClassInfo*); |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 219 | Structure(JSGlobalData&); |
| 220 | Structure(JSGlobalData&, const Structure*); |
| 221 | |
| 222 | static Structure* create(JSGlobalData& globalData, const Structure* structure) |
| 223 | { |
| 224 | ASSERT(globalData.structureStructure); |
ggaren@apple.com | 215589e | 2011-12-19 17:45:13 +0000 | [diff] [blame] | 225 | Structure* newStructure = new (NotNull, allocateCell<Structure>(globalData.heap)) Structure(globalData, structure); |
commit-queue@webkit.org | 403bfdf | 2011-08-26 22:32:53 +0000 | [diff] [blame] | 226 | newStructure->finishCreation(globalData); |
| 227 | return newStructure; |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 228 | } |
oliver@apple.com | 23ce68f | 2011-04-25 21:21:28 +0000 | [diff] [blame] | 229 | |
oliver@apple.com | ae86589 | 2009-09-21 15:45:13 +0000 | [diff] [blame] | 230 | typedef enum { |
| 231 | NoneDictionaryKind = 0, |
| 232 | CachedDictionaryKind = 1, |
| 233 | UncachedDictionaryKind = 2 |
| 234 | } DictionaryKind; |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 235 | static Structure* toDictionaryTransition(JSGlobalData&, Structure*, DictionaryKind); |
weinig@apple.com | a3b7bbb | 2008-10-30 02:44:46 +0000 | [diff] [blame] | 236 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 237 | size_t putSpecificValue(JSGlobalData&, PropertyName, unsigned attributes, JSCell* specificValue); |
| 238 | size_t remove(PropertyName); |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 239 | |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 240 | void createPropertyMap(unsigned keyCount = 0); |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 241 | void checkConsistency(); |
| 242 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 243 | bool despecifyFunction(JSGlobalData&, PropertyName); |
oliver@apple.com | af134a7 | 2011-04-13 18:48:22 +0000 | [diff] [blame] | 244 | void despecifyAllFunctions(JSGlobalData&); |
barraclough@apple.com | 0717324 | 2009-05-23 01:48:32 +0000 | [diff] [blame] | 245 | |
levin@chromium.org | ca509e8 | 2011-04-25 21:48:58 +0000 | [diff] [blame] | 246 | PassOwnPtr<PropertyTable> copyPropertyTable(JSGlobalData&, Structure* owner); |
fpizlo@apple.com | 65c4b0d | 2011-10-27 22:19:14 +0000 | [diff] [blame] | 247 | PassOwnPtr<PropertyTable> copyPropertyTableForPinning(JSGlobalData&, Structure* owner); |
morrita@google.com | f0dd2d9 | 2012-01-13 07:23:44 +0000 | [diff] [blame] | 248 | JS_EXPORT_PRIVATE void materializePropertyMap(JSGlobalData&); |
oliver@apple.com | af134a7 | 2011-04-13 18:48:22 +0000 | [diff] [blame] | 249 | void materializePropertyMapIfNecessary(JSGlobalData& globalData) |
weinig@apple.com | 8a86659 | 2008-11-14 23:36:06 +0000 | [diff] [blame] | 250 | { |
jberlin@webkit.org | 3d6b468 | 2011-05-03 15:41:28 +0000 | [diff] [blame] | 251 | ASSERT(structure()->classInfo() == &s_info); |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 252 | if (!m_propertyTable && m_previous) |
oliver@apple.com | af134a7 | 2011-04-13 18:48:22 +0000 | [diff] [blame] | 253 | materializePropertyMap(globalData); |
weinig@apple.com | 8a86659 | 2008-11-14 23:36:06 +0000 | [diff] [blame] | 254 | } |
fpizlo@apple.com | 65c4b0d | 2011-10-27 22:19:14 +0000 | [diff] [blame] | 255 | void materializePropertyMapIfNecessaryForPinning(JSGlobalData& globalData) |
| 256 | { |
| 257 | ASSERT(structure()->classInfo() == &s_info); |
| 258 | if (!m_propertyTable) |
| 259 | materializePropertyMap(globalData); |
| 260 | } |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 261 | |
zherczeg@webkit.org | 3915061 | 2011-10-03 06:49:50 +0000 | [diff] [blame] | 262 | int transitionCount() const |
alice.liu@apple.com | 04456af | 2009-01-05 00:18:53 +0000 | [diff] [blame] | 263 | { |
| 264 | // Since the number of transitions is always the same as m_offset, we keep the size of Structure down by not storing both. |
| 265 | return m_offset == noOffset ? 0 : m_offset + 1; |
| 266 | } |
barraclough@apple.com | 39724b8 | 2010-02-15 22:37:43 +0000 | [diff] [blame] | 267 | |
ggaren@apple.com | c8bc3c8 | 2009-02-25 23:44:07 +0000 | [diff] [blame] | 268 | bool isValid(ExecState*, StructureChain* cachedPrototypeChain) const; |
fpizlo@apple.com | 4f0f1d0 | 2011-10-07 00:47:21 +0000 | [diff] [blame] | 269 | |
| 270 | void pin(); |
alice.liu@apple.com | 04456af | 2009-01-05 00:18:53 +0000 | [diff] [blame] | 271 | |
fpizlo@apple.com | 0134791 | 2011-09-29 20:45:52 +0000 | [diff] [blame] | 272 | static const int s_maxTransitionLength = 64; |
alice.liu@apple.com | 04456af | 2009-01-05 00:18:53 +0000 | [diff] [blame] | 273 | |
fpizlo@apple.com | 0134791 | 2011-09-29 20:45:52 +0000 | [diff] [blame] | 274 | static const int noOffset = -1; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 275 | |
ggaren@apple.com | d0d58f4 | 2010-01-07 22:07:36 +0000 | [diff] [blame] | 276 | static const unsigned maxSpecificFunctionThrashCount = 3; |
| 277 | |
mjs@apple.com | 52b6760 | 2008-09-22 03:15:52 +0000 | [diff] [blame] | 278 | TypeInfo m_typeInfo; |
oliver@apple.com | ee1bdc8 | 2011-09-06 21:51:00 +0000 | [diff] [blame] | 279 | |
| 280 | WriteBarrier<JSGlobalObject> m_globalObject; |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 281 | WriteBarrier<Unknown> m_prototype; |
| 282 | mutable WriteBarrier<StructureChain> m_cachedPrototypeChain; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 283 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 284 | WriteBarrier<Structure> m_previous; |
barraclough@apple.com | ee2085b | 2010-08-11 00:16:38 +0000 | [diff] [blame] | 285 | RefPtr<StringImpl> m_nameInPrevious; |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 286 | WriteBarrier<JSCell> m_specificValueInPrevious; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 287 | |
barraclough@apple.com | a5540da | 2011-02-19 21:55:44 +0000 | [diff] [blame] | 288 | const ClassInfo* m_classInfo; |
| 289 | |
barraclough@apple.com | 07be2aa | 2011-02-22 21:49:59 +0000 | [diff] [blame] | 290 | StructureTransitionTable m_transitionTable; |
weinig@apple.com | 2229430 | 2008-09-09 06:55:39 +0000 | [diff] [blame] | 291 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 292 | WriteBarrier<JSPropertyNameIterator> m_enumerationCache; |
weinig@apple.com | 503d999 | 2008-09-15 07:27:14 +0000 | [diff] [blame] | 293 | |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 294 | OwnPtr<PropertyTable> m_propertyTable; |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 295 | |
oliver@apple.com | 0a4803c | 2009-10-29 01:25:02 +0000 | [diff] [blame] | 296 | uint32_t m_propertyStorageCapacity; |
oliver@apple.com | 6c9bdeb | 2010-02-03 01:13:47 +0000 | [diff] [blame] | 297 | |
msaboff@apple.com | 8bbd1b1 | 2012-04-25 00:58:17 +0000 | [diff] [blame] | 298 | WriteBarrier<JSString> m_objectToStringValue; |
| 299 | |
oliver@apple.com | 6c9bdeb | 2010-02-03 01:13:47 +0000 | [diff] [blame] | 300 | // m_offset does not account for anonymous slots |
fpizlo@apple.com | 0134791 | 2011-09-29 20:45:52 +0000 | [diff] [blame] | 301 | int m_offset; |
weinig@apple.com | ed15b6d | 2008-10-29 22:27:31 +0000 | [diff] [blame] | 302 | |
oliver@apple.com | ae86589 | 2009-09-21 15:45:13 +0000 | [diff] [blame] | 303 | unsigned m_dictionaryKind : 2; |
weinig@apple.com | 8a86659 | 2008-11-14 23:36:06 +0000 | [diff] [blame] | 304 | bool m_isPinnedPropertyTable : 1; |
weinig@apple.com | ed15b6d | 2008-10-29 22:27:31 +0000 | [diff] [blame] | 305 | bool m_hasGetterSetterProperties : 1; |
barraclough@apple.com | 2668db9 | 2012-02-22 23:46:48 +0000 | [diff] [blame] | 306 | bool m_hasReadOnlyOrGetterSetterPropertiesExcludingProto : 1; |
oliver@apple.com | 0a4803c | 2009-10-29 01:25:02 +0000 | [diff] [blame] | 307 | bool m_hasNonEnumerableProperties : 1; |
oliver@apple.com | 5a6d64a | 2009-06-05 01:27:42 +0000 | [diff] [blame] | 308 | unsigned m_attributesInPrevious : 7; |
ggaren@apple.com | d0d58f4 | 2010-01-07 22:07:36 +0000 | [diff] [blame] | 309 | unsigned m_specificFunctionThrashCount : 2; |
barraclough@apple.com | dd99310 | 2011-03-04 22:34:48 +0000 | [diff] [blame] | 310 | unsigned m_preventExtensions : 1; |
ggaren@apple.com | 21daf64 | 2011-04-26 06:23:14 +0000 | [diff] [blame] | 311 | unsigned m_didTransition : 1; |
barraclough@apple.com | dfe18a5 | 2011-10-15 01:25:53 +0000 | [diff] [blame] | 312 | unsigned m_staticFunctionReified; |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 313 | }; |
| 314 | |
barraclough@apple.com | 38d3c75 | 2012-05-12 00:39:43 +0000 | [diff] [blame] | 315 | inline size_t Structure::get(JSGlobalData& globalData, PropertyName propertyName) |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 316 | { |
jberlin@webkit.org | 3d6b468 | 2011-05-03 15:41:28 +0000 | [diff] [blame] | 317 | ASSERT(structure()->classInfo() == &s_info); |
oliver@apple.com | af134a7 | 2011-04-13 18:48:22 +0000 | [diff] [blame] | 318 | materializePropertyMapIfNecessary(globalData); |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 319 | if (!m_propertyTable) |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 320 | return notFound; |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 321 | |
barraclough@apple.com | 6c9b264 | 2012-05-22 00:37:09 +0000 | [diff] [blame] | 322 | PropertyMapEntry* entry = m_propertyTable->find(propertyName.uid()).first; |
barraclough@apple.com | 96cad9f | 2011-03-01 03:53:09 +0000 | [diff] [blame] | 323 | return entry ? entry->offset : notFound; |
weinig@apple.com | c13fb9f | 2008-10-31 00:12:50 +0000 | [diff] [blame] | 324 | } |
oliver@apple.com | 1368a40 | 2009-08-20 23:05:03 +0000 | [diff] [blame] | 325 | |
barraclough@apple.com | 5d959c7 | 2011-08-07 03:44:45 +0000 | [diff] [blame] | 326 | inline size_t Structure::get(JSGlobalData& globalData, const UString& name) |
| 327 | { |
| 328 | ASSERT(structure()->classInfo() == &s_info); |
| 329 | materializePropertyMapIfNecessary(globalData); |
| 330 | if (!m_propertyTable) |
| 331 | return notFound; |
| 332 | |
| 333 | PropertyMapEntry* entry = m_propertyTable->findWithString(name.impl()).first; |
barraclough@apple.com | 5d959c7 | 2011-08-07 03:44:45 +0000 | [diff] [blame] | 334 | return entry ? entry->offset : notFound; |
| 335 | } |
mhahnenberg@apple.com | 6fb47cf | 2011-10-10 22:32:00 +0000 | [diff] [blame] | 336 | |
fpizlo@apple.com | 016fd68 | 2012-05-25 20:19:55 +0000 | [diff] [blame] | 337 | inline JSValue JSValue::structureOrUndefined() const |
| 338 | { |
| 339 | if (isCell()) |
| 340 | return JSValue(asCell()->structure()); |
| 341 | return jsUndefined(); |
| 342 | } |
| 343 | |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 344 | inline bool JSCell::isObject() const |
| 345 | { |
weinig@apple.com | 58576b2 | 2011-09-16 21:34:20 +0000 | [diff] [blame] | 346 | return m_structure->isObject(); |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 347 | } |
| 348 | |
| 349 | inline bool JSCell::isString() const |
| 350 | { |
| 351 | return m_structure->typeInfo().type() == StringType; |
| 352 | } |
| 353 | |
weinig@apple.com | 64d86ab | 2011-09-11 21:45:40 +0000 | [diff] [blame] | 354 | inline bool JSCell::isGetterSetter() const |
| 355 | { |
| 356 | return m_structure->typeInfo().type() == GetterSetterType; |
| 357 | } |
| 358 | |
weinig@apple.com | ade1c67 | 2011-09-11 22:29:24 +0000 | [diff] [blame] | 359 | inline bool JSCell::isAPIValueWrapper() const |
| 360 | { |
weinig@apple.com | 93f336e | 2011-09-17 02:57:36 +0000 | [diff] [blame] | 361 | return m_structure->typeInfo().type() == APIValueWrapperType; |
weinig@apple.com | ade1c67 | 2011-09-11 22:29:24 +0000 | [diff] [blame] | 362 | } |
| 363 | |
ggaren@apple.com | 1caf69d | 2011-09-20 01:21:51 +0000 | [diff] [blame] | 364 | inline void JSCell::setStructure(JSGlobalData& globalData, Structure* structure) |
| 365 | { |
| 366 | ASSERT(structure->typeInfo().overridesVisitChildren() == this->structure()->typeInfo().overridesVisitChildren()); |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 367 | ASSERT(structure->classInfo() == m_structure->classInfo()); |
ggaren@apple.com | 1caf69d | 2011-09-20 01:21:51 +0000 | [diff] [blame] | 368 | m_structure.set(globalData, this, structure); |
| 369 | } |
| 370 | |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 371 | inline const ClassInfo* JSCell::validatedClassInfo() const |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 372 | { |
oliver@apple.com | 4103716 | 2011-05-14 22:10:01 +0000 | [diff] [blame] | 373 | #if ENABLE(GC_VALIDATION) |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 374 | ASSERT(m_structure.unvalidatedGet()->classInfo() == m_classInfo); |
oliver@apple.com | 4103716 | 2011-05-14 22:10:01 +0000 | [diff] [blame] | 375 | #else |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 376 | ASSERT(m_structure->classInfo() == m_classInfo); |
oliver@apple.com | 4103716 | 2011-05-14 22:10:01 +0000 | [diff] [blame] | 377 | #endif |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 378 | return m_classInfo; |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 379 | } |
| 380 | |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 381 | ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell) |
| 382 | { |
| 383 | ASSERT(!m_isCheckingForDefaultMarkViolation); |
ggaren@apple.com | 3a7b479 | 2011-10-17 20:43:43 +0000 | [diff] [blame] | 384 | #if ENABLE(GC_VALIDATION) |
| 385 | validate(cell); |
| 386 | #endif |
oliver@apple.com | 7747338 | 2011-10-27 00:19:31 +0000 | [diff] [blame] | 387 | if (Heap::testAndSetMarked(cell) || !cell->structure()) |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 388 | return; |
msaboff@apple.com | 9d9eab6 | 2012-06-06 23:11:09 +0000 | [diff] [blame] | 389 | |
| 390 | m_visitCount++; |
fpizlo@apple.com | 511aa4b | 2011-12-06 22:12:56 +0000 | [diff] [blame] | 391 | |
msaboff@apple.com | 9d9eab6 | 2012-06-06 23:11:09 +0000 | [diff] [blame] | 392 | MARK_LOG_CHILD(*this, cell); |
| 393 | |
fpizlo@apple.com | 511aa4b | 2011-12-06 22:12:56 +0000 | [diff] [blame] | 394 | // Should never attempt to mark something that is zapped. |
| 395 | ASSERT(!cell->isZapped()); |
| 396 | |
ggaren@apple.com | 3a7b479 | 2011-10-17 20:43:43 +0000 | [diff] [blame] | 397 | m_stack.append(cell); |
oliver@apple.com | ed66e77 | 2011-04-05 01:33:58 +0000 | [diff] [blame] | 398 | } |
| 399 | |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 400 | inline StructureTransitionTable::Hash::Key StructureTransitionTable::keyForWeakGCMapFinalizer(void*, Structure* structure) |
| 401 | { |
alexis.menard@openbossa.org | c86e112 | 2011-05-03 17:34:15 +0000 | [diff] [blame] | 402 | // Newer versions of the STL have an std::make_pair function that takes rvalue references. |
| 403 | // When either of the parameters are bitfields, the C++ compiler will try to bind them as lvalues, which is invalid. To work around this, use unary "+" to make the parameter an rvalue. |
| 404 | // See https://bugs.webkit.org/show_bug.cgi?id=59261 for more details. |
| 405 | return Hash::Key(structure->m_nameInPrevious.get(), +structure->m_attributesInPrevious); |
oliver@apple.com | b2fa0dc | 2011-04-15 23:55:42 +0000 | [diff] [blame] | 406 | } |
| 407 | |
fpizlo@apple.com | 74d43ae | 2011-09-17 23:33:01 +0000 | [diff] [blame] | 408 | inline bool Structure::transitivelyTransitionedFrom(Structure* structureToFind) |
| 409 | { |
| 410 | for (Structure* current = this; current; current = current->previousID()) { |
| 411 | if (current == structureToFind) |
| 412 | return true; |
| 413 | } |
| 414 | return false; |
| 415 | } |
| 416 | |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 417 | inline JSCell::JSCell(JSGlobalData& globalData, Structure* structure) |
| 418 | : m_classInfo(structure->classInfo()) |
| 419 | , m_structure(globalData, this, structure) |
| 420 | { |
| 421 | } |
| 422 | |
| 423 | inline void JSCell::finishCreation(JSGlobalData& globalData, Structure* structure, CreatingEarlyCellTag) |
| 424 | { |
| 425 | #if ENABLE(GC_VALIDATION) |
| 426 | ASSERT(globalData.isInitializingObject()); |
msaboff@apple.com | 18292eb | 2012-03-16 16:26:26 +0000 | [diff] [blame] | 427 | globalData.setInitializingObjectClass(0); |
mhahnenberg@apple.com | c58d54d | 2011-12-16 19:06:44 +0000 | [diff] [blame] | 428 | if (structure) |
| 429 | #endif |
| 430 | m_structure.setEarlyValue(globalData, this, structure); |
| 431 | m_classInfo = structure->classInfo(); |
| 432 | // Very first set of allocations won't have a real structure. |
| 433 | ASSERT(m_structure || !globalData.structureStructure); |
| 434 | } |
| 435 | |
cwzwarich@webkit.org | 3f782f6 | 2008-09-08 01:28:33 +0000 | [diff] [blame] | 436 | } // namespace JSC |
weinig@apple.com | 3412bb4 | 2008-09-01 21:22:54 +0000 | [diff] [blame] | 437 | |
darin@apple.com | a9778f9 | 2008-11-16 04:40:06 +0000 | [diff] [blame] | 438 | #endif // Structure_h |