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

Side by Side Diff: src/heap-inl.h

Issue 8352045: Fix missing write barrier in deserialization. Issue 1783. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 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/heap.h ('k') | src/serialize.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 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 269
270 bool Heap::InNewSpace(Object* object) { 270 bool Heap::InNewSpace(Object* object) {
271 bool result = new_space_.Contains(object); 271 bool result = new_space_.Contains(object);
272 ASSERT(!result || // Either not in new space 272 ASSERT(!result || // Either not in new space
273 gc_state_ != NOT_IN_GC || // ... or in the middle of GC 273 gc_state_ != NOT_IN_GC || // ... or in the middle of GC
274 InToSpace(object)); // ... or in to-space (where we allocate). 274 InToSpace(object)); // ... or in to-space (where we allocate).
275 return result; 275 return result;
276 } 276 }
277 277
278 278
279 bool Heap::InMovingPage(Object* object) {
Vyacheslav Egorov (Chromium) 2011/10/21 11:34:35 I think we really don't need to invoke any increme
280 if (object->IsSmi()) return false;
281 HeapObject* heap_object = HeapObject::cast(object);
282 if (InNewSpace(heap_object)) return true;
283 Address address = heap_object->address();
284 if (lo_space()->Contains(heap_object)) return false;
285 if (old_pointer_space()->FirstPage()->Contains(address)) return false;
286 if (old_data_space()->FirstPage()->Contains(address)) return false;
287 if (map_space()->FirstPage()->Contains(address)) return false;
288 return true;
289 }
290
291
279 bool Heap::InNewSpace(Address addr) { 292 bool Heap::InNewSpace(Address addr) {
280 return new_space_.Contains(addr); 293 return new_space_.Contains(addr);
281 } 294 }
282 295
283 296
284 bool Heap::InFromSpace(Object* object) { 297 bool Heap::InFromSpace(Object* object) {
285 return new_space_.FromSpaceContains(object); 298 return new_space_.FromSpaceContains(object);
286 } 299 }
287 300
288 301
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 687
675 688
676 Heap* _inline_get_heap_() { 689 Heap* _inline_get_heap_() {
677 return HEAP; 690 return HEAP;
678 } 691 }
679 692
680 693
681 } } // namespace v8::internal 694 } } // namespace v8::internal
682 695
683 #endif // V8_HEAP_INL_H_ 696 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698