| OLD | NEW |
| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 122 } |
| 123 | 123 |
| 124 | 124 |
| 125 Object* Heap::AllocateRawMap() { | 125 Object* Heap::AllocateRawMap() { |
| 126 #ifdef DEBUG | 126 #ifdef DEBUG |
| 127 Counters::objs_since_last_full.Increment(); | 127 Counters::objs_since_last_full.Increment(); |
| 128 Counters::objs_since_last_young.Increment(); | 128 Counters::objs_since_last_young.Increment(); |
| 129 #endif | 129 #endif |
| 130 Object* result = map_space_->AllocateRaw(Map::kSize); | 130 Object* result = map_space_->AllocateRaw(Map::kSize); |
| 131 if (result->IsFailure()) old_gen_exhausted_ = true; | 131 if (result->IsFailure()) old_gen_exhausted_ = true; |
| 132 #ifdef DEBUG |
| 133 if (!result->IsFailure()) { |
| 134 // Maps have their own alignment. |
| 135 CHECK((OffsetFrom(result) & kMapAlignmentMask) == kHeapObjectTag); |
| 136 } |
| 137 #endif |
| 132 return result; | 138 return result; |
| 133 } | 139 } |
| 134 | 140 |
| 135 | 141 |
| 136 Object* Heap::AllocateRawCell() { | 142 Object* Heap::AllocateRawCell() { |
| 137 #ifdef DEBUG | 143 #ifdef DEBUG |
| 138 Counters::objs_since_last_full.Increment(); | 144 Counters::objs_since_last_full.Increment(); |
| 139 Counters::objs_since_last_young.Increment(); | 145 Counters::objs_since_last_young.Increment(); |
| 140 #endif | 146 #endif |
| 141 Object* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); | 147 Object* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 | 386 |
| 381 | 387 |
| 382 void ExternalStringTable::ShrinkNewStrings(int position) { | 388 void ExternalStringTable::ShrinkNewStrings(int position) { |
| 383 new_space_strings_.Rewind(position); | 389 new_space_strings_.Rewind(position); |
| 384 Verify(); | 390 Verify(); |
| 385 } | 391 } |
| 386 | 392 |
| 387 } } // namespace v8::internal | 393 } } // namespace v8::internal |
| 388 | 394 |
| 389 #endif // V8_HEAP_INL_H_ | 395 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |