-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for zig 0.10 (stage 2) (#139)
* math.cast now returns ?u16 (?u32, etc) instead of !u16 * Use master for workflow * Omit empty test name * args.nextPosix -> args.next * Update README to reflect zig version * Move fib.wasm into src/ (otherwise it complains about an import from outside package) * fn (*Interpreter) WasmError!void -> *const fn (*Interpreter) WasmError!void * Bump @setEvalBranchQuota again * @clz, @ctz, @popcount * We have a table of function pointers * Just switching the table to be *const gave me: unable to perform tail call: type of function being called '{}' does not match type of calling function '{}' The problem that seems to give with 0.10 stage2 is that I had been inlining the dispatch call, but also calling that with .always_tail. This was nice in that I could easily switch between inline dispatch and noinline dispatch to compare the two. With the type check that now fails, because the inline dispatch function type includes the fact that its calling convention is .Noinline which is not _exactly_ the same as all of the instruction handlers. To get around this for the moment I will just opt for only using inline. I then need to just directly call dispatch (not with @call .always_tail). The reason I can't now quickly check out switching dispatch to noinline is that it will work yes, but it will cause stack frame allocations which we absolutely do not want. If Sema remains unchanged, one we might handle both is by having some compile time flag that can be set that will directly call inline dispatch in the case of wanting inline, and calling a noinline dispatch via @call .always_tail if that's what we want. The other alternative is that Sema is wrong and that instead of comparing the complete function type (including calling convention) it should only compare arg types and return types, in other words don't consider the calling convention * Fix source code test * Fix module.zig tests * Fix setEvalBranchQuota * mem.set table
- Loading branch information
1 parent
08ef0ca
commit 02d4a40
Showing
15 changed files
with
264 additions
and
252 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
zig-cache | ||
zig-out |
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
Binary file not shown.
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
Oops, something went wrong.