| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 811 |
| 812 void insert(HeapObject* target, int size) { | 812 void insert(HeapObject* target, int size) { |
| 813 *(--rear_) = reinterpret_cast<intptr_t>(target); | 813 *(--rear_) = reinterpret_cast<intptr_t>(target); |
| 814 *(--rear_) = size; | 814 *(--rear_) = size; |
| 815 // Assert no overflow into live objects. | 815 // Assert no overflow into live objects. |
| 816 ASSERT(reinterpret_cast<Address>(rear_) >= Heap::new_space()->top()); | 816 ASSERT(reinterpret_cast<Address>(rear_) >= Heap::new_space()->top()); |
| 817 } | 817 } |
| 818 | 818 |
| 819 void remove(HeapObject** target, int* size) { | 819 void remove(HeapObject** target, int* size) { |
| 820 *target = reinterpret_cast<HeapObject*>(*(--front_)); | 820 *target = reinterpret_cast<HeapObject*>(*(--front_)); |
| 821 *size = *(--front_); | 821 *size = static_cast<int>(*(--front_)); |
| 822 // Assert no underflow. | 822 // Assert no underflow. |
| 823 ASSERT(front_ >= rear_); | 823 ASSERT(front_ >= rear_); |
| 824 } | 824 } |
| 825 | 825 |
| 826 private: | 826 private: |
| 827 // The front of the queue is higher in memory than the rear. | 827 // The front of the queue is higher in memory than the rear. |
| 828 intptr_t* front_; | 828 intptr_t* front_; |
| 829 intptr_t* rear_; | 829 intptr_t* rear_; |
| 830 }; | 830 }; |
| 831 | 831 |
| (...skipping 4163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4995 void ExternalStringTable::TearDown() { | 4995 void ExternalStringTable::TearDown() { |
| 4996 new_space_strings_.Free(); | 4996 new_space_strings_.Free(); |
| 4997 old_space_strings_.Free(); | 4997 old_space_strings_.Free(); |
| 4998 } | 4998 } |
| 4999 | 4999 |
| 5000 | 5000 |
| 5001 List<Object*> ExternalStringTable::new_space_strings_; | 5001 List<Object*> ExternalStringTable::new_space_strings_; |
| 5002 List<Object*> ExternalStringTable::old_space_strings_; | 5002 List<Object*> ExternalStringTable::old_space_strings_; |
| 5003 | 5003 |
| 5004 } } // namespace v8::internal | 5004 } } // namespace v8::internal |
| OLD | NEW |