| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // MANUAL indicates that the scope shouldn't actually generate code to set up | 114 // MANUAL indicates that the scope shouldn't actually generate code to set up |
| 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 __ mov(ecx, FieldOperand(edi, JSFunction::kLiteralsOffset)); | 124 __ mov(ecx, FieldOperand(edi, JSFunction::kFeedbackVectorOffset)); |
| 125 __ mov(ecx, FieldOperand(ecx, LiteralsArray::kFeedbackVectorOffset)); | 125 __ mov(ecx, FieldOperand(ecx, Cell::kValueOffset)); |
| 126 __ add(FieldOperand( | 126 __ add(FieldOperand( |
| 127 ecx, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 127 ecx, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 128 TypeFeedbackVector::kHeaderSize), | 128 TypeFeedbackVector::kHeaderSize), |
| 129 Immediate(Smi::FromInt(1))); | 129 Immediate(Smi::FromInt(1))); |
| 130 } | 130 } |
| 131 | 131 |
| 132 { Comment cmnt(masm_, "[ Allocate locals"); | 132 { Comment cmnt(masm_, "[ Allocate locals"); |
| 133 int locals_count = info->scope()->num_stack_slots(); | 133 int locals_count = info->scope()->num_stack_slots(); |
| 134 OperandStackDepthIncrement(locals_count); | 134 OperandStackDepthIncrement(locals_count); |
| 135 if (locals_count == 1) { | 135 if (locals_count == 1) { |
| (...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2773 isolate->builtins()->OnStackReplacement()->entry(), | 2773 isolate->builtins()->OnStackReplacement()->entry(), |
| 2774 Assembler::target_address_at(call_target_address, unoptimized_code)); | 2774 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 2775 return ON_STACK_REPLACEMENT; | 2775 return ON_STACK_REPLACEMENT; |
| 2776 } | 2776 } |
| 2777 | 2777 |
| 2778 | 2778 |
| 2779 } // namespace internal | 2779 } // namespace internal |
| 2780 } // namespace v8 | 2780 } // namespace v8 |
| 2781 | 2781 |
| 2782 #endif // V8_TARGET_ARCH_X87 | 2782 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |