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

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

Issue 7619: - Removed a few indirections by making the two SemiSpaces... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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
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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 AllocationInfo* alloc_info) { 301 AllocationInfo* alloc_info) {
302 Address new_top = alloc_info->top + size_in_bytes; 302 Address new_top = alloc_info->top + size_in_bytes;
303 if (new_top > alloc_info->limit) { 303 if (new_top > alloc_info->limit) {
304 return Failure::RetryAfterGC(size_in_bytes, identity()); 304 return Failure::RetryAfterGC(size_in_bytes, identity());
305 } 305 }
306 306
307 Object* obj = HeapObject::FromAddress(alloc_info->top); 307 Object* obj = HeapObject::FromAddress(alloc_info->top);
308 alloc_info->top = new_top; 308 alloc_info->top = new_top;
309 #ifdef DEBUG 309 #ifdef DEBUG
310 SemiSpace* space = 310 SemiSpace* space =
311 (alloc_info == &allocation_info_) ? to_space_ : from_space_; 311 (alloc_info == &allocation_info_) ? &to_space_ : &from_space_;
312 ASSERT(space->low() <= alloc_info->top 312 ASSERT(space->low() <= alloc_info->top
313 && alloc_info->top <= space->high() 313 && alloc_info->top <= space->high()
314 && alloc_info->limit == space->high()); 314 && alloc_info->limit == space->high());
315 #endif 315 #endif
316 return obj; 316 return obj;
317 } 317 }
318 318
319 } } // namespace v8::internal 319 } } // namespace v8::internal
320 320
321 #endif // V8_SPACES_INL_H_ 321 #endif // V8_SPACES_INL_H_
OLDNEW
« src/spaces.cc ('K') | « src/spaces.cc ('k') | test/cctest/test-spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698