line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Wasm::Wasmtime::Store; |
2
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
922485
|
use strict; |
|
25
|
|
|
|
|
79
|
|
|
25
|
|
|
|
|
797
|
|
4
|
25
|
|
|
25
|
|
145
|
use warnings; |
|
25
|
|
|
|
|
123
|
|
|
25
|
|
|
|
|
604
|
|
5
|
25
|
|
|
25
|
|
460
|
use 5.008004; |
|
25
|
|
|
|
|
91
|
|
6
|
25
|
|
|
25
|
|
2248
|
use Wasm::Wasmtime::FFI; |
|
25
|
|
|
|
|
77
|
|
|
25
|
|
|
|
|
2723
|
|
7
|
25
|
|
|
25
|
|
6811
|
use Wasm::Wasmtime::Engine; |
|
25
|
|
|
|
|
83
|
|
|
25
|
|
|
|
|
4897
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# TODO: wasmtime_store_add_fuel |
10
|
|
|
|
|
|
|
# TODO: wasmtime_store_fuel_consumed |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# ABSTRACT: Wasmtime store class |
13
|
|
|
|
|
|
|
our $VERSION = '0.23'; # VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
$ffi_prefix = 'wasm_store_'; |
17
|
|
|
|
|
|
|
$ffi->load_custom_type('::PtrObject' => 'wasm_store_t' => __PACKAGE__); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$ffi->attach( new => ['wasm_engine_t'] => 'wasm_store_t' => sub { |
21
|
|
|
|
|
|
|
my($xsub, $class, $engine) = @_; |
22
|
|
|
|
|
|
|
$engine ||= Wasm::Wasmtime::Engine->new; |
23
|
|
|
|
|
|
|
my $self = $xsub->($engine); |
24
|
|
|
|
|
|
|
$self->{engine} = $engine; |
25
|
|
|
|
|
|
|
$self; |
26
|
|
|
|
|
|
|
}); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$ffi->attach( [ wasmtime_store_gc => 'gc' ] => ['wasm_store_t'] => 'void' ); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
47
|
|
|
47
|
1
|
10622
|
sub engine { shift->{engine} } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
_generate_destroy(); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |