diff --git a/docs/status/golden/loop_nested_if.mir.txt b/docs/status/golden/loop_nested_if.mir.txt new file mode 100644 index 00000000..b82ec87d --- /dev/null +++ b/docs/status/golden/loop_nested_if.mir.txt @@ -0,0 +1,68 @@ +🔌 v2 plugin system initialized from nyash.toml +✅ v2 plugin system fully configured +🚀 Nyash MIR Compiler - Processing file: local_tests/loop_nested_if_test.nyash 🚀 +🚀 MIR Output for local_tests/loop_nested_if_test.nyash: +; MIR Module: main + +; Module Statistics: +; Functions: 1 +; Globals: 0 +; Total Blocks: 7 +; Total Instructions: 28 +; Pure Functions: 1 + +define void @main() { + ; Function Statistics: + ; Blocks: 7 + ; Instructions: 28 + ; Values: 0 + ; Phi Functions: 2 + ; Pure: yes + +bb0: + 0: safepoint + 1: %1 = const 0 + 2: %2 = new IntegerBox(%1) + 3: call %2.birth(%1) + 4: br label bb1 + ; effects: pure|read|alloc + +bb1: ; preds(bb6) + 0: %3 = phi [%2, bb0], [%13, bb6] + 1: %4 = const 1 + 2: %5 = new IntegerBox(%4) + 3: call %5.birth(%4) + 4: %6 = icmp Lt %3, %5 + 5: br %6, label bb2, label bb3 + ; effects: pure|read|alloc + +bb2: + 0: safepoint + 1: %7 = const true + 2: %8 = new BoolBox(%7) + 3: call %8.birth(%7) + 4: br %8, label bb4, label bb5 + ; effects: pure|read|alloc + +bb3: + 0: %14 = const void + 1: ret %14 + +bb4: + 0: %9 = const 1 + 1: %10 = new IntegerBox(%9) + 2: call %10.birth(%9) + 3: br label bb6 + ; effects: pure|read|alloc + +bb5: + 0: %11 = const 2 + 1: %12 = new IntegerBox(%11) + 2: call %12.birth(%11) + 3: br label bb6 + ; effects: pure|read|alloc + +bb6: + 0: %13 = phi [%10, bb4], [%12, bb5] + 1: br label bb1 +} diff --git a/tools/ci_check_golden.sh b/tools/ci_check_golden.sh index 96affc7b..dd3beebf 100644 --- a/tools/ci_check_golden.sh +++ b/tools/ci_check_golden.sh @@ -13,6 +13,7 @@ PAIRS=( "local_tests/simple_loop_test.nyash docs/status/golden/loop_simple.mir.txt" "local_tests/test_vm_array_getset.nyash docs/status/golden/boxcall_array_getset.mir.txt" "local_tests/typeop_mixed.nyash docs/status/golden/typeop_mixed.mir.txt" + "local_tests/loop_nested_if_test.nyash docs/status/golden/loop_nested_if.mir.txt" ) for pair in "${PAIRS[@]}"; do