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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2898 ZoneList<Expression*>* args = expr->arguments(); | 2898 ZoneList<Expression*>* args = expr->arguments(); |
2899 int arg_count = args->length(); | 2899 int arg_count = args->length(); |
2900 { PreservePositionScope scope(masm()->positions_recorder()); | 2900 { PreservePositionScope scope(masm()->positions_recorder()); |
2901 for (int i = 0; i < arg_count; i++) { | 2901 for (int i = 0; i < arg_count; i++) { |
2902 VisitForStackValue(args->at(i)); | 2902 VisitForStackValue(args->at(i)); |
2903 } | 2903 } |
2904 } | 2904 } |
2905 | 2905 |
2906 // Record source position of the IC call. | 2906 // Record source position of the IC call. |
2907 SetSourcePosition(expr->position()); | 2907 SetSourcePosition(expr->position()); |
2908 Handle<Code> ic = CallIC::initialize_stub( | 2908 Handle<Code> ic = CodeFactory::CallIC(isolate(), arg_count, call_type).code(); |
2909 isolate(), arg_count, call_type); | |
2910 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot())); | 2909 __ Move(rdx, SmiFromSlot(expr->CallFeedbackSlot())); |
2911 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2910 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
2912 // Don't assign a type feedback id to the IC, since type feedback is provided | 2911 // Don't assign a type feedback id to the IC, since type feedback is provided |
2913 // by the vector above. | 2912 // by the vector above. |
2914 CallIC(ic); | 2913 CallIC(ic); |
2915 | 2914 |
2916 RecordJSReturnSite(expr); | 2915 RecordJSReturnSite(expr); |
2917 | 2916 |
2918 // Restore context register. | 2917 // Restore context register. |
2919 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2918 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
(...skipping 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5302 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5301 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5303 Assembler::target_address_at(call_target_address, | 5302 Assembler::target_address_at(call_target_address, |
5304 unoptimized_code)); | 5303 unoptimized_code)); |
5305 return OSR_AFTER_STACK_CHECK; | 5304 return OSR_AFTER_STACK_CHECK; |
5306 } | 5305 } |
5307 | 5306 |
5308 | 5307 |
5309 } } // namespace v8::internal | 5308 } } // namespace v8::internal |
5310 | 5309 |
5311 #endif // V8_TARGET_ARCH_X64 | 5310 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |