Changeset 82898 in webkit
- Timestamp:
- Apr 4, 2011 6:33:58 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r82888 r82898 1 2011-04-04 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Antti Koivisto. 4 5 Stop JSCell.h from including Structure.h 6 https://bugs.webkit.org/show_bug.cgi?id=57809 7 8 * runtime/GetterSetter.h: 9 * runtime/JSAPIValueWrapper.h: 10 * runtime/JSCell.h: 11 (JSC::JSCell::JSValue::toThisObject): 12 * runtime/JSString.h: 13 * runtime/ScopeChain.h: 14 * runtime/Structure.h: 15 (JSC::JSCell::isObject): 16 (JSC::JSCell::isString): 17 (JSC::JSCell::classInfo): 18 (JSC::JSCell::createDummyStructure): 19 (JSC::JSValue::needsThisConversion): 20 (JSC::MarkStack::internalAppend): 21 * runtime/StructureChain.h: 22 1 23 2011-04-04 Oliver Hunt <oliver@apple.com> 2 24 -
trunk/Source/JavaScriptCore/runtime/GetterSetter.h
r81272 r82898 27 27 28 28 #include "CallFrame.h" 29 #include "Structure.h" 29 30 30 31 namespace JSC { -
trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h
r81272 r82898 26 26 #include "JSCell.h" 27 27 #include "CallFrame.h" 28 #include "Structure.h" 28 29 29 30 namespace JSC { -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r82849 r82898 25 25 26 26 #include "CallData.h" 27 #include "CallFrame.h" 27 28 #include "ConstructData.h" 28 29 #include "Heap.h" … … 31 32 #include "JSValue.h" 32 33 #include "MarkStack.h" 33 #include " Structure.h"34 #include "UString.h" 34 35 #include <wtf/Noncopyable.h> 35 36 … … 37 38 38 39 class JSGlobalObject; 40 class Structure; 39 41 40 42 #if COMPILER(MSVC) … … 76 78 77 79 public: 78 static PassRefPtr<Structure> createDummyStructure(JSGlobalData& globalData) 79 { 80 return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0); 81 } 80 static PassRefPtr<Structure> createDummyStructure(JSGlobalData&); 82 81 83 82 // Querying the type. … … 123 122 124 123 // Object operations, with the toObject operation included. 125 const ClassInfo* classInfo() const { return m_structure->classInfo(); }124 const ClassInfo* classInfo() const; 126 125 virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 127 126 virtual void put(ExecState*, unsigned propertyName, JSValue); … … 168 167 inline JSCell::~JSCell() 169 168 { 170 }171 172 inline bool JSCell::isObject() const173 {174 return m_structure->typeInfo().type() == ObjectType;175 }176 177 inline bool JSCell::isString() const178 {179 return m_structure->typeInfo().type() == StringType;180 169 } 181 170 … … 322 311 } 323 312 324 inline bool JSValue::needsThisConversion() const325 {326 if (UNLIKELY(!isCell()))327 return true;328 return asCell()->structure()->typeInfo().needsThisConversion();329 }330 331 313 inline JSValue JSValue::getJSNumber() 332 314 { … … 351 333 { 352 334 return isCell() ? asCell()->toThisObject(exec) : toThisObjectSlowCase(exec); 353 }354 355 ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell)356 {357 ASSERT(!m_isCheckingForDefaultMarkViolation);358 ASSERT(cell);359 if (Heap::testAndSetMarked(cell))360 return;361 if (cell->structure()->typeInfo().type() >= CompoundType)362 m_values.append(cell);363 335 } 364 336 -
trunk/Source/JavaScriptCore/runtime/JSString.h
r82173 r82898 31 31 #include "PropertySlot.h" 32 32 #include "RopeImpl.h" 33 #include "Structure.h" 33 34 34 35 namespace JSC { -
trunk/Source/JavaScriptCore/runtime/ScopeChain.h
r81272 r82898 23 23 24 24 #include "JSCell.h" 25 #include "Structure.h" 25 26 #include <wtf/FastAllocBase.h> 26 27 -
trunk/Source/JavaScriptCore/runtime/Structure.h
r82849 r82898 28 28 29 29 #include "Identifier.h" 30 #include "JSCell.h" 30 31 #include "JSType.h" 31 32 #include "JSValue.h" … … 263 264 } 264 265 266 inline bool JSCell::isObject() const 267 { 268 return m_structure->typeInfo().type() == ObjectType; 269 } 270 271 inline bool JSCell::isString() const 272 { 273 return m_structure->typeInfo().type() == StringType; 274 } 275 276 inline const ClassInfo* JSCell::classInfo() const 277 { 278 return m_structure->classInfo(); 279 } 280 281 inline PassRefPtr<Structure> JSCell::createDummyStructure(JSGlobalData& globalData) 282 { 283 return Structure::create(globalData, jsNull(), TypeInfo(UnspecifiedType), AnonymousSlotCount, 0); 284 } 285 286 inline bool JSValue::needsThisConversion() const 287 { 288 if (UNLIKELY(!isCell())) 289 return true; 290 return asCell()->structure()->typeInfo().needsThisConversion(); 291 } 292 293 ALWAYS_INLINE void MarkStack::internalAppend(JSCell* cell) 294 { 295 ASSERT(!m_isCheckingForDefaultMarkViolation); 296 ASSERT(cell); 297 if (Heap::testAndSetMarked(cell)) 298 return; 299 if (cell->structure()->typeInfo().type() >= CompoundType) 300 m_values.append(cell); 301 } 302 265 303 } // namespace JSC 266 304 -
trunk/Source/JavaScriptCore/runtime/StructureChain.h
r82849 r82898 28 28 29 29 #include "JSCell.h" 30 #include "Structure.h" 30 31 31 32 #include <wtf/OwnArrayPtr.h>
Note: See TracChangeset
for help on using the changeset viewer.