| OLD | NEW |
| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 if (object != NULL) { | 282 if (object != NULL) { |
| 283 return object; | 283 return object; |
| 284 } | 284 } |
| 285 | 285 |
| 286 return Failure::RetryAfterGC(identity()); | 286 return Failure::RetryAfterGC(identity()); |
| 287 } | 287 } |
| 288 | 288 |
| 289 | 289 |
| 290 // ----------------------------------------------------------------------------- | 290 // ----------------------------------------------------------------------------- |
| 291 // NewSpace | 291 // NewSpace |
| 292 | |
| 293 MaybeObject* NewSpace::AllocateRawInternal(int size_in_bytes) { | 292 MaybeObject* NewSpace::AllocateRawInternal(int size_in_bytes) { |
| 294 Address old_top = allocation_info_.top; | 293 Address old_top = allocation_info_.top; |
| 295 if (allocation_info_.limit - old_top < size_in_bytes) { | 294 if (allocation_info_.limit - old_top < size_in_bytes) { |
| 296 Address new_top = old_top + size_in_bytes; | 295 Address new_top = old_top + size_in_bytes; |
| 297 Address high = to_space_.page_high(); | 296 Address high = to_space_.page_high(); |
| 298 if (allocation_info_.limit < high) { | 297 if (allocation_info_.limit < high) { |
| 299 // Incremental marking has lowered the limit to get a | 298 // Incremental marking has lowered the limit to get a |
| 300 // chance to do a step. | 299 // chance to do a step. |
| 301 allocation_info_.limit = Min( | 300 allocation_info_.limit = Min( |
| 302 allocation_info_.limit + inline_allocation_limit_step_, | 301 allocation_info_.limit + inline_allocation_limit_step_, |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 Map* map = object->map(); | 355 Map* map = object->map(); |
| 357 Heap* heap = object->GetHeap(); | 356 Heap* heap = object->GetHeap(); |
| 358 return map == heap->raw_unchecked_free_space_map() | 357 return map == heap->raw_unchecked_free_space_map() |
| 359 || map == heap->raw_unchecked_one_pointer_filler_map() | 358 || map == heap->raw_unchecked_one_pointer_filler_map() |
| 360 || map == heap->raw_unchecked_two_pointer_filler_map(); | 359 || map == heap->raw_unchecked_two_pointer_filler_map(); |
| 361 } | 360 } |
| 362 | 361 |
| 363 } } // namespace v8::internal | 362 } } // namespace v8::internal |
| 364 | 363 |
| 365 #endif // V8_SPACES_INL_H_ | 364 #endif // V8_SPACES_INL_H_ |
| OLD | NEW |