OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2528 int arg_count = args->length(); | 2528 int arg_count = args->length(); |
2529 { PreservePositionScope scope(masm()->positions_recorder()); | 2529 { PreservePositionScope scope(masm()->positions_recorder()); |
2530 for (int i = 0; i < arg_count; i++) { | 2530 for (int i = 0; i < arg_count; i++) { |
2531 VisitForStackValue(args->at(i)); | 2531 VisitForStackValue(args->at(i)); |
2532 } | 2532 } |
2533 __ Move(rcx, name); | 2533 __ Move(rcx, name); |
2534 } | 2534 } |
2535 // Record source position for debugger. | 2535 // Record source position for debugger. |
2536 SetSourcePosition(expr->position()); | 2536 SetSourcePosition(expr->position()); |
2537 // Call the IC initialization code. | 2537 // Call the IC initialization code. |
2538 Handle<Code> ic = | 2538 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arg_count); |
2539 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode); | |
2540 TypeFeedbackId ast_id = mode == CONTEXTUAL | 2539 TypeFeedbackId ast_id = mode == CONTEXTUAL |
2541 ? TypeFeedbackId::None() | 2540 ? TypeFeedbackId::None() |
2542 : expr->CallFeedbackId(); | 2541 : expr->CallFeedbackId(); |
2543 CallIC(ic, mode, ast_id); | 2542 CallIC(ic, mode, ast_id); |
2544 RecordJSReturnSite(expr); | 2543 RecordJSReturnSite(expr); |
2545 // Restore context register. | 2544 // Restore context register. |
2546 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2545 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2547 context()->Plug(rax); | 2546 context()->Plug(rax); |
2548 } | 2547 } |
2549 | 2548 |
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4127 | 4126 |
4128 // Push the arguments ("left-to-right"). | 4127 // Push the arguments ("left-to-right"). |
4129 int arg_count = args->length(); | 4128 int arg_count = args->length(); |
4130 for (int i = 0; i < arg_count; i++) { | 4129 for (int i = 0; i < arg_count; i++) { |
4131 VisitForStackValue(args->at(i)); | 4130 VisitForStackValue(args->at(i)); |
4132 } | 4131 } |
4133 | 4132 |
4134 if (expr->is_jsruntime()) { | 4133 if (expr->is_jsruntime()) { |
4135 // Call the JS runtime function using a call IC. | 4134 // Call the JS runtime function using a call IC. |
4136 __ Move(rcx, expr->name()); | 4135 __ Move(rcx, expr->name()); |
4137 ContextualMode mode = NOT_CONTEXTUAL; | 4136 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arg_count); |
4138 Handle<Code> ic = | 4137 CallIC(ic, NOT_CONTEXTUAL, expr->CallRuntimeFeedbackId()); |
4139 isolate()->stub_cache()->ComputeCallInitialize(arg_count, mode); | |
4140 CallIC(ic, mode, expr->CallRuntimeFeedbackId()); | |
4141 // Restore context register. | 4138 // Restore context register. |
4142 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 4139 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
4143 } else { | 4140 } else { |
4144 __ CallRuntime(expr->function(), arg_count); | 4141 __ CallRuntime(expr->function(), arg_count); |
4145 } | 4142 } |
4146 context()->Plug(rax); | 4143 context()->Plug(rax); |
4147 } | 4144 } |
4148 | 4145 |
4149 | 4146 |
4150 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4147 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4885 | 4882 |
4886 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4883 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4887 Assembler::target_address_at(call_target_address)); | 4884 Assembler::target_address_at(call_target_address)); |
4888 return OSR_AFTER_STACK_CHECK; | 4885 return OSR_AFTER_STACK_CHECK; |
4889 } | 4886 } |
4890 | 4887 |
4891 | 4888 |
4892 } } // namespace v8::internal | 4889 } } // namespace v8::internal |
4893 | 4890 |
4894 #endif // V8_TARGET_ARCH_X64 | 4891 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |