line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Wasm::Wasmtime::Store; |
2
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
866155
|
use strict; |
|
25
|
|
|
|
|
72
|
|
|
25
|
|
|
|
|
757
|
|
4
|
25
|
|
|
25
|
|
163
|
use warnings; |
|
25
|
|
|
|
|
136
|
|
|
25
|
|
|
|
|
618
|
|
5
|
25
|
|
|
25
|
|
431
|
use 5.008004; |
|
25
|
|
|
|
|
84
|
|
6
|
25
|
|
|
25
|
|
2129
|
use Wasm::Wasmtime::FFI; |
|
25
|
|
|
|
|
111
|
|
|
25
|
|
|
|
|
2725
|
|
7
|
25
|
|
|
25
|
|
6750
|
use Wasm::Wasmtime::Engine; |
|
25
|
|
|
|
|
70
|
|
|
25
|
|
|
|
|
4680
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Wasmtime store class |
10
|
|
|
|
|
|
|
our $VERSION = '0.21'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
$ffi_prefix = 'wasm_store_'; |
14
|
|
|
|
|
|
|
$ffi->load_custom_type('::PtrObject' => 'wasm_store_t' => __PACKAGE__); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
$ffi->attach( new => ['wasm_engine_t'] => 'wasm_store_t' => sub { |
18
|
|
|
|
|
|
|
my($xsub, $class, $engine) = @_; |
19
|
|
|
|
|
|
|
$engine ||= Wasm::Wasmtime::Engine->new; |
20
|
|
|
|
|
|
|
my $self = $xsub->($engine); |
21
|
|
|
|
|
|
|
$self->{engine} = $engine; |
22
|
|
|
|
|
|
|
$self; |
23
|
|
|
|
|
|
|
}); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
$ffi->attach( [ wasmtime_store_gc => 'gc' ] => ['wasm_store_t'] => 'void' ); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
47
|
|
|
47
|
1
|
8977
|
sub engine { shift->{engine} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
_generate_destroy(); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__END__ |