Skip to content

Commit f1edbb2

Browse files
committed
Merge remote-tracking branch 'origin/master' into init-in-python-take-3
2 parents ba4b685 + 0c1b04f commit f1edbb2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+528
-356
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ pyupgrade:
112112
# Update smir exec tests expectations
113113
.PHONY: update-exec-smir
114114
update-exec-smir:
115-
UPDATE_EXEC_SMIR=true $(UV_RUN) pytest -k test_exec_smir
115+
$(UV_RUN) pytest -k test_exec_smir --update-expected-output
116116

117117
# Update checked-in smir.json files (using stable-mir-json dependency and jq)
118118
.PHONY: update-smir-json

deps/stable-mir-json

Submodule stable-mir-json updated 27 files

deps/stable-mir-json_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f452197961732339caa46f47dbeacddce2b60b31
1+
180bfb4a7ec49ec2d999a1aae7364c1001d5e3da

kmir/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "kmir"
7-
version = "0.3.162"
7+
version = "0.3.163"
88
description = ""
99
requires-python = "~=3.10"
1010
dependencies = [

kmir/src/kmir/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from typing import Final
22

3-
VERSION: Final = '0.3.162'
3+
VERSION: Final = '0.3.163'

kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.smir.json

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
100,
4141
58,
4242
32,
43-
117,
43+
105,
4444
56,
4545
58,
4646
58,
@@ -54,9 +54,9 @@
5454
101,
5555
100,
5656
95,
57-
97,
58-
100,
59-
100,
57+
115,
58+
117,
59+
98,
6060
32,
6161
99,
6262
97,
@@ -120,7 +120,7 @@
120120
100,
121121
58,
122122
32,
123-
105,
123+
117,
124124
56,
125125
58,
126126
58,
@@ -134,9 +134,9 @@
134134
101,
135135
100,
136136
95,
137-
115,
138-
117,
139-
98,
137+
97,
138+
100,
139+
100,
140140
32,
141141
99,
142142
97,
@@ -3620,7 +3620,7 @@
36203620
[
36213621
5,
36223622
{
3623-
"RefType": 38
3623+
"RefType": 37
36243624
}
36253625
],
36263626
[
@@ -3634,7 +3634,7 @@
36343634
[
36353635
8,
36363636
{
3637-
"PtrType": 39
3637+
"PtrType": 38
36383638
}
36393639
],
36403640
[
@@ -3650,7 +3650,7 @@
36503650
{
36513651
"EnumType": {
36523652
"name": "std::result::Result",
3653-
"adt_def": 18,
3653+
"adt_def": 17,
36543654
"discriminants": [
36553655
[
36563656
0,
@@ -3675,7 +3675,10 @@
36753675
{
36763676
"StructType": {
36773677
"name": "std::sys::pal::unix::process::process_common::ExitCode",
3678-
"adt_def": 21
3678+
"adt_def": 22,
3679+
"fields": [
3680+
9
3681+
]
36793682
}
36803683
}
36813684
],
@@ -3692,7 +3695,10 @@
36923695
{
36933696
"StructType": {
36943697
"name": "std::process::ExitCode",
3695-
"adt_def": 20
3698+
"adt_def": 11,
3699+
"fields": [
3700+
15
3701+
]
36963702
}
36973703
}
36983704
],
@@ -3711,7 +3717,7 @@
37113717
[
37123718
24,
37133719
{
3714-
"RefType": 37
3720+
"RefType": 39
37153721
}
37163722
],
37173723
[
@@ -3768,15 +3774,15 @@
37683774
}
37693775
],
37703776
[
3771-
37,
3777+
38,
37723778
{
3773-
"PrimitiveType": "Str"
3779+
"PtrType": 9
37743780
}
37753781
],
37763782
[
37773783
39,
37783784
{
3779-
"PtrType": 9
3785+
"PrimitiveType": "Str"
37803786
}
37813787
]
37823788
],

kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic-unchecked-runs.state

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,30 +75,30 @@
7575
<types>
7676
ty ( 1 ) |-> typeInfoTupleType ( .Tys )
7777
ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) )
78-
ty ( 5 ) |-> typeInfoRefType ( ty ( 38 ) )
78+
ty ( 5 ) |-> typeInfoRefType ( ty ( 37 ) )
7979
ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) )
80-
ty ( 8 ) |-> typeInfoPtrType ( ty ( 39 ) )
80+
ty ( 8 ) |-> typeInfoPtrType ( ty ( 38 ) )
8181
ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) )
82-
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 18 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
82+
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 17 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
8383
ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) )
84-
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 21 ) )
84+
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 22 ) )
8585
ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) )
86-
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 20 ) )
86+
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 11 ) )
8787
ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) )
8888
ty ( 21 ) |-> typeInfoPrimitiveType ( primTypeBool )
89-
ty ( 24 ) |-> typeInfoRefType ( ty ( 37 ) )
89+
ty ( 24 ) |-> typeInfoRefType ( ty ( 39 ) )
9090
ty ( 26 ) |-> typeInfoTupleType ( ty ( 2 ) ty ( 21 ) .Tys )
9191
ty ( 28 ) |-> typeInfoTupleType ( ty ( 9 ) ty ( 21 ) .Tys )
9292
ty ( 30 ) |-> typeInfoPtrType ( ty ( 12 ) )
9393
ty ( 32 ) |-> typeInfoRefType ( ty ( 12 ) )
9494
ty ( 35 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI16 ) )
9595
ty ( 36 ) |-> typeInfoTupleType ( ty ( 35 ) ty ( 21 ) .Tys )
96-
ty ( 37 ) |-> typeInfoPrimitiveType ( primTypeStr )
97-
ty ( 39 ) |-> typeInfoPtrType ( ty ( 9 ) )
96+
ty ( 38 ) |-> typeInfoPtrType ( ty ( 9 ) )
97+
ty ( 39 ) |-> typeInfoPrimitiveType ( primTypeStr )
9898
</types>
9999
<adt-to-ty>
100-
adtDef ( 18 ) |-> ty ( 10 )
101-
adtDef ( 20 ) |-> ty ( 17 )
102-
adtDef ( 21 ) |-> ty ( 15 )
100+
adtDef ( 11 ) |-> ty ( 17 )
101+
adtDef ( 17 ) |-> ty ( 10 )
102+
adtDef ( 22 ) |-> ty ( 15 )
103103
</adt-to-ty>
104104
</kmir>

kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.smir.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747
],
4848
[
49-
33,
49+
30,
5050
{
5151
"NoOpSym": ""
5252
}
@@ -2735,7 +2735,7 @@
27352735
[
27362736
5,
27372737
{
2738-
"RefType": 30
2738+
"RefType": 31
27392739
}
27402740
],
27412741
[
@@ -2749,7 +2749,7 @@
27492749
[
27502750
8,
27512751
{
2752-
"PtrType": 31
2752+
"PtrType": 32
27532753
}
27542754
],
27552755
[
@@ -2765,7 +2765,7 @@
27652765
{
27662766
"EnumType": {
27672767
"name": "std::result::Result",
2768-
"adt_def": 12,
2768+
"adt_def": 14,
27692769
"discriminants": [
27702770
[
27712771
0,
@@ -2790,7 +2790,10 @@
27902790
{
27912791
"StructType": {
27922792
"name": "std::sys::pal::unix::process::process_common::ExitCode",
2793-
"adt_def": 15
2793+
"adt_def": 17,
2794+
"fields": [
2795+
9
2796+
]
27942797
}
27952798
}
27962799
],
@@ -2807,7 +2810,10 @@
28072810
{
28082811
"StructType": {
28092812
"name": "std::process::ExitCode",
2810-
"adt_def": 14
2813+
"adt_def": 8,
2814+
"fields": [
2815+
15
2816+
]
28112817
}
28122818
}
28132819
],
@@ -2877,7 +2883,7 @@
28772883
}
28782884
],
28792885
[
2880-
31,
2886+
32,
28812887
{
28822888
"PtrType": 9
28832889
}

kmir/src/tests/integration/data/exec-smir/arithmetic/arithmetic.state

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@
8484
<types>
8585
ty ( 1 ) |-> typeInfoTupleType ( .Tys )
8686
ty ( 2 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI8 ) )
87-
ty ( 5 ) |-> typeInfoRefType ( ty ( 30 ) )
87+
ty ( 5 ) |-> typeInfoRefType ( ty ( 31 ) )
8888
ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) )
89-
ty ( 8 ) |-> typeInfoPtrType ( ty ( 31 ) )
89+
ty ( 8 ) |-> typeInfoPtrType ( ty ( 32 ) )
9090
ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) )
91-
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 12 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
91+
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 14 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
9292
ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) )
93-
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 15 ) )
93+
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 17 ) )
9494
ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) )
95-
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 14 ) )
95+
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) )
9696
ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) )
9797
ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) )
9898
ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) )
@@ -101,11 +101,11 @@
101101
ty ( 27 ) |-> typeInfoTupleType ( ty ( 9 ) ty ( 25 ) .Tys )
102102
ty ( 28 ) |-> typeInfoTupleType ( ty ( 2 ) ty ( 25 ) .Tys )
103103
ty ( 29 ) |-> typeInfoTupleType ( ty ( 26 ) ty ( 25 ) .Tys )
104-
ty ( 31 ) |-> typeInfoPtrType ( ty ( 9 ) )
104+
ty ( 32 ) |-> typeInfoPtrType ( ty ( 9 ) )
105105
</types>
106106
<adt-to-ty>
107-
adtDef ( 12 ) |-> ty ( 10 )
108-
adtDef ( 14 ) |-> ty ( 17 )
109-
adtDef ( 15 ) |-> ty ( 15 )
107+
adtDef ( 8 ) |-> ty ( 17 )
108+
adtDef ( 14 ) |-> ty ( 10 )
109+
adtDef ( 17 ) |-> ty ( 15 )
110110
</adt-to-ty>
111111
</kmir>

kmir/src/tests/integration/data/exec-smir/arithmetic/unary.smir.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,7 @@
19391939
{
19401940
"EnumType": {
19411941
"name": "std::result::Result",
1942-
"adt_def": 17,
1942+
"adt_def": 15,
19431943
"discriminants": [
19441944
[
19451945
0,
@@ -1964,7 +1964,10 @@
19641964
{
19651965
"StructType": {
19661966
"name": "std::sys::pal::unix::process::process_common::ExitCode",
1967-
"adt_def": 9
1967+
"adt_def": 17,
1968+
"fields": [
1969+
9
1970+
]
19681971
}
19691972
}
19701973
],
@@ -1981,7 +1984,10 @@
19811984
{
19821985
"StructType": {
19831986
"name": "std::process::ExitCode",
1984-
"adt_def": 8
1987+
"adt_def": 7,
1988+
"fields": [
1989+
15
1990+
]
19851991
}
19861992
}
19871993
],

kmir/src/tests/integration/data/exec-smir/arithmetic/unary.state

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@
6262
ty ( 6 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyIsize ) )
6363
ty ( 8 ) |-> typeInfoPtrType ( ty ( 29 ) )
6464
ty ( 9 ) |-> typeInfoPrimitiveType ( primTypeUint ( uintTyU8 ) )
65-
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 17 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
65+
ty ( 10 ) |-> typeInfoEnumType ( "std::result::Result" , adtDef ( 15 ) , Discriminant ( variantIdx ( 0 ) , 0 ) Discriminant ( variantIdx ( 1 ) , 1 ) .Discriminants )
6666
ty ( 11 ) |-> typeInfoRefType ( ty ( 12 ) )
67-
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 9 ) )
67+
ty ( 15 ) |-> typeInfoStructType ( "std::sys::pal::unix::process::process_common::ExitCode" , adtDef ( 17 ) )
6868
ty ( 16 ) |-> typeInfoPrimitiveType ( primTypeInt ( intTyI32 ) )
69-
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 8 ) )
69+
ty ( 17 ) |-> typeInfoStructType ( "std::process::ExitCode" , adtDef ( 7 ) )
7070
ty ( 18 ) |-> typeInfoRefType ( ty ( 15 ) )
7171
ty ( 22 ) |-> typeInfoPtrType ( ty ( 12 ) )
7272
ty ( 24 ) |-> typeInfoRefType ( ty ( 12 ) )
@@ -75,8 +75,8 @@
7575
ty ( 29 ) |-> typeInfoPtrType ( ty ( 9 ) )
7676
</types>
7777
<adt-to-ty>
78-
adtDef ( 8 ) |-> ty ( 17 )
79-
adtDef ( 9 ) |-> ty ( 15 )
80-
adtDef ( 17 ) |-> ty ( 10 )
78+
adtDef ( 7 ) |-> ty ( 17 )
79+
adtDef ( 15 ) |-> ty ( 10 )
80+
adtDef ( 17 ) |-> ty ( 15 )
8181
</adt-to-ty>
8282
</kmir>

0 commit comments

Comments
 (0)