From 3e1f87820af92c3df8393039b064d59abe66d525 Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Wed, 29 Nov 2023 16:46:55 +0100 Subject: [PATCH 1/4] New byte code for branch on not null --- src/bytecodes.h | 2 ++ src/compiler/byte_gen.cc | 14 ++++++++++++++ src/compiler/emitter.cc | 3 +++ src/compiler/emitter.h | 3 ++- src/compiler/propagation/type_propagator.cc | 20 ++++++++++++++++++++ src/interpreter_run.cc | 16 ++++++++++++++++ tests/strip/throw-test.toit | 2 +- tools/snapshot.toit | 2 ++ 8 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/bytecodes.h b/src/bytecodes.h index 6e72eb7e6..76b0f8b3c 100644 --- a/src/bytecodes.h +++ b/src/bytecodes.h @@ -179,9 +179,11 @@ enum BytecodeFormat { BYTECODE(BRANCH, 3, OP_SF, "branch") \ BYTECODE(BRANCH_IF_TRUE, 3, OP_SF, "branch if true") \ BYTECODE(BRANCH_IF_FALSE, 3, OP_SF, "branch if false") \ + BYTECODE(BRANCH_IF_NOT_NULL, 3, OP_SF, "branch if not null") \ BYTECODE(BRANCH_BACK, 5, OP_SB_SB, "branch back") \ BYTECODE(BRANCH_BACK_IF_TRUE, 5, OP_SB_SB, "branch back if true") \ BYTECODE(BRANCH_BACK_IF_FALSE, 5, OP_SB_SB, "branch back if false") \ + BYTECODE(BRANCH_BACK_IF_NOT_NULL, 5, OP_SB_SB, "branch back if not null") \ BYTECODE(PRIMITIVE, 4, OP_BU_SU, "invoke primitive") \ BYTECODE(THROW, 2, OP_BU, "throw") \ BYTECODE(RETURN, 3, OP_BS_BU, "return") \ diff --git a/src/compiler/byte_gen.cc b/src/compiler/byte_gen.cc index 68c72d31d..2b7c46dc2 100644 --- a/src/compiler/byte_gen.cc +++ b/src/compiler/byte_gen.cc @@ -241,6 +241,20 @@ void ByteGen::visit_for_control(Expression* expression, return; } + if (yes == fallthrough && expression->is_CallBuiltin()) { + auto builtin = expression->as_CallBuiltin(); + if (builtin->target()->kind() == Builtin::IDENTICAL) { + bool left_is_null = builtin->arguments()[0]->is_LiteralNull(); + bool right_is_null = builtin->arguments()[1]->is_LiteralNull(); + if (left_is_null || right_is_null) { + Expression* other = builtin->arguments()[left_is_null ? 1 : 0]; + visit_for_value(other); + __ branch(Emitter::IF_NOT_NULL, no); + return; + } + } + } + visit_for_value(expression); if (yes == fallthrough) { __ branch(Emitter::IF_FALSE, no); diff --git a/src/compiler/emitter.cc b/src/compiler/emitter.cc index 79f55ab1f..edb54ee6d 100644 --- a/src/compiler/emitter.cc +++ b/src/compiler/emitter.cc @@ -451,6 +451,9 @@ void Emitter::branch(Condition condition, Label* label) { } else if (condition == IF_TRUE) { op = label->is_bound() ? BRANCH_BACK_IF_TRUE : BRANCH_IF_TRUE; stack_.pop(); + } else if (condition == IF_NOT_NULL) { + op = label->is_bound() ? BRANCH_BACK_IF_NOT_NULL : BRANCH_IF_NOT_NULL; + stack_.pop(); } else { ASSERT(condition == IF_FALSE); op = label->is_bound() ? BRANCH_BACK_IF_FALSE: BRANCH_IF_FALSE; diff --git a/src/compiler/emitter.h b/src/compiler/emitter.h index 28ae60a89..40f83c106 100644 --- a/src/compiler/emitter.h +++ b/src/compiler/emitter.h @@ -73,7 +73,8 @@ class Emitter { enum Condition { UNCONDITIONAL, IF_TRUE, - IF_FALSE + IF_FALSE, + IF_NOT_NULL, }; List bytecodes(); diff --git a/src/compiler/propagation/type_propagator.cc b/src/compiler/propagation/type_propagator.cc index 714a609a4..ce393b79c 100644 --- a/src/compiler/propagation/type_propagator.cc +++ b/src/compiler/propagation/type_propagator.cc @@ -1173,6 +1173,13 @@ static TypeScope* process(TypeScope* scope, uint8* bcp, std::vector& } OPCODE_END(); + OPCODE_BEGIN(BRANCH_IF_NOT_NULL); + stack->pop(); + uint8* target = bcp + Utils::read_unaligned_uint16(bcp + 1); + scope = worklists.back()->add(target, scope, true); + stack = scope->top(); + OPCODE_END(); + OPCODE_BEGIN(BRANCH_BACK); uint8* target = bcp - Utils::read_unaligned_uint16(bcp + 1); return worklists.back()->add(target, scope, false); @@ -1212,6 +1219,19 @@ static TypeScope* process(TypeScope* scope, uint8* bcp, std::vector& } OPCODE_END(); + OPCODE_BEGIN(BRANCH_BACK_IF_NOT_NULL); + TypeSet top = stack->local(0); + bool can_be_null = top.contains_null(program); + stack->pop(); + uint8* target = bcp - Utils::read_unaligned_uint16(bcp + 1); + if (!can_be_null) { + // Unconditionally continue at the branch target. + return worklists.back()->add(target, scope, false); + } + scope = worklists.back()->add(target, scope, true); + stack = scope->top(); + OPCODE_END(); + OPCODE_BEGIN(INVOKE_LAMBDA_TAIL); propagator->ensure_code_failure(); scope->throw_maybe(); diff --git a/src/interpreter_run.cc b/src/interpreter_run.cc index 76f349868..980817a9b 100644 --- a/src/interpreter_run.cc +++ b/src/interpreter_run.cc @@ -961,6 +961,13 @@ Interpreter::Result Interpreter::run() { } OPCODE_END(); + OPCODE_BEGIN(BRANCH_IF_NOT_NULL); + if (POP() != program->null_object()) { + bcp += Utils::read_unaligned_uint16(bcp + 1); + DISPATCH(0); + } + OPCODE_END(); + OPCODE_BEGIN(BRANCH_BACK); uint8* entry = bcp - Utils::read_unaligned_uint16(bcp + 3); bcp -= Utils::read_unaligned_uint16(bcp + 1); @@ -986,6 +993,15 @@ Interpreter::Result Interpreter::run() { } OPCODE_END(); + OPCODE_BEGIN(BRANCH_BACK_IF_NOT_NULL); + if (POP() != program->null_object()) { + uint8* entry = bcp - Utils::read_unaligned_uint16(bcp + 3); + bcp -= Utils::read_unaligned_uint16(bcp + 1); + CHECK_PREEMPT(entry); + DISPATCH(0); + } + OPCODE_END(); + OPCODE_BEGIN(INVOKE_LAMBDA_TAIL); B_ARG1(bci_offset) Instance* receiver = Instance::cast(STACK_AT(bci_offset + FRAME_SIZE)); diff --git a/tests/strip/throw-test.toit b/tests/strip/throw-test.toit index 1a06432a0..4602708f8 100644 --- a/tests/strip/throw-test.toit +++ b/tests/strip/throw-test.toit @@ -13,7 +13,7 @@ main args: compiler := args[1] runner := args[2] - with-tmp-directory: | tmp-dir| + with-tmp-directory: | tmp-dir | variants := compile-variants --compiler=compiler --tmp-dir=tmp-dir input non-stripped-snapshot := variants[0] diff --git a/tools/snapshot.toit b/tools/snapshot.toit index 042562f26..6eefb69fe 100644 --- a/tools/snapshot.toit +++ b/tools/snapshot.toit @@ -886,9 +886,11 @@ BYTE-CODES ::= [ Bytecode "BRANCH" 3 OP-SF "branch", Bytecode "BRANCH_IF_TRUE" 3 OP-SF "branch if true", Bytecode "BRANCH_IF_FALSE" 3 OP-SF "branch if false", + Bytecode "BRANCH_IF_NOT_NULL" 3 OP-SF "branch if not null", Bytecode "BRANCH_BACK" 5 OP-SB-SB "branch back", Bytecode "BRANCH_BACK_IF_TRUE" 5 OP-SB-SB "branch back if true", Bytecode "BRANCH_BACK_IF_FALSE" 5 OP-SB-SB "branch back if false", + Bytecode "BRANCH_BACK_IF_NOT_NULL" 5 OP-SB-SB "branch back if not null", Bytecode "PRIMITIVE" 4 OP-BU-SU "invoke primitive", Bytecode "THROW" 2 OP-BU "throw", Bytecode "RETURN" 3 OP-BS-BU "return", From c066f933bb454bfb93aef65a82d0b5ee4e68719c Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Fri, 1 Dec 2023 10:31:38 +0100 Subject: [PATCH 2/4] Update gold --- .../type_propagation/gold/array-do-test.gold | 6 +- .../gold/array-do-test.gold-O2 | 6 +- tests/type_propagation/gold/block-test.gold | 112 +++++----- .../type_propagation/gold/block-test.gold-O2 | 112 +++++----- .../type_propagation/gold/deltablue-test.gold | 208 ++++++++--------- .../gold/deltablue-test.gold-O2 | 210 +++++++++--------- tests/type_propagation/gold/field-test.gold | 12 +- .../type_propagation/gold/field-test.gold-O2 | 12 +- tests/type_propagation/gold/finally-test.gold | 82 +++---- .../gold/finally-test.gold-O2 | 80 +++---- tests/type_propagation/gold/global-test.gold | 14 +- .../type_propagation/gold/global-test.gold-O2 | 14 +- tests/type_propagation/gold/lambda-test.gold | 14 +- .../type_propagation/gold/lambda-test.gold-O2 | 14 +- tests/type_propagation/gold/literal-test.gold | 10 +- .../gold/literal-test.gold-O2 | 10 +- tests/type_propagation/gold/local-test.gold | 30 +-- .../type_propagation/gold/local-test.gold-O2 | 30 +-- tests/type_propagation/gold/map-test.gold | 6 +- tests/type_propagation/gold/map-test.gold-O2 | 6 +- tests/type_propagation/gold/nlr-test.gold | 48 ++-- tests/type_propagation/gold/nlr-test.gold-O2 | 48 ++-- .../gold/non-local-branch-test.gold | 36 +-- .../gold/non-local-branch-test.gold-O2 | 36 +-- .../gold/non-local-return-test.gold | 20 +- .../gold/non-local-return-test.gold-O2 | 20 +- .../gold/null-equals-test.gold | 10 +- .../gold/null-equals-test.gold-O2 | 10 +- .../type_propagation/gold/richards-test.gold | 124 +++++------ .../gold/richards-test.gold-O2 | 124 +++++------ tests/type_propagation/gold/spawn-test.gold | 6 +- .../type_propagation/gold/spawn-test.gold-O2 | 6 +- tests/type_propagation/gold/time-test.gold | 4 +- tests/type_propagation/gold/time-test.gold-O2 | 4 +- tests/type_propagation/gold/try-test.gold | 22 +- tests/type_propagation/gold/try-test.gold-O2 | 22 +- .../type_propagation/gold/typecheck-test.gold | 20 +- .../gold/typecheck-test.gold-O2 | 18 +- 38 files changed, 783 insertions(+), 783 deletions(-) diff --git a/tests/type_propagation/gold/array-do-test.gold b/tests/type_propagation/gold/array-do-test.gold index eaf2e7dc2..dd4e3676f 100644 --- a/tests/type_propagation/gold/array-do-test.gold +++ b/tests/type_propagation/gold/array-do-test.gold @@ -6,16 +6,16 @@ main tests/type_propagation/array-do-test.toit 12[015] - load local 1 13[038] - load block 1 15[058] - invoke virtual do // [{List_}, [block]] -> {Null_} - 19[089] - return null S3 0 + 19[091] - return null S3 0 [block] in main tests/type_propagation/array-do-test.toit - argument 0: [block] - argument 1: {*} 0[016] - load local 2 1[053] - invoke static id tests/type_propagation/array-do-test.toit // [{*}] -> {*} - 4[088] - return S1 2 + 4[090] - return S1 2 id tests/type_propagation/array-do-test.toit - argument 0: {*} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/array-do-test.gold-O2 b/tests/type_propagation/gold/array-do-test.gold-O2 index eaf2e7dc2..dd4e3676f 100644 --- a/tests/type_propagation/gold/array-do-test.gold-O2 +++ b/tests/type_propagation/gold/array-do-test.gold-O2 @@ -6,16 +6,16 @@ main tests/type_propagation/array-do-test.toit 12[015] - load local 1 13[038] - load block 1 15[058] - invoke virtual do // [{List_}, [block]] -> {Null_} - 19[089] - return null S3 0 + 19[091] - return null S3 0 [block] in main tests/type_propagation/array-do-test.toit - argument 0: [block] - argument 1: {*} 0[016] - load local 2 1[053] - invoke static id tests/type_propagation/array-do-test.toit // [{*}] -> {*} - 4[088] - return S1 2 + 4[090] - return S1 2 id tests/type_propagation/array-do-test.toit - argument 0: {*} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/block-test.gold b/tests/type_propagation/gold/block-test.gold index ff37d55aa..f12749a79 100644 --- a/tests/type_propagation/gold/block-test.gold +++ b/tests/type_propagation/gold/block-test.gold @@ -16,7 +16,7 @@ main tests/type_propagation/block-test.toit 28[053] - invoke static test-recursion tests/type_propagation/block-test.toit // {Null_} 31[041] - pop 1 32[053] - invoke static test-dead tests/type_propagation/block-test.toit // {Null_} - 35[089] - return null S1 0 + 35[091] - return null S1 0 test-simple tests/type_propagation/block-test.toit 0[023] - load smi 0 @@ -27,7 +27,7 @@ test-simple tests/type_propagation/block-test.toit 13[041] - pop 1 14[002] - pop, load local S0 16[053] - invoke static id tests/type_propagation/block-test.toit // [{LargeInteger_|SmallInteger_}] -> {LargeInteger_|SmallInteger_} - 19[089] - return null S2 0 + 19[091] - return null S2 0 [block] in test-simple tests/type_propagation/block-test.toit - argument 0: [block] @@ -37,7 +37,7 @@ test-simple tests/type_propagation/block-test.toit 4[025] - load smi 1 5[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[006] - store outer S1 - 8[088] - return S1 1 + 8[090] - return S1 1 test-invokes tests/type_propagation/block-test.toit 0[029] - load method [block] in test-invokes tests/type_propagation/block-test.toit @@ -58,24 +58,24 @@ test-invokes tests/type_propagation/block-test.toit 45[020] - load literal true 47[038] - load block 1 49[053] - invoke static invoke tests/type_propagation/block-test.toit // [{True_}, [block]] -> {True_} - 52[089] - return null S2 0 + 52[091] - return null S2 0 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {String_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] @@ -85,13 +85,13 @@ test-invokes tests/type_propagation/block-test.toit 6[038] - load block 1 8[053] - invoke static invoke tests/type_propagation/block-test.toit // [{SmallInteger_}, [block]] -> {SmallInteger_} 11[004] - store local, pop S1 - 13[088] - return S1 2 + 13[090] - return S1 2 [block] in [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {True_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] @@ -101,7 +101,7 @@ test-invokes tests/type_propagation/block-test.toit 6[038] - load block 1 8[053] - invoke static invoke tests/type_propagation/block-test.toit // [{True_}, [block]] -> {True_} 11[004] - store local, pop S1 - 13[088] - return S1 2 + 13[090] - return S1 2 test-nesting tests/type_propagation/block-test.toit 0[022] - load null @@ -119,7 +119,7 @@ test-nesting tests/type_propagation/block-test.toit 29[041] - pop 1 30[002] - pop, load local S0 32[053] - invoke static id tests/type_propagation/block-test.toit // [{Null_|True_|float}] -> {Null_|True_|float} - 35[089] - return null S3 0 + 35[091] - return null S3 0 [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -137,7 +137,7 @@ test-nesting tests/type_propagation/block-test.toit 21[016] - load local 2 22[005] - load outer S1 // {String_|SmallInteger_} 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[088] - return S1 1 + 27[090] - return S1 1 [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -148,7 +148,7 @@ test-nesting tests/type_propagation/block-test.toit 11[002] - pop, load local S2 13[005] - load outer S1 // {Null_|True_|float} 15[053] - invoke static id tests/type_propagation/block-test.toit // [{Null_|True_|float}] -> {Null_|True_|float} - 18[088] - return S1 1 + 18[090] - return S1 1 [block] in [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -169,17 +169,17 @@ test-nesting tests/type_propagation/block-test.toit 26[005] - load outer S3 // [block] 28[005] - load outer S1 // {True_|float} 30[053] - invoke static id tests/type_propagation/block-test.toit // [{True_|float}] -> {True_|float} - 33[088] - return S1 1 + 33[090] - return S1 1 test-catch tests/type_propagation/block-test.toit 0[022] - load null 1[029] - load method [block] in test-catch tests/type_propagation/block-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {False_} 12[041] - pop 1 - 13[095] - unlink try 0 - 15[096] - unwind + 13[097] - unlink try 0 + 15[098] - unwind 16[041] - pop 1 17[022] - load null 18[029] - load method [block] in test-catch tests/type_propagation/block-test.toit @@ -200,14 +200,14 @@ test-catch tests/type_propagation/block-test.toit 50[041] - pop 1 51[002] - pop, load local S0 53[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|Null_|float}] -> {String_|Null_|float} - 56[089] - return null S4 0 + 56[091] - return null S4 0 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[020] - load literal false 3[006] - store outer S1 - 5[088] - return S1 1 + 5[090] - return S1 1 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] @@ -217,7 +217,7 @@ test-catch tests/type_propagation/block-test.toit 5[041] - pop 1 6[020] - load literal woops 8[053] - invoke static throw /core/exceptions.toit // [{String_}] -> {} - 11[088] - return S1 1 + 11[090] - return S1 1 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] @@ -229,7 +229,7 @@ test-catch tests/type_propagation/block-test.toit 9[002] - pop, load local S2 11[020] - load literal 3.2999999999999998224 13[006] - store outer S1 - 15[088] - return S1 1 + 15[090] - return S1 1 test-too-few-arguments tests/type_propagation/block-test.toit 0[029] - load method [block] in test-too-few-arguments tests/type_propagation/block-test.toit @@ -237,7 +237,7 @@ test-too-few-arguments tests/type_propagation/block-test.toit 7[022] - load null 8[022] - load null 9[053] - invoke static catch /core/exceptions.toit // [[block], {Null_}, {Null_}] -> {*} - 12[089] - return null S2 0 + 12[091] - return null S2 0 [block] in test-too-few-arguments tests/type_propagation/block-test.toit - argument 0: [block] @@ -247,7 +247,7 @@ test-too-few-arguments tests/type_propagation/block-test.toit 10[040] - pop 2 12[026] - load smi 42 14[053] - invoke static id tests/type_propagation/block-test.toit - 17[088] - return S1 1 + 17[090] - return S1 1 test-modify-outer tests/type_propagation/block-test.toit 0[026] - load smi 42 @@ -261,7 +261,7 @@ test-modify-outer tests/type_propagation/block-test.toit 19[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 22[002] - pop, load local S0 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[089] - return null S3 0 + 27[091] - return null S3 0 [block] in test-modify-outer tests/type_propagation/block-test.toit - argument 0: [block] @@ -272,7 +272,7 @@ test-modify-outer tests/type_propagation/block-test.toit 6[002] - pop, load local S2 8[020] - load literal hest 10[006] - store outer S2 - 12[088] - return S1 1 + 12[090] - return S1 1 test-modify-outer-nested tests/type_propagation/block-test.toit 0[026] - load smi 42 @@ -286,7 +286,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 19[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 22[002] - pop, load local S0 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[089] - return null S3 0 + 27[091] - return null S3 0 [block] in test-modify-outer-nested tests/type_propagation/block-test.toit - argument 0: [block] @@ -301,7 +301,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 21[002] - pop, load local S2 23[005] - load outer S1 // {String_|SmallInteger_} 25[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 28[088] - return S1 1 + 28[090] - return S1 1 [block] in [block] in test-modify-outer-nested tests/type_propagation/block-test.toit - argument 0: [block] @@ -315,7 +315,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 12[005] - load outer S3 // [block] 14[020] - load literal hest 16[006] - store outer S2 - 18[088] - return S1 1 + 18[090] - return S1 1 test-recursion tests/type_propagation/block-test.toit 0[029] - load method [block] in test-recursion tests/type_propagation/block-test.toit @@ -349,47 +349,47 @@ test-recursion tests/type_propagation/block-test.toit 84[029] - load method [block] in test-recursion tests/type_propagation/block-test.toit 89[038] - load block 0 91[053] - invoke static recursive-a-call tests/type_propagation/block-test.toit // [[block]] -> {String_} - 94[089] - return null S2 0 + 94[091] - return null S2 0 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal false - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 87 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal true - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal hest - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 87 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal fisk - 2[088] - return S1 1 + 2[090] - return S1 1 test-dead tests/type_propagation/block-test.toit 0[029] - load method [block] in test-dead tests/type_propagation/block-test.toit @@ -403,7 +403,7 @@ test-dead tests/type_propagation/block-test.toit 24[029] - load method [block] in test-dead tests/type_propagation/block-test.toit 29[038] - load block 0 31[053] - invoke static ignore tests/type_propagation/block-test.toit // [[block]] -> {Null_} - 34[089] - return null S2 0 + 34[091] - return null S2 0 recursive-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -413,15 +413,15 @@ recursive-null tests/type_propagation/block-test.toit 11[038] - load block 0 13[053] - invoke static recursive-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 16[004] - store local, pop S1 - 18[088] - return S1 1 + 18[090] - return S1 1 21[016] - load local 2 22[055] - invoke block S1 // [[block]] -> {Null_|False_|SmallInteger_} - 24[088] - return S1 1 + 24[090] - return S1 1 [block] in recursive-null tests/type_propagation/block-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 recursive-call tests/type_propagation/block-test.toit - argument 0: [block] @@ -429,10 +429,10 @@ recursive-call tests/type_propagation/block-test.toit 3[082] - branch if false T13 6[016] - load local 2 7[053] - invoke static recursive-call tests/type_propagation/block-test.toit // [[block]] -> {True_|SmallInteger_} - 10[088] - return S1 1 + 10[090] - return S1 1 13[016] - load local 2 14[055] - invoke block S1 // [[block]] -> {True_|SmallInteger_} - 16[088] - return S1 1 + 16[090] - return S1 1 recursive-a-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -442,10 +442,10 @@ recursive-a-null tests/type_propagation/block-test.toit 11[038] - load block 0 13[053] - invoke static recursive-b-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 16[004] - store local, pop S1 - 18[088] - return S1 1 + 18[090] - return S1 1 21[016] - load local 2 22[055] - invoke block S1 // [[block]] -> {String_|Null_|SmallInteger_} - 24[088] - return S1 1 + 24[090] - return S1 1 recursive-b-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -453,12 +453,12 @@ recursive-b-null tests/type_propagation/block-test.toit 5[038] - load block 0 7[053] - invoke static recursive-a-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 10[004] - store local, pop S1 - 12[088] - return S1 1 + 12[090] - return S1 1 [block] in recursive-b-null tests/type_propagation/block-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 recursive-a-call tests/type_propagation/block-test.toit - argument 0: [block] @@ -466,16 +466,16 @@ recursive-a-call tests/type_propagation/block-test.toit 3[082] - branch if false T13 6[016] - load local 2 7[053] - invoke static recursive-b-call tests/type_propagation/block-test.toit // [[block]] -> {String_|SmallInteger_} - 10[088] - return S1 1 + 10[090] - return S1 1 13[016] - load local 2 14[055] - invoke block S1 // [[block]] -> {String_|SmallInteger_} - 16[088] - return S1 1 + 16[090] - return S1 1 recursive-b-call tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[053] - invoke static recursive-a-call tests/type_propagation/block-test.toit // [[block]] -> {String_|SmallInteger_} - 4[088] - return S1 1 + 4[090] - return S1 1 maybe-throw tests/type_propagation/block-test.toit 0[053] - invoke static pick tests/type_propagation/block-test.toit // {True_|False_} @@ -483,29 +483,29 @@ maybe-throw tests/type_propagation/block-test.toit 6[020] - load literal woops 8[053] - invoke static throw /core/exceptions.toit // [{String_}] -> {} 11[041] - pop 1 - 12[089] - return null S0 0 + 12[091] - return null S0 0 id tests/type_propagation/block-test.toit - argument 0: {String_|Null_|True_|float|LargeInteger_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 ignore tests/type_propagation/block-test.toit - argument 0: [block] - 0[089] - return null S0 1 + 0[091] - return null S0 1 pick tests/type_propagation/block-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {String_|Null_|True_|float|SmallInteger_} - 3[088] - return S1 1 + 3[090] - return S1 1 invoke tests/type_propagation/block-test.toit - argument 0: {String_|True_|SmallInteger_} @@ -513,4 +513,4 @@ invoke tests/type_propagation/block-test.toit 0[016] - load local 2 1[018] - load local 4 2[055] - invoke block S2 // [[block], {String_|True_|SmallInteger_}] -> {String_|True_|SmallInteger_} - 4[088] - return S1 2 + 4[090] - return S1 2 diff --git a/tests/type_propagation/gold/block-test.gold-O2 b/tests/type_propagation/gold/block-test.gold-O2 index 88ef72d6e..865d34459 100644 --- a/tests/type_propagation/gold/block-test.gold-O2 +++ b/tests/type_propagation/gold/block-test.gold-O2 @@ -16,7 +16,7 @@ main tests/type_propagation/block-test.toit 28[053] - invoke static test-recursion tests/type_propagation/block-test.toit // {Null_} 31[041] - pop 1 32[053] - invoke static test-dead tests/type_propagation/block-test.toit // {Null_} - 35[089] - return null S1 0 + 35[091] - return null S1 0 test-simple tests/type_propagation/block-test.toit 0[023] - load smi 0 @@ -27,7 +27,7 @@ test-simple tests/type_propagation/block-test.toit 13[041] - pop 1 14[002] - pop, load local S0 16[053] - invoke static id tests/type_propagation/block-test.toit // [{LargeInteger_|SmallInteger_}] -> {LargeInteger_|SmallInteger_} - 19[089] - return null S2 0 + 19[091] - return null S2 0 [block] in test-simple tests/type_propagation/block-test.toit - argument 0: [block] @@ -37,7 +37,7 @@ test-simple tests/type_propagation/block-test.toit 4[025] - load smi 1 5[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[006] - store outer S1 - 8[088] - return S1 1 + 8[090] - return S1 1 test-invokes tests/type_propagation/block-test.toit 0[029] - load method [block] in test-invokes tests/type_propagation/block-test.toit @@ -58,24 +58,24 @@ test-invokes tests/type_propagation/block-test.toit 45[020] - load literal true 47[038] - load block 1 49[053] - invoke static invoke tests/type_propagation/block-test.toit // [{True_}, [block]] -> {True_} - 52[089] - return null S2 0 + 52[091] - return null S2 0 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {String_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] @@ -85,13 +85,13 @@ test-invokes tests/type_propagation/block-test.toit 6[038] - load block 1 8[053] - invoke static invoke tests/type_propagation/block-test.toit // [{SmallInteger_}, [block]] -> {SmallInteger_} 11[004] - store local, pop S1 - 13[088] - return S1 2 + 13[090] - return S1 2 [block] in [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] - argument 1: {True_} 0[016] - load local 2 - 1[088] - return S1 2 + 1[090] - return S1 2 [block] in test-invokes tests/type_propagation/block-test.toit - argument 0: [block] @@ -101,7 +101,7 @@ test-invokes tests/type_propagation/block-test.toit 6[038] - load block 1 8[053] - invoke static invoke tests/type_propagation/block-test.toit // [{True_}, [block]] -> {True_} 11[004] - store local, pop S1 - 13[088] - return S1 2 + 13[090] - return S1 2 test-nesting tests/type_propagation/block-test.toit 0[022] - load null @@ -119,7 +119,7 @@ test-nesting tests/type_propagation/block-test.toit 29[041] - pop 1 30[002] - pop, load local S0 32[053] - invoke static id tests/type_propagation/block-test.toit // [{Null_|True_|float}] -> {Null_|True_|float} - 35[089] - return null S3 0 + 35[091] - return null S3 0 [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -137,7 +137,7 @@ test-nesting tests/type_propagation/block-test.toit 21[016] - load local 2 22[005] - load outer S1 // {String_|SmallInteger_} 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[088] - return S1 1 + 27[090] - return S1 1 [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -148,7 +148,7 @@ test-nesting tests/type_propagation/block-test.toit 11[002] - pop, load local S2 13[005] - load outer S1 // {Null_|True_|float} 15[053] - invoke static id tests/type_propagation/block-test.toit // [{Null_|True_|float}] -> {Null_|True_|float} - 18[088] - return S1 1 + 18[090] - return S1 1 [block] in [block] in test-nesting tests/type_propagation/block-test.toit - argument 0: [block] @@ -169,17 +169,17 @@ test-nesting tests/type_propagation/block-test.toit 26[005] - load outer S3 // [block] 28[005] - load outer S1 // {True_|float} 30[053] - invoke static id tests/type_propagation/block-test.toit // [{True_|float}] -> {True_|float} - 33[088] - return S1 1 + 33[090] - return S1 1 test-catch tests/type_propagation/block-test.toit 0[022] - load null 1[029] - load method [block] in test-catch tests/type_propagation/block-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {False_} 12[041] - pop 1 - 13[095] - unlink try 0 - 15[096] - unwind + 13[097] - unlink try 0 + 15[098] - unwind 16[041] - pop 1 17[022] - load null 18[029] - load method [block] in test-catch tests/type_propagation/block-test.toit @@ -200,14 +200,14 @@ test-catch tests/type_propagation/block-test.toit 50[041] - pop 1 51[002] - pop, load local S0 53[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|Null_|float}] -> {String_|Null_|float} - 56[089] - return null S4 0 + 56[091] - return null S4 0 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[020] - load literal false 3[006] - store outer S1 - 5[088] - return S1 1 + 5[090] - return S1 1 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] @@ -217,7 +217,7 @@ test-catch tests/type_propagation/block-test.toit 5[041] - pop 1 6[020] - load literal woops 8[053] - invoke static throw /core/exceptions.toit // [{String_}] -> {} - 11[088] - return S1 1 + 11[090] - return S1 1 [block] in test-catch tests/type_propagation/block-test.toit - argument 0: [block] @@ -229,7 +229,7 @@ test-catch tests/type_propagation/block-test.toit 9[002] - pop, load local S2 11[020] - load literal 3.2999999999999998224 13[006] - store outer S1 - 15[088] - return S1 1 + 15[090] - return S1 1 test-too-few-arguments tests/type_propagation/block-test.toit 0[029] - load method [block] in test-too-few-arguments tests/type_propagation/block-test.toit @@ -237,7 +237,7 @@ test-too-few-arguments tests/type_propagation/block-test.toit 7[022] - load null 8[022] - load null 9[053] - invoke static catch /core/exceptions.toit // [[block], {Null_}, {Null_}] -> {*} - 12[089] - return null S2 0 + 12[091] - return null S2 0 [block] in test-too-few-arguments tests/type_propagation/block-test.toit - argument 0: [block] @@ -245,7 +245,7 @@ test-too-few-arguments tests/type_propagation/block-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/block-test.toit // [[block]] -> {} 10[004] - store local, pop S1 - 12[088] - return S1 1 + 12[090] - return S1 1 test-modify-outer tests/type_propagation/block-test.toit 0[026] - load smi 42 @@ -259,7 +259,7 @@ test-modify-outer tests/type_propagation/block-test.toit 19[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 22[002] - pop, load local S0 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[089] - return null S3 0 + 27[091] - return null S3 0 [block] in test-modify-outer tests/type_propagation/block-test.toit - argument 0: [block] @@ -270,7 +270,7 @@ test-modify-outer tests/type_propagation/block-test.toit 6[002] - pop, load local S2 8[020] - load literal hest 10[006] - store outer S2 - 12[088] - return S1 1 + 12[090] - return S1 1 test-modify-outer-nested tests/type_propagation/block-test.toit 0[026] - load smi 42 @@ -284,7 +284,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 19[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 22[002] - pop, load local S0 24[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 27[089] - return null S3 0 + 27[091] - return null S3 0 [block] in test-modify-outer-nested tests/type_propagation/block-test.toit - argument 0: [block] @@ -299,7 +299,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 21[002] - pop, load local S2 23[005] - load outer S1 // {String_|SmallInteger_} 25[053] - invoke static id tests/type_propagation/block-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} - 28[088] - return S1 1 + 28[090] - return S1 1 [block] in [block] in test-modify-outer-nested tests/type_propagation/block-test.toit - argument 0: [block] @@ -313,7 +313,7 @@ test-modify-outer-nested tests/type_propagation/block-test.toit 12[005] - load outer S3 // [block] 14[020] - load literal hest 16[006] - store outer S2 - 18[088] - return S1 1 + 18[090] - return S1 1 test-recursion tests/type_propagation/block-test.toit 0[029] - load method [block] in test-recursion tests/type_propagation/block-test.toit @@ -347,47 +347,47 @@ test-recursion tests/type_propagation/block-test.toit 84[029] - load method [block] in test-recursion tests/type_propagation/block-test.toit 89[038] - load block 0 91[053] - invoke static recursive-a-call tests/type_propagation/block-test.toit // [[block]] -> {String_} - 94[089] - return null S2 0 + 94[091] - return null S2 0 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal false - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 87 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal true - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 42 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal hest - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[026] - load smi 87 - 2[088] - return S1 1 + 2[090] - return S1 1 [block] in test-recursion tests/type_propagation/block-test.toit - argument 0: [block] 0[020] - load literal fisk - 2[088] - return S1 1 + 2[090] - return S1 1 test-dead tests/type_propagation/block-test.toit 0[029] - load method [block] in test-dead tests/type_propagation/block-test.toit @@ -401,7 +401,7 @@ test-dead tests/type_propagation/block-test.toit 24[029] - load method [block] in test-dead tests/type_propagation/block-test.toit 29[038] - load block 0 31[053] - invoke static ignore tests/type_propagation/block-test.toit // [[block]] -> {Null_} - 34[089] - return null S2 0 + 34[091] - return null S2 0 recursive-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -411,15 +411,15 @@ recursive-null tests/type_propagation/block-test.toit 11[038] - load block 0 13[053] - invoke static recursive-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 16[004] - store local, pop S1 - 18[088] - return S1 1 + 18[090] - return S1 1 21[016] - load local 2 22[055] - invoke block S1 // [[block]] -> {Null_|False_|SmallInteger_} - 24[088] - return S1 1 + 24[090] - return S1 1 [block] in recursive-null tests/type_propagation/block-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 recursive-call tests/type_propagation/block-test.toit - argument 0: [block] @@ -427,10 +427,10 @@ recursive-call tests/type_propagation/block-test.toit 3[082] - branch if false T13 6[016] - load local 2 7[053] - invoke static recursive-call tests/type_propagation/block-test.toit // [[block]] -> {True_|SmallInteger_} - 10[088] - return S1 1 + 10[090] - return S1 1 13[016] - load local 2 14[055] - invoke block S1 // [[block]] -> {True_|SmallInteger_} - 16[088] - return S1 1 + 16[090] - return S1 1 recursive-a-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -440,10 +440,10 @@ recursive-a-null tests/type_propagation/block-test.toit 11[038] - load block 0 13[053] - invoke static recursive-b-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 16[004] - store local, pop S1 - 18[088] - return S1 1 + 18[090] - return S1 1 21[016] - load local 2 22[055] - invoke block S1 // [[block]] -> {String_|Null_|SmallInteger_} - 24[088] - return S1 1 + 24[090] - return S1 1 recursive-b-null tests/type_propagation/block-test.toit - argument 0: [block] @@ -451,12 +451,12 @@ recursive-b-null tests/type_propagation/block-test.toit 5[038] - load block 0 7[053] - invoke static recursive-a-null tests/type_propagation/block-test.toit // [[block]] -> {Null_} 10[004] - store local, pop S1 - 12[088] - return S1 1 + 12[090] - return S1 1 [block] in recursive-b-null tests/type_propagation/block-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 recursive-a-call tests/type_propagation/block-test.toit - argument 0: [block] @@ -464,16 +464,16 @@ recursive-a-call tests/type_propagation/block-test.toit 3[082] - branch if false T13 6[016] - load local 2 7[053] - invoke static recursive-b-call tests/type_propagation/block-test.toit // [[block]] -> {String_|SmallInteger_} - 10[088] - return S1 1 + 10[090] - return S1 1 13[016] - load local 2 14[055] - invoke block S1 // [[block]] -> {String_|SmallInteger_} - 16[088] - return S1 1 + 16[090] - return S1 1 recursive-b-call tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[053] - invoke static recursive-a-call tests/type_propagation/block-test.toit // [[block]] -> {String_|SmallInteger_} - 4[088] - return S1 1 + 4[090] - return S1 1 maybe-throw tests/type_propagation/block-test.toit 0[053] - invoke static pick tests/type_propagation/block-test.toit // {True_|False_} @@ -481,29 +481,29 @@ maybe-throw tests/type_propagation/block-test.toit 6[020] - load literal woops 8[053] - invoke static throw /core/exceptions.toit // [{String_}] -> {} 11[041] - pop 1 - 12[089] - return null S0 0 + 12[091] - return null S0 0 id tests/type_propagation/block-test.toit - argument 0: {String_|Null_|True_|float|LargeInteger_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 ignore tests/type_propagation/block-test.toit - argument 0: [block] - 0[089] - return null S0 1 + 0[091] - return null S0 1 pick tests/type_propagation/block-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/block-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {String_|Null_|True_|float|SmallInteger_} - 3[088] - return S1 1 + 3[090] - return S1 1 invoke tests/type_propagation/block-test.toit - argument 0: {String_|True_|SmallInteger_} @@ -511,4 +511,4 @@ invoke tests/type_propagation/block-test.toit 0[016] - load local 2 1[018] - load local 4 2[055] - invoke block S2 // [[block], {String_|True_|SmallInteger_}] -> {String_|True_|SmallInteger_} - 4[088] - return S1 2 + 4[090] - return S1 2 diff --git a/tests/type_propagation/gold/deltablue-test.gold b/tests/type_propagation/gold/deltablue-test.gold index e735aad56..d95763af5 100644 --- a/tests/type_propagation/gold/deltablue-test.gold +++ b/tests/type_propagation/gold/deltablue-test.gold @@ -3,7 +3,7 @@ main tests/type_propagation/deltablue-test.toit 5[026] - load smi 10 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {Null_} - 13[089] - return null S2 0 + 13[091] - return null S2 0 [block] in main tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -12,7 +12,7 @@ main tests/type_propagation/deltablue-test.toit 5[041] - pop 1 6[026] - load smi 50 8[053] - invoke static projection-test tests/type_propagation/deltablue-test.toit // [{SmallInteger_}] -> {Null_} - 11[088] - return S1 1 + 11[090] - return S1 1 Strength tests/type_propagation/deltablue-test.toit - argument 0: {Strength} @@ -27,12 +27,12 @@ Strength tests/type_propagation/deltablue-test.toit 8[048] - as class StringSlice_(11 - 13) // {True_} 10[013] - store field, pop 1 12[018] - load local 4 - 13[088] - return S1 3 + 13[090] - return S1 3 Strength.value tests/type_propagation/deltablue-test.toit - argument 0: {Strength} 0[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Strength.next-weaker tests/type_propagation/deltablue-test.toit - argument 0: {Strength} @@ -42,42 +42,42 @@ Strength.next-weaker tests/type_propagation/deltablue-test.toit 4[082] - branch if false T14 7[032] - load global var lazy G6 // {Strength} 9[048] - as class Strength(47 - 48) // {True_} - 11[088] - return S1 1 + 11[090] - return S1 1 14[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 16[025] - load smi 1 17[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 18[082] - branch if false T28 21[032] - load global var lazy G5 // {Strength} 23[048] - as class Strength(47 - 48) // {True_} - 25[088] - return S1 1 + 25[090] - return S1 1 28[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 30[026] - load smi 2 32[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 33[082] - branch if false T43 36[032] - load global var lazy G4 // {Strength} 38[048] - as class Strength(47 - 48) // {True_} - 40[088] - return S1 1 + 40[090] - return S1 1 43[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 45[026] - load smi 3 47[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 48[082] - branch if false T58 51[032] - load global var lazy G3 // {Strength} 53[048] - as class Strength(47 - 48) // {True_} - 55[088] - return S1 1 + 55[090] - return S1 1 58[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 60[026] - load smi 4 62[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 63[082] - branch if false T73 66[032] - load global var lazy G2 // {Strength} 68[048] - as class Strength(47 - 48) // {True_} - 70[088] - return S1 1 + 70[090] - return S1 1 73[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 75[026] - load smi 5 77[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 78[082] - branch if false T88 81[032] - load global var lazy G1 // {Strength} 83[048] - as class Strength(47 - 48) // {True_} - 85[088] - return S1 1 + 85[090] - return S1 1 88[053] - invoke static unreachable /core/exceptions.toit // {} 91[041] - pop 1 @@ -86,49 +86,49 @@ REQUIRED tests/type_propagation/deltablue-test.toit 2[023] - load smi 0 3[020] - load literal required 5[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 8[088] - return S1 0 + 8[090] - return S1 0 STRONG-REFERRED tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[025] - load smi 1 3[020] - load literal strongPreferred 5[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 8[088] - return S1 0 + 8[090] - return S1 0 PREFERRED tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 2 4[020] - load literal preferred 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 STRONG-DEFAULT tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 3 4[020] - load literal strongDefault 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 NORMAL tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 4 4[020] - load literal normal 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 WEAK-DEFAULT tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 5 4[020] - load literal weakDefault 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 WEAKEST tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 6 4[020] - load literal weakest 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 stronger tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -139,7 +139,7 @@ stronger tests/type_propagation/deltablue-test.toit 6[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 8[063] - invoke lt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 9[048] - as class True_(18 - 20) // {True_} - 11[088] - return S1 2 + 11[090] - return S1 2 weaker tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -150,7 +150,7 @@ weaker tests/type_propagation/deltablue-test.toit 6[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 8[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 9[048] - as class True_(18 - 20) // {True_} - 11[088] - return S1 2 + 11[090] - return S1 2 weakest tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -165,12 +165,12 @@ weakest tests/type_propagation/deltablue-test.toit 13[080] - branch T17 16[016] - load local 2 17[048] - as class Strength(47 - 48) // {True_} - 19[088] - return S1 2 + 19[090] - return S1 2 Constraint.strength tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 0[009] - load field local 2 // [{EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_|Strength} - 2[088] - return S1 1 + 2[090] - return S1 1 Constraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -180,7 +180,7 @@ Constraint tests/type_propagation/deltablue-test.toit 2[048] - as class Strength(47 - 48) // {True_} 4[013] - store field, pop 0 6[017] - load local 3 - 7[088] - return S1 2 + 7[090] - return S1 2 Constraint.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -190,7 +190,7 @@ Constraint.add-constraint tests/type_propagation/deltablue-test.toit 6[030] - load global var G7 // {Null_|Planner} 8[017] - load local 3 9[058] - invoke virtual incremental-add // [{Null_|Planner}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 13[089] - return null S1 1 + 13[091] - return null S1 1 Constraint.satisfy tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -211,7 +211,7 @@ Constraint.satisfy tests/type_propagation/deltablue-test.toit 29[041] - pop 1 30[022] - load null 31[048] - as class EqualityConstraint?(43 - 47) // {True_} - 33[088] - return S1 2 + 33[090] - return S1 2 36[017] - load local 3 37[017] - load local 3 38[058] - invoke virtual mark-inputs // [{EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}, {LargeInteger_|SmallInteger_}] -> {Null_} @@ -239,7 +239,7 @@ Constraint.satisfy tests/type_propagation/deltablue-test.toit 86[013] - store field, pop 3 88[014] - load local 0 89[048] - as class EqualityConstraint?(43 - 47) // {True_} - 91[088] - return S3 2 + 91[090] - return S3 2 Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} @@ -252,18 +252,18 @@ Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit 14[041] - pop 1 15[016] - load local 2 16[058] - invoke virtual remove-from-graph // [{EditConstraint}] -> {Null_} - 20[089] - return null S1 1 + 20[091] - return null S1 1 Constraint.is-input tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|StayConstraint} 0[020] - load literal false 2[048] - as class True_(18 - 20) // {True_} - 4[088] - return S1 1 + 4[090] - return S1 1 UnaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} 0[009] - load field local 34 // [{EditConstraint|StayConstraint}] -> {Null_|True_|False_} - 2[088] - return S1 1 + 2[090] - return S1 1 UnaryConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -284,7 +284,7 @@ UnaryConstraint tests/type_propagation/deltablue-test.toit 20[002] - pop, load local S4 22[053] - invoke static Constraint.add-constraint tests/type_propagation/deltablue-test.toit // [{EditConstraint|StayConstraint}] -> {Null_} 25[002] - pop, load local S4 - 27[088] - return S1 3 + 27[090] - return S1 3 UnaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -295,7 +295,7 @@ UnaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 8[020] - load literal false 10[048] - as class True_(18 - 20) // {True_} 12[013] - store field, pop 2 - 14[089] - return null S0 1 + 14[091] - return null S0 1 UnaryConstraint.choose-method tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -318,18 +318,18 @@ UnaryConstraint.choose-method tests/type_propagation/deltablue-test.toit 29[053] - invoke static stronger tests/type_propagation/deltablue-test.toit // [{Null_|Strength}, {Null_|Strength}] -> {True_|False_} 32[048] - as class True_(18 - 20) // {True_} 34[013] - store field, pop 2 - 36[089] - return null S0 2 + 36[091] - return null S0 2 UnaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} - argument 1: {LargeInteger_|SmallInteger_} 0[052] - load local, as class, pop 2 - LargeInteger_(22 - 24) // {True_} - 2[089] - return null S0 2 + 2[091] - return null S0 2 UnaryConstraint.output tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} 0[009] - load field local 18 // [{EditConstraint|StayConstraint}] -> {Null_|Variable} - 2[088] - return S1 1 + 2[090] - return S1 1 UnaryConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -350,7 +350,7 @@ UnaryConstraint.recalculate tests/type_propagation/deltablue-test.toit 32[016] - load local 2 33[058] - invoke virtual execute // [{EditConstraint|StayConstraint}] -> {Null_} 37[041] - pop 1 - 38[089] - return null S0 1 + 38[091] - return null S0 1 UnaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -358,7 +358,7 @@ UnaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit 1[020] - load literal false 3[048] - as class True_(18 - 20) // {True_} 5[013] - store field, pop 2 - 7[089] - return null S0 1 + 7[091] - return null S0 1 UnaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -366,7 +366,7 @@ UnaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit 0[052] - load local, as class, pop 2 - LargeInteger_(22 - 24) // {True_} 2[020] - load literal true 4[048] - as class True_(18 - 20) // {True_} - 6[088] - return S1 2 + 6[090] - return S1 2 UnaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -377,7 +377,7 @@ UnaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 8[020] - load literal false 10[048] - as class True_(18 - 20) // {True_} 12[013] - store field, pop 2 - 14[089] - return null S0 1 + 14[091] - return null S0 1 StayConstraint tests/type_propagation/deltablue-test.toit - argument 0: {StayConstraint} @@ -390,11 +390,11 @@ StayConstraint tests/type_propagation/deltablue-test.toit 6[018] - load local 4 7[053] - invoke static UnaryConstraint tests/type_propagation/deltablue-test.toit // [{StayConstraint}, {Strength}, {Variable}] -> {StayConstraint} 10[002] - pop, load local S4 - 12[088] - return S1 3 + 12[090] - return S1 3 StayConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {StayConstraint} - 0[089] - return null S0 1 + 0[091] - return null S0 1 EditConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} @@ -407,17 +407,17 @@ EditConstraint tests/type_propagation/deltablue-test.toit 6[018] - load local 4 7[053] - invoke static UnaryConstraint tests/type_propagation/deltablue-test.toit // [{EditConstraint}, {Strength}, {Variable}] -> {EditConstraint} 10[002] - pop, load local S4 - 12[088] - return S1 3 + 12[090] - return S1 3 EditConstraint.is-input tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} 0[020] - load literal true 2[048] - as class True_(18 - 20) // {True_} - 4[088] - return S1 1 + 4[090] - return S1 1 EditConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} - 0[089] - return null S0 1 + 0[091] - return null S0 1 BinaryConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -443,7 +443,7 @@ BinaryConstraint tests/type_propagation/deltablue-test.toit 25[002] - pop, load local S5 27[053] - invoke static Constraint.add-constraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint|ScaleConstraint}] -> {Null_} 30[002] - pop, load local S5 - 32[088] - return S1 4 + 32[090] - return S1 4 BinaryConstraint.choose-method tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -522,7 +522,7 @@ BinaryConstraint.choose-method tests/type_propagation/deltablue-test.toit 137[026] - load smi 2 139[048] - as class LargeInteger_(22 - 24) // {True_} 141[013] - store field, pop 3 -143[089] - return null S0 2 +143[091] - return null S0 2 BinaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -536,7 +536,7 @@ BinaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 14[025] - load smi 1 15[048] - as class LargeInteger_(22 - 24) // {True_} 17[013] - store field, pop 3 - 19[089] - return null S0 1 + 19[091] - return null S0 1 BinaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -548,7 +548,7 @@ BinaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit 9[080] - branch T14 12[020] - load literal false 14[048] - as class True_(18 - 20) // {True_} - 16[088] - return S1 1 + 16[090] - return S1 1 BinaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -558,7 +558,7 @@ BinaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit 3[053] - invoke static BinaryConstraint.input tests/type_propagation/deltablue-test.toit // [{EqualityConstraint|ScaleConstraint}] -> {Variable} 6[017] - load local 3 7[013] - store field, pop 3 - 9[089] - return null S0 2 + 9[091] - return null S0 2 BinaryConstraint.input tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -570,7 +570,7 @@ BinaryConstraint.input tests/type_propagation/deltablue-test.toit 10[080] - branch T15 13[009] - load field local 34 // [{EqualityConstraint|ScaleConstraint}] -> {Null_|Variable} 15[048] - as class Variable(42 - 43) // {True_|False_} - 17[088] - return S1 1 + 17[090] - return S1 1 BinaryConstraint.output tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -582,7 +582,7 @@ BinaryConstraint.output tests/type_propagation/deltablue-test.toit 10[080] - branch T15 13[009] - load field local 18 // [{EqualityConstraint|ScaleConstraint}] -> {Null_|Variable} 15[048] - as class Variable(42 - 43) // {True_|False_} - 17[088] - return S1 1 + 17[090] - return S1 1 BinaryConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -603,7 +603,7 @@ BinaryConstraint.recalculate tests/type_propagation/deltablue-test.toit 28[018] - load local 4 29[058] - invoke virtual execute // [{EqualityConstraint}] -> {Null_} 33[041] - pop 1 - 34[089] - return null S2 1 + 34[091] - return null S2 1 BinaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -611,7 +611,7 @@ BinaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit 1[025] - load smi 1 2[048] - as class LargeInteger_(22 - 24) // {True_} 4[013] - store field, pop 3 - 6[089] - return null S0 1 + 6[091] - return null S0 1 BinaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -629,7 +629,7 @@ BinaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit 17[081] - branch if true T22 20[010] - pop, load field local 32 // [{Variable}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 22[048] - as class True_(18 - 20) // {True_|False_} - 24[088] - return S2 2 + 24[090] - return S2 2 BinaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -643,7 +643,7 @@ BinaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 14[025] - load smi 1 15[048] - as class LargeInteger_(22 - 24) // {True_} 17[013] - store field, pop 3 - 19[089] - return null S0 1 + 19[091] - return null S0 1 ScaleConstraint tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -669,7 +669,7 @@ ScaleConstraint tests/type_propagation/deltablue-test.toit 26[000] - load local S7 28[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{ScaleConstraint}, {Strength}, {Variable}, {Variable}] -> {ScaleConstraint} 31[002] - pop, load local S7 - 33[088] - return S1 6 + 33[090] - return S1 6 ScaleConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -681,7 +681,7 @@ ScaleConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 10[010] - pop, load field local 82 // [{ScaleConstraint}] -> {Null_|Variable} 12[017] - load local 3 13[053] - invoke static Variable.add-constraint tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {ScaleConstraint}] -> {Null_} - 16[089] - return null S1 1 + 16[091] - return null S1 1 ScaleConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -693,7 +693,7 @@ ScaleConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 10[010] - pop, load field local 82 // [{ScaleConstraint}] -> {Null_|Variable} 12[017] - load local 3 13[053] - invoke static Variable.remove-constraint tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {ScaleConstraint}] -> {Null_} - 16[089] - return null S1 1 + 16[091] - return null S1 1 ScaleConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -707,7 +707,7 @@ ScaleConstraint.mark-inputs tests/type_propagation/deltablue-test.toit 11[018] - load local 4 12[011] - store field 3 14[013] - store field, pop 3 - 16[089] - return null S0 2 + 16[091] - return null S0 2 ScaleConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -738,7 +738,7 @@ ScaleConstraint.execute tests/type_propagation/deltablue-test.toit 46[076] - invoke div // [{LargeInteger_|SmallInteger_}, {Null_|LargeInteger_|SmallInteger_}] -> {LargeInteger_|SmallInteger_} 47[048] - as class LargeInteger_(22 - 24) // {True_} 49[013] - store field, pop 1 - 51[089] - return null S0 1 + 51[091] - return null S0 1 ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -767,7 +767,7 @@ ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit 44[018] - load local 4 45[053] - invoke static ScaleConstraint.execute tests/type_propagation/deltablue-test.toit // [{ScaleConstraint}] -> {Null_} 48[041] - pop 1 - 49[089] - return null S2 1 + 49[091] - return null S2 1 EqualityConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -783,7 +783,7 @@ EqualityConstraint tests/type_propagation/deltablue-test.toit 9[019] - load local 5 10[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} 13[002] - pop, load local S5 - 15[088] - return S1 4 + 15[090] - return S1 4 EqualityConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -793,7 +793,7 @@ EqualityConstraint.execute tests/type_propagation/deltablue-test.toit 5[053] - invoke static BinaryConstraint.input tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}] -> {Variable} 8[007] - load field 1 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} 10[013] - store field, pop 1 - 12[089] - return null S0 1 + 12[091] - return null S0 1 Variable tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -825,12 +825,12 @@ Variable tests/type_propagation/deltablue-test.toit 35[053] - invoke static create-list-literal-from-array_ /core/collections.toit // [{LargeArray_|SmallArray_}] -> {List_} 38[013] - store field, pop 6 40[018] - load local 4 - 41[088] - return S1 3 + 41[090] - return S1 3 Variable.value tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 18 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.value= tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -839,17 +839,17 @@ Variable.value= tests/type_propagation/deltablue-test.toit 2[017] - load local 3 3[017] - load local 3 4[011] - store field 1 - 6[088] - return S1 2 + 6[090] - return S1 2 Variable.determined-by tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 34 // [{Variable}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.mark tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 50 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.mark= tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -857,12 +857,12 @@ Variable.mark= tests/type_propagation/deltablue-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 3 - 4[088] - return S1 2 + 4[090] - return S1 2 Variable.constraints tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 98 // [{Variable}] -> {Null_|List_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -871,7 +871,7 @@ Variable.add-constraint tests/type_propagation/deltablue-test.toit 2[009] - load field local 99 // [{Variable}] -> {Null_|List_} 4[017] - load local 3 5[058] - invoke virtual add // [{Null_|List_}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 9[089] - return null S1 2 + 9[091] - return null S1 2 Variable.remove-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -891,7 +891,7 @@ Variable.remove-constraint tests/type_propagation/deltablue-test.toit 27[017] - load local 3 28[022] - load null 29[013] - store field, pop 2 - 31[089] - return null S0 2 + 31[091] - return null S0 2 [block] in Variable.remove-constraint tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -904,7 +904,7 @@ Variable.remove-constraint tests/type_propagation/deltablue-test.toit 8[020] - load literal true 10[080] - branch T15 13[020] - load literal false - 15[088] - return S1 2 + 15[090] - return S1 2 Planner tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -912,7 +912,7 @@ Planner tests/type_propagation/deltablue-test.toit 1[023] - load smi 0 2[013] - store field, pop 0 4[016] - load local 2 - 5[088] - return S1 1 + 5[090] - return S1 1 Planner.incremental-add tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -929,8 +929,8 @@ Planner.incremental-add tests/type_propagation/deltablue-test.toit 16[016] - load local 2 17[058] - invoke virtual satisfy // [{Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}, {LargeInteger_|SmallInteger_}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 21[004] - store local, pop S1 - 23[083] - branch back T11 - 28[089] - return null S2 2 + 23[084] - branch back T11 + 28[091] - return null S2 2 Planner.incremental-remove tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -959,8 +959,8 @@ Planner.incremental-remove tests/type_propagation/deltablue-test.toit 50[062] - invoke eq // [{Strength}, {Strength}] -> {True_|False_} 51[082] - branch if false T57 54[080] - branch T62 - 57[083] - branch back T26 - 62[089] - return null S3 2 + 57[084] - branch back T26 + 62[091] - return null S3 2 [block] in Planner.incremental-remove tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -976,7 +976,7 @@ Planner.incremental-remove tests/type_propagation/deltablue-test.toit 14[005] - load outer S7 // {Planner} 16[017] - load local 3 17[053] - invoke static Planner.incremental-add tests/type_propagation/deltablue-test.toit // [{Planner}, {*}] -> {Null_} - 20[088] - return S1 2 + 20[090] - return S1 2 Planner.new-mark tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -986,7 +986,7 @@ Planner.new-mark tests/type_propagation/deltablue-test.toit 4[073] - invoke add // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[011] - store field 0 7[048] - as class LargeInteger_(22 - 24) // {True_} - 9[088] - return S1 1 + 9[090] - return S1 1 Planner.make-plan tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1026,9 +1026,9 @@ Planner.make-plan tests/type_propagation/deltablue-test.toit 69[053] - invoke static Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit // [{Planner}, {Null_|Variable}, {List_}] -> {Null_} 72[041] - pop 1 73[041] - pop 1 - 74[083] - branch back T12 + 74[084] - branch back T12 79[015] - load local 1 - 80[088] - return S4 2 + 80[090] - return S4 2 Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1048,7 +1048,7 @@ Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit 26[002] - pop, load local S4 28[015] - load local 1 29[053] - invoke static Planner.make-plan tests/type_propagation/deltablue-test.toit // [{Planner}, {List_}] -> {Plan} - 32[088] - return S2 2 + 32[090] - return S2 2 [block] in Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1064,7 +1064,7 @@ Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit 18[005] - load outer S1 // {List_} 20[017] - load local 3 21[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 24[088] - return S1 2 + 24[090] - return S1 2 Planner.add-propagate tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1092,7 +1092,7 @@ Planner.add-propagate tests/type_propagation/deltablue-test.toit 43[041] - pop 1 44[020] - load literal false 46[048] - as class True_(18 - 20) // {True_} - 48[088] - return S3 3 + 48[090] - return S3 3 51[014] - load local 0 52[058] - invoke virtual recalculate // [{*}] -> {Null_} 56[002] - pop, load local S6 @@ -1101,10 +1101,10 @@ Planner.add-propagate tests/type_propagation/deltablue-test.toit 63[017] - load local 3 64[053] - invoke static Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit // [{Planner}, {Null_|Variable}, {List_}] -> {Null_} 67[040] - pop 2 - 69[083] - branch back T11 + 69[084] - branch back T11 74[020] - load literal true 76[048] - as class True_(18 - 20) // {True_} - 78[088] - return S2 3 + 78[090] - return S2 3 Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1147,9 +1147,9 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 76[038] - load block 1 78[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} 82[040] - pop 4 - 84[083] - branch back T34 + 84[084] - branch back T34 89[015] - load local 1 - 90[088] - return S3 2 + 90[090] - return S3 2 [block] in Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1162,7 +1162,7 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 10[005] - load outer S3 // {List_} 12[017] - load local 3 13[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 16[088] - return S1 2 + 16[090] - return S1 2 [block] in Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1183,7 +1183,7 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 26[017] - load local 3 27[058] - invoke virtual output // [{*}] -> {Null_|Variable} 31[053] - invoke static List.add /core/collections.toit // [{List_}, {Null_|Variable}] -> {Null_} - 34[088] - return S1 2 + 34[090] - return S1 2 Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1196,7 +1196,7 @@ Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit 11[009] - load field local 101 // [{Variable}] -> {Null_|List_} 13[038] - load block 1 15[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} - 19[089] - return null S3 3 + 19[091] - return null S3 3 [block] in Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1214,7 +1214,7 @@ Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit 18[005] - load outer S4 // {List_} 20[017] - load local 3 21[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 24[088] - return S1 2 + 24[090] - return S1 2 Plan tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1227,7 +1227,7 @@ Plan tests/type_propagation/deltablue-test.toit 9[053] - invoke static create-list-literal-from-array_ /core/collections.toit // [{LargeArray_|SmallArray_}] -> {List_} 12[013] - store field, pop 0 14[016] - load local 2 - 15[088] - return S1 1 + 15[090] - return S1 1 Plan.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1236,7 +1236,7 @@ Plan.add-constraint tests/type_propagation/deltablue-test.toit 2[009] - load field local 3 // [{Plan}] -> {Null_|List_} 4[017] - load local 3 5[053] - invoke static List.add /core/collections.toit // [{Null_|List_}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 8[089] - return null S1 2 + 8[091] - return null S1 2 Plan.execute tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1244,14 +1244,14 @@ Plan.execute tests/type_propagation/deltablue-test.toit 5[009] - load field local 3 // [{Plan}] -> {Null_|List_} 7[038] - load block 1 9[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} - 13[089] - return null S2 1 + 13[091] - return null S2 1 [block] in Plan.execute tests/type_propagation/deltablue-test.toit - argument 0: [block] - argument 1: {*} 0[016] - load local 2 1[058] - invoke virtual execute // [{*}] -> {Null_} - 5[088] - return S1 2 + 5[090] - return S1 2 chain-test tests/type_propagation/deltablue-test.toit - argument 0: {SmallInteger_} @@ -1305,7 +1305,7 @@ chain-test tests/type_propagation/deltablue-test.toit 78[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 79[004] - store local, pop S2 81[041] - pop 1 - 82[083] - branch back T14 + 82[084] - branch back T14 87[041] - pop 1 88[042] - allocate instance StayConstraint 90[032] - load global var lazy G3 // {Strength} @@ -1371,8 +1371,8 @@ chain-test tests/type_propagation/deltablue-test.toit 200[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 201[004] - store local, pop S2 203[041] - pop 1 -204[083] - branch back T119 -209[089] - return null S6 1 +204[084] - branch back T119 +209[091] - return null S6 1 projection-test tests/type_propagation/deltablue-test.toit - argument 0: {SmallInteger_} @@ -1443,7 +1443,7 @@ projection-test tests/type_propagation/deltablue-test.toit 118[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 119[004] - store local, pop S2 121[041] - pop 1 -122[083] - branch back T43 +122[084] - branch back T43 127[002] - pop, load local S2 129[026] - load smi 17 131[053] - invoke static change tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {SmallInteger_}] -> {Null_} @@ -1497,7 +1497,7 @@ projection-test tests/type_propagation/deltablue-test.toit 220[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 221[004] - store local, pop S2 223[041] - pop 1 -224[083] - branch back T184 +224[084] - branch back T184 229[002] - pop, load local S3 231[027] - load smi 2000 234[053] - invoke static change tests/type_propagation/deltablue-test.toit // [{Variable}, {SmallInteger_}] -> {Null_} @@ -1529,8 +1529,8 @@ projection-test tests/type_propagation/deltablue-test.toit 275[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 276[004] - store local, pop S2 278[041] - pop 1 -279[083] - branch back T239 -284[089] - return null S6 1 +279[084] - branch back T239 +284[091] - return null S6 1 change tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Variable} @@ -1553,7 +1553,7 @@ change tests/type_propagation/deltablue-test.toit 38[041] - pop 1 39[002] - pop, load local S1 41[053] - invoke static Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit // [{EditConstraint}] -> {Null_} - 44[089] - return null S3 2 + 44[091] - return null S3 2 [block] in change tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1565,4 +1565,4 @@ change tests/type_propagation/deltablue-test.toit 8[016] - load local 2 9[005] - load outer S1 // {Plan} 11[053] - invoke static Plan.execute tests/type_propagation/deltablue-test.toit // [{Plan}] -> {Null_} - 14[088] - return S1 1 + 14[090] - return S1 1 diff --git a/tests/type_propagation/gold/deltablue-test.gold-O2 b/tests/type_propagation/gold/deltablue-test.gold-O2 index 3cb158bd3..605842925 100644 --- a/tests/type_propagation/gold/deltablue-test.gold-O2 +++ b/tests/type_propagation/gold/deltablue-test.gold-O2 @@ -3,7 +3,7 @@ main tests/type_propagation/deltablue-test.toit 5[026] - load smi 10 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {Null_} - 13[089] - return null S2 0 + 13[091] - return null S2 0 [block] in main tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -12,7 +12,7 @@ main tests/type_propagation/deltablue-test.toit 5[041] - pop 1 6[026] - load smi 50 8[053] - invoke static projection-test tests/type_propagation/deltablue-test.toit // [{SmallInteger_}] -> {Null_} - 11[088] - return S1 1 + 11[090] - return S1 1 Strength tests/type_propagation/deltablue-test.toit - argument 0: {Strength} @@ -25,12 +25,12 @@ Strength tests/type_propagation/deltablue-test.toit 5[017] - load local 3 6[013] - store field, pop 1 8[018] - load local 4 - 9[088] - return S1 3 + 9[090] - return S1 3 Strength.value tests/type_propagation/deltablue-test.toit - argument 0: {Strength} 0[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Strength.next-weaker tests/type_propagation/deltablue-test.toit - argument 0: {Strength} @@ -39,37 +39,37 @@ Strength.next-weaker tests/type_propagation/deltablue-test.toit 3[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 4[082] - branch if false T12 7[032] - load global var lazy G6 // {Strength} - 9[088] - return S1 1 + 9[090] - return S1 1 12[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 14[025] - load smi 1 15[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 16[082] - branch if false T24 19[032] - load global var lazy G5 // {Strength} - 21[088] - return S1 1 + 21[090] - return S1 1 24[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 26[026] - load smi 2 28[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 29[082] - branch if false T37 32[032] - load global var lazy G4 // {Strength} - 34[088] - return S1 1 + 34[090] - return S1 1 37[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 39[026] - load smi 3 41[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 42[082] - branch if false T50 45[032] - load global var lazy G3 // {Strength} - 47[088] - return S1 1 + 47[090] - return S1 1 50[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 52[026] - load smi 4 54[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 55[082] - branch if false T63 58[032] - load global var lazy G2 // {Strength} - 60[088] - return S1 1 + 60[090] - return S1 1 63[009] - load field local 2 // [{Strength}] -> {Null_|SmallInteger_} 65[026] - load smi 5 67[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 68[082] - branch if false T76 71[032] - load global var lazy G1 // {Strength} - 73[088] - return S1 1 + 73[090] - return S1 1 76[053] - invoke static unreachable /core/exceptions.toit // {} 79[041] - pop 1 @@ -78,49 +78,49 @@ REQUIRED tests/type_propagation/deltablue-test.toit 2[023] - load smi 0 3[020] - load literal required 5[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 8[088] - return S1 0 + 8[090] - return S1 0 STRONG-REFERRED tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[025] - load smi 1 3[020] - load literal strongPreferred 5[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 8[088] - return S1 0 + 8[090] - return S1 0 PREFERRED tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 2 4[020] - load literal preferred 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 STRONG-DEFAULT tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 3 4[020] - load literal strongDefault 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 NORMAL tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 4 4[020] - load literal normal 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 WEAK-DEFAULT tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 5 4[020] - load literal weakDefault 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 WEAKEST tests/type_propagation/deltablue-test.toit 0[042] - allocate instance Strength 2[026] - load smi 6 4[020] - load literal weakest 6[053] - invoke static Strength tests/type_propagation/deltablue-test.toit // [{Strength}, {SmallInteger_}, {String_}] -> {Strength} - 9[088] - return S1 0 + 9[090] - return S1 0 stronger tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -130,7 +130,7 @@ stronger tests/type_propagation/deltablue-test.toit 4[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 6[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 8[063] - invoke lt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} - 9[088] - return S1 2 + 9[090] - return S1 2 weaker tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -140,7 +140,7 @@ weaker tests/type_propagation/deltablue-test.toit 4[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 6[009] - load field local 3 // [{Strength}] -> {Null_|SmallInteger_} 8[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} - 9[088] - return S1 2 + 9[090] - return S1 2 weakest tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Strength} @@ -152,15 +152,15 @@ weakest tests/type_propagation/deltablue-test.toit 6[053] - invoke static weaker tests/type_propagation/deltablue-test.toit // [{Strength}, {Strength}] -> {True_|False_} 9[082] - branch if false T19 12[017] - load local 3 - 13[088] - return S1 2 + 13[090] - return S1 2 16[080] - branch T23 19[016] - load local 2 - 20[088] - return S1 2 + 20[090] - return S1 2 Constraint.strength tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 0[009] - load field local 2 // [{EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_|Strength} - 2[088] - return S1 1 + 2[090] - return S1 1 Constraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -169,7 +169,7 @@ Constraint tests/type_propagation/deltablue-test.toit 1[017] - load local 3 2[013] - store field, pop 0 4[017] - load local 3 - 5[088] - return S1 2 + 5[090] - return S1 2 Constraint.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -179,7 +179,7 @@ Constraint.add-constraint tests/type_propagation/deltablue-test.toit 6[030] - load global var G7 // {Null_|Planner} 8[017] - load local 3 9[058] - invoke virtual incremental-add // [{Null_|Planner}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 13[089] - return null S1 1 + 13[091] - return null S1 1 Constraint.satisfy tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} @@ -197,7 +197,7 @@ Constraint.satisfy tests/type_propagation/deltablue-test.toit 22[020] - load literal Could not satisfy a required constraint! 24[053] - invoke static throw /core/exceptions.toit // [{String_}] -> {} 27[041] - pop 1 - 28[089] - return null S0 2 + 28[091] - return null S0 2 31[017] - load local 3 32[017] - load local 3 33[058] - invoke virtual mark-inputs // [{EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}, {LargeInteger_|SmallInteger_}] -> {Null_} @@ -224,7 +224,7 @@ Constraint.satisfy tests/type_propagation/deltablue-test.toit 80[019] - load local 5 81[013] - store field, pop 3 83[014] - load local 0 - 84[088] - return S3 2 + 84[090] - return S3 2 Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} @@ -237,17 +237,17 @@ Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit 14[041] - pop 1 15[016] - load local 2 16[058] - invoke virtual remove-from-graph // [{EditConstraint}] -> {Null_} - 20[089] - return null S1 1 + 20[091] - return null S1 1 Constraint.is-input tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint|StayConstraint} 0[020] - load literal false - 2[088] - return S1 1 + 2[090] - return S1 1 UnaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} 0[009] - load field local 34 // [{EditConstraint|StayConstraint}] -> {Null_|True_|False_} - 2[088] - return S1 1 + 2[090] - return S1 1 UnaryConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -265,7 +265,7 @@ UnaryConstraint tests/type_propagation/deltablue-test.toit 14[002] - pop, load local S4 16[053] - invoke static Constraint.add-constraint tests/type_propagation/deltablue-test.toit // [{EditConstraint|StayConstraint}] -> {Null_} 19[002] - pop, load local S4 - 21[088] - return S1 3 + 21[090] - return S1 3 UnaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -275,7 +275,7 @@ UnaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 6[002] - pop, load local S2 8[020] - load literal false 10[013] - store field, pop 2 - 12[089] - return null S0 1 + 12[091] - return null S0 1 UnaryConstraint.choose-method tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -296,17 +296,17 @@ UnaryConstraint.choose-method tests/type_propagation/deltablue-test.toit 25[007] - load field 4 // [{Null_|Variable}] -> {Null_|Strength} 27[053] - invoke static stronger tests/type_propagation/deltablue-test.toit // [{Null_|Strength}, {Null_|Strength}] -> {True_|False_} 30[013] - store field, pop 2 - 32[089] - return null S0 2 + 32[091] - return null S0 2 UnaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} - argument 1: {LargeInteger_|SmallInteger_} - 0[089] - return null S0 2 + 0[091] - return null S0 2 UnaryConstraint.output tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} 0[009] - load field local 18 // [{EditConstraint|StayConstraint}] -> {Null_|Variable} - 2[088] - return S1 1 + 2[090] - return S1 1 UnaryConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -327,20 +327,20 @@ UnaryConstraint.recalculate tests/type_propagation/deltablue-test.toit 32[016] - load local 2 33[058] - invoke virtual execute // [{EditConstraint|StayConstraint}] -> {Null_} 37[041] - pop 1 - 38[089] - return null S0 1 + 38[091] - return null S0 1 UnaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} 0[016] - load local 2 1[020] - load literal false 3[013] - store field, pop 2 - 5[089] - return null S0 1 + 5[091] - return null S0 1 UnaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} - argument 1: {LargeInteger_|SmallInteger_} 0[020] - load literal true - 2[088] - return S1 2 + 2[090] - return S1 2 UnaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint|StayConstraint} @@ -350,7 +350,7 @@ UnaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 6[002] - pop, load local S2 8[020] - load literal false 10[013] - store field, pop 2 - 12[089] - return null S0 1 + 12[091] - return null S0 1 StayConstraint tests/type_propagation/deltablue-test.toit - argument 0: {StayConstraint} @@ -362,11 +362,11 @@ StayConstraint tests/type_propagation/deltablue-test.toit 4[018] - load local 4 5[053] - invoke static UnaryConstraint tests/type_propagation/deltablue-test.toit // [{StayConstraint}, {Strength}, {Variable}] -> {StayConstraint} 8[002] - pop, load local S4 - 10[088] - return S1 3 + 10[090] - return S1 3 StayConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {StayConstraint} - 0[089] - return null S0 1 + 0[091] - return null S0 1 EditConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} @@ -378,16 +378,16 @@ EditConstraint tests/type_propagation/deltablue-test.toit 4[018] - load local 4 5[053] - invoke static UnaryConstraint tests/type_propagation/deltablue-test.toit // [{EditConstraint}, {Strength}, {Variable}] -> {EditConstraint} 8[002] - pop, load local S4 - 10[088] - return S1 3 + 10[090] - return S1 3 EditConstraint.is-input tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} 0[020] - load literal true - 2[088] - return S1 1 + 2[090] - return S1 1 EditConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {EditConstraint} - 0[089] - return null S0 1 + 0[091] - return null S0 1 BinaryConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -409,7 +409,7 @@ BinaryConstraint tests/type_propagation/deltablue-test.toit 17[002] - pop, load local S5 19[053] - invoke static Constraint.add-constraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint|ScaleConstraint}] -> {Null_} 22[002] - pop, load local S5 - 24[088] - return S1 4 + 24[090] - return S1 4 BinaryConstraint.choose-method tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -483,7 +483,7 @@ BinaryConstraint.choose-method tests/type_propagation/deltablue-test.toit 128[041] - pop 1 129[026] - load smi 2 131[013] - store field, pop 3 -133[089] - return null S0 2 +133[091] - return null S0 2 BinaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -496,7 +496,7 @@ BinaryConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 12[002] - pop, load local S2 14[025] - load smi 1 15[013] - store field, pop 3 - 17[089] - return null S0 1 + 17[091] - return null S0 1 BinaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -507,7 +507,7 @@ BinaryConstraint.is-satisfied tests/type_propagation/deltablue-test.toit 7[020] - load literal true 9[080] - branch T14 12[020] - load literal false - 14[088] - return S1 1 + 14[090] - return S1 1 BinaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -516,7 +516,7 @@ BinaryConstraint.mark-inputs tests/type_propagation/deltablue-test.toit 1[053] - invoke static BinaryConstraint.input tests/type_propagation/deltablue-test.toit // [{EqualityConstraint|ScaleConstraint}] -> {Variable} 4[017] - load local 3 5[013] - store field, pop 3 - 7[089] - return null S0 2 + 7[091] - return null S0 2 BinaryConstraint.input tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -528,7 +528,7 @@ BinaryConstraint.input tests/type_propagation/deltablue-test.toit 10[080] - branch T15 13[009] - load field local 34 // [{EqualityConstraint|ScaleConstraint}] -> {Null_|Variable} 15[048] - as class Variable(37 - 38) // {True_|False_} - 17[088] - return S1 1 + 17[090] - return S1 1 BinaryConstraint.output tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -540,7 +540,7 @@ BinaryConstraint.output tests/type_propagation/deltablue-test.toit 10[080] - branch T15 13[009] - load field local 18 // [{EqualityConstraint|ScaleConstraint}] -> {Null_|Variable} 15[048] - as class Variable(37 - 38) // {True_|False_} - 17[088] - return S1 1 + 17[090] - return S1 1 BinaryConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -561,14 +561,14 @@ BinaryConstraint.recalculate tests/type_propagation/deltablue-test.toit 28[018] - load local 4 29[058] - invoke virtual execute // [{EqualityConstraint}] -> {Null_} 33[041] - pop 1 - 34[089] - return null S2 1 + 34[091] - return null S2 1 BinaryConstraint.mark-unsatisfied tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} 0[016] - load local 2 1[025] - load smi 1 2[013] - store field, pop 3 - 4[089] - return null S0 1 + 4[091] - return null S0 1 BinaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -585,7 +585,7 @@ BinaryConstraint.inputs-known tests/type_propagation/deltablue-test.toit 15[081] - branch if true T20 18[010] - pop, load field local 32 // [{Variable}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 20[048] - as class True_(15 - 17) // {True_|False_} - 22[088] - return S2 2 + 22[090] - return S2 2 BinaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint|ScaleConstraint} @@ -598,7 +598,7 @@ BinaryConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 12[002] - pop, load local S2 14[025] - load smi 1 15[013] - store field, pop 3 - 17[089] - return null S0 1 + 17[091] - return null S0 1 ScaleConstraint tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -619,7 +619,7 @@ ScaleConstraint tests/type_propagation/deltablue-test.toit 16[000] - load local S7 18[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{ScaleConstraint}, {Strength}, {Variable}, {Variable}] -> {ScaleConstraint} 21[002] - pop, load local S7 - 23[088] - return S1 6 + 23[090] - return S1 6 ScaleConstraint.add-to-graph tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -631,7 +631,7 @@ ScaleConstraint.add-to-graph tests/type_propagation/deltablue-test.toit 10[010] - pop, load field local 82 // [{ScaleConstraint}] -> {Null_|Variable} 12[017] - load local 3 13[053] - invoke static Variable.add-constraint tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {ScaleConstraint}] -> {Null_} - 16[089] - return null S1 1 + 16[091] - return null S1 1 ScaleConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -643,7 +643,7 @@ ScaleConstraint.remove-from-graph tests/type_propagation/deltablue-test.toit 10[010] - pop, load field local 82 // [{ScaleConstraint}] -> {Null_|Variable} 12[017] - load local 3 13[053] - invoke static Variable.remove-constraint tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {ScaleConstraint}] -> {Null_} - 16[089] - return null S1 1 + 16[091] - return null S1 1 ScaleConstraint.mark-inputs tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -656,7 +656,7 @@ ScaleConstraint.mark-inputs tests/type_propagation/deltablue-test.toit 9[018] - load local 4 10[011] - store field 3 12[013] - store field, pop 3 - 14[089] - return null S0 2 + 14[091] - return null S0 2 ScaleConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -685,7 +685,7 @@ ScaleConstraint.execute tests/type_propagation/deltablue-test.toit 42[007] - load field 1 // [{Null_|Variable}] -> {Null_|LargeInteger_|SmallInteger_} 44[076] - invoke div // [{LargeInteger_|SmallInteger_}, {Null_|LargeInteger_|SmallInteger_}] -> {LargeInteger_|SmallInteger_} 45[013] - store field, pop 1 - 47[089] - return null S0 1 + 47[091] - return null S0 1 ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit - argument 0: {ScaleConstraint} @@ -714,7 +714,7 @@ ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit 44[018] - load local 4 45[053] - invoke static ScaleConstraint.execute tests/type_propagation/deltablue-test.toit // [{ScaleConstraint}] -> {Null_} 48[041] - pop 1 - 49[089] - return null S2 1 + 49[091] - return null S2 1 EqualityConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -728,7 +728,7 @@ EqualityConstraint tests/type_propagation/deltablue-test.toit 5[019] - load local 5 6[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} 9[002] - pop, load local S5 - 11[088] - return S1 4 + 11[090] - return S1 4 EqualityConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -738,7 +738,7 @@ EqualityConstraint.execute tests/type_propagation/deltablue-test.toit 5[053] - invoke static BinaryConstraint.input tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}] -> {Variable} 8[007] - load field 1 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} 10[013] - store field, pop 1 - 12[089] - return null S0 1 + 12[091] - return null S0 1 Variable tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -768,12 +768,12 @@ Variable tests/type_propagation/deltablue-test.toit 31[053] - invoke static create-list-literal-from-array_ /core/collections.toit // [{LargeArray_|SmallArray_}] -> {List_} 34[013] - store field, pop 6 36[018] - load local 4 - 37[088] - return S1 3 + 37[090] - return S1 3 Variable.value tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 18 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.value= tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -781,17 +781,17 @@ Variable.value= tests/type_propagation/deltablue-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 1 - 4[088] - return S1 2 + 4[090] - return S1 2 Variable.determined-by tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 34 // [{Variable}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.mark tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 50 // [{Variable}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.mark= tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -799,12 +799,12 @@ Variable.mark= tests/type_propagation/deltablue-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 3 - 4[088] - return S1 2 + 4[090] - return S1 2 Variable.constraints tests/type_propagation/deltablue-test.toit - argument 0: {Variable} 0[009] - load field local 98 // [{Variable}] -> {Null_|List_} - 2[088] - return S1 1 + 2[090] - return S1 1 Variable.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -812,7 +812,7 @@ Variable.add-constraint tests/type_propagation/deltablue-test.toit 0[009] - load field local 99 // [{Variable}] -> {Null_|List_} 2[017] - load local 3 3[058] - invoke virtual add // [{Null_|List_}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 7[089] - return null S1 2 + 7[091] - return null S1 2 Variable.remove-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Variable} @@ -831,7 +831,7 @@ Variable.remove-constraint tests/type_propagation/deltablue-test.toit 25[017] - load local 3 26[022] - load null 27[013] - store field, pop 2 - 29[089] - return null S0 2 + 29[091] - return null S0 2 [block] in Variable.remove-constraint tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -844,7 +844,7 @@ Variable.remove-constraint tests/type_propagation/deltablue-test.toit 8[020] - load literal true 10[080] - branch T15 13[020] - load literal false - 15[088] - return S1 2 + 15[090] - return S1 2 Planner tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -852,7 +852,7 @@ Planner tests/type_propagation/deltablue-test.toit 1[023] - load smi 0 2[013] - store field, pop 0 4[016] - load local 2 - 5[088] - return S1 1 + 5[090] - return S1 1 Planner.incremental-add tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -869,8 +869,8 @@ Planner.incremental-add tests/type_propagation/deltablue-test.toit 16[016] - load local 2 17[058] - invoke virtual satisfy // [{Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}, {LargeInteger_|SmallInteger_}] -> {Null_|EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint} 21[004] - store local, pop S1 - 23[083] - branch back T11 - 28[089] - return null S2 2 + 23[084] - branch back T11 + 28[091] - return null S2 2 Planner.incremental-remove tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -898,8 +898,8 @@ Planner.incremental-remove tests/type_propagation/deltablue-test.toit 48[062] - invoke eq // [{Strength}, {Strength}] -> {True_|False_} 49[082] - branch if false T55 52[080] - branch T60 - 55[083] - branch back T24 - 60[089] - return null S3 2 + 55[084] - branch back T24 + 60[091] - return null S3 2 [block] in Planner.incremental-remove tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -915,7 +915,7 @@ Planner.incremental-remove tests/type_propagation/deltablue-test.toit 14[005] - load outer S7 // {Planner} 16[017] - load local 3 17[053] - invoke static Planner.incremental-add tests/type_propagation/deltablue-test.toit // [{Planner}, {*}] -> {Null_} - 20[088] - return S1 2 + 20[090] - return S1 2 Planner.new-mark tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -924,7 +924,7 @@ Planner.new-mark tests/type_propagation/deltablue-test.toit 3[025] - load smi 1 4[073] - invoke add // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[011] - store field 0 - 7[088] - return S1 1 + 7[090] - return S1 1 Planner.make-plan tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -963,9 +963,9 @@ Planner.make-plan tests/type_propagation/deltablue-test.toit 67[053] - invoke static Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit // [{Planner}, {Null_|Variable}, {List_}] -> {Null_} 70[041] - pop 1 71[041] - pop 1 - 72[083] - branch back T10 + 72[084] - branch back T10 77[015] - load local 1 - 78[088] - return S4 2 + 78[090] - return S4 2 Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -984,7 +984,7 @@ Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit 24[002] - pop, load local S4 26[015] - load local 1 27[053] - invoke static Planner.make-plan tests/type_propagation/deltablue-test.toit // [{Planner}, {List_}] -> {Plan} - 30[088] - return S2 2 + 30[090] - return S2 2 [block] in Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1000,7 +1000,7 @@ Planner.extract-plan-from-constraints tests/type_propagation/deltablue-test.toit 18[005] - load outer S1 // {List_} 20[017] - load local 3 21[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 24[088] - return S1 2 + 24[090] - return S1 2 Planner.add-propagate tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1025,7 +1025,7 @@ Planner.add-propagate tests/type_propagation/deltablue-test.toit 36[053] - invoke static Planner.incremental-remove tests/type_propagation/deltablue-test.toit // [{Planner}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} 39[041] - pop 1 40[020] - load literal false - 42[088] - return S3 3 + 42[090] - return S3 3 45[014] - load local 0 46[058] - invoke virtual recalculate // [{*}] -> {Null_} 50[002] - pop, load local S6 @@ -1034,9 +1034,9 @@ Planner.add-propagate tests/type_propagation/deltablue-test.toit 57[017] - load local 3 58[053] - invoke static Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit // [{Planner}, {Null_|Variable}, {List_}] -> {Null_} 61[040] - pop 2 - 63[083] - branch back T7 + 63[084] - branch back T7 68[020] - load literal true - 70[088] - return S2 3 + 70[090] - return S2 3 Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1079,9 +1079,9 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 76[038] - load block 1 78[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} 82[040] - pop 4 - 84[083] - branch back T34 + 84[084] - branch back T34 89[015] - load local 1 - 90[088] - return S3 2 + 90[090] - return S3 2 [block] in Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1094,7 +1094,7 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 10[005] - load outer S3 // {List_} 12[017] - load local 3 13[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 16[088] - return S1 2 + 16[090] - return S1 2 [block] in Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1115,7 +1115,7 @@ Planner.remove-propagate-from tests/type_propagation/deltablue-test.toit 26[017] - load local 3 27[058] - invoke virtual output // [{*}] -> {Null_|Variable} 31[053] - invoke static List.add /core/collections.toit // [{List_}, {Null_|Variable}] -> {Null_} - 34[088] - return S1 2 + 34[090] - return S1 2 Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit - argument 0: {Planner} @@ -1127,7 +1127,7 @@ Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit 9[009] - load field local 101 // [{Variable}] -> {Null_|List_} 11[038] - load block 1 13[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} - 17[089] - return null S3 3 + 17[091] - return null S3 3 [block] in Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1145,7 +1145,7 @@ Planner.add-constraints-consuming-to tests/type_propagation/deltablue-test.toit 18[005] - load outer S4 // {List_} 20[017] - load local 3 21[053] - invoke static List.add /core/collections.toit // [{List_}, {*}] -> {Null_} - 24[088] - return S1 2 + 24[090] - return S1 2 Plan tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1158,7 +1158,7 @@ Plan tests/type_propagation/deltablue-test.toit 9[053] - invoke static create-list-literal-from-array_ /core/collections.toit // [{LargeArray_|SmallArray_}] -> {List_} 12[013] - store field, pop 0 14[016] - load local 2 - 15[088] - return S1 1 + 15[090] - return S1 1 Plan.add-constraint tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1167,7 +1167,7 @@ Plan.add-constraint tests/type_propagation/deltablue-test.toit 2[009] - load field local 3 // [{Plan}] -> {Null_|List_} 4[017] - load local 3 5[053] - invoke static List.add /core/collections.toit // [{Null_|List_}, {EqualityConstraint|ScaleConstraint|EditConstraint|StayConstraint}] -> {Null_} - 8[089] - return null S1 2 + 8[091] - return null S1 2 Plan.execute tests/type_propagation/deltablue-test.toit - argument 0: {Plan} @@ -1175,14 +1175,14 @@ Plan.execute tests/type_propagation/deltablue-test.toit 5[009] - load field local 3 // [{Plan}] -> {Null_|List_} 7[038] - load block 1 9[058] - invoke virtual do // [{Null_|List_}, [block]] -> {Null_} - 13[089] - return null S2 1 + 13[091] - return null S2 1 [block] in Plan.execute tests/type_propagation/deltablue-test.toit - argument 0: [block] - argument 1: {*} 0[016] - load local 2 1[058] - invoke virtual execute // [{*}] -> {Null_} - 5[088] - return S1 2 + 5[090] - return S1 2 chain-test tests/type_propagation/deltablue-test.toit - argument 0: {SmallInteger_} @@ -1234,7 +1234,7 @@ chain-test tests/type_propagation/deltablue-test.toit 74[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 75[004] - store local, pop S2 77[041] - pop 1 - 78[083] - branch back T12 + 78[084] - branch back T12 83[041] - pop 1 84[042] - allocate instance StayConstraint 86[032] - load global var lazy G3 // {Strength} @@ -1300,8 +1300,8 @@ chain-test tests/type_propagation/deltablue-test.toit 196[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 197[004] - store local, pop S2 199[041] - pop 1 -200[083] - branch back T115 -205[089] - return null S6 1 +200[084] - branch back T115 +205[091] - return null S6 1 projection-test tests/type_propagation/deltablue-test.toit - argument 0: {SmallInteger_} @@ -1369,7 +1369,7 @@ projection-test tests/type_propagation/deltablue-test.toit 112[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 113[004] - store local, pop S2 115[041] - pop 1 -116[083] - branch back T41 +116[084] - branch back T41 121[002] - pop, load local S2 123[026] - load smi 17 125[053] - invoke static change tests/type_propagation/deltablue-test.toit // [{Null_|Variable}, {SmallInteger_}] -> {Null_} @@ -1423,7 +1423,7 @@ projection-test tests/type_propagation/deltablue-test.toit 214[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 215[004] - store local, pop S2 217[041] - pop 1 -218[083] - branch back T178 +218[084] - branch back T178 223[002] - pop, load local S3 225[027] - load smi 2000 228[053] - invoke static change tests/type_propagation/deltablue-test.toit // [{Variable}, {SmallInteger_}] -> {Null_} @@ -1455,8 +1455,8 @@ projection-test tests/type_propagation/deltablue-test.toit 269[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 270[004] - store local, pop S2 272[041] - pop 1 -273[083] - branch back T233 -278[089] - return null S6 1 +273[084] - branch back T233 +278[091] - return null S6 1 change tests/type_propagation/deltablue-test.toit - argument 0: {Null_|Variable} @@ -1478,7 +1478,7 @@ change tests/type_propagation/deltablue-test.toit 36[041] - pop 1 37[002] - pop, load local S1 39[053] - invoke static Constraint.destroy-constraint tests/type_propagation/deltablue-test.toit // [{EditConstraint}] -> {Null_} - 42[089] - return null S3 2 + 42[091] - return null S3 2 [block] in change tests/type_propagation/deltablue-test.toit - argument 0: [block] @@ -1490,4 +1490,4 @@ change tests/type_propagation/deltablue-test.toit 8[016] - load local 2 9[005] - load outer S1 // {Plan} 11[053] - invoke static Plan.execute tests/type_propagation/deltablue-test.toit // [{Plan}] -> {Null_} - 14[088] - return S1 1 + 14[090] - return S1 1 diff --git a/tests/type_propagation/gold/field-test.gold b/tests/type_propagation/gold/field-test.gold index 3fde47faa..99c4777db 100644 --- a/tests/type_propagation/gold/field-test.gold +++ b/tests/type_propagation/gold/field-test.gold @@ -1,6 +1,6 @@ main tests/type_propagation/field-test.toit 0[053] - invoke static test-simple tests/type_propagation/field-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-simple tests/type_propagation/field-test.toit 0[042] - allocate instance A @@ -26,17 +26,17 @@ test-simple tests/type_propagation/field-test.toit 43[053] - invoke static id tests/type_propagation/field-test.toit // [{Null_|True_}] -> {Null_|True_} 46[010] - pop, load field local 16 // [{B}] -> {Null_|SmallInteger_} 48[053] - invoke static id tests/type_propagation/field-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 51[089] - return null S3 0 + 51[091] - return null S3 0 id tests/type_propagation/field-test.toit - argument 0: {String_|Null_|True_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 A.x tests/type_propagation/field-test.toit - argument 0: {A} 0[009] - load field local 2 // [{A}] -> {String_|Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 A tests/type_propagation/field-test.toit - argument 0: {A|B} @@ -45,7 +45,7 @@ A tests/type_propagation/field-test.toit 1[017] - load local 3 2[013] - store field, pop 0 4[017] - load local 3 - 5[088] - return S1 2 + 5[090] - return S1 2 B tests/type_propagation/field-test.toit - argument 0: {B} @@ -58,4 +58,4 @@ B tests/type_propagation/field-test.toit 5[018] - load local 4 6[053] - invoke static A tests/type_propagation/field-test.toit // [{B}, {True_}] -> {B} 9[002] - pop, load local S4 - 11[088] - return S1 3 + 11[090] - return S1 3 diff --git a/tests/type_propagation/gold/field-test.gold-O2 b/tests/type_propagation/gold/field-test.gold-O2 index 3fde47faa..99c4777db 100644 --- a/tests/type_propagation/gold/field-test.gold-O2 +++ b/tests/type_propagation/gold/field-test.gold-O2 @@ -1,6 +1,6 @@ main tests/type_propagation/field-test.toit 0[053] - invoke static test-simple tests/type_propagation/field-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-simple tests/type_propagation/field-test.toit 0[042] - allocate instance A @@ -26,17 +26,17 @@ test-simple tests/type_propagation/field-test.toit 43[053] - invoke static id tests/type_propagation/field-test.toit // [{Null_|True_}] -> {Null_|True_} 46[010] - pop, load field local 16 // [{B}] -> {Null_|SmallInteger_} 48[053] - invoke static id tests/type_propagation/field-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 51[089] - return null S3 0 + 51[091] - return null S3 0 id tests/type_propagation/field-test.toit - argument 0: {String_|Null_|True_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 A.x tests/type_propagation/field-test.toit - argument 0: {A} 0[009] - load field local 2 // [{A}] -> {String_|Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 A tests/type_propagation/field-test.toit - argument 0: {A|B} @@ -45,7 +45,7 @@ A tests/type_propagation/field-test.toit 1[017] - load local 3 2[013] - store field, pop 0 4[017] - load local 3 - 5[088] - return S1 2 + 5[090] - return S1 2 B tests/type_propagation/field-test.toit - argument 0: {B} @@ -58,4 +58,4 @@ B tests/type_propagation/field-test.toit 5[018] - load local 4 6[053] - invoke static A tests/type_propagation/field-test.toit // [{B}, {True_}] -> {B} 9[002] - pop, load local S4 - 11[088] - return S1 3 + 11[090] - return S1 3 diff --git a/tests/type_propagation/gold/finally-test.gold b/tests/type_propagation/gold/finally-test.gold index 916c45f40..15b709174 100644 --- a/tests/type_propagation/gold/finally-test.gold +++ b/tests/type_propagation/gold/finally-test.gold @@ -6,18 +6,18 @@ main tests/type_propagation/finally-test.toit 8[053] - invoke static test-catchy tests/type_propagation/finally-test.toit // {Null_} 11[041] - pop 1 12[053] - invoke static test-nlb-out-of-try tests/type_propagation/finally-test.toit // {Null_} - 15[089] - return null S1 0 + 15[091] - return null S1 0 test-is-exception tests/type_propagation/finally-test.toit 0[053] - invoke static return-is-exception tests/type_propagation/finally-test.toit // {True_|False_} 3[041] - pop 1 4[022] - load null 5[029] - load method [block] in test-is-exception tests/type_propagation/finally-test.toit - 10[094] - link try 0 + 10[096] - link try 0 12[038] - load block 4 14[055] - invoke block S1 // [[block]] -> {Null_} 16[041] - pop 1 - 17[095] - unlink try 0 + 17[097] - unlink try 0 19[020] - load literal -2 21[015] - load local 1 22[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -28,23 +28,23 @@ test-is-exception tests/type_propagation/finally-test.toit 30[015] - load local 1 31[004] - store local, pop S7 33[040] - pop 2 - 35[096] - unwind + 35[098] - unwind 36[002] - pop, load local S0 38[053] - invoke static id tests/type_propagation/finally-test.toit // [{True_|False_}] -> {True_|False_} - 41[089] - return null S2 0 + 41[091] - return null S2 0 [block] in test-is-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 return-is-exception tests/type_propagation/finally-test.toit 0[029] - load method [block] in return-is-exception tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {Null_} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -53,25 +53,25 @@ return-is-exception tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[015] - load local 1 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in return-is-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 test-exception tests/type_propagation/finally-test.toit 0[053] - invoke static return-exception tests/type_propagation/finally-test.toit // {Null_|Exception_} 3[041] - pop 1 4[022] - load null 5[029] - load method [block] in test-exception tests/type_propagation/finally-test.toit - 10[094] - link try 0 + 10[096] - link try 0 12[038] - load block 4 14[055] - invoke block S1 // [[block]] -> {Null_} 16[041] - pop 1 - 17[095] - unlink try 0 + 17[097] - unlink try 0 19[020] - load literal -2 21[015] - load local 1 22[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -82,23 +82,23 @@ test-exception tests/type_propagation/finally-test.toit 30[014] - load local 0 31[004] - store local, pop S7 33[040] - pop 2 - 35[096] - unwind + 35[098] - unwind 36[002] - pop, load local S0 38[053] - invoke static id tests/type_propagation/finally-test.toit // [{Null_|Exception_}] -> {Null_|Exception_} - 41[089] - return null S2 0 + 41[091] - return null S2 0 [block] in test-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 return-exception tests/type_propagation/finally-test.toit 0[029] - load method [block] in return-exception tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {Null_} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -107,26 +107,26 @@ return-exception tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[014] - load local 0 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in return-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 test-catchy tests/type_propagation/finally-test.toit 0[053] - invoke static catchy tests/type_propagation/finally-test.toit // {Null_|True_|False_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 catchy tests/type_propagation/finally-test.toit 0[029] - load method [block] in catchy tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -135,30 +135,30 @@ catchy tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[015] - load local 1 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in catchy tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null 1[017] - load local 3 - 2[090] - non-local return 0 - 4[088] - return S1 1 + 2[092] - non-local return 0 + 4[090] - return S1 1 test-nlb-out-of-try tests/type_propagation/finally-test.toit 0[026] - load smi 4 2[029] - load method [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {Null_} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 17[053] - invoke static id tests/type_propagation/finally-test.toit // [{String_|Null_|SmallInteger_}] -> {String_|Null_|SmallInteger_} 20[041] - pop 1 - 21[096] - unwind - 22[089] - return null S2 0 + 21[098] - unwind + 22[091] - return null S2 0 [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] @@ -166,7 +166,7 @@ test-nlb-out-of-try tests/type_propagation/finally-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/finally-test.toit // [[block]] -> {} 10[040] - pop 2 - 12[083] - branch back T0 + 12[084] - branch back T0 17[016] - load local 2 18[020] - load literal hest 20[006] - store outer S1 @@ -180,36 +180,36 @@ test-nlb-out-of-try tests/type_propagation/finally-test.toit 41[016] - load local 2 42[022] - load null 43[006] - store outer S1 - 45[088] - return S1 1 + 45[090] - return S1 1 [block] in [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] 0[016] - load local 2 - 1[092] - non-local branch {[block] in test-nlb-out-of-try:17} - 7[088] - return S1 1 + 1[094] - non-local branch {[block] in test-nlb-out-of-try:17} + 7[090] - return S1 1 [block] in [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null 1[017] - load local 3 2[005] - load outer S3 // [block] - 4[090] - non-local return 16 - 6[088] - return S1 1 + 4[092] - non-local return 16 + 6[090] - return S1 1 id tests/type_propagation/finally-test.toit - argument 0: {String_|Null_|True_|False_|SmallInteger_|Exception_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/finally-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/finally-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {} - 3[089] - return null S1 1 + 3[091] - return null S1 1 diff --git a/tests/type_propagation/gold/finally-test.gold-O2 b/tests/type_propagation/gold/finally-test.gold-O2 index fe4d71e6b..be6200a66 100644 --- a/tests/type_propagation/gold/finally-test.gold-O2 +++ b/tests/type_propagation/gold/finally-test.gold-O2 @@ -6,18 +6,18 @@ main tests/type_propagation/finally-test.toit 8[053] - invoke static test-catchy tests/type_propagation/finally-test.toit // {Null_} 11[041] - pop 1 12[053] - invoke static test-nlb-out-of-try tests/type_propagation/finally-test.toit // {Null_} - 15[089] - return null S1 0 + 15[091] - return null S1 0 test-is-exception tests/type_propagation/finally-test.toit 0[053] - invoke static return-is-exception tests/type_propagation/finally-test.toit // {True_|False_} 3[041] - pop 1 4[022] - load null 5[029] - load method [block] in test-is-exception tests/type_propagation/finally-test.toit - 10[094] - link try 0 + 10[096] - link try 0 12[038] - load block 4 14[055] - invoke block S1 // [[block]] -> {Null_} 16[041] - pop 1 - 17[095] - unlink try 0 + 17[097] - unlink try 0 19[020] - load literal -2 21[015] - load local 1 22[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -28,23 +28,23 @@ test-is-exception tests/type_propagation/finally-test.toit 30[015] - load local 1 31[004] - store local, pop S7 33[040] - pop 2 - 35[096] - unwind + 35[098] - unwind 36[002] - pop, load local S0 38[053] - invoke static id tests/type_propagation/finally-test.toit // [{True_|False_}] -> {True_|False_} - 41[089] - return null S2 0 + 41[091] - return null S2 0 [block] in test-is-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 return-is-exception tests/type_propagation/finally-test.toit 0[029] - load method [block] in return-is-exception tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {Null_} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -53,25 +53,25 @@ return-is-exception tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[015] - load local 1 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in return-is-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 test-exception tests/type_propagation/finally-test.toit 0[053] - invoke static return-exception tests/type_propagation/finally-test.toit // {Null_|Exception_} 3[041] - pop 1 4[022] - load null 5[029] - load method [block] in test-exception tests/type_propagation/finally-test.toit - 10[094] - link try 0 + 10[096] - link try 0 12[038] - load block 4 14[055] - invoke block S1 // [[block]] -> {Null_} 16[041] - pop 1 - 17[095] - unlink try 0 + 17[097] - unlink try 0 19[020] - load literal -2 21[015] - load local 1 22[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -82,23 +82,23 @@ test-exception tests/type_propagation/finally-test.toit 30[014] - load local 0 31[004] - store local, pop S7 33[040] - pop 2 - 35[096] - unwind + 35[098] - unwind 36[002] - pop, load local S0 38[053] - invoke static id tests/type_propagation/finally-test.toit // [{Null_|Exception_}] -> {Null_|Exception_} - 41[089] - return null S2 0 + 41[091] - return null S2 0 [block] in test-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 return-exception tests/type_propagation/finally-test.toit 0[029] - load method [block] in return-exception tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {Null_} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -107,26 +107,26 @@ return-exception tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[014] - load local 0 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in return-exception tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null - 1[088] - return S1 1 + 1[090] - return S1 1 test-catchy tests/type_propagation/finally-test.toit 0[053] - invoke static catchy tests/type_propagation/finally-test.toit // {Null_|True_|False_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 catchy tests/type_propagation/finally-test.toit 0[029] - load method [block] in catchy tests/type_propagation/finally-test.toit - 5[094] - link try 0 + 5[096] - link try 0 7[038] - load block 4 9[055] - invoke block S1 // [[block]] -> {} 11[041] - pop 1 - 12[095] - unlink try 0 + 12[097] - unlink try 0 14[020] - load literal -2 16[015] - load local 1 17[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} @@ -135,30 +135,30 @@ catchy tests/type_propagation/finally-test.toit 20[082] - branch if false T25 23[002] - pop, load local S3 25[015] - load local 1 - 26[088] - return S7 0 - 29[096] - unwind + 26[090] - return S7 0 + 29[098] - unwind 30[041] - pop 1 [block] in catchy tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null 1[017] - load local 3 - 2[090] - non-local return 0 - 4[088] - return S1 1 + 2[092] - non-local return 0 + 4[090] - return S1 1 test-nlb-out-of-try tests/type_propagation/finally-test.toit 0[026] - load smi 4 2[029] - load method [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {Null_} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 17[053] - invoke static id tests/type_propagation/finally-test.toit // [{String_|Null_|SmallInteger_}] -> {String_|Null_|SmallInteger_} 20[041] - pop 1 - 21[096] - unwind - 22[089] - return null S2 0 + 21[098] - unwind + 22[091] - return null S2 0 [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] @@ -166,7 +166,7 @@ test-nlb-out-of-try tests/type_propagation/finally-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/finally-test.toit // [[block]] -> {} 10[040] - pop 2 - 12[083] - branch back T0 + 12[084] - branch back T0 17[016] - load local 2 18[020] - load literal hest 20[006] - store outer S1 @@ -180,33 +180,33 @@ test-nlb-out-of-try tests/type_propagation/finally-test.toit 41[016] - load local 2 42[022] - load null 43[006] - store outer S1 - 45[088] - return S1 1 + 45[090] - return S1 1 [block] in [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] 0[016] - load local 2 - 1[092] - non-local branch {[block] in test-nlb-out-of-try:17} - 7[088] - return S1 1 + 1[094] - non-local branch {[block] in test-nlb-out-of-try:17} + 7[090] - return S1 1 [block] in [block] in test-nlb-out-of-try tests/type_propagation/finally-test.toit - argument 0: [block] 0[022] - load null 1[017] - load local 3 2[005] - load outer S3 // [block] - 4[090] - non-local return 16 - 6[088] - return S1 1 + 4[092] - non-local return 16 + 6[090] - return S1 1 id tests/type_propagation/finally-test.toit - argument 0: {String_|Null_|True_|False_|SmallInteger_|Exception_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/finally-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/finally-test.toit - argument 0: [block] diff --git a/tests/type_propagation/gold/global-test.gold b/tests/type_propagation/gold/global-test.gold index 2da328a13..5f5cbd719 100644 --- a/tests/type_propagation/gold/global-test.gold +++ b/tests/type_propagation/gold/global-test.gold @@ -1,18 +1,18 @@ main tests/type_propagation/global-test.toit 0[053] - invoke static test-simple tests/type_propagation/global-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 X tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 Y tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 Z tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 test-simple tests/type_propagation/global-test.toit 0[032] - load global var lazy G0 // {SmallInteger_} @@ -29,13 +29,13 @@ test-simple tests/type_propagation/global-test.toit 22[041] - pop 1 23[032] - load global var lazy G2 // {SmallInteger_} 25[053] - invoke static id tests/type_propagation/global-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 28[089] - return null S1 0 + 28[091] - return null S1 0 foo tests/type_propagation/global-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 id tests/type_propagation/global-test.toit - argument 0: {String_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/global-test.gold-O2 b/tests/type_propagation/gold/global-test.gold-O2 index 2da328a13..5f5cbd719 100644 --- a/tests/type_propagation/gold/global-test.gold-O2 +++ b/tests/type_propagation/gold/global-test.gold-O2 @@ -1,18 +1,18 @@ main tests/type_propagation/global-test.toit 0[053] - invoke static test-simple tests/type_propagation/global-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 X tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 Y tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 Z tests/type_propagation/global-test.toit 0[053] - invoke static foo tests/type_propagation/global-test.toit // {SmallInteger_} - 3[088] - return S1 0 + 3[090] - return S1 0 test-simple tests/type_propagation/global-test.toit 0[032] - load global var lazy G0 // {SmallInteger_} @@ -29,13 +29,13 @@ test-simple tests/type_propagation/global-test.toit 22[041] - pop 1 23[032] - load global var lazy G2 // {SmallInteger_} 25[053] - invoke static id tests/type_propagation/global-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 28[089] - return null S1 0 + 28[091] - return null S1 0 foo tests/type_propagation/global-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 id tests/type_propagation/global-test.toit - argument 0: {String_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/lambda-test.gold b/tests/type_propagation/gold/lambda-test.gold index 035a64f30..bac617b85 100644 --- a/tests/type_propagation/gold/lambda-test.gold +++ b/tests/type_propagation/gold/lambda-test.gold @@ -2,7 +2,7 @@ main tests/type_propagation/lambda-test.toit 0[053] - invoke static test-simple tests/type_propagation/lambda-test.toit // {*} 3[041] - pop 1 4[053] - invoke static test-arguments tests/type_propagation/lambda-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/lambda-test.toit 0[029] - load method [lambda] in test-simple tests/type_propagation/lambda-test.toit @@ -15,11 +15,11 @@ test-simple tests/type_propagation/lambda-test.toit 14[053] - invoke static lambda__ /core/objects.toit // [{SmallInteger_}, {LargeArray_|SmallArray_}, {SmallInteger_}] -> {Lambda} 17[014] - load local 0 18[053] - invoke static Lambda.call /core/objects.toit // [{Lambda}] -> {*} - 21[088] - return S2 0 + 21[090] - return S2 0 [lambda] in test-simple tests/type_propagation/lambda-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 test-arguments tests/type_propagation/lambda-test.toit 0[029] - load method [lambda] in test-arguments tests/type_propagation/lambda-test.toit @@ -44,13 +44,13 @@ test-arguments tests/type_propagation/lambda-test.toit 40[026] - load smi 42 42[020] - load literal fisk 44[053] - invoke static Lambda.call /core/objects.toit // [{Lambda}, {SmallInteger_}, {String_}] -> {*} - 47[089] - return null S1 0 + 47[091] - return null S1 0 [lambda] in test-arguments tests/type_propagation/lambda-test.toit - argument 0: {*} 0[016] - load local 2 1[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} - 4[088] - return S1 1 + 4[090] - return S1 1 [lambda] in test-arguments tests/type_propagation/lambda-test.toit - argument 0: {*} @@ -59,9 +59,9 @@ test-arguments tests/type_propagation/lambda-test.toit 1[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} 4[002] - pop, load local S2 6[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} - 9[088] - return S1 2 + 9[090] - return S1 2 id tests/type_propagation/lambda-test.toit - argument 0: {*} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/lambda-test.gold-O2 b/tests/type_propagation/gold/lambda-test.gold-O2 index 035a64f30..bac617b85 100644 --- a/tests/type_propagation/gold/lambda-test.gold-O2 +++ b/tests/type_propagation/gold/lambda-test.gold-O2 @@ -2,7 +2,7 @@ main tests/type_propagation/lambda-test.toit 0[053] - invoke static test-simple tests/type_propagation/lambda-test.toit // {*} 3[041] - pop 1 4[053] - invoke static test-arguments tests/type_propagation/lambda-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/lambda-test.toit 0[029] - load method [lambda] in test-simple tests/type_propagation/lambda-test.toit @@ -15,11 +15,11 @@ test-simple tests/type_propagation/lambda-test.toit 14[053] - invoke static lambda__ /core/objects.toit // [{SmallInteger_}, {LargeArray_|SmallArray_}, {SmallInteger_}] -> {Lambda} 17[014] - load local 0 18[053] - invoke static Lambda.call /core/objects.toit // [{Lambda}] -> {*} - 21[088] - return S2 0 + 21[090] - return S2 0 [lambda] in test-simple tests/type_propagation/lambda-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 test-arguments tests/type_propagation/lambda-test.toit 0[029] - load method [lambda] in test-arguments tests/type_propagation/lambda-test.toit @@ -44,13 +44,13 @@ test-arguments tests/type_propagation/lambda-test.toit 40[026] - load smi 42 42[020] - load literal fisk 44[053] - invoke static Lambda.call /core/objects.toit // [{Lambda}, {SmallInteger_}, {String_}] -> {*} - 47[089] - return null S1 0 + 47[091] - return null S1 0 [lambda] in test-arguments tests/type_propagation/lambda-test.toit - argument 0: {*} 0[016] - load local 2 1[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} - 4[088] - return S1 1 + 4[090] - return S1 1 [lambda] in test-arguments tests/type_propagation/lambda-test.toit - argument 0: {*} @@ -59,9 +59,9 @@ test-arguments tests/type_propagation/lambda-test.toit 1[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} 4[002] - pop, load local S2 6[053] - invoke static id tests/type_propagation/lambda-test.toit // [{*}] -> {*} - 9[088] - return S1 2 + 9[090] - return S1 2 id tests/type_propagation/lambda-test.toit - argument 0: {*} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/literal-test.gold b/tests/type_propagation/gold/literal-test.gold index 1c013d116..9d1cb7a29 100644 --- a/tests/type_propagation/gold/literal-test.gold +++ b/tests/type_propagation/gold/literal-test.gold @@ -4,15 +4,15 @@ main tests/type_propagation/literal-test.toit 4[053] - invoke static get-string tests/type_propagation/literal-test.toit // {String_} 7[041] - pop 1 8[053] - invoke static get-smi-or-string tests/type_propagation/literal-test.toit // {String_|SmallInteger_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 get-smi tests/type_propagation/literal-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 get-string tests/type_propagation/literal-test.toit 0[020] - load literal hest - 2[088] - return S1 0 + 2[090] - return S1 0 get-smi-or-string tests/type_propagation/literal-test.toit 0[053] - invoke static get-smi tests/type_propagation/literal-test.toit // {SmallInteger_} @@ -21,6 +21,6 @@ get-smi-or-string tests/type_propagation/literal-test.toit 5[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} 6[082] - branch if false T13 9[014] - load local 0 - 10[088] - return S2 0 + 10[090] - return S2 0 13[053] - invoke static get-string tests/type_propagation/literal-test.toit // {String_} - 16[088] - return S2 0 + 16[090] - return S2 0 diff --git a/tests/type_propagation/gold/literal-test.gold-O2 b/tests/type_propagation/gold/literal-test.gold-O2 index 1c013d116..9d1cb7a29 100644 --- a/tests/type_propagation/gold/literal-test.gold-O2 +++ b/tests/type_propagation/gold/literal-test.gold-O2 @@ -4,15 +4,15 @@ main tests/type_propagation/literal-test.toit 4[053] - invoke static get-string tests/type_propagation/literal-test.toit // {String_} 7[041] - pop 1 8[053] - invoke static get-smi-or-string tests/type_propagation/literal-test.toit // {String_|SmallInteger_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 get-smi tests/type_propagation/literal-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 get-string tests/type_propagation/literal-test.toit 0[020] - load literal hest - 2[088] - return S1 0 + 2[090] - return S1 0 get-smi-or-string tests/type_propagation/literal-test.toit 0[053] - invoke static get-smi tests/type_propagation/literal-test.toit // {SmallInteger_} @@ -21,6 +21,6 @@ get-smi-or-string tests/type_propagation/literal-test.toit 5[062] - invoke eq // [{SmallInteger_}, {SmallInteger_}] -> {True_|False_} 6[082] - branch if false T13 9[014] - load local 0 - 10[088] - return S2 0 + 10[090] - return S2 0 13[053] - invoke static get-string tests/type_propagation/literal-test.toit // {String_} - 16[088] - return S2 0 + 16[090] - return S2 0 diff --git a/tests/type_propagation/gold/local-test.gold b/tests/type_propagation/gold/local-test.gold index a920e7435..7015317fc 100644 --- a/tests/type_propagation/gold/local-test.gold +++ b/tests/type_propagation/gold/local-test.gold @@ -12,7 +12,7 @@ main tests/type_propagation/local-test.toit 20[053] - invoke static test-loop-break tests/type_propagation/local-test.toit // {Null_} 23[041] - pop 1 24[053] - invoke static test-loop-continue tests/type_propagation/local-test.toit // {Null_} - 27[089] - return null S1 0 + 27[091] - return null S1 0 test-if tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -27,7 +27,7 @@ test-if tests/type_propagation/local-test.toit 18[004] - store local, pop S1 20[014] - load local 0 21[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 24[089] - return null S2 0 + 24[091] - return null S2 0 test-if-else tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -47,7 +47,7 @@ test-if-else tests/type_propagation/local-test.toit 31[004] - store local, pop S1 33[014] - load local 0 34[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|True_}] -> {String_|True_} - 37[089] - return null S2 0 + 37[091] - return null S2 0 test-if-nested tests/type_propagation/local-test.toit 0[022] - load null @@ -76,7 +76,7 @@ test-if-nested tests/type_propagation/local-test.toit 53[041] - pop 1 54[014] - load local 0 55[053] - invoke static id tests/type_propagation/local-test.toit // [{True_|False_|float|SmallInteger_}] -> {True_|False_|float|SmallInteger_} - 58[089] - return null S2 0 + 58[091] - return null S2 0 test-if-more-locals tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -108,7 +108,7 @@ test-if-more-locals tests/type_propagation/local-test.toit 57[053] - invoke static id tests/type_propagation/local-test.toit // [{float}] -> {float} 60[002] - pop, load local S0 62[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 65[089] - return null S5 0 + 65[091] - return null S5 0 test-loop-simple tests/type_propagation/local-test.toit 0[022] - load null @@ -119,10 +119,10 @@ test-loop-simple tests/type_propagation/local-test.toit 11[014] - load local 0 12[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 15[041] - pop 1 - 16[083] - branch back T1 + 16[084] - branch back T1 21[014] - load local 0 22[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 25[089] - return null S2 0 + 25[091] - return null S2 0 test-loop-break tests/type_propagation/local-test.toit 0[022] - load null @@ -131,7 +131,7 @@ test-loop-break tests/type_propagation/local-test.toit 5[053] - invoke static pick tests/type_propagation/local-test.toit // {True_|False_} 8[082] - branch if false T14 11[080] - branch T19 - 14[083] - branch back T1 + 14[084] - branch back T1 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 23[041] - pop 1 @@ -148,12 +148,12 @@ test-loop-break tests/type_propagation/local-test.toit 48[014] - load local 0 49[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 52[041] - pop 1 - 53[083] - branch back T25 + 53[084] - branch back T25 58[015] - load local 1 59[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 62[002] - pop, load local S0 64[053] - invoke static id tests/type_propagation/local-test.toit // [{String_}] -> {String_} - 67[089] - return null S3 0 + 67[091] - return null S3 0 test-loop-continue tests/type_propagation/local-test.toit 0[022] - load null @@ -162,7 +162,7 @@ test-loop-continue tests/type_propagation/local-test.toit 7[026] - load smi 2 9[004] - store local, pop S1 11[080] - branch T14 - 14[083] - branch back T1 + 14[084] - branch back T1 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} 23[041] - pop 1 @@ -177,21 +177,21 @@ test-loop-continue tests/type_propagation/local-test.toit 44[080] - branch T51 47[026] - load smi 42 49[004] - store local, pop S1 - 51[083] - branch back T25 + 51[084] - branch back T25 56[015] - load local 1 57[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} 60[002] - pop, load local S0 62[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|Null_|SmallInteger_}] -> {String_|Null_|SmallInteger_} - 65[089] - return null S3 0 + 65[091] - return null S3 0 id tests/type_propagation/local-test.toit - argument 0: {String_|Null_|True_|False_|float|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/local-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 diff --git a/tests/type_propagation/gold/local-test.gold-O2 b/tests/type_propagation/gold/local-test.gold-O2 index a920e7435..7015317fc 100644 --- a/tests/type_propagation/gold/local-test.gold-O2 +++ b/tests/type_propagation/gold/local-test.gold-O2 @@ -12,7 +12,7 @@ main tests/type_propagation/local-test.toit 20[053] - invoke static test-loop-break tests/type_propagation/local-test.toit // {Null_} 23[041] - pop 1 24[053] - invoke static test-loop-continue tests/type_propagation/local-test.toit // {Null_} - 27[089] - return null S1 0 + 27[091] - return null S1 0 test-if tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -27,7 +27,7 @@ test-if tests/type_propagation/local-test.toit 18[004] - store local, pop S1 20[014] - load local 0 21[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 24[089] - return null S2 0 + 24[091] - return null S2 0 test-if-else tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -47,7 +47,7 @@ test-if-else tests/type_propagation/local-test.toit 31[004] - store local, pop S1 33[014] - load local 0 34[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|True_}] -> {String_|True_} - 37[089] - return null S2 0 + 37[091] - return null S2 0 test-if-nested tests/type_propagation/local-test.toit 0[022] - load null @@ -76,7 +76,7 @@ test-if-nested tests/type_propagation/local-test.toit 53[041] - pop 1 54[014] - load local 0 55[053] - invoke static id tests/type_propagation/local-test.toit // [{True_|False_|float|SmallInteger_}] -> {True_|False_|float|SmallInteger_} - 58[089] - return null S2 0 + 58[091] - return null S2 0 test-if-more-locals tests/type_propagation/local-test.toit 0[023] - load smi 0 @@ -108,7 +108,7 @@ test-if-more-locals tests/type_propagation/local-test.toit 57[053] - invoke static id tests/type_propagation/local-test.toit // [{float}] -> {float} 60[002] - pop, load local S0 62[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 65[089] - return null S5 0 + 65[091] - return null S5 0 test-loop-simple tests/type_propagation/local-test.toit 0[022] - load null @@ -119,10 +119,10 @@ test-loop-simple tests/type_propagation/local-test.toit 11[014] - load local 0 12[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 15[041] - pop 1 - 16[083] - branch back T1 + 16[084] - branch back T1 21[014] - load local 0 22[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} - 25[089] - return null S2 0 + 25[091] - return null S2 0 test-loop-break tests/type_propagation/local-test.toit 0[022] - load null @@ -131,7 +131,7 @@ test-loop-break tests/type_propagation/local-test.toit 5[053] - invoke static pick tests/type_propagation/local-test.toit // {True_|False_} 8[082] - branch if false T14 11[080] - branch T19 - 14[083] - branch back T1 + 14[084] - branch back T1 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 23[041] - pop 1 @@ -148,12 +148,12 @@ test-loop-break tests/type_propagation/local-test.toit 48[014] - load local 0 49[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|SmallInteger_}] -> {String_|SmallInteger_} 52[041] - pop 1 - 53[083] - branch back T25 + 53[084] - branch back T25 58[015] - load local 1 59[053] - invoke static id tests/type_propagation/local-test.toit // [{SmallInteger_}] -> {SmallInteger_} 62[002] - pop, load local S0 64[053] - invoke static id tests/type_propagation/local-test.toit // [{String_}] -> {String_} - 67[089] - return null S3 0 + 67[091] - return null S3 0 test-loop-continue tests/type_propagation/local-test.toit 0[022] - load null @@ -162,7 +162,7 @@ test-loop-continue tests/type_propagation/local-test.toit 7[026] - load smi 2 9[004] - store local, pop S1 11[080] - branch T14 - 14[083] - branch back T1 + 14[084] - branch back T1 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} 23[041] - pop 1 @@ -177,21 +177,21 @@ test-loop-continue tests/type_propagation/local-test.toit 44[080] - branch T51 47[026] - load smi 42 49[004] - store local, pop S1 - 51[083] - branch back T25 + 51[084] - branch back T25 56[015] - load local 1 57[053] - invoke static id tests/type_propagation/local-test.toit // [{Null_|SmallInteger_}] -> {Null_|SmallInteger_} 60[002] - pop, load local S0 62[053] - invoke static id tests/type_propagation/local-test.toit // [{String_|Null_|SmallInteger_}] -> {String_|Null_|SmallInteger_} - 65[089] - return null S3 0 + 65[091] - return null S3 0 id tests/type_propagation/local-test.toit - argument 0: {String_|Null_|True_|False_|float|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/local-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 diff --git a/tests/type_propagation/gold/map-test.gold b/tests/type_propagation/gold/map-test.gold index 168d716b0..c998ea0a3 100644 --- a/tests/type_propagation/gold/map-test.gold +++ b/tests/type_propagation/gold/map-test.gold @@ -1,6 +1,6 @@ main tests/type_propagation/map-test.toit 0[053] - invoke static test-simple tests/type_propagation/map-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-simple tests/type_propagation/map-test.toit 0[042] - allocate instance Map @@ -9,9 +9,9 @@ test-simple tests/type_propagation/map-test.toit 6[004] - store local, pop S1 8[009] - load field local 48 // [{Map}] -> {Null_|List_|SmallArray_} 10[053] - invoke static id tests/type_propagation/map-test.toit // [{Null_|List_|SmallArray_}] -> {Null_|List_|SmallArray_} - 13[089] - return null S2 0 + 13[091] - return null S2 0 id tests/type_propagation/map-test.toit - argument 0: {Null_|List_|SmallArray_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/map-test.gold-O2 b/tests/type_propagation/gold/map-test.gold-O2 index 168d716b0..c998ea0a3 100644 --- a/tests/type_propagation/gold/map-test.gold-O2 +++ b/tests/type_propagation/gold/map-test.gold-O2 @@ -1,6 +1,6 @@ main tests/type_propagation/map-test.toit 0[053] - invoke static test-simple tests/type_propagation/map-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-simple tests/type_propagation/map-test.toit 0[042] - allocate instance Map @@ -9,9 +9,9 @@ test-simple tests/type_propagation/map-test.toit 6[004] - store local, pop S1 8[009] - load field local 48 // [{Map}] -> {Null_|List_|SmallArray_} 10[053] - invoke static id tests/type_propagation/map-test.toit // [{Null_|List_|SmallArray_}] -> {Null_|List_|SmallArray_} - 13[089] - return null S2 0 + 13[091] - return null S2 0 id tests/type_propagation/map-test.toit - argument 0: {Null_|List_|SmallArray_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/nlr-test.gold b/tests/type_propagation/gold/nlr-test.gold index 799e9155d..feb09d08a 100644 --- a/tests/type_propagation/gold/nlr-test.gold +++ b/tests/type_propagation/gold/nlr-test.gold @@ -2,19 +2,19 @@ main tests/type_propagation/nlr-test.toit 0[053] - invoke static test-simple tests/type_propagation/nlr-test.toit // {Null_} 3[041] - pop 1 4[053] - invoke static test-try tests/type_propagation/nlr-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/nlr-test.toit 0[053] - invoke static always-return tests/type_propagation/nlr-test.toit // {SmallInteger_} 3[041] - pop 1 4[053] - invoke static maybe-return tests/type_propagation/nlr-test.toit // {String_|SmallInteger_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-try tests/type_propagation/nlr-test.toit 0[053] - invoke static stop-unwinding tests/type_propagation/nlr-test.toit // {String_|float|SmallInteger_} 3[041] - pop 1 4[053] - invoke static stop-unwinding-alternative tests/type_propagation/nlr-test.toit // {String_|True_|float|SmallInteger_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 always-return tests/type_propagation/nlr-test.toit 0[029] - load method [block] in always-return tests/type_propagation/nlr-test.toit @@ -28,8 +28,8 @@ always-return tests/type_propagation/nlr-test.toit - argument 0: [block] 0[026] - load smi 42 2[017] - load local 3 - 3[090] - non-local return 0 - 5[088] - return S1 1 + 3[092] - non-local return 0 + 5[090] - return S1 1 maybe-return tests/type_propagation/nlr-test.toit 0[029] - load method [block] in maybe-return tests/type_propagation/nlr-test.toit @@ -37,7 +37,7 @@ maybe-return tests/type_propagation/nlr-test.toit 7[053] - invoke static invoke tests/type_propagation/nlr-test.toit // [[block]] -> {Null_} 10[040] - pop 2 12[020] - load literal hest - 14[088] - return S1 0 + 14[090] - return S1 0 [block] in maybe-return tests/type_propagation/nlr-test.toit - argument 0: [block] @@ -47,20 +47,20 @@ maybe-return tests/type_propagation/nlr-test.toit 7[041] - pop 1 8[026] - load smi 42 10[017] - load local 3 - 11[090] - non-local return 0 - 13[088] - return S1 1 + 11[092] - non-local return 0 + 13[090] - return S1 1 stop-unwinding tests/type_propagation/nlr-test.toit 0[026] - load smi 42 2[029] - load method [block] in stop-unwinding tests/type_propagation/nlr-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 - 17[088] - return S6 0 - 20[096] - unwind + 17[090] - return S6 0 + 20[098] - unwind 21[041] - pop 1 [block] in stop-unwinding tests/type_propagation/nlr-test.toit @@ -79,27 +79,27 @@ stop-unwinding tests/type_propagation/nlr-test.toit 22[002] - pop, load local S2 24[020] - load literal true 26[006] - store outer S1 - 28[088] - return S1 1 + 28[090] - return S1 1 [block] in [block] in stop-unwinding tests/type_propagation/nlr-test.toit - argument 0: [block] 0[020] - load literal hest 2[017] - load local 3 3[005] - load outer S3 // [block] - 5[090] - non-local return 16 - 7[088] - return S1 1 + 5[092] - non-local return 16 + 7[090] - return S1 1 stop-unwinding-alternative tests/type_propagation/nlr-test.toit 0[026] - load smi 42 2[029] - load method [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {True_} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 - 17[088] - return S6 0 - 20[096] - unwind + 17[090] - return S6 0 + 20[098] - unwind 21[041] - pop 1 [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit @@ -115,7 +115,7 @@ stop-unwinding-alternative tests/type_propagation/nlr-test.toit 17[002] - pop, load local S2 19[020] - load literal true 21[006] - store outer S1 - 23[088] - return S1 1 + 23[090] - return S1 1 [block] in [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit - argument 0: [block] @@ -126,18 +126,18 @@ stop-unwinding-alternative tests/type_propagation/nlr-test.toit 8[020] - load literal hest 10[017] - load local 3 11[005] - load outer S3 // [block] - 13[090] - non-local return 16 - 15[088] - return S1 1 + 13[092] - non-local return 16 + 15[090] - return S1 1 pick tests/type_propagation/nlr-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/nlr-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {Null_} - 3[088] - return S1 1 + 3[090] - return S1 1 diff --git a/tests/type_propagation/gold/nlr-test.gold-O2 b/tests/type_propagation/gold/nlr-test.gold-O2 index b97543640..848d946cf 100644 --- a/tests/type_propagation/gold/nlr-test.gold-O2 +++ b/tests/type_propagation/gold/nlr-test.gold-O2 @@ -2,19 +2,19 @@ main tests/type_propagation/nlr-test.toit 0[053] - invoke static test-simple tests/type_propagation/nlr-test.toit // {Null_} 3[041] - pop 1 4[053] - invoke static test-try tests/type_propagation/nlr-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/nlr-test.toit 0[053] - invoke static always-return tests/type_propagation/nlr-test.toit // {SmallInteger_} 3[041] - pop 1 4[053] - invoke static maybe-return tests/type_propagation/nlr-test.toit // {String_|SmallInteger_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-try tests/type_propagation/nlr-test.toit 0[053] - invoke static stop-unwinding tests/type_propagation/nlr-test.toit // {String_|float|SmallInteger_} 3[041] - pop 1 4[053] - invoke static stop-unwinding-alternative tests/type_propagation/nlr-test.toit // {String_|True_|float|SmallInteger_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 always-return tests/type_propagation/nlr-test.toit 0[029] - load method [block] in always-return tests/type_propagation/nlr-test.toit @@ -26,8 +26,8 @@ always-return tests/type_propagation/nlr-test.toit - argument 0: [block] 0[026] - load smi 42 2[017] - load local 3 - 3[090] - non-local return 0 - 5[088] - return S1 1 + 3[092] - non-local return 0 + 5[090] - return S1 1 maybe-return tests/type_propagation/nlr-test.toit 0[029] - load method [block] in maybe-return tests/type_propagation/nlr-test.toit @@ -35,7 +35,7 @@ maybe-return tests/type_propagation/nlr-test.toit 7[053] - invoke static invoke tests/type_propagation/nlr-test.toit // [[block]] -> {Null_} 10[040] - pop 2 12[020] - load literal hest - 14[088] - return S1 0 + 14[090] - return S1 0 [block] in maybe-return tests/type_propagation/nlr-test.toit - argument 0: [block] @@ -45,20 +45,20 @@ maybe-return tests/type_propagation/nlr-test.toit 7[041] - pop 1 8[026] - load smi 42 10[017] - load local 3 - 11[090] - non-local return 0 - 13[088] - return S1 1 + 11[092] - non-local return 0 + 13[090] - return S1 1 stop-unwinding tests/type_propagation/nlr-test.toit 0[026] - load smi 42 2[029] - load method [block] in stop-unwinding tests/type_propagation/nlr-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 - 17[088] - return S6 0 - 20[096] - unwind + 17[090] - return S6 0 + 20[098] - unwind 21[041] - pop 1 [block] in stop-unwinding tests/type_propagation/nlr-test.toit @@ -74,27 +74,27 @@ stop-unwinding tests/type_propagation/nlr-test.toit 16[038] - load block 0 18[053] - invoke static invoke tests/type_propagation/nlr-test.toit // [[block]] -> {} 21[004] - store local, pop S1 - 23[088] - return S1 1 + 23[090] - return S1 1 [block] in [block] in stop-unwinding tests/type_propagation/nlr-test.toit - argument 0: [block] 0[020] - load literal hest 2[017] - load local 3 3[005] - load outer S3 // [block] - 5[090] - non-local return 16 - 7[088] - return S1 1 + 5[092] - non-local return 16 + 7[090] - return S1 1 stop-unwinding-alternative tests/type_propagation/nlr-test.toit 0[026] - load smi 42 2[029] - load method [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit - 7[094] - link try 0 + 7[096] - link try 0 9[038] - load block 4 11[055] - invoke block S1 // [[block]] -> {True_} 13[041] - pop 1 - 14[095] - unlink try 0 + 14[097] - unlink try 0 16[018] - load local 4 - 17[088] - return S6 0 - 20[096] - unwind + 17[090] - return S6 0 + 20[098] - unwind 21[041] - pop 1 [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit @@ -110,7 +110,7 @@ stop-unwinding-alternative tests/type_propagation/nlr-test.toit 17[002] - pop, load local S2 19[020] - load literal true 21[006] - store outer S1 - 23[088] - return S1 1 + 23[090] - return S1 1 [block] in [block] in stop-unwinding-alternative tests/type_propagation/nlr-test.toit - argument 0: [block] @@ -121,18 +121,18 @@ stop-unwinding-alternative tests/type_propagation/nlr-test.toit 8[020] - load literal hest 10[017] - load local 3 11[005] - load outer S3 // [block] - 13[090] - non-local return 16 - 15[088] - return S1 1 + 13[092] - non-local return 16 + 15[090] - return S1 1 pick tests/type_propagation/nlr-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/nlr-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {Null_} - 3[088] - return S1 1 + 3[090] - return S1 1 diff --git a/tests/type_propagation/gold/non-local-branch-test.gold b/tests/type_propagation/gold/non-local-branch-test.gold index 500ce2852..80ee2bf02 100644 --- a/tests/type_propagation/gold/non-local-branch-test.gold +++ b/tests/type_propagation/gold/non-local-branch-test.gold @@ -4,7 +4,7 @@ main tests/type_propagation/non-local-branch-test.toit 4[053] - invoke static test-continue tests/type_propagation/non-local-branch-test.toit // {Null_} 7[041] - pop 1 8[053] - invoke static test-nested tests/type_propagation/non-local-branch-test.toit // {Null_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 test-break tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 42 @@ -12,10 +12,10 @@ test-break tests/type_propagation/non-local-branch-test.toit 7[038] - load block 0 9[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 12[040] - pop 2 - 14[083] - branch back T2 + 14[084] - branch back T2 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/non-local-branch-test.toit // [{String_}] -> {String_} - 23[089] - return null S2 0 + 23[091] - return null S2 0 [block] in test-break tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -23,8 +23,8 @@ test-break tests/type_propagation/non-local-branch-test.toit 1[020] - load literal hest 3[006] - store outer S1 5[002] - pop, load local S2 - 7[092] - non-local branch {test-break:19} - 13[088] - return S1 1 + 7[094] - non-local branch {test-break:19} + 13[090] - return S1 1 test-continue tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 42 @@ -32,10 +32,10 @@ test-continue tests/type_propagation/non-local-branch-test.toit 7[038] - load block 0 9[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 12[040] - pop 2 - 14[083] - branch back T2 + 14[084] - branch back T2 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/non-local-branch-test.toit // [{float}] -> {float} - 23[089] - return null S2 0 + 23[091] - return null S2 0 [block] in test-continue tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -46,19 +46,19 @@ test-continue tests/type_propagation/non-local-branch-test.toit 6[053] - invoke static pick tests/type_propagation/non-local-branch-test.toit // {True_|False_} 9[082] - branch if false T19 12[016] - load local 2 - 13[092] - non-local branch {test-continue:14} + 13[094] - non-local branch {test-continue:14} 19[016] - load local 2 20[020] - load literal 3.2999999999999998224 22[006] - store outer S1 24[002] - pop, load local S2 - 26[092] - non-local branch {test-continue:19} - 32[088] - return S1 1 + 26[094] - non-local branch {test-continue:19} + 32[090] - return S1 1 test-nested tests/type_propagation/non-local-branch-test.toit 0[029] - load method [block] in test-nested tests/type_propagation/non-local-branch-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {Null_} - 10[089] - return null S2 0 + 10[091] - return null S2 0 [block] in test-nested tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -66,30 +66,30 @@ test-nested tests/type_propagation/non-local-branch-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 10[040] - pop 2 - 12[083] - branch back T0 + 12[084] - branch back T0 17[022] - load null - 18[088] - return S1 1 + 18[090] - return S1 1 [block] in [block] in test-nested tests/type_propagation/non-local-branch-test.toit - argument 0: [block] 0[016] - load local 2 - 1[092] - non-local branch {[block] in test-nested:17} - 7[088] - return S1 1 + 1[094] - non-local branch {[block] in test-nested:17} + 7[090] - return S1 1 id tests/type_propagation/non-local-branch-test.toit - argument 0: {String_|float} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/non-local-branch-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {Null_} - 3[089] - return null S1 1 + 3[091] - return null S1 1 diff --git a/tests/type_propagation/gold/non-local-branch-test.gold-O2 b/tests/type_propagation/gold/non-local-branch-test.gold-O2 index 500ce2852..80ee2bf02 100644 --- a/tests/type_propagation/gold/non-local-branch-test.gold-O2 +++ b/tests/type_propagation/gold/non-local-branch-test.gold-O2 @@ -4,7 +4,7 @@ main tests/type_propagation/non-local-branch-test.toit 4[053] - invoke static test-continue tests/type_propagation/non-local-branch-test.toit // {Null_} 7[041] - pop 1 8[053] - invoke static test-nested tests/type_propagation/non-local-branch-test.toit // {Null_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 test-break tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 42 @@ -12,10 +12,10 @@ test-break tests/type_propagation/non-local-branch-test.toit 7[038] - load block 0 9[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 12[040] - pop 2 - 14[083] - branch back T2 + 14[084] - branch back T2 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/non-local-branch-test.toit // [{String_}] -> {String_} - 23[089] - return null S2 0 + 23[091] - return null S2 0 [block] in test-break tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -23,8 +23,8 @@ test-break tests/type_propagation/non-local-branch-test.toit 1[020] - load literal hest 3[006] - store outer S1 5[002] - pop, load local S2 - 7[092] - non-local branch {test-break:19} - 13[088] - return S1 1 + 7[094] - non-local branch {test-break:19} + 13[090] - return S1 1 test-continue tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 42 @@ -32,10 +32,10 @@ test-continue tests/type_propagation/non-local-branch-test.toit 7[038] - load block 0 9[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 12[040] - pop 2 - 14[083] - branch back T2 + 14[084] - branch back T2 19[014] - load local 0 20[053] - invoke static id tests/type_propagation/non-local-branch-test.toit // [{float}] -> {float} - 23[089] - return null S2 0 + 23[091] - return null S2 0 [block] in test-continue tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -46,19 +46,19 @@ test-continue tests/type_propagation/non-local-branch-test.toit 6[053] - invoke static pick tests/type_propagation/non-local-branch-test.toit // {True_|False_} 9[082] - branch if false T19 12[016] - load local 2 - 13[092] - non-local branch {test-continue:14} + 13[094] - non-local branch {test-continue:14} 19[016] - load local 2 20[020] - load literal 3.2999999999999998224 22[006] - store outer S1 24[002] - pop, load local S2 - 26[092] - non-local branch {test-continue:19} - 32[088] - return S1 1 + 26[094] - non-local branch {test-continue:19} + 32[090] - return S1 1 test-nested tests/type_propagation/non-local-branch-test.toit 0[029] - load method [block] in test-nested tests/type_propagation/non-local-branch-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {Null_} - 10[089] - return null S2 0 + 10[091] - return null S2 0 [block] in test-nested tests/type_propagation/non-local-branch-test.toit - argument 0: [block] @@ -66,30 +66,30 @@ test-nested tests/type_propagation/non-local-branch-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-branch-test.toit // [[block]] -> {} 10[040] - pop 2 - 12[083] - branch back T0 + 12[084] - branch back T0 17[022] - load null - 18[088] - return S1 1 + 18[090] - return S1 1 [block] in [block] in test-nested tests/type_propagation/non-local-branch-test.toit - argument 0: [block] 0[016] - load local 2 - 1[092] - non-local branch {[block] in test-nested:17} - 7[088] - return S1 1 + 1[094] - non-local branch {[block] in test-nested:17} + 7[090] - return S1 1 id tests/type_propagation/non-local-branch-test.toit - argument 0: {String_|float} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 pick tests/type_propagation/non-local-branch-test.toit 0[026] - load smi 100 2[053] - invoke static random /core/utils.toit // [{SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[026] - load smi 50 7[063] - invoke lt // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 8[088] - return S1 0 + 8[090] - return S1 0 invoke tests/type_propagation/non-local-branch-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {Null_} - 3[089] - return null S1 1 + 3[091] - return null S1 1 diff --git a/tests/type_propagation/gold/non-local-return-test.gold b/tests/type_propagation/gold/non-local-return-test.gold index 00061edbf..3a874765c 100644 --- a/tests/type_propagation/gold/non-local-return-test.gold +++ b/tests/type_propagation/gold/non-local-return-test.gold @@ -2,7 +2,7 @@ main tests/type_propagation/non-local-return-test.toit 0[053] - invoke static test-simple tests/type_propagation/non-local-return-test.toit // {SmallInteger_} 3[041] - pop 1 4[053] - invoke static test-continue tests/type_propagation/non-local-return-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/non-local-return-test.toit 0[029] - load method [block] in test-simple tests/type_propagation/non-local-return-test.toit @@ -18,7 +18,7 @@ test-simple tests/type_propagation/non-local-return-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-return-test.toit // [[block]] -> {} 10[004] - store local, pop S1 - 12[088] - return S1 1 + 12[090] - return S1 1 [block] in [block] in test-simple tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -27,7 +27,7 @@ test-simple tests/type_propagation/non-local-return-test.toit 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {} 13[004] - store local, pop S1 - 15[088] - return S1 1 + 15[090] - return S1 1 [block] in [block] in [block] in test-simple tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -35,14 +35,14 @@ test-simple tests/type_propagation/non-local-return-test.toit 2[017] - load local 3 3[005] - load outer S3 // [block] 5[005] - load outer S3 // [block] - 7[090] - non-local return 0 - 9[088] - return S1 1 + 7[092] - non-local return 0 + 9[090] - return S1 1 test-continue tests/type_propagation/non-local-return-test.toit 0[029] - load method [block] in test-continue tests/type_propagation/non-local-return-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-return-test.toit // [[block]] -> {String_} - 10[089] - return null S2 0 + 10[091] - return null S2 0 [block] in test-continue tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -51,17 +51,17 @@ test-continue tests/type_propagation/non-local-return-test.toit 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {} 13[004] - store local, pop S1 - 15[088] - return S1 1 + 15[090] - return S1 1 [block] in [block] in test-continue tests/type_propagation/non-local-return-test.toit - argument 0: [block] 0[020] - load literal hest 2[017] - load local 3 - 3[090] - non-local return 1 - 5[088] - return S1 1 + 3[092] - non-local return 1 + 5[090] - return S1 1 invoke tests/type_propagation/non-local-return-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {String_} - 3[088] - return S1 1 + 3[090] - return S1 1 diff --git a/tests/type_propagation/gold/non-local-return-test.gold-O2 b/tests/type_propagation/gold/non-local-return-test.gold-O2 index 7f13ffbc9..33bc3fe89 100644 --- a/tests/type_propagation/gold/non-local-return-test.gold-O2 +++ b/tests/type_propagation/gold/non-local-return-test.gold-O2 @@ -2,7 +2,7 @@ main tests/type_propagation/non-local-return-test.toit 0[053] - invoke static test-simple tests/type_propagation/non-local-return-test.toit // {SmallInteger_} 3[041] - pop 1 4[053] - invoke static test-continue tests/type_propagation/non-local-return-test.toit // {Null_} - 7[089] - return null S1 0 + 7[091] - return null S1 0 test-simple tests/type_propagation/non-local-return-test.toit 0[029] - load method [block] in test-simple tests/type_propagation/non-local-return-test.toit @@ -16,7 +16,7 @@ test-simple tests/type_propagation/non-local-return-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-return-test.toit // [[block]] -> {} 10[004] - store local, pop S1 - 12[088] - return S1 1 + 12[090] - return S1 1 [block] in [block] in test-simple tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -25,7 +25,7 @@ test-simple tests/type_propagation/non-local-return-test.toit 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {} 13[004] - store local, pop S1 - 15[088] - return S1 1 + 15[090] - return S1 1 [block] in [block] in [block] in test-simple tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -33,14 +33,14 @@ test-simple tests/type_propagation/non-local-return-test.toit 2[017] - load local 3 3[005] - load outer S3 // [block] 5[005] - load outer S3 // [block] - 7[090] - non-local return 0 - 9[088] - return S1 1 + 7[092] - non-local return 0 + 9[090] - return S1 1 test-continue tests/type_propagation/non-local-return-test.toit 0[029] - load method [block] in test-continue tests/type_propagation/non-local-return-test.toit 5[038] - load block 0 7[053] - invoke static invoke tests/type_propagation/non-local-return-test.toit // [[block]] -> {String_} - 10[089] - return null S2 0 + 10[091] - return null S2 0 [block] in test-continue tests/type_propagation/non-local-return-test.toit - argument 0: [block] @@ -49,17 +49,17 @@ test-continue tests/type_propagation/non-local-return-test.toit 7[038] - load block 1 9[058] - invoke virtual repeat // [{SmallInteger_}, [block]] -> {} 13[004] - store local, pop S1 - 15[088] - return S1 1 + 15[090] - return S1 1 [block] in [block] in test-continue tests/type_propagation/non-local-return-test.toit - argument 0: [block] 0[020] - load literal hest 2[017] - load local 3 - 3[090] - non-local return 1 - 5[088] - return S1 1 + 3[092] - non-local return 1 + 5[090] - return S1 1 invoke tests/type_propagation/non-local-return-test.toit - argument 0: [block] 0[016] - load local 2 1[055] - invoke block S1 // [[block]] -> {String_} - 3[088] - return S1 1 + 3[090] - return S1 1 diff --git a/tests/type_propagation/gold/null-equals-test.gold b/tests/type_propagation/gold/null-equals-test.gold index 025c57a87..111f4dd25 100644 --- a/tests/type_propagation/gold/null-equals-test.gold +++ b/tests/type_propagation/gold/null-equals-test.gold @@ -58,24 +58,24 @@ main tests/type_propagation/null-equals-test.toit 102[053] - invoke static A tests/type_propagation/null-equals-test.toit // [{A}] -> {A} 105[062] - invoke eq // [{Null_}, {A}] -> {False_} 106[053] - invoke static id tests/type_propagation/null-equals-test.toit // [{False_}] -> {False_} -109[089] - return null S2 0 +109[091] - return null S2 0 obfuscate-null tests/type_propagation/null-equals-test.toit - 0[089] - return null S0 0 + 0[091] - return null S0 0 A tests/type_propagation/null-equals-test.toit - argument 0: {A} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 A.== tests/type_propagation/null-equals-test.toit - argument 0: {A} - argument 1: {String_|Null_|SmallInteger_|A} 0[052] - load local, as class, pop 2 - A(40 - 41) // {True_|False_} 2[020] - load literal hest - 4[088] - return S1 2 + 4[090] - return S1 2 id tests/type_propagation/null-equals-test.toit - argument 0: {String_|True_|False_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/null-equals-test.gold-O2 b/tests/type_propagation/gold/null-equals-test.gold-O2 index f945a1d57..63d19f81e 100644 --- a/tests/type_propagation/gold/null-equals-test.gold-O2 +++ b/tests/type_propagation/gold/null-equals-test.gold-O2 @@ -58,24 +58,24 @@ main tests/type_propagation/null-equals-test.toit 102[053] - invoke static A tests/type_propagation/null-equals-test.toit // [{A}] -> {A} 105[062] - invoke eq // [{Null_}, {A}] -> {False_} 106[053] - invoke static id tests/type_propagation/null-equals-test.toit // [{False_}] -> {False_} -109[089] - return null S2 0 +109[091] - return null S2 0 obfuscate-null tests/type_propagation/null-equals-test.toit - 0[089] - return null S0 0 + 0[091] - return null S0 0 A tests/type_propagation/null-equals-test.toit - argument 0: {A} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 A.== tests/type_propagation/null-equals-test.toit - argument 0: {A} - argument 1: {String_|Null_|SmallInteger_|A} 0[052] - load local, as class, pop 2 - A(35 - 36) // {True_|False_} 2[020] - load literal hest - 4[088] - return S1 2 + 4[090] - return S1 2 id tests/type_propagation/null-equals-test.toit - argument 0: {String_|True_|False_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/richards-test.gold b/tests/type_propagation/gold/richards-test.gold index 649dceb35..db2f87c7b 100644 --- a/tests/type_propagation/gold/richards-test.gold +++ b/tests/type_propagation/gold/richards-test.gold @@ -1,6 +1,6 @@ main tests/type_propagation/richards-test.toit 0[053] - invoke static run-richards tests/type_propagation/richards-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 run-richards tests/type_propagation/richards-test.toit 0[042] - allocate instance Scheduler @@ -96,7 +96,7 @@ run-richards tests/type_propagation/richards-test.toit 171[029] - load method [block] in run-richards tests/type_propagation/richards-test.toit 176[038] - load block 0 178[053] - invoke static assert_ /core/assert_.toit // [[block]] -> {Null_} -181[089] - return null S4 0 +181[091] - return null S4 0 [block] in run-richards tests/type_propagation/richards-test.toit - argument 0: [block] @@ -105,7 +105,7 @@ run-richards tests/type_propagation/richards-test.toit 3[007] - load field 0 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 5[027] - load smi 23246 8[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 9[088] - return S1 1 + 9[090] - return S1 1 [block] in run-richards tests/type_propagation/richards-test.toit - argument 0: [block] @@ -114,7 +114,7 @@ run-richards tests/type_propagation/richards-test.toit 3[007] - load field 1 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 5[027] - load smi 9297 8[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 9[088] - return S1 1 + 9[090] - return S1 1 Scheduler tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -130,7 +130,7 @@ Scheduler tests/type_propagation/richards-test.toit 12[053] - invoke static List /core/collections.toit // [{SmallInteger_}, {Null_}] -> {List_} 15[013] - store field, pop 2 17[016] - load local 2 - 18[088] - return S1 1 + 18[090] - return S1 1 Scheduler.add-idle-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -154,7 +154,7 @@ Scheduler.add-idle-task tests/type_propagation/richards-test.toit 23[000] - load local S9 25[053] - invoke static IdleTask tests/type_propagation/richards-test.toit // [{IdleTask}, {Scheduler}, {SmallInteger_}, {SmallInteger_}] -> {IdleTask} 28[053] - invoke static Scheduler.add-running-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {IdleTask}] -> {Null_} - 31[089] - return null S1 5 + 31[091] - return null S1 5 Scheduler.add-worker-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -174,7 +174,7 @@ Scheduler.add-worker-task tests/type_propagation/richards-test.toit 16[023] - load smi 0 17[053] - invoke static WorkerTask tests/type_propagation/richards-test.toit // [{WorkerTask}, {Scheduler}, {SmallInteger_}, {SmallInteger_}] -> {WorkerTask} 20[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Packet}, {WorkerTask}] -> {Null_} - 23[089] - return null S1 4 + 23[091] - return null S1 4 Scheduler.add-handler-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -192,7 +192,7 @@ Scheduler.add-handler-task tests/type_propagation/richards-test.toit 12[000] - load local S10 14[053] - invoke static HandlerTask tests/type_propagation/richards-test.toit // [{HandlerTask}, {Scheduler}] -> {HandlerTask} 17[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Packet}, {HandlerTask}] -> {Null_} - 20[089] - return null S1 4 + 20[091] - return null S1 4 Scheduler.add-device-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -211,7 +211,7 @@ Scheduler.add-device-task tests/type_propagation/richards-test.toit 14[000] - load local S10 16[053] - invoke static DeviceTask tests/type_propagation/richards-test.toit // [{DeviceTask}, {Scheduler}] -> {DeviceTask} 19[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {DeviceTask}] -> {Null_} - 22[089] - return null S1 4 + 22[091] - return null S1 4 Scheduler.add-running-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -231,7 +231,7 @@ Scheduler.add-running-task tests/type_propagation/richards-test.toit 17[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {IdleTask}] -> {Null_} 20[010] - pop, load field local 70 // [{Scheduler}] -> {*} 22[058] - invoke virtual set-running // [{*}] -> {Null_} - 26[089] - return null S1 5 + 26[091] - return null S1 5 Scheduler.add-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -259,7 +259,7 @@ Scheduler.add-task tests/type_propagation/richards-test.toit 34[000] - load local S6 36[009] - load field local 72 // [{Scheduler}] -> {*} 38[079] - invoke at_put // [{Null_|List_}, {SmallInteger_}, {*}] -> {*} - 39[089] - return null S1 5 + 39[091] - return null S1 5 Scheduler.schedule tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -284,8 +284,8 @@ Scheduler.schedule tests/type_propagation/richards-test.toit 39[009] - load field local 67 // [{Scheduler}] -> {*} 41[058] - invoke virtual run // [{*}] -> {*} 45[013] - store field, pop 4 - 47[083] - branch back T5 - 52[089] - return null S0 1 + 47[084] - branch back T5 + 52[091] - return null S0 1 Scheduler.hold-current tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -299,14 +299,14 @@ Scheduler.hold-current tests/type_propagation/richards-test.toit 10[058] - invoke virtual mark-as-held // [{*}] -> {Null_} 14[010] - pop, load field local 66 // [{Scheduler}] -> {*} 16[060] - invoke virtual get link // [{*}] -> {Null_|Packet|TaskControlBlock} - 19[088] - return S1 1 + 19[090] - return S1 1 Scheduler.suspend-current tests/type_propagation/richards-test.toit - argument 0: {Scheduler} 0[009] - load field local 66 // [{Scheduler}] -> {*} 2[058] - invoke virtual mark-as-suspended // [{*}] -> {Null_} 6[010] - pop, load field local 66 // [{Scheduler}] -> {*} - 8[088] - return S1 1 + 8[090] - return S1 1 Scheduler.release tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -317,7 +317,7 @@ Scheduler.release tests/type_propagation/richards-test.toit 4[014] - load local 0 5[081] - branch if true T12 8[014] - load local 0 - 9[088] - return S2 2 + 9[090] - return S2 2 12[014] - load local 0 13[058] - invoke virtual mark-as-not-held // [{*}] -> {Null_} 17[002] - pop, load local S0 @@ -327,10 +327,10 @@ Scheduler.release tests/type_propagation/richards-test.toit 27[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 28[082] - branch if false T38 31[014] - load local 0 - 32[088] - return S2 2 + 32[090] - return S2 2 35[080] - branch T43 38[009] - load field local 68 // [{Scheduler}] -> {*} - 40[088] - return S2 2 + 40[090] - return S2 2 Scheduler.queue tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -342,7 +342,7 @@ Scheduler.queue tests/type_propagation/richards-test.toit 7[014] - load local 0 8[081] - branch if true T15 11[014] - load local 0 - 12[088] - return S2 2 + 12[090] - return S2 2 15[009] - load field local 4 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 17[019] - load local 5 18[015] - load local 1 @@ -361,27 +361,27 @@ Scheduler.queue tests/type_propagation/richards-test.toit 38[009] - load field local 69 // [{Scheduler}] -> {*} 40[019] - load local 5 41[058] - invoke virtual check-priority-add // [{*}, {*}, {Packet}] -> {*} - 45[088] - return S2 2 + 45[090] - return S2 2 STATE-NOT-HELD tests/type_propagation/richards-test.toit 0[026] - load smi 4 2[058] - invoke virtual ~ // [{SmallInteger_}] -> {SmallInteger_} - 6[088] - return S1 0 + 6[090] - return S1 0 TaskControlBlock.link tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 2 // [{TaskControlBlock}] -> {Null_|TaskControlBlock} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock.id tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 18 // [{TaskControlBlock}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock.priority tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 34 // [{TaskControlBlock}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -421,7 +421,7 @@ TaskControlBlock tests/type_propagation/richards-test.toit 52[048] - as class LargeInteger_(22 - 24) // {True_} 54[013] - store field, pop 5 56[000] - load local S7 - 58[088] - return S1 6 + 58[090] - return S1 6 TaskControlBlock.set-running tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -429,7 +429,7 @@ TaskControlBlock.set-running tests/type_propagation/richards-test.toit 1[023] - load smi 0 2[048] - as class LargeInteger_(22 - 24) // {True_} 4[013] - store field, pop 5 - 6[089] - return null S0 1 + 6[091] - return null S0 1 TaskControlBlock.mark-as-not-held tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -439,7 +439,7 @@ TaskControlBlock.mark-as-not-held tests/type_propagation/richards-test.toit 5[069] - invoke bit and // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[048] - as class LargeInteger_(22 - 24) // {True_} 8[013] - store field, pop 5 - 10[089] - return null S0 1 + 10[091] - return null S0 1 TaskControlBlock.mark-as-held tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -449,7 +449,7 @@ TaskControlBlock.mark-as-held tests/type_propagation/richards-test.toit 5[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[048] - as class LargeInteger_(22 - 24) // {True_} 8[013] - store field, pop 5 - 10[089] - return null S0 1 + 10[091] - return null S0 1 TaskControlBlock.is-held-or-suspended tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -467,7 +467,7 @@ TaskControlBlock.is-held-or-suspended tests/type_propagation/richards-test.toit 21[010] - pop, load field local 82 // [{TaskControlBlock}] -> {Null_|LargeInteger_|SmallInteger_} 23[026] - load smi 2 25[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 26[088] - return S1 1 + 26[090] - return S1 1 TaskControlBlock.mark-as-suspended tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -477,7 +477,7 @@ TaskControlBlock.mark-as-suspended tests/type_propagation/richards-test.toit 5[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[048] - as class LargeInteger_(22 - 24) // {True_} 8[013] - store field, pop 5 - 10[089] - return null S0 1 + 10[091] - return null S0 1 TaskControlBlock.mark-as-runnable tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -487,7 +487,7 @@ TaskControlBlock.mark-as-runnable tests/type_propagation/richards-test.toit 4[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[048] - as class LargeInteger_(22 - 24) // {True_} 7[013] - store field, pop 5 - 9[089] - return null S0 1 + 9[091] - return null S0 1 TaskControlBlock.run tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -514,7 +514,7 @@ TaskControlBlock.run tests/type_propagation/richards-test.toit 35[009] - load field local 67 // [{TaskControlBlock}] -> {Null_|HandlerTask|WorkerTask|DeviceTask|IdleTask} 37[015] - load local 1 38[058] - invoke virtual run // [{Null_|HandlerTask|WorkerTask|DeviceTask|IdleTask}, {Null_|Packet}] -> {*} - 42[088] - return S2 1 + 42[090] - return S2 1 TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -534,7 +534,7 @@ TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit 21[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 22[082] - branch if false T29 25[018] - load local 4 - 26[088] - return S1 3 + 26[090] - return S1 3 29[080] - branch T44 32[018] - load local 4 33[017] - load local 3 @@ -543,7 +543,7 @@ TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit 40[048] - as class Packet?(40 - 41) // {True_} 42[013] - store field, pop 3 44[017] - load local 3 - 45[088] - return S1 3 + 45[090] - return S1 3 IdleTask tests/type_propagation/richards-test.toit - argument 0: {IdleTask} @@ -563,7 +563,7 @@ IdleTask tests/type_propagation/richards-test.toit 14[048] - as class LargeInteger_(22 - 24) // {True_} 16[013] - store field, pop 2 18[019] - load local 5 - 19[088] - return S1 4 + 19[090] - return S1 4 IdleTask.run tests/type_propagation/richards-test.toit - argument 0: {IdleTask} @@ -581,7 +581,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 14[082] - branch if false T25 17[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 19[053] - invoke static Scheduler.hold-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {Null_|Packet|TaskControlBlock} - 22[088] - return S1 2 + 22[090] - return S1 2 25[009] - load field local 19 // [{IdleTask}] -> {Null_|LargeInteger_|SmallInteger_} 27[025] - load smi 1 28[069] - invoke bit and // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} @@ -597,7 +597,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 43[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 45[026] - load smi 4 47[053] - invoke static Scheduler.release tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {SmallInteger_}] -> {*} - 50[088] - return S1 2 + 50[090] - return S1 2 53[080] - branch T79 56[017] - load local 3 57[009] - load field local 20 // [{IdleTask}] -> {Null_|LargeInteger_|SmallInteger_} @@ -610,7 +610,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 69[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 71[026] - load smi 5 73[053] - invoke static Scheduler.release tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {SmallInteger_}] -> {*} - 76[088] - return S1 2 + 76[090] - return S1 2 DeviceTask tests/type_propagation/richards-test.toit - argument 0: {DeviceTask} @@ -620,7 +620,7 @@ DeviceTask tests/type_propagation/richards-test.toit 2[048] - as class Scheduler(46 - 47) // {True_} 4[013] - store field, pop 0 6[017] - load local 3 - 7[088] - return S1 2 + 7[090] - return S1 2 DeviceTask.run tests/type_propagation/richards-test.toit - argument 0: {DeviceTask} @@ -631,7 +631,7 @@ DeviceTask.run tests/type_propagation/richards-test.toit 6[081] - branch if true T17 9[009] - load field local 3 // [{DeviceTask}] -> {Null_|Scheduler} 11[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} - 14[088] - return S1 2 + 14[090] - return S1 2 17[009] - load field local 19 // [{DeviceTask}] -> {Null_|Packet} 19[018] - load local 4 20[022] - load null @@ -639,14 +639,14 @@ DeviceTask.run tests/type_propagation/richards-test.toit 23[009] - load field local 4 // [{DeviceTask}] -> {Null_|Scheduler} 25[015] - load local 1 26[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} - 29[088] - return S2 2 + 29[090] - return S2 2 32[080] - branch T47 35[017] - load local 3 36[017] - load local 3 37[013] - store field, pop 1 39[009] - load field local 3 // [{DeviceTask}] -> {Null_|Scheduler} 41[053] - invoke static Scheduler.hold-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {Null_|Packet|TaskControlBlock} - 44[088] - return S1 2 + 44[090] - return S1 2 WorkerTask tests/type_propagation/richards-test.toit - argument 0: {WorkerTask} @@ -666,7 +666,7 @@ WorkerTask tests/type_propagation/richards-test.toit 14[048] - as class LargeInteger_(22 - 24) // {True_} 16[013] - store field, pop 2 18[019] - load local 5 - 19[088] - return S1 4 + 19[090] - return S1 4 WorkerTask.run tests/type_propagation/richards-test.toit - argument 0: {WorkerTask} @@ -675,7 +675,7 @@ WorkerTask.run tests/type_propagation/richards-test.toit 1[081] - branch if true T12 4[009] - load field local 3 // [{WorkerTask}] -> {Null_|Scheduler} 6[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} - 9[088] - return S1 2 + 9[090] - return S1 2 12[017] - load local 3 13[026] - load smi 2 15[009] - load field local 21 // [{WorkerTask}] -> {Null_|SmallInteger_} @@ -723,11 +723,11 @@ WorkerTask.run tests/type_propagation/richards-test.toit 84[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 85[004] - store local, pop S2 87[041] - pop 1 - 88[083] - branch back T44 + 88[084] - branch back T44 93[010] - pop, load field local 3 // [{WorkerTask}] -> {Null_|Scheduler} 95[017] - load local 3 96[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Packet}] -> {*} - 99[088] - return S1 2 + 99[090] - return S1 2 HandlerTask tests/type_propagation/richards-test.toit - argument 0: {HandlerTask} @@ -737,7 +737,7 @@ HandlerTask tests/type_propagation/richards-test.toit 2[048] - as class Scheduler(46 - 47) // {True_} 4[013] - store field, pop 0 6[017] - load local 3 - 7[088] - return S1 2 + 7[090] - return S1 2 HandlerTask.run tests/type_propagation/richards-test.toit - argument 0: {HandlerTask} @@ -789,7 +789,7 @@ HandlerTask.run tests/type_propagation/richards-test.toit 87[010] - pop, load field local 5 // [{HandlerTask}] -> {Null_|Scheduler} 89[015] - load local 1 90[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} - 93[088] - return S3 2 + 93[090] - return S3 2 96[080] - branch T118 99[009] - load field local 20 // [{HandlerTask}] -> {Null_|Packet} 101[019] - load local 5 @@ -799,11 +799,11 @@ HandlerTask.run tests/type_propagation/richards-test.toit 109[009] - load field local 5 // [{HandlerTask}] -> {Null_|Scheduler} 111[015] - load local 1 112[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} -115[088] - return S3 2 +115[090] - return S3 2 118[041] - pop 1 119[009] - load field local 3 // [{HandlerTask}] -> {Null_|Scheduler} 121[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} -124[088] - return S1 2 +124[090] - return S1 2 Packet tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -831,12 +831,12 @@ Packet tests/type_propagation/richards-test.toit 26[053] - invoke static List /core/collections.toit // [{SmallInteger_}, {Null_}] -> {List_} 29[013] - store field, pop 4 31[019] - load local 5 - 32[088] - return S1 4 + 32[090] - return S1 4 Packet.link tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 2 // [{Packet}] -> {Null_|Packet} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.link= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -846,12 +846,12 @@ Packet.link= tests/type_propagation/richards-test.toit 3[002] - pop, load local S3 5[017] - load local 3 6[011] - store field 0 - 8[088] - return S1 2 + 8[090] - return S1 2 Packet.id tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 18 // [{Packet}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.id= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -860,17 +860,17 @@ Packet.id= tests/type_propagation/richards-test.toit 2[017] - load local 3 3[017] - load local 3 4[011] - store field 1 - 6[088] - return S1 2 + 6[090] - return S1 2 Packet.kind tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 34 // [{Packet}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.a1 tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 50 // [{Packet}] -> {*} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.a1= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -878,12 +878,12 @@ Packet.a1= tests/type_propagation/richards-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 3 - 4[088] - return S1 2 + 4[090] - return S1 2 Packet.a2 tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 66 // [{Packet}] -> {Null_|List_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.add-to tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -895,7 +895,7 @@ Packet.add-to tests/type_propagation/richards-test.toit 6[016] - load local 2 7[081] - branch if true T14 10[017] - load local 3 - 11[088] - return S1 2 + 11[090] - return S1 2 14[016] - load local 2 15[014] - load local 0 16[060] - invoke virtual get link // [{Null_|Packet}] -> {Null_|Packet} @@ -906,9 +906,9 @@ Packet.add-to tests/type_propagation/richards-test.toit 27[014] - load local 0 28[004] - store local, pop S2 30[041] - pop 1 - 31[083] - branch back T15 + 31[084] - branch back T15 36[014] - load local 0 37[019] - load local 5 38[061] - invoke virtual set link // [{Null_|Packet}, {Packet}] -> {Packet} 41[002] - pop, load local S3 - 43[088] - return S2 2 + 43[090] - return S2 2 diff --git a/tests/type_propagation/gold/richards-test.gold-O2 b/tests/type_propagation/gold/richards-test.gold-O2 index 2ca33c386..cfcafaaf9 100644 --- a/tests/type_propagation/gold/richards-test.gold-O2 +++ b/tests/type_propagation/gold/richards-test.gold-O2 @@ -1,6 +1,6 @@ main tests/type_propagation/richards-test.toit 0[053] - invoke static run-richards tests/type_propagation/richards-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 run-richards tests/type_propagation/richards-test.toit 0[042] - allocate instance Scheduler @@ -96,7 +96,7 @@ run-richards tests/type_propagation/richards-test.toit 171[029] - load method [block] in run-richards tests/type_propagation/richards-test.toit 176[038] - load block 0 178[053] - invoke static assert_ /core/assert_.toit // [[block]] -> {Null_} -181[089] - return null S4 0 +181[091] - return null S4 0 [block] in run-richards tests/type_propagation/richards-test.toit - argument 0: [block] @@ -105,7 +105,7 @@ run-richards tests/type_propagation/richards-test.toit 3[007] - load field 0 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 5[027] - load smi 23246 8[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 9[088] - return S1 1 + 9[090] - return S1 1 [block] in run-richards tests/type_propagation/richards-test.toit - argument 0: [block] @@ -114,7 +114,7 @@ run-richards tests/type_propagation/richards-test.toit 3[007] - load field 1 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 5[027] - load smi 9297 8[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 9[088] - return S1 1 + 9[090] - return S1 1 Scheduler tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -130,7 +130,7 @@ Scheduler tests/type_propagation/richards-test.toit 12[053] - invoke static List /core/collections.toit // [{SmallInteger_}, {Null_}] -> {List_} 15[013] - store field, pop 2 17[016] - load local 2 - 18[088] - return S1 1 + 18[090] - return S1 1 Scheduler.add-idle-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -148,7 +148,7 @@ Scheduler.add-idle-task tests/type_propagation/richards-test.toit 13[000] - load local S9 15[053] - invoke static IdleTask tests/type_propagation/richards-test.toit // [{IdleTask}, {Scheduler}, {SmallInteger_}, {SmallInteger_}] -> {IdleTask} 18[053] - invoke static Scheduler.add-running-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {IdleTask}] -> {Null_} - 21[089] - return null S1 5 + 21[091] - return null S1 5 Scheduler.add-worker-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -165,7 +165,7 @@ Scheduler.add-worker-task tests/type_propagation/richards-test.toit 10[023] - load smi 0 11[053] - invoke static WorkerTask tests/type_propagation/richards-test.toit // [{WorkerTask}, {Scheduler}, {SmallInteger_}, {SmallInteger_}] -> {WorkerTask} 14[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Packet}, {WorkerTask}] -> {Null_} - 17[089] - return null S1 4 + 17[091] - return null S1 4 Scheduler.add-handler-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -180,7 +180,7 @@ Scheduler.add-handler-task tests/type_propagation/richards-test.toit 6[000] - load local S10 8[053] - invoke static HandlerTask tests/type_propagation/richards-test.toit // [{HandlerTask}, {Scheduler}] -> {HandlerTask} 11[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Packet}, {HandlerTask}] -> {Null_} - 14[089] - return null S1 4 + 14[091] - return null S1 4 Scheduler.add-device-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -195,7 +195,7 @@ Scheduler.add-device-task tests/type_propagation/richards-test.toit 6[000] - load local S10 8[053] - invoke static DeviceTask tests/type_propagation/richards-test.toit // [{DeviceTask}, {Scheduler}] -> {DeviceTask} 11[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {DeviceTask}] -> {Null_} - 14[089] - return null S1 4 + 14[091] - return null S1 4 Scheduler.add-running-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -211,7 +211,7 @@ Scheduler.add-running-task tests/type_propagation/richards-test.toit 10[053] - invoke static Scheduler.add-task tests/type_propagation/richards-test.toit // [{Scheduler}, {SmallInteger_}, {SmallInteger_}, {Null_}, {IdleTask}] -> {Null_} 13[010] - pop, load field local 70 // [{Scheduler}] -> {*} 15[058] - invoke virtual set-running // [{*}] -> {Null_} - 19[089] - return null S1 5 + 19[091] - return null S1 5 Scheduler.add-task tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -235,7 +235,7 @@ Scheduler.add-task tests/type_propagation/richards-test.toit 27[000] - load local S6 29[009] - load field local 72 // [{Scheduler}] -> {*} 31[079] - invoke at_put // [{Null_|List_}, {SmallInteger_}, {*}] -> {*} - 32[089] - return null S1 5 + 32[091] - return null S1 5 Scheduler.schedule tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -260,8 +260,8 @@ Scheduler.schedule tests/type_propagation/richards-test.toit 39[009] - load field local 67 // [{Scheduler}] -> {*} 41[058] - invoke virtual run // [{*}] -> {*} 45[013] - store field, pop 4 - 47[083] - branch back T5 - 52[089] - return null S0 1 + 47[084] - branch back T5 + 52[091] - return null S0 1 Scheduler.hold-current tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -275,14 +275,14 @@ Scheduler.hold-current tests/type_propagation/richards-test.toit 10[058] - invoke virtual mark-as-held // [{*}] -> {Null_} 14[010] - pop, load field local 66 // [{Scheduler}] -> {*} 16[060] - invoke virtual get link // [{*}] -> {Null_|Packet|TaskControlBlock} - 19[088] - return S1 1 + 19[090] - return S1 1 Scheduler.suspend-current tests/type_propagation/richards-test.toit - argument 0: {Scheduler} 0[009] - load field local 66 // [{Scheduler}] -> {*} 2[058] - invoke virtual mark-as-suspended // [{*}] -> {Null_} 6[010] - pop, load field local 66 // [{Scheduler}] -> {*} - 8[088] - return S1 1 + 8[090] - return S1 1 Scheduler.release tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -293,7 +293,7 @@ Scheduler.release tests/type_propagation/richards-test.toit 4[014] - load local 0 5[081] - branch if true T12 8[014] - load local 0 - 9[088] - return S2 2 + 9[090] - return S2 2 12[014] - load local 0 13[058] - invoke virtual mark-as-not-held // [{*}] -> {Null_} 17[002] - pop, load local S0 @@ -303,10 +303,10 @@ Scheduler.release tests/type_propagation/richards-test.toit 27[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 28[082] - branch if false T38 31[014] - load local 0 - 32[088] - return S2 2 + 32[090] - return S2 2 35[080] - branch T43 38[009] - load field local 68 // [{Scheduler}] -> {*} - 40[088] - return S2 2 + 40[090] - return S2 2 Scheduler.queue tests/type_propagation/richards-test.toit - argument 0: {Scheduler} @@ -318,7 +318,7 @@ Scheduler.queue tests/type_propagation/richards-test.toit 7[014] - load local 0 8[081] - branch if true T15 11[014] - load local 0 - 12[088] - return S2 2 + 12[090] - return S2 2 15[009] - load field local 4 // [{Scheduler}] -> {Null_|LargeInteger_|SmallInteger_} 17[019] - load local 5 18[015] - load local 1 @@ -336,27 +336,27 @@ Scheduler.queue tests/type_propagation/richards-test.toit 36[009] - load field local 69 // [{Scheduler}] -> {*} 38[019] - load local 5 39[058] - invoke virtual check-priority-add // [{*}, {*}, {Packet}] -> {*} - 43[088] - return S2 2 + 43[090] - return S2 2 STATE-NOT-HELD tests/type_propagation/richards-test.toit 0[026] - load smi 4 2[058] - invoke virtual ~ // [{SmallInteger_}] -> {SmallInteger_} - 6[088] - return S1 0 + 6[090] - return S1 0 TaskControlBlock.link tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 2 // [{TaskControlBlock}] -> {Null_|TaskControlBlock} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock.id tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 18 // [{TaskControlBlock}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock.priority tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[009] - load field local 34 // [{TaskControlBlock}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 TaskControlBlock tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -392,14 +392,14 @@ TaskControlBlock tests/type_propagation/richards-test.toit 44[026] - load smi 3 46[013] - store field, pop 5 48[000] - load local S7 - 50[088] - return S1 6 + 50[090] - return S1 6 TaskControlBlock.set-running tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} 0[016] - load local 2 1[023] - load smi 0 2[013] - store field, pop 5 - 4[089] - return null S0 1 + 4[091] - return null S0 1 TaskControlBlock.mark-as-not-held tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -408,7 +408,7 @@ TaskControlBlock.mark-as-not-held tests/type_propagation/richards-test.toit 3[032] - load global var lazy G0 // {SmallInteger_} 5[069] - invoke bit and // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[013] - store field, pop 5 - 8[089] - return null S0 1 + 8[091] - return null S0 1 TaskControlBlock.mark-as-held tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -417,7 +417,7 @@ TaskControlBlock.mark-as-held tests/type_propagation/richards-test.toit 3[026] - load smi 4 5[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[013] - store field, pop 5 - 8[089] - return null S0 1 + 8[091] - return null S0 1 TaskControlBlock.is-held-or-suspended tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -435,7 +435,7 @@ TaskControlBlock.is-held-or-suspended tests/type_propagation/richards-test.toit 21[010] - pop, load field local 82 // [{TaskControlBlock}] -> {Null_|LargeInteger_|SmallInteger_} 23[026] - load smi 2 25[062] - invoke eq // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} - 26[088] - return S1 1 + 26[090] - return S1 1 TaskControlBlock.mark-as-suspended tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -444,7 +444,7 @@ TaskControlBlock.mark-as-suspended tests/type_propagation/richards-test.toit 3[026] - load smi 2 5[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 6[013] - store field, pop 5 - 8[089] - return null S0 1 + 8[091] - return null S0 1 TaskControlBlock.mark-as-runnable tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -453,7 +453,7 @@ TaskControlBlock.mark-as-runnable tests/type_propagation/richards-test.toit 3[025] - load smi 1 4[067] - invoke bit or // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 5[013] - store field, pop 5 - 7[089] - return null S0 1 + 7[091] - return null S0 1 TaskControlBlock.run tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -478,7 +478,7 @@ TaskControlBlock.run tests/type_propagation/richards-test.toit 31[009] - load field local 67 // [{TaskControlBlock}] -> {Null_|HandlerTask|WorkerTask|DeviceTask|IdleTask} 33[015] - load local 1 34[058] - invoke virtual run // [{Null_|HandlerTask|WorkerTask|DeviceTask|IdleTask}, {Null_|Packet}] -> {*} - 38[088] - return S2 1 + 38[090] - return S2 1 TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit - argument 0: {TaskControlBlock} @@ -497,7 +497,7 @@ TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit 19[064] - invoke gt // [{Null_|SmallInteger_}, {Null_|SmallInteger_}] -> {True_|False_} 20[082] - branch if false T27 23[018] - load local 4 - 24[088] - return S1 3 + 24[090] - return S1 3 27[080] - branch T40 30[018] - load local 4 31[017] - load local 3 @@ -505,7 +505,7 @@ TaskControlBlock.check-priority-add tests/type_propagation/richards-test.toit 34[058] - invoke virtual add-to // [{Packet}, {Null_|Packet}] -> {Packet} 38[013] - store field, pop 3 40[017] - load local 3 - 41[088] - return S1 3 + 41[090] - return S1 3 IdleTask tests/type_propagation/richards-test.toit - argument 0: {IdleTask} @@ -522,7 +522,7 @@ IdleTask tests/type_propagation/richards-test.toit 9[017] - load local 3 10[013] - store field, pop 2 12[019] - load local 5 - 13[088] - return S1 4 + 13[090] - return S1 4 IdleTask.run tests/type_propagation/richards-test.toit - argument 0: {IdleTask} @@ -539,7 +539,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 12[082] - branch if false T23 15[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 17[053] - invoke static Scheduler.hold-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {Null_|Packet|TaskControlBlock} - 20[088] - return S1 2 + 20[090] - return S1 2 23[009] - load field local 19 // [{IdleTask}] -> {Null_|LargeInteger_|SmallInteger_} 25[025] - load smi 1 26[069] - invoke bit and // [{Null_|LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} @@ -554,7 +554,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 39[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 41[026] - load smi 4 43[053] - invoke static Scheduler.release tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {SmallInteger_}] -> {*} - 46[088] - return S1 2 + 46[090] - return S1 2 49[080] - branch T73 52[017] - load local 3 53[009] - load field local 20 // [{IdleTask}] -> {Null_|LargeInteger_|SmallInteger_} @@ -566,7 +566,7 @@ IdleTask.run tests/type_propagation/richards-test.toit 63[009] - load field local 3 // [{IdleTask}] -> {Null_|Scheduler} 65[026] - load smi 5 67[053] - invoke static Scheduler.release tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {SmallInteger_}] -> {*} - 70[088] - return S1 2 + 70[090] - return S1 2 DeviceTask tests/type_propagation/richards-test.toit - argument 0: {DeviceTask} @@ -575,7 +575,7 @@ DeviceTask tests/type_propagation/richards-test.toit 1[017] - load local 3 2[013] - store field, pop 0 4[017] - load local 3 - 5[088] - return S1 2 + 5[090] - return S1 2 DeviceTask.run tests/type_propagation/richards-test.toit - argument 0: {DeviceTask} @@ -586,7 +586,7 @@ DeviceTask.run tests/type_propagation/richards-test.toit 6[081] - branch if true T17 9[009] - load field local 3 // [{DeviceTask}] -> {Null_|Scheduler} 11[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} - 14[088] - return S1 2 + 14[090] - return S1 2 17[009] - load field local 19 // [{DeviceTask}] -> {Null_|Packet} 19[018] - load local 4 20[022] - load null @@ -594,14 +594,14 @@ DeviceTask.run tests/type_propagation/richards-test.toit 23[009] - load field local 4 // [{DeviceTask}] -> {Null_|Scheduler} 25[015] - load local 1 26[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} - 29[088] - return S2 2 + 29[090] - return S2 2 32[080] - branch T47 35[017] - load local 3 36[017] - load local 3 37[013] - store field, pop 1 39[009] - load field local 3 // [{DeviceTask}] -> {Null_|Scheduler} 41[053] - invoke static Scheduler.hold-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {Null_|Packet|TaskControlBlock} - 44[088] - return S1 2 + 44[090] - return S1 2 WorkerTask tests/type_propagation/richards-test.toit - argument 0: {WorkerTask} @@ -618,7 +618,7 @@ WorkerTask tests/type_propagation/richards-test.toit 9[017] - load local 3 10[013] - store field, pop 2 12[019] - load local 5 - 13[088] - return S1 4 + 13[090] - return S1 4 WorkerTask.run tests/type_propagation/richards-test.toit - argument 0: {WorkerTask} @@ -627,7 +627,7 @@ WorkerTask.run tests/type_propagation/richards-test.toit 1[081] - branch if true T12 4[009] - load field local 3 // [{WorkerTask}] -> {Null_|Scheduler} 6[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} - 9[088] - return S1 2 + 9[090] - return S1 2 12[017] - load local 3 13[026] - load smi 2 15[009] - load field local 21 // [{WorkerTask}] -> {Null_|SmallInteger_} @@ -672,11 +672,11 @@ WorkerTask.run tests/type_propagation/richards-test.toit 78[073] - invoke add // [{LargeInteger_|SmallInteger_}, {SmallInteger_}] -> {LargeInteger_|SmallInteger_} 79[004] - store local, pop S2 81[041] - pop 1 - 82[083] - branch back T42 + 82[084] - branch back T42 87[010] - pop, load field local 3 // [{WorkerTask}] -> {Null_|Scheduler} 89[017] - load local 3 90[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Packet}] -> {*} - 93[088] - return S1 2 + 93[090] - return S1 2 HandlerTask tests/type_propagation/richards-test.toit - argument 0: {HandlerTask} @@ -685,7 +685,7 @@ HandlerTask tests/type_propagation/richards-test.toit 1[017] - load local 3 2[013] - store field, pop 0 4[017] - load local 3 - 5[088] - return S1 2 + 5[090] - return S1 2 HandlerTask.run tests/type_propagation/richards-test.toit - argument 0: {HandlerTask} @@ -737,7 +737,7 @@ HandlerTask.run tests/type_propagation/richards-test.toit 87[010] - pop, load field local 5 // [{HandlerTask}] -> {Null_|Scheduler} 89[015] - load local 1 90[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} - 93[088] - return S3 2 + 93[090] - return S3 2 96[080] - branch T118 99[009] - load field local 20 // [{HandlerTask}] -> {Null_|Packet} 101[019] - load local 5 @@ -747,11 +747,11 @@ HandlerTask.run tests/type_propagation/richards-test.toit 109[009] - load field local 5 // [{HandlerTask}] -> {Null_|Scheduler} 111[015] - load local 1 112[053] - invoke static Scheduler.queue tests/type_propagation/richards-test.toit // [{Null_|Scheduler}, {Null_|Packet}] -> {*} -115[088] - return S3 2 +115[090] - return S3 2 118[041] - pop 1 119[009] - load field local 3 // [{HandlerTask}] -> {Null_|Scheduler} 121[053] - invoke static Scheduler.suspend-current tests/type_propagation/richards-test.toit // [{Null_|Scheduler}] -> {*} -124[088] - return S1 2 +124[090] - return S1 2 Packet tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -776,12 +776,12 @@ Packet tests/type_propagation/richards-test.toit 20[053] - invoke static List /core/collections.toit // [{SmallInteger_}, {Null_}] -> {List_} 23[013] - store field, pop 4 25[019] - load local 5 - 26[088] - return S1 4 + 26[090] - return S1 4 Packet.link tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 2 // [{Packet}] -> {Null_|Packet} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.link= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -789,12 +789,12 @@ Packet.link= tests/type_propagation/richards-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 0 - 4[088] - return S1 2 + 4[090] - return S1 2 Packet.id tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 18 // [{Packet}] -> {Null_|LargeInteger_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.id= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -803,17 +803,17 @@ Packet.id= tests/type_propagation/richards-test.toit 2[017] - load local 3 3[017] - load local 3 4[011] - store field 1 - 6[088] - return S1 2 + 6[090] - return S1 2 Packet.kind tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 34 // [{Packet}] -> {Null_|SmallInteger_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.a1 tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 50 // [{Packet}] -> {*} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.a1= tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -821,12 +821,12 @@ Packet.a1= tests/type_propagation/richards-test.toit 0[017] - load local 3 1[017] - load local 3 2[011] - store field 3 - 4[088] - return S1 2 + 4[090] - return S1 2 Packet.a2 tests/type_propagation/richards-test.toit - argument 0: {Packet} 0[009] - load field local 66 // [{Packet}] -> {Null_|List_} - 2[088] - return S1 1 + 2[090] - return S1 1 Packet.add-to tests/type_propagation/richards-test.toit - argument 0: {Packet} @@ -837,7 +837,7 @@ Packet.add-to tests/type_propagation/richards-test.toit 4[016] - load local 2 5[081] - branch if true T12 8[017] - load local 3 - 9[088] - return S1 2 + 9[090] - return S1 2 12[016] - load local 2 13[014] - load local 0 14[060] - invoke virtual get link // [{Null_|Packet}] -> {Null_|Packet} @@ -848,9 +848,9 @@ Packet.add-to tests/type_propagation/richards-test.toit 25[014] - load local 0 26[004] - store local, pop S2 28[041] - pop 1 - 29[083] - branch back T13 + 29[084] - branch back T13 34[014] - load local 0 35[019] - load local 5 36[061] - invoke virtual set link // [{Null_|Packet}, {Packet}] -> {Packet} 39[002] - pop, load local S3 - 41[088] - return S2 2 + 41[090] - return S2 2 diff --git a/tests/type_propagation/gold/spawn-test.gold b/tests/type_propagation/gold/spawn-test.gold index a961239b3..6e68971cd 100644 --- a/tests/type_propagation/gold/spawn-test.gold +++ b/tests/type_propagation/gold/spawn-test.gold @@ -12,14 +12,14 @@ main tests/type_propagation/spawn-test.toit 21[041] - pop 1 22[020] - load literal hest 24[053] - invoke static id tests/type_propagation/spawn-test.toit // [{String_}] -> {String_} - 27[089] - return null S1 0 + 27[091] - return null S1 0 [lambda] in main tests/type_propagation/spawn-test.toit 0[026] - load smi 7 2[053] - invoke static id tests/type_propagation/spawn-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 5[088] - return S1 0 + 5[090] - return S1 0 id tests/type_propagation/spawn-test.toit - argument 0: {String_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/spawn-test.gold-O2 b/tests/type_propagation/gold/spawn-test.gold-O2 index a961239b3..6e68971cd 100644 --- a/tests/type_propagation/gold/spawn-test.gold-O2 +++ b/tests/type_propagation/gold/spawn-test.gold-O2 @@ -12,14 +12,14 @@ main tests/type_propagation/spawn-test.toit 21[041] - pop 1 22[020] - load literal hest 24[053] - invoke static id tests/type_propagation/spawn-test.toit // [{String_}] -> {String_} - 27[089] - return null S1 0 + 27[091] - return null S1 0 [lambda] in main tests/type_propagation/spawn-test.toit 0[026] - load smi 7 2[053] - invoke static id tests/type_propagation/spawn-test.toit // [{SmallInteger_}] -> {SmallInteger_} - 5[088] - return S1 0 + 5[090] - return S1 0 id tests/type_propagation/spawn-test.toit - argument 0: {String_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/time-test.gold b/tests/type_propagation/gold/time-test.gold index 5a22be2af..453493ecd 100644 --- a/tests/type_propagation/gold/time-test.gold +++ b/tests/type_propagation/gold/time-test.gold @@ -18,5 +18,5 @@ main tests/type_propagation/time-test.toit 28[027] - load smi 1000 31[053] - invoke static sleep /core/timer.toit // [{SmallInteger_}] -> {Null_} 34[041] - pop 1 - 35[083] - branch back T1 - 40[089] - return null S1 0 + 35[084] - branch back T1 + 40[091] - return null S1 0 diff --git a/tests/type_propagation/gold/time-test.gold-O2 b/tests/type_propagation/gold/time-test.gold-O2 index ef5d7fe7e..004748420 100644 --- a/tests/type_propagation/gold/time-test.gold-O2 +++ b/tests/type_propagation/gold/time-test.gold-O2 @@ -16,5 +16,5 @@ main tests/type_propagation/time-test.toit 24[027] - load smi 1000 27[053] - invoke static sleep /core/timer.toit // [{SmallInteger_}] -> {Null_} 30[041] - pop 1 - 31[083] - branch back T1 - 36[089] - return null S1 0 + 31[084] - branch back T1 + 36[091] - return null S1 0 diff --git a/tests/type_propagation/gold/try-test.gold b/tests/type_propagation/gold/try-test.gold index 9df4be64f..7bf78e272 100644 --- a/tests/type_propagation/gold/try-test.gold +++ b/tests/type_propagation/gold/try-test.gold @@ -1,46 +1,46 @@ main tests/type_propagation/try-test.toit 0[053] - invoke static test-nested tests/type_propagation/try-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-nested tests/type_propagation/try-test.toit 0[053] - invoke static nested tests/type_propagation/try-test.toit // {Null_|SmallInteger_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 nested tests/type_propagation/try-test.toit 0[022] - load null 1[029] - load method [block] in nested tests/type_propagation/try-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {Null_} 12[041] - pop 1 - 13[095] - unlink try 0 + 13[097] - unlink try 0 15[018] - load local 4 - 16[088] - return S6 0 - 19[096] - unwind + 16[090] - return S6 0 + 19[098] - unwind 20[041] - pop 1 [block] in nested tests/type_propagation/try-test.toit - argument 0: [block] 0[022] - load null 1[029] - load method [block] in [block] in nested tests/type_propagation/try-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {SmallInteger_} 12[041] - pop 1 - 13[095] - unlink try 0 + 13[097] - unlink try 0 15[000] - load local S7 17[019] - load local 5 18[006] - store outer S1 20[041] - pop 1 - 21[096] - unwind + 21[098] - unwind 22[041] - pop 1 23[022] - load null 24[004] - store local, pop S1 - 26[088] - return S1 1 + 26[090] - return S1 1 [block] in [block] in nested tests/type_propagation/try-test.toit - argument 0: [block] 0[016] - load local 2 1[026] - load smi 42 3[006] - store outer S1 - 5[088] - return S1 1 + 5[090] - return S1 1 diff --git a/tests/type_propagation/gold/try-test.gold-O2 b/tests/type_propagation/gold/try-test.gold-O2 index 9df4be64f..7bf78e272 100644 --- a/tests/type_propagation/gold/try-test.gold-O2 +++ b/tests/type_propagation/gold/try-test.gold-O2 @@ -1,46 +1,46 @@ main tests/type_propagation/try-test.toit 0[053] - invoke static test-nested tests/type_propagation/try-test.toit // {Null_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 test-nested tests/type_propagation/try-test.toit 0[053] - invoke static nested tests/type_propagation/try-test.toit // {Null_|SmallInteger_} - 3[089] - return null S1 0 + 3[091] - return null S1 0 nested tests/type_propagation/try-test.toit 0[022] - load null 1[029] - load method [block] in nested tests/type_propagation/try-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {Null_} 12[041] - pop 1 - 13[095] - unlink try 0 + 13[097] - unlink try 0 15[018] - load local 4 - 16[088] - return S6 0 - 19[096] - unwind + 16[090] - return S6 0 + 19[098] - unwind 20[041] - pop 1 [block] in nested tests/type_propagation/try-test.toit - argument 0: [block] 0[022] - load null 1[029] - load method [block] in [block] in nested tests/type_propagation/try-test.toit - 6[094] - link try 0 + 6[096] - link try 0 8[038] - load block 4 10[055] - invoke block S1 // [[block]] -> {SmallInteger_} 12[041] - pop 1 - 13[095] - unlink try 0 + 13[097] - unlink try 0 15[000] - load local S7 17[019] - load local 5 18[006] - store outer S1 20[041] - pop 1 - 21[096] - unwind + 21[098] - unwind 22[041] - pop 1 23[022] - load null 24[004] - store local, pop S1 - 26[088] - return S1 1 + 26[090] - return S1 1 [block] in [block] in nested tests/type_propagation/try-test.toit - argument 0: [block] 0[016] - load local 2 1[026] - load smi 42 3[006] - store outer S1 - 5[088] - return S1 1 + 5[090] - return S1 1 diff --git a/tests/type_propagation/gold/typecheck-test.gold b/tests/type_propagation/gold/typecheck-test.gold index fcd20aff7..63fc25079 100644 --- a/tests/type_propagation/gold/typecheck-test.gold +++ b/tests/type_propagation/gold/typecheck-test.gold @@ -4,7 +4,7 @@ main tests/type_propagation/typecheck-test.toit 4[053] - invoke static test-any tests/type_propagation/typecheck-test.toit // {Null_} 7[041] - pop 1 8[053] - invoke static test-throws tests/type_propagation/typecheck-test.toit // {Null_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 test-simple tests/type_propagation/typecheck-test.toit 0[022] - load null @@ -22,7 +22,7 @@ test-simple tests/type_propagation/typecheck-test.toit 26[020] - load literal kurt 28[053] - invoke static is-int tests/type_propagation/typecheck-test.toit // [{String_}] -> {False_} 31[053] - invoke static id tests/type_propagation/typecheck-test.toit // [{False_}] -> {False_} - 34[089] - return null S1 0 + 34[091] - return null S1 0 test-any tests/type_propagation/typecheck-test.toit 0[020] - load literal true @@ -36,7 +36,7 @@ test-any tests/type_propagation/typecheck-test.toit 17[041] - pop 1 18[020] - load literal hest 20[053] - invoke static id tests/type_propagation/typecheck-test.toit // [{String_}] -> {String_} - 23[089] - return null S1 0 + 23[091] - return null S1 0 test-throws tests/type_propagation/typecheck-test.toit 0[029] - load method [block] in test-throws tests/type_propagation/typecheck-test.toit @@ -50,37 +50,37 @@ test-throws tests/type_propagation/typecheck-test.toit 21[022] - load null 22[022] - load null 23[053] - invoke static catch /core/exceptions.toit // [[block], {Null_}, {Null_}] -> {*} - 26[089] - return null S2 0 + 26[091] - return null S2 0 [block] in test-throws tests/type_propagation/typecheck-test.toit - argument 0: [block] 0[053] - invoke static foo tests/type_propagation/typecheck-test.toit // {SmallInteger_} 3[048] - as class StringSlice_(11 - 13) // {False_} - 5[088] - return S1 1 + 5[090] - return S1 1 [block] in test-throws tests/type_propagation/typecheck-test.toit - argument 0: [block] 0[026] - load smi 7 2[053] - invoke static bar tests/type_propagation/typecheck-test.toit // [{SmallInteger_}] -> {} - 5[088] - return S1 1 + 5[090] - return S1 1 foo tests/type_propagation/typecheck-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 bar tests/type_propagation/typecheck-test.toit - argument 0: {SmallInteger_} 0[052] - load local, as class, pop 2 - StringSlice_(11 - 13) // {False_} 2[026] - load smi 99 - 4[088] - return S1 1 + 4[090] - return S1 1 is-int tests/type_propagation/typecheck-test.toit - argument 0: {String_|Null_|float|SmallInteger_} 0[016] - load local 2 1[044] - is class LargeInteger_(22 - 24) // {True_|False_} - 3[088] - return S1 1 + 3[090] - return S1 1 id tests/type_propagation/typecheck-test.toit - argument 0: {String_|True_|False_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 diff --git a/tests/type_propagation/gold/typecheck-test.gold-O2 b/tests/type_propagation/gold/typecheck-test.gold-O2 index 794ba0132..77463b02f 100644 --- a/tests/type_propagation/gold/typecheck-test.gold-O2 +++ b/tests/type_propagation/gold/typecheck-test.gold-O2 @@ -4,7 +4,7 @@ main tests/type_propagation/typecheck-test.toit 4[053] - invoke static test-any tests/type_propagation/typecheck-test.toit // {Null_} 7[041] - pop 1 8[053] - invoke static test-throws tests/type_propagation/typecheck-test.toit // {Null_} - 11[089] - return null S1 0 + 11[091] - return null S1 0 test-simple tests/type_propagation/typecheck-test.toit 0[022] - load null @@ -22,7 +22,7 @@ test-simple tests/type_propagation/typecheck-test.toit 26[020] - load literal kurt 28[053] - invoke static is-int tests/type_propagation/typecheck-test.toit // [{String_}] -> {False_} 31[053] - invoke static id tests/type_propagation/typecheck-test.toit // [{False_}] -> {False_} - 34[089] - return null S1 0 + 34[091] - return null S1 0 test-any tests/type_propagation/typecheck-test.toit 0[020] - load literal true @@ -36,7 +36,7 @@ test-any tests/type_propagation/typecheck-test.toit 17[041] - pop 1 18[020] - load literal hest 20[053] - invoke static id tests/type_propagation/typecheck-test.toit // [{String_}] -> {String_} - 23[089] - return null S1 0 + 23[091] - return null S1 0 test-throws tests/type_propagation/typecheck-test.toit 0[029] - load method [block] in test-throws tests/type_propagation/typecheck-test.toit @@ -50,23 +50,23 @@ test-throws tests/type_propagation/typecheck-test.toit 21[022] - load null 22[022] - load null 23[053] - invoke static catch /core/exceptions.toit // [[block], {Null_}, {Null_}] -> {*} - 26[089] - return null S2 0 + 26[091] - return null S2 0 [block] in test-throws tests/type_propagation/typecheck-test.toit - argument 0: [block] 0[053] - invoke static foo tests/type_propagation/typecheck-test.toit // {SmallInteger_} 3[048] - as class StringSlice_(8 - 10) // {False_} - 5[088] - return S1 1 + 5[090] - return S1 1 [block] in test-throws tests/type_propagation/typecheck-test.toit - argument 0: [block] 0[026] - load smi 7 2[053] - invoke static bar tests/type_propagation/typecheck-test.toit // [{SmallInteger_}] -> {} - 5[088] - return S1 1 + 5[090] - return S1 1 foo tests/type_propagation/typecheck-test.toit 0[026] - load smi 42 - 2[088] - return S1 0 + 2[090] - return S1 0 bar tests/type_propagation/typecheck-test.toit - argument 0: {SmallInteger_} @@ -76,9 +76,9 @@ is-int tests/type_propagation/typecheck-test.toit - argument 0: {String_|Null_|float|SmallInteger_} 0[016] - load local 2 1[044] - is class LargeInteger_(19 - 21) // {True_|False_} - 3[088] - return S1 1 + 3[090] - return S1 1 id tests/type_propagation/typecheck-test.toit - argument 0: {String_|True_|False_|SmallInteger_} 0[016] - load local 2 - 1[088] - return S1 1 + 1[090] - return S1 1 From f39e30f9b225a84e9b8737d2bca13314d887f773 Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Fri, 1 Dec 2023 11:17:53 +0100 Subject: [PATCH 3/4] Feedback. Fix deMorgan bug. Add test. --- src/compiler/propagation/type_propagator.cc | 11 +++++-- src/compiler/propagation/type_set.cc | 2 +- tests/type_propagation/default-test.toit | 13 ++++++++ tests/type_propagation/gold/default-test.gold | 33 +++++++++++++++++++ .../type_propagation/gold/deltablue-test.gold | 6 ++-- .../gold/deltablue-test.gold-O2 | 15 ++++----- .../type_propagation/gold/richards-test.gold | 4 +-- .../gold/richards-test.gold-O2 | 4 +-- 8 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 tests/type_propagation/default-test.toit create mode 100644 tests/type_propagation/gold/default-test.gold diff --git a/src/compiler/propagation/type_propagator.cc b/src/compiler/propagation/type_propagator.cc index ce393b79c..5b57114e2 100644 --- a/src/compiler/propagation/type_propagator.cc +++ b/src/compiler/propagation/type_propagator.cc @@ -1174,10 +1174,17 @@ static TypeScope* process(TypeScope* scope, uint8* bcp, std::vector& OPCODE_END(); OPCODE_BEGIN(BRANCH_IF_NOT_NULL); + TypeSet top = stack->local(0); + bool can_be_null = top.contains_null(program); stack->pop(); uint8* target = bcp + Utils::read_unaligned_uint16(bcp + 1); - scope = worklists.back()->add(target, scope, true); - stack = scope->top(); + if (!can_be_null) { + // Unconditionally continue at the branch target. + return worklists.back()->add(target, scope, false); + } else if (top.size(propagator->words_per_type()) > 1) { + scope = worklists.back()->add(target, scope, true); + stack = scope->top(); + } OPCODE_END(); OPCODE_BEGIN(BRANCH_BACK); diff --git a/src/compiler/propagation/type_set.cc b/src/compiler/propagation/type_set.cc index 6ac098401..3009a6362 100644 --- a/src/compiler/propagation/type_set.cc +++ b/src/compiler/propagation/type_set.cc @@ -97,7 +97,7 @@ bool TypeSet::can_be_truthy(Program* program) const { Iterator it(*this, TypeSet::words_per_type(program)); while (it.has_next()) { unsigned id = it.next(); - if (id != null_id || id != false_id) return true; + if (id != null_id && id != false_id) return true; } return false; } diff --git a/tests/type_propagation/default-test.toit b/tests/type_propagation/default-test.toit new file mode 100644 index 000000000..930e43d10 --- /dev/null +++ b/tests/type_propagation/default-test.toit @@ -0,0 +1,13 @@ +main: + foo false + foo2 false + +bar: return true + +foo x=bar: + if x: + print x + +foo2 x=true: + if x: + print x diff --git a/tests/type_propagation/gold/default-test.gold b/tests/type_propagation/gold/default-test.gold new file mode 100644 index 000000000..420342166 --- /dev/null +++ b/tests/type_propagation/gold/default-test.gold @@ -0,0 +1,33 @@ +main tests/type_propagation/default-test.toit + 0[020] - load literal false + 2[053] - invoke static foo tests/type_propagation/default-test.toit // [{False_}] -> {Null_} + 5[041] - pop 1 + 6[020] - load literal false + 8[053] - invoke static foo2 tests/type_propagation/default-test.toit // [{False_}] -> {Null_} + 11[091] - return null S1 0 + +foo tests/type_propagation/default-test.toit + - argument 0: {False_} + 0[016] - load local 2 + 1[083] - branch if not null T9 + 4[053] - invoke static bar tests/type_propagation/default-test.toit + 7[004] - store local, pop S3 + 9[016] - load local 2 + 10[082] - branch if false T18 + 13[016] - load local 2 + 14[053] - invoke static print /core/print.toit + 17[041] - pop 1 + 18[091] - return null S0 1 + +foo2 tests/type_propagation/default-test.toit + - argument 0: {False_} + 0[016] - load local 2 + 1[083] - branch if not null T8 + 4[020] - load literal true + 6[004] - store local, pop S3 + 8[016] - load local 2 + 9[082] - branch if false T17 + 12[016] - load local 2 + 13[053] - invoke static print /core/print.toit + 16[041] - pop 1 + 17[091] - return null S0 1 diff --git a/tests/type_propagation/gold/deltablue-test.gold b/tests/type_propagation/gold/deltablue-test.gold index d95763af5..fe6971f2b 100644 --- a/tests/type_propagation/gold/deltablue-test.gold +++ b/tests/type_propagation/gold/deltablue-test.gold @@ -772,10 +772,10 @@ ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit EqualityConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} - argument 1: {Strength} - - argument 2: {Null_|Variable} + - argument 2: {Variable} - argument 3: {Variable} 0[052] - load local, as class, pop 4 - Strength(47 - 48) // {True_} - 2[052] - load local, as class, pop 3 - Variable(42 - 43) // {True_|False_} + 2[052] - load local, as class, pop 3 - Variable(42 - 43) // {True_} 4[052] - load local, as class, pop 2 - Variable(42 - 43) // {True_} 6[019] - load local 5 7[019] - load local 5 @@ -1282,7 +1282,7 @@ chain-test tests/type_propagation/deltablue-test.toit 43[032] - load global var lazy G0 // {Strength} 45[000] - load local S6 47[017] - load local 3 - 48[053] - invoke static EqualityConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Null_|Variable}, {Variable}] -> {EqualityConstraint} + 48[053] - invoke static EqualityConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} 51[041] - pop 1 52[015] - load local 1 53[023] - load smi 0 diff --git a/tests/type_propagation/gold/deltablue-test.gold-O2 b/tests/type_propagation/gold/deltablue-test.gold-O2 index 605842925..91cfa5dbd 100644 --- a/tests/type_propagation/gold/deltablue-test.gold-O2 +++ b/tests/type_propagation/gold/deltablue-test.gold-O2 @@ -719,16 +719,15 @@ ScaleConstraint.recalculate tests/type_propagation/deltablue-test.toit EqualityConstraint tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} - argument 1: {Strength} - - argument 2: {Null_|Variable} + - argument 2: {Variable} - argument 3: {Variable} - 0[052] - load local, as class, pop 3 - Variable(37 - 38) // {True_|False_} + 0[019] - load local 5 + 1[019] - load local 5 2[019] - load local 5 3[019] - load local 5 - 4[019] - load local 5 - 5[019] - load local 5 - 6[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} - 9[002] - pop, load local S5 - 11[090] - return S1 4 + 4[053] - invoke static BinaryConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} + 7[002] - pop, load local S5 + 9[090] - return S1 4 EqualityConstraint.execute tests/type_propagation/deltablue-test.toit - argument 0: {EqualityConstraint} @@ -1211,7 +1210,7 @@ chain-test tests/type_propagation/deltablue-test.toit 39[032] - load global var lazy G0 // {Strength} 41[000] - load local S6 43[017] - load local 3 - 44[053] - invoke static EqualityConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Null_|Variable}, {Variable}] -> {EqualityConstraint} + 44[053] - invoke static EqualityConstraint tests/type_propagation/deltablue-test.toit // [{EqualityConstraint}, {Strength}, {Variable}, {Variable}] -> {EqualityConstraint} 47[041] - pop 1 48[015] - load local 1 49[023] - load smi 0 diff --git a/tests/type_propagation/gold/richards-test.gold b/tests/type_propagation/gold/richards-test.gold index db2f87c7b..ffda2485a 100644 --- a/tests/type_propagation/gold/richards-test.gold +++ b/tests/type_propagation/gold/richards-test.gold @@ -688,7 +688,7 @@ WorkerTask.run tests/type_propagation/richards-test.toit 28[013] - store field, pop 1 30[016] - load local 2 31[009] - load field local 20 // [{WorkerTask}] -> {Null_|SmallInteger_} - 33[061] - invoke virtual set id // [{Null_|Packet}, {Null_|SmallInteger_}] -> {SmallInteger_} + 33[061] - invoke virtual set id // [{Packet}, {Null_|SmallInteger_}] -> {SmallInteger_} 36[002] - pop, load local S2 38[023] - load smi 0 39[061] - invoke virtual set a1 // [{Packet}, {SmallInteger_}] -> {SmallInteger_} @@ -745,7 +745,7 @@ HandlerTask.run tests/type_propagation/richards-test.toit 0[016] - load local 2 1[082] - branch if false T36 4[016] - load local 2 - 5[060] - invoke virtual get kind // [{Null_|Packet}] -> {Null_|SmallInteger_} + 5[060] - invoke virtual get kind // [{Packet}] -> {Null_|SmallInteger_} 8[025] - load smi 1 9[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 10[082] - branch if false T26 diff --git a/tests/type_propagation/gold/richards-test.gold-O2 b/tests/type_propagation/gold/richards-test.gold-O2 index cfcafaaf9..7ac4bd6e9 100644 --- a/tests/type_propagation/gold/richards-test.gold-O2 +++ b/tests/type_propagation/gold/richards-test.gold-O2 @@ -639,7 +639,7 @@ WorkerTask.run tests/type_propagation/richards-test.toit 26[013] - store field, pop 1 28[016] - load local 2 29[009] - load field local 20 // [{WorkerTask}] -> {Null_|SmallInteger_} - 31[061] - invoke virtual set id // [{Null_|Packet}, {Null_|SmallInteger_}] -> {SmallInteger_} + 31[061] - invoke virtual set id // [{Packet}, {Null_|SmallInteger_}] -> {SmallInteger_} 34[002] - pop, load local S2 36[023] - load smi 0 37[061] - invoke virtual set a1 // [{Packet}, {SmallInteger_}] -> {SmallInteger_} @@ -693,7 +693,7 @@ HandlerTask.run tests/type_propagation/richards-test.toit 0[016] - load local 2 1[082] - branch if false T36 4[016] - load local 2 - 5[060] - invoke virtual get kind // [{Null_|Packet}] -> {Null_|SmallInteger_} + 5[060] - invoke virtual get kind // [{Packet}] -> {Null_|SmallInteger_} 8[025] - load smi 1 9[062] - invoke eq // [{Null_|SmallInteger_}, {SmallInteger_}] -> {True_|False_} 10[082] - branch if false T26 From 8fed9db63c7c623652162677e67982031e30d2fd Mon Sep 17 00:00:00 2001 From: Erik Corry Date: Fri, 1 Dec 2023 12:30:29 +0100 Subject: [PATCH 4/4] Add O2 gold file --- .../gold/default-test.gold-O2 | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/type_propagation/gold/default-test.gold-O2 diff --git a/tests/type_propagation/gold/default-test.gold-O2 b/tests/type_propagation/gold/default-test.gold-O2 new file mode 100644 index 000000000..a88253d68 --- /dev/null +++ b/tests/type_propagation/gold/default-test.gold-O2 @@ -0,0 +1,25 @@ +main tests/type_propagation/default-test.toit + 0[020] - load literal false + 2[053] - invoke static foo tests/type_propagation/default-test.toit // [{False_}] -> {Null_} + 5[041] - pop 1 + 6[020] - load literal false + 8[053] - invoke static foo2 tests/type_propagation/default-test.toit // [{False_}] -> {Null_} + 11[091] - return null S1 0 + +foo tests/type_propagation/default-test.toit + - argument 0: {False_} + 0[016] - load local 2 + 1[083] - branch if not null T4 + 4[016] - load local 2 + 5[082] - branch if false T8 + 8[091] - return null S0 1 + +foo2 tests/type_propagation/default-test.toit + - argument 0: {False_} + 0[016] - load local 2 + 1[083] - branch if not null T8 + 4[020] - load literal true + 6[004] - store local, pop S3 + 8[016] - load local 2 + 9[082] - branch if false T12 + 12[091] - return null S0 1