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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 __ CmpObjectType(rcx, FIRST_JS_RECEIVER_TYPE, rcx); | 112 __ CmpObjectType(rcx, FIRST_JS_RECEIVER_TYPE, rcx); |
113 __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); | 113 __ Assert(above_equal, kSloppyFunctionExpectsJSReceiverReceiver); |
114 } | 114 } |
115 | 115 |
116 // Open a frame scope to indicate that there is a frame on the stack. The | 116 // Open a frame scope to indicate that there is a frame on the stack. The |
117 // MANUAL indicates that the scope shouldn't actually generate code to set up | 117 // MANUAL indicates that the scope shouldn't actually generate code to set up |
118 // the frame (that is done below). | 118 // the frame (that is done below). |
119 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 119 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
120 | 120 |
121 info->set_prologue_offset(masm_->pc_offset()); | 121 info->set_prologue_offset(masm_->pc_offset()); |
122 __ Prologue(info->IsCodePreAgingActive()); | 122 __ Prologue(info->GeneratePreagedPrologue()); |
123 | 123 |
124 { Comment cmnt(masm_, "[ Allocate locals"); | 124 { Comment cmnt(masm_, "[ Allocate locals"); |
125 int locals_count = info->scope()->num_stack_slots(); | 125 int locals_count = info->scope()->num_stack_slots(); |
126 // Generators allocate locals, if any, in context slots. | 126 // Generators allocate locals, if any, in context slots. |
127 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | 127 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); |
128 if (locals_count == 1) { | 128 if (locals_count == 1) { |
129 __ PushRoot(Heap::kUndefinedValueRootIndex); | 129 __ PushRoot(Heap::kUndefinedValueRootIndex); |
130 } else if (locals_count > 1) { | 130 } else if (locals_count > 1) { |
131 if (locals_count >= 128) { | 131 if (locals_count >= 128) { |
132 Label ok; | 132 Label ok; |
(...skipping 4618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4751 Assembler::target_address_at(call_target_address, | 4751 Assembler::target_address_at(call_target_address, |
4752 unoptimized_code)); | 4752 unoptimized_code)); |
4753 return OSR_AFTER_STACK_CHECK; | 4753 return OSR_AFTER_STACK_CHECK; |
4754 } | 4754 } |
4755 | 4755 |
4756 | 4756 |
4757 } // namespace internal | 4757 } // namespace internal |
4758 } // namespace v8 | 4758 } // namespace v8 |
4759 | 4759 |
4760 #endif // V8_TARGET_ARCH_X64 | 4760 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |