-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into _update-deps/runtim…
…everification/wasm-semantics
- Loading branch information
Showing
10 changed files
with
822 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
|
||
```k | ||
requires "integer.md" | ||
requires "symbol.md" | ||
requires "vector.md" | ||
module HOSTFUNS | ||
imports HOST-INTEGER | ||
imports HOST-SYMBOL | ||
imports HOST-VECTOR | ||
endmodule | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Symbol | ||
|
||
```k | ||
requires "../configuration.md" | ||
requires "../switch.md" | ||
requires "../wasm-ops.md" | ||
requires "integer.md" | ||
module HOST-SYMBOL | ||
imports CONFIG-OPERATIONS | ||
imports WASM-OPERATIONS | ||
imports HOST-INTEGER | ||
imports SWITCH-SYNTAX | ||
// symbol_new_from_linear_memory | ||
rule [hostfun-symbol-new-from-linear-memory]: | ||
<instrs> hostCall ( "b" , "j" , [ i64 i64 .ValTypes ] -> [ i64 .ValTypes ] ) | ||
=> #memLoad(getMajor(HostVal(LM_POS)), getMajor(HostVal(LEN))) | ||
~> symbolNewFromLinearMemory | ||
... | ||
</instrs> | ||
<locals> | ||
0 |-> < i64 > LM_POS // U32 | ||
1 |-> < i64 > LEN // U32 | ||
</locals> | ||
requires fromSmallValid(HostVal(LM_POS)) | ||
andBool fromSmallValid(HostVal(LEN)) | ||
syntax InternalInstr ::= "symbolNewFromLinearMemory" [symbol(symbolNewFromLinearMemory)] | ||
rule [symbolNewFromLinearMemory]: | ||
<instrs> symbolNewFromLinearMemory | ||
=> allocObject(Symbol(Bytes2String(BS))) | ||
~> returnHostVal | ||
... | ||
</instrs> | ||
<hostStack> BS:Bytes : S => S </hostStack> | ||
requires validSymbol(Bytes2String(BS)) | ||
endmodule | ||
``` |
Oops, something went wrong.