| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/wasm-compiler.h" | 5 #include "src/compiler/wasm-compiler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 | 10 |
| (...skipping 3409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3420 pipeline_timer.Start(); | 3420 pipeline_timer.Start(); |
| 3421 } | 3421 } |
| 3422 | 3422 |
| 3423 // Run the compiler pipeline to generate machine code. | 3423 // Run the compiler pipeline to generate machine code. |
| 3424 CallDescriptor* descriptor = wasm::ModuleEnv::GetWasmCallDescriptor( | 3424 CallDescriptor* descriptor = wasm::ModuleEnv::GetWasmCallDescriptor( |
| 3425 &compilation_zone_, function_->sig); | 3425 &compilation_zone_, function_->sig); |
| 3426 if (jsgraph_->machine()->Is32()) { | 3426 if (jsgraph_->machine()->Is32()) { |
| 3427 descriptor = | 3427 descriptor = |
| 3428 module_env_->GetI32WasmCallDescriptor(&compilation_zone_, descriptor); | 3428 module_env_->GetI32WasmCallDescriptor(&compilation_zone_, descriptor); |
| 3429 } | 3429 } |
| 3430 wasm::ProtectedInstructionList* protected_instructions = |
| 3431 &module_env_->instance->protected_instructions[index_]; |
| 3430 job_.reset(Pipeline::NewWasmCompilationJob(&info_, jsgraph_->graph(), | 3432 job_.reset(Pipeline::NewWasmCompilationJob(&info_, jsgraph_->graph(), |
| 3431 descriptor, source_positions)); | 3433 descriptor, source_positions, |
| 3434 protected_instructions)); |
| 3432 ok_ = job_->ExecuteJob() == CompilationJob::SUCCEEDED; | 3435 ok_ = job_->ExecuteJob() == CompilationJob::SUCCEEDED; |
| 3433 // TODO(bradnelson): Improve histogram handling of size_t. | 3436 // TODO(bradnelson): Improve histogram handling of size_t. |
| 3434 // TODO(ahaas): The counters are not thread-safe at the moment. | 3437 // TODO(ahaas): The counters are not thread-safe at the moment. |
| 3435 // isolate_->counters()->wasm_compile_function_peak_memory_bytes() | 3438 // isolate_->counters()->wasm_compile_function_peak_memory_bytes() |
| 3436 // ->AddSample( | 3439 // ->AddSample( |
| 3437 // static_cast<int>(jsgraph->graph()->zone()->allocation_size())); | 3440 // static_cast<int>(jsgraph->graph()->zone()->allocation_size())); |
| 3438 | 3441 |
| 3439 if (FLAG_trace_wasm_decode_time) { | 3442 if (FLAG_trace_wasm_decode_time) { |
| 3440 double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF(); | 3443 double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF(); |
| 3441 PrintF( | 3444 PrintF( |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3487 function_->code_start_offset), | 3490 function_->code_start_offset), |
| 3488 compile_ms); | 3491 compile_ms); |
| 3489 } | 3492 } |
| 3490 | 3493 |
| 3491 return code; | 3494 return code; |
| 3492 } | 3495 } |
| 3493 | 3496 |
| 3494 } // namespace compiler | 3497 } // namespace compiler |
| 3495 } // namespace internal | 3498 } // namespace internal |
| 3496 } // namespace v8 | 3499 } // namespace v8 |
| OLD | NEW |