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

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

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Support for CS and TF compilers added Created 4 years, 11 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/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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 FrameStateBeforeAndAfter states(this, iterator); 1189 FrameStateBeforeAndAfter states(this, iterator);
1190 // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver 1190 // TODO(rmcilroy): Set receiver_hint correctly based on whether the receiver
1191 // register has been loaded with null / undefined explicitly or we are sure it 1191 // register has been loaded with null / undefined explicitly or we are sure it
1192 // is not null / undefined. 1192 // is not null / undefined.
1193 ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny; 1193 ConvertReceiverMode receiver_hint = ConvertReceiverMode::kAny;
1194 Node* callee = environment()->LookupRegister(iterator.GetRegisterOperand(0)); 1194 Node* callee = environment()->LookupRegister(iterator.GetRegisterOperand(0));
1195 interpreter::Register receiver = iterator.GetRegisterOperand(1); 1195 interpreter::Register receiver = iterator.GetRegisterOperand(1);
1196 size_t arg_count = iterator.GetCountOperand(2); 1196 size_t arg_count = iterator.GetCountOperand(2);
1197 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(3)); 1197 VectorSlotPair feedback = CreateVectorSlotPair(iterator.GetIndexOperand(3));
1198 1198
1199 // TODO(ishell): provide correct tail_call_mode value to CallFunction.
1199 const Operator* call = javascript()->CallFunction( 1200 const Operator* call = javascript()->CallFunction(
1200 arg_count + 2, language_mode(), feedback, receiver_hint); 1201 arg_count + 2, language_mode(), feedback, receiver_hint);
1201 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 2); 1202 Node* value = ProcessCallArguments(call, callee, receiver, arg_count + 2);
1202 environment()->BindAccumulator(value, &states); 1203 environment()->BindAccumulator(value, &states);
1203 } 1204 }
1204 1205
1205 1206
1206 void BytecodeGraphBuilder::VisitCall( 1207 void BytecodeGraphBuilder::VisitCall(
1207 const interpreter::BytecodeArrayIterator& iterator) { 1208 const interpreter::BytecodeArrayIterator& iterator) {
1208 BuildCall(iterator); 1209 BuildCall(iterator);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
2089 2090
2090 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 2091 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
2091 if (environment()->IsMarkedAsUnreachable()) return; 2092 if (environment()->IsMarkedAsUnreachable()) return;
2092 environment()->MarkAsUnreachable(); 2093 environment()->MarkAsUnreachable();
2093 exit_controls_.push_back(exit); 2094 exit_controls_.push_back(exit);
2094 } 2095 }
2095 2096
2096 } // namespace compiler 2097 } // namespace compiler
2097 } // namespace internal 2098 } // namespace internal
2098 } // namespace v8 2099 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698