OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1178 void HeapObject::VerifySmiField(int offset) { | 1178 void HeapObject::VerifySmiField(int offset) { |
1179 CHECK(READ_FIELD(this, offset)->IsSmi()); | 1179 CHECK(READ_FIELD(this, offset)->IsSmi()); |
1180 } | 1180 } |
1181 #endif | 1181 #endif |
1182 | 1182 |
1183 | 1183 |
1184 Heap* HeapObject::GetHeap() { | 1184 Heap* HeapObject::GetHeap() { |
1185 Heap* heap = | 1185 Heap* heap = |
1186 MemoryChunk::FromAddress(reinterpret_cast<Address>(this))->heap(); | 1186 MemoryChunk::FromAddress(reinterpret_cast<Address>(this))->heap(); |
1187 ASSERT(heap != NULL); | 1187 ASSERT(heap != NULL); |
1188 ASSERT(heap->isolate() == Isolate::Current()); | |
1189 return heap; | 1188 return heap; |
1190 } | 1189 } |
1191 | 1190 |
1192 | 1191 |
1193 Isolate* HeapObject::GetIsolate() { | 1192 Isolate* HeapObject::GetIsolate() { |
1194 return GetHeap()->isolate(); | 1193 return GetHeap()->isolate(); |
1195 } | 1194 } |
1196 | 1195 |
1197 | 1196 |
1198 Map* HeapObject::map() { | 1197 Map* HeapObject::map() { |
(...skipping 4971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6170 | 6169 |
6171 | 6170 |
6172 ACCESSORS(TypeFeedbackInfo, type_feedback_cells, TypeFeedbackCells, | 6171 ACCESSORS(TypeFeedbackInfo, type_feedback_cells, TypeFeedbackCells, |
6173 kTypeFeedbackCellsOffset) | 6172 kTypeFeedbackCellsOffset) |
6174 | 6173 |
6175 | 6174 |
6176 SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot) | 6175 SMI_ACCESSORS(AliasedArgumentsEntry, aliased_context_slot, kAliasedContextSlot) |
6177 | 6176 |
6178 | 6177 |
6179 Relocatable::Relocatable(Isolate* isolate) { | 6178 Relocatable::Relocatable(Isolate* isolate) { |
6180 ASSERT(isolate == Isolate::Current()); | |
6181 isolate_ = isolate; | 6179 isolate_ = isolate; |
6182 prev_ = isolate->relocatable_top(); | 6180 prev_ = isolate->relocatable_top(); |
6183 isolate->set_relocatable_top(this); | 6181 isolate->set_relocatable_top(this); |
6184 } | 6182 } |
6185 | 6183 |
6186 | 6184 |
6187 Relocatable::~Relocatable() { | 6185 Relocatable::~Relocatable() { |
6188 ASSERT(isolate_ == Isolate::Current()); | |
6189 ASSERT_EQ(isolate_->relocatable_top(), this); | 6186 ASSERT_EQ(isolate_->relocatable_top(), this); |
6190 isolate_->set_relocatable_top(prev_); | 6187 isolate_->set_relocatable_top(prev_); |
6191 } | 6188 } |
6192 | 6189 |
6193 | 6190 |
6194 int JSObject::BodyDescriptor::SizeOf(Map* map, HeapObject* object) { | 6191 int JSObject::BodyDescriptor::SizeOf(Map* map, HeapObject* object) { |
6195 return map->instance_size(); | 6192 return map->instance_size(); |
6196 } | 6193 } |
6197 | 6194 |
6198 | 6195 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6280 #undef WRITE_UINT32_FIELD | 6277 #undef WRITE_UINT32_FIELD |
6281 #undef READ_SHORT_FIELD | 6278 #undef READ_SHORT_FIELD |
6282 #undef WRITE_SHORT_FIELD | 6279 #undef WRITE_SHORT_FIELD |
6283 #undef READ_BYTE_FIELD | 6280 #undef READ_BYTE_FIELD |
6284 #undef WRITE_BYTE_FIELD | 6281 #undef WRITE_BYTE_FIELD |
6285 | 6282 |
6286 | 6283 |
6287 } } // namespace v8::internal | 6284 } } // namespace v8::internal |
6288 | 6285 |
6289 #endif // V8_OBJECTS_INL_H_ | 6286 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |