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

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

Issue 2541813002: [compiler] Remove context value input from JSLoadContext and JSStoreContext. (Closed)
Patch Set: Rebase. Created 4 years 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | 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 023ef483ea831fee6a7da0039d5451c6e78d2777..d7812c6eb0842e62b427742b298cbde8c9a880c0 100644
--- a/test/cctest/compiler/test-js-context-specialization.cc
+++ b/test/cctest/compiler/test-js-context-specialization.cc
@@ -72,7 +72,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);
+ const_context, start);
Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -80,7 +80,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);
+ param_context, start);
Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -89,10 +89,10 @@ TEST(ReduceJSLoadContext) {
// Mutable slot, constant context, depth > 0 => fold-in parent context.
Node* load = t.graph()->NewNode(
t.javascript()->LoadContext(2, Context::GLOBAL_EVAL_FUN_INDEX, false),
- deep_const_context, deep_const_context, start);
+ deep_const_context, start);
Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
- Node* new_context_input = NodeProperties::GetValueInput(r.replacement(), 0);
+ Node* new_context_input = NodeProperties::GetContextInput(r.replacement());
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
HeapObjectMatcher match(new_context_input);
CHECK_EQ(*native, *match.Value());
@@ -105,7 +105,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);
+ const_context, start);
Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
CHECK(r.replacement() != load);
@@ -142,27 +142,24 @@ TEST(ReduceJSStoreContext) {
{
// Mutable slot, constant context, depth = 0 => do nothing.
- Node* load =
- t.graph()->NewNode(t.javascript()->StoreContext(0, 0), const_context,
- const_context, const_context, start, start);
+ Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, 0),
+ const_context, const_context, start, start);
Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
{
// Mutable slot, non-constant context, depth = 0 => do nothing.
- Node* load =
- t.graph()->NewNode(t.javascript()->StoreContext(0, 0), param_context,
- param_context, const_context, start, start);
+ Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, 0),
+ param_context, param_context, start, start);
Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
{
// Immutable slot, constant context, depth = 0 => do nothing.
- Node* load =
- t.graph()->NewNode(t.javascript()->StoreContext(0, slot), const_context,
- const_context, const_context, start, start);
+ Node* load = t.graph()->NewNode(t.javascript()->StoreContext(0, slot),
+ const_context, const_context, start, start);
Reduction r = t.spec()->Reduce(load);
CHECK(!r.Changed());
}
@@ -171,10 +168,10 @@ TEST(ReduceJSStoreContext) {
// Mutable slot, constant context, depth > 0 => fold-in parent context.
Node* load = t.graph()->NewNode(
t.javascript()->StoreContext(2, Context::GLOBAL_EVAL_FUN_INDEX),
- deep_const_context, deep_const_context, const_context, start, start);
+ deep_const_context, deep_const_context, start, start);
Reduction r = t.spec()->Reduce(load);
CHECK(r.Changed());
- Node* new_context_input = NodeProperties::GetValueInput(r.replacement(), 0);
+ Node* new_context_input = NodeProperties::GetContextInput(r.replacement());
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
HeapObjectMatcher match(new_context_input);
CHECK_EQ(*native, *match.Value());
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698