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

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

Issue 613683002: [turbofan] Some javascript operators are globally shared singletons. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix 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
Index: src/compiler/js-context-specialization.cc
diff --git a/src/compiler/js-context-specialization.cc b/src/compiler/js-context-specialization.cc
index cd8932b29895b308df24a9349f669595c20340d8..196a750acf598aaa520ad980b63688811671b47d 100644
--- a/src/compiler/js-context-specialization.cc
+++ b/src/compiler/js-context-specialization.cc
@@ -67,7 +67,7 @@ Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
return Reducer::NoChange();
}
- ContextAccess access = OpParameter<ContextAccess>(node);
+ const ContextAccess& access = ContextAccessOf(node->op());
// Find the right parent context.
Context* context = *m.Value().handle();
@@ -82,7 +82,7 @@ Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
return Reducer::NoChange();
}
const Operator* op = jsgraph_->javascript()->LoadContext(
- 0, access.index(), access.immutable());
+ ContextAccess(0, access.index(), access.immutable()));
node->set_op(op);
Handle<Object> context_handle = Handle<Object>(context, info_->isolate());
node->ReplaceInput(0, jsgraph_->Constant(context_handle));
@@ -115,7 +115,7 @@ Reduction JSContextSpecializer::ReduceJSStoreContext(Node* node) {
return Reducer::NoChange();
}
- ContextAccess access = OpParameter<ContextAccess>(node);
+ const ContextAccess& access = ContextAccessOf(node->op());
// The access does not have to look up a parent, nothing to fold.
if (access.depth() == 0) {
@@ -128,7 +128,8 @@ Reduction JSContextSpecializer::ReduceJSStoreContext(Node* node) {
context = context->previous();
}
- const Operator* op = jsgraph_->javascript()->StoreContext(0, access.index());
+ const Operator* op =
+ jsgraph_->javascript()->StoreContext(ContextAccess(0, access.index()));
node->set_op(op);
Handle<Object> new_context_handle = Handle<Object>(context, info_->isolate());
node->ReplaceInput(0, jsgraph_->Constant(new_context_handle));

Powered by Google App Engine
This is Rietveld 408576698