| 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 3367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3378 | 3378 |
| 3379 Handle<Code> WasmCompilationUnit::FinishCompilation() { | 3379 Handle<Code> WasmCompilationUnit::FinishCompilation() { |
| 3380 if (!ok_) { | 3380 if (!ok_) { |
| 3381 if (graph_construction_result_.failed()) { | 3381 if (graph_construction_result_.failed()) { |
| 3382 // Add the function as another context for the exception | 3382 // Add the function as another context for the exception |
| 3383 ScopedVector<char> buffer(128); | 3383 ScopedVector<char> buffer(128); |
| 3384 wasm::WasmName name = module_env_->module->GetName( | 3384 wasm::WasmName name = module_env_->module->GetName( |
| 3385 function_->name_offset, function_->name_length); | 3385 function_->name_offset, function_->name_length); |
| 3386 SNPrintF(buffer, "Compiling WASM function #%d:%.*s failed:", | 3386 SNPrintF(buffer, "Compiling WASM function #%d:%.*s failed:", |
| 3387 function_->func_index, name.length(), name.start()); | 3387 function_->func_index, name.length(), name.start()); |
| 3388 thrower_->Failed(buffer.start(), graph_construction_result_); | 3388 thrower_->CompileFailed(buffer.start(), graph_construction_result_); |
| 3389 } | 3389 } |
| 3390 | 3390 |
| 3391 return Handle<Code>::null(); | 3391 return Handle<Code>::null(); |
| 3392 } | 3392 } |
| 3393 if (job_->FinalizeJob() != CompilationJob::SUCCEEDED) { | 3393 if (job_->FinalizeJob() != CompilationJob::SUCCEEDED) { |
| 3394 return Handle<Code>::null(); | 3394 return Handle<Code>::null(); |
| 3395 } | 3395 } |
| 3396 base::ElapsedTimer compile_timer; | 3396 base::ElapsedTimer compile_timer; |
| 3397 if (FLAG_trace_wasm_decode_time) { | 3397 if (FLAG_trace_wasm_decode_time) { |
| 3398 compile_timer.Start(); | 3398 compile_timer.Start(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3416 function_->code_start_offset), | 3416 function_->code_start_offset), |
| 3417 compile_ms); | 3417 compile_ms); |
| 3418 } | 3418 } |
| 3419 | 3419 |
| 3420 return code; | 3420 return code; |
| 3421 } | 3421 } |
| 3422 | 3422 |
| 3423 } // namespace compiler | 3423 } // namespace compiler |
| 3424 } // namespace internal | 3424 } // namespace internal |
| 3425 } // namespace v8 | 3425 } // namespace v8 |
| OLD | NEW |