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

Unified Diff: src/compiler/js-call-reducer.cc

Issue 2651133002: [turbofan] Maintain the invariant to never inline cross native context. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-call-reducer.cc
diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc
index e6b4fb8d80a85d5e146f87090aabf61720cd7243..0ca8fff05367b393e3b641b0975edab9f4cddd15 100644
--- a/src/compiler/js-call-reducer.cc
+++ b/src/compiler/js-call-reducer.cc
@@ -407,6 +407,9 @@ Reduction JSCallReducer::ReduceJSCallFunction(Node* node) {
return Changed(node);
}
+ // Don't inline cross native context.
+ if (function->native_context() != *native_context()) return NoChange();
+
// Check for known builtin functions.
switch (shared->code()->builtin_index()) {
case Builtins::kFunctionPrototypeApply:
@@ -569,6 +572,9 @@ Reduction JSCallReducer::ReduceJSCallConstruct(Node* node) {
return Changed(node);
}
+ // Don't inline cross native context.
+ if (function->native_context() != *native_context()) return NoChange();
+
// Check for the ArrayConstructor.
if (*function == function->native_context()->array_function()) {
// Check if we have an allocation site.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698