OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 | 1124 |
1125 | 1125 |
1126 // HeapObject is the superclass for all classes describing heap allocated | 1126 // HeapObject is the superclass for all classes describing heap allocated |
1127 // objects. | 1127 // objects. |
1128 class HeapObject: public Object { | 1128 class HeapObject: public Object { |
1129 public: | 1129 public: |
1130 // [map]: Contains a map which contains the object's reflective | 1130 // [map]: Contains a map which contains the object's reflective |
1131 // information. | 1131 // information. |
1132 inline Map* map(); | 1132 inline Map* map(); |
1133 inline void set_map(Map* value); | 1133 inline void set_map(Map* value); |
1134 inline void set_map_unsafe(Map* value); | 1134 // The no-write-barrier version. This is OK if the object is white and in |
| 1135 // new space, or if the value is an immortal immutable object, like the maps |
| 1136 // of primitive (non-JS) objects like strings, heap numbers etc. |
| 1137 inline void set_map_no_wb(Map* value); |
1135 | 1138 |
1136 // During garbage collection, the map word of a heap object does not | 1139 // During garbage collection, the map word of a heap object does not |
1137 // necessarily contain a map pointer. | 1140 // necessarily contain a map pointer. |
1138 inline MapWord map_word(); | 1141 inline MapWord map_word(); |
1139 inline void set_map_word(MapWord map_word); | 1142 inline void set_map_word(MapWord map_word); |
1140 | 1143 |
1141 // The Heap the object was allocated in. Used also to access Isolate. | 1144 // The Heap the object was allocated in. Used also to access Isolate. |
1142 inline Heap* GetHeap(); | 1145 inline Heap* GetHeap(); |
1143 | 1146 |
1144 // Convenience method to get current isolate. This method can be | 1147 // Convenience method to get current isolate. This method can be |
(...skipping 6820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7965 } else { | 7968 } else { |
7966 value &= ~(1 << bit_position); | 7969 value &= ~(1 << bit_position); |
7967 } | 7970 } |
7968 return value; | 7971 return value; |
7969 } | 7972 } |
7970 }; | 7973 }; |
7971 | 7974 |
7972 } } // namespace v8::internal | 7975 } } // namespace v8::internal |
7973 | 7976 |
7974 #endif // V8_OBJECTS_H_ | 7977 #endif // V8_OBJECTS_H_ |
OLD | NEW |