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

Unified Diff: test/cctest/compiler/test-js-context-specialization.cc

Issue 1221103003: [turbofan] Move context specialization into JSContextSpecializer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix predicate. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« src/compiler/ast-graph-builder.cc ('K') | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/compiler/test-js-context-specialization.cc
diff --git a/test/cctest/compiler/test-js-context-specialization.cc b/test/cctest/compiler/test-js-context-specialization.cc
index e97da611fb724ebefcfaa3a66221c9e6f78fa577..aa39b77395c49eb1db9efc3061a078951c60d8bd 100644
--- a/test/cctest/compiler/test-js-context-specialization.cc
+++ b/test/cctest/compiler/test-js-context-specialization.cc
@@ -25,7 +25,7 @@ class ContextSpecializationTester : public HandleAndZoneScope {
simplified_(main_zone()),
jsgraph_(main_isolate(), graph(), common(), &javascript_, &machine_),
reducer_(main_zone(), graph()),
- spec_(&reducer_, jsgraph()) {}
+ spec_(&reducer_, jsgraph(), -1, MaybeHandle<Context>()) {}
JSContextSpecializer* spec() { return &spec_; }
Factory* factory() { return main_isolate()->factory(); }
@@ -71,7 +71,7 @@ TEST(ReduceJSLoadContext) {
// Mutable slot, constant context, depth = 0 => do nothing.
Node* load = t.graph()->NewNode(t.javascript()->LoadContext(0, 0, false),
const_context, const_context, start);
- Reduction r = t.spec()->ReduceJSLoadContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -79,7 +79,7 @@ TEST(ReduceJSLoadContext) {
// Mutable slot, non-constant context, depth = 0 => do nothing.
Node* load = t.graph()->NewNode(t.javascript()->LoadContext(0, 0, false),
param_context, param_context, start);
- Reduction r = t.spec()->ReduceJSLoadContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -88,7 +88,7 @@ TEST(ReduceJSLoadContext) {
Node* load = t.graph()->NewNode(
t.javascript()->LoadContext(2, Context::GLOBAL_EVAL_FUN_INDEX, false),
deep_const_context, deep_const_context, start);
- Reduction r = t.spec()->ReduceJSLoadContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
Node* new_context_input = NodeProperties::GetValueInput(r.replacement(), 0);
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
@@ -104,7 +104,7 @@ TEST(ReduceJSLoadContext) {
// Immutable slot, constant context, depth = 0 => specialize.
Node* load = t.graph()->NewNode(t.javascript()->LoadContext(0, slot, true),
const_context, const_context, start);
- Reduction r = t.spec()->ReduceJSLoadContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
CHECK(r.replacement() != load);
@@ -142,7 +142,7 @@ TEST(ReduceJSStoreContext) {
// Mutable slot, constant context, depth = 0 => do nothing.
Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, 0),
const_context, const_context, start);
- Reduction r = t.spec()->ReduceJSStoreContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -150,7 +150,7 @@ TEST(ReduceJSStoreContext) {
// Mutable slot, non-constant context, depth = 0 => do nothing.
Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, 0),
param_context, param_context, start);
- Reduction r = t.spec()->ReduceJSStoreContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -158,7 +158,7 @@ TEST(ReduceJSStoreContext) {
// Immutable slot, constant context, depth = 0 => do nothing.
Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, slot),
const_context, const_context, start);
- Reduction r = t.spec()->ReduceJSStoreContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -167,7 +167,7 @@ TEST(ReduceJSStoreContext) {
Node* load = t.graph()->NewNode(
t.javascript()->StoreContext(2, Context::GLOBAL_EVAL_FUN_INDEX),
deep_const_context, deep_const_context, start);
- Reduction r = t.spec()->ReduceJSStoreContext(load);
+ Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
Node* new_context_input = NodeProperties::GetValueInput(r.replacement(), 0);
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
@@ -235,7 +235,8 @@ TEST(SpecializeToContext) {
// Perform the reduction on the entire graph.
GraphReducer graph_reducer(t.main_zone(), t.graph());
- JSContextSpecializer spec(&graph_reducer, t.jsgraph());
+ JSContextSpecializer spec(&graph_reducer, t.jsgraph(), -1,
+ MaybeHandle<Context>());
graph_reducer.AddReducer(&spec);
graph_reducer.ReduceGraph();
« src/compiler/ast-graph-builder.cc ('K') | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698