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

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

Issue 1458603012: [Interpreter] Add CreateClosure to BytecodeGraphBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revised to avoid CreateClosureParameters in unittest. 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 | « no previous file | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('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/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/node-matchers.h"
8 #include "src/compiler/operator-properties.h" 9 #include "src/compiler/operator-properties.h"
9 #include "src/interpreter/bytecode-array-iterator.h" 10 #include "src/interpreter/bytecode-array-iterator.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 namespace compiler { 14 namespace compiler {
14 15
15 // Issues: 16 // Issues:
16 // - Need to deal with FrameState / FrameStateBeforeAndAfter / StateValue. 17 // - Need to deal with FrameState / FrameStateBeforeAndAfter / StateValue.
17 // - Scopes - intimately tied to AST. Need to eval what is needed. 18 // - Scopes - intimately tied to AST. Need to eval what is needed.
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 637
637 638
638 void BytecodeGraphBuilder::VisitPopContext( 639 void BytecodeGraphBuilder::VisitPopContext(
639 const interpreter::BytecodeArrayIterator& iterator) { 640 const interpreter::BytecodeArrayIterator& iterator) {
640 UNIMPLEMENTED(); 641 UNIMPLEMENTED();
641 } 642 }
642 643
643 644
644 void BytecodeGraphBuilder::VisitCreateClosure( 645 void BytecodeGraphBuilder::VisitCreateClosure(
645 const interpreter::BytecodeArrayIterator& iterator) { 646 const interpreter::BytecodeArrayIterator& iterator) {
646 UNIMPLEMENTED(); 647 Node* accumulator = environment()->LookupAccumulator();
648 HeapObjectMatcher shared_info_matcher(accumulator);
Benedikt Meurer 2015/11/22 19:00:53 Why do you need a HeapObjectMatcher at all here? T
oth 2015/11/22 21:43:58 Just to clarify, is question suggesting the Create
649 PretenureFlag pretenure =
650 iterator.GetImmediateOperand(0) ? TENURED : NOT_TENURED;
651 const Operator* op = javascript()->CreateClosure(
652 Handle<SharedFunctionInfo>::cast(shared_info_matcher.Value()), pretenure);
653 Node* closure = NewNode(op);
654 AddEmptyFrameStateInputs(closure);
655 environment()->BindAccumulator(closure);
647 } 656 }
648 657
649 658
650 void BytecodeGraphBuilder::VisitCreateMappedArguments( 659 void BytecodeGraphBuilder::VisitCreateMappedArguments(
651 const interpreter::BytecodeArrayIterator& iterator) { 660 const interpreter::BytecodeArrayIterator& iterator) {
652 UNIMPLEMENTED(); 661 UNIMPLEMENTED();
653 } 662 }
654 663
655 664
656 void BytecodeGraphBuilder::VisitCreateUnmappedArguments( 665 void BytecodeGraphBuilder::VisitCreateUnmappedArguments(
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1228 1237
1229 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) { 1238 void BytecodeGraphBuilder::UpdateControlDependencyToLeaveFunction(Node* exit) {
1230 if (environment()->IsMarkedAsUnreachable()) return; 1239 if (environment()->IsMarkedAsUnreachable()) return;
1231 environment()->MarkAsUnreachable(); 1240 environment()->MarkAsUnreachable();
1232 exit_controls_.push_back(exit); 1241 exit_controls_.push_back(exit);
1233 } 1242 }
1234 1243
1235 } // namespace compiler 1244 } // namespace compiler
1236 } // namespace internal 1245 } // namespace internal
1237 } // namespace v8 1246 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698