-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compiler: method call on interface receiver #268
Labels
bug
Bug: something already implemented does not work as it should
emitter/builder
Related to VM's emitter and builder
needsInvestigation
Need to investigate
RuntimeError
A bug in Scriggo caused an error/panic at runtime
Comments
The emitted code is:
|
Note that |
That was a problem of the disassembler, which has been resolved in e291a02. The disassembled code is now 1
2 Package main
3
4 Import "sha1"
5
6 Func main()
7 ; regs(1,0,1,9)
8 CallPredefined sha1.New ; New() (g3 hash.Hash)
9 Move g3 g2
10 Move g2 g1
11 Move "abc" s1
12 Convert s1 []uint8 g4
13 Move g4 g3
14 Move g1 g5
15 MethodValue g5 "Write" g6
16 Move g1 g8
17 Move g3 g9
18 CallIndirect g6 ...0 ; Stack shift: 0, 0, 1, 6
19 Return but the problem still persists. |
zapateo
added a commit
that referenced
this issue
Jan 9, 2020
This is the current disassembled code:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Bug: something already implemented does not work as it should
emitter/builder
Related to VM's emitter and builder
needsInvestigation
Need to investigate
RuntimeError
A bug in Scriggo caused an error/panic at runtime
reports the error
value of type *sha1.digest is not assignable to type []uint8
The text was updated successfully, but these errors were encountered: