| 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "src/base/atomic-utils.h" | 7 #include "src/base/atomic-utils.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 | 9 #include "src/compiler/wasm-compiler.h" |
| 10 #include "src/debug/interface-types.h" |
| 10 #include "src/macro-assembler.h" | 11 #include "src/macro-assembler.h" |
| 11 #include "src/objects.h" | 12 #include "src/objects.h" |
| 12 #include "src/property-descriptor.h" | 13 #include "src/property-descriptor.h" |
| 13 #include "src/simulator.h" | 14 #include "src/simulator.h" |
| 14 #include "src/snapshot/snapshot.h" | 15 #include "src/snapshot/snapshot.h" |
| 15 #include "src/v8.h" | 16 #include "src/v8.h" |
| 16 | 17 |
| 17 #include "src/wasm/ast-decoder.h" | 18 #include "src/wasm/ast-decoder.h" |
| 18 #include "src/wasm/module-decoder.h" | 19 #include "src/wasm/module-decoder.h" |
| 19 #include "src/wasm/wasm-js.h" | 20 #include "src/wasm/wasm-js.h" |
| 20 #include "src/wasm/wasm-module.h" | 21 #include "src/wasm/wasm-module.h" |
| 21 #include "src/wasm/wasm-objects.h" | 22 #include "src/wasm/wasm-objects.h" |
| 22 #include "src/wasm/wasm-result.h" | 23 #include "src/wasm/wasm-result.h" |
| 23 | 24 |
| 24 #include "src/compiler/wasm-compiler.h" | |
| 25 | |
| 26 using namespace v8::internal; | 25 using namespace v8::internal; |
| 27 using namespace v8::internal::wasm; | 26 using namespace v8::internal::wasm; |
| 28 namespace base = v8::base; | 27 namespace base = v8::base; |
| 29 | 28 |
| 30 #define TRACE(...) \ | 29 #define TRACE(...) \ |
| 31 do { \ | 30 do { \ |
| 32 if (FLAG_trace_wasm_instances) PrintF(__VA_ARGS__); \ | 31 if (FLAG_trace_wasm_instances) PrintF(__VA_ARGS__); \ |
| 33 } while (false) | 32 } while (false) |
| 34 | 33 |
| 35 #define TRACE_CHAIN(instance) \ | 34 #define TRACE_CHAIN(instance) \ |
| (...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2357 MaybeHandle<String> WasmCompiledModule::GetFunctionName( | 2356 MaybeHandle<String> WasmCompiledModule::GetFunctionName( |
| 2358 Handle<WasmCompiledModule> compiled_module, uint32_t func_index) { | 2357 Handle<WasmCompiledModule> compiled_module, uint32_t func_index) { |
| 2359 DCHECK_LT(func_index, compiled_module->module()->functions.size()); | 2358 DCHECK_LT(func_index, compiled_module->module()->functions.size()); |
| 2360 WasmFunction& function = compiled_module->module()->functions[func_index]; | 2359 WasmFunction& function = compiled_module->module()->functions[func_index]; |
| 2361 Isolate* isolate = compiled_module->GetIsolate(); | 2360 Isolate* isolate = compiled_module->GetIsolate(); |
| 2362 MaybeHandle<String> string = ExtractStringFromModuleBytes( | 2361 MaybeHandle<String> string = ExtractStringFromModuleBytes( |
| 2363 isolate, compiled_module, function.name_offset, function.name_length); | 2362 isolate, compiled_module, function.name_offset, function.name_length); |
| 2364 if (!string.is_null()) return string.ToHandleChecked(); | 2363 if (!string.is_null()) return string.ToHandleChecked(); |
| 2365 return {}; | 2364 return {}; |
| 2366 } | 2365 } |
| OLD | NEW |