mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-16 02:33:28 +00:00
compiler: avoid bitcast when replacing a method call with a direct call
A bitcast was inserted when the receiver of the call wasn't a *i8. This is a pretty common case, and did not play well with goroutines. Avoid this bitcast by changing each call to a direct call, after unpacking the receiver type from the *i8 parameter. This might also fix some undefined behavior in the resulting program, as it is technically not allowed to call a function with a different signature (even if the signature is compatible).
This commit is contained in:
committed by
Ron Evans
parent
387e1340bf
commit
99da328453
Vendored
+1
@@ -9,3 +9,4 @@ wait:
|
||||
end waiting
|
||||
non-blocking goroutine
|
||||
done with non-blocking goroutine
|
||||
async interface method call
|
||||
|
||||
Reference in New Issue
Block a user