Changeset 286580 in webkit
- Timestamp:
- Dec 6, 2021, 5:13:33 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
assembler/testmasm.cpp (modified) (2 diffs)
-
ftl/FTLAbstractHeapRepository.cpp (modified) (1 diff)
-
runtime/JSCell.h (modified) (1 diff)
-
runtime/JSCellInlines.h (modified) (1 diff)
-
runtime/Structure.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r286572 r286580 1 2021-12-06 Keith Miller <keith_miller@apple.com> 2 3 TypeInfo should be materializable from Structures as a single load. 4 https://bugs.webkit.org/show_bug.cgi?id=233875 5 6 Reviewed by Mark Lam. 7 8 This is mostly just the members of Structure and JSCell so that 9 JSType and InlineTypeFlags are at the end of the JSCell header. 10 11 * assembler/testmasm.cpp: 12 (JSC::testBranchIfType): 13 (JSC::testBranchIfNotType): 14 * ftl/FTLAbstractHeapRepository.cpp: 15 (JSC::FTL::AbstractHeapRepository::AbstractHeapRepository): 16 * runtime/JSCell.h: 17 * runtime/JSCellInlines.h: 18 (JSC::JSCell::JSCell): 19 * runtime/Structure.h: 20 (JSC::Structure::typeInfo const): 21 1 22 2021-12-06 Mark Lam <mark.lam@apple.com> 2 23 -
trunk/Source/JavaScriptCore/assembler/testmasm.cpp
r286020 r286580 5614 5614 uint32_t structureID; 5615 5615 uint8_t indexingType; 5616 uint8_t cellState; 5616 5617 JSType type; 5617 5618 }; … … 5648 5649 uint32_t structureID; 5649 5650 uint8_t indexingType; 5651 uint8_t cellState; 5650 5652 JSType type; 5651 5653 }; -
trunk/Source/JavaScriptCore/ftl/FTLAbstractHeapRepository.cpp
r262338 r286580 79 79 // Make sure that our explicit assumptions about the StructureIDBlob match reality. 80 80 RELEASE_ASSERT(!(JSCell_indexingTypeAndMisc.offset() & (sizeof(int32_t) - 1))); 81 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 1 == JSCell_ typeInfoType.offset());82 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 2 == JSCell_typeInfo Flags.offset());83 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 3 == JSCell_ cellState.offset());81 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 1 == JSCell_cellState.offset()); 82 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 2 == JSCell_typeInfoType.offset()); 83 RELEASE_ASSERT(JSCell_indexingTypeAndMisc.offset() + 3 == JSCell_typeInfoFlags.offset()); 84 84 85 85 JSCell_structureID.changeParent(&JSCell_header); -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r286345 r286580 267 267 StructureID m_structureID; 268 268 IndexingType m_indexingTypeAndMisc; // DO NOT store to this field. Always CAS. 269 CellState m_cellState; 269 270 JSType m_type; 270 271 TypeInfo::InlineTypeFlags m_flags; 271 CellState m_cellState;272 272 }; 273 273 -
trunk/Source/JavaScriptCore/runtime/JSCellInlines.h
r286572 r286580 59 59 : m_structureID(structure->id()) 60 60 , m_indexingTypeAndMisc(structure->indexingModeIncludingHistory()) 61 , m_cellState(CellState::DefinitelyWhite) 61 62 , m_type(structure->typeInfo().type()) 62 63 , m_flags(structure->typeInfo().inlineTypeFlags()) 63 , m_cellState(CellState::DefinitelyWhite)64 64 { 65 65 ASSERT(!isCompilationThread()); -
trunk/Source/JavaScriptCore/runtime/Structure.h
r286502 r286580 262 262 263 263 // Type accessors. 264 #if CPU(NEEDS_ALIGNED_ACCESS) 264 265 TypeInfo typeInfo() const { return TypeInfo(m_cellHeaderType, m_cellHeaderInlineTypeFlags, m_outOfLineTypeFlags); } 266 #else 267 TypeInfo typeInfo() const { return *reinterpret_cast_ptr<const TypeInfo*>(&m_cellHeaderType); } 268 #endif 265 269 bool isObject() const { return typeInfo().isObject(); } 266 270 protected: … … 857 861 // JSCell. 858 862 IndexingType m_cellHeaderIndexingModeIncludingHistory; 863 const CellState m_cellHeaderDefaultCellState { CellState::DefinitelyWhite }; 859 864 const JSType m_cellHeaderType; 860 865 TypeInfo::InlineTypeFlags m_cellHeaderInlineTypeFlags; 861 const CellState m_cellHeaderDefaultCellState { CellState::DefinitelyWhite };862 866 TypeInfo::OutOfLineTypeFlags m_outOfLineTypeFlags; 863 867
Note:
See TracChangeset
for help on using the changeset viewer.