| 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 6003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6014 // Update code cache. | 6014 // Update code cache. |
| 6015 static void UpdateCodeCache(Handle<Map> map, | 6015 static void UpdateCodeCache(Handle<Map> map, |
| 6016 Handle<Name> name, | 6016 Handle<Name> name, |
| 6017 Handle<Code> code); | 6017 Handle<Code> code); |
| 6018 | 6018 |
| 6019 // Extend the descriptor array of the map with the list of descriptors. | 6019 // Extend the descriptor array of the map with the list of descriptors. |
| 6020 // In case of duplicates, the latest descriptor is used. | 6020 // In case of duplicates, the latest descriptor is used. |
| 6021 static void AppendCallbackDescriptors(Handle<Map> map, | 6021 static void AppendCallbackDescriptors(Handle<Map> map, |
| 6022 Handle<Object> descriptors); | 6022 Handle<Object> descriptors); |
| 6023 | 6023 |
| 6024 static inline int SlackForArraySize(int old_size, int size_limit); | 6024 static inline int SlackForArraySize(bool is_prototype_map, int old_size, |
| 6025 int size_limit); |
| 6025 | 6026 |
| 6026 static void EnsureDescriptorSlack(Handle<Map> map, int slack); | 6027 static void EnsureDescriptorSlack(Handle<Map> map, int slack); |
| 6027 | 6028 |
| 6028 // Returns the found code or undefined if absent. | 6029 // Returns the found code or undefined if absent. |
| 6029 Object* FindInCodeCache(Name* name, Code::Flags flags); | 6030 Object* FindInCodeCache(Name* name, Code::Flags flags); |
| 6030 | 6031 |
| 6031 // Returns the non-negative index of the code object if it is in the | 6032 // Returns the non-negative index of the code object if it is in the |
| 6032 // cache and -1 otherwise. | 6033 // cache and -1 otherwise. |
| 6033 int IndexInCodeCache(Object* name, Code* code); | 6034 int IndexInCodeCache(Object* name, Code* code); |
| 6034 | 6035 |
| (...skipping 4410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10445 static const int kSize = kDataOffset + kPointerSize; | 10446 static const int kSize = kDataOffset + kPointerSize; |
| 10446 | 10447 |
| 10447 private: | 10448 private: |
| 10448 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); | 10449 DISALLOW_IMPLICIT_CONSTRUCTORS(CallHandlerInfo); |
| 10449 }; | 10450 }; |
| 10450 | 10451 |
| 10451 | 10452 |
| 10452 class TemplateInfo: public Struct { | 10453 class TemplateInfo: public Struct { |
| 10453 public: | 10454 public: |
| 10454 DECL_ACCESSORS(tag, Object) | 10455 DECL_ACCESSORS(tag, Object) |
| 10456 inline int number_of_properties() const; |
| 10457 inline void set_number_of_properties(int value); |
| 10455 DECL_ACCESSORS(property_list, Object) | 10458 DECL_ACCESSORS(property_list, Object) |
| 10456 DECL_ACCESSORS(property_accessors, Object) | 10459 DECL_ACCESSORS(property_accessors, Object) |
| 10457 | 10460 |
| 10458 DECLARE_VERIFIER(TemplateInfo) | 10461 DECLARE_VERIFIER(TemplateInfo) |
| 10459 | 10462 |
| 10460 static const int kTagOffset = HeapObject::kHeaderSize; | 10463 static const int kTagOffset = HeapObject::kHeaderSize; |
| 10461 static const int kPropertyListOffset = kTagOffset + kPointerSize; | 10464 static const int kNumberOfProperties = kTagOffset + kPointerSize; |
| 10465 static const int kPropertyListOffset = kNumberOfProperties + kPointerSize; |
| 10462 static const int kPropertyAccessorsOffset = | 10466 static const int kPropertyAccessorsOffset = |
| 10463 kPropertyListOffset + kPointerSize; | 10467 kPropertyListOffset + kPointerSize; |
| 10464 static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize; | 10468 static const int kHeaderSize = kPropertyAccessorsOffset + kPointerSize; |
| 10465 | 10469 |
| 10466 private: | 10470 private: |
| 10467 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); | 10471 DISALLOW_IMPLICIT_CONSTRUCTORS(TemplateInfo); |
| 10468 }; | 10472 }; |
| 10469 | 10473 |
| 10470 | 10474 |
| 10471 class FunctionTemplateInfo: public TemplateInfo { | 10475 class FunctionTemplateInfo: public TemplateInfo { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10822 } else { | 10826 } else { |
| 10823 value &= ~(1 << bit_position); | 10827 value &= ~(1 << bit_position); |
| 10824 } | 10828 } |
| 10825 return value; | 10829 return value; |
| 10826 } | 10830 } |
| 10827 }; | 10831 }; |
| 10828 | 10832 |
| 10829 } } // namespace v8::internal | 10833 } } // namespace v8::internal |
| 10830 | 10834 |
| 10831 #endif // V8_OBJECTS_H_ | 10835 #endif // V8_OBJECTS_H_ |
| OLD | NEW |