From 810d45ef4b7556ed67c7c9e9cda2ebcb39eec994 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Wed, 2 Mar 2022 05:38:58 -0500 Subject: [PATCH] fix `+=` desugaring to lease lhs Fixes #113 --- components/dada-brew/src/brew.rs | 8 +- components/dada-brew/src/brewery.rs | 2 +- components/dada-brew/src/cursor.rs | 5 + components/dada-execute/src/kernel.rs | 11 +- components/dada-ir/src/code/syntax.rs | 14 +- components/dada-ir/src/code/validated.rs | 17 +- .../src/test_harness/heap_graph_query.rs | 8 + components/dada-validate/src/lib.rs | 1 + .../dada-validate/src/validate/validator.rs | 198 ++- dada_tests/class/class-field-0/syntax.ref | 37 +- dada_tests/class/class-field-0/validated.ref | 75 +- dada_tests/class/class-field-1/syntax.ref | 46 +- dada_tests/class/class-field-1/validated.ref | 90 +- dada_tests/class/class-field-2/syntax.ref | 70 +- dada_tests/class/class-field-2/validated.ref | 130 +- .../gc/final_value_not_freed/syntax.ref | 6 +- .../gc/final_value_not_freed/validated.ref | 15 +- dada_tests/gc/stringify/syntax.ref | 212 +-- dada_tests/gc/stringify/validated.ref | 375 +---- .../cursor-position/HeapGraph-0.bir.ref | 244 +++ .../cursor-position/HeapGraph-0.ref | 47 - .../cursor-position/HeapGraph-1.bir.ref | 246 +++ .../cursor-position/HeapGraph-1.ref | 67 - .../cursor-position/HeapGraph-2.bir.ref | 246 +++ .../cursor-position/HeapGraph-2.ref | 67 - .../cursor-position/HeapGraph-3.bir.ref | 246 +++ .../cursor-position/HeapGraph-3.ref | 67 - .../heap-graph/cursor-position/syntax.ref | 80 +- .../heap-graph/cursor-position/validated.ref | 145 +- dada_tests/heap-graph/dag/HeapGraph-0.bir.ref | 193 +++ dada_tests/heap-graph/dag/syntax.ref | 68 +- dada_tests/heap-graph/dag/validated.ref | 130 +- .../leased-point/HeapGraph-0.bir.ref | 180 +++ dada_tests/heap-graph/leased-point/syntax.ref | 68 +- .../heap-graph/leased-point/validated.ref | 120 +- .../heap-graph/line-end/HeapGraph-0.bir.ref | 78 + .../heap-graph/line-end/HeapGraph-1.bir.ref | 78 + dada_tests/heap-graph/line-end/syntax.ref | 35 +- dada_tests/heap-graph/line-end/validated.ref | 75 +- .../heap-graph/line-start/HeapGraph-0.bir.ref | 180 +++ .../heap-graph/line-start/HeapGraph-0.ref | 45 - .../heap-graph/line-start/HeapGraph-1.bir.ref | 178 +++ .../heap-graph/line-start/HeapGraph-1.ref | 47 - dada_tests/heap-graph/line-start/syntax.ref | 65 +- .../heap-graph/line-start/validated.ref | 120 +- .../mid-increment/HeapGraph-0.bir.ref | 253 ++++ .../heap-graph/mid-increment/HeapGraph-0.ref | 21 +- dada_tests/heap-graph/mid-increment/bir.ref | 75 +- .../heap-graph/mid-increment/syntax.ref | 80 +- .../heap-graph/mid-increment/validated.ref | 254 +--- .../nested-functions/HeapGraph-0.bir.ref | 392 +++++ .../heap-graph/nested-functions/syntax.ref | 123 +- .../heap-graph/nested-functions/validated.ref | 235 +-- .../nested-points/HeapGraph-0.bir.ref | 180 +++ .../nested-points/HeapGraph-1.bir.ref | 178 +++ .../heap-graph/nested-points/HeapGraph-1.ref | 47 - .../nested-points/HeapGraph-2.bir.ref | 180 +++ .../heap-graph/nested-points/HeapGraph-2.ref | 67 - .../heap-graph/nested-points/syntax.ref | 65 +- .../heap-graph/nested-points/validated.ref | 120 +- .../heap-graph/past-end/HeapGraph-0.bir.ref | 72 + dada_tests/heap-graph/past-end/syntax.ref | 18 +- dada_tests/heap-graph/past-end/validated.ref | 30 +- .../heap-graph/rust-thunk/HeapGraph-0.bir.ref | 90 ++ dada_tests/heap-graph/rust-thunk/syntax.ref | 18 +- .../heap-graph/rust-thunk/validated.ref | 30 +- .../heap-graph/tutorial-1/HeapGraph-0.bir.ref | 172 +++ .../heap-graph/tutorial-1/HeapGraph-0.ref | 43 - .../heap-graph/tutorial-1/HeapGraph-1.bir.ref | 172 +++ .../heap-graph/tutorial-1/HeapGraph-2.bir.ref | 170 +++ .../heap-graph/tutorial-1/HeapGraph-2.ref | 45 - .../heap-graph/tutorial-1/HeapGraph-3.bir.ref | 170 +++ .../heap-graph/tutorial-1/HeapGraph-3.ref | 45 - .../heap-graph/tutorial-1/HeapGraph-4.bir.ref | 172 +++ .../heap-graph/tutorial-1/HeapGraph-4.ref | 57 - dada_tests/heap-graph/tutorial-1/syntax.ref | 53 +- .../heap-graph/tutorial-1/validated.ref | 85 +- dada_tests/hello_world/syntax.ref | 18 +- dada_tests/hello_world/validated.ref | 30 +- dada_tests/interpret/assign/syntax.ref | 82 +- dada_tests/interpret/assign/validated.ref | 200 +-- .../syntax.ref | 28 +- .../validated.ref | 55 +- .../syntax.ref | 38 +- .../validated.ref | 60 +- .../syntax.ref | 34 +- .../validated.ref | 60 +- .../interpret/class-wrong-label/syntax.ref | 30 +- .../interpret/class-wrong-label/validated.ref | 55 +- .../interpret/function-args-0/syntax.ref | 30 +- .../interpret/function-args-0/validated.ref | 55 +- .../interpret/function-args-1/syntax.ref | 51 +- .../interpret/function-args-1/validated.ref | 90 +- .../interpret/function-args-2/syntax.ref | 72 +- .../interpret/function-args-2/validated.ref | 125 +- .../syntax.ref | 39 +- .../validated.ref | 65 +- dada_tests/interpret/if-else/syntax.ref | 135 +- dada_tests/interpret/if-else/validated.ref | 235 +-- .../interpret/ops/op_bool_div/syntax.ref | 12 +- .../interpret/ops/op_bool_div/validated.ref | 20 +- .../interpret/ops/op_bool_gt/syntax.ref | 12 +- .../interpret/ops/op_bool_gt/validated.ref | 20 +- .../interpret/ops/op_bool_lt/syntax.ref | 12 +- .../interpret/ops/op_bool_lt/validated.ref | 20 +- .../interpret/ops/op_bool_minus/syntax.ref | 12 +- .../interpret/ops/op_bool_minus/validated.ref | 20 +- .../interpret/ops/op_bool_plus/syntax.ref | 12 +- .../interpret/ops/op_bool_plus/validated.ref | 20 +- .../interpret/ops/op_bool_times/syntax.ref | 12 +- .../interpret/ops/op_bool_times/validated.ref | 20 +- .../interpret/ops/op_divided_by_equal/bir.ref | 78 +- .../ops/op_divided_by_equal/syntax.ref | 58 +- .../ops/op_divided_by_equal/validated.ref | 206 +-- dada_tests/interpret/ops/op_equals/syntax.ref | 243 +-- .../interpret/ops/op_equals/validated.ref | 445 ++---- .../syntax.ref | 12 +- .../validated.ref | 20 +- .../interpret/ops/op_minus_equal/bir.ref | 78 +- .../interpret/ops/op_minus_equal/syntax.ref | 58 +- .../ops/op_minus_equal/validated.ref | 206 +-- .../op_neg_int_and_unsigned_add/syntax.ref | 27 +- .../op_neg_int_and_unsigned_add/validated.ref | 45 +- .../op_neg_int_and_unsigned_add2/syntax.ref | 27 +- .../validated.ref | 45 +- .../op_neg_int_and_unsigned_div/syntax.ref | 27 +- .../op_neg_int_and_unsigned_div/validated.ref | 45 +- .../op_neg_int_and_unsigned_minus/syntax.ref | 27 +- .../validated.ref | 45 +- .../op_neg_int_and_unsigned_mul/syntax.ref | 27 +- .../op_neg_int_and_unsigned_mul/validated.ref | 45 +- .../ops/op_neg_int_overflow/syntax.ref | 9 +- .../ops/op_neg_int_overflow/validated.ref | 15 +- .../ops/op_neg_unsigned_int/syntax.ref | 9 +- .../ops/op_neg_unsigned_int/validated.ref | 15 +- .../interpret/ops/op_plus_equal/bir.ref | 78 +- .../interpret/ops/op_plus_equal/syntax.ref | 58 +- .../interpret/ops/op_plus_equal/validated.ref | 206 +-- .../ops/op_signed_and_unsigned_add/syntax.ref | 24 +- .../op_signed_and_unsigned_add/validated.ref | 40 +- .../ops/op_signed_and_unsigned_div/syntax.ref | 24 +- .../op_signed_and_unsigned_div/validated.ref | 40 +- .../op_signed_and_unsigned_minus/syntax.ref | 24 +- .../validated.ref | 40 +- .../ops/op_signed_and_unsigned_mul/syntax.ref | 24 +- .../op_signed_and_unsigned_mul/validated.ref | 40 +- .../ops/op_signed_int_add_overflow/syntax.ref | 28 +- .../op_signed_int_add_overflow/validated.ref | 60 +- .../ops/op_signed_int_div_zero/syntax.ref | 12 +- .../ops/op_signed_int_div_zero/validated.ref | 20 +- .../ops/op_signed_int_mul_overflow/syntax.ref | 28 +- .../op_signed_int_mul_overflow/validated.ref | 60 +- .../ops/op_signed_int_sub_overflow/syntax.ref | 15 +- .../op_signed_int_sub_overflow/validated.ref | 25 +- .../interpret/ops/op_string_div/syntax.ref | 12 +- .../interpret/ops/op_string_div/validated.ref | 20 +- .../interpret/ops/op_string_gt/syntax.ref | 12 +- .../interpret/ops/op_string_gt/validated.ref | 20 +- .../interpret/ops/op_string_lt/syntax.ref | 12 +- .../interpret/ops/op_string_lt/validated.ref | 20 +- .../interpret/ops/op_string_minus/syntax.ref | 12 +- .../ops/op_string_minus/validated.ref | 20 +- .../interpret/ops/op_string_plus/syntax.ref | 12 +- .../ops/op_string_plus/validated.ref | 20 +- .../interpret/ops/op_string_times/syntax.ref | 12 +- .../ops/op_string_times/validated.ref | 20 +- .../interpret/ops/op_times_equal/bir.ref | 78 +- .../interpret/ops/op_times_equal/syntax.ref | 58 +- .../ops/op_times_equal/validated.ref | 206 +-- .../interpret/ops/op_unit_div/syntax.ref | 12 +- .../interpret/ops/op_unit_div/validated.ref | 20 +- .../interpret/ops/op_unit_gt/syntax.ref | 12 +- .../interpret/ops/op_unit_gt/validated.ref | 20 +- .../interpret/ops/op_unit_lt/syntax.ref | 12 +- .../interpret/ops/op_unit_lt/validated.ref | 20 +- .../interpret/ops/op_unit_minus/syntax.ref | 12 +- .../interpret/ops/op_unit_minus/validated.ref | 20 +- .../interpret/ops/op_unit_plus/syntax.ref | 12 +- .../interpret/ops/op_unit_plus/validated.ref | 20 +- .../interpret/ops/op_unit_times/syntax.ref | 12 +- .../interpret/ops/op_unit_times/validated.ref | 20 +- .../op_unsigned_and_neg_int_add/syntax.ref | 27 +- .../op_unsigned_and_neg_int_add/validated.ref | 45 +- .../op_unsigned_and_neg_int_add2/syntax.ref | 27 +- .../validated.ref | 45 +- .../op_unsigned_and_neg_int_div/syntax.ref | 27 +- .../op_unsigned_and_neg_int_div/validated.ref | 45 +- .../op_unsigned_and_neg_int_minus/syntax.ref | 27 +- .../validated.ref | 45 +- .../op_unsigned_and_neg_int_mul/syntax.ref | 27 +- .../op_unsigned_and_neg_int_mul/validated.ref | 45 +- .../ops/op_unsigned_and_signed_add/syntax.ref | 24 +- .../op_unsigned_and_signed_add/validated.ref | 40 +- .../ops/op_unsigned_and_signed_div/syntax.ref | 24 +- .../op_unsigned_and_signed_div/validated.ref | 40 +- .../op_unsigned_and_signed_minus/syntax.ref | 24 +- .../validated.ref | 40 +- .../ops/op_unsigned_and_signed_mul/syntax.ref | 24 +- .../op_unsigned_and_signed_mul/validated.ref | 40 +- .../op_unsigned_int_add_overflow/syntax.ref | 28 +- .../validated.ref | 60 +- .../ops/op_unsigned_int_div_zero/syntax.ref | 12 +- .../op_unsigned_int_div_zero/validated.ref | 20 +- .../op_unsigned_int_mul_overflow/syntax.ref | 28 +- .../validated.ref | 60 +- .../op_unsigned_int_sub_overflow/syntax.ref | 12 +- .../validated.ref | 20 +- dada_tests/interpret/ops/ops_float/syntax.ref | 645 +++----- .../interpret/ops/ops_float/validated.ref | 1275 ++++------------ dada_tests/interpret/ops/ops_int/syntax.ref | 363 ++--- .../interpret/ops/ops_int/validated.ref | 660 ++------- .../ops_mix_signed_and_unsuffixed/syntax.ref | 723 +++------ .../validated.ref | 1315 ++++------------- .../syntax.ref | 723 +++------ .../validated.ref | 1315 ++++------------- .../interpret/ops/ops_signed_int/syntax.ref | 363 ++--- .../ops/ops_signed_int/validated.ref | 660 ++------- .../interpret/ops/ops_unsigned_int/syntax.ref | 363 ++--- .../ops/ops_unsigned_int/validated.ref | 660 ++------- dada_tests/interpret/print_label/syntax.ref | 20 +- .../interpret/print_label/validated.ref | 30 +- .../interpret/print_no_label/syntax.ref | 18 +- .../interpret/print_no_label/validated.ref | 30 +- .../interpret/print_wrong_label/syntax.ref | 20 +- .../interpret/print_wrong_label/validated.ref | 30 +- dada_tests/interpret/string-escape/syntax.ref | 153 +- .../interpret/string-escape/validated.ref | 255 +--- dada_tests/interpret/string/syntax.ref | 90 +- dada_tests/interpret/string/validated.ref | 150 +- .../binary_ops_after_newline/syntax.ref | 298 ++-- .../binary_ops_after_newline/validated.ref | 570 ++----- dada_tests/parser/float/syntax.ref | 96 +- dada_tests/parser/float/validated.ref | 200 +-- dada_tests/parser/float_no_decimal/syntax.ref | 19 +- .../parser/float_no_decimal/validated.ref | 40 +- dada_tests/parser/float_no_space/syntax.ref | 51 +- .../parser/float_no_space/validated.ref | 110 +- .../parser/leading_whitespace/syntax.ref | 20 +- .../parser/leading_whitespace/validated.ref | 30 +- dada_tests/parser/no_adjacent_ops/syntax.ref | 55 +- .../parser/no_adjacent_ops/validated.ref | 110 +- dada_tests/parser/param_separators/syntax.ref | 27 +- .../parser/param_separators/validated.ref | 45 +- dada_tests/parser/return/syntax.ref | 15 +- dada_tests/parser/return/validated.ref | 25 +- .../parser/return_precedence/syntax.ref | 6 +- .../parser/return_precedence/validated.ref | 15 +- .../parser/return_without_value/syntax.ref | 6 +- .../parser/return_without_value/validated.ref | 15 +- .../parser/span_lhs_binary_op/syntax.ref | 47 +- .../parser/span_lhs_binary_op/validated.ref | 100 +- dada_tests/parser/unary/syntax.ref | 338 ++--- dada_tests/parser/unary/validated.ref | 590 ++------ .../tutorial-give-10/HeapGraph-0.bir.ref | 131 ++ .../tutorial-give-10/HeapGraph-0.ref | 49 - .../tutorial-give-10/HeapGraph-1.bir.ref | 131 ++ .../dyn_tutorial/tutorial-give-10/syntax.ref | 73 +- .../tutorial-give-10/validated.ref | 95 +- .../tutorial-lease-10/HeapGraph-0.bir.ref | 259 ++++ .../tutorial-lease-10/HeapGraph-0.ref | 6 +- .../tutorial-lease-10/HeapGraph-1.bir.ref | 257 ++++ .../tutorial-lease-10/HeapGraph-1.ref | 180 +-- .../dyn_tutorial/tutorial-lease-10/bir.ref | 75 +- .../dyn_tutorial/tutorial-lease-10/syntax.ref | 87 +- .../tutorial-lease-10/validated.ref | 259 +--- .../tutorial-lease-20/HeapGraph-0.bir.ref | 284 ++++ .../tutorial-lease-20/HeapGraph-0.ref | 192 +-- .../dyn_tutorial/tutorial-lease-20/bir.ref | 79 +- .../dyn_tutorial/tutorial-lease-20/syntax.ref | 106 +- .../tutorial-lease-20/validated.ref | 299 ++-- .../tutorial-lease-30/HeapGraph-0.bir.ref | 218 +++ .../tutorial-lease-30/HeapGraph-0.ref | 8 +- .../dyn_tutorial/tutorial-lease-30/bir.ref | 61 +- .../dyn_tutorial/tutorial-lease-30/syntax.ref | 107 +- .../tutorial-lease-30/validated.ref | 268 +--- .../tutorial-share-10/HeapGraph-0.bir.ref | 158 ++ .../dyn_tutorial/tutorial-share-10/syntax.ref | 114 +- .../tutorial-share-10/validated.ref | 140 +- .../tutorial-share-20/HeapGraph-0.bir.ref | 239 +++ .../dyn_tutorial/tutorial-share-20/syntax.ref | 98 +- .../tutorial-share-20/validated.ref | 200 +-- .../tutorial-share-30/HeapGraph-0.bir.ref | 166 +++ .../dyn_tutorial/tutorial-share-30/syntax.ref | 76 +- .../tutorial-share-30/validated.ref | 120 +- .../exhaustive/give-var-field-my/syntax.ref | 101 +- .../give-var-field-my/validated.ref | 185 +-- .../exhaustive/give-var-leased-shared/bir.ref | 8 +- .../give-var-leased-shared/syntax.ref | 104 +- .../give-var-leased-shared/validated.ref | 232 +-- .../exhaustive/give-var-leased/bir.ref | 8 +- .../exhaustive/give-var-leased/syntax.ref | 101 +- .../exhaustive/give-var-leased/validated.ref | 227 +-- .../exhaustive/give-var-my/syntax.ref | 68 +- .../exhaustive/give-var-my/validated.ref | 130 +- .../exhaustive/give-var-our/syntax.ref | 101 +- .../exhaustive/give-var-our/validated.ref | 195 +-- .../exhaustive/lease-var-field-my/syntax.ref | 116 +- .../lease-var-field-my/validated.ref | 215 +-- .../exhaustive/lease-var-lease-shared/bir.ref | 8 +- .../lease-var-lease-shared/syntax.ref | 104 +- .../lease-var-lease-shared/validated.ref | 232 +-- .../exhaustive/lease-var-my/syntax.ref | 98 +- .../exhaustive/lease-var-my/validated.ref | 190 +-- .../exhaustive/lease-var-our/syntax.ref | 101 +- .../exhaustive/lease-var-our/validated.ref | 195 +-- .../exhaustive/share-var-field-my/syntax.ref | 101 +- .../share-var-field-my/validated.ref | 190 +-- .../exhaustive/share-var-leased/bir.ref | 8 +- .../exhaustive/share-var-leased/syntax.ref | 101 +- .../exhaustive/share-var-leased/validated.ref | 232 +-- .../exhaustive/share-var-my/syntax.ref | 83 +- .../exhaustive/share-var-my/validated.ref | 165 +-- .../exhaustive/share-var-our/syntax.ref | 86 +- .../exhaustive/share-var-our/validated.ref | 170 +-- .../house-parties-are-not-enough/syntax.ref | 137 +- .../validated.ref | 270 +--- .../syntax.ref | 131 +- .../validated.ref | 310 +--- .../patterns/pattern-lease-my/syntax.ref | 81 +- .../patterns/pattern-lease-my/validated.ref | 140 +- .../patterns/pattern-lease-our/syntax.ref | 84 +- .../patterns/pattern-lease-our/validated.ref | 145 +- .../revokation/house-party/syntax.ref | 150 +- .../revokation/house-party/validated.ref | 345 +---- .../overwrite-lease-share/syntax.ref | 135 +- .../overwrite-lease-share/validated.ref | 285 +--- .../revokation/overwrite-leased/syntax.ref | 162 +- .../revokation/overwrite-leased/validated.ref | 340 +---- .../overwrite-our-leased/syntax.ref | 135 +- .../overwrite-our-leased/validated.ref | 285 +--- .../overwrite-our-shared/syntax.ref | 116 +- .../overwrite-our-shared/validated.ref | 250 +--- .../revokation/overwrite-owned/syntax.ref | 113 +- .../revokation/overwrite-owned/validated.ref | 240 +-- .../overwrite-shared-separate-root/syntax.ref | 132 +- .../validated.ref | 285 +--- .../revokation/overwrite-shared/syntax.ref | 116 +- .../revokation/overwrite-shared/validated.ref | 245 +-- .../scoped-exit-atomic-temporary/bir.ref | 8 +- .../scoped-exit-atomic-temporary/syntax.ref | 67 +- .../validated.ref | 177 +-- .../scoped-exit-if-false-temporary/bir.ref | 8 +- .../scoped-exit-if-false-temporary/syntax.ref | 88 +- .../validated.ref | 212 +-- .../scoped-exit-if-true-temporary/bir.ref | 8 +- .../scoped-exit-if-true-temporary/syntax.ref | 73 +- .../validated.ref | 187 +-- .../scoped-exit-while-iteration-named/bir.ref | 109 +- .../syntax.ref | 133 +- .../validated.ref | 377 ++--- .../bir.ref | 113 +- .../syntax.ref | 117 +- .../validated.ref | 374 ++--- .../scoped-exit-while-named/bir.ref | 109 +- .../scoped-exit-while-named/syntax.ref | 117 +- .../scoped-exit-while-named/validated.ref | 374 ++--- .../scoped-exit-while-temporary/bir.ref | 113 +- .../scoped-exit-while-temporary/syntax.ref | 101 +- .../scoped-exit-while-temporary/validated.ref | 371 ++--- .../revokation/write-field-of-leased/bir.ref | 8 +- .../write-field-of-leased/syntax.ref | 83 +- .../write-field-of-leased/validated.ref | 237 +-- .../write-shared-field/syntax.ref | 49 +- .../write-shared-field/validated.ref | 130 +- .../write-shared-traverse/syntax.ref | 67 +- .../write-shared-traverse/validated.ref | 155 +- .../our-to-our-leased-assign-field/syntax.ref | 209 +-- .../validated.ref | 420 ++---- .../our-to-our-leased-assign/syntax.ref | 167 +-- .../our-to-our-leased-assign/validated.ref | 320 +--- .../our-to-our-leased-field/syntax.ref | 173 +-- .../our-to-our-leased-field/validated.ref | 320 +--- .../our-to-our-leased-var/syntax.ref | 104 +- .../our-to-our-leased-var/validated.ref | 190 +-- .../field-leased-mode-leases/syntax.ref | 135 +- .../field-leased-mode-leases/validated.ref | 270 +--- .../specifier/field-our-mode-moves/syntax.ref | 99 +- .../field-our-mode-moves/validated.ref | 200 +-- .../leased-from-rvalue-assign-in-loop/bir.ref | 165 ++- .../syntax.ref | 143 +- .../validated.ref | 409 ++--- .../specifier/leased-from-rvalue/syntax.ref | 119 +- .../leased-from-rvalue/validated.ref | 220 +-- .../bir.ref | 177 ++- .../syntax.ref | 149 +- .../validated.ref | 419 ++---- dada_tests/specifier/local-my/syntax.ref | 129 +- dada_tests/specifier/local-my/validated.ref | 210 +-- .../bir.ref | 177 ++- .../syntax.ref | 149 +- .../validated.ref | 419 ++---- .../validate/assign-to-class/syntax.ref | 21 +- .../validate/assign-to-class/validated.ref | 30 +- .../await-where-not-allowed/syntax.ref | 84 +- .../await-where-not-allowed/validated.ref | 140 +- .../validate/duplicate_class_func/syntax.ref | 3 +- .../duplicate_class_func/validated.ref | 5 +- .../validate/duplicate_func_class/syntax.ref | 3 +- .../duplicate_func_class/validated.ref | 5 +- .../validate/duplicate_func_func/syntax.ref | 6 +- .../duplicate_func_func/validated.ref | 10 +- .../validate/named_parameter/syntax.ref | 86 +- .../validate/named_parameter/validated.ref | 110 +- dada_tests/validate/op-eq/lhs_field.dada | 7 + dada_tests/validate/op-eq/lhs_field/bir.ref | 210 +++ dada_tests/validate/op-eq/lhs_field/lsp.ref | 1 + dada_tests/validate/op-eq/lhs_field/ref.ref | 0 .../validate/op-eq/lhs_field/stdout.ref | 1 + .../validate/op-eq/lhs_field/syntax.ref | 95 ++ .../validate/op-eq/lhs_field/validated.ref | 183 +++ .../op-eq/lhs_field_of_func_call.dada | 12 + .../op-eq/lhs_field_of_func_call/bir.ref | 346 +++++ .../op-eq/lhs_field_of_func_call/lsp.ref | 1 + .../op-eq/lhs_field_of_func_call/ref.ref | 0 .../op-eq/lhs_field_of_func_call/stdout.ref | 2 + .../op-eq/lhs_field_of_func_call/syntax.ref | 155 ++ .../lhs_field_of_func_call/validated.ref | 251 ++++ dada_tests/validate/op-eq/lhs_func_call.dada | 14 + .../validate/op-eq/lhs_func_call/bir.ref | 179 +++ .../validate/op-eq/lhs_func_call/lsp.ref | 51 + .../validate/op-eq/lhs_func_call/ref.ref | 7 + .../validate/op-eq/lhs_func_call/stdout.ref | 0 .../validate/op-eq/lhs_func_call/syntax.ref | 146 ++ .../op-eq/lhs_func_call/validated.ref | 153 ++ .../validate/op-eq/lhs_local_variable.dada | 8 + .../validate/op-eq/lhs_local_variable/bir.ref | 230 +++ .../validate/op-eq/lhs_local_variable/lsp.ref | 1 + .../validate/op-eq/lhs_local_variable/ref.ref | 0 .../op-eq/lhs_local_variable/stdout.ref | 1 + .../op-eq/lhs_local_variable/syntax.ref | 105 ++ .../op-eq/lhs_local_variable/validated.ref | 191 +++ .../validate/op-eq/lhs_shared_field.dada | 7 + .../validate/op-eq/lhs_shared_field/bir.ref | 210 +++ .../validate/op-eq/lhs_shared_field/lsp.ref | 1 + .../validate/op-eq/lhs_shared_field/ref.ref | 0 .../op-eq/lhs_shared_field/stdout.ref | 0 .../op-eq/lhs_shared_field/syntax.ref | 95 ++ .../op-eq/lhs_shared_field/validated.ref | 183 +++ .../op-eq/lhs_shared_field_of_func_call.dada | 14 + .../lhs_shared_field_of_func_call/bir.ref | 346 +++++ .../lhs_shared_field_of_func_call/lsp.ref | 1 + .../lhs_shared_field_of_func_call/ref.ref | 0 .../lhs_shared_field_of_func_call/stdout.ref | 1 + .../lhs_shared_field_of_func_call/syntax.ref | 155 ++ .../validated.ref | 251 ++++ .../validate/unknown_identifier/bir.ref | 8 +- .../validate/unknown_identifier/syntax.ref | 28 +- .../validate/unknown_identifier/validated.ref | 122 +- 448 files changed, 21673 insertions(+), 31936 deletions(-) create mode 100644 dada_tests/heap-graph/cursor-position/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/cursor-position/HeapGraph-1.bir.ref create mode 100644 dada_tests/heap-graph/cursor-position/HeapGraph-2.bir.ref create mode 100644 dada_tests/heap-graph/cursor-position/HeapGraph-3.bir.ref create mode 100644 dada_tests/heap-graph/dag/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/leased-point/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/line-end/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/line-end/HeapGraph-1.bir.ref create mode 100644 dada_tests/heap-graph/line-start/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/line-start/HeapGraph-1.bir.ref create mode 100644 dada_tests/heap-graph/mid-increment/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/nested-functions/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/nested-points/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/nested-points/HeapGraph-1.bir.ref create mode 100644 dada_tests/heap-graph/nested-points/HeapGraph-2.bir.ref create mode 100644 dada_tests/heap-graph/past-end/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/rust-thunk/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/tutorial-1/HeapGraph-0.bir.ref create mode 100644 dada_tests/heap-graph/tutorial-1/HeapGraph-1.bir.ref create mode 100644 dada_tests/heap-graph/tutorial-1/HeapGraph-2.bir.ref create mode 100644 dada_tests/heap-graph/tutorial-1/HeapGraph-3.bir.ref create mode 100644 dada_tests/heap-graph/tutorial-1/HeapGraph-4.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-1.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-share-10/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-share-20/HeapGraph-0.bir.ref create mode 100644 dada_tests/permissions/dyn_tutorial/tutorial-share-30/HeapGraph-0.bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_field.dada create mode 100644 dada_tests/validate/op-eq/lhs_field/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_field/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_field/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_field/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_field/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_field/validated.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call.dada create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_field_of_func_call/validated.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call.dada create mode 100644 dada_tests/validate/op-eq/lhs_func_call/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_func_call/validated.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable.dada create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_local_variable/validated.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field.dada create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field/validated.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/bir.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/lsp.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/ref.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/stdout.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/syntax.ref create mode 100644 dada_tests/validate/op-eq/lhs_shared_field_of_func_call/validated.ref diff --git a/components/dada-brew/src/brew.rs b/components/dada-brew/src/brew.rs index b8bb4365..8fe82369 100644 --- a/components/dada-brew/src/brew.rs +++ b/components/dada-brew/src/brew.rs @@ -108,16 +108,20 @@ impl Cursor { } validated::ExprData::Assign(place, value_expr) => { - self.push_breakpoint_start(brewery, origin); let (place, origins) = self.brew_target_place(brewery, *place); + self.push_breakpoint_starts(brewery, origins.iter().copied(), origin); self.brew_expr_and_assign_to(brewery, place, *value_expr); self.push_breakpoint_ends(brewery, None::, origins, origin) } validated::ExprData::AssignFromPlace(target_place, source_place) => { - self.push_breakpoint_start(brewery, origin); let (target_place, target_origins) = self.brew_target_place(brewery, *target_place); let (source_place, source_origins) = self.brew_place(brewery, *source_place); + self.push_breakpoint_starts( + brewery, + target_origins.iter().chain(source_origins.iter()).copied(), + origin, + ); self.push_assignment_from_place(brewery, target_place, source_place, origin); self.push_breakpoint_ends( brewery, diff --git a/components/dada-brew/src/brewery.rs b/components/dada-brew/src/brewery.rs index 6c8ddf55..e3777c02 100644 --- a/components/dada-brew/src/brewery.rs +++ b/components/dada-brew/src/brewery.rs @@ -14,7 +14,7 @@ use dada_ir::{ pub struct Brewery<'me> { db: &'me dyn crate::Db, code: Code, - breakpoints: &'me [syntax::Expr], + pub(crate) breakpoints: &'me [syntax::Expr], validated_tree_data: &'me validated::TreeData, validated_origins: &'me validated::Origins, tables: &'me mut bir::Tables, diff --git a/components/dada-brew/src/cursor.rs b/components/dada-brew/src/cursor.rs index 5dc2ffa5..0df9a490 100644 --- a/components/dada-brew/src/cursor.rs +++ b/components/dada-brew/src/cursor.rs @@ -180,6 +180,11 @@ impl Cursor { /// If `origin` is a breakpoint expression, push a "breakpoint-start" /// statement onto the current basic block. pub(crate) fn push_breakpoint_start(&mut self, brewery: &mut Brewery<'_>, origin: ExprOrigin) { + tracing::debug!( + "push_breakpoint_start: origin={:?} breakpoints={:?}", + origin, + brewery.breakpoints + ); if !origin.synthesized && self.end_block.is_some() { if let Some(breakpoint_index) = brewery.expr_is_breakpoint(origin.syntax_expr) { let filename = brewery.code().filename(brewery.db()); diff --git a/components/dada-execute/src/kernel.rs b/components/dada-execute/src/kernel.rs index 54d86c4a..016a6222 100644 --- a/components/dada-execute/src/kernel.rs +++ b/components/dada-execute/src/kernel.rs @@ -317,8 +317,15 @@ impl Kernel for BufferKernel { index ); - let (breakpoint_filename, breakpoint_index, heap_at_start) = - self.started_breakpoints.pop().unwrap(); + let Some((breakpoint_filename, breakpoint_index, heap_at_start)) = + self.started_breakpoints.pop() + else { + panic!( + "breakpoint {index} for `{}` at `{:?}` not found", + filename.as_str(db), + span.debug(db), + ) + }; assert_eq!(filename, breakpoint_filename); assert_eq!(index, breakpoint_index); let breakpoint_record = BreakpointRecord { diff --git a/components/dada-ir/src/code/syntax.rs b/components/dada-ir/src/code/syntax.rs index f8a961b0..a7e0d676 100644 --- a/components/dada-ir/src/code/syntax.rs +++ b/components/dada-ir/src/code/syntax.rs @@ -84,8 +84,7 @@ id!(pub struct Expr); impl DebugWithDb> for Expr { fn fmt(&self, f: &mut std::fmt::Formatter<'_>, db: &InIrDb<'_, Tree>) -> std::fmt::Result { - f.debug_tuple("") - .field(self) + f.debug_tuple(&format!("{self:?}")) .field(&self.data(db.tables()).debug(db)) .finish() } @@ -265,9 +264,11 @@ pub struct LocalVariableDeclData { impl DebugWithDb> for LocalVariableDeclData { fn fmt(&self, f: &mut std::fmt::Formatter<'_>, db: &InIrDb<'_, Tree>) -> std::fmt::Result { - f.debug_tuple("") - .field(&self.name.debug(db.db())) - .field(&self.ty.debug(db.db())) + f.debug_struct("LocalVariableDeclData") + .field("specifier", &self.specifier.specifier(db.db())) + .field("atomic", &self.atomic) + .field("name", &self.name.debug(db.db())) + .field("ty", &self.ty.debug(db.db())) .finish() } } @@ -294,8 +295,7 @@ pub struct NamedExprData { impl DebugWithDb> for NamedExprData { fn fmt(&self, f: &mut std::fmt::Formatter<'_>, db: &InIrDb<'_, Tree>) -> std::fmt::Result { - f.debug_tuple("") - .field(&self.name.word(db.db()).debug(db.db())) + f.debug_tuple(&format!("{:?}", self.name.word(db.db()).debug(db.db()))) .field(&self.expr.debug(db)) .finish() } diff --git a/components/dada-ir/src/code/validated.rs b/components/dada-ir/src/code/validated.rs index db4d1502..771ab389 100644 --- a/components/dada-ir/src/code/validated.rs +++ b/components/dada-ir/src/code/validated.rs @@ -113,7 +113,7 @@ origin_table! { /// lowering the syntax expressions. We track the expression they came /// from, but also the fact that they are synthetic. This is needed to /// help place cursors and so forth. -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[derive(Copy, Clone, PartialEq, Eq, Hash)] pub struct ExprOrigin { pub syntax_expr: syntax::Expr, pub synthesized: bool, @@ -134,6 +134,21 @@ impl ExprOrigin { } } +impl std::fmt::Debug for ExprOrigin { + fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let ExprOrigin { + synthesized, + syntax_expr, + } = *self; + + if synthesized { + write!(fmt, "synthesized from {syntax_expr:?}") + } else { + write!(fmt, "from {syntax_expr:?}") + } + } +} + impl From for ExprOrigin { fn from(e: syntax::Expr) -> Self { Self::real(e) diff --git a/components/dada-lang/src/test_harness/heap_graph_query.rs b/components/dada-lang/src/test_harness/heap_graph_query.rs index 163d2889..16dd4584 100644 --- a/components/dada-lang/src/test_harness/heap_graph_query.rs +++ b/components/dada-lang/src/test_harness/heap_graph_query.rs @@ -45,6 +45,14 @@ impl super::Options { )); } + self.check_compiled( + db, + &[filename], + |item| db.debug_bir(item), + &path.join(format!("HeapGraph-{query_index}.bir.ref")), + errors, + )?; + match db.function_named(filename, "main") { Some(function) => { kernel.interpret_and_buffer(db, function, vec![]).await; diff --git a/components/dada-validate/src/lib.rs b/components/dada-validate/src/lib.rs index bcd52ea0..194ae0ab 100644 --- a/components/dada-validate/src/lib.rs +++ b/components/dada-validate/src/lib.rs @@ -2,6 +2,7 @@ #![feature(trait_upcasting)] #![feature(try_blocks)] +#![feature(let_else)] #![allow(incomplete_features)] mod validate; diff --git a/components/dada-validate/src/validate/validator.rs b/components/dada-validate/src/validate/validator.rs index 0c335f40..0695de51 100644 --- a/components/dada-validate/src/validate/validator.rs +++ b/components/dada-validate/src/validate/validator.rs @@ -46,6 +46,10 @@ impl ExprMode { fn give() -> Self { Self::Specifier(Specifier::My) } + + fn leased() -> Self { + Self::Specifier(Specifier::Leased) + } } impl<'me> Validator<'me> { @@ -88,13 +92,6 @@ impl<'me> Validator<'me> { } } - fn with_synthesized(self) -> Self { - Self { - synthesized: true, - ..self - } - } - fn effect_span(&self) -> FileSpan { (self.effect_span)(self) } @@ -190,7 +187,7 @@ impl<'me> Validator<'me> { match expr.data(self.syntax_tables()) { syntax::ExprData::Dot(..) | syntax::ExprData::Id(_) => { let place = self.validate_expr_as_place(expr); - self.place_to_expr(place, expr, mode) + self.place_to_expr(place, expr.synthesized(), mode) } syntax::ExprData::BooleanLiteral(b) => { @@ -489,54 +486,20 @@ impl<'me> Validator<'me> { ) } - syntax::ExprData::OpEq(lhs_expr, op, rhs_expr) => { - // FIXME: This desugaring is overly simplistic. It will break on cases - // like `foo(a, b).field += 1` because it will execute `foo(a, b)` twice. - // What we should do for dotted paths is to lease the LHS - // "up to" the last field. - - let result = try { - let validated_lhs_expr = { - let (validated_opt_temp_expr, validated_lhs_place) = - self.validate_expr_as_place(*lhs_expr)?; - let validated_lhs_expr = - self.add(validated::ExprData::Give(validated_lhs_place), expr); - self.maybe_seq(validated_opt_temp_expr, validated_lhs_expr, expr) - }; - let validated_rhs_expr = self.give_validated_expr(*rhs_expr); - let validated_op = self.validated_op(*op); - let validated_op_expr = self.add( - validated::ExprData::Op( - validated_lhs_expr, - validated_op, - validated_rhs_expr, - ), - expr, - ); - - let (validated_opt_temp_expr, validated_target_place) = self - .subscope() - .with_synthesized() - .validate_expr_as_target_place(*lhs_expr)?; - - let assign_expr = self.add( - validated::ExprData::Assign(validated_target_place, validated_op_expr), - expr, - ); - self.maybe_seq(validated_opt_temp_expr, assign_expr, expr) - }; + syntax::ExprData::OpEq(..) => { + let result = self.validate_op_eq(expr); self.or_error(result, expr) } syntax::ExprData::Assign(lhs_expr, rhs_expr) => { let result = try { let (validated_lhs_opt_temp_expr, validated_lhs_place) = - self.validate_expr_as_target_place(*lhs_expr)?; + self.validate_expr_as_target_place(*lhs_expr, ExprMode::Reserve)?; let assign_expr = self.validated_assignment(validated_lhs_place, *rhs_expr, expr); - self.maybe_seq(validated_lhs_opt_temp_expr, assign_expr, expr) + self.seq(validated_lhs_opt_temp_expr, assign_expr) }; self.or_error(result, expr) } @@ -560,6 +523,83 @@ impl<'me> Validator<'me> { } } + fn validate_op_eq( + &mut self, + op_eq_expr: syntax::Expr, + ) -> Result { + // if user wrote `x += `, we generate + // + // { + // temp_value = x + + // x = temp2 + // } + // + // if user wrote `owner.field += `, we generate + // + // { + // temp_leased_owner = owner.lease + // temp_value = temp_leased_owner.x + + // temp_leased_owner.x = temp2 + // } + // + // below, we will leave comments for the more complex version. + + let syntax::ExprData::OpEq(lhs_expr, op, rhs_expr) = self.syntax_tables()[op_eq_expr] else { + panic!("validated_op_eq invoked on something that was not an op-eq expr") + }; + + // `temp_leased_owner = owner.lease` (if this is a field) + let (lease_owner_expr, validated_target_place) = + self.validate_expr_as_target_place(lhs_expr, ExprMode::leased())?; + + // `temp_value = x + ` or `temp_value = temp_leased_owner.x + ` + let (temporary_assign_expr, temporary_place) = { + let validated_op = self.validated_op(op); + + // `x` or `temp_leased_owner.x` + let validated_lhs_expr = { + let lhs_place = match self.tables[validated_target_place] { + validated::TargetPlaceData::LocalVariable(lv) => self.add( + validated::PlaceData::LocalVariable(lv), + lhs_expr.synthesized(), + ), + + validated::TargetPlaceData::Dot(owner, field) => self.add( + validated::PlaceData::Dot(owner, field), + lhs_expr.synthesized(), + ), + }; + self.add(validated::ExprData::Give(lhs_place), lhs_expr.synthesized()) + }; + + // + let validated_rhs_expr = self.give_validated_expr(rhs_expr); + + // `x + ` or `temp_leased_owner.x + ` + let validated_op_expr = self.add( + validated::ExprData::Op(validated_lhs_expr, validated_op, validated_rhs_expr), + op_eq_expr.synthesized(), + ); + + self.store_validated_expr_in_temporary(validated_op_expr) + }; + + // `x = temp_value` or `temp_leased_owner.x = temp_value` + let assign_field_expr = { + self.add( + validated::ExprData::AssignFromPlace(validated_target_place, temporary_place), + op_eq_expr, + ) + }; + + Ok(self.seq( + lease_owner_expr + .into_iter() + .chain(Some(temporary_assign_expr)), + assign_field_expr, + )) + } + fn validated_assignment( &mut self, target_place: validated::TargetPlace, @@ -583,7 +623,7 @@ impl<'me> Validator<'me> { validated::ExprData::AssignFromPlace(target_place, validated_initializer_place), origin, ); - self.maybe_seq(validated_opt_temp_expr, assignment_expr, origin) + self.seq(validated_opt_temp_expr, assignment_expr) }; self.or_error(result, origin) } else { @@ -609,18 +649,19 @@ impl<'me> Validator<'me> { validated::ExprData::AssignFromPlace(target_place, temp_place), origin, ); - self.maybe_seq(Some(temp_initializer_expr), assignment_expr, origin) + self.seq(Some(temp_initializer_expr), assignment_expr) } } fn validate_expr_as_target_place( &mut self, expr: syntax::Expr, + owner_mode: ExprMode, ) -> Result<(Option, validated::TargetPlace), ErrorReported> { match expr.data(self.syntax_tables()) { syntax::ExprData::Dot(owner, field_name) => { let (assign_expr, owner_place) = - self.validate_expr_in_temporary(*owner, ExprMode::Reserve); + self.validate_expr_in_temporary(*owner, owner_mode); let place = self.add( validated::TargetPlaceData::Dot(owner_place, *field_name), expr, @@ -653,7 +694,7 @@ impl<'me> Validator<'me> { }, syntax::ExprData::Parenthesized(target_expr) => { - self.validate_expr_as_target_place(*target_expr) + self.validate_expr_as_target_place(*target_expr, owner_mode) } _ => { @@ -692,48 +733,54 @@ impl<'me> Validator<'me> { self.add(validated::ExprData::Declare(vars, validated_expr), origin) } - fn maybe_seq( + /// Creates a sequence that first executes `exprs` (if any) and then `final_expr`, + /// taking its final result from `final_expr`. Commonly used to combine + /// an initializer for an (optional) temporary followed by code that uses the + /// temporary (e.g., `t = 22; t + u`). + fn seq( &mut self, - expr1: Option, - expr2: validated::Expr, - origin: syntax::Expr, + exprs: impl IntoIterator, + final_expr: validated::Expr, ) -> validated::Expr { - if let Some(expr1) = expr1 { - self.add(validated::ExprData::Seq(vec![expr1, expr2]), origin) + let mut exprs: Vec = exprs.into_iter().collect(); + if exprs.is_empty() { + final_expr } else { - expr2 + let origin = self.origins[final_expr].synthesized(); + exprs.push(final_expr); + self.add(validated::ExprData::Seq(exprs), origin) } } fn place_to_expr( &mut self, data: Result<(Option, validated::Place), ErrorReported>, - origin: syntax::Expr, + origin: ExprOrigin, mode: ExprMode, ) -> validated::Expr { match data { Ok((opt_assign_expr, place)) => match mode { ExprMode::Specifier(Specifier::My) | ExprMode::Specifier(Specifier::Any) => { let place_expr = self.add(validated::ExprData::Give(place), origin); - self.maybe_seq(opt_assign_expr, place_expr, origin) + self.seq(opt_assign_expr, place_expr) } ExprMode::Specifier(Specifier::Leased) => { let place_expr = self.add(validated::ExprData::Lease(place), origin); - self.maybe_seq(opt_assign_expr, place_expr, origin) + self.seq(opt_assign_expr, place_expr) } ExprMode::Reserve => { let place_expr = self.add(validated::ExprData::Reserve(place), origin); - self.maybe_seq(opt_assign_expr, place_expr, origin) + self.seq(opt_assign_expr, place_expr) } ExprMode::Specifier(Specifier::Our) => { let given_expr = self.add(validated::ExprData::Give(place), origin); let shared_expr = self.add(validated::ExprData::Share(given_expr), origin); - self.maybe_seq(opt_assign_expr, shared_expr, origin) + self.seq(opt_assign_expr, shared_expr) } ExprMode::Specifier(Specifier::OurLeased) => { let given_expr = self.add(validated::ExprData::Lease(place), origin); let shared_expr = self.add(validated::ExprData::Share(given_expr), origin); - self.maybe_seq(opt_assign_expr, shared_expr, origin) + self.seq(opt_assign_expr, shared_expr) } }, Err(ErrorReported) => self.add(validated::ExprData::Error, origin), @@ -749,7 +796,7 @@ impl<'me> Validator<'me> { let validated_data = try { let (opt_temporary_expr, place) = self.validate_expr_as_place(target_expr)?; let permission_expr = self.add(perm_variant(place), perm_expr); - self.maybe_seq(opt_temporary_expr, permission_expr, perm_expr) + self.seq(opt_temporary_expr, permission_expr) }; self.or_error(validated_data, perm_expr) } @@ -821,31 +868,38 @@ impl<'me> Validator<'me> { expr: syntax::Expr, mode: ExprMode, ) -> (validated::Expr, validated::Place) { + let validated_expr = self.validate_expr_in_mode(expr, mode); + self.store_validated_expr_in_temporary(validated_expr) + } + + /// Creates a temporary to store the result of validating some expression. + fn store_validated_expr_in_temporary( + &mut self, + validated_expr: validated::Expr, + ) -> (validated::Expr, validated::Place) { + let origin = self.origins[validated_expr].synthesized(); + let local_variable = self.add( validated::LocalVariableData { name: None, specifier: Specifier::Any, atomic: Atomic::No, }, - validated::LocalVariableOrigin::Temporary(expr), + validated::LocalVariableOrigin::Temporary(origin.syntax_expr), ); self.scope.insert_temporary(local_variable); let validated_target_place = self.add( validated::TargetPlaceData::LocalVariable(local_variable), - expr.synthesized(), + origin, ); - let validated_expr = self.validate_expr_in_mode(expr, mode); let assign_expr = self.add( validated::ExprData::Assign(validated_target_place, validated_expr), - expr.synthesized(), + origin, ); - let validated_place = self.add( - validated::PlaceData::LocalVariable(local_variable), - expr.synthesized(), - ); + let validated_place = self.add(validated::PlaceData::LocalVariable(local_variable), origin); (assign_expr, validated_place) } diff --git a/dada_tests/class/class-field-0/syntax.ref b/dada_tests/class/class-field-0/syntax.ref index 1b946b70..509e5210 100644 --- a/dada_tests/class/class-field-0/syntax.ref +++ b/dada_tests/class/class-field-0/syntax.ref @@ -7,22 +7,20 @@ Tokens(dada_tests/class/class-field-0.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(2), + Expr(2)( Var( - ( - "t", - None, - ), - ( - Expr(1), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "t", + ty: None, + }, + Expr(1)( Call( - ( - Expr(0), + Expr(0)( Id( "Test", ), @@ -32,23 +30,18 @@ ), ), ), - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(3), + Expr(3)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( String( "Done", ), diff --git a/dada_tests/class/class-field-0/validated.ref b/dada_tests/class/class-field-0/validated.ref index 37e43a6f..59a18250 100644 --- a/dada_tests/class/class-field-0/validated.ref +++ b/dada_tests/class/class-field-0/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(1)( Call( @@ -24,58 +21,34 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(3)( AssignFromPlace( TargetPlace(0)( t{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Expr(8)( Await( @@ -85,46 +58,28 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), [ NamedExpr( None, Expr(6)( "Done", - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/class/class-field-1/syntax.ref b/dada_tests/class/class-field-1/syntax.ref index ae1b59d2..fdcba5dc 100644 --- a/dada_tests/class/class-field-1/syntax.ref +++ b/dada_tests/class/class-field-1/syntax.ref @@ -7,31 +7,27 @@ Tokens(dada_tests/class/class-field-1.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(9), + root_expr: Expr(9)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "t", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "t", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Test", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "foo", ), @@ -42,26 +38,20 @@ ), ), ), - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(4), + Expr(4)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Dot( - ( - Expr(5), + Expr(5)( Id( "t", ), diff --git a/dada_tests/class/class-field-1/validated.ref b/dada_tests/class/class-field-1/validated.ref index a29dcf41..80bab219 100644 --- a/dada_tests/class/class-field-1/validated.ref +++ b/dada_tests/class/class-field-1/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,69 +21,42 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "foo", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( t{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(9)( Await( @@ -96,16 +66,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( @@ -116,43 +80,25 @@ Dot( Place(3)( t{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), "a", ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ] \ No newline at end of file diff --git a/dada_tests/class/class-field-2/syntax.ref b/dada_tests/class/class-field-2/syntax.ref index 4a441500..4f2b0b74 100644 --- a/dada_tests/class/class-field-2/syntax.ref +++ b/dada_tests/class/class-field-2/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/class/class-field-2.dada:6:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(15), + root_expr: Expr(15)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "t", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "t", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Test", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "foo", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( String( "bar", ), @@ -51,26 +45,20 @@ ), ), ), - ( - Expr(9), + Expr(9)( Await( - ( - Expr(8), + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Dot( - ( - Expr(6), + Expr(6)( Id( "t", ), @@ -84,26 +72,20 @@ ), ), ), - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "t", ), diff --git a/dada_tests/class/class-field-2/validated.ref b/dada_tests/class/class-field-2/validated.ref index 1523a9d7..7ec4a900 100644 --- a/dada_tests/class/class-field-2/validated.ref +++ b/dada_tests/class/class-field-2/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "foo", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( "bar", - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( t{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Await( @@ -106,16 +73,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -126,37 +87,22 @@ Dot( Place(3)( t{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), "a", ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(14)( Await( @@ -166,16 +112,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -186,43 +126,25 @@ Dot( Place(6)( t{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), "b", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ] \ No newline at end of file diff --git a/dada_tests/gc/final_value_not_freed/syntax.ref b/dada_tests/gc/final_value_not_freed/syntax.ref index a4684256..c3f65e0d 100644 --- a/dada_tests/gc/final_value_not_freed/syntax.ref +++ b/dada_tests/gc/final_value_not_freed/syntax.ref @@ -7,12 +7,10 @@ Tokens(dada_tests/gc/final_value_not_freed.dada:6:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(1), + root_expr: Expr(1)( Seq( [ - ( - Expr(0), + Expr(0)( Id( "print", ), diff --git a/dada_tests/gc/final_value_not_freed/validated.ref b/dada_tests/gc/final_value_not_freed/validated.ref index 28bc9162..73d6cd65 100644 --- a/dada_tests/gc/final_value_not_freed/validated.ref +++ b/dada_tests/gc/final_value_not_freed/validated.ref @@ -6,22 +6,13 @@ Give( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ] \ No newline at end of file diff --git a/dada_tests/gc/stringify/syntax.ref b/dada_tests/gc/stringify/syntax.ref index 194d6684..de927b87 100644 --- a/dada_tests/gc/stringify/syntax.ref +++ b/dada_tests/gc/stringify/syntax.ref @@ -7,52 +7,43 @@ Tokens(dada_tests/gc/stringify.dada:3:18:16:1), ), data: syntax::Tree { - root_expr: ( - Expr(52), + root_expr: Expr(52)( Seq( [ - ( - Expr(7), + Expr(7)( Var( - ( - "p", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Point", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -62,10 +53,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -76,23 +65,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "p", ), @@ -103,33 +87,26 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Integer( "22", ), ), Plus, - ( - Expr(14), + Expr(14)( Integer( "44", ), @@ -142,33 +119,26 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Op( - ( - Expr(19), + Expr(19)( Integer( "22", ), ), Plus, - ( - Expr(20), + Expr(20)( Integer( "44", ), @@ -181,33 +151,26 @@ ), ), ), - ( - Expr(29), + Expr(29)( Await( - ( - Expr(28), + Expr(28)( Call( - ( - Expr(24), + Expr(24)( Id( "print", ), ), [ - ( - None, - ( - Expr(27), + None( + Expr(27)( Op( - ( - Expr(25), + Expr(25)( Integer( "22", ), ), Plus, - ( - Expr(26), + Expr(26)( Integer( "44", ), @@ -220,33 +183,26 @@ ), ), ), - ( - Expr(35), + Expr(35)( Await( - ( - Expr(34), + Expr(34)( Call( - ( - Expr(30), + Expr(30)( Id( "print", ), ), [ - ( - None, - ( - Expr(33), + None( + Expr(33)( Op( - ( - Expr(31), + Expr(31)( Integer( "22", ), ), Plus, - ( - Expr(32), + Expr(32)( Integer( "44", ), @@ -259,25 +215,23 @@ ), ), ), - ( - Expr(39), + Expr(39)( Var( - ( - "a", - None, - ), - ( - Expr(38), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(38)( Op( - ( - Expr(36), + Expr(36)( Integer( "22", ), ), Plus, - ( - Expr(37), + Expr(37)( Integer( "44", ), @@ -286,33 +240,26 @@ ), ), ), - ( - Expr(45), + Expr(45)( Await( - ( - Expr(44), + Expr(44)( Call( - ( - Expr(40), + Expr(40)( Id( "print", ), ), [ - ( - None, - ( - Expr(43), + None( + Expr(43)( Op( - ( - Expr(41), + Expr(41)( Id( "a", ), ), Plus, - ( - Expr(42), + Expr(42)( Integer( "22", ), @@ -325,33 +272,26 @@ ), ), ), - ( - Expr(51), + Expr(51)( Await( - ( - Expr(50), + Expr(50)( Call( - ( - Expr(46), + Expr(46)( Id( "print", ), ), [ - ( - None, - ( - Expr(49), + None( + Expr(49)( Op( - ( - Expr(47), + Expr(47)( Id( "a", ), ), Plus, - ( - Expr(48), + Expr(48)( Integer( "22", ), diff --git a/dada_tests/gc/stringify/validated.ref b/dada_tests/gc/stringify/validated.ref index 0044f61b..c045668c 100644 --- a/dada_tests/gc/stringify/validated.ref +++ b/dada_tests/gc/stringify/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(6)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -48,97 +39,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(13)( Await( @@ -148,16 +103,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -166,30 +115,18 @@ Reserve( Place(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(19)( Await( @@ -199,16 +136,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -217,38 +148,23 @@ Op( Expr(15)( 22, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Plus, Expr(16)( 44, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(25)( Await( @@ -258,16 +174,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -276,38 +186,23 @@ Op( Expr(21)( 22, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Plus, Expr(22)( 44, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), Expr(31)( Await( @@ -317,16 +212,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), [ NamedExpr( @@ -335,38 +224,23 @@ Op( Expr(27)( 22, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), Plus, Expr(28)( 44, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), Expr(37)( Await( @@ -376,16 +250,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( @@ -394,38 +262,23 @@ Op( Expr(33)( 22, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Plus, Expr(34)( 44, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), Expr(43)( Seq( @@ -434,68 +287,41 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: true, - }, + synthesized from Expr(38), ), Expr(40)( Op( Expr(38)( 22, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), Plus, Expr(39)( 44, - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: true, - }, + synthesized from Expr(38), ), Expr(42)( AssignFromPlace( TargetPlace(2)( a{2}, - ExprOrigin { - syntax_expr: Expr(39), - synthesized: true, - }, + synthesized from Expr(39), ), Place(9)( temp{3}, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: true, - }, + synthesized from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ], ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + synthesized from Expr(39), ), Expr(49)( Await( @@ -505,16 +331,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + synthesized from Expr(40), ), [ NamedExpr( @@ -525,44 +345,26 @@ Give( Place(11)( a{2}, - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + synthesized from Expr(41), ), Plus, Expr(46)( 22, - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), ), - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), Expr(55)( Await( @@ -572,16 +374,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + synthesized from Expr(46), ), [ NamedExpr( @@ -592,50 +388,29 @@ Give( Place(13)( a{2}, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + synthesized from Expr(47), ), Plus, Expr(52)( 22, - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ], ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-0.bir.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-0.bir.ref new file mode 100644 index 00000000..532c653e --- /dev/null +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-0.bir.ref @@ -0,0 +1,244 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{11}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{12}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(6), + ), + ( + Clear( + temp{10}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(9), + ), + ( + Clear( + temp{9}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + Print.reserve, + ), + Expr(10), + ), + ( + AssignExpr( + temp{15}, + "Hi", + ), + Expr(11), + ), + ], + Assign( + temp{13}, + Call( + temp{14}, + [ + temp{15}, + ], + [ + None, + ], + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ], + Assign( + temp{4}, + Await( + temp{13}, + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(12), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-0.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-0.ref index 4e1e196f..dae3e39a 100644 --- a/dada_tests/heap-graph/cursor-position/HeapGraph-0.ref +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-0.ref @@ -47,51 +47,4 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - } -} Hi diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-1.bir.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-1.bir.ref new file mode 100644 index 00000000..0f3da9ff --- /dev/null +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-1.bir.ref @@ -0,0 +1,246 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + p{0}.reserve, + ), + Expr(6), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(6), + Some( + temp{11}, + ), + ), + Expr(6), + ), + ( + AssignExpr( + temp{12}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(6), + ), + ( + Clear( + temp{10}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(9), + ), + ( + Clear( + temp{9}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + Print.reserve, + ), + Expr(10), + ), + ( + AssignExpr( + temp{15}, + "Hi", + ), + Expr(11), + ), + ], + Assign( + temp{13}, + Call( + temp{14}, + [ + temp{15}, + ], + [ + None, + ], + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ], + Assign( + temp{4}, + Await( + temp{13}, + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(12), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-1.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-1.ref index 71e1b626..c685a077 100644 --- a/dada_tests/heap-graph/cursor-position/HeapGraph-1.ref +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-1.ref @@ -66,71 +66,4 @@ digraph { "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight)
- >; - ]; - } - afternode1 [ - label = < - - -
(reservation)
reserved
> - ]; - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "stack":16 -> "afternode1" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "afternode1":0 -> "afternode0" [label="reserved", style="solid", penwidth=1.0, arrowtype="odot", color="grey"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } -} Hi diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-2.bir.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-2.bir.ref new file mode 100644 index 00000000..0f3da9ff --- /dev/null +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-2.bir.ref @@ -0,0 +1,246 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + p{0}.reserve, + ), + Expr(6), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(6), + Some( + temp{11}, + ), + ), + Expr(6), + ), + ( + AssignExpr( + temp{12}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(6), + ), + ( + Clear( + temp{10}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(9), + ), + ( + Clear( + temp{9}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + Print.reserve, + ), + Expr(10), + ), + ( + AssignExpr( + temp{15}, + "Hi", + ), + Expr(11), + ), + ], + Assign( + temp{13}, + Call( + temp{14}, + [ + temp{15}, + ], + [ + None, + ], + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ], + Assign( + temp{4}, + Await( + temp{13}, + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(12), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-2.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-2.ref index 71e1b626..c685a077 100644 --- a/dada_tests/heap-graph/cursor-position/HeapGraph-2.ref +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-2.ref @@ -66,71 +66,4 @@ digraph { "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight)
- >; - ]; - } - afternode1 [ - label = < - - -
(reservation)
reserved
> - ]; - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "stack":16 -> "afternode1" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "afternode1":0 -> "afternode0" [label="reserved", style="solid", penwidth=1.0, arrowtype="odot", color="grey"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } -} Hi diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-3.bir.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-3.bir.ref new file mode 100644 index 00000000..0f3da9ff --- /dev/null +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-3.bir.ref @@ -0,0 +1,246 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + p{0}.reserve, + ), + Expr(6), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(6), + Some( + temp{11}, + ), + ), + Expr(6), + ), + ( + AssignExpr( + temp{12}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(6), + ), + ( + Clear( + temp{10}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(9), + ), + ( + Clear( + temp{9}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + Print.reserve, + ), + Expr(10), + ), + ( + AssignExpr( + temp{15}, + "Hi", + ), + Expr(11), + ), + ], + Assign( + temp{13}, + Call( + temp{14}, + [ + temp{15}, + ], + [ + None, + ], + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ], + Assign( + temp{4}, + Await( + temp{13}, + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(12), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/cursor-position/HeapGraph-3.ref b/dada_tests/heap-graph/cursor-position/HeapGraph-3.ref index 71e1b626..c685a077 100644 --- a/dada_tests/heap-graph/cursor-position/HeapGraph-3.ref +++ b/dada_tests/heap-graph/cursor-position/HeapGraph-3.ref @@ -66,71 +66,4 @@ digraph { "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight)
- >; - ]; - } - afternode1 [ - label = < - - -
(reservation)
reserved
> - ]; - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "stack":16 -> "afternode1" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "afternode1":0 -> "afternode0" [label="reserved", style="solid", penwidth=1.0, arrowtype="odot", color="grey"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } -} Hi diff --git a/dada_tests/heap-graph/cursor-position/syntax.ref b/dada_tests/heap-graph/cursor-position/syntax.ref index 53298a2c..3031b542 100644 --- a/dada_tests/heap-graph/cursor-position/syntax.ref +++ b/dada_tests/heap-graph/cursor-position/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/heap-graph/cursor-position.dada:3:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,36 +45,31 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "Point", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Id( "p", ), ), ), - ( - None, - ( - Expr(7), + None( + Expr(7)( Integer( "66", ), @@ -91,23 +80,18 @@ ), ), ), - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( String( "Hi", ), diff --git a/dada_tests/heap-graph/cursor-position/validated.ref b/dada_tests/heap-graph/cursor-position/validated.ref index 55f07df3..215bba40 100644 --- a/dada_tests/heap-graph/cursor-position/validated.ref +++ b/dada_tests/heap-graph/cursor-position/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,69 +96,42 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(17)( Await( @@ -210,46 +141,28 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( None, Expr(15)( "Hi", - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/dag/HeapGraph-0.bir.ref b/dada_tests/heap-graph/dag/HeapGraph-0.bir.ref new file mode 100644 index 00000000..ab12875a --- /dev/null +++ b/dada_tests/heap-graph/dag/HeapGraph-0.bir.ref @@ -0,0 +1,193 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(11), + ), + ( + AssignExpr( + temp{7}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{8}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{9}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{6}, + Call( + temp{7}, + [ + temp{8}, + temp{9}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(2), + ), + ( + Clear( + temp{8}, + ), + Expr(1), + ), + ( + Clear( + temp{7}, + ), + Expr(0), + ), + ( + AssignExpr( + temp{1}, + temp{6}.share, + ), + Expr(4), + ), + ( + Clear( + temp{6}, + ), + Expr(3), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(5), + ), + ( + Clear( + temp{5}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + p{0}.reserve, + ), + Expr(7), + ), + ( + AssignExpr( + temp{12}, + p{0}.reserve, + ), + Expr(8), + ), + ], + Assign( + temp{3}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(8), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(10), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(10), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(11), + Some( + temp{4}, + ), + ), + Expr(11), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/dag/syntax.ref b/dada_tests/heap-graph/dag/syntax.ref index 089a9ba7..22d4419b 100644 --- a/dada_tests/heap-graph/dag/syntax.ref +++ b/dada_tests/heap-graph/dag/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/heap-graph/dag.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(11), + root_expr: Expr(11)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,36 +49,31 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "q", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(9)( Call( - ( - Expr(6), + Expr(6)( Id( "Point", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Id( "p", ), ), ), - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "p", ), diff --git a/dada_tests/heap-graph/dag/validated.ref b/dada_tests/heap-graph/dag/validated.ref index 0dbafc71..5100c948 100644 --- a/dada_tests/heap-graph/dag/validated.ref +++ b/dada_tests/heap-graph/dag/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -113,10 +77,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(11)( Call( @@ -128,16 +89,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), [ NamedExpr( @@ -146,16 +101,10 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), NamedExpr( @@ -164,65 +113,38 @@ Reserve( Place(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(13)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/leased-point/HeapGraph-0.bir.ref b/dada_tests/heap-graph/leased-point/HeapGraph-0.bir.ref new file mode 100644 index 00000000..edbf720a --- /dev/null +++ b/dada_tests/heap-graph/leased-point/HeapGraph-0.bir.ref @@ -0,0 +1,180 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(11), + ), + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.lease, + ), + Expr(7), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(8), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(8), + ), + ( + Clear( + temp{10}, + ), + Expr(7), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(10), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(10), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(11), + Some( + temp{4}, + ), + ), + Expr(11), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/leased-point/syntax.ref b/dada_tests/heap-graph/leased-point/syntax.ref index 6f3d6359..062eaf76 100644 --- a/dada_tests/heap-graph/leased-point/syntax.ref +++ b/dada_tests/heap-graph/leased-point/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/heap-graph/leased-point.dada:3:18:7:1), ), data: syntax::Tree { - root_expr: ( - Expr(11), + root_expr: Expr(11)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,30 +45,26 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "q", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(9)( Call( - ( - Expr(5), + Expr(5)( Id( "Point", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -82,10 +72,8 @@ ), ), ), - ( - None, - ( - Expr(8), + None( + Expr(8)( Integer( "66", ), diff --git a/dada_tests/heap-graph/leased-point/validated.ref b/dada_tests/heap-graph/leased-point/validated.ref index edf515b6..a087ed7e 100644 --- a/dada_tests/heap-graph/leased-point/validated.ref +++ b/dada_tests/heap-graph/leased-point/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(10)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,75 +96,45 @@ Lease( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-end/HeapGraph-0.bir.ref b/dada_tests/heap-graph/line-end/HeapGraph-0.bir.ref new file mode 100644 index 00000000..1e0f1d0d --- /dev/null +++ b/dada_tests/heap-graph/line-end/HeapGraph-0.bir.ref @@ -0,0 +1,78 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "async", + 0, + ), + Expr(0), + ), + ( + AssignExpr( + temp{1}, + 22, + ), + Expr(0), + ), + ( + BreakpointEnd( + "async", + 0, + Expr(0), + Some( + temp{1}, + ), + ), + Expr(0), + ), + ( + AssignPlace( + x{0}, + temp{1}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(1), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{3}, + 44, + ), + Expr(2), + ), + ( + AssignPlace( + y{2}, + temp{3}, + ), + Expr(3), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(3), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-end/HeapGraph-1.bir.ref b/dada_tests/heap-graph/line-end/HeapGraph-1.bir.ref new file mode 100644 index 00000000..b0e5cf49 --- /dev/null +++ b/dada_tests/heap-graph/line-end/HeapGraph-1.bir.ref @@ -0,0 +1,78 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "async", + 0, + ), + Expr(4), + ), + ( + AssignExpr( + temp{1}, + 22, + ), + Expr(0), + ), + ( + AssignPlace( + x{0}, + temp{1}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(1), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{3}, + 44, + ), + Expr(2), + ), + ( + AssignPlace( + y{2}, + temp{3}, + ), + Expr(3), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(3), + ), + ( + BreakpointEnd( + "async", + 0, + Expr(4), + Some( + temp{4}, + ), + ), + Expr(4), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-end/syntax.ref b/dada_tests/heap-graph/line-end/syntax.ref index c28c481f..cdd6d269 100644 --- a/dada_tests/heap-graph/line-end/syntax.ref +++ b/dada_tests/heap-graph/line-end/syntax.ref @@ -7,34 +7,33 @@ Tokens(dada_tests/heap-graph/line-end.dada:1:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "22", ), ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "y", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "y", + ty: None, + }, + Expr(2)( Integer( "44", ), diff --git a/dada_tests/heap-graph/line-end/validated.ref b/dada_tests/heap-graph/line-end/validated.ref index c6c227c6..55ca5e89 100644 --- a/dada_tests/heap-graph/line-end/validated.ref +++ b/dada_tests/heap-graph/line-end/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 22, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,58 +42,34 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( y{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-start/HeapGraph-0.bir.ref b/dada_tests/heap-graph/line-start/HeapGraph-0.bir.ref new file mode 100644 index 00000000..933c797e --- /dev/null +++ b/dada_tests/heap-graph/line-start/HeapGraph-0.bir.ref @@ -0,0 +1,180 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(0), + ), + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(0), + Some( + temp{6}, + ), + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-start/HeapGraph-0.ref b/dada_tests/heap-graph/line-start/HeapGraph-0.ref index 26b2f110..374180a1 100644 --- a/dada_tests/heap-graph/line-start/HeapGraph-0.ref +++ b/dada_tests/heap-graph/line-start/HeapGraph-0.ref @@ -44,48 +44,3 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight)
- >; - ]; - } - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = <Point> - ]; - "stack":12 -> "afternode0" [label="our", style="solid", penwidth=3.0, arrowtype="normal", color="blue"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - } -} diff --git a/dada_tests/heap-graph/line-start/HeapGraph-1.bir.ref b/dada_tests/heap-graph/line-start/HeapGraph-1.bir.ref new file mode 100644 index 00000000..b3172366 --- /dev/null +++ b/dada_tests/heap-graph/line-start/HeapGraph-1.bir.ref @@ -0,0 +1,178 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/line-start/HeapGraph-1.ref b/dada_tests/heap-graph/line-start/HeapGraph-1.ref index bdb28648..6c8c4f2f 100644 --- a/dada_tests/heap-graph/line-start/HeapGraph-1.ref +++ b/dada_tests/heap-graph/line-start/HeapGraph-1.ref @@ -47,50 +47,3 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - } -} diff --git a/dada_tests/heap-graph/line-start/syntax.ref b/dada_tests/heap-graph/line-start/syntax.ref index 9891bdcc..56eafdd6 100644 --- a/dada_tests/heap-graph/line-start/syntax.ref +++ b/dada_tests/heap-graph/line-start/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/heap-graph/line-start.dada:3:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,36 +45,31 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "Point", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Id( "p", ), ), ), - ( - None, - ( - Expr(7), + None( + Expr(7)( Integer( "66", ), diff --git a/dada_tests/heap-graph/line-start/validated.ref b/dada_tests/heap-graph/line-start/validated.ref index 21bd5d6a..d0fc2d73 100644 --- a/dada_tests/heap-graph/line-start/validated.ref +++ b/dada_tests/heap-graph/line-start/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,75 +96,45 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/mid-increment/HeapGraph-0.bir.ref b/dada_tests/heap-graph/mid-increment/HeapGraph-0.bir.ref new file mode 100644 index 00000000..1029b867 --- /dev/null +++ b/dada_tests/heap-graph/mid-increment/HeapGraph-0.bir.ref @@ -0,0 +1,253 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{8}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{9}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{10}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{8}, + [ + temp{9}, + temp{10}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(2), + ), + ( + Clear( + temp{9}, + ), + Expr(1), + ), + ( + Clear( + temp{8}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{7}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{7}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + p{0}.lease, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{11}, + (), + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{4}, + q{2}.lease, + ), + Expr(8), + ), + ( + AssignExpr( + temp{13}, + temp{4}.x.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + 1, + ), + Expr(10), + ), + ( + AssignExpr( + temp{5}, + temp{13} + temp{14}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, + ), + Expr(11), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(11), + None, + ), + Expr(9), + ), + ( + AssignExpr( + temp{12}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{12}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + Print.reserve, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + q{2}.reserve, + ), + Expr(13), + ), + ], + Assign( + temp{15}, + Call( + temp{16}, + [ + temp{17}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{17}, + ), + Expr(13), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ], + Assign( + temp{6}, + Await( + temp{15}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(14), + ), + ], + Return( + temp{6}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/mid-increment/HeapGraph-0.ref b/dada_tests/heap-graph/mid-increment/HeapGraph-0.ref index ee463390..f92c9c1c 100644 --- a/dada_tests/heap-graph/mid-increment/HeapGraph-0.ref +++ b/dada_tests/heap-graph/mid-increment/HeapGraph-0.ref @@ -12,24 +12,21 @@ digraph { label=< - - - + +
main
p
q
(in-flight): "22"
p
q
>; ]; } afternode0 [ - color = "slategray", - fontcolor = "slategray", label = < - +
Point
x: "22"
x: "23"
y: "44"
> ]; "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } subgraph cluster_before { label=<before> @@ -41,23 +38,21 @@ digraph { label=< - - + +
main
p
q
p
q
>; ]; } beforenode0 [ - color = "slategray", - fontcolor = "slategray", label = < - +
Point
x: "22"
x: "22"
y: "44"
> ]; "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } } leased Point(23, 44) diff --git a/dada_tests/heap-graph/mid-increment/bir.ref b/dada_tests/heap-graph/mid-increment/bir.ref index 3e197385..0a894214 100644 --- a/dada_tests/heap-graph/mid-increment/bir.ref +++ b/dada_tests/heap-graph/mid-increment/bir.ref @@ -5,21 +5,21 @@ [ ( AssignExpr( - temp{7}, + temp{8}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{8}, + temp{9}, 22, ), Expr(1), ), ( AssignExpr( - temp{9}, + temp{10}, 44, ), Expr(2), @@ -28,10 +28,10 @@ Assign( temp{1}, Call( - temp{7}, + temp{8}, [ - temp{8}, temp{9}, + temp{10}, ], [ None, @@ -45,19 +45,19 @@ [ ( Clear( - temp{9}, + temp{10}, ), Expr(2), ), ( Clear( - temp{8}, + temp{9}, ), Expr(1), ), ( Clear( - temp{7}, + temp{8}, ), Expr(0), ), @@ -70,14 +70,14 @@ ), ( AssignExpr( - temp{6}, + temp{7}, (), ), Expr(4), ), ( Clear( - temp{6}, + temp{7}, ), Expr(4), ), @@ -97,91 +97,98 @@ ), ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(7), ), ( Clear( - temp{10}, + temp{11}, ), Expr(7), ), ( AssignExpr( temp{4}, - q{2}.reserve, + q{2}.lease, ), Expr(8), ), ( AssignExpr( - temp{12}, - q{2}.x.give, + temp{13}, + temp{4}.x.give, ), - Expr(11), + Expr(9), ), ( AssignExpr( - temp{13}, + temp{14}, 1, ), Expr(10), ), ( AssignExpr( - temp{4}.x, - temp{12} + temp{13}, + temp{5}, + temp{13} + temp{14}, ), Expr(11), ), ( Clear( - temp{13}, + temp{14}, ), Expr(10), ), ( Clear( - temp{12}, + temp{13}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, ), Expr(11), ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(11), ), ( Clear( - temp{11}, + temp{12}, ), Expr(11), ), ( AssignExpr( - temp{15}, + temp{16}, Print.reserve, ), Expr(12), ), ( AssignExpr( - temp{16}, + temp{17}, q{2}.reserve, ), Expr(13), ), ], Assign( - temp{14}, + temp{15}, Call( - temp{15}, + temp{16}, [ - temp{16}, + temp{17}, ], [ None, @@ -194,21 +201,21 @@ [ ( Clear( - temp{16}, + temp{17}, ), Expr(13), ), ( Clear( - temp{15}, + temp{16}, ), Expr(12), ), ], Assign( - temp{5}, + temp{6}, Await( - temp{14}, + temp{15}, ), BasicBlock(3), ), @@ -217,13 +224,13 @@ [ ( Clear( - temp{14}, + temp{15}, ), Expr(14), ), ], Return( - temp{5}, + temp{6}, ), ), }, diff --git a/dada_tests/heap-graph/mid-increment/syntax.ref b/dada_tests/heap-graph/mid-increment/syntax.ref index 3144278f..1ab979b8 100644 --- a/dada_tests/heap-graph/mid-increment/syntax.ref +++ b/dada_tests/heap-graph/mid-increment/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/heap-graph/mid-increment.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(16), + root_expr: Expr(16)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -71,14 +64,11 @@ ), ), ), - ( - Expr(11), + Expr(11)( OpEq( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "q", ), @@ -87,31 +77,25 @@ ), ), PlusEqual, - ( - Expr(10), + Expr(10)( Integer( "1", ), ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "q", ), diff --git a/dada_tests/heap-graph/mid-increment/validated.ref b/dada_tests/heap-graph/mid-increment/validated.ref index 0832b243..9b75193b 100644 --- a/dada_tests/heap-graph/mid-increment/validated.ref +++ b/dada_tests/heap-graph/mid-increment/validated.ref @@ -1,5 +1,5 @@ [ - Expr(22)( + Expr(23)( Seq( [ Expr(6)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -105,221 +72,150 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), - Expr(17)( + Expr(18)( Seq( [ - Expr(15)( + Expr(12)( Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), - Expr(14)( - Reserve( - Place(6)( + Expr(11)( + Lease( + Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(16)( Assign( - TargetPlace(5)( - Dot( - Place(7)( - temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, - ), - "x", - ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + TargetPlace(6)( + temp{5}, + synthesized from Expr(11), ), - Expr(13)( + Expr(15)( Op( - Expr(11)( + Expr(13)( Give( - Place(5)( + Place(6)( Dot( - Place(4)( - q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + Place(5)( + temp{4}, + synthesized from Expr(8), ), "x", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(9), ), Plus, - Expr(12)( + Expr(14)( 1, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), + ), + ), + synthesized from Expr(11), + ), + ), + synthesized from Expr(11), + ), + Expr(17)( + AssignFromPlace( + TargetPlace(5)( + Dot( + Place(5)( + temp{4}, + synthesized from Expr(8), ), + "x", ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(9), + ), + Place(7)( + temp{5}, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), - Expr(21)( + Expr(22)( Await( - Expr(20)( + Expr(21)( Call( - Expr(18)( + Expr(19)( Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, - Expr(19)( + Expr(20)( Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-functions/HeapGraph-0.bir.ref b/dada_tests/heap-graph/nested-functions/HeapGraph-0.bir.ref new file mode 100644 index 00000000..d67fd7cb --- /dev/null +++ b/dada_tests/heap-graph/nested-functions/HeapGraph-0.bir.ref @@ -0,0 +1,392 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{1}, + "Fellow Dadaist", + ), + Expr(0), + ), + ( + AssignPlace( + name{0}, + temp{1}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(1), + ), + ( + Clear( + temp{3}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + helper.reserve, + ), + Expr(2), + ), + ], + Assign( + temp{5}, + Call( + temp{6}, + [], + [], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ], + Assign( + temp{4}, + Await( + temp{5}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{5}, + ), + Expr(3), + ), + ( + Clear( + temp{4}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Print.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + "Hello", + ), + Expr(6), + ), + ], + Assign( + temp{8}, + Call( + temp{9}, + [ + temp{10}, + ], + [ + None, + ], + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ], + Assign( + temp{7}, + Await( + temp{8}, + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(7), + ), + ( + Clear( + temp{7}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{12}, + Print.reserve, + ), + Expr(9), + ), + ( + AssignExpr( + temp{13}, + name{0}.reserve, + ), + Expr(10), + ), + ], + Assign( + temp{11}, + Call( + temp{12}, + [ + temp{13}, + ], + [ + None, + ], + ), + BasicBlock(5), + ), + ), + BasicBlock(5): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(10), + ), + ( + Clear( + temp{12}, + ), + Expr(9), + ), + ], + Assign( + temp{2}, + Await( + temp{11}, + ), + BasicBlock(6), + ), + ), + BasicBlock(6): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(11), + ), + ], + Return( + temp{2}, + ), + ), + }, + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(8), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + BreakpointEnd( + "class", + 0, + Expr(8), + Some( + temp{3}, + ), + ), + Expr(8), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-functions/syntax.ref b/dada_tests/heap-graph/nested-functions/syntax.ref index 1f5f1e21..6f4c91e8 100644 --- a/dada_tests/heap-graph/nested-functions/syntax.ref +++ b/dada_tests/heap-graph/nested-functions/syntax.ref @@ -7,33 +7,29 @@ Tokens(dada_tests/heap-graph/nested-functions.dada:5:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(13), + root_expr: Expr(13)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "name", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "name", + ty: None, + }, + Expr(0)( String( "Fellow Dadaist", ), ), ), ), - ( - Expr(4), + Expr(4)( Await( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(2), + Expr(2)( Id( "helper", ), @@ -43,23 +39,18 @@ ), ), ), - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "Hello", ), @@ -70,23 +61,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "name", ), @@ -110,40 +96,34 @@ Tokens(dada_tests/heap-graph/nested-functions.dada:12:20:18:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -154,36 +134,31 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "Point", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Id( "p", ), ), ), - ( - None, - ( - Expr(7), + None( + Expr(7)( Integer( "66", ), diff --git a/dada_tests/heap-graph/nested-functions/validated.ref b/dada_tests/heap-graph/nested-functions/validated.ref index 968f9b08..67394d11 100644 --- a/dada_tests/heap-graph/nested-functions/validated.ref +++ b/dada_tests/heap-graph/nested-functions/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( "Fellow Dadaist", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( name{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(6)( Await( @@ -64,29 +43,17 @@ Reserve( Place(1)( helper, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), [], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(10)( Await( @@ -96,40 +63,25 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(8)( "Hello", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), Expr(14)( Await( @@ -139,16 +91,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -157,37 +103,22 @@ Reserve( Place(4)( name{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(14)( Seq( @@ -199,10 +130,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -214,79 +142,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -295,10 +193,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( Call( @@ -310,16 +205,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -328,75 +217,45 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-points/HeapGraph-0.bir.ref b/dada_tests/heap-graph/nested-points/HeapGraph-0.bir.ref new file mode 100644 index 00000000..5d1493be --- /dev/null +++ b/dada_tests/heap-graph/nested-points/HeapGraph-0.bir.ref @@ -0,0 +1,180 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(3), + ), + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + BreakpointEnd( + "class", + 0, + Expr(3), + Some( + temp{1}, + ), + ), + Expr(3), + ), + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-points/HeapGraph-1.bir.ref b/dada_tests/heap-graph/nested-points/HeapGraph-1.bir.ref new file mode 100644 index 00000000..b3172366 --- /dev/null +++ b/dada_tests/heap-graph/nested-points/HeapGraph-1.bir.ref @@ -0,0 +1,178 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-points/HeapGraph-1.ref b/dada_tests/heap-graph/nested-points/HeapGraph-1.ref index 7cba38fa..1361e3fa 100644 --- a/dada_tests/heap-graph/nested-points/HeapGraph-1.ref +++ b/dada_tests/heap-graph/nested-points/HeapGraph-1.ref @@ -47,50 +47,3 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - } -} diff --git a/dada_tests/heap-graph/nested-points/HeapGraph-2.bir.ref b/dada_tests/heap-graph/nested-points/HeapGraph-2.bir.ref new file mode 100644 index 00000000..077b8f40 --- /dev/null +++ b/dada_tests/heap-graph/nested-points/HeapGraph-2.bir.ref @@ -0,0 +1,180 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(6), + ), + ( + AssignExpr( + temp{10}, + p{0}.reserve, + ), + Expr(6), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(6), + Some( + temp{10}, + ), + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 66, + ), + Expr(7), + ), + ], + Assign( + temp{3}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + None, + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/nested-points/HeapGraph-2.ref b/dada_tests/heap-graph/nested-points/HeapGraph-2.ref index e4e6c94a..853b56e8 100644 --- a/dada_tests/heap-graph/nested-points/HeapGraph-2.ref +++ b/dada_tests/heap-graph/nested-points/HeapGraph-2.ref @@ -66,70 +66,3 @@ digraph { "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight)
- >; - ]; - } - afternode1 [ - label = < - - -
(reservation)
reserved
> - ]; - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "stack":12 -> "afternode1" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - "afternode1":0 -> "afternode0" [label="reserved", style="solid", penwidth=1.0, arrowtype="odot", color="grey"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } -} diff --git a/dada_tests/heap-graph/nested-points/syntax.ref b/dada_tests/heap-graph/nested-points/syntax.ref index 05fceec7..e299f502 100644 --- a/dada_tests/heap-graph/nested-points/syntax.ref +++ b/dada_tests/heap-graph/nested-points/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/heap-graph/nested-points.dada:4:18:21:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,36 +45,31 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "Point", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Id( "p", ), ), ), - ( - None, - ( - Expr(7), + None( + Expr(7)( Integer( "66", ), diff --git a/dada_tests/heap-graph/nested-points/validated.ref b/dada_tests/heap-graph/nested-points/validated.ref index 21bd5d6a..d0fc2d73 100644 --- a/dada_tests/heap-graph/nested-points/validated.ref +++ b/dada_tests/heap-graph/nested-points/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,75 +96,45 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/past-end/HeapGraph-0.bir.ref b/dada_tests/heap-graph/past-end/HeapGraph-0.bir.ref new file mode 100644 index 00000000..c8c46977 --- /dev/null +++ b/dada_tests/heap-graph/past-end/HeapGraph-0.bir.ref @@ -0,0 +1,72 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{2}, + Print.reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{3}, + "I have forced myself to contradict myself\nin order to avoid conforming to my own taste.\n -- Marcel Duchamp", + ), + Expr(1), + ), + ], + Assign( + temp{1}, + Call( + temp{2}, + [ + temp{3}, + ], + [ + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{3}, + ), + Expr(1), + ), + ( + Clear( + temp{2}, + ), + Expr(0), + ), + ], + Assign( + temp{0}, + Await( + temp{1}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{1}, + ), + Expr(2), + ), + ], + Return( + temp{0}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/past-end/syntax.ref b/dada_tests/heap-graph/past-end/syntax.ref index 04b9e566..16bb1460 100644 --- a/dada_tests/heap-graph/past-end/syntax.ref +++ b/dada_tests/heap-graph/past-end/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/heap-graph/past-end.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "\n I have forced myself to contradict myself\n in order to avoid conforming to my own taste.\n -- Marcel Duchamp\n ", ), diff --git a/dada_tests/heap-graph/past-end/validated.ref b/dada_tests/heap-graph/past-end/validated.ref index 98e00ed5..5e08fe74 100644 --- a/dada_tests/heap-graph/past-end/validated.ref +++ b/dada_tests/heap-graph/past-end/validated.ref @@ -10,46 +10,28 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "I have forced myself to contradict myself\nin order to avoid conforming to my own taste.\n -- Marcel Duchamp", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/rust-thunk/HeapGraph-0.bir.ref b/dada_tests/heap-graph/rust-thunk/HeapGraph-0.bir.ref new file mode 100644 index 00000000..861f75d7 --- /dev/null +++ b/dada_tests/heap-graph/rust-thunk/HeapGraph-0.bir.ref @@ -0,0 +1,90 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "async", + 0, + ), + Expr(2), + ), + ( + AssignExpr( + temp{2}, + Print.reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{3}, + "foo", + ), + Expr(1), + ), + ], + Assign( + temp{1}, + Call( + temp{2}, + [ + temp{3}, + ], + [ + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + BreakpointEnd( + "async", + 0, + Expr(2), + Some( + temp{1}, + ), + ), + Expr(2), + ), + ( + Clear( + temp{3}, + ), + Expr(1), + ), + ( + Clear( + temp{2}, + ), + Expr(0), + ), + ], + Assign( + temp{0}, + Await( + temp{1}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{1}, + ), + Expr(2), + ), + ], + Return( + temp{0}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/rust-thunk/syntax.ref b/dada_tests/heap-graph/rust-thunk/syntax.ref index 8c6148bd..f9211376 100644 --- a/dada_tests/heap-graph/rust-thunk/syntax.ref +++ b/dada_tests/heap-graph/rust-thunk/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/heap-graph/rust-thunk.dada:1:18:7:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "foo", ), diff --git a/dada_tests/heap-graph/rust-thunk/validated.ref b/dada_tests/heap-graph/rust-thunk/validated.ref index a775c756..f1b6203c 100644 --- a/dada_tests/heap-graph/rust-thunk/validated.ref +++ b/dada_tests/heap-graph/rust-thunk/validated.ref @@ -10,46 +10,28 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "foo", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-0.bir.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-0.bir.ref new file mode 100644 index 00000000..ee2777c5 --- /dev/null +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-0.bir.ref @@ -0,0 +1,172 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(0), + ), + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(0), + Some( + temp{4}, + ), + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{8}, + Print.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + "The point is FIXME", + ), + Expr(6), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(6), + ), + ( + Clear( + temp{8}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{7}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{7}, + ), + Expr(7), + ), + ], + Return( + temp{2}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-0.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-0.ref index b7a36953..e5f8c01f 100644 --- a/dada_tests/heap-graph/tutorial-1/HeapGraph-0.ref +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-0.ref @@ -42,47 +42,4 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
(in-flight)
- >; - ]; - } - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = <Point> - ]; - "stack":10 -> "afternode0" [label="our", style="solid", penwidth=3.0, arrowtype="normal", color="blue"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - -
main
p
- >; - ]; - } - } -} The point is FIXME diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-1.bir.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-1.bir.ref new file mode 100644 index 00000000..5de2b09f --- /dev/null +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-1.bir.ref @@ -0,0 +1,172 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(1), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(1), + Some( + temp{5}, + ), + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{8}, + Print.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + "The point is FIXME", + ), + Expr(6), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(6), + ), + ( + Clear( + temp{8}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{7}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{7}, + ), + Expr(7), + ), + ], + Return( + temp{2}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-2.bir.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-2.bir.ref new file mode 100644 index 00000000..1b72a6fb --- /dev/null +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-2.bir.ref @@ -0,0 +1,170 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{8}, + Print.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + "The point is FIXME", + ), + Expr(6), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(6), + ), + ( + Clear( + temp{8}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{7}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{7}, + ), + Expr(7), + ), + ], + Return( + temp{2}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-2.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-2.ref index e1e4f85f..4ddd15d0 100644 --- a/dada_tests/heap-graph/tutorial-1/HeapGraph-2.ref +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-2.ref @@ -45,49 +45,4 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - -
main
p
- >; - ]; - } - } -} The point is FIXME diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-3.bir.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-3.bir.ref new file mode 100644 index 00000000..1b72a6fb --- /dev/null +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-3.bir.ref @@ -0,0 +1,170 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{8}, + Print.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + "The point is FIXME", + ), + Expr(6), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(6), + ), + ( + Clear( + temp{8}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{7}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{7}, + ), + Expr(7), + ), + ], + Return( + temp{2}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-3.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-3.ref index e1e4f85f..4ddd15d0 100644 --- a/dada_tests/heap-graph/tutorial-1/HeapGraph-3.ref +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-3.ref @@ -45,49 +45,4 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - -
main
p
- >; - ]; - } - } -} The point is FIXME diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-4.bir.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-4.bir.ref new file mode 100644 index 00000000..50917a03 --- /dev/null +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-4.bir.ref @@ -0,0 +1,172 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(5), + ), + ( + AssignExpr( + temp{8}, + Print.reserve, + ), + Expr(5), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(5), + Some( + temp{8}, + ), + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + "The point is FIXME", + ), + Expr(6), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{9}, + ), + Expr(6), + ), + ( + Clear( + temp{8}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{7}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{7}, + ), + Expr(7), + ), + ], + Return( + temp{2}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/heap-graph/tutorial-1/HeapGraph-4.ref b/dada_tests/heap-graph/tutorial-1/HeapGraph-4.ref index 16c74997..3be7cb75 100644 --- a/dada_tests/heap-graph/tutorial-1/HeapGraph-4.ref +++ b/dada_tests/heap-graph/tutorial-1/HeapGraph-4.ref @@ -56,61 +56,4 @@ digraph { "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
(in-flight): "print"
- >; - ]; - } - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - -
main
p
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } -} The point is FIXME diff --git a/dada_tests/heap-graph/tutorial-1/syntax.ref b/dada_tests/heap-graph/tutorial-1/syntax.ref index 40835237..8576519d 100644 --- a/dada_tests/heap-graph/tutorial-1/syntax.ref +++ b/dada_tests/heap-graph/tutorial-1/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/heap-graph/tutorial-1.dada:3:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(9), + root_expr: Expr(9)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -55,23 +45,18 @@ ), ), ), - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "The point is FIXME", ), diff --git a/dada_tests/heap-graph/tutorial-1/validated.ref b/dada_tests/heap-graph/tutorial-1/validated.ref index 7d79b148..10555aed 100644 --- a/dada_tests/heap-graph/tutorial-1/validated.ref +++ b/dada_tests/heap-graph/tutorial-1/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,53 +42,32 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Await( @@ -110,46 +77,28 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(8)( "The point is FIXME", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ] \ No newline at end of file diff --git a/dada_tests/hello_world/syntax.ref b/dada_tests/hello_world/syntax.ref index e7252381..cffd9c92 100644 --- a/dada_tests/hello_world/syntax.ref +++ b/dada_tests/hello_world/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/hello_world.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/hello_world/validated.ref b/dada_tests/hello_world/validated.ref index 0e1a91f5..18d8442b 100644 --- a/dada_tests/hello_world/validated.ref +++ b/dada_tests/hello_world/validated.ref @@ -10,46 +10,28 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/assign/syntax.ref b/dada_tests/interpret/assign/syntax.ref index 41d0fa3d..de0f6c53 100644 --- a/dada_tests/interpret/assign/syntax.ref +++ b/dada_tests/interpret/assign/syntax.ref @@ -7,42 +7,36 @@ Tokens(dada_tests/interpret/assign.dada:1:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(20), + root_expr: Expr(20)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "2", ), ), ), ), - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(2), + Expr(2)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Id( "x", ), @@ -53,40 +47,32 @@ ), ), ), - ( - Expr(8), + Expr(8)( Assign( - ( - Expr(6), + Expr(6)( Id( "x", ), ), - ( - Expr(7), + Expr(7)( Integer( "4", ), ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "x", ), @@ -97,40 +83,32 @@ ), ), ), - ( - Expr(15), + Expr(15)( Assign( - ( - Expr(13), + Expr(13)( Id( "x", ), ), - ( - Expr(14), + Expr(14)( Integer( "8", ), ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Id( "x", ), diff --git a/dada_tests/interpret/assign/validated.ref b/dada_tests/interpret/assign/validated.ref index 8784cf95..f3ac6b83 100644 --- a/dada_tests/interpret/assign/validated.ref +++ b/dada_tests/interpret/assign/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 2, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Await( @@ -64,16 +43,10 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), [ NamedExpr( @@ -82,30 +55,18 @@ Reserve( Place(2)( x{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), Expr(11)( Seq( @@ -114,52 +75,31 @@ Assign( TargetPlace(3)( temp{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(8)( 4, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( AssignFromPlace( TargetPlace(2)( x{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Place(3)( temp{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(15)( Await( @@ -169,16 +109,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -187,30 +121,18 @@ Reserve( Place(5)( x{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(19)( Seq( @@ -219,52 +141,31 @@ Assign( TargetPlace(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(16)( 8, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(18)( AssignFromPlace( TargetPlace(4)( x{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Place(6)( temp{3}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), Expr(23)( Await( @@ -274,16 +175,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( @@ -292,36 +187,21 @@ Reserve( Place(8)( x{0}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/class-expected-0-found-1-unlabeled/syntax.ref b/dada_tests/interpret/class-expected-0-found-1-unlabeled/syntax.ref index 6724c97d..e9e7dd25 100644 --- a/dada_tests/interpret/class-expected-0-found-1-unlabeled/syntax.ref +++ b/dada_tests/interpret/class-expected-0-found-1-unlabeled/syntax.ref @@ -7,31 +7,27 @@ Tokens(dada_tests/interpret/class-expected-0-found-1-unlabeled.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "x", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Foo", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "10", ), diff --git a/dada_tests/interpret/class-expected-0-found-1-unlabeled/validated.ref b/dada_tests/interpret/class-expected-0-found-1-unlabeled/validated.ref index ec4807c8..3fae54a7 100644 --- a/dada_tests/interpret/class-expected-0-found-1-unlabeled/validated.ref +++ b/dada_tests/interpret/class-expected-0-found-1-unlabeled/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,75 +21,45 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 10, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/class-expected-1-found-2-labeled/syntax.ref b/dada_tests/interpret/class-expected-1-found-2-labeled/syntax.ref index f9b5285d..16fc2bb1 100644 --- a/dada_tests/interpret/class-expected-1-found-2-labeled/syntax.ref +++ b/dada_tests/interpret/class-expected-1-found-2-labeled/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/interpret/class-expected-1-found-2-labeled.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "x", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Foo", ), ), [ - ( - Some( - "arg", - ), - ( - Expr(1), + Some("arg")( + Expr(1)( Integer( "10", ), ), ), - ( - Some( - "arg2", - ), - ( - Expr(2), + Some("arg2")( + Expr(2)( Integer( "22", ), diff --git a/dada_tests/interpret/class-expected-1-found-2-labeled/validated.ref b/dada_tests/interpret/class-expected-1-found-2-labeled/validated.ref index d62630a4..8e61163c 100644 --- a/dada_tests/interpret/class-expected-1-found-2-labeled/validated.ref +++ b/dada_tests/interpret/class-expected-1-found-2-labeled/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 10, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,59 +42,35 @@ ), Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/class-expected-1-found-2-unlabeled/syntax.ref b/dada_tests/interpret/class-expected-1-found-2-unlabeled/syntax.ref index 81704de9..a79db3ff 100644 --- a/dada_tests/interpret/class-expected-1-found-2-unlabeled/syntax.ref +++ b/dada_tests/interpret/class-expected-1-found-2-unlabeled/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/interpret/class-expected-1-found-2-unlabeled.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "x", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Foo", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "10", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), diff --git a/dada_tests/interpret/class-expected-1-found-2-unlabeled/validated.ref b/dada_tests/interpret/class-expected-1-found-2-unlabeled/validated.ref index 59b68857..ee9c4c90 100644 --- a/dada_tests/interpret/class-expected-1-found-2-unlabeled/validated.ref +++ b/dada_tests/interpret/class-expected-1-found-2-unlabeled/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,85 +21,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 10, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/class-wrong-label/syntax.ref b/dada_tests/interpret/class-wrong-label/syntax.ref index 5f0fa536..4c3ecaf7 100644 --- a/dada_tests/interpret/class-wrong-label/syntax.ref +++ b/dada_tests/interpret/class-wrong-label/syntax.ref @@ -7,33 +7,27 @@ Tokens(dada_tests/interpret/class-wrong-label.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "x", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Foo", ), ), [ - ( - Some( - "arg1", - ), - ( - Expr(1), + Some("arg1")( + Expr(1)( Integer( "10", ), diff --git a/dada_tests/interpret/class-wrong-label/validated.ref b/dada_tests/interpret/class-wrong-label/validated.ref index b7704605..2f7bc7a4 100644 --- a/dada_tests/interpret/class-wrong-label/validated.ref +++ b/dada_tests/interpret/class-wrong-label/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,59 +33,35 @@ ), Expr(1)( 10, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/function-args-0/syntax.ref b/dada_tests/interpret/function-args-0/syntax.ref index eec05891..89f42f9f 100644 --- a/dada_tests/interpret/function-args-0/syntax.ref +++ b/dada_tests/interpret/function-args-0/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/function-args-0.dada:3:20:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello you", ), @@ -51,18 +45,14 @@ Tokens(dada_tests/interpret/function-args-0.dada:7:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Await( - ( - Expr(1), + Expr(1)( Call( - ( - Expr(0), + Expr(0)( Id( "greet0", ), diff --git a/dada_tests/interpret/function-args-0/validated.ref b/dada_tests/interpret/function-args-0/validated.ref index 3bcaba3f..f081f158 100644 --- a/dada_tests/interpret/function-args-0/validated.ref +++ b/dada_tests/interpret/function-args-0/validated.ref @@ -10,47 +10,29 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello you", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(3)( Seq( @@ -63,35 +45,20 @@ Reserve( Place(0)( greet0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/function-args-1/syntax.ref b/dada_tests/interpret/function-args-1/syntax.ref index 0797c411..d85a4dfc 100644 --- a/dada_tests/interpret/function-args-1/syntax.ref +++ b/dada_tests/interpret/function-args-1/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/function-args-1.dada:3:23:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(8), + root_expr: Expr(8)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello ", ), @@ -38,23 +32,18 @@ ), ), ), - ( - Expr(7), + Expr(7)( Await( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "print", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( Id( "name", ), @@ -78,27 +67,21 @@ Tokens(dada_tests/interpret/function-args-1.dada:8:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "greet", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Pluschplusch", ), diff --git a/dada_tests/interpret/function-args-1/validated.ref b/dada_tests/interpret/function-args-1/validated.ref index c2879ad7..65d7e251 100644 --- a/dada_tests/interpret/function-args-1/validated.ref +++ b/dada_tests/interpret/function-args-1/validated.ref @@ -10,40 +10,25 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello ", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(7)( Await( @@ -53,16 +38,10 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( @@ -71,37 +50,22 @@ Reserve( Place(2)( name{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), Expr(4)( Seq( @@ -114,46 +78,28 @@ Reserve( Place(0)( greet, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Pluschplusch", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/function-args-2/syntax.ref b/dada_tests/interpret/function-args-2/syntax.ref index c44f9ead..d81be799 100644 --- a/dada_tests/interpret/function-args-2/syntax.ref +++ b/dada_tests/interpret/function-args-2/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/function-args-2.dada:3:32:7:1), ), data: syntax::Tree { - root_expr: ( - Expr(12), + root_expr: Expr(12)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello ", ), @@ -38,23 +32,18 @@ ), ), ), - ( - Expr(7), + Expr(7)( Await( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "print", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( Id( "name1", ), @@ -65,23 +54,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "name2", ), @@ -105,36 +89,28 @@ Tokens(dada_tests/interpret/function-args-2.dada:9:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(4), + Expr(4)( Await( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "greet2", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Plusch", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( String( "plusch", ), diff --git a/dada_tests/interpret/function-args-2/validated.ref b/dada_tests/interpret/function-args-2/validated.ref index faa70781..6d171fa9 100644 --- a/dada_tests/interpret/function-args-2/validated.ref +++ b/dada_tests/interpret/function-args-2/validated.ref @@ -10,40 +10,25 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello ", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(7)( Await( @@ -53,16 +38,10 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( @@ -71,30 +50,18 @@ Reserve( Place(2)( name1{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(11)( Await( @@ -104,16 +71,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -122,37 +83,22 @@ Reserve( Place(4)( name2{1}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(5)( Seq( @@ -165,56 +111,35 @@ Reserve( Place(0)( greet2, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Plusch", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( "plusch", - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/function-args-expected-1-gave-2/syntax.ref b/dada_tests/interpret/function-args-expected-1-gave-2/syntax.ref index 7319e797..128385c7 100644 --- a/dada_tests/interpret/function-args-expected-1-gave-2/syntax.ref +++ b/dada_tests/interpret/function-args-expected-1-gave-2/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/function-args-expected-1-gave-2.dada:1:23:3:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Id( "name", ), @@ -51,33 +45,26 @@ Tokens(dada_tests/interpret/function-args-expected-1-gave-2.dada:5:12:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "greet", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Plush", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( String( "plush", ), diff --git a/dada_tests/interpret/function-args-expected-1-gave-2/validated.ref b/dada_tests/interpret/function-args-expected-1-gave-2/validated.ref index f682ba7f..c0347a60 100644 --- a/dada_tests/interpret/function-args-expected-1-gave-2/validated.ref +++ b/dada_tests/interpret/function-args-expected-1-gave-2/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,37 +22,22 @@ Reserve( Place(1)( name{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(4)( Seq( @@ -69,50 +48,32 @@ Reserve( Place(0)( greet, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Plush", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( "plush", - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/if-else/syntax.ref b/dada_tests/interpret/if-else/syntax.ref index c6a22a34..ff65c86f 100644 --- a/dada_tests/interpret/if-else/syntax.ref +++ b/dada_tests/interpret/if-else/syntax.ref @@ -7,40 +7,31 @@ Tokens(dada_tests/interpret/if-else.dada:1:18:24:1), ), data: syntax::Tree { - root_expr: ( - Expr(38), + root_expr: Expr(38)( Seq( [ - ( - Expr(6), + Expr(6)( If( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), - ( - Expr(5), + Expr(5)( Seq( [ - ( - Expr(4), + Expr(4)( Await( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(1), + Expr(1)( Id( "print", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( String( "1", ), @@ -57,36 +48,28 @@ None, ), ), - ( - Expr(13), + Expr(13)( If( - ( - Expr(7), + Expr(7)( Boolean( false, ), ), - ( - Expr(12), + Expr(12)( Seq( [ - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "2", ), @@ -103,36 +86,28 @@ None, ), ), - ( - Expr(25), + Expr(25)( If( - ( - Expr(14), + Expr(14)( Boolean( true, ), ), - ( - Expr(19), + Expr(19)( Seq( [ - ( - Expr(18), + Expr(18)( Await( - ( - Expr(17), + Expr(17)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( String( "3", ), @@ -147,27 +122,21 @@ ), ), Some( - ( - Expr(24), + Expr(24)( Seq( [ - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( String( "4", ), @@ -184,36 +153,28 @@ ), ), ), - ( - Expr(37), + Expr(37)( If( - ( - Expr(26), + Expr(26)( Boolean( false, ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "5", ), @@ -228,27 +189,21 @@ ), ), Some( - ( - Expr(36), + Expr(36)( Seq( [ - ( - Expr(35), + Expr(35)( Await( - ( - Expr(34), + Expr(34)( Call( - ( - Expr(32), + Expr(32)( Id( "print", ), ), [ - ( - None, - ( - Expr(33), + None( + Expr(33)( String( "6", ), diff --git a/dada_tests/interpret/if-else/validated.ref b/dada_tests/interpret/if-else/validated.ref index 227616e8..0722d781 100644 --- a/dada_tests/interpret/if-else/validated.ref +++ b/dada_tests/interpret/if-else/validated.ref @@ -6,10 +6,7 @@ If( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(5)( Seq( @@ -22,69 +19,42 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( "1", - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), Expr(6)( Tuple, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(15)( If( Expr(8)( false, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(13)( Seq( @@ -97,69 +67,42 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, Expr(10)( "2", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(14)( Tuple, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(27)( If( Expr(16)( true, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(21)( Seq( @@ -172,47 +115,29 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(18)( "3", - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Expr(26)( Seq( @@ -225,62 +150,38 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( None, Expr(23)( "4", - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), Expr(39)( If( Expr(28)( false, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -293,47 +194,29 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "5", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(38)( Seq( @@ -346,59 +229,35 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + synthesized from Expr(32), ), [ NamedExpr( None, Expr(35)( "6", - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ], ), - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ], ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_div/syntax.ref b/dada_tests/interpret/ops/op_bool_div/syntax.ref index 6e871140..9be72114 100644 --- a/dada_tests/interpret/ops/op_bool_div/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_div/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_div.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), DividedBy, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_div/validated.ref b/dada_tests/interpret/ops/op_bool_div/validated.ref index 7cd690ae..0c2622f9 100644 --- a/dada_tests/interpret/ops/op_bool_div/validated.ref +++ b/dada_tests/interpret/ops/op_bool_div/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), DividedBy, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_gt/syntax.ref b/dada_tests/interpret/ops/op_bool_gt/syntax.ref index 4f6f2ac5..04df0278 100644 --- a/dada_tests/interpret/ops/op_bool_gt/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_gt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_gt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), GreaterThan, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_gt/validated.ref b/dada_tests/interpret/ops/op_bool_gt/validated.ref index 2c10dd39..9b6fec5c 100644 --- a/dada_tests/interpret/ops/op_bool_gt/validated.ref +++ b/dada_tests/interpret/ops/op_bool_gt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), GreaterThan, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_lt/syntax.ref b/dada_tests/interpret/ops/op_bool_lt/syntax.ref index 817f27ed..3225e0a1 100644 --- a/dada_tests/interpret/ops/op_bool_lt/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_lt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_lt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), LessThan, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_lt/validated.ref b/dada_tests/interpret/ops/op_bool_lt/validated.ref index 59419f12..5bdb5c8c 100644 --- a/dada_tests/interpret/ops/op_bool_lt/validated.ref +++ b/dada_tests/interpret/ops/op_bool_lt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), LessThan, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_minus/syntax.ref b/dada_tests/interpret/ops/op_bool_minus/syntax.ref index 7bbebc73..6128b2b3 100644 --- a/dada_tests/interpret/ops/op_bool_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_minus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_minus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), Minus, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_minus/validated.ref b/dada_tests/interpret/ops/op_bool_minus/validated.ref index 705aeb93..c8a91782 100644 --- a/dada_tests/interpret/ops/op_bool_minus/validated.ref +++ b/dada_tests/interpret/ops/op_bool_minus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Minus, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_plus/syntax.ref b/dada_tests/interpret/ops/op_bool_plus/syntax.ref index eb99c9ee..23a80bde 100644 --- a/dada_tests/interpret/ops/op_bool_plus/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_plus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_plus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), Plus, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_plus/validated.ref b/dada_tests/interpret/ops/op_bool_plus/validated.ref index 444e1f54..9ee2fe31 100644 --- a/dada_tests/interpret/ops/op_bool_plus/validated.ref +++ b/dada_tests/interpret/ops/op_bool_plus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_bool_times/syntax.ref b/dada_tests/interpret/ops/op_bool_times/syntax.ref index 25725f30..2dc4c850 100644 --- a/dada_tests/interpret/ops/op_bool_times/syntax.ref +++ b/dada_tests/interpret/ops/op_bool_times/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_bool_times.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), Times, - ( - Expr(1), + Expr(1)( Boolean( false, ), diff --git a/dada_tests/interpret/ops/op_bool_times/validated.ref b/dada_tests/interpret/ops/op_bool_times/validated.ref index b4ea6ed7..927747f8 100644 --- a/dada_tests/interpret/ops/op_bool_times/validated.ref +++ b/dada_tests/interpret/ops/op_bool_times/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Times, Expr(1)( false, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_divided_by_equal/bir.ref b/dada_tests/interpret/ops/op_divided_by_equal/bir.ref index 43cb044f..61db1cad 100644 --- a/dada_tests/interpret/ops/op_divided_by_equal/bir.ref +++ b/dada_tests/interpret/ops/op_divided_by_equal/bir.ref @@ -19,86 +19,106 @@ ), ( AssignExpr( - temp{3}, + temp{4}, (), ), Expr(1), ), ( Clear( - temp{3}, + temp{4}, ), Expr(1), ), ( AssignExpr( - temp{4}, + temp{6}, x{0}.give, ), - Expr(4), + Expr(2), ), ( AssignExpr( - temp{5}, + temp{7}, 2, ), Expr(3), ), ( AssignExpr( - x{0}, - temp{4} / temp{5}, + temp{2}, + temp{6} / temp{7}, ), Expr(4), ), ( Clear( - temp{5}, + temp{7}, ), Expr(3), ), ( Clear( - temp{4}, + temp{6}, + ), + Expr(2), + ), + ( + AssignPlace( + x{0}, + temp{2}, ), Expr(4), ), ( AssignExpr( - temp{7}, + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, x{0}.give, ), Expr(5), ), ( AssignExpr( - temp{8}, + temp{10}, 2, ), Expr(6), ), ( AssignExpr( - temp{6}, - temp{7} == temp{8}, + temp{8}, + temp{9} == temp{10}, ), Expr(7), ), ( Clear( - temp{8}, + temp{10}, ), Expr(6), ), ( Clear( - temp{7}, + temp{9}, ), Expr(5), ), ], If( - temp{6}, + temp{8}, BasicBlock(1), BasicBlock(2), ), @@ -107,25 +127,25 @@ [ ( AssignExpr( - temp{10}, + temp{12}, Print.reserve, ), Expr(8), ), ( AssignExpr( - temp{11}, + temp{13}, "Huzzah", ), Expr(9), ), ], Assign( - temp{9}, + temp{11}, Call( - temp{10}, + temp{12}, [ - temp{11}, + temp{13}, ], [ None, @@ -138,7 +158,7 @@ [ ( AssignExpr( - temp{2}, + temp{3}, (), ), Expr(13), @@ -152,34 +172,34 @@ [ ( Clear( - temp{6}, + temp{8}, ), Expr(7), ), ], Return( - temp{2}, + temp{3}, ), ), BasicBlock(4): BasicBlockData( [ ( Clear( - temp{11}, + temp{13}, ), Expr(9), ), ( Clear( - temp{10}, + temp{12}, ), Expr(8), ), ], Assign( - temp{2}, + temp{3}, Await( - temp{9}, + temp{11}, ), BasicBlock(5), ), @@ -188,7 +208,7 @@ [ ( Clear( - temp{9}, + temp{11}, ), Expr(10), ), diff --git a/dada_tests/interpret/ops/op_divided_by_equal/syntax.ref b/dada_tests/interpret/ops/op_divided_by_equal/syntax.ref index cd570ea8..fb31162a 100644 --- a/dada_tests/interpret/ops/op_divided_by_equal/syntax.ref +++ b/dada_tests/interpret/ops/op_divided_by_equal/syntax.ref @@ -7,85 +7,71 @@ Tokens(dada_tests/interpret/ops/op_divided_by_equal.dada:1:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "4", ), ), ), ), - ( - Expr(4), + Expr(4)( OpEq( - ( - Expr(2), + Expr(2)( Id( "x", ), ), DividedByEqual, - ( - Expr(3), + Expr(3)( Integer( "2", ), ), ), ), - ( - Expr(13), + Expr(13)( If( - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( Id( "x", ), ), EqualEqual, - ( - Expr(6), + Expr(6)( Integer( "2", ), ), ), ), - ( - Expr(12), + Expr(12)( Seq( [ - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "Huzzah", ), diff --git a/dada_tests/interpret/ops/op_divided_by_equal/validated.ref b/dada_tests/interpret/ops/op_divided_by_equal/validated.ref index 45f33ece..bb49ad68 100644 --- a/dada_tests/interpret/ops/op_divided_by_equal/validated.ref +++ b/dada_tests/interpret/ops/op_divided_by_equal/validated.ref @@ -1,5 +1,5 @@ [ - Expr(18)( + Expr(20)( Seq( [ Expr(3)( @@ -9,203 +9,145 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 4, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), - Expr(7)( - Assign( - TargetPlace(2)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, - ), - Expr(6)( - Op( - Expr(4)( - Give( - Place(1)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + x{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + DividedBy, + Expr(5)( + 2, + from Expr(3), + ), ), + synthesized from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, ), - DividedBy, - Expr(5)( - 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + x{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), ), + from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), - Expr(17)( + Expr(19)( If( - Expr(10)( + Expr(12)( Op( - Expr(8)( + Expr(10)( Give( - Place(2)( + Place(3)( x{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), EqualEqual, - Expr(9)( + Expr(11)( 2, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), - Expr(15)( + Expr(17)( Seq( [ - Expr(14)( + Expr(16)( Await( - Expr(13)( + Expr(15)( Call( - Expr(11)( + Expr(13)( Reserve( - Place(3)( + Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, - Expr(12)( + Expr(14)( "Huzzah", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), - Expr(16)( + Expr(18)( Tuple, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_equals/syntax.ref b/dada_tests/interpret/ops/op_equals/syntax.ref index dad9bdfa..a0b202e2 100644 --- a/dada_tests/interpret/ops/op_equals/syntax.ref +++ b/dada_tests/interpret/ops/op_equals/syntax.ref @@ -7,52 +7,41 @@ Tokens(dada_tests/interpret/ops/op_equals.dada:1:18:38:1), ), data: syntax::Tree { - root_expr: ( - Expr(72), + root_expr: Expr(72)( Seq( [ - ( - Expr(8), + Expr(8)( If( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), EqualEqual, - ( - Expr(1), + Expr(1)( Boolean( true, ), ), ), ), - ( - Expr(7), + Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(3), + Expr(3)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( String( "true == true", ), @@ -69,48 +58,38 @@ None, ), ), - ( - Expr(17), + Expr(17)( If( - ( - Expr(11), + Expr(11)( Op( - ( - Expr(9), + Expr(9)( Boolean( false, ), ), EqualEqual, - ( - Expr(10), + Expr(10)( Boolean( false, ), ), ), ), - ( - Expr(16), + Expr(16)( Seq( [ - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( String( "false == false", ), @@ -127,48 +106,38 @@ None, ), ), - ( - Expr(26), + Expr(26)( If( - ( - Expr(20), + Expr(20)( Op( - ( - Expr(18), + Expr(18)( Boolean( true, ), ), EqualEqual, - ( - Expr(19), + Expr(19)( Boolean( false, ), ), ), ), - ( - Expr(25), + Expr(25)( Seq( [ - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(21), + Expr(21)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( String( "error", ), @@ -185,48 +154,38 @@ None, ), ), - ( - Expr(35), + Expr(35)( If( - ( - Expr(29), + Expr(29)( Op( - ( - Expr(27), + Expr(27)( Integer( "1", ), ), EqualEqual, - ( - Expr(28), + Expr(28)( Integer( "1", ), ), ), ), - ( - Expr(34), + Expr(34)( Seq( [ - ( - Expr(33), + Expr(33)( Await( - ( - Expr(32), + Expr(32)( Call( - ( - Expr(30), + Expr(30)( Id( "print", ), ), [ - ( - None, - ( - Expr(31), + None( + Expr(31)( String( "1 == 1", ), @@ -243,48 +202,38 @@ None, ), ), - ( - Expr(44), + Expr(44)( If( - ( - Expr(38), + Expr(38)( Op( - ( - Expr(36), + Expr(36)( Integer( "1", ), ), EqualEqual, - ( - Expr(37), + Expr(37)( Integer( "2", ), ), ), ), - ( - Expr(43), + Expr(43)( Seq( [ - ( - Expr(42), + Expr(42)( Await( - ( - Expr(41), + Expr(41)( Call( - ( - Expr(39), + Expr(39)( Id( "print", ), ), [ - ( - None, - ( - Expr(40), + None( + Expr(40)( String( "error", ), @@ -301,48 +250,38 @@ None, ), ), - ( - Expr(53), + Expr(53)( If( - ( - Expr(47), + Expr(47)( Op( - ( - Expr(45), + Expr(45)( String( "a", ), ), EqualEqual, - ( - Expr(46), + Expr(46)( String( "a", ), ), ), ), - ( - Expr(52), + Expr(52)( Seq( [ - ( - Expr(51), + Expr(51)( Await( - ( - Expr(50), + Expr(50)( Call( - ( - Expr(48), + Expr(48)( Id( "print", ), ), [ - ( - None, - ( - Expr(49), + None( + Expr(49)( String( "a == a", ), @@ -359,48 +298,38 @@ None, ), ), - ( - Expr(62), + Expr(62)( If( - ( - Expr(56), + Expr(56)( Op( - ( - Expr(54), + Expr(54)( String( "a", ), ), EqualEqual, - ( - Expr(55), + Expr(55)( String( "b", ), ), ), ), - ( - Expr(61), + Expr(61)( Seq( [ - ( - Expr(60), + Expr(60)( Await( - ( - Expr(59), + Expr(59)( Call( - ( - Expr(57), + Expr(57)( Id( "print", ), ), [ - ( - None, - ( - Expr(58), + None( + Expr(58)( String( "error", ), @@ -417,48 +346,38 @@ None, ), ), - ( - Expr(71), + Expr(71)( If( - ( - Expr(65), + Expr(65)( Op( - ( - Expr(63), + Expr(63)( Tuple( [], ), ), EqualEqual, - ( - Expr(64), + Expr(64)( Tuple( [], ), ), ), ), - ( - Expr(70), + Expr(70)( Seq( [ - ( - Expr(69), + Expr(69)( Await( - ( - Expr(68), + Expr(68)( Call( - ( - Expr(66), + Expr(66)( Id( "print", ), ), [ - ( - None, - ( - Expr(67), + None( + Expr(67)( String( "() == ()", ), diff --git a/dada_tests/interpret/ops/op_equals/validated.ref b/dada_tests/interpret/ops/op_equals/validated.ref index ec73285a..5baf551b 100644 --- a/dada_tests/interpret/ops/op_equals/validated.ref +++ b/dada_tests/interpret/ops/op_equals/validated.ref @@ -8,24 +8,15 @@ Op( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), EqualEqual, Expr(1)( true, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(7)( Seq( @@ -38,60 +29,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), [ NamedExpr( None, Expr(4)( "true == true", - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(8)( Tuple, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), Expr(19)( If( @@ -99,24 +66,15 @@ Op( Expr(10)( false, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), EqualEqual, Expr(11)( false, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(17)( Seq( @@ -129,60 +87,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, Expr(14)( "false == false", - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(18)( Tuple, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(29)( If( @@ -190,24 +124,15 @@ Op( Expr(20)( true, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), EqualEqual, Expr(21)( false, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(27)( Seq( @@ -220,60 +145,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), [ NamedExpr( None, Expr(24)( "error", - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), Expr(28)( Tuple, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(39)( If( @@ -281,24 +182,15 @@ Op( Expr(30)( 1, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), EqualEqual, Expr(31)( 1, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), Expr(37)( Seq( @@ -311,60 +203,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( None, Expr(34)( "1 == 1", - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), Expr(38)( Tuple, - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), Expr(49)( If( @@ -372,24 +240,15 @@ Op( Expr(40)( 1, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), EqualEqual, Expr(41)( 2, - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), Expr(47)( Seq( @@ -402,60 +261,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + synthesized from Expr(39), ), [ NamedExpr( None, Expr(44)( "error", - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), ], ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(48)( Tuple, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), ), - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), Expr(59)( If( @@ -463,24 +298,15 @@ Op( Expr(50)( "a", - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), EqualEqual, Expr(51)( "a", - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), Expr(57)( Seq( @@ -493,60 +319,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + synthesized from Expr(48), ), [ NamedExpr( None, Expr(54)( "a == a", - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ], ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(69)( If( @@ -554,24 +356,15 @@ Op( Expr(60)( "a", - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), EqualEqual, Expr(61)( "b", - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), ), - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), Expr(67)( Seq( @@ -584,60 +377,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + synthesized from Expr(57), ), [ NamedExpr( None, Expr(64)( "error", - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ], ), - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), Expr(68)( Tuple, - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), Expr(79)( If( @@ -645,24 +414,15 @@ Op( Expr(70)( Tuple, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), EqualEqual, Expr(71)( Tuple, - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), ), - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), Expr(77)( Seq( @@ -675,66 +435,39 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), ), - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + synthesized from Expr(66), ), [ NamedExpr( None, Expr(74)( "() == ()", - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), ), - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ], ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), Expr(78)( Tuple, - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ], ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_int_implicit_convert_overflow/syntax.ref b/dada_tests/interpret/ops/op_int_implicit_convert_overflow/syntax.ref index 434818dc..e1026dba 100644 --- a/dada_tests/interpret/ops/op_int_implicit_convert_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_int_implicit_convert_overflow/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_int_implicit_convert_overflow.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "9223372036854775808", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1_", ), diff --git a/dada_tests/interpret/ops/op_int_implicit_convert_overflow/validated.ref b/dada_tests/interpret/ops/op_int_implicit_convert_overflow/validated.ref index 50cf889f..42d2ab8f 100644 --- a/dada_tests/interpret/ops/op_int_implicit_convert_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_int_implicit_convert_overflow/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( 9223372036854775808, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_minus_equal/bir.ref b/dada_tests/interpret/ops/op_minus_equal/bir.ref index 93e08dc8..43d5e610 100644 --- a/dada_tests/interpret/ops/op_minus_equal/bir.ref +++ b/dada_tests/interpret/ops/op_minus_equal/bir.ref @@ -19,86 +19,106 @@ ), ( AssignExpr( - temp{3}, + temp{4}, (), ), Expr(1), ), ( Clear( - temp{3}, + temp{4}, ), Expr(1), ), ( AssignExpr( - temp{4}, + temp{6}, x{0}.give, ), - Expr(4), + Expr(2), ), ( AssignExpr( - temp{5}, + temp{7}, 2, ), Expr(3), ), ( AssignExpr( - x{0}, - temp{4} - temp{5}, + temp{2}, + temp{6} - temp{7}, ), Expr(4), ), ( Clear( - temp{5}, + temp{7}, ), Expr(3), ), ( Clear( - temp{4}, + temp{6}, + ), + Expr(2), + ), + ( + AssignPlace( + x{0}, + temp{2}, ), Expr(4), ), ( AssignExpr( - temp{7}, + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, x{0}.give, ), Expr(5), ), ( AssignExpr( - temp{8}, + temp{10}, 2, ), Expr(6), ), ( AssignExpr( - temp{6}, - temp{7} == temp{8}, + temp{8}, + temp{9} == temp{10}, ), Expr(7), ), ( Clear( - temp{8}, + temp{10}, ), Expr(6), ), ( Clear( - temp{7}, + temp{9}, ), Expr(5), ), ], If( - temp{6}, + temp{8}, BasicBlock(1), BasicBlock(2), ), @@ -107,25 +127,25 @@ [ ( AssignExpr( - temp{10}, + temp{12}, Print.reserve, ), Expr(8), ), ( AssignExpr( - temp{11}, + temp{13}, "Huzzah", ), Expr(9), ), ], Assign( - temp{9}, + temp{11}, Call( - temp{10}, + temp{12}, [ - temp{11}, + temp{13}, ], [ None, @@ -138,7 +158,7 @@ [ ( AssignExpr( - temp{2}, + temp{3}, (), ), Expr(13), @@ -152,34 +172,34 @@ [ ( Clear( - temp{6}, + temp{8}, ), Expr(7), ), ], Return( - temp{2}, + temp{3}, ), ), BasicBlock(4): BasicBlockData( [ ( Clear( - temp{11}, + temp{13}, ), Expr(9), ), ( Clear( - temp{10}, + temp{12}, ), Expr(8), ), ], Assign( - temp{2}, + temp{3}, Await( - temp{9}, + temp{11}, ), BasicBlock(5), ), @@ -188,7 +208,7 @@ [ ( Clear( - temp{9}, + temp{11}, ), Expr(10), ), diff --git a/dada_tests/interpret/ops/op_minus_equal/syntax.ref b/dada_tests/interpret/ops/op_minus_equal/syntax.ref index b599e51c..12fb8864 100644 --- a/dada_tests/interpret/ops/op_minus_equal/syntax.ref +++ b/dada_tests/interpret/ops/op_minus_equal/syntax.ref @@ -7,85 +7,71 @@ Tokens(dada_tests/interpret/ops/op_minus_equal.dada:1:18:7:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "4", ), ), ), ), - ( - Expr(4), + Expr(4)( OpEq( - ( - Expr(2), + Expr(2)( Id( "x", ), ), MinusEqual, - ( - Expr(3), + Expr(3)( Integer( "2", ), ), ), ), - ( - Expr(13), + Expr(13)( If( - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( Id( "x", ), ), EqualEqual, - ( - Expr(6), + Expr(6)( Integer( "2", ), ), ), ), - ( - Expr(12), + Expr(12)( Seq( [ - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "Huzzah", ), diff --git a/dada_tests/interpret/ops/op_minus_equal/validated.ref b/dada_tests/interpret/ops/op_minus_equal/validated.ref index c5f78e81..71ff25b7 100644 --- a/dada_tests/interpret/ops/op_minus_equal/validated.ref +++ b/dada_tests/interpret/ops/op_minus_equal/validated.ref @@ -1,5 +1,5 @@ [ - Expr(18)( + Expr(20)( Seq( [ Expr(3)( @@ -9,203 +9,145 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 4, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), - Expr(7)( - Assign( - TargetPlace(2)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, - ), - Expr(6)( - Op( - Expr(4)( - Give( - Place(1)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + x{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + Minus, + Expr(5)( + 2, + from Expr(3), + ), ), + synthesized from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, ), - Minus, - Expr(5)( - 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + x{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), ), + from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), - Expr(17)( + Expr(19)( If( - Expr(10)( + Expr(12)( Op( - Expr(8)( + Expr(10)( Give( - Place(2)( + Place(3)( x{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), EqualEqual, - Expr(9)( + Expr(11)( 2, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), - Expr(15)( + Expr(17)( Seq( [ - Expr(14)( + Expr(16)( Await( - Expr(13)( + Expr(15)( Call( - Expr(11)( + Expr(13)( Reserve( - Place(3)( + Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, - Expr(12)( + Expr(14)( "Huzzah", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), - Expr(16)( + Expr(18)( Tuple, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/syntax.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/syntax.ref index b3870b93..5b0c7301 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/syntax.ref @@ -7,34 +7,26 @@ Tokens(dada_tests/interpret/ops/op_neg_int_and_unsigned_add.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "22", ), @@ -42,8 +34,7 @@ ), ), Plus, - ( - Expr(3), + Expr(3)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/validated.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/validated.ref index a68f08d5..23848529 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -31,50 +25,29 @@ Minus, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Plus, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/syntax.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/syntax.ref index 950e5722..1265736d 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/syntax.ref @@ -7,34 +7,26 @@ Tokens(dada_tests/interpret/ops/op_neg_int_and_unsigned_add2.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "44", ), @@ -42,8 +34,7 @@ ), ), Plus, - ( - Expr(3), + Expr(3)( Integer( "22", ), diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/validated.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/validated.ref index 4ac99f89..477341ce 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_add2/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -31,50 +25,29 @@ Minus, Expr(1)( 44, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Plus, Expr(3)( 22, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/syntax.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/syntax.ref index 12f55f20..1d18a503 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/syntax.ref @@ -7,34 +7,26 @@ Tokens(dada_tests/interpret/ops/op_neg_int_and_unsigned_div.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "22", ), @@ -42,8 +34,7 @@ ), ), DividedBy, - ( - Expr(3), + Expr(3)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/validated.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/validated.ref index 038b09ad..398dd6d6 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_div/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -31,50 +25,29 @@ Minus, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), DividedBy, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/syntax.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/syntax.ref index 744de798..30050603 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/syntax.ref @@ -7,34 +7,26 @@ Tokens(dada_tests/interpret/ops/op_neg_int_and_unsigned_minus.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "22", ), @@ -42,8 +34,7 @@ ), ), Minus, - ( - Expr(3), + Expr(3)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/validated.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/validated.ref index f5407621..b5e9dc2e 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_minus/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -31,50 +25,29 @@ Minus, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Minus, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/syntax.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/syntax.ref index b3895138..1073eb67 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/syntax.ref @@ -7,34 +7,26 @@ Tokens(dada_tests/interpret/ops/op_neg_int_and_unsigned_mul.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "22", ), @@ -42,8 +34,7 @@ ), ), Times, - ( - Expr(3), + Expr(3)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/validated.ref b/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/validated.ref index facf8033..374c3cce 100644 --- a/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_and_unsigned_mul/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -31,50 +25,29 @@ Minus, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Times, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_int_overflow/syntax.ref b/dada_tests/interpret/ops/op_neg_int_overflow/syntax.ref index 442aa42b..73be273c 100644 --- a/dada_tests/interpret/ops/op_neg_int_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_int_overflow/syntax.ref @@ -7,16 +7,13 @@ Tokens(dada_tests/interpret/ops/op_neg_int_overflow.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(2), + root_expr: Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Unary( Minus, - ( - Expr(0), + Expr(0)( Integer( "9223372036854775808", ), diff --git a/dada_tests/interpret/ops/op_neg_int_overflow/validated.ref b/dada_tests/interpret/ops/op_neg_int_overflow/validated.ref index 0a86c906..97b0c505 100644 --- a/dada_tests/interpret/ops/op_neg_int_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_neg_int_overflow/validated.ref @@ -7,22 +7,13 @@ Minus, Expr(0)( 9223372036854775808, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_neg_unsigned_int/syntax.ref b/dada_tests/interpret/ops/op_neg_unsigned_int/syntax.ref index c8a0137d..6a675a7f 100644 --- a/dada_tests/interpret/ops/op_neg_unsigned_int/syntax.ref +++ b/dada_tests/interpret/ops/op_neg_unsigned_int/syntax.ref @@ -7,16 +7,13 @@ Tokens(dada_tests/interpret/ops/op_neg_unsigned_int.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(2), + root_expr: Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Unary( Minus, - ( - Expr(0), + Expr(0)( Integer( "1", ), diff --git a/dada_tests/interpret/ops/op_neg_unsigned_int/validated.ref b/dada_tests/interpret/ops/op_neg_unsigned_int/validated.ref index c31852b6..43ae58be 100644 --- a/dada_tests/interpret/ops/op_neg_unsigned_int/validated.ref +++ b/dada_tests/interpret/ops/op_neg_unsigned_int/validated.ref @@ -7,22 +7,13 @@ Minus, Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_plus_equal/bir.ref b/dada_tests/interpret/ops/op_plus_equal/bir.ref index 8ae9dc78..05e95a24 100644 --- a/dada_tests/interpret/ops/op_plus_equal/bir.ref +++ b/dada_tests/interpret/ops/op_plus_equal/bir.ref @@ -19,86 +19,106 @@ ), ( AssignExpr( - temp{3}, + temp{4}, (), ), Expr(1), ), ( Clear( - temp{3}, + temp{4}, ), Expr(1), ), ( AssignExpr( - temp{4}, + temp{6}, x{0}.give, ), - Expr(4), + Expr(2), ), ( AssignExpr( - temp{5}, + temp{7}, 4, ), Expr(3), ), ( AssignExpr( - x{0}, - temp{4} + temp{5}, + temp{2}, + temp{6} + temp{7}, ), Expr(4), ), ( Clear( - temp{5}, + temp{7}, ), Expr(3), ), ( Clear( - temp{4}, + temp{6}, + ), + Expr(2), + ), + ( + AssignPlace( + x{0}, + temp{2}, ), Expr(4), ), ( AssignExpr( - temp{7}, + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, x{0}.give, ), Expr(5), ), ( AssignExpr( - temp{8}, + temp{10}, 6, ), Expr(6), ), ( AssignExpr( - temp{6}, - temp{7} == temp{8}, + temp{8}, + temp{9} == temp{10}, ), Expr(7), ), ( Clear( - temp{8}, + temp{10}, ), Expr(6), ), ( Clear( - temp{7}, + temp{9}, ), Expr(5), ), ], If( - temp{6}, + temp{8}, BasicBlock(1), BasicBlock(2), ), @@ -107,25 +127,25 @@ [ ( AssignExpr( - temp{10}, + temp{12}, Print.reserve, ), Expr(8), ), ( AssignExpr( - temp{11}, + temp{13}, "Huzzah", ), Expr(9), ), ], Assign( - temp{9}, + temp{11}, Call( - temp{10}, + temp{12}, [ - temp{11}, + temp{13}, ], [ None, @@ -138,7 +158,7 @@ [ ( AssignExpr( - temp{2}, + temp{3}, (), ), Expr(13), @@ -152,34 +172,34 @@ [ ( Clear( - temp{6}, + temp{8}, ), Expr(7), ), ], Return( - temp{2}, + temp{3}, ), ), BasicBlock(4): BasicBlockData( [ ( Clear( - temp{11}, + temp{13}, ), Expr(9), ), ( Clear( - temp{10}, + temp{12}, ), Expr(8), ), ], Assign( - temp{2}, + temp{3}, Await( - temp{9}, + temp{11}, ), BasicBlock(5), ), @@ -188,7 +208,7 @@ [ ( Clear( - temp{9}, + temp{11}, ), Expr(10), ), diff --git a/dada_tests/interpret/ops/op_plus_equal/syntax.ref b/dada_tests/interpret/ops/op_plus_equal/syntax.ref index dec8b400..086bf67f 100644 --- a/dada_tests/interpret/ops/op_plus_equal/syntax.ref +++ b/dada_tests/interpret/ops/op_plus_equal/syntax.ref @@ -7,85 +7,71 @@ Tokens(dada_tests/interpret/ops/op_plus_equal.dada:1:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "2", ), ), ), ), - ( - Expr(4), + Expr(4)( OpEq( - ( - Expr(2), + Expr(2)( Id( "x", ), ), PlusEqual, - ( - Expr(3), + Expr(3)( Integer( "4", ), ), ), ), - ( - Expr(13), + Expr(13)( If( - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( Id( "x", ), ), EqualEqual, - ( - Expr(6), + Expr(6)( Integer( "6", ), ), ), ), - ( - Expr(12), + Expr(12)( Seq( [ - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "Huzzah", ), diff --git a/dada_tests/interpret/ops/op_plus_equal/validated.ref b/dada_tests/interpret/ops/op_plus_equal/validated.ref index 2eaa6d60..3a45de74 100644 --- a/dada_tests/interpret/ops/op_plus_equal/validated.ref +++ b/dada_tests/interpret/ops/op_plus_equal/validated.ref @@ -1,5 +1,5 @@ [ - Expr(18)( + Expr(20)( Seq( [ Expr(3)( @@ -9,203 +9,145 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 2, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), - Expr(7)( - Assign( - TargetPlace(2)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, - ), - Expr(6)( - Op( - Expr(4)( - Give( - Place(1)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + x{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + Plus, + Expr(5)( + 4, + from Expr(3), + ), ), + synthesized from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, ), - Plus, - Expr(5)( - 4, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + x{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), ), + from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), - Expr(17)( + Expr(19)( If( - Expr(10)( + Expr(12)( Op( - Expr(8)( + Expr(10)( Give( - Place(2)( + Place(3)( x{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), EqualEqual, - Expr(9)( + Expr(11)( 6, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), - Expr(15)( + Expr(17)( Seq( [ - Expr(14)( + Expr(16)( Await( - Expr(13)( + Expr(15)( Call( - Expr(11)( + Expr(13)( Reserve( - Place(3)( + Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, - Expr(12)( + Expr(14)( "Huzzah", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), - Expr(16)( + Expr(18)( Tuple, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_add/syntax.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_add/syntax.ref index 8e03ce66..a04aac0c 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_add/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_add/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_signed_and_unsigned_add.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Plus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_add/validated.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_add/validated.ref index 347bc2ff..aa9feb9b 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_add/validated.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_add/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Plus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_div/syntax.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_div/syntax.ref index af6992a2..7c86d80e 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_div/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_div/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_signed_and_unsigned_div.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), DividedBy, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_div/validated.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_div/validated.ref index c837617c..a981bc48 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_div/validated.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_div/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), DividedBy, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_minus/syntax.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_minus/syntax.ref index 10b11786..18058ccf 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_minus/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_signed_and_unsigned_minus.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_minus/validated.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_minus/validated.ref index b477d576..e814f46f 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_minus/validated.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_minus/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_mul/syntax.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_mul/syntax.ref index 965c844d..41105dd8 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_mul/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_mul/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_signed_and_unsigned_mul.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Times, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_signed_and_unsigned_mul/validated.ref b/dada_tests/interpret/ops/op_signed_and_unsigned_mul/validated.ref index 105802da..06d97209 100644 --- a/dada_tests/interpret/ops/op_signed_and_unsigned_mul/validated.ref +++ b/dada_tests/interpret/ops/op_signed_and_unsigned_mul/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Times, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_int_add_overflow/syntax.ref b/dada_tests/interpret/ops/op_signed_int_add_overflow/syntax.ref index fff0974e..c6f16a6d 100644 --- a/dada_tests/interpret/ops/op_signed_int_add_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_int_add_overflow/syntax.ref @@ -7,37 +7,33 @@ Tokens(dada_tests/interpret/ops/op_signed_int_add_overflow.dada:1:12:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "int_max", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "int_max", + ty: None, + }, + Expr(0)( Integer( "9223372036854775807_", ), ), ), ), - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Id( "int_max", ), ), Plus, - ( - Expr(3), + Expr(3)( Integer( "1_", ), diff --git a/dada_tests/interpret/ops/op_signed_int_add_overflow/validated.ref b/dada_tests/interpret/ops/op_signed_int_add_overflow/validated.ref index 6aee99e1..5a8883e1 100644 --- a/dada_tests/interpret/ops/op_signed_int_add_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_signed_int_add_overflow/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 9223372036854775807, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( int_max{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(6)( Op( @@ -62,36 +41,21 @@ Give( Place(1)( int_max{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Plus, Expr(5)( 1, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_int_div_zero/syntax.ref b/dada_tests/interpret/ops/op_signed_int_div_zero/syntax.ref index 373237ce..a8bd5a66 100644 --- a/dada_tests/interpret/ops/op_signed_int_div_zero/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_int_div_zero/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_signed_int_div_zero.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), DividedBy, - ( - Expr(1), + Expr(1)( Integer( "0_", ), diff --git a/dada_tests/interpret/ops/op_signed_int_div_zero/validated.ref b/dada_tests/interpret/ops/op_signed_int_div_zero/validated.ref index 280b00df..e5c57f6c 100644 --- a/dada_tests/interpret/ops/op_signed_int_div_zero/validated.ref +++ b/dada_tests/interpret/ops/op_signed_int_div_zero/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), DividedBy, Expr(1)( 0, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_int_mul_overflow/syntax.ref b/dada_tests/interpret/ops/op_signed_int_mul_overflow/syntax.ref index e82007f9..665494ed 100644 --- a/dada_tests/interpret/ops/op_signed_int_mul_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_int_mul_overflow/syntax.ref @@ -7,37 +7,33 @@ Tokens(dada_tests/interpret/ops/op_signed_int_mul_overflow.dada:1:12:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "int_max", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "int_max", + ty: None, + }, + Expr(0)( Integer( "9223372036854775807_", ), ), ), ), - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Id( "int_max", ), ), Times, - ( - Expr(3), + Expr(3)( Integer( "2_", ), diff --git a/dada_tests/interpret/ops/op_signed_int_mul_overflow/validated.ref b/dada_tests/interpret/ops/op_signed_int_mul_overflow/validated.ref index 413479f0..c4c062fa 100644 --- a/dada_tests/interpret/ops/op_signed_int_mul_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_signed_int_mul_overflow/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 9223372036854775807, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( int_max{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(6)( Op( @@ -62,36 +41,21 @@ Give( Place(1)( int_max{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Times, Expr(5)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_signed_int_sub_overflow/syntax.ref b/dada_tests/interpret/ops/op_signed_int_sub_overflow/syntax.ref index c70a298e..fcab9923 100644 --- a/dada_tests/interpret/ops/op_signed_int_sub_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_signed_int_sub_overflow/syntax.ref @@ -7,19 +7,15 @@ Tokens(dada_tests/interpret/ops/op_signed_int_sub_overflow.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Unary( Minus, - ( - Expr(0), + Expr(0)( Integer( "9223372036854775807_", ), @@ -27,8 +23,7 @@ ), ), Minus, - ( - Expr(2), + Expr(2)( Integer( "2_", ), diff --git a/dada_tests/interpret/ops/op_signed_int_sub_overflow/validated.ref b/dada_tests/interpret/ops/op_signed_int_sub_overflow/validated.ref index b48950ee..8b3085d1 100644 --- a/dada_tests/interpret/ops/op_signed_int_sub_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_signed_int_sub_overflow/validated.ref @@ -9,36 +9,21 @@ Minus, Expr(0)( 9223372036854775807, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Minus, Expr(2)( 2, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_div/syntax.ref b/dada_tests/interpret/ops/op_string_div/syntax.ref index f36c6f43..287e0e2f 100644 --- a/dada_tests/interpret/ops/op_string_div/syntax.ref +++ b/dada_tests/interpret/ops/op_string_div/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_div.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), DividedBy, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_div/validated.ref b/dada_tests/interpret/ops/op_string_div/validated.ref index 99850d44..4824e117 100644 --- a/dada_tests/interpret/ops/op_string_div/validated.ref +++ b/dada_tests/interpret/ops/op_string_div/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), DividedBy, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_gt/syntax.ref b/dada_tests/interpret/ops/op_string_gt/syntax.ref index ddca72a9..430e6d14 100644 --- a/dada_tests/interpret/ops/op_string_gt/syntax.ref +++ b/dada_tests/interpret/ops/op_string_gt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_gt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), GreaterThan, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_gt/validated.ref b/dada_tests/interpret/ops/op_string_gt/validated.ref index 1dad176b..ee9e2046 100644 --- a/dada_tests/interpret/ops/op_string_gt/validated.ref +++ b/dada_tests/interpret/ops/op_string_gt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), GreaterThan, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_lt/syntax.ref b/dada_tests/interpret/ops/op_string_lt/syntax.ref index 1eaf01a8..7358fdc0 100644 --- a/dada_tests/interpret/ops/op_string_lt/syntax.ref +++ b/dada_tests/interpret/ops/op_string_lt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_lt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), LessThan, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_lt/validated.ref b/dada_tests/interpret/ops/op_string_lt/validated.ref index 55c54af9..0e7dc74b 100644 --- a/dada_tests/interpret/ops/op_string_lt/validated.ref +++ b/dada_tests/interpret/ops/op_string_lt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), LessThan, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_minus/syntax.ref b/dada_tests/interpret/ops/op_string_minus/syntax.ref index 98da2be1..d4c8c226 100644 --- a/dada_tests/interpret/ops/op_string_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_string_minus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_minus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), Minus, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_minus/validated.ref b/dada_tests/interpret/ops/op_string_minus/validated.ref index 5611fba1..7f36c2fe 100644 --- a/dada_tests/interpret/ops/op_string_minus/validated.ref +++ b/dada_tests/interpret/ops/op_string_minus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Minus, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_plus/syntax.ref b/dada_tests/interpret/ops/op_string_plus/syntax.ref index 0f249927..fa5d5681 100644 --- a/dada_tests/interpret/ops/op_string_plus/syntax.ref +++ b/dada_tests/interpret/ops/op_string_plus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_plus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), Plus, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_plus/validated.ref b/dada_tests/interpret/ops/op_string_plus/validated.ref index 982ba252..c1b314b3 100644 --- a/dada_tests/interpret/ops/op_string_plus/validated.ref +++ b/dada_tests/interpret/ops/op_string_plus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_string_times/syntax.ref b/dada_tests/interpret/ops/op_string_times/syntax.ref index 568a793b..a5f3bb47 100644 --- a/dada_tests/interpret/ops/op_string_times/syntax.ref +++ b/dada_tests/interpret/ops/op_string_times/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_string_times.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( String( "a", ), ), Times, - ( - Expr(1), + Expr(1)( String( "b", ), diff --git a/dada_tests/interpret/ops/op_string_times/validated.ref b/dada_tests/interpret/ops/op_string_times/validated.ref index 6b8c8848..e4cd92ce 100644 --- a/dada_tests/interpret/ops/op_string_times/validated.ref +++ b/dada_tests/interpret/ops/op_string_times/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( "a", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Times, Expr(1)( "b", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_times_equal/bir.ref b/dada_tests/interpret/ops/op_times_equal/bir.ref index 60889b4f..f78af67d 100644 --- a/dada_tests/interpret/ops/op_times_equal/bir.ref +++ b/dada_tests/interpret/ops/op_times_equal/bir.ref @@ -19,86 +19,106 @@ ), ( AssignExpr( - temp{3}, + temp{4}, (), ), Expr(1), ), ( Clear( - temp{3}, + temp{4}, ), Expr(1), ), ( AssignExpr( - temp{4}, + temp{6}, x{0}.give, ), - Expr(4), + Expr(2), ), ( AssignExpr( - temp{5}, + temp{7}, 2, ), Expr(3), ), ( AssignExpr( - x{0}, - temp{4} * temp{5}, + temp{2}, + temp{6} * temp{7}, ), Expr(4), ), ( Clear( - temp{5}, + temp{7}, ), Expr(3), ), ( Clear( - temp{4}, + temp{6}, + ), + Expr(2), + ), + ( + AssignPlace( + x{0}, + temp{2}, ), Expr(4), ), ( AssignExpr( - temp{7}, + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, x{0}.give, ), Expr(5), ), ( AssignExpr( - temp{8}, + temp{10}, 8, ), Expr(6), ), ( AssignExpr( - temp{6}, - temp{7} == temp{8}, + temp{8}, + temp{9} == temp{10}, ), Expr(7), ), ( Clear( - temp{8}, + temp{10}, ), Expr(6), ), ( Clear( - temp{7}, + temp{9}, ), Expr(5), ), ], If( - temp{6}, + temp{8}, BasicBlock(1), BasicBlock(2), ), @@ -107,25 +127,25 @@ [ ( AssignExpr( - temp{10}, + temp{12}, Print.reserve, ), Expr(8), ), ( AssignExpr( - temp{11}, + temp{13}, "Huzzah", ), Expr(9), ), ], Assign( - temp{9}, + temp{11}, Call( - temp{10}, + temp{12}, [ - temp{11}, + temp{13}, ], [ None, @@ -138,7 +158,7 @@ [ ( AssignExpr( - temp{2}, + temp{3}, (), ), Expr(13), @@ -152,34 +172,34 @@ [ ( Clear( - temp{6}, + temp{8}, ), Expr(7), ), ], Return( - temp{2}, + temp{3}, ), ), BasicBlock(4): BasicBlockData( [ ( Clear( - temp{11}, + temp{13}, ), Expr(9), ), ( Clear( - temp{10}, + temp{12}, ), Expr(8), ), ], Assign( - temp{2}, + temp{3}, Await( - temp{9}, + temp{11}, ), BasicBlock(5), ), @@ -188,7 +208,7 @@ [ ( Clear( - temp{9}, + temp{11}, ), Expr(10), ), diff --git a/dada_tests/interpret/ops/op_times_equal/syntax.ref b/dada_tests/interpret/ops/op_times_equal/syntax.ref index e5b758bd..042e0e83 100644 --- a/dada_tests/interpret/ops/op_times_equal/syntax.ref +++ b/dada_tests/interpret/ops/op_times_equal/syntax.ref @@ -7,85 +7,71 @@ Tokens(dada_tests/interpret/ops/op_times_equal.dada:1:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( Integer( "4", ), ), ), ), - ( - Expr(4), + Expr(4)( OpEq( - ( - Expr(2), + Expr(2)( Id( "x", ), ), TimesEqual, - ( - Expr(3), + Expr(3)( Integer( "2", ), ), ), ), - ( - Expr(13), + Expr(13)( If( - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( Id( "x", ), ), EqualEqual, - ( - Expr(6), + Expr(6)( Integer( "8", ), ), ), ), - ( - Expr(12), + Expr(12)( Seq( [ - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "Huzzah", ), diff --git a/dada_tests/interpret/ops/op_times_equal/validated.ref b/dada_tests/interpret/ops/op_times_equal/validated.ref index 1b1e4bf8..a290578d 100644 --- a/dada_tests/interpret/ops/op_times_equal/validated.ref +++ b/dada_tests/interpret/ops/op_times_equal/validated.ref @@ -1,5 +1,5 @@ [ - Expr(18)( + Expr(20)( Seq( [ Expr(3)( @@ -9,203 +9,145 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 4, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), - Expr(7)( - Assign( - TargetPlace(2)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, - ), - Expr(6)( - Op( - Expr(4)( - Give( - Place(1)( - x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + x{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + Times, + Expr(5)( + 2, + from Expr(3), + ), ), + synthesized from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, ), - Times, - Expr(5)( - 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + x{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), ), + from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), - Expr(17)( + Expr(19)( If( - Expr(10)( + Expr(12)( Op( - Expr(8)( + Expr(10)( Give( - Place(2)( + Place(3)( x{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), EqualEqual, - Expr(9)( + Expr(11)( 8, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), - Expr(15)( + Expr(17)( Seq( [ - Expr(14)( + Expr(16)( Await( - Expr(13)( + Expr(15)( Call( - Expr(11)( + Expr(13)( Reserve( - Place(3)( + Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, - Expr(12)( + Expr(14)( "Huzzah", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), - Expr(16)( + Expr(18)( Tuple, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_div/syntax.ref b/dada_tests/interpret/ops/op_unit_div/syntax.ref index 56d632eb..911c3bfd 100644 --- a/dada_tests/interpret/ops/op_unit_div/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_div/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_div.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), DividedBy, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_div/validated.ref b/dada_tests/interpret/ops/op_unit_div/validated.ref index 1b438dcd..048d52f7 100644 --- a/dada_tests/interpret/ops/op_unit_div/validated.ref +++ b/dada_tests/interpret/ops/op_unit_div/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), DividedBy, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_gt/syntax.ref b/dada_tests/interpret/ops/op_unit_gt/syntax.ref index 7a0885c2..fd55867d 100644 --- a/dada_tests/interpret/ops/op_unit_gt/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_gt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_gt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), GreaterThan, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_gt/validated.ref b/dada_tests/interpret/ops/op_unit_gt/validated.ref index 8cfd0888..ab094d0c 100644 --- a/dada_tests/interpret/ops/op_unit_gt/validated.ref +++ b/dada_tests/interpret/ops/op_unit_gt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), GreaterThan, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_lt/syntax.ref b/dada_tests/interpret/ops/op_unit_lt/syntax.ref index 284f45ef..b07f0b10 100644 --- a/dada_tests/interpret/ops/op_unit_lt/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_lt/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_lt.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), LessThan, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_lt/validated.ref b/dada_tests/interpret/ops/op_unit_lt/validated.ref index c7ce5e0f..5ec81888 100644 --- a/dada_tests/interpret/ops/op_unit_lt/validated.ref +++ b/dada_tests/interpret/ops/op_unit_lt/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), LessThan, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_minus/syntax.ref b/dada_tests/interpret/ops/op_unit_minus/syntax.ref index d1b9e3df..93dd4f18 100644 --- a/dada_tests/interpret/ops/op_unit_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_minus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_minus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), Minus, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_minus/validated.ref b/dada_tests/interpret/ops/op_unit_minus/validated.ref index 1c15129c..99d2ae83 100644 --- a/dada_tests/interpret/ops/op_unit_minus/validated.ref +++ b/dada_tests/interpret/ops/op_unit_minus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Minus, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_plus/syntax.ref b/dada_tests/interpret/ops/op_unit_plus/syntax.ref index 2d59d72e..3095ba30 100644 --- a/dada_tests/interpret/ops/op_unit_plus/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_plus/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_plus.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), Plus, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_plus/validated.ref b/dada_tests/interpret/ops/op_unit_plus/validated.ref index 9762c0d9..aaf5670c 100644 --- a/dada_tests/interpret/ops/op_unit_plus/validated.ref +++ b/dada_tests/interpret/ops/op_unit_plus/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unit_times/syntax.ref b/dada_tests/interpret/ops/op_unit_times/syntax.ref index 079e13f0..9b1e494e 100644 --- a/dada_tests/interpret/ops/op_unit_times/syntax.ref +++ b/dada_tests/interpret/ops/op_unit_times/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unit_times.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Tuple( [], ), ), Times, - ( - Expr(1), + Expr(1)( Tuple( [], ), diff --git a/dada_tests/interpret/ops/op_unit_times/validated.ref b/dada_tests/interpret/ops/op_unit_times/validated.ref index 230278fb..e9b27c68 100644 --- a/dada_tests/interpret/ops/op_unit_times/validated.ref +++ b/dada_tests/interpret/ops/op_unit_times/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Times, Expr(1)( Tuple, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/syntax.ref index 4e791f80..746783d3 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/syntax.ref @@ -7,41 +7,32 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_neg_int_add.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Plus, - ( - Expr(3), + Expr(3)( Unary( Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/validated.ref index 38d8697b..a6057429 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,10 +22,7 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Plus, Expr(3)( @@ -39,42 +30,24 @@ Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/syntax.ref index b22dfc72..716c8d40 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/syntax.ref @@ -7,41 +7,32 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_neg_int_add2.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Plus, - ( - Expr(3), + Expr(3)( Unary( Minus, - ( - Expr(2), + Expr(2)( Integer( "11", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/validated.ref index 47bd953b..154d87e4 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_add2/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,10 +22,7 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Plus, Expr(3)( @@ -39,42 +30,24 @@ Minus, Expr(2)( 11, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/syntax.ref index 33a9eb75..8f76cc1a 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/syntax.ref @@ -7,41 +7,32 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_neg_int_div.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), DividedBy, - ( - Expr(3), + Expr(3)( Unary( Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/validated.ref index 99d45c93..dfbb6d2a 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_div/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,10 +22,7 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), DividedBy, Expr(3)( @@ -39,42 +30,24 @@ Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/syntax.ref index 1e1d1c74..9a59439b 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/syntax.ref @@ -7,41 +7,32 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_neg_int_minus.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Minus, - ( - Expr(3), + Expr(3)( Unary( Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/validated.ref index 9f732141..281d3d3d 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_minus/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,10 +22,7 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Minus, Expr(3)( @@ -39,42 +30,24 @@ Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/syntax.ref index 97cbc00e..ad78f9f7 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/syntax.ref @@ -7,41 +7,32 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_neg_int_mul.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Times, - ( - Expr(3), + Expr(3)( Unary( Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/validated.ref index 46da69c3..da62187d 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_neg_int_mul/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,10 +22,7 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Times, Expr(3)( @@ -39,42 +30,24 @@ Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_add/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_add/syntax.ref index 6a937f6d..520e7636 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_add/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_add/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_signed_add.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Plus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_add/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_add/validated.ref index 347bc2ff..aa9feb9b 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_add/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_add/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Plus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_div/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_div/syntax.ref index af02dee8..ac5ba170 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_div/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_div/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_signed_div.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), DividedBy, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_div/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_div/validated.ref index c837617c..a981bc48 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_div/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_div/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), DividedBy, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_minus/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_minus/syntax.ref index 068120d9..f9275d95 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_minus/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_minus/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_signed_minus.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Minus, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_minus/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_minus/validated.ref index b477d576..e814f46f 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_minus/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_minus/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Minus, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_mul/syntax.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_mul/syntax.ref index 423807dc..20ea624e 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_mul/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_mul/syntax.ref @@ -7,37 +7,29 @@ Tokens(dada_tests/interpret/ops/op_unsigned_and_signed_mul.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Await( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(3), + None( + Expr(3)( Op( - ( - Expr(1), + Expr(1)( Integer( "22", ), ), Times, - ( - Expr(2), + Expr(2)( Integer( "44", ), diff --git a/dada_tests/interpret/ops/op_unsigned_and_signed_mul/validated.ref b/dada_tests/interpret/ops/op_unsigned_and_signed_mul/validated.ref index 105802da..06d97209 100644 --- a/dada_tests/interpret/ops/op_unsigned_and_signed_mul/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_and_signed_mul/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,44 +22,26 @@ Op( Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), Times, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_int_add_overflow/syntax.ref b/dada_tests/interpret/ops/op_unsigned_int_add_overflow/syntax.ref index 932fdf7a..4810e07b 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_add_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_add_overflow/syntax.ref @@ -7,37 +7,33 @@ Tokens(dada_tests/interpret/ops/op_unsigned_int_add_overflow.dada:1:12:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "uint_max", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "uint_max", + ty: None, + }, + Expr(0)( Integer( "18446744073709551615_", ), ), ), ), - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Id( "uint_max", ), ), Plus, - ( - Expr(3), + Expr(3)( Integer( "1_", ), diff --git a/dada_tests/interpret/ops/op_unsigned_int_add_overflow/validated.ref b/dada_tests/interpret/ops/op_unsigned_int_add_overflow/validated.ref index 610cdd5b..00c61450 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_add_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_add_overflow/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 18446744073709551615, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( uint_max{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(6)( Op( @@ -62,36 +41,21 @@ Give( Place(1)( uint_max{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Plus, Expr(5)( 1, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_int_div_zero/syntax.ref b/dada_tests/interpret/ops/op_unsigned_int_div_zero/syntax.ref index 439f8357..1eef2096 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_div_zero/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_div_zero/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unsigned_int_div_zero.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), DividedBy, - ( - Expr(1), + Expr(1)( Integer( "0_", ), diff --git a/dada_tests/interpret/ops/op_unsigned_int_div_zero/validated.ref b/dada_tests/interpret/ops/op_unsigned_int_div_zero/validated.ref index 280b00df..e5c57f6c 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_div_zero/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_div_zero/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), DividedBy, Expr(1)( 0, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/syntax.ref b/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/syntax.ref index 1df972a7..a02bbada 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/syntax.ref @@ -7,37 +7,33 @@ Tokens(dada_tests/interpret/ops/op_unsigned_int_mul_overflow.dada:1:12:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "uint_max", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "uint_max", + ty: None, + }, + Expr(0)( Integer( "18446744073709551615_", ), ), ), ), - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Id( "uint_max", ), ), Times, - ( - Expr(3), + Expr(3)( Integer( "2_", ), diff --git a/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/validated.ref b/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/validated.ref index d9063d73..47dfd4aa 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_mul_overflow/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 18446744073709551615, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( uint_max{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(6)( Op( @@ -62,36 +41,21 @@ Give( Place(1)( uint_max{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Times, Expr(5)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/syntax.ref b/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/syntax.ref index e3820d19..1d57e0db 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/syntax.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/syntax.ref @@ -7,22 +7,18 @@ Tokens(dada_tests/interpret/ops/op_unsigned_int_sub_overflow.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "0_", ), ), Minus, - ( - Expr(1), + Expr(1)( Integer( "1_", ), diff --git a/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/validated.ref b/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/validated.ref index ae498c79..a1d1245c 100644 --- a/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/validated.ref +++ b/dada_tests/interpret/ops/op_unsigned_int_sub_overflow/validated.ref @@ -6,30 +6,18 @@ Op( Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Minus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_float/syntax.ref b/dada_tests/interpret/ops/ops_float/syntax.ref index bd504de8..d3945ab9 100644 --- a/dada_tests/interpret/ops/ops_float/syntax.ref +++ b/dada_tests/interpret/ops/ops_float/syntax.ref @@ -7,29 +7,23 @@ Tokens(dada_tests/interpret/ops/ops_float.dada:1:18:79:1), ), data: syntax::Tree { - root_expr: ( - Expr(170), + root_expr: Expr(170)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Float( "1", "0", ), ), Plus, - ( - Expr(1), + Expr(1)( Float( "1", "0", @@ -38,8 +32,7 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Float( "2", "0", @@ -47,27 +40,21 @@ ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1.0 + 1.0 == 2.0", ), @@ -84,25 +71,20 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Float( "1", "0", ), ), Minus, - ( - Expr(12), + Expr(12)( Float( "1", "0", @@ -111,8 +93,7 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Float( "0", "0", @@ -120,27 +101,21 @@ ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1.0 - 1.0 == 0.0", ), @@ -157,25 +132,20 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Float( "10", "0", ), ), Times, - ( - Expr(23), + Expr(23)( Float( "10", "0", @@ -184,8 +154,7 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Float( "100", "0", @@ -193,27 +162,21 @@ ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "10.0 * 10.0 == 100.0", ), @@ -230,25 +193,20 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Float( "10", "0", ), ), DividedBy, - ( - Expr(34), + Expr(34)( Float( "5", "0", @@ -257,8 +215,7 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Float( "2", "0", @@ -266,27 +223,21 @@ ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "10.0 / 5.0 == 2.0", ), @@ -303,26 +254,24 @@ None, ), ), - ( - Expr(47), + Expr(47)( Var( - ( - "inf1", - None, - ), - ( - Expr(46), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "inf1", + ty: None, + }, + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Float( "1", "0", ), ), DividedBy, - ( - Expr(45), + Expr(45)( Float( "0", "0", @@ -332,26 +281,24 @@ ), ), ), - ( - Expr(51), + Expr(51)( Var( - ( - "inf2", - None, - ), - ( - Expr(50), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "inf2", + ty: None, + }, + Expr(50)( Op( - ( - Expr(48), + Expr(48)( Float( "2", "0", ), ), DividedBy, - ( - Expr(49), + Expr(49)( Float( "0", "0", @@ -361,48 +308,38 @@ ), ), ), - ( - Expr(60), + Expr(60)( If( - ( - Expr(54), + Expr(54)( Op( - ( - Expr(52), + Expr(52)( Id( "inf1", ), ), EqualEqual, - ( - Expr(53), + Expr(53)( Id( "inf2", ), ), ), ), - ( - Expr(59), + Expr(59)( Seq( [ - ( - Expr(58), + Expr(58)( Await( - ( - Expr(57), + Expr(57)( Call( - ( - Expr(55), + Expr(55)( Id( "print", ), ), [ - ( - None, - ( - Expr(56), + None( + Expr(56)( String( "inf1 == inf2", ), @@ -419,26 +356,24 @@ None, ), ), - ( - Expr(64), + Expr(64)( Var( - ( - "negone", - None, - ), - ( - Expr(63), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "negone", + ty: None, + }, + Expr(63)( Op( - ( - Expr(61), + Expr(61)( Float( "0", "0", ), ), Minus, - ( - Expr(62), + Expr(62)( Float( "1", "0", @@ -448,26 +383,24 @@ ), ), ), - ( - Expr(68), + Expr(68)( Var( - ( - "negtwo", - None, - ), - ( - Expr(67), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "negtwo", + ty: None, + }, + Expr(67)( Op( - ( - Expr(65), + Expr(65)( Float( "0", "0", ), ), Minus, - ( - Expr(66), + Expr(66)( Float( "2", "0", @@ -477,25 +410,23 @@ ), ), ), - ( - Expr(72), + Expr(72)( Var( - ( - "neginf1", - None, - ), - ( - Expr(71), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "neginf1", + ty: None, + }, + Expr(71)( Op( - ( - Expr(69), + Expr(69)( Id( "negone", ), ), DividedBy, - ( - Expr(70), + Expr(70)( Float( "0", "0", @@ -505,25 +436,23 @@ ), ), ), - ( - Expr(76), + Expr(76)( Var( - ( - "neginf2", - None, - ), - ( - Expr(75), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "neginf2", + ty: None, + }, + Expr(75)( Op( - ( - Expr(73), + Expr(73)( Id( "negtwo", ), ), DividedBy, - ( - Expr(74), + Expr(74)( Float( "0", "0", @@ -533,48 +462,38 @@ ), ), ), - ( - Expr(85), + Expr(85)( If( - ( - Expr(79), + Expr(79)( Op( - ( - Expr(77), + Expr(77)( Id( "neginf1", ), ), EqualEqual, - ( - Expr(78), + Expr(78)( Id( "neginf2", ), ), ), ), - ( - Expr(84), + Expr(84)( Seq( [ - ( - Expr(83), + Expr(83)( Await( - ( - Expr(82), + Expr(82)( Call( - ( - Expr(80), + Expr(80)( Id( "print", ), ), [ - ( - None, - ( - Expr(81), + None( + Expr(81)( String( "neginf1 == neginf2", ), @@ -591,26 +510,24 @@ None, ), ), - ( - Expr(89), + Expr(89)( Var( - ( - "negneginf", - None, - ), - ( - Expr(88), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "negneginf", + ty: None, + }, + Expr(88)( Op( - ( - Expr(86), + Expr(86)( Float( "0", "0", ), ), Minus, - ( - Expr(87), + Expr(87)( Id( "neginf1", ), @@ -619,48 +536,38 @@ ), ), ), - ( - Expr(98), + Expr(98)( If( - ( - Expr(92), + Expr(92)( Op( - ( - Expr(90), + Expr(90)( Id( "inf1", ), ), EqualEqual, - ( - Expr(91), + Expr(91)( Id( "negneginf", ), ), ), ), - ( - Expr(97), + Expr(97)( Seq( [ - ( - Expr(96), + Expr(96)( Await( - ( - Expr(95), + Expr(95)( Call( - ( - Expr(93), + Expr(93)( Id( "print", ), ), [ - ( - None, - ( - Expr(94), + None( + Expr(94)( String( "inf1 == negneginf", ), @@ -677,26 +584,24 @@ None, ), ), - ( - Expr(102), + Expr(102)( Var( - ( - "nan1", - None, - ), - ( - Expr(101), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "nan1", + ty: None, + }, + Expr(101)( Op( - ( - Expr(99), + Expr(99)( Float( "0", "0", ), ), DividedBy, - ( - Expr(100), + Expr(100)( Float( "0", "0", @@ -706,26 +611,24 @@ ), ), ), - ( - Expr(106), + Expr(106)( Var( - ( - "nan2", - None, - ), - ( - Expr(105), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "nan2", + ty: None, + }, + Expr(105)( Op( - ( - Expr(103), + Expr(103)( Float( "0", "0", ), ), DividedBy, - ( - Expr(104), + Expr(104)( Float( "0", "0", @@ -735,48 +638,38 @@ ), ), ), - ( - Expr(115), + Expr(115)( If( - ( - Expr(109), + Expr(109)( Op( - ( - Expr(107), + Expr(107)( Id( "nan1", ), ), EqualEqual, - ( - Expr(108), + Expr(108)( Id( "nan2", ), ), ), ), - ( - Expr(114), + Expr(114)( Seq( [ - ( - Expr(113), + Expr(113)( Await( - ( - Expr(112), + Expr(112)( Call( - ( - Expr(110), + Expr(110)( Id( "print", ), ), [ - ( - None, - ( - Expr(111), + None( + Expr(111)( String( "error", ), @@ -793,22 +686,18 @@ None, ), ), - ( - Expr(124), + Expr(124)( If( - ( - Expr(118), + Expr(118)( Op( - ( - Expr(116), + Expr(116)( Float( "1", "0", ), ), LessThan, - ( - Expr(117), + Expr(117)( Float( "2", "0", @@ -816,27 +705,21 @@ ), ), ), - ( - Expr(123), + Expr(123)( Seq( [ - ( - Expr(122), + Expr(122)( Await( - ( - Expr(121), + Expr(121)( Call( - ( - Expr(119), + Expr(119)( Id( "print", ), ), [ - ( - None, - ( - Expr(120), + None( + Expr(120)( String( "1.0 < 2.0", ), @@ -853,22 +736,18 @@ None, ), ), - ( - Expr(133), + Expr(133)( If( - ( - Expr(127), + Expr(127)( Op( - ( - Expr(125), + Expr(125)( Float( "2", "0", ), ), LessThan, - ( - Expr(126), + Expr(126)( Float( "1", "0", @@ -876,27 +755,21 @@ ), ), ), - ( - Expr(132), + Expr(132)( Seq( [ - ( - Expr(131), + Expr(131)( Await( - ( - Expr(130), + Expr(130)( Call( - ( - Expr(128), + Expr(128)( Id( "print", ), ), [ - ( - None, - ( - Expr(129), + None( + Expr(129)( String( "error", ), @@ -913,22 +786,18 @@ None, ), ), - ( - Expr(142), + Expr(142)( If( - ( - Expr(136), + Expr(136)( Op( - ( - Expr(134), + Expr(134)( Float( "1", "0", ), ), LessThan, - ( - Expr(135), + Expr(135)( Float( "1", "0", @@ -936,27 +805,21 @@ ), ), ), - ( - Expr(141), + Expr(141)( Seq( [ - ( - Expr(140), + Expr(140)( Await( - ( - Expr(139), + Expr(139)( Call( - ( - Expr(137), + Expr(137)( Id( "print", ), ), [ - ( - None, - ( - Expr(138), + None( + Expr(138)( String( "error", ), @@ -973,22 +836,18 @@ None, ), ), - ( - Expr(151), + Expr(151)( If( - ( - Expr(145), + Expr(145)( Op( - ( - Expr(143), + Expr(143)( Float( "1", "0", ), ), GreaterThan, - ( - Expr(144), + Expr(144)( Float( "2", "0", @@ -996,27 +855,21 @@ ), ), ), - ( - Expr(150), + Expr(150)( Seq( [ - ( - Expr(149), + Expr(149)( Await( - ( - Expr(148), + Expr(148)( Call( - ( - Expr(146), + Expr(146)( Id( "print", ), ), [ - ( - None, - ( - Expr(147), + None( + Expr(147)( String( "error", ), @@ -1033,22 +886,18 @@ None, ), ), - ( - Expr(160), + Expr(160)( If( - ( - Expr(154), + Expr(154)( Op( - ( - Expr(152), + Expr(152)( Float( "2", "0", ), ), GreaterThan, - ( - Expr(153), + Expr(153)( Float( "1", "0", @@ -1056,27 +905,21 @@ ), ), ), - ( - Expr(159), + Expr(159)( Seq( [ - ( - Expr(158), + Expr(158)( Await( - ( - Expr(157), + Expr(157)( Call( - ( - Expr(155), + Expr(155)( Id( "print", ), ), [ - ( - None, - ( - Expr(156), + None( + Expr(156)( String( "2.0 > 1.0", ), @@ -1093,22 +936,18 @@ None, ), ), - ( - Expr(169), + Expr(169)( If( - ( - Expr(163), + Expr(163)( Op( - ( - Expr(161), + Expr(161)( Float( "1", "0", ), ), GreaterThan, - ( - Expr(162), + Expr(162)( Float( "1", "0", @@ -1116,27 +955,21 @@ ), ), ), - ( - Expr(168), + Expr(168)( Seq( [ - ( - Expr(167), + Expr(167)( Await( - ( - Expr(166), + Expr(166)( Call( - ( - Expr(164), + Expr(164)( Id( "print", ), ), [ - ( - None, - ( - Expr(165), + None( + Expr(165)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_float/validated.ref b/dada_tests/interpret/ops/ops_float/validated.ref index d09ba4a6..d150605d 100644 --- a/dada_tests/interpret/ops/ops_float/validated.ref +++ b/dada_tests/interpret/ops/ops_float/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1.0 + 1.0 == 2.0", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Minus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 0, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1.0 - 1.0 == 0.0", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 10, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Times, Expr(25)( 10, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 100, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "10.0 * 10.0 == 100.0", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 10, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), DividedBy, Expr(37)( 5, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 2, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "10.0 / 5.0 == 2.0", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(53)( Seq( @@ -437,68 +281,41 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(46), - synthesized: true, - }, + synthesized from Expr(46), ), Expr(50)( Op( Expr(48)( 1, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), DividedBy, Expr(49)( 0, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: true, - }, + synthesized from Expr(46), ), Expr(52)( AssignFromPlace( TargetPlace(0)( inf1{0}, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: true, - }, + synthesized from Expr(47), ), Place(4)( temp{1}, - ExprOrigin { - syntax_expr: Expr(46), - synthesized: true, - }, + synthesized from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ], ), - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + synthesized from Expr(47), ), Expr(59)( Seq( @@ -507,68 +324,41 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(50), - synthesized: true, - }, + synthesized from Expr(50), ), Expr(56)( Op( Expr(54)( 2, - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), DividedBy, Expr(55)( 0, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: true, - }, + synthesized from Expr(50), ), Expr(58)( AssignFromPlace( TargetPlace(2)( inf2{2}, - ExprOrigin { - syntax_expr: Expr(51), - synthesized: true, - }, + synthesized from Expr(51), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(50), - synthesized: true, - }, + synthesized from Expr(50), ), ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + synthesized from Expr(51), ), Expr(69)( If( @@ -578,38 +368,23 @@ Give( Place(6)( inf1{0}, - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + synthesized from Expr(52), ), EqualEqual, Expr(61)( Give( Place(7)( inf2{2}, - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + synthesized from Expr(53), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(67)( Seq( @@ -622,60 +397,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), ), - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + synthesized from Expr(55), ), [ NamedExpr( None, Expr(64)( "inf1 == inf2", - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), ), - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ], ), - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), Expr(68)( Tuple, - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), Expr(75)( Seq( @@ -684,68 +435,41 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: true, - }, + synthesized from Expr(63), ), Expr(72)( Op( Expr(70)( 0, - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), Minus, Expr(71)( 1, - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: true, - }, + synthesized from Expr(63), ), Expr(74)( AssignFromPlace( TargetPlace(4)( negone{4}, - ExprOrigin { - syntax_expr: Expr(64), - synthesized: true, - }, + synthesized from Expr(64), ), Place(9)( temp{5}, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: true, - }, + synthesized from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), ], ), - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + synthesized from Expr(64), ), Expr(81)( Seq( @@ -754,68 +478,41 @@ Assign( TargetPlace(7)( temp{7}, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: true, - }, + synthesized from Expr(67), ), Expr(78)( Op( Expr(76)( 0, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), Minus, Expr(77)( 2, - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: true, - }, + synthesized from Expr(67), ), Expr(80)( AssignFromPlace( TargetPlace(6)( negtwo{6}, - ExprOrigin { - syntax_expr: Expr(68), - synthesized: true, - }, + synthesized from Expr(68), ), Place(10)( temp{7}, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: true, - }, + synthesized from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), ], ), - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + synthesized from Expr(68), ), Expr(87)( Seq( @@ -824,10 +521,7 @@ Assign( TargetPlace(9)( temp{9}, - ExprOrigin { - syntax_expr: Expr(71), - synthesized: true, - }, + synthesized from Expr(71), ), Expr(84)( Op( @@ -835,65 +529,38 @@ Give( Place(11)( negone{4}, - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + synthesized from Expr(69), ), DividedBy, Expr(83)( 0, - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: true, - }, + synthesized from Expr(71), ), Expr(86)( AssignFromPlace( TargetPlace(8)( neginf1{8}, - ExprOrigin { - syntax_expr: Expr(72), - synthesized: true, - }, + synthesized from Expr(72), ), Place(12)( temp{9}, - ExprOrigin { - syntax_expr: Expr(71), - synthesized: true, - }, + synthesized from Expr(71), ), ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ], ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + synthesized from Expr(72), ), Expr(93)( Seq( @@ -902,10 +569,7 @@ Assign( TargetPlace(11)( temp{11}, - ExprOrigin { - syntax_expr: Expr(75), - synthesized: true, - }, + synthesized from Expr(75), ), Expr(90)( Op( @@ -913,65 +577,38 @@ Give( Place(13)( negtwo{6}, - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), ), - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + synthesized from Expr(73), ), DividedBy, Expr(89)( 0, - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: true, - }, + synthesized from Expr(75), ), Expr(92)( AssignFromPlace( TargetPlace(10)( neginf2{10}, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: true, - }, + synthesized from Expr(76), ), Place(14)( temp{11}, - ExprOrigin { - syntax_expr: Expr(75), - synthesized: true, - }, + synthesized from Expr(75), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ], ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + synthesized from Expr(76), ), Expr(103)( If( @@ -981,38 +618,23 @@ Give( Place(15)( neginf1{8}, - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), ), - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + synthesized from Expr(77), ), EqualEqual, Expr(95)( Give( Place(16)( neginf2{10}, - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + synthesized from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), Expr(101)( Seq( @@ -1025,60 +647,36 @@ Reserve( Place(17)( Print, - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), ), - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + synthesized from Expr(80), ), [ NamedExpr( None, Expr(98)( "neginf1 == neginf2", - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), ), - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ], ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), Expr(102)( Tuple, - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), Expr(109)( Seq( @@ -1087,76 +685,46 @@ Assign( TargetPlace(13)( temp{13}, - ExprOrigin { - syntax_expr: Expr(88), - synthesized: true, - }, + synthesized from Expr(88), ), Expr(106)( Op( Expr(104)( 0, - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), Minus, Expr(105)( Give( Place(18)( neginf1{8}, - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + synthesized from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: true, - }, + synthesized from Expr(88), ), Expr(108)( AssignFromPlace( TargetPlace(12)( negneginf{12}, - ExprOrigin { - syntax_expr: Expr(89), - synthesized: true, - }, + synthesized from Expr(89), ), Place(19)( temp{13}, - ExprOrigin { - syntax_expr: Expr(88), - synthesized: true, - }, + synthesized from Expr(88), ), ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), ], ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + synthesized from Expr(89), ), Expr(119)( If( @@ -1166,38 +734,23 @@ Give( Place(20)( inf1{0}, - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + synthesized from Expr(90), ), EqualEqual, Expr(111)( Give( Place(21)( negneginf{12}, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), ), - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + synthesized from Expr(91), ), ), - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), Expr(117)( Seq( @@ -1210,60 +763,36 @@ Reserve( Place(22)( Print, - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + synthesized from Expr(93), ), [ NamedExpr( None, Expr(114)( "inf1 == negneginf", - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ], ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(125)( Seq( @@ -1272,68 +801,41 @@ Assign( TargetPlace(15)( temp{15}, - ExprOrigin { - syntax_expr: Expr(101), - synthesized: true, - }, + synthesized from Expr(101), ), Expr(122)( Op( Expr(120)( 0, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), DividedBy, Expr(121)( 0, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), ), - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), ), - ExprOrigin { - syntax_expr: Expr(101), - synthesized: true, - }, + synthesized from Expr(101), ), Expr(124)( AssignFromPlace( TargetPlace(14)( nan1{14}, - ExprOrigin { - syntax_expr: Expr(102), - synthesized: true, - }, + synthesized from Expr(102), ), Place(23)( temp{15}, - ExprOrigin { - syntax_expr: Expr(101), - synthesized: true, - }, + synthesized from Expr(101), ), ), - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), ], ), - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + synthesized from Expr(102), ), Expr(131)( Seq( @@ -1342,68 +844,41 @@ Assign( TargetPlace(17)( temp{17}, - ExprOrigin { - syntax_expr: Expr(105), - synthesized: true, - }, + synthesized from Expr(105), ), Expr(128)( Op( Expr(126)( 0, - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), DividedBy, Expr(127)( 0, - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), - ExprOrigin { - syntax_expr: Expr(105), - synthesized: true, - }, + synthesized from Expr(105), ), Expr(130)( AssignFromPlace( TargetPlace(16)( nan2{16}, - ExprOrigin { - syntax_expr: Expr(106), - synthesized: true, - }, + synthesized from Expr(106), ), Place(24)( temp{17}, - ExprOrigin { - syntax_expr: Expr(105), - synthesized: true, - }, + synthesized from Expr(105), ), ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ], ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + synthesized from Expr(106), ), Expr(141)( If( @@ -1413,38 +888,23 @@ Give( Place(25)( nan1{14}, - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + synthesized from Expr(107), ), EqualEqual, Expr(133)( Give( Place(26)( nan2{16}, - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + synthesized from Expr(108), ), ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), Expr(139)( Seq( @@ -1457,60 +917,36 @@ Reserve( Place(27)( Print, - ExprOrigin { - syntax_expr: Expr(110), - synthesized: false, - }, + from Expr(110), ), ), - ExprOrigin { - syntax_expr: Expr(110), - synthesized: false, - }, + synthesized from Expr(110), ), [ NamedExpr( None, Expr(136)( "error", - ExprOrigin { - syntax_expr: Expr(111), - synthesized: false, - }, + from Expr(111), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(112), - synthesized: false, - }, + from Expr(112), ), ), - ExprOrigin { - syntax_expr: Expr(113), - synthesized: false, - }, + from Expr(113), ), ], ), - ExprOrigin { - syntax_expr: Expr(114), - synthesized: false, - }, + from Expr(114), ), Expr(140)( Tuple, - ExprOrigin { - syntax_expr: Expr(115), - synthesized: false, - }, + from Expr(115), ), ), - ExprOrigin { - syntax_expr: Expr(115), - synthesized: false, - }, + from Expr(115), ), Expr(151)( If( @@ -1518,24 +954,15 @@ Op( Expr(142)( 1, - ExprOrigin { - syntax_expr: Expr(116), - synthesized: false, - }, + from Expr(116), ), LessThan, Expr(143)( 2, - ExprOrigin { - syntax_expr: Expr(117), - synthesized: false, - }, + from Expr(117), ), ), - ExprOrigin { - syntax_expr: Expr(118), - synthesized: false, - }, + from Expr(118), ), Expr(149)( Seq( @@ -1548,60 +975,36 @@ Reserve( Place(28)( Print, - ExprOrigin { - syntax_expr: Expr(119), - synthesized: false, - }, + from Expr(119), ), ), - ExprOrigin { - syntax_expr: Expr(119), - synthesized: false, - }, + synthesized from Expr(119), ), [ NamedExpr( None, Expr(146)( "1.0 < 2.0", - ExprOrigin { - syntax_expr: Expr(120), - synthesized: false, - }, + from Expr(120), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(121), - synthesized: false, - }, + from Expr(121), ), ), - ExprOrigin { - syntax_expr: Expr(122), - synthesized: false, - }, + from Expr(122), ), ], ), - ExprOrigin { - syntax_expr: Expr(123), - synthesized: false, - }, + from Expr(123), ), Expr(150)( Tuple, - ExprOrigin { - syntax_expr: Expr(124), - synthesized: false, - }, + from Expr(124), ), ), - ExprOrigin { - syntax_expr: Expr(124), - synthesized: false, - }, + from Expr(124), ), Expr(161)( If( @@ -1609,24 +1012,15 @@ Op( Expr(152)( 2, - ExprOrigin { - syntax_expr: Expr(125), - synthesized: false, - }, + from Expr(125), ), LessThan, Expr(153)( 1, - ExprOrigin { - syntax_expr: Expr(126), - synthesized: false, - }, + from Expr(126), ), ), - ExprOrigin { - syntax_expr: Expr(127), - synthesized: false, - }, + from Expr(127), ), Expr(159)( Seq( @@ -1639,60 +1033,36 @@ Reserve( Place(29)( Print, - ExprOrigin { - syntax_expr: Expr(128), - synthesized: false, - }, + from Expr(128), ), ), - ExprOrigin { - syntax_expr: Expr(128), - synthesized: false, - }, + synthesized from Expr(128), ), [ NamedExpr( None, Expr(156)( "error", - ExprOrigin { - syntax_expr: Expr(129), - synthesized: false, - }, + from Expr(129), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(130), - synthesized: false, - }, + from Expr(130), ), ), - ExprOrigin { - syntax_expr: Expr(131), - synthesized: false, - }, + from Expr(131), ), ], ), - ExprOrigin { - syntax_expr: Expr(132), - synthesized: false, - }, + from Expr(132), ), Expr(160)( Tuple, - ExprOrigin { - syntax_expr: Expr(133), - synthesized: false, - }, + from Expr(133), ), ), - ExprOrigin { - syntax_expr: Expr(133), - synthesized: false, - }, + from Expr(133), ), Expr(171)( If( @@ -1700,24 +1070,15 @@ Op( Expr(162)( 1, - ExprOrigin { - syntax_expr: Expr(134), - synthesized: false, - }, + from Expr(134), ), LessThan, Expr(163)( 1, - ExprOrigin { - syntax_expr: Expr(135), - synthesized: false, - }, + from Expr(135), ), ), - ExprOrigin { - syntax_expr: Expr(136), - synthesized: false, - }, + from Expr(136), ), Expr(169)( Seq( @@ -1730,60 +1091,36 @@ Reserve( Place(30)( Print, - ExprOrigin { - syntax_expr: Expr(137), - synthesized: false, - }, + from Expr(137), ), ), - ExprOrigin { - syntax_expr: Expr(137), - synthesized: false, - }, + synthesized from Expr(137), ), [ NamedExpr( None, Expr(166)( "error", - ExprOrigin { - syntax_expr: Expr(138), - synthesized: false, - }, + from Expr(138), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(139), - synthesized: false, - }, + from Expr(139), ), ), - ExprOrigin { - syntax_expr: Expr(140), - synthesized: false, - }, + from Expr(140), ), ], ), - ExprOrigin { - syntax_expr: Expr(141), - synthesized: false, - }, + from Expr(141), ), Expr(170)( Tuple, - ExprOrigin { - syntax_expr: Expr(142), - synthesized: false, - }, + from Expr(142), ), ), - ExprOrigin { - syntax_expr: Expr(142), - synthesized: false, - }, + from Expr(142), ), Expr(181)( If( @@ -1791,24 +1128,15 @@ Op( Expr(172)( 1, - ExprOrigin { - syntax_expr: Expr(143), - synthesized: false, - }, + from Expr(143), ), GreaterThan, Expr(173)( 2, - ExprOrigin { - syntax_expr: Expr(144), - synthesized: false, - }, + from Expr(144), ), ), - ExprOrigin { - syntax_expr: Expr(145), - synthesized: false, - }, + from Expr(145), ), Expr(179)( Seq( @@ -1821,60 +1149,36 @@ Reserve( Place(31)( Print, - ExprOrigin { - syntax_expr: Expr(146), - synthesized: false, - }, + from Expr(146), ), ), - ExprOrigin { - syntax_expr: Expr(146), - synthesized: false, - }, + synthesized from Expr(146), ), [ NamedExpr( None, Expr(176)( "error", - ExprOrigin { - syntax_expr: Expr(147), - synthesized: false, - }, + from Expr(147), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(148), - synthesized: false, - }, + from Expr(148), ), ), - ExprOrigin { - syntax_expr: Expr(149), - synthesized: false, - }, + from Expr(149), ), ], ), - ExprOrigin { - syntax_expr: Expr(150), - synthesized: false, - }, + from Expr(150), ), Expr(180)( Tuple, - ExprOrigin { - syntax_expr: Expr(151), - synthesized: false, - }, + from Expr(151), ), ), - ExprOrigin { - syntax_expr: Expr(151), - synthesized: false, - }, + from Expr(151), ), Expr(191)( If( @@ -1882,24 +1186,15 @@ Op( Expr(182)( 2, - ExprOrigin { - syntax_expr: Expr(152), - synthesized: false, - }, + from Expr(152), ), GreaterThan, Expr(183)( 1, - ExprOrigin { - syntax_expr: Expr(153), - synthesized: false, - }, + from Expr(153), ), ), - ExprOrigin { - syntax_expr: Expr(154), - synthesized: false, - }, + from Expr(154), ), Expr(189)( Seq( @@ -1912,60 +1207,36 @@ Reserve( Place(32)( Print, - ExprOrigin { - syntax_expr: Expr(155), - synthesized: false, - }, + from Expr(155), ), ), - ExprOrigin { - syntax_expr: Expr(155), - synthesized: false, - }, + synthesized from Expr(155), ), [ NamedExpr( None, Expr(186)( "2.0 > 1.0", - ExprOrigin { - syntax_expr: Expr(156), - synthesized: false, - }, + from Expr(156), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(157), - synthesized: false, - }, + from Expr(157), ), ), - ExprOrigin { - syntax_expr: Expr(158), - synthesized: false, - }, + from Expr(158), ), ], ), - ExprOrigin { - syntax_expr: Expr(159), - synthesized: false, - }, + from Expr(159), ), Expr(190)( Tuple, - ExprOrigin { - syntax_expr: Expr(160), - synthesized: false, - }, + from Expr(160), ), ), - ExprOrigin { - syntax_expr: Expr(160), - synthesized: false, - }, + from Expr(160), ), Expr(201)( If( @@ -1973,24 +1244,15 @@ Op( Expr(192)( 1, - ExprOrigin { - syntax_expr: Expr(161), - synthesized: false, - }, + from Expr(161), ), GreaterThan, Expr(193)( 1, - ExprOrigin { - syntax_expr: Expr(162), - synthesized: false, - }, + from Expr(162), ), ), - ExprOrigin { - syntax_expr: Expr(163), - synthesized: false, - }, + from Expr(163), ), Expr(199)( Seq( @@ -2003,66 +1265,39 @@ Reserve( Place(33)( Print, - ExprOrigin { - syntax_expr: Expr(164), - synthesized: false, - }, + from Expr(164), ), ), - ExprOrigin { - syntax_expr: Expr(164), - synthesized: false, - }, + synthesized from Expr(164), ), [ NamedExpr( None, Expr(196)( "error", - ExprOrigin { - syntax_expr: Expr(165), - synthesized: false, - }, + from Expr(165), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(166), - synthesized: false, - }, + from Expr(166), ), ), - ExprOrigin { - syntax_expr: Expr(167), - synthesized: false, - }, + from Expr(167), ), ], ), - ExprOrigin { - syntax_expr: Expr(168), - synthesized: false, - }, + from Expr(168), ), Expr(200)( Tuple, - ExprOrigin { - syntax_expr: Expr(169), - synthesized: false, - }, + from Expr(169), ), ), - ExprOrigin { - syntax_expr: Expr(169), - synthesized: false, - }, + from Expr(169), ), ], ), - ExprOrigin { - syntax_expr: Expr(170), - synthesized: false, - }, + from Expr(170), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_int/syntax.ref b/dada_tests/interpret/ops/ops_int/syntax.ref index 5b7a08f2..722cf8b4 100644 --- a/dada_tests/interpret/ops/ops_int/syntax.ref +++ b/dada_tests/interpret/ops/ops_int/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/interpret/ops/ops_int.dada:1:18:53:1), ), data: syntax::Tree { - root_expr: ( - Expr(109), + root_expr: Expr(109)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1", ), @@ -36,35 +30,28 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Integer( "2", ), ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1 + 1 == 2", ), @@ -81,24 +68,19 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Integer( "1", ), ), Minus, - ( - Expr(12), + Expr(12)( Integer( "1", ), @@ -106,35 +88,28 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Integer( "0", ), ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1 - 1 == 0", ), @@ -151,24 +126,19 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Integer( "10", ), ), Times, - ( - Expr(23), + Expr(23)( Integer( "10", ), @@ -176,35 +146,28 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Integer( "100", ), ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "10 * 10 == 100", ), @@ -221,24 +184,19 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Integer( "10", ), ), DividedBy, - ( - Expr(34), + Expr(34)( Integer( "5", ), @@ -246,35 +204,28 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Integer( "2", ), ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "10 / 5 == 2", ), @@ -291,24 +242,19 @@ None, ), ), - ( - Expr(54), + Expr(54)( If( - ( - Expr(48), + Expr(48)( Op( - ( - Expr(46), + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Integer( "11", ), ), DividedBy, - ( - Expr(45), + Expr(45)( Integer( "5", ), @@ -316,35 +262,28 @@ ), ), EqualEqual, - ( - Expr(47), + Expr(47)( Integer( "2", ), ), ), ), - ( - Expr(53), + Expr(53)( Seq( [ - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(49), + Expr(49)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( String( "11 / 5 == 2", ), @@ -361,48 +300,38 @@ None, ), ), - ( - Expr(63), + Expr(63)( If( - ( - Expr(57), + Expr(57)( Op( - ( - Expr(55), + Expr(55)( Integer( "1", ), ), LessThan, - ( - Expr(56), + Expr(56)( Integer( "2", ), ), ), ), - ( - Expr(62), + Expr(62)( Seq( [ - ( - Expr(61), + Expr(61)( Await( - ( - Expr(60), + Expr(60)( Call( - ( - Expr(58), + Expr(58)( Id( "print", ), ), [ - ( - None, - ( - Expr(59), + None( + Expr(59)( String( "1 < 2", ), @@ -419,48 +348,38 @@ None, ), ), - ( - Expr(72), + Expr(72)( If( - ( - Expr(66), + Expr(66)( Op( - ( - Expr(64), + Expr(64)( Integer( "2", ), ), LessThan, - ( - Expr(65), + Expr(65)( Integer( "1", ), ), ), ), - ( - Expr(71), + Expr(71)( Seq( [ - ( - Expr(70), + Expr(70)( Await( - ( - Expr(69), + Expr(69)( Call( - ( - Expr(67), + Expr(67)( Id( "print", ), ), [ - ( - None, - ( - Expr(68), + None( + Expr(68)( String( "error", ), @@ -477,48 +396,38 @@ None, ), ), - ( - Expr(81), + Expr(81)( If( - ( - Expr(75), + Expr(75)( Op( - ( - Expr(73), + Expr(73)( Integer( "1", ), ), LessThan, - ( - Expr(74), + Expr(74)( Integer( "1", ), ), ), ), - ( - Expr(80), + Expr(80)( Seq( [ - ( - Expr(79), + Expr(79)( Await( - ( - Expr(78), + Expr(78)( Call( - ( - Expr(76), + Expr(76)( Id( "print", ), ), [ - ( - None, - ( - Expr(77), + None( + Expr(77)( String( "error", ), @@ -535,48 +444,38 @@ None, ), ), - ( - Expr(90), + Expr(90)( If( - ( - Expr(84), + Expr(84)( Op( - ( - Expr(82), + Expr(82)( Integer( "1", ), ), GreaterThan, - ( - Expr(83), + Expr(83)( Integer( "2", ), ), ), ), - ( - Expr(89), + Expr(89)( Seq( [ - ( - Expr(88), + Expr(88)( Await( - ( - Expr(87), + Expr(87)( Call( - ( - Expr(85), + Expr(85)( Id( "print", ), ), [ - ( - None, - ( - Expr(86), + None( + Expr(86)( String( "error", ), @@ -593,48 +492,38 @@ None, ), ), - ( - Expr(99), + Expr(99)( If( - ( - Expr(93), + Expr(93)( Op( - ( - Expr(91), + Expr(91)( Integer( "2", ), ), GreaterThan, - ( - Expr(92), + Expr(92)( Integer( "1", ), ), ), ), - ( - Expr(98), + Expr(98)( Seq( [ - ( - Expr(97), + Expr(97)( Await( - ( - Expr(96), + Expr(96)( Call( - ( - Expr(94), + Expr(94)( Id( "print", ), ), [ - ( - None, - ( - Expr(95), + None( + Expr(95)( String( "2 > 1", ), @@ -651,48 +540,38 @@ None, ), ), - ( - Expr(108), + Expr(108)( If( - ( - Expr(102), + Expr(102)( Op( - ( - Expr(100), + Expr(100)( Integer( "1", ), ), GreaterThan, - ( - Expr(101), + Expr(101)( Integer( "1", ), ), ), ), - ( - Expr(107), + Expr(107)( Seq( [ - ( - Expr(106), + Expr(106)( Await( - ( - Expr(105), + Expr(105)( Call( - ( - Expr(103), + Expr(103)( Id( "print", ), ), [ - ( - None, - ( - Expr(104), + None( + Expr(104)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_int/validated.ref b/dada_tests/interpret/ops/ops_int/validated.ref index 4de8cb3f..168a9ca5 100644 --- a/dada_tests/interpret/ops/ops_int/validated.ref +++ b/dada_tests/interpret/ops/ops_int/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1 + 1 == 2", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Minus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 0, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1 - 1 == 0", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 10, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Times, Expr(25)( 10, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 100, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "10 * 10 == 100", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 10, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), DividedBy, Expr(37)( 5, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 2, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "10 / 5 == 2", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(59)( If( @@ -438,38 +282,23 @@ Op( Expr(48)( 11, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), DividedBy, Expr(49)( 5, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), EqualEqual, Expr(51)( 2, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), Expr(57)( Seq( @@ -482,60 +311,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + synthesized from Expr(49), ), [ NamedExpr( None, Expr(54)( "11 / 5 == 2", - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ], ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(69)( If( @@ -543,24 +348,15 @@ Op( Expr(60)( 1, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), LessThan, Expr(61)( 2, - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), Expr(67)( Seq( @@ -573,60 +369,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + synthesized from Expr(58), ), [ NamedExpr( None, Expr(64)( "1 < 2", - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), ], ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), Expr(68)( Tuple, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), Expr(79)( If( @@ -634,24 +406,15 @@ Op( Expr(70)( 2, - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), LessThan, Expr(71)( 1, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), Expr(77)( Seq( @@ -664,60 +427,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + synthesized from Expr(67), ), [ NamedExpr( None, Expr(74)( "error", - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), ], ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), Expr(78)( Tuple, - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), Expr(89)( If( @@ -725,24 +464,15 @@ Op( Expr(80)( 1, - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), LessThan, Expr(81)( 1, - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), Expr(87)( Seq( @@ -755,60 +485,36 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + synthesized from Expr(76), ), [ NamedExpr( None, Expr(84)( "error", - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), ], ), - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), Expr(88)( Tuple, - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), Expr(99)( If( @@ -816,24 +522,15 @@ Op( Expr(90)( 1, - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), GreaterThan, Expr(91)( 2, - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), Expr(97)( Seq( @@ -846,60 +543,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + synthesized from Expr(85), ), [ NamedExpr( None, Expr(94)( "error", - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), ], ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), Expr(98)( Tuple, - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), Expr(109)( If( @@ -907,24 +580,15 @@ Op( Expr(100)( 2, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), GreaterThan, Expr(101)( 1, - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), Expr(107)( Seq( @@ -937,60 +601,36 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + synthesized from Expr(94), ), [ NamedExpr( None, Expr(104)( "2 > 1", - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), ], ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(108)( Tuple, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), ), - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), Expr(119)( If( @@ -998,24 +638,15 @@ Op( Expr(110)( 1, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), GreaterThan, Expr(111)( 1, - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), ), - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), Expr(117)( Seq( @@ -1028,66 +659,39 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), ), - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + synthesized from Expr(103), ), [ NamedExpr( None, Expr(114)( "error", - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ], ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ], ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/syntax.ref b/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/syntax.ref index cfb1de28..8d19ebb0 100644 --- a/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/syntax.ref +++ b/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed.dada:1:18:104:1), ), data: syntax::Tree { - root_expr: ( - Expr(218), + root_expr: Expr(218)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1", ), @@ -36,35 +30,28 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Integer( "2_", ), ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1_i + 1 == 2_i", ), @@ -81,24 +68,19 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Integer( "1", ), ), Plus, - ( - Expr(12), + Expr(12)( Integer( "1_", ), @@ -106,35 +88,28 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Integer( "2_", ), ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1 + 1_i == 2_i", ), @@ -151,24 +126,19 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Integer( "1_", ), ), Minus, - ( - Expr(23), + Expr(23)( Integer( "1", ), @@ -176,35 +146,28 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Integer( "0_", ), ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "1_i - 1 == 0_i", ), @@ -221,24 +184,19 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Integer( "1", ), ), Minus, - ( - Expr(34), + Expr(34)( Integer( "1_", ), @@ -246,35 +204,28 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Integer( "0_", ), ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "1 - 1_i == 0", ), @@ -291,24 +242,19 @@ None, ), ), - ( - Expr(54), + Expr(54)( If( - ( - Expr(48), + Expr(48)( Op( - ( - Expr(46), + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Integer( "10_", ), ), Times, - ( - Expr(45), + Expr(45)( Integer( "10", ), @@ -316,35 +262,28 @@ ), ), EqualEqual, - ( - Expr(47), + Expr(47)( Integer( "100_", ), ), ), ), - ( - Expr(53), + Expr(53)( Seq( [ - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(49), + Expr(49)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( String( "10_i * 10 == 100_i", ), @@ -361,24 +300,19 @@ None, ), ), - ( - Expr(65), + Expr(65)( If( - ( - Expr(59), + Expr(59)( Op( - ( - Expr(57), + Expr(57)( Op( - ( - Expr(55), + Expr(55)( Integer( "10", ), ), Times, - ( - Expr(56), + Expr(56)( Integer( "10_", ), @@ -386,35 +320,28 @@ ), ), EqualEqual, - ( - Expr(58), + Expr(58)( Integer( "100_", ), ), ), ), - ( - Expr(64), + Expr(64)( Seq( [ - ( - Expr(63), + Expr(63)( Await( - ( - Expr(62), + Expr(62)( Call( - ( - Expr(60), + Expr(60)( Id( "print", ), ), [ - ( - None, - ( - Expr(61), + None( + Expr(61)( String( "10 * 10_i == 100_i", ), @@ -431,24 +358,19 @@ None, ), ), - ( - Expr(76), + Expr(76)( If( - ( - Expr(70), + Expr(70)( Op( - ( - Expr(68), + Expr(68)( Op( - ( - Expr(66), + Expr(66)( Integer( "10_", ), ), DividedBy, - ( - Expr(67), + Expr(67)( Integer( "5", ), @@ -456,35 +378,28 @@ ), ), EqualEqual, - ( - Expr(69), + Expr(69)( Integer( "2_", ), ), ), ), - ( - Expr(75), + Expr(75)( Seq( [ - ( - Expr(74), + Expr(74)( Await( - ( - Expr(73), + Expr(73)( Call( - ( - Expr(71), + Expr(71)( Id( "print", ), ), [ - ( - None, - ( - Expr(72), + None( + Expr(72)( String( "10_i / 5 == 2_i", ), @@ -501,24 +416,19 @@ None, ), ), - ( - Expr(87), + Expr(87)( If( - ( - Expr(81), + Expr(81)( Op( - ( - Expr(79), + Expr(79)( Op( - ( - Expr(77), + Expr(77)( Integer( "10", ), ), DividedBy, - ( - Expr(78), + Expr(78)( Integer( "5_", ), @@ -526,35 +436,28 @@ ), ), EqualEqual, - ( - Expr(80), + Expr(80)( Integer( "2_", ), ), ), ), - ( - Expr(86), + Expr(86)( Seq( [ - ( - Expr(85), + Expr(85)( Await( - ( - Expr(84), + Expr(84)( Call( - ( - Expr(82), + Expr(82)( Id( "print", ), ), [ - ( - None, - ( - Expr(83), + None( + Expr(83)( String( "10 / 5_i == 2_i", ), @@ -571,24 +474,19 @@ None, ), ), - ( - Expr(98), + Expr(98)( If( - ( - Expr(92), + Expr(92)( Op( - ( - Expr(90), + Expr(90)( Op( - ( - Expr(88), + Expr(88)( Integer( "11_", ), ), DividedBy, - ( - Expr(89), + Expr(89)( Integer( "5", ), @@ -596,35 +494,28 @@ ), ), EqualEqual, - ( - Expr(91), + Expr(91)( Integer( "2_", ), ), ), ), - ( - Expr(97), + Expr(97)( Seq( [ - ( - Expr(96), + Expr(96)( Await( - ( - Expr(95), + Expr(95)( Call( - ( - Expr(93), + Expr(93)( Id( "print", ), ), [ - ( - None, - ( - Expr(94), + None( + Expr(94)( String( "11_i / 5 == 2_i", ), @@ -641,24 +532,19 @@ None, ), ), - ( - Expr(109), + Expr(109)( If( - ( - Expr(103), + Expr(103)( Op( - ( - Expr(101), + Expr(101)( Op( - ( - Expr(99), + Expr(99)( Integer( "11", ), ), DividedBy, - ( - Expr(100), + Expr(100)( Integer( "5_", ), @@ -666,35 +552,28 @@ ), ), EqualEqual, - ( - Expr(102), + Expr(102)( Integer( "2_", ), ), ), ), - ( - Expr(108), + Expr(108)( Seq( [ - ( - Expr(107), + Expr(107)( Await( - ( - Expr(106), + Expr(106)( Call( - ( - Expr(104), + Expr(104)( Id( "print", ), ), [ - ( - None, - ( - Expr(105), + None( + Expr(105)( String( "11 / 5_i == 2_i", ), @@ -711,48 +590,38 @@ None, ), ), - ( - Expr(118), + Expr(118)( If( - ( - Expr(112), + Expr(112)( Op( - ( - Expr(110), + Expr(110)( Integer( "1_", ), ), LessThan, - ( - Expr(111), + Expr(111)( Integer( "2", ), ), ), ), - ( - Expr(117), + Expr(117)( Seq( [ - ( - Expr(116), + Expr(116)( Await( - ( - Expr(115), + Expr(115)( Call( - ( - Expr(113), + Expr(113)( Id( "print", ), ), [ - ( - None, - ( - Expr(114), + None( + Expr(114)( String( "1_i < 2", ), @@ -769,48 +638,38 @@ None, ), ), - ( - Expr(127), + Expr(127)( If( - ( - Expr(121), + Expr(121)( Op( - ( - Expr(119), + Expr(119)( Integer( "1", ), ), LessThan, - ( - Expr(120), + Expr(120)( Integer( "2_", ), ), ), ), - ( - Expr(126), + Expr(126)( Seq( [ - ( - Expr(125), + Expr(125)( Await( - ( - Expr(124), + Expr(124)( Call( - ( - Expr(122), + Expr(122)( Id( "print", ), ), [ - ( - None, - ( - Expr(123), + None( + Expr(123)( String( "1 < 2_i", ), @@ -827,48 +686,38 @@ None, ), ), - ( - Expr(136), + Expr(136)( If( - ( - Expr(130), + Expr(130)( Op( - ( - Expr(128), + Expr(128)( Integer( "2_", ), ), LessThan, - ( - Expr(129), + Expr(129)( Integer( "1", ), ), ), ), - ( - Expr(135), + Expr(135)( Seq( [ - ( - Expr(134), + Expr(134)( Await( - ( - Expr(133), + Expr(133)( Call( - ( - Expr(131), + Expr(131)( Id( "print", ), ), [ - ( - None, - ( - Expr(132), + None( + Expr(132)( String( "error", ), @@ -885,48 +734,38 @@ None, ), ), - ( - Expr(145), + Expr(145)( If( - ( - Expr(139), + Expr(139)( Op( - ( - Expr(137), + Expr(137)( Integer( "2", ), ), LessThan, - ( - Expr(138), + Expr(138)( Integer( "1_", ), ), ), ), - ( - Expr(144), + Expr(144)( Seq( [ - ( - Expr(143), + Expr(143)( Await( - ( - Expr(142), + Expr(142)( Call( - ( - Expr(140), + Expr(140)( Id( "print", ), ), [ - ( - None, - ( - Expr(141), + None( + Expr(141)( String( "error", ), @@ -943,48 +782,38 @@ None, ), ), - ( - Expr(154), + Expr(154)( If( - ( - Expr(148), + Expr(148)( Op( - ( - Expr(146), + Expr(146)( Integer( "1_", ), ), LessThan, - ( - Expr(147), + Expr(147)( Integer( "1", ), ), ), ), - ( - Expr(153), + Expr(153)( Seq( [ - ( - Expr(152), + Expr(152)( Await( - ( - Expr(151), + Expr(151)( Call( - ( - Expr(149), + Expr(149)( Id( "print", ), ), [ - ( - None, - ( - Expr(150), + None( + Expr(150)( String( "error", ), @@ -1001,48 +830,38 @@ None, ), ), - ( - Expr(163), + Expr(163)( If( - ( - Expr(157), + Expr(157)( Op( - ( - Expr(155), + Expr(155)( Integer( "1", ), ), LessThan, - ( - Expr(156), + Expr(156)( Integer( "1_", ), ), ), ), - ( - Expr(162), + Expr(162)( Seq( [ - ( - Expr(161), + Expr(161)( Await( - ( - Expr(160), + Expr(160)( Call( - ( - Expr(158), + Expr(158)( Id( "print", ), ), [ - ( - None, - ( - Expr(159), + None( + Expr(159)( String( "error", ), @@ -1059,48 +878,38 @@ None, ), ), - ( - Expr(172), + Expr(172)( If( - ( - Expr(166), + Expr(166)( Op( - ( - Expr(164), + Expr(164)( Integer( "1_", ), ), GreaterThan, - ( - Expr(165), + Expr(165)( Integer( "2", ), ), ), ), - ( - Expr(171), + Expr(171)( Seq( [ - ( - Expr(170), + Expr(170)( Await( - ( - Expr(169), + Expr(169)( Call( - ( - Expr(167), + Expr(167)( Id( "print", ), ), [ - ( - None, - ( - Expr(168), + None( + Expr(168)( String( "error", ), @@ -1117,48 +926,38 @@ None, ), ), - ( - Expr(181), + Expr(181)( If( - ( - Expr(175), + Expr(175)( Op( - ( - Expr(173), + Expr(173)( Integer( "1", ), ), GreaterThan, - ( - Expr(174), + Expr(174)( Integer( "2_", ), ), ), ), - ( - Expr(180), + Expr(180)( Seq( [ - ( - Expr(179), + Expr(179)( Await( - ( - Expr(178), + Expr(178)( Call( - ( - Expr(176), + Expr(176)( Id( "print", ), ), [ - ( - None, - ( - Expr(177), + None( + Expr(177)( String( "error", ), @@ -1175,48 +974,38 @@ None, ), ), - ( - Expr(190), + Expr(190)( If( - ( - Expr(184), + Expr(184)( Op( - ( - Expr(182), + Expr(182)( Integer( "2_", ), ), GreaterThan, - ( - Expr(183), + Expr(183)( Integer( "1", ), ), ), ), - ( - Expr(189), + Expr(189)( Seq( [ - ( - Expr(188), + Expr(188)( Await( - ( - Expr(187), + Expr(187)( Call( - ( - Expr(185), + Expr(185)( Id( "print", ), ), [ - ( - None, - ( - Expr(186), + None( + Expr(186)( String( "2_i > 1", ), @@ -1233,48 +1022,38 @@ None, ), ), - ( - Expr(199), + Expr(199)( If( - ( - Expr(193), + Expr(193)( Op( - ( - Expr(191), + Expr(191)( Integer( "2", ), ), GreaterThan, - ( - Expr(192), + Expr(192)( Integer( "1_", ), ), ), ), - ( - Expr(198), + Expr(198)( Seq( [ - ( - Expr(197), + Expr(197)( Await( - ( - Expr(196), + Expr(196)( Call( - ( - Expr(194), + Expr(194)( Id( "print", ), ), [ - ( - None, - ( - Expr(195), + None( + Expr(195)( String( "2 > 1_i", ), @@ -1291,48 +1070,38 @@ None, ), ), - ( - Expr(208), + Expr(208)( If( - ( - Expr(202), + Expr(202)( Op( - ( - Expr(200), + Expr(200)( Integer( "1_", ), ), GreaterThan, - ( - Expr(201), + Expr(201)( Integer( "1", ), ), ), ), - ( - Expr(207), + Expr(207)( Seq( [ - ( - Expr(206), + Expr(206)( Await( - ( - Expr(205), + Expr(205)( Call( - ( - Expr(203), + Expr(203)( Id( "print", ), ), [ - ( - None, - ( - Expr(204), + None( + Expr(204)( String( "error", ), @@ -1349,48 +1118,38 @@ None, ), ), - ( - Expr(217), + Expr(217)( If( - ( - Expr(211), + Expr(211)( Op( - ( - Expr(209), + Expr(209)( Integer( "1", ), ), GreaterThan, - ( - Expr(210), + Expr(210)( Integer( "1_", ), ), ), ), - ( - Expr(216), + Expr(216)( Seq( [ - ( - Expr(215), + Expr(215)( Await( - ( - Expr(214), + Expr(214)( Call( - ( - Expr(212), + Expr(212)( Id( "print", ), ), [ - ( - None, - ( - Expr(213), + None( + Expr(213)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/validated.ref b/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/validated.ref index d2f0c302..b465ad7e 100644 --- a/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/validated.ref +++ b/dada_tests/interpret/ops/ops_mix_signed_and_unsuffixed/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1_i + 1 == 2_i", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Plus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 2, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1 + 1_i == 2_i", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 1, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Minus, Expr(25)( 1, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 0, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "1_i - 1 == 0_i", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 1, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), Minus, Expr(37)( 1, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 0, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "1 - 1_i == 0", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(59)( If( @@ -438,38 +282,23 @@ Op( Expr(48)( 10, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), Times, Expr(49)( 10, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), EqualEqual, Expr(51)( 100, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), Expr(57)( Seq( @@ -482,60 +311,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + synthesized from Expr(49), ), [ NamedExpr( None, Expr(54)( "10_i * 10 == 100_i", - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ], ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(71)( If( @@ -545,38 +350,23 @@ Op( Expr(60)( 10, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), Times, Expr(61)( 10, - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), EqualEqual, Expr(63)( 100, - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), Expr(69)( Seq( @@ -589,60 +379,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + synthesized from Expr(60), ), [ NamedExpr( None, Expr(66)( "10 * 10_i == 100_i", - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ], ), - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), Expr(70)( Tuple, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), Expr(83)( If( @@ -652,38 +418,23 @@ Op( Expr(72)( 10, - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), DividedBy, Expr(73)( 5, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), EqualEqual, Expr(75)( 2, - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), Expr(81)( Seq( @@ -696,60 +447,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + synthesized from Expr(71), ), [ NamedExpr( None, Expr(78)( "10_i / 5 == 2_i", - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), ), - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ], ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), Expr(82)( Tuple, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), Expr(95)( If( @@ -759,38 +486,23 @@ Op( Expr(84)( 10, - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), DividedBy, Expr(85)( 5, - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), EqualEqual, Expr(87)( 2, - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), Expr(93)( Seq( @@ -803,60 +515,36 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), ), - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + synthesized from Expr(82), ), [ NamedExpr( None, Expr(90)( "10 / 5_i == 2_i", - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ], ), - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), Expr(94)( Tuple, - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), Expr(107)( If( @@ -866,38 +554,23 @@ Op( Expr(96)( 11, - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), DividedBy, Expr(97)( 5, - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), EqualEqual, Expr(99)( 2, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), ), - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), Expr(105)( Seq( @@ -910,60 +583,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + synthesized from Expr(93), ), [ NamedExpr( None, Expr(102)( "11_i / 5 == 2_i", - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ], ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), Expr(106)( Tuple, - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(119)( If( @@ -973,38 +622,23 @@ Op( Expr(108)( 11, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), DividedBy, Expr(109)( 5, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), ), - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), EqualEqual, Expr(111)( 2, - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), ), - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), Expr(117)( Seq( @@ -1017,60 +651,36 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + synthesized from Expr(104), ), [ NamedExpr( None, Expr(114)( "11 / 5_i == 2_i", - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), ], ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), Expr(129)( If( @@ -1078,24 +688,15 @@ Op( Expr(120)( 1, - ExprOrigin { - syntax_expr: Expr(110), - synthesized: false, - }, + from Expr(110), ), LessThan, Expr(121)( 2, - ExprOrigin { - syntax_expr: Expr(111), - synthesized: false, - }, + from Expr(111), ), ), - ExprOrigin { - syntax_expr: Expr(112), - synthesized: false, - }, + from Expr(112), ), Expr(127)( Seq( @@ -1108,60 +709,36 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(113), - synthesized: false, - }, + from Expr(113), ), ), - ExprOrigin { - syntax_expr: Expr(113), - synthesized: false, - }, + synthesized from Expr(113), ), [ NamedExpr( None, Expr(124)( "1_i < 2", - ExprOrigin { - syntax_expr: Expr(114), - synthesized: false, - }, + from Expr(114), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(115), - synthesized: false, - }, + from Expr(115), ), ), - ExprOrigin { - syntax_expr: Expr(116), - synthesized: false, - }, + from Expr(116), ), ], ), - ExprOrigin { - syntax_expr: Expr(117), - synthesized: false, - }, + from Expr(117), ), Expr(128)( Tuple, - ExprOrigin { - syntax_expr: Expr(118), - synthesized: false, - }, + from Expr(118), ), ), - ExprOrigin { - syntax_expr: Expr(118), - synthesized: false, - }, + from Expr(118), ), Expr(139)( If( @@ -1169,24 +746,15 @@ Op( Expr(130)( 1, - ExprOrigin { - syntax_expr: Expr(119), - synthesized: false, - }, + from Expr(119), ), LessThan, Expr(131)( 2, - ExprOrigin { - syntax_expr: Expr(120), - synthesized: false, - }, + from Expr(120), ), ), - ExprOrigin { - syntax_expr: Expr(121), - synthesized: false, - }, + from Expr(121), ), Expr(137)( Seq( @@ -1199,60 +767,36 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(122), - synthesized: false, - }, + from Expr(122), ), ), - ExprOrigin { - syntax_expr: Expr(122), - synthesized: false, - }, + synthesized from Expr(122), ), [ NamedExpr( None, Expr(134)( "1 < 2_i", - ExprOrigin { - syntax_expr: Expr(123), - synthesized: false, - }, + from Expr(123), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(124), - synthesized: false, - }, + from Expr(124), ), ), - ExprOrigin { - syntax_expr: Expr(125), - synthesized: false, - }, + from Expr(125), ), ], ), - ExprOrigin { - syntax_expr: Expr(126), - synthesized: false, - }, + from Expr(126), ), Expr(138)( Tuple, - ExprOrigin { - syntax_expr: Expr(127), - synthesized: false, - }, + from Expr(127), ), ), - ExprOrigin { - syntax_expr: Expr(127), - synthesized: false, - }, + from Expr(127), ), Expr(149)( If( @@ -1260,24 +804,15 @@ Op( Expr(140)( 2, - ExprOrigin { - syntax_expr: Expr(128), - synthesized: false, - }, + from Expr(128), ), LessThan, Expr(141)( 1, - ExprOrigin { - syntax_expr: Expr(129), - synthesized: false, - }, + from Expr(129), ), ), - ExprOrigin { - syntax_expr: Expr(130), - synthesized: false, - }, + from Expr(130), ), Expr(147)( Seq( @@ -1290,60 +825,36 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(131), - synthesized: false, - }, + from Expr(131), ), ), - ExprOrigin { - syntax_expr: Expr(131), - synthesized: false, - }, + synthesized from Expr(131), ), [ NamedExpr( None, Expr(144)( "error", - ExprOrigin { - syntax_expr: Expr(132), - synthesized: false, - }, + from Expr(132), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(133), - synthesized: false, - }, + from Expr(133), ), ), - ExprOrigin { - syntax_expr: Expr(134), - synthesized: false, - }, + from Expr(134), ), ], ), - ExprOrigin { - syntax_expr: Expr(135), - synthesized: false, - }, + from Expr(135), ), Expr(148)( Tuple, - ExprOrigin { - syntax_expr: Expr(136), - synthesized: false, - }, + from Expr(136), ), ), - ExprOrigin { - syntax_expr: Expr(136), - synthesized: false, - }, + from Expr(136), ), Expr(159)( If( @@ -1351,24 +862,15 @@ Op( Expr(150)( 2, - ExprOrigin { - syntax_expr: Expr(137), - synthesized: false, - }, + from Expr(137), ), LessThan, Expr(151)( 1, - ExprOrigin { - syntax_expr: Expr(138), - synthesized: false, - }, + from Expr(138), ), ), - ExprOrigin { - syntax_expr: Expr(139), - synthesized: false, - }, + from Expr(139), ), Expr(157)( Seq( @@ -1381,60 +883,36 @@ Reserve( Place(13)( Print, - ExprOrigin { - syntax_expr: Expr(140), - synthesized: false, - }, + from Expr(140), ), ), - ExprOrigin { - syntax_expr: Expr(140), - synthesized: false, - }, + synthesized from Expr(140), ), [ NamedExpr( None, Expr(154)( "error", - ExprOrigin { - syntax_expr: Expr(141), - synthesized: false, - }, + from Expr(141), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(142), - synthesized: false, - }, + from Expr(142), ), ), - ExprOrigin { - syntax_expr: Expr(143), - synthesized: false, - }, + from Expr(143), ), ], ), - ExprOrigin { - syntax_expr: Expr(144), - synthesized: false, - }, + from Expr(144), ), Expr(158)( Tuple, - ExprOrigin { - syntax_expr: Expr(145), - synthesized: false, - }, + from Expr(145), ), ), - ExprOrigin { - syntax_expr: Expr(145), - synthesized: false, - }, + from Expr(145), ), Expr(169)( If( @@ -1442,24 +920,15 @@ Op( Expr(160)( 1, - ExprOrigin { - syntax_expr: Expr(146), - synthesized: false, - }, + from Expr(146), ), LessThan, Expr(161)( 1, - ExprOrigin { - syntax_expr: Expr(147), - synthesized: false, - }, + from Expr(147), ), ), - ExprOrigin { - syntax_expr: Expr(148), - synthesized: false, - }, + from Expr(148), ), Expr(167)( Seq( @@ -1472,60 +941,36 @@ Reserve( Place(14)( Print, - ExprOrigin { - syntax_expr: Expr(149), - synthesized: false, - }, + from Expr(149), ), ), - ExprOrigin { - syntax_expr: Expr(149), - synthesized: false, - }, + synthesized from Expr(149), ), [ NamedExpr( None, Expr(164)( "error", - ExprOrigin { - syntax_expr: Expr(150), - synthesized: false, - }, + from Expr(150), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(151), - synthesized: false, - }, + from Expr(151), ), ), - ExprOrigin { - syntax_expr: Expr(152), - synthesized: false, - }, + from Expr(152), ), ], ), - ExprOrigin { - syntax_expr: Expr(153), - synthesized: false, - }, + from Expr(153), ), Expr(168)( Tuple, - ExprOrigin { - syntax_expr: Expr(154), - synthesized: false, - }, + from Expr(154), ), ), - ExprOrigin { - syntax_expr: Expr(154), - synthesized: false, - }, + from Expr(154), ), Expr(179)( If( @@ -1533,24 +978,15 @@ Op( Expr(170)( 1, - ExprOrigin { - syntax_expr: Expr(155), - synthesized: false, - }, + from Expr(155), ), LessThan, Expr(171)( 1, - ExprOrigin { - syntax_expr: Expr(156), - synthesized: false, - }, + from Expr(156), ), ), - ExprOrigin { - syntax_expr: Expr(157), - synthesized: false, - }, + from Expr(157), ), Expr(177)( Seq( @@ -1563,60 +999,36 @@ Reserve( Place(15)( Print, - ExprOrigin { - syntax_expr: Expr(158), - synthesized: false, - }, + from Expr(158), ), ), - ExprOrigin { - syntax_expr: Expr(158), - synthesized: false, - }, + synthesized from Expr(158), ), [ NamedExpr( None, Expr(174)( "error", - ExprOrigin { - syntax_expr: Expr(159), - synthesized: false, - }, + from Expr(159), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(160), - synthesized: false, - }, + from Expr(160), ), ), - ExprOrigin { - syntax_expr: Expr(161), - synthesized: false, - }, + from Expr(161), ), ], ), - ExprOrigin { - syntax_expr: Expr(162), - synthesized: false, - }, + from Expr(162), ), Expr(178)( Tuple, - ExprOrigin { - syntax_expr: Expr(163), - synthesized: false, - }, + from Expr(163), ), ), - ExprOrigin { - syntax_expr: Expr(163), - synthesized: false, - }, + from Expr(163), ), Expr(189)( If( @@ -1624,24 +1036,15 @@ Op( Expr(180)( 1, - ExprOrigin { - syntax_expr: Expr(164), - synthesized: false, - }, + from Expr(164), ), GreaterThan, Expr(181)( 2, - ExprOrigin { - syntax_expr: Expr(165), - synthesized: false, - }, + from Expr(165), ), ), - ExprOrigin { - syntax_expr: Expr(166), - synthesized: false, - }, + from Expr(166), ), Expr(187)( Seq( @@ -1654,60 +1057,36 @@ Reserve( Place(16)( Print, - ExprOrigin { - syntax_expr: Expr(167), - synthesized: false, - }, + from Expr(167), ), ), - ExprOrigin { - syntax_expr: Expr(167), - synthesized: false, - }, + synthesized from Expr(167), ), [ NamedExpr( None, Expr(184)( "error", - ExprOrigin { - syntax_expr: Expr(168), - synthesized: false, - }, + from Expr(168), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(169), - synthesized: false, - }, + from Expr(169), ), ), - ExprOrigin { - syntax_expr: Expr(170), - synthesized: false, - }, + from Expr(170), ), ], ), - ExprOrigin { - syntax_expr: Expr(171), - synthesized: false, - }, + from Expr(171), ), Expr(188)( Tuple, - ExprOrigin { - syntax_expr: Expr(172), - synthesized: false, - }, + from Expr(172), ), ), - ExprOrigin { - syntax_expr: Expr(172), - synthesized: false, - }, + from Expr(172), ), Expr(199)( If( @@ -1715,24 +1094,15 @@ Op( Expr(190)( 1, - ExprOrigin { - syntax_expr: Expr(173), - synthesized: false, - }, + from Expr(173), ), GreaterThan, Expr(191)( 2, - ExprOrigin { - syntax_expr: Expr(174), - synthesized: false, - }, + from Expr(174), ), ), - ExprOrigin { - syntax_expr: Expr(175), - synthesized: false, - }, + from Expr(175), ), Expr(197)( Seq( @@ -1745,60 +1115,36 @@ Reserve( Place(17)( Print, - ExprOrigin { - syntax_expr: Expr(176), - synthesized: false, - }, + from Expr(176), ), ), - ExprOrigin { - syntax_expr: Expr(176), - synthesized: false, - }, + synthesized from Expr(176), ), [ NamedExpr( None, Expr(194)( "error", - ExprOrigin { - syntax_expr: Expr(177), - synthesized: false, - }, + from Expr(177), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(178), - synthesized: false, - }, + from Expr(178), ), ), - ExprOrigin { - syntax_expr: Expr(179), - synthesized: false, - }, + from Expr(179), ), ], ), - ExprOrigin { - syntax_expr: Expr(180), - synthesized: false, - }, + from Expr(180), ), Expr(198)( Tuple, - ExprOrigin { - syntax_expr: Expr(181), - synthesized: false, - }, + from Expr(181), ), ), - ExprOrigin { - syntax_expr: Expr(181), - synthesized: false, - }, + from Expr(181), ), Expr(209)( If( @@ -1806,24 +1152,15 @@ Op( Expr(200)( 2, - ExprOrigin { - syntax_expr: Expr(182), - synthesized: false, - }, + from Expr(182), ), GreaterThan, Expr(201)( 1, - ExprOrigin { - syntax_expr: Expr(183), - synthesized: false, - }, + from Expr(183), ), ), - ExprOrigin { - syntax_expr: Expr(184), - synthesized: false, - }, + from Expr(184), ), Expr(207)( Seq( @@ -1836,60 +1173,36 @@ Reserve( Place(18)( Print, - ExprOrigin { - syntax_expr: Expr(185), - synthesized: false, - }, + from Expr(185), ), ), - ExprOrigin { - syntax_expr: Expr(185), - synthesized: false, - }, + synthesized from Expr(185), ), [ NamedExpr( None, Expr(204)( "2_i > 1", - ExprOrigin { - syntax_expr: Expr(186), - synthesized: false, - }, + from Expr(186), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(187), - synthesized: false, - }, + from Expr(187), ), ), - ExprOrigin { - syntax_expr: Expr(188), - synthesized: false, - }, + from Expr(188), ), ], ), - ExprOrigin { - syntax_expr: Expr(189), - synthesized: false, - }, + from Expr(189), ), Expr(208)( Tuple, - ExprOrigin { - syntax_expr: Expr(190), - synthesized: false, - }, + from Expr(190), ), ), - ExprOrigin { - syntax_expr: Expr(190), - synthesized: false, - }, + from Expr(190), ), Expr(219)( If( @@ -1897,24 +1210,15 @@ Op( Expr(210)( 2, - ExprOrigin { - syntax_expr: Expr(191), - synthesized: false, - }, + from Expr(191), ), GreaterThan, Expr(211)( 1, - ExprOrigin { - syntax_expr: Expr(192), - synthesized: false, - }, + from Expr(192), ), ), - ExprOrigin { - syntax_expr: Expr(193), - synthesized: false, - }, + from Expr(193), ), Expr(217)( Seq( @@ -1927,60 +1231,36 @@ Reserve( Place(19)( Print, - ExprOrigin { - syntax_expr: Expr(194), - synthesized: false, - }, + from Expr(194), ), ), - ExprOrigin { - syntax_expr: Expr(194), - synthesized: false, - }, + synthesized from Expr(194), ), [ NamedExpr( None, Expr(214)( "2 > 1_i", - ExprOrigin { - syntax_expr: Expr(195), - synthesized: false, - }, + from Expr(195), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(196), - synthesized: false, - }, + from Expr(196), ), ), - ExprOrigin { - syntax_expr: Expr(197), - synthesized: false, - }, + from Expr(197), ), ], ), - ExprOrigin { - syntax_expr: Expr(198), - synthesized: false, - }, + from Expr(198), ), Expr(218)( Tuple, - ExprOrigin { - syntax_expr: Expr(199), - synthesized: false, - }, + from Expr(199), ), ), - ExprOrigin { - syntax_expr: Expr(199), - synthesized: false, - }, + from Expr(199), ), Expr(229)( If( @@ -1988,24 +1268,15 @@ Op( Expr(220)( 1, - ExprOrigin { - syntax_expr: Expr(200), - synthesized: false, - }, + from Expr(200), ), GreaterThan, Expr(221)( 1, - ExprOrigin { - syntax_expr: Expr(201), - synthesized: false, - }, + from Expr(201), ), ), - ExprOrigin { - syntax_expr: Expr(202), - synthesized: false, - }, + from Expr(202), ), Expr(227)( Seq( @@ -2018,60 +1289,36 @@ Reserve( Place(20)( Print, - ExprOrigin { - syntax_expr: Expr(203), - synthesized: false, - }, + from Expr(203), ), ), - ExprOrigin { - syntax_expr: Expr(203), - synthesized: false, - }, + synthesized from Expr(203), ), [ NamedExpr( None, Expr(224)( "error", - ExprOrigin { - syntax_expr: Expr(204), - synthesized: false, - }, + from Expr(204), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(205), - synthesized: false, - }, + from Expr(205), ), ), - ExprOrigin { - syntax_expr: Expr(206), - synthesized: false, - }, + from Expr(206), ), ], ), - ExprOrigin { - syntax_expr: Expr(207), - synthesized: false, - }, + from Expr(207), ), Expr(228)( Tuple, - ExprOrigin { - syntax_expr: Expr(208), - synthesized: false, - }, + from Expr(208), ), ), - ExprOrigin { - syntax_expr: Expr(208), - synthesized: false, - }, + from Expr(208), ), Expr(239)( If( @@ -2079,24 +1326,15 @@ Op( Expr(230)( 1, - ExprOrigin { - syntax_expr: Expr(209), - synthesized: false, - }, + from Expr(209), ), GreaterThan, Expr(231)( 1, - ExprOrigin { - syntax_expr: Expr(210), - synthesized: false, - }, + from Expr(210), ), ), - ExprOrigin { - syntax_expr: Expr(211), - synthesized: false, - }, + from Expr(211), ), Expr(237)( Seq( @@ -2109,66 +1347,39 @@ Reserve( Place(21)( Print, - ExprOrigin { - syntax_expr: Expr(212), - synthesized: false, - }, + from Expr(212), ), ), - ExprOrigin { - syntax_expr: Expr(212), - synthesized: false, - }, + synthesized from Expr(212), ), [ NamedExpr( None, Expr(234)( "error", - ExprOrigin { - syntax_expr: Expr(213), - synthesized: false, - }, + from Expr(213), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(214), - synthesized: false, - }, + from Expr(214), ), ), - ExprOrigin { - syntax_expr: Expr(215), - synthesized: false, - }, + from Expr(215), ), ], ), - ExprOrigin { - syntax_expr: Expr(216), - synthesized: false, - }, + from Expr(216), ), Expr(238)( Tuple, - ExprOrigin { - syntax_expr: Expr(217), - synthesized: false, - }, + from Expr(217), ), ), - ExprOrigin { - syntax_expr: Expr(217), - synthesized: false, - }, + from Expr(217), ), ], ), - ExprOrigin { - syntax_expr: Expr(218), - synthesized: false, - }, + from Expr(218), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/syntax.ref b/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/syntax.ref index 5de44d0c..8079a485 100644 --- a/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/syntax.ref +++ b/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed.dada:1:18:103:1), ), data: syntax::Tree { - root_expr: ( - Expr(218), + root_expr: Expr(218)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1", ), @@ -36,35 +30,28 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Integer( "2_", ), ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1_u + 1 == 2_u", ), @@ -81,24 +68,19 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Integer( "1", ), ), Plus, - ( - Expr(12), + Expr(12)( Integer( "1_", ), @@ -106,35 +88,28 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Integer( "2_", ), ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1 + 1_u == 2_u", ), @@ -151,24 +126,19 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Integer( "1_", ), ), Minus, - ( - Expr(23), + Expr(23)( Integer( "1", ), @@ -176,35 +146,28 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Integer( "0_", ), ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "1_u - 1 == 0_u", ), @@ -221,24 +184,19 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Integer( "1", ), ), Minus, - ( - Expr(34), + Expr(34)( Integer( "1_", ), @@ -246,35 +204,28 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Integer( "0_", ), ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "1 - 1_u == 0_u", ), @@ -291,24 +242,19 @@ None, ), ), - ( - Expr(54), + Expr(54)( If( - ( - Expr(48), + Expr(48)( Op( - ( - Expr(46), + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Integer( "10_", ), ), Times, - ( - Expr(45), + Expr(45)( Integer( "10", ), @@ -316,35 +262,28 @@ ), ), EqualEqual, - ( - Expr(47), + Expr(47)( Integer( "100_", ), ), ), ), - ( - Expr(53), + Expr(53)( Seq( [ - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(49), + Expr(49)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( String( "10_u * 10 == 100_u", ), @@ -361,24 +300,19 @@ None, ), ), - ( - Expr(65), + Expr(65)( If( - ( - Expr(59), + Expr(59)( Op( - ( - Expr(57), + Expr(57)( Op( - ( - Expr(55), + Expr(55)( Integer( "10", ), ), Times, - ( - Expr(56), + Expr(56)( Integer( "10_", ), @@ -386,35 +320,28 @@ ), ), EqualEqual, - ( - Expr(58), + Expr(58)( Integer( "100_", ), ), ), ), - ( - Expr(64), + Expr(64)( Seq( [ - ( - Expr(63), + Expr(63)( Await( - ( - Expr(62), + Expr(62)( Call( - ( - Expr(60), + Expr(60)( Id( "print", ), ), [ - ( - None, - ( - Expr(61), + None( + Expr(61)( String( "10 * 10_u == 100_u", ), @@ -431,24 +358,19 @@ None, ), ), - ( - Expr(76), + Expr(76)( If( - ( - Expr(70), + Expr(70)( Op( - ( - Expr(68), + Expr(68)( Op( - ( - Expr(66), + Expr(66)( Integer( "10_", ), ), DividedBy, - ( - Expr(67), + Expr(67)( Integer( "5", ), @@ -456,35 +378,28 @@ ), ), EqualEqual, - ( - Expr(69), + Expr(69)( Integer( "2_", ), ), ), ), - ( - Expr(75), + Expr(75)( Seq( [ - ( - Expr(74), + Expr(74)( Await( - ( - Expr(73), + Expr(73)( Call( - ( - Expr(71), + Expr(71)( Id( "print", ), ), [ - ( - None, - ( - Expr(72), + None( + Expr(72)( String( "10_u / 5 == 2_u", ), @@ -501,24 +416,19 @@ None, ), ), - ( - Expr(87), + Expr(87)( If( - ( - Expr(81), + Expr(81)( Op( - ( - Expr(79), + Expr(79)( Op( - ( - Expr(77), + Expr(77)( Integer( "10", ), ), DividedBy, - ( - Expr(78), + Expr(78)( Integer( "5_", ), @@ -526,35 +436,28 @@ ), ), EqualEqual, - ( - Expr(80), + Expr(80)( Integer( "2_", ), ), ), ), - ( - Expr(86), + Expr(86)( Seq( [ - ( - Expr(85), + Expr(85)( Await( - ( - Expr(84), + Expr(84)( Call( - ( - Expr(82), + Expr(82)( Id( "print", ), ), [ - ( - None, - ( - Expr(83), + None( + Expr(83)( String( "10 / 5_u == 2_u", ), @@ -571,24 +474,19 @@ None, ), ), - ( - Expr(98), + Expr(98)( If( - ( - Expr(92), + Expr(92)( Op( - ( - Expr(90), + Expr(90)( Op( - ( - Expr(88), + Expr(88)( Integer( "11_", ), ), DividedBy, - ( - Expr(89), + Expr(89)( Integer( "5", ), @@ -596,35 +494,28 @@ ), ), EqualEqual, - ( - Expr(91), + Expr(91)( Integer( "2_", ), ), ), ), - ( - Expr(97), + Expr(97)( Seq( [ - ( - Expr(96), + Expr(96)( Await( - ( - Expr(95), + Expr(95)( Call( - ( - Expr(93), + Expr(93)( Id( "print", ), ), [ - ( - None, - ( - Expr(94), + None( + Expr(94)( String( "11_u / 5 == 2_u", ), @@ -641,24 +532,19 @@ None, ), ), - ( - Expr(109), + Expr(109)( If( - ( - Expr(103), + Expr(103)( Op( - ( - Expr(101), + Expr(101)( Op( - ( - Expr(99), + Expr(99)( Integer( "11", ), ), DividedBy, - ( - Expr(100), + Expr(100)( Integer( "5_", ), @@ -666,35 +552,28 @@ ), ), EqualEqual, - ( - Expr(102), + Expr(102)( Integer( "2_", ), ), ), ), - ( - Expr(108), + Expr(108)( Seq( [ - ( - Expr(107), + Expr(107)( Await( - ( - Expr(106), + Expr(106)( Call( - ( - Expr(104), + Expr(104)( Id( "print", ), ), [ - ( - None, - ( - Expr(105), + None( + Expr(105)( String( "11 / 5_u == 2_u", ), @@ -711,48 +590,38 @@ None, ), ), - ( - Expr(118), + Expr(118)( If( - ( - Expr(112), + Expr(112)( Op( - ( - Expr(110), + Expr(110)( Integer( "1_", ), ), LessThan, - ( - Expr(111), + Expr(111)( Integer( "2", ), ), ), ), - ( - Expr(117), + Expr(117)( Seq( [ - ( - Expr(116), + Expr(116)( Await( - ( - Expr(115), + Expr(115)( Call( - ( - Expr(113), + Expr(113)( Id( "print", ), ), [ - ( - None, - ( - Expr(114), + None( + Expr(114)( String( "1_u < 2", ), @@ -769,48 +638,38 @@ None, ), ), - ( - Expr(127), + Expr(127)( If( - ( - Expr(121), + Expr(121)( Op( - ( - Expr(119), + Expr(119)( Integer( "1", ), ), LessThan, - ( - Expr(120), + Expr(120)( Integer( "2_", ), ), ), ), - ( - Expr(126), + Expr(126)( Seq( [ - ( - Expr(125), + Expr(125)( Await( - ( - Expr(124), + Expr(124)( Call( - ( - Expr(122), + Expr(122)( Id( "print", ), ), [ - ( - None, - ( - Expr(123), + None( + Expr(123)( String( "1 < 2_u", ), @@ -827,48 +686,38 @@ None, ), ), - ( - Expr(136), + Expr(136)( If( - ( - Expr(130), + Expr(130)( Op( - ( - Expr(128), + Expr(128)( Integer( "2_", ), ), LessThan, - ( - Expr(129), + Expr(129)( Integer( "1", ), ), ), ), - ( - Expr(135), + Expr(135)( Seq( [ - ( - Expr(134), + Expr(134)( Await( - ( - Expr(133), + Expr(133)( Call( - ( - Expr(131), + Expr(131)( Id( "print", ), ), [ - ( - None, - ( - Expr(132), + None( + Expr(132)( String( "error", ), @@ -885,48 +734,38 @@ None, ), ), - ( - Expr(145), + Expr(145)( If( - ( - Expr(139), + Expr(139)( Op( - ( - Expr(137), + Expr(137)( Integer( "2", ), ), LessThan, - ( - Expr(138), + Expr(138)( Integer( "1_", ), ), ), ), - ( - Expr(144), + Expr(144)( Seq( [ - ( - Expr(143), + Expr(143)( Await( - ( - Expr(142), + Expr(142)( Call( - ( - Expr(140), + Expr(140)( Id( "print", ), ), [ - ( - None, - ( - Expr(141), + None( + Expr(141)( String( "error", ), @@ -943,48 +782,38 @@ None, ), ), - ( - Expr(154), + Expr(154)( If( - ( - Expr(148), + Expr(148)( Op( - ( - Expr(146), + Expr(146)( Integer( "1_", ), ), LessThan, - ( - Expr(147), + Expr(147)( Integer( "1", ), ), ), ), - ( - Expr(153), + Expr(153)( Seq( [ - ( - Expr(152), + Expr(152)( Await( - ( - Expr(151), + Expr(151)( Call( - ( - Expr(149), + Expr(149)( Id( "print", ), ), [ - ( - None, - ( - Expr(150), + None( + Expr(150)( String( "error", ), @@ -1001,48 +830,38 @@ None, ), ), - ( - Expr(163), + Expr(163)( If( - ( - Expr(157), + Expr(157)( Op( - ( - Expr(155), + Expr(155)( Integer( "1", ), ), LessThan, - ( - Expr(156), + Expr(156)( Integer( "1_", ), ), ), ), - ( - Expr(162), + Expr(162)( Seq( [ - ( - Expr(161), + Expr(161)( Await( - ( - Expr(160), + Expr(160)( Call( - ( - Expr(158), + Expr(158)( Id( "print", ), ), [ - ( - None, - ( - Expr(159), + None( + Expr(159)( String( "error", ), @@ -1059,48 +878,38 @@ None, ), ), - ( - Expr(172), + Expr(172)( If( - ( - Expr(166), + Expr(166)( Op( - ( - Expr(164), + Expr(164)( Integer( "1_", ), ), GreaterThan, - ( - Expr(165), + Expr(165)( Integer( "2", ), ), ), ), - ( - Expr(171), + Expr(171)( Seq( [ - ( - Expr(170), + Expr(170)( Await( - ( - Expr(169), + Expr(169)( Call( - ( - Expr(167), + Expr(167)( Id( "print", ), ), [ - ( - None, - ( - Expr(168), + None( + Expr(168)( String( "error", ), @@ -1117,48 +926,38 @@ None, ), ), - ( - Expr(181), + Expr(181)( If( - ( - Expr(175), + Expr(175)( Op( - ( - Expr(173), + Expr(173)( Integer( "1", ), ), GreaterThan, - ( - Expr(174), + Expr(174)( Integer( "2_", ), ), ), ), - ( - Expr(180), + Expr(180)( Seq( [ - ( - Expr(179), + Expr(179)( Await( - ( - Expr(178), + Expr(178)( Call( - ( - Expr(176), + Expr(176)( Id( "print", ), ), [ - ( - None, - ( - Expr(177), + None( + Expr(177)( String( "error", ), @@ -1175,48 +974,38 @@ None, ), ), - ( - Expr(190), + Expr(190)( If( - ( - Expr(184), + Expr(184)( Op( - ( - Expr(182), + Expr(182)( Integer( "2_", ), ), GreaterThan, - ( - Expr(183), + Expr(183)( Integer( "1", ), ), ), ), - ( - Expr(189), + Expr(189)( Seq( [ - ( - Expr(188), + Expr(188)( Await( - ( - Expr(187), + Expr(187)( Call( - ( - Expr(185), + Expr(185)( Id( "print", ), ), [ - ( - None, - ( - Expr(186), + None( + Expr(186)( String( "2_u > 1", ), @@ -1233,48 +1022,38 @@ None, ), ), - ( - Expr(199), + Expr(199)( If( - ( - Expr(193), + Expr(193)( Op( - ( - Expr(191), + Expr(191)( Integer( "2", ), ), GreaterThan, - ( - Expr(192), + Expr(192)( Integer( "1_", ), ), ), ), - ( - Expr(198), + Expr(198)( Seq( [ - ( - Expr(197), + Expr(197)( Await( - ( - Expr(196), + Expr(196)( Call( - ( - Expr(194), + Expr(194)( Id( "print", ), ), [ - ( - None, - ( - Expr(195), + None( + Expr(195)( String( "2 > 1_u", ), @@ -1291,48 +1070,38 @@ None, ), ), - ( - Expr(208), + Expr(208)( If( - ( - Expr(202), + Expr(202)( Op( - ( - Expr(200), + Expr(200)( Integer( "1_", ), ), GreaterThan, - ( - Expr(201), + Expr(201)( Integer( "1", ), ), ), ), - ( - Expr(207), + Expr(207)( Seq( [ - ( - Expr(206), + Expr(206)( Await( - ( - Expr(205), + Expr(205)( Call( - ( - Expr(203), + Expr(203)( Id( "print", ), ), [ - ( - None, - ( - Expr(204), + None( + Expr(204)( String( "error", ), @@ -1349,48 +1118,38 @@ None, ), ), - ( - Expr(217), + Expr(217)( If( - ( - Expr(211), + Expr(211)( Op( - ( - Expr(209), + Expr(209)( Integer( "1", ), ), GreaterThan, - ( - Expr(210), + Expr(210)( Integer( "1_", ), ), ), ), - ( - Expr(216), + Expr(216)( Seq( [ - ( - Expr(215), + Expr(215)( Await( - ( - Expr(214), + Expr(214)( Call( - ( - Expr(212), + Expr(212)( Id( "print", ), ), [ - ( - None, - ( - Expr(213), + None( + Expr(213)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/validated.ref b/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/validated.ref index c49080f2..2d0a0316 100644 --- a/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/validated.ref +++ b/dada_tests/interpret/ops/ops_mix_unsigned_and_unsuffixed/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1_u + 1 == 2_u", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Plus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 2, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1 + 1_u == 2_u", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 1, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Minus, Expr(25)( 1, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 0, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "1_u - 1 == 0_u", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 1, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), Minus, Expr(37)( 1, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 0, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "1 - 1_u == 0_u", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(59)( If( @@ -438,38 +282,23 @@ Op( Expr(48)( 10, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), Times, Expr(49)( 10, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), EqualEqual, Expr(51)( 100, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), Expr(57)( Seq( @@ -482,60 +311,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + synthesized from Expr(49), ), [ NamedExpr( None, Expr(54)( "10_u * 10 == 100_u", - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ], ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(71)( If( @@ -545,38 +350,23 @@ Op( Expr(60)( 10, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), Times, Expr(61)( 10, - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), EqualEqual, Expr(63)( 100, - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), Expr(69)( Seq( @@ -589,60 +379,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + synthesized from Expr(60), ), [ NamedExpr( None, Expr(66)( "10 * 10_u == 100_u", - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ], ), - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), Expr(70)( Tuple, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), Expr(83)( If( @@ -652,38 +418,23 @@ Op( Expr(72)( 10, - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), DividedBy, Expr(73)( 5, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), EqualEqual, Expr(75)( 2, - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), Expr(81)( Seq( @@ -696,60 +447,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + synthesized from Expr(71), ), [ NamedExpr( None, Expr(78)( "10_u / 5 == 2_u", - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), ), - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ], ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), Expr(82)( Tuple, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), Expr(95)( If( @@ -759,38 +486,23 @@ Op( Expr(84)( 10, - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), DividedBy, Expr(85)( 5, - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), EqualEqual, Expr(87)( 2, - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), Expr(93)( Seq( @@ -803,60 +515,36 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), ), - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + synthesized from Expr(82), ), [ NamedExpr( None, Expr(90)( "10 / 5_u == 2_u", - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ], ), - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), Expr(94)( Tuple, - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), Expr(107)( If( @@ -866,38 +554,23 @@ Op( Expr(96)( 11, - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), DividedBy, Expr(97)( 5, - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), EqualEqual, Expr(99)( 2, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), ), - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), Expr(105)( Seq( @@ -910,60 +583,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + synthesized from Expr(93), ), [ NamedExpr( None, Expr(102)( "11_u / 5 == 2_u", - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ], ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), Expr(106)( Tuple, - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(119)( If( @@ -973,38 +622,23 @@ Op( Expr(108)( 11, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), DividedBy, Expr(109)( 5, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), ), - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), EqualEqual, Expr(111)( 2, - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), ), - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), Expr(117)( Seq( @@ -1017,60 +651,36 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + synthesized from Expr(104), ), [ NamedExpr( None, Expr(114)( "11 / 5_u == 2_u", - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), ], ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), Expr(129)( If( @@ -1078,24 +688,15 @@ Op( Expr(120)( 1, - ExprOrigin { - syntax_expr: Expr(110), - synthesized: false, - }, + from Expr(110), ), LessThan, Expr(121)( 2, - ExprOrigin { - syntax_expr: Expr(111), - synthesized: false, - }, + from Expr(111), ), ), - ExprOrigin { - syntax_expr: Expr(112), - synthesized: false, - }, + from Expr(112), ), Expr(127)( Seq( @@ -1108,60 +709,36 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(113), - synthesized: false, - }, + from Expr(113), ), ), - ExprOrigin { - syntax_expr: Expr(113), - synthesized: false, - }, + synthesized from Expr(113), ), [ NamedExpr( None, Expr(124)( "1_u < 2", - ExprOrigin { - syntax_expr: Expr(114), - synthesized: false, - }, + from Expr(114), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(115), - synthesized: false, - }, + from Expr(115), ), ), - ExprOrigin { - syntax_expr: Expr(116), - synthesized: false, - }, + from Expr(116), ), ], ), - ExprOrigin { - syntax_expr: Expr(117), - synthesized: false, - }, + from Expr(117), ), Expr(128)( Tuple, - ExprOrigin { - syntax_expr: Expr(118), - synthesized: false, - }, + from Expr(118), ), ), - ExprOrigin { - syntax_expr: Expr(118), - synthesized: false, - }, + from Expr(118), ), Expr(139)( If( @@ -1169,24 +746,15 @@ Op( Expr(130)( 1, - ExprOrigin { - syntax_expr: Expr(119), - synthesized: false, - }, + from Expr(119), ), LessThan, Expr(131)( 2, - ExprOrigin { - syntax_expr: Expr(120), - synthesized: false, - }, + from Expr(120), ), ), - ExprOrigin { - syntax_expr: Expr(121), - synthesized: false, - }, + from Expr(121), ), Expr(137)( Seq( @@ -1199,60 +767,36 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(122), - synthesized: false, - }, + from Expr(122), ), ), - ExprOrigin { - syntax_expr: Expr(122), - synthesized: false, - }, + synthesized from Expr(122), ), [ NamedExpr( None, Expr(134)( "1 < 2_u", - ExprOrigin { - syntax_expr: Expr(123), - synthesized: false, - }, + from Expr(123), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(124), - synthesized: false, - }, + from Expr(124), ), ), - ExprOrigin { - syntax_expr: Expr(125), - synthesized: false, - }, + from Expr(125), ), ], ), - ExprOrigin { - syntax_expr: Expr(126), - synthesized: false, - }, + from Expr(126), ), Expr(138)( Tuple, - ExprOrigin { - syntax_expr: Expr(127), - synthesized: false, - }, + from Expr(127), ), ), - ExprOrigin { - syntax_expr: Expr(127), - synthesized: false, - }, + from Expr(127), ), Expr(149)( If( @@ -1260,24 +804,15 @@ Op( Expr(140)( 2, - ExprOrigin { - syntax_expr: Expr(128), - synthesized: false, - }, + from Expr(128), ), LessThan, Expr(141)( 1, - ExprOrigin { - syntax_expr: Expr(129), - synthesized: false, - }, + from Expr(129), ), ), - ExprOrigin { - syntax_expr: Expr(130), - synthesized: false, - }, + from Expr(130), ), Expr(147)( Seq( @@ -1290,60 +825,36 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(131), - synthesized: false, - }, + from Expr(131), ), ), - ExprOrigin { - syntax_expr: Expr(131), - synthesized: false, - }, + synthesized from Expr(131), ), [ NamedExpr( None, Expr(144)( "error", - ExprOrigin { - syntax_expr: Expr(132), - synthesized: false, - }, + from Expr(132), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(133), - synthesized: false, - }, + from Expr(133), ), ), - ExprOrigin { - syntax_expr: Expr(134), - synthesized: false, - }, + from Expr(134), ), ], ), - ExprOrigin { - syntax_expr: Expr(135), - synthesized: false, - }, + from Expr(135), ), Expr(148)( Tuple, - ExprOrigin { - syntax_expr: Expr(136), - synthesized: false, - }, + from Expr(136), ), ), - ExprOrigin { - syntax_expr: Expr(136), - synthesized: false, - }, + from Expr(136), ), Expr(159)( If( @@ -1351,24 +862,15 @@ Op( Expr(150)( 2, - ExprOrigin { - syntax_expr: Expr(137), - synthesized: false, - }, + from Expr(137), ), LessThan, Expr(151)( 1, - ExprOrigin { - syntax_expr: Expr(138), - synthesized: false, - }, + from Expr(138), ), ), - ExprOrigin { - syntax_expr: Expr(139), - synthesized: false, - }, + from Expr(139), ), Expr(157)( Seq( @@ -1381,60 +883,36 @@ Reserve( Place(13)( Print, - ExprOrigin { - syntax_expr: Expr(140), - synthesized: false, - }, + from Expr(140), ), ), - ExprOrigin { - syntax_expr: Expr(140), - synthesized: false, - }, + synthesized from Expr(140), ), [ NamedExpr( None, Expr(154)( "error", - ExprOrigin { - syntax_expr: Expr(141), - synthesized: false, - }, + from Expr(141), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(142), - synthesized: false, - }, + from Expr(142), ), ), - ExprOrigin { - syntax_expr: Expr(143), - synthesized: false, - }, + from Expr(143), ), ], ), - ExprOrigin { - syntax_expr: Expr(144), - synthesized: false, - }, + from Expr(144), ), Expr(158)( Tuple, - ExprOrigin { - syntax_expr: Expr(145), - synthesized: false, - }, + from Expr(145), ), ), - ExprOrigin { - syntax_expr: Expr(145), - synthesized: false, - }, + from Expr(145), ), Expr(169)( If( @@ -1442,24 +920,15 @@ Op( Expr(160)( 1, - ExprOrigin { - syntax_expr: Expr(146), - synthesized: false, - }, + from Expr(146), ), LessThan, Expr(161)( 1, - ExprOrigin { - syntax_expr: Expr(147), - synthesized: false, - }, + from Expr(147), ), ), - ExprOrigin { - syntax_expr: Expr(148), - synthesized: false, - }, + from Expr(148), ), Expr(167)( Seq( @@ -1472,60 +941,36 @@ Reserve( Place(14)( Print, - ExprOrigin { - syntax_expr: Expr(149), - synthesized: false, - }, + from Expr(149), ), ), - ExprOrigin { - syntax_expr: Expr(149), - synthesized: false, - }, + synthesized from Expr(149), ), [ NamedExpr( None, Expr(164)( "error", - ExprOrigin { - syntax_expr: Expr(150), - synthesized: false, - }, + from Expr(150), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(151), - synthesized: false, - }, + from Expr(151), ), ), - ExprOrigin { - syntax_expr: Expr(152), - synthesized: false, - }, + from Expr(152), ), ], ), - ExprOrigin { - syntax_expr: Expr(153), - synthesized: false, - }, + from Expr(153), ), Expr(168)( Tuple, - ExprOrigin { - syntax_expr: Expr(154), - synthesized: false, - }, + from Expr(154), ), ), - ExprOrigin { - syntax_expr: Expr(154), - synthesized: false, - }, + from Expr(154), ), Expr(179)( If( @@ -1533,24 +978,15 @@ Op( Expr(170)( 1, - ExprOrigin { - syntax_expr: Expr(155), - synthesized: false, - }, + from Expr(155), ), LessThan, Expr(171)( 1, - ExprOrigin { - syntax_expr: Expr(156), - synthesized: false, - }, + from Expr(156), ), ), - ExprOrigin { - syntax_expr: Expr(157), - synthesized: false, - }, + from Expr(157), ), Expr(177)( Seq( @@ -1563,60 +999,36 @@ Reserve( Place(15)( Print, - ExprOrigin { - syntax_expr: Expr(158), - synthesized: false, - }, + from Expr(158), ), ), - ExprOrigin { - syntax_expr: Expr(158), - synthesized: false, - }, + synthesized from Expr(158), ), [ NamedExpr( None, Expr(174)( "error", - ExprOrigin { - syntax_expr: Expr(159), - synthesized: false, - }, + from Expr(159), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(160), - synthesized: false, - }, + from Expr(160), ), ), - ExprOrigin { - syntax_expr: Expr(161), - synthesized: false, - }, + from Expr(161), ), ], ), - ExprOrigin { - syntax_expr: Expr(162), - synthesized: false, - }, + from Expr(162), ), Expr(178)( Tuple, - ExprOrigin { - syntax_expr: Expr(163), - synthesized: false, - }, + from Expr(163), ), ), - ExprOrigin { - syntax_expr: Expr(163), - synthesized: false, - }, + from Expr(163), ), Expr(189)( If( @@ -1624,24 +1036,15 @@ Op( Expr(180)( 1, - ExprOrigin { - syntax_expr: Expr(164), - synthesized: false, - }, + from Expr(164), ), GreaterThan, Expr(181)( 2, - ExprOrigin { - syntax_expr: Expr(165), - synthesized: false, - }, + from Expr(165), ), ), - ExprOrigin { - syntax_expr: Expr(166), - synthesized: false, - }, + from Expr(166), ), Expr(187)( Seq( @@ -1654,60 +1057,36 @@ Reserve( Place(16)( Print, - ExprOrigin { - syntax_expr: Expr(167), - synthesized: false, - }, + from Expr(167), ), ), - ExprOrigin { - syntax_expr: Expr(167), - synthesized: false, - }, + synthesized from Expr(167), ), [ NamedExpr( None, Expr(184)( "error", - ExprOrigin { - syntax_expr: Expr(168), - synthesized: false, - }, + from Expr(168), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(169), - synthesized: false, - }, + from Expr(169), ), ), - ExprOrigin { - syntax_expr: Expr(170), - synthesized: false, - }, + from Expr(170), ), ], ), - ExprOrigin { - syntax_expr: Expr(171), - synthesized: false, - }, + from Expr(171), ), Expr(188)( Tuple, - ExprOrigin { - syntax_expr: Expr(172), - synthesized: false, - }, + from Expr(172), ), ), - ExprOrigin { - syntax_expr: Expr(172), - synthesized: false, - }, + from Expr(172), ), Expr(199)( If( @@ -1715,24 +1094,15 @@ Op( Expr(190)( 1, - ExprOrigin { - syntax_expr: Expr(173), - synthesized: false, - }, + from Expr(173), ), GreaterThan, Expr(191)( 2, - ExprOrigin { - syntax_expr: Expr(174), - synthesized: false, - }, + from Expr(174), ), ), - ExprOrigin { - syntax_expr: Expr(175), - synthesized: false, - }, + from Expr(175), ), Expr(197)( Seq( @@ -1745,60 +1115,36 @@ Reserve( Place(17)( Print, - ExprOrigin { - syntax_expr: Expr(176), - synthesized: false, - }, + from Expr(176), ), ), - ExprOrigin { - syntax_expr: Expr(176), - synthesized: false, - }, + synthesized from Expr(176), ), [ NamedExpr( None, Expr(194)( "error", - ExprOrigin { - syntax_expr: Expr(177), - synthesized: false, - }, + from Expr(177), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(178), - synthesized: false, - }, + from Expr(178), ), ), - ExprOrigin { - syntax_expr: Expr(179), - synthesized: false, - }, + from Expr(179), ), ], ), - ExprOrigin { - syntax_expr: Expr(180), - synthesized: false, - }, + from Expr(180), ), Expr(198)( Tuple, - ExprOrigin { - syntax_expr: Expr(181), - synthesized: false, - }, + from Expr(181), ), ), - ExprOrigin { - syntax_expr: Expr(181), - synthesized: false, - }, + from Expr(181), ), Expr(209)( If( @@ -1806,24 +1152,15 @@ Op( Expr(200)( 2, - ExprOrigin { - syntax_expr: Expr(182), - synthesized: false, - }, + from Expr(182), ), GreaterThan, Expr(201)( 1, - ExprOrigin { - syntax_expr: Expr(183), - synthesized: false, - }, + from Expr(183), ), ), - ExprOrigin { - syntax_expr: Expr(184), - synthesized: false, - }, + from Expr(184), ), Expr(207)( Seq( @@ -1836,60 +1173,36 @@ Reserve( Place(18)( Print, - ExprOrigin { - syntax_expr: Expr(185), - synthesized: false, - }, + from Expr(185), ), ), - ExprOrigin { - syntax_expr: Expr(185), - synthesized: false, - }, + synthesized from Expr(185), ), [ NamedExpr( None, Expr(204)( "2_u > 1", - ExprOrigin { - syntax_expr: Expr(186), - synthesized: false, - }, + from Expr(186), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(187), - synthesized: false, - }, + from Expr(187), ), ), - ExprOrigin { - syntax_expr: Expr(188), - synthesized: false, - }, + from Expr(188), ), ], ), - ExprOrigin { - syntax_expr: Expr(189), - synthesized: false, - }, + from Expr(189), ), Expr(208)( Tuple, - ExprOrigin { - syntax_expr: Expr(190), - synthesized: false, - }, + from Expr(190), ), ), - ExprOrigin { - syntax_expr: Expr(190), - synthesized: false, - }, + from Expr(190), ), Expr(219)( If( @@ -1897,24 +1210,15 @@ Op( Expr(210)( 2, - ExprOrigin { - syntax_expr: Expr(191), - synthesized: false, - }, + from Expr(191), ), GreaterThan, Expr(211)( 1, - ExprOrigin { - syntax_expr: Expr(192), - synthesized: false, - }, + from Expr(192), ), ), - ExprOrigin { - syntax_expr: Expr(193), - synthesized: false, - }, + from Expr(193), ), Expr(217)( Seq( @@ -1927,60 +1231,36 @@ Reserve( Place(19)( Print, - ExprOrigin { - syntax_expr: Expr(194), - synthesized: false, - }, + from Expr(194), ), ), - ExprOrigin { - syntax_expr: Expr(194), - synthesized: false, - }, + synthesized from Expr(194), ), [ NamedExpr( None, Expr(214)( "2 > 1_u", - ExprOrigin { - syntax_expr: Expr(195), - synthesized: false, - }, + from Expr(195), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(196), - synthesized: false, - }, + from Expr(196), ), ), - ExprOrigin { - syntax_expr: Expr(197), - synthesized: false, - }, + from Expr(197), ), ], ), - ExprOrigin { - syntax_expr: Expr(198), - synthesized: false, - }, + from Expr(198), ), Expr(218)( Tuple, - ExprOrigin { - syntax_expr: Expr(199), - synthesized: false, - }, + from Expr(199), ), ), - ExprOrigin { - syntax_expr: Expr(199), - synthesized: false, - }, + from Expr(199), ), Expr(229)( If( @@ -1988,24 +1268,15 @@ Op( Expr(220)( 1, - ExprOrigin { - syntax_expr: Expr(200), - synthesized: false, - }, + from Expr(200), ), GreaterThan, Expr(221)( 1, - ExprOrigin { - syntax_expr: Expr(201), - synthesized: false, - }, + from Expr(201), ), ), - ExprOrigin { - syntax_expr: Expr(202), - synthesized: false, - }, + from Expr(202), ), Expr(227)( Seq( @@ -2018,60 +1289,36 @@ Reserve( Place(20)( Print, - ExprOrigin { - syntax_expr: Expr(203), - synthesized: false, - }, + from Expr(203), ), ), - ExprOrigin { - syntax_expr: Expr(203), - synthesized: false, - }, + synthesized from Expr(203), ), [ NamedExpr( None, Expr(224)( "error", - ExprOrigin { - syntax_expr: Expr(204), - synthesized: false, - }, + from Expr(204), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(205), - synthesized: false, - }, + from Expr(205), ), ), - ExprOrigin { - syntax_expr: Expr(206), - synthesized: false, - }, + from Expr(206), ), ], ), - ExprOrigin { - syntax_expr: Expr(207), - synthesized: false, - }, + from Expr(207), ), Expr(228)( Tuple, - ExprOrigin { - syntax_expr: Expr(208), - synthesized: false, - }, + from Expr(208), ), ), - ExprOrigin { - syntax_expr: Expr(208), - synthesized: false, - }, + from Expr(208), ), Expr(239)( If( @@ -2079,24 +1326,15 @@ Op( Expr(230)( 1, - ExprOrigin { - syntax_expr: Expr(209), - synthesized: false, - }, + from Expr(209), ), GreaterThan, Expr(231)( 1, - ExprOrigin { - syntax_expr: Expr(210), - synthesized: false, - }, + from Expr(210), ), ), - ExprOrigin { - syntax_expr: Expr(211), - synthesized: false, - }, + from Expr(211), ), Expr(237)( Seq( @@ -2109,66 +1347,39 @@ Reserve( Place(21)( Print, - ExprOrigin { - syntax_expr: Expr(212), - synthesized: false, - }, + from Expr(212), ), ), - ExprOrigin { - syntax_expr: Expr(212), - synthesized: false, - }, + synthesized from Expr(212), ), [ NamedExpr( None, Expr(234)( "error", - ExprOrigin { - syntax_expr: Expr(213), - synthesized: false, - }, + from Expr(213), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(214), - synthesized: false, - }, + from Expr(214), ), ), - ExprOrigin { - syntax_expr: Expr(215), - synthesized: false, - }, + from Expr(215), ), ], ), - ExprOrigin { - syntax_expr: Expr(216), - synthesized: false, - }, + from Expr(216), ), Expr(238)( Tuple, - ExprOrigin { - syntax_expr: Expr(217), - synthesized: false, - }, + from Expr(217), ), ), - ExprOrigin { - syntax_expr: Expr(217), - synthesized: false, - }, + from Expr(217), ), ], ), - ExprOrigin { - syntax_expr: Expr(218), - synthesized: false, - }, + from Expr(218), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_signed_int/syntax.ref b/dada_tests/interpret/ops/ops_signed_int/syntax.ref index db41f88a..a9b0f0fa 100644 --- a/dada_tests/interpret/ops/ops_signed_int/syntax.ref +++ b/dada_tests/interpret/ops/ops_signed_int/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/interpret/ops/ops_signed_int.dada:1:18:53:1), ), data: syntax::Tree { - root_expr: ( - Expr(109), + root_expr: Expr(109)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -36,35 +30,28 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Integer( "2_", ), ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1_i + 1_i == 2_i", ), @@ -81,24 +68,19 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Integer( "1_", ), ), Minus, - ( - Expr(12), + Expr(12)( Integer( "1_", ), @@ -106,35 +88,28 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Integer( "0_", ), ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1_i - 1_i == 0_i", ), @@ -151,24 +126,19 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Integer( "10_", ), ), Times, - ( - Expr(23), + Expr(23)( Integer( "10_", ), @@ -176,35 +146,28 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Integer( "100_", ), ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "10_i * 10_i == 100_i", ), @@ -221,24 +184,19 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Integer( "10_", ), ), DividedBy, - ( - Expr(34), + Expr(34)( Integer( "5_", ), @@ -246,35 +204,28 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Integer( "2_", ), ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "10_i / 5_i == 2_i", ), @@ -291,24 +242,19 @@ None, ), ), - ( - Expr(54), + Expr(54)( If( - ( - Expr(48), + Expr(48)( Op( - ( - Expr(46), + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Integer( "11_", ), ), DividedBy, - ( - Expr(45), + Expr(45)( Integer( "5_", ), @@ -316,35 +262,28 @@ ), ), EqualEqual, - ( - Expr(47), + Expr(47)( Integer( "2_", ), ), ), ), - ( - Expr(53), + Expr(53)( Seq( [ - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(49), + Expr(49)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( String( "11_i / 5_i == 2_i", ), @@ -361,48 +300,38 @@ None, ), ), - ( - Expr(63), + Expr(63)( If( - ( - Expr(57), + Expr(57)( Op( - ( - Expr(55), + Expr(55)( Integer( "1_", ), ), LessThan, - ( - Expr(56), + Expr(56)( Integer( "2_", ), ), ), ), - ( - Expr(62), + Expr(62)( Seq( [ - ( - Expr(61), + Expr(61)( Await( - ( - Expr(60), + Expr(60)( Call( - ( - Expr(58), + Expr(58)( Id( "print", ), ), [ - ( - None, - ( - Expr(59), + None( + Expr(59)( String( "1_i < 2_i", ), @@ -419,48 +348,38 @@ None, ), ), - ( - Expr(72), + Expr(72)( If( - ( - Expr(66), + Expr(66)( Op( - ( - Expr(64), + Expr(64)( Integer( "2_", ), ), LessThan, - ( - Expr(65), + Expr(65)( Integer( "1_", ), ), ), ), - ( - Expr(71), + Expr(71)( Seq( [ - ( - Expr(70), + Expr(70)( Await( - ( - Expr(69), + Expr(69)( Call( - ( - Expr(67), + Expr(67)( Id( "print", ), ), [ - ( - None, - ( - Expr(68), + None( + Expr(68)( String( "error", ), @@ -477,48 +396,38 @@ None, ), ), - ( - Expr(81), + Expr(81)( If( - ( - Expr(75), + Expr(75)( Op( - ( - Expr(73), + Expr(73)( Integer( "1_", ), ), LessThan, - ( - Expr(74), + Expr(74)( Integer( "1_", ), ), ), ), - ( - Expr(80), + Expr(80)( Seq( [ - ( - Expr(79), + Expr(79)( Await( - ( - Expr(78), + Expr(78)( Call( - ( - Expr(76), + Expr(76)( Id( "print", ), ), [ - ( - None, - ( - Expr(77), + None( + Expr(77)( String( "error", ), @@ -535,48 +444,38 @@ None, ), ), - ( - Expr(90), + Expr(90)( If( - ( - Expr(84), + Expr(84)( Op( - ( - Expr(82), + Expr(82)( Integer( "1_", ), ), GreaterThan, - ( - Expr(83), + Expr(83)( Integer( "2_", ), ), ), ), - ( - Expr(89), + Expr(89)( Seq( [ - ( - Expr(88), + Expr(88)( Await( - ( - Expr(87), + Expr(87)( Call( - ( - Expr(85), + Expr(85)( Id( "print", ), ), [ - ( - None, - ( - Expr(86), + None( + Expr(86)( String( "error", ), @@ -593,48 +492,38 @@ None, ), ), - ( - Expr(99), + Expr(99)( If( - ( - Expr(93), + Expr(93)( Op( - ( - Expr(91), + Expr(91)( Integer( "2_", ), ), GreaterThan, - ( - Expr(92), + Expr(92)( Integer( "1_", ), ), ), ), - ( - Expr(98), + Expr(98)( Seq( [ - ( - Expr(97), + Expr(97)( Await( - ( - Expr(96), + Expr(96)( Call( - ( - Expr(94), + Expr(94)( Id( "print", ), ), [ - ( - None, - ( - Expr(95), + None( + Expr(95)( String( "2_i > 1_i", ), @@ -651,48 +540,38 @@ None, ), ), - ( - Expr(108), + Expr(108)( If( - ( - Expr(102), + Expr(102)( Op( - ( - Expr(100), + Expr(100)( Integer( "1_", ), ), GreaterThan, - ( - Expr(101), + Expr(101)( Integer( "1_", ), ), ), ), - ( - Expr(107), + Expr(107)( Seq( [ - ( - Expr(106), + Expr(106)( Await( - ( - Expr(105), + Expr(105)( Call( - ( - Expr(103), + Expr(103)( Id( "print", ), ), [ - ( - None, - ( - Expr(104), + None( + Expr(104)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_signed_int/validated.ref b/dada_tests/interpret/ops/ops_signed_int/validated.ref index 4b96c6a7..33bb99fd 100644 --- a/dada_tests/interpret/ops/ops_signed_int/validated.ref +++ b/dada_tests/interpret/ops/ops_signed_int/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1_i + 1_i == 2_i", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Minus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 0, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1_i - 1_i == 0_i", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 10, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Times, Expr(25)( 10, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 100, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "10_i * 10_i == 100_i", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 10, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), DividedBy, Expr(37)( 5, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 2, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "10_i / 5_i == 2_i", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(59)( If( @@ -438,38 +282,23 @@ Op( Expr(48)( 11, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), DividedBy, Expr(49)( 5, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), EqualEqual, Expr(51)( 2, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), Expr(57)( Seq( @@ -482,60 +311,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + synthesized from Expr(49), ), [ NamedExpr( None, Expr(54)( "11_i / 5_i == 2_i", - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ], ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(69)( If( @@ -543,24 +348,15 @@ Op( Expr(60)( 1, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), LessThan, Expr(61)( 2, - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), Expr(67)( Seq( @@ -573,60 +369,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + synthesized from Expr(58), ), [ NamedExpr( None, Expr(64)( "1_i < 2_i", - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), ], ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), Expr(68)( Tuple, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), Expr(79)( If( @@ -634,24 +406,15 @@ Op( Expr(70)( 2, - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), LessThan, Expr(71)( 1, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), Expr(77)( Seq( @@ -664,60 +427,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + synthesized from Expr(67), ), [ NamedExpr( None, Expr(74)( "error", - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), ], ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), Expr(78)( Tuple, - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), Expr(89)( If( @@ -725,24 +464,15 @@ Op( Expr(80)( 1, - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), LessThan, Expr(81)( 1, - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), Expr(87)( Seq( @@ -755,60 +485,36 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + synthesized from Expr(76), ), [ NamedExpr( None, Expr(84)( "error", - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), ], ), - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), Expr(88)( Tuple, - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), Expr(99)( If( @@ -816,24 +522,15 @@ Op( Expr(90)( 1, - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), GreaterThan, Expr(91)( 2, - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), Expr(97)( Seq( @@ -846,60 +543,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + synthesized from Expr(85), ), [ NamedExpr( None, Expr(94)( "error", - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), ], ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), Expr(98)( Tuple, - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), Expr(109)( If( @@ -907,24 +580,15 @@ Op( Expr(100)( 2, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), GreaterThan, Expr(101)( 1, - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), Expr(107)( Seq( @@ -937,60 +601,36 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + synthesized from Expr(94), ), [ NamedExpr( None, Expr(104)( "2_i > 1_i", - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), ], ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(108)( Tuple, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), ), - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), Expr(119)( If( @@ -998,24 +638,15 @@ Op( Expr(110)( 1, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), GreaterThan, Expr(111)( 1, - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), ), - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), Expr(117)( Seq( @@ -1028,66 +659,39 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), ), - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + synthesized from Expr(103), ), [ NamedExpr( None, Expr(114)( "error", - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ], ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ], ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/ops/ops_unsigned_int/syntax.ref b/dada_tests/interpret/ops/ops_unsigned_int/syntax.ref index e9add6f2..85af8d86 100644 --- a/dada_tests/interpret/ops/ops_unsigned_int/syntax.ref +++ b/dada_tests/interpret/ops/ops_unsigned_int/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/interpret/ops/ops_unsigned_int.dada:1:18:53:1), ), data: syntax::Tree { - root_expr: ( - Expr(109), + root_expr: Expr(109)( Seq( [ - ( - Expr(10), + Expr(10)( If( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "1_", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -36,35 +30,28 @@ ), ), EqualEqual, - ( - Expr(3), + Expr(3)( Integer( "2_", ), ), ), ), - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Await( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "1_u + 1_u == 2_u", ), @@ -81,24 +68,19 @@ None, ), ), - ( - Expr(21), + Expr(21)( If( - ( - Expr(15), + Expr(15)( Op( - ( - Expr(13), + Expr(13)( Op( - ( - Expr(11), + Expr(11)( Integer( "1_", ), ), Minus, - ( - Expr(12), + Expr(12)( Integer( "1_", ), @@ -106,35 +88,28 @@ ), ), EqualEqual, - ( - Expr(14), + Expr(14)( Integer( "0_", ), ), ), ), - ( - Expr(20), + Expr(20)( Seq( [ - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "1_u - 1_u == 0_u", ), @@ -151,24 +126,19 @@ None, ), ), - ( - Expr(32), + Expr(32)( If( - ( - Expr(26), + Expr(26)( Op( - ( - Expr(24), + Expr(24)( Op( - ( - Expr(22), + Expr(22)( Integer( "10_", ), ), Times, - ( - Expr(23), + Expr(23)( Integer( "10_", ), @@ -176,35 +146,28 @@ ), ), EqualEqual, - ( - Expr(25), + Expr(25)( Integer( "100_", ), ), ), ), - ( - Expr(31), + Expr(31)( Seq( [ - ( - Expr(30), + Expr(30)( Await( - ( - Expr(29), + Expr(29)( Call( - ( - Expr(27), + Expr(27)( Id( "print", ), ), [ - ( - None, - ( - Expr(28), + None( + Expr(28)( String( "10_u * 10_u == 100_u", ), @@ -221,24 +184,19 @@ None, ), ), - ( - Expr(43), + Expr(43)( If( - ( - Expr(37), + Expr(37)( Op( - ( - Expr(35), + Expr(35)( Op( - ( - Expr(33), + Expr(33)( Integer( "10_", ), ), DividedBy, - ( - Expr(34), + Expr(34)( Integer( "5_", ), @@ -246,35 +204,28 @@ ), ), EqualEqual, - ( - Expr(36), + Expr(36)( Integer( "2_", ), ), ), ), - ( - Expr(42), + Expr(42)( Seq( [ - ( - Expr(41), + Expr(41)( Await( - ( - Expr(40), + Expr(40)( Call( - ( - Expr(38), + Expr(38)( Id( "print", ), ), [ - ( - None, - ( - Expr(39), + None( + Expr(39)( String( "10_u / 5_u == 2_u", ), @@ -291,24 +242,19 @@ None, ), ), - ( - Expr(54), + Expr(54)( If( - ( - Expr(48), + Expr(48)( Op( - ( - Expr(46), + Expr(46)( Op( - ( - Expr(44), + Expr(44)( Integer( "11_", ), ), DividedBy, - ( - Expr(45), + Expr(45)( Integer( "5_", ), @@ -316,35 +262,28 @@ ), ), EqualEqual, - ( - Expr(47), + Expr(47)( Integer( "2_", ), ), ), ), - ( - Expr(53), + Expr(53)( Seq( [ - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(49), + Expr(49)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( String( "11_u / 5_u == 2_u", ), @@ -361,48 +300,38 @@ None, ), ), - ( - Expr(63), + Expr(63)( If( - ( - Expr(57), + Expr(57)( Op( - ( - Expr(55), + Expr(55)( Integer( "1_", ), ), LessThan, - ( - Expr(56), + Expr(56)( Integer( "2_", ), ), ), ), - ( - Expr(62), + Expr(62)( Seq( [ - ( - Expr(61), + Expr(61)( Await( - ( - Expr(60), + Expr(60)( Call( - ( - Expr(58), + Expr(58)( Id( "print", ), ), [ - ( - None, - ( - Expr(59), + None( + Expr(59)( String( "1_u < 2_u", ), @@ -419,48 +348,38 @@ None, ), ), - ( - Expr(72), + Expr(72)( If( - ( - Expr(66), + Expr(66)( Op( - ( - Expr(64), + Expr(64)( Integer( "2_", ), ), LessThan, - ( - Expr(65), + Expr(65)( Integer( "1_", ), ), ), ), - ( - Expr(71), + Expr(71)( Seq( [ - ( - Expr(70), + Expr(70)( Await( - ( - Expr(69), + Expr(69)( Call( - ( - Expr(67), + Expr(67)( Id( "print", ), ), [ - ( - None, - ( - Expr(68), + None( + Expr(68)( String( "error", ), @@ -477,48 +396,38 @@ None, ), ), - ( - Expr(81), + Expr(81)( If( - ( - Expr(75), + Expr(75)( Op( - ( - Expr(73), + Expr(73)( Integer( "1_", ), ), LessThan, - ( - Expr(74), + Expr(74)( Integer( "1_", ), ), ), ), - ( - Expr(80), + Expr(80)( Seq( [ - ( - Expr(79), + Expr(79)( Await( - ( - Expr(78), + Expr(78)( Call( - ( - Expr(76), + Expr(76)( Id( "print", ), ), [ - ( - None, - ( - Expr(77), + None( + Expr(77)( String( "error", ), @@ -535,48 +444,38 @@ None, ), ), - ( - Expr(90), + Expr(90)( If( - ( - Expr(84), + Expr(84)( Op( - ( - Expr(82), + Expr(82)( Integer( "1_", ), ), GreaterThan, - ( - Expr(83), + Expr(83)( Integer( "2_", ), ), ), ), - ( - Expr(89), + Expr(89)( Seq( [ - ( - Expr(88), + Expr(88)( Await( - ( - Expr(87), + Expr(87)( Call( - ( - Expr(85), + Expr(85)( Id( "print", ), ), [ - ( - None, - ( - Expr(86), + None( + Expr(86)( String( "error", ), @@ -593,48 +492,38 @@ None, ), ), - ( - Expr(99), + Expr(99)( If( - ( - Expr(93), + Expr(93)( Op( - ( - Expr(91), + Expr(91)( Integer( "2_", ), ), GreaterThan, - ( - Expr(92), + Expr(92)( Integer( "1_", ), ), ), ), - ( - Expr(98), + Expr(98)( Seq( [ - ( - Expr(97), + Expr(97)( Await( - ( - Expr(96), + Expr(96)( Call( - ( - Expr(94), + Expr(94)( Id( "print", ), ), [ - ( - None, - ( - Expr(95), + None( + Expr(95)( String( "2_u > 1_u", ), @@ -651,48 +540,38 @@ None, ), ), - ( - Expr(108), + Expr(108)( If( - ( - Expr(102), + Expr(102)( Op( - ( - Expr(100), + Expr(100)( Integer( "1_", ), ), GreaterThan, - ( - Expr(101), + Expr(101)( Integer( "1_", ), ), ), ), - ( - Expr(107), + Expr(107)( Seq( [ - ( - Expr(106), + Expr(106)( Await( - ( - Expr(105), + Expr(105)( Call( - ( - Expr(103), + Expr(103)( Id( "print", ), ), [ - ( - None, - ( - Expr(104), + None( + Expr(104)( String( "error", ), diff --git a/dada_tests/interpret/ops/ops_unsigned_int/validated.ref b/dada_tests/interpret/ops/ops_unsigned_int/validated.ref index 0d206714..d86ba60f 100644 --- a/dada_tests/interpret/ops/ops_unsigned_int/validated.ref +++ b/dada_tests/interpret/ops/ops_unsigned_int/validated.ref @@ -10,38 +10,23 @@ Op( Expr(0)( 1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), EqualEqual, Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Seq( @@ -54,60 +39,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( None, Expr(6)( "1_u + 1_u == 2_u", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(10)( Tuple, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(23)( If( @@ -117,38 +78,23 @@ Op( Expr(12)( 1, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Minus, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), EqualEqual, Expr(15)( 0, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Seq( @@ -161,60 +107,36 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(18)( "1_u - 1_u == 0_u", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(22)( Tuple, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(35)( If( @@ -224,38 +146,23 @@ Op( Expr(24)( 10, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Times, Expr(25)( 10, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), EqualEqual, Expr(27)( 100, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Expr(33)( Seq( @@ -268,60 +175,36 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), [ NamedExpr( None, Expr(30)( "10_u * 10_u == 100_u", - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(34)( Tuple, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), Expr(47)( If( @@ -331,38 +214,23 @@ Op( Expr(36)( 10, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), DividedBy, Expr(37)( 5, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), EqualEqual, Expr(39)( 2, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), Expr(45)( Seq( @@ -375,60 +243,36 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + synthesized from Expr(38), ), [ NamedExpr( None, Expr(42)( "10_u / 5_u == 2_u", - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ], ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), Expr(46)( Tuple, - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), Expr(59)( If( @@ -438,38 +282,23 @@ Op( Expr(48)( 11, - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), DividedBy, Expr(49)( 5, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), EqualEqual, Expr(51)( 2, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), Expr(57)( Seq( @@ -482,60 +311,36 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + synthesized from Expr(49), ), [ NamedExpr( None, Expr(54)( "11_u / 5_u == 2_u", - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), ], ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), Expr(58)( Tuple, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), ), - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Expr(69)( If( @@ -543,24 +348,15 @@ Op( Expr(60)( 1, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), LessThan, Expr(61)( 2, - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), Expr(67)( Seq( @@ -573,60 +369,36 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + synthesized from Expr(58), ), [ NamedExpr( None, Expr(64)( "1_u < 2_u", - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), ], ), - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), Expr(68)( Tuple, - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), Expr(79)( If( @@ -634,24 +406,15 @@ Op( Expr(70)( 2, - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), LessThan, Expr(71)( 1, - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), Expr(77)( Seq( @@ -664,60 +427,36 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + synthesized from Expr(67), ), [ NamedExpr( None, Expr(74)( "error", - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), ], ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), Expr(78)( Tuple, - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), Expr(89)( If( @@ -725,24 +464,15 @@ Op( Expr(80)( 1, - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), LessThan, Expr(81)( 1, - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), ), - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), Expr(87)( Seq( @@ -755,60 +485,36 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + synthesized from Expr(76), ), [ NamedExpr( None, Expr(84)( "error", - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), ], ), - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), Expr(88)( Tuple, - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), Expr(99)( If( @@ -816,24 +522,15 @@ Op( Expr(90)( 1, - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), GreaterThan, Expr(91)( 2, - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), Expr(97)( Seq( @@ -846,60 +543,36 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ), - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + synthesized from Expr(85), ), [ NamedExpr( None, Expr(94)( "error", - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), ], ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), Expr(98)( Tuple, - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), Expr(109)( If( @@ -907,24 +580,15 @@ Op( Expr(100)( 2, - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), GreaterThan, Expr(101)( 1, - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), ), - ExprOrigin { - syntax_expr: Expr(93), - synthesized: false, - }, + from Expr(93), ), Expr(107)( Seq( @@ -937,60 +601,36 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + from Expr(94), ), ), - ExprOrigin { - syntax_expr: Expr(94), - synthesized: false, - }, + synthesized from Expr(94), ), [ NamedExpr( None, Expr(104)( "2_u > 1_u", - ExprOrigin { - syntax_expr: Expr(95), - synthesized: false, - }, + from Expr(95), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(96), - synthesized: false, - }, + from Expr(96), ), ), - ExprOrigin { - syntax_expr: Expr(97), - synthesized: false, - }, + from Expr(97), ), ], ), - ExprOrigin { - syntax_expr: Expr(98), - synthesized: false, - }, + from Expr(98), ), Expr(108)( Tuple, - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), ), - ExprOrigin { - syntax_expr: Expr(99), - synthesized: false, - }, + from Expr(99), ), Expr(119)( If( @@ -998,24 +638,15 @@ Op( Expr(110)( 1, - ExprOrigin { - syntax_expr: Expr(100), - synthesized: false, - }, + from Expr(100), ), GreaterThan, Expr(111)( 1, - ExprOrigin { - syntax_expr: Expr(101), - synthesized: false, - }, + from Expr(101), ), ), - ExprOrigin { - syntax_expr: Expr(102), - synthesized: false, - }, + from Expr(102), ), Expr(117)( Seq( @@ -1028,66 +659,39 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + from Expr(103), ), ), - ExprOrigin { - syntax_expr: Expr(103), - synthesized: false, - }, + synthesized from Expr(103), ), [ NamedExpr( None, Expr(114)( "error", - ExprOrigin { - syntax_expr: Expr(104), - synthesized: false, - }, + from Expr(104), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(105), - synthesized: false, - }, + from Expr(105), ), ), - ExprOrigin { - syntax_expr: Expr(106), - synthesized: false, - }, + from Expr(106), ), ], ), - ExprOrigin { - syntax_expr: Expr(107), - synthesized: false, - }, + from Expr(107), ), Expr(118)( Tuple, - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ), - ExprOrigin { - syntax_expr: Expr(108), - synthesized: false, - }, + from Expr(108), ), ], ), - ExprOrigin { - syntax_expr: Expr(109), - synthesized: false, - }, + from Expr(109), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/print_label/syntax.ref b/dada_tests/interpret/print_label/syntax.ref index 2484f020..7d2b3535 100644 --- a/dada_tests/interpret/print_label/syntax.ref +++ b/dada_tests/interpret/print_label/syntax.ref @@ -7,29 +7,21 @@ Tokens(dada_tests/interpret/print_label.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - Some( - "message", - ), - ( - Expr(1), + Some("message")( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/interpret/print_label/validated.ref b/dada_tests/interpret/print_label/validated.ref index 89c69f2b..7c1eeeda 100644 --- a/dada_tests/interpret/print_label/validated.ref +++ b/dada_tests/interpret/print_label/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,30 +22,18 @@ ), Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/print_no_label/syntax.ref b/dada_tests/interpret/print_no_label/syntax.ref index 8aa43061..171cfb0e 100644 --- a/dada_tests/interpret/print_no_label/syntax.ref +++ b/dada_tests/interpret/print_no_label/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/print_no_label.dada:3:18:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/interpret/print_no_label/validated.ref b/dada_tests/interpret/print_no_label/validated.ref index 0e1a91f5..18d8442b 100644 --- a/dada_tests/interpret/print_no_label/validated.ref +++ b/dada_tests/interpret/print_no_label/validated.ref @@ -10,46 +10,28 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/print_wrong_label/syntax.ref b/dada_tests/interpret/print_wrong_label/syntax.ref index 1ec95b2f..6a23ddd5 100644 --- a/dada_tests/interpret/print_wrong_label/syntax.ref +++ b/dada_tests/interpret/print_wrong_label/syntax.ref @@ -7,29 +7,21 @@ Tokens(dada_tests/interpret/print_wrong_label.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - Some( - "greeting", - ), - ( - Expr(1), + Some("greeting")( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/interpret/print_wrong_label/validated.ref b/dada_tests/interpret/print_wrong_label/validated.ref index fedaad3b..b6cdcee6 100644 --- a/dada_tests/interpret/print_wrong_label/validated.ref +++ b/dada_tests/interpret/print_wrong_label/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,30 +22,18 @@ ), Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/string-escape/syntax.ref b/dada_tests/interpret/string-escape/syntax.ref index d198943f..a7c75508 100644 --- a/dada_tests/interpret/string-escape/syntax.ref +++ b/dada_tests/interpret/string-escape/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/string-escape.dada:3:18:29:1), ), data: syntax::Tree { - root_expr: ( - Expr(40), + root_expr: Expr(40)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Foo\\nBar", ), @@ -38,23 +32,18 @@ ), ), ), - ( - Expr(7), + Expr(7)( Await( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "print", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( String( "Foo\\tBar", ), @@ -65,23 +54,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "Foo\\r\\nBar", ), @@ -92,23 +76,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( String( "Foo \\\\ Bar", ), @@ -119,23 +98,18 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( String( "Foo \\\" Bar", ), @@ -146,23 +120,18 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( String( "Foo \\\\", ), @@ -173,23 +142,18 @@ ), ), ), - ( - Expr(27), + Expr(27)( Await( - ( - Expr(26), + Expr(26)( Call( - ( - Expr(24), + Expr(24)( Id( "print", ), ), [ - ( - None, - ( - Expr(25), + None( + Expr(25)( String( "\n\\t Foo\n \\tBar\n ", ), @@ -200,23 +164,18 @@ ), ), ), - ( - Expr(31), + Expr(31)( Await( - ( - Expr(30), + Expr(30)( Call( - ( - Expr(28), + Expr(28)( Id( "print", ), ), [ - ( - None, - ( - Expr(29), + None( + Expr(29)( String( "\\nFoo\\n", ), @@ -227,23 +186,18 @@ ), ), ), - ( - Expr(35), + Expr(35)( Await( - ( - Expr(34), + Expr(34)( Call( - ( - Expr(32), + Expr(32)( Id( "print", ), ), [ - ( - None, - ( - Expr(33), + None( + Expr(33)( String( "\\tFoo\\t", ), @@ -254,23 +208,18 @@ ), ), ), - ( - Expr(39), + Expr(39)( Await( - ( - Expr(38), + Expr(38)( Call( - ( - Expr(36), + Expr(36)( Id( "print", ), ), [ - ( - None, - ( - Expr(37), + None( + Expr(37)( String( "\n \\tFoo\n \\tBar\n ", ), diff --git a/dada_tests/interpret/string-escape/validated.ref b/dada_tests/interpret/string-escape/validated.ref index 59298f83..60368b43 100644 --- a/dada_tests/interpret/string-escape/validated.ref +++ b/dada_tests/interpret/string-escape/validated.ref @@ -10,40 +10,25 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Foo\nBar", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(7)( Await( @@ -53,40 +38,25 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( None, Expr(5)( "Foo\tBar", - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(11)( Await( @@ -96,40 +66,25 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, Expr(9)( "Foo\r\nBar", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(15)( Await( @@ -139,40 +94,25 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, Expr(13)( "Foo \\ Bar", - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(19)( Await( @@ -182,40 +122,25 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(17)( "Foo \" Bar", - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Expr(23)( Await( @@ -225,40 +150,25 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( None, Expr(21)( "Foo \\", - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), Expr(27)( Await( @@ -268,40 +178,25 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), [ NamedExpr( None, Expr(25)( "\t Foo\n \tBar", - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), Expr(31)( Await( @@ -311,40 +206,25 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + synthesized from Expr(28), ), [ NamedExpr( None, Expr(29)( "\nFoo\n", - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(35)( Await( @@ -354,40 +234,25 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + synthesized from Expr(32), ), [ NamedExpr( None, Expr(33)( "\tFoo\t", - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), Expr(39)( Await( @@ -397,46 +262,28 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + synthesized from Expr(36), ), [ NamedExpr( None, Expr(37)( "\tFoo\n\tBar", - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ] \ No newline at end of file diff --git a/dada_tests/interpret/string/syntax.ref b/dada_tests/interpret/string/syntax.ref index 68068525..1684d2f3 100644 --- a/dada_tests/interpret/string/syntax.ref +++ b/dada_tests/interpret/string/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/interpret/string.dada:3:18:33:1), ), data: syntax::Tree { - root_expr: ( - Expr(23), + root_expr: Expr(23)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "\n Foo\n Bar\n ", ), @@ -38,23 +32,18 @@ ), ), ), - ( - Expr(7), + Expr(7)( Await( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "print", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( String( "\n Foo\n\n Bar\n ", ), @@ -65,23 +54,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "\nFoo\nBar\n ", ), @@ -92,20 +76,16 @@ ), ), ), - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( String( "\n \n \n \n ", ), @@ -114,23 +94,18 @@ ], ), ), - ( - Expr(18), + Expr(18)( Await( - ( - Expr(17), + Expr(17)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( String( " Foo", ), @@ -141,23 +116,18 @@ ), ), ), - ( - Expr(22), + Expr(22)( Await( - ( - Expr(21), + Expr(21)( Call( - ( - Expr(19), + Expr(19)( Id( "print", ), ), [ - ( - None, - ( - Expr(20), + None( + Expr(20)( String( "\n I have forced myself to contradict myself\n in order to avoid conforming to my own taste.\n -- Marcel Duchamp\n ", ), diff --git a/dada_tests/interpret/string/validated.ref b/dada_tests/interpret/string/validated.ref index 4bf865bd..168933da 100644 --- a/dada_tests/interpret/string/validated.ref +++ b/dada_tests/interpret/string/validated.ref @@ -10,40 +10,25 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Foo\n Bar", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(7)( Await( @@ -53,40 +38,25 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( None, Expr(5)( "Foo\n\n Bar", - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(11)( Await( @@ -96,40 +66,25 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, Expr(9)( "Foo\nBar", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(14)( Call( @@ -137,34 +92,22 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, Expr(13)( "", - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(18)( Await( @@ -174,40 +117,25 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(16)( " Foo", - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), Expr(22)( Await( @@ -217,46 +145,28 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), [ NamedExpr( None, Expr(20)( "I have forced myself to contradict myself\nin order to avoid conforming to my own taste.\n -- Marcel Duchamp", - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ] \ No newline at end of file diff --git a/dada_tests/parser/binary_ops_after_newline/syntax.ref b/dada_tests/parser/binary_ops_after_newline/syntax.ref index 2048c0e6..0071593f 100644 --- a/dada_tests/parser/binary_ops_after_newline/syntax.ref +++ b/dada_tests/parser/binary_ops_after_newline/syntax.ref @@ -7,28 +7,22 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:1:11:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(8), + root_expr: Expr(8)( Seq( [ - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( If( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), - ( - Expr(2), + Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -37,12 +31,10 @@ ), ), Some( - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Integer( "2_", ), @@ -54,8 +46,7 @@ ), ), Minus, - ( - Expr(6), + Expr(6)( Integer( "5", ), @@ -75,35 +66,30 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:7:12:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(9), + root_expr: Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Var( - ( - "a", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(7)( Op( - ( - Expr(5), + Expr(5)( If( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), - ( - Expr(2), + Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -112,12 +98,10 @@ ), ), Some( - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Integer( "2_", ), @@ -129,8 +113,7 @@ ), ), Minus, - ( - Expr(6), + Expr(6)( Integer( "5", ), @@ -152,39 +135,33 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:13:12:17:1), ), data: syntax::Tree { - root_expr: ( - Expr(11), + root_expr: Expr(11)( Seq( [ - ( - Expr(9), + Expr(9)( Var( - ( - "a", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(8)( Seq( [ - ( - Expr(7), + Expr(7)( Op( - ( - Expr(5), + Expr(5)( If( - ( - Expr(0), + Expr(0)( Boolean( true, ), ), - ( - Expr(2), + Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -193,12 +170,10 @@ ), ), Some( - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Integer( "2_", ), @@ -210,8 +185,7 @@ ), ), Minus, - ( - Expr(6), + Expr(6)( Integer( "5", ), @@ -223,8 +197,7 @@ ), ), ), - ( - Expr(10), + Expr(10)( Id( "a", ), @@ -242,32 +215,28 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:19:12:23:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(8), + Expr(8)( Var( - ( - "a", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(7)( If( - ( - Expr(0), + Expr(0)( Boolean( false, ), ), - ( - Expr(2), + Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Integer( "1_", ), @@ -276,22 +245,18 @@ ), ), Some( - ( - Expr(6), + Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Op( - ( - Expr(3), + Expr(3)( Integer( "2_", ), ), Minus, - ( - Expr(4), + Expr(4)( Integer( "5", ), @@ -306,8 +271,7 @@ ), ), ), - ( - Expr(9), + Expr(9)( Id( "a", ), @@ -325,32 +289,28 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:25:18:32:1), ), data: syntax::Tree { - root_expr: ( - Expr(13), + root_expr: Expr(13)( Seq( [ - ( - Expr(11), + Expr(11)( Var( - ( - "a", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(10)( If( - ( - Expr(0), + Expr(0)( Boolean( false, ), ), - ( - Expr(2), + Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Integer( "1", ), @@ -359,30 +319,23 @@ ), ), Some( - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Op( - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(3), + Expr(3)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Integer( "2", ), @@ -394,8 +347,7 @@ ), ), Minus, - ( - Expr(7), + Expr(7)( Integer( "5", ), @@ -410,8 +362,7 @@ ), ), ), - ( - Expr(12), + Expr(12)( Id( "a", ), @@ -429,30 +380,23 @@ Tokens(dada_tests/parser/binary_ops_after_newline.dada:34:18:41:1), ), data: syntax::Tree { - root_expr: ( - Expr(24), + root_expr: Expr(24)( Seq( [ - ( - Expr(4), + Expr(4)( Await( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Call( - ( - Expr(1), + Expr(1)( Id( "foo", ), @@ -466,26 +410,20 @@ ), ), ), - ( - Expr(9), + Expr(9)( Await( - ( - Expr(8), + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Call( - ( - Expr(6), + Expr(6)( Id( "foo1", ), @@ -499,26 +437,20 @@ ), ), ), - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Call( - ( - Expr(11), + Expr(11)( Id( "foo2", ), @@ -532,26 +464,20 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Call( - ( - Expr(16), + Expr(16)( Id( "foo3", ), @@ -565,14 +491,11 @@ ), ), ), - ( - Expr(22), + Expr(22)( Await( - ( - Expr(21), + Expr(21)( Call( - ( - Expr(20), + Expr(20)( Id( "foo4", ), @@ -582,8 +505,7 @@ ), ), ), - ( - Expr(23), + Expr(23)( Seq( [], ), diff --git a/dada_tests/parser/binary_ops_after_newline/validated.ref b/dada_tests/parser/binary_ops_after_newline/validated.ref index 57d05e64..1c89fb05 100644 --- a/dada_tests/parser/binary_ops_after_newline/validated.ref +++ b/dada_tests/parser/binary_ops_after_newline/validated.ref @@ -8,71 +8,44 @@ If( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(4)( Seq( [ Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), Minus, Expr(6)( 5, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), Expr(11)( Seq( @@ -84,10 +57,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(7)( Op( @@ -95,106 +65,64 @@ If( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(4)( Seq( [ Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), Minus, Expr(6)( 5, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(13)( Seq( @@ -206,10 +134,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(8)( Seq( @@ -220,128 +145,77 @@ If( Expr(0)( true, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(4)( Seq( [ Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), Minus, Expr(6)( 5, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(12)( Give( Place(1)( a{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(12)( Seq( @@ -353,36 +227,24 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(7)( If( Expr(0)( false, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(6)( Seq( @@ -391,94 +253,55 @@ Op( Expr(3)( 2, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Minus, Expr(4)( 5, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(11)( Give( Place(1)( a{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(15)( Seq( @@ -490,36 +313,24 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(10)( If( Expr(0)( false, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(9)( Seq( @@ -534,124 +345,73 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), [ NamedExpr( None, Expr(4)( 2, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Minus, Expr(7)( 5, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(12)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(14)( Give( Place(2)( a{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(24)( Seq( @@ -664,16 +424,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -684,37 +438,22 @@ Reserve( Place(1)( foo, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(9)( Await( @@ -724,16 +463,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -744,37 +477,22 @@ Reserve( Place(3)( foo1, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), [], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(14)( Await( @@ -784,16 +502,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -804,37 +516,22 @@ Reserve( Place(5)( foo2, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(19)( Await( @@ -844,16 +541,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( @@ -864,37 +555,22 @@ Reserve( Place(7)( foo3, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Expr(22)( Await( @@ -904,44 +580,26 @@ Reserve( Place(8)( foo4, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), Expr(23)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ] \ No newline at end of file diff --git a/dada_tests/parser/float/syntax.ref b/dada_tests/parser/float/syntax.ref index 56f4335a..ba248265 100644 --- a/dada_tests/parser/float/syntax.ref +++ b/dada_tests/parser/float/syntax.ref @@ -7,19 +7,18 @@ Tokens(dada_tests/parser/float.dada:1:18:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(18), + root_expr: Expr(18)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "a", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(0)( Float( "1", "2", @@ -27,15 +26,15 @@ ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "b", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "b", + ty: None, + }, + Expr(2)( Float( "1_1", "2_2", @@ -43,15 +42,15 @@ ), ), ), - ( - Expr(5), + Expr(5)( Var( - ( - "c", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "c", + ty: None, + }, + Expr(4)( Float( "1_1_1_", "2_2_2_", @@ -59,23 +58,18 @@ ), ), ), - ( - Expr(9), + Expr(9)( Await( - ( - Expr(8), + Expr(8)( Call( - ( - Expr(6), + Expr(6)( Id( "print", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Id( "a", ), @@ -86,23 +80,18 @@ ), ), ), - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Id( "b", ), @@ -113,23 +102,18 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(14), + Expr(14)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Id( "c", ), diff --git a/dada_tests/parser/float/validated.ref b/dada_tests/parser/float/validated.ref index 8cd193c3..c5fe13a7 100644 --- a/dada_tests/parser/float/validated.ref +++ b/dada_tests/parser/float/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 1.2, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,52 +42,31 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 11.22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( b{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(11)( Seq( @@ -117,52 +75,31 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(8)( 111.222, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(10)( AssignFromPlace( TargetPlace(4)( c{4}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(2)( temp{5}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(15)( Await( @@ -172,16 +109,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), [ NamedExpr( @@ -190,30 +121,18 @@ Reserve( Place(4)( a{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(19)( Await( @@ -223,16 +142,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -241,30 +154,18 @@ Reserve( Place(6)( b{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(23)( Await( @@ -274,16 +175,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( @@ -292,36 +187,21 @@ Reserve( Place(8)( c{4}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ] \ No newline at end of file diff --git a/dada_tests/parser/float_no_decimal/syntax.ref b/dada_tests/parser/float_no_decimal/syntax.ref index e909f182..3f3b0b8d 100644 --- a/dada_tests/parser/float_no_decimal/syntax.ref +++ b/dada_tests/parser/float_no_decimal/syntax.ref @@ -7,19 +7,18 @@ Tokens(dada_tests/parser/float_no_decimal.dada:1:12:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(2), + root_expr: Expr(2)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "a", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(0)( Error, ), ), diff --git a/dada_tests/parser/float_no_decimal/validated.ref b/dada_tests/parser/float_no_decimal/validated.ref index 8ca24003..7b153bb5 100644 --- a/dada_tests/parser/float_no_decimal/validated.ref +++ b/dada_tests/parser/float_no_decimal/validated.ref @@ -9,58 +9,34 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( Error, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ] \ No newline at end of file diff --git a/dada_tests/parser/float_no_space/syntax.ref b/dada_tests/parser/float_no_space/syntax.ref index 3d7fba4a..241fdc6a 100644 --- a/dada_tests/parser/float_no_space/syntax.ref +++ b/dada_tests/parser/float_no_space/syntax.ref @@ -7,19 +7,18 @@ Tokens(dada_tests/parser/float_no_space.dada:1:12:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "a", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(0)( Float( "1", "1", @@ -27,15 +26,15 @@ ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "b", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "b", + ty: None, + }, + Expr(2)( Float( "1", "1", @@ -43,15 +42,15 @@ ), ), ), - ( - Expr(5), + Expr(5)( Var( - ( - "c", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "c", + ty: None, + }, + Expr(4)( Float( "1", "1", diff --git a/dada_tests/parser/float_no_space/validated.ref b/dada_tests/parser/float_no_space/validated.ref index baa91d3c..309b3818 100644 --- a/dada_tests/parser/float_no_space/validated.ref +++ b/dada_tests/parser/float_no_space/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 1.1, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,52 +42,31 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 1.1, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( b{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(11)( Seq( @@ -117,58 +75,34 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(8)( 1.1, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(10)( AssignFromPlace( TargetPlace(4)( c{4}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(2)( temp{5}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/parser/leading_whitespace/syntax.ref b/dada_tests/parser/leading_whitespace/syntax.ref index 1df03e11..0249450a 100644 --- a/dada_tests/parser/leading_whitespace/syntax.ref +++ b/dada_tests/parser/leading_whitespace/syntax.ref @@ -7,29 +7,21 @@ Tokens(dada_tests/parser/leading_whitespace.dada:3:18:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - Some( - "message", - ), - ( - Expr(1), + Some("message")( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/parser/leading_whitespace/validated.ref b/dada_tests/parser/leading_whitespace/validated.ref index 89c69f2b..7c1eeeda 100644 --- a/dada_tests/parser/leading_whitespace/validated.ref +++ b/dada_tests/parser/leading_whitespace/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -28,30 +22,18 @@ ), Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/parser/no_adjacent_ops/syntax.ref b/dada_tests/parser/no_adjacent_ops/syntax.ref index 5b2e10cb..b53b743c 100644 --- a/dada_tests/parser/no_adjacent_ops/syntax.ref +++ b/dada_tests/parser/no_adjacent_ops/syntax.ref @@ -7,29 +7,26 @@ Tokens(dada_tests/parser/no_adjacent_ops.dada:1:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(13), + root_expr: Expr(13)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "x", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "22", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "44", ), @@ -38,48 +35,38 @@ ), ), ), - ( - Expr(12), + Expr(12)( If( - ( - Expr(6), + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Id( "x", ), ), EqualEqual, - ( - Expr(5), + Expr(5)( Integer( "66", ), ), ), ), - ( - Expr(11), + Expr(11)( Seq( [ - ( - Expr(10), + Expr(10)( Await( - ( - Expr(9), + Expr(9)( Call( - ( - Expr(7), + Expr(7)( Id( "print", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( String( "Huzzah", ), diff --git a/dada_tests/parser/no_adjacent_ops/validated.ref b/dada_tests/parser/no_adjacent_ops/validated.ref index ec32a6f6..9b53b232 100644 --- a/dada_tests/parser/no_adjacent_ops/validated.ref +++ b/dada_tests/parser/no_adjacent_ops/validated.ref @@ -9,68 +9,41 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Op( Expr(0)( 22, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 44, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(15)( If( @@ -80,30 +53,18 @@ Give( Place(1)( x{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), EqualEqual, Expr(7)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(13)( Seq( @@ -116,66 +77,39 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( None, Expr(10)( "Huzzah", - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(14)( Tuple, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ] \ No newline at end of file diff --git a/dada_tests/parser/param_separators/syntax.ref b/dada_tests/parser/param_separators/syntax.ref index c1701af6..220f1f76 100644 --- a/dada_tests/parser/param_separators/syntax.ref +++ b/dada_tests/parser/param_separators/syntax.ref @@ -7,8 +7,7 @@ Tokens(dada_tests/parser/param_separators.dada:1:15:2:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -23,8 +22,7 @@ Tokens(dada_tests/parser/param_separators.dada:4:16:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -39,8 +37,7 @@ Tokens(dada_tests/parser/param_separators.dada:7:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -55,8 +52,7 @@ Tokens(dada_tests/parser/param_separators.dada:10:19:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -71,8 +67,7 @@ Tokens(dada_tests/parser/param_separators.dada:13:20:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -87,8 +82,7 @@ Tokens(dada_tests/parser/param_separators.dada:20:4:21:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -103,8 +97,7 @@ Tokens(dada_tests/parser/param_separators.dada:25:4:26:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -119,8 +112,7 @@ Tokens(dada_tests/parser/param_separators.dada:31:4:32:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -135,8 +127,7 @@ Tokens(dada_tests/parser/param_separators.dada:37:4:38:1), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), diff --git a/dada_tests/parser/param_separators/validated.ref b/dada_tests/parser/param_separators/validated.ref index 31e339f1..be37b997 100644 --- a/dada_tests/parser/param_separators/validated.ref +++ b/dada_tests/parser/param_separators/validated.ref @@ -3,81 +3,54 @@ Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ] \ No newline at end of file diff --git a/dada_tests/parser/return/syntax.ref b/dada_tests/parser/return/syntax.ref index a034eb19..69b6835e 100644 --- a/dada_tests/parser/return/syntax.ref +++ b/dada_tests/parser/return/syntax.ref @@ -7,26 +7,21 @@ Tokens(dada_tests/parser/return.dada:1:18:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Return( Some( - ( - Expr(2), + Expr(2)( Op( - ( - Expr(0), + Expr(0)( Integer( "22", ), ), Plus, - ( - Expr(1), + Expr(1)( Integer( "44", ), diff --git a/dada_tests/parser/return/validated.ref b/dada_tests/parser/return/validated.ref index 0c976873..04668a8c 100644 --- a/dada_tests/parser/return/validated.ref +++ b/dada_tests/parser/return/validated.ref @@ -8,36 +8,21 @@ Op( Expr(0)( 22, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Plus, Expr(1)( 44, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/parser/return_precedence/syntax.ref b/dada_tests/parser/return_precedence/syntax.ref index 62358130..272af1b3 100644 --- a/dada_tests/parser/return_precedence/syntax.ref +++ b/dada_tests/parser/return_precedence/syntax.ref @@ -7,12 +7,10 @@ Tokens(dada_tests/parser/return_precedence.dada:1:12:4:1), ), data: syntax::Tree { - root_expr: ( - Expr(1), + root_expr: Expr(1)( Seq( [ - ( - Expr(0), + Expr(0)( Return( None, ), diff --git a/dada_tests/parser/return_precedence/validated.ref b/dada_tests/parser/return_precedence/validated.ref index 7f25589c..de80d6e7 100644 --- a/dada_tests/parser/return_precedence/validated.ref +++ b/dada_tests/parser/return_precedence/validated.ref @@ -6,22 +6,13 @@ Return( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ] \ No newline at end of file diff --git a/dada_tests/parser/return_without_value/syntax.ref b/dada_tests/parser/return_without_value/syntax.ref index 1dbaeaaa..e12e99a1 100644 --- a/dada_tests/parser/return_without_value/syntax.ref +++ b/dada_tests/parser/return_without_value/syntax.ref @@ -7,12 +7,10 @@ Tokens(dada_tests/parser/return_without_value.dada:1:12:3:1), ), data: syntax::Tree { - root_expr: ( - Expr(1), + root_expr: Expr(1)( Seq( [ - ( - Expr(0), + Expr(0)( Return( None, ), diff --git a/dada_tests/parser/return_without_value/validated.ref b/dada_tests/parser/return_without_value/validated.ref index 7f25589c..de80d6e7 100644 --- a/dada_tests/parser/return_without_value/validated.ref +++ b/dada_tests/parser/return_without_value/validated.ref @@ -6,22 +6,13 @@ Return( Expr(0)( Tuple, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ] \ No newline at end of file diff --git a/dada_tests/parser/span_lhs_binary_op/syntax.ref b/dada_tests/parser/span_lhs_binary_op/syntax.ref index 16fde568..5e6152ca 100644 --- a/dada_tests/parser/span_lhs_binary_op/syntax.ref +++ b/dada_tests/parser/span_lhs_binary_op/syntax.ref @@ -7,47 +7,43 @@ Tokens(dada_tests/parser/span_lhs_binary_op.dada:1:18:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(8), + root_expr: Expr(8)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "x", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( String( "foo", ), ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "y", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "y", + ty: None, + }, + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Op( - ( - Expr(2), + Expr(2)( Id( "x", ), ), Plus, - ( - Expr(3), + Expr(3)( Integer( "44", ), @@ -55,8 +51,7 @@ ), ), Plus, - ( - Expr(5), + Expr(5)( Integer( "66", ), diff --git a/dada_tests/parser/span_lhs_binary_op/validated.ref b/dada_tests/parser/span_lhs_binary_op/validated.ref index 8f416924..4ab5e785 100644 --- a/dada_tests/parser/span_lhs_binary_op/validated.ref +++ b/dada_tests/parser/span_lhs_binary_op/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( "foo", - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(11)( Seq( @@ -63,10 +42,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( Op( @@ -76,85 +52,49 @@ Give( Place(1)( x{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Plus, Expr(5)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Plus, Expr(7)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( y{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ] \ No newline at end of file diff --git a/dada_tests/parser/unary/syntax.ref b/dada_tests/parser/unary/syntax.ref index 361bd165..9e670f72 100644 --- a/dada_tests/parser/unary/syntax.ref +++ b/dada_tests/parser/unary/syntax.ref @@ -7,31 +7,24 @@ Tokens(dada_tests/parser/unary.dada:1:18:24:1), ), data: syntax::Tree { - root_expr: ( - Expr(92), + root_expr: Expr(92)( Seq( [ - ( - Expr(4), + Expr(4)( Await( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Unary( Minus, - ( - Expr(1), + Expr(1)( Integer( "1", ), @@ -44,42 +37,36 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "x", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(5)( Integer( "1", ), ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(7), + Expr(7)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Unary( Minus, - ( - Expr(8), + Expr(8)( Id( "x", ), @@ -92,31 +79,24 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Unary( Minus, - ( - Expr(14), + Expr(14)( Unary( Minus, - ( - Expr(13), + Expr(13)( Integer( "1", ), @@ -131,37 +111,29 @@ ), ), ), - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( Op( - ( - Expr(19), + Expr(19)( Integer( "2", ), ), Times, - ( - Expr(21), + Expr(21)( Unary( Minus, - ( - Expr(20), + Expr(20)( Integer( "1", ), @@ -176,37 +148,29 @@ ), ), ), - ( - Expr(31), + Expr(31)( Await( - ( - Expr(30), + Expr(30)( Call( - ( - Expr(25), + Expr(25)( Id( "print", ), ), [ - ( - None, - ( - Expr(29), + None( + Expr(29)( Op( - ( - Expr(26), + Expr(26)( Integer( "2", ), ), Minus, - ( - Expr(28), + Expr(28)( Unary( Minus, - ( - Expr(27), + Expr(27)( Integer( "1", ), @@ -221,37 +185,29 @@ ), ), ), - ( - Expr(38), + Expr(38)( Await( - ( - Expr(37), + Expr(37)( Call( - ( - Expr(32), + Expr(32)( Id( "print", ), ), [ - ( - None, - ( - Expr(36), + None( + Expr(36)( Op( - ( - Expr(33), + Expr(33)( Integer( "2", ), ), Plus, - ( - Expr(35), + Expr(35)( Unary( Minus, - ( - Expr(34), + Expr(34)( Integer( "1", ), @@ -266,37 +222,29 @@ ), ), ), - ( - Expr(45), + Expr(45)( Await( - ( - Expr(44), + Expr(44)( Call( - ( - Expr(39), + Expr(39)( Id( "print", ), ), [ - ( - None, - ( - Expr(43), + None( + Expr(43)( Op( - ( - Expr(40), + Expr(40)( Integer( "2", ), ), DividedBy, - ( - Expr(42), + Expr(42)( Unary( Minus, - ( - Expr(41), + Expr(41)( Integer( "1", ), @@ -311,37 +259,29 @@ ), ), ), - ( - Expr(52), + Expr(52)( Await( - ( - Expr(51), + Expr(51)( Call( - ( - Expr(46), + Expr(46)( Id( "print", ), ), [ - ( - None, - ( - Expr(50), + None( + Expr(50)( Op( - ( - Expr(47), + Expr(47)( Integer( "2", ), ), Times, - ( - Expr(49), + Expr(49)( Unary( Minus, - ( - Expr(48), + Expr(48)( Integer( "1", ), @@ -356,37 +296,29 @@ ), ), ), - ( - Expr(59), + Expr(59)( Await( - ( - Expr(58), + Expr(58)( Call( - ( - Expr(53), + Expr(53)( Id( "print", ), ), [ - ( - None, - ( - Expr(57), + None( + Expr(57)( Op( - ( - Expr(54), + Expr(54)( Integer( "2", ), ), Minus, - ( - Expr(56), + Expr(56)( Unary( Minus, - ( - Expr(55), + Expr(55)( Integer( "1", ), @@ -401,37 +333,29 @@ ), ), ), - ( - Expr(66), + Expr(66)( Await( - ( - Expr(65), + Expr(65)( Call( - ( - Expr(60), + Expr(60)( Id( "print", ), ), [ - ( - None, - ( - Expr(64), + None( + Expr(64)( Op( - ( - Expr(61), + Expr(61)( Integer( "2", ), ), Plus, - ( - Expr(63), + Expr(63)( Unary( Minus, - ( - Expr(62), + Expr(62)( Integer( "1", ), @@ -446,37 +370,29 @@ ), ), ), - ( - Expr(73), + Expr(73)( Await( - ( - Expr(72), + Expr(72)( Call( - ( - Expr(67), + Expr(67)( Id( "print", ), ), [ - ( - None, - ( - Expr(71), + None( + Expr(71)( Op( - ( - Expr(68), + Expr(68)( Integer( "2", ), ), DividedBy, - ( - Expr(70), + Expr(70)( Unary( Minus, - ( - Expr(69), + Expr(69)( Integer( "1", ), @@ -491,29 +407,26 @@ ), ), ), - ( - Expr(78), + Expr(78)( Var( - ( - "a", - None, - ), - ( - Expr(77), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(77)( Op( - ( - Expr(74), + Expr(74)( Integer( "2", ), ), Minus, - ( - Expr(76), + Expr(76)( Unary( Minus, - ( - Expr(75), + Expr(75)( Integer( "1", ), @@ -524,23 +437,18 @@ ), ), ), - ( - Expr(82), + Expr(82)( Await( - ( - Expr(81), + Expr(81)( Call( - ( - Expr(79), + Expr(79)( Id( "print", ), ), [ - ( - None, - ( - Expr(80), + None( + Expr(80)( Id( "a", ), @@ -551,40 +459,31 @@ ), ), ), - ( - Expr(91), + Expr(91)( Await( - ( - Expr(90), + Expr(90)( Call( - ( - Expr(83), + Expr(83)( Id( "print", ), ), [ - ( - None, - ( - Expr(89), + None( + Expr(89)( Op( - ( - Expr(84), + Expr(84)( Integer( "22", ), ), Plus, - ( - Expr(88), + Expr(88)( Op( - ( - Expr(86), + Expr(86)( Unary( Minus, - ( - Expr(85), + Expr(85)( Integer( "66", ), @@ -592,8 +491,7 @@ ), ), DividedBy, - ( - Expr(87), + Expr(87)( Integer( "3", ), diff --git a/dada_tests/parser/unary/validated.ref b/dada_tests/parser/unary/validated.ref index 3719e5fd..4b8a0053 100644 --- a/dada_tests/parser/unary/validated.ref +++ b/dada_tests/parser/unary/validated.ref @@ -10,16 +10,10 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -29,30 +23,18 @@ Minus, Expr(1)( 1, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(8)( Seq( @@ -61,52 +43,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(5)( 1, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(7)( AssignFromPlace( TargetPlace(0)( x{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), Expr(13)( Await( @@ -116,16 +77,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -137,36 +92,21 @@ Give( Place(3)( x{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(19)( Await( @@ -176,16 +116,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -198,36 +132,21 @@ Minus, Expr(15)( 1, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(26)( Await( @@ -237,16 +156,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -255,10 +168,7 @@ Op( Expr(21)( 2, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Times, Expr(23)( @@ -266,36 +176,21 @@ Minus, Expr(22)( 1, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), Expr(33)( Await( @@ -305,16 +200,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + synthesized from Expr(25), ), [ NamedExpr( @@ -323,10 +212,7 @@ Op( Expr(28)( 2, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Minus, Expr(30)( @@ -334,36 +220,21 @@ Minus, Expr(29)( 1, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), Expr(40)( Await( @@ -373,16 +244,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + synthesized from Expr(32), ), [ NamedExpr( @@ -391,10 +256,7 @@ Op( Expr(35)( 2, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), Plus, Expr(37)( @@ -402,36 +264,21 @@ Minus, Expr(36)( 1, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ), - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), Expr(47)( Await( @@ -441,16 +288,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + synthesized from Expr(39), ), [ NamedExpr( @@ -459,10 +300,7 @@ Op( Expr(42)( 2, - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), DividedBy, Expr(44)( @@ -470,36 +308,21 @@ Minus, Expr(43)( 1, - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), ), - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), Expr(54)( Await( @@ -509,16 +332,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + synthesized from Expr(46), ), [ NamedExpr( @@ -527,10 +344,7 @@ Op( Expr(49)( 2, - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), Times, Expr(51)( @@ -538,36 +352,21 @@ Minus, Expr(50)( 1, - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(51), - synthesized: false, - }, + from Expr(51), ), ), - ExprOrigin { - syntax_expr: Expr(52), - synthesized: false, - }, + from Expr(52), ), Expr(61)( Await( @@ -577,16 +376,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + from Expr(53), ), ), - ExprOrigin { - syntax_expr: Expr(53), - synthesized: false, - }, + synthesized from Expr(53), ), [ NamedExpr( @@ -595,10 +388,7 @@ Op( Expr(56)( 2, - ExprOrigin { - syntax_expr: Expr(54), - synthesized: false, - }, + from Expr(54), ), Minus, Expr(58)( @@ -606,36 +396,21 @@ Minus, Expr(57)( 1, - ExprOrigin { - syntax_expr: Expr(55), - synthesized: false, - }, + from Expr(55), ), ), - ExprOrigin { - syntax_expr: Expr(56), - synthesized: false, - }, + from Expr(56), ), ), - ExprOrigin { - syntax_expr: Expr(57), - synthesized: false, - }, + from Expr(57), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(58), - synthesized: false, - }, + from Expr(58), ), ), - ExprOrigin { - syntax_expr: Expr(59), - synthesized: false, - }, + from Expr(59), ), Expr(68)( Await( @@ -645,16 +420,10 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + from Expr(60), ), ), - ExprOrigin { - syntax_expr: Expr(60), - synthesized: false, - }, + synthesized from Expr(60), ), [ NamedExpr( @@ -663,10 +432,7 @@ Op( Expr(63)( 2, - ExprOrigin { - syntax_expr: Expr(61), - synthesized: false, - }, + from Expr(61), ), Plus, Expr(65)( @@ -674,36 +440,21 @@ Minus, Expr(64)( 1, - ExprOrigin { - syntax_expr: Expr(62), - synthesized: false, - }, + from Expr(62), ), ), - ExprOrigin { - syntax_expr: Expr(63), - synthesized: false, - }, + from Expr(63), ), ), - ExprOrigin { - syntax_expr: Expr(64), - synthesized: false, - }, + from Expr(64), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(65), - synthesized: false, - }, + from Expr(65), ), ), - ExprOrigin { - syntax_expr: Expr(66), - synthesized: false, - }, + from Expr(66), ), Expr(75)( Await( @@ -713,16 +464,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + from Expr(67), ), ), - ExprOrigin { - syntax_expr: Expr(67), - synthesized: false, - }, + synthesized from Expr(67), ), [ NamedExpr( @@ -731,10 +476,7 @@ Op( Expr(70)( 2, - ExprOrigin { - syntax_expr: Expr(68), - synthesized: false, - }, + from Expr(68), ), DividedBy, Expr(72)( @@ -742,36 +484,21 @@ Minus, Expr(71)( 1, - ExprOrigin { - syntax_expr: Expr(69), - synthesized: false, - }, + from Expr(69), ), ), - ExprOrigin { - syntax_expr: Expr(70), - synthesized: false, - }, + from Expr(70), ), ), - ExprOrigin { - syntax_expr: Expr(71), - synthesized: false, - }, + from Expr(71), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(72), - synthesized: false, - }, + from Expr(72), ), ), - ExprOrigin { - syntax_expr: Expr(73), - synthesized: false, - }, + from Expr(73), ), Expr(82)( Seq( @@ -780,19 +507,13 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(77), - synthesized: true, - }, + synthesized from Expr(77), ), Expr(79)( Op( Expr(76)( 2, - ExprOrigin { - syntax_expr: Expr(74), - synthesized: false, - }, + from Expr(74), ), Minus, Expr(78)( @@ -800,57 +521,33 @@ Minus, Expr(77)( 1, - ExprOrigin { - syntax_expr: Expr(75), - synthesized: false, - }, + from Expr(75), ), ), - ExprOrigin { - syntax_expr: Expr(76), - synthesized: false, - }, + from Expr(76), ), ), - ExprOrigin { - syntax_expr: Expr(77), - synthesized: false, - }, + from Expr(77), ), ), - ExprOrigin { - syntax_expr: Expr(77), - synthesized: true, - }, + synthesized from Expr(77), ), Expr(81)( AssignFromPlace( TargetPlace(2)( a{2}, - ExprOrigin { - syntax_expr: Expr(78), - synthesized: true, - }, + synthesized from Expr(78), ), Place(13)( temp{3}, - ExprOrigin { - syntax_expr: Expr(77), - synthesized: true, - }, + synthesized from Expr(77), ), ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + from Expr(78), ), ], ), - ExprOrigin { - syntax_expr: Expr(78), - synthesized: false, - }, + synthesized from Expr(78), ), Expr(86)( Await( @@ -860,16 +557,10 @@ Reserve( Place(14)( Print, - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + from Expr(79), ), ), - ExprOrigin { - syntax_expr: Expr(79), - synthesized: false, - }, + synthesized from Expr(79), ), [ NamedExpr( @@ -878,30 +569,18 @@ Reserve( Place(15)( a{2}, - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + from Expr(80), ), ), - ExprOrigin { - syntax_expr: Expr(80), - synthesized: false, - }, + synthesized from Expr(80), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(81), - synthesized: false, - }, + from Expr(81), ), ), - ExprOrigin { - syntax_expr: Expr(82), - synthesized: false, - }, + from Expr(82), ), Expr(95)( Await( @@ -911,16 +590,10 @@ Reserve( Place(16)( Print, - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + from Expr(83), ), ), - ExprOrigin { - syntax_expr: Expr(83), - synthesized: false, - }, + synthesized from Expr(83), ), [ NamedExpr( @@ -929,10 +602,7 @@ Op( Expr(88)( 22, - ExprOrigin { - syntax_expr: Expr(84), - synthesized: false, - }, + from Expr(84), ), Plus, Expr(92)( @@ -942,56 +612,32 @@ Minus, Expr(89)( 66, - ExprOrigin { - syntax_expr: Expr(85), - synthesized: false, - }, + from Expr(85), ), ), - ExprOrigin { - syntax_expr: Expr(86), - synthesized: false, - }, + from Expr(86), ), DividedBy, Expr(91)( 3, - ExprOrigin { - syntax_expr: Expr(87), - synthesized: false, - }, + from Expr(87), ), ), - ExprOrigin { - syntax_expr: Expr(88), - synthesized: false, - }, + from Expr(88), ), ), - ExprOrigin { - syntax_expr: Expr(89), - synthesized: false, - }, + from Expr(89), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(90), - synthesized: false, - }, + from Expr(90), ), ), - ExprOrigin { - syntax_expr: Expr(91), - synthesized: false, - }, + from Expr(91), ), ], ), - ExprOrigin { - syntax_expr: Expr(92), - synthesized: false, - }, + from Expr(92), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.bir.ref new file mode 100644 index 00000000..dc754fc3 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.bir.ref @@ -0,0 +1,131 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(4), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(4), + None, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignPlace( + q{2}, + p{0}, + ), + Expr(6), + ), + ( + AssignPlace( + x{3}, + p{0}.x, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.ref b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.ref index d0e9ee1e..73be0b13 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-0.ref @@ -49,55 +49,6 @@ digraph { } } } -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - - -
main
p
q
x
(in-flight): "()"
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="solid", penwidth=3.0, arrowtype="normal", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - - -
main
p
q
x
- >; - ]; - } - } -} Error: your lease to this object was cancelled ╭─[class:9:9] │ diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-1.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-1.bir.ref new file mode 100644 index 00000000..e0ed58e0 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/HeapGraph-1.bir.ref @@ -0,0 +1,131 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + p{0}, + ), + Expr(6), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(6), + None, + ), + Expr(6), + ), + ( + AssignPlace( + x{3}, + p{0}.x, + ), + Expr(9), + ), + ( + AssignExpr( + temp{4}, + (), + ), + Expr(9), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/syntax.ref index ea2fcf0b..84648695 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-give-10.dada:3:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -55,33 +45,32 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "q", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(5)( Id( "p", ), ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "x", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(8)( Dot( - ( - Expr(7), + Expr(7)( Id( "p", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/validated.ref index 65181673..89fdaf51 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-give-10/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-give-10/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,112 +42,67 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(7)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(3)( x{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( Dot( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), "x", ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.bir.ref new file mode 100644 index 00000000..66028078 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.bir.ref @@ -0,0 +1,259 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{8}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{9}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{10}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{8}, + [ + temp{9}, + temp{10}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(2), + ), + ( + Clear( + temp{9}, + ), + Expr(1), + ), + ( + Clear( + temp{8}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{7}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{7}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + p{0}.lease, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{11}, + (), + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{4}, + q{2}.lease, + ), + Expr(8), + ), + ( + AssignExpr( + temp{13}, + temp{4}.x.give, + ), + Expr(9), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(10), + ), + ( + AssignExpr( + temp{14}, + 1, + ), + Expr(10), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(10), + Some( + temp{14}, + ), + ), + Expr(10), + ), + ( + AssignExpr( + temp{5}, + temp{13} + temp{14}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{12}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{12}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + Print.reserve, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + p{0}.x.reserve, + ), + Expr(14), + ), + ], + Assign( + temp{15}, + Call( + temp{16}, + [ + temp{17}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{17}, + ), + Expr(14), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ], + Assign( + temp{6}, + Await( + temp{15}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(15), + ), + ], + Return( + temp{6}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.ref index 67d8ebc0..dff533e4 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-0.ref @@ -14,7 +14,7 @@ digraph { main p q - (in-flight): "1" + (in-flight): "1" >; ]; @@ -29,7 +29,7 @@ digraph { > ]; "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } subgraph cluster_before { label=<before> @@ -57,7 +57,7 @@ digraph { > ]; "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } } 23 diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.bir.ref new file mode 100644 index 00000000..dc0e0a70 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.bir.ref @@ -0,0 +1,257 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{8}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{9}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{10}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{8}, + [ + temp{9}, + temp{10}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(2), + ), + ( + Clear( + temp{9}, + ), + Expr(1), + ), + ( + Clear( + temp{8}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{7}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{7}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + p{0}.lease, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{11}, + (), + ), + Expr(7), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{4}, + q{2}.lease, + ), + Expr(8), + ), + ( + AssignExpr( + temp{13}, + temp{4}.x.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + 1, + ), + Expr(10), + ), + ( + AssignExpr( + temp{5}, + temp{13} + temp{14}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(11), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, + ), + Expr(11), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(11), + None, + ), + Expr(11), + ), + ( + AssignExpr( + temp{12}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{12}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + Print.reserve, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + p{0}.x.reserve, + ), + Expr(14), + ), + ], + Assign( + temp{15}, + Call( + temp{16}, + [ + temp{17}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{17}, + ), + Expr(14), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ], + Assign( + temp{6}, + Await( + temp{15}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(15), + ), + ], + Return( + temp{6}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.ref index e5fe5a0e..b8be6f1b 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/HeapGraph-1.ref @@ -1,177 +1,4 @@ # Breakpoint: Expr(11) at class:6:5:6:13 -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
(in-flight): "22"
- >; - ]; - } - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "23"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "23"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - -
main
p
q
- >; - ]; - } - beforenode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} digraph { node[shape = "note"]; rankdir = "LR"; @@ -187,7 +14,6 @@ digraph { main p q - (in-flight): "()" >; ]; @@ -195,12 +21,12 @@ digraph { afternode0 [ label = < - +
Point
x: "23"
x: "23"
y: "44"
> ]; "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } subgraph cluster_before { label=<before> @@ -226,7 +52,7 @@ digraph { > ]; "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } } 23 diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/bir.ref index 1a69b7bc..8d47c483 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/bir.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/bir.ref @@ -5,21 +5,21 @@ [ ( AssignExpr( - temp{7}, + temp{8}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{8}, + temp{9}, 22, ), Expr(1), ), ( AssignExpr( - temp{9}, + temp{10}, 44, ), Expr(2), @@ -28,10 +28,10 @@ Assign( temp{1}, Call( - temp{7}, + temp{8}, [ - temp{8}, temp{9}, + temp{10}, ], [ Some( @@ -49,19 +49,19 @@ [ ( Clear( - temp{9}, + temp{10}, ), Expr(2), ), ( Clear( - temp{8}, + temp{9}, ), Expr(1), ), ( Clear( - temp{7}, + temp{8}, ), Expr(0), ), @@ -74,14 +74,14 @@ ), ( AssignExpr( - temp{6}, + temp{7}, (), ), Expr(4), ), ( Clear( - temp{6}, + temp{7}, ), Expr(4), ), @@ -101,91 +101,98 @@ ), ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(7), ), ( Clear( - temp{10}, + temp{11}, ), Expr(7), ), ( AssignExpr( temp{4}, - q{2}.reserve, + q{2}.lease, ), Expr(8), ), ( AssignExpr( - temp{12}, - q{2}.x.give, + temp{13}, + temp{4}.x.give, ), - Expr(11), + Expr(9), ), ( AssignExpr( - temp{13}, + temp{14}, 1, ), Expr(10), ), ( AssignExpr( - temp{4}.x, - temp{12} + temp{13}, + temp{5}, + temp{13} + temp{14}, ), Expr(11), ), ( Clear( - temp{13}, + temp{14}, ), Expr(10), ), ( Clear( - temp{12}, + temp{13}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, ), Expr(11), ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(11), ), ( Clear( - temp{11}, + temp{12}, ), Expr(11), ), ( AssignExpr( - temp{15}, + temp{16}, Print.reserve, ), Expr(12), ), ( AssignExpr( - temp{16}, + temp{17}, p{0}.x.reserve, ), Expr(14), ), ], Assign( - temp{14}, + temp{15}, Call( - temp{15}, + temp{16}, [ - temp{16}, + temp{17}, ], [ None, @@ -198,21 +205,21 @@ [ ( Clear( - temp{16}, + temp{17}, ), Expr(14), ), ( Clear( - temp{15}, + temp{16}, ), Expr(12), ), ], Assign( - temp{5}, + temp{6}, Await( - temp{14}, + temp{15}, ), BasicBlock(3), ), @@ -221,13 +228,13 @@ [ ( Clear( - temp{14}, + temp{15}, ), Expr(15), ), ], Return( - temp{5}, + temp{6}, ), ), }, diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/syntax.ref index 19717648..3cb6dc06 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-lease-10.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -55,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -75,14 +64,11 @@ ), ), ), - ( - Expr(11), + Expr(11)( OpEq( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "q", ), @@ -91,34 +77,27 @@ ), ), PlusEqual, - ( - Expr(10), + Expr(10)( Integer( "1", ), ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Dot( - ( - Expr(13), + Expr(13)( Id( "p", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/validated.ref index 1f48f054..e5bf7db6 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-10/validated.ref @@ -1,5 +1,5 @@ [ - Expr(22)( + Expr(23)( Seq( [ Expr(6)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,53 +42,32 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -109,230 +76,156 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), - Expr(17)( + Expr(18)( Seq( [ - Expr(15)( + Expr(12)( Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), - Expr(14)( - Reserve( - Place(6)( + Expr(11)( + Lease( + Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(16)( Assign( - TargetPlace(5)( - Dot( - Place(7)( - temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, - ), - "x", - ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + TargetPlace(6)( + temp{5}, + synthesized from Expr(11), ), - Expr(13)( + Expr(15)( Op( - Expr(11)( + Expr(13)( Give( - Place(5)( + Place(6)( Dot( - Place(4)( - q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + Place(5)( + temp{4}, + synthesized from Expr(8), ), "x", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(9), ), Plus, - Expr(12)( + Expr(14)( 1, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), + ), + Expr(17)( + AssignFromPlace( + TargetPlace(5)( + Dot( + Place(5)( + temp{4}, + synthesized from Expr(8), + ), + "x", + ), + from Expr(9), + ), + Place(7)( + temp{5}, + synthesized from Expr(11), + ), + ), + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), - Expr(21)( + Expr(22)( Await( - Expr(20)( + Expr(21)( Call( - Expr(18)( + Expr(19)( Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, - Expr(19)( + Expr(20)( Reserve( Place(10)( Dot( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), "x", ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.bir.ref new file mode 100644 index 00000000..97822820 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.bir.ref @@ -0,0 +1,284 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{11}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{12}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(2), + ), + ( + Clear( + temp{11}, + ), + Expr(1), + ), + ( + Clear( + temp{10}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{9}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + p{0}.lease, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{13}, + (), + ), + Expr(7), + ), + ( + Clear( + temp{13}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{5}, + q{2}.lease, + ), + Expr(9), + ), + ( + AssignPlace( + r{4}, + temp{5}, + ), + Expr(10), + ), + ( + AssignExpr( + temp{14}, + (), + ), + Expr(10), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + AssignExpr( + temp{6}, + r{4}.lease, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + temp{6}.x.give, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + 1, + ), + Expr(13), + ), + ( + AssignExpr( + temp{7}, + temp{16} + temp{17}, + ), + Expr(14), + ), + ( + Clear( + temp{17}, + ), + Expr(13), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(14), + ), + ( + AssignPlace( + temp{6}.x, + temp{7}, + ), + Expr(14), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(14), + None, + ), + Expr(14), + ), + ( + AssignExpr( + temp{15}, + (), + ), + Expr(14), + ), + ( + Clear( + temp{15}, + ), + Expr(14), + ), + ( + AssignExpr( + temp{19}, + Print.reserve, + ), + Expr(15), + ), + ( + AssignExpr( + temp{20}, + p{0}.x.reserve, + ), + Expr(17), + ), + ], + Assign( + temp{18}, + Call( + temp{19}, + [ + temp{20}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{20}, + ), + Expr(17), + ), + ( + Clear( + temp{19}, + ), + Expr(15), + ), + ], + Assign( + temp{8}, + Await( + temp{18}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{18}, + ), + Expr(18), + ), + ], + Return( + temp{8}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.ref index 1b30fae6..ac2203da 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/HeapGraph-0.ref @@ -1,189 +1,4 @@ # Breakpoint: Expr(14) at class:7:5:7:13 -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - - -
main
p
q
r
(in-flight): "22"
- >; - ]; - } - afternode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "afterstack":4 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - - -
main
p
q
r
- >; - ]; - } - beforenode0 [ - color = "slategray", - fontcolor = "slategray", - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "beforestack":4 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
r
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "23"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "afterstack":4 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - - -
main
p
q
r
- >; - ]; - } - beforenode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "beforestack":4 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} -digraph { - node[shape = "note"]; - rankdir = "LR"; - subgraph cluster_after { - label=<after> - subgraph cluster_afterstack { - label=<stack> - rank="source"; - afterstack[ - shape="none"; - label=< - - - - - -
main
p
q
r
- >; - ]; - } - afternode0 [ - label = < - - - -
Point
x: "23"
y: "44"
> - ]; - "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "afterstack":4 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } - subgraph cluster_before { - label=<before> - subgraph cluster_beforestack { - label=<stack> - rank="source"; - beforestack[ - shape="none"; - label=< - - - - - -
main
p
q
r
- >; - ]; - } - beforenode0 [ - label = < - - - -
Point
x: "22"
y: "44"
> - ]; - "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "beforestack":4 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; - } -} digraph { node[shape = "note"]; rankdir = "LR"; @@ -200,7 +15,6 @@ digraph { p q r - (in-flight): "()" >; ]; @@ -208,13 +22,13 @@ digraph { afternode0 [ label = < - +
Point
x: "23"
x: "23"
y: "44"
> ]; "afterstack":0 -> "afternode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; "afterstack":2 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "afterstack":4 -> "afternode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "afterstack":4 -> "afternode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } subgraph cluster_before { label=<before> @@ -242,7 +56,7 @@ digraph { ]; "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; - "beforestack":4 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "beforestack":4 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } } 23 diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/bir.ref index 216d7a17..6a91e8c4 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/bir.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/bir.ref @@ -5,21 +5,21 @@ [ ( AssignExpr( - temp{9}, + temp{10}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{10}, + temp{11}, 22, ), Expr(1), ), ( AssignExpr( - temp{11}, + temp{12}, 44, ), Expr(2), @@ -28,10 +28,10 @@ Assign( temp{1}, Call( - temp{9}, + temp{10}, [ - temp{10}, temp{11}, + temp{12}, ], [ Some( @@ -49,19 +49,19 @@ [ ( Clear( - temp{11}, + temp{12}, ), Expr(2), ), ( Clear( - temp{10}, + temp{11}, ), Expr(1), ), ( Clear( - temp{9}, + temp{10}, ), Expr(0), ), @@ -74,14 +74,14 @@ ), ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(4), ), ( Clear( - temp{8}, + temp{9}, ), Expr(4), ), @@ -101,14 +101,14 @@ ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(7), ), ( Clear( - temp{12}, + temp{13}, ), Expr(7), ), @@ -128,91 +128,98 @@ ), ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(10), ), ( Clear( - temp{13}, + temp{14}, ), Expr(10), ), ( AssignExpr( temp{6}, - r{4}.reserve, + r{4}.lease, ), Expr(11), ), ( AssignExpr( - temp{15}, - r{4}.x.give, + temp{16}, + temp{6}.x.give, ), - Expr(14), + Expr(12), ), ( AssignExpr( - temp{16}, + temp{17}, 1, ), Expr(13), ), ( AssignExpr( - temp{6}.x, - temp{15} + temp{16}, + temp{7}, + temp{16} + temp{17}, ), Expr(14), ), ( Clear( - temp{16}, + temp{17}, ), Expr(13), ), ( Clear( - temp{15}, + temp{16}, + ), + Expr(12), + ), + ( + AssignPlace( + temp{6}.x, + temp{7}, ), Expr(14), ), ( AssignExpr( - temp{14}, + temp{15}, (), ), Expr(14), ), ( Clear( - temp{14}, + temp{15}, ), Expr(14), ), ( AssignExpr( - temp{18}, + temp{19}, Print.reserve, ), Expr(15), ), ( AssignExpr( - temp{19}, + temp{20}, p{0}.x.reserve, ), Expr(17), ), ], Assign( - temp{17}, + temp{18}, Call( - temp{18}, + temp{19}, [ - temp{19}, + temp{20}, ], [ None, @@ -225,21 +232,21 @@ [ ( Clear( - temp{19}, + temp{20}, ), Expr(17), ), ( Clear( - temp{18}, + temp{19}, ), Expr(15), ), ], Assign( - temp{7}, + temp{8}, Await( - temp{17}, + temp{18}, ), BasicBlock(3), ), @@ -248,13 +255,13 @@ [ ( Clear( - temp{17}, + temp{18}, ), Expr(18), ), ], Return( - temp{7}, + temp{8}, ), ), }, diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/syntax.ref index 8994ca58..ecbedd20 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-lease-20.dada:3:18:12:1), ), data: syntax::Tree { - root_expr: ( - Expr(20), + root_expr: Expr(20)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -55,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -75,18 +64,17 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "r", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "r", + ty: None, + }, + Expr(9)( Lease( - ( - Expr(8), + Expr(8)( Id( "q", ), @@ -95,14 +83,11 @@ ), ), ), - ( - Expr(14), + Expr(14)( OpEq( - ( - Expr(12), + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "r", ), @@ -111,34 +96,27 @@ ), ), PlusEqual, - ( - Expr(13), + Expr(13)( Integer( "1", ), ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Dot( - ( - Expr(16), + Expr(16)( Id( "p", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/validated.ref index 49b5fe3d..874a21e8 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-20/validated.ref @@ -1,5 +1,5 @@ [ - Expr(26)( + Expr(27)( Seq( [ Expr(6)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,53 +42,32 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -109,60 +76,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(14)( Seq( @@ -171,230 +114,156 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(11)( Lease( Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(13)( AssignFromPlace( TargetPlace(4)( r{4}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), - Expr(21)( + Expr(22)( Seq( [ - Expr(19)( + Expr(16)( Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), - Expr(18)( - Reserve( - Place(8)( + Expr(15)( + Lease( + Place(6)( r{4}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(20)( Assign( - TargetPlace(7)( - Dot( - Place(9)( - temp{6}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, - ), - "x", - ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + TargetPlace(8)( + temp{7}, + synthesized from Expr(14), ), - Expr(17)( + Expr(19)( Op( - Expr(15)( + Expr(17)( Give( - Place(7)( + Place(8)( Dot( - Place(6)( - r{4}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + Place(7)( + temp{6}, + synthesized from Expr(11), ), "x", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(12), ), Plus, - Expr(16)( + Expr(18)( 1, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), + ), + Expr(21)( + AssignFromPlace( + TargetPlace(7)( + Dot( + Place(7)( + temp{6}, + synthesized from Expr(11), + ), + "x", + ), + from Expr(12), + ), + Place(9)( + temp{7}, + synthesized from Expr(14), + ), + ), + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), - Expr(25)( + Expr(26)( Await( - Expr(24)( + Expr(25)( Call( - Expr(22)( + Expr(23)( Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, - Expr(23)( + Expr(24)( Reserve( Place(12)( Dot( Place(11)( p{0}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), "x", ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.bir.ref new file mode 100644 index 00000000..5ccc1210 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.bir.ref @@ -0,0 +1,218 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{10}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{11}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{12}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{10}, + [ + temp{11}, + temp{12}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(2), + ), + ( + Clear( + temp{11}, + ), + Expr(1), + ), + ( + Clear( + temp{10}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{9}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + p{0}.lease, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{13}, + (), + ), + Expr(7), + ), + ( + Clear( + temp{13}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{4}, + q{2}.lease, + ), + Expr(8), + ), + ( + AssignExpr( + temp{15}, + temp{4}.x.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{16}, + 1, + ), + Expr(10), + ), + ( + AssignExpr( + temp{5}, + temp{15} + temp{16}, + ), + Expr(11), + ), + ( + Clear( + temp{16}, + ), + Expr(10), + ), + ( + Clear( + temp{15}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{14}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(11), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(14), + ), + ( + AssignPlace( + x{6}, + p{0}.x, + ), + Expr(14), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(14), + None, + ), + Expr(14), + ), + ( + AssignPlace( + x{7}, + q{2}.x, + ), + Expr(17), + ), + ( + AssignExpr( + temp{8}, + (), + ), + Expr(17), + ), + ], + Return( + temp{8}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.ref index d2f751b3..c43088dd 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/HeapGraph-0.ref @@ -14,8 +14,8 @@ digraph { main p q - x: "23" - x + x: "23" + x >; ]; @@ -43,8 +43,8 @@ digraph { main p q - x x + x >; ]; @@ -59,7 +59,7 @@ digraph { > ]; "beforestack":0 -> "beforenode0" [label="my", style="dotted", penwidth=3.0, arrowtype="normal", color="red"]; - "beforestack":2 -> "beforenode0" [label="leased", style="solid", penwidth=1.0, arrowtype="empty", color="red"]; + "beforestack":2 -> "beforenode0" [label="leased", style="dotted", penwidth=1.0, arrowtype="empty", color="red"]; } } Error: your lease to this object was cancelled diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/bir.ref index 8717fbea..7bed4d8a 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/bir.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/bir.ref @@ -5,21 +5,21 @@ [ ( AssignExpr( - temp{9}, + temp{10}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{10}, + temp{11}, 22, ), Expr(1), ), ( AssignExpr( - temp{11}, + temp{12}, 44, ), Expr(2), @@ -28,10 +28,10 @@ Assign( temp{1}, Call( - temp{9}, + temp{10}, [ - temp{10}, temp{11}, + temp{12}, ], [ Some( @@ -49,19 +49,19 @@ [ ( Clear( - temp{11}, + temp{12}, ), Expr(2), ), ( Clear( - temp{10}, + temp{11}, ), Expr(1), ), ( Clear( - temp{9}, + temp{10}, ), Expr(0), ), @@ -74,14 +74,14 @@ ), ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(4), ), ( Clear( - temp{8}, + temp{9}, ), Expr(4), ), @@ -101,94 +101,101 @@ ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(7), ), ( Clear( - temp{12}, + temp{13}, ), Expr(7), ), ( AssignExpr( temp{4}, - q{2}.reserve, + q{2}.lease, ), Expr(8), ), ( AssignExpr( - temp{14}, - q{2}.x.give, + temp{15}, + temp{4}.x.give, ), - Expr(11), + Expr(9), ), ( AssignExpr( - temp{15}, + temp{16}, 1, ), Expr(10), ), ( AssignExpr( - temp{4}.x, - temp{14} + temp{15}, + temp{5}, + temp{15} + temp{16}, ), Expr(11), ), ( Clear( - temp{15}, + temp{16}, ), Expr(10), ), ( Clear( - temp{14}, + temp{15}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{4}.x, + temp{5}, ), Expr(11), ), ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(11), ), ( Clear( - temp{13}, + temp{14}, ), Expr(11), ), ( AssignPlace( - x{5}, + x{6}, p{0}.x, ), Expr(14), ), ( AssignPlace( - x{6}, + x{7}, q{2}.x, ), Expr(17), ), ( AssignExpr( - temp{7}, + temp{8}, (), ), Expr(17), ), ], Return( - temp{7}, + temp{8}, ), ), }, diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/syntax.ref index 03317f5a..1dd68f92 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/syntax.ref @@ -7,44 +7,34 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-lease-30.dada:3:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(18), + root_expr: Expr(18)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -55,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -75,14 +64,11 @@ ), ), ), - ( - Expr(11), + Expr(11)( OpEq( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "q", ), @@ -91,26 +77,24 @@ ), ), PlusEqual, - ( - Expr(10), + Expr(10)( Integer( "1", ), ), ), ), - ( - Expr(14), + Expr(14)( Var( - ( - "x", - None, - ), - ( - Expr(13), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(13)( Dot( - ( - Expr(12), + Expr(12)( Id( "p", ), @@ -120,18 +104,17 @@ ), ), ), - ( - Expr(17), + Expr(17)( Var( - ( - "x", - None, - ), - ( - Expr(16), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(16)( Dot( - ( - Expr(15), + Expr(15)( Id( "q", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/validated.ref index 6e7a4c8c..d103153c 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-lease-30/validated.ref @@ -1,5 +1,5 @@ [ - Expr(20)( + Expr(21)( Seq( [ Expr(6)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -42,10 +33,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -54,53 +42,32 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -109,232 +76,155 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), - Expr(17)( + Expr(18)( Seq( [ - Expr(15)( + Expr(12)( Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), - Expr(14)( - Reserve( - Place(6)( + Expr(11)( + Lease( + Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(16)( Assign( - TargetPlace(5)( - Dot( - Place(7)( - temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, - ), - "x", - ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + TargetPlace(6)( + temp{5}, + synthesized from Expr(11), ), - Expr(13)( + Expr(15)( Op( - Expr(11)( + Expr(13)( Give( - Place(5)( + Place(6)( Dot( - Place(4)( - q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + Place(5)( + temp{4}, + synthesized from Expr(8), ), "x", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(9), ), Plus, - Expr(12)( + Expr(14)( 1, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), + ), + ), + synthesized from Expr(11), + ), + ), + synthesized from Expr(11), + ), + Expr(17)( + AssignFromPlace( + TargetPlace(5)( + Dot( + Place(5)( + temp{4}, + synthesized from Expr(8), ), + "x", ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(9), + ), + Place(7)( + temp{5}, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), - Expr(18)( + Expr(19)( AssignFromPlace( - TargetPlace(6)( - x{5}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + TargetPlace(7)( + x{6}, + synthesized from Expr(14), ), Place(9)( Dot( Place(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), "x", ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), - Expr(19)( + Expr(20)( AssignFromPlace( - TargetPlace(7)( - x{6}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + TargetPlace(8)( + x{7}, + synthesized from Expr(17), ), Place(11)( Dot( Place(10)( q{2}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), "x", ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-10/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/HeapGraph-0.bir.ref new file mode 100644 index 00000000..01d654ff --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/HeapGraph-0.bir.ref @@ -0,0 +1,158 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{9}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{10}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{11}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{8}, + Call( + temp{9}, + [ + temp{10}, + temp{11}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{11}, + ), + Expr(2), + ), + ( + Clear( + temp{10}, + ), + Expr(1), + ), + ( + Clear( + temp{9}, + ), + Expr(0), + ), + ( + AssignExpr( + temp{1}, + temp{8}.share, + ), + Expr(4), + ), + ( + Clear( + temp{8}, + ), + Expr(3), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{7}, + (), + ), + Expr(5), + ), + ( + Clear( + temp{7}, + ), + Expr(5), + ), + ( + BreakpoingStart( + "class", + 0, + ), + Expr(7), + ), + ( + AssignPlace( + q{2}, + p{0}, + ), + Expr(7), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(7), + None, + ), + Expr(7), + ), + ( + AssignPlace( + x{3}, + p{0}.x, + ), + Expr(10), + ), + ( + AssignPlace( + x{4}, + q{2}.x, + ), + Expr(13), + ), + ( + AssignPlace( + x{5}, + p{0}.x, + ), + Expr(16), + ), + ( + AssignExpr( + temp{6}, + (), + ), + Expr(16), + ), + ], + Return( + temp{6}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-10/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/syntax.ref index 86a49472..a4cc5157 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-10/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/syntax.ref @@ -7,47 +7,36 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-share-10.dada:3:18:11:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -60,33 +49,32 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Id( "p", ), ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "x", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "p", ), @@ -96,18 +84,17 @@ ), ), ), - ( - Expr(13), + Expr(13)( Var( - ( - "x", - None, - ), - ( - Expr(12), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "q", ), @@ -117,18 +104,17 @@ ), ), ), - ( - Expr(16), + Expr(16)( Var( - ( - "x", - None, - ), - ( - Expr(15), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "x", + ty: None, + }, + Expr(15)( Dot( - ( - Expr(14), + Expr(14)( Id( "p", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-10/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/validated.ref index 81118266..f98d33dd 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-10/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-10/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,16 +23,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -44,10 +35,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -56,180 +44,108 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(8)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(3)( x{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(4)( Dot( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), "x", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(10)( AssignFromPlace( TargetPlace(4)( x{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Place(6)( Dot( Place(5)( q{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), "x", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(11)( AssignFromPlace( TargetPlace(5)( x{5}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Place(8)( Dot( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), "x", ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-20/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/HeapGraph-0.bir.ref new file mode 100644 index 00000000..907d0742 --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/HeapGraph-0.bir.ref @@ -0,0 +1,239 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(15), + ), + ( + AssignExpr( + temp{11}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{12}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{13}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{10}, + Call( + temp{11}, + [ + temp{12}, + temp{13}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(2), + ), + ( + Clear( + temp{12}, + ), + Expr(1), + ), + ( + Clear( + temp{11}, + ), + Expr(0), + ), + ( + AssignExpr( + temp{1}, + temp{10}.share, + ), + Expr(4), + ), + ( + Clear( + temp{10}, + ), + Expr(3), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(5), + ), + ( + Clear( + temp{9}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{15}, + p{0}.give, + ), + Expr(6), + ), + ( + AssignExpr( + temp{3}, + temp{15}.share, + ), + Expr(7), + ), + ( + Clear( + temp{15}, + ), + Expr(6), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{14}, + (), + ), + Expr(8), + ), + ( + Clear( + temp{14}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{17}, + q{2}.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{5}, + temp{17}.share, + ), + Expr(10), + ), + ( + Clear( + temp{17}, + ), + Expr(9), + ), + ( + AssignPlace( + r{4}, + temp{5}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{16}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{18}, + r{4}.give, + ), + Expr(12), + ), + ( + AssignExpr( + temp{7}, + temp{18}.share, + ), + Expr(13), + ), + ( + Clear( + temp{18}, + ), + Expr(12), + ), + ( + AssignPlace( + s{6}, + temp{7}, + ), + Expr(14), + ), + ( + AssignExpr( + temp{8}, + (), + ), + Expr(14), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(15), + Some( + temp{8}, + ), + ), + Expr(15), + ), + ], + Return( + temp{8}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-20/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/syntax.ref index 86d73c95..0e5bcb0f 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-20/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/syntax.ref @@ -7,47 +7,36 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-share-20.dada:3:18:12:1), ), data: syntax::Tree { - root_expr: ( - Expr(15), + root_expr: Expr(15)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -60,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Share( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -80,18 +68,17 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "r", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "r", + ty: None, + }, + Expr(10)( Share( - ( - Expr(9), + Expr(9)( Id( "q", ), @@ -100,18 +87,17 @@ ), ), ), - ( - Expr(14), + Expr(14)( Var( - ( - "s", - None, - ), - ( - Expr(13), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "s", + ty: None, + }, + Expr(13)( Share( - ( - Expr(12), + Expr(12)( Id( "r", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-20/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/validated.ref index 81f9570f..19efae5f 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-20/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-20/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,16 +23,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -44,10 +35,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -56,59 +44,35 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(12)( Seq( @@ -117,10 +81,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( Share( @@ -128,57 +89,33 @@ Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(11)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(17)( Seq( @@ -187,10 +124,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(14)( Share( @@ -198,57 +132,33 @@ Give( Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(16)( AssignFromPlace( TargetPlace(4)( r{4}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(22)( Seq( @@ -257,10 +167,7 @@ Assign( TargetPlace(7)( temp{7}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(19)( Share( @@ -268,63 +175,36 @@ Give( Place(6)( r{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(21)( AssignFromPlace( TargetPlace(6)( s{6}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Place(7)( temp{7}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-30/HeapGraph-0.bir.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/HeapGraph-0.bir.ref new file mode 100644 index 00000000..a56e921a --- /dev/null +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/HeapGraph-0.bir.ref @@ -0,0 +1,166 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + BreakpoingStart( + "class", + 0, + ), + Expr(11), + ), + ( + AssignExpr( + temp{8}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{9}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{10}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{7}, + Call( + temp{8}, + [ + temp{9}, + temp{10}, + ], + [ + Some( + "x", + ), + Some( + "y", + ), + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(2), + ), + ( + Clear( + temp{9}, + ), + Expr(1), + ), + ( + Clear( + temp{8}, + ), + Expr(0), + ), + ( + AssignExpr( + temp{1}, + temp{7}.share, + ), + Expr(4), + ), + ( + Clear( + temp{7}, + ), + Expr(3), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{6}, + (), + ), + Expr(5), + ), + ( + Clear( + temp{6}, + ), + Expr(5), + ), + ( + AssignExpr( + temp{3}, + p{0}.give, + ), + Expr(7), + ), + ( + AssignPlace( + q{2}, + temp{3}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{11}, + (), + ), + Expr(8), + ), + ( + Clear( + temp{11}, + ), + Expr(8), + ), + ( + AssignPlace( + r{4}, + q{2}, + ), + Expr(10), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(10), + ), + ( + BreakpointEnd( + "class", + 0, + Expr(11), + Some( + temp{5}, + ), + ), + Expr(11), + ), + ], + Return( + temp{5}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-30/syntax.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/syntax.ref index 07cfc347..881a3d10 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-30/syntax.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/syntax.ref @@ -7,47 +7,36 @@ Tokens(dada_tests/permissions/dyn_tutorial/tutorial-share-30.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(11), + root_expr: Expr(11)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - Some( - "x", - ), - ( - Expr(1), + Some("x")( + Expr(1)( Integer( "22", ), ), ), - ( - Some( - "y", - ), - ( - Expr(2), + Some("y")( + Expr(2)( Integer( "44", ), @@ -60,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Give( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -80,15 +68,15 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "r", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "r", + ty: None, + }, + Expr(9)( Id( "q", ), diff --git a/dada_tests/permissions/dyn_tutorial/tutorial-share-30/validated.ref b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/validated.ref index 4b16f3b9..bf8c21cf 100644 --- a/dada_tests/permissions/dyn_tutorial/tutorial-share-30/validated.ref +++ b/dada_tests/permissions/dyn_tutorial/tutorial-share-30/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,16 +23,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -44,10 +35,7 @@ ), Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( @@ -56,59 +44,35 @@ ), Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(11)( Seq( @@ -117,88 +81,52 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(8)( Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( TargetPlace(4)( r{4}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/give-var-field-my/syntax.ref b/dada_tests/permissions/exhaustive/give-var-field-my/syntax.ref index 9ae9743f..1830b7e3 100644 --- a/dada_tests/permissions/exhaustive/give-var-field-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/give-var-field-my/syntax.ref @@ -7,52 +7,43 @@ Tokens(dada_tests/permissions/exhaustive/give-var-field-my.dada:3:18:12:1), ), data: syntax::Tree { - root_expr: ( - Expr(20), + root_expr: Expr(20)( Seq( [ - ( - Expr(7), + Expr(7)( Var( - ( - "p", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -62,10 +53,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -76,21 +65,19 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "q", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(10)( Give( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "p", ), @@ -102,23 +89,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "p", ), @@ -129,23 +111,18 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/give-var-field-my/validated.ref b/dada_tests/permissions/exhaustive/give-var-field-my/validated.ref index 68a87b91..48b5e681 100644 --- a/dada_tests/permissions/exhaustive/give-var-field-my/validated.ref +++ b/dada_tests/permissions/exhaustive/give-var-field-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(6)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -48,97 +39,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(13)( Seq( @@ -147,10 +102,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(10)( Give( @@ -158,58 +110,34 @@ Dot( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), "a", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(17)( Await( @@ -219,16 +147,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -237,30 +159,18 @@ Reserve( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Await( @@ -270,16 +180,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( @@ -288,36 +192,21 @@ Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/give-var-leased-shared/bir.ref b/dada_tests/permissions/exhaustive/give-var-leased-shared/bir.ref index 8f302679..bba04c0f 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased-shared/bir.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased-shared/bir.ref @@ -26,7 +26,7 @@ ), ], Assign( - temp{2}, + temp{1}, Call( temp{8}, [ @@ -64,13 +64,13 @@ ( AssignExpr( temp{7}, - temp{2}.lease, + temp{1}.lease, ), Expr(4), ), ( AssignExpr( - temp{1}, + temp{2}, temp{7}.share, ), Expr(5), @@ -84,7 +84,7 @@ ( AssignPlace( p{0}, - temp{1}, + temp{2}, ), Expr(6), ), diff --git a/dada_tests/permissions/exhaustive/give-var-leased-shared/syntax.ref b/dada_tests/permissions/exhaustive/give-var-leased-shared/syntax.ref index 6f5f337c..fd12b77d 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased-shared/syntax.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased-shared/syntax.ref @@ -7,46 +7,38 @@ Tokens(dada_tests/permissions/exhaustive/give-var-leased-shared.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(22), + root_expr: Expr(22)( Seq( [ - ( - Expr(6), + Expr(6)( Var( - ( - "p", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(5)( Share( - ( - Expr(4), + Expr(4)( Lease( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -61,18 +53,17 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Give( - ( - Expr(7), + Expr(7)( Id( "p", ), @@ -81,23 +72,18 @@ ), ), ), - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Id( "p", ), @@ -108,23 +94,18 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(14), + Expr(14)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Id( "q", ), @@ -135,23 +116,18 @@ ), ), ), - ( - Expr(21), + Expr(21)( Await( - ( - Expr(20), + Expr(20)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Id( "p", ), diff --git a/dada_tests/permissions/exhaustive/give-var-leased-shared/validated.ref b/dada_tests/permissions/exhaustive/give-var-leased-shared/validated.ref index 6f95e849..71d3c418 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased-shared/validated.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased-shared/validated.ref @@ -7,12 +7,9 @@ [ Expr(8)( Assign( - TargetPlace(1)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + TargetPlace(2)( + temp{2}, + synthesized from Expr(5), ), Expr(7)( Share( @@ -21,12 +18,9 @@ [ Expr(4)( Assign( - TargetPlace(2)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), ), Expr(3)( Call( @@ -38,113 +32,68 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( Lease( Place(1)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + temp{1}, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(9)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + temp{2}, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), Expr(14)( Seq( @@ -153,60 +102,36 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(11)( Give( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(13)( AssignFromPlace( TargetPlace(3)( q{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(18)( Await( @@ -216,16 +141,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -234,30 +153,18 @@ Reserve( Place(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(22)( Await( @@ -267,16 +174,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( @@ -285,30 +186,18 @@ Reserve( Place(8)( q{3}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(26)( Await( @@ -318,16 +207,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -336,36 +219,21 @@ Reserve( Place(10)( p{0}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/give-var-leased/bir.ref b/dada_tests/permissions/exhaustive/give-var-leased/bir.ref index 1092d7a2..aaa288e2 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased/bir.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased/bir.ref @@ -26,7 +26,7 @@ ), ], Assign( - temp{2}, + temp{1}, Call( temp{7}, [ @@ -63,15 +63,15 @@ ), ( AssignExpr( - temp{1}, - temp{2}.lease, + temp{2}, + temp{1}.lease, ), Expr(4), ), ( AssignPlace( p{0}, - temp{1}, + temp{2}, ), Expr(5), ), diff --git a/dada_tests/permissions/exhaustive/give-var-leased/syntax.ref b/dada_tests/permissions/exhaustive/give-var-leased/syntax.ref index 0ec280c3..aad22648 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased/syntax.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/exhaustive/give-var-leased.dada:3:18:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Lease( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Give( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,23 +68,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "q", ), @@ -103,23 +90,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), @@ -130,23 +112,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/give-var-leased/validated.ref b/dada_tests/permissions/exhaustive/give-var-leased/validated.ref index 3304c49c..23b7becb 100644 --- a/dada_tests/permissions/exhaustive/give-var-leased/validated.ref +++ b/dada_tests/permissions/exhaustive/give-var-leased/validated.ref @@ -7,24 +7,18 @@ [ Expr(7)( Assign( - TargetPlace(1)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + TargetPlace(2)( + temp{2}, + synthesized from Expr(4), ), Expr(6)( Seq( [ Expr(4)( Assign( - TargetPlace(2)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), ), Expr(3)( Call( @@ -36,107 +30,65 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( Lease( Place(1)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + temp{1}, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(2)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + temp{2}, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(13)( Seq( @@ -145,60 +97,36 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( Give( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(12)( AssignFromPlace( TargetPlace(3)( q{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(17)( Await( @@ -208,16 +136,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -226,30 +148,18 @@ Reserve( Place(6)( q{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(21)( Await( @@ -259,16 +169,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -277,30 +181,18 @@ Reserve( Place(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(25)( Await( @@ -310,16 +202,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -328,36 +214,21 @@ Reserve( Place(10)( q{3}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/give-var-my/syntax.ref b/dada_tests/permissions/exhaustive/give-var-my/syntax.ref index 33def459..7defe5de 100644 --- a/dada_tests/permissions/exhaustive/give-var-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/give-var-my/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/permissions/exhaustive/give-var-my.dada:3:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(12), + root_expr: Expr(12)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Give( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -71,23 +64,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "p", ), diff --git a/dada_tests/permissions/exhaustive/give-var-my/validated.ref b/dada_tests/permissions/exhaustive/give-var-my/validated.ref index 52d9b926..3ec8bdc3 100644 --- a/dada_tests/permissions/exhaustive/give-var-my/validated.ref +++ b/dada_tests/permissions/exhaustive/give-var-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -105,60 +72,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(14)( Await( @@ -168,16 +111,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -186,36 +123,21 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/give-var-our/syntax.ref b/dada_tests/permissions/exhaustive/give-var-our/syntax.ref index 8d7252af..8d445d92 100644 --- a/dada_tests/permissions/exhaustive/give-var-our/syntax.ref +++ b/dada_tests/permissions/exhaustive/give-var-our/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/exhaustive/give-var-our.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Give( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,23 +68,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "p", ), @@ -103,23 +90,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "q", ), @@ -130,23 +112,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "p", ), diff --git a/dada_tests/permissions/exhaustive/give-var-our/validated.ref b/dada_tests/permissions/exhaustive/give-var-our/validated.ref index dd6f88c7..6a8e7bcf 100644 --- a/dada_tests/permissions/exhaustive/give-var-our/validated.ref +++ b/dada_tests/permissions/exhaustive/give-var-our/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(11)( Seq( @@ -113,60 +77,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(8)( Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(15)( Await( @@ -176,16 +116,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -194,30 +128,18 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(19)( Await( @@ -227,16 +149,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -245,30 +161,18 @@ Reserve( Place(7)( q{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(23)( Await( @@ -278,16 +182,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -296,36 +194,21 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/lease-var-field-my/syntax.ref b/dada_tests/permissions/exhaustive/lease-var-field-my/syntax.ref index 5d76ac97..c0d077e2 100644 --- a/dada_tests/permissions/exhaustive/lease-var-field-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/lease-var-field-my/syntax.ref @@ -7,52 +7,43 @@ Tokens(dada_tests/permissions/exhaustive/lease-var-field-my.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(24), + root_expr: Expr(24)( Seq( [ - ( - Expr(7), + Expr(7)( Var( - ( - "p", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -62,10 +53,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -76,21 +65,19 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "q", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(10)( Lease( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "p", ), @@ -102,23 +89,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "q", ), @@ -129,23 +111,18 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Id( "p", ), @@ -156,23 +133,18 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/lease-var-field-my/validated.ref b/dada_tests/permissions/exhaustive/lease-var-field-my/validated.ref index 1b46cd8c..11ab0df0 100644 --- a/dada_tests/permissions/exhaustive/lease-var-field-my/validated.ref +++ b/dada_tests/permissions/exhaustive/lease-var-field-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(6)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -48,97 +39,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(13)( Seq( @@ -147,10 +102,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(10)( Lease( @@ -158,58 +110,34 @@ Dot( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), "a", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(12)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(17)( Await( @@ -219,16 +147,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -237,30 +159,18 @@ Reserve( Place(7)( q{2}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(21)( Await( @@ -270,16 +180,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( @@ -288,30 +192,18 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Expr(25)( Await( @@ -321,16 +213,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( @@ -339,36 +225,21 @@ Reserve( Place(11)( q{2}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/lease-var-lease-shared/bir.ref b/dada_tests/permissions/exhaustive/lease-var-lease-shared/bir.ref index afeb74ef..4d1600bd 100644 --- a/dada_tests/permissions/exhaustive/lease-var-lease-shared/bir.ref +++ b/dada_tests/permissions/exhaustive/lease-var-lease-shared/bir.ref @@ -26,7 +26,7 @@ ), ], Assign( - temp{2}, + temp{1}, Call( temp{8}, [ @@ -64,13 +64,13 @@ ( AssignExpr( temp{7}, - temp{2}.lease, + temp{1}.lease, ), Expr(4), ), ( AssignExpr( - temp{1}, + temp{2}, temp{7}.share, ), Expr(5), @@ -84,7 +84,7 @@ ( AssignPlace( p{0}, - temp{1}, + temp{2}, ), Expr(6), ), diff --git a/dada_tests/permissions/exhaustive/lease-var-lease-shared/syntax.ref b/dada_tests/permissions/exhaustive/lease-var-lease-shared/syntax.ref index 86605607..f84e482f 100644 --- a/dada_tests/permissions/exhaustive/lease-var-lease-shared/syntax.ref +++ b/dada_tests/permissions/exhaustive/lease-var-lease-shared/syntax.ref @@ -7,46 +7,38 @@ Tokens(dada_tests/permissions/exhaustive/lease-var-lease-shared.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(22), + root_expr: Expr(22)( Seq( [ - ( - Expr(6), + Expr(6)( Var( - ( - "p", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(5)( Share( - ( - Expr(4), + Expr(4)( Lease( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -61,18 +53,17 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "q", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(8)( Lease( - ( - Expr(7), + Expr(7)( Id( "p", ), @@ -81,23 +72,18 @@ ), ), ), - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Id( "q", ), @@ -108,23 +94,18 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(14), + Expr(14)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Id( "p", ), @@ -135,23 +116,18 @@ ), ), ), - ( - Expr(21), + Expr(21)( Await( - ( - Expr(20), + Expr(20)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/lease-var-lease-shared/validated.ref b/dada_tests/permissions/exhaustive/lease-var-lease-shared/validated.ref index ab8ea653..eb713d41 100644 --- a/dada_tests/permissions/exhaustive/lease-var-lease-shared/validated.ref +++ b/dada_tests/permissions/exhaustive/lease-var-lease-shared/validated.ref @@ -7,12 +7,9 @@ [ Expr(8)( Assign( - TargetPlace(1)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + TargetPlace(2)( + temp{2}, + synthesized from Expr(5), ), Expr(7)( Share( @@ -21,12 +18,9 @@ [ Expr(4)( Assign( - TargetPlace(2)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), ), Expr(3)( Call( @@ -38,113 +32,68 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( Lease( Place(1)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + temp{1}, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(9)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + temp{2}, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), Expr(14)( Seq( @@ -153,60 +102,36 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(11)( Lease( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(13)( AssignFromPlace( TargetPlace(3)( q{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(18)( Await( @@ -216,16 +141,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -234,30 +153,18 @@ Reserve( Place(6)( q{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(22)( Await( @@ -267,16 +174,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( @@ -285,30 +186,18 @@ Reserve( Place(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(26)( Await( @@ -318,16 +207,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -336,36 +219,21 @@ Reserve( Place(10)( q{3}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/lease-var-my/syntax.ref b/dada_tests/permissions/exhaustive/lease-var-my/syntax.ref index 4dcce308..f4b1384b 100644 --- a/dada_tests/permissions/exhaustive/lease-var-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/lease-var-my/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/permissions/exhaustive/lease-var-my.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(20), + root_expr: Expr(20)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -71,23 +64,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "q", ), @@ -98,23 +86,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "p", ), @@ -125,23 +108,18 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/lease-var-my/validated.ref b/dada_tests/permissions/exhaustive/lease-var-my/validated.ref index ad1a21f6..b2e70374 100644 --- a/dada_tests/permissions/exhaustive/lease-var-my/validated.ref +++ b/dada_tests/permissions/exhaustive/lease-var-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -105,60 +72,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(14)( Await( @@ -168,16 +111,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -186,30 +123,18 @@ Reserve( Place(5)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(18)( Await( @@ -219,16 +144,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -237,30 +156,18 @@ Reserve( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(22)( Await( @@ -270,16 +177,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( @@ -288,36 +189,21 @@ Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/lease-var-our/syntax.ref b/dada_tests/permissions/exhaustive/lease-var-our/syntax.ref index efb44f55..51806d88 100644 --- a/dada_tests/permissions/exhaustive/lease-var-our/syntax.ref +++ b/dada_tests/permissions/exhaustive/lease-var-our/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/exhaustive/lease-var-our.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,23 +68,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "q", ), @@ -103,23 +90,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), @@ -130,23 +112,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/lease-var-our/validated.ref b/dada_tests/permissions/exhaustive/lease-var-our/validated.ref index 0dc481e5..0efab4ec 100644 --- a/dada_tests/permissions/exhaustive/lease-var-our/validated.ref +++ b/dada_tests/permissions/exhaustive/lease-var-our/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(11)( Seq( @@ -113,60 +77,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(8)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(15)( Await( @@ -176,16 +116,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -194,30 +128,18 @@ Reserve( Place(5)( q{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(19)( Await( @@ -227,16 +149,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -245,30 +161,18 @@ Reserve( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(23)( Await( @@ -278,16 +182,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -296,36 +194,21 @@ Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/share-var-field-my/syntax.ref b/dada_tests/permissions/exhaustive/share-var-field-my/syntax.ref index 4328c8b0..209d6ccd 100644 --- a/dada_tests/permissions/exhaustive/share-var-field-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/share-var-field-my/syntax.ref @@ -7,52 +7,43 @@ Tokens(dada_tests/permissions/exhaustive/share-var-field-my.dada:3:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(20), + root_expr: Expr(20)( Seq( [ - ( - Expr(7), + Expr(7)( Var( - ( - "p", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -62,10 +53,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -76,21 +65,19 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "q", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(10)( Share( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "p", ), @@ -102,23 +89,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "p", ), @@ -129,23 +111,18 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(16), + Expr(16)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/share-var-field-my/validated.ref b/dada_tests/permissions/exhaustive/share-var-field-my/validated.ref index 30f8b98f..90e1b704 100644 --- a/dada_tests/permissions/exhaustive/share-var-field-my/validated.ref +++ b/dada_tests/permissions/exhaustive/share-var-field-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(6)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -48,97 +39,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(14)( Seq( @@ -147,10 +102,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(11)( Share( @@ -160,64 +112,37 @@ Dot( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), "a", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(13)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(18)( Await( @@ -227,16 +152,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -245,30 +164,18 @@ Reserve( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Expr(22)( Await( @@ -278,16 +185,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( @@ -296,36 +197,21 @@ Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/share-var-leased/bir.ref b/dada_tests/permissions/exhaustive/share-var-leased/bir.ref index 20bc41f3..664603f3 100644 --- a/dada_tests/permissions/exhaustive/share-var-leased/bir.ref +++ b/dada_tests/permissions/exhaustive/share-var-leased/bir.ref @@ -26,7 +26,7 @@ ), ], Assign( - temp{2}, + temp{1}, Call( temp{7}, [ @@ -63,15 +63,15 @@ ), ( AssignExpr( - temp{1}, - temp{2}.lease, + temp{2}, + temp{1}.lease, ), Expr(4), ), ( AssignPlace( p{0}, - temp{1}, + temp{2}, ), Expr(5), ), diff --git a/dada_tests/permissions/exhaustive/share-var-leased/syntax.ref b/dada_tests/permissions/exhaustive/share-var-leased/syntax.ref index 97d81302..d037f1b2 100644 --- a/dada_tests/permissions/exhaustive/share-var-leased/syntax.ref +++ b/dada_tests/permissions/exhaustive/share-var-leased/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/exhaustive/share-var-leased.dada:3:18:17:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Lease( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Share( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,23 +68,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "q", ), @@ -103,23 +90,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), @@ -130,23 +112,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/share-var-leased/validated.ref b/dada_tests/permissions/exhaustive/share-var-leased/validated.ref index 928399cd..91658bfd 100644 --- a/dada_tests/permissions/exhaustive/share-var-leased/validated.ref +++ b/dada_tests/permissions/exhaustive/share-var-leased/validated.ref @@ -7,24 +7,18 @@ [ Expr(7)( Assign( - TargetPlace(1)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + TargetPlace(2)( + temp{2}, + synthesized from Expr(4), ), Expr(6)( Seq( [ Expr(4)( Assign( - TargetPlace(2)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), ), Expr(3)( Call( @@ -36,107 +30,65 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( Lease( Place(1)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + temp{1}, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(2)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + temp{2}, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -145,10 +97,7 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(11)( Share( @@ -156,57 +105,33 @@ Give( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(13)( AssignFromPlace( TargetPlace(3)( q{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(18)( Await( @@ -216,16 +141,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -234,30 +153,18 @@ Reserve( Place(6)( q{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(22)( Await( @@ -267,16 +174,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -285,30 +186,18 @@ Reserve( Place(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(26)( Await( @@ -318,16 +207,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -336,36 +219,21 @@ Reserve( Place(10)( q{3}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/share-var-my/syntax.ref b/dada_tests/permissions/exhaustive/share-var-my/syntax.ref index 84904718..bf042cb9 100644 --- a/dada_tests/permissions/exhaustive/share-var-my/syntax.ref +++ b/dada_tests/permissions/exhaustive/share-var-my/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/permissions/exhaustive/share-var-my.dada:3:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(16), + root_expr: Expr(16)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,18 +45,17 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "q", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(6)( Share( - ( - Expr(5), + Expr(5)( Id( "p", ), @@ -71,23 +64,18 @@ ), ), ), - ( - Expr(11), + Expr(11)( Await( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(8), + Expr(8)( Id( "print", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "q", ), @@ -98,23 +86,18 @@ ), ), ), - ( - Expr(15), + Expr(15)( Await( - ( - Expr(14), + Expr(14)( Call( - ( - Expr(12), + Expr(12)( Id( "print", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Id( "p", ), diff --git a/dada_tests/permissions/exhaustive/share-var-my/validated.ref b/dada_tests/permissions/exhaustive/share-var-my/validated.ref index 2d88cc70..edec2809 100644 --- a/dada_tests/permissions/exhaustive/share-var-my/validated.ref +++ b/dada_tests/permissions/exhaustive/share-var-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(11)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( Share( @@ -116,57 +80,33 @@ Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(15)( Await( @@ -176,16 +116,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -194,30 +128,18 @@ Reserve( Place(5)( q{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(19)( Await( @@ -227,16 +149,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -245,36 +161,21 @@ Reserve( Place(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/exhaustive/share-var-our/syntax.ref b/dada_tests/permissions/exhaustive/share-var-our/syntax.ref index b4d84d6b..705c3401 100644 --- a/dada_tests/permissions/exhaustive/share-var-our/syntax.ref +++ b/dada_tests/permissions/exhaustive/share-var-our/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/exhaustive/share-var-our.dada:3:18:8:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Share( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,23 +68,18 @@ ), ), ), - ( - Expr(12), + Expr(12)( Await( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "p", ), @@ -103,23 +90,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "q", ), diff --git a/dada_tests/permissions/exhaustive/share-var-our/validated.ref b/dada_tests/permissions/exhaustive/share-var-our/validated.ref index 9f059dee..2a14f669 100644 --- a/dada_tests/permissions/exhaustive/share-var-our/validated.ref +++ b/dada_tests/permissions/exhaustive/share-var-our/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(12)( Seq( @@ -113,10 +77,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( Share( @@ -124,57 +85,33 @@ Give( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(11)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(16)( Await( @@ -184,16 +121,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -202,30 +133,18 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(20)( Await( @@ -235,16 +154,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -253,36 +166,21 @@ Reserve( Place(7)( q{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/house-parties/house-parties-are-not-enough/syntax.ref b/dada_tests/permissions/house-parties/house-parties-are-not-enough/syntax.ref index 51f9b03f..8bcbba29 100644 --- a/dada_tests/permissions/house-parties/house-parties-are-not-enough/syntax.ref +++ b/dada_tests/permissions/house-parties/house-parties-are-not-enough/syntax.ref @@ -7,18 +7,14 @@ Tokens(dada_tests/permissions/house-parties/house-parties-are-not-enough.dada:11:2:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(3), + root_expr: Expr(3)( Seq( [ - ( - Expr(2), + Expr(2)( Share( - ( - Expr(1), + Expr(1)( Dot( - ( - Expr(0), + Expr(0)( Id( "accumulator", ), @@ -41,36 +37,29 @@ Tokens(dada_tests/permissions/house-parties/house-parties-are-not-enough.dada:15:18:29:1), ), data: syntax::Tree { - root_expr: ( - Expr(25), + root_expr: Expr(25)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "a", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Accumulator", ), ), [ - ( - Some( - "list", - ), - ( - Expr(2), + Some("list")( + Expr(2)( Call( - ( - Expr(1), + Expr(1)( Id( "List", ), @@ -84,33 +73,28 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "l1", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "l1", + ty: None, + }, + Expr(9)( Call( - ( - Expr(5), + Expr(5)( Id( "get_list", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Share( - ( - Expr(7), + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "a", ), @@ -125,33 +109,28 @@ ), ), ), - ( - Expr(16), + Expr(16)( Var( - ( - "l2", - None, - ), - ( - Expr(15), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "l2", + ty: None, + }, + Expr(15)( Call( - ( - Expr(11), + Expr(11)( Id( "get_list", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Share( - ( - Expr(13), + Expr(13)( Lease( - ( - Expr(12), + Expr(12)( Id( "a", ), @@ -166,23 +145,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "l1", ), @@ -193,23 +167,18 @@ ), ), ), - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(21), + Expr(21)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( Id( "l2", ), diff --git a/dada_tests/permissions/house-parties/house-parties-are-not-enough/validated.ref b/dada_tests/permissions/house-parties/house-parties-are-not-enough/validated.ref index d7def0e6..605a88a7 100644 --- a/dada_tests/permissions/house-parties/house-parties-are-not-enough/validated.ref +++ b/dada_tests/permissions/house-parties/house-parties-are-not-enough/validated.ref @@ -10,36 +10,21 @@ Dot( Place(0)( accumulator{0}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), "list", ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(29)( Seq( @@ -51,10 +36,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -66,16 +48,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -92,66 +68,39 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -160,10 +109,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(10)( Call( @@ -171,16 +117,10 @@ Reserve( Place(3)( get_list, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -191,65 +131,38 @@ Lease( Place(4)( a{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(12)( AssignFromPlace( TargetPlace(2)( l1{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), Expr(20)( Seq( @@ -258,10 +171,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(17)( Call( @@ -269,16 +179,10 @@ Reserve( Place(6)( get_list, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [ NamedExpr( @@ -289,65 +193,38 @@ Lease( Place(7)( a{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(19)( AssignFromPlace( TargetPlace(4)( l2{4}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Place(8)( temp{5}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), Expr(24)( Await( @@ -357,16 +234,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -375,30 +246,18 @@ Reserve( Place(10)( l1{2}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(28)( Await( @@ -408,16 +267,10 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), [ NamedExpr( @@ -426,36 +279,21 @@ Reserve( Place(12)( l2{4}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/syntax.ref b/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/syntax.ref index 50907e96..6654c802 100644 --- a/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/syntax.ref +++ b/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/syntax.ref @@ -7,21 +7,16 @@ Tokens(dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant.dada:17:2:19:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Share( - ( - Expr(2), + Expr(2)( Lease( - ( - Expr(1), + Expr(1)( Dot( - ( - Expr(0), + Expr(0)( Id( "accumulator", ), @@ -46,36 +41,29 @@ Tokens(dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant.dada:21:18:41:1), ), data: syntax::Tree { - root_expr: ( - Expr(24), + root_expr: Expr(24)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "a", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "a", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Accumulator", ), ), [ - ( - Some( - "list", - ), - ( - Expr(2), + Some("list")( + Expr(2)( Call( - ( - Expr(1), + Expr(1)( Id( "List", ), @@ -89,30 +77,26 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "l", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "l", + ty: None, + }, + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "foo", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "a", ), @@ -125,18 +109,17 @@ ), ), ), - ( - Expr(12), + Expr(12)( Var( - ( - "s", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "s", + ty: None, + }, + Expr(11)( Share( - ( - Expr(10), + Expr(10)( Id( "a", ), @@ -145,23 +128,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "l", ), @@ -172,21 +150,16 @@ ), ), ), - ( - Expr(23), + Expr(23)( Atomic( - ( - Expr(22), + Expr(22)( Seq( [ - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(18), + Expr(18)( Dot( - ( - Expr(17), + Expr(17)( Id( "s", ), @@ -194,11 +167,9 @@ "list", ), ), - ( - Expr(20), + Expr(20)( Call( - ( - Expr(19), + Expr(19)( Id( "List", ), diff --git a/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/validated.ref b/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/validated.ref index 9a651bef..41121a8a 100644 --- a/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/validated.ref +++ b/dada_tests/permissions/house-parties/house-parties-are-not-fair-to-the-tenant/validated.ref @@ -10,36 +10,21 @@ Dot( Place(0)( accumulator{0}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), "list", ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(33)( Seq( @@ -51,10 +36,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -66,16 +48,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -92,66 +68,39 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( a{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(12)( Seq( @@ -160,10 +109,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(9)( Call( @@ -171,16 +117,10 @@ Reserve( Place(3)( foo, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -189,59 +129,35 @@ Lease( Place(4)( a{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(11)( AssignFromPlace( TargetPlace(2)( l{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(17)( Seq( @@ -250,10 +166,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(14)( Share( @@ -261,57 +174,33 @@ Give( Place(6)( a{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(16)( AssignFromPlace( TargetPlace(4)( s{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(21)( Await( @@ -321,16 +210,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -339,30 +222,18 @@ Reserve( Place(9)( l{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(32)( Atomic( @@ -382,31 +253,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), Expr(22)( Reserve( Place(10)( s{4}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), Expr(28)( Seq( @@ -415,10 +274,7 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(25)( Call( @@ -430,29 +286,17 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), [], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(27)( AssignFromPlace( @@ -460,69 +304,39 @@ Dot( Place(11)( temp{6}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), "list", ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), Place(13)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: true, - }, + synthesized from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/patterns/pattern-lease-my/syntax.ref b/dada_tests/permissions/patterns/pattern-lease-my/syntax.ref index f50ff1b6..033aff40 100644 --- a/dada_tests/permissions/patterns/pattern-lease-my/syntax.ref +++ b/dada_tests/permissions/patterns/pattern-lease-my/syntax.ref @@ -7,22 +7,20 @@ Tokens(dada_tests/permissions/patterns/pattern-lease-my.dada:6:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(2), + Expr(2)( Var( - ( - "r", - None, - ), - ( - Expr(1), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "r", + ty: None, + }, + Expr(1)( Call( - ( - Expr(0), + Expr(0)( Id( "callee", ), @@ -32,18 +30,17 @@ ), ), ), - ( - Expr(5), + Expr(5)( Var( - ( - "data", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "data", + ty: None, + }, + Expr(4)( Dot( - ( - Expr(3), + Expr(3)( Id( "r", ), @@ -66,40 +63,34 @@ Tokens(dada_tests/permissions/patterns/pattern-lease-my.dada:12:14:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(7), + root_expr: Expr(7)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -110,11 +101,9 @@ ), ), ), - ( - Expr(6), + Expr(6)( Lease( - ( - Expr(5), + Expr(5)( Id( "p", ), diff --git a/dada_tests/permissions/patterns/pattern-lease-my/validated.ref b/dada_tests/permissions/patterns/pattern-lease-my/validated.ref index d9079148..60cde639 100644 --- a/dada_tests/permissions/patterns/pattern-lease-my/validated.ref +++ b/dada_tests/permissions/patterns/pattern-lease-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(1)( Call( @@ -20,96 +17,57 @@ Reserve( Place(0)( callee, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(3)( AssignFromPlace( TargetPlace(0)( r{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Expr(5)( AssignFromPlace( TargetPlace(2)( data{2}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(3)( Dot( Place(2)( r{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), "x", ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(8)( Seq( @@ -121,10 +79,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -136,100 +91,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(7)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/patterns/pattern-lease-our/syntax.ref b/dada_tests/permissions/patterns/pattern-lease-our/syntax.ref index 306a1dec..7a3cad9a 100644 --- a/dada_tests/permissions/patterns/pattern-lease-our/syntax.ref +++ b/dada_tests/permissions/patterns/pattern-lease-our/syntax.ref @@ -7,22 +7,20 @@ Tokens(dada_tests/permissions/patterns/pattern-lease-our.dada:7:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(2), + Expr(2)( Var( - ( - "r", - None, - ), - ( - Expr(1), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "r", + ty: None, + }, + Expr(1)( Call( - ( - Expr(0), + Expr(0)( Id( "callee", ), @@ -32,18 +30,17 @@ ), ), ), - ( - Expr(5), + Expr(5)( Var( - ( - "data", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "data", + ty: None, + }, + Expr(4)( Dot( - ( - Expr(3), + Expr(3)( Id( "r", ), @@ -66,43 +63,36 @@ Tokens(dada_tests/permissions/patterns/pattern-lease-our.dada:12:14:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(8), + root_expr: Expr(8)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -115,11 +105,9 @@ ), ), ), - ( - Expr(7), + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "p", ), diff --git a/dada_tests/permissions/patterns/pattern-lease-our/validated.ref b/dada_tests/permissions/patterns/pattern-lease-our/validated.ref index 169ebfb1..08ca1c1c 100644 --- a/dada_tests/permissions/patterns/pattern-lease-our/validated.ref +++ b/dada_tests/permissions/patterns/pattern-lease-our/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(1)( Call( @@ -20,96 +17,57 @@ Reserve( Place(0)( callee, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Expr(3)( AssignFromPlace( TargetPlace(0)( r{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + synthesized from Expr(2), ), Expr(5)( AssignFromPlace( TargetPlace(2)( data{2}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(3)( Dot( Place(2)( r{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), "x", ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(9)( Seq( @@ -121,10 +79,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -138,106 +93,64 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(8)( Lease( Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/house-party/syntax.ref b/dada_tests/permissions/revokation/house-party/syntax.ref index 31f303bc..cd61b223 100644 --- a/dada_tests/permissions/revokation/house-party/syntax.ref +++ b/dada_tests/permissions/revokation/house-party/syntax.ref @@ -7,31 +7,27 @@ Tokens(dada_tests/permissions/revokation/house-party.dada:13:18:23:1), ), data: syntax::Tree { - root_expr: ( - Expr(34), + root_expr: Expr(34)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "owner", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "owner", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Character", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Achilles", ), @@ -42,18 +38,17 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "lessee", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "lessee", + ty: None, + }, + Expr(5)( Lease( - ( - Expr(4), + Expr(4)( Id( "owner", ), @@ -62,18 +57,17 @@ ), ), ), - ( - Expr(9), + Expr(9)( Var( - ( - "guest", - None, - ), - ( - Expr(8), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "guest", + ty: None, + }, + Expr(8)( Share( - ( - Expr(7), + Expr(7)( Id( "lessee", ), @@ -82,26 +76,20 @@ ), ), ), - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "owner", ), @@ -115,26 +103,20 @@ ), ), ), - ( - Expr(19), + Expr(19)( Await( - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Dot( - ( - Expr(16), + Expr(16)( Id( "lessee", ), @@ -148,26 +130,20 @@ ), ), ), - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( Dot( - ( - Expr(21), + Expr(21)( Id( "guest", ), @@ -181,14 +157,11 @@ ), ), ), - ( - Expr(28), + Expr(28)( Assign( - ( - Expr(26), + Expr(26)( Dot( - ( - Expr(25), + Expr(25)( Id( "owner", ), @@ -196,34 +169,27 @@ "name", ), ), - ( - Expr(27), + Expr(27)( String( "Paris", ), ), ), ), - ( - Expr(33), + Expr(33)( Await( - ( - Expr(32), + Expr(32)( Call( - ( - Expr(29), + Expr(29)( Id( "print", ), ), [ - ( - None, - ( - Expr(31), + None( + Expr(31)( Dot( - ( - Expr(30), + Expr(30)( Id( "guest", ), diff --git a/dada_tests/permissions/revokation/house-party/validated.ref b/dada_tests/permissions/revokation/house-party/validated.ref index 6f4ec0f3..bdbe7147 100644 --- a/dada_tests/permissions/revokation/house-party/validated.ref +++ b/dada_tests/permissions/revokation/house-party/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,69 +21,42 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Achilles", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( owner{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(9)( Seq( @@ -95,60 +65,36 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(6)( Lease( Place(2)( owner{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(8)( AssignFromPlace( TargetPlace(2)( lessee{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), Expr(14)( Seq( @@ -157,10 +103,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(11)( Share( @@ -168,57 +111,33 @@ Give( Place(4)( lessee{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(13)( AssignFromPlace( TargetPlace(4)( guest{4}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Place(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), Expr(18)( Await( @@ -228,16 +147,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -248,37 +161,22 @@ Dot( Place(7)( owner{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), "name", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(22)( Await( @@ -288,16 +186,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( @@ -308,37 +200,22 @@ Dot( Place(10)( lessee{2}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), "name", ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Expr(26)( Await( @@ -348,16 +225,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( @@ -368,37 +239,22 @@ Dot( Place(13)( guest{4}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), "name", ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), Expr(33)( Seq( @@ -407,31 +263,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: true, - }, + synthesized from Expr(25), ), Expr(27)( Reserve( Place(15)( owner{0}, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + synthesized from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: true, - }, + synthesized from Expr(25), ), Expr(32)( Seq( @@ -440,23 +284,14 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: true, - }, + synthesized from Expr(27), ), Expr(29)( "Paris", - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: true, - }, + synthesized from Expr(27), ), Expr(31)( AssignFromPlace( @@ -464,44 +299,26 @@ Dot( Place(16)( temp{6}, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: true, - }, + synthesized from Expr(25), ), "name", ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), Place(17)( temp{7}, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: true, - }, + synthesized from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + synthesized from Expr(28), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + synthesized from Expr(28), ), Expr(37)( Await( @@ -511,16 +328,10 @@ Reserve( Place(18)( Print, - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + synthesized from Expr(29), ), [ NamedExpr( @@ -531,43 +342,25 @@ Dot( Place(19)( guest{4}, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), "name", ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + synthesized from Expr(31), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-lease-share/syntax.ref b/dada_tests/permissions/revokation/overwrite-lease-share/syntax.ref index 132da25e..8ec4c460 100644 --- a/dada_tests/permissions/revokation/overwrite-lease-share/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-lease-share/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/permissions/revokation/overwrite-lease-share.dada:3:18:12:1), ), data: syntax::Tree { - root_expr: ( - Expr(27), + root_expr: Expr(27)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "pair1", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair1", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,33 +45,28 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "pair2", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair2", + ty: None, + }, + Expr(10)( Call( - ( - Expr(5), + Expr(5)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Share( - ( - Expr(7), + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "pair1", ), @@ -87,10 +76,8 @@ ), ), ), - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "66", ), @@ -101,21 +88,19 @@ ), ), ), - ( - Expr(15), + Expr(15)( Var( - ( - "p", - None, - ), - ( - Expr(14), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(14)( Lease( - ( - Expr(13), + Expr(13)( Dot( - ( - Expr(12), + Expr(12)( Id( "pair2", ), @@ -127,14 +112,11 @@ ), ), ), - ( - Expr(22), + Expr(22)( Assign( - ( - Expr(17), + Expr(17)( Dot( - ( - Expr(16), + Expr(16)( Id( "pair2", ), @@ -142,29 +124,23 @@ "a", ), ), - ( - Expr(21), + Expr(21)( Call( - ( - Expr(18), + Expr(18)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Integer( "23", ), ), ), - ( - None, - ( - Expr(20), + None( + Expr(20)( Integer( "45", ), @@ -175,23 +151,18 @@ ), ), ), - ( - Expr(26), + Expr(26)( Await( - ( - Expr(25), + Expr(25)( Call( - ( - Expr(23), + Expr(23)( Id( "print", ), ), [ - ( - None, - ( - Expr(24), + None( + Expr(24)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-lease-share/validated.ref b/dada_tests/permissions/revokation/overwrite-lease-share/validated.ref index 8edd32b3..36743925 100644 --- a/dada_tests/permissions/revokation/overwrite-lease-share/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-lease-share/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(14)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(11)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -140,75 +98,45 @@ Lease( Place(3)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), NamedExpr( None, Expr(10)( 66, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(13)( AssignFromPlace( TargetPlace(2)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(18)( Seq( @@ -217,10 +145,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(15)( Lease( @@ -228,58 +153,34 @@ Dot( Place(5)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), "a", ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(17)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), Expr(28)( Seq( @@ -288,31 +189,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Expr(19)( Reserve( Place(8)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Expr(27)( Seq( @@ -321,10 +210,7 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), Expr(24)( Call( @@ -336,50 +222,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( None, Expr(22)( 23, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), NamedExpr( None, Expr(23)( 45, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), Expr(26)( AssignFromPlace( @@ -387,44 +255,26 @@ Dot( Place(9)( temp{6}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), "a", ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Place(11)( temp{7}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), Expr(32)( Await( @@ -434,16 +284,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), [ NamedExpr( @@ -452,36 +296,21 @@ Reserve( Place(13)( p{4}, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-leased/syntax.ref b/dada_tests/permissions/revokation/overwrite-leased/syntax.ref index aab72c2d..7d9f7f9c 100644 --- a/dada_tests/permissions/revokation/overwrite-leased/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-leased/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/permissions/revokation/overwrite-leased.dada:3:18:23:1), ), data: syntax::Tree { - root_expr: ( - Expr(34), + root_expr: Expr(34)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "pair1", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair1", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,30 +45,26 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "pair2", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair2", + ty: None, + }, + Expr(9)( Call( - ( - Expr(5), + Expr(5)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "pair1", ), @@ -82,10 +72,8 @@ ), ), ), - ( - None, - ( - Expr(8), + None( + Expr(8)( Integer( "66", ), @@ -96,21 +84,19 @@ ), ), ), - ( - Expr(14), + Expr(14)( Var( - ( - "p", - None, - ), - ( - Expr(13), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(13)( Lease( - ( - Expr(12), + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "pair2", ), @@ -122,14 +108,11 @@ ), ), ), - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(16), + Expr(16)( Dot( - ( - Expr(15), + Expr(15)( Id( "pair2", ), @@ -137,29 +120,23 @@ "a", ), ), - ( - Expr(20), + Expr(20)( Call( - ( - Expr(17), + Expr(17)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Integer( "23", ), ), ), - ( - None, - ( - Expr(19), + None( + Expr(19)( Integer( "45", ), @@ -170,23 +147,18 @@ ), ), ), - ( - Expr(25), + Expr(25)( Await( - ( - Expr(24), + Expr(24)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(23), + None( + Expr(23)( Id( "p", ), @@ -197,23 +169,18 @@ ), ), ), - ( - Expr(29), + Expr(29)( Await( - ( - Expr(28), + Expr(28)( Call( - ( - Expr(26), + Expr(26)( Id( "print", ), ), [ - ( - None, - ( - Expr(27), + None( + Expr(27)( Id( "pair1", ), @@ -224,23 +191,18 @@ ), ), ), - ( - Expr(33), + Expr(33)( Await( - ( - Expr(32), + Expr(32)( Call( - ( - Expr(30), + Expr(30)( Id( "print", ), ), [ - ( - None, - ( - Expr(31), + None( + Expr(31)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-leased/validated.ref b/dada_tests/permissions/revokation/overwrite-leased/validated.ref index 29f85958..ce45d6fa 100644 --- a/dada_tests/permissions/revokation/overwrite-leased/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-leased/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(13)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(10)( Call( @@ -120,16 +84,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,69 +96,42 @@ Lease( Place(3)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), NamedExpr( None, Expr(9)( 66, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(12)( AssignFromPlace( TargetPlace(2)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), Expr(17)( Seq( @@ -209,10 +140,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(14)( Lease( @@ -220,58 +148,34 @@ Dot( Place(5)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), "a", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(16)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), Expr(27)( Seq( @@ -280,31 +184,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(18)( Reserve( Place(8)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(26)( Seq( @@ -313,10 +205,7 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(23)( Call( @@ -328,50 +217,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( None, Expr(21)( 23, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), NamedExpr( None, Expr(22)( 45, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(25)( AssignFromPlace( @@ -379,44 +250,26 @@ Dot( Place(9)( temp{6}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), "a", ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Place(11)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), Expr(31)( Await( @@ -426,16 +279,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -444,30 +291,18 @@ Reserve( Place(13)( p{4}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), Expr(35)( Await( @@ -477,16 +312,10 @@ Reserve( Place(14)( Print, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + synthesized from Expr(26), ), [ NamedExpr( @@ -495,30 +324,18 @@ Reserve( Place(15)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(27), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), Expr(39)( Await( @@ -528,16 +345,10 @@ Reserve( Place(16)( Print, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( @@ -546,36 +357,21 @@ Reserve( Place(17)( p{4}, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + synthesized from Expr(31), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-our-leased/syntax.ref b/dada_tests/permissions/revokation/overwrite-our-leased/syntax.ref index 71628a9c..77924067 100644 --- a/dada_tests/permissions/revokation/overwrite-our-leased/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-our-leased/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/revokation/overwrite-our-leased.dada:3:18:14:1), ), data: syntax::Tree { - root_expr: ( - Expr(27), + root_expr: Expr(27)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "pair1", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair1", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,30 +49,26 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "pair2", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair2", + ty: None, + }, + Expr(10)( Call( - ( - Expr(6), + Expr(6)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Lease( - ( - Expr(7), + Expr(7)( Id( "pair1", ), @@ -87,10 +76,8 @@ ), ), ), - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "66", ), @@ -101,21 +88,19 @@ ), ), ), - ( - Expr(15), + Expr(15)( Var( - ( - "p", - None, - ), - ( - Expr(14), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(14)( Lease( - ( - Expr(13), + Expr(13)( Dot( - ( - Expr(12), + Expr(12)( Id( "pair2", ), @@ -127,14 +112,11 @@ ), ), ), - ( - Expr(22), + Expr(22)( Assign( - ( - Expr(17), + Expr(17)( Dot( - ( - Expr(16), + Expr(16)( Id( "pair2", ), @@ -142,29 +124,23 @@ "a", ), ), - ( - Expr(21), + Expr(21)( Call( - ( - Expr(18), + Expr(18)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Integer( "23", ), ), ), - ( - None, - ( - Expr(20), + None( + Expr(20)( Integer( "45", ), @@ -175,23 +151,18 @@ ), ), ), - ( - Expr(26), + Expr(26)( Await( - ( - Expr(25), + Expr(25)( Call( - ( - Expr(23), + Expr(23)( Id( "print", ), ), [ - ( - None, - ( - Expr(24), + None( + Expr(24)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-our-leased/validated.ref b/dada_tests/permissions/revokation/overwrite-our-leased/validated.ref index 605794ed..3c8b138a 100644 --- a/dada_tests/permissions/revokation/overwrite-our-leased/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-our-leased/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -113,10 +77,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(11)( Call( @@ -128,16 +89,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), [ NamedExpr( @@ -146,69 +101,42 @@ Lease( Place(3)( pair1{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), NamedExpr( None, Expr(10)( 66, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(13)( AssignFromPlace( TargetPlace(2)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(18)( Seq( @@ -217,10 +145,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(15)( Lease( @@ -228,58 +153,34 @@ Dot( Place(5)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), "a", ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(17)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), Expr(28)( Seq( @@ -288,31 +189,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Expr(19)( Reserve( Place(8)( pair2{2}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), Expr(27)( Seq( @@ -321,10 +210,7 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), Expr(24)( Call( @@ -336,50 +222,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( None, Expr(22)( 23, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), NamedExpr( None, Expr(23)( 45, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), Expr(26)( AssignFromPlace( @@ -387,44 +255,26 @@ Dot( Place(9)( temp{6}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, + synthesized from Expr(16), ), "a", ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Place(11)( temp{7}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: true, - }, + synthesized from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), Expr(32)( Await( @@ -434,16 +284,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), [ NamedExpr( @@ -452,36 +296,21 @@ Reserve( Place(13)( p{4}, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-our-shared/syntax.ref b/dada_tests/permissions/revokation/overwrite-our-shared/syntax.ref index fe075495..c658337b 100644 --- a/dada_tests/permissions/revokation/overwrite-our-shared/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-our-shared/syntax.ref @@ -7,55 +7,45 @@ Tokens(dada_tests/permissions/revokation/overwrite-our-shared.dada:3:18:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(24), + root_expr: Expr(24)( Seq( [ - ( - Expr(8), + Expr(8)( Var( - ( - "pair", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(7)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( Share( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -67,10 +57,8 @@ ), ), ), - ( - None, - ( - Expr(6), + None( + Expr(6)( Integer( "66", ), @@ -81,21 +69,19 @@ ), ), ), - ( - Expr(12), + Expr(12)( Var( - ( - "p", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(11)( Share( - ( - Expr(10), + Expr(10)( Dot( - ( - Expr(9), + Expr(9)( Id( "pair", ), @@ -107,14 +93,11 @@ ), ), ), - ( - Expr(19), + Expr(19)( Assign( - ( - Expr(14), + Expr(14)( Dot( - ( - Expr(13), + Expr(13)( Id( "pair", ), @@ -122,29 +105,23 @@ "a", ), ), - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Integer( "23", ), ), ), - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "45", ), @@ -155,23 +132,18 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-our-shared/validated.ref b/dada_tests/permissions/revokation/overwrite-our-shared/validated.ref index f11d64bc..2d0dd9bf 100644 --- a/dada_tests/permissions/revokation/overwrite-our-shared/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-our-shared/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(7)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -50,103 +41,64 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), NamedExpr( None, Expr(6)( 66, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(15)( Seq( @@ -155,10 +107,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(12)( Share( @@ -168,64 +117,37 @@ Dot( Place(3)( pair{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), "a", ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(14)( AssignFromPlace( TargetPlace(2)( p{2}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(25)( Seq( @@ -234,31 +156,19 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(16)( Reserve( Place(6)( pair{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(24)( Seq( @@ -267,10 +177,7 @@ Assign( TargetPlace(6)( temp{5}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(21)( Call( @@ -282,50 +189,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(19)( 23, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), NamedExpr( None, Expr(20)( 45, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(23)( AssignFromPlace( @@ -333,44 +222,26 @@ Dot( Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), "a", ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Place(9)( temp{5}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), Expr(29)( Await( @@ -380,16 +251,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( @@ -398,36 +263,21 @@ Reserve( Place(11)( p{2}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-owned/syntax.ref b/dada_tests/permissions/revokation/overwrite-owned/syntax.ref index e80d28ff..426b73fd 100644 --- a/dada_tests/permissions/revokation/overwrite-owned/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-owned/syntax.ref @@ -7,52 +7,43 @@ Tokens(dada_tests/permissions/revokation/overwrite-owned.dada:3:18:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(23), + root_expr: Expr(23)( Seq( [ - ( - Expr(7), + Expr(7)( Var( - ( - "pair", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -62,10 +53,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -76,21 +65,19 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "p", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(10)( Lease( - ( - Expr(9), + Expr(9)( Dot( - ( - Expr(8), + Expr(8)( Id( "pair", ), @@ -102,14 +89,11 @@ ), ), ), - ( - Expr(18), + Expr(18)( Assign( - ( - Expr(13), + Expr(13)( Dot( - ( - Expr(12), + Expr(12)( Id( "pair", ), @@ -117,29 +101,23 @@ "a", ), ), - ( - Expr(17), + Expr(17)( Call( - ( - Expr(14), + Expr(14)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Integer( "23", ), ), ), - ( - None, - ( - Expr(16), + None( + Expr(16)( Integer( "45", ), @@ -150,23 +128,18 @@ ), ), ), - ( - Expr(22), + Expr(22)( Await( - ( - Expr(21), + Expr(21)( Call( - ( - Expr(19), + Expr(19)( Id( "print", ), ), [ - ( - None, - ( - Expr(20), + None( + Expr(20)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-owned/validated.ref b/dada_tests/permissions/revokation/overwrite-owned/validated.ref index df43bd27..1f7e8a04 100644 --- a/dada_tests/permissions/revokation/overwrite-owned/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-owned/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(6)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -48,97 +39,61 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(13)( Seq( @@ -147,10 +102,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(10)( Lease( @@ -158,58 +110,34 @@ Dot( Place(3)( pair{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), "a", ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(12)( AssignFromPlace( TargetPlace(2)( p{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(23)( Seq( @@ -218,31 +146,19 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(14)( Reserve( Place(6)( pair{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(22)( Seq( @@ -251,10 +167,7 @@ Assign( TargetPlace(6)( temp{5}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), Expr(19)( Call( @@ -266,50 +179,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( None, Expr(17)( 23, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), NamedExpr( None, Expr(18)( 45, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), Expr(21)( AssignFromPlace( @@ -317,44 +212,26 @@ Dot( Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), "a", ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Place(9)( temp{5}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), Expr(27)( Await( @@ -364,16 +241,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), [ NamedExpr( @@ -382,36 +253,21 @@ Reserve( Place(11)( p{2}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-shared-separate-root/syntax.ref b/dada_tests/permissions/revokation/overwrite-shared-separate-root/syntax.ref index 82e64768..8b59bfd9 100644 --- a/dada_tests/permissions/revokation/overwrite-shared-separate-root/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-shared-separate-root/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/revokation/overwrite-shared-separate-root.dada:3:18:16:1), ), data: syntax::Tree { - root_expr: ( - Expr(26), + root_expr: Expr(26)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "temp", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "temp", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,36 +49,31 @@ ), ), ), - ( - Expr(10), + Expr(10)( Var( - ( - "pair", - None, - ), - ( - Expr(9), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(9)( Call( - ( - Expr(6), + Expr(6)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Id( "temp", ), ), ), - ( - None, - ( - Expr(8), + None( + Expr(8)( Integer( "66", ), @@ -96,21 +84,19 @@ ), ), ), - ( - Expr(14), + Expr(14)( Var( - ( - "p", - None, - ), - ( - Expr(13), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(13)( Lease( - ( - Expr(12), + Expr(12)( Dot( - ( - Expr(11), + Expr(11)( Id( "pair", ), @@ -122,14 +108,11 @@ ), ), ), - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(16), + Expr(16)( Dot( - ( - Expr(15), + Expr(15)( Id( "pair", ), @@ -137,29 +120,23 @@ "a", ), ), - ( - Expr(20), + Expr(20)( Call( - ( - Expr(17), + Expr(17)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Integer( "23", ), ), ), - ( - None, - ( - Expr(19), + None( + Expr(19)( Integer( "45", ), @@ -170,23 +147,18 @@ ), ), ), - ( - Expr(25), + Expr(25)( Await( - ( - Expr(24), + Expr(24)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(23), + None( + Expr(23)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-shared-separate-root/validated.ref b/dada_tests/permissions/revokation/overwrite-shared-separate-root/validated.ref index a0f949cd..92918eef 100644 --- a/dada_tests/permissions/revokation/overwrite-shared-separate-root/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-shared-separate-root/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( temp{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -113,10 +77,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(11)( Call( @@ -128,16 +89,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), [ NamedExpr( @@ -146,69 +101,42 @@ Reserve( Place(3)( temp{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), NamedExpr( None, Expr(10)( 66, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(13)( AssignFromPlace( TargetPlace(2)( pair{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), Expr(18)( Seq( @@ -217,10 +145,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(15)( Lease( @@ -228,58 +153,34 @@ Dot( Place(5)( pair{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), "a", ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(17)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), Expr(28)( Seq( @@ -288,31 +189,19 @@ Assign( TargetPlace(6)( temp{6}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(19)( Reserve( Place(8)( pair{2}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(27)( Seq( @@ -321,10 +210,7 @@ Assign( TargetPlace(8)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(24)( Call( @@ -336,50 +222,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( None, Expr(22)( 23, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), NamedExpr( None, Expr(23)( 45, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(26)( AssignFromPlace( @@ -387,44 +255,26 @@ Dot( Place(9)( temp{6}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), "a", ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Place(11)( temp{7}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), Expr(32)( Await( @@ -434,16 +284,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -452,36 +296,21 @@ Reserve( Place(13)( p{4}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ], ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/overwrite-shared/syntax.ref b/dada_tests/permissions/revokation/overwrite-shared/syntax.ref index 22d894ed..9fb3297c 100644 --- a/dada_tests/permissions/revokation/overwrite-shared/syntax.ref +++ b/dada_tests/permissions/revokation/overwrite-shared/syntax.ref @@ -7,55 +7,45 @@ Tokens(dada_tests/permissions/revokation/overwrite-shared.dada:3:18:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(24), + root_expr: Expr(24)( Seq( [ - ( - Expr(8), + Expr(8)( Var( - ( - "pair", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(7)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( Share( - ( - Expr(4), + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -67,10 +57,8 @@ ), ), ), - ( - None, - ( - Expr(6), + None( + Expr(6)( Integer( "66", ), @@ -81,21 +69,19 @@ ), ), ), - ( - Expr(12), + Expr(12)( Var( - ( - "p", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(11)( Lease( - ( - Expr(10), + Expr(10)( Dot( - ( - Expr(9), + Expr(9)( Id( "pair", ), @@ -107,14 +93,11 @@ ), ), ), - ( - Expr(19), + Expr(19)( Assign( - ( - Expr(14), + Expr(14)( Dot( - ( - Expr(13), + Expr(13)( Id( "pair", ), @@ -122,29 +105,23 @@ "a", ), ), - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Integer( "23", ), ), ), - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "45", ), @@ -155,23 +132,18 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/overwrite-shared/validated.ref b/dada_tests/permissions/revokation/overwrite-shared/validated.ref index 3a07fdd4..186058b8 100644 --- a/dada_tests/permissions/revokation/overwrite-shared/validated.ref +++ b/dada_tests/permissions/revokation/overwrite-shared/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(7)( Call( @@ -24,16 +21,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -50,103 +41,64 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), NamedExpr( None, Expr(6)( 66, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(14)( Seq( @@ -155,10 +107,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(11)( Lease( @@ -166,58 +115,34 @@ Dot( Place(3)( pair{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), "a", ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(13)( AssignFromPlace( TargetPlace(2)( p{2}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(5)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(24)( Seq( @@ -226,31 +151,19 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(15)( Reserve( Place(6)( pair{0}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(23)( Seq( @@ -259,10 +172,7 @@ Assign( TargetPlace(6)( temp{5}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(20)( Call( @@ -274,50 +184,32 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(18)( 23, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), NamedExpr( None, Expr(19)( 45, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(22)( AssignFromPlace( @@ -325,44 +217,26 @@ Dot( Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), "a", ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Place(9)( temp{5}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), Expr(28)( Await( @@ -372,16 +246,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( @@ -390,36 +258,21 @@ Reserve( Place(11)( p{2}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/bir.ref b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/bir.ref index ab0876d4..b158d89d 100644 --- a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/bir.ref @@ -60,7 +60,7 @@ ), ], Assign( - temp{3}, + temp{2}, Call( temp{7}, [ @@ -97,15 +97,15 @@ ), ( AssignExpr( - temp{2}, - temp{3}.lease, + temp{3}, + temp{2}.lease, ), Expr(7), ), ( AssignPlace( p{0}, - temp{2}, + temp{3}, ), Expr(8), ), diff --git a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/syntax.ref index 3b359f63..bccf9a69 100644 --- a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/syntax.ref @@ -7,67 +7,55 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-atomic-temporary.dada:3:18:14:1), ), data: syntax::Tree { - root_expr: ( - Expr(15), + root_expr: Expr(15)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(10), + Expr(10)( Atomic( - ( - Expr(9), + Expr(9)( Seq( [ - ( - Expr(8), + Expr(8)( Assign( - ( - Expr(2), + Expr(2)( Id( "p", ), ), - ( - Expr(7), + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(3), + Expr(3)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Integer( "22", ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "44", ), @@ -85,23 +73,18 @@ ), ), ), - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(11), + Expr(11)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/validated.ref b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/validated.ref index b947b9ec..0ac55fb7 100644 --- a/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-atomic-temporary/validated.ref @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(16)( Atomic( @@ -72,24 +51,18 @@ [ Expr(11)( Assign( - TargetPlace(3)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + TargetPlace(4)( + temp{3}, + synthesized from Expr(7), ), Expr(10)( Seq( [ Expr(8)( Assign( - TargetPlace(4)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + TargetPlace(3)( + temp{2}, + synthesized from Expr(6), ), Expr(7)( Call( @@ -101,126 +74,75 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), [ NamedExpr( None, Expr(5)( 22, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(6)( 44, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(9)( Lease( Place(2)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + temp{2}, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(12)( AssignFromPlace( TargetPlace(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Place(3)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + temp{3}, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(20)( Await( @@ -230,16 +152,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [ NamedExpr( @@ -248,36 +164,21 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/bir.ref b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/bir.ref index 0602890c..c7a368ee 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/bir.ref @@ -100,7 +100,7 @@ ), ], Assign( - temp{3}, + temp{2}, Call( temp{11}, [ @@ -216,15 +216,15 @@ ), ( AssignExpr( - temp{2}, - temp{3}.lease, + temp{3}, + temp{2}.lease, ), Expr(13), ), ( AssignPlace( p{0}, - temp{2}, + temp{3}, ), Expr(14), ), diff --git a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/syntax.ref index 11c36e15..aac5b47b 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/syntax.ref @@ -7,55 +7,46 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-if-false-temporary.dada:3:18:16:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(16), + Expr(16)( If( - ( - Expr(2), + Expr(2)( Boolean( false, ), ), - ( - Expr(7), + Expr(7)( Seq( [ - ( - Expr(6), + Expr(6)( Await( - ( - Expr(5), + Expr(5)( Call( - ( - Expr(3), + Expr(3)( Id( "print", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( String( "wtf", ), @@ -70,45 +61,35 @@ ), ), Some( - ( - Expr(15), + Expr(15)( Seq( [ - ( - Expr(14), + Expr(14)( Assign( - ( - Expr(8), + Expr(8)( Id( "p", ), ), - ( - Expr(13), + Expr(13)( Lease( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(9), + Expr(9)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(10), + None( + Expr(10)( Integer( "22", ), ), ), - ( - None, - ( - Expr(11), + None( + Expr(11)( Integer( "44", ), @@ -127,23 +108,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/validated.ref b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/validated.ref index 5b843c5a..cd77bd70 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-false-temporary/validated.ref @@ -9,61 +9,37 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(22)( If( Expr(4)( false, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(9)( Seq( @@ -76,47 +52,29 @@ Reserve( Place(1)( Print, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), [ NamedExpr( None, Expr(6)( "wtf", - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(21)( Declare( @@ -132,24 +90,18 @@ [ Expr(17)( Assign( - TargetPlace(3)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + TargetPlace(4)( + temp{3}, + synthesized from Expr(13), ), Expr(16)( Seq( [ Expr(14)( Assign( - TargetPlace(4)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + TargetPlace(3)( + temp{2}, + synthesized from Expr(12), ), Expr(13)( Call( @@ -161,126 +113,75 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( None, Expr(11)( 22, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), NamedExpr( None, Expr(12)( 44, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(15)( Lease( Place(3)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + temp{2}, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(18)( AssignFromPlace( TargetPlace(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), Place(4)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + temp{3}, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(26)( Await( @@ -290,16 +191,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -308,36 +203,21 @@ Reserve( Place(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/bir.ref b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/bir.ref index a96c350e..ee440f76 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/bir.ref @@ -69,7 +69,7 @@ ), ], Assign( - temp{3}, + temp{2}, Call( temp{8}, [ @@ -163,15 +163,15 @@ ), ( AssignExpr( - temp{2}, - temp{3}.lease, + temp{3}, + temp{2}.lease, ), Expr(8), ), ( AssignPlace( p{0}, - temp{2}, + temp{3}, ), Expr(9), ), diff --git a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/syntax.ref index f97e1023..6cb9c790 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/syntax.ref @@ -7,73 +7,60 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-if-true-temporary.dada:3:18:16:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(12), + Expr(12)( If( - ( - Expr(2), + Expr(2)( Boolean( true, ), ), - ( - Expr(10), + Expr(10)( Seq( [ - ( - Expr(9), + Expr(9)( Assign( - ( - Expr(3), + Expr(3)( Id( "p", ), ), - ( - Expr(8), + Expr(8)( Lease( - ( - Expr(7), + Expr(7)( Call( - ( - Expr(4), + Expr(4)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "22", ), ), ), - ( - None, - ( - Expr(6), + None( + Expr(6)( Integer( "44", ), @@ -90,8 +77,7 @@ ), ), Some( - ( - Expr(11), + Expr(11)( Seq( [], ), @@ -99,23 +85,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/validated.ref b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/validated.ref index 2dd2d24e..58442acf 100644 --- a/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-if-true-temporary/validated.ref @@ -9,61 +9,37 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(18)( If( Expr(4)( true, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), Expr(16)( Declare( @@ -79,24 +55,18 @@ [ Expr(12)( Assign( - TargetPlace(3)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + TargetPlace(4)( + temp{3}, + synthesized from Expr(8), ), Expr(11)( Seq( [ Expr(9)( Assign( - TargetPlace(4)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + TargetPlace(3)( + temp{2}, + synthesized from Expr(7), ), Expr(8)( Call( @@ -108,135 +78,81 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( None, Expr(6)( 22, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), NamedExpr( None, Expr(7)( 44, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(10)( Lease( Place(2)( - temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + temp{2}, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(13)( AssignFromPlace( TargetPlace(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Place(3)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + temp{3}, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(17)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Expr(22)( Await( @@ -246,16 +162,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -264,36 +174,21 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/bir.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/bir.ref index c531b1e9..058b9426 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/bir.ref @@ -19,14 +19,14 @@ ), ( AssignExpr( - temp{9}, + temp{10}, (), ), Expr(1), ), ( Clear( - temp{9}, + temp{10}, ), Expr(1), ), @@ -46,14 +46,14 @@ ), ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(3), ), ( Clear( - temp{10}, + temp{11}, ), Expr(3), ), @@ -66,21 +66,21 @@ [ ( AssignExpr( - temp{14}, + temp{15}, Class(Id { value: 1 }).reserve, ), Expr(7), ), ( AssignExpr( - temp{15}, + temp{16}, n{2}.reserve, ), Expr(8), ), ( AssignExpr( - temp{16}, + temp{17}, 44, ), Expr(9), @@ -89,10 +89,10 @@ Assign( temp{5}, Call( - temp{14}, + temp{15}, [ - temp{15}, temp{16}, + temp{17}, ], [ None, @@ -105,26 +105,26 @@ BasicBlock(2): BasicBlockData( [], Return( - temp{8}, + temp{9}, ), ), BasicBlock(3): BasicBlockData( [ ( Clear( - temp{16}, + temp{17}, ), Expr(9), ), ( Clear( - temp{15}, + temp{16}, ), Expr(8), ), ( Clear( - temp{14}, + temp{15}, ), Expr(7), ), @@ -137,14 +137,14 @@ ), ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(11), ), ( Clear( - temp{13}, + temp{14}, ), Expr(11), ), @@ -164,38 +164,38 @@ ), ( AssignExpr( - temp{17}, + temp{18}, (), ), Expr(14), ), ( Clear( - temp{17}, + temp{18}, ), Expr(14), ), ( AssignExpr( - temp{20}, + temp{21}, Print.reserve, ), Expr(15), ), ( AssignExpr( - temp{21}, + temp{22}, p{0}.reserve, ), Expr(16), ), ], Assign( - temp{19}, + temp{20}, Call( - temp{20}, + temp{21}, [ - temp{21}, + temp{22}, ], [ None, @@ -208,21 +208,21 @@ [ ( Clear( - temp{21}, + temp{22}, ), Expr(16), ), ( Clear( - temp{20}, + temp{21}, ), Expr(15), ), ], Assign( - temp{18}, + temp{19}, Await( - temp{19}, + temp{20}, ), BasicBlock(5), ), @@ -231,13 +231,13 @@ [ ( Clear( - temp{19}, + temp{20}, ), Expr(17), ), ( Clear( - temp{18}, + temp{19}, ), Expr(18), ), @@ -250,47 +250,54 @@ ), ( AssignExpr( - temp{22}, + temp{23}, n{2}.give, ), - Expr(24), + Expr(22), ), ( AssignExpr( - temp{23}, + temp{24}, 1, ), Expr(23), ), ( AssignExpr( - n{2}, - temp{22} + temp{23}, + temp{8}, + temp{23} + temp{24}, ), Expr(24), ), ( Clear( - temp{23}, + temp{24}, ), Expr(23), ), ( Clear( - temp{22}, + temp{23}, + ), + Expr(22), + ), + ( + AssignPlace( + n{2}, + temp{8}, ), Expr(24), ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(24), ), ( Clear( - temp{12}, + temp{13}, ), Expr(25), ), @@ -318,42 +325,48 @@ ), Expr(25), ), + ( + Clear( + temp{8}, + ), + Expr(25), + ), ( AssignExpr( - temp{25}, + temp{26}, n{2}.give, ), Expr(4), ), ( AssignExpr( - temp{26}, + temp{27}, 6, ), Expr(5), ), ( AssignExpr( - temp{24}, - temp{25} < temp{26}, + temp{25}, + temp{26} < temp{27}, ), Expr(6), ), ( Clear( - temp{26}, + temp{27}, ), Expr(5), ), ( Clear( - temp{25}, + temp{26}, ), Expr(4), ), ], If( - temp{24}, + temp{25}, BasicBlock(6), BasicBlock(7), ), @@ -362,7 +375,7 @@ [ ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(26), @@ -376,7 +389,7 @@ [ ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(26), @@ -390,13 +403,13 @@ [ ( Clear( - temp{24}, + temp{25}, ), Expr(6), ), ( Clear( - temp{11}, + temp{12}, ), Expr(26), ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/syntax.ref index 65193c9d..b509a4a6 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/syntax.ref @@ -7,95 +7,84 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-while-iteration-named.dada:7:18:28:1), ), data: syntax::Tree { - root_expr: ( - Expr(27), + root_expr: Expr(27)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "n", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "n", + ty: None, + }, + Expr(2)( Integer( "0", ), ), ), ), - ( - Expr(26), + Expr(26)( While( - ( - Expr(6), + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Id( "n", ), ), LessThan, - ( - Expr(5), + Expr(5)( Integer( "6", ), ), ), ), - ( - Expr(25), + Expr(25)( Seq( [ - ( - Expr(11), + Expr(11)( Var( - ( - "pair", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(10)( Call( - ( - Expr(7), + Expr(7)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "n", ), ), ), - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "44", ), @@ -106,18 +95,17 @@ ), ), ), - ( - Expr(14), + Expr(14)( Var( - ( - "t", - None, - ), - ( - Expr(13), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "t", + ty: None, + }, + Expr(13)( Lease( - ( - Expr(12), + Expr(12)( Id( "pair", ), @@ -126,23 +114,18 @@ ), ), ), - ( - Expr(18), + Expr(18)( Await( - ( - Expr(17), + Expr(17)( Call( - ( - Expr(15), + Expr(15)( Id( "print", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Id( "p", ), @@ -153,35 +136,29 @@ ), ), ), - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(19), + Expr(19)( Id( "p", ), ), - ( - Expr(20), + Expr(20)( Id( "t", ), ), ), ), - ( - Expr(24), + Expr(24)( OpEq( - ( - Expr(22), + Expr(22)( Id( "n", ), ), PlusEqual, - ( - Expr(23), + Expr(23)( Integer( "1", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/validated.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/validated.ref index 3da2508c..e974eaf9 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-named/validated.ref @@ -1,5 +1,5 @@ [ - Expr(38)( + Expr(40)( Seq( [ Expr(3)( @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,68 +42,48 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 0, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(8)( Loop( None, - Expr(37)( + Expr(39)( Seq( [ - Expr(33)( + Expr(35)( Declare( [ pair{4}, temp{5}, t{6}, temp{7}, + temp{8}, ], - Expr(32)( + Expr(34)( Seq( [ Expr(18)( @@ -134,10 +93,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(15)( Call( @@ -149,16 +105,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -167,69 +117,42 @@ Reserve( Place(4)( n{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), NamedExpr( None, Expr(14)( 44, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(17)( AssignFromPlace( TargetPlace(4)( pair{4}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(22)( Seq( @@ -238,60 +161,36 @@ Assign( TargetPlace(7)( temp{7}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(19)( Lease( Place(6)( pair{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Expr(21)( AssignFromPlace( TargetPlace(6)( t{6}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Place(7)( temp{7}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), Expr(26)( Await( @@ -301,16 +200,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( @@ -319,113 +212,88 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), Expr(27)( AssignFromPlace( TargetPlace(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Place(10)( t{6}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), - Expr(31)( - Assign( - TargetPlace(9)( - n{2}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: true, - }, - ), - Expr(30)( - Op( - Expr(28)( - Give( - Place(11)( - n{2}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + Expr(33)( + Seq( + [ + Expr(31)( + Assign( + TargetPlace(10)( + temp{8}, + synthesized from Expr(24), + ), + Expr(30)( + Op( + Expr(28)( + Give( + Place(11)( + n{2}, + synthesized from Expr(22), + ), + ), + synthesized from Expr(22), + ), + Plus, + Expr(29)( + 1, + from Expr(23), + ), ), + synthesized from Expr(24), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, ), - Plus, - Expr(29)( - 1, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(24), + ), + Expr(32)( + AssignFromPlace( + TargetPlace(9)( + n{2}, + from Expr(22), + ), + Place(12)( + temp{8}, + synthesized from Expr(24), + ), ), + from Expr(24), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: true, - }, + synthesized from Expr(25), ), - Expr(36)( + Expr(38)( If( Expr(11)( Op( @@ -433,78 +301,45 @@ Give( Place(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), LessThan, Expr(10)( 6, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), - Expr(34)( + Expr(36)( Tuple, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), - Expr(35)( + Expr(37)( Break( 8, - Expr(34)( + Expr(36)( Tuple, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/bir.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/bir.ref index af7f65ce..e25d4364 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/bir.ref @@ -19,14 +19,14 @@ ), ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(1), ), ( Clear( - temp{8}, + temp{9}, ), Expr(1), ), @@ -46,14 +46,14 @@ ), ( AssignExpr( - temp{9}, + temp{10}, (), ), Expr(3), ), ( Clear( - temp{9}, + temp{10}, ), Expr(3), ), @@ -66,33 +66,33 @@ [ ( AssignExpr( - temp{13}, + temp{14}, Class(Id { value: 1 }).reserve, ), Expr(7), ), ( AssignExpr( - temp{14}, + temp{15}, n{2}.reserve, ), Expr(8), ), ( AssignExpr( - temp{15}, + temp{16}, 44, ), Expr(9), ), ], Assign( - temp{6}, + temp{5}, Call( - temp{13}, + temp{14}, [ - temp{14}, temp{15}, + temp{16}, ], [ None, @@ -105,77 +105,77 @@ BasicBlock(2): BasicBlockData( [], Return( - temp{7}, + temp{8}, ), ), BasicBlock(3): BasicBlockData( [ ( Clear( - temp{15}, + temp{16}, ), Expr(9), ), ( Clear( - temp{14}, + temp{15}, ), Expr(8), ), ( Clear( - temp{13}, + temp{14}, ), Expr(7), ), ( AssignExpr( - temp{5}, - temp{6}.lease, + temp{6}, + temp{5}.lease, ), Expr(11), ), ( AssignPlace( t{4}, - temp{5}, + temp{6}, ), Expr(12), ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(12), ), ( Clear( - temp{12}, + temp{13}, ), Expr(12), ), ( AssignExpr( - temp{18}, + temp{19}, Print.reserve, ), Expr(13), ), ( AssignExpr( - temp{19}, + temp{20}, p{0}.reserve, ), Expr(14), ), ], Assign( - temp{17}, + temp{18}, Call( - temp{18}, + temp{19}, [ - temp{19}, + temp{20}, ], [ None, @@ -188,21 +188,21 @@ [ ( Clear( - temp{19}, + temp{20}, ), Expr(14), ), ( Clear( - temp{18}, + temp{19}, ), Expr(13), ), ], Assign( - temp{16}, + temp{17}, Await( - temp{17}, + temp{18}, ), BasicBlock(5), ), @@ -211,13 +211,13 @@ [ ( Clear( - temp{17}, + temp{18}, ), Expr(15), ), ( Clear( - temp{16}, + temp{17}, ), Expr(16), ), @@ -230,47 +230,54 @@ ), ( AssignExpr( - temp{20}, + temp{21}, n{2}.give, ), - Expr(22), + Expr(20), ), ( AssignExpr( - temp{21}, + temp{22}, 1, ), Expr(21), ), ( AssignExpr( - n{2}, - temp{20} + temp{21}, + temp{7}, + temp{21} + temp{22}, ), Expr(22), ), ( Clear( - temp{21}, + temp{22}, ), Expr(21), ), ( Clear( - temp{20}, + temp{21}, + ), + Expr(20), + ), + ( + AssignPlace( + n{2}, + temp{7}, ), Expr(22), ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(22), ), ( Clear( - temp{11}, + temp{12}, ), Expr(23), ), @@ -292,42 +299,48 @@ ), Expr(23), ), + ( + Clear( + temp{7}, + ), + Expr(23), + ), ( AssignExpr( - temp{23}, + temp{24}, n{2}.give, ), Expr(4), ), ( AssignExpr( - temp{24}, + temp{25}, 6, ), Expr(5), ), ( AssignExpr( - temp{22}, - temp{23} < temp{24}, + temp{23}, + temp{24} < temp{25}, ), Expr(6), ), ( Clear( - temp{24}, + temp{25}, ), Expr(5), ), ( Clear( - temp{23}, + temp{24}, ), Expr(4), ), ], If( - temp{22}, + temp{23}, BasicBlock(6), BasicBlock(7), ), @@ -336,7 +349,7 @@ [ ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(24), @@ -350,7 +363,7 @@ [ ( AssignExpr( - temp{7}, + temp{8}, (), ), Expr(24), @@ -364,13 +377,13 @@ [ ( Clear( - temp{22}, + temp{23}, ), Expr(6), ), ( Clear( - temp{10}, + temp{11}, ), Expr(24), ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/syntax.ref index d2a98a1e..e892fb2c 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/syntax.ref @@ -7,98 +7,86 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary.dada:7:18:27:1), ), data: syntax::Tree { - root_expr: ( - Expr(25), + root_expr: Expr(25)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "n", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "n", + ty: None, + }, + Expr(2)( Integer( "0", ), ), ), ), - ( - Expr(24), + Expr(24)( While( - ( - Expr(6), + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Id( "n", ), ), LessThan, - ( - Expr(5), + Expr(5)( Integer( "6", ), ), ), ), - ( - Expr(23), + Expr(23)( Seq( [ - ( - Expr(12), + Expr(12)( Var( - ( - "t", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "t", + ty: None, + }, + Expr(11)( Lease( - ( - Expr(10), + Expr(10)( Call( - ( - Expr(7), + Expr(7)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "n", ), ), ), - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "44", ), @@ -111,23 +99,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), @@ -138,35 +121,29 @@ ), ), ), - ( - Expr(19), + Expr(19)( Assign( - ( - Expr(17), + Expr(17)( Id( "p", ), ), - ( - Expr(18), + Expr(18)( Id( "t", ), ), ), ), - ( - Expr(22), + Expr(22)( OpEq( - ( - Expr(20), + Expr(20)( Id( "n", ), ), PlusEqual, - ( - Expr(21), + Expr(21)( Integer( "1", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/validated.ref b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/validated.ref index 8791a7a1..98a88318 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-iteration-temporary/validated.ref @@ -1,5 +1,5 @@ [ - Expr(37)( + Expr(39)( Seq( [ Expr(3)( @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,67 +42,47 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 0, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(8)( Loop( None, - Expr(36)( + Expr(38)( Seq( [ - Expr(32)( + Expr(34)( Declare( [ t{4}, temp{5}, temp{6}, + temp{7}, ], - Expr(31)( + Expr(33)( Seq( [ Expr(21)( @@ -131,24 +90,18 @@ [ Expr(19)( Assign( - TargetPlace(5)( - temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + TargetPlace(6)( + temp{6}, + synthesized from Expr(11), ), Expr(18)( Seq( [ Expr(16)( Assign( - TargetPlace(6)( - temp{6}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + TargetPlace(5)( + temp{5}, + synthesized from Expr(10), ), Expr(15)( Call( @@ -160,16 +113,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -178,97 +125,58 @@ Reserve( Place(4)( n{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), NamedExpr( None, Expr(14)( 44, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(17)( Lease( Place(5)( - temp{6}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + temp{5}, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(20)( AssignFromPlace( TargetPlace(4)( t{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(6)( - temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + temp{6}, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(25)( Await( @@ -278,16 +186,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -296,113 +198,88 @@ Reserve( Place(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(26)( AssignFromPlace( TargetPlace(7)( p{0}, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Place(9)( t{4}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), - Expr(30)( - Assign( - TargetPlace(8)( - n{2}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, - ), - Expr(29)( - Op( - Expr(27)( - Give( - Place(10)( - n{2}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + Expr(32)( + Seq( + [ + Expr(30)( + Assign( + TargetPlace(9)( + temp{7}, + synthesized from Expr(22), + ), + Expr(29)( + Op( + Expr(27)( + Give( + Place(10)( + n{2}, + synthesized from Expr(20), + ), + ), + synthesized from Expr(20), + ), + Plus, + Expr(28)( + 1, + from Expr(21), + ), ), + synthesized from Expr(22), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, ), - Plus, - Expr(28)( - 1, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(22), + ), + Expr(31)( + AssignFromPlace( + TargetPlace(8)( + n{2}, + from Expr(20), + ), + Place(11)( + temp{7}, + synthesized from Expr(22), + ), ), + from Expr(22), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: true, - }, + synthesized from Expr(23), ), - Expr(35)( + Expr(37)( If( Expr(11)( Op( @@ -410,78 +287,45 @@ Give( Place(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), LessThan, Expr(10)( 6, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), - Expr(33)( + Expr(35)( Tuple, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), - Expr(34)( + Expr(36)( Break( 8, - Expr(33)( + Expr(35)( Tuple, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-while-named/bir.ref b/dada_tests/permissions/revokation/scoped-exit-while-named/bir.ref index 6cea9d60..bc6e3d25 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-named/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-named/bir.ref @@ -19,14 +19,14 @@ ), ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(1), ), ( Clear( - temp{8}, + temp{9}, ), Expr(1), ), @@ -46,14 +46,14 @@ ), ( AssignExpr( - temp{9}, + temp{10}, (), ), Expr(3), ), ( Clear( - temp{9}, + temp{10}, ), Expr(3), ), @@ -66,21 +66,21 @@ [ ( AssignExpr( - temp{14}, + temp{15}, Class(Id { value: 1 }).reserve, ), Expr(7), ), ( AssignExpr( - temp{15}, + temp{16}, n{2}.reserve, ), Expr(8), ), ( AssignExpr( - temp{16}, + temp{17}, 44, ), Expr(9), @@ -89,10 +89,10 @@ Assign( temp{5}, Call( - temp{14}, + temp{15}, [ - temp{15}, temp{16}, + temp{17}, ], [ None, @@ -106,31 +106,31 @@ [ ( Clear( - temp{10}, + temp{11}, ), Expr(20), ), ( AssignExpr( - temp{24}, + temp{25}, Print.reserve, ), Expr(21), ), ( AssignExpr( - temp{25}, + temp{26}, p{0}.reserve, ), Expr(22), ), ], Assign( - temp{23}, + temp{24}, Call( - temp{24}, + temp{25}, [ - temp{25}, + temp{26}, ], [ None, @@ -143,19 +143,19 @@ [ ( Clear( - temp{16}, + temp{17}, ), Expr(9), ), ( Clear( - temp{15}, + temp{16}, ), Expr(8), ), ( Clear( - temp{14}, + temp{15}, ), Expr(7), ), @@ -168,14 +168,14 @@ ), ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(11), ), ( Clear( - temp{13}, + temp{14}, ), Expr(11), ), @@ -195,60 +195,67 @@ ), ( AssignExpr( - temp{17}, + temp{18}, (), ), Expr(15), ), ( Clear( - temp{17}, + temp{18}, ), Expr(15), ), ( AssignExpr( - temp{18}, + temp{19}, n{2}.give, ), - Expr(18), + Expr(16), ), ( AssignExpr( - temp{19}, + temp{20}, 1, ), Expr(17), ), ( AssignExpr( - n{2}, - temp{18} + temp{19}, + temp{7}, + temp{19} + temp{20}, ), Expr(18), ), ( Clear( - temp{19}, + temp{20}, ), Expr(17), ), ( Clear( - temp{18}, + temp{19}, + ), + Expr(16), + ), + ( + AssignPlace( + n{2}, + temp{7}, ), Expr(18), ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(18), ), ( Clear( - temp{12}, + temp{13}, ), Expr(19), ), @@ -270,42 +277,48 @@ ), Expr(19), ), + ( + Clear( + temp{7}, + ), + Expr(19), + ), ( AssignExpr( - temp{21}, + temp{22}, n{2}.give, ), Expr(4), ), ( AssignExpr( - temp{22}, + temp{23}, 1, ), Expr(5), ), ( AssignExpr( - temp{20}, - temp{21} < temp{22}, + temp{21}, + temp{22} < temp{23}, ), Expr(6), ), ( Clear( - temp{22}, + temp{23}, ), Expr(5), ), ( Clear( - temp{21}, + temp{22}, ), Expr(4), ), ], If( - temp{20}, + temp{21}, BasicBlock(4), BasicBlock(5), ), @@ -314,7 +327,7 @@ [ ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(20), @@ -328,7 +341,7 @@ [ ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(20), @@ -342,13 +355,13 @@ [ ( Clear( - temp{20}, + temp{21}, ), Expr(6), ), ( Clear( - temp{11}, + temp{12}, ), Expr(20), ), @@ -361,21 +374,21 @@ [ ( Clear( - temp{25}, + temp{26}, ), Expr(22), ), ( Clear( - temp{24}, + temp{25}, ), Expr(21), ), ], Assign( - temp{7}, + temp{8}, Await( - temp{23}, + temp{24}, ), BasicBlock(8), ), @@ -384,13 +397,13 @@ [ ( Clear( - temp{23}, + temp{24}, ), Expr(23), ), ], Return( - temp{7}, + temp{8}, ), ), }, diff --git a/dada_tests/permissions/revokation/scoped-exit-while-named/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-while-named/syntax.ref index 9bdbeded..32f78312 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-named/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-named/syntax.ref @@ -7,95 +7,84 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-while-named.dada:3:18:17:1), ), data: syntax::Tree { - root_expr: ( - Expr(25), + root_expr: Expr(25)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "n", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "n", + ty: None, + }, + Expr(2)( Integer( "0", ), ), ), ), - ( - Expr(20), + Expr(20)( While( - ( - Expr(6), + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Id( "n", ), ), LessThan, - ( - Expr(5), + Expr(5)( Integer( "1", ), ), ), ), - ( - Expr(19), + Expr(19)( Seq( [ - ( - Expr(11), + Expr(11)( Var( - ( - "pair", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(10)( Call( - ( - Expr(7), + Expr(7)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "n", ), ), ), - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "44", ), @@ -106,20 +95,16 @@ ), ), ), - ( - Expr(15), + Expr(15)( Assign( - ( - Expr(12), + Expr(12)( Id( "p", ), ), - ( - Expr(14), + Expr(14)( Lease( - ( - Expr(13), + Expr(13)( Id( "pair", ), @@ -128,18 +113,15 @@ ), ), ), - ( - Expr(18), + Expr(18)( OpEq( - ( - Expr(16), + Expr(16)( Id( "n", ), ), PlusEqual, - ( - Expr(17), + Expr(17)( Integer( "1", ), @@ -151,23 +133,18 @@ ), ), ), - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(21), + Expr(21)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-named/validated.ref b/dada_tests/permissions/revokation/scoped-exit-while-named/validated.ref index c66bfa35..f9c57cf9 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-named/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-named/validated.ref @@ -1,5 +1,5 @@ [ - Expr(37)( + Expr(39)( Seq( [ Expr(3)( @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,67 +42,47 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 0, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(8)( Loop( None, - Expr(32)( + Expr(34)( Seq( [ - Expr(28)( + Expr(30)( Declare( [ pair{4}, temp{5}, temp{6}, + temp{7}, ], - Expr(27)( + Expr(29)( Seq( [ Expr(18)( @@ -133,10 +92,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(15)( Call( @@ -148,16 +104,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -166,69 +116,42 @@ Reserve( Place(4)( n{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), NamedExpr( None, Expr(14)( 44, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(17)( AssignFromPlace( TargetPlace(4)( pair{4}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), Expr(22)( Seq( @@ -237,121 +160,93 @@ Assign( TargetPlace(7)( temp{6}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(19)( Lease( Place(6)( pair{4}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), Expr(21)( AssignFromPlace( TargetPlace(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), Place(7)( temp{6}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, + synthesized from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), - Expr(26)( - Assign( - TargetPlace(8)( - n{2}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: true, - }, - ), - Expr(25)( - Op( - Expr(23)( - Give( - Place(8)( - n{2}, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + Expr(28)( + Seq( + [ + Expr(26)( + Assign( + TargetPlace(9)( + temp{7}, + synthesized from Expr(18), + ), + Expr(25)( + Op( + Expr(23)( + Give( + Place(8)( + n{2}, + synthesized from Expr(16), + ), + ), + synthesized from Expr(16), + ), + Plus, + Expr(24)( + 1, + from Expr(17), + ), ), + synthesized from Expr(18), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, ), - Plus, - Expr(24)( - 1, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(18), + ), + Expr(27)( + AssignFromPlace( + TargetPlace(8)( + n{2}, + from Expr(16), + ), + Place(9)( + temp{7}, + synthesized from Expr(18), + ), ), + from Expr(18), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: true, - }, + synthesized from Expr(19), ), - Expr(31)( + Expr(33)( If( Expr(11)( Op( @@ -359,129 +254,78 @@ Give( Place(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), LessThan, Expr(10)( 1, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), - Expr(29)( + Expr(31)( Tuple, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), - Expr(30)( + Expr(32)( Break( 8, - Expr(29)( + Expr(31)( Tuple, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), - Expr(36)( + Expr(38)( Await( - Expr(35)( + Expr(37)( Call( - Expr(33)( + Expr(35)( Reserve( - Place(9)( + Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), [ NamedExpr( None, - Expr(34)( + Expr(36)( Reserve( - Place(10)( + Place(11)( p{0}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/scoped-exit-while-temporary/bir.ref b/dada_tests/permissions/revokation/scoped-exit-while-temporary/bir.ref index 310fe532..be5c20d4 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-temporary/bir.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-temporary/bir.ref @@ -19,14 +19,14 @@ ), ( AssignExpr( - temp{7}, + temp{8}, (), ), Expr(1), ), ( Clear( - temp{7}, + temp{8}, ), Expr(1), ), @@ -46,14 +46,14 @@ ), ( AssignExpr( - temp{8}, + temp{9}, (), ), Expr(3), ), ( Clear( - temp{8}, + temp{9}, ), Expr(3), ), @@ -66,33 +66,33 @@ [ ( AssignExpr( - temp{13}, + temp{14}, Class(Id { value: 1 }).reserve, ), Expr(8), ), ( AssignExpr( - temp{14}, + temp{15}, n{2}.reserve, ), Expr(9), ), ( AssignExpr( - temp{15}, + temp{16}, 44, ), Expr(10), ), ], Assign( - temp{5}, + temp{4}, Call( - temp{13}, + temp{14}, [ - temp{14}, temp{15}, + temp{16}, ], [ None, @@ -106,31 +106,31 @@ [ ( Clear( - temp{9}, + temp{10}, ), Expr(18), ), ( AssignExpr( - temp{22}, + temp{23}, Print.reserve, ), Expr(19), ), ( AssignExpr( - temp{23}, + temp{24}, p{0}.reserve, ), Expr(20), ), ], Assign( - temp{21}, + temp{22}, Call( - temp{22}, + temp{23}, [ - temp{23}, + temp{24}, ], [ None, @@ -143,92 +143,99 @@ [ ( Clear( - temp{15}, + temp{16}, ), Expr(10), ), ( Clear( - temp{14}, + temp{15}, ), Expr(9), ), ( Clear( - temp{13}, + temp{14}, ), Expr(8), ), ( AssignExpr( - temp{4}, - temp{5}.lease, + temp{5}, + temp{4}.lease, ), Expr(12), ), ( AssignPlace( p{0}, - temp{4}, + temp{5}, ), Expr(13), ), ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(13), ), ( Clear( - temp{12}, + temp{13}, ), Expr(13), ), ( AssignExpr( - temp{16}, + temp{17}, n{2}.give, ), - Expr(16), + Expr(14), ), ( AssignExpr( - temp{17}, + temp{18}, 1, ), Expr(15), ), ( AssignExpr( - n{2}, - temp{16} + temp{17}, + temp{6}, + temp{17} + temp{18}, ), Expr(16), ), ( Clear( - temp{17}, + temp{18}, ), Expr(15), ), ( Clear( - temp{16}, + temp{17}, + ), + Expr(14), + ), + ( + AssignPlace( + n{2}, + temp{6}, ), Expr(16), ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(16), ), ( Clear( - temp{11}, + temp{12}, ), Expr(17), ), @@ -244,42 +251,48 @@ ), Expr(17), ), + ( + Clear( + temp{6}, + ), + Expr(17), + ), ( AssignExpr( - temp{19}, + temp{20}, n{2}.give, ), Expr(4), ), ( AssignExpr( - temp{20}, + temp{21}, 1, ), Expr(5), ), ( AssignExpr( - temp{18}, - temp{19} < temp{20}, + temp{19}, + temp{20} < temp{21}, ), Expr(6), ), ( Clear( - temp{20}, + temp{21}, ), Expr(5), ), ( Clear( - temp{19}, + temp{20}, ), Expr(4), ), ], If( - temp{18}, + temp{19}, BasicBlock(4), BasicBlock(5), ), @@ -288,7 +301,7 @@ [ ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(18), @@ -302,7 +315,7 @@ [ ( AssignExpr( - temp{9}, + temp{10}, (), ), Expr(18), @@ -316,13 +329,13 @@ [ ( Clear( - temp{18}, + temp{19}, ), Expr(6), ), ( Clear( - temp{10}, + temp{11}, ), Expr(18), ), @@ -335,21 +348,21 @@ [ ( Clear( - temp{23}, + temp{24}, ), Expr(20), ), ( Clear( - temp{22}, + temp{23}, ), Expr(19), ), ], Assign( - temp{6}, + temp{7}, Await( - temp{21}, + temp{22}, ), BasicBlock(8), ), @@ -358,13 +371,13 @@ [ ( Clear( - temp{21}, + temp{22}, ), Expr(21), ), ], Return( - temp{6}, + temp{7}, ), ), }, diff --git a/dada_tests/permissions/revokation/scoped-exit-while-temporary/syntax.ref b/dada_tests/permissions/revokation/scoped-exit-while-temporary/syntax.ref index 31e20fa9..74021ee2 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-temporary/syntax.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-temporary/syntax.ref @@ -7,100 +7,85 @@ Tokens(dada_tests/permissions/revokation/scoped-exit-while-temporary.dada:3:18:16:1), ), data: syntax::Tree { - root_expr: ( - Expr(23), + root_expr: Expr(23)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "p", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(0)( Integer( "0", ), ), ), ), - ( - Expr(3), + Expr(3)( Var( - ( - "n", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "n", + ty: None, + }, + Expr(2)( Integer( "0", ), ), ), ), - ( - Expr(18), + Expr(18)( While( - ( - Expr(6), + Expr(6)( Op( - ( - Expr(4), + Expr(4)( Id( "n", ), ), LessThan, - ( - Expr(5), + Expr(5)( Integer( "1", ), ), ), ), - ( - Expr(17), + Expr(17)( Seq( [ - ( - Expr(13), + Expr(13)( Assign( - ( - Expr(7), + Expr(7)( Id( "p", ), ), - ( - Expr(12), + Expr(12)( Lease( - ( - Expr(11), + Expr(11)( Call( - ( - Expr(8), + Expr(8)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "n", ), ), ), - ( - None, - ( - Expr(10), + None( + Expr(10)( Integer( "44", ), @@ -113,18 +98,15 @@ ), ), ), - ( - Expr(16), + Expr(16)( OpEq( - ( - Expr(14), + Expr(14)( Id( "n", ), ), PlusEqual, - ( - Expr(15), + Expr(15)( Integer( "1", ), @@ -136,23 +118,18 @@ ), ), ), - ( - Expr(22), + Expr(22)( Await( - ( - Expr(21), + Expr(21)( Call( - ( - Expr(19), + Expr(19)( Id( "print", ), ), [ - ( - None, - ( - Expr(20), + None( + Expr(20)( Id( "p", ), diff --git a/dada_tests/permissions/revokation/scoped-exit-while-temporary/validated.ref b/dada_tests/permissions/revokation/scoped-exit-while-temporary/validated.ref index 7fb11a3a..fa23d836 100644 --- a/dada_tests/permissions/revokation/scoped-exit-while-temporary/validated.ref +++ b/dada_tests/permissions/revokation/scoped-exit-while-temporary/validated.ref @@ -1,5 +1,5 @@ [ - Expr(36)( + Expr(38)( Seq( [ Expr(3)( @@ -9,52 +9,31 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 0, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), Expr(7)( Seq( @@ -63,66 +42,46 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( 0, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(6)( AssignFromPlace( TargetPlace(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{3}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(8)( Loop( None, - Expr(31)( + Expr(33)( Seq( [ - Expr(27)( + Expr(29)( Declare( [ temp{4}, temp{5}, + temp{6}, ], - Expr(26)( + Expr(28)( Seq( [ Expr(21)( @@ -130,24 +89,18 @@ [ Expr(19)( Assign( - TargetPlace(5)( - temp{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + TargetPlace(6)( + temp{5}, + synthesized from Expr(12), ), Expr(18)( Seq( [ Expr(16)( Assign( - TargetPlace(6)( - temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + TargetPlace(5)( + temp{4}, + synthesized from Expr(11), ), Expr(15)( Call( @@ -159,16 +112,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -177,158 +124,115 @@ Reserve( Place(4)( n{2}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), NamedExpr( None, Expr(14)( 44, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(17)( Lease( Place(5)( - temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + temp{4}, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(20)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Place(6)( - temp{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + temp{5}, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), - Expr(25)( - Assign( - TargetPlace(7)( - n{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: true, - }, - ), - Expr(24)( - Op( - Expr(22)( - Give( - Place(7)( - n{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + Expr(27)( + Seq( + [ + Expr(25)( + Assign( + TargetPlace(8)( + temp{6}, + synthesized from Expr(16), + ), + Expr(24)( + Op( + Expr(22)( + Give( + Place(7)( + n{2}, + synthesized from Expr(14), + ), + ), + synthesized from Expr(14), + ), + Plus, + Expr(23)( + 1, + from Expr(15), + ), ), + synthesized from Expr(16), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, ), - Plus, - Expr(23)( - 1, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(16), + ), + Expr(26)( + AssignFromPlace( + TargetPlace(7)( + n{2}, + from Expr(14), + ), + Place(8)( + temp{6}, + synthesized from Expr(16), + ), ), + from Expr(16), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: true, - }, + synthesized from Expr(17), ), - Expr(30)( + Expr(32)( If( Expr(11)( Op( @@ -336,129 +240,78 @@ Give( Place(2)( n{2}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), LessThan, Expr(10)( 1, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), - Expr(28)( + Expr(30)( Tuple, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), - Expr(29)( + Expr(31)( Break( 8, - Expr(28)( + Expr(30)( Tuple, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), - Expr(35)( + Expr(37)( Await( - Expr(34)( + Expr(36)( Call( - Expr(32)( + Expr(34)( Reserve( - Place(8)( + Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), [ NamedExpr( None, - Expr(33)( + Expr(35)( Reserve( - Place(9)( + Place(10)( p{0}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/revokation/write-field-of-leased/bir.ref b/dada_tests/permissions/revokation/write-field-of-leased/bir.ref index b235a845..fb91bdbd 100644 --- a/dada_tests/permissions/revokation/write-field-of-leased/bir.ref +++ b/dada_tests/permissions/revokation/write-field-of-leased/bir.ref @@ -26,7 +26,7 @@ ), ], Assign( - temp{2}, + temp{1}, Call( temp{9}, [ @@ -63,15 +63,15 @@ ), ( AssignExpr( - temp{1}, - temp{2}.lease, + temp{2}, + temp{1}.lease, ), Expr(4), ), ( AssignPlace( p{0}, - temp{1}, + temp{2}, ), Expr(5), ), diff --git a/dada_tests/permissions/revokation/write-field-of-leased/syntax.ref b/dada_tests/permissions/revokation/write-field-of-leased/syntax.ref index 1dd28516..96bef61a 100644 --- a/dada_tests/permissions/revokation/write-field-of-leased/syntax.ref +++ b/dada_tests/permissions/revokation/write-field-of-leased/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/revokation/write-field-of-leased.dada:3:18:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Lease( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,18 +49,17 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Share( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -76,14 +68,11 @@ ), ), ), - ( - Expr(12), + Expr(12)( Assign( - ( - Expr(10), + Expr(10)( Dot( - ( - Expr(9), + Expr(9)( Id( "p", ), @@ -91,31 +80,25 @@ "a", ), ), - ( - Expr(11), + Expr(11)( Integer( "23", ), ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "q", ), diff --git a/dada_tests/permissions/revokation/write-field-of-leased/validated.ref b/dada_tests/permissions/revokation/write-field-of-leased/validated.ref index d6df8fef..b1e712bb 100644 --- a/dada_tests/permissions/revokation/write-field-of-leased/validated.ref +++ b/dada_tests/permissions/revokation/write-field-of-leased/validated.ref @@ -7,24 +7,18 @@ [ Expr(7)( Assign( - TargetPlace(1)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + TargetPlace(2)( + temp{2}, + synthesized from Expr(4), ), Expr(6)( Seq( [ Expr(4)( Assign( - TargetPlace(2)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), ), Expr(3)( Call( @@ -36,107 +30,65 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( Lease( Place(1)( - temp{2}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + temp{1}, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(8)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(2)( - temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + temp{2}, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -145,10 +97,7 @@ Assign( TargetPlace(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(11)( Share( @@ -156,57 +105,33 @@ Give( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(13)( AssignFromPlace( TargetPlace(3)( q{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(4)( temp{4}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(21)( Seq( @@ -215,31 +140,19 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(15)( Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), Expr(20)( Seq( @@ -248,23 +161,14 @@ Assign( TargetPlace(7)( temp{6}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(17)( 23, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(19)( AssignFromPlace( @@ -272,44 +176,26 @@ Dot( Place(6)( temp{5}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: true, - }, + synthesized from Expr(9), ), "a", ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Place(7)( temp{6}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(25)( Await( @@ -319,16 +205,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -337,36 +217,21 @@ Reserve( Place(9)( q{3}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/shared-data-is-immutable/write-shared-field/syntax.ref b/dada_tests/permissions/shared-data-is-immutable/write-shared-field/syntax.ref index 639f8553..0b6e3b6d 100644 --- a/dada_tests/permissions/shared-data-is-immutable/write-shared-field/syntax.ref +++ b/dada_tests/permissions/shared-data-is-immutable/write-shared-field/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/permissions/shared-data-is-immutable/write-shared-field.dada:3:18:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(10), + root_expr: Expr(10)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "pair", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,14 +49,11 @@ ), ), ), - ( - Expr(9), + Expr(9)( Assign( - ( - Expr(7), + Expr(7)( Dot( - ( - Expr(6), + Expr(6)( Id( "pair", ), @@ -71,8 +61,7 @@ "a", ), ), - ( - Expr(8), + Expr(8)( Integer( "23", ), diff --git a/dada_tests/permissions/shared-data-is-immutable/write-shared-field/validated.ref b/dada_tests/permissions/shared-data-is-immutable/write-shared-field/validated.ref index e09b3a38..e2b7d1eb 100644 --- a/dada_tests/permissions/shared-data-is-immutable/write-shared-field/validated.ref +++ b/dada_tests/permissions/shared-data-is-immutable/write-shared-field/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(14)( Seq( @@ -113,31 +77,19 @@ Assign( TargetPlace(2)( temp{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( Reserve( Place(2)( pair{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(13)( Seq( @@ -146,23 +98,14 @@ Assign( TargetPlace(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(10)( 23, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Expr(12)( AssignFromPlace( @@ -170,50 +113,29 @@ Dot( Place(3)( temp{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), "a", ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ], ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ] \ No newline at end of file diff --git a/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/syntax.ref b/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/syntax.ref index b4ad5326..0ec63627 100644 --- a/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/syntax.ref +++ b/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/syntax.ref @@ -7,55 +7,45 @@ Tokens(dada_tests/permissions/shared-data-is-immutable/write-shared-traverse.dada:3:18:9:1), ), data: syntax::Tree { - root_expr: ( - Expr(14), + root_expr: Expr(14)( Seq( [ - ( - Expr(8), + Expr(8)( Var( - ( - "pair", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "pair", + ty: None, + }, + Expr(7)( Share( - ( - Expr(6), + Expr(6)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(4), + None( + Expr(4)( Call( - ( - Expr(1), + Expr(1)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "22", ), ), ), - ( - None, - ( - Expr(3), + None( + Expr(3)( Integer( "44", ), @@ -65,10 +55,8 @@ ), ), ), - ( - None, - ( - Expr(5), + None( + Expr(5)( Integer( "66", ), @@ -81,17 +69,13 @@ ), ), ), - ( - Expr(13), + Expr(13)( Assign( - ( - Expr(11), + Expr(11)( Dot( - ( - Expr(10), + Expr(10)( Dot( - ( - Expr(9), + Expr(9)( Id( "pair", ), @@ -102,8 +86,7 @@ "a", ), ), - ( - Expr(12), + Expr(12)( Integer( "23", ), diff --git a/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/validated.ref b/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/validated.ref index 8f4b423d..74977a19 100644 --- a/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/validated.ref +++ b/dada_tests/permissions/shared-data-is-immutable/write-shared-traverse/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(7)( Share( @@ -26,16 +23,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( @@ -50,103 +41,64 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), [ NamedExpr( None, Expr(2)( 22, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), NamedExpr( None, Expr(3)( 44, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), NamedExpr( None, Expr(5)( 66, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(2)( temp{1}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(17)( Seq( @@ -155,10 +107,7 @@ Assign( TargetPlace(2)( temp{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(11)( Reserve( @@ -166,29 +115,17 @@ Dot( Place(3)( pair{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), "a", ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), Expr(16)( Seq( @@ -197,23 +134,14 @@ Assign( TargetPlace(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(13)( 23, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(15)( AssignFromPlace( @@ -221,50 +149,29 @@ Dot( Place(5)( temp{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: true, - }, + synthesized from Expr(10), ), "a", ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Place(6)( temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ] \ No newline at end of file diff --git a/dada_tests/reservations/our-to-our-leased-assign-field/syntax.ref b/dada_tests/reservations/our-to-our-leased-assign-field/syntax.ref index cc93d98a..503dff39 100644 --- a/dada_tests/reservations/our-to-our-leased-assign-field/syntax.ref +++ b/dada_tests/reservations/our-to-our-leased-assign-field/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/reservations/our-to-our-leased-assign-field.dada:5:18:18:1), ), data: syntax::Tree { - root_expr: ( - Expr(50), + root_expr: Expr(50)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,27 +45,24 @@ ), ), ), - ( - Expr(8), + Expr(8)( Var( - ( - "q", - None, - ), - ( - Expr(7), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "q", + ty: None, + }, + Expr(7)( Call( - ( - Expr(5), + Expr(5)( Id( "OurLeased", ), ), [ - ( - None, - ( - Expr(6), + None( + Expr(6)( Id( "p", ), @@ -82,26 +73,20 @@ ), ), ), - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(9), + Expr(9)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Lease( - ( - Expr(10), + Expr(10)( Id( "q", ), @@ -114,38 +99,30 @@ ), ), ), - ( - Expr(19), + Expr(19)( Assign( - ( - Expr(14), + Expr(14)( Id( "p", ), ), - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "Point", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Integer( "44", ), ), ), - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "66", ), @@ -156,14 +133,11 @@ ), ), ), - ( - Expr(23), + Expr(23)( Assign( - ( - Expr(21), + Expr(21)( Dot( - ( - Expr(20), + Expr(20)( Id( "q", ), @@ -171,34 +145,27 @@ "f", ), ), - ( - Expr(22), + Expr(22)( Id( "p", ), ), ), ), - ( - Expr(28), + Expr(28)( Await( - ( - Expr(27), + Expr(27)( Call( - ( - Expr(24), + Expr(24)( Id( "print", ), ), [ - ( - None, - ( - Expr(26), + None( + Expr(26)( Lease( - ( - Expr(25), + Expr(25)( Id( "q", ), @@ -211,38 +178,30 @@ ), ), ), - ( - Expr(34), + Expr(34)( Assign( - ( - Expr(29), + Expr(29)( Id( "p", ), ), - ( - Expr(33), + Expr(33)( Call( - ( - Expr(30), + Expr(30)( Id( "Point", ), ), [ - ( - None, - ( - Expr(31), + None( + Expr(31)( Integer( "11", ), ), ), - ( - None, - ( - Expr(32), + None( + Expr(32)( Integer( "55", ), @@ -253,26 +212,20 @@ ), ), ), - ( - Expr(39), + Expr(39)( Await( - ( - Expr(38), + Expr(38)( Call( - ( - Expr(35), + Expr(35)( Id( "print", ), ), [ - ( - None, - ( - Expr(37), + None( + Expr(37)( Lease( - ( - Expr(36), + Expr(36)( Id( "q", ), @@ -285,26 +238,20 @@ ), ), ), - ( - Expr(44), + Expr(44)( Await( - ( - Expr(43), + Expr(43)( Call( - ( - Expr(40), + Expr(40)( Id( "print", ), ), [ - ( - None, - ( - Expr(42), + None( + Expr(42)( Lease( - ( - Expr(41), + Expr(41)( Id( "p", ), @@ -317,26 +264,20 @@ ), ), ), - ( - Expr(49), + Expr(49)( Await( - ( - Expr(48), + Expr(48)( Call( - ( - Expr(45), + Expr(45)( Id( "print", ), ), [ - ( - None, - ( - Expr(47), + None( + Expr(47)( Lease( - ( - Expr(46), + Expr(46)( Id( "q", ), diff --git a/dada_tests/reservations/our-to-our-leased-assign-field/validated.ref b/dada_tests/reservations/our-to-our-leased-assign-field/validated.ref index 08b0c068..ae2e7fa1 100644 --- a/dada_tests/reservations/our-to-our-leased-assign-field/validated.ref +++ b/dada_tests/reservations/our-to-our-leased-assign-field/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(12)( Seq( @@ -105,10 +72,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(9)( Call( @@ -120,16 +84,10 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -138,59 +96,35 @@ Reserve( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Expr(11)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: true, - }, + synthesized from Expr(8), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), Expr(16)( Await( @@ -200,16 +134,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), [ NamedExpr( @@ -218,30 +146,18 @@ Lease( Place(6)( q{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(23)( Seq( @@ -250,10 +166,7 @@ Assign( TargetPlace(5)( temp{4}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(20)( Call( @@ -265,79 +178,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(18)( 44, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), NamedExpr( None, Expr(19)( 66, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(22)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Place(8)( temp{4}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), Expr(27)( Seq( @@ -346,31 +229,19 @@ Assign( TargetPlace(6)( temp{5}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(24)( Reserve( Place(9)( q{2}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(26)( AssignFromPlace( @@ -378,37 +249,22 @@ Dot( Place(10)( temp{5}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), "f", ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Place(11)( p{0}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), Expr(31)( Await( @@ -418,16 +274,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), [ NamedExpr( @@ -436,30 +286,18 @@ Lease( Place(13)( q{2}, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), Expr(38)( Seq( @@ -468,10 +306,7 @@ Assign( TargetPlace(9)( temp{6}, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: true, - }, + synthesized from Expr(33), ), Expr(35)( Call( @@ -483,79 +318,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( None, Expr(33)( 11, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), NamedExpr( None, Expr(34)( 55, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: true, - }, + synthesized from Expr(33), ), Expr(37)( AssignFromPlace( TargetPlace(8)( p{0}, - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), Place(15)( temp{6}, - ExprOrigin { - syntax_expr: Expr(33), - synthesized: true, - }, + synthesized from Expr(33), ), ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ], ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + synthesized from Expr(34), ), Expr(42)( Await( @@ -565,16 +370,10 @@ Reserve( Place(16)( Print, - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + synthesized from Expr(35), ), [ NamedExpr( @@ -583,30 +382,18 @@ Lease( Place(17)( q{2}, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), Expr(46)( Await( @@ -616,16 +403,10 @@ Reserve( Place(18)( Print, - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + synthesized from Expr(40), ), [ NamedExpr( @@ -634,30 +415,18 @@ Lease( Place(19)( p{0}, - ExprOrigin { - syntax_expr: Expr(41), - synthesized: false, - }, + from Expr(41), ), ), - ExprOrigin { - syntax_expr: Expr(42), - synthesized: false, - }, + from Expr(42), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(43), - synthesized: false, - }, + from Expr(43), ), ), - ExprOrigin { - syntax_expr: Expr(44), - synthesized: false, - }, + from Expr(44), ), Expr(50)( Await( @@ -667,16 +436,10 @@ Reserve( Place(20)( Print, - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + from Expr(45), ), ), - ExprOrigin { - syntax_expr: Expr(45), - synthesized: false, - }, + synthesized from Expr(45), ), [ NamedExpr( @@ -685,36 +448,21 @@ Lease( Place(21)( q{2}, - ExprOrigin { - syntax_expr: Expr(46), - synthesized: false, - }, + from Expr(46), ), ), - ExprOrigin { - syntax_expr: Expr(47), - synthesized: false, - }, + from Expr(47), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(48), - synthesized: false, - }, + from Expr(48), ), ), - ExprOrigin { - syntax_expr: Expr(49), - synthesized: false, - }, + from Expr(49), ), ], ), - ExprOrigin { - syntax_expr: Expr(50), - synthesized: false, - }, + from Expr(50), ), ] \ No newline at end of file diff --git a/dada_tests/reservations/our-to-our-leased-assign/syntax.ref b/dada_tests/reservations/our-to-our-leased-assign/syntax.ref index 145ffb41..f6f1aab9 100644 --- a/dada_tests/reservations/our-to-our-leased-assign/syntax.ref +++ b/dada_tests/reservations/our-to-our-leased-assign/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/reservations/our-to-our-leased-assign.dada:3:18:22:1), ), data: syntax::Tree { - root_expr: ( - Expr(38), + root_expr: Expr(38)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,38 +45,33 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "q", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: OurLeased, + atomic: No, + name: "q", + ty: None, + }, + Expr(5)( Id( "p", ), ), ), ), - ( - Expr(10), + Expr(10)( Await( - ( - Expr(9), + Expr(9)( Call( - ( - Expr(7), + Expr(7)( Id( "print", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "q", ), @@ -93,38 +82,30 @@ ), ), ), - ( - Expr(16), + Expr(16)( Assign( - ( - Expr(11), + Expr(11)( Id( "p", ), ), - ( - Expr(15), + Expr(15)( Call( - ( - Expr(12), + Expr(12)( Id( "Point", ), ), [ - ( - None, - ( - Expr(13), + None( + Expr(13)( Integer( "44", ), ), ), - ( - None, - ( - Expr(14), + None( + Expr(14)( Integer( "66", ), @@ -135,23 +116,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "q", ), @@ -162,55 +138,44 @@ ), ), ), - ( - Expr(23), + Expr(23)( Assign( - ( - Expr(21), + Expr(21)( Id( "q", ), ), - ( - Expr(22), + Expr(22)( Id( "p", ), ), ), ), - ( - Expr(29), + Expr(29)( Assign( - ( - Expr(24), + Expr(24)( Id( "p", ), ), - ( - Expr(28), + Expr(28)( Call( - ( - Expr(25), + Expr(25)( Id( "Point", ), ), [ - ( - None, - ( - Expr(26), + None( + Expr(26)( Integer( "33", ), ), ), - ( - None, - ( - Expr(27), + None( + Expr(27)( Integer( "55", ), @@ -221,23 +186,18 @@ ), ), ), - ( - Expr(33), + Expr(33)( Await( - ( - Expr(32), + Expr(32)( Call( - ( - Expr(30), + Expr(30)( Id( "print", ), ), [ - ( - None, - ( - Expr(31), + None( + Expr(31)( Id( "p", ), @@ -248,23 +208,18 @@ ), ), ), - ( - Expr(37), + Expr(37)( Await( - ( - Expr(36), + Expr(36)( Call( - ( - Expr(34), + Expr(34)( Id( "print", ), ), [ - ( - None, - ( - Expr(35), + None( + Expr(35)( Id( "q", ), diff --git a/dada_tests/reservations/our-to-our-leased-assign/validated.ref b/dada_tests/reservations/our-to-our-leased-assign/validated.ref index 92180846..1eaea331 100644 --- a/dada_tests/reservations/our-to-our-leased-assign/validated.ref +++ b/dada_tests/reservations/our-to-our-leased-assign/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,101 +21,62 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(7)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(11)( Await( @@ -128,16 +86,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -146,30 +98,18 @@ Reserve( Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(18)( Seq( @@ -178,10 +118,7 @@ Assign( TargetPlace(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(15)( Call( @@ -193,79 +130,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( None, Expr(13)( 44, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), NamedExpr( None, Expr(14)( 66, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), Expr(17)( AssignFromPlace( TargetPlace(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Place(6)( temp{3}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: true, - }, + synthesized from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), Expr(22)( Await( @@ -275,16 +182,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -293,52 +194,31 @@ Reserve( Place(8)( q{2}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), Expr(23)( AssignFromPlace( TargetPlace(5)( q{2}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), Expr(30)( Seq( @@ -347,10 +227,7 @@ Assign( TargetPlace(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: true, - }, + synthesized from Expr(28), ), Expr(27)( Call( @@ -362,79 +239,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + synthesized from Expr(25), ), [ NamedExpr( None, Expr(25)( 33, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), NamedExpr( None, Expr(26)( 55, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: true, - }, + synthesized from Expr(28), ), Expr(29)( AssignFromPlace( TargetPlace(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), Place(11)( temp{4}, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: true, - }, + synthesized from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + synthesized from Expr(29), ), Expr(34)( Await( @@ -444,16 +291,10 @@ Reserve( Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( @@ -462,30 +303,18 @@ Reserve( Place(13)( p{0}, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + synthesized from Expr(31), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), Expr(38)( Await( @@ -495,16 +324,10 @@ Reserve( Place(14)( Print, - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + synthesized from Expr(34), ), [ NamedExpr( @@ -513,36 +336,21 @@ Reserve( Place(15)( q{2}, - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + synthesized from Expr(35), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ], ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ] \ No newline at end of file diff --git a/dada_tests/reservations/our-to-our-leased-field/syntax.ref b/dada_tests/reservations/our-to-our-leased-field/syntax.ref index fbe52bf6..c8c20a85 100644 --- a/dada_tests/reservations/our-to-our-leased-field/syntax.ref +++ b/dada_tests/reservations/our-to-our-leased-field/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/reservations/our-to-our-leased-field.dada:5:18:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(40), + root_expr: Expr(40)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,26 +45,20 @@ ), ), ), - ( - Expr(9), + Expr(9)( Await( - ( - Expr(8), + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "p", ), @@ -83,27 +71,24 @@ ), ), ), - ( - Expr(13), + Expr(13)( Var( - ( - "q", - None, - ), - ( - Expr(12), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "q", + ty: None, + }, + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "OurLeased", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Id( "p", ), @@ -114,26 +99,20 @@ ), ), ), - ( - Expr(18), + Expr(18)( Await( - ( - Expr(17), + Expr(17)( Call( - ( - Expr(14), + Expr(14)( Id( "print", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Lease( - ( - Expr(15), + Expr(15)( Id( "q", ), @@ -146,38 +125,30 @@ ), ), ), - ( - Expr(24), + Expr(24)( Assign( - ( - Expr(19), + Expr(19)( Id( "p", ), ), - ( - Expr(23), + Expr(23)( Call( - ( - Expr(20), + Expr(20)( Id( "Point", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Integer( "44", ), ), ), - ( - None, - ( - Expr(22), + None( + Expr(22)( Integer( "66", ), @@ -188,26 +159,20 @@ ), ), ), - ( - Expr(29), + Expr(29)( Await( - ( - Expr(28), + Expr(28)( Call( - ( - Expr(25), + Expr(25)( Id( "print", ), ), [ - ( - None, - ( - Expr(27), + None( + Expr(27)( Lease( - ( - Expr(26), + Expr(26)( Id( "q", ), @@ -220,26 +185,20 @@ ), ), ), - ( - Expr(34), + Expr(34)( Await( - ( - Expr(33), + Expr(33)( Call( - ( - Expr(30), + Expr(30)( Id( "print", ), ), [ - ( - None, - ( - Expr(32), + None( + Expr(32)( Lease( - ( - Expr(31), + Expr(31)( Id( "p", ), @@ -252,26 +211,20 @@ ), ), ), - ( - Expr(39), + Expr(39)( Await( - ( - Expr(38), + Expr(38)( Call( - ( - Expr(35), + Expr(35)( Id( "print", ), ), [ - ( - None, - ( - Expr(37), + None( + Expr(37)( Lease( - ( - Expr(36), + Expr(36)( Id( "q", ), diff --git a/dada_tests/reservations/our-to-our-leased-field/validated.ref b/dada_tests/reservations/our-to-our-leased-field/validated.ref index ecc6f3a1..10d7f87f 100644 --- a/dada_tests/reservations/our-to-our-leased-field/validated.ref +++ b/dada_tests/reservations/our-to-our-leased-field/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Await( @@ -106,16 +73,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -124,30 +85,18 @@ Lease( Place(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(16)( Seq( @@ -156,10 +105,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(13)( Call( @@ -171,16 +117,10 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -189,59 +129,35 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Expr(15)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Place(6)( temp{3}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), Expr(20)( Await( @@ -251,16 +167,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( @@ -269,30 +179,18 @@ Lease( Place(8)( q{2}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), Expr(27)( Seq( @@ -301,10 +199,7 @@ Assign( TargetPlace(5)( temp{4}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: true, - }, + synthesized from Expr(23), ), Expr(24)( Call( @@ -316,79 +211,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( None, Expr(22)( 44, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), NamedExpr( None, Expr(23)( 66, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: true, - }, + synthesized from Expr(23), ), Expr(26)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), Place(10)( temp{4}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: true, - }, + synthesized from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), Expr(31)( Await( @@ -398,16 +263,10 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + synthesized from Expr(25), ), [ NamedExpr( @@ -416,30 +275,18 @@ Lease( Place(12)( q{2}, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), Expr(35)( Await( @@ -449,16 +296,10 @@ Reserve( Place(13)( Print, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), [ NamedExpr( @@ -467,30 +308,18 @@ Lease( Place(14)( p{0}, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), Expr(39)( Await( @@ -500,16 +329,10 @@ Reserve( Place(15)( Print, - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + synthesized from Expr(35), ), [ NamedExpr( @@ -518,36 +341,21 @@ Lease( Place(16)( q{2}, - ExprOrigin { - syntax_expr: Expr(36), - synthesized: false, - }, + from Expr(36), ), ), - ExprOrigin { - syntax_expr: Expr(37), - synthesized: false, - }, + from Expr(37), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(38), - synthesized: false, - }, + from Expr(38), ), ), - ExprOrigin { - syntax_expr: Expr(39), - synthesized: false, - }, + from Expr(39), ), ], ), - ExprOrigin { - syntax_expr: Expr(40), - synthesized: false, - }, + from Expr(40), ), ] \ No newline at end of file diff --git a/dada_tests/reservations/our-to-our-leased-var/syntax.ref b/dada_tests/reservations/our-to-our-leased-var/syntax.ref index ee542536..6dd64c72 100644 --- a/dada_tests/reservations/our-to-our-leased-var/syntax.ref +++ b/dada_tests/reservations/our-to-our-leased-var/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/reservations/our-to-our-leased-var.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(21), + root_expr: Expr(21)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,53 +45,45 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "q", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: OurLeased, + atomic: No, + name: "q", + ty: None, + }, + Expr(5)( Id( "p", ), ), ), ), - ( - Expr(12), + Expr(12)( Assign( - ( - Expr(7), + Expr(7)( Id( "p", ), ), - ( - Expr(11), + Expr(11)( Call( - ( - Expr(8), + Expr(8)( Id( "Point", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Integer( "44", ), ), ), - ( - None, - ( - Expr(10), + None( + Expr(10)( Integer( "66", ), @@ -108,23 +94,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "p", ), @@ -135,23 +116,18 @@ ), ), ), - ( - Expr(20), + Expr(20)( Await( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(17), + Expr(17)( Id( "print", ), ), [ - ( - None, - ( - Expr(18), + None( + Expr(18)( Id( "q", ), diff --git a/dada_tests/reservations/our-to-our-leased-var/validated.ref b/dada_tests/reservations/our-to-our-leased-var/validated.ref index d1325913..013f404e 100644 --- a/dada_tests/reservations/our-to-our-leased-var/validated.ref +++ b/dada_tests/reservations/our-to-our-leased-var/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,101 +21,62 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(7)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(14)( Seq( @@ -127,10 +85,7 @@ Assign( TargetPlace(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(11)( Call( @@ -142,79 +97,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, Expr(9)( 44, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), NamedExpr( None, Expr(10)( 66, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(13)( AssignFromPlace( TargetPlace(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Place(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(18)( Await( @@ -224,16 +149,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -242,30 +161,18 @@ Reserve( Place(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), Expr(22)( Await( @@ -275,16 +182,10 @@ Reserve( Place(7)( Print, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + synthesized from Expr(17), ), [ NamedExpr( @@ -293,36 +194,21 @@ Reserve( Place(8)( q{2}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/field-leased-mode-leases/syntax.ref b/dada_tests/specifier/field-leased-mode-leases/syntax.ref index 4b697de9..90b707b5 100644 --- a/dada_tests/specifier/field-leased-mode-leases/syntax.ref +++ b/dada_tests/specifier/field-leased-mode-leases/syntax.ref @@ -7,31 +7,27 @@ Tokens(dada_tests/specifier/field-leased-mode-leases.dada:10:18:17:1), ), data: syntax::Tree { - root_expr: ( - Expr(27), + root_expr: Expr(27)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "w1", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "w1", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Widget", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "w1", ), @@ -42,27 +38,24 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "w2", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "w2", + ty: None, + }, + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "Widget", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( String( "w2", ), @@ -73,36 +66,31 @@ ), ), ), - ( - Expr(12), + Expr(12)( Var( - ( - "p", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(11)( Call( - ( - Expr(8), + Expr(8)( Id( "Modes", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "w1", ), ), ), - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "w2", ), @@ -113,26 +101,20 @@ ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Dot( - ( - Expr(14), + Expr(14)( Id( "p", ), @@ -146,23 +128,18 @@ ), ), ), - ( - Expr(21), + Expr(21)( Await( - ( - Expr(20), + Expr(20)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Id( "w1", ), @@ -173,26 +150,20 @@ ), ), ), - ( - Expr(26), + Expr(26)( Await( - ( - Expr(25), + Expr(25)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(24), + None( + Expr(24)( Dot( - ( - Expr(23), + Expr(23)( Id( "p", ), diff --git a/dada_tests/specifier/field-leased-mode-leases/validated.ref b/dada_tests/specifier/field-leased-mode-leases/validated.ref index 242dc931..a5e2b668 100644 --- a/dada_tests/specifier/field-leased-mode-leases/validated.ref +++ b/dada_tests/specifier/field-leased-mode-leases/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,69 +21,42 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "w1", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( w1{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(11)( Seq( @@ -95,10 +65,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( Call( @@ -110,69 +77,42 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( None, Expr(7)( "w2", - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( w2{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(18)( Seq( @@ -181,10 +121,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(15)( Call( @@ -196,16 +133,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -214,16 +145,10 @@ Reserve( Place(5)( w1{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), NamedExpr( @@ -232,59 +157,35 @@ Reserve( Place(6)( w2{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(17)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(22)( Await( @@ -294,16 +195,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -314,37 +209,22 @@ Dot( Place(9)( p{4}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), "l", ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(26)( Await( @@ -354,16 +234,10 @@ Reserve( Place(11)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -372,30 +246,18 @@ Reserve( Place(12)( w1{0}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(30)( Await( @@ -405,16 +267,10 @@ Reserve( Place(13)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -425,43 +281,25 @@ Dot( Place(14)( p{4}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), "l", ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + synthesized from Expr(24), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/field-our-mode-moves/syntax.ref b/dada_tests/specifier/field-our-mode-moves/syntax.ref index ee9e3d11..242ba516 100644 --- a/dada_tests/specifier/field-our-mode-moves/syntax.ref +++ b/dada_tests/specifier/field-our-mode-moves/syntax.ref @@ -7,31 +7,27 @@ Tokens(dada_tests/specifier/field-our-mode-moves.dada:10:18:15:1), ), data: syntax::Tree { - root_expr: ( - Expr(17), + root_expr: Expr(17)( Seq( [ - ( - Expr(3), + Expr(3)( Var( - ( - "w1", - None, - ), - ( - Expr(2), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "w1", + ty: None, + }, + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "Widget", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "w1", ), @@ -42,27 +38,24 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "w2", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "w2", + ty: None, + }, + Expr(6)( Call( - ( - Expr(4), + Expr(4)( Id( "Widget", ), ), [ - ( - None, - ( - Expr(5), + None( + Expr(5)( String( "w2", ), @@ -73,36 +66,31 @@ ), ), ), - ( - Expr(12), + Expr(12)( Var( - ( - "p", - None, - ), - ( - Expr(11), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(11)( Call( - ( - Expr(8), + Expr(8)( Id( "Modes", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( Id( "w1", ), ), ), - ( - None, - ( - Expr(10), + None( + Expr(10)( Id( "w2", ), @@ -113,23 +101,18 @@ ), ), ), - ( - Expr(16), + Expr(16)( Await( - ( - Expr(15), + Expr(15)( Call( - ( - Expr(13), + Expr(13)( Id( "print", ), ), [ - ( - None, - ( - Expr(14), + None( + Expr(14)( Id( "w2", ), diff --git a/dada_tests/specifier/field-our-mode-moves/validated.ref b/dada_tests/specifier/field-our-mode-moves/validated.ref index 2f7fe0ab..2124c7c1 100644 --- a/dada_tests/specifier/field-our-mode-moves/validated.ref +++ b/dada_tests/specifier/field-our-mode-moves/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(2)( Call( @@ -24,69 +21,42 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "w1", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), Expr(4)( AssignFromPlace( TargetPlace(0)( w1{0}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, + synthesized from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(3), ), Expr(11)( Seq( @@ -95,10 +65,7 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( Call( @@ -110,69 +77,42 @@ value: 2, }, ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( None, Expr(7)( "w2", - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( w2{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(18)( Seq( @@ -181,10 +121,7 @@ Assign( TargetPlace(5)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(15)( Call( @@ -196,16 +133,10 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( @@ -214,16 +145,10 @@ Reserve( Place(5)( w1{0}, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + synthesized from Expr(9), ), ), NamedExpr( @@ -232,59 +157,35 @@ Reserve( Place(6)( w2{2}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Expr(17)( AssignFromPlace( TargetPlace(4)( p{4}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: true, - }, + synthesized from Expr(12), ), Place(7)( temp{5}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), Expr(22)( Await( @@ -294,16 +195,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + synthesized from Expr(13), ), [ NamedExpr( @@ -312,36 +207,21 @@ Reserve( Place(9)( w2{2}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ], ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/bir.ref b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/bir.ref index 6bdc7520..fda8713f 100644 --- a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/bir.ref +++ b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/bir.ref @@ -5,21 +5,21 @@ [ ( AssignExpr( - temp{7}, + temp{8}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{8}, + temp{9}, 22, ), Expr(1), ), ( AssignExpr( - temp{9}, + temp{10}, 44, ), Expr(2), @@ -28,10 +28,10 @@ Assign( temp{1}, Call( - temp{7}, + temp{8}, [ - temp{8}, temp{9}, + temp{10}, ], [ None, @@ -45,19 +45,19 @@ [ ( Clear( - temp{9}, + temp{10}, ), Expr(2), ), ( Clear( - temp{8}, + temp{9}, ), Expr(1), ), ( Clear( - temp{7}, + temp{8}, ), Expr(0), ), @@ -70,14 +70,14 @@ ), ( AssignExpr( - temp{6}, + temp{7}, (), ), Expr(4), ), ( Clear( - temp{6}, + temp{7}, ), Expr(4), ), @@ -97,14 +97,14 @@ ), ( AssignExpr( - temp{10}, + temp{11}, (), ), Expr(6), ), ( Clear( - temp{10}, + temp{11}, ), Expr(6), ), @@ -117,25 +117,25 @@ [ ( AssignExpr( - temp{16}, + temp{17}, Print.reserve, ), Expr(10), ), ( AssignExpr( - temp{17}, + temp{18}, p{0}.reserve, ), Expr(11), ), ], Assign( - temp{15}, + temp{16}, Call( - temp{16}, + temp{17}, [ - temp{17}, + temp{18}, ], [ None, @@ -148,31 +148,31 @@ [ ( Clear( - temp{11}, + temp{12}, ), Expr(28), ), ( AssignExpr( - temp{32}, + temp{33}, Print.reserve, ), Expr(29), ), ( AssignExpr( - temp{33}, + temp{34}, p{0}.reserve, ), Expr(30), ), ], Assign( - temp{31}, + temp{32}, Call( - temp{32}, + temp{33}, [ - temp{33}, + temp{34}, ], [ None, @@ -185,21 +185,21 @@ [ ( Clear( - temp{17}, + temp{18}, ), Expr(11), ), ( Clear( - temp{16}, + temp{17}, ), Expr(10), ), ], Assign( - temp{14}, + temp{15}, Await( - temp{15}, + temp{16}, ), BasicBlock(5), ), @@ -208,33 +208,33 @@ [ ( Clear( - temp{15}, + temp{16}, ), Expr(12), ), ( Clear( - temp{14}, + temp{15}, ), Expr(13), ), ( AssignExpr( - temp{19}, + temp{20}, Class(Id { value: 1 }).reserve, ), Expr(15), ), ( AssignExpr( - temp{20}, + temp{21}, 44, ), Expr(16), ), ( AssignExpr( - temp{21}, + temp{22}, 66, ), Expr(17), @@ -243,10 +243,10 @@ Assign( temp{4}, Call( - temp{19}, + temp{20}, [ - temp{20}, temp{21}, + temp{22}, ], [ None, @@ -260,19 +260,19 @@ [ ( Clear( - temp{21}, + temp{22}, ), Expr(17), ), ( Clear( - temp{20}, + temp{21}, ), Expr(16), ), ( Clear( - temp{19}, + temp{20}, ), Expr(15), ), @@ -285,38 +285,38 @@ ), ( AssignExpr( - temp{18}, + temp{19}, (), ), Expr(19), ), ( Clear( - temp{18}, + temp{19}, ), Expr(19), ), ( AssignExpr( - temp{24}, + temp{25}, Print.reserve, ), Expr(20), ), ( AssignExpr( - temp{25}, + temp{26}, p{0}.reserve, ), Expr(21), ), ], Assign( - temp{23}, + temp{24}, Call( - temp{24}, + temp{25}, [ - temp{25}, + temp{26}, ], [ None, @@ -329,21 +329,21 @@ [ ( Clear( - temp{25}, + temp{26}, ), Expr(21), ), ( Clear( - temp{24}, + temp{25}, ), Expr(20), ), ], Assign( - temp{22}, + temp{23}, Await( - temp{23}, + temp{24}, ), BasicBlock(8), ), @@ -352,59 +352,66 @@ [ ( Clear( - temp{23}, + temp{24}, ), Expr(22), ), ( Clear( - temp{22}, + temp{23}, ), Expr(23), ), ( AssignExpr( - temp{26}, + temp{27}, i{2}.give, ), - Expr(26), + Expr(24), ), ( AssignExpr( - temp{27}, + temp{28}, 1, ), Expr(25), ), ( AssignExpr( - i{2}, - temp{26} + temp{27}, + temp{5}, + temp{27} + temp{28}, ), Expr(26), ), ( Clear( - temp{27}, + temp{28}, ), Expr(25), ), ( Clear( - temp{26}, + temp{27}, + ), + Expr(24), + ), + ( + AssignPlace( + i{2}, + temp{5}, ), Expr(26), ), ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(26), ), ( Clear( - temp{13}, + temp{14}, ), Expr(27), ), @@ -414,42 +421,48 @@ ), Expr(27), ), + ( + Clear( + temp{5}, + ), + Expr(27), + ), ( AssignExpr( - temp{29}, + temp{30}, i{2}.give, ), Expr(7), ), ( AssignExpr( - temp{30}, + temp{31}, 1, ), Expr(8), ), ( AssignExpr( - temp{28}, - temp{29} < temp{30}, + temp{29}, + temp{30} < temp{31}, ), Expr(9), ), ( Clear( - temp{30}, + temp{31}, ), Expr(8), ), ( Clear( - temp{29}, + temp{30}, ), Expr(7), ), ], If( - temp{28}, + temp{29}, BasicBlock(9), BasicBlock(10), ), @@ -458,7 +471,7 @@ [ ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(28), @@ -472,7 +485,7 @@ [ ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(28), @@ -486,13 +499,13 @@ [ ( Clear( - temp{28}, + temp{29}, ), Expr(9), ), ( Clear( - temp{12}, + temp{13}, ), Expr(28), ), @@ -505,21 +518,21 @@ [ ( Clear( - temp{33}, + temp{34}, ), Expr(30), ), ( Clear( - temp{32}, + temp{33}, ), Expr(29), ), ], Assign( - temp{5}, + temp{6}, Await( - temp{31}, + temp{32}, ), BasicBlock(13), ), @@ -528,13 +541,13 @@ [ ( Clear( - temp{31}, + temp{32}, ), Expr(31), ), ], Return( - temp{5}, + temp{6}, ), ), }, diff --git a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/syntax.ref b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/syntax.ref index ba195b00..64fa2756 100644 --- a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/syntax.ref +++ b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/specifier/leased-from-rvalue-assign-in-loop.dada:3:18:20:1), ), data: syntax::Tree { - root_expr: ( - Expr(33), + root_expr: Expr(33)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Leased, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,63 +45,53 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "i", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "i", + ty: None, + }, + Expr(5)( Integer( "0", ), ), ), ), - ( - Expr(28), + Expr(28)( While( - ( - Expr(9), + Expr(9)( Op( - ( - Expr(7), + Expr(7)( Id( "i", ), ), LessThan, - ( - Expr(8), + Expr(8)( Integer( "1", ), ), ), ), - ( - Expr(27), + Expr(27)( Seq( [ - ( - Expr(13), + Expr(13)( Await( - ( - Expr(12), + Expr(12)( Call( - ( - Expr(10), + Expr(10)( Id( "print", ), ), [ - ( - None, - ( - Expr(11), + None( + Expr(11)( Id( "p", ), @@ -118,38 +102,30 @@ ), ), ), - ( - Expr(19), + Expr(19)( Assign( - ( - Expr(14), + Expr(14)( Id( "p", ), ), - ( - Expr(18), + Expr(18)( Call( - ( - Expr(15), + Expr(15)( Id( "Point", ), ), [ - ( - None, - ( - Expr(16), + None( + Expr(16)( Integer( "44", ), ), ), - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "66", ), @@ -160,23 +136,18 @@ ), ), ), - ( - Expr(23), + Expr(23)( Await( - ( - Expr(22), + Expr(22)( Call( - ( - Expr(20), + Expr(20)( Id( "print", ), ), [ - ( - None, - ( - Expr(21), + None( + Expr(21)( Id( "p", ), @@ -187,18 +158,15 @@ ), ), ), - ( - Expr(26), + Expr(26)( OpEq( - ( - Expr(24), + Expr(24)( Id( "i", ), ), PlusEqual, - ( - Expr(25), + Expr(25)( Integer( "1", ), @@ -210,23 +178,18 @@ ), ), ), - ( - Expr(32), + Expr(32)( Await( - ( - Expr(31), + Expr(31)( Call( - ( - Expr(29), + Expr(29)( Id( "print", ), ), [ - ( - None, - ( - Expr(30), + None( + Expr(30)( Id( "p", ), diff --git a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/validated.ref b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/validated.ref index 446a8c5d..77af5c25 100644 --- a/dada_tests/specifier/leased-from-rvalue-assign-in-loop/validated.ref +++ b/dada_tests/specifier/leased-from-rvalue-assign-in-loop/validated.ref @@ -1,5 +1,5 @@ [ - Expr(44)( + Expr(46)( Seq( [ Expr(6)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Seq( @@ -105,65 +72,45 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(7)( 0, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Expr(9)( AssignFromPlace( TargetPlace(2)( i{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( temp{3}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + synthesized from Expr(6), ), Expr(11)( Loop( None, - Expr(39)( + Expr(41)( Seq( [ - Expr(35)( + Expr(37)( Declare( [ temp{4}, + temp{5}, ], - Expr(34)( + Expr(36)( Seq( [ Expr(18)( @@ -174,16 +121,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + synthesized from Expr(10), ), [ NamedExpr( @@ -192,30 +133,18 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(25)( Seq( @@ -224,10 +153,7 @@ Assign( TargetPlace(5)( temp{4}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(22)( Call( @@ -239,79 +165,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), [ NamedExpr( None, Expr(20)( 44, - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), NamedExpr( None, Expr(21)( 66, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), Expr(24)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: true, - }, + synthesized from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), Expr(29)( Await( @@ -321,16 +217,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), [ NamedExpr( @@ -339,91 +229,75 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), - Expr(33)( - Assign( - TargetPlace(6)( - i{2}, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: true, - }, - ), - Expr(32)( - Op( - Expr(30)( - Give( - Place(10)( - i{2}, - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + Expr(35)( + Seq( + [ + Expr(33)( + Assign( + TargetPlace(7)( + temp{5}, + synthesized from Expr(26), + ), + Expr(32)( + Op( + Expr(30)( + Give( + Place(10)( + i{2}, + synthesized from Expr(24), + ), + ), + synthesized from Expr(24), + ), + Plus, + Expr(31)( + 1, + from Expr(25), + ), ), + synthesized from Expr(26), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, ), - Plus, - Expr(31)( - 1, - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + synthesized from Expr(26), + ), + Expr(34)( + AssignFromPlace( + TargetPlace(6)( + i{2}, + from Expr(24), + ), + Place(11)( + temp{5}, + synthesized from Expr(26), + ), ), + from Expr(26), ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + synthesized from Expr(26), ), ], ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + from Expr(27), ), ), - ExprOrigin { - syntax_expr: Expr(27), - synthesized: true, - }, + synthesized from Expr(27), ), - Expr(38)( + Expr(40)( If( Expr(14)( Op( @@ -431,129 +305,78 @@ Give( Place(3)( i{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), LessThan, Expr(13)( 1, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), - Expr(36)( + Expr(38)( Tuple, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), - Expr(37)( + Expr(39)( Break( 11, - Expr(36)( + Expr(38)( Tuple, - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + from Expr(28), ), - Expr(43)( + Expr(45)( Await( - Expr(42)( + Expr(44)( Call( - Expr(40)( + Expr(42)( Reserve( - Place(11)( + Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + synthesized from Expr(29), ), [ NamedExpr( None, - Expr(41)( + Expr(43)( Reserve( - Place(12)( + Place(13)( p{0}, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + synthesized from Expr(30), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ], ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/leased-from-rvalue/syntax.ref b/dada_tests/specifier/leased-from-rvalue/syntax.ref index 4e16a729..b57dda34 100644 --- a/dada_tests/specifier/leased-from-rvalue/syntax.ref +++ b/dada_tests/specifier/leased-from-rvalue/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/specifier/leased-from-rvalue.dada:3:18:10:1), ), data: syntax::Tree { - root_expr: ( - Expr(25), + root_expr: Expr(25)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "p", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: Leased, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,38 +45,33 @@ ), ), ), - ( - Expr(6), + Expr(6)( Var( - ( - "q", - None, - ), - ( - Expr(5), + LocalVariableDeclData { + specifier: Leased, + atomic: No, + name: "q", + ty: None, + }, + Expr(5)( Id( "p", ), ), ), ), - ( - Expr(10), + Expr(10)( Await( - ( - Expr(9), + Expr(9)( Call( - ( - Expr(7), + Expr(7)( Id( "print", ), ), [ - ( - None, - ( - Expr(8), + None( + Expr(8)( Id( "q", ), @@ -93,23 +82,18 @@ ), ), ), - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(11), + Expr(11)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Id( "p", ), @@ -120,38 +104,30 @@ ), ), ), - ( - Expr(20), + Expr(20)( Assign( - ( - Expr(15), + Expr(15)( Id( "p", ), ), - ( - Expr(19), + Expr(19)( Call( - ( - Expr(16), + Expr(16)( Id( "Point", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "44", ), ), ), - ( - None, - ( - Expr(18), + None( + Expr(18)( Integer( "66", ), @@ -162,23 +138,18 @@ ), ), ), - ( - Expr(24), + Expr(24)( Await( - ( - Expr(23), + Expr(23)( Call( - ( - Expr(21), + Expr(21)( Id( "print", ), ), [ - ( - None, - ( - Expr(22), + None( + Expr(22)( Id( "q", ), diff --git a/dada_tests/specifier/leased-from-rvalue/validated.ref b/dada_tests/specifier/leased-from-rvalue/validated.ref index fa62b133..4174491b 100644 --- a/dada_tests/specifier/leased-from-rvalue/validated.ref +++ b/dada_tests/specifier/leased-from-rvalue/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,101 +21,62 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(7)( AssignFromPlace( TargetPlace(2)( q{2}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Place(2)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(11)( Await( @@ -128,16 +86,10 @@ Reserve( Place(3)( Print, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), [ NamedExpr( @@ -146,30 +98,18 @@ Reserve( Place(4)( q{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), Expr(15)( Await( @@ -179,16 +119,10 @@ Reserve( Place(5)( Print, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [ NamedExpr( @@ -197,30 +131,18 @@ Reserve( Place(6)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(22)( Seq( @@ -229,10 +151,7 @@ Assign( TargetPlace(4)( temp{3}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: true, - }, + synthesized from Expr(19), ), Expr(19)( Call( @@ -244,79 +163,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(17)( 44, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), NamedExpr( None, Expr(18)( 66, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: true, - }, + synthesized from Expr(19), ), Expr(21)( AssignFromPlace( TargetPlace(3)( p{0}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Place(8)( temp{3}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: true, - }, + synthesized from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + synthesized from Expr(20), ), Expr(26)( Await( @@ -326,16 +215,10 @@ Reserve( Place(9)( Print, - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), [ NamedExpr( @@ -344,36 +227,21 @@ Reserve( Place(10)( q{2}, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ], ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/bir.ref b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/bir.ref index 1489b927..20fc7907 100644 --- a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/bir.ref +++ b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/bir.ref @@ -5,33 +5,33 @@ [ ( AssignExpr( - temp{8}, + temp{9}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{9}, + temp{10}, 22, ), Expr(1), ), ( AssignExpr( - temp{10}, + temp{11}, 44, ), Expr(2), ), ], Assign( - temp{7}, + temp{8}, Call( - temp{8}, + temp{9}, [ - temp{9}, temp{10}, + temp{11}, ], [ None, @@ -45,32 +45,32 @@ [ ( Clear( - temp{10}, + temp{11}, ), Expr(2), ), ( Clear( - temp{9}, + temp{10}, ), Expr(1), ), ( Clear( - temp{8}, + temp{9}, ), Expr(0), ), ( AssignExpr( temp{1}, - temp{7}.share, + temp{8}.share, ), Expr(4), ), ( Clear( - temp{7}, + temp{8}, ), Expr(3), ), @@ -83,14 +83,14 @@ ), ( AssignExpr( - temp{6}, + temp{7}, (), ), Expr(5), ), ( Clear( - temp{6}, + temp{7}, ), Expr(5), ), @@ -110,14 +110,14 @@ ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(7), ), ( Clear( - temp{11}, + temp{12}, ), Expr(7), ), @@ -130,25 +130,25 @@ [ ( AssignExpr( - temp{17}, + temp{18}, Print.reserve, ), Expr(11), ), ( AssignExpr( - temp{18}, + temp{19}, p{0}.reserve, ), Expr(12), ), ], Assign( - temp{16}, + temp{17}, Call( - temp{17}, + temp{18}, [ - temp{18}, + temp{19}, ], [ None, @@ -161,31 +161,31 @@ [ ( Clear( - temp{12}, + temp{13}, ), Expr(30), ), ( AssignExpr( - temp{34}, + temp{35}, Print.reserve, ), Expr(31), ), ( AssignExpr( - temp{35}, + temp{36}, p{0}.reserve, ), Expr(32), ), ], Assign( - temp{33}, + temp{34}, Call( - temp{34}, + temp{35}, [ - temp{35}, + temp{36}, ], [ None, @@ -198,21 +198,21 @@ [ ( Clear( - temp{18}, + temp{19}, ), Expr(12), ), ( Clear( - temp{17}, + temp{18}, ), Expr(11), ), ], Assign( - temp{15}, + temp{16}, Await( - temp{16}, + temp{17}, ), BasicBlock(5), ), @@ -221,45 +221,45 @@ [ ( Clear( - temp{16}, + temp{17}, ), Expr(13), ), ( Clear( - temp{15}, + temp{16}, ), Expr(14), ), ( AssignExpr( - temp{21}, + temp{22}, Class(Id { value: 1 }).reserve, ), Expr(16), ), ( AssignExpr( - temp{22}, + temp{23}, 44, ), Expr(17), ), ( AssignExpr( - temp{23}, + temp{24}, 66, ), Expr(18), ), ], Assign( - temp{20}, + temp{21}, Call( - temp{21}, + temp{22}, [ - temp{22}, temp{23}, + temp{24}, ], [ None, @@ -273,32 +273,32 @@ [ ( Clear( - temp{23}, + temp{24}, ), Expr(18), ), ( Clear( - temp{22}, + temp{23}, ), Expr(17), ), ( Clear( - temp{21}, + temp{22}, ), Expr(16), ), ( AssignExpr( temp{4}, - temp{20}.share, + temp{21}.share, ), Expr(20), ), ( Clear( - temp{20}, + temp{21}, ), Expr(19), ), @@ -311,38 +311,38 @@ ), ( AssignExpr( - temp{19}, + temp{20}, (), ), Expr(21), ), ( Clear( - temp{19}, + temp{20}, ), Expr(21), ), ( AssignExpr( - temp{26}, + temp{27}, Print.reserve, ), Expr(22), ), ( AssignExpr( - temp{27}, + temp{28}, p{0}.reserve, ), Expr(23), ), ], Assign( - temp{25}, + temp{26}, Call( - temp{26}, + temp{27}, [ - temp{27}, + temp{28}, ], [ None, @@ -355,21 +355,21 @@ [ ( Clear( - temp{27}, + temp{28}, ), Expr(23), ), ( Clear( - temp{26}, + temp{27}, ), Expr(22), ), ], Assign( - temp{24}, + temp{25}, Await( - temp{25}, + temp{26}, ), BasicBlock(8), ), @@ -378,59 +378,66 @@ [ ( Clear( - temp{25}, + temp{26}, ), Expr(24), ), ( Clear( - temp{24}, + temp{25}, ), Expr(25), ), ( AssignExpr( - temp{28}, + temp{29}, i{2}.give, ), - Expr(28), + Expr(26), ), ( AssignExpr( - temp{29}, + temp{30}, 1, ), Expr(27), ), ( AssignExpr( - i{2}, - temp{28} + temp{29}, + temp{5}, + temp{29} + temp{30}, ), Expr(28), ), ( Clear( - temp{29}, + temp{30}, ), Expr(27), ), ( Clear( - temp{28}, + temp{29}, + ), + Expr(26), + ), + ( + AssignPlace( + i{2}, + temp{5}, ), Expr(28), ), ( AssignExpr( - temp{14}, + temp{15}, (), ), Expr(28), ), ( Clear( - temp{14}, + temp{15}, ), Expr(29), ), @@ -440,42 +447,48 @@ ), Expr(29), ), + ( + Clear( + temp{5}, + ), + Expr(29), + ), ( AssignExpr( - temp{31}, + temp{32}, i{2}.give, ), Expr(8), ), ( AssignExpr( - temp{32}, + temp{33}, 1, ), Expr(9), ), ( AssignExpr( - temp{30}, - temp{31} < temp{32}, + temp{31}, + temp{32} < temp{33}, ), Expr(10), ), ( Clear( - temp{32}, + temp{33}, ), Expr(9), ), ( Clear( - temp{31}, + temp{32}, ), Expr(8), ), ], If( - temp{30}, + temp{31}, BasicBlock(9), BasicBlock(10), ), @@ -484,7 +497,7 @@ [ ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(30), @@ -498,7 +511,7 @@ [ ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(30), @@ -512,13 +525,13 @@ [ ( Clear( - temp{30}, + temp{31}, ), Expr(10), ), ( Clear( - temp{13}, + temp{14}, ), Expr(30), ), @@ -531,21 +544,21 @@ [ ( Clear( - temp{35}, + temp{36}, ), Expr(32), ), ( Clear( - temp{34}, + temp{35}, ), Expr(31), ), ], Assign( - temp{5}, + temp{6}, Await( - temp{33}, + temp{34}, ), BasicBlock(13), ), @@ -554,13 +567,13 @@ [ ( Clear( - temp{33}, + temp{34}, ), Expr(33), ), ], Return( - temp{5}, + temp{6}, ), ), }, diff --git a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/syntax.ref b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/syntax.ref index 937f64cc..0a40c99d 100644 --- a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/syntax.ref +++ b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop.dada:3:18:23:1), ), data: syntax::Tree { - root_expr: ( - Expr(35), + root_expr: Expr(35)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: Leased, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,63 +49,53 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "i", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "i", + ty: None, + }, + Expr(6)( Integer( "0", ), ), ), ), - ( - Expr(30), + Expr(30)( While( - ( - Expr(10), + Expr(10)( Op( - ( - Expr(8), + Expr(8)( Id( "i", ), ), LessThan, - ( - Expr(9), + Expr(9)( Integer( "1", ), ), ), ), - ( - Expr(29), + Expr(29)( Seq( [ - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(11), + Expr(11)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Id( "p", ), @@ -123,41 +106,32 @@ ), ), ), - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(15), + Expr(15)( Id( "p", ), ), - ( - Expr(20), + Expr(20)( Share( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(16), + Expr(16)( Id( "Point", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "44", ), ), ), - ( - None, - ( - Expr(18), + None( + Expr(18)( Integer( "66", ), @@ -170,23 +144,18 @@ ), ), ), - ( - Expr(25), + Expr(25)( Await( - ( - Expr(24), + Expr(24)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(23), + None( + Expr(23)( Id( "p", ), @@ -197,18 +166,15 @@ ), ), ), - ( - Expr(28), + Expr(28)( OpEq( - ( - Expr(26), + Expr(26)( Id( "i", ), ), PlusEqual, - ( - Expr(27), + Expr(27)( Integer( "1", ), @@ -220,23 +186,18 @@ ), ), ), - ( - Expr(34), + Expr(34)( Await( - ( - Expr(33), + Expr(33)( Call( - ( - Expr(31), + Expr(31)( Id( "print", ), ), [ - ( - None, - ( - Expr(32), + None( + Expr(32)( Id( "p", ), diff --git a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/validated.ref b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/validated.ref index a98c6551..2a04432b 100644 --- a/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/validated.ref +++ b/dada_tests/specifier/leased-from-shared-rvalue-assign-in-loop/validated.ref @@ -1,5 +1,5 @@ [ - Expr(46)( + Expr(48)( Seq( [ Expr(7)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(11)( Seq( @@ -113,65 +77,45 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( 0, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( i{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(12)( Loop( None, - Expr(41)( + Expr(43)( Seq( [ - Expr(37)( + Expr(39)( Declare( [ temp{4}, + temp{5}, ], - Expr(36)( + Expr(38)( Seq( [ Expr(19)( @@ -182,16 +126,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [ NamedExpr( @@ -200,30 +138,18 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(27)( Seq( @@ -232,10 +158,7 @@ Assign( TargetPlace(5)( temp{4}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(24)( Share( @@ -249,85 +172,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(21)( 44, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), NamedExpr( None, Expr(22)( 66, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(26)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), Expr(31)( Await( @@ -337,16 +227,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -355,91 +239,75 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), - Expr(35)( - Assign( - TargetPlace(6)( - i{2}, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: true, - }, - ), - Expr(34)( - Op( - Expr(32)( - Give( - Place(10)( - i{2}, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + Expr(37)( + Seq( + [ + Expr(35)( + Assign( + TargetPlace(7)( + temp{5}, + synthesized from Expr(28), + ), + Expr(34)( + Op( + Expr(32)( + Give( + Place(10)( + i{2}, + synthesized from Expr(26), + ), + ), + synthesized from Expr(26), + ), + Plus, + Expr(33)( + 1, + from Expr(27), + ), ), + synthesized from Expr(28), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, ), - Plus, - Expr(33)( - 1, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(28), + ), + Expr(36)( + AssignFromPlace( + TargetPlace(6)( + i{2}, + from Expr(26), + ), + Place(11)( + temp{5}, + synthesized from Expr(28), + ), ), + from Expr(28), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + synthesized from Expr(28), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: true, - }, + synthesized from Expr(29), ), - Expr(40)( + Expr(42)( If( Expr(15)( Op( @@ -447,129 +315,78 @@ Give( Place(3)( i{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), LessThan, Expr(14)( 1, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), - Expr(38)( + Expr(40)( Tuple, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), - Expr(39)( + Expr(41)( Break( 12, - Expr(38)( + Expr(40)( Tuple, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), - Expr(45)( + Expr(47)( Await( - Expr(44)( + Expr(46)( Call( - Expr(42)( + Expr(44)( Reserve( - Place(11)( + Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + synthesized from Expr(31), ), [ NamedExpr( None, - Expr(43)( + Expr(45)( Reserve( - Place(12)( + Place(13)( p{0}, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + synthesized from Expr(32), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ], ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/local-my/syntax.ref b/dada_tests/specifier/local-my/syntax.ref index ad1d8d0b..d16bc8f3 100644 --- a/dada_tests/specifier/local-my/syntax.ref +++ b/dada_tests/specifier/local-my/syntax.ref @@ -7,40 +7,34 @@ Tokens(dada_tests/specifier/local-my.dada:3:18:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(26), + root_expr: Expr(26)( Seq( [ - ( - Expr(4), + Expr(4)( Var( - ( - "pair", - None, - ), - ( - Expr(3), + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "pair", + ty: None, + }, + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Pair", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -51,26 +45,20 @@ ), ), ), - ( - Expr(9), + Expr(9)( Await( - ( - Expr(8), + Expr(8)( Call( - ( - Expr(5), + Expr(5)( Id( "print", ), ), [ - ( - None, - ( - Expr(7), + None( + Expr(7)( Lease( - ( - Expr(6), + Expr(6)( Id( "pair", ), @@ -83,53 +71,48 @@ ), ), ), - ( - Expr(11), + Expr(11)( Var( - ( - "pair1", - None, - ), - ( - Expr(10), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "pair1", + ty: None, + }, + Expr(10)( Id( "pair", ), ), ), ), - ( - Expr(13), + Expr(13)( Var( - ( - "pair2", - None, - ), - ( - Expr(12), + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "pair2", + ty: None, + }, + Expr(12)( Id( "pair1", ), ), ), ), - ( - Expr(17), + Expr(17)( Await( - ( - Expr(16), + Expr(16)( Call( - ( - Expr(14), + Expr(14)( Id( "print", ), ), [ - ( - None, - ( - Expr(15), + None( + Expr(15)( Id( "pair1", ), @@ -140,23 +123,18 @@ ), ), ), - ( - Expr(21), + Expr(21)( Await( - ( - Expr(20), + Expr(20)( Call( - ( - Expr(18), + Expr(18)( Id( "print", ), ), [ - ( - None, - ( - Expr(19), + None( + Expr(19)( Id( "pair2", ), @@ -167,23 +145,18 @@ ), ), ), - ( - Expr(25), + Expr(25)( Await( - ( - Expr(24), + Expr(24)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(23), + None( + Expr(23)( Id( "pair", ), diff --git a/dada_tests/specifier/local-my/validated.ref b/dada_tests/specifier/local-my/validated.ref index 1bb55a48..5749f8f8 100644 --- a/dada_tests/specifier/local-my/validated.ref +++ b/dada_tests/specifier/local-my/validated.ref @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(3)( Call( @@ -24,79 +21,49 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), Expr(5)( AssignFromPlace( TargetPlace(0)( pair{0}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: true, - }, + synthesized from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), Expr(10)( Await( @@ -106,16 +73,10 @@ Reserve( Place(2)( Print, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), [ NamedExpr( @@ -124,74 +85,44 @@ Lease( Place(3)( pair{0}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), Expr(11)( AssignFromPlace( TargetPlace(2)( pair1{2}, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: true, - }, + synthesized from Expr(11), ), Place(4)( pair{0}, - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(12)( AssignFromPlace( TargetPlace(3)( pair2{3}, - ExprOrigin { - syntax_expr: Expr(13), - synthesized: true, - }, + synthesized from Expr(13), ), Place(5)( pair1{2}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), Expr(16)( Await( @@ -201,16 +132,10 @@ Reserve( Place(6)( Print, - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + synthesized from Expr(14), ), [ NamedExpr( @@ -219,30 +144,18 @@ Reserve( Place(7)( pair1{2}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + synthesized from Expr(15), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), Expr(20)( Await( @@ -252,16 +165,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + synthesized from Expr(18), ), [ NamedExpr( @@ -270,30 +177,18 @@ Reserve( Place(9)( pair2{3}, - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + synthesized from Expr(19), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), Expr(24)( Await( @@ -303,16 +198,10 @@ Reserve( Place(10)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -321,36 +210,21 @@ Reserve( Place(11)( pair{0}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), ], ), - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + from Expr(26), ), ] \ No newline at end of file diff --git a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/bir.ref b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/bir.ref index 1489b927..20fc7907 100644 --- a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/bir.ref +++ b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/bir.ref @@ -5,33 +5,33 @@ [ ( AssignExpr( - temp{8}, + temp{9}, Class(Id { value: 1 }).reserve, ), Expr(0), ), ( AssignExpr( - temp{9}, + temp{10}, 22, ), Expr(1), ), ( AssignExpr( - temp{10}, + temp{11}, 44, ), Expr(2), ), ], Assign( - temp{7}, + temp{8}, Call( - temp{8}, + temp{9}, [ - temp{9}, temp{10}, + temp{11}, ], [ None, @@ -45,32 +45,32 @@ [ ( Clear( - temp{10}, + temp{11}, ), Expr(2), ), ( Clear( - temp{9}, + temp{10}, ), Expr(1), ), ( Clear( - temp{8}, + temp{9}, ), Expr(0), ), ( AssignExpr( temp{1}, - temp{7}.share, + temp{8}.share, ), Expr(4), ), ( Clear( - temp{7}, + temp{8}, ), Expr(3), ), @@ -83,14 +83,14 @@ ), ( AssignExpr( - temp{6}, + temp{7}, (), ), Expr(5), ), ( Clear( - temp{6}, + temp{7}, ), Expr(5), ), @@ -110,14 +110,14 @@ ), ( AssignExpr( - temp{11}, + temp{12}, (), ), Expr(7), ), ( Clear( - temp{11}, + temp{12}, ), Expr(7), ), @@ -130,25 +130,25 @@ [ ( AssignExpr( - temp{17}, + temp{18}, Print.reserve, ), Expr(11), ), ( AssignExpr( - temp{18}, + temp{19}, p{0}.reserve, ), Expr(12), ), ], Assign( - temp{16}, + temp{17}, Call( - temp{17}, + temp{18}, [ - temp{18}, + temp{19}, ], [ None, @@ -161,31 +161,31 @@ [ ( Clear( - temp{12}, + temp{13}, ), Expr(30), ), ( AssignExpr( - temp{34}, + temp{35}, Print.reserve, ), Expr(31), ), ( AssignExpr( - temp{35}, + temp{36}, p{0}.reserve, ), Expr(32), ), ], Assign( - temp{33}, + temp{34}, Call( - temp{34}, + temp{35}, [ - temp{35}, + temp{36}, ], [ None, @@ -198,21 +198,21 @@ [ ( Clear( - temp{18}, + temp{19}, ), Expr(12), ), ( Clear( - temp{17}, + temp{18}, ), Expr(11), ), ], Assign( - temp{15}, + temp{16}, Await( - temp{16}, + temp{17}, ), BasicBlock(5), ), @@ -221,45 +221,45 @@ [ ( Clear( - temp{16}, + temp{17}, ), Expr(13), ), ( Clear( - temp{15}, + temp{16}, ), Expr(14), ), ( AssignExpr( - temp{21}, + temp{22}, Class(Id { value: 1 }).reserve, ), Expr(16), ), ( AssignExpr( - temp{22}, + temp{23}, 44, ), Expr(17), ), ( AssignExpr( - temp{23}, + temp{24}, 66, ), Expr(18), ), ], Assign( - temp{20}, + temp{21}, Call( - temp{21}, + temp{22}, [ - temp{22}, temp{23}, + temp{24}, ], [ None, @@ -273,32 +273,32 @@ [ ( Clear( - temp{23}, + temp{24}, ), Expr(18), ), ( Clear( - temp{22}, + temp{23}, ), Expr(17), ), ( Clear( - temp{21}, + temp{22}, ), Expr(16), ), ( AssignExpr( temp{4}, - temp{20}.share, + temp{21}.share, ), Expr(20), ), ( Clear( - temp{20}, + temp{21}, ), Expr(19), ), @@ -311,38 +311,38 @@ ), ( AssignExpr( - temp{19}, + temp{20}, (), ), Expr(21), ), ( Clear( - temp{19}, + temp{20}, ), Expr(21), ), ( AssignExpr( - temp{26}, + temp{27}, Print.reserve, ), Expr(22), ), ( AssignExpr( - temp{27}, + temp{28}, p{0}.reserve, ), Expr(23), ), ], Assign( - temp{25}, + temp{26}, Call( - temp{26}, + temp{27}, [ - temp{27}, + temp{28}, ], [ None, @@ -355,21 +355,21 @@ [ ( Clear( - temp{27}, + temp{28}, ), Expr(23), ), ( Clear( - temp{26}, + temp{27}, ), Expr(22), ), ], Assign( - temp{24}, + temp{25}, Await( - temp{25}, + temp{26}, ), BasicBlock(8), ), @@ -378,59 +378,66 @@ [ ( Clear( - temp{25}, + temp{26}, ), Expr(24), ), ( Clear( - temp{24}, + temp{25}, ), Expr(25), ), ( AssignExpr( - temp{28}, + temp{29}, i{2}.give, ), - Expr(28), + Expr(26), ), ( AssignExpr( - temp{29}, + temp{30}, 1, ), Expr(27), ), ( AssignExpr( - i{2}, - temp{28} + temp{29}, + temp{5}, + temp{29} + temp{30}, ), Expr(28), ), ( Clear( - temp{29}, + temp{30}, ), Expr(27), ), ( Clear( - temp{28}, + temp{29}, + ), + Expr(26), + ), + ( + AssignPlace( + i{2}, + temp{5}, ), Expr(28), ), ( AssignExpr( - temp{14}, + temp{15}, (), ), Expr(28), ), ( Clear( - temp{14}, + temp{15}, ), Expr(29), ), @@ -440,42 +447,48 @@ ), Expr(29), ), + ( + Clear( + temp{5}, + ), + Expr(29), + ), ( AssignExpr( - temp{31}, + temp{32}, i{2}.give, ), Expr(8), ), ( AssignExpr( - temp{32}, + temp{33}, 1, ), Expr(9), ), ( AssignExpr( - temp{30}, - temp{31} < temp{32}, + temp{31}, + temp{32} < temp{33}, ), Expr(10), ), ( Clear( - temp{32}, + temp{33}, ), Expr(9), ), ( Clear( - temp{31}, + temp{32}, ), Expr(8), ), ], If( - temp{30}, + temp{31}, BasicBlock(9), BasicBlock(10), ), @@ -484,7 +497,7 @@ [ ( AssignExpr( - temp{13}, + temp{14}, (), ), Expr(30), @@ -498,7 +511,7 @@ [ ( AssignExpr( - temp{12}, + temp{13}, (), ), Expr(30), @@ -512,13 +525,13 @@ [ ( Clear( - temp{30}, + temp{31}, ), Expr(10), ), ( Clear( - temp{13}, + temp{14}, ), Expr(30), ), @@ -531,21 +544,21 @@ [ ( Clear( - temp{35}, + temp{36}, ), Expr(32), ), ( Clear( - temp{34}, + temp{35}, ), Expr(31), ), ], Assign( - temp{5}, + temp{6}, Await( - temp{33}, + temp{34}, ), BasicBlock(13), ), @@ -554,13 +567,13 @@ [ ( Clear( - temp{33}, + temp{34}, ), Expr(33), ), ], Return( - temp{5}, + temp{6}, ), ), }, diff --git a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/syntax.ref b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/syntax.ref index 1781e989..81cf4e44 100644 --- a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/syntax.ref +++ b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/syntax.ref @@ -7,43 +7,36 @@ Tokens(dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop.dada:3:18:23:1), ), data: syntax::Tree { - root_expr: ( - Expr(35), + root_expr: Expr(35)( Seq( [ - ( - Expr(5), + Expr(5)( Var( - ( - "p", - None, - ), - ( - Expr(4), + LocalVariableDeclData { + specifier: OurLeased, + atomic: No, + name: "p", + ty: None, + }, + Expr(4)( Share( - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "Point", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( Integer( "22", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( Integer( "44", ), @@ -56,63 +49,53 @@ ), ), ), - ( - Expr(7), + Expr(7)( Var( - ( - "i", - None, - ), - ( - Expr(6), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "i", + ty: None, + }, + Expr(6)( Integer( "0", ), ), ), ), - ( - Expr(30), + Expr(30)( While( - ( - Expr(10), + Expr(10)( Op( - ( - Expr(8), + Expr(8)( Id( "i", ), ), LessThan, - ( - Expr(9), + Expr(9)( Integer( "1", ), ), ), ), - ( - Expr(29), + Expr(29)( Seq( [ - ( - Expr(14), + Expr(14)( Await( - ( - Expr(13), + Expr(13)( Call( - ( - Expr(11), + Expr(11)( Id( "print", ), ), [ - ( - None, - ( - Expr(12), + None( + Expr(12)( Id( "p", ), @@ -123,41 +106,32 @@ ), ), ), - ( - Expr(21), + Expr(21)( Assign( - ( - Expr(15), + Expr(15)( Id( "p", ), ), - ( - Expr(20), + Expr(20)( Share( - ( - Expr(19), + Expr(19)( Call( - ( - Expr(16), + Expr(16)( Id( "Point", ), ), [ - ( - None, - ( - Expr(17), + None( + Expr(17)( Integer( "44", ), ), ), - ( - None, - ( - Expr(18), + None( + Expr(18)( Integer( "66", ), @@ -170,23 +144,18 @@ ), ), ), - ( - Expr(25), + Expr(25)( Await( - ( - Expr(24), + Expr(24)( Call( - ( - Expr(22), + Expr(22)( Id( "print", ), ), [ - ( - None, - ( - Expr(23), + None( + Expr(23)( Id( "p", ), @@ -197,18 +166,15 @@ ), ), ), - ( - Expr(28), + Expr(28)( OpEq( - ( - Expr(26), + Expr(26)( Id( "i", ), ), PlusEqual, - ( - Expr(27), + Expr(27)( Integer( "1", ), @@ -220,23 +186,18 @@ ), ), ), - ( - Expr(34), + Expr(34)( Await( - ( - Expr(33), + Expr(33)( Call( - ( - Expr(31), + Expr(31)( Id( "print", ), ), [ - ( - None, - ( - Expr(32), + None( + Expr(32)( Id( "p", ), diff --git a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/validated.ref b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/validated.ref index a98c6551..2a04432b 100644 --- a/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/validated.ref +++ b/dada_tests/specifier/our-leased-from-shared-rvalue-assign-in-loop/validated.ref @@ -1,5 +1,5 @@ [ - Expr(46)( + Expr(48)( Seq( [ Expr(7)( @@ -9,10 +9,7 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(4)( Share( @@ -26,85 +23,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( 22, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( 44, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), Expr(6)( AssignFromPlace( TargetPlace(0)( p{0}, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: true, - }, + synthesized from Expr(5), ), Place(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: true, - }, + synthesized from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + synthesized from Expr(5), ), Expr(11)( Seq( @@ -113,65 +77,45 @@ Assign( TargetPlace(3)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(8)( 0, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), Expr(10)( AssignFromPlace( TargetPlace(2)( i{2}, - ExprOrigin { - syntax_expr: Expr(7), - synthesized: true, - }, + synthesized from Expr(7), ), Place(2)( temp{3}, - ExprOrigin { - syntax_expr: Expr(6), - synthesized: true, - }, + synthesized from Expr(6), ), ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + synthesized from Expr(7), ), Expr(12)( Loop( None, - Expr(41)( + Expr(43)( Seq( [ - Expr(37)( + Expr(39)( Declare( [ temp{4}, + temp{5}, ], - Expr(36)( + Expr(38)( Seq( [ Expr(19)( @@ -182,16 +126,10 @@ Reserve( Place(4)( Print, - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + synthesized from Expr(11), ), [ NamedExpr( @@ -200,30 +138,18 @@ Reserve( Place(5)( p{0}, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), Expr(27)( Seq( @@ -232,10 +158,7 @@ Assign( TargetPlace(5)( temp{4}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(24)( Share( @@ -249,85 +172,52 @@ value: 1, }, ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + synthesized from Expr(16), ), [ NamedExpr( None, Expr(21)( 44, - ExprOrigin { - syntax_expr: Expr(17), - synthesized: false, - }, + from Expr(17), ), ), NamedExpr( None, Expr(22)( 66, - ExprOrigin { - syntax_expr: Expr(18), - synthesized: false, - }, + from Expr(18), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(19), - synthesized: false, - }, + from Expr(19), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: false, - }, + from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), Expr(26)( AssignFromPlace( TargetPlace(4)( p{0}, - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), Place(7)( temp{4}, - ExprOrigin { - syntax_expr: Expr(20), - synthesized: true, - }, + synthesized from Expr(20), ), ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + from Expr(21), ), ], ), - ExprOrigin { - syntax_expr: Expr(21), - synthesized: false, - }, + synthesized from Expr(21), ), Expr(31)( Await( @@ -337,16 +227,10 @@ Reserve( Place(8)( Print, - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + from Expr(22), ), ), - ExprOrigin { - syntax_expr: Expr(22), - synthesized: false, - }, + synthesized from Expr(22), ), [ NamedExpr( @@ -355,91 +239,75 @@ Reserve( Place(9)( p{0}, - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + from Expr(23), ), ), - ExprOrigin { - syntax_expr: Expr(23), - synthesized: false, - }, + synthesized from Expr(23), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(24), - synthesized: false, - }, + from Expr(24), ), ), - ExprOrigin { - syntax_expr: Expr(25), - synthesized: false, - }, + from Expr(25), ), - Expr(35)( - Assign( - TargetPlace(6)( - i{2}, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: true, - }, - ), - Expr(34)( - Op( - Expr(32)( - Give( - Place(10)( - i{2}, - ExprOrigin { - syntax_expr: Expr(26), - synthesized: false, - }, + Expr(37)( + Seq( + [ + Expr(35)( + Assign( + TargetPlace(7)( + temp{5}, + synthesized from Expr(28), + ), + Expr(34)( + Op( + Expr(32)( + Give( + Place(10)( + i{2}, + synthesized from Expr(26), + ), + ), + synthesized from Expr(26), + ), + Plus, + Expr(33)( + 1, + from Expr(27), + ), ), + synthesized from Expr(28), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, ), - Plus, - Expr(33)( - 1, - ExprOrigin { - syntax_expr: Expr(27), - synthesized: false, - }, + synthesized from Expr(28), + ), + Expr(36)( + AssignFromPlace( + TargetPlace(6)( + i{2}, + from Expr(26), + ), + Place(11)( + temp{5}, + synthesized from Expr(28), + ), ), + from Expr(28), ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(28), - synthesized: false, - }, + synthesized from Expr(28), ), ], ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: false, - }, + from Expr(29), ), ), - ExprOrigin { - syntax_expr: Expr(29), - synthesized: true, - }, + synthesized from Expr(29), ), - Expr(40)( + Expr(42)( If( Expr(15)( Op( @@ -447,129 +315,78 @@ Give( Place(3)( i{2}, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), LessThan, Expr(14)( 1, - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), - Expr(38)( + Expr(40)( Tuple, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), - Expr(39)( + Expr(41)( Break( 12, - Expr(38)( + Expr(40)( Tuple, - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ], ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), ), - ExprOrigin { - syntax_expr: Expr(30), - synthesized: false, - }, + from Expr(30), ), - Expr(45)( + Expr(47)( Await( - Expr(44)( + Expr(46)( Call( - Expr(42)( + Expr(44)( Reserve( - Place(11)( + Place(12)( Print, - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + from Expr(31), ), ), - ExprOrigin { - syntax_expr: Expr(31), - synthesized: false, - }, + synthesized from Expr(31), ), [ NamedExpr( None, - Expr(43)( + Expr(45)( Reserve( - Place(12)( + Place(13)( p{0}, - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + from Expr(32), ), ), - ExprOrigin { - syntax_expr: Expr(32), - synthesized: false, - }, + synthesized from Expr(32), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(33), - synthesized: false, - }, + from Expr(33), ), ), - ExprOrigin { - syntax_expr: Expr(34), - synthesized: false, - }, + from Expr(34), ), ], ), - ExprOrigin { - syntax_expr: Expr(35), - synthesized: false, - }, + from Expr(35), ), ] \ No newline at end of file diff --git a/dada_tests/validate/assign-to-class/syntax.ref b/dada_tests/validate/assign-to-class/syntax.ref index 54d532b7..658ce78e 100644 --- a/dada_tests/validate/assign-to-class/syntax.ref +++ b/dada_tests/validate/assign-to-class/syntax.ref @@ -7,34 +7,27 @@ Tokens(dada_tests/validate/assign-to-class.dada:3:18:7:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( If( - ( - Expr(0), + Expr(0)( Boolean( false, ), ), - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Assign( - ( - Expr(1), + Expr(1)( Id( "Foo", ), ), - ( - Expr(2), + Expr(2)( Integer( "22", ), diff --git a/dada_tests/validate/assign-to-class/validated.ref b/dada_tests/validate/assign-to-class/validated.ref index 668a6d58..62bfc879 100644 --- a/dada_tests/validate/assign-to-class/validated.ref +++ b/dada_tests/validate/assign-to-class/validated.ref @@ -6,46 +6,28 @@ If( Expr(0)( false, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(2)( Seq( [ Expr(1)( Error, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(3)( Tuple, - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ] \ No newline at end of file diff --git a/dada_tests/validate/await-where-not-allowed/syntax.ref b/dada_tests/validate/await-where-not-allowed/syntax.ref index 6028159a..c57f1d13 100644 --- a/dada_tests/validate/await-where-not-allowed/syntax.ref +++ b/dada_tests/validate/await-where-not-allowed/syntax.ref @@ -7,27 +7,21 @@ Tokens(dada_tests/validate/await-where-not-allowed.dada:3:17:6:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), @@ -51,34 +45,26 @@ Tokens(dada_tests/validate/await-where-not-allowed.dada:8:30:13:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Atomic( - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), @@ -107,34 +93,26 @@ Tokens(dada_tests/validate/await-where-not-allowed.dada:15:32:20:1), ), data: syntax::Tree { - root_expr: ( - Expr(6), + root_expr: Expr(6)( Seq( [ - ( - Expr(5), + Expr(5)( Atomic( - ( - Expr(4), + Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), @@ -163,27 +141,21 @@ Tokens(dada_tests/validate/await-where-not-allowed.dada:22:18:24:1), ), data: syntax::Tree { - root_expr: ( - Expr(4), + root_expr: Expr(4)( Seq( [ - ( - Expr(3), + Expr(3)( Await( - ( - Expr(2), + Expr(2)( Call( - ( - Expr(0), + Expr(0)( Id( "print", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "Hello, world", ), diff --git a/dada_tests/validate/await-where-not-allowed/validated.ref b/dada_tests/validate/await-where-not-allowed/validated.ref index 90d7ebc1..67d40956 100644 --- a/dada_tests/validate/await-where-not-allowed/validated.ref +++ b/dada_tests/validate/await-where-not-allowed/validated.ref @@ -10,47 +10,29 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), Expr(6)( Seq( @@ -68,60 +50,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(6)( Seq( @@ -139,60 +97,36 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ], ), - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), Expr(4)( Seq( @@ -205,46 +139,28 @@ Reserve( Place(0)( Print, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "Hello, world", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ] \ No newline at end of file diff --git a/dada_tests/validate/duplicate_class_func/syntax.ref b/dada_tests/validate/duplicate_class_func/syntax.ref index c605f287..d4a698e5 100644 --- a/dada_tests/validate/duplicate_class_func/syntax.ref +++ b/dada_tests/validate/duplicate_class_func/syntax.ref @@ -7,8 +7,7 @@ Tokens(dada_tests/validate/duplicate_class_func.dada:2:12:2:12), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), diff --git a/dada_tests/validate/duplicate_class_func/validated.ref b/dada_tests/validate/duplicate_class_func/validated.ref index 3f07b989..60f8553b 100644 --- a/dada_tests/validate/duplicate_class_func/validated.ref +++ b/dada_tests/validate/duplicate_class_func/validated.ref @@ -3,9 +3,6 @@ Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ] \ No newline at end of file diff --git a/dada_tests/validate/duplicate_func_class/syntax.ref b/dada_tests/validate/duplicate_func_class/syntax.ref index 8842405f..4cb404ee 100644 --- a/dada_tests/validate/duplicate_func_class/syntax.ref +++ b/dada_tests/validate/duplicate_func_class/syntax.ref @@ -7,8 +7,7 @@ Tokens(dada_tests/validate/duplicate_func_class.dada:1:12:1:12), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), diff --git a/dada_tests/validate/duplicate_func_class/validated.ref b/dada_tests/validate/duplicate_func_class/validated.ref index 3f07b989..60f8553b 100644 --- a/dada_tests/validate/duplicate_func_class/validated.ref +++ b/dada_tests/validate/duplicate_func_class/validated.ref @@ -3,9 +3,6 @@ Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ] \ No newline at end of file diff --git a/dada_tests/validate/duplicate_func_func/syntax.ref b/dada_tests/validate/duplicate_func_func/syntax.ref index d5f81a17..736edf40 100644 --- a/dada_tests/validate/duplicate_func_func/syntax.ref +++ b/dada_tests/validate/duplicate_func_func/syntax.ref @@ -7,8 +7,7 @@ Tokens(dada_tests/validate/duplicate_func_func.dada:1:12:1:12), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -23,8 +22,7 @@ Tokens(dada_tests/validate/duplicate_func_func.dada:2:12:2:12), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), diff --git a/dada_tests/validate/duplicate_func_func/validated.ref b/dada_tests/validate/duplicate_func_func/validated.ref index 65115db7..b2053c08 100644 --- a/dada_tests/validate/duplicate_func_func/validated.ref +++ b/dada_tests/validate/duplicate_func_func/validated.ref @@ -3,18 +3,12 @@ Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(0)( Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ] \ No newline at end of file diff --git a/dada_tests/validate/named_parameter/syntax.ref b/dada_tests/validate/named_parameter/syntax.ref index b3093a69..2ad8d9e5 100644 --- a/dada_tests/validate/named_parameter/syntax.ref +++ b/dada_tests/validate/named_parameter/syntax.ref @@ -7,8 +7,7 @@ Tokens(dada_tests/validate/named_parameter.dada:1:15:1:15), ), data: syntax::Tree { - root_expr: ( - Expr(0), + root_expr: Expr(0)( Seq( [], ), @@ -23,33 +22,26 @@ Tokens(dada_tests/validate/named_parameter.dada:3:18:14:1), ), data: syntax::Tree { - root_expr: ( - Expr(16), + root_expr: Expr(16)( Seq( [ - ( - Expr(3), + Expr(3)( Call( - ( - Expr(0), + Expr(0)( Id( "foo", ), ), [ - ( - None, - ( - Expr(1), + None( + Expr(1)( String( "a", ), ), ), - ( - None, - ( - Expr(2), + None( + Expr(2)( String( "b", ), @@ -58,31 +50,23 @@ ], ), ), - ( - Expr(7), + Expr(7)( Call( - ( - Expr(4), + Expr(4)( Id( "foo", ), ), [ - ( - Some( - "a", - ), - ( - Expr(5), + Some("a")( + Expr(5)( String( "a", ), ), ), - ( - None, - ( - Expr(6), + None( + Expr(6)( String( "b", ), @@ -91,31 +75,23 @@ ], ), ), - ( - Expr(11), + Expr(11)( Call( - ( - Expr(8), + Expr(8)( Id( "foo", ), ), [ - ( - None, - ( - Expr(9), + None( + Expr(9)( String( "a", ), ), ), - ( - Some( - "b", - ), - ( - Expr(10), + Some("b")( + Expr(10)( String( "b", ), @@ -124,33 +100,23 @@ ], ), ), - ( - Expr(15), + Expr(15)( Call( - ( - Expr(12), + Expr(12)( Id( "foo", ), ), [ - ( - Some( - "a", - ), - ( - Expr(13), + Some("a")( + Expr(13)( String( "a", ), ), ), - ( - Some( - "b", - ), - ( - Expr(14), + Some("b")( + Expr(14)( String( "b", ), diff --git a/dada_tests/validate/named_parameter/validated.ref b/dada_tests/validate/named_parameter/validated.ref index c3050b23..16d18f99 100644 --- a/dada_tests/validate/named_parameter/validated.ref +++ b/dada_tests/validate/named_parameter/validated.ref @@ -3,10 +3,7 @@ Seq( [], ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), Expr(16)( Seq( @@ -17,44 +14,29 @@ Reserve( Place(0)( foo, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + synthesized from Expr(0), ), [ NamedExpr( None, Expr(1)( "a", - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ), NamedExpr( None, Expr(2)( "b", - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + from Expr(2), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + from Expr(3), ), Expr(7)( Call( @@ -62,16 +44,10 @@ Reserve( Place(1)( foo, - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + from Expr(4), ), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), [ NamedExpr( @@ -80,28 +56,19 @@ ), Expr(5)( "a", - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ), NamedExpr( None, Expr(6)( "b", - ExprOrigin { - syntax_expr: Expr(6), - synthesized: false, - }, + from Expr(6), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(7), - synthesized: false, - }, + from Expr(7), ), Expr(11)( Call( @@ -109,26 +76,17 @@ Reserve( Place(2)( foo, - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + from Expr(8), ), ), - ExprOrigin { - syntax_expr: Expr(8), - synthesized: false, - }, + synthesized from Expr(8), ), [ NamedExpr( None, Expr(9)( "a", - ExprOrigin { - syntax_expr: Expr(9), - synthesized: false, - }, + from Expr(9), ), ), NamedExpr( @@ -137,18 +95,12 @@ ), Expr(10)( "b", - ExprOrigin { - syntax_expr: Expr(10), - synthesized: false, - }, + from Expr(10), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(11), - synthesized: false, - }, + from Expr(11), ), Expr(15)( Call( @@ -156,16 +108,10 @@ Reserve( Place(3)( foo, - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + from Expr(12), ), ), - ExprOrigin { - syntax_expr: Expr(12), - synthesized: false, - }, + synthesized from Expr(12), ), [ NamedExpr( @@ -174,10 +120,7 @@ ), Expr(13)( "a", - ExprOrigin { - syntax_expr: Expr(13), - synthesized: false, - }, + from Expr(13), ), ), NamedExpr( @@ -186,24 +129,15 @@ ), Expr(14)( "b", - ExprOrigin { - syntax_expr: Expr(14), - synthesized: false, - }, + from Expr(14), ), ), ], ), - ExprOrigin { - syntax_expr: Expr(15), - synthesized: false, - }, + from Expr(15), ), ], ), - ExprOrigin { - syntax_expr: Expr(16), - synthesized: false, - }, + from Expr(16), ), ] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field.dada b/dada_tests/validate/op-eq/lhs_field.dada new file mode 100644 index 00000000..8e951777 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field.dada @@ -0,0 +1,7 @@ +class Point(our x, our y) + +async fn main() { + my p = Point(22, 44) + p.x += 1 + print(p).await #! OUTPUT Point\(23, 44\) +} diff --git a/dada_tests/validate/op-eq/lhs_field/bir.ref b/dada_tests/validate/op-eq/lhs_field/bir.ref new file mode 100644 index 00000000..34e700f0 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field/bir.ref @@ -0,0 +1,210 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{2}, + p{0}.lease, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + temp{2}.x.give, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 1, + ), + Expr(7), + ), + ( + AssignExpr( + temp{3}, + temp{10} + temp{11}, + ), + Expr(8), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + AssignPlace( + temp{2}.x, + temp{3}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(8), + ), + ( + Clear( + temp{9}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{13}, + Print.reserve, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + p{0}.reserve, + ), + Expr(10), + ), + ], + Assign( + temp{12}, + Call( + temp{13}, + [ + temp{14}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ], + Assign( + temp{4}, + Await( + temp{12}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(11), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field/lsp.ref b/dada_tests/validate/op-eq/lhs_field/lsp.ref new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field/lsp.ref @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field/ref.ref b/dada_tests/validate/op-eq/lhs_field/ref.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_field/stdout.ref b/dada_tests/validate/op-eq/lhs_field/stdout.ref new file mode 100644 index 00000000..e56b542f --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field/stdout.ref @@ -0,0 +1 @@ +my Point(23, 44) diff --git a/dada_tests/validate/op-eq/lhs_field/syntax.ref b/dada_tests/validate/op-eq/lhs_field/syntax.ref new file mode 100644 index 00000000..0b790583 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field/syntax.ref @@ -0,0 +1,95 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_field.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_field.dada:3:18:7:1), + ), + data: syntax::Tree { + root_expr: Expr(13)( + Seq( + [ + Expr(4)( + Var( + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( + Call( + Expr(0)( + Id( + "Point", + ), + ), + [ + None( + Expr(1)( + Integer( + "22", + ), + ), + ), + None( + Expr(2)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(8)( + OpEq( + Expr(6)( + Dot( + Expr(5)( + Id( + "p", + ), + ), + "x", + ), + ), + PlusEqual, + Expr(7)( + Integer( + "1", + ), + ), + ), + ), + Expr(12)( + Await( + Expr(11)( + Call( + Expr(9)( + Id( + "print", + ), + ), + [ + None( + Expr(10)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field/validated.ref b/dada_tests/validate/op-eq/lhs_field/validated.ref new file mode 100644 index 00000000..d43772fc --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field/validated.ref @@ -0,0 +1,183 @@ +[ + Expr(19)( + Seq( + [ + Expr(6)( + Seq( + [ + Expr(4)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), + ), + Expr(3)( + Call( + Expr(0)( + Reserve( + Place(0)( + Class( + Id { + value: 1, + }, + ), + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + 22, + from Expr(1), + ), + ), + NamedExpr( + None, + Expr(2)( + 44, + from Expr(2), + ), + ), + ], + ), + from Expr(3), + ), + ), + synthesized from Expr(3), + ), + Expr(5)( + AssignFromPlace( + TargetPlace(0)( + p{0}, + synthesized from Expr(4), + ), + Place(1)( + temp{1}, + synthesized from Expr(3), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(14)( + Seq( + [ + Expr(8)( + Assign( + TargetPlace(2)( + temp{2}, + synthesized from Expr(5), + ), + Expr(7)( + Lease( + Place(2)( + p{0}, + from Expr(5), + ), + ), + synthesized from Expr(5), + ), + ), + synthesized from Expr(5), + ), + Expr(12)( + Assign( + TargetPlace(4)( + temp{3}, + synthesized from Expr(8), + ), + Expr(11)( + Op( + Expr(9)( + Give( + Place(4)( + Dot( + Place(3)( + temp{2}, + synthesized from Expr(5), + ), + "x", + ), + synthesized from Expr(6), + ), + ), + synthesized from Expr(6), + ), + Plus, + Expr(10)( + 1, + from Expr(7), + ), + ), + synthesized from Expr(8), + ), + ), + synthesized from Expr(8), + ), + Expr(13)( + AssignFromPlace( + TargetPlace(3)( + Dot( + Place(3)( + temp{2}, + synthesized from Expr(5), + ), + "x", + ), + from Expr(6), + ), + Place(5)( + temp{3}, + synthesized from Expr(8), + ), + ), + from Expr(8), + ), + ], + ), + synthesized from Expr(8), + ), + Expr(18)( + Await( + Expr(17)( + Call( + Expr(15)( + Reserve( + Place(6)( + Print, + from Expr(9), + ), + ), + synthesized from Expr(9), + ), + [ + NamedExpr( + None, + Expr(16)( + Reserve( + Place(7)( + p{0}, + from Expr(10), + ), + ), + synthesized from Expr(10), + ), + ), + ], + ), + from Expr(11), + ), + ), + from Expr(12), + ), + ], + ), + from Expr(13), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call.dada b/dada_tests/validate/op-eq/lhs_field_of_func_call.dada new file mode 100644 index 00000000..36e2f76b --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call.dada @@ -0,0 +1,12 @@ +class Point(our x, our y) + +async fn main() { + my p = Point(22, 44) + test(p).await.x += 1 + print(p).await #! OUTPUT Point\(23, 44\) +} + +async fn test(leased p) { + print("Hi").await #! OUTPUT Hi + p +} \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/bir.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/bir.ref new file mode 100644 index 00000000..bc9ada5e --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call/bir.ref @@ -0,0 +1,346 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{11}, + test.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{12}, + p{0}.reserve, + ), + Expr(6), + ), + ], + Assign( + temp{10}, + Call( + temp{11}, + [ + temp{12}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(6), + ), + ( + Clear( + temp{11}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{10}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{13}, + temp{2}.x.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + 1, + ), + Expr(10), + ), + ( + AssignExpr( + temp{3}, + temp{13} + temp{14}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{2}.x, + temp{3}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{9}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + Print.reserve, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + p{0}.reserve, + ), + Expr(13), + ), + ], + Assign( + temp{15}, + Call( + temp{16}, + [ + temp{17}, + ], + [ + None, + ], + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{17}, + ), + Expr(13), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ], + Assign( + temp{4}, + Await( + temp{15}, + ), + BasicBlock(5), + ), + ), + BasicBlock(5): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(14), + ), + ], + Return( + temp{4}, + ), + ), + }, + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Print.reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + "Hi", + ), + Expr(1), + ), + ], + Assign( + temp{3}, + Call( + temp{4}, + [ + temp{5}, + ], + [ + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ], + Assign( + temp{2}, + Await( + temp{3}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{3}, + ), + Expr(2), + ), + ( + Clear( + temp{2}, + ), + Expr(3), + ), + ( + AssignExpr( + temp{1}, + p{0}.give, + ), + Expr(4), + ), + ], + Return( + temp{1}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/lsp.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/lsp.ref new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call/lsp.ref @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/ref.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/ref.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/stdout.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/stdout.ref new file mode 100644 index 00000000..b20f3eae --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call/stdout.ref @@ -0,0 +1,2 @@ +Hi +my Point(23, 44) diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/syntax.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/syntax.ref new file mode 100644 index 00000000..1dec3032 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call/syntax.ref @@ -0,0 +1,155 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_field_of_func_call.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_field_of_func_call.dada:3:18:7:1), + ), + data: syntax::Tree { + root_expr: Expr(16)( + Seq( + [ + Expr(4)( + Var( + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( + Call( + Expr(0)( + Id( + "Point", + ), + ), + [ + None( + Expr(1)( + Integer( + "22", + ), + ), + ), + None( + Expr(2)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(11)( + OpEq( + Expr(9)( + Dot( + Expr(8)( + Await( + Expr(7)( + Call( + Expr(5)( + Id( + "test", + ), + ), + [ + None( + Expr(6)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + "x", + ), + ), + PlusEqual, + Expr(10)( + Integer( + "1", + ), + ), + ), + ), + Expr(15)( + Await( + Expr(14)( + Call( + Expr(12)( + Id( + "print", + ), + ), + [ + None( + Expr(13)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_field_of_func_call.dada:9:15:9:23), + ), + Tokens(dada_tests/validate/op-eq/lhs_field_of_func_call.dada:9:26:12:1), + ), + data: syntax::Tree { + root_expr: Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Id( + "print", + ), + ), + [ + None( + Expr(1)( + String( + "Hi", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(4)( + Id( + "p", + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_field_of_func_call/validated.ref b/dada_tests/validate/op-eq/lhs_field_of_func_call/validated.ref new file mode 100644 index 00000000..c3b61bb0 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_field_of_func_call/validated.ref @@ -0,0 +1,251 @@ +[ + Expr(22)( + Seq( + [ + Expr(6)( + Seq( + [ + Expr(4)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), + ), + Expr(3)( + Call( + Expr(0)( + Reserve( + Place(0)( + Class( + Id { + value: 1, + }, + ), + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + 22, + from Expr(1), + ), + ), + NamedExpr( + None, + Expr(2)( + 44, + from Expr(2), + ), + ), + ], + ), + from Expr(3), + ), + ), + synthesized from Expr(3), + ), + Expr(5)( + AssignFromPlace( + TargetPlace(0)( + p{0}, + synthesized from Expr(4), + ), + Place(1)( + temp{1}, + synthesized from Expr(3), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(17)( + Seq( + [ + Expr(11)( + Assign( + TargetPlace(2)( + temp{2}, + synthesized from Expr(8), + ), + Expr(10)( + Await( + Expr(9)( + Call( + Expr(7)( + Reserve( + Place(2)( + test, + from Expr(5), + ), + ), + synthesized from Expr(5), + ), + [ + NamedExpr( + None, + Expr(8)( + Reserve( + Place(3)( + p{0}, + from Expr(6), + ), + ), + synthesized from Expr(6), + ), + ), + ], + ), + from Expr(7), + ), + ), + from Expr(8), + ), + ), + synthesized from Expr(8), + ), + Expr(15)( + Assign( + TargetPlace(4)( + temp{3}, + synthesized from Expr(11), + ), + Expr(14)( + Op( + Expr(12)( + Give( + Place(5)( + Dot( + Place(4)( + temp{2}, + synthesized from Expr(8), + ), + "x", + ), + synthesized from Expr(9), + ), + ), + synthesized from Expr(9), + ), + Plus, + Expr(13)( + 1, + from Expr(10), + ), + ), + synthesized from Expr(11), + ), + ), + synthesized from Expr(11), + ), + Expr(16)( + AssignFromPlace( + TargetPlace(3)( + Dot( + Place(4)( + temp{2}, + synthesized from Expr(8), + ), + "x", + ), + from Expr(9), + ), + Place(6)( + temp{3}, + synthesized from Expr(11), + ), + ), + from Expr(11), + ), + ], + ), + synthesized from Expr(11), + ), + Expr(21)( + Await( + Expr(20)( + Call( + Expr(18)( + Reserve( + Place(7)( + Print, + from Expr(12), + ), + ), + synthesized from Expr(12), + ), + [ + NamedExpr( + None, + Expr(19)( + Reserve( + Place(8)( + p{0}, + from Expr(13), + ), + ), + synthesized from Expr(13), + ), + ), + ], + ), + from Expr(14), + ), + ), + from Expr(15), + ), + ], + ), + from Expr(16), + ), + Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Reserve( + Place(0)( + Print, + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + "Hi", + from Expr(1), + ), + ), + ], + ), + from Expr(2), + ), + ), + from Expr(3), + ), + Expr(4)( + Give( + Place(1)( + p{0}, + from Expr(4), + ), + ), + synthesized from Expr(4), + ), + ], + ), + from Expr(5), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_func_call.dada b/dada_tests/validate/op-eq/lhs_func_call.dada new file mode 100644 index 00000000..ffe132ff --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call.dada @@ -0,0 +1,14 @@ +class Point(our x, our y) + +async fn main() { + my p = Point(22, 44) + test(p) += 1 + #! ERROR you can only assign to local variables and fields, not arbitrary expressions + #! RUN ERROR compilation error encountered + print(p).await +} + +async fn test(leased p) { + print("Hi").await + p +} \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_func_call/bir.ref b/dada_tests/validate/op-eq/lhs_func_call/bir.ref new file mode 100644 index 00000000..a9fc005b --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call/bir.ref @@ -0,0 +1,179 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{4}, + [ + temp{5}, + temp{6}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{6}, + ), + Expr(2), + ), + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{3}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{3}, + ), + Expr(4), + ), + ], + Error, + ), + BasicBlock(2): BasicBlockData( + [], + Panic, + ), + BasicBlock(3): BasicBlockData( + [], + Panic, + ), + }, + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Print.reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + "Hi", + ), + Expr(1), + ), + ], + Assign( + temp{3}, + Call( + temp{4}, + [ + temp{5}, + ], + [ + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ], + Assign( + temp{2}, + Await( + temp{3}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{3}, + ), + Expr(2), + ), + ( + Clear( + temp{2}, + ), + Expr(3), + ), + ( + AssignExpr( + temp{1}, + p{0}.give, + ), + Expr(4), + ), + ], + Return( + temp{1}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_func_call/lsp.ref b/dada_tests/validate/op-eq/lhs_func_call/lsp.ref new file mode 100644 index 00000000..1d2c2347 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call/lsp.ref @@ -0,0 +1,51 @@ +[ + Diagnostic { + range: Range { + start: Position { + line: 5, + character: 5, + }, + end: Position { + line: 5, + character: 12, + }, + }, + severity: Some( + Error, + ), + code: None, + source: None, + message: "you can only assign to local variables and fields, not arbitrary expressions", + related_information: Some( + [ + DiagnosticRelatedInformation { + location: Location { + uri: Url { + scheme: "file", + cannot_be_a_base: false, + username: "", + password: None, + host: None, + port: None, + path: "(local-file-prefix)/dada_tests/validate/op-eq/lhs_func_call.dada", + query: None, + fragment: None, + }, + range: Range { + start: Position { + line: 5, + character: 5, + }, + end: Position { + line: 5, + character: 12, + }, + }, + }, + message: "here", + }, + ], + ), + tags: None, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_func_call/ref.ref b/dada_tests/validate/op-eq/lhs_func_call/ref.ref new file mode 100644 index 00000000..f09a07d7 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call/ref.ref @@ -0,0 +1,7 @@ +Error: you can only assign to local variables and fields, not arbitrary expressions + ╭─[dada_tests/validate/op-eq/lhs_func_call.dada:5:5] + │ + 5 │     test(p) += 1 +  · ───┬─── +  · ╰───── here +───╯ diff --git a/dada_tests/validate/op-eq/lhs_func_call/stdout.ref b/dada_tests/validate/op-eq/lhs_func_call/stdout.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_func_call/syntax.ref b/dada_tests/validate/op-eq/lhs_func_call/syntax.ref new file mode 100644 index 00000000..57a7fb16 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call/syntax.ref @@ -0,0 +1,146 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_func_call.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_func_call.dada:3:18:9:1), + ), + data: syntax::Tree { + root_expr: Expr(14)( + Seq( + [ + Expr(4)( + Var( + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( + Call( + Expr(0)( + Id( + "Point", + ), + ), + [ + None( + Expr(1)( + Integer( + "22", + ), + ), + ), + None( + Expr(2)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(9)( + OpEq( + Expr(7)( + Call( + Expr(5)( + Id( + "test", + ), + ), + [ + None( + Expr(6)( + Id( + "p", + ), + ), + ), + ], + ), + ), + PlusEqual, + Expr(8)( + Integer( + "1", + ), + ), + ), + ), + Expr(13)( + Await( + Expr(12)( + Call( + Expr(10)( + Id( + "print", + ), + ), + [ + None( + Expr(11)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_func_call.dada:11:15:11:23), + ), + Tokens(dada_tests/validate/op-eq/lhs_func_call.dada:11:26:14:1), + ), + data: syntax::Tree { + root_expr: Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Id( + "print", + ), + ), + [ + None( + Expr(1)( + String( + "Hi", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(4)( + Id( + "p", + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_func_call/validated.ref b/dada_tests/validate/op-eq/lhs_func_call/validated.ref new file mode 100644 index 00000000..fb0fd6e3 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_func_call/validated.ref @@ -0,0 +1,153 @@ +[ + Expr(15)( + Seq( + [ + Expr(6)( + Seq( + [ + Expr(4)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), + ), + Expr(3)( + Call( + Expr(0)( + Reserve( + Place(0)( + Class( + Id { + value: 1, + }, + ), + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + 22, + from Expr(1), + ), + ), + NamedExpr( + None, + Expr(2)( + 44, + from Expr(2), + ), + ), + ], + ), + from Expr(3), + ), + ), + synthesized from Expr(3), + ), + Expr(5)( + AssignFromPlace( + TargetPlace(0)( + p{0}, + synthesized from Expr(4), + ), + Place(1)( + temp{1}, + synthesized from Expr(3), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(10)( + Error, + from Expr(9), + ), + Expr(14)( + Await( + Expr(13)( + Call( + Expr(11)( + Reserve( + Place(4)( + Print, + from Expr(10), + ), + ), + synthesized from Expr(10), + ), + [ + NamedExpr( + None, + Expr(12)( + Reserve( + Place(5)( + p{0}, + from Expr(11), + ), + ), + synthesized from Expr(11), + ), + ), + ], + ), + from Expr(12), + ), + ), + from Expr(13), + ), + ], + ), + from Expr(14), + ), + Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Reserve( + Place(0)( + Print, + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + "Hi", + from Expr(1), + ), + ), + ], + ), + from Expr(2), + ), + ), + from Expr(3), + ), + Expr(4)( + Give( + Place(1)( + p{0}, + from Expr(4), + ), + ), + synthesized from Expr(4), + ), + ], + ), + from Expr(5), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_local_variable.dada b/dada_tests/validate/op-eq/lhs_local_variable.dada new file mode 100644 index 00000000..556ad57c --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable.dada @@ -0,0 +1,8 @@ +class Point(our x, our y) + +async fn main() { + my x = 22 + x += 1 + my p = Point(x, 44) + print(p).await #! OUTPUT Point\(23, 44\) +} diff --git a/dada_tests/validate/op-eq/lhs_local_variable/bir.ref b/dada_tests/validate/op-eq/lhs_local_variable/bir.ref new file mode 100644 index 00000000..c0428fda --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable/bir.ref @@ -0,0 +1,230 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{1}, + 22, + ), + Expr(0), + ), + ( + AssignPlace( + x{0}, + temp{1}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{6}, + (), + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + x{0}.give, + ), + Expr(2), + ), + ( + AssignExpr( + temp{9}, + 1, + ), + Expr(3), + ), + ( + AssignExpr( + temp{2}, + temp{8} + temp{9}, + ), + Expr(4), + ), + ( + Clear( + temp{9}, + ), + Expr(3), + ), + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + AssignPlace( + x{0}, + temp{2}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{7}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{7}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{11}, + Class(Id { value: 1 }).reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{12}, + x{0}.reserve, + ), + Expr(6), + ), + ( + AssignExpr( + temp{13}, + 44, + ), + Expr(7), + ), + ], + Assign( + temp{4}, + Call( + temp{11}, + [ + temp{12}, + temp{13}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{13}, + ), + Expr(7), + ), + ( + Clear( + temp{12}, + ), + Expr(6), + ), + ( + Clear( + temp{11}, + ), + Expr(5), + ), + ( + AssignPlace( + p{3}, + temp{4}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{10}, + (), + ), + Expr(9), + ), + ( + Clear( + temp{10}, + ), + Expr(9), + ), + ( + AssignExpr( + temp{15}, + Print.reserve, + ), + Expr(10), + ), + ( + AssignExpr( + temp{16}, + p{3}.reserve, + ), + Expr(11), + ), + ], + Assign( + temp{14}, + Call( + temp{15}, + [ + temp{16}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{16}, + ), + Expr(11), + ), + ( + Clear( + temp{15}, + ), + Expr(10), + ), + ], + Assign( + temp{5}, + Await( + temp{14}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{14}, + ), + Expr(12), + ), + ], + Return( + temp{5}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_local_variable/lsp.ref b/dada_tests/validate/op-eq/lhs_local_variable/lsp.ref new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable/lsp.ref @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_local_variable/ref.ref b/dada_tests/validate/op-eq/lhs_local_variable/ref.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_local_variable/stdout.ref b/dada_tests/validate/op-eq/lhs_local_variable/stdout.ref new file mode 100644 index 00000000..e56b542f --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable/stdout.ref @@ -0,0 +1 @@ +my Point(23, 44) diff --git a/dada_tests/validate/op-eq/lhs_local_variable/syntax.ref b/dada_tests/validate/op-eq/lhs_local_variable/syntax.ref new file mode 100644 index 00000000..00d2c689 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable/syntax.ref @@ -0,0 +1,105 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_local_variable.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_local_variable.dada:3:18:8:1), + ), + data: syntax::Tree { + root_expr: Expr(14)( + Seq( + [ + Expr(1)( + Var( + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "x", + ty: None, + }, + Expr(0)( + Integer( + "22", + ), + ), + ), + ), + Expr(4)( + OpEq( + Expr(2)( + Id( + "x", + ), + ), + PlusEqual, + Expr(3)( + Integer( + "1", + ), + ), + ), + ), + Expr(9)( + Var( + LocalVariableDeclData { + specifier: My, + atomic: No, + name: "p", + ty: None, + }, + Expr(8)( + Call( + Expr(5)( + Id( + "Point", + ), + ), + [ + None( + Expr(6)( + Id( + "x", + ), + ), + ), + None( + Expr(7)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(13)( + Await( + Expr(12)( + Call( + Expr(10)( + Id( + "print", + ), + ), + [ + None( + Expr(11)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_local_variable/validated.ref b/dada_tests/validate/op-eq/lhs_local_variable/validated.ref new file mode 100644 index 00000000..577d2d7b --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_local_variable/validated.ref @@ -0,0 +1,191 @@ +[ + Expr(21)( + Seq( + [ + Expr(3)( + Seq( + [ + Expr(1)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(0), + ), + Expr(0)( + 22, + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + Expr(2)( + AssignFromPlace( + TargetPlace(0)( + x{0}, + synthesized from Expr(1), + ), + Place(0)( + temp{1}, + synthesized from Expr(0), + ), + ), + from Expr(1), + ), + ], + ), + synthesized from Expr(1), + ), + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + x{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + Plus, + Expr(5)( + 1, + from Expr(3), + ), + ), + synthesized from Expr(4), + ), + ), + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + x{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(16)( + Seq( + [ + Expr(14)( + Assign( + TargetPlace(5)( + temp{4}, + synthesized from Expr(8), + ), + Expr(13)( + Call( + Expr(10)( + Reserve( + Place(3)( + Class( + Id { + value: 1, + }, + ), + from Expr(5), + ), + ), + synthesized from Expr(5), + ), + [ + NamedExpr( + None, + Expr(11)( + Reserve( + Place(4)( + x{0}, + from Expr(6), + ), + ), + synthesized from Expr(6), + ), + ), + NamedExpr( + None, + Expr(12)( + 44, + from Expr(7), + ), + ), + ], + ), + from Expr(8), + ), + ), + synthesized from Expr(8), + ), + Expr(15)( + AssignFromPlace( + TargetPlace(4)( + p{3}, + synthesized from Expr(9), + ), + Place(5)( + temp{4}, + synthesized from Expr(8), + ), + ), + from Expr(9), + ), + ], + ), + synthesized from Expr(9), + ), + Expr(20)( + Await( + Expr(19)( + Call( + Expr(17)( + Reserve( + Place(6)( + Print, + from Expr(10), + ), + ), + synthesized from Expr(10), + ), + [ + NamedExpr( + None, + Expr(18)( + Reserve( + Place(7)( + p{3}, + from Expr(11), + ), + ), + synthesized from Expr(11), + ), + ), + ], + ), + from Expr(12), + ), + ), + from Expr(13), + ), + ], + ), + from Expr(14), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field.dada b/dada_tests/validate/op-eq/lhs_shared_field.dada new file mode 100644 index 00000000..8f05e94f --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field.dada @@ -0,0 +1,7 @@ +class Point(our x, our y) + +async fn main() { + our p = Point(22, 44) + p.x += 1 #! RUN ERROR cannot write to shared fields + print(p).await +} diff --git a/dada_tests/validate/op-eq/lhs_shared_field/bir.ref b/dada_tests/validate/op-eq/lhs_shared_field/bir.ref new file mode 100644 index 00000000..34e700f0 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field/bir.ref @@ -0,0 +1,210 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{2}, + p{0}.lease, + ), + Expr(5), + ), + ( + AssignExpr( + temp{10}, + temp{2}.x.give, + ), + Expr(6), + ), + ( + AssignExpr( + temp{11}, + 1, + ), + Expr(7), + ), + ( + AssignExpr( + temp{3}, + temp{10} + temp{11}, + ), + Expr(8), + ), + ( + Clear( + temp{11}, + ), + Expr(7), + ), + ( + Clear( + temp{10}, + ), + Expr(6), + ), + ( + AssignPlace( + temp{2}.x, + temp{3}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(8), + ), + ( + Clear( + temp{9}, + ), + Expr(8), + ), + ( + AssignExpr( + temp{13}, + Print.reserve, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + p{0}.reserve, + ), + Expr(10), + ), + ], + Assign( + temp{12}, + Call( + temp{13}, + [ + temp{14}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ], + Assign( + temp{4}, + Await( + temp{12}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(11), + ), + ], + Return( + temp{4}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field/lsp.ref b/dada_tests/validate/op-eq/lhs_shared_field/lsp.ref new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field/lsp.ref @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field/ref.ref b/dada_tests/validate/op-eq/lhs_shared_field/ref.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_shared_field/stdout.ref b/dada_tests/validate/op-eq/lhs_shared_field/stdout.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_shared_field/syntax.ref b/dada_tests/validate/op-eq/lhs_shared_field/syntax.ref new file mode 100644 index 00000000..1c7f8bca --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field/syntax.ref @@ -0,0 +1,95 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_shared_field.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_shared_field.dada:3:18:7:1), + ), + data: syntax::Tree { + root_expr: Expr(13)( + Seq( + [ + Expr(4)( + Var( + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( + Call( + Expr(0)( + Id( + "Point", + ), + ), + [ + None( + Expr(1)( + Integer( + "22", + ), + ), + ), + None( + Expr(2)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(8)( + OpEq( + Expr(6)( + Dot( + Expr(5)( + Id( + "p", + ), + ), + "x", + ), + ), + PlusEqual, + Expr(7)( + Integer( + "1", + ), + ), + ), + ), + Expr(12)( + Await( + Expr(11)( + Call( + Expr(9)( + Id( + "print", + ), + ), + [ + None( + Expr(10)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field/validated.ref b/dada_tests/validate/op-eq/lhs_shared_field/validated.ref new file mode 100644 index 00000000..d43772fc --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field/validated.ref @@ -0,0 +1,183 @@ +[ + Expr(19)( + Seq( + [ + Expr(6)( + Seq( + [ + Expr(4)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), + ), + Expr(3)( + Call( + Expr(0)( + Reserve( + Place(0)( + Class( + Id { + value: 1, + }, + ), + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + 22, + from Expr(1), + ), + ), + NamedExpr( + None, + Expr(2)( + 44, + from Expr(2), + ), + ), + ], + ), + from Expr(3), + ), + ), + synthesized from Expr(3), + ), + Expr(5)( + AssignFromPlace( + TargetPlace(0)( + p{0}, + synthesized from Expr(4), + ), + Place(1)( + temp{1}, + synthesized from Expr(3), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(14)( + Seq( + [ + Expr(8)( + Assign( + TargetPlace(2)( + temp{2}, + synthesized from Expr(5), + ), + Expr(7)( + Lease( + Place(2)( + p{0}, + from Expr(5), + ), + ), + synthesized from Expr(5), + ), + ), + synthesized from Expr(5), + ), + Expr(12)( + Assign( + TargetPlace(4)( + temp{3}, + synthesized from Expr(8), + ), + Expr(11)( + Op( + Expr(9)( + Give( + Place(4)( + Dot( + Place(3)( + temp{2}, + synthesized from Expr(5), + ), + "x", + ), + synthesized from Expr(6), + ), + ), + synthesized from Expr(6), + ), + Plus, + Expr(10)( + 1, + from Expr(7), + ), + ), + synthesized from Expr(8), + ), + ), + synthesized from Expr(8), + ), + Expr(13)( + AssignFromPlace( + TargetPlace(3)( + Dot( + Place(3)( + temp{2}, + synthesized from Expr(5), + ), + "x", + ), + from Expr(6), + ), + Place(5)( + temp{3}, + synthesized from Expr(8), + ), + ), + from Expr(8), + ), + ], + ), + synthesized from Expr(8), + ), + Expr(18)( + Await( + Expr(17)( + Call( + Expr(15)( + Reserve( + Place(6)( + Print, + from Expr(9), + ), + ), + synthesized from Expr(9), + ), + [ + NamedExpr( + None, + Expr(16)( + Reserve( + Place(7)( + p{0}, + from Expr(10), + ), + ), + synthesized from Expr(10), + ), + ), + ], + ), + from Expr(11), + ), + ), + from Expr(12), + ), + ], + ), + from Expr(13), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada new file mode 100644 index 00000000..0b544471 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada @@ -0,0 +1,14 @@ +class Point(our x, our y) + +async fn main() { + our p = Point(22, 44) + # Test that we execute `test(p)` (and hence see its output) + # before we detect the error here + test(p).await.x += 1 #! RUN ERROR cannot write to shared fields + print(p).await +} + +async fn test(our leased p) { + print("Hi").await #! OUTPUT Hi + p +} \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/bir.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/bir.ref new file mode 100644 index 00000000..bc9ada5e --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/bir.ref @@ -0,0 +1,346 @@ +[ + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{6}, + Class(Id { value: 1 }).reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{7}, + 22, + ), + Expr(1), + ), + ( + AssignExpr( + temp{8}, + 44, + ), + Expr(2), + ), + ], + Assign( + temp{1}, + Call( + temp{6}, + [ + temp{7}, + temp{8}, + ], + [ + None, + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{8}, + ), + Expr(2), + ), + ( + Clear( + temp{7}, + ), + Expr(1), + ), + ( + Clear( + temp{6}, + ), + Expr(0), + ), + ( + AssignPlace( + p{0}, + temp{1}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{5}, + (), + ), + Expr(4), + ), + ( + Clear( + temp{5}, + ), + Expr(4), + ), + ( + AssignExpr( + temp{11}, + test.reserve, + ), + Expr(5), + ), + ( + AssignExpr( + temp{12}, + p{0}.reserve, + ), + Expr(6), + ), + ], + Assign( + temp{10}, + Call( + temp{11}, + [ + temp{12}, + ], + [ + None, + ], + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{12}, + ), + Expr(6), + ), + ( + Clear( + temp{11}, + ), + Expr(5), + ), + ], + Assign( + temp{2}, + Await( + temp{10}, + ), + BasicBlock(3), + ), + ), + BasicBlock(3): BasicBlockData( + [ + ( + Clear( + temp{10}, + ), + Expr(7), + ), + ( + AssignExpr( + temp{13}, + temp{2}.x.give, + ), + Expr(9), + ), + ( + AssignExpr( + temp{14}, + 1, + ), + Expr(10), + ), + ( + AssignExpr( + temp{3}, + temp{13} + temp{14}, + ), + Expr(11), + ), + ( + Clear( + temp{14}, + ), + Expr(10), + ), + ( + Clear( + temp{13}, + ), + Expr(9), + ), + ( + AssignPlace( + temp{2}.x, + temp{3}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{9}, + (), + ), + Expr(11), + ), + ( + Clear( + temp{9}, + ), + Expr(11), + ), + ( + AssignExpr( + temp{16}, + Print.reserve, + ), + Expr(12), + ), + ( + AssignExpr( + temp{17}, + p{0}.reserve, + ), + Expr(13), + ), + ], + Assign( + temp{15}, + Call( + temp{16}, + [ + temp{17}, + ], + [ + None, + ], + ), + BasicBlock(4), + ), + ), + BasicBlock(4): BasicBlockData( + [ + ( + Clear( + temp{17}, + ), + Expr(13), + ), + ( + Clear( + temp{16}, + ), + Expr(12), + ), + ], + Assign( + temp{4}, + Await( + temp{15}, + ), + BasicBlock(5), + ), + ), + BasicBlock(5): BasicBlockData( + [ + ( + Clear( + temp{15}, + ), + Expr(14), + ), + ], + Return( + temp{4}, + ), + ), + }, + bir::Bir { + start_basic_block: BasicBlock(0), + BasicBlock(0): BasicBlockData( + [ + ( + AssignExpr( + temp{4}, + Print.reserve, + ), + Expr(0), + ), + ( + AssignExpr( + temp{5}, + "Hi", + ), + Expr(1), + ), + ], + Assign( + temp{3}, + Call( + temp{4}, + [ + temp{5}, + ], + [ + None, + ], + ), + BasicBlock(1), + ), + ), + BasicBlock(1): BasicBlockData( + [ + ( + Clear( + temp{5}, + ), + Expr(1), + ), + ( + Clear( + temp{4}, + ), + Expr(0), + ), + ], + Assign( + temp{2}, + Await( + temp{3}, + ), + BasicBlock(2), + ), + ), + BasicBlock(2): BasicBlockData( + [ + ( + Clear( + temp{3}, + ), + Expr(2), + ), + ( + Clear( + temp{2}, + ), + Expr(3), + ), + ( + AssignExpr( + temp{1}, + p{0}.give, + ), + Expr(4), + ), + ], + Return( + temp{1}, + ), + ), + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/lsp.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/lsp.ref new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/lsp.ref @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/ref.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/ref.ref new file mode 100644 index 00000000..e69de29b diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/stdout.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/stdout.ref new file mode 100644 index 00000000..b14df644 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/stdout.ref @@ -0,0 +1 @@ +Hi diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/syntax.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/syntax.ref new file mode 100644 index 00000000..9ab3b3c8 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/syntax.ref @@ -0,0 +1,155 @@ +[ + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada:3:15:3:15), + ), + Tokens(dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada:3:18:9:1), + ), + data: syntax::Tree { + root_expr: Expr(16)( + Seq( + [ + Expr(4)( + Var( + LocalVariableDeclData { + specifier: Our, + atomic: No, + name: "p", + ty: None, + }, + Expr(3)( + Call( + Expr(0)( + Id( + "Point", + ), + ), + [ + None( + Expr(1)( + Integer( + "22", + ), + ), + ), + None( + Expr(2)( + Integer( + "44", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(11)( + OpEq( + Expr(9)( + Dot( + Expr(8)( + Await( + Expr(7)( + Call( + Expr(5)( + Id( + "test", + ), + ), + [ + None( + Expr(6)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + "x", + ), + ), + PlusEqual, + Expr(10)( + Integer( + "1", + ), + ), + ), + ), + Expr(15)( + Await( + Expr(14)( + Call( + Expr(12)( + Id( + "print", + ), + ), + [ + None( + Expr(13)( + Id( + "p", + ), + ), + ), + ], + ), + ), + ), + ), + ], + ), + ), + }, + }, + syntax::Tree { + origin: Code( + Some( + Tokens(dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada:11:15:11:27), + ), + Tokens(dada_tests/validate/op-eq/lhs_shared_field_of_func_call.dada:11:30:14:1), + ), + data: syntax::Tree { + root_expr: Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Id( + "print", + ), + ), + [ + None( + Expr(1)( + String( + "Hi", + ), + ), + ), + ], + ), + ), + ), + ), + Expr(4)( + Id( + "p", + ), + ), + ], + ), + ), + }, + }, +] \ No newline at end of file diff --git a/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/validated.ref b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/validated.ref new file mode 100644 index 00000000..c3b61bb0 --- /dev/null +++ b/dada_tests/validate/op-eq/lhs_shared_field_of_func_call/validated.ref @@ -0,0 +1,251 @@ +[ + Expr(22)( + Seq( + [ + Expr(6)( + Seq( + [ + Expr(4)( + Assign( + TargetPlace(1)( + temp{1}, + synthesized from Expr(3), + ), + Expr(3)( + Call( + Expr(0)( + Reserve( + Place(0)( + Class( + Id { + value: 1, + }, + ), + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + 22, + from Expr(1), + ), + ), + NamedExpr( + None, + Expr(2)( + 44, + from Expr(2), + ), + ), + ], + ), + from Expr(3), + ), + ), + synthesized from Expr(3), + ), + Expr(5)( + AssignFromPlace( + TargetPlace(0)( + p{0}, + synthesized from Expr(4), + ), + Place(1)( + temp{1}, + synthesized from Expr(3), + ), + ), + from Expr(4), + ), + ], + ), + synthesized from Expr(4), + ), + Expr(17)( + Seq( + [ + Expr(11)( + Assign( + TargetPlace(2)( + temp{2}, + synthesized from Expr(8), + ), + Expr(10)( + Await( + Expr(9)( + Call( + Expr(7)( + Reserve( + Place(2)( + test, + from Expr(5), + ), + ), + synthesized from Expr(5), + ), + [ + NamedExpr( + None, + Expr(8)( + Reserve( + Place(3)( + p{0}, + from Expr(6), + ), + ), + synthesized from Expr(6), + ), + ), + ], + ), + from Expr(7), + ), + ), + from Expr(8), + ), + ), + synthesized from Expr(8), + ), + Expr(15)( + Assign( + TargetPlace(4)( + temp{3}, + synthesized from Expr(11), + ), + Expr(14)( + Op( + Expr(12)( + Give( + Place(5)( + Dot( + Place(4)( + temp{2}, + synthesized from Expr(8), + ), + "x", + ), + synthesized from Expr(9), + ), + ), + synthesized from Expr(9), + ), + Plus, + Expr(13)( + 1, + from Expr(10), + ), + ), + synthesized from Expr(11), + ), + ), + synthesized from Expr(11), + ), + Expr(16)( + AssignFromPlace( + TargetPlace(3)( + Dot( + Place(4)( + temp{2}, + synthesized from Expr(8), + ), + "x", + ), + from Expr(9), + ), + Place(6)( + temp{3}, + synthesized from Expr(11), + ), + ), + from Expr(11), + ), + ], + ), + synthesized from Expr(11), + ), + Expr(21)( + Await( + Expr(20)( + Call( + Expr(18)( + Reserve( + Place(7)( + Print, + from Expr(12), + ), + ), + synthesized from Expr(12), + ), + [ + NamedExpr( + None, + Expr(19)( + Reserve( + Place(8)( + p{0}, + from Expr(13), + ), + ), + synthesized from Expr(13), + ), + ), + ], + ), + from Expr(14), + ), + ), + from Expr(15), + ), + ], + ), + from Expr(16), + ), + Expr(5)( + Seq( + [ + Expr(3)( + Await( + Expr(2)( + Call( + Expr(0)( + Reserve( + Place(0)( + Print, + from Expr(0), + ), + ), + synthesized from Expr(0), + ), + [ + NamedExpr( + None, + Expr(1)( + "Hi", + from Expr(1), + ), + ), + ], + ), + from Expr(2), + ), + ), + from Expr(3), + ), + Expr(4)( + Give( + Place(1)( + p{0}, + from Expr(4), + ), + ), + synthesized from Expr(4), + ), + ], + ), + from Expr(5), + ), +] \ No newline at end of file diff --git a/dada_tests/validate/unknown_identifier/bir.ref b/dada_tests/validate/unknown_identifier/bir.ref index 91f1f0d1..b3b5888c 100644 --- a/dada_tests/validate/unknown_identifier/bir.ref +++ b/dada_tests/validate/unknown_identifier/bir.ref @@ -19,23 +19,23 @@ ), ( AssignExpr( - temp{3}, + temp{4}, (), ), Expr(1), ), ( Clear( - temp{3}, + temp{4}, ), Expr(1), ), ( AssignExpr( - temp{4}, + temp{5}, blah{0}.give, ), - Expr(4), + Expr(2), ), ], Error, diff --git a/dada_tests/validate/unknown_identifier/syntax.ref b/dada_tests/validate/unknown_identifier/syntax.ref index e9aa8e11..fbd8756e 100644 --- a/dada_tests/validate/unknown_identifier/syntax.ref +++ b/dada_tests/validate/unknown_identifier/syntax.ref @@ -7,37 +7,33 @@ Tokens(dada_tests/validate/unknown_identifier.dada:1:11:5:1), ), data: syntax::Tree { - root_expr: ( - Expr(5), + root_expr: Expr(5)( Seq( [ - ( - Expr(1), + Expr(1)( Var( - ( - "blah", - None, - ), - ( - Expr(0), + LocalVariableDeclData { + specifier: Any, + atomic: No, + name: "blah", + ty: None, + }, + Expr(0)( Integer( "3", ), ), ), ), - ( - Expr(4), + Expr(4)( OpEq( - ( - Expr(2), + Expr(2)( Id( "blah", ), ), PlusEqual, - ( - Expr(3), + Expr(3)( Id( "baz", ), diff --git a/dada_tests/validate/unknown_identifier/validated.ref b/dada_tests/validate/unknown_identifier/validated.ref index c297e2ec..3f747594 100644 --- a/dada_tests/validate/unknown_identifier/validated.ref +++ b/dada_tests/validate/unknown_identifier/validated.ref @@ -1,5 +1,5 @@ [ - Expr(8)( + Expr(10)( Seq( [ Expr(3)( @@ -9,104 +9,82 @@ Assign( TargetPlace(1)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(0)( 3, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: false, - }, + from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), Expr(2)( AssignFromPlace( TargetPlace(0)( blah{0}, - ExprOrigin { - syntax_expr: Expr(1), - synthesized: true, - }, + synthesized from Expr(1), ), Place(0)( temp{1}, - ExprOrigin { - syntax_expr: Expr(0), - synthesized: true, - }, + synthesized from Expr(0), ), ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + from Expr(1), ), ], ), - ExprOrigin { - syntax_expr: Expr(1), - synthesized: false, - }, + synthesized from Expr(1), ), - Expr(7)( - Assign( - TargetPlace(2)( - blah{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: true, - }, - ), - Expr(6)( - Op( - Expr(4)( - Give( - Place(1)( - blah{0}, - ExprOrigin { - syntax_expr: Expr(2), - synthesized: false, - }, + Expr(9)( + Seq( + [ + Expr(7)( + Assign( + TargetPlace(3)( + temp{2}, + synthesized from Expr(4), + ), + Expr(6)( + Op( + Expr(4)( + Give( + Place(1)( + blah{0}, + synthesized from Expr(2), + ), + ), + synthesized from Expr(2), + ), + Plus, + Expr(5)( + Error, + synthesized from Expr(3), + ), ), + synthesized from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, ), - Plus, - Expr(5)( - Error, - ExprOrigin { - syntax_expr: Expr(3), - synthesized: false, - }, + synthesized from Expr(4), + ), + Expr(8)( + AssignFromPlace( + TargetPlace(2)( + blah{0}, + from Expr(2), + ), + Place(2)( + temp{2}, + synthesized from Expr(4), + ), ), + from Expr(4), ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, - ), + ], ), - ExprOrigin { - syntax_expr: Expr(4), - synthesized: false, - }, + synthesized from Expr(4), ), ], ), - ExprOrigin { - syntax_expr: Expr(5), - synthesized: false, - }, + from Expr(5), ), ] \ No newline at end of file