Modified: trunk/Source/_javascript_Core/ChangeLog (239012 => 239013)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-08 22:10:37 UTC (rev 239012)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-08 23:53:29 UTC (rev 239013)
@@ -1,3 +1,19 @@
+2018-12-08 Mark Lam <[email protected]>
+
+ Reduce size of PropertySlot and PutPropertySlot.
+ https://bugs.webkit.org/show_bug.cgi?id=192526
+
+ Reviewed by Keith Miller.
+
+ 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 <[email protected]>
Record right offset with aligned wide instructions
Modified: trunk/Source/_javascript_Core/runtime/PropertySlot.h (239012 => 239013)
--- trunk/Source/_javascript_Core/runtime/PropertySlot.h 2018-12-08 22:10:37 UTC (rev 239012)
+++ trunk/Source/_javascript_Core/runtime/PropertySlot.h 2018-12-08 23:53:29 UTC (rev 239013)
@@ -370,7 +370,6 @@
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 @@
} customAccessor;
} m_data;
+ unsigned m_attributes;
PropertyOffset m_offset;
JSValue m_thisValue;
JSObject* m_slotBase;
@@ -392,11 +392,11 @@
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
Modified: trunk/Source/_javascript_Core/runtime/PutPropertySlot.h (239012 => 239013)
--- trunk/Source/_javascript_Core/runtime/PutPropertySlot.h 2018-12-08 22:10:37 UTC (rev 239012)
+++ trunk/Source/_javascript_Core/runtime/PutPropertySlot.h 2018-12-08 23:53:29 UTC (rev 239013)
@@ -36,17 +36,17 @@
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 @@
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;