Skip to content

Commit 8ec5aa6

Browse files
committed
test(#324): expand generic types when inlining
1 parent 5d7c901 commit 8ec5aa6

21 files changed

+479
-479
lines changed

test-cases/complex/exp/testcase_multi_specz-drone.exp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ module top-level code > {terminal,inline,impure} (0 calls)
7070
foreign lpvm store(0:wybe.phantom, <<wybe.io.io>>:wybe.phantom) @io:nn:nn
7171
foreign c {impure} gc_init @memory_management:nn:nn
7272
drone.<0><{<<wybe.io.io>>}; {<<wybe.io.io>>}; {}> #1
73-
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(T)) @command_line:nn:nn
74-
foreign lpvm mutate(~tmp#9##0:wybe.c_array(T), ?tmp#10##0:wybe.c_array(T), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
75-
foreign lpvm mutate(~tmp#10##0:wybe.c_array(T), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
73+
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(wybe.c_string)) @command_line:nn:nn
74+
foreign lpvm mutate(~tmp#9##0:wybe.c_array(wybe.c_string), ?tmp#10##0:wybe.c_array(wybe.c_string), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
75+
foreign lpvm mutate(~tmp#10##0:wybe.c_array(wybe.c_string), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
7676
foreign lpvm store(~tmp#0##0:wybe.c_array(wybe.c_string), <<command_line.arguments>>:wybe.c_array(wybe.c_string)) @command_line:nn:nn
7777
foreign lpvm store(c"":wybe.c_string, <<command_line.command>>:wybe.c_string) @command_line:nn:nn
7878
foreign lpvm store(0:wybe.int, <<command_line.exit_code>>:wybe.int) @command_line:nn:nn
@@ -613,9 +613,9 @@ module top-level code > {terminal,inline,impure} (0 calls)
613613
foreign lpvm store(0:wybe.phantom, <<wybe.io.io>>:wybe.phantom) @io:nn:nn
614614
foreign c {impure} gc_init @memory_management:nn:nn
615615
drone.<0><{<<wybe.io.io>>}; {<<wybe.io.io>>}; {}> #1
616-
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(T)) @command_line:nn:nn
617-
foreign lpvm mutate(~tmp#9##0:wybe.c_array(T), ?tmp#10##0:wybe.c_array(T), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
618-
foreign lpvm mutate(~tmp#10##0:wybe.c_array(T), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
616+
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(wybe.c_string)) @command_line:nn:nn
617+
foreign lpvm mutate(~tmp#9##0:wybe.c_array(wybe.c_string), ?tmp#10##0:wybe.c_array(wybe.c_string), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
618+
foreign lpvm mutate(~tmp#10##0:wybe.c_array(wybe.c_string), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
619619
foreign lpvm store(~tmp#0##0:wybe.c_array(wybe.c_string), <<command_line.arguments>>:wybe.c_array(wybe.c_string)) @command_line:nn:nn
620620
foreign lpvm store(c"":wybe.c_string, <<command_line.command>>:wybe.c_string) @command_line:nn:nn
621621
foreign lpvm store(0:wybe.int, <<command_line.exit_code>>:wybe.int) @command_line:nn:nn

test-cases/complex/exp/testcase_multi_specz-int_list.exp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ module top-level code > {terminal,inline,impure} (0 calls)
139139
foreign lpvm store(0:wybe.phantom, <<wybe.io.io>>:wybe.phantom) @io:nn:nn
140140
foreign c {impure} gc_init @memory_management:nn:nn
141141
int_list_test.<0><{<<wybe.io.io>>}; {<<wybe.io.io>>}; {}> #1
142-
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(T)) @command_line:nn:nn
143-
foreign lpvm mutate(~tmp#9##0:wybe.c_array(T), ?tmp#10##0:wybe.c_array(T), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
144-
foreign lpvm mutate(~tmp#10##0:wybe.c_array(T), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
142+
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(wybe.c_string)) @command_line:nn:nn
143+
foreign lpvm mutate(~tmp#9##0:wybe.c_array(wybe.c_string), ?tmp#10##0:wybe.c_array(wybe.c_string), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
144+
foreign lpvm mutate(~tmp#10##0:wybe.c_array(wybe.c_string), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
145145
foreign lpvm store(~tmp#0##0:wybe.c_array(wybe.c_string), <<command_line.arguments>>:wybe.c_array(wybe.c_string)) @command_line:nn:nn
146146
foreign lpvm store(c"":wybe.c_string, <<command_line.command>>:wybe.c_string) @command_line:nn:nn
147147
foreign lpvm store(0:wybe.int, <<command_line.exit_code>>:wybe.int) @command_line:nn:nn
@@ -976,9 +976,9 @@ module top-level code > {terminal,inline,impure} (0 calls)
976976
foreign lpvm store(0:wybe.phantom, <<wybe.io.io>>:wybe.phantom) @io:nn:nn
977977
foreign c {impure} gc_init @memory_management:nn:nn
978978
int_list_test.<0><{<<wybe.io.io>>}; {<<wybe.io.io>>}; {}> #1
979-
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(T)) @command_line:nn:nn
980-
foreign lpvm mutate(~tmp#9##0:wybe.c_array(T), ?tmp#10##0:wybe.c_array(T), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
981-
foreign lpvm mutate(~tmp#10##0:wybe.c_array(T), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
979+
foreign lpvm alloc(16:wybe.int, ?tmp#9##0:wybe.c_array(wybe.c_string)) @command_line:nn:nn
980+
foreign lpvm mutate(~tmp#9##0:wybe.c_array(wybe.c_string), ?tmp#10##0:wybe.c_array(wybe.c_string), 0:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argc##0:wybe.int) @command_line:nn:nn
981+
foreign lpvm mutate(~tmp#10##0:wybe.c_array(wybe.c_string), ?tmp#0##0:wybe.c_array(wybe.c_string), 8:wybe.int, 1:wybe.int, 16:wybe.int, 0:wybe.int, ~argv##0:wybe.c_array.raw_array) @command_line:nn:nn
982982
foreign lpvm store(~tmp#0##0:wybe.c_array(wybe.c_string), <<command_line.arguments>>:wybe.c_array(wybe.c_string)) @command_line:nn:nn
983983
foreign lpvm store(c"":wybe.c_string, <<command_line.command>>:wybe.c_string) @command_line:nn:nn
984984
foreign lpvm store(0:wybe.int, <<command_line.exit_code>>:wybe.int) @command_line:nn:nn

test-cases/final-dump/anon_field_variable.exp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ module top-level code > public {semipure} (0 calls)
1717
()<{<<wybe.io.io>>}; {<<wybe.io.io>>}; {}>:
1818
AliasPairs: []
1919
InterestingCallProperties: []
20-
foreign lpvm alloc(8:wybe.int, ?tmp#5##0:anon_field_variable(T)) @anon_field_variable:nn:nn
21-
foreign lpvm mutate(~tmp#5##0:anon_field_variable(T), ?tmp#0##0:anon_field_variable(wybe.bool), 0:wybe.int, 1:wybe.int, 8:wybe.int, 0:wybe.int, 0:T) @anon_field_variable:nn:nn
20+
foreign lpvm alloc(8:wybe.int, ?tmp#5##0:anon_field_variable(wybe.bool)) @anon_field_variable:nn:nn
21+
foreign lpvm mutate(~tmp#5##0:anon_field_variable(wybe.bool), ?tmp#0##0:anon_field_variable(wybe.bool), 0:wybe.int, 1:wybe.int, 8:wybe.int, 0:wybe.int, 0:wybe.bool) @anon_field_variable:nn:nn
2222
foreign llvm and(~tmp#0##0:wybe.int, 1:wybe.int, ?tmp#7##0:wybe.int) @anon_field_variable:nn:nn
2323
foreign llvm icmp_eq(~tmp#7##0:wybe.int, 0:wybe.int, ?tmp#8##0:wybe.bool) @anon_field_variable:nn:nn
2424
case ~tmp#8##0:wybe.bool of
@@ -142,7 +142,7 @@ define external fastcc void @"anon_field_variable.<0>"() {
142142
%"tmp#12##0" = call ccc ptr @wybe_malloc(i32 8)
143143
%"tmp#5##0" = ptrtoint ptr %"tmp#12##0" to i64
144144
%"tmp#13##0" = inttoptr i64 %"tmp#5##0" to ptr
145-
store i64 0, ptr %"tmp#13##0"
145+
store i1 0, ptr %"tmp#13##0"
146146
%"tmp#7##0" = and i64 %"tmp#5##0", 1
147147
%"tmp#8##0" = icmp eq i64 %"tmp#7##0", 0
148148
br i1 %"tmp#8##0", label %if.then.0, label %if.else.0

0 commit comments

Comments
 (0)