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

Side by Side Diff: src/compiler/bytecode-graph-builder.cc

Issue 1842763002: [api] Add a switch that controls if ES2015 tail call elimination feature is enabled or not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-dynamic
Patch Set: Added workaround and TODO to investigate TurboFan issue. Created 4 years, 8 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/api.cc ('k') | src/isolate.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/compiler/bytecode-graph-builder.h" 5 #include "src/compiler/bytecode-graph-builder.h"
6 6
7 #include "src/compiler/bytecode-branch-analysis.h" 7 #include "src/compiler/bytecode-branch-analysis.h"
8 #include "src/compiler/linkage.h" 8 #include "src/compiler/linkage.h"
9 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
10 #include "src/interpreter/bytecodes.h" 10 #include "src/interpreter/bytecodes.h"
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3)); 920 CreateVectorSlotPair(bytecode_iterator().GetIndexOperand(3));
921 921
922 const Operator* call = javascript()->CallFunction( 922 const Operator* call = javascript()->CallFunction(
923 arg_count + 1, feedback, receiver_hint, tail_call_mode); 923 arg_count + 1, feedback, receiver_hint, tail_call_mode);
924 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1); 924 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 1);
925 environment()->BindAccumulator(value, &states); 925 environment()->BindAccumulator(value, &states);
926 } 926 }
927 927
928 void BytecodeGraphBuilder::VisitCall() { BuildCall(TailCallMode::kDisallow); } 928 void BytecodeGraphBuilder::VisitCall() { BuildCall(TailCallMode::kDisallow); }
929 929
930 void BytecodeGraphBuilder::VisitTailCall() { BuildCall(TailCallMode::kAllow); } 930 void BytecodeGraphBuilder::VisitTailCall() {
931 TailCallMode tail_call_mode =
932 bytecode_array_->GetIsolate()->is_tail_call_elimination_enabled()
933 ? TailCallMode::kAllow
934 : TailCallMode::kDisallow;
935 BuildCall(tail_call_mode);
936 }
931 937
932 void BytecodeGraphBuilder::VisitCallJSRuntime() { 938 void BytecodeGraphBuilder::VisitCallJSRuntime() {
933 FrameStateBeforeAndAfter states(this); 939 FrameStateBeforeAndAfter states(this);
934 Node* callee = 940 Node* callee =
935 BuildLoadNativeContextField(bytecode_iterator().GetIndexOperand(0)); 941 BuildLoadNativeContextField(bytecode_iterator().GetIndexOperand(0));
936 interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1); 942 interpreter::Register receiver = bytecode_iterator().GetRegisterOperand(1);
937 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2); 943 size_t arg_count = bytecode_iterator().GetRegisterCountOperand(2);
938 944
939 // Create node to perform the JS runtime call. 945 // Create node to perform the JS runtime call.
940 const Operator* call = javascript()->CallFunction(arg_count + 1); 946 const Operator* call = javascript()->CallFunction(arg_count + 1);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1636 // Phi does not exist yet, introduce one. 1642 // Phi does not exist yet, introduce one.
1637 value = NewPhi(inputs, value, control); 1643 value = NewPhi(inputs, value, control);
1638 value->ReplaceInput(inputs - 1, other); 1644 value->ReplaceInput(inputs - 1, other);
1639 } 1645 }
1640 return value; 1646 return value;
1641 } 1647 }
1642 1648
1643 } // namespace compiler 1649 } // namespace compiler
1644 } // namespace internal 1650 } // namespace internal
1645 } // namespace v8 1651 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698