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

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

Issue 1456453002: [Interpreter] Add support for Call bytecode to bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Compilation fix (signed/unsigned). Created 5 years, 1 month 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-iterator.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/compiler.h" 7 #include "src/compiler.h"
8 #include "src/interpreter/control-flow-builders.h" 8 #include "src/interpreter/control-flow-builders.h"
9 #include "src/objects.h" 9 #include "src/objects.h"
10 #include "src/parser.h" 10 #include "src/parser.h"
(...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 UNIMPLEMENTED(); 1556 UNIMPLEMENTED();
1557 } 1557 }
1558 1558
1559 // Evaluate all arguments to the function call and store in sequential 1559 // Evaluate all arguments to the function call and store in sequential
1560 // registers. 1560 // registers.
1561 Register arg = VisitArguments(args); 1561 Register arg = VisitArguments(args);
1562 CHECK(args->length() == 0 || arg.index() == receiver.index() + 1); 1562 CHECK(args->length() == 0 || arg.index() == receiver.index() + 1);
1563 1563
1564 // TODO(rmcilroy): Deal with possible direct eval here? 1564 // TODO(rmcilroy): Deal with possible direct eval here?
1565 // TODO(rmcilroy): Use CallIC to allow call type feedback. 1565 // TODO(rmcilroy): Use CallIC to allow call type feedback.
1566 builder()->Call(callee, receiver, args->length()); 1566 builder()->Call(callee, receiver, args->length(),
1567 feedback_index(expr->CallFeedbackICSlot()));
1567 execution_result()->SetResultInAccumulator(); 1568 execution_result()->SetResultInAccumulator();
1568 } 1569 }
1569 1570
1570 1571
1571 void BytecodeGenerator::VisitCallNew(CallNew* expr) { 1572 void BytecodeGenerator::VisitCallNew(CallNew* expr) {
1572 Register constructor = execution_result()->NewRegister(); 1573 Register constructor = execution_result()->NewRegister();
1573 VisitForAccumulatorValue(expr->expression()); 1574 VisitForAccumulatorValue(expr->expression());
1574 builder()->StoreAccumulatorInRegister(constructor); 1575 builder()->StoreAccumulatorInRegister(constructor);
1575 1576
1576 ZoneList<Expression*>* args = expr->arguments(); 1577 ZoneList<Expression*>* args = expr->arguments();
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 } 2161 }
2161 2162
2162 2163
2163 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const { 2164 int BytecodeGenerator::feedback_index(FeedbackVectorSlot slot) const {
2164 return info()->feedback_vector()->GetIndex(slot); 2165 return info()->feedback_vector()->GetIndex(slot);
2165 } 2166 }
2166 2167
2167 } // namespace interpreter 2168 } // namespace interpreter
2168 } // namespace internal 2169 } // namespace internal
2169 } // namespace v8 2170 } // namespace v8
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-array-iterator.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698