| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 | 191 |
| 192 void VirtualFrame::EmitPush(Immediate immediate) { | 192 void VirtualFrame::EmitPush(Immediate immediate) { |
| 193 ASSERT(stack_pointer_ == element_count() - 1); | 193 ASSERT(stack_pointer_ == element_count() - 1); |
| 194 elements_.Add(FrameElement::MemoryElement()); | 194 elements_.Add(FrameElement::MemoryElement()); |
| 195 stack_pointer_++; | 195 stack_pointer_++; |
| 196 __ push(immediate); | 196 __ push(immediate); |
| 197 } | 197 } |
| 198 | 198 |
| 199 | 199 |
| 200 void VirtualFrame::EmitPush(Handle<Object> value) { |
| 201 ASSERT(stack_pointer_ == element_count() - 1); |
| 202 elements_.Add(FrameElement::MemoryElement()); |
| 203 stack_pointer_++; |
| 204 __ Push(value); |
| 205 } |
| 206 |
| 207 |
| 200 void VirtualFrame::Drop(int count) { | 208 void VirtualFrame::Drop(int count) { |
| 201 ASSERT(height() >= count); | 209 ASSERT(height() >= count); |
| 202 int num_virtual_elements = (element_count() - 1) - stack_pointer_; | 210 int num_virtual_elements = (element_count() - 1) - stack_pointer_; |
| 203 | 211 |
| 204 // Emit code to lower the stack pointer if necessary. | 212 // Emit code to lower the stack pointer if necessary. |
| 205 if (num_virtual_elements < count) { | 213 if (num_virtual_elements < count) { |
| 206 int num_dropped = count - num_virtual_elements; | 214 int num_dropped = count - num_virtual_elements; |
| 207 stack_pointer_ -= num_dropped; | 215 stack_pointer_ -= num_dropped; |
| 208 __ addq(rsp, Immediate(num_dropped * kPointerSize)); | 216 __ addq(rsp, Immediate(num_dropped * kPointerSize)); |
| 209 } | 217 } |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 987 | 995 |
| 988 name.Unuse(); | 996 name.Unuse(); |
| 989 value.Unuse(); | 997 value.Unuse(); |
| 990 return RawCallCodeObject(ic, RelocInfo::CODE_TARGET); | 998 return RawCallCodeObject(ic, RelocInfo::CODE_TARGET); |
| 991 } | 999 } |
| 992 | 1000 |
| 993 | 1001 |
| 994 #undef __ | 1002 #undef __ |
| 995 | 1003 |
| 996 } } // namespace v8::internal | 1004 } } // namespace v8::internal |
| OLD | NEW |