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 |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 } | 449 } |
450 } | 450 } |
451 } | 451 } |
452 | 452 |
453 static void ResetCompiledModule(Isolate* isolate, WasmInstanceObject* owner, | 453 static void ResetCompiledModule(Isolate* isolate, WasmInstanceObject* owner, |
454 WasmCompiledModule* compiled_module) { | 454 WasmCompiledModule* compiled_module) { |
455 TRACE("Resetting %d\n", compiled_module->instance_id()); | 455 TRACE("Resetting %d\n", compiled_module->instance_id()); |
456 Object* undefined = *isolate->factory()->undefined_value(); | 456 Object* undefined = *isolate->factory()->undefined_value(); |
457 uint32_t old_mem_size = compiled_module->mem_size(); | 457 uint32_t old_mem_size = compiled_module->mem_size(); |
458 uint32_t default_mem_size = compiled_module->default_mem_size(); | 458 uint32_t default_mem_size = compiled_module->default_mem_size(); |
459 Object* mem_start = compiled_module->ptr_to_memory(); | 459 Object* mem_start = compiled_module->maybe_ptr_to_memory(); |
460 Address old_mem_address = nullptr; | 460 Address old_mem_address = nullptr; |
461 Address globals_start = | 461 Address globals_start = |
462 GetGlobalStartAddressFromCodeTemplate(undefined, owner); | 462 GetGlobalStartAddressFromCodeTemplate(undefined, owner); |
463 | 463 |
464 // Reset function tables. | 464 // Reset function tables. |
465 FixedArray* function_tables = nullptr; | 465 FixedArray* function_tables = nullptr; |
466 FixedArray* empty_function_tables = nullptr; | 466 FixedArray* empty_function_tables = nullptr; |
467 if (compiled_module->has_function_tables()) { | 467 if (compiled_module->has_function_tables()) { |
468 function_tables = compiled_module->ptr_to_function_tables(); | 468 function_tables = compiled_module->ptr_to_function_tables(); |
469 empty_function_tables = compiled_module->ptr_to_empty_function_tables(); | 469 empty_function_tables = compiled_module->ptr_to_empty_function_tables(); |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2203 MaybeHandle<String> WasmCompiledModule::GetFunctionName( | 2203 MaybeHandle<String> WasmCompiledModule::GetFunctionName( |
2204 Handle<WasmCompiledModule> compiled_module, uint32_t func_index) { | 2204 Handle<WasmCompiledModule> compiled_module, uint32_t func_index) { |
2205 DCHECK_LT(func_index, compiled_module->module()->functions.size()); | 2205 DCHECK_LT(func_index, compiled_module->module()->functions.size()); |
2206 WasmFunction& function = compiled_module->module()->functions[func_index]; | 2206 WasmFunction& function = compiled_module->module()->functions[func_index]; |
2207 Isolate* isolate = compiled_module->GetIsolate(); | 2207 Isolate* isolate = compiled_module->GetIsolate(); |
2208 MaybeHandle<String> string = ExtractStringFromModuleBytes( | 2208 MaybeHandle<String> string = ExtractStringFromModuleBytes( |
2209 isolate, compiled_module, function.name_offset, function.name_length); | 2209 isolate, compiled_module, function.name_offset, function.name_length); |
2210 if (!string.is_null()) return string.ToHandleChecked(); | 2210 if (!string.is_null()) return string.ToHandleChecked(); |
2211 return {}; | 2211 return {}; |
2212 } | 2212 } |
OLD | NEW |