Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1495)

Side by Side Diff: src/objects.h

Issue 1016803002: Remove PropertyCell space (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ic/ic.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 kNotInternalizedTag, 655 kNotInternalizedTag,
656 656
657 // Non-string names 657 // Non-string names
658 SYMBOL_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE, LAST_NAME_TYPE 658 SYMBOL_TYPE = kNotStringTag, // FIRST_NONSTRING_TYPE, LAST_NAME_TYPE
659 659
660 // Objects allocated in their own spaces (never in new space). 660 // Objects allocated in their own spaces (never in new space).
661 MAP_TYPE, 661 MAP_TYPE,
662 CODE_TYPE, 662 CODE_TYPE,
663 ODDBALL_TYPE, 663 ODDBALL_TYPE,
664 CELL_TYPE, 664 CELL_TYPE,
665 PROPERTY_CELL_TYPE,
666 665
667 // "Data", objects that cannot contain non-map-word pointers to heap 666 // "Data", objects that cannot contain non-map-word pointers to heap
668 // objects. 667 // objects.
669 HEAP_NUMBER_TYPE, 668 HEAP_NUMBER_TYPE,
670 MUTABLE_HEAP_NUMBER_TYPE, 669 MUTABLE_HEAP_NUMBER_TYPE,
671 FOREIGN_TYPE, 670 FOREIGN_TYPE,
672 BYTE_ARRAY_TYPE, 671 BYTE_ARRAY_TYPE,
673 FREE_SPACE_TYPE, 672 FREE_SPACE_TYPE,
674 EXTERNAL_INT8_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE 673 EXTERNAL_INT8_ARRAY_TYPE, // FIRST_EXTERNAL_ARRAY_TYPE
675 EXTERNAL_UINT8_ARRAY_TYPE, 674 EXTERNAL_UINT8_ARRAY_TYPE,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 POLYMORPHIC_CODE_CACHE_TYPE, 710 POLYMORPHIC_CODE_CACHE_TYPE,
712 TYPE_FEEDBACK_INFO_TYPE, 711 TYPE_FEEDBACK_INFO_TYPE,
713 ALIASED_ARGUMENTS_ENTRY_TYPE, 712 ALIASED_ARGUMENTS_ENTRY_TYPE,
714 BOX_TYPE, 713 BOX_TYPE,
715 DEBUG_INFO_TYPE, 714 DEBUG_INFO_TYPE,
716 BREAK_POINT_INFO_TYPE, 715 BREAK_POINT_INFO_TYPE,
717 FIXED_ARRAY_TYPE, 716 FIXED_ARRAY_TYPE,
718 CONSTANT_POOL_ARRAY_TYPE, 717 CONSTANT_POOL_ARRAY_TYPE,
719 SHARED_FUNCTION_INFO_TYPE, 718 SHARED_FUNCTION_INFO_TYPE,
720 WEAK_CELL_TYPE, 719 WEAK_CELL_TYPE,
720 PROPERTY_CELL_TYPE,
721 721
722 // All the following types are subtypes of JSReceiver, which corresponds to 722 // All the following types are subtypes of JSReceiver, which corresponds to
723 // objects in the JS sense. The first and the last type in this range are 723 // objects in the JS sense. The first and the last type in this range are
724 // the two forms of function. This organization enables using the same 724 // the two forms of function. This organization enables using the same
725 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the 725 // compares for checking the JS_RECEIVER/SPEC_OBJECT range and the
726 // NONCALLABLE_JS_OBJECT range. 726 // NONCALLABLE_JS_OBJECT range.
727 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE 727 JS_FUNCTION_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE, FIRST_JS_PROXY_TYPE
728 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE 728 JS_PROXY_TYPE, // LAST_JS_PROXY_TYPE
729 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE 729 JS_VALUE_TYPE, // FIRST_JS_OBJECT_TYPE
730 JS_MESSAGE_OBJECT_TYPE, 730 JS_MESSAGE_OBJECT_TYPE,
(...skipping 8954 matching lines...) Expand 10 before | Expand all | Expand 10 after
9685 STATIC_ASSERT(kNull == Internals::kNullOddballKind); 9685 STATIC_ASSERT(kNull == Internals::kNullOddballKind);
9686 STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind); 9686 STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind);
9687 9687
9688 private: 9688 private:
9689 DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball); 9689 DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball);
9690 }; 9690 };
9691 9691
9692 9692
9693 class Cell: public HeapObject { 9693 class Cell: public HeapObject {
9694 public: 9694 public:
9695 // [value]: value of the global property. 9695 // [value]: value of the cell.
9696 DECL_ACCESSORS(value, Object) 9696 DECL_ACCESSORS(value, Object)
9697 9697
9698 DECLARE_CAST(Cell) 9698 DECLARE_CAST(Cell)
9699 9699
9700 static inline Cell* FromValueAddress(Address value) { 9700 static inline Cell* FromValueAddress(Address value) {
9701 Object* result = FromAddress(value - kValueOffset); 9701 Object* result = FromAddress(value - kValueOffset);
9702 DCHECK(result->IsCell() || result->IsPropertyCell()); 9702 DCHECK(result->IsCell() || result->IsPropertyCell());
9703 return static_cast<Cell*>(result); 9703 return static_cast<Cell*>(result);
9704 } 9704 }
9705 9705
(...skipping 13 matching lines...) Expand all
9719 kValueOffset + kPointerSize, 9719 kValueOffset + kPointerSize,
9720 kSize> BodyDescriptor; 9720 kSize> BodyDescriptor;
9721 9721
9722 private: 9722 private:
9723 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell); 9723 DISALLOW_IMPLICIT_CONSTRUCTORS(Cell);
9724 }; 9724 };
9725 9725
9726 9726
9727 class PropertyCell: public Cell { 9727 class PropertyCell: public Cell {
9728 public: 9728 public:
9729 // [value]: value of the global property.
9730 DECL_ACCESSORS(value, Object)
9729 // [dependent_code]: dependent code that depends on the type of the global 9731 // [dependent_code]: dependent code that depends on the type of the global
9730 // property. 9732 // property.
9731 DECL_ACCESSORS(dependent_code, DependentCode) 9733 DECL_ACCESSORS(dependent_code, DependentCode)
9732 9734
9733 // Computes the new type of the cell's contents for the given value, but 9735 // Computes the new type of the cell's contents for the given value, but
9734 // without actually modifying the details. 9736 // without actually modifying the details.
9735 static PropertyCellType UpdatedType(Handle<PropertyCell> cell, 9737 static PropertyCellType UpdatedType(Handle<PropertyCell> cell,
9736 Handle<Object> value, 9738 Handle<Object> value,
9737 PropertyDetails details); 9739 PropertyDetails details);
9738 static Handle<Object> UpdateCell(Handle<NameDictionary> dictionary, int entry, 9740 static Handle<Object> UpdateCell(Handle<NameDictionary> dictionary, int entry,
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
10985 } else { 10987 } else {
10986 value &= ~(1 << bit_position); 10988 value &= ~(1 << bit_position);
10987 } 10989 }
10988 return value; 10990 return value;
10989 } 10991 }
10990 }; 10992 };
10991 10993
10992 } } // namespace v8::internal 10994 } } // namespace v8::internal
10993 10995
10994 #endif // V8_OBJECTS_H_ 10996 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic/ic.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698