| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index 815e8d12477210d82939d0a002fd7144aad9271f..a4487533ef8ffcea62c0ba066d8cf738779d4e5f 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -77,6 +77,7 @@
|
| #include "src/register-configuration.h"
|
| #include "src/type-info.h"
|
| #include "src/utils.h"
|
| +#include "src/wasm/wasm-module.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -115,7 +116,8 @@ class PipelineData {
|
|
|
| // For WASM compile entry point.
|
| PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph,
|
| - SourcePositionTable* source_positions)
|
| + SourcePositionTable* source_positions,
|
| + wasm::ProtectedInstructionList* protected_instructions)
|
| : isolate_(info->isolate()),
|
| info_(info),
|
| debug_name_(info_->GetDebugName()),
|
| @@ -126,7 +128,8 @@ class PipelineData {
|
| instruction_zone_scope_(zone_stats_, ZONE_NAME),
|
| instruction_zone_(instruction_zone_scope_.zone()),
|
| register_allocation_zone_scope_(zone_stats_, ZONE_NAME),
|
| - register_allocation_zone_(register_allocation_zone_scope_.zone()) {}
|
| + register_allocation_zone_(register_allocation_zone_scope_.zone()),
|
| + protected_instructions_(protected_instructions) {}
|
|
|
| // For machine graph testing entry point.
|
| PipelineData(ZoneStats* zone_stats, CompilationInfo* info, Graph* graph,
|
| @@ -233,6 +236,10 @@ class PipelineData {
|
| source_position_output_ = source_position_output;
|
| }
|
|
|
| + wasm::ProtectedInstructionList* protected_instructions() const {
|
| + return protected_instructions_;
|
| + }
|
| +
|
| void DeleteGraphZone() {
|
| if (graph_zone_ == nullptr) return;
|
| graph_zone_scope_.Destroy();
|
| @@ -355,6 +362,8 @@ class PipelineData {
|
| // Source position output for --trace-turbo.
|
| std::string source_position_output_;
|
|
|
| + wasm::ProtectedInstructionList* protected_instructions_ = nullptr;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(PipelineData);
|
| };
|
|
|
| @@ -644,13 +653,14 @@ PipelineCompilationJob::Status PipelineCompilationJob::FinalizeJobImpl() {
|
|
|
| class PipelineWasmCompilationJob final : public CompilationJob {
|
| public:
|
| - explicit PipelineWasmCompilationJob(CompilationInfo* info, Graph* graph,
|
| - CallDescriptor* descriptor,
|
| - SourcePositionTable* source_positions)
|
| + explicit PipelineWasmCompilationJob(
|
| + CompilationInfo* info, Graph* graph, CallDescriptor* descriptor,
|
| + SourcePositionTable* source_positions,
|
| + wasm::ProtectedInstructionList* protected_insts)
|
| : CompilationJob(info->isolate(), info, "TurboFan",
|
| State::kReadyToExecute),
|
| zone_stats_(info->isolate()->allocator()),
|
| - data_(&zone_stats_, info, graph, source_positions),
|
| + data_(&zone_stats_, info, graph, source_positions, protected_insts),
|
| pipeline_(&data_),
|
| linkage_(descriptor) {}
|
|
|
| @@ -1430,7 +1440,7 @@ struct GenerateCodePhase {
|
|
|
| void Run(PipelineData* data, Zone* temp_zone, Linkage* linkage) {
|
| CodeGenerator generator(data->frame(), linkage, data->sequence(),
|
| - data->info());
|
| + data->info(), data->protected_instructions());
|
| data->set_code(generator.GenerateCode());
|
| }
|
| };
|
| @@ -1751,9 +1761,10 @@ CompilationJob* Pipeline::NewCompilationJob(Handle<JSFunction> function) {
|
| // static
|
| CompilationJob* Pipeline::NewWasmCompilationJob(
|
| CompilationInfo* info, Graph* graph, CallDescriptor* descriptor,
|
| - SourcePositionTable* source_positions) {
|
| - return new PipelineWasmCompilationJob(info, graph, descriptor,
|
| - source_positions);
|
| + SourcePositionTable* source_positions,
|
| + wasm::ProtectedInstructionList* protected_instructions) {
|
| + return new PipelineWasmCompilationJob(
|
| + info, graph, descriptor, source_positions, protected_instructions);
|
| }
|
|
|
| bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config,
|
|
|