OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 149 |
150 // Open a frame scope to indicate that there is a frame on the stack. The | 150 // Open a frame scope to indicate that there is a frame on the stack. The |
151 // MANUAL indicates that the scope shouldn't actually generate code to set up | 151 // MANUAL indicates that the scope shouldn't actually generate code to set up |
152 // the frame (that is done below). | 152 // the frame (that is done below). |
153 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 153 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
154 | 154 |
155 info->set_prologue_offset(masm_->pc_offset()); | 155 info->set_prologue_offset(masm_->pc_offset()); |
156 __ push(rbp); // Caller's frame pointer. | 156 __ push(rbp); // Caller's frame pointer. |
157 __ movq(rbp, rsp); | 157 __ movq(rbp, rsp); |
158 __ push(rsi); // Callee's context. | 158 __ push(rsi); // Callee's context. |
| 159 __ nop(); // Pre-age code. |
159 __ push(rdi); // Callee's JS Function. | 160 __ push(rdi); // Callee's JS Function. |
160 info->AddNoFrameRange(0, masm_->pc_offset()); | 161 info->AddNoFrameRange(0, masm_->pc_offset()); |
161 | 162 |
162 { Comment cmnt(masm_, "[ Allocate locals"); | 163 { Comment cmnt(masm_, "[ Allocate locals"); |
163 int locals_count = info->scope()->num_stack_slots(); | 164 int locals_count = info->scope()->num_stack_slots(); |
164 // Generators allocate locals, if any, in context slots. | 165 // Generators allocate locals, if any, in context slots. |
165 ASSERT(!info->function()->is_generator() || locals_count == 0); | 166 ASSERT(!info->function()->is_generator() || locals_count == 0); |
166 if (locals_count == 1) { | 167 if (locals_count == 1) { |
167 __ PushRoot(Heap::kUndefinedValueRootIndex); | 168 __ PushRoot(Heap::kUndefinedValueRootIndex); |
168 } else if (locals_count > 1) { | 169 } else if (locals_count > 1) { |
(...skipping 4707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4876 *context_length = 0; | 4877 *context_length = 0; |
4877 return previous_; | 4878 return previous_; |
4878 } | 4879 } |
4879 | 4880 |
4880 | 4881 |
4881 #undef __ | 4882 #undef __ |
4882 | 4883 |
4883 } } // namespace v8::internal | 4884 } } // namespace v8::internal |
4884 | 4885 |
4885 #endif // V8_TARGET_ARCH_X64 | 4886 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |