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/assembler-inl.h" | 7 #include "src/assembler-inl.h" |
8 #include "src/base/adapters.h" | 8 #include "src/base/adapters.h" |
9 #include "src/base/atomic-utils.h" | 9 #include "src/base/atomic-utils.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1423 compiled_module_->set_weak_wasm_module( | 1423 compiled_module_->set_weak_wasm_module( |
1424 original.ToHandleChecked()->weak_wasm_module()); | 1424 original.ToHandleChecked()->weak_wasm_module()); |
1425 } | 1425 } |
1426 module_object_->SetInternalField(0, *compiled_module_); | 1426 module_object_->SetInternalField(0, *compiled_module_); |
1427 compiled_module_->set_weak_owning_instance(link_to_owning_instance); | 1427 compiled_module_->set_weak_owning_instance(link_to_owning_instance); |
1428 GlobalHandles::MakeWeak(global_handle.location(), | 1428 GlobalHandles::MakeWeak(global_handle.location(), |
1429 global_handle.location(), &InstanceFinalizer, | 1429 global_handle.location(), &InstanceFinalizer, |
1430 v8::WeakCallbackType::kFinalizer); | 1430 v8::WeakCallbackType::kFinalizer); |
1431 } | 1431 } |
1432 } | 1432 } |
| 1433 |
| 1434 //-------------------------------------------------------------------------- |
| 1435 // Set all breakpoints that were set on the shared module. |
| 1436 //-------------------------------------------------------------------------- |
| 1437 WasmSharedModuleData::SetBreakpointsOnNewInstance( |
| 1438 compiled_module_->shared(), instance); |
| 1439 |
1433 //-------------------------------------------------------------------------- | 1440 //-------------------------------------------------------------------------- |
1434 // Run the start function if one was specified. | 1441 // Run the start function if one was specified. |
1435 //-------------------------------------------------------------------------- | 1442 //-------------------------------------------------------------------------- |
1436 if (module_->start_function_index >= 0) { | 1443 if (module_->start_function_index >= 0) { |
1437 HandleScope scope(isolate_); | 1444 HandleScope scope(isolate_); |
1438 int start_index = module_->start_function_index; | 1445 int start_index = module_->start_function_index; |
1439 Handle<Code> startup_code = | 1446 Handle<Code> startup_code = |
1440 code_table->GetValueChecked<Code>(isolate_, start_index); | 1447 code_table->GetValueChecked<Code>(isolate_, start_index); |
1441 FunctionSig* sig = module_->functions[start_index].sig; | 1448 FunctionSig* sig = module_->functions[start_index].sig; |
1442 Handle<Code> wrapper_code = compiler::CompileJSToWasmWrapper( | 1449 Handle<Code> wrapper_code = compiler::CompileJSToWasmWrapper( |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2625 | 2632 |
2626 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), | 2633 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), |
2627 NONE); | 2634 NONE); |
2628 JSObject::AddProperty(entry, kind_string, export_kind, NONE); | 2635 JSObject::AddProperty(entry, kind_string, export_kind, NONE); |
2629 | 2636 |
2630 storage->set(index, *entry); | 2637 storage->set(index, *entry); |
2631 } | 2638 } |
2632 | 2639 |
2633 return array_object; | 2640 return array_object; |
2634 } | 2641 } |
OLD | NEW |