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 3982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3993 return Handle<Code>::null(); | 3993 return Handle<Code>::null(); |
3994 } | 3994 } |
3995 if (job_->FinalizeJob() != CompilationJob::SUCCEEDED) { | 3995 if (job_->FinalizeJob() != CompilationJob::SUCCEEDED) { |
3996 return Handle<Code>::null(); | 3996 return Handle<Code>::null(); |
3997 } | 3997 } |
3998 base::ElapsedTimer compile_timer; | 3998 base::ElapsedTimer compile_timer; |
3999 if (FLAG_trace_wasm_decode_time) { | 3999 if (FLAG_trace_wasm_decode_time) { |
4000 compile_timer.Start(); | 4000 compile_timer.Start(); |
4001 } | 4001 } |
4002 Handle<Code> code = info_.code(); | 4002 Handle<Code> code = info_.code(); |
4003 if (FLAG_print_wasm_code) { | |
titzer
2017/01/27 14:03:21
Despite the mess in src/codegen.cc, I think this s
ahaas
2017/02/10 10:21:48
Done.
| |
4004 code->Print(); | |
4005 } | |
4003 DCHECK(!code.is_null()); | 4006 DCHECK(!code.is_null()); |
4004 | 4007 |
4005 if (isolate_->logger()->is_logging_code_events() || | 4008 if (isolate_->logger()->is_logging_code_events() || |
4006 isolate_->is_profiling()) { | 4009 isolate_->is_profiling()) { |
4007 RecordFunctionCompilation(CodeEventListener::FUNCTION_TAG, isolate_, code, | 4010 RecordFunctionCompilation(CodeEventListener::FUNCTION_TAG, isolate_, code, |
4008 "WASM_function", function_->func_index, | 4011 "WASM_function", function_->func_index, |
4009 wasm::WasmName("module"), | 4012 wasm::WasmName("module"), |
4010 module_env_->wire_bytes.GetName(function_)); | 4013 module_env_->wire_bytes.GetName(function_)); |
4011 } | 4014 } |
4012 | 4015 |
(...skipping 22 matching lines...) Expand all Loading... | |
4035 Smi::FromInt(instruction.instr_offset)); | 4038 Smi::FromInt(instruction.instr_offset)); |
4036 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset, | 4039 fn_protected->set(Code::kTrapDataSize * i + Code::kTrapLandingOffset, |
4037 Smi::FromInt(instruction.landing_offset)); | 4040 Smi::FromInt(instruction.landing_offset)); |
4038 } | 4041 } |
4039 return fn_protected; | 4042 return fn_protected; |
4040 } | 4043 } |
4041 | 4044 |
4042 } // namespace compiler | 4045 } // namespace compiler |
4043 } // namespace internal | 4046 } // namespace internal |
4044 } // namespace v8 | 4047 } // namespace v8 |
OLD | NEW |