| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 306 #ifdef DEBUG | 306 #ifdef DEBUG | 
| 307   isolate_->counters()->objs_since_last_full()->Increment(); | 307   isolate_->counters()->objs_since_last_full()->Increment(); | 
| 308   isolate_->counters()->objs_since_last_young()->Increment(); | 308   isolate_->counters()->objs_since_last_young()->Increment(); | 
| 309 #endif | 309 #endif | 
| 310   MaybeObject* result = cell_space_->AllocateRaw(Cell::kSize); | 310   MaybeObject* result = cell_space_->AllocateRaw(Cell::kSize); | 
| 311   if (result->IsFailure()) old_gen_exhausted_ = true; | 311   if (result->IsFailure()) old_gen_exhausted_ = true; | 
| 312   return result; | 312   return result; | 
| 313 } | 313 } | 
| 314 | 314 | 
| 315 | 315 | 
| 316 MaybeObject* Heap::AllocateRawJSGlobalPropertyCell() { | 316 MaybeObject* Heap::AllocateRawPropertyCell() { | 
| 317 #ifdef DEBUG | 317 #ifdef DEBUG | 
| 318   isolate_->counters()->objs_since_last_full()->Increment(); | 318   isolate_->counters()->objs_since_last_full()->Increment(); | 
| 319   isolate_->counters()->objs_since_last_young()->Increment(); | 319   isolate_->counters()->objs_since_last_young()->Increment(); | 
| 320 #endif | 320 #endif | 
| 321   MaybeObject* result = | 321   MaybeObject* result = | 
| 322       property_cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); | 322       property_cell_space_->AllocateRaw(PropertyCell::kSize); | 
| 323   if (result->IsFailure()) old_gen_exhausted_ = true; | 323   if (result->IsFailure()) old_gen_exhausted_ = true; | 
| 324   return result; | 324   return result; | 
| 325 } | 325 } | 
| 326 | 326 | 
| 327 | 327 | 
| 328 bool Heap::InNewSpace(Object* object) { | 328 bool Heap::InNewSpace(Object* object) { | 
| 329   bool result = new_space_.Contains(object); | 329   bool result = new_space_.Contains(object); | 
| 330   ASSERT(!result ||                  // Either not in new space | 330   ASSERT(!result ||                  // Either not in new space | 
| 331          gc_state_ != NOT_IN_GC ||   // ... or in the middle of GC | 331          gc_state_ != NOT_IN_GC ||   // ... or in the middle of GC | 
| 332          InToSpace(object));         // ... or in to-space (where we allocate). | 332          InToSpace(object));         // ... or in to-space (where we allocate). | 
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 862 DisallowAllocationFailure::~DisallowAllocationFailure() { | 862 DisallowAllocationFailure::~DisallowAllocationFailure() { | 
| 863 #ifdef DEBUG | 863 #ifdef DEBUG | 
| 864   HEAP->disallow_allocation_failure_ = old_state_; | 864   HEAP->disallow_allocation_failure_ = old_state_; | 
| 865 #endif | 865 #endif | 
| 866 } | 866 } | 
| 867 | 867 | 
| 868 | 868 | 
| 869 } }  // namespace v8::internal | 869 } }  // namespace v8::internal | 
| 870 | 870 | 
| 871 #endif  // V8_HEAP_INL_H_ | 871 #endif  // V8_HEAP_INL_H_ | 
| OLD | NEW | 
|---|