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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 | 428 |
429 | 429 |
430 #ifdef DEBUG | 430 #ifdef DEBUG |
431 | 431 |
432 inline bool Heap::allow_allocation(bool new_state) { | 432 inline bool Heap::allow_allocation(bool new_state) { |
433 bool old = allocation_allowed_; | 433 bool old = allocation_allowed_; |
434 allocation_allowed_ = new_state; | 434 allocation_allowed_ = new_state; |
435 return old; | 435 return old; |
436 } | 436 } |
437 | 437 |
438 inline bool Heap::allow_gc(bool new_state) { | |
439 bool old = gc_allowed_; | |
440 gc_allowed_ = new_state; | |
441 return old; | |
442 } | |
443 | |
444 #endif | 438 #endif |
445 | 439 |
446 | 440 |
447 void ExternalStringTable::AddString(String* string) { | 441 void ExternalStringTable::AddString(String* string) { |
448 ASSERT(string->IsExternalString()); | 442 ASSERT(string->IsExternalString()); |
449 if (Heap::InNewSpace(string)) { | 443 if (Heap::InNewSpace(string)) { |
450 new_space_strings_.Add(string); | 444 new_space_strings_.Add(string); |
451 } else { | 445 } else { |
452 old_space_strings_.Add(string); | 446 old_space_strings_.Add(string); |
453 } | 447 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 | 484 |
491 | 485 |
492 void ExternalStringTable::ShrinkNewStrings(int position) { | 486 void ExternalStringTable::ShrinkNewStrings(int position) { |
493 new_space_strings_.Rewind(position); | 487 new_space_strings_.Rewind(position); |
494 Verify(); | 488 Verify(); |
495 } | 489 } |
496 | 490 |
497 } } // namespace v8::internal | 491 } } // namespace v8::internal |
498 | 492 |
499 #endif // V8_HEAP_INL_H_ | 493 #endif // V8_HEAP_INL_H_ |
OLD | NEW |