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 3410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3421 pipeline_timer.Start(); | 3421 pipeline_timer.Start(); |
3422 } | 3422 } |
3423 | 3423 |
3424 // Run the compiler pipeline to generate machine code. | 3424 // Run the compiler pipeline to generate machine code. |
3425 CallDescriptor* descriptor = wasm::ModuleEnv::GetWasmCallDescriptor( | 3425 CallDescriptor* descriptor = wasm::ModuleEnv::GetWasmCallDescriptor( |
3426 &compilation_zone_, function_->sig); | 3426 &compilation_zone_, function_->sig); |
3427 if (jsgraph_->machine()->Is32()) { | 3427 if (jsgraph_->machine()->Is32()) { |
3428 descriptor = | 3428 descriptor = |
3429 module_env_->GetI32WasmCallDescriptor(&compilation_zone_, descriptor); | 3429 module_env_->GetI32WasmCallDescriptor(&compilation_zone_, descriptor); |
3430 } | 3430 } |
3431 job_.reset(Pipeline::NewWasmCompilationJob(&info_, jsgraph_->graph(), | 3431 job_.reset(Pipeline::NewWasmCompilationJob(&info_, jsgraph_, descriptor, |
3432 descriptor, source_positions)); | 3432 source_positions)); |
3433 ok_ = job_->ExecuteJob() == CompilationJob::SUCCEEDED; | 3433 ok_ = job_->ExecuteJob() == CompilationJob::SUCCEEDED; |
3434 // TODO(bradnelson): Improve histogram handling of size_t. | 3434 // TODO(bradnelson): Improve histogram handling of size_t. |
3435 // TODO(ahaas): The counters are not thread-safe at the moment. | 3435 // TODO(ahaas): The counters are not thread-safe at the moment. |
3436 // isolate_->counters()->wasm_compile_function_peak_memory_bytes() | 3436 // isolate_->counters()->wasm_compile_function_peak_memory_bytes() |
3437 // ->AddSample( | 3437 // ->AddSample( |
3438 // static_cast<int>(jsgraph->graph()->zone()->allocation_size())); | 3438 // static_cast<int>(jsgraph->graph()->zone()->allocation_size())); |
3439 | 3439 |
3440 if (FLAG_trace_wasm_decode_time) { | 3440 if (FLAG_trace_wasm_decode_time) { |
3441 double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF(); | 3441 double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF(); |
3442 PrintF( | 3442 PrintF( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3488 function_->code_start_offset), | 3488 function_->code_start_offset), |
3489 compile_ms); | 3489 compile_ms); |
3490 } | 3490 } |
3491 | 3491 |
3492 return code; | 3492 return code; |
3493 } | 3493 } |
3494 | 3494 |
3495 } // namespace compiler | 3495 } // namespace compiler |
3496 } // namespace internal | 3496 } // namespace internal |
3497 } // namespace v8 | 3497 } // namespace v8 |
OLD | NEW |