Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: src/interpreter/bytecode-generator.cc

Issue 1688283003: [Interpreter] Implements calls through CallICStub in the interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removes an unused label declaration. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/bytecode-generator.h" 5 #include "src/interpreter/bytecode-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/interpreter/bytecode-register-allocator.h" 9 #include "src/interpreter/bytecode-register-allocator.h"
10 #include "src/interpreter/control-flow-builders.h" 10 #include "src/interpreter/control-flow-builders.h"
(...skipping 2443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2454 Smi::FromInt(execution_context()->scope()->start_position())) 2454 Smi::FromInt(execution_context()->scope()->start_position()))
2455 .StoreAccumulatorInRegister(position); 2455 .StoreAccumulatorInRegister(position);
2456 2456
2457 // Call ResolvePossiblyDirectEval and modify the callee. 2457 // Call ResolvePossiblyDirectEval and modify the callee.
2458 builder() 2458 builder()
2459 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5) 2459 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5)
2460 .StoreAccumulatorInRegister(callee); 2460 .StoreAccumulatorInRegister(callee);
2461 } 2461 }
2462 2462
2463 builder()->SetExpressionPosition(expr); 2463 builder()->SetExpressionPosition(expr);
2464 builder()->Call(callee, receiver, 1 + args->length(), 2464 if (expr->CallFeedbackICSlot().IsInvalid()) {
2465 feedback_index(expr->CallFeedbackICSlot()), 2465 builder()->Call(callee, receiver, 1 + args->length(),
2466 expr->tail_call_mode()); 2466 expr->tail_call_mode());
2467 } else {
2468 DCHECK(call_type != Call::POSSIBLY_EVAL_CALL);
2469 builder()->CallIC(callee, receiver, 1 + args->length(),
2470 feedback_index(expr->CallFeedbackICSlot()),
2471 expr->tail_call_mode());
2472 }
2467 execution_result()->SetResultInAccumulator(); 2473 execution_result()->SetResultInAccumulator();
2468 } 2474 }
2469 2475
2470 void BytecodeGenerator::VisitCallSuper(Call* expr) { 2476 void BytecodeGenerator::VisitCallSuper(Call* expr) {
2471 RegisterAllocationScope register_scope(this); 2477 RegisterAllocationScope register_scope(this);
2472 SuperCallReference* super = expr->expression()->AsSuperCallReference(); 2478 SuperCallReference* super = expr->expression()->AsSuperCallReference();
2473 2479
2474 // Prepare the constructor to the super call. 2480 // Prepare the constructor to the super call.
2475 Register this_function = register_allocator()->NewRegister(); 2481 Register this_function = register_allocator()->NewRegister();
2476 VisitForAccumulatorValue(super->this_function_var()); 2482 VisitForAccumulatorValue(super->this_function_var());
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
3111 } 3117 }
3112 3118
3113 3119
3114 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3120 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3115 return info()->feedback_vector()->GetIndex(slot); 3121 return info()->feedback_vector()->GetIndex(slot);
3116 } 3122 }
3117 3123
3118 } // namespace interpreter 3124 } // namespace interpreter
3119 } // namespace internal 3125 } // namespace internal
3120 } // namespace v8 3126 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698