TestMakeInterface
This commit is contained in:
@@ -57,38 +57,6 @@ func TestMakeInterface(t *testing.T) {
|
|||||||
b.MakeInterface(prog.Any(), prog.IntVal(100, prog.Int64()))
|
b.MakeInterface(prog.Any(), prog.IntVal(100, prog.Int64()))
|
||||||
b.MakeInterface(prog.Any(), prog.FloatVal(100, prog.Float64()))
|
b.MakeInterface(prog.Any(), prog.FloatVal(100, prog.Float64()))
|
||||||
b.Return()
|
b.Return()
|
||||||
ssatest.Assert(t, pkg, `; ModuleID = 'foo'
|
|
||||||
source_filename = "foo"
|
|
||||||
|
|
||||||
%"github.com/goplus/llgo/internal/runtime.eface" = type { ptr, ptr }
|
|
||||||
|
|
||||||
define void @main() {
|
|
||||||
_llgo_0:
|
|
||||||
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 6)
|
|
||||||
%1 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
|
||||||
store i64 100, ptr %1, align 4
|
|
||||||
%2 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
||||||
%3 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i32 0, i32 0
|
|
||||||
store ptr %0, ptr %3, align 8
|
|
||||||
%4 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, i32 0, i32 1
|
|
||||||
store ptr %1, ptr %4, align 8
|
|
||||||
%5 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %2, align 8
|
|
||||||
%6 = call ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64 14)
|
|
||||||
%7 = call ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64 8)
|
|
||||||
store double 1.000000e+02, ptr %7, align 8
|
|
||||||
%8 = alloca %"github.com/goplus/llgo/internal/runtime.eface", align 8
|
|
||||||
%9 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 0
|
|
||||||
store ptr %6, ptr %9, align 8
|
|
||||||
%10 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, i32 0, i32 1
|
|
||||||
store ptr %7, ptr %10, align 8
|
|
||||||
%11 = load %"github.com/goplus/llgo/internal/runtime.eface", ptr %8, align 8
|
|
||||||
ret void
|
|
||||||
}
|
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.Basic"(i64)
|
|
||||||
|
|
||||||
declare ptr @"github.com/goplus/llgo/internal/runtime.AllocU"(i64)
|
|
||||||
`)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user