Commit 118d23e
Add an intrinsic implementation of
* Basic implementation of `type(name)`
* Simplify ASR Node expression and fix error messages
* Comment out argument `args`
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Remove passing `expr_value`
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Remove instantiating the function
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Undo registering function instantiation
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Add arg check for only 1 argument
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Fix arg check for empty function call
* Update args check
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Update return type
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Update registration
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Handle the type of `type()`
* Tests: Add tests and update test references
* Update tests/tests.toml
Co-authored-by: Thirumalai Shaktivel <[email protected]>
* Add support to work with CPython
* Tests: Add tests
* Tests: Update tests
* Delete tests/reference/asr-test_builtin_type-f795c34.json
* Delete tests/reference/asr-test_builtin_type-f795c34.stdout
* Tests: Add `C` backend
* Make check for number of args more explicit
Co-authored-by: Shaikh Ubaid <[email protected]>
* Tests: Remove `Const`
---------
Co-authored-by: Thirumalai Shaktivel <[email protected]>
Co-authored-by: Shaikh Ubaid <[email protected]>type(object) function (#2592)1 parent 0ba09ab commit 118d23e
File tree
5 files changed
+90
-2
lines changed- integration_tests
- src
- libasr
- codegen
- pass
- lpython/semantics
5 files changed
+90
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
| 822 | + | |
822 | 823 | | |
823 | 824 | | |
824 | 825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3040 | 3040 | | |
3041 | 3041 | | |
3042 | 3042 | | |
| 3043 | + | |
3043 | 3044 | | |
3044 | 3045 | | |
3045 | 3046 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
103 | 105 | | |
104 | 106 | | |
105 | 107 | | |
| |||
1160 | 1162 | | |
1161 | 1163 | | |
1162 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
1163 | 1217 | | |
1164 | 1218 | | |
1165 | 1219 | | |
| |||
3626 | 3680 | | |
3627 | 3681 | | |
3628 | 3682 | | |
| 3683 | + | |
| 3684 | + | |
3629 | 3685 | | |
3630 | 3686 | | |
3631 | 3687 | | |
| |||
3753 | 3809 | | |
3754 | 3810 | | |
3755 | 3811 | | |
| 3812 | + | |
| 3813 | + | |
3756 | 3814 | | |
3757 | 3815 | | |
3758 | | - | |
3759 | 3816 | | |
3760 | 3817 | | |
3761 | 3818 | | |
| |||
3882 | 3939 | | |
3883 | 3940 | | |
3884 | 3941 | | |
| 3942 | + | |
3885 | 3943 | | |
3886 | 3944 | | |
3887 | 3945 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7586 | 7586 | | |
7587 | 7587 | | |
7588 | 7588 | | |
7589 | | - | |
| 7589 | + | |
| 7590 | + | |
7590 | 7591 | | |
7591 | 7592 | | |
7592 | 7593 | | |
| |||
0 commit comments