OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 elements_.Add(element); | 75 elements_.Add(element); |
76 } else { | 76 } else { |
77 Use(reg, element_count()); | 77 Use(reg, element_count()); |
78 FrameElement element = | 78 FrameElement element = |
79 FrameElement::RegisterElement(reg, FrameElement::NOT_SYNCED, info); | 79 FrameElement::RegisterElement(reg, FrameElement::NOT_SYNCED, info); |
80 elements_.Add(element); | 80 elements_.Add(element); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 | 84 |
| 85 bool VirtualFrame::ConstantPoolOverflowed() { |
| 86 return FrameElement::ConstantPoolOverflowed(); |
| 87 } |
| 88 |
| 89 |
85 void VirtualFrame::Push(Handle<Object> value) { | 90 void VirtualFrame::Push(Handle<Object> value) { |
| 91 ASSERT(!ConstantPoolOverflowed()); |
86 FrameElement element = | 92 FrameElement element = |
87 FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED); | 93 FrameElement::ConstantElement(value, FrameElement::NOT_SYNCED); |
88 elements_.Add(element); | 94 elements_.Add(element); |
89 } | 95 } |
90 | 96 |
91 | 97 |
92 bool VirtualFrame::Equals(VirtualFrame* other) { | 98 bool VirtualFrame::Equals(VirtualFrame* other) { |
93 #ifdef DEBUG | 99 #ifdef DEBUG |
94 for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) { | 100 for (int i = 0; i < RegisterAllocator::kNumRegisters; i++) { |
95 if (register_location(i) != other->register_location(i)) { | 101 if (register_location(i) != other->register_location(i)) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 189 } |
184 | 190 |
185 | 191 |
186 int VirtualFrame::local_count() { | 192 int VirtualFrame::local_count() { |
187 return cgen()->scope()->num_stack_slots(); | 193 return cgen()->scope()->num_stack_slots(); |
188 } | 194 } |
189 | 195 |
190 } } // namespace v8::internal | 196 } } // namespace v8::internal |
191 | 197 |
192 #endif // V8_VIRTUAL_FRAME_HEAVY_INL_H_ | 198 #endif // V8_VIRTUAL_FRAME_HEAVY_INL_H_ |
OLD | NEW |