-
Notifications
You must be signed in to change notification settings - Fork 8
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
be/jvm: line number table attribute #2802
Merged
maxteufel
merged 2 commits into
tokiwa-software:main
from
michaellilltokiwa:line_number_table_attribute
Mar 27, 2024
Merged
be/jvm: line number table attribute #2802
maxteufel
merged 2 commits into
tokiwa-software:main
from
michaellilltokiwa:line_number_table_attribute
Mar 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
example output from javap -v ``` $ javap -v HelloWorld.classes/fzC_1panic.class Classfile /home/not_synced/fuzion/HelloWorld.classes/fzC_1panic.class Last modified 26 Mar 2024; size 205 bytes SHA-256 checksum f9f7d552f819bbe14fc4043cd837ea1c712c68db593e503576ad81361f2182d0 Compiled from "$FUZION/lib/panic.fz" public class fzC_1panic extends dev.flang.be.jvm.runtime.Any minor version: 0 ... $ javap -v HelloWorld.classes/fzC_HelloWorld.class Classfile /home/not_synced/fuzion/HelloWorld.classes/fzC_HelloWorld.class Last modified 26 Mar 2024; size 425 bytes SHA-256 checksum 61233ef733288b2f946d99a245e0d462a6cd3fc728a142c651c1a4a3b2675372 Compiled from "/home/not_synced/fuzion/tests/hello/HelloWorld.fz" ... ```
michaellilltokiwa
added
the
jvm backend
related to the JVM bytecode backend and variantes (-classes, -jar, etc.)
label
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
force-pushed
the
line_number_table_attribute
branch
from
March 26, 2024 12:42
2fc34c3
to
d1b045e
Compare
maxteufel
approved these changes
Mar 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
example output
javap -v
: