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

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

Issue 11028027: Revert trunk to bleeding_edge at r12484 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 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/spaces.cc ('k') | src/string-stream.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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 // Raw allocation. 262 // Raw allocation.
263 MaybeObject* PagedSpace::AllocateRaw(int size_in_bytes) { 263 MaybeObject* PagedSpace::AllocateRaw(int size_in_bytes) {
264 HeapObject* object = AllocateLinearly(size_in_bytes); 264 HeapObject* object = AllocateLinearly(size_in_bytes);
265 if (object != NULL) { 265 if (object != NULL) {
266 if (identity() == CODE_SPACE) { 266 if (identity() == CODE_SPACE) {
267 SkipList::Update(object->address(), size_in_bytes); 267 SkipList::Update(object->address(), size_in_bytes);
268 } 268 }
269 return object; 269 return object;
270 } 270 }
271 271
272 ASSERT(!heap()->linear_allocation() ||
273 (anchor_.next_chunk() == &anchor_ &&
274 anchor_.prev_chunk() == &anchor_));
275
276 object = free_list_.Allocate(size_in_bytes); 272 object = free_list_.Allocate(size_in_bytes);
277 if (object != NULL) { 273 if (object != NULL) {
278 if (identity() == CODE_SPACE) { 274 if (identity() == CODE_SPACE) {
279 SkipList::Update(object->address(), size_in_bytes); 275 SkipList::Update(object->address(), size_in_bytes);
280 } 276 }
281 return object; 277 return object;
282 } 278 }
283 279
284 object = SlowAllocateRaw(size_in_bytes); 280 object = SlowAllocateRaw(size_in_bytes);
285 if (object != NULL) { 281 if (object != NULL) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 Map* map = object->map(); 355 Map* map = object->map();
360 Heap* heap = object->GetHeap(); 356 Heap* heap = object->GetHeap();
361 return map == heap->raw_unchecked_free_space_map() 357 return map == heap->raw_unchecked_free_space_map()
362 || map == heap->raw_unchecked_one_pointer_filler_map() 358 || map == heap->raw_unchecked_one_pointer_filler_map()
363 || map == heap->raw_unchecked_two_pointer_filler_map(); 359 || map == heap->raw_unchecked_two_pointer_filler_map();
364 } 360 }
365 361
366 } } // namespace v8::internal 362 } } // namespace v8::internal
367 363
368 #endif // V8_SPACES_INL_H_ 364 #endif // V8_SPACES_INL_H_
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | src/string-stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698