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

Unified Diff: src/compiler/js-context-specialization.cc

Issue 552653003: [turbofan] Fix the node matchers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address nit. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-context-specialization.cc
diff --git a/src/compiler/js-context-specialization.cc b/src/compiler/js-context-specialization.cc
index b54d5d99c2058cf17d1674b5f9cc7e3e01953741..50f34d22f7caef546a7b11a04cdd2e048ddca371 100644
--- a/src/compiler/js-context-specialization.cc
+++ b/src/compiler/js-context-specialization.cc
@@ -61,16 +61,16 @@ void JSContextSpecializer::SpecializeToContext() {
Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSLoadContext, node->opcode());
- ValueMatcher<Handle<Context> > match(NodeProperties::GetValueInput(node, 0));
+ HeapObjectMatcher<Context> m(NodeProperties::GetValueInput(node, 0));
// If the context is not constant, no reduction can occur.
- if (!match.HasValue()) {
+ if (!m.HasValue()) {
return Reducer::NoChange();
}
ContextAccess access = OpParameter<ContextAccess>(node);
// Find the right parent context.
- Context* context = *match.Value();
+ Context* context = *m.Value().handle();
for (int i = access.depth(); i > 0; --i) {
context = context->previous();
}
@@ -109,9 +109,9 @@ Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
Reduction JSContextSpecializer::ReduceJSStoreContext(Node* node) {
DCHECK_EQ(IrOpcode::kJSStoreContext, node->opcode());
- ValueMatcher<Handle<Context> > match(NodeProperties::GetValueInput(node, 0));
+ HeapObjectMatcher<Context> m(NodeProperties::GetValueInput(node, 0));
// If the context is not constant, no reduction can occur.
- if (!match.HasValue()) {
+ if (!m.HasValue()) {
return Reducer::NoChange();
}
@@ -123,7 +123,7 @@ Reduction JSContextSpecializer::ReduceJSStoreContext(Node* node) {
}
// Find the right parent context.
- Context* context = *match.Value();
+ Context* context = *m.Value().handle();
for (int i = access.depth(); i > 0; --i) {
context = context->previous();
}
« no previous file with comments | « src/compiler/instruction-selector-impl.h ('k') | src/compiler/js-inlining.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698