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

Unified Diff: src/compiler/js-generic-lowering.cc

Issue 790123002: [turbofan] Fix cycles introduced by pushing ToNumbers into phis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix Created 6 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-generic-lowering.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 48864423146007ec632915d4ac1ad0658ca80c93..3275256a2811b24743fb89de19a1889aeba470b5 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -232,6 +232,12 @@ void JSGenericLowering::LowerJSToBoolean(Node* node) {
void JSGenericLowering::LowerJSToNumber(Node* node) {
Callable callable = CodeFactory::ToNumber(isolate());
+ // TODO(mstarzinger): Embedding the context this way prevents sharing of code
+ // across native contexts.
+ if (!info_context_constant_.is_set()) {
+ info_context_constant_.set(jsgraph()->HeapConstant(info()->context()));
+ }
+ node->ReplaceInput(1, info_context_constant_.get());
ReplaceWithStubCall(node, callable, FlagsForNode(node));
}
« no previous file with comments | « src/compiler/js-generic-lowering.h ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698