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

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

Issue 1698273003: [es6] [interpreter] Add tail calls support to Ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-turbo-2
Patch Set: Decreased number of iterations to fix timeouts Created 4 years, 10 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
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 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 .StoreAccumulatorInRegister(position); 2464 .StoreAccumulatorInRegister(position);
2465 2465
2466 // Call ResolvePossiblyDirectEval and modify the callee. 2466 // Call ResolvePossiblyDirectEval and modify the callee.
2467 builder() 2467 builder()
2468 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5) 2468 ->CallRuntime(Runtime::kResolvePossiblyDirectEval, callee_for_eval, 5)
2469 .StoreAccumulatorInRegister(callee); 2469 .StoreAccumulatorInRegister(callee);
2470 } 2470 }
2471 2471
2472 builder()->SetExpressionPosition(expr); 2472 builder()->SetExpressionPosition(expr);
2473 builder()->Call(callee, receiver, 1 + args->length(), 2473 builder()->Call(callee, receiver, 1 + args->length(),
2474 feedback_index(expr->CallFeedbackICSlot())); 2474 feedback_index(expr->CallFeedbackICSlot()),
2475 expr->tail_call_mode());
2475 execution_result()->SetResultInAccumulator(); 2476 execution_result()->SetResultInAccumulator();
2476 } 2477 }
2477 2478
2478 void BytecodeGenerator::VisitCallSuper(Call* expr) { 2479 void BytecodeGenerator::VisitCallSuper(Call* expr) {
2479 RegisterAllocationScope register_scope(this); 2480 RegisterAllocationScope register_scope(this);
2480 SuperCallReference* super = expr->expression()->AsSuperCallReference(); 2481 SuperCallReference* super = expr->expression()->AsSuperCallReference();
2481 2482
2482 // Prepare the constructor to the super call. 2483 // Prepare the constructor to the super call.
2483 Register this_function = register_allocator()->NewRegister(); 2484 Register this_function = register_allocator()->NewRegister();
2484 VisitForAccumulatorValue(super->this_function_var()); 2485 VisitForAccumulatorValue(super->this_function_var());
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3126 } 3127 }
3127 3128
3128 3129
3129 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 3130 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
3130 return info()->feedback_vector()->GetIndex(slot); 3131 return info()->feedback_vector()->GetIndex(slot);
3131 } 3132 }
3132 3133
3133 } // namespace interpreter 3134 } // namespace interpreter
3134 } // namespace internal 3135 } // namespace internal
3135 } // namespace v8 3136 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698