Changeset 95326 in webkit
- Timestamp:
- Sep 16, 2011 2:34:20 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r95324 r95326 1 2011-09-15 Sam Weinig <sam@webkit.org> 2 3 Prepare JSTypes for more Object subtypes 4 https://bugs.webkit.org/show_bug.cgi?id=68200 5 6 Reviewed by Gavin Barraclough. 7 8 * dfg/DFGJITCompiler.h: 9 (JSC::DFG::JITCompiler::branchIfNotObject): 10 * jit/JITInlineMethods.h: 11 (JSC::JIT::emitJumpIfNotObject): 12 * runtime/JSGlobalObject.h: 13 (JSC::Structure::prototypeForLookup): 14 * runtime/JSObject.h: 15 (JSC::JSObject::finishCreation): 16 * runtime/JSType.h: 17 * runtime/JSTypeInfo.h: 18 (JSC::TypeInfo::type): 19 (JSC::TypeInfo::isObject): 20 (JSC::TypeInfo::isFinal): 21 (JSC::TypeInfo::prohibitsPropertyCaching): 22 * runtime/NativeErrorConstructor.h: 23 (JSC::NativeErrorConstructor::finishCreation): 24 * runtime/Operations.cpp: 25 (JSC::jsIsObjectType): 26 * runtime/Structure.cpp: 27 (JSC::Structure::addPropertyTransitionToExistingStructure): 28 (JSC::Structure::addPropertyTransition): 29 * runtime/Structure.h: 30 (JSC::Structure::isObject): 31 (JSC::JSCell::isObject): 32 1 33 2011-09-16 Geoffrey Garen <ggaren@apple.com> 2 34 -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
r95310 r95326 188 188 Jump branchIfNotObject(GPRReg structureReg) 189 189 { 190 return branch8( NotEqual, Address(structureReg, Structure::typeInfoTypeOffset()), TrustedImm32(ObjectType));190 return branch8(Below, Address(structureReg, Structure::typeInfoTypeOffset()), TrustedImm32(ObjectType)); 191 191 } 192 192 -
trunk/Source/JavaScriptCore/jit/JITInlineMethods.h
r95324 r95326 316 316 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotObject(RegisterID structureReg) 317 317 { 318 return branch8( NotEqual, Address(structureReg, Structure::typeInfoTypeOffset()), TrustedImm32(ObjectType));318 return branch8(Below, Address(structureReg, Structure::typeInfoTypeOffset()), TrustedImm32(ObjectType)); 319 319 } 320 320 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r94929 r95326 349 349 inline JSValue Structure::prototypeForLookup(ExecState* exec) const 350 350 { 351 if ( typeInfo().type() == ObjectType)351 if (isObject()) 352 352 return m_prototype.get(); 353 353 -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r95318 r95326 246 246 ASSERT(prototype().isNull() || Heap::heap(this) == Heap::heap(prototype())); 247 247 ASSERT_UNUSED(inlineStorage, static_cast<void*>(inlineStorage) == static_cast<void*>(this + 1)); 248 ASSERT(m_structure-> typeInfo().type() == ObjectType);248 ASSERT(m_structure->isObject()); 249 249 } 250 250 -
trunk/Source/JavaScriptCore/runtime/JSType.h
r94931 r95326 37 37 // The CompoundType value must come before any JSType that may have children 38 38 CompoundType = 7, 39 ObjectType = 8, 40 GetterSetterType = 9, 41 APIValueWrapper = 10 39 GetterSetterType = 8, 40 APIValueWrapper = 9, 41 // The ObjectType value must come before any JSType that is a subclass of JSObject 42 ObjectType = 10, 43 FinalObjectType = 11, 42 44 }; 43 45 -
trunk/Source/JavaScriptCore/runtime/JSTypeInfo.h
r91095 r95326 61 61 } 62 62 63 JSType type() const { return (JSType)m_type; } 63 JSType type() const { return static_cast<JSType>(m_type); } 64 bool isObject() const { return type() >= ObjectType; } 64 65 65 66 bool masqueradesAsUndefined() const { return m_flags & MasqueradesAsUndefined; } … … 70 71 bool overridesVisitChildren() const { return m_flags & OverridesVisitChildren; } 71 72 bool overridesGetPropertyNames() const { return m_flags & OverridesGetPropertyNames; } 72 unsigned isFinal() const { return m_flags2 & (IsJSFinalObject >> 8); } 73 unsigned prohibitsPropertyCaching() const { return m_flags2 & (ProhibitsPropertyCaching >> 8); } 73 bool isFinal() const { return m_flags2 & (IsJSFinalObject >> 8); } 74 bool prohibitsPropertyCaching() const { return m_flags2 & (ProhibitsPropertyCaching >> 8); } 75 74 76 unsigned flags() const { return m_flags; } 75 77 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
r95108 r95326 63 63 m_errorStructure.set(exec->globalData(), this, ErrorInstance::createStructure(exec->globalData(), globalObject, prototype)); 64 64 ASSERT(m_errorStructure); 65 ASSERT(m_errorStructure-> typeInfo().type() == ObjectType);65 ASSERT(m_errorStructure->isObject()); 66 66 } 67 67 -
trunk/Source/JavaScriptCore/runtime/Operations.cpp
r70749 r95326 89 89 if (type == NumberType || type == StringType) 90 90 return false; 91 if (type == ObjectType) {91 if (type >= ObjectType) { 92 92 if (asObject(v)->structure()->typeInfo().masqueradesAsUndefined()) 93 93 return false; -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r94929 r95326 281 281 { 282 282 ASSERT(!structure->isDictionary()); 283 ASSERT(structure-> typeInfo().type() == ObjectType);283 ASSERT(structure->isObject()); 284 284 285 285 if (Structure* existingTransition = structure->m_transitionTable.get(propertyName.impl(), attributes)) { … … 308 308 309 309 ASSERT(!structure->isDictionary()); 310 ASSERT(structure-> typeInfo().type() == ObjectType);310 ASSERT(structure->isObject()); 311 311 ASSERT(!Structure::addPropertyTransitionToExistingStructure(structure, propertyName, attributes, specificValue, offset)); 312 312 -
trunk/Source/JavaScriptCore/runtime/Structure.h
r94931 r95326 120 120 bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; } 121 121 122 // Type accessors. 122 123 const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; } 124 bool isObject() const { return typeInfo().isObject(); } 125 123 126 124 127 JSGlobalObject* globalObject() const { return m_globalObject.get(); } … … 305 308 inline bool JSCell::isObject() const 306 309 { 307 return m_structure-> typeInfo().type() == ObjectType;310 return m_structure->isObject(); 308 311 } 309 312
Note: See TracChangeset
for help on using the changeset viewer.