| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index 7ced8e67b261d83606059dbc4192dbdb6d4ada4a..3ee71db335b0d42e266dc27d9cc7f5761e3f9ae8 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -25,6 +25,7 @@
|
| #include "src/compiler/instruction.h"
|
| #include "src/compiler/instruction-selector.h"
|
| #include "src/compiler/js-builtin-reducer.h"
|
| +#include "src/compiler/js-context-relaxation.h"
|
| #include "src/compiler/js-context-specialization.h"
|
| #include "src/compiler/js-generic-lowering.h"
|
| #include "src/compiler/js-inlining.h"
|
| @@ -80,6 +81,7 @@ class PipelineData {
|
| javascript_(nullptr),
|
| jsgraph_(nullptr),
|
| js_type_feedback_(nullptr),
|
| + relaxed_context_(nullptr),
|
| schedule_(nullptr),
|
| instruction_zone_scope_(zone_pool_),
|
| instruction_zone_(instruction_zone_scope_.zone()),
|
| @@ -191,6 +193,10 @@ class PipelineData {
|
| void set_js_type_feedback(JSTypeFeedbackTable* js_type_feedback) {
|
| js_type_feedback_ = js_type_feedback;
|
| }
|
| + Node* relaxed_context() const { return relaxed_context_; }
|
| + void set_relaxed_context(Node* relaxed_context) {
|
| + relaxed_context_ = relaxed_context;
|
| + }
|
|
|
| LoopAssignmentAnalysis* loop_assignment() const { return loop_assignment_; }
|
| void set_loop_assignment(LoopAssignmentAnalysis* loop_assignment) {
|
| @@ -228,6 +234,7 @@ class PipelineData {
|
| jsgraph_ = nullptr;
|
| js_type_feedback_ = nullptr;
|
| schedule_ = nullptr;
|
| + relaxed_context_ = nullptr;
|
| }
|
|
|
| void DeleteInstructionZone() {
|
| @@ -286,6 +293,7 @@ class PipelineData {
|
| JSOperatorBuilder* javascript_;
|
| JSGraph* jsgraph_;
|
| JSTypeFeedbackTable* js_type_feedback_;
|
| + Node* relaxed_context_;
|
| Schedule* schedule_;
|
|
|
| // All objects in the following group of fields are allocated in
|
| @@ -379,6 +387,8 @@ class AstGraphBuilderWithPositions final : public AstGraphBuilder {
|
| AST_NODE_LIST(DEF_VISIT)
|
| #undef DEF_VISIT
|
|
|
| + using AstGraphBuilder::relaxed_context;
|
| +
|
| private:
|
| SourcePositionTable* const source_positions_;
|
| SourcePosition const start_position_;
|
| @@ -482,6 +492,7 @@ struct GraphBuilderPhase {
|
| if (!graph_builder.CreateGraph(constant_context, stack_check)) {
|
| data->set_compilation_failed();
|
| }
|
| + data->set_relaxed_context(graph_builder.relaxed_context());
|
| }
|
| };
|
|
|
| @@ -690,6 +701,8 @@ struct GenericLoweringPhase {
|
|
|
| void Run(PipelineData* data, Zone* temp_zone) {
|
| JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
|
| + JSContextRelaxation relaxing(data->graph()->start(),
|
| + data->relaxed_context());
|
| DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
|
| data->common());
|
| CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
|
| @@ -699,6 +712,7 @@ struct GenericLoweringPhase {
|
| SelectLowering select_lowering(data->jsgraph()->graph(),
|
| data->jsgraph()->common());
|
| TailCallOptimization tco(data->common(), data->graph());
|
| + AddReducer(data, &graph_reducer, &relaxing);
|
| AddReducer(data, &graph_reducer, &dead_code_elimination);
|
| AddReducer(data, &graph_reducer, &common_reducer);
|
| AddReducer(data, &graph_reducer, &generic_lowering);
|
|
|