| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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_MAP_H_ | 5 #ifndef V8_OBJECTS_MAP_H_ |
| 6 #define V8_OBJECTS_MAP_H_ | 6 #define V8_OBJECTS_MAP_H_ |
| 7 | 7 |
| 8 #include "src/objects.h" | 8 #include "src/objects.h" |
| 9 | 9 |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 // instance descriptors. | 489 // instance descriptors. |
| 490 static Handle<Map> Copy(Handle<Map> map, const char* reason); | 490 static Handle<Map> Copy(Handle<Map> map, const char* reason); |
| 491 static Handle<Map> Create(Isolate* isolate, int inobject_properties); | 491 static Handle<Map> Create(Isolate* isolate, int inobject_properties); |
| 492 | 492 |
| 493 // Returns the next free property index (only valid for FAST MODE). | 493 // Returns the next free property index (only valid for FAST MODE). |
| 494 int NextFreePropertyIndex(); | 494 int NextFreePropertyIndex(); |
| 495 | 495 |
| 496 // Returns the number of enumerable properties. | 496 // Returns the number of enumerable properties. |
| 497 int NumberOfEnumerableProperties(); | 497 int NumberOfEnumerableProperties(); |
| 498 | 498 |
| 499 DECLARE_CAST(Map) | 499 DECL_CAST(Map) |
| 500 | 500 |
| 501 // Code cache operations. | 501 // Code cache operations. |
| 502 | 502 |
| 503 // Clears the code cache. | 503 // Clears the code cache. |
| 504 inline void ClearCodeCache(Heap* heap); | 504 inline void ClearCodeCache(Heap* heap); |
| 505 | 505 |
| 506 // Update code cache. | 506 // Update code cache. |
| 507 static void UpdateCodeCache(Handle<Map> map, Handle<Name> name, | 507 static void UpdateCodeCache(Handle<Map> map, Handle<Name> name, |
| 508 Handle<Code> code); | 508 Handle<Code> code); |
| 509 | 509 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 | 550 |
| 551 static void AddDependentCode(Handle<Map> map, | 551 static void AddDependentCode(Handle<Map> map, |
| 552 DependentCode::DependencyGroup group, | 552 DependentCode::DependencyGroup group, |
| 553 Handle<Code> code); | 553 Handle<Code> code); |
| 554 | 554 |
| 555 bool IsMapInArrayPrototypeChain(); | 555 bool IsMapInArrayPrototypeChain(); |
| 556 | 556 |
| 557 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); | 557 static Handle<WeakCell> WeakCellForMap(Handle<Map> map); |
| 558 | 558 |
| 559 // Dispatched behavior. | 559 // Dispatched behavior. |
| 560 DECLARE_PRINTER(Map) | 560 DECL_PRINTER(Map) |
| 561 DECLARE_VERIFIER(Map) | 561 DECL_VERIFIER(Map) |
| 562 | 562 |
| 563 #ifdef VERIFY_HEAP | 563 #ifdef VERIFY_HEAP |
| 564 void DictionaryMapVerify(); | 564 void DictionaryMapVerify(); |
| 565 void VerifyOmittedMapChecks(); | 565 void VerifyOmittedMapChecks(); |
| 566 #endif | 566 #endif |
| 567 | 567 |
| 568 inline int visitor_id(); | 568 inline int visitor_id(); |
| 569 inline void set_visitor_id(int visitor_id); | 569 inline void set_visitor_id(int visitor_id); |
| 570 | 570 |
| 571 static Handle<Map> TransitionToPrototype(Handle<Map> map, | 571 static Handle<Map> TransitionToPrototype(Handle<Map> map, |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 class NormalizedMapCache : public FixedArray { | 787 class NormalizedMapCache : public FixedArray { |
| 788 public: | 788 public: |
| 789 static Handle<NormalizedMapCache> New(Isolate* isolate); | 789 static Handle<NormalizedMapCache> New(Isolate* isolate); |
| 790 | 790 |
| 791 MUST_USE_RESULT MaybeHandle<Map> Get(Handle<Map> fast_map, | 791 MUST_USE_RESULT MaybeHandle<Map> Get(Handle<Map> fast_map, |
| 792 PropertyNormalizationMode mode); | 792 PropertyNormalizationMode mode); |
| 793 void Set(Handle<Map> fast_map, Handle<Map> normalized_map); | 793 void Set(Handle<Map> fast_map, Handle<Map> normalized_map); |
| 794 | 794 |
| 795 void Clear(); | 795 void Clear(); |
| 796 | 796 |
| 797 DECLARE_CAST(NormalizedMapCache) | 797 DECL_CAST(NormalizedMapCache) |
| 798 | 798 |
| 799 static inline bool IsNormalizedMapCache(const HeapObject* obj); | 799 static inline bool IsNormalizedMapCache(const HeapObject* obj); |
| 800 | 800 |
| 801 DECLARE_VERIFIER(NormalizedMapCache) | 801 DECL_VERIFIER(NormalizedMapCache) |
| 802 private: | 802 private: |
| 803 static const int kEntries = 64; | 803 static const int kEntries = 64; |
| 804 | 804 |
| 805 static inline int GetIndex(Handle<Map> map); | 805 static inline int GetIndex(Handle<Map> map); |
| 806 | 806 |
| 807 // The following declarations hide base class methods. | 807 // The following declarations hide base class methods. |
| 808 Object* get(int index); | 808 Object* get(int index); |
| 809 void set(int index, Object* value); | 809 void set(int index, Object* value); |
| 810 }; | 810 }; |
| 811 | 811 |
| 812 } // namespace internal | 812 } // namespace internal |
| 813 } // namespace v8 | 813 } // namespace v8 |
| 814 | 814 |
| 815 #include "src/objects/object-macros-undef.h" | 815 #include "src/objects/object-macros-undef.h" |
| 816 | 816 |
| 817 #endif // V8_OBJECTS_MAP_H_ | 817 #endif // V8_OBJECTS_MAP_H_ |
| OLD | NEW |