mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 19:51:47 +00:00
add prestat struct
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { dirent, rwevent, fdstat, filestat, iovec, clocksubscription, fdsubscription, signal } from "bindings/wasi";
|
||||
import { dirent, rwevent, fdstat, filestat, iovec, clocksubscription, fdsubscription, signal, dirprestat } from "bindings/wasi";
|
||||
|
||||
// TODO: WASM64
|
||||
|
||||
@ -49,6 +49,10 @@ assert(offsetof<fdsubscription>("type") == 8);
|
||||
assert(offsetof<fdsubscription>("fd") == 16);
|
||||
assert(offsetof<fdsubscription>() == 20);
|
||||
|
||||
assert(offsetof<dirprestat>("type") == 0);
|
||||
assert(offsetof<dirprestat>("name_len") == 4);
|
||||
assert(offsetof<dirprestat>() == 8);
|
||||
|
||||
// check assignability of mimicked typed enums
|
||||
var sig: signal = signal.HUP;
|
||||
sig = signal.KILL;
|
||||
|
@ -492,6 +492,42 @@
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
i32.const 0
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 52
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 4
|
||||
i32.const 4
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 53
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 8
|
||||
i32.const 8
|
||||
i32.eq
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 8
|
||||
i32.const 54
|
||||
i32.const 0
|
||||
call $~lib/env/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 9
|
||||
global.set $wasi/sig
|
||||
)
|
||||
|
Reference in New Issue
Block a user