| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ | 
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ | 
| 7 | 7 | 
| 8 #include <iosfwd> | 8 #include <iosfwd> | 
| 9 | 9 | 
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" | 
| (...skipping 6069 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6080   // properties. | 6080   // properties. | 
| 6081   inline void set_is_access_check_needed(bool access_check_needed); | 6081   inline void set_is_access_check_needed(bool access_check_needed); | 
| 6082   inline bool is_access_check_needed(); | 6082   inline bool is_access_check_needed(); | 
| 6083 | 6083 | 
| 6084   // Returns true if map has a non-empty stub code cache. | 6084   // Returns true if map has a non-empty stub code cache. | 
| 6085   inline bool has_code_cache(); | 6085   inline bool has_code_cache(); | 
| 6086 | 6086 | 
| 6087   // [prototype]: implicit prototype object. | 6087   // [prototype]: implicit prototype object. | 
| 6088   DECL_ACCESSORS(prototype, Object) | 6088   DECL_ACCESSORS(prototype, Object) | 
| 6089   // TODO(jkummerow): make set_prototype private. | 6089   // TODO(jkummerow): make set_prototype private. | 
| 6090   void SetPrototype(Handle<Object> prototype, | 6090   static void SetPrototype( | 
| 6091                     PrototypeOptimizationMode proto_mode = FAST_PROTOTYPE); | 6091       Handle<Map> map, Handle<Object> prototype, | 
| 6092   bool ShouldRegisterAsPrototypeUser(Handle<JSObject> prototype); | 6092       PrototypeOptimizationMode proto_mode = FAST_PROTOTYPE); | 
|  | 6093   static bool ShouldRegisterAsPrototypeUser(Handle<Map> map, | 
|  | 6094                                             Handle<JSObject> prototype); | 
| 6093   bool CanUseOptimizationsBasedOnPrototypeRegistry(); | 6095   bool CanUseOptimizationsBasedOnPrototypeRegistry(); | 
| 6094 | 6096 | 
| 6095   // [constructor]: points back to the function responsible for this map. | 6097   // [constructor]: points back to the function responsible for this map. | 
| 6096   // The field overlaps with the back pointer. All maps in a transition tree | 6098   // The field overlaps with the back pointer. All maps in a transition tree | 
| 6097   // have the same constructor, so maps with back pointers can walk the | 6099   // have the same constructor, so maps with back pointers can walk the | 
| 6098   // back pointer chain until they find the map holding their constructor. | 6100   // back pointer chain until they find the map holding their constructor. | 
| 6099   DECL_ACCESSORS(constructor_or_backpointer, Object) | 6101   DECL_ACCESSORS(constructor_or_backpointer, Object) | 
| 6100   inline Object* GetConstructor() const; | 6102   inline Object* GetConstructor() const; | 
| 6101   inline void SetConstructor(Object* constructor, | 6103   inline void SetConstructor(Object* constructor, | 
| 6102                              WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 6104                              WriteBarrierMode mode = UPDATE_WRITE_BARRIER); | 
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6376 | 6378 | 
| 6377   // Layout description. | 6379   // Layout description. | 
| 6378   static const int kInstanceSizesOffset = HeapObject::kHeaderSize; | 6380   static const int kInstanceSizesOffset = HeapObject::kHeaderSize; | 
| 6379   static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize; | 6381   static const int kInstanceAttributesOffset = kInstanceSizesOffset + kIntSize; | 
| 6380   static const int kBitField3Offset = kInstanceAttributesOffset + kIntSize; | 6382   static const int kBitField3Offset = kInstanceAttributesOffset + kIntSize; | 
| 6381   static const int kPrototypeOffset = kBitField3Offset + kPointerSize; | 6383   static const int kPrototypeOffset = kBitField3Offset + kPointerSize; | 
| 6382   static const int kConstructorOrBackPointerOffset = | 6384   static const int kConstructorOrBackPointerOffset = | 
| 6383       kPrototypeOffset + kPointerSize; | 6385       kPrototypeOffset + kPointerSize; | 
| 6384   // When there is only one transition, it is stored directly in this field; | 6386   // When there is only one transition, it is stored directly in this field; | 
| 6385   // otherwise a transition array is used. | 6387   // otherwise a transition array is used. | 
| 6386   // For prototype maps, this slot is used to store a pointer to the prototype | 6388   // For prototype maps, this slot is used to store this map's PrototypeInfo | 
| 6387   // object using this map. | 6389   // struct. | 
| 6388   static const int kTransitionsOrPrototypeInfoOffset = | 6390   static const int kTransitionsOrPrototypeInfoOffset = | 
| 6389       kConstructorOrBackPointerOffset + kPointerSize; | 6391       kConstructorOrBackPointerOffset + kPointerSize; | 
| 6390   static const int kDescriptorsOffset = | 6392   static const int kDescriptorsOffset = | 
| 6391       kTransitionsOrPrototypeInfoOffset + kPointerSize; | 6393       kTransitionsOrPrototypeInfoOffset + kPointerSize; | 
| 6392 #if V8_DOUBLE_FIELDS_UNBOXING | 6394 #if V8_DOUBLE_FIELDS_UNBOXING | 
| 6393   static const int kLayoutDecriptorOffset = kDescriptorsOffset + kPointerSize; | 6395   static const int kLayoutDecriptorOffset = kDescriptorsOffset + kPointerSize; | 
| 6394   static const int kCodeCacheOffset = kLayoutDecriptorOffset + kPointerSize; | 6396   static const int kCodeCacheOffset = kLayoutDecriptorOffset + kPointerSize; | 
| 6395 #else | 6397 #else | 
| 6396   static const int kLayoutDecriptorOffset = 1;  // Must not be ever accessed. | 6398   static const int kLayoutDecriptorOffset = 1;  // Must not be ever accessed. | 
| 6397   static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; | 6399   static const int kCodeCacheOffset = kDescriptorsOffset + kPointerSize; | 
| (...skipping 4676 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 11074     } else { | 11076     } else { | 
| 11075       value &= ~(1 << bit_position); | 11077       value &= ~(1 << bit_position); | 
| 11076     } | 11078     } | 
| 11077     return value; | 11079     return value; | 
| 11078   } | 11080   } | 
| 11079 }; | 11081 }; | 
| 11080 | 11082 | 
| 11081 } }  // namespace v8::internal | 11083 } }  // namespace v8::internal | 
| 11082 | 11084 | 
| 11083 #endif  // V8_OBJECTS_H_ | 11085 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW | 
|---|