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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 } | 564 } |
565 } | 565 } |
566 | 566 |
567 | 567 |
568 // Verify() is inline to avoid ifdef-s around its calls in release | 568 // Verify() is inline to avoid ifdef-s around its calls in release |
569 // mode. | 569 // mode. |
570 void ExternalStringTable::Verify() { | 570 void ExternalStringTable::Verify() { |
571 #ifdef DEBUG | 571 #ifdef DEBUG |
572 for (int i = 0; i < new_space_strings_.length(); ++i) { | 572 for (int i = 0; i < new_space_strings_.length(); ++i) { |
573 ASSERT(heap_->InNewSpace(new_space_strings_[i])); | 573 ASSERT(heap_->InNewSpace(new_space_strings_[i])); |
574 ASSERT(new_space_strings_[i] != HEAP->raw_unchecked_null_value()); | 574 ASSERT(new_space_strings_[i] != HEAP->raw_unchecked_the_hole_value()); |
575 } | 575 } |
576 for (int i = 0; i < old_space_strings_.length(); ++i) { | 576 for (int i = 0; i < old_space_strings_.length(); ++i) { |
577 ASSERT(!heap_->InNewSpace(old_space_strings_[i])); | 577 ASSERT(!heap_->InNewSpace(old_space_strings_[i])); |
578 ASSERT(old_space_strings_[i] != HEAP->raw_unchecked_null_value()); | 578 ASSERT(old_space_strings_[i] != HEAP->raw_unchecked_the_hole_value()); |
579 } | 579 } |
580 #endif | 580 #endif |
581 } | 581 } |
582 | 582 |
583 | 583 |
584 void ExternalStringTable::AddOldString(String* string) { | 584 void ExternalStringTable::AddOldString(String* string) { |
585 ASSERT(string->IsExternalString()); | 585 ASSERT(string->IsExternalString()); |
586 ASSERT(!heap_->InNewSpace(string)); | 586 ASSERT(!heap_->InNewSpace(string)); |
587 old_space_strings_.Add(string); | 587 old_space_strings_.Add(string); |
588 } | 588 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 676 |
677 | 677 |
678 Heap* _inline_get_heap_() { | 678 Heap* _inline_get_heap_() { |
679 return HEAP; | 679 return HEAP; |
680 } | 680 } |
681 | 681 |
682 | 682 |
683 } } // namespace v8::internal | 683 } } // namespace v8::internal |
684 | 684 |
685 #endif // V8_HEAP_INL_H_ | 685 #endif // V8_HEAP_INL_H_ |
OLD | NEW |