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

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: REBASE 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/js-builtin-reducer-unittest.cc ('k') | src/compiler/js-generic-lowering.h » ('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 cd8932b29895b308df24a9349f669595c20340d8..ed76f11fd59d18e912fb1ce78d5339e47d6ce875 100644
--- a/src/compiler/js-context-specialization.cc
+++ b/src/compiler/js-context-specialization.cc
@@ -67,11 +67,11 @@ 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();
- for (int i = access.depth(); i > 0; --i) {
+ for (size_t i = access.depth(); i > 0; --i) {
context = context->previous();
}
@@ -88,8 +88,8 @@ Reduction JSContextSpecializer::ReduceJSLoadContext(Node* node) {
node->ReplaceInput(0, jsgraph_->Constant(context_handle));
return Reducer::Changed(node);
}
- Handle<Object> value =
- Handle<Object>(context->get(access.index()), info_->isolate());
+ Handle<Object> value = Handle<Object>(
+ context->get(static_cast<int>(access.index())), info_->isolate());
// Even though the context slot is immutable, the context might have escaped
// before the function to which it belongs has initialized the slot.
@@ -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) {
@@ -124,7 +124,7 @@ Reduction JSContextSpecializer::ReduceJSStoreContext(Node* node) {
// Find the right parent context.
Context* context = *m.Value().handle();
- for (int i = access.depth(); i > 0; --i) {
+ for (size_t i = access.depth(); i > 0; --i) {
context = context->previous();
}
« no previous file with comments | « src/compiler/js-builtin-reducer-unittest.cc ('k') | src/compiler/js-generic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698