blob: e5893d39cd043391dd3d9c52d6d35ab7d8b17381 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package encoder
import (
"testing"
"unsafe"
)
func TestDumpOpcode(t *testing.T) {
ctx := TakeRuntimeContext()
defer ReleaseRuntimeContext(ctx)
var v interface{} = 1
header := (*emptyInterface)(unsafe.Pointer(&v))
typ := header.typ
typeptr := uintptr(unsafe.Pointer(typ))
codeSet, err := CompileToGetCodeSet(ctx, typeptr)
if err != nil {
t.Fatal(err)
}
codeSet.EscapeKeyCode.Dump()
}
|