WebKit Bugzilla
Attachment 356874 Details for
Bug 192526
: Reduce size of PropertySlot and PutPropertySlot.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch.
bug-192526.patch (text/plain), 3.74 KB, created by
Mark Lam
on 2018-12-08 10:02:20 PST
(
hide
)
Description:
proposed patch.
Filename:
MIME Type:
Creator:
Mark Lam
Created:
2018-12-08 10:02:20 PST
Size:
3.74 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 239009) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,19 @@ >+2018-12-08 Mark Lam <mark.lam@apple.com> >+ >+ Reduce side of PropertySlot and PutPropertySlot. >+ https://bugs.webkit.org/show_bug.cgi?id=192526 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ With some minor adjustments, we can reduce the size of PropertySlot from 80 bytes >+ (19 padding bytes) to 64 bytes (3 padding bytes), and PutPropertySlot from 40 >+ bytes (4 padding bytes) to 32 bytes (0 padding bytes but with 6 unused bits). >+ These measurements are for a 64-bit build. >+ >+ * runtime/PropertySlot.h: >+ * runtime/PutPropertySlot.h: >+ (JSC::PutPropertySlot::PutPropertySlot): >+ > 2018-12-08 Dominik Infuehr <dinfuehr@igalia.com> > > Record right offset with aligned wide instructions >Index: Source/JavaScriptCore/runtime/PropertySlot.h >=================================================================== >--- Source/JavaScriptCore/runtime/PropertySlot.h (revision 239009) >+++ Source/JavaScriptCore/runtime/PropertySlot.h (working copy) >@@ -370,7 +370,6 @@ private: > JS_EXPORT_PRIVATE JSValue customGetter(ExecState*, PropertyName) const; > JS_EXPORT_PRIVATE JSValue customAccessorGetter(ExecState*, PropertyName) const; > >- unsigned m_attributes; > union { > EncodedJSValue value; > struct { >@@ -384,6 +383,7 @@ private: > } customAccessor; > } m_data; > >+ unsigned m_attributes; > PropertyOffset m_offset; > JSValue m_thisValue; > JSObject* m_slotBase; >@@ -392,11 +392,11 @@ private: > PropertyType m_propertyType; > InternalMethodType m_internalMethodType; > AdditionalDataType m_additionalDataType; >+ bool m_isTaintedByOpaqueObject; > union { > DOMAttributeAnnotation domAttribute; > ModuleNamespaceSlot moduleNamespaceSlot; > } m_additionalData; >- bool m_isTaintedByOpaqueObject; > }; > > ALWAYS_INLINE JSValue PropertySlot::getValue(ExecState* exec, PropertyName propertyName) const >Index: Source/JavaScriptCore/runtime/PutPropertySlot.h >=================================================================== >--- Source/JavaScriptCore/runtime/PutPropertySlot.h (revision 239009) >+++ Source/JavaScriptCore/runtime/PutPropertySlot.h (working copy) >@@ -36,17 +36,17 @@ class JSFunction; > > class PutPropertySlot { > public: >- enum Type { Uncachable, ExistingProperty, NewProperty, SetterProperty, CustomValue, CustomAccessor }; >+ enum Type : uint8_t { Uncachable, ExistingProperty, NewProperty, SetterProperty, CustomValue, CustomAccessor }; > enum Context { UnknownContext, PutById, PutByIdEval }; > typedef bool (*PutValueFunc)(ExecState*, EncodedJSValue thisObject, EncodedJSValue value); > > PutPropertySlot(JSValue thisValue, bool isStrictMode = false, Context context = UnknownContext, bool isInitialization = false) >- : m_type(Uncachable) >- , m_base(0) >+ : m_base(0) > , m_thisValue(thisValue) > , m_offset(invalidOffset) > , m_isStrictMode(isStrictMode) > , m_isInitialization(isInitialization) >+ , m_type(Uncachable) > , m_context(context) > , m_cacheability(CachingAllowed) > { >@@ -129,12 +129,12 @@ public: > private: > bool isCacheable() const { return m_cacheability == CachingAllowed; } > >- Type m_type; > JSObject* m_base; > JSValue m_thisValue; > PropertyOffset m_offset; >- bool m_isStrictMode; >- bool m_isInitialization; >+ bool m_isStrictMode : 1; >+ bool m_isInitialization : 1; >+ Type m_type; > uint8_t m_context; > CacheabilityType m_cacheability; > FunctionPtr<OperationPtrTag> m_putFunction;
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
Flags:
keith_miller
:
review+
saam
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192526
: 356874