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

Side by Side Diff: src/objects.h

Issue 40218: Fix garbage collection of unused maps. Null descriptors, created... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 inline Smi* AsSmi(); 137 inline Smi* AsSmi();
138 138
139 PropertyType type() { return TypeField::decode(value_); } 139 PropertyType type() { return TypeField::decode(value_); }
140 140
141 bool IsTransition() { 141 bool IsTransition() {
142 PropertyType t = type(); 142 PropertyType t = type();
143 ASSERT(t != INTERCEPTOR); 143 ASSERT(t != INTERCEPTOR);
144 return t == MAP_TRANSITION || t == CONSTANT_TRANSITION; 144 return t == MAP_TRANSITION || t == CONSTANT_TRANSITION;
145 } 145 }
146 146
147 bool IsProperty() {
148 return type() < FIRST_PHANTOM_PROPERTY_TYPE;
149 }
150
147 PropertyAttributes attributes() { return AttributesField::decode(value_); } 151 PropertyAttributes attributes() { return AttributesField::decode(value_); }
148 152
149 int index() { return IndexField::decode(value_); } 153 int index() { return IndexField::decode(value_); }
150 154
151 static bool IsValidIndex(int index) { return IndexField::is_valid(index); } 155 static bool IsValidIndex(int index) { return IndexField::is_valid(index); }
152 156
153 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; } 157 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; }
154 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; } 158 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; }
155 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; } 159 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; }
156 160
(...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 static int ToKeyIndex(int descriptor_number) { 1715 static int ToKeyIndex(int descriptor_number) {
1712 return descriptor_number+kFirstIndex; 1716 return descriptor_number+kFirstIndex;
1713 } 1717 }
1714 static int ToValueIndex(int descriptor_number) { 1718 static int ToValueIndex(int descriptor_number) {
1715 return descriptor_number << 1; 1719 return descriptor_number << 1;
1716 } 1720 }
1717 static int ToDetailsIndex(int descriptor_number) { 1721 static int ToDetailsIndex(int descriptor_number) {
1718 return( descriptor_number << 1) + 1; 1722 return( descriptor_number << 1) + 1;
1719 } 1723 }
1720 1724
1725 bool is_null_descriptor(int descriptor_number) {
1726 return PropertyDetails(GetDetails(descriptor_number)).type() ==
1727 NULL_DESCRIPTOR;
1728 }
1721 // Swap operation on FixedArray without using write barriers. 1729 // Swap operation on FixedArray without using write barriers.
1722 static inline void fast_swap(FixedArray* array, int first, int second); 1730 static inline void fast_swap(FixedArray* array, int first, int second);
1723 1731
1724 // Swap descriptor first and second. 1732 // Swap descriptor first and second.
1725 inline void Swap(int first, int second); 1733 inline void Swap(int first, int second);
1726 1734
1727 FixedArray* GetContentArray() { 1735 FixedArray* GetContentArray() {
1728 return FixedArray::cast(get(kContentArrayIndex)); 1736 return FixedArray::cast(get(kContentArrayIndex));
1729 } 1737 }
1730 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray); 1738 DISALLOW_IMPLICIT_CONSTRUCTORS(DescriptorArray);
(...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after
4256 } else { 4264 } else {
4257 value &= ~(1 << bit_position); 4265 value &= ~(1 << bit_position);
4258 } 4266 }
4259 return value; 4267 return value;
4260 } 4268 }
4261 }; 4269 };
4262 4270
4263 } } // namespace v8::internal 4271 } } // namespace v8::internal
4264 4272
4265 #endif // V8_OBJECTS_H_ 4273 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698