go-interpreter / wagon

wagon, a WebAssembly-based Go interpreter, for Go.
BSD 3-Clause "New" or "Revised" License
904 stars 148 forks source link

exec: fix div instruction #186

Closed laizy closed 4 years ago

laizy commented 4 years ago

spec ref: https://webassembly.github.io/spec/core/exec/numerics.html#op-idiv-s

this fix passed the testcase in https://github.com/WebAssembly/testsuite/blob/master/i32.wast#L64

codecov-io commented 4 years ago

Codecov Report

Merging #186 into master will decrease coverage by 0.73%. The diff coverage is 40.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #186      +/-   ##
==========================================
- Coverage   69.77%   69.03%   -0.74%     
==========================================
  Files          49       51       +2     
  Lines        5495     5910     +415     
==========================================
+ Hits         3834     4080     +246     
- Misses       1318     1467     +149     
- Partials      343      363      +20
Impacted Files Coverage Δ
exec/vm.go 80.13% <0%> (-3.14%) :arrow_down:
wasm/module.go 72.88% <100%> (ø) :arrow_up:
wasm/types.go 46.15% <100%> (+0.32%) :arrow_up:
wasm/index.go 58.55% <33.33%> (-3.32%) :arrow_down:
exec/call.go 76.92% <50%> (-5.69%) :arrow_down:
exec/num.go 98.67% <60%> (-1.33%) :arrow_down:
exec/memory.go 84.42% <66.66%> (-1.9%) :arrow_down:
wast/write.go 70.15% <0%> (ø) :arrow_up:
wast/scanner.go 55.64% <0%> (ø)
wast/token.go 65% <0%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 8dd99d5...b4f9a91. Read the comment docs.

laizy commented 4 years ago

@sbinet ,review?

laizy commented 4 years ago

No rush to merge. we have build a test runner for the spec testsuite in our forked repo, and found some other issues. We will submit the fixes with the test runner code soon.

sbinet commented 4 years ago

ping?

laizy commented 4 years ago

@sbinet sorry for late reply. Have appended commits for test runner and some bug fix.