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

Side by Side Diff: test/cctest/compiler/test-changes-lowering.cc

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <limits> 5 #include <limits>
6 6
7 #include "src/compiler/change-lowering.h" 7 #include "src/compiler/change-lowering.h"
8 #include "src/compiler/control-builders.h" 8 #include "src/compiler/control-builders.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 15 matching lines...) Expand all
26 26
27 using namespace v8::internal; 27 using namespace v8::internal;
28 using namespace v8::internal::compiler; 28 using namespace v8::internal::compiler;
29 29
30 template <typename ReturnType> 30 template <typename ReturnType>
31 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> { 31 class ChangesLoweringTester : public GraphBuilderTester<ReturnType> {
32 public: 32 public:
33 explicit ChangesLoweringTester(MachineType p0 = kMachNone) 33 explicit ChangesLoweringTester(MachineType p0 = kMachNone)
34 : GraphBuilderTester<ReturnType>(p0), 34 : GraphBuilderTester<ReturnType>(p0),
35 javascript(this->zone()), 35 javascript(this->zone()),
36 jsgraph(this->graph(), this->common(), &javascript, this->machine()), 36 jsgraph(this->isolate(), this->graph(), this->common(), &javascript,
37 this->machine()),
37 function(Handle<JSFunction>::null()) {} 38 function(Handle<JSFunction>::null()) {}
38 39
39 JSOperatorBuilder javascript; 40 JSOperatorBuilder javascript;
40 JSGraph jsgraph; 41 JSGraph jsgraph;
41 Handle<JSFunction> function; 42 Handle<JSFunction> function;
42 43
43 Node* start() { return this->graph()->start(); } 44 Node* start() { return this->graph()->start(); }
44 45
45 template <typename T> 46 template <typename T>
46 T* CallWithPotentialGC() { 47 T* CallWithPotentialGC() {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 this->start(), this->start()); 121 this->start(), this->start());
121 Node* end = this->graph()->NewNode(this->common()->End(), ret); 122 Node* end = this->graph()->NewNode(this->common()->End(), ret);
122 this->graph()->SetEnd(end); 123 this->graph()->SetEnd(end);
123 LowerChange(change); 124 LowerChange(change);
124 } 125 }
125 126
126 void LowerChange(Node* change) { 127 void LowerChange(Node* change) {
127 // Run the graph reducer with changes lowering on a single node. 128 // Run the graph reducer with changes lowering on a single node.
128 CompilationInfo info(this->isolate(), this->zone()); 129 CompilationInfo info(this->isolate(), this->zone());
129 Linkage linkage(this->zone(), &info); 130 Linkage linkage(this->zone(), &info);
130 Typer typer(this->graph(), info.context()); 131 Typer typer(this->isolate(), this->graph(), info.context());
131 typer.Run(); 132 typer.Run();
132 ChangeLowering change_lowering(&jsgraph, &linkage); 133 ChangeLowering change_lowering(&jsgraph, &linkage);
133 SelectLowering select_lowering(this->graph(), this->common()); 134 SelectLowering select_lowering(this->graph(), this->common());
134 GraphReducer reducer(this->graph(), this->zone()); 135 GraphReducer reducer(this->graph(), this->zone());
135 reducer.AddReducer(&change_lowering); 136 reducer.AddReducer(&change_lowering);
136 reducer.AddReducer(&select_lowering); 137 reducer.AddReducer(&select_lowering);
137 reducer.ReduceNode(change); 138 reducer.ReduceNode(change);
138 Verifier::Run(this->graph(), Verifier::UNTYPED); 139 Verifier::Run(this->graph(), Verifier::UNTYPED);
139 } 140 }
140 141
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 389
389 input = *i; 390 input = *i;
390 Object* result = t.CallWithPotentialGC<Object>(); 391 Object* result = t.CallWithPotentialGC<Object>();
391 t.CheckNumber(input, result); 392 t.CheckNumber(input, result);
392 } 393 }
393 } 394 }
394 } 395 }
395 } 396 }
396 397
397 #endif // V8_TURBOFAN_BACKEND 398 #endif // V8_TURBOFAN_BACKEND
OLDNEW
« no previous file with comments | « test/cctest/compiler/simplified-graph-builder.cc ('k') | test/cctest/compiler/test-codegen-deopt.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698