Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index 3d153c1c0c82a063a05699866172423c1c6ad701..7ddc5afd4364bb4e1dff99c18458643bd274a6c5 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -30,6 +30,7 @@ |
#include "src/compiler/js-context-specialization.h" |
#include "src/compiler/js-frame-specialization.h" |
#include "src/compiler/js-generic-lowering.h" |
+#include "src/compiler/js-global-specialization.h" |
#include "src/compiler/js-inlining.h" |
#include "src/compiler/js-intrinsic-lowering.h" |
#include "src/compiler/js-type-feedback.h" |
@@ -511,6 +512,20 @@ struct InliningPhase { |
: MaybeHandle<Context>()); |
JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
data->jsgraph()); |
+ JSGlobalSpecialization::Flags global_flags = |
+ JSGlobalSpecialization::kNoFlags; |
+ if (data->info()->is_deoptimization_enabled()) { |
+ global_flags |= JSGlobalSpecialization::kDeoptimizationEnabled; |
+ } |
+ if (data->info()->is_typing_enabled()) { |
+ global_flags |= JSGlobalSpecialization::kTypingEnabled; |
+ } |
+ JSGlobalSpecialization global_specialization( |
+ &graph_reducer, data->jsgraph(), global_flags, |
+ data->info()->has_global_object() |
+ ? handle(data->info()->global_object()) |
+ : Handle<GlobalObject>(), |
+ data->info()->dependencies()); |
JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
? JSInliner::kGeneralInlining |
: JSInliner::kRestrictedInlining, |
@@ -520,6 +535,9 @@ struct InliningPhase { |
if (data->info()->is_frame_specializing()) { |
AddReducer(data, &graph_reducer, &frame_specialization); |
} |
+ if (data->info()->is_native_context_specializing()) { |
+ AddReducer(data, &graph_reducer, &global_specialization); |
+ } |
AddReducer(data, &graph_reducer, &context_specialization); |
AddReducer(data, &graph_reducer, &inliner); |
graph_reducer.ReduceGraph(); |