| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 31d0a16dfb827b7fa14fcab61f14350d1fb48e15..822dc048d33b33ac5198a4f81a1c1b4d54fa8c9d 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -858,8 +858,9 @@ class DictionaryElementsAccessor;
|
| class ElementsAccessor;
|
| class FixedArrayBase;
|
| class GlobalObject;
|
| -class ObjectVisitor;
|
| +class LayoutDescriptor;
|
| class LookupIterator;
|
| +class ObjectVisitor;
|
| class StringStream;
|
| class TypeFeedbackVector;
|
| class WeakCell;
|
| @@ -934,6 +935,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(JSContextExtensionObject) \
|
| V(JSGeneratorObject) \
|
| V(JSModule) \
|
| + V(LayoutDescriptor) \
|
| V(Map) \
|
| V(DescriptorArray) \
|
| V(TransitionArray) \
|
| @@ -2063,12 +2065,18 @@ class JSObject: public JSReceiver {
|
| static void MigrateSlowToFast(Handle<JSObject> object,
|
| int unused_property_fields, const char* reason);
|
|
|
| + inline bool IsUnboxedDoubleField(FieldIndex index);
|
| +
|
| // Access fast-case object properties at index.
|
| static Handle<Object> FastPropertyAt(Handle<JSObject> object,
|
| Representation representation,
|
| FieldIndex index);
|
| inline Object* RawFastPropertyAt(FieldIndex index);
|
| + inline double RawFastDoublePropertyAt(FieldIndex index);
|
| +
|
| inline void FastPropertyAtPut(FieldIndex index, Object* value);
|
| + inline void RawFastPropertyAtPut(FieldIndex index, Object* value);
|
| + inline void RawFastDoublePropertyAtPut(FieldIndex index, double value);
|
| void WriteToField(int descriptor, Object* value);
|
|
|
| // Access to in object properties.
|
| @@ -3132,9 +3140,7 @@ class DescriptorArray: public FixedArray {
|
|
|
| // Transfer a complete descriptor from the src descriptor array to this
|
| // descriptor array.
|
| - void CopyFrom(int index,
|
| - DescriptorArray* src,
|
| - const WhitenessWitness&);
|
| + void CopyFrom(int index, DescriptorArray* src, const WhitenessWitness&);
|
|
|
| inline void Set(int descriptor_number,
|
| Descriptor* desc,
|
| @@ -4814,6 +4820,7 @@ TYPED_ARRAYS(FIXED_TYPED_ARRAY_TRAITS)
|
|
|
| #undef FIXED_TYPED_ARRAY_TRAITS
|
|
|
| +
|
| // DeoptimizationInputData is a fixed array used to hold the deoptimization
|
| // data for code generated by the Hydrogen/Lithium compiler. It also
|
| // contains information about functions that were inlined. If N different
|
| @@ -5911,7 +5918,19 @@ class Map: public HeapObject {
|
|
|
| // [instance descriptors]: describes the object.
|
| DECL_ACCESSORS(instance_descriptors, DescriptorArray)
|
| - inline void InitializeDescriptors(DescriptorArray* descriptors);
|
| +
|
| + // [layout descriptor]: describes the object layout.
|
| + DECL_ACCESSORS(layout_descriptor, LayoutDescriptor)
|
| + // |layout descriptor| accessor which can be used from GC.
|
| + inline LayoutDescriptor* layout_descriptor_gc_safe();
|
| +
|
| + // |layout descriptor| accessor that returns a handle.
|
| + inline Handle<LayoutDescriptor> GetLayoutDescriptor();
|
| +
|
| + inline void UpdateDescriptors(DescriptorArray* descriptors,
|
| + LayoutDescriptor* layout_descriptor);
|
| + inline void InitializeDescriptors(DescriptorArray* descriptors,
|
| + LayoutDescriptor* layout_descriptor);
|
|
|
| // [stub cache]: contains stubs compiled for this map.
|
| DECL_ACCESSORS(code_cache, Object)
|
| @@ -6241,7 +6260,13 @@ class Map: public HeapObject {
|
| kConstructorOffset + kPointerSize;
|
| static const int kDescriptorsOffset =
|
| kTransitionsOrBackPointerOffset + kPointerSize;
|
| +#if V8_DOUBLE_FIELDS_UNBOXING
|
| + static const int kLayoutDecriptorOffset = kDescriptorsOffset + kPointerSize;
|
| + static const int kCodeCacheOffset = kLayoutDecriptorOffset + kPointerSize;
|
| +#else
|
| + static const int kLayoutDecriptorOffset = 1; // Must not be ever accessed.
|
| static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize;
|
| +#endif
|
| static const int kDependentCodeOffset = kCodeCacheOffset + kPointerSize;
|
| static const int kSize = kDependentCodeOffset + kPointerSize;
|
|
|
| @@ -6319,11 +6344,18 @@ class Map: public HeapObject {
|
| // The "shared" flags of both this map and |other| are ignored.
|
| bool EquivalentToForNormalization(Map* other, PropertyNormalizationMode mode);
|
|
|
| + // Returns true if given field is unboxed double.
|
| + inline bool IsUnboxedDoubleField(FieldIndex index);
|
| +
|
| #if TRACE_MAPS
|
| static void TraceTransition(const char* what, Map* from, Map* to, Name* name);
|
| static void TraceAllTransitions(Map* map);
|
| #endif
|
|
|
| + static inline Handle<Map> CopyInstallDescriptorsForTesting(
|
| + Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors,
|
| + Handle<LayoutDescriptor> layout_descriptor);
|
| +
|
| private:
|
| static void ConnectElementsTransition(Handle<Map> parent, Handle<Map> child);
|
| static void ConnectTransition(Handle<Map> parent, Handle<Map> child,
|
| @@ -6335,18 +6367,17 @@ class Map: public HeapObject {
|
| Handle<DescriptorArray> descriptors,
|
| Descriptor* descriptor);
|
| static Handle<Map> CopyInstallDescriptors(
|
| - Handle<Map> map,
|
| - int new_descriptor,
|
| - Handle<DescriptorArray> descriptors);
|
| + Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors,
|
| + Handle<LayoutDescriptor> layout_descriptor);
|
| static Handle<Map> CopyAddDescriptor(Handle<Map> map,
|
| Descriptor* descriptor,
|
| TransitionFlag flag);
|
| - static Handle<Map> CopyReplaceDescriptors(Handle<Map> map,
|
| - Handle<DescriptorArray> descriptors,
|
| - TransitionFlag flag,
|
| - MaybeHandle<Name> maybe_name,
|
| - const char* reason,
|
| - SimpleTransitionFlag simple_flag);
|
| + static Handle<Map> CopyReplaceDescriptors(
|
| + Handle<Map> map, Handle<DescriptorArray> descriptors,
|
| + Handle<LayoutDescriptor> layout_descriptor, TransitionFlag flag,
|
| + MaybeHandle<Name> maybe_name, const char* reason,
|
| + SimpleTransitionFlag simple_flag);
|
| +
|
| static Handle<Map> CopyReplaceDescriptor(Handle<Map> map,
|
| Handle<DescriptorArray> descriptors,
|
| Descriptor* descriptor,
|
| @@ -6376,7 +6407,8 @@ class Map: public HeapObject {
|
| void DeprecateTransitionTree();
|
| void DeprecateTarget(PropertyType type, Name* key,
|
| PropertyAttributes attributes,
|
| - DescriptorArray* new_descriptors);
|
| + DescriptorArray* new_descriptors,
|
| + LayoutDescriptor* new_layout_descriptor);
|
|
|
| Map* FindLastMatchMap(int verbatim, int length, DescriptorArray* descriptors);
|
|
|
|
|