compiler: support removing slice elements
Go-way of removing elements from slice is via `append` builtin. There is a separate opcode for removing elements from Arrays, which is cheaper and supported in this commit.
This commit is contained in:
parent
78948ef7af
commit
bcc11cbd74
4 changed files with 36 additions and 1 deletions
|
@ -17,3 +17,8 @@ func FromAddress(address string) []byte {
|
|||
func Equals(a, b interface{}) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Remove removes element with index i from slice.
|
||||
// This is done in place and slice must have type other than `[]byte`.
|
||||
func Remove(slice interface{}, i int) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue