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

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

Issue 7058009: Make InToSpace/InFromSpace use the page header. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Used Clear/Set macros more in SemiSpace::Flip Created 9 years, 7 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 | « no previous file | src/ia32/code-stubs-ia32.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 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 isolate_->counters()->objs_since_last_full()->Increment(); 247 isolate_->counters()->objs_since_last_full()->Increment();
248 isolate_->counters()->objs_since_last_young()->Increment(); 248 isolate_->counters()->objs_since_last_young()->Increment();
249 #endif 249 #endif
250 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); 250 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize);
251 if (result->IsFailure()) old_gen_exhausted_ = true; 251 if (result->IsFailure()) old_gen_exhausted_ = true;
252 return result; 252 return result;
253 } 253 }
254 254
255 255
256 bool Heap::InNewSpace(Object* object) { 256 bool Heap::InNewSpace(Object* object) {
257 bool result = new_space_.PageContains(object); 257 bool result = new_space_.Contains(object);
258 ASSERT(!result || // Either not in new space 258 ASSERT(!result || // Either not in new space
259 gc_state_ != NOT_IN_GC || // ... or in the middle of GC 259 gc_state_ != NOT_IN_GC || // ... or in the middle of GC
260 InToSpace(object)); // ... or in to-space (where we allocate). 260 InToSpace(object)); // ... or in to-space (where we allocate).
261 return result; 261 return result;
262 } 262 }
263 263
264 264
265 bool Heap::InNewSpace(Address addr) { 265 bool Heap::InNewSpace(Address addr) {
266 return new_space_.Contains(addr); 266 return new_space_.Contains(addr);
267 } 267 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 693
694 694
695 Heap* _inline_get_heap_() { 695 Heap* _inline_get_heap_() {
696 return HEAP; 696 return HEAP;
697 } 697 }
698 698
699 699
700 } } // namespace v8::internal 700 } } // namespace v8::internal
701 701
702 #endif // V8_HEAP_INL_H_ 702 #endif // V8_HEAP_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698