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 18 matching lines...) Expand all Loading... |
29 #include "src/compiler/zone-stats.h" | 29 #include "src/compiler/zone-stats.h" |
30 | 30 |
31 #include "src/code-factory.h" | 31 #include "src/code-factory.h" |
32 #include "src/code-stubs.h" | 32 #include "src/code-stubs.h" |
33 #include "src/factory.h" | 33 #include "src/factory.h" |
34 #include "src/log-inl.h" | 34 #include "src/log-inl.h" |
35 | 35 |
36 #include "src/wasm/ast-decoder.h" | 36 #include "src/wasm/ast-decoder.h" |
37 #include "src/wasm/wasm-module.h" | 37 #include "src/wasm/wasm-module.h" |
38 #include "src/wasm/wasm-opcodes.h" | 38 #include "src/wasm/wasm-opcodes.h" |
| 39 #include "src/wasm/wasm-text.h" |
39 | 40 |
40 // TODO(titzer): pull WASM_64 up to a common header. | 41 // TODO(titzer): pull WASM_64 up to a common header. |
41 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 | 42 #if !V8_TARGET_ARCH_32_BIT || V8_TARGET_ARCH_X64 |
42 #define WASM_64 1 | 43 #define WASM_64 1 |
43 #else | 44 #else |
44 #define WASM_64 0 | 45 #define WASM_64 0 |
45 #endif | 46 #endif |
46 | 47 |
47 namespace v8 { | 48 namespace v8 { |
48 namespace internal { | 49 namespace internal { |
(...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3350 | 3351 |
3351 SimdScalarLowering(graph, machine, common, jsgraph_->zone(), function_->sig) | 3352 SimdScalarLowering(graph, machine, common, jsgraph_->zone(), function_->sig) |
3352 .LowerGraph(); | 3353 .LowerGraph(); |
3353 | 3354 |
3354 int index = static_cast<int>(function_->func_index); | 3355 int index = static_cast<int>(function_->func_index); |
3355 | 3356 |
3356 if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) { | 3357 if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) { |
3357 OFStream os(stdout); | 3358 OFStream os(stdout); |
3358 PrintAst(isolate_->allocator(), body, os, nullptr); | 3359 PrintAst(isolate_->allocator(), body, os, nullptr); |
3359 } | 3360 } |
| 3361 if (index >= FLAG_trace_wasm_text_start && index < FLAG_trace_wasm_text_end) { |
| 3362 OFStream os(stdout); |
| 3363 PrintWasmText(module_env_->module, function_->func_index, os, nullptr); |
| 3364 } |
3360 if (FLAG_trace_wasm_decode_time) { | 3365 if (FLAG_trace_wasm_decode_time) { |
3361 *decode_ms = decode_timer.Elapsed().InMillisecondsF(); | 3366 *decode_ms = decode_timer.Elapsed().InMillisecondsF(); |
3362 } | 3367 } |
3363 return source_position_table; | 3368 return source_position_table; |
3364 } | 3369 } |
3365 | 3370 |
3366 WasmCompilationUnit::WasmCompilationUnit(wasm::ErrorThrower* thrower, | 3371 WasmCompilationUnit::WasmCompilationUnit(wasm::ErrorThrower* thrower, |
3367 Isolate* isolate, | 3372 Isolate* isolate, |
3368 wasm::ModuleEnv* module_env, | 3373 wasm::ModuleEnv* module_env, |
3369 const wasm::WasmFunction* function, | 3374 const wasm::WasmFunction* function, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3489 function_->code_start_offset), | 3494 function_->code_start_offset), |
3490 compile_ms); | 3495 compile_ms); |
3491 } | 3496 } |
3492 | 3497 |
3493 return code; | 3498 return code; |
3494 } | 3499 } |
3495 | 3500 |
3496 } // namespace compiler | 3501 } // namespace compiler |
3497 } // namespace internal | 3502 } // namespace internal |
3498 } // namespace v8 | 3503 } // namespace v8 |
OLD | NEW |