-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check-condition failure when using fun-type in string.trim #50
Comments
Here is a minimal example:
that results in the same error
|
fridis
added a commit
that referenced
this issue
Sep 16, 2021
This was referenced Sep 17, 2021
michaellilltokiwa
added a commit
to michaellilltokiwa/fuzion
that referenced
this issue
Mar 26, 2024
example output `javap -v`: ``` $ javap -v basicIntegers.classes/fzC_basicIntegers.class Classfile /home/not_synced/fuzion/basicIntegers.classes/fzC_basicIntegers.class Last modified 26 Mar 2024; size 981 bytes SHA-256 checksum 3ce79a43f7e414e0eb926e1ce5838a5e69db7678ee847edbc2cda936e3b005ff Compiled from "/home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz" public class fzC_basicIntegers extends dev.flang.be.jvm.runtime.Any minor version: 0 major version: 65 flags: (0x0021) ACC_PUBLIC, ACC_SUPER this_class: tokiwa-software#2 // fzC_basicIntegers super_class: tokiwa-software#4 // dev/flang/be/jvm/runtime/Any interfaces: 0, fields: 0, methods: 2, attributes: 1 Constant pool: tokiwa-software#1 = Utf8 fzC_basicIntegers tokiwa-software#2 = Class tokiwa-software#1 // fzC_basicIntegers tokiwa-software#3 = Utf8 dev/flang/be/jvm/runtime/Any tokiwa-software#4 = Class tokiwa-software#3 // dev/flang/be/jvm/runtime/Any tokiwa-software#5 = Utf8 SourceFile tokiwa-software#6 = Utf8 /home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz tokiwa-software#7 = Utf8 StackMapTable tokiwa-software#8 = Utf8 LineNumberTable tokiwa-software#9 = Utf8 Code tokiwa-software#10 = Utf8 <init> tokiwa-software#11 = Utf8 ()V tokiwa-software#12 = NameAndType tokiwa-software#10:tokiwa-software#11 // "<init>":()V tokiwa-software#13 = Methodref tokiwa-software#4.tokiwa-software#12 // dev/flang/be/jvm/runtime/Any."<init>":()V tokiwa-software#14 = Methodref tokiwa-software#2.tokiwa-software#12 // fzC_basicIntegers."<init>":()V tokiwa-software#15 = Utf8 fzC_basicIntegers__2testAll tokiwa-software#16 = Utf8 fzRoutine tokiwa-software#17 = Utf8 (JJ)LfzC_basicIntegers__2testAll; tokiwa-software#18 = Class tokiwa-software#15 // fzC_basicIntegers__2testAll tokiwa-software#19 = NameAndType tokiwa-software#16:tokiwa-software#17 // fzRoutine:(JJ)LfzC_basicIntegers__2testAll; tokiwa-software#20 = Methodref tokiwa-software#18.tokiwa-software#19 // fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; tokiwa-software#21 = Long 2l tokiwa-software#23 = Utf8 fzC_1i64__prefix_minus tokiwa-software#24 = Utf8 fzPreconditionAndRoutine tokiwa-software#25 = Utf8 (J)J tokiwa-software#26 = Class tokiwa-software#23 // fzC_1i64__prefix_minus tokiwa-software#27 = NameAndType tokiwa-software#24:tokiwa-software#25 // fzPreconditionAndRoutine:(J)J tokiwa-software#28 = Methodref tokiwa-software#26.tokiwa-software#27 // fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J tokiwa-software#29 = Long 3l tokiwa-software#31 = Long 100l tokiwa-software#33 = Long 23l tokiwa-software#35 = Long 12300l tokiwa-software#37 = Long 45l tokiwa-software#39 = Long 1234567000l tokiwa-software#41 = Long 890l tokiwa-software#43 = Long 12345670000000l tokiwa-software#45 = Long 8901234l tokiwa-software#47 = Utf8 fzC_basicIntegers__assignConstants tokiwa-software#48 = Class tokiwa-software#47 // fzC_basicIntegers__assignConstants tokiwa-software#49 = NameAndType tokiwa-software#16:tokiwa-software#11 // fzRoutine:()V tokiwa-software#50 = Methodref tokiwa-software#48.tokiwa-software#49 // fzC_basicIntegers__assignConstants.fzRoutine:()V tokiwa-software#51 = Utf8 fzC_basicIntegers__assignConstantsToConstructor tokiwa-software#52 = Class tokiwa-software#51 // fzC_basicIntegers__assignConstantsToConstructor tokiwa-software#53 = Methodref tokiwa-software#52.tokiwa-software#49 // fzC_basicIntegers__assignConstantsToConstructor.fzRoutine:()V { public fzC_basicIntegers(); descriptor: ()V flags: (0x0001) ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: invokespecial tokiwa-software#13 // Method dev/flang/be/jvm/runtime/Any."<init>":()V 4: return StackMapTable: number_of_entries = 0 LineNumberTable: public static void fzRoutine(); descriptor: ()V flags: (0x0009) ACC_PUBLIC, ACC_STATIC Code: stack=4, locals=1, args_size=0 0: new tokiwa-software#2 // class fzC_basicIntegers 3: dup 4: invokespecial tokiwa-software#14 // Method "<init>":()V 7: astore_0 8: lconst_0 9: lconst_0 10: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 13: pop 14: lconst_1 15: ldc2_w tokiwa-software#21 // long 2l 18: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 21: pop 22: lconst_1 23: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 26: ldc2_w tokiwa-software#21 // long 2l 29: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 32: pop 33: ldc2_w tokiwa-software#21 // long 2l 36: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 39: ldc2_w tokiwa-software#29 // long 3l 42: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 45: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 48: pop 49: ldc2_w tokiwa-software#31 // long 100l 52: ldc2_w tokiwa-software#33 // long 23l 55: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 58: pop 59: ldc2_w tokiwa-software#31 // long 100l 62: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 65: ldc2_w tokiwa-software#33 // long 23l 68: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 71: pop 72: ldc2_w tokiwa-software#31 // long 100l 75: ldc2_w tokiwa-software#33 // long 23l 78: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 81: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 84: pop 85: ldc2_w tokiwa-software#31 // long 100l 88: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 91: ldc2_w tokiwa-software#33 // long 23l 94: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 97: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 100: pop 101: ldc2_w tokiwa-software#35 // long 12300l 104: ldc2_w tokiwa-software#37 // long 45l 107: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 110: pop 111: ldc2_w tokiwa-software#39 // long 1234567000l 114: ldc2_w tokiwa-software#41 // long 890l 117: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 120: pop 121: ldc2_w tokiwa-software#43 // long 12345670000000l 124: ldc2_w tokiwa-software#45 // long 8901234l 127: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 130: pop 131: ldc2_w tokiwa-software#43 // long 12345670000000l 134: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 137: ldc2_w tokiwa-software#45 // long 8901234l 140: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 143: pop 144: ldc2_w tokiwa-software#43 // long 12345670000000l 147: ldc2_w tokiwa-software#45 // long 8901234l 150: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 153: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 156: pop 157: ldc2_w tokiwa-software#43 // long 12345670000000l 160: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 163: ldc2_w tokiwa-software#45 // long 8901234l 166: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 169: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 172: pop 173: invokestatic tokiwa-software#50 // Method fzC_basicIntegers__assignConstants.fzRoutine:()V 176: invokestatic tokiwa-software#53 // Method fzC_basicIntegers__assignConstantsToConstructor.fzRoutine:()V 179: return StackMapTable: number_of_entries = 1 frame_type = 255 /* full_frame */ offset_delta = 0 locals = [] stack = [] LineNumberTable: line 59: 10 line 60: 18 line 61: 23 line 61: 29 line 62: 36 line 62: 42 line 62: 45 line 63: 55 line 64: 62 line 64: 68 line 65: 78 line 65: 81 line 66: 88 line 66: 94 line 66: 97 line 67: 107 line 68: 117 line 69: 127 line 70: 134 line 70: 140 line 71: 150 line 71: 153 line 72: 160 line 72: 166 line 72: 169 line 130: 173 line 188: 176 } SourceFile: "/home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz" ```
michaellilltokiwa
added a commit
to michaellilltokiwa/fuzion
that referenced
this issue
Mar 26, 2024
example output `javap -v`: ``` $ javap -v basicIntegers.classes/fzC_basicIntegers.class Classfile /home/not_synced/fuzion/basicIntegers.classes/fzC_basicIntegers.class Last modified 26 Mar 2024; size 981 bytes SHA-256 checksum 3ce79a43f7e414e0eb926e1ce5838a5e69db7678ee847edbc2cda936e3b005ff Compiled from "/home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz" public class fzC_basicIntegers extends dev.flang.be.jvm.runtime.Any minor version: 0 major version: 65 flags: (0x0021) ACC_PUBLIC, ACC_SUPER this_class: tokiwa-software#2 // fzC_basicIntegers super_class: tokiwa-software#4 // dev/flang/be/jvm/runtime/Any interfaces: 0, fields: 0, methods: 2, attributes: 1 Constant pool: tokiwa-software#1 = Utf8 fzC_basicIntegers tokiwa-software#2 = Class tokiwa-software#1 // fzC_basicIntegers tokiwa-software#3 = Utf8 dev/flang/be/jvm/runtime/Any tokiwa-software#4 = Class tokiwa-software#3 // dev/flang/be/jvm/runtime/Any tokiwa-software#5 = Utf8 SourceFile tokiwa-software#6 = Utf8 /home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz tokiwa-software#7 = Utf8 StackMapTable tokiwa-software#8 = Utf8 LineNumberTable tokiwa-software#9 = Utf8 Code tokiwa-software#10 = Utf8 <init> tokiwa-software#11 = Utf8 ()V tokiwa-software#12 = NameAndType tokiwa-software#10:tokiwa-software#11 // "<init>":()V tokiwa-software#13 = Methodref tokiwa-software#4.tokiwa-software#12 // dev/flang/be/jvm/runtime/Any."<init>":()V tokiwa-software#14 = Methodref tokiwa-software#2.tokiwa-software#12 // fzC_basicIntegers."<init>":()V tokiwa-software#15 = Utf8 fzC_basicIntegers__2testAll tokiwa-software#16 = Utf8 fzRoutine tokiwa-software#17 = Utf8 (JJ)LfzC_basicIntegers__2testAll; tokiwa-software#18 = Class tokiwa-software#15 // fzC_basicIntegers__2testAll tokiwa-software#19 = NameAndType tokiwa-software#16:tokiwa-software#17 // fzRoutine:(JJ)LfzC_basicIntegers__2testAll; tokiwa-software#20 = Methodref tokiwa-software#18.tokiwa-software#19 // fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; tokiwa-software#21 = Long 2l tokiwa-software#23 = Utf8 fzC_1i64__prefix_minus tokiwa-software#24 = Utf8 fzPreconditionAndRoutine tokiwa-software#25 = Utf8 (J)J tokiwa-software#26 = Class tokiwa-software#23 // fzC_1i64__prefix_minus tokiwa-software#27 = NameAndType tokiwa-software#24:tokiwa-software#25 // fzPreconditionAndRoutine:(J)J tokiwa-software#28 = Methodref tokiwa-software#26.tokiwa-software#27 // fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J tokiwa-software#29 = Long 3l tokiwa-software#31 = Long 100l tokiwa-software#33 = Long 23l tokiwa-software#35 = Long 12300l tokiwa-software#37 = Long 45l tokiwa-software#39 = Long 1234567000l tokiwa-software#41 = Long 890l tokiwa-software#43 = Long 12345670000000l tokiwa-software#45 = Long 8901234l tokiwa-software#47 = Utf8 fzC_basicIntegers__assignConstants tokiwa-software#48 = Class tokiwa-software#47 // fzC_basicIntegers__assignConstants tokiwa-software#49 = NameAndType tokiwa-software#16:tokiwa-software#11 // fzRoutine:()V tokiwa-software#50 = Methodref tokiwa-software#48.tokiwa-software#49 // fzC_basicIntegers__assignConstants.fzRoutine:()V tokiwa-software#51 = Utf8 fzC_basicIntegers__assignConstantsToConstructor tokiwa-software#52 = Class tokiwa-software#51 // fzC_basicIntegers__assignConstantsToConstructor tokiwa-software#53 = Methodref tokiwa-software#52.tokiwa-software#49 // fzC_basicIntegers__assignConstantsToConstructor.fzRoutine:()V { public fzC_basicIntegers(); descriptor: ()V flags: (0x0001) ACC_PUBLIC Code: stack=1, locals=1, args_size=1 0: aload_0 1: invokespecial tokiwa-software#13 // Method dev/flang/be/jvm/runtime/Any."<init>":()V 4: return StackMapTable: number_of_entries = 0 LineNumberTable: public static void fzRoutine(); descriptor: ()V flags: (0x0009) ACC_PUBLIC, ACC_STATIC Code: stack=4, locals=1, args_size=0 0: new tokiwa-software#2 // class fzC_basicIntegers 3: dup 4: invokespecial tokiwa-software#14 // Method "<init>":()V 7: astore_0 8: lconst_0 9: lconst_0 10: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 13: pop 14: lconst_1 15: ldc2_w tokiwa-software#21 // long 2l 18: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 21: pop 22: lconst_1 23: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 26: ldc2_w tokiwa-software#21 // long 2l 29: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 32: pop 33: ldc2_w tokiwa-software#21 // long 2l 36: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 39: ldc2_w tokiwa-software#29 // long 3l 42: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 45: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 48: pop 49: ldc2_w tokiwa-software#31 // long 100l 52: ldc2_w tokiwa-software#33 // long 23l 55: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 58: pop 59: ldc2_w tokiwa-software#31 // long 100l 62: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 65: ldc2_w tokiwa-software#33 // long 23l 68: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 71: pop 72: ldc2_w tokiwa-software#31 // long 100l 75: ldc2_w tokiwa-software#33 // long 23l 78: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 81: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 84: pop 85: ldc2_w tokiwa-software#31 // long 100l 88: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 91: ldc2_w tokiwa-software#33 // long 23l 94: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 97: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 100: pop 101: ldc2_w tokiwa-software#35 // long 12300l 104: ldc2_w tokiwa-software#37 // long 45l 107: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 110: pop 111: ldc2_w tokiwa-software#39 // long 1234567000l 114: ldc2_w tokiwa-software#41 // long 890l 117: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 120: pop 121: ldc2_w tokiwa-software#43 // long 12345670000000l 124: ldc2_w tokiwa-software#45 // long 8901234l 127: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 130: pop 131: ldc2_w tokiwa-software#43 // long 12345670000000l 134: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 137: ldc2_w tokiwa-software#45 // long 8901234l 140: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 143: pop 144: ldc2_w tokiwa-software#43 // long 12345670000000l 147: ldc2_w tokiwa-software#45 // long 8901234l 150: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 153: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 156: pop 157: ldc2_w tokiwa-software#43 // long 12345670000000l 160: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 163: ldc2_w tokiwa-software#45 // long 8901234l 166: invokestatic tokiwa-software#28 // Method fzC_1i64__prefix_minus.fzPreconditionAndRoutine:(J)J 169: invokestatic tokiwa-software#20 // Method fzC_basicIntegers__2testAll.fzRoutine:(JJ)LfzC_basicIntegers__2testAll; 172: pop 173: invokestatic tokiwa-software#50 // Method fzC_basicIntegers__assignConstants.fzRoutine:()V 176: invokestatic tokiwa-software#53 // Method fzC_basicIntegers__assignConstantsToConstructor.fzRoutine:()V 179: return StackMapTable: number_of_entries = 1 frame_type = 255 /* full_frame */ offset_delta = 0 locals = [] stack = [] LineNumberTable: line 59: 10 line 60: 18 line 61: 23 line 61: 29 line 62: 36 line 62: 42 line 62: 45 line 63: 55 line 64: 62 line 64: 68 line 65: 78 line 65: 81 line 66: 88 line 66: 94 line 66: 97 line 67: 107 line 68: 117 line 69: 127 line 70: 134 line 70: 140 line 71: 150 line 71: 153 line 72: 160 line 72: 166 line 72: 169 line 130: 173 line 188: 176 } SourceFile: "/home/not_synced/fuzion/tests/basicIntegers/basicIntegers.fz" ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changing string.trim to
and running fz on
results in
using the original trim as follows works:
The text was updated successfully, but these errors were encountered: