Skip to content

Commit 171e55c

Browse files
committed
Regenerate IR tests
Too many to count. Also fix `latestworld` printing.
1 parent d467355 commit 171e55c

File tree

9 files changed

+1901
-1630
lines changed

9 files changed

+1901
-1630
lines changed

src/syntax_graph.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ function _value_string(ex)
431431
k == K"Symbol" ? ":$(ex.name_val)" :
432432
k == K"globalref" ? "$(ex.mod).$(ex.name_val)" :
433433
k == K"slot" ? "slot" :
434+
k == K"latestworld" ? "(latestworld)" :
434435
k == K"static_parameter" ? "static_parameter" :
435436
k == K"symbolic_label" ? "label:$(ex.name_val)" :
436437
k == K"symbolic_goto" ? "goto:$(ex.name_val)" :

test/assignments_ir.jl

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,22 @@ begin
3131
end
3232
#---------------------
3333
1 (method TestMod.b)
34-
2 TestMod.b
35-
3 (call core.Typeof %₂)
36-
4 (call core.svec %₃)
37-
5 (call core.svec)
38-
6 SourceLocation::3:9
39-
7 (call core.svec %%%₆)
40-
8 --- method core.nothing %
34+
2 (latestworld)
35+
3 TestMod.b
36+
4 (call core.Typeof %₃)
37+
5 (call core.svec %₄)
38+
6 (call core.svec)
39+
7 SourceLocation::3:9
40+
8 (call core.svec %%%₇)
41+
9 --- method core.nothing %
4142
slots: [slot₁/#self#(!read) slot₂/c(!read)]
4243
1 TestMod.d
4344
2 (= slot₂/c %₁)
4445
3 (return %₁)
45-
9 TestMod.b
46-
10 (= slot₁/a %₉)
47-
11 (return %₉)
46+
10 (latestworld)
47+
11 TestMod.b
48+
12 (= slot₁/a %₁₁)
49+
13 (return %₁₁)
4850

4951
########################################
5052
# a.b = ... => setproperty! assignment
@@ -117,17 +119,17 @@ end
117119
# UnionAll expansion at global scope results in const decl
118120
X{T} = Y{T,T}
119121
#---------------------
120-
1 (const TestMod.X)
121-
2 (call core.TypeVar :T)
122-
3 (= slot₁/T %₂)
123-
4 slot₁/T
124-
5 TestMod.Y
122+
1 (call core.TypeVar :T)
123+
2 (= slot₁/T %)
124+
3 slot₁/T
125+
4 TestMod.Y
126+
5 slot₁/T
125127
6 slot₁/T
126-
7 slot₁/T
127-
8 (call core.apply_type %% %₇)
128-
9 (call core.UnionAll % %₈)
129-
10 (= TestMod.X %)
130-
11 (return %)
128+
7 (call core.apply_type %%%₆)
129+
8 (call core.UnionAll % %₇)
130+
9 (constdecl TestMod.X %₈)
131+
10 (latestworld)
132+
11 (return %)
131133

132134
########################################
133135
# UnionAll expansion in local scope
@@ -144,7 +146,8 @@ end
144146
7 (call core.apply_type %%%₆)
145147
8 (call core.UnionAll %%₇)
146148
9 (= slot₁/X %₈)
147-
10 (return %₈)
149+
10 (latestworld)
150+
11 (return %₈)
148151

149152
########################################
150153
# Error: Invalid lhs in `=`

0 commit comments

Comments
 (0)