WebKit Bugzilla
Attachment 339152 Details for
Bug 185143
: Move the MayBePrototype JSCell header bit to InlineTypeFlags
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185143-20180430151057.patch (text/plain), 5.21 KB, created by
Keith Miller
on 2018-04-30 15:10:57 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2018-04-30 15:10:57 PDT
Size:
5.21 KB
patch
obsolete
>Subversion Revision: 231166 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index f633215aeb6b07e4a593f581ce7728dd0fe8f9e6..eeb94cbf6e67e524359f15cbbc1b8bdee2f12fb1 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,19 @@ >+2018-04-30 Keith Miller <keith_miller@apple.com> >+ >+ Move the MayBePrototype JSCell header bit to InlineTypeFlags >+ https://bugs.webkit.org/show_bug.cgi?id=185143 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * runtime/IndexingType.h: >+ * runtime/JSCellInlines.h: >+ (JSC::JSCell::setStructure): >+ (JSC::JSCell::mayBePrototype const): >+ (JSC::JSCell::didBecomePrototype): >+ * runtime/JSTypeInfo.h: >+ (JSC::TypeInfo::mayBePrototype): >+ (JSC::TypeInfo::mergeInlineTypeFlags): >+ > 2018-04-30 Keith Miller <keith_miller@apple.com> > > Move StructureIsImmortal to out of line flags. >diff --git a/Source/JavaScriptCore/runtime/IndexingType.h b/Source/JavaScriptCore/runtime/IndexingType.h >index 2426afe133b6e5928d16f6175e0d38f37bf271d9..689fae264205b1e03184190b16cc851a5ab07d80 100644 >--- a/Source/JavaScriptCore/runtime/IndexingType.h >+++ b/Source/JavaScriptCore/runtime/IndexingType.h >@@ -73,7 +73,6 @@ static const IndexingType MayHaveIndexedAccessors = 0x10; > // prototype. > static const IndexingType IndexingTypeLockIsHeld = 0x20; > static const IndexingType IndexingTypeLockHasParked = 0x40; >-static const IndexingType IndexingTypeMayBePrototype = 0x80; > > // List of acceptable array types. > static const IndexingType NonArray = 0x0; >diff --git a/Source/JavaScriptCore/runtime/JSCellInlines.h b/Source/JavaScriptCore/runtime/JSCellInlines.h >index ad86c483dfba7388b516a18ea8150d863e54e9fb..8028b89fa0fef8b80db5ba6b5f94ba8bb597a429 100644 >--- a/Source/JavaScriptCore/runtime/JSCellInlines.h >+++ b/Source/JavaScriptCore/runtime/JSCellInlines.h >@@ -230,7 +230,7 @@ ALWAYS_INLINE void JSCell::setStructure(VM& vm, Structure* structure) > || this->structure()->transitionWatchpointSetHasBeenInvalidated() > || Heap::heap(this)->structureIDTable().get(structure->id()) == structure); > m_structureID = structure->id(); >- m_flags = structure->typeInfo().inlineTypeFlags(); >+ m_flags = TypeInfo::mergeInlineTypeFlags(structure->typeInfo().inlineTypeFlags(), m_flags); > m_type = structure->typeInfo().type(); > IndexingType newIndexingType = structure->indexingTypeIncludingHistory(); > if (m_indexingTypeAndMisc != newIndexingType) { >@@ -342,14 +342,14 @@ inline bool JSCellLock::isLocked() const > > inline bool JSCell::mayBePrototype() const > { >- return m_indexingTypeAndMisc & IndexingTypeMayBePrototype; >+ return TypeInfo::mayBePrototype(inlineTypeFlags()); > } > > inline void JSCell::didBecomePrototype() > { > if (mayBePrototype()) > return; >- WTF::atomicExchangeOr(&m_indexingTypeAndMisc, IndexingTypeMayBePrototype); >+ m_flags |= static_cast<TypeInfo::InlineTypeFlags>(TypeInfoMayBePrototype); > } > > inline JSObject* JSCell::toObject(ExecState* exec, JSGlobalObject* globalObject) const >diff --git a/Source/JavaScriptCore/runtime/JSTypeInfo.h b/Source/JavaScriptCore/runtime/JSTypeInfo.h >index 2e04e1388b908b268f61b32f933262e204357556..fc4bb445f616dcfbe5731c78552e53702197bd56 100644 >--- a/Source/JavaScriptCore/runtime/JSTypeInfo.h >+++ b/Source/JavaScriptCore/runtime/JSTypeInfo.h >@@ -43,6 +43,7 @@ static const unsigned TypeOfShouldCallGetCallData = 1 << 2; // Need this flag if > static const unsigned OverridesGetOwnPropertySlot = 1 << 3; > static const unsigned OverridesToThis = 1 << 4; // If this is false then this returns something other than 'this'. Non-object cells that are visible to JS have this set as do some exotic objects. > static const unsigned HasStaticPropertyTable = 1 << 5; >+static const unsigned TypeInfoMayBePrototype = 1 << 7; // Unlike other inline flags, this will only be set on the cell itself and will not be set on the Structure. > > // Out of line flags. > >@@ -88,6 +89,7 @@ public: > bool overridesGetOwnPropertySlot() const { return overridesGetOwnPropertySlot(inlineTypeFlags()); } > static bool overridesGetOwnPropertySlot(InlineTypeFlags flags) { return flags & OverridesGetOwnPropertySlot; } > static bool hasStaticPropertyTable(InlineTypeFlags flags) { return flags & HasStaticPropertyTable; } >+ static bool mayBePrototype(InlineTypeFlags flags) { return flags & TypeInfoMayBePrototype; } > bool overridesToThis() const { return isSetOnFlags1(OverridesToThis); } > bool structureIsImmortal() const { return isSetOnFlags2(StructureIsImmortal); } > bool overridesGetPropertyNames() const { return isSetOnFlags2(OverridesGetPropertyNames); } >@@ -115,6 +117,12 @@ public: > return OBJECT_OFFSETOF(TypeInfo, m_type); > } > >+ // Since the Structure doesn't track TypeInfoMayBePrototype, we need to make sure we copy it. >+ static InlineTypeFlags mergeInlineTypeFlags(InlineTypeFlags structureFlags, InlineTypeFlags oldCellFlags) >+ { >+ return structureFlags | (oldCellFlags & static_cast<InlineTypeFlags>(TypeInfoMayBePrototype)); >+ } >+ > InlineTypeFlags inlineTypeFlags() const { return m_flags; } > OutOfLineTypeFlags outOfLineTypeFlags() const { return m_flags2; } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185143
:
339150
| 339152