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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2116 // Assignment to a property, using a keyed store IC. | 2116 // Assignment to a property, using a keyed store IC. |
2117 PopOperand(StoreDescriptor::NameRegister()); // Key. | 2117 PopOperand(StoreDescriptor::NameRegister()); // Key. |
2118 PopOperand(StoreDescriptor::ReceiverRegister()); | 2118 PopOperand(StoreDescriptor::ReceiverRegister()); |
2119 DCHECK(StoreDescriptor::ValueRegister().is(rax)); | 2119 DCHECK(StoreDescriptor::ValueRegister().is(rax)); |
2120 CallKeyedStoreIC(expr->AssignmentSlot()); | 2120 CallKeyedStoreIC(expr->AssignmentSlot()); |
2121 | 2121 |
2122 PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); | 2122 PrepareForBailoutForId(expr->AssignmentId(), BailoutState::TOS_REGISTER); |
2123 context()->Plug(rax); | 2123 context()->Plug(rax); |
2124 } | 2124 } |
2125 | 2125 |
2126 | |
2127 void FullCodeGenerator::CallIC(Handle<Code> code, | |
2128 TypeFeedbackId ast_id) { | |
2129 ic_total_count_++; | |
2130 __ call(code, RelocInfo::CODE_TARGET, ast_id); | |
2131 } | |
2132 | |
2133 | |
2134 // Code common for calls using the IC. | 2126 // Code common for calls using the IC. |
2135 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { | 2127 void FullCodeGenerator::EmitCallWithLoadIC(Call* expr) { |
2136 Expression* callee = expr->expression(); | 2128 Expression* callee = expr->expression(); |
2137 | 2129 |
2138 // Get the target function. | 2130 // Get the target function. |
2139 ConvertReceiverMode convert_mode; | 2131 ConvertReceiverMode convert_mode; |
2140 if (callee->IsVariableProxy()) { | 2132 if (callee->IsVariableProxy()) { |
2141 { StackValueContext context(this); | 2133 { StackValueContext context(this); |
2142 EmitVariableLoad(callee->AsVariableProxy()); | 2134 EmitVariableLoad(callee->AsVariableProxy()); |
2143 PrepareForBailout(callee, BailoutState::NO_REGISTERS); | 2135 PrepareForBailout(callee, BailoutState::NO_REGISTERS); |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3521 DCHECK_EQ( | 3513 DCHECK_EQ( |
3522 isolate->builtins()->OnStackReplacement()->entry(), | 3514 isolate->builtins()->OnStackReplacement()->entry(), |
3523 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3515 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3524 return ON_STACK_REPLACEMENT; | 3516 return ON_STACK_REPLACEMENT; |
3525 } | 3517 } |
3526 | 3518 |
3527 } // namespace internal | 3519 } // namespace internal |
3528 } // namespace v8 | 3520 } // namespace v8 |
3529 | 3521 |
3530 #endif // V8_TARGET_ARCH_X64 | 3522 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |