github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/testing/binaryencoding/const_expr.go (about) 1 package binaryencoding 2 3 import ( 4 "github.com/wasilibs/wazerox/internal/wasm" 5 ) 6 7 func encodeConstantExpression(expr wasm.ConstantExpression) (ret []byte) { 8 ret = append(ret, expr.Opcode) 9 ret = append(ret, expr.Data...) 10 ret = append(ret, wasm.OpcodeEnd) 11 return 12 }