| 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/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
| 8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
| 9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // the frame (that is done below). | 115 // the frame (that is done below). |
| 116 FrameScope frame_scope(masm_, StackFrame::MANUAL); | 116 FrameScope frame_scope(masm_, StackFrame::MANUAL); |
| 117 | 117 |
| 118 info->set_prologue_offset(masm_->pc_offset()); | 118 info->set_prologue_offset(masm_->pc_offset()); |
| 119 __ Prologue(info->GeneratePreagedPrologue()); | 119 __ Prologue(info->GeneratePreagedPrologue()); |
| 120 | 120 |
| 121 // Increment invocation count for the function. | 121 // Increment invocation count for the function. |
| 122 { | 122 { |
| 123 Comment cmnt(masm_, "[ Increment invocation count"); | 123 Comment cmnt(masm_, "[ Increment invocation count"); |
| 124 __ movp(rcx, FieldOperand(rdi, JSFunction::kFeedbackVectorOffset)); | 124 __ movp(rcx, FieldOperand(rdi, JSFunction::kFeedbackVectorOffset)); |
| 125 __ movp(rcx, FieldOperand(rcx, Cell::kValueOffset)); |
| 125 __ SmiAddConstant( | 126 __ SmiAddConstant( |
| 126 FieldOperand(rcx, | 127 FieldOperand(rcx, |
| 127 TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 128 TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 128 TypeFeedbackVector::kHeaderSize), | 129 TypeFeedbackVector::kHeaderSize), |
| 129 Smi::FromInt(1)); | 130 Smi::FromInt(1)); |
| 130 } | 131 } |
| 131 | 132 |
| 132 { Comment cmnt(masm_, "[ Allocate locals"); | 133 { Comment cmnt(masm_, "[ Allocate locals"); |
| 133 int locals_count = info->scope()->num_stack_slots(); | 134 int locals_count = info->scope()->num_stack_slots(); |
| 134 OperandStackDepthIncrement(locals_count); | 135 OperandStackDepthIncrement(locals_count); |
| (...skipping 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2762 DCHECK_EQ( | 2763 DCHECK_EQ( |
| 2763 isolate->builtins()->OnStackReplacement()->entry(), | 2764 isolate->builtins()->OnStackReplacement()->entry(), |
| 2764 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2765 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2765 return ON_STACK_REPLACEMENT; | 2766 return ON_STACK_REPLACEMENT; |
| 2766 } | 2767 } |
| 2767 | 2768 |
| 2768 } // namespace internal | 2769 } // namespace internal |
| 2769 } // namespace v8 | 2770 } // namespace v8 |
| 2770 | 2771 |
| 2771 #endif // V8_TARGET_ARCH_X64 | 2772 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |