Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interp: avoid useless interface wrapping
in `callBin`, call arguments are converted to the corresponding parameter type. In a case of an interface, the original concrete type should be preserved instead, and only wrapped to an interface type for internal interpreter types, as runtime values should already implement the interface. This change removes the interface wrapping when parameter is a runtime value (valueT or ptrT to valueT). This removes some overhead when handling runtime values, and keep a similar behavior between interpreted and pre-compiled code. For example, `io.Copy` preserves its internal optimisations when passed a `bytes.Buffer`.
- Loading branch information