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

Side by Side Diff: test/cctest/compiler/test-osr.cc

Issue 1409993002: [turbofan] Move SimplifiedOperatorBuilder into JSGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/codegen.h" 5 #include "src/codegen.h"
6 #include "src/compiler/all-nodes.h" 6 #include "src/compiler/all-nodes.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/diamond.h" 8 #include "src/compiler/diamond.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 30 matching lines...) Expand all
41 41
42 42
43 static const int kMaxOsrValues = 10; 43 static const int kMaxOsrValues = 10;
44 44
45 class OsrDeconstructorTester : public HandleAndZoneScope { 45 class OsrDeconstructorTester : public HandleAndZoneScope {
46 public: 46 public:
47 explicit OsrDeconstructorTester(int num_values) 47 explicit OsrDeconstructorTester(int num_values)
48 : isolate(main_isolate()), 48 : isolate(main_isolate()),
49 common(main_zone()), 49 common(main_zone()),
50 graph(main_zone()), 50 graph(main_zone()),
51 jsgraph(main_isolate(), &graph, &common, NULL, NULL), 51 jsgraph(main_isolate(), &graph, &common, nullptr, nullptr, nullptr),
52 start(graph.NewNode(common.Start(1))), 52 start(graph.NewNode(common.Start(1))),
53 p0(graph.NewNode(common.Parameter(0), start)), 53 p0(graph.NewNode(common.Parameter(0), start)),
54 end(graph.NewNode(common.End(1), start)), 54 end(graph.NewNode(common.End(1), start)),
55 osr_normal_entry(graph.NewNode(common.OsrNormalEntry(), start, start)), 55 osr_normal_entry(graph.NewNode(common.OsrNormalEntry(), start, start)),
56 osr_loop_entry(graph.NewNode(common.OsrLoopEntry(), start, start)), 56 osr_loop_entry(graph.NewNode(common.OsrLoopEntry(), start, start)),
57 self(graph.NewNode(common.Int32Constant(0xaabbccdd))) { 57 self(graph.NewNode(common.Int32Constant(0xaabbccdd))) {
58 CHECK(num_values <= kMaxOsrValues); 58 CHECK(num_values <= kMaxOsrValues);
59 graph.SetStart(start); 59 graph.SetStart(start);
60 for (int i = 0; i < num_values; i++) { 60 for (int i = 0; i < num_values; i++) {
61 osr_values[i] = graph.NewNode(common.OsrValue(i), osr_loop_entry); 61 osr_values[i] = graph.NewNode(common.OsrValue(i), osr_loop_entry);
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 556
557 Node* new_loop0_phi = new_ret->InputAt(0); 557 Node* new_loop0_phi = new_ret->InputAt(0);
558 CHECK_EQ(IrOpcode::kPhi, new_loop0_phi->opcode()); 558 CHECK_EQ(IrOpcode::kPhi, new_loop0_phi->opcode());
559 CHECK_EQ(new_loop0_loop, NodeProperties::GetControlInput(new_loop0_phi)); 559 CHECK_EQ(new_loop0_loop, NodeProperties::GetControlInput(new_loop0_phi));
560 CHECK_EQ(new_loop0_phi, FindSuccessor(new_loop0_loop, IrOpcode::kPhi)); 560 CHECK_EQ(new_loop0_phi, FindSuccessor(new_loop0_loop, IrOpcode::kPhi));
561 561
562 // Check that the return returns the phi from the OSR loop and control 562 // Check that the return returns the phi from the OSR loop and control
563 // depends on the copy of the outer loop0. 563 // depends on the copy of the outer loop0.
564 CheckInputs(new_ret, new_loop0_phi, T.graph.start(), new_loop0_exit); 564 CheckInputs(new_ret, new_loop0_phi, T.graph.start(), new_loop0_exit);
565 } 565 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/cctest/compiler/test-representation-change.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698