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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 for (int i = 0; i < expression_base_index(); i++) { | 124 for (int i = 0; i < expression_base_index(); i++) { |
125 SpillElementAt(i); | 125 SpillElementAt(i); |
126 } | 126 } |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 void VirtualFrame::SetTypeForParamAt(int index, TypeInfo info) { | 130 void VirtualFrame::SetTypeForParamAt(int index, TypeInfo info) { |
131 elements_[param0_index() + index].set_type_info(info); | 131 elements_[param0_index() + index].set_type_info(info); |
132 } | 132 } |
133 | 133 |
| 134 |
| 135 void VirtualFrame::Nip(int num_dropped) { |
| 136 ASSERT(num_dropped >= 0); |
| 137 if (num_dropped == 0) return; |
| 138 Result tos = Pop(); |
| 139 if (num_dropped > 1) { |
| 140 Drop(num_dropped - 1); |
| 141 } |
| 142 SetElementAt(0, &tos); |
| 143 } |
| 144 |
| 145 |
| 146 void VirtualFrame::Push(Smi* value) { |
| 147 Push(Handle<Object> (value)); |
| 148 } |
| 149 |
134 } } // namespace v8::internal | 150 } } // namespace v8::internal |
135 | 151 |
136 #endif // V8_VIRTUAL_FRAME_HEAVY_INL_H_ | 152 #endif // V8_VIRTUAL_FRAME_HEAVY_INL_H_ |
OLD | NEW |