OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 __ bind(&ok); | 151 __ bind(&ok); |
152 } | 152 } |
153 | 153 |
154 // Open a frame scope to indicate that there is a frame on the stack. The | 154 // Open a frame scope to indicate that there is a frame on the stack. The |
155 // MANUAL indicates that the scope shouldn't actually generate code to set up | 155 // MANUAL indicates that the scope shouldn't actually generate code to set up |
156 // the frame (that is done below). | 156 // the frame (that is done below). |
157 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 157 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
158 | 158 |
159 info->set_prologue_offset(masm_->pc_offset()); | 159 info->set_prologue_offset(masm_->pc_offset()); |
160 ASSERT(!info->IsStub()); | 160 __ Prologue(info->IsCodePreAgingActive()); |
161 __ Prologue(info); | |
162 info->AddNoFrameRange(0, masm_->pc_offset()); | 161 info->AddNoFrameRange(0, masm_->pc_offset()); |
163 | 162 |
164 { Comment cmnt(masm_, "[ Allocate locals"); | 163 { Comment cmnt(masm_, "[ Allocate locals"); |
165 int locals_count = info->scope()->num_stack_slots(); | 164 int locals_count = info->scope()->num_stack_slots(); |
166 // Generators allocate locals, if any, in context slots. | 165 // Generators allocate locals, if any, in context slots. |
167 ASSERT(!info->function()->is_generator() || locals_count == 0); | 166 ASSERT(!info->function()->is_generator() || locals_count == 0); |
168 if (locals_count == 1) { | 167 if (locals_count == 1) { |
169 __ PushRoot(Heap::kUndefinedValueRootIndex); | 168 __ PushRoot(Heap::kUndefinedValueRootIndex); |
170 } else if (locals_count > 1) { | 169 } else if (locals_count > 1) { |
171 if (locals_count >= 128) { | 170 if (locals_count >= 128) { |
(...skipping 4629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4801 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4800 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4802 Assembler::target_address_at(call_target_address, | 4801 Assembler::target_address_at(call_target_address, |
4803 unoptimized_code)); | 4802 unoptimized_code)); |
4804 return OSR_AFTER_STACK_CHECK; | 4803 return OSR_AFTER_STACK_CHECK; |
4805 } | 4804 } |
4806 | 4805 |
4807 | 4806 |
4808 } } // namespace v8::internal | 4807 } } // namespace v8::internal |
4809 | 4808 |
4810 #endif // V8_TARGET_ARCH_X64 | 4809 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |