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

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

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/compiler/test-codegen-deopt.cc ('k') | test/cctest/compiler/test-scheduler.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/generic-node-inl.h" 8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 Node* n0 = graph.NewNode(&dummy_operator); 119 Node* n0 = graph.NewNode(&dummy_operator);
120 BasicBlock* entry = schedule.start(); 120 BasicBlock* entry = schedule.start();
121 schedule.AddThrow(entry, n0); 121 schedule.AddThrow(entry, n0);
122 122
123 CHECK_EQ(0, entry->PredecessorCount()); 123 CHECK_EQ(0, entry->PredecessorCount());
124 CHECK_EQ(1, entry->SuccessorCount()); 124 CHECK_EQ(1, entry->SuccessorCount());
125 CHECK_EQ(schedule.end(), entry->SuccessorAt(0)); 125 CHECK_EQ(schedule.end(), entry->SuccessorAt(0));
126 } 126 }
127 127
128 128
129 TEST(TestScheduleAddDeopt) {
130 HandleAndZoneScope scope;
131 Schedule schedule(scope.main_zone());
132 Graph graph(scope.main_zone());
133 Node* n0 = graph.NewNode(&dummy_operator);
134 BasicBlock* entry = schedule.start();
135 schedule.AddDeoptimize(entry, n0);
136
137 CHECK_EQ(0, entry->PredecessorCount());
138 CHECK_EQ(1, entry->SuccessorCount());
139 CHECK_EQ(schedule.end(), entry->SuccessorAt(0));
140 }
141
142
143 TEST(BuildMulNodeGraph) { 129 TEST(BuildMulNodeGraph) {
144 HandleAndZoneScope scope; 130 HandleAndZoneScope scope;
145 Schedule schedule(scope.main_zone()); 131 Schedule schedule(scope.main_zone());
146 Graph graph(scope.main_zone()); 132 Graph graph(scope.main_zone());
147 CommonOperatorBuilder common(scope.main_zone()); 133 CommonOperatorBuilder common(scope.main_zone());
148 MachineOperatorBuilder machine(scope.main_zone()); 134 MachineOperatorBuilder machine(scope.main_zone());
149 135
150 Node* start = graph.NewNode(common.Start(0)); 136 Node* start = graph.NewNode(common.Start(0));
151 graph.SetStart(start); 137 graph.SetStart(start);
152 Node* param0 = graph.NewNode(common.Parameter(0), graph.start()); 138 Node* param0 = graph.NewNode(common.Parameter(0), graph.start());
153 Node* param1 = graph.NewNode(common.Parameter(1), graph.start()); 139 Node* param1 = graph.NewNode(common.Parameter(1), graph.start());
154 140
155 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1); 141 Node* mul = graph.NewNode(machine.Int32Mul(), param0, param1);
156 Node* ret = graph.NewNode(common.Return(), mul, start); 142 Node* ret = graph.NewNode(common.Return(), mul, start);
157 143
158 USE(ret); 144 USE(ret);
159 } 145 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-codegen-deopt.cc ('k') | test/cctest/compiler/test-scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698