| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 isolate_->counters()->objs_since_last_full()->Increment(); | 247 isolate_->counters()->objs_since_last_full()->Increment(); |
| 248 isolate_->counters()->objs_since_last_young()->Increment(); | 248 isolate_->counters()->objs_since_last_young()->Increment(); |
| 249 #endif | 249 #endif |
| 250 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); | 250 MaybeObject* result = cell_space_->AllocateRaw(JSGlobalPropertyCell::kSize); |
| 251 if (result->IsFailure()) old_gen_exhausted_ = true; | 251 if (result->IsFailure()) old_gen_exhausted_ = true; |
| 252 return result; | 252 return result; |
| 253 } | 253 } |
| 254 | 254 |
| 255 | 255 |
| 256 bool Heap::InNewSpace(Object* object) { | 256 bool Heap::InNewSpace(Object* object) { |
| 257 bool result = new_space_.PageContains(object); | 257 bool result = new_space_.Contains(object); |
| 258 ASSERT(!result || // Either not in new space | 258 ASSERT(!result || // Either not in new space |
| 259 gc_state_ != NOT_IN_GC || // ... or in the middle of GC | 259 gc_state_ != NOT_IN_GC || // ... or in the middle of GC |
| 260 InToSpace(object)); // ... or in to-space (where we allocate). | 260 InToSpace(object)); // ... or in to-space (where we allocate). |
| 261 return result; | 261 return result; |
| 262 } | 262 } |
| 263 | 263 |
| 264 | 264 |
| 265 bool Heap::InNewSpace(Address addr) { | 265 bool Heap::InNewSpace(Address addr) { |
| 266 return new_space_.Contains(addr); | 266 return new_space_.Contains(addr); |
| 267 } | 267 } |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 | 693 |
| 694 | 694 |
| 695 Heap* _inline_get_heap_() { | 695 Heap* _inline_get_heap_() { |
| 696 return HEAP; | 696 return HEAP; |
| 697 } | 697 } |
| 698 | 698 |
| 699 | 699 |
| 700 } } // namespace v8::internal | 700 } } // namespace v8::internal |
| 701 | 701 |
| 702 #endif // V8_HEAP_INL_H_ | 702 #endif // V8_HEAP_INL_H_ |
| OLD | NEW |