From d3ed5f774f7195f547d1e051c930856402ea114f Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Mon, 9 Aug 2021 01:48:50 +0200 Subject: [PATCH] Added support for advanced indirect calls. Calls are now fragments. Added support for @outside_flow ASM tag placing ASM at the end of the current scope. Added support for expanding label names in ASM fragments. Closes #708 --- .../cache/fragment-cache-csg65ce02.asm | 2 +- .../cache/fragment-cache-mega45gs02.asm | 1679 +++++++++++----- .../fragment/cache/fragment-cache-mos6502.asm | 2 +- .../cache/fragment-cache-mos6502x.asm | 579 +++--- .../cache/fragment-cache-rom6502x.asm | 2 +- .../cache/fragment-cache-wdc65c02.asm | 2 +- .../mos6502-common/call__deref_pprz1.asm | 2 +- .../dk/camelot64/kickc/asm/AsmProgram.java | 30 + .../kickc/fragment/AsmFragmentInstance.java | 35 +- .../AsmFragmentInstanceSpecBuilder.java | 17 +- .../kickc/fragment/AsmFragmentTemplate.java | 2 + .../dk/camelot64/kickc/parser/KickCParser.g4 | 7 +- .../camelot64/kickc/parser/KickCParser.interp | 2 +- .../camelot64/kickc/parser/KickCParser.java | 1787 +++++++++-------- .../kickc/parser/KickCParserBaseListener.java | 252 ++- .../kickc/parser/KickCParserBaseVisitor.java | 137 +- .../kickc/parser/KickCParserListener.java | 252 ++- .../kickc/parser/KickCParserVisitor.java | 147 +- .../Pass0GenerateStatementSequence.java | 58 +- .../kickc/passes/Pass4CodeGeneration.java | 82 +- src/test/ref/examples/rom/rom.log | 42 +- src/test/ref/function-pointer-advanced-1.asm | 4 +- src/test/ref/function-pointer-advanced-1.log | 160 +- .../ref/function-pointer-noarg-call-10.asm | 4 +- .../ref/function-pointer-noarg-call-10.log | 76 +- .../ref/function-pointer-noarg-call-11.log | 12 +- .../ref/function-pointer-noarg-call-12.asm | 8 +- .../ref/function-pointer-noarg-call-12.log | 38 +- .../ref/function-pointer-noarg-call-14.asm | 4 +- .../ref/function-pointer-noarg-call-14.log | 186 +- .../ref/function-pointer-noarg-call-2.asm | 4 +- .../ref/function-pointer-noarg-call-2.log | 16 +- .../ref/function-pointer-noarg-call-3.asm | 4 +- .../ref/function-pointer-noarg-call-3.log | 24 +- .../ref/function-pointer-noarg-call-4.log | 10 +- .../ref/function-pointer-noarg-call-5.asm | 4 +- .../ref/function-pointer-noarg-call-5.log | 16 +- .../ref/function-pointer-noarg-call-6.log | 6 +- .../ref/function-pointer-noarg-call-7.log | 22 +- .../ref/function-pointer-noarg-call-8.log | 30 +- .../ref/function-pointer-noarg-call-9.log | 18 +- src/test/ref/function-pointer-noarg-call.log | 6 +- src/test/ref/function-pointer-param-0.asm | 4 +- src/test/ref/function-pointer-param-0.log | 20 +- .../ref/function-pointer-param-workaround.asm | 4 +- .../ref/function-pointer-param-workaround.log | 50 +- src/test/ref/function-pointer-return-1.asm | 4 +- src/test/ref/function-pointer-return-1.log | 16 +- src/test/ref/function-pointer-return-2.asm | 4 +- src/test/ref/function-pointer-return-2.log | 26 +- .../procedure-callingconvention-stack-0.log | 6 +- .../procedure-callingconvention-stack-1.log | 6 +- .../procedure-callingconvention-stack-10.log | 16 +- .../procedure-callingconvention-stack-11.log | 16 +- .../procedure-callingconvention-stack-12.log | 16 +- .../procedure-callingconvention-stack-13.log | 10 +- .../procedure-callingconvention-stack-2.log | 6 +- .../procedure-callingconvention-stack-3.log | 6 +- .../procedure-callingconvention-stack-4.log | 14 +- .../procedure-callingconvention-stack-5.log | 22 +- .../procedure-callingconvention-stack-7.log | 12 +- .../procedure-callingconvention-stack-8.log | 14 +- .../procedure-callingconvention-stack-9.log | 38 +- src/test/ref/procedure-declare-8.log | 12 +- src/test/ref/varcall-1.log | 10 +- src/test/ref/varcall-2.log | 10 +- src/test/ref/varcall-3.log | 10 +- src/test/ref/varcall-4.log | 10 +- 68 files changed, 3537 insertions(+), 2595 deletions(-) diff --git a/src/main/fragment/cache/fragment-cache-csg65ce02.asm b/src/main/fragment/cache/fragment-cache-csg65ce02.asm index ce9569244..e964ab00d 100644 --- a/src/main/fragment/cache/fragment-cache-csg65ce02.asm +++ b/src/main/fragment/cache/fragment-cache-csg65ce02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT vbuzz=vbuc1 ldz #{c1} //FRAGMENT vbuzz_lt_vbuc1_then_la1 diff --git a/src/main/fragment/cache/fragment-cache-mega45gs02.asm b/src/main/fragment/cache/fragment-cache-mega45gs02.asm index f46ddb6ef..59efccdc8 100644 --- a/src/main/fragment/cache/fragment-cache-mega45gs02.asm +++ b/src/main/fragment/cache/fragment-cache-mega45gs02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT _deref_pbuc1=vbuc2 lda #{c2} sta {c1} @@ -36,16 +36,1137 @@ sta ({z1}),y //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} -//FRAGMENT vbuz1=_deref_pbuc1_plus_1 -lda {c1} -inc +//FRAGMENT isr_hardware_all_entry +pha @clob_a +phx @clob_x +phy @clob_y +phz @clob_z +//FRAGMENT vbuz1=_inc_vbuz1 +inc {z1} +//FRAGMENT vbuz1=vbuz2 +lda {z2} sta {z1} +//FRAGMENT vbuz1_neq_vbuc1_then_la1 +lda #{c1} +cmp {z1} +bne {la1} +//FRAGMENT call__deref_pprc1 +jsr {c1} //FRAGMENT vbuz1_lt_vbuc1_then_la1 lda {z1} cmp #{c1} bcc {la1} -//FRAGMENT vbuz1=vbuz2 +//FRAGMENT vbuz1=vbuz2_rol_4 lda {z2} +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuz1=_dec_vbuz1 +dec {z1} +//FRAGMENT vbuz1=_deref_pbuz2 +ldy #0 +lda ({z2}),y +sta {z1} +//FRAGMENT vbuz1_neq_0_then_la1 +lda {z1} +bne {la1} +//FRAGMENT vbuz1=vbuz2_band_vbuc1 +lda #{c1} +and {z2} +sta {z1} +//FRAGMENT _deref_pbuc1=vbuz1 +lda {z1} +sta {c1} +//FRAGMENT isr_hardware_all_exit +plz @clob_z +ply @clob_y +plx @clob_x +pla @clob_a +rti +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1},y +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_band_vbuc2 +lda #{c2} +ldy {z2} +and {c1},y +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=vbuz2 +lda {z2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_ror_1 +ldy {z2} +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +//FRAGMENT vbuz1=vbuz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=vbuc2 +lda #{c2} +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1=pbuc1_derefidx_vbuz2_ror_2 +ldy {z2} +lda {c1},y +lsr +lsr +sta {z1} +//FRAGMENT vbuz1=vbuz2_ror_1 +lda {z2} +lsr +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz2 +ldy {z2} +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT vbuz1_eq_vbuc1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} +//FRAGMENT vbuz1=vbuz2_plus_1 +lda {z2} +inc +sta {z1} +//FRAGMENT vbuz1=_deref_pbuc1 +lda {c1} +sta {z1} +//FRAGMENT vbuz1_eq__deref_pbuc1_then_la1 +lda {c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1} +//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuc2 +lda #{c2} +and {c1} +sta {c1} +//FRAGMENT _deref_qprc1=pprc2 +lda #<{c2} +sta {c1} +lda #>{c2} +sta {c1}+1 +//FRAGMENT pbuz1_neq_pbuc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bne {la1} +lda {z1} +cmp #<{c1} +bne {la1} +//FRAGMENT vbuaa=vbuz1 +lda {z1} +//FRAGMENT vbuxx=vbuz1 +ldx {z1} +//FRAGMENT vbuaa_neq_vbuc1_then_la1 +cmp #{c1} +bne {la1} +//FRAGMENT vbuaa_lt_vbuc1_then_la1 +cmp #{c1} +bcc {la1} +//FRAGMENT vbuaa=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +tay +//FRAGMENT vbuzz=vbuz1_rol_4 +lda {z1} +asl +asl +asl +asl +taz +//FRAGMENT vbuaa=_deref_pbuz1 +ldy #0 +lda ({z1}),y +//FRAGMENT vbuxx=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tax +//FRAGMENT vbuyy=_deref_pbuz1 +ldy #0 +lda ({z1}),y +tay +//FRAGMENT vbuzz=_deref_pbuz1 +ldy #0 +lda ({z1}),y +taz +//FRAGMENT vbuaa_neq_0_then_la1 +cmp #0 +bne {la1} +//FRAGMENT vbuz1=vbuaa_band_vbuc1 +and #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuxx_band_vbuc1 +txa +and #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuyy_band_vbuc1 +tya +and #{c1} +sta {z1} +//FRAGMENT vbuz1=vbuzz_band_vbuc1 +tza +and #{c1} +sta {z1} +//FRAGMENT vbuaa=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +//FRAGMENT vbuaa=vbuaa_band_vbuc1 +and #{c1} +//FRAGMENT vbuaa=vbuxx_band_vbuc1 +txa +and #{c1} +//FRAGMENT vbuaa=vbuyy_band_vbuc1 +tya +and #{c1} +//FRAGMENT vbuaa=vbuzz_band_vbuc1 +tza +and #{c1} +//FRAGMENT vbuxx=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +tax +//FRAGMENT vbuxx=vbuaa_band_vbuc1 +and #{c1} +tax +//FRAGMENT vbuxx=vbuxx_band_vbuc1 +txa +and #{c1} +tax +//FRAGMENT vbuxx=vbuyy_band_vbuc1 +tya +and #{c1} +tax +//FRAGMENT vbuxx=vbuzz_band_vbuc1 +tza +and #{c1} +tax +//FRAGMENT vbuyy=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +tay +//FRAGMENT vbuyy=vbuaa_band_vbuc1 +and #{c1} +tay +//FRAGMENT vbuyy=vbuxx_band_vbuc1 +txa +and #{c1} +tay +//FRAGMENT vbuyy=vbuyy_band_vbuc1 +tya +and #{c1} +tay +//FRAGMENT vbuyy=vbuzz_band_vbuc1 +tza +and #{c1} +tay +//FRAGMENT vbuzz=vbuz1_band_vbuc1 +lda #{c1} +and {z1} +taz +//FRAGMENT vbuzz=vbuaa_band_vbuc1 +and #{c1} +taz +//FRAGMENT vbuzz=vbuxx_band_vbuc1 +txa +and #{c1} +taz +//FRAGMENT vbuzz=vbuyy_band_vbuc1 +tya +and #{c1} +taz +//FRAGMENT vbuzz=vbuzz_band_vbuc1 +tza +and #{c1} +taz +//FRAGMENT _deref_pbuc1=vbuaa +sta {c1} +//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuaa +tay +lda {c2},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy +lda {c2},y +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuzz +tza +tay +lda {c2},y +sta {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldx {z1} +and {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuz1_band_vbuc2 +lda #{c2} +ldy {z1} +and {c1},y +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_band_vbuc2 +tax +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuaa_band_vbuc2 +tay +lda #{c2} +and {c1},y +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuxx_band_vbuc2 +lda #{c2} +and {c1},x +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuyy_band_vbuc2 +lda #{c2} +and {c1},y +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuzz_band_vbuc2 +tza +tay +lda #{c2} +and {c1},y +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuzz_band_vbuc2 +tza +tay +lda #{c2} +and {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuzz_band_vbuc2 +tza +tax +lda #{c2} +and {c1},x +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuzz_band_vbuc2 +tza +tay +lda #{c2} +and {c1},y +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuzz_band_vbuc2 +tza +tay +lda #{c2} +and {c1},y +taz +//FRAGMENT pbuc1_derefidx_vbuxx=vbuz1 +lda {z1} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuz1 +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=vbuz1 +tza +tay +lda {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuaa +ldy {z1} +sta {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_ror_1 +ldy {z1} +lda {c1},y +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_ror_1 +ldx {z1} +lda {c1},x +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_ror_1 +ldy {z1} +lda {c1},y +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuz1_ror_1 +ldy {z1} +lda {c1},y +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_ror_1 +tay +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_ror_1 +tay +lda {c1},y +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_ror_1 +tax +lda {c1},x +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_ror_1 +tay +lda {c1},y +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuaa_ror_1 +tay +lda {c1},y +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuxx_ror_1 +lda {c1},x +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuyy_ror_1 +lda {c1},y +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuzz_ror_1 +tza +tay +lda {c1},y +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuzz_ror_1 +tza +tay +lda {c1},y +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuzz_ror_1 +tza +tax +lda {c1},x +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuzz_ror_1 +tza +tay +lda {c1},y +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuzz_ror_1 +tza +tay +lda {c1},y +lsr +taz +//FRAGMENT pbuc1_derefidx_vbuz1=vbuxx +ldy {z1} +txa +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuyy +tya +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=vbuzz +ldy {z1} +tza +sta {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1 +ldy {z1} +ldx {c1},y +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1 +ldx {z1} +ldy {c1},x +//FRAGMENT vbuzz=pbuc1_derefidx_vbuz1 +ldx {z1} +ldz {c1},x +//FRAGMENT vbuz1=vbuaa_rol_4 +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuaa_rol_4 +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuaa_rol_4 +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuaa_rol_4 +asl +asl +asl +asl +tay +//FRAGMENT vbuzz=vbuaa_rol_4 +asl +asl +asl +asl +taz +//FRAGMENT vbuz1=vbuxx_rol_4 +txa +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuxx_rol_4 +txa +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuxx_rol_4 +txa +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuxx_rol_4 +txa +asl +asl +asl +asl +tay +//FRAGMENT vbuzz=vbuxx_rol_4 +txa +asl +asl +asl +asl +taz +//FRAGMENT vbuz1=vbuyy_rol_4 +tya +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuyy_rol_4 +tya +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuyy_rol_4 +tya +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuyy_rol_4 +tya +asl +asl +asl +asl +tay +//FRAGMENT vbuzz=vbuyy_rol_4 +tya +asl +asl +asl +asl +taz +//FRAGMENT vbuz1=vbuzz_rol_4 +tza +asl +asl +asl +asl +sta {z1} +//FRAGMENT vbuaa=vbuzz_rol_4 +tza +asl +asl +asl +asl +//FRAGMENT vbuxx=vbuzz_rol_4 +tza +asl +asl +asl +asl +tax +//FRAGMENT vbuyy=vbuzz_rol_4 +tza +asl +asl +asl +asl +tay +//FRAGMENT vbuzz=vbuzz_rol_4 +tza +asl +asl +asl +asl +taz +//FRAGMENT vbuxx=vbuxx_plus_vbuc1 +txa +clc +adc #{c1} +tax +//FRAGMENT vbuyy=vbuyy_plus_vbuc1 +tya +clc +adc #{c1} +tay +//FRAGMENT vbuzz=vbuzz_plus_vbuc1 +tza +clc +adc #{c1} +taz +//FRAGMENT pbuc1_derefidx_vbuaa=vbuc2 +tay +lda #{c2} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=vbuc2 +lda #{c2} +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuc2 +lda #{c2} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=vbuc2 +tza +tay +lda #{c2} +sta {c1},y +//FRAGMENT vbuaa=pbuc1_derefidx_vbuz1_ror_2 +ldy {z1} +lda {c1},y +lsr +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuz1_ror_2 +ldx {z1} +lda {c1},x +lsr +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuz1_ror_2 +ldy {z1} +lda {c1},y +lsr +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuz1_ror_2 +ldy {z1} +lda {c1},y +lsr +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuaa_ror_2 +tay +lda {c1},y +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuaa_ror_2 +tay +lda {c1},y +lsr +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuaa_ror_2 +tax +lda {c1},x +lsr +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuaa_ror_2 +tay +lda {c1},y +lsr +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuaa_ror_2 +tay +lda {c1},y +lsr +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuxx_ror_2 +lda {c1},x +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuxx_ror_2 +lda {c1},x +lsr +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuxx_ror_2 +lda {c1},x +lsr +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuxx_ror_2 +lda {c1},x +lsr +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuxx_ror_2 +lda {c1},x +lsr +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy_ror_2 +lda {c1},y +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuyy_ror_2 +lda {c1},y +lsr +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuyy_ror_2 +lda {c1},y +lsr +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuyy_ror_2 +lda {c1},y +lsr +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuyy_ror_2 +lda {c1},y +lsr +lsr +taz +//FRAGMENT vbuz1=pbuc1_derefidx_vbuzz_ror_2 +tza +tay +lda {c1},y +lsr +lsr +sta {z1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuzz_ror_2 +tza +tay +lda {c1},y +lsr +lsr +//FRAGMENT vbuxx=pbuc1_derefidx_vbuzz_ror_2 +tza +tax +lda {c1},x +lsr +lsr +tax +//FRAGMENT vbuyy=pbuc1_derefidx_vbuzz_ror_2 +tza +tay +lda {c1},y +lsr +lsr +tay +//FRAGMENT vbuzz=pbuc1_derefidx_vbuzz_ror_2 +tza +tay +lda {c1},y +lsr +lsr +taz +//FRAGMENT vbuz1=vbuaa_ror_1 +lsr +sta {z1} +//FRAGMENT vbuz1=vbuxx_ror_1 +txa +lsr +sta {z1} +//FRAGMENT vbuz1=vbuyy_ror_1 +tya +lsr +sta {z1} +//FRAGMENT vbuz1=vbuzz_ror_1 +tza +lsr +sta {z1} +//FRAGMENT vbuaa=vbuz1_ror_1 +lda {z1} +lsr +//FRAGMENT vbuaa=vbuaa_ror_1 +lsr +//FRAGMENT vbuaa=vbuxx_ror_1 +txa +lsr +//FRAGMENT vbuaa=vbuyy_ror_1 +tya +lsr +//FRAGMENT vbuaa=vbuzz_ror_1 +tza +lsr +//FRAGMENT vbuxx=vbuz1_ror_1 +lda {z1} +lsr +tax +//FRAGMENT vbuxx=vbuaa_ror_1 +lsr +tax +//FRAGMENT vbuxx=vbuxx_ror_1 +txa +lsr +tax +//FRAGMENT vbuxx=vbuyy_ror_1 +tya +lsr +tax +//FRAGMENT vbuxx=vbuzz_ror_1 +tza +lsr +tax +//FRAGMENT vbuyy=vbuz1_ror_1 +lda {z1} +lsr +tay +//FRAGMENT vbuyy=vbuaa_ror_1 +lsr +tay +//FRAGMENT vbuyy=vbuxx_ror_1 +txa +lsr +tay +//FRAGMENT vbuyy=vbuyy_ror_1 +tya +lsr +tay +//FRAGMENT vbuyy=vbuzz_ror_1 +tza +lsr +tay +//FRAGMENT vbuzz=vbuz1_ror_1 +lda {z1} +lsr +taz +//FRAGMENT vbuzz=vbuaa_ror_1 +lsr +taz +//FRAGMENT vbuzz=vbuxx_ror_1 +txa +lsr +taz +//FRAGMENT vbuzz=vbuyy_ror_1 +tya +lsr +taz +//FRAGMENT vbuzz=vbuzz_ror_1 +tza +lsr +taz +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuz1 +ldy {z1} +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuz1 +ldx {z1} +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuz1 +ldx {z1} +tza +tay +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuxx +lda {c2},x +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuxx +tza +tay +lda {c2},x +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuyy +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuyy +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuyy +tza +tax +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuzz +tza +tay +lda {c2},y +ldy {z1} +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuzz +tza +tay +lda {c2},y +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuzz +tza +tax +lda {c2},x +sta {c1},y +//FRAGMENT vbuaa_eq_vbuc1_then_la1 +cmp #{c1} +beq {la1} +//FRAGMENT vbuaa=vbuz1_plus_1 +lda {z1} +inc +//FRAGMENT vbuxx=vbuz1_plus_1 +ldx {z1} +inx +//FRAGMENT vbuaa=_deref_pbuc1 +lda {c1} +//FRAGMENT vbuxx=_deref_pbuc1 +ldx {c1} +//FRAGMENT vbuaa_eq__deref_pbuc1_then_la1 +cmp {c1} +beq {la1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuxx +lda {c2},x +sta {c1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuyy +lda {c2},y +sta {c1} +//FRAGMENT _deref_pbuc1=pbuc2_derefidx_vbuzz +tza +tay +lda {c2},y +sta {c1} +//FRAGMENT vbuxx_neq_0_then_la1 +cpx #0 +bne {la1} +//FRAGMENT vbuxx_neq_vbuc1_then_la1 +cpx #{c1} +bne {la1} +//FRAGMENT vbuxx_lt_vbuc1_then_la1 +cpx #{c1} +bcc {la1} +//FRAGMENT vbuxx_eq_vbuc1_then_la1 +cpx #{c1} +beq {la1} +//FRAGMENT vbuxx=vbuc1 +ldx #{c1} +//FRAGMENT vbuxx=_inc_vbuxx +inx +//FRAGMENT vbuyy=vbuc1 +ldy #{c1} +//FRAGMENT vbuyy_lt_vbuc1_then_la1 +cpy #{c1} +bcc {la1} +//FRAGMENT vbuyy=_inc_vbuyy +iny +//FRAGMENT vbuzz=vbuc1 +ldz #{c1} +//FRAGMENT vbuzz_lt_vbuc1_then_la1 +cpz #{c1} +bcc {la1} +//FRAGMENT vbuzz=_inc_vbuzz +inz +//FRAGMENT vbuyy_neq_0_then_la1 +cpy #0 +bne {la1} +//FRAGMENT vbuzz_neq_0_then_la1 +cpz #0 +bne {la1} +//FRAGMENT vbuaa=_dec_vbuaa +sec +sbc #1 +//FRAGMENT vbuaa=_inc_vbuaa +inc +//FRAGMENT vbuxx=_dec_vbuxx +dex +//FRAGMENT vbuyy=_dec_vbuyy +dey +//FRAGMENT vbuzz=_dec_vbuzz +dez +//FRAGMENT pbuc1_derefidx_vbuxx=vbuzz +tza +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuyy=vbuzz +tza +sta {c1},y +//FRAGMENT vbuaa=vbuc1 +lda #{c1} +//FRAGMENT vbuxx_eq__deref_pbuc1_then_la1 +cpx {c1} +beq {la1} +//FRAGMENT vbuyy=_deref_pbuc1 +ldy {c1} +//FRAGMENT vbuyy_eq__deref_pbuc1_then_la1 +tya +cmp {c1} +beq {la1} +//FRAGMENT vbuzz=_deref_pbuc1 +ldz {c1} +//FRAGMENT vbuzz_eq__deref_pbuc1_then_la1 +cpz {c1} +beq {la1} +//FRAGMENT vbuyy=vbuz1 +ldy {z1} +//FRAGMENT vbuzz=vbuz1 +ldz {z1} +//FRAGMENT vbuyy_neq_vbuc1_then_la1 +cpy #{c1} +bne {la1} +//FRAGMENT vbuzz_neq_vbuc1_then_la1 +cpz #{c1} +bne {la1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuyy +lda {c1},y +sta {z1} +//FRAGMENT vbuyy_eq_vbuc1_then_la1 +cpy #{c1} +beq {la1} +//FRAGMENT vbuz1=pbuc1_derefidx_vbuzz +tza +tay +lda {c1},y +sta {z1} +//FRAGMENT vbuzz_eq_vbuc1_then_la1 +cpz #{c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuxx=vbuaa +sta {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=vbuyy +tya +sta {c1},x +//FRAGMENT vbuyy=vbuz1_plus_1 +ldy {z1} +iny +//FRAGMENT _deref_pbuc1=vbuyy +sty {c1} +//FRAGMENT vbuaa=pbuc1_derefidx_vbuzz +tza +tay +lda {c1},y +//FRAGMENT vbuyy=pbuc1_derefidx_vbuzz +tza +tax +ldy {c1},x +//FRAGMENT vbuaa=vbuaa_plus_1 +inc +//FRAGMENT vbuaa=vbuyy_plus_1 +tya +inc +//FRAGMENT _deref_pbuc1=vbuxx +stx {c1} +//FRAGMENT _deref_pbuc1=vbuzz +stz {c1} +//FRAGMENT vbuz1=_deref_pbuc1_plus_1 +lda {c1} +inc sta {z1} //FRAGMENT vwuz1=_word_vbuz2 lda {z2} @@ -95,17 +1216,9 @@ lda {z2} sta {z1} lda {z2}+1 sta {z1}+1 -//FRAGMENT vbuz1=_deref_pbuz2 -ldy #0 -lda ({z2}),y -sta {z1} //FRAGMENT 0_neq_vbuz1_then_la1 lda {z1} bne {la1} -//FRAGMENT vbuz1_eq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -beq {la1} //FRAGMENT pbuz1_derefidx_vbuz2=vbuz3 lda {z3} ldz {z2} @@ -114,12 +1227,6 @@ sta ({z1}),z lda #{c1} ldz {z2} sta ({z1}),z -//FRAGMENT vbuz1=_inc_vbuz1 -inc {z1} -//FRAGMENT vbuz1_neq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -bne {la1} //FRAGMENT pbuz1=pbuz1_plus_vbuc1 lda #{c1} clc @@ -141,8 +1248,6 @@ sta {z1} lda {z1}+1 sbc #0 sta {z1}+1 -//FRAGMENT vbuz1=_dec_vbuz1 -dec {z1} //FRAGMENT pbuz1=pbuz2_plus_vwuc1 lda {z2} clc @@ -181,13 +1286,6 @@ inc //FRAGMENT vbuxx=_deref_pbuc1_plus_1 ldx {c1} inx -//FRAGMENT vbuaa_lt_vbuc1_then_la1 -cmp #{c1} -bcc {la1} -//FRAGMENT vbuaa=vbuz1 -lda {z1} -//FRAGMENT vbuxx=vbuz1 -ldx {z1} //FRAGMENT vbuz1=vbuxx stx {z1} //FRAGMENT vwuz1=_word_vbuxx @@ -205,29 +1303,11 @@ tza sta {z1} lda #0 sta {z1}+1 -//FRAGMENT vbuaa=_deref_pbuz1 -ldy #0 -lda ({z1}),y -//FRAGMENT vbuxx=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tax -//FRAGMENT vbuyy=_deref_pbuz1 -ldy #0 -lda ({z1}),y -tay -//FRAGMENT vbuzz=_deref_pbuz1 -ldy #0 -lda ({z1}),y -taz //FRAGMENT 0_neq_vbuaa_then_la1 cmp #0 bne {la1} //FRAGMENT vbuz1=vbuaa sta {z1} -//FRAGMENT vbuaa_eq_vbuc1_then_la1 -cmp #{c1} -beq {la1} //FRAGMENT pbuz1_derefidx_vbuz2=vbuaa ldz {z2} sta ({z1}),z @@ -255,26 +1335,6 @@ sta ({z1}),y tza ldy #0 sta ({z1}),y -//FRAGMENT vbuxx_lt_vbuc1_then_la1 -cpx #{c1} -bcc {la1} -//FRAGMENT vbuxx=vbuc1 -ldx #{c1} -//FRAGMENT vbuzz=vbuc1 -ldz #{c1} -//FRAGMENT vbuxx_eq_vbuc1_then_la1 -cpx #{c1} -beq {la1} -//FRAGMENT vbuyy=vbuz1 -ldy {z1} -//FRAGMENT vbuyy_eq_vbuc1_then_la1 -cpy #{c1} -beq {la1} -//FRAGMENT vbuzz=vbuz1 -ldz {z1} -//FRAGMENT vbuzz_eq_vbuc1_then_la1 -cpz #{c1} -beq {la1} //FRAGMENT 0_neq_vbuxx_then_la1 cpx #0 bne {la1} @@ -290,20 +1350,10 @@ cpz #0 bne {la1} //FRAGMENT vbuaa=vbuzz tza -//FRAGMENT vbuyy_lt_vbuc1_then_la1 -cpy #{c1} -bcc {la1} -//FRAGMENT vbuyy=vbuc1 -ldy #{c1} //FRAGMENT vbuz1=vbuyy sty {z1} -//FRAGMENT vbuzz_lt_vbuc1_then_la1 -cpz #{c1} -bcc {la1} //FRAGMENT vbuz1=vbuzz stz {z1} -//FRAGMENT vbuaa=vbuc1 -lda #{c1} //FRAGMENT vbuxx=vbuaa tax //FRAGMENT vbuyy=_deref_pbuc1_plus_1 @@ -340,10 +1390,6 @@ asw {z1} asw {z1} asw {z1} asw {z1} -//FRAGMENT _deref_pbuc1=_deref_pbuc1_band_vbuc2 -lda #{c2} -and {c1} -sta {c1} //FRAGMENT vwuz1=vwuc1 lda #<{c1} sta {z1} @@ -393,9 +1439,6 @@ sta {z1} bcc !+ inc {z1}+1 !: -//FRAGMENT vbuz1=_deref_pbuc1 -lda {c1} -sta {z1} //FRAGMENT _deref_pwuc1=vwuz1 lda {z1} sta {c1} @@ -411,9 +1454,6 @@ lda {z1} sta {c1} lda {z1}+1 sta {c1}+1 -//FRAGMENT _deref_pbuc1=vbuz1 -lda {z1} -sta {c1} //FRAGMENT _deref_pwuc1=vwuc2 lda #<{c2} sta {c1} @@ -560,10 +1600,6 @@ sta ({z1}),y iny lda {z2}+1 sta ({z1}),y -//FRAGMENT vbuaa=_deref_pbuc1 -lda {c1} -//FRAGMENT vbuxx=_deref_pbuc1 -ldx {c1} //FRAGMENT _deref_qbuc1=_ptr_vbuxx txa sta {c1} @@ -579,27 +1615,110 @@ tza sta {c1} lda #0 sta {c1}+1 -//FRAGMENT _deref_pbuc1=vbuxx -stx {c1} -//FRAGMENT vbuxx=_inc_vbuxx -inx -//FRAGMENT vbuyy=_inc_vbuyy -iny -//FRAGMENT vbuzz=_inc_vbuzz -inz -//FRAGMENT vbuyy=_deref_pbuc1 -ldy {c1} -//FRAGMENT _deref_pbuc1=vbuyy -sty {c1} -//FRAGMENT vbuzz=_deref_pbuc1 -ldz {c1} -//FRAGMENT _deref_pbuc1=vbuzz -stz {c1} +//FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 +inc {c1} //FRAGMENT vwuz1=vbuc1 lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 +//FRAGMENT _deref_pbuc1_eq_vbuz1_then_la1 +lda {c1} +cmp {z1} +beq {la1} +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} +//FRAGMENT pbuc1_derefidx_vbuz1=_inc_pbuc1_derefidx_vbuz1 +ldx {z1} +inc {c1},x +//FRAGMENT vbuz1=_byte0_vwuz2 +lda {z2} +sta {z1} +//FRAGMENT vbuz1=_byte1_vwuz2 +lda {z2}+1 +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuz3 +lda {z2} +ora {z3} +sta {z1} +//FRAGMENT _deref_pbuc1_eq_vbuaa_then_la1 +cmp {c1} +beq {la1} +//FRAGMENT pbuc1_derefidx_vbuaa=_inc_pbuc1_derefidx_vbuaa +tax +inc {c1},x +//FRAGMENT pbuc1_derefidx_vbuxx=_inc_pbuc1_derefidx_vbuxx +inc {c1},x +//FRAGMENT vbuaa=_byte1_vwuz1 +lda {z1}+1 +//FRAGMENT vbuxx=_byte1_vwuz1 +ldx {z1}+1 +//FRAGMENT vbuz1=vbuxx_bor_vbuz2 +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuz2 +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuz2 +tza +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuaa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuaa +stx $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bor_vbuaa +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuzz_bor_vbuaa +tay +tza +sty $ff +ora $ff +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuxx +txa +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuxx_bor_vbuxx +stx {z1} +//FRAGMENT vbuyy=_byte1_vwuz1 +ldy {z1}+1 +//FRAGMENT vbuzz=_byte1_vwuz1 +lda {z1}+1 +taz +//FRAGMENT vbuz1=vbuz2_bor_vbuyy +tya +ora {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bor_vbuzz +tza +ora {z2} +sta {z1} +//FRAGMENT pbuc1_derefidx_vbuyy=_inc_pbuc1_derefidx_vbuyy +lda {c1},y +inc +sta {c1},y +//FRAGMENT pbuc1_derefidx_vbuzz=_inc_pbuc1_derefidx_vbuzz +tza +tax +inc {c1},x +//FRAGMENT _deref_pbuc1_eq_vbuxx_then_la1 +cpx {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuyy_then_la1 +tya +cmp {c1} +beq {la1} +//FRAGMENT _deref_pbuc1_eq_vbuzz_then_la1 +cpz {c1} +beq {la1} //FRAGMENT vduz1=vduc1 lda #<{c1} sta {z1} @@ -621,14 +1740,6 @@ lda #{c1} clc adc {z2} sta {z1} -//FRAGMENT pbuc1_derefidx_vbuz1=vbuz2 -lda {z2} -ldy {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuz1=pbuc2_derefidx_vbuz1 -ldy {z1} -lda {c2},y -sta {c1},y //FRAGMENT vwuz1=vwuc1_minus_vbuz2 sec lda #<{c1} @@ -661,27 +1772,6 @@ lda {z2} sta {z1} lda {z2}+1 sta {z1}+1 -//FRAGMENT vbuz1=_byte0_vwuz2 -lda {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_rol_4 -lda {z2} -asl -asl -asl -asl -sta {z1} -//FRAGMENT vbuz1=_byte1_vwuz2 -lda {z2}+1 -sta {z1} -//FRAGMENT vbuz1=vbuz2_band_vbuc1 -lda #{c1} -and {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuz3 -lda {z2} -ora {z3} -sta {z1} //FRAGMENT vduz1=vduz2_ror_4 lda {z2}+3 lsr @@ -826,35 +1916,6 @@ tza clc adc #{c1} taz -//FRAGMENT pbuc1_derefidx_vbuxx=vbuz1 -lda {z1} -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=vbuz1 -lda {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuzz=vbuz1 -tza -tay -lda {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuz1=vbuaa -ldy {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuaa=pbuc2_derefidx_vbuaa -tay -lda {c2},y -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=pbuc2_derefidx_vbuxx -lda {c2},x -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=pbuc2_derefidx_vbuyy -lda {c2},y -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuzz=pbuc2_derefidx_vbuzz -tza -tay -lda {c2},y -sta {c1},y //FRAGMENT vwuz1=vwuc1_minus_vbuaa tax stx $ff @@ -1298,284 +2359,15 @@ dey bne !- !e: taz -//FRAGMENT vbuaa=vbuz1_rol_4 -lda {z1} -asl -asl -asl -asl -//FRAGMENT vbuxx=vbuz1_rol_4 -lda {z1} -asl -asl -asl -asl -tax -//FRAGMENT vbuyy=vbuz1_rol_4 -lda {z1} -asl -asl -asl -asl -tay -//FRAGMENT vbuzz=vbuz1_rol_4 -lda {z1} -asl -asl -asl -asl -taz -//FRAGMENT vbuz1=vbuxx_rol_4 -txa -asl -asl -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuxx_rol_4 -txa -asl -asl -asl -asl -//FRAGMENT vbuxx=vbuxx_rol_4 -txa -asl -asl -asl -asl -tax -//FRAGMENT vbuyy=vbuxx_rol_4 -txa -asl -asl -asl -asl -tay -//FRAGMENT vbuzz=vbuxx_rol_4 -txa -asl -asl -asl -asl -taz -//FRAGMENT vbuz1=vbuyy_rol_4 -tya -asl -asl -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuyy_rol_4 -tya -asl -asl -asl -asl -//FRAGMENT vbuxx=vbuyy_rol_4 -tya -asl -asl -asl -asl -tax -//FRAGMENT vbuyy=vbuyy_rol_4 -tya -asl -asl -asl -asl -tay -//FRAGMENT vbuzz=vbuyy_rol_4 -tya -asl -asl -asl -asl -taz -//FRAGMENT vbuz1=vbuzz_rol_4 -tza -asl -asl -asl -asl -sta {z1} -//FRAGMENT vbuaa=vbuzz_rol_4 -tza -asl -asl -asl -asl -//FRAGMENT vbuxx=vbuzz_rol_4 -tza -asl -asl -asl -asl -tax -//FRAGMENT vbuyy=vbuzz_rol_4 -tza -asl -asl -asl -asl -tay -//FRAGMENT vbuzz=vbuzz_rol_4 -tza -asl -asl -asl -asl -taz -//FRAGMENT vbuaa=_byte1_vwuz1 -lda {z1}+1 -//FRAGMENT vbuxx=_byte1_vwuz1 -ldx {z1}+1 -//FRAGMENT vbuz1=vbuaa_band_vbuc1 -and #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuxx_band_vbuc1 -txa -and #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuyy_band_vbuc1 -tya -and #{c1} -sta {z1} -//FRAGMENT vbuz1=vbuzz_band_vbuc1 -tza -and #{c1} -sta {z1} -//FRAGMENT vbuaa=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -//FRAGMENT vbuaa=vbuaa_band_vbuc1 -and #{c1} -//FRAGMENT vbuaa=vbuxx_band_vbuc1 -txa -and #{c1} -//FRAGMENT vbuaa=vbuyy_band_vbuc1 -tya -and #{c1} -//FRAGMENT vbuaa=vbuzz_band_vbuc1 -tza -and #{c1} -//FRAGMENT vbuxx=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -tax -//FRAGMENT vbuxx=vbuaa_band_vbuc1 -and #{c1} -tax -//FRAGMENT vbuxx=vbuxx_band_vbuc1 -txa -and #{c1} -tax -//FRAGMENT vbuxx=vbuyy_band_vbuc1 -tya -and #{c1} -tax -//FRAGMENT vbuxx=vbuzz_band_vbuc1 -tza -and #{c1} -tax -//FRAGMENT vbuyy=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -tay -//FRAGMENT vbuyy=vbuaa_band_vbuc1 -and #{c1} -tay -//FRAGMENT vbuyy=vbuxx_band_vbuc1 -txa -and #{c1} -tay -//FRAGMENT vbuyy=vbuyy_band_vbuc1 -tya -and #{c1} -tay -//FRAGMENT vbuyy=vbuzz_band_vbuc1 -tza -and #{c1} -tay -//FRAGMENT vbuzz=vbuz1_band_vbuc1 -lda #{c1} -and {z1} -taz -//FRAGMENT vbuzz=vbuaa_band_vbuc1 -and #{c1} -taz -//FRAGMENT vbuzz=vbuxx_band_vbuc1 -txa -and #{c1} -taz -//FRAGMENT vbuzz=vbuyy_band_vbuc1 -tya -and #{c1} -taz -//FRAGMENT vbuzz=vbuzz_band_vbuc1 -tza -and #{c1} -taz -//FRAGMENT vbuz1=vbuxx_bor_vbuz2 -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuz2 -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuz2 -tza -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuaa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuaa -stx $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bor_vbuaa -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuzz_bor_vbuaa -tay -tza -sty $ff -ora $ff -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuxx -txa -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuxx_bor_vbuxx -stx {z1} //FRAGMENT vbuaa=_byte1_vduz1 lda {z1}+1 //FRAGMENT vbuxx=_byte1_vduz1 ldx {z1}+1 -//FRAGMENT vbuz1=vbuz2_bor_vbuyy -tya -ora {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bor_vbuzz -tza -ora {z2} -sta {z1} -//FRAGMENT vbuyy=_byte1_vwuz1 -ldy {z1}+1 -//FRAGMENT vbuzz=_byte1_vwuz1 -lda {z1}+1 -taz //FRAGMENT vbuyy=_byte1_vduz1 ldy {z1}+1 //FRAGMENT vbuzz=_byte1_vduz1 lda {z1}+1 taz -//FRAGMENT pbuc1_derefidx_vbuxx=vbuaa -sta {c1},x //FRAGMENT pbuc1_derefidx_vbuyy=vbuaa sta {c1},y //FRAGMENT pbuc1_derefidx_vbuzz=vbuaa @@ -1584,10 +2376,6 @@ tza tay txa sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuz1=vbuxx -ldy {z1} -txa -sta {c1},y //FRAGMENT pbuc1_derefidx_vbuyy=vbuxx txa sta {c1},y @@ -1596,28 +2384,11 @@ tza tay txa sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuz1=vbuyy -tya -ldy {z1} -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=vbuyy -tya -sta {c1},x //FRAGMENT pbuc1_derefidx_vbuzz=vbuyy tza tax tya sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuz1=vbuzz -ldy {z1} -tza -sta {c1},y -//FRAGMENT pbuc1_derefidx_vbuxx=vbuzz -tza -sta {c1},x -//FRAGMENT pbuc1_derefidx_vbuyy=vbuzz -tza -sta {c1},y //FRAGMENT vbuyy=vbuaa tay //FRAGMENT vbuzz=vbuaa diff --git a/src/main/fragment/cache/fragment-cache-mos6502.asm b/src/main/fragment/cache/fragment-cache-mos6502.asm index e1cc26dc0..73326cc66 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm index f75e5f41b..5c260e0f1 100644 --- a/src/main/fragment/cache/fragment-cache-mos6502x.asm +++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT vbuz1=vbuc1 lda #{c1} sta {z1} @@ -1866,33 +1866,8 @@ lda #<{c1} sta {z1} lda #>{c1} sta {z1}+1 -//FRAGMENT pprz1=pprz2 -lda {z2} -sta {z1} -lda {z2}+1 -sta {z1}+1 -//FRAGMENT pprz1=qprc1_derefidx_vbuz2 -ldy {z2} -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 -//FRAGMENT pprz1=qprc1_derefidx_vbuaa -tay -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 -//FRAGMENT pprz1=qprc1_derefidx_vbuxx -lda {c1},x -sta {z1} -lda {c1}+1,x -sta {z1}+1 -//FRAGMENT pprz1=qprc1_derefidx_vbuyy -lda {c1},y -sta {z1} -lda {c1}+1,y -sta {z1}+1 +//FRAGMENT call_vprc1 +jsr {c1} //FRAGMENT pbuz1_lt_vwuc1_then_la1 lda {z1}+1 cmp #>{c1} @@ -2428,42 +2403,6 @@ tay sta {c1},x //FRAGMENT vbsyy=vbsc1 ldy #{c1} -//FRAGMENT vbuz1=_stackidxbyte_vbuc1 -tsx -lda STACK_BASE+{c1},x -sta {z1} -//FRAGMENT _stackpushbyte_=vbuz1 -lda {z1} -pha -//FRAGMENT _stackpullbyte_1 -pla -//FRAGMENT vbuz1_eq_vbuc1_then_la1 -lda #{c1} -cmp {z1} -beq {la1} -//FRAGMENT vbuaa=_stackidxbyte_vbuc1 -tsx -lda STACK_BASE+{c1},x -//FRAGMENT vbuxx=_stackidxbyte_vbuc1 -tsx -lda STACK_BASE+{c1},x -tax -//FRAGMENT vbuyy=_stackidxbyte_vbuc1 -tsx -lda STACK_BASE+{c1},x -tay -//FRAGMENT _stackpushbyte_=vbuyy -tya -pha -//FRAGMENT vbuaa_eq_vbuc1_then_la1 -cmp #{c1} -beq {la1} -//FRAGMENT vbuxx_eq_vbuc1_then_la1 -cpx #{c1} -beq {la1} -//FRAGMENT vbuyy_eq_vbuc1_then_la1 -cpy #{c1} -beq {la1} //FRAGMENT vbuxx=vbuxx_plus_vbuc1 txa axs #-[{c1}] @@ -3594,26 +3533,6 @@ sta {z1}+1 //FRAGMENT vwuz1=vwuz1_rol_1 asl {z1} rol {z1}+1 -//FRAGMENT pssz1=pssc1 -lda #<{c1} -sta {z1} -lda #>{c1} -sta {z1}+1 -//FRAGMENT pbuz1=qbuz2_derefidx_vbuc1 -ldy #{c1} -lda ({z2}),y -sta {z1} -iny -lda ({z2}),y -sta {z1}+1 -//FRAGMENT pssz1=pssz1_plus_vbuc1 -lda #{c1} -clc -adc {z1} -sta {z1} -bcc !+ -inc {z1}+1 -!: //FRAGMENT vwuz1=_deref_pwuc1_minus_vwuc2 sec lda {c1} @@ -3769,6 +3688,10 @@ sta {z1} lda {z1}+1 sbc {c1}+1,y sta {z1}+1 +//FRAGMENT vbuz1_eq_vbuc1_then_la1 +lda #{c1} +cmp {z1} +beq {la1} //FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuz2 ldy {z2} clc @@ -4031,6 +3954,9 @@ sta {z1} lda {z1}+1 sbc {c1}+1,y sta {z1}+1 +//FRAGMENT vbuxx_eq_vbuc1_then_la1 +cpx #{c1} +beq {la1} //FRAGMENT vwuz1=vwuz1_plus_pwuc1_derefidx_vbuaa tay clc @@ -4062,6 +3988,9 @@ dex //FRAGMENT vbuyy=vbuyy_minus_2 dey dey +//FRAGMENT vbuyy_eq_vbuc1_then_la1 +cpy #{c1} +beq {la1} //FRAGMENT vbuz1=vbuz2_bor_vbuyy tya ora {z2} @@ -4121,6 +4050,9 @@ sta {z1} bcc !+ inc {z1}+1 !: +//FRAGMENT vbuaa_eq_vbuc1_then_la1 +cmp #{c1} +beq {la1} //FRAGMENT vbuaa_eq_vbuz1_then_la1 cmp {z1} beq {la1} @@ -4976,20 +4908,18 @@ sta {c1} tya ora {c1} sta {c1} -//FRAGMENT vbuz1_le_vbuc1_then_la1 -lda #{c1} -cmp {z1} -bcs {la1} -//FRAGMENT vbuaa_le_vbuc1_then_la1 -cmp #{c1} -bcc {la1} -beq {la1} //FRAGMENT _stackpushbyte_=vbuc1 lda #{c1} pha +//FRAGMENT _stackpullbyte_1 +pla //FRAGMENT vbuz1=_stackpullbyte_ pla sta {z1} +//FRAGMENT vbuz1=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +sta {z1} //FRAGMENT _stackidxbyte_vbuc1=vbuz1 lda {z1} tsx @@ -5002,6 +4932,17 @@ tax //FRAGMENT vbuyy=_stackpullbyte_ pla tay +//FRAGMENT vbuaa=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +//FRAGMENT vbuxx=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +tax +//FRAGMENT vbuyy=_stackidxbyte_vbuc1 +tsx +lda STACK_BASE+{c1},x +tay //FRAGMENT _stackidxbyte_vbuc1=vbuaa tsx sta STACK_BASE+{c1},x @@ -5159,6 +5100,9 @@ lda {z1} sta STACK_BASE+{c1},x lda {z1}+1 sta STACK_BASE+{c1}+1,x +//FRAGMENT _stackpushbyte_=vbuz1 +lda {z1} +pha //FRAGMENT _stackpushbyte_1 pha //FRAGMENT vssz1=_stackpullstruct_2_ @@ -5342,6 +5286,9 @@ pha lda {z1} tay dey +//FRAGMENT _stackpushbyte_=vbuyy +tya +pha //FRAGMENT vbuz1=vbuaa_minus_1 sec sbc #1 @@ -5919,6 +5866,10 @@ tax //FRAGMENT vbuyy=_byte_vduz1 lda {z1} tay +//FRAGMENT call__deref_pprc1 +jsr {c1} +//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 +dec {c1} //FRAGMENT pbuz1_derefidx_vbuaa=vbuaa tay sta ({z1}),y @@ -6404,8 +6355,6 @@ sta {c1}+1 //FRAGMENT _deref_pbsc1=vbsc2 lda #{c2} sta {c1} -//FRAGMENT _deref_pbuc1=_dec__deref_pbuc1 -dec {c1} //FRAGMENT vbuz1=_dec_vbuz2 ldy {z2} dey @@ -6622,6 +6571,10 @@ lda {z2} clc adc #2 sta {z1} +//FRAGMENT vbuz1_le_vbuc1_then_la1 +lda #{c1} +cmp {z1} +bcs {la1} //FRAGMENT vbuz1=vbuaa_plus_2 clc adc #2 @@ -6630,6 +6583,10 @@ sta {z1} inx inx stx {z1} +//FRAGMENT vbuaa_le_vbuc1_then_la1 +cmp #{c1} +bcc {la1} +beq {la1} //FRAGMENT vbuxx_le_vbuc1_then_la1 cpx #{c1} bcc {la1} @@ -8708,6 +8665,18 @@ tax lda {c1} eor #$ff tay +//FRAGMENT pssz1=pssc1 +lda #<{c1} +sta {z1} +lda #>{c1} +sta {z1}+1 +//FRAGMENT pbuz1=qbuz2_derefidx_vbuc1 +ldy #{c1} +lda ({z2}),y +sta {z1} +iny +lda ({z2}),y +sta {z1}+1 //FRAGMENT vwuz1=pwuz2_derefidx_vbuc1 ldy #{c1} lda ({z2}),y @@ -8715,6 +8684,14 @@ sta {z1} iny lda ({z2}),y sta {z1}+1 +//FRAGMENT pssz1=pssz1_plus_vbuc1 +lda #{c1} +clc +adc {z1} +sta {z1} +bcc !+ +inc {z1}+1 +!: //FRAGMENT _deref_pwsc1=vwsc2 lda #<{c2} sta {c1} @@ -11639,153 +11616,6 @@ ldy {c1}+1 sty $ff ldy #0 sta ($fe),y -//FRAGMENT vbuz1=vbuz2_bxor_vbuz3 -lda {z2} -eor {z3} -sta {z1} -//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuz1 -ldy {z1} -lda {c1},y -pha -//FRAGMENT vbuz1=vbuz2_bxor_vbuaa -eor {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bxor_vbuxx -txa -eor {z2} -sta {z1} -//FRAGMENT vbuz1=vbuz2_bxor_vbuyy -tya -eor {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bxor_vbuz2 -tya -eor {z2} -sta {z1} -//FRAGMENT vbuz1=vbuyy_bxor_vbuaa -sty $ff -eor $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bxor_vbuxx -txa -sty $ff -eor $ff -sta {z1} -//FRAGMENT vbuz1=vbuyy_bxor_vbuyy -tya -sty $ff -eor $ff -sta {z1} -//FRAGMENT vbuaa=vbuz1_bxor_vbuz2 -lda {z1} -eor {z2} -//FRAGMENT vbuaa=vbuz1_bxor_vbuaa -eor {z1} -//FRAGMENT vbuaa=vbuz1_bxor_vbuxx -txa -eor {z1} -//FRAGMENT vbuaa=vbuz1_bxor_vbuyy -tya -eor {z1} -//FRAGMENT vbuaa=vbuyy_bxor_vbuz1 -tya -eor {z1} -//FRAGMENT vbuaa=vbuyy_bxor_vbuaa -sty $ff -eor $ff -//FRAGMENT vbuaa=vbuyy_bxor_vbuxx -txa -sty $ff -eor $ff -//FRAGMENT vbuaa=vbuyy_bxor_vbuyy -tya -sty $ff -eor $ff -//FRAGMENT vbuxx=vbuz1_bxor_vbuz2 -lda {z1} -eor {z2} -tax -//FRAGMENT vbuxx=vbuz1_bxor_vbuaa -eor {z1} -tax -//FRAGMENT vbuxx=vbuz1_bxor_vbuxx -txa -eor {z1} -tax -//FRAGMENT vbuxx=vbuz1_bxor_vbuyy -tya -eor {z1} -tax -//FRAGMENT vbuxx=vbuyy_bxor_vbuz1 -tya -eor {z1} -tax -//FRAGMENT vbuxx=vbuyy_bxor_vbuaa -sty $ff -eor $ff -tax -//FRAGMENT vbuxx=vbuyy_bxor_vbuxx -sty $ff -txa -eor $ff -tax -//FRAGMENT vbuxx=vbuyy_bxor_vbuyy -tya -sty $ff -eor $ff -tax -//FRAGMENT vbuyy=vbuz1_bxor_vbuz2 -lda {z1} -eor {z2} -tay -//FRAGMENT vbuyy=vbuz1_bxor_vbuaa -eor {z1} -tay -//FRAGMENT vbuyy=vbuz1_bxor_vbuxx -txa -eor {z1} -tay -//FRAGMENT vbuyy=vbuz1_bxor_vbuyy -tya -eor {z1} -tay -//FRAGMENT vbuyy=vbuyy_bxor_vbuz1 -tya -eor {z1} -tay -//FRAGMENT vbuyy=vbuyy_bxor_vbuaa -sty $ff -eor $ff -tay -//FRAGMENT vbuyy=vbuyy_bxor_vbuxx -txa -sty $ff -eor $ff -tay -//FRAGMENT vbuyy=vbuyy_bxor_vbuyy -tya -sty $ff -eor $ff -tay -//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuaa -tay -lda {c1},y -pha -//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuxx -lda {c1},x -pha -//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuyy -lda {c1},y -pha -//FRAGMENT vbuyy_gt_vbuaa_then_la1 -tax -sty $ff -cpx $ff -bcc {la1} -//FRAGMENT vbuyy_lt_vbuaa_then_la1 -sta $ff -cpy $ff -bcc {la1} //FRAGMENT _deref_pbuc1_eq__deref_pbuc2_then_la1 lda {c1} cmp {c2} @@ -12274,28 +12104,6 @@ sta ({z1}),y lda #{c2} ldy {m1} sta {c1},y -//FRAGMENT qbuc1_derefidx_vbuz1=pbuc2 -ldy {z1} -lda #<{c2} -sta {c1},y -lda #>{c2} -sta {c1}+1,y -//FRAGMENT qbuc1_derefidx_vbuaa=pbuc2 -tay -lda #<{c2} -sta {c1},y -lda #>{c2} -sta {c1}+1,y -//FRAGMENT qbuc1_derefidx_vbuxx=pbuc2 -lda #<{c2} -sta {c1},x -lda #>{c2} -sta {c1}+1,x -//FRAGMENT qbuc1_derefidx_vbuyy=pbuc2 -lda #<{c2} -sta {c1},y -lda #>{c2} -sta {c1}+1,y //FRAGMENT pbuz1_ge_pbuc1_then_la1 lda {z1}+1 cmp #>{c1} @@ -12940,15 +12748,6 @@ sta {z1} lda #0 adc {z2}+1 sta {z1}+1 -//FRAGMENT pssz1_lt_pssc1_then_la1 -lda {z1}+1 -cmp #>{c1} -bcc {la1} -bne !+ -lda {z1} -cmp #<{c1} -bcc {la1} -!: //FRAGMENT vbuz1_lt__deref_pbuc1_then_la1 lda {z1} cmp {c1} @@ -13312,10 +13111,6 @@ sta ({z1}),y //FRAGMENT _deref_pbuc1=_byte_pprz1 lda {z1} sta {c1} -//FRAGMENT _stackidxbyte_vbuc1=vbuc2 -lda #{c2} -tsx -sta STACK_BASE+{c1},x //FRAGMENT vbuz1=vbuz2_band_pbuz3_derefidx_vbuc1 lda {z2} ldy #{c1} @@ -15715,11 +15510,6 @@ adc ({z1}),y sta {z1}+1 pla sta {z1} -//FRAGMENT pprz1=_deref_qprc1 -lda {c1} -sta {z1} -lda {c1}+1 -sta {z1}+1 //FRAGMENT vbuz1_ge_vbuaa_then_la1 ldy {z1} sta $ff @@ -16352,3 +16142,230 @@ sta {c1},x lda #{c2} ora {c1},y sta {c1},y +//FRAGMENT call__deref_pprz1 +jsr {la1} +{la1}: @outside_flow +jmp ({z1}) @outside_flow +//FRAGMENT pprz1=pprz2 +lda {z2} +sta {z1} +lda {z2}+1 +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuz2 +ldy {z2} +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuaa +tay +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuxx +lda {c1},x +sta {z1} +lda {c1}+1,x +sta {z1}+1 +//FRAGMENT pprz1=qprc1_derefidx_vbuyy +lda {c1},y +sta {z1} +lda {c1}+1,y +sta {z1}+1 +//FRAGMENT vbuz1=vbuz2_bxor_vbuz3 +lda {z2} +eor {z3} +sta {z1} +//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuz1 +ldy {z1} +lda {c1},y +pha +//FRAGMENT vbuz1=vbuz2_bxor_vbuaa +eor {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bxor_vbuxx +txa +eor {z2} +sta {z1} +//FRAGMENT vbuz1=vbuz2_bxor_vbuyy +tya +eor {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_bxor_vbuz2 +tya +eor {z2} +sta {z1} +//FRAGMENT vbuz1=vbuyy_bxor_vbuaa +sty $ff +eor $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bxor_vbuxx +txa +sty $ff +eor $ff +sta {z1} +//FRAGMENT vbuz1=vbuyy_bxor_vbuyy +tya +sty $ff +eor $ff +sta {z1} +//FRAGMENT vbuaa=vbuz1_bxor_vbuz2 +lda {z1} +eor {z2} +//FRAGMENT vbuaa=vbuz1_bxor_vbuaa +eor {z1} +//FRAGMENT vbuaa=vbuz1_bxor_vbuxx +txa +eor {z1} +//FRAGMENT vbuaa=vbuz1_bxor_vbuyy +tya +eor {z1} +//FRAGMENT vbuaa=vbuyy_bxor_vbuz1 +tya +eor {z1} +//FRAGMENT vbuaa=vbuyy_bxor_vbuaa +sty $ff +eor $ff +//FRAGMENT vbuaa=vbuyy_bxor_vbuxx +txa +sty $ff +eor $ff +//FRAGMENT vbuaa=vbuyy_bxor_vbuyy +tya +sty $ff +eor $ff +//FRAGMENT vbuxx=vbuz1_bxor_vbuz2 +lda {z1} +eor {z2} +tax +//FRAGMENT vbuxx=vbuz1_bxor_vbuaa +eor {z1} +tax +//FRAGMENT vbuxx=vbuz1_bxor_vbuxx +txa +eor {z1} +tax +//FRAGMENT vbuxx=vbuz1_bxor_vbuyy +tya +eor {z1} +tax +//FRAGMENT vbuxx=vbuyy_bxor_vbuz1 +tya +eor {z1} +tax +//FRAGMENT vbuxx=vbuyy_bxor_vbuaa +sty $ff +eor $ff +tax +//FRAGMENT vbuxx=vbuyy_bxor_vbuxx +sty $ff +txa +eor $ff +tax +//FRAGMENT vbuxx=vbuyy_bxor_vbuyy +tya +sty $ff +eor $ff +tax +//FRAGMENT vbuyy=vbuz1_bxor_vbuz2 +lda {z1} +eor {z2} +tay +//FRAGMENT vbuyy=vbuz1_bxor_vbuaa +eor {z1} +tay +//FRAGMENT vbuyy=vbuz1_bxor_vbuxx +txa +eor {z1} +tay +//FRAGMENT vbuyy=vbuz1_bxor_vbuyy +tya +eor {z1} +tay +//FRAGMENT vbuyy=vbuyy_bxor_vbuz1 +tya +eor {z1} +tay +//FRAGMENT vbuyy=vbuyy_bxor_vbuaa +sty $ff +eor $ff +tay +//FRAGMENT vbuyy=vbuyy_bxor_vbuxx +txa +sty $ff +eor $ff +tay +//FRAGMENT vbuyy=vbuyy_bxor_vbuyy +tya +sty $ff +eor $ff +tay +//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuaa +tay +lda {c1},y +pha +//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuxx +lda {c1},x +pha +//FRAGMENT _stackpushbyte_=pbuc1_derefidx_vbuyy +lda {c1},y +pha +//FRAGMENT vbuyy_gt_vbuaa_then_la1 +tax +sty $ff +cpx $ff +bcc {la1} +//FRAGMENT vbuyy_lt_vbuaa_then_la1 +sta $ff +cpy $ff +bcc {la1} +//FRAGMENT _stackidxbyte_vbuc1=vbuc2 +lda #{c2} +tsx +sta STACK_BASE+{c1},x +//FRAGMENT pprz1=_deref_qprc1 +lda {c1} +sta {z1} +lda {c1}+1 +sta {z1}+1 +//FRAGMENT qbuc1_derefidx_vbuz1=pbuc2 +ldy {z1} +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT qbuc1_derefidx_vbuaa=pbuc2 +tay +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT qbuc1_derefidx_vbuxx=pbuc2 +lda #<{c2} +sta {c1},x +lda #>{c2} +sta {c1}+1,x +//FRAGMENT qbuc1_derefidx_vbuyy=pbuc2 +lda #<{c2} +sta {c1},y +lda #>{c2} +sta {c1}+1,y +//FRAGMENT pssz1_lt_pssc1_then_la1 +lda {z1}+1 +cmp #>{c1} +bcc {la1} +bne !+ +lda {z1} +cmp #<{c1} +bcc {la1} +!: +//FRAGMENT call__deref_(qprz1_derefidx_vbuc1) +ldy #{c1} +lda ({z1}),y +sta !+ +1 +iny +lda ({z1}),y +sta !+ +2 +!: +jsr $0000 diff --git a/src/main/fragment/cache/fragment-cache-rom6502x.asm b/src/main/fragment/cache/fragment-cache-rom6502x.asm index 1737b3c38..d0dac6236 100644 --- a/src/main/fragment/cache/fragment-cache-rom6502x.asm +++ b/src/main/fragment/cache/fragment-cache-rom6502x.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT _deref_pbuc1=_inc__deref_pbuc1 inc {c1} //FRAGMENT isr_hardware_all_entry diff --git a/src/main/fragment/cache/fragment-cache-wdc65c02.asm b/src/main/fragment/cache/fragment-cache-wdc65c02.asm index e4532b420..4f3866d67 100644 --- a/src/main/fragment/cache/fragment-cache-wdc65c02.asm +++ b/src/main/fragment/cache/fragment-cache-wdc65c02.asm @@ -1,4 +1,4 @@ -//KICKC FRAGMENT CACHE 84ae04234 84ae062c1 +//KICKC FRAGMENT CACHE 8d94f4f71 8d94f7000 //FRAGMENT vbuz1=_deref_pbuc1 lda {c1} sta {z1} diff --git a/src/main/fragment/mos6502-common/call__deref_pprz1.asm b/src/main/fragment/mos6502-common/call__deref_pprz1.asm index d678fe7f3..460b14618 100644 --- a/src/main/fragment/mos6502-common/call__deref_pprz1.asm +++ b/src/main/fragment/mos6502-common/call__deref_pprz1.asm @@ -1,3 +1,3 @@ jsr {la1} -icall: @outside_flow +{la1}: @outside_flow jmp ({z1}) @outside_flow \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/asm/AsmProgram.java b/src/main/java/dk/camelot64/kickc/asm/AsmProgram.java index 8140dd93d..605edd30e 100644 --- a/src/main/java/dk/camelot64/kickc/asm/AsmProgram.java +++ b/src/main/java/dk/camelot64/kickc/asm/AsmProgram.java @@ -29,6 +29,9 @@ public class AsmProgram { */ private List chunks; + /**Stashed lines to be inserted outside the flow. */ + private List stash; + /** * The index of the next chunk. */ @@ -47,6 +50,7 @@ public class AsmProgram { this.chunks = new ArrayList<>(); this.nextLineIndex = 0; this.nextChunkIndex = 0; + this.stash = new ArrayList<>(); } public TargetCpu getTargetCpu() { @@ -72,6 +76,32 @@ public class AsmProgram { getCurrentChunk().addLine(line); } + /** + * Put an ASM-line into the stash for being added to the program later. + * @param line The line + */ + public void stashLine(AsmLine line) { + stash.add(line); + } + + /** + * Are there any lines in the stash + * @return true if there are + */ + public boolean hasStash() { + return stash.size()>0; + } + + /** + * Add the stash lines to the program - and clear the stash + */ + public void addStash() { + for(AsmLine asmLine : stash) { + addLine(asmLine); + } + stash = new ArrayList<>(); + } + /** * Get the current encoding used for strings/chars * @return The encoding diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java index 301a6be9c..2446e416b 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstance.java @@ -103,6 +103,12 @@ public class AsmFragmentInstance { } else if(boundValue instanceof Label) { String param = AsmFormat.asmFix(((Label) boundValue).getLocalName()); return new AsmParameter(param, false); + } else if(boundValue instanceof LabelRef) { + String param = AsmFormat.asmFix(((LabelRef) boundValue).getLocalName()); + return new AsmParameter(param, false); + } else if(boundValue instanceof ProcedureRef) { + String param = AsmFormat.asmFix(((ProcedureRef) boundValue).getFullName()); + return new AsmParameter(param, false); } else { throw new InternalError("Bound Value Type not implemented " + boundValue); } @@ -198,6 +204,16 @@ public class AsmFragmentInstance { this.visit(context); } + public void handleTags(AsmLine asmLine, List tags) { + AsmLine line = addTags(asmLine, tags); + if(line.getTags().has("outside_flow")) { + // Outside the normal ASM flow - stash them in the program for later + asmProgram.stashLine(line); + } else { + asmProgram.addLine(line); + } + } + private static AsmLine addTags(AsmLine asmLine, List asmTags) { if(asmTags != null) for(TerminalNode asmTag : asmTags) { @@ -209,13 +225,23 @@ public class AsmFragmentInstance { @Override public Object visitAsmLabelName(KickCParser.AsmLabelNameContext ctx) { - asmProgram.addLine(addTags(new AsmLabel(ctx.ASM_NAME().getText()), ctx.ASM_TAG())); + AsmLabel label = new AsmLabel(ctx.ASM_NAME().getText()); + handleTags(label, ctx.ASM_TAG()); return null; } @Override public Object visitAsmLabelMulti(KickCParser.AsmLabelMultiContext ctx) { - asmProgram.addLine(addTags(new AsmLabel(ctx.ASM_MULTI_NAME().getText()), ctx.ASM_TAG())); + AsmLabel label = new AsmLabel(ctx.ASM_MULTI_NAME().getText()); + handleTags(label, ctx.ASM_TAG()); + return null; + } + + @Override + public Object visitAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx) { + String replaceName = ctx.ASM_NAME().getText(); + AsmParameter boundValue = fragmentInstance.getBoundValue(replaceName); + handleTags(new AsmLabel(boundValue.getParam()), ctx.ASM_TAG()); return null; } @@ -225,7 +251,8 @@ public class AsmFragmentInstance { for(int i = 1; i < ctx.getChildCount(); i = i + 2) { values.add(ctx.getChild(i).getText()); } - asmProgram.addLine(addTags(new AsmDataNumeric(null, AsmDataNumeric.Type.BYTE, values), ctx.ASM_TAG())); + AsmDataNumeric data = new AsmDataNumeric(null, AsmDataNumeric.Type.BYTE, values); + handleTags(data, ctx.ASM_TAG()); return null; } @@ -239,7 +266,7 @@ public class AsmFragmentInstance { instruction = (AsmInstruction) this.visit(paramModeCtx); } if(instruction != null) { - asmProgram.addLine(addTags(instruction, ctx.ASM_TAG())); + handleTags(instruction, ctx.ASM_TAG()); } else { throw new RuntimeException("Error parsing ASM fragment line " + name + ".asm\n - Line: " + ctx.getText()); } diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstanceSpecBuilder.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstanceSpecBuilder.java index f8f626ba5..3f807e042 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstanceSpecBuilder.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentInstanceSpecBuilder.java @@ -62,17 +62,19 @@ public class AsmFragmentInstanceSpecBuilder { * Create a fragment instance spec factory for an indirect call * @return the fragment instance spec factory */ - public static AsmFragmentInstanceSpecBuilder call(StatementCallExecute call, Program program) { - return new AsmFragmentInstanceSpecBuilder(call, program); + public static AsmFragmentInstanceSpecBuilder call(StatementCallExecute call, int indirectCallId, Program program) { + return new AsmFragmentInstanceSpecBuilder(call, indirectCallId, program); } - private AsmFragmentInstanceSpecBuilder(StatementCallExecute call, Program program) { + private AsmFragmentInstanceSpecBuilder(StatementCallExecute call, int indirectCallId, Program program) { this.program = program; this.bindings = new LinkedHashMap<>(); ScopeRef codeScope = program.getStatementInfos().getBlock(call).getScope(); StringBuilder signature = new StringBuilder(); signature.append("call_"); - signature.append(bind(call.getProcedureRVal())); + RValue procRVal = call.getProcedureRVal(); + signature.append(bind(procRVal)); + bind("la1", new LabelRef(codeScope.getFullName()+"::"+"icall"+indirectCallId)); this.asmFragmentInstanceSpec = new AsmFragmentInstanceSpec(program, signature.toString(), bindings, codeScope); } @@ -487,6 +489,13 @@ public class AsmFragmentInstanceSpecBuilder { String name = getTypePrefix(castType) + getConstName(value); bind(name, value); return name; + } else if(value instanceof ProcedureRef) { + if(castType == null) { + castType = SymbolTypeInference.inferType(program.getScope(), (ProcedureRef) value); + } + String name = getTypePrefix(castType) + getConstName(value); + bind(name, value); + return name; } else if(value instanceof Label) { String name = "la" + nextLabelIdx++; bind(name, value); diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java index ba01f7a99..5489b89c6 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentTemplate.java @@ -160,6 +160,7 @@ public class AsmFragmentTemplate { if(signature.contains("c5")) bindings.put("c5", new ConstantInteger(350L)); if(signature.contains("c6")) bindings.put("c6", new ConstantInteger(360L)); if(signature.contains("la1")) bindings.put("la1", new Label("@1", scope, true)); + if(signature.startsWith("call_")) bindings.put("la1", new Label("@1", scope, true)); AsmFragmentInstance fragmentInstance = new AsmFragmentInstance(new Program(), signature, ScopeRef.ROOT, this, bindings); AsmProgram asm = new AsmProgram(targetCpu); @@ -167,6 +168,7 @@ public class AsmFragmentTemplate { fragmentInstance.generate(asm); CpuClobber cpuClobber = asm.getClobber(); this.clobber = new AsmFragmentClobber(cpuClobber); + asm.addStash(); this.cycles = asm.getCycles(); } diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 b/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 index 3a6e9c514..440eecdfd 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.g4 @@ -222,8 +222,10 @@ expr | expr DOT NAME #exprDot | expr '->' NAME #exprArrow | expr PAR_BEGIN parameterList? PAR_END #exprCall - | SIZEOF ( expr | PAR_BEGIN typeName PAR_END ) #exprSizeOf - | TYPEID ( expr | PAR_BEGIN typeName PAR_END ) #exprTypeId + | SIZEOF PAR_BEGIN typeName PAR_END #exprSizeOfType + | SIZEOF expr #exprSizeOf + | TYPEID PAR_BEGIN typeName PAR_END #exprTypeIdType + | TYPEID expr #exprTypeId | DEFINED PAR_BEGIN? NAME PAR_END? #exprDefined | expr BRACKET_BEGIN commaExpr BRACKET_END #exprArray | PAR_BEGIN typeName PAR_END expr #exprCast @@ -283,6 +285,7 @@ asmLine asmLabel : ASM_NAME ASM_COLON ASM_TAG* #asmLabelName + | ASM_CURLY_BEGIN ASM_NAME ASM_CURLY_END ASM_COLON ASM_TAG* #asmLabelReplace | ASM_MULTI_NAME ASM_COLON ASM_TAG* #asmLabelMulti ; diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.interp b/src/main/java/dk/camelot64/kickc/parser/KickCParser.interp index 119fb6ad2..a8da3f412 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.interp +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.interp @@ -364,4 +364,4 @@ asmExpr atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 157, 841, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 7, 4, 102, 10, 4, 12, 4, 14, 4, 105, 11, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 121, 10, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 132, 10, 7, 12, 7, 14, 7, 135, 11, 7, 3, 8, 3, 8, 3, 8, 5, 8, 140, 10, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 146, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 7, 10, 154, 10, 10, 12, 10, 14, 10, 157, 11, 10, 3, 10, 3, 10, 7, 10, 161, 10, 10, 12, 10, 14, 10, 164, 11, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 7, 12, 172, 10, 12, 12, 12, 14, 12, 175, 11, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 182, 10, 12, 3, 12, 3, 12, 3, 12, 5, 12, 187, 10, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 193, 10, 12, 3, 12, 7, 12, 196, 10, 12, 12, 12, 14, 12, 199, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 206, 10, 13, 12, 13, 14, 13, 209, 11, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 216, 10, 13, 3, 13, 3, 13, 3, 13, 5, 13, 221, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 227, 10, 13, 3, 13, 7, 13, 230, 10, 13, 12, 13, 14, 13, 233, 11, 13, 3, 14, 6, 14, 236, 10, 14, 13, 14, 14, 14, 237, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 245, 10, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 5, 16, 252, 10, 16, 3, 16, 3, 16, 6, 16, 256, 10, 16, 13, 16, 14, 16, 257, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 5, 19, 270, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 282, 10, 20, 12, 20, 14, 20, 285, 11, 20, 3, 21, 3, 21, 3, 21, 5, 21, 290, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 296, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 7, 23, 303, 10, 23, 12, 23, 14, 23, 306, 11, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 313, 10, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 7, 25, 321, 10, 25, 12, 25, 14, 25, 324, 11, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 335, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 346, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 367, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 7, 27, 374, 10, 27, 12, 27, 14, 27, 377, 11, 27, 3, 27, 3, 27, 3, 27, 5, 27, 382, 10, 27, 3, 28, 6, 28, 385, 10, 28, 13, 28, 14, 28, 386, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 394, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 407, 10, 29, 3, 29, 7, 29, 410, 10, 29, 12, 29, 14, 29, 413, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 422, 10, 29, 12, 29, 14, 29, 425, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 436, 10, 29, 12, 29, 14, 29, 439, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 457, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 466, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 479, 10, 29, 3, 30, 6, 30, 482, 10, 30, 13, 30, 14, 30, 483, 3, 30, 3, 30, 3, 30, 5, 30, 489, 10, 30, 5, 30, 491, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 5, 31, 497, 10, 31, 3, 32, 3, 32, 3, 32, 5, 32, 502, 10, 32, 3, 32, 3, 32, 5, 32, 506, 10, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 515, 10, 32, 3, 33, 5, 33, 518, 10, 33, 3, 33, 5, 33, 521, 10, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 7, 35, 531, 10, 35, 12, 35, 14, 35, 534, 11, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 543, 10, 36, 3, 36, 3, 36, 5, 36, 547, 10, 36, 3, 36, 5, 36, 550, 10, 36, 3, 36, 3, 36, 5, 36, 554, 10, 36, 3, 36, 3, 36, 5, 36, 558, 10, 36, 3, 36, 5, 36, 561, 10, 36, 3, 36, 3, 36, 5, 36, 565, 10, 36, 3, 36, 3, 36, 5, 36, 569, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 586, 10, 36, 12, 36, 14, 36, 589, 11, 36, 3, 36, 5, 36, 592, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 6, 36, 599, 10, 36, 13, 36, 14, 36, 600, 3, 36, 3, 36, 5, 36, 605, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 655, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 665, 10, 36, 12, 36, 14, 36, 668, 11, 36, 3, 37, 3, 37, 3, 37, 7, 37, 673, 10, 37, 12, 37, 14, 37, 676, 11, 37, 3, 38, 3, 38, 5, 38, 680, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 688, 10, 39, 12, 39, 14, 39, 691, 11, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 705, 10, 40, 3, 41, 7, 41, 708, 10, 41, 12, 41, 14, 41, 711, 11, 41, 3, 42, 3, 42, 3, 42, 5, 42, 716, 10, 42, 3, 43, 3, 43, 3, 43, 7, 43, 721, 10, 43, 12, 43, 14, 43, 724, 11, 43, 3, 43, 3, 43, 3, 43, 7, 43, 729, 10, 43, 12, 43, 14, 43, 732, 11, 43, 5, 43, 734, 10, 43, 3, 44, 3, 44, 5, 44, 738, 10, 44, 3, 44, 7, 44, 741, 10, 44, 12, 44, 14, 44, 744, 11, 44, 3, 45, 3, 45, 3, 45, 3, 45, 7, 45, 750, 10, 45, 12, 45, 14, 45, 753, 11, 45, 3, 45, 7, 45, 756, 10, 45, 12, 45, 14, 45, 759, 11, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 806, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 822, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 7, 47, 836, 10, 47, 12, 47, 14, 47, 839, 11, 47, 3, 47, 2, 9, 12, 22, 24, 38, 68, 70, 92, 48, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 2, 13, 3, 2, 72, 73, 3, 2, 23, 24, 5, 2, 18, 19, 25, 26, 84, 84, 3, 2, 29, 30, 3, 2, 20, 22, 3, 2, 18, 19, 3, 2, 31, 36, 3, 2, 128, 131, 3, 2, 126, 127, 3, 2, 132, 133, 3, 2, 128, 129, 2, 968, 2, 94, 3, 2, 2, 2, 4, 97, 3, 2, 2, 2, 6, 103, 3, 2, 2, 2, 8, 120, 3, 2, 2, 2, 10, 122, 3, 2, 2, 2, 12, 125, 3, 2, 2, 2, 14, 145, 3, 2, 2, 2, 16, 147, 3, 2, 2, 2, 18, 155, 3, 2, 2, 2, 20, 165, 3, 2, 2, 2, 22, 181, 3, 2, 2, 2, 24, 215, 3, 2, 2, 2, 26, 244, 3, 2, 2, 2, 28, 246, 3, 2, 2, 2, 30, 249, 3, 2, 2, 2, 32, 261, 3, 2, 2, 2, 34, 264, 3, 2, 2, 2, 36, 267, 3, 2, 2, 2, 38, 275, 3, 2, 2, 2, 40, 286, 3, 2, 2, 2, 42, 291, 3, 2, 2, 2, 44, 299, 3, 2, 2, 2, 46, 312, 3, 2, 2, 2, 48, 314, 3, 2, 2, 2, 50, 334, 3, 2, 2, 2, 52, 381, 3, 2, 2, 2, 54, 384, 3, 2, 2, 2, 56, 478, 3, 2, 2, 2, 58, 481, 3, 2, 2, 2, 60, 492, 3, 2, 2, 2, 62, 514, 3, 2, 2, 2, 64, 520, 3, 2, 2, 2, 66, 522, 3, 2, 2, 2, 68, 524, 3, 2, 2, 2, 70, 604, 3, 2, 2, 2, 72, 669, 3, 2, 2, 2, 74, 677, 3, 2, 2, 2, 76, 683, 3, 2, 2, 2, 78, 704, 3, 2, 2, 2, 80, 709, 3, 2, 2, 2, 82, 715, 3, 2, 2, 2, 84, 733, 3, 2, 2, 2, 86, 735, 3, 2, 2, 2, 88, 745, 3, 2, 2, 2, 90, 805, 3, 2, 2, 2, 92, 821, 3, 2, 2, 2, 94, 95, 5, 6, 4, 2, 95, 96, 7, 2, 2, 3, 96, 3, 3, 2, 2, 2, 97, 98, 5, 80, 41, 2, 98, 99, 7, 2, 2, 3, 99, 5, 3, 2, 2, 2, 100, 102, 5, 8, 5, 2, 101, 100, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 7, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 106, 107, 5, 10, 6, 2, 107, 108, 7, 10, 2, 2, 108, 121, 3, 2, 2, 2, 109, 121, 5, 42, 22, 2, 110, 111, 5, 30, 16, 2, 111, 112, 7, 10, 2, 2, 112, 121, 3, 2, 2, 2, 113, 114, 5, 36, 19, 2, 114, 115, 7, 10, 2, 2, 115, 121, 3, 2, 2, 2, 116, 121, 5, 48, 25, 2, 117, 118, 5, 16, 9, 2, 118, 119, 7, 10, 2, 2, 119, 121, 3, 2, 2, 2, 120, 106, 3, 2, 2, 2, 120, 109, 3, 2, 2, 2, 120, 110, 3, 2, 2, 2, 120, 113, 3, 2, 2, 2, 120, 116, 3, 2, 2, 2, 120, 117, 3, 2, 2, 2, 121, 9, 3, 2, 2, 2, 122, 123, 5, 18, 10, 2, 123, 124, 5, 12, 7, 2, 124, 11, 3, 2, 2, 2, 125, 126, 8, 7, 1, 2, 126, 127, 5, 14, 8, 2, 127, 133, 3, 2, 2, 2, 128, 129, 12, 3, 2, 2, 129, 130, 7, 12, 2, 2, 130, 132, 5, 14, 8, 2, 131, 128, 3, 2, 2, 2, 132, 135, 3, 2, 2, 2, 133, 131, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 13, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 136, 139, 5, 24, 13, 2, 137, 138, 7, 39, 2, 2, 138, 140, 5, 70, 36, 2, 139, 137, 3, 2, 2, 2, 139, 140, 3, 2, 2, 2, 140, 146, 3, 2, 2, 2, 141, 142, 5, 24, 13, 2, 142, 143, 7, 39, 2, 2, 143, 144, 5, 74, 38, 2, 144, 146, 3, 2, 2, 2, 145, 136, 3, 2, 2, 2, 145, 141, 3, 2, 2, 2, 146, 15, 3, 2, 2, 2, 147, 148, 7, 41, 2, 2, 148, 149, 5, 18, 10, 2, 149, 150, 8, 9, 1, 2, 150, 151, 5, 24, 13, 2, 151, 17, 3, 2, 2, 2, 152, 154, 5, 52, 27, 2, 153, 152, 3, 2, 2, 2, 154, 157, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 158, 3, 2, 2, 2, 157, 155, 3, 2, 2, 2, 158, 162, 5, 26, 14, 2, 159, 161, 5, 52, 27, 2, 160, 159, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 19, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 166, 5, 26, 14, 2, 166, 167, 5, 22, 12, 2, 167, 21, 3, 2, 2, 2, 168, 182, 8, 12, 1, 2, 169, 173, 7, 20, 2, 2, 170, 172, 5, 52, 27, 2, 171, 170, 3, 2, 2, 2, 172, 175, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 176, 3, 2, 2, 2, 175, 173, 3, 2, 2, 2, 176, 182, 5, 22, 12, 4, 177, 178, 7, 8, 2, 2, 178, 179, 5, 22, 12, 2, 179, 180, 7, 9, 2, 2, 180, 182, 3, 2, 2, 2, 181, 168, 3, 2, 2, 2, 181, 169, 3, 2, 2, 2, 181, 177, 3, 2, 2, 2, 182, 197, 3, 2, 2, 2, 183, 184, 12, 6, 2, 2, 184, 186, 7, 8, 2, 2, 185, 187, 5, 44, 23, 2, 186, 185, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 188, 3, 2, 2, 2, 188, 196, 7, 9, 2, 2, 189, 190, 12, 5, 2, 2, 190, 192, 7, 6, 2, 2, 191, 193, 5, 70, 36, 2, 192, 191, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 7, 7, 2, 2, 195, 183, 3, 2, 2, 2, 195, 189, 3, 2, 2, 2, 196, 199, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 23, 3, 2, 2, 2, 199, 197, 3, 2, 2, 2, 200, 201, 8, 13, 1, 2, 201, 202, 7, 110, 2, 2, 202, 216, 8, 13, 1, 2, 203, 207, 7, 20, 2, 2, 204, 206, 5, 52, 27, 2, 205, 204, 3, 2, 2, 2, 206, 209, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 208, 210, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 210, 216, 5, 24, 13, 4, 211, 212, 7, 8, 2, 2, 212, 213, 5, 24, 13, 2, 213, 214, 7, 9, 2, 2, 214, 216, 3, 2, 2, 2, 215, 200, 3, 2, 2, 2, 215, 203, 3, 2, 2, 2, 215, 211, 3, 2, 2, 2, 216, 231, 3, 2, 2, 2, 217, 218, 12, 6, 2, 2, 218, 220, 7, 8, 2, 2, 219, 221, 5, 44, 23, 2, 220, 219, 3, 2, 2, 2, 220, 221, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 230, 7, 9, 2, 2, 223, 224, 12, 5, 2, 2, 224, 226, 7, 6, 2, 2, 225, 227, 5, 70, 36, 2, 226, 225, 3, 2, 2, 2, 226, 227, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 230, 7, 7, 2, 2, 229, 217, 3, 2, 2, 2, 229, 223, 3, 2, 2, 2, 230, 233, 3, 2, 2, 2, 231, 229, 3, 2, 2, 2, 231, 232, 3, 2, 2, 2, 232, 25, 3, 2, 2, 2, 233, 231, 3, 2, 2, 2, 234, 236, 7, 85, 2, 2, 235, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 235, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 245, 3, 2, 2, 2, 239, 245, 5, 30, 16, 2, 240, 245, 5, 28, 15, 2, 241, 245, 5, 36, 19, 2, 242, 245, 5, 34, 18, 2, 243, 245, 7, 3, 2, 2, 244, 235, 3, 2, 2, 2, 244, 239, 3, 2, 2, 2, 244, 240, 3, 2, 2, 2, 244, 241, 3, 2, 2, 2, 244, 242, 3, 2, 2, 2, 244, 243, 3, 2, 2, 2, 245, 27, 3, 2, 2, 2, 246, 247, 9, 2, 2, 2, 247, 248, 7, 110, 2, 2, 248, 29, 3, 2, 2, 2, 249, 251, 9, 2, 2, 2, 250, 252, 7, 110, 2, 2, 251, 250, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 255, 7, 4, 2, 2, 254, 256, 5, 32, 17, 2, 255, 254, 3, 2, 2, 2, 256, 257, 3, 2, 2, 2, 257, 255, 3, 2, 2, 2, 257, 258, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 260, 7, 5, 2, 2, 260, 31, 3, 2, 2, 2, 261, 262, 5, 10, 6, 2, 262, 263, 7, 10, 2, 2, 263, 33, 3, 2, 2, 2, 264, 265, 7, 74, 2, 2, 265, 266, 7, 110, 2, 2, 266, 35, 3, 2, 2, 2, 267, 269, 7, 74, 2, 2, 268, 270, 7, 110, 2, 2, 269, 268, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 272, 7, 4, 2, 2, 272, 273, 5, 38, 20, 2, 273, 274, 7, 5, 2, 2, 274, 37, 3, 2, 2, 2, 275, 276, 8, 20, 1, 2, 276, 277, 5, 40, 21, 2, 277, 283, 3, 2, 2, 2, 278, 279, 12, 3, 2, 2, 279, 280, 7, 12, 2, 2, 280, 282, 5, 40, 21, 2, 281, 278, 3, 2, 2, 2, 282, 285, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 39, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 286, 289, 7, 110, 2, 2, 287, 288, 7, 39, 2, 2, 288, 290, 5, 70, 36, 2, 289, 287, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 41, 3, 2, 2, 2, 291, 292, 5, 18, 10, 2, 292, 293, 5, 24, 13, 2, 293, 295, 7, 4, 2, 2, 294, 296, 5, 54, 28, 2, 295, 294, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 298, 7, 5, 2, 2, 298, 43, 3, 2, 2, 2, 299, 304, 5, 46, 24, 2, 300, 301, 7, 12, 2, 2, 301, 303, 5, 46, 24, 2, 302, 300, 3, 2, 2, 2, 303, 306, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 45, 3, 2, 2, 2, 306, 304, 3, 2, 2, 2, 307, 308, 5, 18, 10, 2, 308, 309, 5, 24, 13, 2, 309, 313, 3, 2, 2, 2, 310, 313, 5, 20, 11, 2, 311, 313, 7, 14, 2, 2, 312, 307, 3, 2, 2, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 47, 3, 2, 2, 2, 314, 315, 7, 90, 2, 2, 315, 316, 7, 110, 2, 2, 316, 317, 7, 8, 2, 2, 317, 322, 5, 50, 26, 2, 318, 319, 7, 12, 2, 2, 319, 321, 5, 50, 26, 2, 320, 318, 3, 2, 2, 2, 321, 324, 3, 2, 2, 2, 322, 320, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 325, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 325, 326, 7, 9, 2, 2, 326, 49, 3, 2, 2, 2, 327, 335, 7, 101, 2, 2, 328, 329, 7, 101, 2, 2, 329, 330, 7, 13, 2, 2, 330, 335, 7, 101, 2, 2, 331, 335, 7, 110, 2, 2, 332, 335, 7, 111, 2, 2, 333, 335, 7, 58, 2, 2, 334, 327, 3, 2, 2, 2, 334, 328, 3, 2, 2, 2, 334, 331, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 333, 3, 2, 2, 2, 335, 51, 3, 2, 2, 2, 336, 382, 7, 42, 2, 2, 337, 338, 7, 45, 2, 2, 338, 339, 7, 8, 2, 2, 339, 340, 7, 101, 2, 2, 340, 382, 7, 9, 2, 2, 341, 345, 7, 50, 2, 2, 342, 343, 7, 8, 2, 2, 343, 344, 7, 110, 2, 2, 344, 346, 7, 9, 2, 2, 345, 342, 3, 2, 2, 2, 345, 346, 3, 2, 2, 2, 346, 382, 3, 2, 2, 2, 347, 382, 7, 53, 2, 2, 348, 382, 7, 54, 2, 2, 349, 350, 7, 52, 2, 2, 350, 351, 7, 8, 2, 2, 351, 352, 5, 70, 36, 2, 352, 353, 7, 9, 2, 2, 353, 382, 3, 2, 2, 2, 354, 382, 7, 47, 2, 2, 355, 382, 7, 48, 2, 2, 356, 382, 7, 55, 2, 2, 357, 382, 7, 56, 2, 2, 358, 382, 7, 43, 2, 2, 359, 382, 7, 44, 2, 2, 360, 382, 7, 46, 2, 2, 361, 382, 7, 57, 2, 2, 362, 366, 7, 49, 2, 2, 363, 364, 7, 8, 2, 2, 364, 365, 7, 110, 2, 2, 365, 367, 7, 9, 2, 2, 366, 363, 3, 2, 2, 2, 366, 367, 3, 2, 2, 2, 367, 382, 3, 2, 2, 2, 368, 369, 7, 51, 2, 2, 369, 370, 7, 8, 2, 2, 370, 375, 5, 50, 26, 2, 371, 372, 7, 12, 2, 2, 372, 374, 5, 50, 26, 2, 373, 371, 3, 2, 2, 2, 374, 377, 3, 2, 2, 2, 375, 373, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 378, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 378, 379, 7, 9, 2, 2, 379, 382, 3, 2, 2, 2, 380, 382, 7, 58, 2, 2, 381, 336, 3, 2, 2, 2, 381, 337, 3, 2, 2, 2, 381, 341, 3, 2, 2, 2, 381, 347, 3, 2, 2, 2, 381, 348, 3, 2, 2, 2, 381, 349, 3, 2, 2, 2, 381, 354, 3, 2, 2, 2, 381, 355, 3, 2, 2, 2, 381, 356, 3, 2, 2, 2, 381, 357, 3, 2, 2, 2, 381, 358, 3, 2, 2, 2, 381, 359, 3, 2, 2, 2, 381, 360, 3, 2, 2, 2, 381, 361, 3, 2, 2, 2, 381, 362, 3, 2, 2, 2, 381, 368, 3, 2, 2, 2, 381, 380, 3, 2, 2, 2, 382, 53, 3, 2, 2, 2, 383, 385, 5, 56, 29, 2, 384, 383, 3, 2, 2, 2, 385, 386, 3, 2, 2, 2, 386, 384, 3, 2, 2, 2, 386, 387, 3, 2, 2, 2, 387, 55, 3, 2, 2, 2, 388, 389, 5, 10, 6, 2, 389, 390, 7, 10, 2, 2, 390, 479, 3, 2, 2, 2, 391, 393, 7, 4, 2, 2, 392, 394, 5, 54, 28, 2, 393, 392, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 395, 3, 2, 2, 2, 395, 479, 7, 5, 2, 2, 396, 397, 5, 68, 35, 2, 397, 398, 7, 10, 2, 2, 398, 479, 3, 2, 2, 2, 399, 400, 7, 59, 2, 2, 400, 401, 7, 8, 2, 2, 401, 402, 5, 68, 35, 2, 402, 403, 7, 9, 2, 2, 403, 406, 5, 56, 29, 2, 404, 405, 7, 60, 2, 2, 405, 407, 5, 56, 29, 2, 406, 404, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2, 407, 479, 3, 2, 2, 2, 408, 410, 5, 52, 27, 2, 409, 408, 3, 2, 2, 2, 410, 413, 3, 2, 2, 2, 411, 409, 3, 2, 2, 2, 411, 412, 3, 2, 2, 2, 412, 414, 3, 2, 2, 2, 413, 411, 3, 2, 2, 2, 414, 415, 7, 61, 2, 2, 415, 416, 7, 8, 2, 2, 416, 417, 5, 68, 35, 2, 417, 418, 7, 9, 2, 2, 418, 419, 5, 56, 29, 2, 419, 479, 3, 2, 2, 2, 420, 422, 5, 52, 27, 2, 421, 420, 3, 2, 2, 2, 422, 425, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 424, 3, 2, 2, 2, 424, 426, 3, 2, 2, 2, 425, 423, 3, 2, 2, 2, 426, 427, 7, 62, 2, 2, 427, 428, 5, 56, 29, 2, 428, 429, 7, 61, 2, 2, 429, 430, 7, 8, 2, 2, 430, 431, 5, 68, 35, 2, 431, 432, 7, 9, 2, 2, 432, 433, 7, 10, 2, 2, 433, 479, 3, 2, 2, 2, 434, 436, 5, 52, 27, 2, 435, 434, 3, 2, 2, 2, 436, 439, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 437, 438, 3, 2, 2, 2, 438, 440, 3, 2, 2, 2, 439, 437, 3, 2, 2, 2, 440, 441, 7, 63, 2, 2, 441, 442, 7, 8, 2, 2, 442, 443, 5, 62, 32, 2, 443, 444, 7, 9, 2, 2, 444, 445, 5, 56, 29, 2, 445, 479, 3, 2, 2, 2, 446, 447, 7, 64, 2, 2, 447, 448, 7, 8, 2, 2, 448, 449, 5, 68, 35, 2, 449, 450, 7, 9, 2, 2, 450, 451, 7, 4, 2, 2, 451, 452, 5, 58, 30, 2, 452, 453, 7, 5, 2, 2, 453, 479, 3, 2, 2, 2, 454, 456, 7, 65, 2, 2, 455, 457, 5, 68, 35, 2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 479, 7, 10, 2, 2, 459, 460, 7, 66, 2, 2, 460, 479, 7, 10, 2, 2, 461, 462, 7, 67, 2, 2, 462, 479, 7, 10, 2, 2, 463, 465, 7, 69, 2, 2, 464, 466, 5, 76, 39, 2, 465, 464, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 467, 3, 2, 2, 2, 467, 468, 7, 4, 2, 2, 468, 469, 5, 80, 41, 2, 469, 470, 7, 135, 2, 2, 470, 479, 3, 2, 2, 2, 471, 479, 5, 74, 38, 2, 472, 479, 7, 10, 2, 2, 473, 474, 7, 110, 2, 2, 474, 479, 7, 11, 2, 2, 475, 476, 7, 68, 2, 2, 476, 477, 7, 110, 2, 2, 477, 479, 7, 10, 2, 2, 478, 388, 3, 2, 2, 2, 478, 391, 3, 2, 2, 2, 478, 396, 3, 2, 2, 2, 478, 399, 3, 2, 2, 2, 478, 411, 3, 2, 2, 2, 478, 423, 3, 2, 2, 2, 478, 437, 3, 2, 2, 2, 478, 446, 3, 2, 2, 2, 478, 454, 3, 2, 2, 2, 478, 459, 3, 2, 2, 2, 478, 461, 3, 2, 2, 2, 478, 463, 3, 2, 2, 2, 478, 471, 3, 2, 2, 2, 478, 472, 3, 2, 2, 2, 478, 473, 3, 2, 2, 2, 478, 475, 3, 2, 2, 2, 479, 57, 3, 2, 2, 2, 480, 482, 5, 60, 31, 2, 481, 480, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 481, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 490, 3, 2, 2, 2, 485, 486, 7, 70, 2, 2, 486, 488, 7, 11, 2, 2, 487, 489, 5, 54, 28, 2, 488, 487, 3, 2, 2, 2, 488, 489, 3, 2, 2, 2, 489, 491, 3, 2, 2, 2, 490, 485, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 59, 3, 2, 2, 2, 492, 493, 7, 71, 2, 2, 493, 494, 5, 70, 36, 2, 494, 496, 7, 11, 2, 2, 495, 497, 5, 54, 28, 2, 496, 495, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 61, 3, 2, 2, 2, 498, 499, 5, 64, 33, 2, 499, 501, 7, 10, 2, 2, 500, 502, 5, 66, 34, 2, 501, 500, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 503, 3, 2, 2, 2, 503, 505, 7, 10, 2, 2, 504, 506, 5, 68, 35, 2, 505, 504, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 515, 3, 2, 2, 2, 507, 508, 5, 18, 10, 2, 508, 509, 5, 24, 13, 2, 509, 510, 7, 11, 2, 2, 510, 511, 5, 70, 36, 2, 511, 512, 7, 13, 2, 2, 512, 513, 5, 70, 36, 2, 513, 515, 3, 2, 2, 2, 514, 498, 3, 2, 2, 2, 514, 507, 3, 2, 2, 2, 515, 63, 3, 2, 2, 2, 516, 518, 5, 10, 6, 2, 517, 516, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 521, 3, 2, 2, 2, 519, 521, 5, 68, 35, 2, 520, 517, 3, 2, 2, 2, 520, 519, 3, 2, 2, 2, 521, 65, 3, 2, 2, 2, 522, 523, 5, 68, 35, 2, 523, 67, 3, 2, 2, 2, 524, 525, 8, 35, 1, 2, 525, 526, 5, 70, 36, 2, 526, 532, 3, 2, 2, 2, 527, 528, 12, 3, 2, 2, 528, 529, 7, 12, 2, 2, 529, 531, 5, 70, 36, 2, 530, 527, 3, 2, 2, 2, 531, 534, 3, 2, 2, 2, 532, 530, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 69, 3, 2, 2, 2, 534, 532, 3, 2, 2, 2, 535, 536, 8, 36, 1, 2, 536, 537, 7, 8, 2, 2, 537, 538, 5, 68, 35, 2, 538, 539, 7, 9, 2, 2, 539, 605, 3, 2, 2, 2, 540, 542, 7, 75, 2, 2, 541, 543, 7, 8, 2, 2, 542, 541, 3, 2, 2, 2, 542, 543, 3, 2, 2, 2, 543, 546, 3, 2, 2, 2, 544, 547, 5, 70, 36, 2, 545, 547, 5, 20, 11, 2, 546, 544, 3, 2, 2, 2, 546, 545, 3, 2, 2, 2, 547, 549, 3, 2, 2, 2, 548, 550, 7, 9, 2, 2, 549, 548, 3, 2, 2, 2, 549, 550, 3, 2, 2, 2, 550, 605, 3, 2, 2, 2, 551, 553, 7, 76, 2, 2, 552, 554, 7, 8, 2, 2, 553, 552, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 557, 3, 2, 2, 2, 555, 558, 5, 70, 36, 2, 556, 558, 5, 20, 11, 2, 557, 555, 3, 2, 2, 2, 557, 556, 3, 2, 2, 2, 558, 560, 3, 2, 2, 2, 559, 561, 7, 9, 2, 2, 560, 559, 3, 2, 2, 2, 560, 561, 3, 2, 2, 2, 561, 605, 3, 2, 2, 2, 562, 564, 7, 77, 2, 2, 563, 565, 7, 8, 2, 2, 564, 563, 3, 2, 2, 2, 564, 565, 3, 2, 2, 2, 565, 566, 3, 2, 2, 2, 566, 568, 7, 110, 2, 2, 567, 569, 7, 9, 2, 2, 568, 567, 3, 2, 2, 2, 568, 569, 3, 2, 2, 2, 569, 605, 3, 2, 2, 2, 570, 571, 7, 8, 2, 2, 571, 572, 5, 20, 11, 2, 572, 573, 7, 9, 2, 2, 573, 574, 5, 70, 36, 25, 574, 605, 3, 2, 2, 2, 575, 576, 9, 3, 2, 2, 576, 605, 5, 70, 36, 24, 577, 578, 7, 20, 2, 2, 578, 605, 5, 70, 36, 22, 579, 580, 9, 4, 2, 2, 580, 605, 5, 70, 36, 21, 581, 582, 7, 4, 2, 2, 582, 587, 5, 70, 36, 2, 583, 584, 7, 12, 2, 2, 584, 586, 5, 70, 36, 2, 585, 583, 3, 2, 2, 2, 586, 589, 3, 2, 2, 2, 587, 585, 3, 2, 2, 2, 587, 588, 3, 2, 2, 2, 588, 591, 3, 2, 2, 2, 589, 587, 3, 2, 2, 2, 590, 592, 7, 12, 2, 2, 591, 590, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 594, 7, 5, 2, 2, 594, 605, 3, 2, 2, 2, 595, 605, 7, 110, 2, 2, 596, 605, 7, 101, 2, 2, 597, 599, 7, 111, 2, 2, 598, 597, 3, 2, 2, 2, 599, 600, 3, 2, 2, 2, 600, 598, 3, 2, 2, 2, 600, 601, 3, 2, 2, 2, 601, 605, 3, 2, 2, 2, 602, 605, 7, 112, 2, 2, 603, 605, 7, 86, 2, 2, 604, 535, 3, 2, 2, 2, 604, 540, 3, 2, 2, 2, 604, 551, 3, 2, 2, 2, 604, 562, 3, 2, 2, 2, 604, 570, 3, 2, 2, 2, 604, 575, 3, 2, 2, 2, 604, 577, 3, 2, 2, 2, 604, 579, 3, 2, 2, 2, 604, 581, 3, 2, 2, 2, 604, 595, 3, 2, 2, 2, 604, 596, 3, 2, 2, 2, 604, 598, 3, 2, 2, 2, 604, 602, 3, 2, 2, 2, 604, 603, 3, 2, 2, 2, 605, 666, 3, 2, 2, 2, 606, 607, 12, 20, 2, 2, 607, 608, 9, 5, 2, 2, 608, 665, 5, 70, 36, 21, 609, 610, 12, 19, 2, 2, 610, 611, 9, 6, 2, 2, 611, 665, 5, 70, 36, 20, 612, 613, 12, 18, 2, 2, 613, 614, 9, 7, 2, 2, 614, 665, 5, 70, 36, 19, 615, 616, 12, 17, 2, 2, 616, 617, 9, 8, 2, 2, 617, 665, 5, 70, 36, 18, 618, 619, 12, 16, 2, 2, 619, 620, 7, 25, 2, 2, 620, 665, 5, 70, 36, 17, 621, 622, 12, 15, 2, 2, 622, 623, 7, 27, 2, 2, 623, 665, 5, 70, 36, 16, 624, 625, 12, 14, 2, 2, 625, 626, 7, 28, 2, 2, 626, 665, 5, 70, 36, 15, 627, 628, 12, 13, 2, 2, 628, 629, 7, 37, 2, 2, 629, 665, 5, 70, 36, 14, 630, 631, 12, 12, 2, 2, 631, 632, 7, 38, 2, 2, 632, 665, 5, 70, 36, 13, 633, 634, 12, 11, 2, 2, 634, 635, 7, 15, 2, 2, 635, 636, 5, 70, 36, 2, 636, 637, 7, 11, 2, 2, 637, 638, 5, 70, 36, 12, 638, 665, 3, 2, 2, 2, 639, 640, 12, 10, 2, 2, 640, 641, 7, 39, 2, 2, 641, 665, 5, 70, 36, 10, 642, 643, 12, 9, 2, 2, 643, 644, 7, 40, 2, 2, 644, 665, 5, 70, 36, 9, 645, 646, 12, 32, 2, 2, 646, 647, 7, 16, 2, 2, 647, 665, 7, 110, 2, 2, 648, 649, 12, 31, 2, 2, 649, 650, 7, 17, 2, 2, 650, 665, 7, 110, 2, 2, 651, 652, 12, 30, 2, 2, 652, 654, 7, 8, 2, 2, 653, 655, 5, 72, 37, 2, 654, 653, 3, 2, 2, 2, 654, 655, 3, 2, 2, 2, 655, 656, 3, 2, 2, 2, 656, 665, 7, 9, 2, 2, 657, 658, 12, 26, 2, 2, 658, 659, 7, 6, 2, 2, 659, 660, 5, 68, 35, 2, 660, 661, 7, 7, 2, 2, 661, 665, 3, 2, 2, 2, 662, 663, 12, 23, 2, 2, 663, 665, 9, 3, 2, 2, 664, 606, 3, 2, 2, 2, 664, 609, 3, 2, 2, 2, 664, 612, 3, 2, 2, 2, 664, 615, 3, 2, 2, 2, 664, 618, 3, 2, 2, 2, 664, 621, 3, 2, 2, 2, 664, 624, 3, 2, 2, 2, 664, 627, 3, 2, 2, 2, 664, 630, 3, 2, 2, 2, 664, 633, 3, 2, 2, 2, 664, 639, 3, 2, 2, 2, 664, 642, 3, 2, 2, 2, 664, 645, 3, 2, 2, 2, 664, 648, 3, 2, 2, 2, 664, 651, 3, 2, 2, 2, 664, 657, 3, 2, 2, 2, 664, 662, 3, 2, 2, 2, 665, 668, 3, 2, 2, 2, 666, 664, 3, 2, 2, 2, 666, 667, 3, 2, 2, 2, 667, 71, 3, 2, 2, 2, 668, 666, 3, 2, 2, 2, 669, 674, 5, 70, 36, 2, 670, 671, 7, 12, 2, 2, 671, 673, 5, 70, 36, 2, 672, 670, 3, 2, 2, 2, 673, 676, 3, 2, 2, 2, 674, 672, 3, 2, 2, 2, 674, 675, 3, 2, 2, 2, 675, 73, 3, 2, 2, 2, 676, 674, 3, 2, 2, 2, 677, 679, 7, 78, 2, 2, 678, 680, 5, 76, 39, 2, 679, 678, 3, 2, 2, 2, 679, 680, 3, 2, 2, 2, 680, 681, 3, 2, 2, 2, 681, 682, 7, 87, 2, 2, 682, 75, 3, 2, 2, 2, 683, 684, 7, 8, 2, 2, 684, 689, 5, 78, 40, 2, 685, 686, 7, 12, 2, 2, 686, 688, 5, 78, 40, 2, 687, 685, 3, 2, 2, 2, 688, 691, 3, 2, 2, 2, 689, 687, 3, 2, 2, 2, 689, 690, 3, 2, 2, 2, 690, 692, 3, 2, 2, 2, 691, 689, 3, 2, 2, 2, 692, 693, 7, 9, 2, 2, 693, 77, 3, 2, 2, 2, 694, 695, 7, 79, 2, 2, 695, 705, 7, 111, 2, 2, 696, 697, 7, 80, 2, 2, 697, 705, 7, 110, 2, 2, 698, 699, 7, 81, 2, 2, 699, 705, 7, 111, 2, 2, 700, 701, 7, 82, 2, 2, 701, 705, 5, 70, 36, 2, 702, 703, 7, 83, 2, 2, 703, 705, 5, 70, 36, 2, 704, 694, 3, 2, 2, 2, 704, 696, 3, 2, 2, 2, 704, 698, 3, 2, 2, 2, 704, 700, 3, 2, 2, 2, 704, 702, 3, 2, 2, 2, 705, 79, 3, 2, 2, 2, 706, 708, 5, 82, 42, 2, 707, 706, 3, 2, 2, 2, 708, 711, 3, 2, 2, 2, 709, 707, 3, 2, 2, 2, 709, 710, 3, 2, 2, 2, 710, 81, 3, 2, 2, 2, 711, 709, 3, 2, 2, 2, 712, 716, 5, 84, 43, 2, 713, 716, 5, 86, 44, 2, 714, 716, 5, 88, 45, 2, 715, 712, 3, 2, 2, 2, 715, 713, 3, 2, 2, 2, 715, 714, 3, 2, 2, 2, 716, 83, 3, 2, 2, 2, 717, 718, 7, 148, 2, 2, 718, 722, 7, 119, 2, 2, 719, 721, 7, 149, 2, 2, 720, 719, 3, 2, 2, 2, 721, 724, 3, 2, 2, 2, 722, 720, 3, 2, 2, 2, 722, 723, 3, 2, 2, 2, 723, 734, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 725, 726, 7, 147, 2, 2, 726, 730, 7, 119, 2, 2, 727, 729, 7, 149, 2, 2, 728, 727, 3, 2, 2, 2, 729, 732, 3, 2, 2, 2, 730, 728, 3, 2, 2, 2, 730, 731, 3, 2, 2, 2, 731, 734, 3, 2, 2, 2, 732, 730, 3, 2, 2, 2, 733, 717, 3, 2, 2, 2, 733, 725, 3, 2, 2, 2, 734, 85, 3, 2, 2, 2, 735, 737, 7, 117, 2, 2, 736, 738, 5, 90, 46, 2, 737, 736, 3, 2, 2, 2, 737, 738, 3, 2, 2, 2, 738, 742, 3, 2, 2, 2, 739, 741, 7, 149, 2, 2, 740, 739, 3, 2, 2, 2, 741, 744, 3, 2, 2, 2, 742, 740, 3, 2, 2, 2, 742, 743, 3, 2, 2, 2, 743, 87, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 745, 746, 7, 116, 2, 2, 746, 751, 5, 92, 47, 2, 747, 748, 7, 120, 2, 2, 748, 750, 5, 92, 47, 2, 749, 747, 3, 2, 2, 2, 750, 753, 3, 2, 2, 2, 751, 749, 3, 2, 2, 2, 751, 752, 3, 2, 2, 2, 752, 757, 3, 2, 2, 2, 753, 751, 3, 2, 2, 2, 754, 756, 7, 149, 2, 2, 755, 754, 3, 2, 2, 2, 756, 759, 3, 2, 2, 2, 757, 755, 3, 2, 2, 2, 757, 758, 3, 2, 2, 2, 758, 89, 3, 2, 2, 2, 759, 757, 3, 2, 2, 2, 760, 806, 5, 92, 47, 2, 761, 762, 7, 118, 2, 2, 762, 806, 5, 92, 47, 2, 763, 764, 5, 92, 47, 2, 764, 765, 7, 120, 2, 2, 765, 766, 5, 92, 47, 2, 766, 806, 3, 2, 2, 2, 767, 768, 7, 121, 2, 2, 768, 769, 5, 92, 47, 2, 769, 770, 7, 122, 2, 2, 770, 771, 7, 120, 2, 2, 771, 772, 7, 148, 2, 2, 772, 806, 3, 2, 2, 2, 773, 774, 7, 121, 2, 2, 774, 775, 7, 121, 2, 2, 775, 776, 5, 92, 47, 2, 776, 777, 7, 122, 2, 2, 777, 778, 7, 122, 2, 2, 778, 779, 7, 120, 2, 2, 779, 780, 7, 148, 2, 2, 780, 806, 3, 2, 2, 2, 781, 782, 7, 121, 2, 2, 782, 783, 5, 92, 47, 2, 783, 784, 7, 120, 2, 2, 784, 785, 7, 148, 2, 2, 785, 786, 7, 122, 2, 2, 786, 787, 7, 120, 2, 2, 787, 788, 7, 148, 2, 2, 788, 806, 3, 2, 2, 2, 789, 790, 7, 121, 2, 2, 790, 791, 5, 92, 47, 2, 791, 792, 7, 120, 2, 2, 792, 793, 7, 148, 2, 2, 793, 794, 7, 122, 2, 2, 794, 806, 3, 2, 2, 2, 795, 796, 7, 121, 2, 2, 796, 797, 5, 92, 47, 2, 797, 798, 7, 122, 2, 2, 798, 806, 3, 2, 2, 2, 799, 800, 7, 121, 2, 2, 800, 801, 7, 121, 2, 2, 801, 802, 5, 92, 47, 2, 802, 803, 7, 122, 2, 2, 803, 804, 7, 122, 2, 2, 804, 806, 3, 2, 2, 2, 805, 760, 3, 2, 2, 2, 805, 761, 3, 2, 2, 2, 805, 763, 3, 2, 2, 2, 805, 767, 3, 2, 2, 2, 805, 773, 3, 2, 2, 2, 805, 781, 3, 2, 2, 2, 805, 789, 3, 2, 2, 2, 805, 795, 3, 2, 2, 2, 805, 799, 3, 2, 2, 2, 806, 91, 3, 2, 2, 2, 807, 808, 8, 47, 1, 2, 808, 809, 7, 123, 2, 2, 809, 810, 5, 92, 47, 2, 810, 811, 7, 124, 2, 2, 811, 822, 3, 2, 2, 2, 812, 813, 9, 9, 2, 2, 813, 822, 5, 92, 47, 10, 814, 822, 7, 148, 2, 2, 815, 822, 7, 146, 2, 2, 816, 817, 7, 134, 2, 2, 817, 818, 7, 148, 2, 2, 818, 822, 7, 135, 2, 2, 819, 822, 7, 136, 2, 2, 820, 822, 7, 145, 2, 2, 821, 807, 3, 2, 2, 2, 821, 812, 3, 2, 2, 2, 821, 814, 3, 2, 2, 2, 821, 815, 3, 2, 2, 2, 821, 816, 3, 2, 2, 2, 821, 819, 3, 2, 2, 2, 821, 820, 3, 2, 2, 2, 822, 837, 3, 2, 2, 2, 823, 824, 12, 12, 2, 2, 824, 825, 7, 125, 2, 2, 825, 836, 5, 92, 47, 13, 826, 827, 12, 11, 2, 2, 827, 828, 9, 10, 2, 2, 828, 836, 5, 92, 47, 12, 829, 830, 12, 9, 2, 2, 830, 831, 9, 11, 2, 2, 831, 836, 5, 92, 47, 10, 832, 833, 12, 8, 2, 2, 833, 834, 9, 12, 2, 2, 834, 836, 5, 92, 47, 9, 835, 823, 3, 2, 2, 2, 835, 826, 3, 2, 2, 2, 835, 829, 3, 2, 2, 2, 835, 832, 3, 2, 2, 2, 836, 839, 3, 2, 2, 2, 837, 835, 3, 2, 2, 2, 837, 838, 3, 2, 2, 2, 838, 93, 3, 2, 2, 2, 839, 837, 3, 2, 2, 2, 88, 103, 120, 133, 139, 145, 155, 162, 173, 181, 186, 192, 195, 197, 207, 215, 220, 226, 229, 231, 237, 244, 251, 257, 269, 283, 289, 295, 304, 312, 322, 334, 345, 366, 375, 381, 386, 393, 406, 411, 423, 437, 456, 465, 478, 483, 488, 490, 496, 501, 505, 514, 517, 520, 532, 542, 546, 549, 553, 557, 560, 564, 568, 587, 591, 600, 604, 654, 664, 666, 674, 679, 689, 704, 709, 715, 722, 730, 733, 737, 742, 751, 757, 805, 821, 835, 837] \ No newline at end of file +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 157, 843, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 4, 7, 4, 102, 10, 4, 12, 4, 14, 4, 105, 11, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 121, 10, 5, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 132, 10, 7, 12, 7, 14, 7, 135, 11, 7, 3, 8, 3, 8, 3, 8, 5, 8, 140, 10, 8, 3, 8, 3, 8, 3, 8, 3, 8, 5, 8, 146, 10, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 7, 10, 154, 10, 10, 12, 10, 14, 10, 157, 11, 10, 3, 10, 3, 10, 7, 10, 161, 10, 10, 12, 10, 14, 10, 164, 11, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 7, 12, 172, 10, 12, 12, 12, 14, 12, 175, 11, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 182, 10, 12, 3, 12, 3, 12, 3, 12, 5, 12, 187, 10, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 193, 10, 12, 3, 12, 7, 12, 196, 10, 12, 12, 12, 14, 12, 199, 11, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 206, 10, 13, 12, 13, 14, 13, 209, 11, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 216, 10, 13, 3, 13, 3, 13, 3, 13, 5, 13, 221, 10, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 227, 10, 13, 3, 13, 7, 13, 230, 10, 13, 12, 13, 14, 13, 233, 11, 13, 3, 14, 6, 14, 236, 10, 14, 13, 14, 14, 14, 237, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 245, 10, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 5, 16, 252, 10, 16, 3, 16, 3, 16, 6, 16, 256, 10, 16, 13, 16, 14, 16, 257, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 5, 19, 270, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 282, 10, 20, 12, 20, 14, 20, 285, 11, 20, 3, 21, 3, 21, 3, 21, 5, 21, 290, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 5, 22, 296, 10, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 7, 23, 303, 10, 23, 12, 23, 14, 23, 306, 11, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 313, 10, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 7, 25, 321, 10, 25, 12, 25, 14, 25, 324, 11, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 5, 26, 335, 10, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 346, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 5, 27, 367, 10, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 7, 27, 374, 10, 27, 12, 27, 14, 27, 377, 11, 27, 3, 27, 3, 27, 3, 27, 5, 27, 382, 10, 27, 3, 28, 6, 28, 385, 10, 28, 13, 28, 14, 28, 386, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 394, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 407, 10, 29, 3, 29, 7, 29, 410, 10, 29, 12, 29, 14, 29, 413, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 422, 10, 29, 12, 29, 14, 29, 425, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 7, 29, 436, 10, 29, 12, 29, 14, 29, 439, 11, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 457, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 466, 10, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 5, 29, 479, 10, 29, 3, 30, 6, 30, 482, 10, 30, 13, 30, 14, 30, 483, 3, 30, 3, 30, 3, 30, 5, 30, 489, 10, 30, 5, 30, 491, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 5, 31, 497, 10, 31, 3, 32, 3, 32, 3, 32, 5, 32, 502, 10, 32, 3, 32, 3, 32, 5, 32, 506, 10, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 515, 10, 32, 3, 33, 5, 33, 518, 10, 33, 3, 33, 5, 33, 521, 10, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 7, 35, 531, 10, 35, 12, 35, 14, 35, 534, 11, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 557, 10, 36, 3, 36, 3, 36, 5, 36, 561, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 578, 10, 36, 12, 36, 14, 36, 581, 11, 36, 3, 36, 5, 36, 584, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 6, 36, 591, 10, 36, 13, 36, 14, 36, 592, 3, 36, 3, 36, 5, 36, 597, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 5, 36, 647, 10, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 657, 10, 36, 12, 36, 14, 36, 660, 11, 36, 3, 37, 3, 37, 3, 37, 7, 37, 665, 10, 37, 12, 37, 14, 37, 668, 11, 37, 3, 38, 3, 38, 5, 38, 672, 10, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 680, 10, 39, 12, 39, 14, 39, 683, 11, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 5, 40, 697, 10, 40, 3, 41, 7, 41, 700, 10, 41, 12, 41, 14, 41, 703, 11, 41, 3, 42, 3, 42, 3, 42, 5, 42, 708, 10, 42, 3, 43, 3, 43, 3, 43, 7, 43, 713, 10, 43, 12, 43, 14, 43, 716, 11, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 723, 10, 43, 12, 43, 14, 43, 726, 11, 43, 3, 43, 3, 43, 3, 43, 7, 43, 731, 10, 43, 12, 43, 14, 43, 734, 11, 43, 5, 43, 736, 10, 43, 3, 44, 3, 44, 5, 44, 740, 10, 44, 3, 44, 7, 44, 743, 10, 44, 12, 44, 14, 44, 746, 11, 44, 3, 45, 3, 45, 3, 45, 3, 45, 7, 45, 752, 10, 45, 12, 45, 14, 45, 755, 11, 45, 3, 45, 7, 45, 758, 10, 45, 12, 45, 14, 45, 761, 11, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 808, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 5, 47, 824, 10, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 7, 47, 838, 10, 47, 12, 47, 14, 47, 841, 11, 47, 3, 47, 2, 9, 12, 22, 24, 38, 68, 70, 92, 48, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 2, 13, 3, 2, 72, 73, 3, 2, 23, 24, 5, 2, 18, 19, 25, 26, 84, 84, 3, 2, 29, 30, 3, 2, 20, 22, 3, 2, 18, 19, 3, 2, 31, 36, 3, 2, 128, 131, 3, 2, 126, 127, 3, 2, 132, 133, 3, 2, 128, 129, 2, 968, 2, 94, 3, 2, 2, 2, 4, 97, 3, 2, 2, 2, 6, 103, 3, 2, 2, 2, 8, 120, 3, 2, 2, 2, 10, 122, 3, 2, 2, 2, 12, 125, 3, 2, 2, 2, 14, 145, 3, 2, 2, 2, 16, 147, 3, 2, 2, 2, 18, 155, 3, 2, 2, 2, 20, 165, 3, 2, 2, 2, 22, 181, 3, 2, 2, 2, 24, 215, 3, 2, 2, 2, 26, 244, 3, 2, 2, 2, 28, 246, 3, 2, 2, 2, 30, 249, 3, 2, 2, 2, 32, 261, 3, 2, 2, 2, 34, 264, 3, 2, 2, 2, 36, 267, 3, 2, 2, 2, 38, 275, 3, 2, 2, 2, 40, 286, 3, 2, 2, 2, 42, 291, 3, 2, 2, 2, 44, 299, 3, 2, 2, 2, 46, 312, 3, 2, 2, 2, 48, 314, 3, 2, 2, 2, 50, 334, 3, 2, 2, 2, 52, 381, 3, 2, 2, 2, 54, 384, 3, 2, 2, 2, 56, 478, 3, 2, 2, 2, 58, 481, 3, 2, 2, 2, 60, 492, 3, 2, 2, 2, 62, 514, 3, 2, 2, 2, 64, 520, 3, 2, 2, 2, 66, 522, 3, 2, 2, 2, 68, 524, 3, 2, 2, 2, 70, 596, 3, 2, 2, 2, 72, 661, 3, 2, 2, 2, 74, 669, 3, 2, 2, 2, 76, 675, 3, 2, 2, 2, 78, 696, 3, 2, 2, 2, 80, 701, 3, 2, 2, 2, 82, 707, 3, 2, 2, 2, 84, 735, 3, 2, 2, 2, 86, 737, 3, 2, 2, 2, 88, 747, 3, 2, 2, 2, 90, 807, 3, 2, 2, 2, 92, 823, 3, 2, 2, 2, 94, 95, 5, 6, 4, 2, 95, 96, 7, 2, 2, 3, 96, 3, 3, 2, 2, 2, 97, 98, 5, 80, 41, 2, 98, 99, 7, 2, 2, 3, 99, 5, 3, 2, 2, 2, 100, 102, 5, 8, 5, 2, 101, 100, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 7, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 106, 107, 5, 10, 6, 2, 107, 108, 7, 10, 2, 2, 108, 121, 3, 2, 2, 2, 109, 121, 5, 42, 22, 2, 110, 111, 5, 30, 16, 2, 111, 112, 7, 10, 2, 2, 112, 121, 3, 2, 2, 2, 113, 114, 5, 36, 19, 2, 114, 115, 7, 10, 2, 2, 115, 121, 3, 2, 2, 2, 116, 121, 5, 48, 25, 2, 117, 118, 5, 16, 9, 2, 118, 119, 7, 10, 2, 2, 119, 121, 3, 2, 2, 2, 120, 106, 3, 2, 2, 2, 120, 109, 3, 2, 2, 2, 120, 110, 3, 2, 2, 2, 120, 113, 3, 2, 2, 2, 120, 116, 3, 2, 2, 2, 120, 117, 3, 2, 2, 2, 121, 9, 3, 2, 2, 2, 122, 123, 5, 18, 10, 2, 123, 124, 5, 12, 7, 2, 124, 11, 3, 2, 2, 2, 125, 126, 8, 7, 1, 2, 126, 127, 5, 14, 8, 2, 127, 133, 3, 2, 2, 2, 128, 129, 12, 3, 2, 2, 129, 130, 7, 12, 2, 2, 130, 132, 5, 14, 8, 2, 131, 128, 3, 2, 2, 2, 132, 135, 3, 2, 2, 2, 133, 131, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 13, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 136, 139, 5, 24, 13, 2, 137, 138, 7, 39, 2, 2, 138, 140, 5, 70, 36, 2, 139, 137, 3, 2, 2, 2, 139, 140, 3, 2, 2, 2, 140, 146, 3, 2, 2, 2, 141, 142, 5, 24, 13, 2, 142, 143, 7, 39, 2, 2, 143, 144, 5, 74, 38, 2, 144, 146, 3, 2, 2, 2, 145, 136, 3, 2, 2, 2, 145, 141, 3, 2, 2, 2, 146, 15, 3, 2, 2, 2, 147, 148, 7, 41, 2, 2, 148, 149, 5, 18, 10, 2, 149, 150, 8, 9, 1, 2, 150, 151, 5, 24, 13, 2, 151, 17, 3, 2, 2, 2, 152, 154, 5, 52, 27, 2, 153, 152, 3, 2, 2, 2, 154, 157, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 155, 156, 3, 2, 2, 2, 156, 158, 3, 2, 2, 2, 157, 155, 3, 2, 2, 2, 158, 162, 5, 26, 14, 2, 159, 161, 5, 52, 27, 2, 160, 159, 3, 2, 2, 2, 161, 164, 3, 2, 2, 2, 162, 160, 3, 2, 2, 2, 162, 163, 3, 2, 2, 2, 163, 19, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 165, 166, 5, 26, 14, 2, 166, 167, 5, 22, 12, 2, 167, 21, 3, 2, 2, 2, 168, 182, 8, 12, 1, 2, 169, 173, 7, 20, 2, 2, 170, 172, 5, 52, 27, 2, 171, 170, 3, 2, 2, 2, 172, 175, 3, 2, 2, 2, 173, 171, 3, 2, 2, 2, 173, 174, 3, 2, 2, 2, 174, 176, 3, 2, 2, 2, 175, 173, 3, 2, 2, 2, 176, 182, 5, 22, 12, 4, 177, 178, 7, 8, 2, 2, 178, 179, 5, 22, 12, 2, 179, 180, 7, 9, 2, 2, 180, 182, 3, 2, 2, 2, 181, 168, 3, 2, 2, 2, 181, 169, 3, 2, 2, 2, 181, 177, 3, 2, 2, 2, 182, 197, 3, 2, 2, 2, 183, 184, 12, 6, 2, 2, 184, 186, 7, 8, 2, 2, 185, 187, 5, 44, 23, 2, 186, 185, 3, 2, 2, 2, 186, 187, 3, 2, 2, 2, 187, 188, 3, 2, 2, 2, 188, 196, 7, 9, 2, 2, 189, 190, 12, 5, 2, 2, 190, 192, 7, 6, 2, 2, 191, 193, 5, 70, 36, 2, 192, 191, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 7, 7, 2, 2, 195, 183, 3, 2, 2, 2, 195, 189, 3, 2, 2, 2, 196, 199, 3, 2, 2, 2, 197, 195, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 23, 3, 2, 2, 2, 199, 197, 3, 2, 2, 2, 200, 201, 8, 13, 1, 2, 201, 202, 7, 110, 2, 2, 202, 216, 8, 13, 1, 2, 203, 207, 7, 20, 2, 2, 204, 206, 5, 52, 27, 2, 205, 204, 3, 2, 2, 2, 206, 209, 3, 2, 2, 2, 207, 205, 3, 2, 2, 2, 207, 208, 3, 2, 2, 2, 208, 210, 3, 2, 2, 2, 209, 207, 3, 2, 2, 2, 210, 216, 5, 24, 13, 4, 211, 212, 7, 8, 2, 2, 212, 213, 5, 24, 13, 2, 213, 214, 7, 9, 2, 2, 214, 216, 3, 2, 2, 2, 215, 200, 3, 2, 2, 2, 215, 203, 3, 2, 2, 2, 215, 211, 3, 2, 2, 2, 216, 231, 3, 2, 2, 2, 217, 218, 12, 6, 2, 2, 218, 220, 7, 8, 2, 2, 219, 221, 5, 44, 23, 2, 220, 219, 3, 2, 2, 2, 220, 221, 3, 2, 2, 2, 221, 222, 3, 2, 2, 2, 222, 230, 7, 9, 2, 2, 223, 224, 12, 5, 2, 2, 224, 226, 7, 6, 2, 2, 225, 227, 5, 70, 36, 2, 226, 225, 3, 2, 2, 2, 226, 227, 3, 2, 2, 2, 227, 228, 3, 2, 2, 2, 228, 230, 7, 7, 2, 2, 229, 217, 3, 2, 2, 2, 229, 223, 3, 2, 2, 2, 230, 233, 3, 2, 2, 2, 231, 229, 3, 2, 2, 2, 231, 232, 3, 2, 2, 2, 232, 25, 3, 2, 2, 2, 233, 231, 3, 2, 2, 2, 234, 236, 7, 85, 2, 2, 235, 234, 3, 2, 2, 2, 236, 237, 3, 2, 2, 2, 237, 235, 3, 2, 2, 2, 237, 238, 3, 2, 2, 2, 238, 245, 3, 2, 2, 2, 239, 245, 5, 30, 16, 2, 240, 245, 5, 28, 15, 2, 241, 245, 5, 36, 19, 2, 242, 245, 5, 34, 18, 2, 243, 245, 7, 3, 2, 2, 244, 235, 3, 2, 2, 2, 244, 239, 3, 2, 2, 2, 244, 240, 3, 2, 2, 2, 244, 241, 3, 2, 2, 2, 244, 242, 3, 2, 2, 2, 244, 243, 3, 2, 2, 2, 245, 27, 3, 2, 2, 2, 246, 247, 9, 2, 2, 2, 247, 248, 7, 110, 2, 2, 248, 29, 3, 2, 2, 2, 249, 251, 9, 2, 2, 2, 250, 252, 7, 110, 2, 2, 251, 250, 3, 2, 2, 2, 251, 252, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 255, 7, 4, 2, 2, 254, 256, 5, 32, 17, 2, 255, 254, 3, 2, 2, 2, 256, 257, 3, 2, 2, 2, 257, 255, 3, 2, 2, 2, 257, 258, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 260, 7, 5, 2, 2, 260, 31, 3, 2, 2, 2, 261, 262, 5, 10, 6, 2, 262, 263, 7, 10, 2, 2, 263, 33, 3, 2, 2, 2, 264, 265, 7, 74, 2, 2, 265, 266, 7, 110, 2, 2, 266, 35, 3, 2, 2, 2, 267, 269, 7, 74, 2, 2, 268, 270, 7, 110, 2, 2, 269, 268, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 272, 7, 4, 2, 2, 272, 273, 5, 38, 20, 2, 273, 274, 7, 5, 2, 2, 274, 37, 3, 2, 2, 2, 275, 276, 8, 20, 1, 2, 276, 277, 5, 40, 21, 2, 277, 283, 3, 2, 2, 2, 278, 279, 12, 3, 2, 2, 279, 280, 7, 12, 2, 2, 280, 282, 5, 40, 21, 2, 281, 278, 3, 2, 2, 2, 282, 285, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 39, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 286, 289, 7, 110, 2, 2, 287, 288, 7, 39, 2, 2, 288, 290, 5, 70, 36, 2, 289, 287, 3, 2, 2, 2, 289, 290, 3, 2, 2, 2, 290, 41, 3, 2, 2, 2, 291, 292, 5, 18, 10, 2, 292, 293, 5, 24, 13, 2, 293, 295, 7, 4, 2, 2, 294, 296, 5, 54, 28, 2, 295, 294, 3, 2, 2, 2, 295, 296, 3, 2, 2, 2, 296, 297, 3, 2, 2, 2, 297, 298, 7, 5, 2, 2, 298, 43, 3, 2, 2, 2, 299, 304, 5, 46, 24, 2, 300, 301, 7, 12, 2, 2, 301, 303, 5, 46, 24, 2, 302, 300, 3, 2, 2, 2, 303, 306, 3, 2, 2, 2, 304, 302, 3, 2, 2, 2, 304, 305, 3, 2, 2, 2, 305, 45, 3, 2, 2, 2, 306, 304, 3, 2, 2, 2, 307, 308, 5, 18, 10, 2, 308, 309, 5, 24, 13, 2, 309, 313, 3, 2, 2, 2, 310, 313, 5, 20, 11, 2, 311, 313, 7, 14, 2, 2, 312, 307, 3, 2, 2, 2, 312, 310, 3, 2, 2, 2, 312, 311, 3, 2, 2, 2, 313, 47, 3, 2, 2, 2, 314, 315, 7, 90, 2, 2, 315, 316, 7, 110, 2, 2, 316, 317, 7, 8, 2, 2, 317, 322, 5, 50, 26, 2, 318, 319, 7, 12, 2, 2, 319, 321, 5, 50, 26, 2, 320, 318, 3, 2, 2, 2, 321, 324, 3, 2, 2, 2, 322, 320, 3, 2, 2, 2, 322, 323, 3, 2, 2, 2, 323, 325, 3, 2, 2, 2, 324, 322, 3, 2, 2, 2, 325, 326, 7, 9, 2, 2, 326, 49, 3, 2, 2, 2, 327, 335, 7, 101, 2, 2, 328, 329, 7, 101, 2, 2, 329, 330, 7, 13, 2, 2, 330, 335, 7, 101, 2, 2, 331, 335, 7, 110, 2, 2, 332, 335, 7, 111, 2, 2, 333, 335, 7, 58, 2, 2, 334, 327, 3, 2, 2, 2, 334, 328, 3, 2, 2, 2, 334, 331, 3, 2, 2, 2, 334, 332, 3, 2, 2, 2, 334, 333, 3, 2, 2, 2, 335, 51, 3, 2, 2, 2, 336, 382, 7, 42, 2, 2, 337, 338, 7, 45, 2, 2, 338, 339, 7, 8, 2, 2, 339, 340, 7, 101, 2, 2, 340, 382, 7, 9, 2, 2, 341, 345, 7, 50, 2, 2, 342, 343, 7, 8, 2, 2, 343, 344, 7, 110, 2, 2, 344, 346, 7, 9, 2, 2, 345, 342, 3, 2, 2, 2, 345, 346, 3, 2, 2, 2, 346, 382, 3, 2, 2, 2, 347, 382, 7, 53, 2, 2, 348, 382, 7, 54, 2, 2, 349, 350, 7, 52, 2, 2, 350, 351, 7, 8, 2, 2, 351, 352, 5, 70, 36, 2, 352, 353, 7, 9, 2, 2, 353, 382, 3, 2, 2, 2, 354, 382, 7, 47, 2, 2, 355, 382, 7, 48, 2, 2, 356, 382, 7, 55, 2, 2, 357, 382, 7, 56, 2, 2, 358, 382, 7, 43, 2, 2, 359, 382, 7, 44, 2, 2, 360, 382, 7, 46, 2, 2, 361, 382, 7, 57, 2, 2, 362, 366, 7, 49, 2, 2, 363, 364, 7, 8, 2, 2, 364, 365, 7, 110, 2, 2, 365, 367, 7, 9, 2, 2, 366, 363, 3, 2, 2, 2, 366, 367, 3, 2, 2, 2, 367, 382, 3, 2, 2, 2, 368, 369, 7, 51, 2, 2, 369, 370, 7, 8, 2, 2, 370, 375, 5, 50, 26, 2, 371, 372, 7, 12, 2, 2, 372, 374, 5, 50, 26, 2, 373, 371, 3, 2, 2, 2, 374, 377, 3, 2, 2, 2, 375, 373, 3, 2, 2, 2, 375, 376, 3, 2, 2, 2, 376, 378, 3, 2, 2, 2, 377, 375, 3, 2, 2, 2, 378, 379, 7, 9, 2, 2, 379, 382, 3, 2, 2, 2, 380, 382, 7, 58, 2, 2, 381, 336, 3, 2, 2, 2, 381, 337, 3, 2, 2, 2, 381, 341, 3, 2, 2, 2, 381, 347, 3, 2, 2, 2, 381, 348, 3, 2, 2, 2, 381, 349, 3, 2, 2, 2, 381, 354, 3, 2, 2, 2, 381, 355, 3, 2, 2, 2, 381, 356, 3, 2, 2, 2, 381, 357, 3, 2, 2, 2, 381, 358, 3, 2, 2, 2, 381, 359, 3, 2, 2, 2, 381, 360, 3, 2, 2, 2, 381, 361, 3, 2, 2, 2, 381, 362, 3, 2, 2, 2, 381, 368, 3, 2, 2, 2, 381, 380, 3, 2, 2, 2, 382, 53, 3, 2, 2, 2, 383, 385, 5, 56, 29, 2, 384, 383, 3, 2, 2, 2, 385, 386, 3, 2, 2, 2, 386, 384, 3, 2, 2, 2, 386, 387, 3, 2, 2, 2, 387, 55, 3, 2, 2, 2, 388, 389, 5, 10, 6, 2, 389, 390, 7, 10, 2, 2, 390, 479, 3, 2, 2, 2, 391, 393, 7, 4, 2, 2, 392, 394, 5, 54, 28, 2, 393, 392, 3, 2, 2, 2, 393, 394, 3, 2, 2, 2, 394, 395, 3, 2, 2, 2, 395, 479, 7, 5, 2, 2, 396, 397, 5, 68, 35, 2, 397, 398, 7, 10, 2, 2, 398, 479, 3, 2, 2, 2, 399, 400, 7, 59, 2, 2, 400, 401, 7, 8, 2, 2, 401, 402, 5, 68, 35, 2, 402, 403, 7, 9, 2, 2, 403, 406, 5, 56, 29, 2, 404, 405, 7, 60, 2, 2, 405, 407, 5, 56, 29, 2, 406, 404, 3, 2, 2, 2, 406, 407, 3, 2, 2, 2, 407, 479, 3, 2, 2, 2, 408, 410, 5, 52, 27, 2, 409, 408, 3, 2, 2, 2, 410, 413, 3, 2, 2, 2, 411, 409, 3, 2, 2, 2, 411, 412, 3, 2, 2, 2, 412, 414, 3, 2, 2, 2, 413, 411, 3, 2, 2, 2, 414, 415, 7, 61, 2, 2, 415, 416, 7, 8, 2, 2, 416, 417, 5, 68, 35, 2, 417, 418, 7, 9, 2, 2, 418, 419, 5, 56, 29, 2, 419, 479, 3, 2, 2, 2, 420, 422, 5, 52, 27, 2, 421, 420, 3, 2, 2, 2, 422, 425, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 423, 424, 3, 2, 2, 2, 424, 426, 3, 2, 2, 2, 425, 423, 3, 2, 2, 2, 426, 427, 7, 62, 2, 2, 427, 428, 5, 56, 29, 2, 428, 429, 7, 61, 2, 2, 429, 430, 7, 8, 2, 2, 430, 431, 5, 68, 35, 2, 431, 432, 7, 9, 2, 2, 432, 433, 7, 10, 2, 2, 433, 479, 3, 2, 2, 2, 434, 436, 5, 52, 27, 2, 435, 434, 3, 2, 2, 2, 436, 439, 3, 2, 2, 2, 437, 435, 3, 2, 2, 2, 437, 438, 3, 2, 2, 2, 438, 440, 3, 2, 2, 2, 439, 437, 3, 2, 2, 2, 440, 441, 7, 63, 2, 2, 441, 442, 7, 8, 2, 2, 442, 443, 5, 62, 32, 2, 443, 444, 7, 9, 2, 2, 444, 445, 5, 56, 29, 2, 445, 479, 3, 2, 2, 2, 446, 447, 7, 64, 2, 2, 447, 448, 7, 8, 2, 2, 448, 449, 5, 68, 35, 2, 449, 450, 7, 9, 2, 2, 450, 451, 7, 4, 2, 2, 451, 452, 5, 58, 30, 2, 452, 453, 7, 5, 2, 2, 453, 479, 3, 2, 2, 2, 454, 456, 7, 65, 2, 2, 455, 457, 5, 68, 35, 2, 456, 455, 3, 2, 2, 2, 456, 457, 3, 2, 2, 2, 457, 458, 3, 2, 2, 2, 458, 479, 7, 10, 2, 2, 459, 460, 7, 66, 2, 2, 460, 479, 7, 10, 2, 2, 461, 462, 7, 67, 2, 2, 462, 479, 7, 10, 2, 2, 463, 465, 7, 69, 2, 2, 464, 466, 5, 76, 39, 2, 465, 464, 3, 2, 2, 2, 465, 466, 3, 2, 2, 2, 466, 467, 3, 2, 2, 2, 467, 468, 7, 4, 2, 2, 468, 469, 5, 80, 41, 2, 469, 470, 7, 135, 2, 2, 470, 479, 3, 2, 2, 2, 471, 479, 5, 74, 38, 2, 472, 479, 7, 10, 2, 2, 473, 474, 7, 110, 2, 2, 474, 479, 7, 11, 2, 2, 475, 476, 7, 68, 2, 2, 476, 477, 7, 110, 2, 2, 477, 479, 7, 10, 2, 2, 478, 388, 3, 2, 2, 2, 478, 391, 3, 2, 2, 2, 478, 396, 3, 2, 2, 2, 478, 399, 3, 2, 2, 2, 478, 411, 3, 2, 2, 2, 478, 423, 3, 2, 2, 2, 478, 437, 3, 2, 2, 2, 478, 446, 3, 2, 2, 2, 478, 454, 3, 2, 2, 2, 478, 459, 3, 2, 2, 2, 478, 461, 3, 2, 2, 2, 478, 463, 3, 2, 2, 2, 478, 471, 3, 2, 2, 2, 478, 472, 3, 2, 2, 2, 478, 473, 3, 2, 2, 2, 478, 475, 3, 2, 2, 2, 479, 57, 3, 2, 2, 2, 480, 482, 5, 60, 31, 2, 481, 480, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 481, 3, 2, 2, 2, 483, 484, 3, 2, 2, 2, 484, 490, 3, 2, 2, 2, 485, 486, 7, 70, 2, 2, 486, 488, 7, 11, 2, 2, 487, 489, 5, 54, 28, 2, 488, 487, 3, 2, 2, 2, 488, 489, 3, 2, 2, 2, 489, 491, 3, 2, 2, 2, 490, 485, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 59, 3, 2, 2, 2, 492, 493, 7, 71, 2, 2, 493, 494, 5, 70, 36, 2, 494, 496, 7, 11, 2, 2, 495, 497, 5, 54, 28, 2, 496, 495, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 61, 3, 2, 2, 2, 498, 499, 5, 64, 33, 2, 499, 501, 7, 10, 2, 2, 500, 502, 5, 66, 34, 2, 501, 500, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 503, 3, 2, 2, 2, 503, 505, 7, 10, 2, 2, 504, 506, 5, 68, 35, 2, 505, 504, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 515, 3, 2, 2, 2, 507, 508, 5, 18, 10, 2, 508, 509, 5, 24, 13, 2, 509, 510, 7, 11, 2, 2, 510, 511, 5, 70, 36, 2, 511, 512, 7, 13, 2, 2, 512, 513, 5, 70, 36, 2, 513, 515, 3, 2, 2, 2, 514, 498, 3, 2, 2, 2, 514, 507, 3, 2, 2, 2, 515, 63, 3, 2, 2, 2, 516, 518, 5, 10, 6, 2, 517, 516, 3, 2, 2, 2, 517, 518, 3, 2, 2, 2, 518, 521, 3, 2, 2, 2, 519, 521, 5, 68, 35, 2, 520, 517, 3, 2, 2, 2, 520, 519, 3, 2, 2, 2, 521, 65, 3, 2, 2, 2, 522, 523, 5, 68, 35, 2, 523, 67, 3, 2, 2, 2, 524, 525, 8, 35, 1, 2, 525, 526, 5, 70, 36, 2, 526, 532, 3, 2, 2, 2, 527, 528, 12, 3, 2, 2, 528, 529, 7, 12, 2, 2, 529, 531, 5, 70, 36, 2, 530, 527, 3, 2, 2, 2, 531, 534, 3, 2, 2, 2, 532, 530, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 69, 3, 2, 2, 2, 534, 532, 3, 2, 2, 2, 535, 536, 8, 36, 1, 2, 536, 537, 7, 8, 2, 2, 537, 538, 5, 68, 35, 2, 538, 539, 7, 9, 2, 2, 539, 597, 3, 2, 2, 2, 540, 541, 7, 75, 2, 2, 541, 542, 7, 8, 2, 2, 542, 543, 5, 20, 11, 2, 543, 544, 7, 9, 2, 2, 544, 597, 3, 2, 2, 2, 545, 546, 7, 75, 2, 2, 546, 597, 5, 70, 36, 30, 547, 548, 7, 76, 2, 2, 548, 549, 7, 8, 2, 2, 549, 550, 5, 20, 11, 2, 550, 551, 7, 9, 2, 2, 551, 597, 3, 2, 2, 2, 552, 553, 7, 76, 2, 2, 553, 597, 5, 70, 36, 28, 554, 556, 7, 77, 2, 2, 555, 557, 7, 8, 2, 2, 556, 555, 3, 2, 2, 2, 556, 557, 3, 2, 2, 2, 557, 558, 3, 2, 2, 2, 558, 560, 7, 110, 2, 2, 559, 561, 7, 9, 2, 2, 560, 559, 3, 2, 2, 2, 560, 561, 3, 2, 2, 2, 561, 597, 3, 2, 2, 2, 562, 563, 7, 8, 2, 2, 563, 564, 5, 20, 11, 2, 564, 565, 7, 9, 2, 2, 565, 566, 5, 70, 36, 25, 566, 597, 3, 2, 2, 2, 567, 568, 9, 3, 2, 2, 568, 597, 5, 70, 36, 24, 569, 570, 7, 20, 2, 2, 570, 597, 5, 70, 36, 22, 571, 572, 9, 4, 2, 2, 572, 597, 5, 70, 36, 21, 573, 574, 7, 4, 2, 2, 574, 579, 5, 70, 36, 2, 575, 576, 7, 12, 2, 2, 576, 578, 5, 70, 36, 2, 577, 575, 3, 2, 2, 2, 578, 581, 3, 2, 2, 2, 579, 577, 3, 2, 2, 2, 579, 580, 3, 2, 2, 2, 580, 583, 3, 2, 2, 2, 581, 579, 3, 2, 2, 2, 582, 584, 7, 12, 2, 2, 583, 582, 3, 2, 2, 2, 583, 584, 3, 2, 2, 2, 584, 585, 3, 2, 2, 2, 585, 586, 7, 5, 2, 2, 586, 597, 3, 2, 2, 2, 587, 597, 7, 110, 2, 2, 588, 597, 7, 101, 2, 2, 589, 591, 7, 111, 2, 2, 590, 589, 3, 2, 2, 2, 591, 592, 3, 2, 2, 2, 592, 590, 3, 2, 2, 2, 592, 593, 3, 2, 2, 2, 593, 597, 3, 2, 2, 2, 594, 597, 7, 112, 2, 2, 595, 597, 7, 86, 2, 2, 596, 535, 3, 2, 2, 2, 596, 540, 3, 2, 2, 2, 596, 545, 3, 2, 2, 2, 596, 547, 3, 2, 2, 2, 596, 552, 3, 2, 2, 2, 596, 554, 3, 2, 2, 2, 596, 562, 3, 2, 2, 2, 596, 567, 3, 2, 2, 2, 596, 569, 3, 2, 2, 2, 596, 571, 3, 2, 2, 2, 596, 573, 3, 2, 2, 2, 596, 587, 3, 2, 2, 2, 596, 588, 3, 2, 2, 2, 596, 590, 3, 2, 2, 2, 596, 594, 3, 2, 2, 2, 596, 595, 3, 2, 2, 2, 597, 658, 3, 2, 2, 2, 598, 599, 12, 20, 2, 2, 599, 600, 9, 5, 2, 2, 600, 657, 5, 70, 36, 21, 601, 602, 12, 19, 2, 2, 602, 603, 9, 6, 2, 2, 603, 657, 5, 70, 36, 20, 604, 605, 12, 18, 2, 2, 605, 606, 9, 7, 2, 2, 606, 657, 5, 70, 36, 19, 607, 608, 12, 17, 2, 2, 608, 609, 9, 8, 2, 2, 609, 657, 5, 70, 36, 18, 610, 611, 12, 16, 2, 2, 611, 612, 7, 25, 2, 2, 612, 657, 5, 70, 36, 17, 613, 614, 12, 15, 2, 2, 614, 615, 7, 27, 2, 2, 615, 657, 5, 70, 36, 16, 616, 617, 12, 14, 2, 2, 617, 618, 7, 28, 2, 2, 618, 657, 5, 70, 36, 15, 619, 620, 12, 13, 2, 2, 620, 621, 7, 37, 2, 2, 621, 657, 5, 70, 36, 14, 622, 623, 12, 12, 2, 2, 623, 624, 7, 38, 2, 2, 624, 657, 5, 70, 36, 13, 625, 626, 12, 11, 2, 2, 626, 627, 7, 15, 2, 2, 627, 628, 5, 70, 36, 2, 628, 629, 7, 11, 2, 2, 629, 630, 5, 70, 36, 12, 630, 657, 3, 2, 2, 2, 631, 632, 12, 10, 2, 2, 632, 633, 7, 39, 2, 2, 633, 657, 5, 70, 36, 10, 634, 635, 12, 9, 2, 2, 635, 636, 7, 40, 2, 2, 636, 657, 5, 70, 36, 9, 637, 638, 12, 34, 2, 2, 638, 639, 7, 16, 2, 2, 639, 657, 7, 110, 2, 2, 640, 641, 12, 33, 2, 2, 641, 642, 7, 17, 2, 2, 642, 657, 7, 110, 2, 2, 643, 644, 12, 32, 2, 2, 644, 646, 7, 8, 2, 2, 645, 647, 5, 72, 37, 2, 646, 645, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 648, 3, 2, 2, 2, 648, 657, 7, 9, 2, 2, 649, 650, 12, 26, 2, 2, 650, 651, 7, 6, 2, 2, 651, 652, 5, 68, 35, 2, 652, 653, 7, 7, 2, 2, 653, 657, 3, 2, 2, 2, 654, 655, 12, 23, 2, 2, 655, 657, 9, 3, 2, 2, 656, 598, 3, 2, 2, 2, 656, 601, 3, 2, 2, 2, 656, 604, 3, 2, 2, 2, 656, 607, 3, 2, 2, 2, 656, 610, 3, 2, 2, 2, 656, 613, 3, 2, 2, 2, 656, 616, 3, 2, 2, 2, 656, 619, 3, 2, 2, 2, 656, 622, 3, 2, 2, 2, 656, 625, 3, 2, 2, 2, 656, 631, 3, 2, 2, 2, 656, 634, 3, 2, 2, 2, 656, 637, 3, 2, 2, 2, 656, 640, 3, 2, 2, 2, 656, 643, 3, 2, 2, 2, 656, 649, 3, 2, 2, 2, 656, 654, 3, 2, 2, 2, 657, 660, 3, 2, 2, 2, 658, 656, 3, 2, 2, 2, 658, 659, 3, 2, 2, 2, 659, 71, 3, 2, 2, 2, 660, 658, 3, 2, 2, 2, 661, 666, 5, 70, 36, 2, 662, 663, 7, 12, 2, 2, 663, 665, 5, 70, 36, 2, 664, 662, 3, 2, 2, 2, 665, 668, 3, 2, 2, 2, 666, 664, 3, 2, 2, 2, 666, 667, 3, 2, 2, 2, 667, 73, 3, 2, 2, 2, 668, 666, 3, 2, 2, 2, 669, 671, 7, 78, 2, 2, 670, 672, 5, 76, 39, 2, 671, 670, 3, 2, 2, 2, 671, 672, 3, 2, 2, 2, 672, 673, 3, 2, 2, 2, 673, 674, 7, 87, 2, 2, 674, 75, 3, 2, 2, 2, 675, 676, 7, 8, 2, 2, 676, 681, 5, 78, 40, 2, 677, 678, 7, 12, 2, 2, 678, 680, 5, 78, 40, 2, 679, 677, 3, 2, 2, 2, 680, 683, 3, 2, 2, 2, 681, 679, 3, 2, 2, 2, 681, 682, 3, 2, 2, 2, 682, 684, 3, 2, 2, 2, 683, 681, 3, 2, 2, 2, 684, 685, 7, 9, 2, 2, 685, 77, 3, 2, 2, 2, 686, 687, 7, 79, 2, 2, 687, 697, 7, 111, 2, 2, 688, 689, 7, 80, 2, 2, 689, 697, 7, 110, 2, 2, 690, 691, 7, 81, 2, 2, 691, 697, 7, 111, 2, 2, 692, 693, 7, 82, 2, 2, 693, 697, 5, 70, 36, 2, 694, 695, 7, 83, 2, 2, 695, 697, 5, 70, 36, 2, 696, 686, 3, 2, 2, 2, 696, 688, 3, 2, 2, 2, 696, 690, 3, 2, 2, 2, 696, 692, 3, 2, 2, 2, 696, 694, 3, 2, 2, 2, 697, 79, 3, 2, 2, 2, 698, 700, 5, 82, 42, 2, 699, 698, 3, 2, 2, 2, 700, 703, 3, 2, 2, 2, 701, 699, 3, 2, 2, 2, 701, 702, 3, 2, 2, 2, 702, 81, 3, 2, 2, 2, 703, 701, 3, 2, 2, 2, 704, 708, 5, 84, 43, 2, 705, 708, 5, 86, 44, 2, 706, 708, 5, 88, 45, 2, 707, 704, 3, 2, 2, 2, 707, 705, 3, 2, 2, 2, 707, 706, 3, 2, 2, 2, 708, 83, 3, 2, 2, 2, 709, 710, 7, 148, 2, 2, 710, 714, 7, 119, 2, 2, 711, 713, 7, 149, 2, 2, 712, 711, 3, 2, 2, 2, 713, 716, 3, 2, 2, 2, 714, 712, 3, 2, 2, 2, 714, 715, 3, 2, 2, 2, 715, 736, 3, 2, 2, 2, 716, 714, 3, 2, 2, 2, 717, 718, 7, 134, 2, 2, 718, 719, 7, 148, 2, 2, 719, 720, 7, 135, 2, 2, 720, 724, 7, 119, 2, 2, 721, 723, 7, 149, 2, 2, 722, 721, 3, 2, 2, 2, 723, 726, 3, 2, 2, 2, 724, 722, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 725, 736, 3, 2, 2, 2, 726, 724, 3, 2, 2, 2, 727, 728, 7, 147, 2, 2, 728, 732, 7, 119, 2, 2, 729, 731, 7, 149, 2, 2, 730, 729, 3, 2, 2, 2, 731, 734, 3, 2, 2, 2, 732, 730, 3, 2, 2, 2, 732, 733, 3, 2, 2, 2, 733, 736, 3, 2, 2, 2, 734, 732, 3, 2, 2, 2, 735, 709, 3, 2, 2, 2, 735, 717, 3, 2, 2, 2, 735, 727, 3, 2, 2, 2, 736, 85, 3, 2, 2, 2, 737, 739, 7, 117, 2, 2, 738, 740, 5, 90, 46, 2, 739, 738, 3, 2, 2, 2, 739, 740, 3, 2, 2, 2, 740, 744, 3, 2, 2, 2, 741, 743, 7, 149, 2, 2, 742, 741, 3, 2, 2, 2, 743, 746, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 744, 745, 3, 2, 2, 2, 745, 87, 3, 2, 2, 2, 746, 744, 3, 2, 2, 2, 747, 748, 7, 116, 2, 2, 748, 753, 5, 92, 47, 2, 749, 750, 7, 120, 2, 2, 750, 752, 5, 92, 47, 2, 751, 749, 3, 2, 2, 2, 752, 755, 3, 2, 2, 2, 753, 751, 3, 2, 2, 2, 753, 754, 3, 2, 2, 2, 754, 759, 3, 2, 2, 2, 755, 753, 3, 2, 2, 2, 756, 758, 7, 149, 2, 2, 757, 756, 3, 2, 2, 2, 758, 761, 3, 2, 2, 2, 759, 757, 3, 2, 2, 2, 759, 760, 3, 2, 2, 2, 760, 89, 3, 2, 2, 2, 761, 759, 3, 2, 2, 2, 762, 808, 5, 92, 47, 2, 763, 764, 7, 118, 2, 2, 764, 808, 5, 92, 47, 2, 765, 766, 5, 92, 47, 2, 766, 767, 7, 120, 2, 2, 767, 768, 5, 92, 47, 2, 768, 808, 3, 2, 2, 2, 769, 770, 7, 121, 2, 2, 770, 771, 5, 92, 47, 2, 771, 772, 7, 122, 2, 2, 772, 773, 7, 120, 2, 2, 773, 774, 7, 148, 2, 2, 774, 808, 3, 2, 2, 2, 775, 776, 7, 121, 2, 2, 776, 777, 7, 121, 2, 2, 777, 778, 5, 92, 47, 2, 778, 779, 7, 122, 2, 2, 779, 780, 7, 122, 2, 2, 780, 781, 7, 120, 2, 2, 781, 782, 7, 148, 2, 2, 782, 808, 3, 2, 2, 2, 783, 784, 7, 121, 2, 2, 784, 785, 5, 92, 47, 2, 785, 786, 7, 120, 2, 2, 786, 787, 7, 148, 2, 2, 787, 788, 7, 122, 2, 2, 788, 789, 7, 120, 2, 2, 789, 790, 7, 148, 2, 2, 790, 808, 3, 2, 2, 2, 791, 792, 7, 121, 2, 2, 792, 793, 5, 92, 47, 2, 793, 794, 7, 120, 2, 2, 794, 795, 7, 148, 2, 2, 795, 796, 7, 122, 2, 2, 796, 808, 3, 2, 2, 2, 797, 798, 7, 121, 2, 2, 798, 799, 5, 92, 47, 2, 799, 800, 7, 122, 2, 2, 800, 808, 3, 2, 2, 2, 801, 802, 7, 121, 2, 2, 802, 803, 7, 121, 2, 2, 803, 804, 5, 92, 47, 2, 804, 805, 7, 122, 2, 2, 805, 806, 7, 122, 2, 2, 806, 808, 3, 2, 2, 2, 807, 762, 3, 2, 2, 2, 807, 763, 3, 2, 2, 2, 807, 765, 3, 2, 2, 2, 807, 769, 3, 2, 2, 2, 807, 775, 3, 2, 2, 2, 807, 783, 3, 2, 2, 2, 807, 791, 3, 2, 2, 2, 807, 797, 3, 2, 2, 2, 807, 801, 3, 2, 2, 2, 808, 91, 3, 2, 2, 2, 809, 810, 8, 47, 1, 2, 810, 811, 7, 123, 2, 2, 811, 812, 5, 92, 47, 2, 812, 813, 7, 124, 2, 2, 813, 824, 3, 2, 2, 2, 814, 815, 9, 9, 2, 2, 815, 824, 5, 92, 47, 10, 816, 824, 7, 148, 2, 2, 817, 824, 7, 146, 2, 2, 818, 819, 7, 134, 2, 2, 819, 820, 7, 148, 2, 2, 820, 824, 7, 135, 2, 2, 821, 824, 7, 136, 2, 2, 822, 824, 7, 145, 2, 2, 823, 809, 3, 2, 2, 2, 823, 814, 3, 2, 2, 2, 823, 816, 3, 2, 2, 2, 823, 817, 3, 2, 2, 2, 823, 818, 3, 2, 2, 2, 823, 821, 3, 2, 2, 2, 823, 822, 3, 2, 2, 2, 824, 839, 3, 2, 2, 2, 825, 826, 12, 12, 2, 2, 826, 827, 7, 125, 2, 2, 827, 838, 5, 92, 47, 13, 828, 829, 12, 11, 2, 2, 829, 830, 9, 10, 2, 2, 830, 838, 5, 92, 47, 12, 831, 832, 12, 9, 2, 2, 832, 833, 9, 11, 2, 2, 833, 838, 5, 92, 47, 10, 834, 835, 12, 8, 2, 2, 835, 836, 9, 12, 2, 2, 836, 838, 5, 92, 47, 9, 837, 825, 3, 2, 2, 2, 837, 828, 3, 2, 2, 2, 837, 831, 3, 2, 2, 2, 837, 834, 3, 2, 2, 2, 838, 841, 3, 2, 2, 2, 839, 837, 3, 2, 2, 2, 839, 840, 3, 2, 2, 2, 840, 93, 3, 2, 2, 2, 841, 839, 3, 2, 2, 2, 83, 103, 120, 133, 139, 145, 155, 162, 173, 181, 186, 192, 195, 197, 207, 215, 220, 226, 229, 231, 237, 244, 251, 257, 269, 283, 289, 295, 304, 312, 322, 334, 345, 366, 375, 381, 386, 393, 406, 411, 423, 437, 456, 465, 478, 483, 488, 490, 496, 501, 505, 514, 517, 520, 532, 556, 560, 579, 583, 592, 596, 646, 656, 658, 666, 671, 681, 696, 701, 707, 714, 724, 732, 735, 739, 744, 753, 759, 807, 823, 837, 839] \ No newline at end of file diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java index 439f69cc1..2e1bebebc 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParser.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParser.java @@ -4485,77 +4485,11 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprPreModContext extends ExprContext { - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); - } - public TerminalNode DEC() { return getToken(KickCParser.DEC, 0); } - public TerminalNode INC() { return getToken(KickCParser.INC, 0); } - public ExprPreModContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprPreMod(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprPreMod(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprPreMod(this); - else return visitor.visitChildren(this); - } - } - public static class ExprBinaryContext extends ExprContext { - public List expr() { - return getRuleContexts(ExprContext.class); - } - public ExprContext expr(int i) { - return getRuleContext(ExprContext.class,i); - } - public TerminalNode SHIFT_LEFT() { return getToken(KickCParser.SHIFT_LEFT, 0); } - public TerminalNode SHIFT_RIGHT() { return getToken(KickCParser.SHIFT_RIGHT, 0); } - public TerminalNode ASTERISK() { return getToken(KickCParser.ASTERISK, 0); } - public TerminalNode DIVIDE() { return getToken(KickCParser.DIVIDE, 0); } - public TerminalNode MODULO() { return getToken(KickCParser.MODULO, 0); } - public TerminalNode PLUS() { return getToken(KickCParser.PLUS, 0); } - public TerminalNode MINUS() { return getToken(KickCParser.MINUS, 0); } - public TerminalNode EQUAL() { return getToken(KickCParser.EQUAL, 0); } - public TerminalNode NOT_EQUAL() { return getToken(KickCParser.NOT_EQUAL, 0); } - public TerminalNode LESS_THAN() { return getToken(KickCParser.LESS_THAN, 0); } - public TerminalNode LESS_THAN_EQUAL() { return getToken(KickCParser.LESS_THAN_EQUAL, 0); } - public TerminalNode GREATER_THAN_EQUAL() { return getToken(KickCParser.GREATER_THAN_EQUAL, 0); } - public TerminalNode GREATER_THAN() { return getToken(KickCParser.GREATER_THAN, 0); } - public TerminalNode AND() { return getToken(KickCParser.AND, 0); } - public TerminalNode BIT_XOR() { return getToken(KickCParser.BIT_XOR, 0); } - public TerminalNode BIT_OR() { return getToken(KickCParser.BIT_OR, 0); } - public TerminalNode LOGIC_AND() { return getToken(KickCParser.LOGIC_AND, 0); } - public TerminalNode LOGIC_OR() { return getToken(KickCParser.LOGIC_OR, 0); } - public ExprBinaryContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprBinary(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprBinary(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprBinary(this); - else return visitor.visitChildren(this); - } - } public static class ExprTypeIdContext extends ExprContext { public TerminalNode TYPEID() { return getToken(KickCParser.TYPEID, 0); } public ExprContext expr() { return getRuleContext(ExprContext.class,0); } - public TypeNameContext typeName() { - return getRuleContext(TypeNameContext.class,0); - } - public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } - public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } public ExprTypeIdContext(ExprContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -4633,23 +4567,6 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprCharContext extends ExprContext { - public TerminalNode CHAR() { return getToken(KickCParser.CHAR, 0); } - public ExprCharContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprChar(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprChar(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprChar(this); - else return visitor.visitChildren(this); - } - } public static class ExprArrowContext extends ExprContext { public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -4671,6 +4588,215 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } + public static class ExprCastContext extends ExprContext { + public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public ExprCastContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprCast(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprCast(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprCast(this); + else return visitor.visitChildren(this); + } + } + public static class ExprParContext extends ExprContext { + public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } + public CommaExprContext commaExpr() { + return getRuleContext(CommaExprContext.class,0); + } + public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } + public ExprParContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprPar(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprPar(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprPar(this); + else return visitor.visitChildren(this); + } + } + public static class ExprIdContext extends ExprContext { + public TerminalNode NAME() { return getToken(KickCParser.NAME, 0); } + public ExprIdContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprId(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprId(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprId(this); + else return visitor.visitChildren(this); + } + } + public static class ExprTernaryContext extends ExprContext { + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public TerminalNode CONDITION() { return getToken(KickCParser.CONDITION, 0); } + public TerminalNode COLON() { return getToken(KickCParser.COLON, 0); } + public ExprTernaryContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprTernary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprTernary(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprTernary(this); + else return visitor.visitChildren(this); + } + } + public static class ExprAssignmentContext extends ExprContext { + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public TerminalNode ASSIGN() { return getToken(KickCParser.ASSIGN, 0); } + public ExprAssignmentContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprAssignment(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprAssignment(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprAssignment(this); + else return visitor.visitChildren(this); + } + } + public static class ExprPreModContext extends ExprContext { + public ExprContext expr() { + return getRuleContext(ExprContext.class,0); + } + public TerminalNode DEC() { return getToken(KickCParser.DEC, 0); } + public TerminalNode INC() { return getToken(KickCParser.INC, 0); } + public ExprPreModContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprPreMod(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprPreMod(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprPreMod(this); + else return visitor.visitChildren(this); + } + } + public static class ExprBinaryContext extends ExprContext { + public List expr() { + return getRuleContexts(ExprContext.class); + } + public ExprContext expr(int i) { + return getRuleContext(ExprContext.class,i); + } + public TerminalNode SHIFT_LEFT() { return getToken(KickCParser.SHIFT_LEFT, 0); } + public TerminalNode SHIFT_RIGHT() { return getToken(KickCParser.SHIFT_RIGHT, 0); } + public TerminalNode ASTERISK() { return getToken(KickCParser.ASTERISK, 0); } + public TerminalNode DIVIDE() { return getToken(KickCParser.DIVIDE, 0); } + public TerminalNode MODULO() { return getToken(KickCParser.MODULO, 0); } + public TerminalNode PLUS() { return getToken(KickCParser.PLUS, 0); } + public TerminalNode MINUS() { return getToken(KickCParser.MINUS, 0); } + public TerminalNode EQUAL() { return getToken(KickCParser.EQUAL, 0); } + public TerminalNode NOT_EQUAL() { return getToken(KickCParser.NOT_EQUAL, 0); } + public TerminalNode LESS_THAN() { return getToken(KickCParser.LESS_THAN, 0); } + public TerminalNode LESS_THAN_EQUAL() { return getToken(KickCParser.LESS_THAN_EQUAL, 0); } + public TerminalNode GREATER_THAN_EQUAL() { return getToken(KickCParser.GREATER_THAN_EQUAL, 0); } + public TerminalNode GREATER_THAN() { return getToken(KickCParser.GREATER_THAN, 0); } + public TerminalNode AND() { return getToken(KickCParser.AND, 0); } + public TerminalNode BIT_XOR() { return getToken(KickCParser.BIT_XOR, 0); } + public TerminalNode BIT_OR() { return getToken(KickCParser.BIT_OR, 0); } + public TerminalNode LOGIC_AND() { return getToken(KickCParser.LOGIC_AND, 0); } + public TerminalNode LOGIC_OR() { return getToken(KickCParser.LOGIC_OR, 0); } + public ExprBinaryContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprBinary(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprBinary(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprBinary(this); + else return visitor.visitChildren(this); + } + } + public static class ExprTypeIdTypeContext extends ExprContext { + public TerminalNode TYPEID() { return getToken(KickCParser.TYPEID, 0); } + public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } + public ExprTypeIdTypeContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprTypeIdType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprTypeIdType(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprTypeIdType(this); + else return visitor.visitChildren(this); + } + } + public static class ExprCharContext extends ExprContext { + public TerminalNode CHAR() { return getToken(KickCParser.CHAR, 0); } + public ExprCharContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprChar(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprChar(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprChar(this); + else return visitor.visitChildren(this); + } + } public static class ExprDotContext extends ExprContext { public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -4692,6 +4818,28 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } + public static class ExprSizeOfTypeContext extends ExprContext { + public TerminalNode SIZEOF() { return getToken(KickCParser.SIZEOF, 0); } + public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } + public TypeNameContext typeName() { + return getRuleContext(TypeNameContext.class,0); + } + public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } + public ExprSizeOfTypeContext(ExprContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprSizeOfType(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprSizeOfType(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprSizeOfType(this); + else return visitor.visitChildren(this); + } + } public static class InitListContext extends ExprContext { public TerminalNode CURLY_BEGIN() { return getToken(KickCParser.CURLY_BEGIN, 0); } public List expr() { @@ -4720,30 +4868,6 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprCastContext extends ExprContext { - public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } - public TypeNameContext typeName() { - return getRuleContext(TypeNameContext.class,0); - } - public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } - public ExprContext expr() { - return getRuleContext(ExprContext.class,0); - } - public ExprCastContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprCast(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprCast(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprCast(this); - else return visitor.visitChildren(this); - } - } public static class ExprCallContext extends ExprContext { public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -4768,37 +4892,11 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprParContext extends ExprContext { - public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } - public CommaExprContext commaExpr() { - return getRuleContext(CommaExprContext.class,0); - } - public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } - public ExprParContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprPar(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprPar(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprPar(this); - else return visitor.visitChildren(this); - } - } public static class ExprSizeOfContext extends ExprContext { public TerminalNode SIZEOF() { return getToken(KickCParser.SIZEOF, 0); } public ExprContext expr() { return getRuleContext(ExprContext.class,0); } - public TypeNameContext typeName() { - return getRuleContext(TypeNameContext.class,0); - } - public TerminalNode PAR_BEGIN() { return getToken(KickCParser.PAR_BEGIN, 0); } - public TerminalNode PAR_END() { return getToken(KickCParser.PAR_END, 0); } public ExprSizeOfContext(ExprContext ctx) { copyFrom(ctx); } @Override public void enterRule(ParseTreeListener listener) { @@ -4874,23 +4972,6 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprIdContext extends ExprContext { - public TerminalNode NAME() { return getToken(KickCParser.NAME, 0); } - public ExprIdContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprId(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprId(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprId(this); - else return visitor.visitChildren(this); - } - } public static class ExprDefinedContext extends ExprContext { public TerminalNode DEFINED() { return getToken(KickCParser.DEFINED, 0); } public TerminalNode NAME() { return getToken(KickCParser.NAME, 0); } @@ -4911,53 +4992,6 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } - public static class ExprTernaryContext extends ExprContext { - public List expr() { - return getRuleContexts(ExprContext.class); - } - public ExprContext expr(int i) { - return getRuleContext(ExprContext.class,i); - } - public TerminalNode CONDITION() { return getToken(KickCParser.CONDITION, 0); } - public TerminalNode COLON() { return getToken(KickCParser.COLON, 0); } - public ExprTernaryContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprTernary(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprTernary(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprTernary(this); - else return visitor.visitChildren(this); - } - } - public static class ExprAssignmentContext extends ExprContext { - public List expr() { - return getRuleContexts(ExprContext.class); - } - public ExprContext expr(int i) { - return getRuleContext(ExprContext.class,i); - } - public TerminalNode ASSIGN() { return getToken(KickCParser.ASSIGN, 0); } - public ExprAssignmentContext(ExprContext ctx) { copyFrom(ctx); } - @Override - public void enterRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterExprAssignment(this); - } - @Override - public void exitRule(ParseTreeListener listener) { - if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitExprAssignment(this); - } - @Override - public T accept(ParseTreeVisitor visitor) { - if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitExprAssignment(this); - else return visitor.visitChildren(this); - } - } public static class ExprArrayContext extends ExprContext { public ExprContext expr() { return getRuleContext(ExprContext.class,0); @@ -4999,9 +5033,9 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(602); + setState(594); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { case 1: { _localctx = new ExprParContext(_localctx); @@ -5018,131 +5052,78 @@ public class KickCParser extends Parser { break; case 2: { - _localctx = new ExprSizeOfContext(_localctx); + _localctx = new ExprSizeOfTypeContext(_localctx); _ctx = _localctx; _prevctx = _localctx; setState(538); match(SIZEOF); + setState(539); + match(PAR_BEGIN); setState(540); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,54,_ctx) ) { - case 1: - { - setState(539); - match(PAR_BEGIN); - } - break; - } - setState(544); - _errHandler.sync(this); - switch (_input.LA(1)) { - case CURLY_BEGIN: - case PAR_BEGIN: - case PLUS: - case MINUS: - case ASTERISK: - case INC: - case DEC: - case AND: - case BIT_NOT: - case SIZEOF: - case TYPEID: - case DEFINED: - case LOGIC_NOT: - case BOOLEAN: - case NUMBER: - case NAME: - case STRING: - case CHAR: - { - setState(542); - expr(0); - } - break; - case TYPEDEFNAME: - case STRUCT: - case UNION: - case ENUM: - case SIMPLETYPE: - { - setState(543); - typeName(); - } - break; - default: - throw new NoViableAltException(this); - } - setState(547); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,56,_ctx) ) { - case 1: - { - setState(546); - match(PAR_END); - } - break; - } + typeName(); + setState(541); + match(PAR_END); } break; case 3: + { + _localctx = new ExprSizeOfContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(543); + match(SIZEOF); + setState(544); + expr(28); + } + break; + case 4: + { + _localctx = new ExprTypeIdTypeContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(545); + match(TYPEID); + setState(546); + match(PAR_BEGIN); + setState(547); + typeName(); + setState(548); + match(PAR_END); + } + break; + case 5: { _localctx = new ExprTypeIdContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(549); + setState(550); match(TYPEID); setState(551); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) { - case 1: - { - setState(550); - match(PAR_BEGIN); - } - break; + expr(26); } - setState(555); + break; + case 6: + { + _localctx = new ExprDefinedContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(552); + match(DEFINED); + setState(554); _errHandler.sync(this); - switch (_input.LA(1)) { - case CURLY_BEGIN: - case PAR_BEGIN: - case PLUS: - case MINUS: - case ASTERISK: - case INC: - case DEC: - case AND: - case BIT_NOT: - case SIZEOF: - case TYPEID: - case DEFINED: - case LOGIC_NOT: - case BOOLEAN: - case NUMBER: - case NAME: - case STRING: - case CHAR: + _la = _input.LA(1); + if (_la==PAR_BEGIN) { { setState(553); - expr(0); + match(PAR_BEGIN); } - break; - case TYPEDEFNAME: - case STRUCT: - case UNION: - case ENUM: - case SIMPLETYPE: - { - setState(554); - typeName(); - } - break; - default: - throw new NoViableAltException(this); } + + setState(556); + match(NAME); setState(558); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,59,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,55,_ctx) ) { case 1: { setState(557); @@ -5152,58 +5133,27 @@ public class KickCParser extends Parser { } } break; - case 4: - { - _localctx = new ExprDefinedContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(560); - match(DEFINED); - setState(562); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==PAR_BEGIN) { - { - setState(561); - match(PAR_BEGIN); - } - } - - setState(564); - match(NAME); - setState(566); - _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { - case 1: - { - setState(565); - match(PAR_END); - } - break; - } - } - break; - case 5: + case 7: { _localctx = new ExprCastContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(568); + setState(560); match(PAR_BEGIN); - setState(569); + setState(561); typeName(); - setState(570); + setState(562); match(PAR_END); - setState(571); + setState(563); expr(23); } break; - case 6: + case 8: { _localctx = new ExprPreModContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(573); + setState(565); _la = _input.LA(1); if ( !(_la==INC || _la==DEC) ) { _errHandler.recoverInline(this); @@ -5213,27 +5163,27 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(574); + setState(566); expr(22); } break; - case 7: + case 9: { _localctx = new ExprPtrContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(575); + setState(567); match(ASTERISK); - setState(576); + setState(568); expr(20); } break; - case 8: + case 10: { _localctx = new ExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(577); + setState(569); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << PLUS) | (1L << MINUS) | (1L << AND) | (1L << BIT_NOT))) != 0) || _la==LOGIC_NOT) ) { _errHandler.recoverInline(this); @@ -5243,75 +5193,75 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(578); + setState(570); expr(19); } break; - case 9: - { - _localctx = new InitListContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(579); - match(CURLY_BEGIN); - setState(580); - expr(0); - setState(585); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); - while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { - if ( _alt==1 ) { - { - { - setState(581); - match(COMMA); - setState(582); - expr(0); - } - } - } - setState(587); - _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,62,_ctx); - } - setState(589); - _errHandler.sync(this); - _la = _input.LA(1); - if (_la==COMMA) { - { - setState(588); - match(COMMA); - } - } - - setState(591); - match(CURLY_END); - } - break; - case 10: - { - _localctx = new ExprIdContext(_localctx); - _ctx = _localctx; - _prevctx = _localctx; - setState(593); - match(NAME); - } - break; case 11: { - _localctx = new ExprNumberContext(_localctx); + _localctx = new InitListContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(594); - match(NUMBER); + setState(571); + match(CURLY_BEGIN); + setState(572); + expr(0); + setState(577); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(573); + match(COMMA); + setState(574); + expr(0); + } + } + } + setState(579); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,56,_ctx); + } + setState(581); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==COMMA) { + { + setState(580); + match(COMMA); + } + } + + setState(583); + match(CURLY_END); } break; case 12: + { + _localctx = new ExprIdContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(585); + match(NAME); + } + break; + case 13: + { + _localctx = new ExprNumberContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(586); + match(NUMBER); + } + break; + case 14: { _localctx = new ExprStringContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(596); + setState(588); _errHandler.sync(this); _alt = 1; do { @@ -5319,7 +5269,7 @@ public class KickCParser extends Parser { case 1: { { - setState(595); + setState(587); match(STRING); } } @@ -5327,50 +5277,50 @@ public class KickCParser extends Parser { default: throw new NoViableAltException(this); } - setState(598); + setState(590); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,64,_ctx); + _alt = getInterpreter().adaptivePredict(_input,58,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } break; - case 13: + case 15: { _localctx = new ExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(600); + setState(592); match(CHAR); } break; - case 14: + case 16: { _localctx = new ExprBoolContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(601); + setState(593); match(BOOLEAN); } break; } _ctx.stop = _input.LT(-1); - setState(664); + setState(656); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,68,_ctx); + _alt = getInterpreter().adaptivePredict(_input,62,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(662); + setState(654); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,67,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,61,_ctx) ) { case 1: { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(604); + setState(596); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); - setState(605); + setState(597); _la = _input.LA(1); if ( !(_la==SHIFT_LEFT || _la==SHIFT_RIGHT) ) { _errHandler.recoverInline(this); @@ -5380,7 +5330,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(606); + setState(598); expr(19); } break; @@ -5388,9 +5338,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(607); + setState(599); if (!(precpred(_ctx, 17))) throw new FailedPredicateException(this, "precpred(_ctx, 17)"); - setState(608); + setState(600); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASTERISK) | (1L << DIVIDE) | (1L << MODULO))) != 0)) ) { _errHandler.recoverInline(this); @@ -5400,7 +5350,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(609); + setState(601); expr(18); } break; @@ -5408,9 +5358,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(610); + setState(602); if (!(precpred(_ctx, 16))) throw new FailedPredicateException(this, "precpred(_ctx, 16)"); - setState(611); + setState(603); _la = _input.LA(1); if ( !(_la==PLUS || _la==MINUS) ) { _errHandler.recoverInline(this); @@ -5420,7 +5370,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(612); + setState(604); expr(17); } break; @@ -5428,9 +5378,9 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(613); + setState(605); if (!(precpred(_ctx, 15))) throw new FailedPredicateException(this, "precpred(_ctx, 15)"); - setState(614); + setState(606); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQUAL) | (1L << NOT_EQUAL) | (1L << LESS_THAN) | (1L << LESS_THAN_EQUAL) | (1L << GREATER_THAN_EQUAL) | (1L << GREATER_THAN))) != 0)) ) { _errHandler.recoverInline(this); @@ -5440,7 +5390,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(615); + setState(607); expr(16); } break; @@ -5448,13 +5398,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(616); + setState(608); if (!(precpred(_ctx, 14))) throw new FailedPredicateException(this, "precpred(_ctx, 14)"); { - setState(617); + setState(609); match(AND); } - setState(618); + setState(610); expr(15); } break; @@ -5462,13 +5412,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(619); + setState(611); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); { - setState(620); + setState(612); match(BIT_XOR); } - setState(621); + setState(613); expr(14); } break; @@ -5476,13 +5426,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(622); + setState(614); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); { - setState(623); + setState(615); match(BIT_OR); } - setState(624); + setState(616); expr(13); } break; @@ -5490,13 +5440,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(625); + setState(617); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); { - setState(626); + setState(618); match(LOGIC_AND); } - setState(627); + setState(619); expr(12); } break; @@ -5504,13 +5454,13 @@ public class KickCParser extends Parser { { _localctx = new ExprBinaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(628); + setState(620); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(629); + setState(621); match(LOGIC_OR); } - setState(630); + setState(622); expr(11); } break; @@ -5518,15 +5468,15 @@ public class KickCParser extends Parser { { _localctx = new ExprTernaryContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(631); + setState(623); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(632); + setState(624); match(CONDITION); - setState(633); + setState(625); expr(0); - setState(634); + setState(626); match(COLON); - setState(635); + setState(627); expr(10); } break; @@ -5534,11 +5484,11 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(637); + setState(629); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); - setState(638); + setState(630); match(ASSIGN); - setState(639); + setState(631); expr(8); } break; @@ -5546,11 +5496,11 @@ public class KickCParser extends Parser { { _localctx = new ExprAssignmentCompoundContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(640); + setState(632); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(641); + setState(633); match(ASSIGN_COMPOUND); - setState(642); + setState(634); expr(7); } break; @@ -5558,11 +5508,11 @@ public class KickCParser extends Parser { { _localctx = new ExprDotContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(643); - if (!(precpred(_ctx, 30))) throw new FailedPredicateException(this, "precpred(_ctx, 30)"); - setState(644); + setState(635); + if (!(precpred(_ctx, 32))) throw new FailedPredicateException(this, "precpred(_ctx, 32)"); + setState(636); match(DOT); - setState(645); + setState(637); match(NAME); } break; @@ -5570,11 +5520,11 @@ public class KickCParser extends Parser { { _localctx = new ExprArrowContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(646); - if (!(precpred(_ctx, 29))) throw new FailedPredicateException(this, "precpred(_ctx, 29)"); - setState(647); + setState(638); + if (!(precpred(_ctx, 31))) throw new FailedPredicateException(this, "precpred(_ctx, 31)"); + setState(639); match(ARROW); - setState(648); + setState(640); match(NAME); } break; @@ -5582,21 +5532,21 @@ public class KickCParser extends Parser { { _localctx = new ExprCallContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(649); - if (!(precpred(_ctx, 28))) throw new FailedPredicateException(this, "precpred(_ctx, 28)"); - setState(650); + setState(641); + if (!(precpred(_ctx, 30))) throw new FailedPredicateException(this, "precpred(_ctx, 30)"); + setState(642); match(PAR_BEGIN); - setState(652); + setState(644); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << CURLY_BEGIN) | (1L << PAR_BEGIN) | (1L << PLUS) | (1L << MINUS) | (1L << ASTERISK) | (1L << INC) | (1L << DEC) | (1L << AND) | (1L << BIT_NOT))) != 0) || ((((_la - 73)) & ~0x3f) == 0 && ((1L << (_la - 73)) & ((1L << (SIZEOF - 73)) | (1L << (TYPEID - 73)) | (1L << (DEFINED - 73)) | (1L << (LOGIC_NOT - 73)) | (1L << (BOOLEAN - 73)) | (1L << (NUMBER - 73)) | (1L << (NAME - 73)) | (1L << (STRING - 73)) | (1L << (CHAR - 73)))) != 0)) { { - setState(651); + setState(643); parameterList(); } } - setState(654); + setState(646); match(PAR_END); } break; @@ -5604,13 +5554,13 @@ public class KickCParser extends Parser { { _localctx = new ExprArrayContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(655); + setState(647); if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); - setState(656); + setState(648); match(BRACKET_BEGIN); - setState(657); + setState(649); commaExpr(0); - setState(658); + setState(650); match(BRACKET_END); } break; @@ -5618,9 +5568,9 @@ public class KickCParser extends Parser { { _localctx = new ExprPostModContext(new ExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_expr); - setState(660); + setState(652); if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); - setState(661); + setState(653); _la = _input.LA(1); if ( !(_la==INC || _la==DEC) ) { _errHandler.recoverInline(this); @@ -5635,9 +5585,9 @@ public class KickCParser extends Parser { } } } - setState(666); + setState(658); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,68,_ctx); + _alt = getInterpreter().adaptivePredict(_input,62,_ctx); } } } @@ -5689,21 +5639,21 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(667); + setState(659); expr(0); - setState(672); + setState(664); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(668); + setState(660); match(COMMA); - setState(669); + setState(661); expr(0); } } - setState(674); + setState(666); _errHandler.sync(this); _la = _input.LA(1); } @@ -5752,19 +5702,19 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(675); + setState(667); match(KICKASM); - setState(677); + setState(669); _errHandler.sync(this); _la = _input.LA(1); if (_la==PAR_BEGIN) { { - setState(676); + setState(668); asmDirectives(); } } - setState(679); + setState(671); match(KICKASM_BODY); } } @@ -5818,27 +5768,27 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(681); + setState(673); match(PAR_BEGIN); - setState(682); + setState(674); asmDirective(); - setState(687); + setState(679); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(683); + setState(675); match(COMMA); - setState(684); + setState(676); asmDirective(); } } - setState(689); + setState(681); _errHandler.sync(this); _la = _input.LA(1); } - setState(690); + setState(682); match(PAR_END); } } @@ -5963,16 +5913,16 @@ public class KickCParser extends Parser { AsmDirectiveContext _localctx = new AsmDirectiveContext(_ctx, getState()); enterRule(_localctx, 76, RULE_asmDirective); try { - setState(702); + setState(694); _errHandler.sync(this); switch (_input.LA(1)) { case RESOURCE: _localctx = new AsmDirectiveResourceContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(692); + setState(684); match(RESOURCE); - setState(693); + setState(685); match(STRING); } break; @@ -5980,9 +5930,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveUsesContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(694); + setState(686); match(USES); - setState(695); + setState(687); match(NAME); } break; @@ -5990,9 +5940,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveClobberContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(696); + setState(688); match(CLOBBERS); - setState(697); + setState(689); match(STRING); } break; @@ -6000,9 +5950,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveBytesContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(698); + setState(690); match(BYTES); - setState(699); + setState(691); expr(0); } break; @@ -6010,9 +5960,9 @@ public class KickCParser extends Parser { _localctx = new AsmDirectiveCyclesContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(700); + setState(692); match(CYCLES); - setState(701); + setState(693); expr(0); } break; @@ -6064,17 +6014,17 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(707); + setState(699); _errHandler.sync(this); _la = _input.LA(1); - while (((((_la - 114)) & ~0x3f) == 0 && ((1L << (_la - 114)) & ((1L << (ASM_BYTE - 114)) | (1L << (ASM_MNEMONIC - 114)) | (1L << (ASM_MULTI_NAME - 114)) | (1L << (ASM_NAME - 114)))) != 0)) { + while (((((_la - 114)) & ~0x3f) == 0 && ((1L << (_la - 114)) & ((1L << (ASM_BYTE - 114)) | (1L << (ASM_MNEMONIC - 114)) | (1L << (ASM_CURLY_BEGIN - 114)) | (1L << (ASM_MULTI_NAME - 114)) | (1L << (ASM_NAME - 114)))) != 0)) { { { - setState(704); + setState(696); asmLine(); } } - setState(709); + setState(701); _errHandler.sync(this); _la = _input.LA(1); } @@ -6124,28 +6074,29 @@ public class KickCParser extends Parser { AsmLineContext _localctx = new AsmLineContext(_ctx, getState()); enterRule(_localctx, 80, RULE_asmLine); try { - setState(713); + setState(705); _errHandler.sync(this); switch (_input.LA(1)) { + case ASM_CURLY_BEGIN: case ASM_MULTI_NAME: case ASM_NAME: enterOuterAlt(_localctx, 1); { - setState(710); + setState(702); asmLabel(); } break; case ASM_MNEMONIC: enterOuterAlt(_localctx, 2); { - setState(711); + setState(703); asmInstruction(); } break; case ASM_BYTE: enterOuterAlt(_localctx, 3); { - setState(712); + setState(704); asmBytes(); } break; @@ -6219,34 +6170,86 @@ public class KickCParser extends Parser { else return visitor.visitChildren(this); } } + public static class AsmLabelReplaceContext extends AsmLabelContext { + public TerminalNode ASM_CURLY_BEGIN() { return getToken(KickCParser.ASM_CURLY_BEGIN, 0); } + public TerminalNode ASM_NAME() { return getToken(KickCParser.ASM_NAME, 0); } + public TerminalNode ASM_CURLY_END() { return getToken(KickCParser.ASM_CURLY_END, 0); } + public TerminalNode ASM_COLON() { return getToken(KickCParser.ASM_COLON, 0); } + public List ASM_TAG() { return getTokens(KickCParser.ASM_TAG); } + public TerminalNode ASM_TAG(int i) { + return getToken(KickCParser.ASM_TAG, i); + } + public AsmLabelReplaceContext(AsmLabelContext ctx) { copyFrom(ctx); } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).enterAsmLabelReplace(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof KickCParserListener ) ((KickCParserListener)listener).exitAsmLabelReplace(this); + } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof KickCParserVisitor ) return ((KickCParserVisitor)visitor).visitAsmLabelReplace(this); + else return visitor.visitChildren(this); + } + } public final AsmLabelContext asmLabel() throws RecognitionException { AsmLabelContext _localctx = new AsmLabelContext(_ctx, getState()); enterRule(_localctx, 82, RULE_asmLabel); int _la; try { - setState(731); + setState(733); _errHandler.sync(this); switch (_input.LA(1)) { case ASM_NAME: _localctx = new AsmLabelNameContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(715); + setState(707); match(ASM_NAME); - setState(716); + setState(708); match(ASM_COLON); - setState(720); + setState(712); _errHandler.sync(this); _la = _input.LA(1); while (_la==ASM_TAG) { { { - setState(717); + setState(709); match(ASM_TAG); } } - setState(722); + setState(714); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case ASM_CURLY_BEGIN: + _localctx = new AsmLabelReplaceContext(_localctx); + enterOuterAlt(_localctx, 2); + { + setState(715); + match(ASM_CURLY_BEGIN); + setState(716); + match(ASM_NAME); + setState(717); + match(ASM_CURLY_END); + setState(718); + match(ASM_COLON); + setState(722); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==ASM_TAG) { + { + { + setState(719); + match(ASM_TAG); + } + } + setState(724); _errHandler.sync(this); _la = _input.LA(1); } @@ -6254,23 +6257,23 @@ public class KickCParser extends Parser { break; case ASM_MULTI_NAME: _localctx = new AsmLabelMultiContext(_localctx); - enterOuterAlt(_localctx, 2); + enterOuterAlt(_localctx, 3); { - setState(723); + setState(725); match(ASM_MULTI_NAME); - setState(724); + setState(726); match(ASM_COLON); - setState(728); + setState(730); _errHandler.sync(this); _la = _input.LA(1); while (_la==ASM_TAG) { { { - setState(725); + setState(727); match(ASM_TAG); } } - setState(730); + setState(732); _errHandler.sync(this); _la = _input.LA(1); } @@ -6326,29 +6329,29 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(733); - match(ASM_MNEMONIC); setState(735); + match(ASM_MNEMONIC); + setState(737); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,78,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { case 1: { - setState(734); + setState(736); asmParamMode(); } break; } - setState(740); + setState(742); _errHandler.sync(this); _la = _input.LA(1); while (_la==ASM_TAG) { { { - setState(737); + setState(739); match(ASM_TAG); } } - setState(742); + setState(744); _errHandler.sync(this); _la = _input.LA(1); } @@ -6407,37 +6410,37 @@ public class KickCParser extends Parser { try { enterOuterAlt(_localctx, 1); { - setState(743); + setState(745); match(ASM_BYTE); - setState(744); + setState(746); asmExpr(0); - setState(749); + setState(751); _errHandler.sync(this); _la = _input.LA(1); while (_la==ASM_COMMA) { { { - setState(745); + setState(747); match(ASM_COMMA); - setState(746); + setState(748); asmExpr(0); } } - setState(751); + setState(753); _errHandler.sync(this); _la = _input.LA(1); } - setState(755); + setState(757); _errHandler.sync(this); _la = _input.LA(1); while (_la==ASM_TAG) { { { - setState(752); + setState(754); match(ASM_TAG); } } - setState(757); + setState(759); _errHandler.sync(this); _la = _input.LA(1); } @@ -6684,14 +6687,14 @@ public class KickCParser extends Parser { AsmParamModeContext _localctx = new AsmParamModeContext(_ctx, getState()); enterRule(_localctx, 88, RULE_asmParamMode); try { - setState(803); + setState(805); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { case 1: _localctx = new AsmModeAbsContext(_localctx); enterOuterAlt(_localctx, 1); { - setState(758); + setState(760); asmExpr(0); } break; @@ -6699,9 +6702,9 @@ public class KickCParser extends Parser { _localctx = new AsmModeImmContext(_localctx); enterOuterAlt(_localctx, 2); { - setState(759); + setState(761); match(ASM_IMM); - setState(760); + setState(762); asmExpr(0); } break; @@ -6709,27 +6712,27 @@ public class KickCParser extends Parser { _localctx = new AsmModeAbsXYContext(_localctx); enterOuterAlt(_localctx, 3); { - setState(761); - asmExpr(0); - setState(762); - match(ASM_COMMA); setState(763); asmExpr(0); + setState(764); + match(ASM_COMMA); + setState(765); + asmExpr(0); } break; case 4: _localctx = new AsmModeIndIdxXYContext(_localctx); enterOuterAlt(_localctx, 4); { - setState(765); - match(ASM_PAR_BEGIN); - setState(766); - asmExpr(0); setState(767); - match(ASM_PAR_END); + match(ASM_PAR_BEGIN); setState(768); - match(ASM_COMMA); + asmExpr(0); setState(769); + match(ASM_PAR_END); + setState(770); + match(ASM_COMMA); + setState(771); match(ASM_NAME); } break; @@ -6737,19 +6740,19 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndLongIdxXYContext(_localctx); enterOuterAlt(_localctx, 5); { - setState(771); - match(ASM_PAR_BEGIN); - setState(772); - match(ASM_PAR_BEGIN); setState(773); - asmExpr(0); + match(ASM_PAR_BEGIN); setState(774); - match(ASM_PAR_END); + match(ASM_PAR_BEGIN); setState(775); - match(ASM_PAR_END); + asmExpr(0); setState(776); - match(ASM_COMMA); + match(ASM_PAR_END); setState(777); + match(ASM_PAR_END); + setState(778); + match(ASM_COMMA); + setState(779); match(ASM_NAME); } break; @@ -6757,19 +6760,19 @@ public class KickCParser extends Parser { _localctx = new AsmModeSPIndIdxContext(_localctx); enterOuterAlt(_localctx, 6); { - setState(779); - match(ASM_PAR_BEGIN); - setState(780); - asmExpr(0); setState(781); - match(ASM_COMMA); + match(ASM_PAR_BEGIN); setState(782); - match(ASM_NAME); + asmExpr(0); setState(783); - match(ASM_PAR_END); - setState(784); match(ASM_COMMA); + setState(784); + match(ASM_NAME); setState(785); + match(ASM_PAR_END); + setState(786); + match(ASM_COMMA); + setState(787); match(ASM_NAME); } break; @@ -6777,15 +6780,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIdxIndXYContext(_localctx); enterOuterAlt(_localctx, 7); { - setState(787); - match(ASM_PAR_BEGIN); - setState(788); - asmExpr(0); setState(789); - match(ASM_COMMA); + match(ASM_PAR_BEGIN); setState(790); - match(ASM_NAME); + asmExpr(0); setState(791); + match(ASM_COMMA); + setState(792); + match(ASM_NAME); + setState(793); match(ASM_PAR_END); } break; @@ -6793,11 +6796,11 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndContext(_localctx); enterOuterAlt(_localctx, 8); { - setState(793); - match(ASM_PAR_BEGIN); - setState(794); - asmExpr(0); setState(795); + match(ASM_PAR_BEGIN); + setState(796); + asmExpr(0); + setState(797); match(ASM_PAR_END); } break; @@ -6805,15 +6808,15 @@ public class KickCParser extends Parser { _localctx = new AsmModeIndLongContext(_localctx); enterOuterAlt(_localctx, 9); { - setState(797); - match(ASM_PAR_BEGIN); - setState(798); - match(ASM_PAR_BEGIN); setState(799); - asmExpr(0); + match(ASM_PAR_BEGIN); setState(800); - match(ASM_PAR_END); + match(ASM_PAR_BEGIN); setState(801); + asmExpr(0); + setState(802); + match(ASM_PAR_END); + setState(803); match(ASM_PAR_END); } break; @@ -7018,7 +7021,7 @@ public class KickCParser extends Parser { int _alt; enterOuterAlt(_localctx, 1); { - setState(819); + setState(821); _errHandler.sync(this); switch (_input.LA(1)) { case ASM_BRACKET_BEGIN: @@ -7027,11 +7030,11 @@ public class KickCParser extends Parser { _ctx = _localctx; _prevctx = _localctx; - setState(806); - match(ASM_BRACKET_BEGIN); - setState(807); - asmExpr(0); setState(808); + match(ASM_BRACKET_BEGIN); + setState(809); + asmExpr(0); + setState(810); match(ASM_BRACKET_END); } break; @@ -7043,7 +7046,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprUnaryContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(810); + setState(812); _la = _input.LA(1); if ( !(((((_la - 126)) & ~0x3f) == 0 && ((1L << (_la - 126)) & ((1L << (ASM_PLUS - 126)) | (1L << (ASM_MINUS - 126)) | (1L << (ASM_LESS_THAN - 126)) | (1L << (ASM_GREATER_THAN - 126)))) != 0)) ) { _errHandler.recoverInline(this); @@ -7053,7 +7056,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(811); + setState(813); asmExpr(8); } break; @@ -7062,7 +7065,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(812); + setState(814); match(ASM_NAME); } break; @@ -7071,7 +7074,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprLabelRelContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(813); + setState(815); match(ASM_MULTI_REL); } break; @@ -7080,11 +7083,11 @@ public class KickCParser extends Parser { _localctx = new AsmExprReplaceContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(814); - match(ASM_CURLY_BEGIN); - setState(815); - match(ASM_NAME); setState(816); + match(ASM_CURLY_BEGIN); + setState(817); + match(ASM_NAME); + setState(818); match(ASM_CURLY_END); } break; @@ -7093,7 +7096,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprIntContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(817); + setState(819); match(ASM_NUMBER); } break; @@ -7102,7 +7105,7 @@ public class KickCParser extends Parser { _localctx = new AsmExprCharContext(_localctx); _ctx = _localctx; _prevctx = _localctx; - setState(818); + setState(820); match(ASM_CHAR); } break; @@ -7110,28 +7113,28 @@ public class KickCParser extends Parser { throw new NoViableAltException(this); } _ctx.stop = _input.LT(-1); - setState(835); + setState(837); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,85,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { - setState(833); + setState(835); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) { case 1: { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(821); + setState(823); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); { - setState(822); + setState(824); match(ASM_DOT); } - setState(823); + setState(825); asmExpr(11); } break; @@ -7139,9 +7142,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(824); + setState(826); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); - setState(825); + setState(827); _la = _input.LA(1); if ( !(_la==ASM_SHIFT_LEFT || _la==ASM_SHIFT_RIGHT) ) { _errHandler.recoverInline(this); @@ -7151,7 +7154,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(826); + setState(828); asmExpr(10); } break; @@ -7159,9 +7162,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(827); + setState(829); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); - setState(828); + setState(830); _la = _input.LA(1); if ( !(_la==ASM_MULTIPLY || _la==ASM_DIVIDE) ) { _errHandler.recoverInline(this); @@ -7171,7 +7174,7 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(829); + setState(831); asmExpr(8); } break; @@ -7179,9 +7182,9 @@ public class KickCParser extends Parser { { _localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState)); pushNewRecursionContext(_localctx, _startState, RULE_asmExpr); - setState(830); + setState(832); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); - setState(831); + setState(833); _la = _input.LA(1); if ( !(_la==ASM_PLUS || _la==ASM_MINUS) ) { _errHandler.recoverInline(this); @@ -7191,16 +7194,16 @@ public class KickCParser extends Parser { _errHandler.reportMatch(this); consume(); } - setState(832); + setState(834); asmExpr(7); } break; } } } - setState(837); + setState(839); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,85,_ctx); + _alt = getInterpreter().adaptivePredict(_input,80,_ctx); } } } @@ -7300,11 +7303,11 @@ public class KickCParser extends Parser { case 18: return precpred(_ctx, 7); case 19: - return precpred(_ctx, 30); + return precpred(_ctx, 32); case 20: - return precpred(_ctx, 29); + return precpred(_ctx, 31); case 21: - return precpred(_ctx, 28); + return precpred(_ctx, 30); case 22: return precpred(_ctx, 24); case 23: @@ -7327,7 +7330,7 @@ public class KickCParser extends Parser { } public static final String _serializedATN = - "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u009d\u0349\4\2\t"+ + "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u009d\u034b\4\2\t"+ "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ @@ -7368,171 +7371,171 @@ public class KickCParser extends Parser { "\3\36\5\36\u01e9\n\36\5\36\u01eb\n\36\3\37\3\37\3\37\3\37\5\37\u01f1\n"+ "\37\3 \3 \3 \5 \u01f6\n \3 \3 \5 \u01fa\n \3 \3 \3 \3 \3 \3 \3 \5 \u0203"+ "\n \3!\5!\u0206\n!\3!\5!\u0209\n!\3\"\3\"\3#\3#\3#\3#\3#\3#\7#\u0213\n"+ - "#\f#\16#\u0216\13#\3$\3$\3$\3$\3$\3$\3$\5$\u021f\n$\3$\3$\5$\u0223\n$"+ - "\3$\5$\u0226\n$\3$\3$\5$\u022a\n$\3$\3$\5$\u022e\n$\3$\5$\u0231\n$\3$"+ - "\3$\5$\u0235\n$\3$\3$\5$\u0239\n$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$"+ - "\3$\3$\3$\7$\u024a\n$\f$\16$\u024d\13$\3$\5$\u0250\n$\3$\3$\3$\3$\3$\6"+ - "$\u0257\n$\r$\16$\u0258\3$\3$\5$\u025d\n$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3"+ + "#\f#\16#\u0216\13#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$"+ + "\3$\3$\3$\3$\5$\u022d\n$\3$\3$\5$\u0231\n$\3$\3$\3$\3$\3$\3$\3$\3$\3$"+ + "\3$\3$\3$\3$\3$\3$\7$\u0242\n$\f$\16$\u0245\13$\3$\5$\u0248\n$\3$\3$\3"+ + "$\3$\3$\6$\u024f\n$\r$\16$\u0250\3$\3$\5$\u0255\n$\3$\3$\3$\3$\3$\3$\3"+ "$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3"+ - "$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\5$\u028f\n$\3$\3$\3$\3"+ - "$\3$\3$\3$\3$\7$\u0299\n$\f$\16$\u029c\13$\3%\3%\3%\7%\u02a1\n%\f%\16"+ - "%\u02a4\13%\3&\3&\5&\u02a8\n&\3&\3&\3\'\3\'\3\'\3\'\7\'\u02b0\n\'\f\'"+ - "\16\'\u02b3\13\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\5(\u02c1\n(\3)"+ - "\7)\u02c4\n)\f)\16)\u02c7\13)\3*\3*\3*\5*\u02cc\n*\3+\3+\3+\7+\u02d1\n"+ - "+\f+\16+\u02d4\13+\3+\3+\3+\7+\u02d9\n+\f+\16+\u02dc\13+\5+\u02de\n+\3"+ - ",\3,\5,\u02e2\n,\3,\7,\u02e5\n,\f,\16,\u02e8\13,\3-\3-\3-\3-\7-\u02ee"+ - "\n-\f-\16-\u02f1\13-\3-\7-\u02f4\n-\f-\16-\u02f7\13-\3.\3.\3.\3.\3.\3"+ - ".\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3"+ - ".\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\5.\u0326\n.\3/\3/\3"+ - "/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\5/\u0336\n/\3/\3/\3/\3/\3/\3/\3/\3"+ - "/\3/\3/\3/\3/\7/\u0344\n/\f/\16/\u0347\13/\3/\2\t\f\26\30&DF\\\60\2\4"+ - "\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNP"+ - "RTVXZ\\\2\r\3\2HI\3\2\27\30\5\2\22\23\31\32TT\3\2\35\36\3\2\24\26\3\2"+ - "\22\23\3\2\37$\3\2\u0080\u0083\3\2~\177\3\2\u0084\u0085\3\2\u0080\u0081"+ - "\2\u03c8\2^\3\2\2\2\4a\3\2\2\2\6g\3\2\2\2\bx\3\2\2\2\nz\3\2\2\2\f}\3\2"+ - "\2\2\16\u0091\3\2\2\2\20\u0093\3\2\2\2\22\u009b\3\2\2\2\24\u00a5\3\2\2"+ - "\2\26\u00b5\3\2\2\2\30\u00d7\3\2\2\2\32\u00f4\3\2\2\2\34\u00f6\3\2\2\2"+ - "\36\u00f9\3\2\2\2 \u0105\3\2\2\2\"\u0108\3\2\2\2$\u010b\3\2\2\2&\u0113"+ - "\3\2\2\2(\u011e\3\2\2\2*\u0123\3\2\2\2,\u012b\3\2\2\2.\u0138\3\2\2\2\60"+ - "\u013a\3\2\2\2\62\u014e\3\2\2\2\64\u017d\3\2\2\2\66\u0180\3\2\2\28\u01de"+ - "\3\2\2\2:\u01e1\3\2\2\2<\u01ec\3\2\2\2>\u0202\3\2\2\2@\u0208\3\2\2\2B"+ - "\u020a\3\2\2\2D\u020c\3\2\2\2F\u025c\3\2\2\2H\u029d\3\2\2\2J\u02a5\3\2"+ - "\2\2L\u02ab\3\2\2\2N\u02c0\3\2\2\2P\u02c5\3\2\2\2R\u02cb\3\2\2\2T\u02dd"+ - "\3\2\2\2V\u02df\3\2\2\2X\u02e9\3\2\2\2Z\u0325\3\2\2\2\\\u0335\3\2\2\2"+ - "^_\5\6\4\2_`\7\2\2\3`\3\3\2\2\2ab\5P)\2bc\7\2\2\3c\5\3\2\2\2df\5\b\5\2"+ - "ed\3\2\2\2fi\3\2\2\2ge\3\2\2\2gh\3\2\2\2h\7\3\2\2\2ig\3\2\2\2jk\5\n\6"+ - "\2kl\7\n\2\2ly\3\2\2\2my\5*\26\2no\5\36\20\2op\7\n\2\2py\3\2\2\2qr\5$"+ - "\23\2rs\7\n\2\2sy\3\2\2\2ty\5\60\31\2uv\5\20\t\2vw\7\n\2\2wy\3\2\2\2x"+ - "j\3\2\2\2xm\3\2\2\2xn\3\2\2\2xq\3\2\2\2xt\3\2\2\2xu\3\2\2\2y\t\3\2\2\2"+ - "z{\5\22\n\2{|\5\f\7\2|\13\3\2\2\2}~\b\7\1\2~\177\5\16\b\2\177\u0085\3"+ - "\2\2\2\u0080\u0081\f\3\2\2\u0081\u0082\7\f\2\2\u0082\u0084\5\16\b\2\u0083"+ - "\u0080\3\2\2\2\u0084\u0087\3\2\2\2\u0085\u0083\3\2\2\2\u0085\u0086\3\2"+ - "\2\2\u0086\r\3\2\2\2\u0087\u0085\3\2\2\2\u0088\u008b\5\30\r\2\u0089\u008a"+ - "\7\'\2\2\u008a\u008c\5F$\2\u008b\u0089\3\2\2\2\u008b\u008c\3\2\2\2\u008c"+ - "\u0092\3\2\2\2\u008d\u008e\5\30\r\2\u008e\u008f\7\'\2\2\u008f\u0090\5"+ - "J&\2\u0090\u0092\3\2\2\2\u0091\u0088\3\2\2\2\u0091\u008d\3\2\2\2\u0092"+ - "\17\3\2\2\2\u0093\u0094\7)\2\2\u0094\u0095\5\22\n\2\u0095\u0096\b\t\1"+ - "\2\u0096\u0097\5\30\r\2\u0097\21\3\2\2\2\u0098\u009a\5\64\33\2\u0099\u0098"+ - "\3\2\2\2\u009a\u009d\3\2\2\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c"+ - "\u009e\3\2\2\2\u009d\u009b\3\2\2\2\u009e\u00a2\5\32\16\2\u009f\u00a1\5"+ - "\64\33\2\u00a0\u009f\3\2\2\2\u00a1\u00a4\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a2"+ - "\u00a3\3\2\2\2\u00a3\23\3\2\2\2\u00a4\u00a2\3\2\2\2\u00a5\u00a6\5\32\16"+ - "\2\u00a6\u00a7\5\26\f\2\u00a7\25\3\2\2\2\u00a8\u00b6\b\f\1\2\u00a9\u00ad"+ - "\7\24\2\2\u00aa\u00ac\5\64\33\2\u00ab\u00aa\3\2\2\2\u00ac\u00af\3\2\2"+ - "\2\u00ad\u00ab\3\2\2\2\u00ad\u00ae\3\2\2\2\u00ae\u00b0\3\2\2\2\u00af\u00ad"+ - "\3\2\2\2\u00b0\u00b6\5\26\f\4\u00b1\u00b2\7\b\2\2\u00b2\u00b3\5\26\f\2"+ - "\u00b3\u00b4\7\t\2\2\u00b4\u00b6\3\2\2\2\u00b5\u00a8\3\2\2\2\u00b5\u00a9"+ - "\3\2\2\2\u00b5\u00b1\3\2\2\2\u00b6\u00c5\3\2\2\2\u00b7\u00b8\f\6\2\2\u00b8"+ - "\u00ba\7\b\2\2\u00b9\u00bb\5,\27\2\u00ba\u00b9\3\2\2\2\u00ba\u00bb\3\2"+ - "\2\2\u00bb\u00bc\3\2\2\2\u00bc\u00c4\7\t\2\2\u00bd\u00be\f\5\2\2\u00be"+ - "\u00c0\7\6\2\2\u00bf\u00c1\5F$\2\u00c0\u00bf\3\2\2\2\u00c0\u00c1\3\2\2"+ - "\2\u00c1\u00c2\3\2\2\2\u00c2\u00c4\7\7\2\2\u00c3\u00b7\3\2\2\2\u00c3\u00bd"+ - "\3\2\2\2\u00c4\u00c7\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6"+ - "\27\3\2\2\2\u00c7\u00c5\3\2\2\2\u00c8\u00c9\b\r\1\2\u00c9\u00ca\7n\2\2"+ - "\u00ca\u00d8\b\r\1\2\u00cb\u00cf\7\24\2\2\u00cc\u00ce\5\64\33\2\u00cd"+ - "\u00cc\3\2\2\2\u00ce\u00d1\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2"+ - "\2\2\u00d0\u00d2\3\2\2\2\u00d1\u00cf\3\2\2\2\u00d2\u00d8\5\30\r\4\u00d3"+ - "\u00d4\7\b\2\2\u00d4\u00d5\5\30\r\2\u00d5\u00d6\7\t\2\2\u00d6\u00d8\3"+ - "\2\2\2\u00d7\u00c8\3\2\2\2\u00d7\u00cb\3\2\2\2\u00d7\u00d3\3\2\2\2\u00d8"+ - "\u00e7\3\2\2\2\u00d9\u00da\f\6\2\2\u00da\u00dc\7\b\2\2\u00db\u00dd\5,"+ - "\27\2\u00dc\u00db\3\2\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00de\3\2\2\2\u00de"+ - "\u00e6\7\t\2\2\u00df\u00e0\f\5\2\2\u00e0\u00e2\7\6\2\2\u00e1\u00e3\5F"+ - "$\2\u00e2\u00e1\3\2\2\2\u00e2\u00e3\3\2\2\2\u00e3\u00e4\3\2\2\2\u00e4"+ - "\u00e6\7\7\2\2\u00e5\u00d9\3\2\2\2\u00e5\u00df\3\2\2\2\u00e6\u00e9\3\2"+ - "\2\2\u00e7\u00e5\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\31\3\2\2\2\u00e9\u00e7"+ - "\3\2\2\2\u00ea\u00ec\7U\2\2\u00eb\u00ea\3\2\2\2\u00ec\u00ed\3\2\2\2\u00ed"+ - "\u00eb\3\2\2\2\u00ed\u00ee\3\2\2\2\u00ee\u00f5\3\2\2\2\u00ef\u00f5\5\36"+ - "\20\2\u00f0\u00f5\5\34\17\2\u00f1\u00f5\5$\23\2\u00f2\u00f5\5\"\22\2\u00f3"+ - "\u00f5\7\3\2\2\u00f4\u00eb\3\2\2\2\u00f4\u00ef\3\2\2\2\u00f4\u00f0\3\2"+ - "\2\2\u00f4\u00f1\3\2\2\2\u00f4\u00f2\3\2\2\2\u00f4\u00f3\3\2\2\2\u00f5"+ - "\33\3\2\2\2\u00f6\u00f7\t\2\2\2\u00f7\u00f8\7n\2\2\u00f8\35\3\2\2\2\u00f9"+ - "\u00fb\t\2\2\2\u00fa\u00fc\7n\2\2\u00fb\u00fa\3\2\2\2\u00fb\u00fc\3\2"+ - "\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00ff\7\4\2\2\u00fe\u0100\5 \21\2\u00ff"+ - "\u00fe\3\2\2\2\u0100\u0101\3\2\2\2\u0101\u00ff\3\2\2\2\u0101\u0102\3\2"+ - "\2\2\u0102\u0103\3\2\2\2\u0103\u0104\7\5\2\2\u0104\37\3\2\2\2\u0105\u0106"+ - "\5\n\6\2\u0106\u0107\7\n\2\2\u0107!\3\2\2\2\u0108\u0109\7J\2\2\u0109\u010a"+ - "\7n\2\2\u010a#\3\2\2\2\u010b\u010d\7J\2\2\u010c\u010e\7n\2\2\u010d\u010c"+ - "\3\2\2\2\u010d\u010e\3\2\2\2\u010e\u010f\3\2\2\2\u010f\u0110\7\4\2\2\u0110"+ - "\u0111\5&\24\2\u0111\u0112\7\5\2\2\u0112%\3\2\2\2\u0113\u0114\b\24\1\2"+ - "\u0114\u0115\5(\25\2\u0115\u011b\3\2\2\2\u0116\u0117\f\3\2\2\u0117\u0118"+ - "\7\f\2\2\u0118\u011a\5(\25\2\u0119\u0116\3\2\2\2\u011a\u011d\3\2\2\2\u011b"+ - "\u0119\3\2\2\2\u011b\u011c\3\2\2\2\u011c\'\3\2\2\2\u011d\u011b\3\2\2\2"+ - "\u011e\u0121\7n\2\2\u011f\u0120\7\'\2\2\u0120\u0122\5F$\2\u0121\u011f"+ - "\3\2\2\2\u0121\u0122\3\2\2\2\u0122)\3\2\2\2\u0123\u0124\5\22\n\2\u0124"+ - "\u0125\5\30\r\2\u0125\u0127\7\4\2\2\u0126\u0128\5\66\34\2\u0127\u0126"+ - "\3\2\2\2\u0127\u0128\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\7\5\2\2\u012a"+ - "+\3\2\2\2\u012b\u0130\5.\30\2\u012c\u012d\7\f\2\2\u012d\u012f\5.\30\2"+ - "\u012e\u012c\3\2\2\2\u012f\u0132\3\2\2\2\u0130\u012e\3\2\2\2\u0130\u0131"+ - "\3\2\2\2\u0131-\3\2\2\2\u0132\u0130\3\2\2\2\u0133\u0134\5\22\n\2\u0134"+ - "\u0135\5\30\r\2\u0135\u0139\3\2\2\2\u0136\u0139\5\24\13\2\u0137\u0139"+ - "\7\16\2\2\u0138\u0133\3\2\2\2\u0138\u0136\3\2\2\2\u0138\u0137\3\2\2\2"+ - "\u0139/\3\2\2\2\u013a\u013b\7Z\2\2\u013b\u013c\7n\2\2\u013c\u013d\7\b"+ - "\2\2\u013d\u0142\5\62\32\2\u013e\u013f\7\f\2\2\u013f\u0141\5\62\32\2\u0140"+ - "\u013e\3\2\2\2\u0141\u0144\3\2\2\2\u0142\u0140\3\2\2\2\u0142\u0143\3\2"+ - "\2\2\u0143\u0145\3\2\2\2\u0144\u0142\3\2\2\2\u0145\u0146\7\t\2\2\u0146"+ - "\61\3\2\2\2\u0147\u014f\7e\2\2\u0148\u0149\7e\2\2\u0149\u014a\7\r\2\2"+ - "\u014a\u014f\7e\2\2\u014b\u014f\7n\2\2\u014c\u014f\7o\2\2\u014d\u014f"+ - "\7:\2\2\u014e\u0147\3\2\2\2\u014e\u0148\3\2\2\2\u014e\u014b\3\2\2\2\u014e"+ - "\u014c\3\2\2\2\u014e\u014d\3\2\2\2\u014f\63\3\2\2\2\u0150\u017e\7*\2\2"+ - "\u0151\u0152\7-\2\2\u0152\u0153\7\b\2\2\u0153\u0154\7e\2\2\u0154\u017e"+ - "\7\t\2\2\u0155\u0159\7\62\2\2\u0156\u0157\7\b\2\2\u0157\u0158\7n\2\2\u0158"+ - "\u015a\7\t\2\2\u0159\u0156\3\2\2\2\u0159\u015a\3\2\2\2\u015a\u017e\3\2"+ - "\2\2\u015b\u017e\7\65\2\2\u015c\u017e\7\66\2\2\u015d\u015e\7\64\2\2\u015e"+ - "\u015f\7\b\2\2\u015f\u0160\5F$\2\u0160\u0161\7\t\2\2\u0161\u017e\3\2\2"+ - "\2\u0162\u017e\7/\2\2\u0163\u017e\7\60\2\2\u0164\u017e\7\67\2\2\u0165"+ - "\u017e\78\2\2\u0166\u017e\7+\2\2\u0167\u017e\7,\2\2\u0168\u017e\7.\2\2"+ - "\u0169\u017e\79\2\2\u016a\u016e\7\61\2\2\u016b\u016c\7\b\2\2\u016c\u016d"+ - "\7n\2\2\u016d\u016f\7\t\2\2\u016e\u016b\3\2\2\2\u016e\u016f\3\2\2\2\u016f"+ - "\u017e\3\2\2\2\u0170\u0171\7\63\2\2\u0171\u0172\7\b\2\2\u0172\u0177\5"+ - "\62\32\2\u0173\u0174\7\f\2\2\u0174\u0176\5\62\32\2\u0175\u0173\3\2\2\2"+ - "\u0176\u0179\3\2\2\2\u0177\u0175\3\2\2\2\u0177\u0178\3\2\2\2\u0178\u017a"+ - "\3\2\2\2\u0179\u0177\3\2\2\2\u017a\u017b\7\t\2\2\u017b\u017e\3\2\2\2\u017c"+ - "\u017e\7:\2\2\u017d\u0150\3\2\2\2\u017d\u0151\3\2\2\2\u017d\u0155\3\2"+ - "\2\2\u017d\u015b\3\2\2\2\u017d\u015c\3\2\2\2\u017d\u015d\3\2\2\2\u017d"+ - "\u0162\3\2\2\2\u017d\u0163\3\2\2\2\u017d\u0164\3\2\2\2\u017d\u0165\3\2"+ - "\2\2\u017d\u0166\3\2\2\2\u017d\u0167\3\2\2\2\u017d\u0168\3\2\2\2\u017d"+ - "\u0169\3\2\2\2\u017d\u016a\3\2\2\2\u017d\u0170\3\2\2\2\u017d\u017c\3\2"+ - "\2\2\u017e\65\3\2\2\2\u017f\u0181\58\35\2\u0180\u017f\3\2\2\2\u0181\u0182"+ - "\3\2\2\2\u0182\u0180\3\2\2\2\u0182\u0183\3\2\2\2\u0183\67\3\2\2\2\u0184"+ - "\u0185\5\n\6\2\u0185\u0186\7\n\2\2\u0186\u01df\3\2\2\2\u0187\u0189\7\4"+ - "\2\2\u0188\u018a\5\66\34\2\u0189\u0188\3\2\2\2\u0189\u018a\3\2\2\2\u018a"+ - "\u018b\3\2\2\2\u018b\u01df\7\5\2\2\u018c\u018d\5D#\2\u018d\u018e\7\n\2"+ - "\2\u018e\u01df\3\2\2\2\u018f\u0190\7;\2\2\u0190\u0191\7\b\2\2\u0191\u0192"+ - "\5D#\2\u0192\u0193\7\t\2\2\u0193\u0196\58\35\2\u0194\u0195\7<\2\2\u0195"+ - "\u0197\58\35\2\u0196\u0194\3\2\2\2\u0196\u0197\3\2\2\2\u0197\u01df\3\2"+ - "\2\2\u0198\u019a\5\64\33\2\u0199\u0198\3\2\2\2\u019a\u019d\3\2\2\2\u019b"+ - "\u0199\3\2\2\2\u019b\u019c\3\2\2\2\u019c\u019e\3\2\2\2\u019d\u019b\3\2"+ - "\2\2\u019e\u019f\7=\2\2\u019f\u01a0\7\b\2\2\u01a0\u01a1\5D#\2\u01a1\u01a2"+ - "\7\t\2\2\u01a2\u01a3\58\35\2\u01a3\u01df\3\2\2\2\u01a4\u01a6\5\64\33\2"+ - "\u01a5\u01a4\3\2\2\2\u01a6\u01a9\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7\u01a8"+ - "\3\2\2\2\u01a8\u01aa\3\2\2\2\u01a9\u01a7\3\2\2\2\u01aa\u01ab\7>\2\2\u01ab"+ - "\u01ac\58\35\2\u01ac\u01ad\7=\2\2\u01ad\u01ae\7\b\2\2\u01ae\u01af\5D#"+ - "\2\u01af\u01b0\7\t\2\2\u01b0\u01b1\7\n\2\2\u01b1\u01df\3\2\2\2\u01b2\u01b4"+ - "\5\64\33\2\u01b3\u01b2\3\2\2\2\u01b4\u01b7\3\2\2\2\u01b5\u01b3\3\2\2\2"+ - "\u01b5\u01b6\3\2\2\2\u01b6\u01b8\3\2\2\2\u01b7\u01b5\3\2\2\2\u01b8\u01b9"+ - "\7?\2\2\u01b9\u01ba\7\b\2\2\u01ba\u01bb\5> \2\u01bb\u01bc\7\t\2\2\u01bc"+ - "\u01bd\58\35\2\u01bd\u01df\3\2\2\2\u01be\u01bf\7@\2\2\u01bf\u01c0\7\b"+ - "\2\2\u01c0\u01c1\5D#\2\u01c1\u01c2\7\t\2\2\u01c2\u01c3\7\4\2\2\u01c3\u01c4"+ - "\5:\36\2\u01c4\u01c5\7\5\2\2\u01c5\u01df\3\2\2\2\u01c6\u01c8\7A\2\2\u01c7"+ - "\u01c9\5D#\2\u01c8\u01c7\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01ca\3\2\2"+ - "\2\u01ca\u01df\7\n\2\2\u01cb\u01cc\7B\2\2\u01cc\u01df\7\n\2\2\u01cd\u01ce"+ - "\7C\2\2\u01ce\u01df\7\n\2\2\u01cf\u01d1\7E\2\2\u01d0\u01d2\5L\'\2\u01d1"+ - "\u01d0\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2\u01d3\3\2\2\2\u01d3\u01d4\7\4"+ - "\2\2\u01d4\u01d5\5P)\2\u01d5\u01d6\7\u0087\2\2\u01d6\u01df\3\2\2\2\u01d7"+ - "\u01df\5J&\2\u01d8\u01df\7\n\2\2\u01d9\u01da\7n\2\2\u01da\u01df\7\13\2"+ - "\2\u01db\u01dc\7D\2\2\u01dc\u01dd\7n\2\2\u01dd\u01df\7\n\2\2\u01de\u0184"+ - "\3\2\2\2\u01de\u0187\3\2\2\2\u01de\u018c\3\2\2\2\u01de\u018f\3\2\2\2\u01de"+ - "\u019b\3\2\2\2\u01de\u01a7\3\2\2\2\u01de\u01b5\3\2\2\2\u01de\u01be\3\2"+ - "\2\2\u01de\u01c6\3\2\2\2\u01de\u01cb\3\2\2\2\u01de\u01cd\3\2\2\2\u01de"+ - "\u01cf\3\2\2\2\u01de\u01d7\3\2\2\2\u01de\u01d8\3\2\2\2\u01de\u01d9\3\2"+ - "\2\2\u01de\u01db\3\2\2\2\u01df9\3\2\2\2\u01e0\u01e2\5<\37\2\u01e1\u01e0"+ - "\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e1\3\2\2\2\u01e3\u01e4\3\2\2\2\u01e4"+ - "\u01ea\3\2\2\2\u01e5\u01e6\7F\2\2\u01e6\u01e8\7\13\2\2\u01e7\u01e9\5\66"+ - "\34\2\u01e8\u01e7\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01eb\3\2\2\2\u01ea"+ - "\u01e5\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb;\3\2\2\2\u01ec\u01ed\7G\2\2\u01ed"+ - "\u01ee\5F$\2\u01ee\u01f0\7\13\2\2\u01ef\u01f1\5\66\34\2\u01f0\u01ef\3"+ - "\2\2\2\u01f0\u01f1\3\2\2\2\u01f1=\3\2\2\2\u01f2\u01f3\5@!\2\u01f3\u01f5"+ - "\7\n\2\2\u01f4\u01f6\5B\"\2\u01f5\u01f4\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ + "$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\5$\u0287\n$\3"+ + "$\3$\3$\3$\3$\3$\3$\3$\7$\u0291\n$\f$\16$\u0294\13$\3%\3%\3%\7%\u0299"+ + "\n%\f%\16%\u029c\13%\3&\3&\5&\u02a0\n&\3&\3&\3\'\3\'\3\'\3\'\7\'\u02a8"+ + "\n\'\f\'\16\'\u02ab\13\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\3(\5(\u02b9"+ + "\n(\3)\7)\u02bc\n)\f)\16)\u02bf\13)\3*\3*\3*\5*\u02c4\n*\3+\3+\3+\7+\u02c9"+ + "\n+\f+\16+\u02cc\13+\3+\3+\3+\3+\3+\7+\u02d3\n+\f+\16+\u02d6\13+\3+\3"+ + "+\3+\7+\u02db\n+\f+\16+\u02de\13+\5+\u02e0\n+\3,\3,\5,\u02e4\n,\3,\7,"+ + "\u02e7\n,\f,\16,\u02ea\13,\3-\3-\3-\3-\7-\u02f0\n-\f-\16-\u02f3\13-\3"+ + "-\7-\u02f6\n-\f-\16-\u02f9\13-\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3."+ + "\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3.\3."+ + "\3.\3.\3.\3.\3.\3.\3.\3.\3.\5.\u0328\n.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/"+ + "\3/\3/\3/\3/\5/\u0338\n/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\7/\u0346"+ + "\n/\f/\16/\u0349\13/\3/\2\t\f\26\30&DF\\\60\2\4\6\b\n\f\16\20\22\24\26"+ + "\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\\2\r\3\2HI\3\2\27"+ + "\30\5\2\22\23\31\32TT\3\2\35\36\3\2\24\26\3\2\22\23\3\2\37$\3\2\u0080"+ + "\u0083\3\2~\177\3\2\u0084\u0085\3\2\u0080\u0081\2\u03c8\2^\3\2\2\2\4a"+ + "\3\2\2\2\6g\3\2\2\2\bx\3\2\2\2\nz\3\2\2\2\f}\3\2\2\2\16\u0091\3\2\2\2"+ + "\20\u0093\3\2\2\2\22\u009b\3\2\2\2\24\u00a5\3\2\2\2\26\u00b5\3\2\2\2\30"+ + "\u00d7\3\2\2\2\32\u00f4\3\2\2\2\34\u00f6\3\2\2\2\36\u00f9\3\2\2\2 \u0105"+ + "\3\2\2\2\"\u0108\3\2\2\2$\u010b\3\2\2\2&\u0113\3\2\2\2(\u011e\3\2\2\2"+ + "*\u0123\3\2\2\2,\u012b\3\2\2\2.\u0138\3\2\2\2\60\u013a\3\2\2\2\62\u014e"+ + "\3\2\2\2\64\u017d\3\2\2\2\66\u0180\3\2\2\28\u01de\3\2\2\2:\u01e1\3\2\2"+ + "\2<\u01ec\3\2\2\2>\u0202\3\2\2\2@\u0208\3\2\2\2B\u020a\3\2\2\2D\u020c"+ + "\3\2\2\2F\u0254\3\2\2\2H\u0295\3\2\2\2J\u029d\3\2\2\2L\u02a3\3\2\2\2N"+ + "\u02b8\3\2\2\2P\u02bd\3\2\2\2R\u02c3\3\2\2\2T\u02df\3\2\2\2V\u02e1\3\2"+ + "\2\2X\u02eb\3\2\2\2Z\u0327\3\2\2\2\\\u0337\3\2\2\2^_\5\6\4\2_`\7\2\2\3"+ + "`\3\3\2\2\2ab\5P)\2bc\7\2\2\3c\5\3\2\2\2df\5\b\5\2ed\3\2\2\2fi\3\2\2\2"+ + "ge\3\2\2\2gh\3\2\2\2h\7\3\2\2\2ig\3\2\2\2jk\5\n\6\2kl\7\n\2\2ly\3\2\2"+ + "\2my\5*\26\2no\5\36\20\2op\7\n\2\2py\3\2\2\2qr\5$\23\2rs\7\n\2\2sy\3\2"+ + "\2\2ty\5\60\31\2uv\5\20\t\2vw\7\n\2\2wy\3\2\2\2xj\3\2\2\2xm\3\2\2\2xn"+ + "\3\2\2\2xq\3\2\2\2xt\3\2\2\2xu\3\2\2\2y\t\3\2\2\2z{\5\22\n\2{|\5\f\7\2"+ + "|\13\3\2\2\2}~\b\7\1\2~\177\5\16\b\2\177\u0085\3\2\2\2\u0080\u0081\f\3"+ + "\2\2\u0081\u0082\7\f\2\2\u0082\u0084\5\16\b\2\u0083\u0080\3\2\2\2\u0084"+ + "\u0087\3\2\2\2\u0085\u0083\3\2\2\2\u0085\u0086\3\2\2\2\u0086\r\3\2\2\2"+ + "\u0087\u0085\3\2\2\2\u0088\u008b\5\30\r\2\u0089\u008a\7\'\2\2\u008a\u008c"+ + "\5F$\2\u008b\u0089\3\2\2\2\u008b\u008c\3\2\2\2\u008c\u0092\3\2\2\2\u008d"+ + "\u008e\5\30\r\2\u008e\u008f\7\'\2\2\u008f\u0090\5J&\2\u0090\u0092\3\2"+ + "\2\2\u0091\u0088\3\2\2\2\u0091\u008d\3\2\2\2\u0092\17\3\2\2\2\u0093\u0094"+ + "\7)\2\2\u0094\u0095\5\22\n\2\u0095\u0096\b\t\1\2\u0096\u0097\5\30\r\2"+ + "\u0097\21\3\2\2\2\u0098\u009a\5\64\33\2\u0099\u0098\3\2\2\2\u009a\u009d"+ + "\3\2\2\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009e\3\2\2\2\u009d"+ + "\u009b\3\2\2\2\u009e\u00a2\5\32\16\2\u009f\u00a1\5\64\33\2\u00a0\u009f"+ + "\3\2\2\2\u00a1\u00a4\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3"+ + "\23\3\2\2\2\u00a4\u00a2\3\2\2\2\u00a5\u00a6\5\32\16\2\u00a6\u00a7\5\26"+ + "\f\2\u00a7\25\3\2\2\2\u00a8\u00b6\b\f\1\2\u00a9\u00ad\7\24\2\2\u00aa\u00ac"+ + "\5\64\33\2\u00ab\u00aa\3\2\2\2\u00ac\u00af\3\2\2\2\u00ad\u00ab\3\2\2\2"+ + "\u00ad\u00ae\3\2\2\2\u00ae\u00b0\3\2\2\2\u00af\u00ad\3\2\2\2\u00b0\u00b6"+ + "\5\26\f\4\u00b1\u00b2\7\b\2\2\u00b2\u00b3\5\26\f\2\u00b3\u00b4\7\t\2\2"+ + "\u00b4\u00b6\3\2\2\2\u00b5\u00a8\3\2\2\2\u00b5\u00a9\3\2\2\2\u00b5\u00b1"+ + "\3\2\2\2\u00b6\u00c5\3\2\2\2\u00b7\u00b8\f\6\2\2\u00b8\u00ba\7\b\2\2\u00b9"+ + "\u00bb\5,\27\2\u00ba\u00b9\3\2\2\2\u00ba\u00bb\3\2\2\2\u00bb\u00bc\3\2"+ + "\2\2\u00bc\u00c4\7\t\2\2\u00bd\u00be\f\5\2\2\u00be\u00c0\7\6\2\2\u00bf"+ + "\u00c1\5F$\2\u00c0\u00bf\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c2\3\2\2"+ + "\2\u00c2\u00c4\7\7\2\2\u00c3\u00b7\3\2\2\2\u00c3\u00bd\3\2\2\2\u00c4\u00c7"+ + "\3\2\2\2\u00c5\u00c3\3\2\2\2\u00c5\u00c6\3\2\2\2\u00c6\27\3\2\2\2\u00c7"+ + "\u00c5\3\2\2\2\u00c8\u00c9\b\r\1\2\u00c9\u00ca\7n\2\2\u00ca\u00d8\b\r"+ + "\1\2\u00cb\u00cf\7\24\2\2\u00cc\u00ce\5\64\33\2\u00cd\u00cc\3\2\2\2\u00ce"+ + "\u00d1\3\2\2\2\u00cf\u00cd\3\2\2\2\u00cf\u00d0\3\2\2\2\u00d0\u00d2\3\2"+ + "\2\2\u00d1\u00cf\3\2\2\2\u00d2\u00d8\5\30\r\4\u00d3\u00d4\7\b\2\2\u00d4"+ + "\u00d5\5\30\r\2\u00d5\u00d6\7\t\2\2\u00d6\u00d8\3\2\2\2\u00d7\u00c8\3"+ + "\2\2\2\u00d7\u00cb\3\2\2\2\u00d7\u00d3\3\2\2\2\u00d8\u00e7\3\2\2\2\u00d9"+ + "\u00da\f\6\2\2\u00da\u00dc\7\b\2\2\u00db\u00dd\5,\27\2\u00dc\u00db\3\2"+ + "\2\2\u00dc\u00dd\3\2\2\2\u00dd\u00de\3\2\2\2\u00de\u00e6\7\t\2\2\u00df"+ + "\u00e0\f\5\2\2\u00e0\u00e2\7\6\2\2\u00e1\u00e3\5F$\2\u00e2\u00e1\3\2\2"+ + "\2\u00e2\u00e3\3\2\2\2\u00e3\u00e4\3\2\2\2\u00e4\u00e6\7\7\2\2\u00e5\u00d9"+ + "\3\2\2\2\u00e5\u00df\3\2\2\2\u00e6\u00e9\3\2\2\2\u00e7\u00e5\3\2\2\2\u00e7"+ + "\u00e8\3\2\2\2\u00e8\31\3\2\2\2\u00e9\u00e7\3\2\2\2\u00ea\u00ec\7U\2\2"+ + "\u00eb\u00ea\3\2\2\2\u00ec\u00ed\3\2\2\2\u00ed\u00eb\3\2\2\2\u00ed\u00ee"+ + "\3\2\2\2\u00ee\u00f5\3\2\2\2\u00ef\u00f5\5\36\20\2\u00f0\u00f5\5\34\17"+ + "\2\u00f1\u00f5\5$\23\2\u00f2\u00f5\5\"\22\2\u00f3\u00f5\7\3\2\2\u00f4"+ + "\u00eb\3\2\2\2\u00f4\u00ef\3\2\2\2\u00f4\u00f0\3\2\2\2\u00f4\u00f1\3\2"+ + "\2\2\u00f4\u00f2\3\2\2\2\u00f4\u00f3\3\2\2\2\u00f5\33\3\2\2\2\u00f6\u00f7"+ + "\t\2\2\2\u00f7\u00f8\7n\2\2\u00f8\35\3\2\2\2\u00f9\u00fb\t\2\2\2\u00fa"+ + "\u00fc\7n\2\2\u00fb\u00fa\3\2\2\2\u00fb\u00fc\3\2\2\2\u00fc\u00fd\3\2"+ + "\2\2\u00fd\u00ff\7\4\2\2\u00fe\u0100\5 \21\2\u00ff\u00fe\3\2\2\2\u0100"+ + "\u0101\3\2\2\2\u0101\u00ff\3\2\2\2\u0101\u0102\3\2\2\2\u0102\u0103\3\2"+ + "\2\2\u0103\u0104\7\5\2\2\u0104\37\3\2\2\2\u0105\u0106\5\n\6\2\u0106\u0107"+ + "\7\n\2\2\u0107!\3\2\2\2\u0108\u0109\7J\2\2\u0109\u010a\7n\2\2\u010a#\3"+ + "\2\2\2\u010b\u010d\7J\2\2\u010c\u010e\7n\2\2\u010d\u010c\3\2\2\2\u010d"+ + "\u010e\3\2\2\2\u010e\u010f\3\2\2\2\u010f\u0110\7\4\2\2\u0110\u0111\5&"+ + "\24\2\u0111\u0112\7\5\2\2\u0112%\3\2\2\2\u0113\u0114\b\24\1\2\u0114\u0115"+ + "\5(\25\2\u0115\u011b\3\2\2\2\u0116\u0117\f\3\2\2\u0117\u0118\7\f\2\2\u0118"+ + "\u011a\5(\25\2\u0119\u0116\3\2\2\2\u011a\u011d\3\2\2\2\u011b\u0119\3\2"+ + "\2\2\u011b\u011c\3\2\2\2\u011c\'\3\2\2\2\u011d\u011b\3\2\2\2\u011e\u0121"+ + "\7n\2\2\u011f\u0120\7\'\2\2\u0120\u0122\5F$\2\u0121\u011f\3\2\2\2\u0121"+ + "\u0122\3\2\2\2\u0122)\3\2\2\2\u0123\u0124\5\22\n\2\u0124\u0125\5\30\r"+ + "\2\u0125\u0127\7\4\2\2\u0126\u0128\5\66\34\2\u0127\u0126\3\2\2\2\u0127"+ + "\u0128\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012a\7\5\2\2\u012a+\3\2\2\2"+ + "\u012b\u0130\5.\30\2\u012c\u012d\7\f\2\2\u012d\u012f\5.\30\2\u012e\u012c"+ + "\3\2\2\2\u012f\u0132\3\2\2\2\u0130\u012e\3\2\2\2\u0130\u0131\3\2\2\2\u0131"+ + "-\3\2\2\2\u0132\u0130\3\2\2\2\u0133\u0134\5\22\n\2\u0134\u0135\5\30\r"+ + "\2\u0135\u0139\3\2\2\2\u0136\u0139\5\24\13\2\u0137\u0139\7\16\2\2\u0138"+ + "\u0133\3\2\2\2\u0138\u0136\3\2\2\2\u0138\u0137\3\2\2\2\u0139/\3\2\2\2"+ + "\u013a\u013b\7Z\2\2\u013b\u013c\7n\2\2\u013c\u013d\7\b\2\2\u013d\u0142"+ + "\5\62\32\2\u013e\u013f\7\f\2\2\u013f\u0141\5\62\32\2\u0140\u013e\3\2\2"+ + "\2\u0141\u0144\3\2\2\2\u0142\u0140\3\2\2\2\u0142\u0143\3\2\2\2\u0143\u0145"+ + "\3\2\2\2\u0144\u0142\3\2\2\2\u0145\u0146\7\t\2\2\u0146\61\3\2\2\2\u0147"+ + "\u014f\7e\2\2\u0148\u0149\7e\2\2\u0149\u014a\7\r\2\2\u014a\u014f\7e\2"+ + "\2\u014b\u014f\7n\2\2\u014c\u014f\7o\2\2\u014d\u014f\7:\2\2\u014e\u0147"+ + "\3\2\2\2\u014e\u0148\3\2\2\2\u014e\u014b\3\2\2\2\u014e\u014c\3\2\2\2\u014e"+ + "\u014d\3\2\2\2\u014f\63\3\2\2\2\u0150\u017e\7*\2\2\u0151\u0152\7-\2\2"+ + "\u0152\u0153\7\b\2\2\u0153\u0154\7e\2\2\u0154\u017e\7\t\2\2\u0155\u0159"+ + "\7\62\2\2\u0156\u0157\7\b\2\2\u0157\u0158\7n\2\2\u0158\u015a\7\t\2\2\u0159"+ + "\u0156\3\2\2\2\u0159\u015a\3\2\2\2\u015a\u017e\3\2\2\2\u015b\u017e\7\65"+ + "\2\2\u015c\u017e\7\66\2\2\u015d\u015e\7\64\2\2\u015e\u015f\7\b\2\2\u015f"+ + "\u0160\5F$\2\u0160\u0161\7\t\2\2\u0161\u017e\3\2\2\2\u0162\u017e\7/\2"+ + "\2\u0163\u017e\7\60\2\2\u0164\u017e\7\67\2\2\u0165\u017e\78\2\2\u0166"+ + "\u017e\7+\2\2\u0167\u017e\7,\2\2\u0168\u017e\7.\2\2\u0169\u017e\79\2\2"+ + "\u016a\u016e\7\61\2\2\u016b\u016c\7\b\2\2\u016c\u016d\7n\2\2\u016d\u016f"+ + "\7\t\2\2\u016e\u016b\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u017e\3\2\2\2\u0170"+ + "\u0171\7\63\2\2\u0171\u0172\7\b\2\2\u0172\u0177\5\62\32\2\u0173\u0174"+ + "\7\f\2\2\u0174\u0176\5\62\32\2\u0175\u0173\3\2\2\2\u0176\u0179\3\2\2\2"+ + "\u0177\u0175\3\2\2\2\u0177\u0178\3\2\2\2\u0178\u017a\3\2\2\2\u0179\u0177"+ + "\3\2\2\2\u017a\u017b\7\t\2\2\u017b\u017e\3\2\2\2\u017c\u017e\7:\2\2\u017d"+ + "\u0150\3\2\2\2\u017d\u0151\3\2\2\2\u017d\u0155\3\2\2\2\u017d\u015b\3\2"+ + "\2\2\u017d\u015c\3\2\2\2\u017d\u015d\3\2\2\2\u017d\u0162\3\2\2\2\u017d"+ + "\u0163\3\2\2\2\u017d\u0164\3\2\2\2\u017d\u0165\3\2\2\2\u017d\u0166\3\2"+ + "\2\2\u017d\u0167\3\2\2\2\u017d\u0168\3\2\2\2\u017d\u0169\3\2\2\2\u017d"+ + "\u016a\3\2\2\2\u017d\u0170\3\2\2\2\u017d\u017c\3\2\2\2\u017e\65\3\2\2"+ + "\2\u017f\u0181\58\35\2\u0180\u017f\3\2\2\2\u0181\u0182\3\2\2\2\u0182\u0180"+ + "\3\2\2\2\u0182\u0183\3\2\2\2\u0183\67\3\2\2\2\u0184\u0185\5\n\6\2\u0185"+ + "\u0186\7\n\2\2\u0186\u01df\3\2\2\2\u0187\u0189\7\4\2\2\u0188\u018a\5\66"+ + "\34\2\u0189\u0188\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018b\3\2\2\2\u018b"+ + "\u01df\7\5\2\2\u018c\u018d\5D#\2\u018d\u018e\7\n\2\2\u018e\u01df\3\2\2"+ + "\2\u018f\u0190\7;\2\2\u0190\u0191\7\b\2\2\u0191\u0192\5D#\2\u0192\u0193"+ + "\7\t\2\2\u0193\u0196\58\35\2\u0194\u0195\7<\2\2\u0195\u0197\58\35\2\u0196"+ + "\u0194\3\2\2\2\u0196\u0197\3\2\2\2\u0197\u01df\3\2\2\2\u0198\u019a\5\64"+ + "\33\2\u0199\u0198\3\2\2\2\u019a\u019d\3\2\2\2\u019b\u0199\3\2\2\2\u019b"+ + "\u019c\3\2\2\2\u019c\u019e\3\2\2\2\u019d\u019b\3\2\2\2\u019e\u019f\7="+ + "\2\2\u019f\u01a0\7\b\2\2\u01a0\u01a1\5D#\2\u01a1\u01a2\7\t\2\2\u01a2\u01a3"+ + "\58\35\2\u01a3\u01df\3\2\2\2\u01a4\u01a6\5\64\33\2\u01a5\u01a4\3\2\2\2"+ + "\u01a6\u01a9\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7\u01a8\3\2\2\2\u01a8\u01aa"+ + "\3\2\2\2\u01a9\u01a7\3\2\2\2\u01aa\u01ab\7>\2\2\u01ab\u01ac\58\35\2\u01ac"+ + "\u01ad\7=\2\2\u01ad\u01ae\7\b\2\2\u01ae\u01af\5D#\2\u01af\u01b0\7\t\2"+ + "\2\u01b0\u01b1\7\n\2\2\u01b1\u01df\3\2\2\2\u01b2\u01b4\5\64\33\2\u01b3"+ + "\u01b2\3\2\2\2\u01b4\u01b7\3\2\2\2\u01b5\u01b3\3\2\2\2\u01b5\u01b6\3\2"+ + "\2\2\u01b6\u01b8\3\2\2\2\u01b7\u01b5\3\2\2\2\u01b8\u01b9\7?\2\2\u01b9"+ + "\u01ba\7\b\2\2\u01ba\u01bb\5> \2\u01bb\u01bc\7\t\2\2\u01bc\u01bd\58\35"+ + "\2\u01bd\u01df\3\2\2\2\u01be\u01bf\7@\2\2\u01bf\u01c0\7\b\2\2\u01c0\u01c1"+ + "\5D#\2\u01c1\u01c2\7\t\2\2\u01c2\u01c3\7\4\2\2\u01c3\u01c4\5:\36\2\u01c4"+ + "\u01c5\7\5\2\2\u01c5\u01df\3\2\2\2\u01c6\u01c8\7A\2\2\u01c7\u01c9\5D#"+ + "\2\u01c8\u01c7\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01ca\3\2\2\2\u01ca\u01df"+ + "\7\n\2\2\u01cb\u01cc\7B\2\2\u01cc\u01df\7\n\2\2\u01cd\u01ce\7C\2\2\u01ce"+ + "\u01df\7\n\2\2\u01cf\u01d1\7E\2\2\u01d0\u01d2\5L\'\2\u01d1\u01d0\3\2\2"+ + "\2\u01d1\u01d2\3\2\2\2\u01d2\u01d3\3\2\2\2\u01d3\u01d4\7\4\2\2\u01d4\u01d5"+ + "\5P)\2\u01d5\u01d6\7\u0087\2\2\u01d6\u01df\3\2\2\2\u01d7\u01df\5J&\2\u01d8"+ + "\u01df\7\n\2\2\u01d9\u01da\7n\2\2\u01da\u01df\7\13\2\2\u01db\u01dc\7D"+ + "\2\2\u01dc\u01dd\7n\2\2\u01dd\u01df\7\n\2\2\u01de\u0184\3\2\2\2\u01de"+ + "\u0187\3\2\2\2\u01de\u018c\3\2\2\2\u01de\u018f\3\2\2\2\u01de\u019b\3\2"+ + "\2\2\u01de\u01a7\3\2\2\2\u01de\u01b5\3\2\2\2\u01de\u01be\3\2\2\2\u01de"+ + "\u01c6\3\2\2\2\u01de\u01cb\3\2\2\2\u01de\u01cd\3\2\2\2\u01de\u01cf\3\2"+ + "\2\2\u01de\u01d7\3\2\2\2\u01de\u01d8\3\2\2\2\u01de\u01d9\3\2\2\2\u01de"+ + "\u01db\3\2\2\2\u01df9\3\2\2\2\u01e0\u01e2\5<\37\2\u01e1\u01e0\3\2\2\2"+ + "\u01e2\u01e3\3\2\2\2\u01e3\u01e1\3\2\2\2\u01e3\u01e4\3\2\2\2\u01e4\u01ea"+ + "\3\2\2\2\u01e5\u01e6\7F\2\2\u01e6\u01e8\7\13\2\2\u01e7\u01e9\5\66\34\2"+ + "\u01e8\u01e7\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01eb\3\2\2\2\u01ea\u01e5"+ + "\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb;\3\2\2\2\u01ec\u01ed\7G\2\2\u01ed\u01ee"+ + "\5F$\2\u01ee\u01f0\7\13\2\2\u01ef\u01f1\5\66\34\2\u01f0\u01ef\3\2\2\2"+ + "\u01f0\u01f1\3\2\2\2\u01f1=\3\2\2\2\u01f2\u01f3\5@!\2\u01f3\u01f5\7\n"+ + "\2\2\u01f4\u01f6\5B\"\2\u01f5\u01f4\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6"+ "\u01f7\3\2\2\2\u01f7\u01f9\7\n\2\2\u01f8\u01fa\5D#\2\u01f9\u01f8\3\2\2"+ "\2\u01f9\u01fa\3\2\2\2\u01fa\u0203\3\2\2\2\u01fb\u01fc\5\22\n\2\u01fc"+ "\u01fd\5\30\r\2\u01fd\u01fe\7\13\2\2\u01fe\u01ff\5F$\2\u01ff\u0200\7\r"+ @@ -7544,119 +7547,119 @@ public class KickCParser extends Parser { "\f\3\2\2\u0210\u0211\7\f\2\2\u0211\u0213\5F$\2\u0212\u020f\3\2\2\2\u0213"+ "\u0216\3\2\2\2\u0214\u0212\3\2\2\2\u0214\u0215\3\2\2\2\u0215E\3\2\2\2"+ "\u0216\u0214\3\2\2\2\u0217\u0218\b$\1\2\u0218\u0219\7\b\2\2\u0219\u021a"+ - "\5D#\2\u021a\u021b\7\t\2\2\u021b\u025d\3\2\2\2\u021c\u021e\7K\2\2\u021d"+ - "\u021f\7\b\2\2\u021e\u021d\3\2\2\2\u021e\u021f\3\2\2\2\u021f\u0222\3\2"+ - "\2\2\u0220\u0223\5F$\2\u0221\u0223\5\24\13\2\u0222\u0220\3\2\2\2\u0222"+ - "\u0221\3\2\2\2\u0223\u0225\3\2\2\2\u0224\u0226\7\t\2\2\u0225\u0224\3\2"+ - "\2\2\u0225\u0226\3\2\2\2\u0226\u025d\3\2\2\2\u0227\u0229\7L\2\2\u0228"+ - "\u022a\7\b\2\2\u0229\u0228\3\2\2\2\u0229\u022a\3\2\2\2\u022a\u022d\3\2"+ - "\2\2\u022b\u022e\5F$\2\u022c\u022e\5\24\13\2\u022d\u022b\3\2\2\2\u022d"+ - "\u022c\3\2\2\2\u022e\u0230\3\2\2\2\u022f\u0231\7\t\2\2\u0230\u022f\3\2"+ - "\2\2\u0230\u0231\3\2\2\2\u0231\u025d\3\2\2\2\u0232\u0234\7M\2\2\u0233"+ - "\u0235\7\b\2\2\u0234\u0233\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u0236\3\2"+ - "\2\2\u0236\u0238\7n\2\2\u0237\u0239\7\t\2\2\u0238\u0237\3\2\2\2\u0238"+ - "\u0239\3\2\2\2\u0239\u025d\3\2\2\2\u023a\u023b\7\b\2\2\u023b\u023c\5\24"+ - "\13\2\u023c\u023d\7\t\2\2\u023d\u023e\5F$\31\u023e\u025d\3\2\2\2\u023f"+ - "\u0240\t\3\2\2\u0240\u025d\5F$\30\u0241\u0242\7\24\2\2\u0242\u025d\5F"+ - "$\26\u0243\u0244\t\4\2\2\u0244\u025d\5F$\25\u0245\u0246\7\4\2\2\u0246"+ - "\u024b\5F$\2\u0247\u0248\7\f\2\2\u0248\u024a\5F$\2\u0249\u0247\3\2\2\2"+ - "\u024a\u024d\3\2\2\2\u024b\u0249\3\2\2\2\u024b\u024c\3\2\2\2\u024c\u024f"+ - "\3\2\2\2\u024d\u024b\3\2\2\2\u024e\u0250\7\f\2\2\u024f\u024e\3\2\2\2\u024f"+ - "\u0250\3\2\2\2\u0250\u0251\3\2\2\2\u0251\u0252\7\5\2\2\u0252\u025d\3\2"+ - "\2\2\u0253\u025d\7n\2\2\u0254\u025d\7e\2\2\u0255\u0257\7o\2\2\u0256\u0255"+ - "\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u0256\3\2\2\2\u0258\u0259\3\2\2\2\u0259"+ - "\u025d\3\2\2\2\u025a\u025d\7p\2\2\u025b\u025d\7V\2\2\u025c\u0217\3\2\2"+ - "\2\u025c\u021c\3\2\2\2\u025c\u0227\3\2\2\2\u025c\u0232\3\2\2\2\u025c\u023a"+ - "\3\2\2\2\u025c\u023f\3\2\2\2\u025c\u0241\3\2\2\2\u025c\u0243\3\2\2\2\u025c"+ - "\u0245\3\2\2\2\u025c\u0253\3\2\2\2\u025c\u0254\3\2\2\2\u025c\u0256\3\2"+ - "\2\2\u025c\u025a\3\2\2\2\u025c\u025b\3\2\2\2\u025d\u029a\3\2\2\2\u025e"+ - "\u025f\f\24\2\2\u025f\u0260\t\5\2\2\u0260\u0299\5F$\25\u0261\u0262\f\23"+ - "\2\2\u0262\u0263\t\6\2\2\u0263\u0299\5F$\24\u0264\u0265\f\22\2\2\u0265"+ - "\u0266\t\7\2\2\u0266\u0299\5F$\23\u0267\u0268\f\21\2\2\u0268\u0269\t\b"+ - "\2\2\u0269\u0299\5F$\22\u026a\u026b\f\20\2\2\u026b\u026c\7\31\2\2\u026c"+ - "\u0299\5F$\21\u026d\u026e\f\17\2\2\u026e\u026f\7\33\2\2\u026f\u0299\5"+ - "F$\20\u0270\u0271\f\16\2\2\u0271\u0272\7\34\2\2\u0272\u0299\5F$\17\u0273"+ - "\u0274\f\r\2\2\u0274\u0275\7%\2\2\u0275\u0299\5F$\16\u0276\u0277\f\f\2"+ - "\2\u0277\u0278\7&\2\2\u0278\u0299\5F$\r\u0279\u027a\f\13\2\2\u027a\u027b"+ - "\7\17\2\2\u027b\u027c\5F$\2\u027c\u027d\7\13\2\2\u027d\u027e\5F$\f\u027e"+ - "\u0299\3\2\2\2\u027f\u0280\f\n\2\2\u0280\u0281\7\'\2\2\u0281\u0299\5F"+ - "$\n\u0282\u0283\f\t\2\2\u0283\u0284\7(\2\2\u0284\u0299\5F$\t\u0285\u0286"+ - "\f \2\2\u0286\u0287\7\20\2\2\u0287\u0299\7n\2\2\u0288\u0289\f\37\2\2\u0289"+ - "\u028a\7\21\2\2\u028a\u0299\7n\2\2\u028b\u028c\f\36\2\2\u028c\u028e\7"+ - "\b\2\2\u028d\u028f\5H%\2\u028e\u028d\3\2\2\2\u028e\u028f\3\2\2\2\u028f"+ - "\u0290\3\2\2\2\u0290\u0299\7\t\2\2\u0291\u0292\f\32\2\2\u0292\u0293\7"+ - "\6\2\2\u0293\u0294\5D#\2\u0294\u0295\7\7\2\2\u0295\u0299\3\2\2\2\u0296"+ - "\u0297\f\27\2\2\u0297\u0299\t\3\2\2\u0298\u025e\3\2\2\2\u0298\u0261\3"+ - "\2\2\2\u0298\u0264\3\2\2\2\u0298\u0267\3\2\2\2\u0298\u026a\3\2\2\2\u0298"+ - "\u026d\3\2\2\2\u0298\u0270\3\2\2\2\u0298\u0273\3\2\2\2\u0298\u0276\3\2"+ - "\2\2\u0298\u0279\3\2\2\2\u0298\u027f\3\2\2\2\u0298\u0282\3\2\2\2\u0298"+ - "\u0285\3\2\2\2\u0298\u0288\3\2\2\2\u0298\u028b\3\2\2\2\u0298\u0291\3\2"+ - "\2\2\u0298\u0296\3\2\2\2\u0299\u029c\3\2\2\2\u029a\u0298\3\2\2\2\u029a"+ - "\u029b\3\2\2\2\u029bG\3\2\2\2\u029c\u029a\3\2\2\2\u029d\u02a2\5F$\2\u029e"+ - "\u029f\7\f\2\2\u029f\u02a1\5F$\2\u02a0\u029e\3\2\2\2\u02a1\u02a4\3\2\2"+ - "\2\u02a2\u02a0\3\2\2\2\u02a2\u02a3\3\2\2\2\u02a3I\3\2\2\2\u02a4\u02a2"+ - "\3\2\2\2\u02a5\u02a7\7N\2\2\u02a6\u02a8\5L\'\2\u02a7\u02a6\3\2\2\2\u02a7"+ - "\u02a8\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9\u02aa\7W\2\2\u02aaK\3\2\2\2\u02ab"+ - "\u02ac\7\b\2\2\u02ac\u02b1\5N(\2\u02ad\u02ae\7\f\2\2\u02ae\u02b0\5N(\2"+ - "\u02af\u02ad\3\2\2\2\u02b0\u02b3\3\2\2\2\u02b1\u02af\3\2\2\2\u02b1\u02b2"+ - "\3\2\2\2\u02b2\u02b4\3\2\2\2\u02b3\u02b1\3\2\2\2\u02b4\u02b5\7\t\2\2\u02b5"+ - "M\3\2\2\2\u02b6\u02b7\7O\2\2\u02b7\u02c1\7o\2\2\u02b8\u02b9\7P\2\2\u02b9"+ - "\u02c1\7n\2\2\u02ba\u02bb\7Q\2\2\u02bb\u02c1\7o\2\2\u02bc\u02bd\7R\2\2"+ - "\u02bd\u02c1\5F$\2\u02be\u02bf\7S\2\2\u02bf\u02c1\5F$\2\u02c0\u02b6\3"+ - "\2\2\2\u02c0\u02b8\3\2\2\2\u02c0\u02ba\3\2\2\2\u02c0\u02bc\3\2\2\2\u02c0"+ - "\u02be\3\2\2\2\u02c1O\3\2\2\2\u02c2\u02c4\5R*\2\u02c3\u02c2\3\2\2\2\u02c4"+ - "\u02c7\3\2\2\2\u02c5\u02c3\3\2\2\2\u02c5\u02c6\3\2\2\2\u02c6Q\3\2\2\2"+ - "\u02c7\u02c5\3\2\2\2\u02c8\u02cc\5T+\2\u02c9\u02cc\5V,\2\u02ca\u02cc\5"+ - "X-\2\u02cb\u02c8\3\2\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc"+ - "S\3\2\2\2\u02cd\u02ce\7\u0094\2\2\u02ce\u02d2\7w\2\2\u02cf\u02d1\7\u0095"+ - "\2\2\u02d0\u02cf\3\2\2\2\u02d1\u02d4\3\2\2\2\u02d2\u02d0\3\2\2\2\u02d2"+ - "\u02d3\3\2\2\2\u02d3\u02de\3\2\2\2\u02d4\u02d2\3\2\2\2\u02d5\u02d6\7\u0093"+ - "\2\2\u02d6\u02da\7w\2\2\u02d7\u02d9\7\u0095\2\2\u02d8\u02d7\3\2\2\2\u02d9"+ - "\u02dc\3\2\2\2\u02da\u02d8\3\2\2\2\u02da\u02db\3\2\2\2\u02db\u02de\3\2"+ - "\2\2\u02dc\u02da\3\2\2\2\u02dd\u02cd\3\2\2\2\u02dd\u02d5\3\2\2\2\u02de"+ - "U\3\2\2\2\u02df\u02e1\7u\2\2\u02e0\u02e2\5Z.\2\u02e1\u02e0\3\2\2\2\u02e1"+ - "\u02e2\3\2\2\2\u02e2\u02e6\3\2\2\2\u02e3\u02e5\7\u0095\2\2\u02e4\u02e3"+ - "\3\2\2\2\u02e5\u02e8\3\2\2\2\u02e6\u02e4\3\2\2\2\u02e6\u02e7\3\2\2\2\u02e7"+ - "W\3\2\2\2\u02e8\u02e6\3\2\2\2\u02e9\u02ea\7t\2\2\u02ea\u02ef\5\\/\2\u02eb"+ - "\u02ec\7x\2\2\u02ec\u02ee\5\\/\2\u02ed\u02eb\3\2\2\2\u02ee\u02f1\3\2\2"+ - "\2\u02ef\u02ed\3\2\2\2\u02ef\u02f0\3\2\2\2\u02f0\u02f5\3\2\2\2\u02f1\u02ef"+ - "\3\2\2\2\u02f2\u02f4\7\u0095\2\2\u02f3\u02f2\3\2\2\2\u02f4\u02f7\3\2\2"+ - "\2\u02f5\u02f3\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6Y\3\2\2\2\u02f7\u02f5"+ - "\3\2\2\2\u02f8\u0326\5\\/\2\u02f9\u02fa\7v\2\2\u02fa\u0326\5\\/\2\u02fb"+ - "\u02fc\5\\/\2\u02fc\u02fd\7x\2\2\u02fd\u02fe\5\\/\2\u02fe\u0326\3\2\2"+ - "\2\u02ff\u0300\7y\2\2\u0300\u0301\5\\/\2\u0301\u0302\7z\2\2\u0302\u0303"+ - "\7x\2\2\u0303\u0304\7\u0094\2\2\u0304\u0326\3\2\2\2\u0305\u0306\7y\2\2"+ - "\u0306\u0307\7y\2\2\u0307\u0308\5\\/\2\u0308\u0309\7z\2\2\u0309\u030a"+ - "\7z\2\2\u030a\u030b\7x\2\2\u030b\u030c\7\u0094\2\2\u030c\u0326\3\2\2\2"+ - "\u030d\u030e\7y\2\2\u030e\u030f\5\\/\2\u030f\u0310\7x\2\2\u0310\u0311"+ - "\7\u0094\2\2\u0311\u0312\7z\2\2\u0312\u0313\7x\2\2\u0313\u0314\7\u0094"+ - "\2\2\u0314\u0326\3\2\2\2\u0315\u0316\7y\2\2\u0316\u0317\5\\/\2\u0317\u0318"+ - "\7x\2\2\u0318\u0319\7\u0094\2\2\u0319\u031a\7z\2\2\u031a\u0326\3\2\2\2"+ - "\u031b\u031c\7y\2\2\u031c\u031d\5\\/\2\u031d\u031e\7z\2\2\u031e\u0326"+ - "\3\2\2\2\u031f\u0320\7y\2\2\u0320\u0321\7y\2\2\u0321\u0322\5\\/\2\u0322"+ - "\u0323\7z\2\2\u0323\u0324\7z\2\2\u0324\u0326\3\2\2\2\u0325\u02f8\3\2\2"+ - "\2\u0325\u02f9\3\2\2\2\u0325\u02fb\3\2\2\2\u0325\u02ff\3\2\2\2\u0325\u0305"+ - "\3\2\2\2\u0325\u030d\3\2\2\2\u0325\u0315\3\2\2\2\u0325\u031b\3\2\2\2\u0325"+ - "\u031f\3\2\2\2\u0326[\3\2\2\2\u0327\u0328\b/\1\2\u0328\u0329\7{\2\2\u0329"+ - "\u032a\5\\/\2\u032a\u032b\7|\2\2\u032b\u0336\3\2\2\2\u032c\u032d\t\t\2"+ - "\2\u032d\u0336\5\\/\n\u032e\u0336\7\u0094\2\2\u032f\u0336\7\u0092\2\2"+ - "\u0330\u0331\7\u0086\2\2\u0331\u0332\7\u0094\2\2\u0332\u0336\7\u0087\2"+ - "\2\u0333\u0336\7\u0088\2\2\u0334\u0336\7\u0091\2\2\u0335\u0327\3\2\2\2"+ - "\u0335\u032c\3\2\2\2\u0335\u032e\3\2\2\2\u0335\u032f\3\2\2\2\u0335\u0330"+ - "\3\2\2\2\u0335\u0333\3\2\2\2\u0335\u0334\3\2\2\2\u0336\u0345\3\2\2\2\u0337"+ - "\u0338\f\f\2\2\u0338\u0339\7}\2\2\u0339\u0344\5\\/\r\u033a\u033b\f\13"+ - "\2\2\u033b\u033c\t\n\2\2\u033c\u0344\5\\/\f\u033d\u033e\f\t\2\2\u033e"+ - "\u033f\t\13\2\2\u033f\u0344\5\\/\n\u0340\u0341\f\b\2\2\u0341\u0342\t\f"+ - "\2\2\u0342\u0344\5\\/\t\u0343\u0337\3\2\2\2\u0343\u033a\3\2\2\2\u0343"+ - "\u033d\3\2\2\2\u0343\u0340\3\2\2\2\u0344\u0347\3\2\2\2\u0345\u0343\3\2"+ - "\2\2\u0345\u0346\3\2\2\2\u0346]\3\2\2\2\u0347\u0345\3\2\2\2Xgx\u0085\u008b"+ + "\5D#\2\u021a\u021b\7\t\2\2\u021b\u0255\3\2\2\2\u021c\u021d\7K\2\2\u021d"+ + "\u021e\7\b\2\2\u021e\u021f\5\24\13\2\u021f\u0220\7\t\2\2\u0220\u0255\3"+ + "\2\2\2\u0221\u0222\7K\2\2\u0222\u0255\5F$\36\u0223\u0224\7L\2\2\u0224"+ + "\u0225\7\b\2\2\u0225\u0226\5\24\13\2\u0226\u0227\7\t\2\2\u0227\u0255\3"+ + "\2\2\2\u0228\u0229\7L\2\2\u0229\u0255\5F$\34\u022a\u022c\7M\2\2\u022b"+ + "\u022d\7\b\2\2\u022c\u022b\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u022e\3\2"+ + "\2\2\u022e\u0230\7n\2\2\u022f\u0231\7\t\2\2\u0230\u022f\3\2\2\2\u0230"+ + "\u0231\3\2\2\2\u0231\u0255\3\2\2\2\u0232\u0233\7\b\2\2\u0233\u0234\5\24"+ + "\13\2\u0234\u0235\7\t\2\2\u0235\u0236\5F$\31\u0236\u0255\3\2\2\2\u0237"+ + "\u0238\t\3\2\2\u0238\u0255\5F$\30\u0239\u023a\7\24\2\2\u023a\u0255\5F"+ + "$\26\u023b\u023c\t\4\2\2\u023c\u0255\5F$\25\u023d\u023e\7\4\2\2\u023e"+ + "\u0243\5F$\2\u023f\u0240\7\f\2\2\u0240\u0242\5F$\2\u0241\u023f\3\2\2\2"+ + "\u0242\u0245\3\2\2\2\u0243\u0241\3\2\2\2\u0243\u0244\3\2\2\2\u0244\u0247"+ + "\3\2\2\2\u0245\u0243\3\2\2\2\u0246\u0248\7\f\2\2\u0247\u0246\3\2\2\2\u0247"+ + "\u0248\3\2\2\2\u0248\u0249\3\2\2\2\u0249\u024a\7\5\2\2\u024a\u0255\3\2"+ + "\2\2\u024b\u0255\7n\2\2\u024c\u0255\7e\2\2\u024d\u024f\7o\2\2\u024e\u024d"+ + "\3\2\2\2\u024f\u0250\3\2\2\2\u0250\u024e\3\2\2\2\u0250\u0251\3\2\2\2\u0251"+ + "\u0255\3\2\2\2\u0252\u0255\7p\2\2\u0253\u0255\7V\2\2\u0254\u0217\3\2\2"+ + "\2\u0254\u021c\3\2\2\2\u0254\u0221\3\2\2\2\u0254\u0223\3\2\2\2\u0254\u0228"+ + "\3\2\2\2\u0254\u022a\3\2\2\2\u0254\u0232\3\2\2\2\u0254\u0237\3\2\2\2\u0254"+ + "\u0239\3\2\2\2\u0254\u023b\3\2\2\2\u0254\u023d\3\2\2\2\u0254\u024b\3\2"+ + "\2\2\u0254\u024c\3\2\2\2\u0254\u024e\3\2\2\2\u0254\u0252\3\2\2\2\u0254"+ + "\u0253\3\2\2\2\u0255\u0292\3\2\2\2\u0256\u0257\f\24\2\2\u0257\u0258\t"+ + "\5\2\2\u0258\u0291\5F$\25\u0259\u025a\f\23\2\2\u025a\u025b\t\6\2\2\u025b"+ + "\u0291\5F$\24\u025c\u025d\f\22\2\2\u025d\u025e\t\7\2\2\u025e\u0291\5F"+ + "$\23\u025f\u0260\f\21\2\2\u0260\u0261\t\b\2\2\u0261\u0291\5F$\22\u0262"+ + "\u0263\f\20\2\2\u0263\u0264\7\31\2\2\u0264\u0291\5F$\21\u0265\u0266\f"+ + "\17\2\2\u0266\u0267\7\33\2\2\u0267\u0291\5F$\20\u0268\u0269\f\16\2\2\u0269"+ + "\u026a\7\34\2\2\u026a\u0291\5F$\17\u026b\u026c\f\r\2\2\u026c\u026d\7%"+ + "\2\2\u026d\u0291\5F$\16\u026e\u026f\f\f\2\2\u026f\u0270\7&\2\2\u0270\u0291"+ + "\5F$\r\u0271\u0272\f\13\2\2\u0272\u0273\7\17\2\2\u0273\u0274\5F$\2\u0274"+ + "\u0275\7\13\2\2\u0275\u0276\5F$\f\u0276\u0291\3\2\2\2\u0277\u0278\f\n"+ + "\2\2\u0278\u0279\7\'\2\2\u0279\u0291\5F$\n\u027a\u027b\f\t\2\2\u027b\u027c"+ + "\7(\2\2\u027c\u0291\5F$\t\u027d\u027e\f\"\2\2\u027e\u027f\7\20\2\2\u027f"+ + "\u0291\7n\2\2\u0280\u0281\f!\2\2\u0281\u0282\7\21\2\2\u0282\u0291\7n\2"+ + "\2\u0283\u0284\f \2\2\u0284\u0286\7\b\2\2\u0285\u0287\5H%\2\u0286\u0285"+ + "\3\2\2\2\u0286\u0287\3\2\2\2\u0287\u0288\3\2\2\2\u0288\u0291\7\t\2\2\u0289"+ + "\u028a\f\32\2\2\u028a\u028b\7\6\2\2\u028b\u028c\5D#\2\u028c\u028d\7\7"+ + "\2\2\u028d\u0291\3\2\2\2\u028e\u028f\f\27\2\2\u028f\u0291\t\3\2\2\u0290"+ + "\u0256\3\2\2\2\u0290\u0259\3\2\2\2\u0290\u025c\3\2\2\2\u0290\u025f\3\2"+ + "\2\2\u0290\u0262\3\2\2\2\u0290\u0265\3\2\2\2\u0290\u0268\3\2\2\2\u0290"+ + "\u026b\3\2\2\2\u0290\u026e\3\2\2\2\u0290\u0271\3\2\2\2\u0290\u0277\3\2"+ + "\2\2\u0290\u027a\3\2\2\2\u0290\u027d\3\2\2\2\u0290\u0280\3\2\2\2\u0290"+ + "\u0283\3\2\2\2\u0290\u0289\3\2\2\2\u0290\u028e\3\2\2\2\u0291\u0294\3\2"+ + "\2\2\u0292\u0290\3\2\2\2\u0292\u0293\3\2\2\2\u0293G\3\2\2\2\u0294\u0292"+ + "\3\2\2\2\u0295\u029a\5F$\2\u0296\u0297\7\f\2\2\u0297\u0299\5F$\2\u0298"+ + "\u0296\3\2\2\2\u0299\u029c\3\2\2\2\u029a\u0298\3\2\2\2\u029a\u029b\3\2"+ + "\2\2\u029bI\3\2\2\2\u029c\u029a\3\2\2\2\u029d\u029f\7N\2\2\u029e\u02a0"+ + "\5L\'\2\u029f\u029e\3\2\2\2\u029f\u02a0\3\2\2\2\u02a0\u02a1\3\2\2\2\u02a1"+ + "\u02a2\7W\2\2\u02a2K\3\2\2\2\u02a3\u02a4\7\b\2\2\u02a4\u02a9\5N(\2\u02a5"+ + "\u02a6\7\f\2\2\u02a6\u02a8\5N(\2\u02a7\u02a5\3\2\2\2\u02a8\u02ab\3\2\2"+ + "\2\u02a9\u02a7\3\2\2\2\u02a9\u02aa\3\2\2\2\u02aa\u02ac\3\2\2\2\u02ab\u02a9"+ + "\3\2\2\2\u02ac\u02ad\7\t\2\2\u02adM\3\2\2\2\u02ae\u02af\7O\2\2\u02af\u02b9"+ + "\7o\2\2\u02b0\u02b1\7P\2\2\u02b1\u02b9\7n\2\2\u02b2\u02b3\7Q\2\2\u02b3"+ + "\u02b9\7o\2\2\u02b4\u02b5\7R\2\2\u02b5\u02b9\5F$\2\u02b6\u02b7\7S\2\2"+ + "\u02b7\u02b9\5F$\2\u02b8\u02ae\3\2\2\2\u02b8\u02b0\3\2\2\2\u02b8\u02b2"+ + "\3\2\2\2\u02b8\u02b4\3\2\2\2\u02b8\u02b6\3\2\2\2\u02b9O\3\2\2\2\u02ba"+ + "\u02bc\5R*\2\u02bb\u02ba\3\2\2\2\u02bc\u02bf\3\2\2\2\u02bd\u02bb\3\2\2"+ + "\2\u02bd\u02be\3\2\2\2\u02beQ\3\2\2\2\u02bf\u02bd\3\2\2\2\u02c0\u02c4"+ + "\5T+\2\u02c1\u02c4\5V,\2\u02c2\u02c4\5X-\2\u02c3\u02c0\3\2\2\2\u02c3\u02c1"+ + "\3\2\2\2\u02c3\u02c2\3\2\2\2\u02c4S\3\2\2\2\u02c5\u02c6\7\u0094\2\2\u02c6"+ + "\u02ca\7w\2\2\u02c7\u02c9\7\u0095\2\2\u02c8\u02c7\3\2\2\2\u02c9\u02cc"+ + "\3\2\2\2\u02ca\u02c8\3\2\2\2\u02ca\u02cb\3\2\2\2\u02cb\u02e0\3\2\2\2\u02cc"+ + "\u02ca\3\2\2\2\u02cd\u02ce\7\u0086\2\2\u02ce\u02cf\7\u0094\2\2\u02cf\u02d0"+ + "\7\u0087\2\2\u02d0\u02d4\7w\2\2\u02d1\u02d3\7\u0095\2\2\u02d2\u02d1\3"+ + "\2\2\2\u02d3\u02d6\3\2\2\2\u02d4\u02d2\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5"+ + "\u02e0\3\2\2\2\u02d6\u02d4\3\2\2\2\u02d7\u02d8\7\u0093\2\2\u02d8\u02dc"+ + "\7w\2\2\u02d9\u02db\7\u0095\2\2\u02da\u02d9\3\2\2\2\u02db\u02de\3\2\2"+ + "\2\u02dc\u02da\3\2\2\2\u02dc\u02dd\3\2\2\2\u02dd\u02e0\3\2\2\2\u02de\u02dc"+ + "\3\2\2\2\u02df\u02c5\3\2\2\2\u02df\u02cd\3\2\2\2\u02df\u02d7\3\2\2\2\u02e0"+ + "U\3\2\2\2\u02e1\u02e3\7u\2\2\u02e2\u02e4\5Z.\2\u02e3\u02e2\3\2\2\2\u02e3"+ + "\u02e4\3\2\2\2\u02e4\u02e8\3\2\2\2\u02e5\u02e7\7\u0095\2\2\u02e6\u02e5"+ + "\3\2\2\2\u02e7\u02ea\3\2\2\2\u02e8\u02e6\3\2\2\2\u02e8\u02e9\3\2\2\2\u02e9"+ + "W\3\2\2\2\u02ea\u02e8\3\2\2\2\u02eb\u02ec\7t\2\2\u02ec\u02f1\5\\/\2\u02ed"+ + "\u02ee\7x\2\2\u02ee\u02f0\5\\/\2\u02ef\u02ed\3\2\2\2\u02f0\u02f3\3\2\2"+ + "\2\u02f1\u02ef\3\2\2\2\u02f1\u02f2\3\2\2\2\u02f2\u02f7\3\2\2\2\u02f3\u02f1"+ + "\3\2\2\2\u02f4\u02f6\7\u0095\2\2\u02f5\u02f4\3\2\2\2\u02f6\u02f9\3\2\2"+ + "\2\u02f7\u02f5\3\2\2\2\u02f7\u02f8\3\2\2\2\u02f8Y\3\2\2\2\u02f9\u02f7"+ + "\3\2\2\2\u02fa\u0328\5\\/\2\u02fb\u02fc\7v\2\2\u02fc\u0328\5\\/\2\u02fd"+ + "\u02fe\5\\/\2\u02fe\u02ff\7x\2\2\u02ff\u0300\5\\/\2\u0300\u0328\3\2\2"+ + "\2\u0301\u0302\7y\2\2\u0302\u0303\5\\/\2\u0303\u0304\7z\2\2\u0304\u0305"+ + "\7x\2\2\u0305\u0306\7\u0094\2\2\u0306\u0328\3\2\2\2\u0307\u0308\7y\2\2"+ + "\u0308\u0309\7y\2\2\u0309\u030a\5\\/\2\u030a\u030b\7z\2\2\u030b\u030c"+ + "\7z\2\2\u030c\u030d\7x\2\2\u030d\u030e\7\u0094\2\2\u030e\u0328\3\2\2\2"+ + "\u030f\u0310\7y\2\2\u0310\u0311\5\\/\2\u0311\u0312\7x\2\2\u0312\u0313"+ + "\7\u0094\2\2\u0313\u0314\7z\2\2\u0314\u0315\7x\2\2\u0315\u0316\7\u0094"+ + "\2\2\u0316\u0328\3\2\2\2\u0317\u0318\7y\2\2\u0318\u0319\5\\/\2\u0319\u031a"+ + "\7x\2\2\u031a\u031b\7\u0094\2\2\u031b\u031c\7z\2\2\u031c\u0328\3\2\2\2"+ + "\u031d\u031e\7y\2\2\u031e\u031f\5\\/\2\u031f\u0320\7z\2\2\u0320\u0328"+ + "\3\2\2\2\u0321\u0322\7y\2\2\u0322\u0323\7y\2\2\u0323\u0324\5\\/\2\u0324"+ + "\u0325\7z\2\2\u0325\u0326\7z\2\2\u0326\u0328\3\2\2\2\u0327\u02fa\3\2\2"+ + "\2\u0327\u02fb\3\2\2\2\u0327\u02fd\3\2\2\2\u0327\u0301\3\2\2\2\u0327\u0307"+ + "\3\2\2\2\u0327\u030f\3\2\2\2\u0327\u0317\3\2\2\2\u0327\u031d\3\2\2\2\u0327"+ + "\u0321\3\2\2\2\u0328[\3\2\2\2\u0329\u032a\b/\1\2\u032a\u032b\7{\2\2\u032b"+ + "\u032c\5\\/\2\u032c\u032d\7|\2\2\u032d\u0338\3\2\2\2\u032e\u032f\t\t\2"+ + "\2\u032f\u0338\5\\/\n\u0330\u0338\7\u0094\2\2\u0331\u0338\7\u0092\2\2"+ + "\u0332\u0333\7\u0086\2\2\u0333\u0334\7\u0094\2\2\u0334\u0338\7\u0087\2"+ + "\2\u0335\u0338\7\u0088\2\2\u0336\u0338\7\u0091\2\2\u0337\u0329\3\2\2\2"+ + "\u0337\u032e\3\2\2\2\u0337\u0330\3\2\2\2\u0337\u0331\3\2\2\2\u0337\u0332"+ + "\3\2\2\2\u0337\u0335\3\2\2\2\u0337\u0336\3\2\2\2\u0338\u0347\3\2\2\2\u0339"+ + "\u033a\f\f\2\2\u033a\u033b\7}\2\2\u033b\u0346\5\\/\r\u033c\u033d\f\13"+ + "\2\2\u033d\u033e\t\n\2\2\u033e\u0346\5\\/\f\u033f\u0340\f\t\2\2\u0340"+ + "\u0341\t\13\2\2\u0341\u0346\5\\/\n\u0342\u0343\f\b\2\2\u0343\u0344\t\f"+ + "\2\2\u0344\u0346\5\\/\t\u0345\u0339\3\2\2\2\u0345\u033c\3\2\2\2\u0345"+ + "\u033f\3\2\2\2\u0345\u0342\3\2\2\2\u0346\u0349\3\2\2\2\u0347\u0345\3\2"+ + "\2\2\u0347\u0348\3\2\2\2\u0348]\3\2\2\2\u0349\u0347\3\2\2\2Sgx\u0085\u008b"+ "\u0091\u009b\u00a2\u00ad\u00b5\u00ba\u00c0\u00c3\u00c5\u00cf\u00d7\u00dc"+ "\u00e2\u00e5\u00e7\u00ed\u00f4\u00fb\u0101\u010d\u011b\u0121\u0127\u0130"+ "\u0138\u0142\u014e\u0159\u016e\u0177\u017d\u0182\u0189\u0196\u019b\u01a7"+ "\u01b5\u01c8\u01d1\u01de\u01e3\u01e8\u01ea\u01f0\u01f5\u01f9\u0202\u0205"+ - "\u0208\u0214\u021e\u0222\u0225\u0229\u022d\u0230\u0234\u0238\u024b\u024f"+ - "\u0258\u025c\u028e\u0298\u029a\u02a2\u02a7\u02b1\u02c0\u02c5\u02cb\u02d2"+ - "\u02da\u02dd\u02e1\u02e6\u02ef\u02f5\u0325\u0335\u0343\u0345"; + "\u0208\u0214\u022c\u0230\u0243\u0247\u0250\u0254\u0286\u0290\u0292\u029a"+ + "\u029f\u02a9\u02b8\u02bd\u02c3\u02ca\u02d4\u02dc\u02df\u02e3\u02e8\u02f1"+ + "\u02f7\u0327\u0337\u0345\u0347"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseListener.java index ab046d3cc..63944bb69 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseListener.java @@ -1081,30 +1081,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprPtr(KickCParser.ExprPtrContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprPreMod(KickCParser.ExprPreModContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprPreMod(KickCParser.ExprPreModContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprBinary(KickCParser.ExprBinaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprBinary(KickCParser.ExprBinaryContext ctx) { } /** * {@inheritDoc} * @@ -1153,18 +1129,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprNumber(KickCParser.ExprNumberContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprChar(KickCParser.ExprCharContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprChar(KickCParser.ExprCharContext ctx) { } /** * {@inheritDoc} * @@ -1177,30 +1141,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprArrow(KickCParser.ExprArrowContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprDot(KickCParser.ExprDotContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprDot(KickCParser.ExprDotContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterInitList(KickCParser.InitListContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitInitList(KickCParser.InitListContext ctx) { } /** * {@inheritDoc} * @@ -1213,18 +1153,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprCast(KickCParser.ExprCastContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprCall(KickCParser.ExprCallContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprCall(KickCParser.ExprCallContext ctx) { } /** * {@inheritDoc} * @@ -1237,6 +1165,138 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprPar(KickCParser.ExprParContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprId(KickCParser.ExprIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprId(KickCParser.ExprIdContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprTernary(KickCParser.ExprTernaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprTernary(KickCParser.ExprTernaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprAssignment(KickCParser.ExprAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprAssignment(KickCParser.ExprAssignmentContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprPreMod(KickCParser.ExprPreModContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprPreMod(KickCParser.ExprPreModContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprBinary(KickCParser.ExprBinaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprBinary(KickCParser.ExprBinaryContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprChar(KickCParser.ExprCharContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprChar(KickCParser.ExprCharContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprDot(KickCParser.ExprDotContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprDot(KickCParser.ExprDotContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterInitList(KickCParser.InitListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitInitList(KickCParser.InitListContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterExprCall(KickCParser.ExprCallContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitExprCall(KickCParser.ExprCallContext ctx) { } /** * {@inheritDoc} * @@ -1285,18 +1345,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprBool(KickCParser.ExprBoolContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprId(KickCParser.ExprIdContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprId(KickCParser.ExprIdContext ctx) { } /** * {@inheritDoc} * @@ -1309,30 +1357,6 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitExprDefined(KickCParser.ExprDefinedContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprTernary(KickCParser.ExprTernaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprTernary(KickCParser.ExprTernaryContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void enterExprAssignment(KickCParser.ExprAssignmentContext ctx) { } - /** - * {@inheritDoc} - * - *

The default implementation does nothing.

- */ - @Override public void exitExprAssignment(KickCParser.ExprAssignmentContext ctx) { } /** * {@inheritDoc} * @@ -1477,6 +1501,18 @@ public class KickCParserBaseListener implements KickCParserListener { *

The default implementation does nothing.

*/ @Override public void exitAsmLabelName(KickCParser.AsmLabelNameContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx) { } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseVisitor.java index 4bfc68d5f..7e29f49d2 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParserBaseVisitor.java @@ -636,20 +636,6 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitExprPtr(KickCParser.ExprPtrContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprPreMod(KickCParser.ExprPreModContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprBinary(KickCParser.ExprBinaryContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -678,13 +664,6 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitExprNumber(KickCParser.ExprNumberContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprChar(KickCParser.ExprCharContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -692,20 +671,6 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitExprArrow(KickCParser.ExprArrowContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprDot(KickCParser.ExprDotContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitInitList(KickCParser.InitListContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -719,14 +684,84 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitExprCall(KickCParser.ExprCallContext ctx) { return visitChildren(ctx); } + @Override public T visitExprPar(KickCParser.ExprParContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *

The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.

*/ - @Override public T visitExprPar(KickCParser.ExprParContext ctx) { return visitChildren(ctx); } + @Override public T visitExprId(KickCParser.ExprIdContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprTernary(KickCParser.ExprTernaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprAssignment(KickCParser.ExprAssignmentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprPreMod(KickCParser.ExprPreModContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprBinary(KickCParser.ExprBinaryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprChar(KickCParser.ExprCharContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprDot(KickCParser.ExprDotContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitInitList(KickCParser.InitListContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprCall(KickCParser.ExprCallContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -755,13 +790,6 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitExprBool(KickCParser.ExprBoolContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprId(KickCParser.ExprIdContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -769,20 +797,6 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitExprDefined(KickCParser.ExprDefinedContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprTernary(KickCParser.ExprTernaryContext ctx) { return visitChildren(ctx); } - /** - * {@inheritDoc} - * - *

The default implementation returns the result of calling - * {@link #visitChildren} on {@code ctx}.

- */ - @Override public T visitExprAssignment(KickCParser.ExprAssignmentContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * @@ -867,6 +881,13 @@ public class KickCParserBaseVisitor extends AbstractParseTreeVisitor imple * {@link #visitChildren} on {@code ctx}.

*/ @Override public T visitAsmLabelName(KickCParser.AsmLabelNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParserListener.java b/src/main/java/dk/camelot64/kickc/parser/KickCParserListener.java index ad63f3cf4..4ce0dbff2 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParserListener.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParserListener.java @@ -1031,30 +1031,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprPtr(KickCParser.ExprPtrContext ctx); - /** - * Enter a parse tree produced by the {@code exprPreMod} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprPreMod(KickCParser.ExprPreModContext ctx); - /** - * Exit a parse tree produced by the {@code exprPreMod} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprPreMod(KickCParser.ExprPreModContext ctx); - /** - * Enter a parse tree produced by the {@code exprBinary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprBinary(KickCParser.ExprBinaryContext ctx); - /** - * Exit a parse tree produced by the {@code exprBinary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprBinary(KickCParser.ExprBinaryContext ctx); /** * Enter a parse tree produced by the {@code exprTypeId} * labeled alternative in {@link KickCParser#expr}. @@ -1103,18 +1079,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprNumber(KickCParser.ExprNumberContext ctx); - /** - * Enter a parse tree produced by the {@code exprChar} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprChar(KickCParser.ExprCharContext ctx); - /** - * Exit a parse tree produced by the {@code exprChar} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprChar(KickCParser.ExprCharContext ctx); /** * Enter a parse tree produced by the {@code exprArrow} * labeled alternative in {@link KickCParser#expr}. @@ -1127,30 +1091,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprArrow(KickCParser.ExprArrowContext ctx); - /** - * Enter a parse tree produced by the {@code exprDot} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprDot(KickCParser.ExprDotContext ctx); - /** - * Exit a parse tree produced by the {@code exprDot} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprDot(KickCParser.ExprDotContext ctx); - /** - * Enter a parse tree produced by the {@code initList} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterInitList(KickCParser.InitListContext ctx); - /** - * Exit a parse tree produced by the {@code initList} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitInitList(KickCParser.InitListContext ctx); /** * Enter a parse tree produced by the {@code exprCast} * labeled alternative in {@link KickCParser#expr}. @@ -1163,18 +1103,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprCast(KickCParser.ExprCastContext ctx); - /** - * Enter a parse tree produced by the {@code exprCall} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprCall(KickCParser.ExprCallContext ctx); - /** - * Exit a parse tree produced by the {@code exprCall} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprCall(KickCParser.ExprCallContext ctx); /** * Enter a parse tree produced by the {@code exprPar} * labeled alternative in {@link KickCParser#expr}. @@ -1187,6 +1115,138 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprPar(KickCParser.ExprParContext ctx); + /** + * Enter a parse tree produced by the {@code exprId} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprId(KickCParser.ExprIdContext ctx); + /** + * Exit a parse tree produced by the {@code exprId} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprId(KickCParser.ExprIdContext ctx); + /** + * Enter a parse tree produced by the {@code exprTernary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprTernary(KickCParser.ExprTernaryContext ctx); + /** + * Exit a parse tree produced by the {@code exprTernary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprTernary(KickCParser.ExprTernaryContext ctx); + /** + * Enter a parse tree produced by the {@code exprAssignment} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprAssignment(KickCParser.ExprAssignmentContext ctx); + /** + * Exit a parse tree produced by the {@code exprAssignment} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprAssignment(KickCParser.ExprAssignmentContext ctx); + /** + * Enter a parse tree produced by the {@code exprPreMod} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprPreMod(KickCParser.ExprPreModContext ctx); + /** + * Exit a parse tree produced by the {@code exprPreMod} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprPreMod(KickCParser.ExprPreModContext ctx); + /** + * Enter a parse tree produced by the {@code exprBinary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprBinary(KickCParser.ExprBinaryContext ctx); + /** + * Exit a parse tree produced by the {@code exprBinary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprBinary(KickCParser.ExprBinaryContext ctx); + /** + * Enter a parse tree produced by the {@code exprTypeIdType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx); + /** + * Exit a parse tree produced by the {@code exprTypeIdType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx); + /** + * Enter a parse tree produced by the {@code exprChar} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprChar(KickCParser.ExprCharContext ctx); + /** + * Exit a parse tree produced by the {@code exprChar} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprChar(KickCParser.ExprCharContext ctx); + /** + * Enter a parse tree produced by the {@code exprDot} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprDot(KickCParser.ExprDotContext ctx); + /** + * Exit a parse tree produced by the {@code exprDot} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprDot(KickCParser.ExprDotContext ctx); + /** + * Enter a parse tree produced by the {@code exprSizeOfType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx); + /** + * Exit a parse tree produced by the {@code exprSizeOfType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx); + /** + * Enter a parse tree produced by the {@code initList} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterInitList(KickCParser.InitListContext ctx); + /** + * Exit a parse tree produced by the {@code initList} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitInitList(KickCParser.InitListContext ctx); + /** + * Enter a parse tree produced by the {@code exprCall} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void enterExprCall(KickCParser.ExprCallContext ctx); + /** + * Exit a parse tree produced by the {@code exprCall} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + */ + void exitExprCall(KickCParser.ExprCallContext ctx); /** * Enter a parse tree produced by the {@code exprSizeOf} * labeled alternative in {@link KickCParser#expr}. @@ -1235,18 +1295,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprBool(KickCParser.ExprBoolContext ctx); - /** - * Enter a parse tree produced by the {@code exprId} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprId(KickCParser.ExprIdContext ctx); - /** - * Exit a parse tree produced by the {@code exprId} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprId(KickCParser.ExprIdContext ctx); /** * Enter a parse tree produced by the {@code exprDefined} * labeled alternative in {@link KickCParser#expr}. @@ -1259,30 +1307,6 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitExprDefined(KickCParser.ExprDefinedContext ctx); - /** - * Enter a parse tree produced by the {@code exprTernary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprTernary(KickCParser.ExprTernaryContext ctx); - /** - * Exit a parse tree produced by the {@code exprTernary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprTernary(KickCParser.ExprTernaryContext ctx); - /** - * Enter a parse tree produced by the {@code exprAssignment} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void enterExprAssignment(KickCParser.ExprAssignmentContext ctx); - /** - * Exit a parse tree produced by the {@code exprAssignment} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - */ - void exitExprAssignment(KickCParser.ExprAssignmentContext ctx); /** * Enter a parse tree produced by the {@code exprArray} * labeled alternative in {@link KickCParser#expr}. @@ -1417,6 +1441,18 @@ public interface KickCParserListener extends ParseTreeListener { * @param ctx the parse tree */ void exitAsmLabelName(KickCParser.AsmLabelNameContext ctx); + /** + * Enter a parse tree produced by the {@code asmLabelReplace} + * labeled alternative in {@link KickCParser#asmLabel}. + * @param ctx the parse tree + */ + void enterAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx); + /** + * Exit a parse tree produced by the {@code asmLabelReplace} + * labeled alternative in {@link KickCParser#asmLabel}. + * @param ctx the parse tree + */ + void exitAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx); /** * Enter a parse tree produced by the {@code asmLabelMulti} * labeled alternative in {@link KickCParser#asmLabel}. diff --git a/src/main/java/dk/camelot64/kickc/parser/KickCParserVisitor.java b/src/main/java/dk/camelot64/kickc/parser/KickCParserVisitor.java index 130bc31df..8fa8654ee 100644 --- a/src/main/java/dk/camelot64/kickc/parser/KickCParserVisitor.java +++ b/src/main/java/dk/camelot64/kickc/parser/KickCParserVisitor.java @@ -612,20 +612,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprPtr(KickCParser.ExprPtrContext ctx); - /** - * Visit a parse tree produced by the {@code exprPreMod} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprPreMod(KickCParser.ExprPreModContext ctx); - /** - * Visit a parse tree produced by the {@code exprBinary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprBinary(KickCParser.ExprBinaryContext ctx); /** * Visit a parse tree produced by the {@code exprTypeId} * labeled alternative in {@link KickCParser#expr}. @@ -654,13 +640,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprNumber(KickCParser.ExprNumberContext ctx); - /** - * Visit a parse tree produced by the {@code exprChar} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprChar(KickCParser.ExprCharContext ctx); /** * Visit a parse tree produced by the {@code exprArrow} * labeled alternative in {@link KickCParser#expr}. @@ -668,20 +647,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprArrow(KickCParser.ExprArrowContext ctx); - /** - * Visit a parse tree produced by the {@code exprDot} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprDot(KickCParser.ExprDotContext ctx); - /** - * Visit a parse tree produced by the {@code initList} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitInitList(KickCParser.InitListContext ctx); /** * Visit a parse tree produced by the {@code exprCast} * labeled alternative in {@link KickCParser#expr}. @@ -689,13 +654,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprCast(KickCParser.ExprCastContext ctx); - /** - * Visit a parse tree produced by the {@code exprCall} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprCall(KickCParser.ExprCallContext ctx); /** * Visit a parse tree produced by the {@code exprPar} * labeled alternative in {@link KickCParser#expr}. @@ -703,6 +661,83 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprPar(KickCParser.ExprParContext ctx); + /** + * Visit a parse tree produced by the {@code exprId} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprId(KickCParser.ExprIdContext ctx); + /** + * Visit a parse tree produced by the {@code exprTernary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprTernary(KickCParser.ExprTernaryContext ctx); + /** + * Visit a parse tree produced by the {@code exprAssignment} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprAssignment(KickCParser.ExprAssignmentContext ctx); + /** + * Visit a parse tree produced by the {@code exprPreMod} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprPreMod(KickCParser.ExprPreModContext ctx); + /** + * Visit a parse tree produced by the {@code exprBinary} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprBinary(KickCParser.ExprBinaryContext ctx); + /** + * Visit a parse tree produced by the {@code exprTypeIdType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprTypeIdType(KickCParser.ExprTypeIdTypeContext ctx); + /** + * Visit a parse tree produced by the {@code exprChar} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprChar(KickCParser.ExprCharContext ctx); + /** + * Visit a parse tree produced by the {@code exprDot} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprDot(KickCParser.ExprDotContext ctx); + /** + * Visit a parse tree produced by the {@code exprSizeOfType} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprSizeOfType(KickCParser.ExprSizeOfTypeContext ctx); + /** + * Visit a parse tree produced by the {@code initList} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitInitList(KickCParser.InitListContext ctx); + /** + * Visit a parse tree produced by the {@code exprCall} + * labeled alternative in {@link KickCParser#expr}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprCall(KickCParser.ExprCallContext ctx); /** * Visit a parse tree produced by the {@code exprSizeOf} * labeled alternative in {@link KickCParser#expr}. @@ -731,13 +766,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprBool(KickCParser.ExprBoolContext ctx); - /** - * Visit a parse tree produced by the {@code exprId} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprId(KickCParser.ExprIdContext ctx); /** * Visit a parse tree produced by the {@code exprDefined} * labeled alternative in {@link KickCParser#expr}. @@ -745,20 +773,6 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitExprDefined(KickCParser.ExprDefinedContext ctx); - /** - * Visit a parse tree produced by the {@code exprTernary} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprTernary(KickCParser.ExprTernaryContext ctx); - /** - * Visit a parse tree produced by the {@code exprAssignment} - * labeled alternative in {@link KickCParser#expr}. - * @param ctx the parse tree - * @return the visitor result - */ - T visitExprAssignment(KickCParser.ExprAssignmentContext ctx); /** * Visit a parse tree produced by the {@code exprArray} * labeled alternative in {@link KickCParser#expr}. @@ -838,6 +852,13 @@ public interface KickCParserVisitor extends ParseTreeVisitor { * @return the visitor result */ T visitAsmLabelName(KickCParser.AsmLabelNameContext ctx); + /** + * Visit a parse tree produced by the {@code asmLabelReplace} + * labeled alternative in {@link KickCParser#asmLabel}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAsmLabelReplace(KickCParser.AsmLabelReplaceContext ctx); /** * Visit a parse tree produced by the {@code asmLabelMulti} * labeled alternative in {@link KickCParser#asmLabel}. diff --git a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java index c24d1090d..65594d202 100644 --- a/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java +++ b/src/main/java/dk/camelot64/kickc/passes/Pass0GenerateStatementSequence.java @@ -2381,38 +2381,40 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor indirectCallAsmNames = new ArrayList<>(); + /** Counter used to separate indirect calls */ + private int indirectCallCount = 1; /** * Generate the end of a scope @@ -206,30 +203,15 @@ public class Pass4CodeGeneration { */ private void generateScopeEnding(AsmProgram asm, ScopeRef currentScope) { if(!ScopeRef.ROOT.equals(currentScope)) { - // Generate any indirect calls pending - for(String indirectCallAsmName : indirectCallAsmNames) { - asm.addLabel("bi_" + indirectCallAsmName); - asm.addInstruction("jmp", CpuAddressingMode.IND, indirectCallAsmName, false); - } - indirectCallAsmNames = new ArrayList<>(); + if(asm.hasStash()) + asm.startChunk(currentScope, null, "Outside Flow"); + // Generate all stashed ASM lines + asm.addStash(); addData(asm, currentScope); asm.addScopeEnd(); } } - /** - * Add an indirect call to the assembler program. Also queues ASM for the indirect jump to be added at the end of the block. - * - * @param asm The ASM program being built - * @param procedureVariable The variable containing the function pointer - * @param codeScopeRef The scope containing the code being generated. Used for adding scope to the name when needed (eg. line.x1 when referencing x1 variable inside line scope from outside line scope). - */ - private void generateIndirectCall(AsmProgram asm, Variable procedureVariable, ScopeRef codeScopeRef) { - String varAsmName = AsmFormat.getAsmSymbolName(program, procedureVariable, codeScopeRef); - indirectCallAsmNames.add(varAsmName); - asm.addInstruction("jsr", CpuAddressingMode.ABS, "bi_" + varAsmName, false); - } - /** * Generate a comment that describes the procedure signature and parameter transfer * @@ -913,52 +895,12 @@ public class Pass4CodeGeneration { } else if(statement instanceof StatementCallExecute) { StatementCallExecute call = (StatementCallExecute) statement; RValue procedureRVal = call.getProcedureRVal(); - boolean supported = false; - if(procedureRVal instanceof ProcedureRef) { - asm.getCurrentChunk().setFragment("jsr"); - asm.addInstruction("jsr", CpuAddressingMode.ABS, call.getProcedure().getFullName(), false); - supported = true; - } else if(procedureRVal instanceof PointerDereferenceSimple) { - RValue pointer = ((PointerDereferenceSimple) procedureRVal).getPointer(); - while(pointer instanceof CastValue) - pointer = ((CastValue) pointer).getValue(); - if(pointer instanceof VariableRef) { - Variable variable = getScope().getVariable((VariableRef) pointer); - generateIndirectCall(asm, variable, block.getScope()); - asm.getCurrentChunk().setClobberOverwrite(CpuClobber.CLOBBER_ALL); - supported = true; - } else { - // Generate ASM for an indirect call - AsmFragmentInstanceSpecBuilder asmFragmentInstanceSpecBuilder = AsmFragmentInstanceSpecBuilder.call(call, program); - ensureEncoding(asm, asmFragmentInstanceSpecBuilder); - generateAsm(asm, asmFragmentInstanceSpecBuilder.getAsmFragmentInstanceSpec()); - asm.getCurrentChunk().setClobberOverwrite(CpuClobber.CLOBBER_ALL); - supported = true; - } - } else if(procedureRVal instanceof VariableRef) { - Variable procedureVariable = getScope().getVariable((VariableRef) procedureRVal); - SymbolType procedureVariableType = procedureVariable.getType(); - if(procedureVariableType instanceof SymbolTypePointer) { - if(((SymbolTypePointer) procedureVariableType).getElementType() instanceof SymbolTypeProcedure) { - generateIndirectCall(asm, procedureVariable, block.getScope()); - supported = true; - asm.getCurrentChunk().setClobberOverwrite(CpuClobber.CLOBBER_ALL); - } - } - } else if(procedureRVal instanceof ConstantRef) { - Variable procedureVariable = getScope().getConstant((ConstantRef) procedureRVal); - SymbolType procedureVariableType = procedureVariable.getType(); - if(procedureVariableType instanceof SymbolTypePointer) { - if(((SymbolTypePointer) procedureVariableType).getElementType() instanceof SymbolTypeProcedure) { - String varAsmName = AsmFormat.getAsmSymbolName(program, procedureVariable, block.getScope()); - asm.addInstruction("jsr", CpuAddressingMode.ABS, varAsmName, false); - asm.getCurrentChunk().setClobberOverwrite(CpuClobber.CLOBBER_ALL); - supported = true; - } - } - } - if(!supported) { - throw new InternalError("Call Pointer not supported " + statement); + // Generate ASM for a call + AsmFragmentInstanceSpecBuilder asmFragmentInstanceSpecBuilder = AsmFragmentInstanceSpecBuilder.call(call, indirectCallCount++, program); + ensureEncoding(asm, asmFragmentInstanceSpecBuilder); + generateAsm(asm, asmFragmentInstanceSpecBuilder.getAsmFragmentInstanceSpec()); + if(!(procedureRVal instanceof ProcedureRef)) { + asm.getCurrentChunk().setClobberOverwrite(CpuClobber.CLOBBER_ALL); } } else if(statement instanceof StatementExprSideEffect) { AsmFragmentInstanceSpecBuilder asmFragmentInstanceSpecBuilder = AsmFragmentInstanceSpecBuilder.exprSideEffect((StatementExprSideEffect) statement, program); diff --git a/src/test/ref/examples/rom/rom.log b/src/test/ref/examples/rom/rom.log index dd5f89778..3fe5aa4c9 100644 --- a/src/test/ref/examples/rom/rom.log +++ b/src/test/ref/examples/rom/rom.log @@ -68,7 +68,7 @@ main: scope:[main] from __start *main::ptr = main::$1 call2::param1#0 = 1 call2::param2#0 = 2 - call call2 + call call2 call2::return = call2::return to:main::@1 main::@1: scope:[main] from main @@ -76,7 +76,7 @@ main::@1: scope:[main] from main *main::ptr = main::$2 call2::param1#1 = 3 call2::param2#1 = 4 - call call2 + call call2 call2::return = call2::return to:main::@2 main::@2: scope:[main] from main::@1 @@ -84,7 +84,7 @@ main::@2: scope:[main] from main::@1 *main::ptr = main::$3 call3::param1#0 = 1 call3::param2#0 = 2 - call call3 + call call3 call3::return#2 = call3::return#1 to:main::@3 main::@3: scope:[main] from main::@2 @@ -93,7 +93,7 @@ main::@3: scope:[main] from main::@2 *main::ptr = main::$4 call3::param1#1 = 3 call3::param2#1 = 4 - call call3 + call call3 call3::return#3 = call3::return#1 to:main::@4 main::@4: scope:[main] from main::@3 @@ -107,7 +107,7 @@ main::@return: scope:[main] from main::@4 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -289,25 +289,25 @@ main: scope:[main] from sideeffect stackpullbytes(1) [10] main::$1 = stackpull(byte) [11] *main::ptr = main::$1 - [12] call call2 + [12] call call2 [13] call2::return = call2::return to:main::@1 main::@1: scope:[main] from main [14] main::$2 = call2::return [15] *main::ptr = main::$2 - [16] call call2 + [16] call call2 [17] call2::return = call2::return to:main::@2 main::@2: scope:[main] from main::@1 [18] main::$3 = call2::return [19] *main::ptr = main::$3 - [20] call call3 + [20] call call3 [21] call3::return#2 = call3::return#0 to:main::@3 main::@3: scope:[main] from main::@2 [22] main::$4 = call3::return#2 [23] *main::ptr = main::$4 - [24] call call3 + [24] call call3 [25] call3::return#3 = call3::return#0 to:main::@4 main::@4: scope:[main] from main::@3 @@ -540,7 +540,7 @@ main: { // [1] stackpush(byte) = 2 -- _stackpushbyte_=vbuc1 lda #2 pha - // [2] callexecute call1 -- jsr + // [2] callexecute call1 -- call_vprc1 jsr call1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -554,7 +554,7 @@ main: { // [7] stackpush(byte) = 4 -- _stackpushbyte_=vbuc1 lda #4 pha - // [8] callexecute call1 -- jsr + // [8] callexecute call1 -- call_vprc1 jsr call1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -562,7 +562,7 @@ main: { pla // [11] *main::ptr = main::$1 -- _deref_pbuc1=vbuaa sta ptr - // [12] call call2 + // [12] call call2 // [34] phi from main to call2 [phi:main->call2] call2_from_main: // [34] phi call2::param2#2 = 2 [phi:main->call2#0] -- vbuaa=vbuc1 @@ -578,7 +578,7 @@ main: { lda.z call2.return // [15] *main::ptr = main::$2 -- _deref_pbuc1=vbuaa sta ptr - // [16] call call2 + // [16] call call2 // [34] phi from main::@1 to call2 [phi:main::@1->call2] call2_from___b1: // [34] phi call2::param2#2 = 4 [phi:main::@1->call2#0] -- vbuaa=vbuc1 @@ -594,7 +594,7 @@ main: { lda.z call2.return // [19] *main::ptr = main::$3 -- _deref_pbuc1=vbuaa sta ptr - // [20] call call3 + // [20] call call3 // [38] phi from main::@2 to call3 [phi:main::@2->call3] call3_from___b2: // [38] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1 @@ -609,7 +609,7 @@ main: { // [22] main::$4 = call3::return#2 // [23] *main::ptr = main::$4 -- _deref_pbuc1=vbuaa sta ptr - // [24] call call3 + // [24] call call3 // [38] phi from main::@3 to call3 [phi:main::@3->call3] call3_from___b3: // [38] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1 @@ -798,7 +798,7 @@ main: { // [1] stackpush(byte) = 2 -- _stackpushbyte_=vbuc1 lda #2 pha - // [2] callexecute call1 -- jsr + // [2] callexecute call1 -- call_vprc1 jsr call1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -814,7 +814,7 @@ main: { // [7] stackpush(byte) = 4 -- _stackpushbyte_=vbuc1 lda #4 pha - // [8] callexecute call1 -- jsr + // [8] callexecute call1 -- call_vprc1 jsr call1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -824,7 +824,7 @@ main: { // [11] *main::ptr = main::$1 -- _deref_pbuc1=vbuaa sta ptr // call2(1,2) - // [12] call call2 + // [12] call call2 // [34] phi from main to call2 [phi:main->call2] // [34] phi call2::param2#2 = 2 [phi:main->call2#0] -- vbuaa=vbuc1 lda #2 @@ -840,7 +840,7 @@ main: { // [15] *main::ptr = main::$2 -- _deref_pbuc1=vbuaa sta ptr // call2(3,4) - // [16] call call2 + // [16] call call2 // [34] phi from main::@1 to call2 [phi:main::@1->call2] // [34] phi call2::param2#2 = 4 [phi:main::@1->call2#0] -- vbuaa=vbuc1 lda #4 @@ -856,7 +856,7 @@ main: { // [19] *main::ptr = main::$3 -- _deref_pbuc1=vbuaa sta ptr // call3(1,2) - // [20] call call3 + // [20] call call3 // [38] phi from main::@2 to call3 [phi:main::@2->call3] // [38] phi call3::param2#2 = 2 [phi:main::@2->call3#0] -- vbuaa=vbuc1 lda #2 @@ -871,7 +871,7 @@ main: { // [23] *main::ptr = main::$4 -- _deref_pbuc1=vbuaa sta ptr // call3(3,4) - // [24] call call3 + // [24] call call3 // [38] phi from main::@3 to call3 [phi:main::@3->call3] // [38] phi call3::param2#2 = 4 [phi:main::@3->call3#0] -- vbuaa=vbuc1 lda #4 diff --git a/src/test/ref/function-pointer-advanced-1.asm b/src/test/ref/function-pointer-advanced-1.asm index 84072b9d7..e975ef917 100644 --- a/src/test/ref/function-pointer-advanced-1.asm +++ b/src/test/ref/function-pointer-advanced-1.asm @@ -212,7 +212,7 @@ exec: { ldy.z i lda INPUT,y pha - jsr bi_collect + jsr icall1 pla // out = (*collect)(out,INPUT[i]) pla @@ -225,7 +225,7 @@ exec: { // for(char i=1;i> 4 cout::c#0 = HEX[print::$0] - call cout + call cout to:print::@1 print::@1: scope:[print] from print print::i#3 = phi( print/print::i#2 ) @@ -85,7 +85,7 @@ print::@1: scope:[print] from print idx#4 = idx#30 print::$2 = print::i#3 & $f cout::c#1 = HEX[print::$2] - call cout + call cout to:print::@2 print::@2: scope:[print] from print::@1 idx#31 = phi( print::@1/idx#1 ) @@ -113,14 +113,14 @@ main::@2: scope:[main] from main::@1 idx#54 = phi( main::@1/idx#59 ) main::i#3 = phi( main::@1/main::i#2 ) print::i#0 = INPUT[main::i#3] - call print + call print to:main::@4 main::@4: scope:[main] from main::@2 main::i#5 = phi( main::@2/main::i#3 ) idx#33 = phi( main::@2/idx#6 ) idx#7 = idx#33 cout::c#2 = ' ' - call cout + call cout to:main::@5 main::@5: scope:[main] from main::@4 main::i#4 = phi( main::@4/main::i#5 ) @@ -130,46 +130,46 @@ main::@5: scope:[main] from main::@4 to:main::@1 main::@3: scope:[main] from main::@1 idx#55 = phi( main::@1/idx#59 ) - call ln + call ln to:main::@6 main::@6: scope:[main] from main::@3 idx#35 = phi( main::@3/idx#3 ) idx#9 = idx#35 exec::collect#0 = &sum - call exec + call exec to:main::@7 main::@7: scope:[main] from main::@6 idx#36 = phi( main::@6/idx#23 ) idx#10 = idx#36 - call ln + call ln to:main::@8 main::@8: scope:[main] from main::@7 idx#37 = phi( main::@7/idx#3 ) idx#11 = idx#37 exec::collect#1 = &min - call exec + call exec to:main::@9 main::@9: scope:[main] from main::@8 idx#38 = phi( main::@8/idx#23 ) idx#12 = idx#38 - call ln + call ln to:main::@10 main::@10: scope:[main] from main::@9 idx#39 = phi( main::@9/idx#3 ) idx#13 = idx#39 exec::collect#2 = &max - call exec + call exec to:main::@11 main::@11: scope:[main] from main::@10 idx#40 = phi( main::@10/idx#23 ) idx#14 = idx#40 - call ln + call ln to:main::@12 main::@12: scope:[main] from main::@11 idx#41 = phi( main::@11/idx#3 ) idx#15 = idx#41 exec::collect#3 = &xor - call exec + call exec to:main::@13 main::@13: scope:[main] from main::@12 idx#42 = phi( main::@12/idx#23 ) @@ -186,21 +186,21 @@ exec: scope:[exec] from main::@10 main::@12 main::@6 main::@8 exec::collect#12 = phi( main::@10/exec::collect#2, main::@12/exec::collect#3, main::@6/exec::collect#0, main::@8/exec::collect#1 ) idx#52 = phi( main::@10/idx#13, main::@12/idx#15, main::@6/idx#9, main::@8/idx#11 ) cout::c#3 = ' ' - call cout + call cout to:exec::@4 exec::@4: scope:[exec] from exec exec::collect#10 = phi( exec/exec::collect#12 ) idx#44 = phi( exec/idx#1 ) idx#18 = idx#44 cout::c#4 = ' ' - call cout + call cout to:exec::@5 exec::@5: scope:[exec] from exec::@4 exec::collect#8 = phi( exec::@4/exec::collect#10 ) idx#45 = phi( exec::@4/idx#1 ) idx#19 = idx#45 cout::c#5 = ' ' - call cout + call cout to:exec::@6 exec::@6: scope:[exec] from exec::@5 exec::collect#6 = phi( exec::@5/exec::collect#8 ) @@ -235,7 +235,7 @@ exec::@3: scope:[exec] from exec::@2 idx#56 = phi( exec::@2/idx#60 ) exec::out#1 = exec::$5 print::i#1 = exec::out#1 - call print + call print to:exec::@7 exec::@7: scope:[exec] from exec::@3 exec::collect#9 = phi( exec::@3/exec::collect#11 ) @@ -244,7 +244,7 @@ exec::@7: scope:[exec] from exec::@3 idx#47 = phi( exec::@3/idx#6 ) idx#21 = idx#47 cout::c#6 = ' ' - call cout + call cout to:exec::@8 exec::@8: scope:[exec] from exec::@7 exec::collect#7 = phi( exec::@7/exec::collect#9 ) @@ -327,7 +327,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 idx#58 = phi( __start::__init1/idx#24 ) - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 idx#50 = phi( __start::@1/idx#17 ) @@ -759,7 +759,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -828,46 +828,46 @@ main::@1: scope:[main] from main main::@5 to:main::@3 main::@3: scope:[main] from main::@1 [32] phi() - [33] call ln + [33] call ln to:main::@6 main::@6: scope:[main] from main::@3 [34] phi() - [35] call exec + [35] call exec to:main::@7 main::@7: scope:[main] from main::@6 [36] phi() - [37] call ln + [37] call ln to:main::@8 main::@8: scope:[main] from main::@7 [38] phi() - [39] call exec + [39] call exec to:main::@9 main::@9: scope:[main] from main::@8 [40] phi() - [41] call ln + [41] call ln to:main::@10 main::@10: scope:[main] from main::@9 [42] phi() - [43] call exec + [43] call exec to:main::@11 main::@11: scope:[main] from main::@10 [44] phi() - [45] call ln + [45] call ln to:main::@12 main::@12: scope:[main] from main::@11 [46] phi() - [47] call exec + [47] call exec to:main::@return main::@return: scope:[main] from main::@12 [48] return to:@return main::@2: scope:[main] from main::@1 [49] print::i#0 = INPUT[main::i#2] - [50] call print + [50] call print to:main::@4 main::@4: scope:[main] from main::@2 [51] phi() - [52] call cout + [52] call cout to:main::@5 main::@5: scope:[main] from main::@4 [53] main::i#1 = ++ main::i#2 @@ -884,15 +884,15 @@ ln::@return: scope:[ln] from ln void exec(byte(byte,byte)* exec::collect) exec: scope:[exec] from main::@10 main::@12 main::@6 main::@8 [56] exec::collect#10 = phi( main::@10/&max, main::@12/&xor, main::@6/&sum, main::@8/&min ) - [57] call cout + [57] call cout to:exec::@4 exec::@4: scope:[exec] from exec [58] phi() - [59] call cout + [59] call cout to:exec::@5 exec::@5: scope:[exec] from exec::@4 [60] phi() - [61] call cout + [61] call cout to:exec::@6 exec::@6: scope:[exec] from exec::@5 [62] exec::out#0 = *INPUT @@ -914,11 +914,11 @@ exec::@2: scope:[exec] from exec::@1 to:exec::@3 exec::@3: scope:[exec] from exec::@2 [71] print::i#1 = exec::out#1 - [72] call print + [72] call print to:exec::@7 exec::@7: scope:[exec] from exec::@3 [73] phi() - [74] call cout + [74] call cout to:exec::@8 exec::@8: scope:[exec] from exec::@7 [75] exec::i#1 = ++ exec::i#2 @@ -930,12 +930,12 @@ print: scope:[print] from exec::@3 main::@2 [76] print::i#2 = phi( exec::@3/print::i#1, main::@2/print::i#0 ) [77] print::$0 = print::i#2 >> 4 [78] cout::c#0 = HEX[print::$0] - [79] call cout + [79] call cout to:print::@1 print::@1: scope:[print] from print [80] print::$2 = print::i#2 & $f [81] cout::c#1 = HEX[print::$2] - [82] call cout + [82] call cout to:print::@return print::@return: scope:[print] from print::@1 [83] return @@ -1255,7 +1255,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main // [29] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -1409,14 +1409,14 @@ main: { jmp __b3 // main::@3 __b3: - // [33] call ln + // [33] call ln jsr ln // [34] phi from main::@3 to main::@6 [phi:main::@3->main::@6] __b6_from___b3: jmp __b6 // main::@6 __b6: - // [35] call exec + // [35] call exec // [56] phi from main::@6 to exec [phi:main::@6->exec] exec_from___b6: // [56] phi exec::collect#10 = &sum [phi:main::@6->exec#0] -- pprz1=pprc1 @@ -1430,14 +1430,14 @@ main: { jmp __b7 // main::@7 __b7: - // [37] call ln + // [37] call ln jsr ln // [38] phi from main::@7 to main::@8 [phi:main::@7->main::@8] __b8_from___b7: jmp __b8 // main::@8 __b8: - // [39] call exec + // [39] call exec // [56] phi from main::@8 to exec [phi:main::@8->exec] exec_from___b8: // [56] phi exec::collect#10 = &min [phi:main::@8->exec#0] -- pprz1=pprc1 @@ -1451,14 +1451,14 @@ main: { jmp __b9 // main::@9 __b9: - // [41] call ln + // [41] call ln jsr ln // [42] phi from main::@9 to main::@10 [phi:main::@9->main::@10] __b10_from___b9: jmp __b10 // main::@10 __b10: - // [43] call exec + // [43] call exec // [56] phi from main::@10 to exec [phi:main::@10->exec] exec_from___b10: // [56] phi exec::collect#10 = &max [phi:main::@10->exec#0] -- pprz1=pprc1 @@ -1472,14 +1472,14 @@ main: { jmp __b11 // main::@11 __b11: - // [45] call ln + // [45] call ln jsr ln // [46] phi from main::@11 to main::@12 [phi:main::@11->main::@12] __b12_from___b11: jmp __b12 // main::@12 __b12: - // [47] call exec + // [47] call exec // [56] phi from main::@12 to exec [phi:main::@12->exec] exec_from___b12: // [56] phi exec::collect#10 = &xor [phi:main::@12->exec#0] -- pprz1=pprc1 @@ -1499,7 +1499,7 @@ main: { ldy.z i lda INPUT,y sta.z print.i - // [50] call print + // [50] call print // [76] phi from main::@2 to print [phi:main::@2->print] print_from___b2: // [76] phi idx#53 = idx#54 [phi:main::@2->print#0] -- register_copy @@ -1510,7 +1510,7 @@ main: { jmp __b4 // main::@4 __b4: - // [52] call cout + // [52] call cout // [84] phi from main::@4 to cout [phi:main::@4->cout] cout_from___b4: // [84] phi idx#27 = idx#0 [phi:main::@4->cout#0] -- register_copy @@ -1550,7 +1550,7 @@ exec: { .label out = 6 .label i = 5 .label collect = 3 - // [57] call cout + // [57] call cout // [84] phi from exec to cout [phi:exec->cout] cout_from_exec: // [84] phi idx#27 = 0 [phi:exec->cout#0] -- vbuz1=vbuc1 @@ -1564,7 +1564,7 @@ exec: { jmp __b4 // exec::@4 __b4: - // [59] call cout + // [59] call cout // [84] phi from exec::@4 to cout [phi:exec::@4->cout] cout_from___b4: // [84] phi idx#27 = idx#0 [phi:exec::@4->cout#0] -- register_copy @@ -1576,7 +1576,7 @@ exec: { jmp __b5 // exec::@5 __b5: - // [61] call cout + // [61] call cout // [84] phi from exec::@5 to cout [phi:exec::@5->cout] cout_from___b5: // [84] phi idx#27 = idx#0 [phi:exec::@5->cout#0] -- register_copy @@ -1616,8 +1616,8 @@ exec: { ldy.z i lda INPUT,y pha - // [68] callexecute *exec::collect#10 - jsr bi_collect + // [68] callexecute *exec::collect#10 -- call__deref_pprz1 + jsr icall1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla // [70] exec::out#1 = stackpull(byte) -- vbuz1=_stackpullbyte_ @@ -1627,7 +1627,7 @@ exec: { // exec::@3 __b3: // [71] print::i#1 = exec::out#1 - // [72] call print + // [72] call print // [76] phi from exec::@3 to print [phi:exec::@3->print] print_from___b3: // [76] phi idx#53 = idx#0 [phi:exec::@3->print#0] -- register_copy @@ -1638,7 +1638,7 @@ exec: { jmp __b7 // exec::@7 __b7: - // [74] call cout + // [74] call cout // [84] phi from exec::@7 to cout [phi:exec::@7->cout] cout_from___b7: // [84] phi idx#27 = idx#0 [phi:exec::@7->cout#0] -- register_copy @@ -1655,7 +1655,8 @@ exec: { // [63] phi exec::out#2 = exec::out#1 [phi:exec::@8->exec::@1#0] -- register_copy // [63] phi exec::i#2 = exec::i#1 [phi:exec::@8->exec::@1#1] -- register_copy jmp __b1 - bi_collect: + // Outside Flow + icall1: jmp (collect) } // print @@ -1671,7 +1672,7 @@ print: { // [78] cout::c#0 = HEX[print::$0] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx HEX,y - // [79] call cout + // [79] call cout // [84] phi from print to cout [phi:print->cout] cout_from_print: // [84] phi idx#27 = idx#53 [phi:print->cout#0] -- register_copy @@ -1686,7 +1687,7 @@ print: { // [81] cout::c#1 = HEX[print::$2] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx HEX,y - // [82] call cout + // [82] call cout // [84] phi from print::@1 to cout [phi:print::@1->cout] cout_from___b1: // [84] phi idx#27 = idx#0 [phi:print::@1->cout#0] -- register_copy @@ -1963,7 +1964,7 @@ __start: { sta.z line+1 // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main // [29] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -2112,12 +2113,12 @@ main: { // [32] phi from main::@1 to main::@3 [phi:main::@1->main::@3] // main::@3 // ln() - // [33] call ln + // [33] call ln jsr ln // [34] phi from main::@3 to main::@6 [phi:main::@3->main::@6] // main::@6 // exec(&sum) - // [35] call exec + // [35] call exec // [56] phi from main::@6 to exec [phi:main::@6->exec] // [56] phi exec::collect#10 = &sum [phi:main::@6->exec#0] -- pprz1=pprc1 lda #main::@7] // main::@7 // ln() - // [37] call ln + // [37] call ln jsr ln // [38] phi from main::@7 to main::@8 [phi:main::@7->main::@8] // main::@8 // exec(&min) - // [39] call exec + // [39] call exec // [56] phi from main::@8 to exec [phi:main::@8->exec] // [56] phi exec::collect#10 = &min [phi:main::@8->exec#0] -- pprz1=pprc1 lda #main::@9] // main::@9 // ln() - // [41] call ln + // [41] call ln jsr ln // [42] phi from main::@9 to main::@10 [phi:main::@9->main::@10] // main::@10 // exec(&max) - // [43] call exec + // [43] call exec // [56] phi from main::@10 to exec [phi:main::@10->exec] // [56] phi exec::collect#10 = &max [phi:main::@10->exec#0] -- pprz1=pprc1 lda #main::@11] // main::@11 // ln() - // [45] call ln + // [45] call ln jsr ln // [46] phi from main::@11 to main::@12 [phi:main::@11->main::@12] // main::@12 // exec(&xor) - // [47] call exec + // [47] call exec // [56] phi from main::@12 to exec [phi:main::@12->exec] // [56] phi exec::collect#10 = &xor [phi:main::@12->exec#0] -- pprz1=pprc1 lda #print] // [76] phi idx#53 = idx#54 [phi:main::@2->print#0] -- register_copy // [76] phi print::i#2 = print::i#0 [phi:main::@2->print#1] -- register_copy @@ -2192,7 +2193,7 @@ main: { // [51] phi from main::@2 to main::@4 [phi:main::@2->main::@4] // main::@4 // cout(' ') - // [52] call cout + // [52] call cout // [84] phi from main::@4 to cout [phi:main::@4->cout] // [84] phi idx#27 = idx#0 [phi:main::@4->cout#0] -- register_copy // [84] phi cout::c#7 = ' ' [phi:main::@4->cout#1] -- vbuxx=vbuc1 @@ -2230,7 +2231,7 @@ exec: { .label i = 5 .label collect = 3 // cout(' ') - // [57] call cout + // [57] call cout // [84] phi from exec to cout [phi:exec->cout] // [84] phi idx#27 = 0 [phi:exec->cout#0] -- vbuz1=vbuc1 lda #0 @@ -2241,7 +2242,7 @@ exec: { // [58] phi from exec to exec::@4 [phi:exec->exec::@4] // exec::@4 // cout(' ') - // [59] call cout + // [59] call cout // [84] phi from exec::@4 to cout [phi:exec::@4->cout] // [84] phi idx#27 = idx#0 [phi:exec::@4->cout#0] -- register_copy // [84] phi cout::c#7 = ' ' [phi:exec::@4->cout#1] -- vbuxx=vbuc1 @@ -2250,7 +2251,7 @@ exec: { // [60] phi from exec::@4 to exec::@5 [phi:exec::@4->exec::@5] // exec::@5 // cout(' ') - // [61] call cout + // [61] call cout // [84] phi from exec::@5 to cout [phi:exec::@5->cout] // [84] phi idx#27 = idx#0 [phi:exec::@5->cout#0] -- register_copy // [84] phi cout::c#7 = ' ' [phi:exec::@5->cout#1] -- vbuxx=vbuc1 @@ -2287,8 +2288,8 @@ exec: { ldy.z i lda INPUT,y pha - // [68] callexecute *exec::collect#10 - jsr bi_collect + // [68] callexecute *exec::collect#10 -- call__deref_pprz1 + jsr icall1 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla // out = (*collect)(out,INPUT[i]) @@ -2298,7 +2299,7 @@ exec: { // exec::@3 // print(out) // [71] print::i#1 = exec::out#1 - // [72] call print + // [72] call print // [76] phi from exec::@3 to print [phi:exec::@3->print] // [76] phi idx#53 = idx#0 [phi:exec::@3->print#0] -- register_copy // [76] phi print::i#2 = print::i#1 [phi:exec::@3->print#1] -- register_copy @@ -2306,7 +2307,7 @@ exec: { // [73] phi from exec::@3 to exec::@7 [phi:exec::@3->exec::@7] // exec::@7 // cout(' ') - // [74] call cout + // [74] call cout // [84] phi from exec::@7 to cout [phi:exec::@7->cout] // [84] phi idx#27 = idx#0 [phi:exec::@7->cout#0] -- register_copy // [84] phi cout::c#7 = ' ' [phi:exec::@7->cout#1] -- vbuxx=vbuc1 @@ -2320,7 +2321,8 @@ exec: { // [63] phi exec::out#2 = exec::out#1 [phi:exec::@8->exec::@1#0] -- register_copy // [63] phi exec::i#2 = exec::i#1 [phi:exec::@8->exec::@1#1] -- register_copy jmp __b1 - bi_collect: + // Outside Flow + icall1: jmp (collect) } // print @@ -2338,7 +2340,7 @@ print: { // [78] cout::c#0 = HEX[print::$0] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx HEX,y - // [79] call cout + // [79] call cout // [84] phi from print to cout [phi:print->cout] // [84] phi idx#27 = idx#53 [phi:print->cout#0] -- register_copy // [84] phi cout::c#7 = cout::c#0 [phi:print->cout#1] -- register_copy @@ -2352,7 +2354,7 @@ print: { // [81] cout::c#1 = HEX[print::$2] -- vbuxx=pbuc1_derefidx_vbuaa tay ldx HEX,y - // [82] call cout + // [82] call cout // [84] phi from print::@1 to cout [phi:print::@1->cout] // [84] phi idx#27 = idx#0 [phi:print::@1->cout#0] -- register_copy // [84] phi cout::c#7 = cout::c#1 [phi:print::@1->cout#1] -- register_copy diff --git a/src/test/ref/function-pointer-noarg-call-10.asm b/src/test/ref/function-pointer-noarg-call-10.asm index 2e9746706..78086e5c8 100644 --- a/src/test/ref/function-pointer-noarg-call-10.asm +++ b/src/test/ref/function-pointer-noarg-call-10.asm @@ -88,7 +88,7 @@ do10: { sta.z i __b1: // (*fn)() - jsr bi_fn + jsr icall1 // for( byte i: 0..9) inc.z i lda #$a @@ -96,6 +96,6 @@ do10: { bne __b1 // } rts - bi_fn: + icall1: jmp (fn) } diff --git a/src/test/ref/function-pointer-noarg-call-10.log b/src/test/ref/function-pointer-noarg-call-10.log index 334f0437e..2300e5d80 100644 --- a/src/test/ref/function-pointer-noarg-call-10.log +++ b/src/test/ref/function-pointer-noarg-call-10.log @@ -1,4 +1,4 @@ -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *do10::fn CONTROL FLOW GRAPH SSA @@ -27,7 +27,7 @@ do10::@return: scope:[do10] from do10::@2 void hello() hello: scope:[hello] from print::msg#0 = hello::msg - call print + call print to:hello::@1 hello::@1: scope:[hello] from hello to:hello::@return @@ -38,7 +38,7 @@ hello::@return: scope:[hello] from hello::@1 void world() world: scope:[world] from print::msg#1 = world::msg - call print + call print to:world::@1 world::@1: scope:[world] from world to:world::@return @@ -49,11 +49,11 @@ world::@return: scope:[world] from world::@1 void main() main: scope:[main] from __start::@1 do10::fn#0 = &hello - call do10 + call do10 to:main::@1 main::@1: scope:[main] from main do10::fn#1 = &world - call do10 + call do10 to:main::@2 main::@2: scope:[main] from main::@1 to:main::@return @@ -86,7 +86,7 @@ __start::__init1: scope:[__start] from __start idx = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -219,7 +219,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -228,7 +228,7 @@ __start::@return: scope:[__start] from __start::@1 void world() world: scope:[world] from [5] phi() - [6] call print + [6] call print to:world::@return world::@return: scope:[world] from world [7] return @@ -237,7 +237,7 @@ world::@return: scope:[world] from world void hello() hello: scope:[hello] from [8] phi() - [9] call print + [9] call print to:hello::@return hello::@return: scope:[hello] from hello [10] return @@ -246,11 +246,11 @@ hello::@return: scope:[hello] from hello void main() main: scope:[main] from __start::@1 [11] phi() - [12] call do10 + [12] call do10 to:main::@1 main::@1: scope:[main] from main [13] phi() - [14] call do10 + [14] call do10 to:main::@return main::@return: scope:[main] from main::@1 [15] return @@ -355,17 +355,17 @@ Uplift Scope [world] Uplift Scope [main] Uplift Scope [__start] -Uplifting [do10] best 1054 combination zp[1]:7 [ do10::i#2 do10::i#1 ] zp[2]:5 [ do10::fn#3 ] -Uplifting [print] best 934 combination reg byte y [ print::i#2 print::i#1 ] zp[2]:2 [ print::msg#3 ] -Uplifting [] best 934 combination zp[1]:8 [ idx ] -Uplifting [hello] best 934 combination -Uplifting [world] best 934 combination -Uplifting [main] best 934 combination -Uplifting [__start] best 934 combination +Uplifting [do10] best 1099 combination zp[1]:7 [ do10::i#2 do10::i#1 ] zp[2]:5 [ do10::fn#3 ] +Uplifting [print] best 979 combination reg byte y [ print::i#2 print::i#1 ] zp[2]:2 [ print::msg#3 ] +Uplifting [] best 979 combination zp[1]:8 [ idx ] +Uplifting [hello] best 979 combination +Uplifting [world] best 979 combination +Uplifting [main] best 979 combination +Uplifting [__start] best 979 combination Attempting to uplift remaining variables inzp[1]:7 [ do10::i#2 do10::i#1 ] -Uplifting [do10] best 934 combination zp[1]:7 [ do10::i#2 do10::i#1 ] +Uplifting [do10] best 979 combination zp[1]:7 [ do10::i#2 do10::i#1 ] Attempting to uplift remaining variables inzp[1]:8 [ idx ] -Uplifting [] best 934 combination zp[1]:8 [ idx ] +Uplifting [] best 979 combination zp[1]:8 [ idx ] Allocated (was zp[2]:5) zp[2]:4 [ do10::fn#3 ] Allocated (was zp[1]:7) zp[1]:6 [ do10::i#2 do10::i#1 ] Allocated (was zp[1]:8) zp[1]:7 [ idx ] @@ -399,7 +399,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main // [11] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -411,7 +411,7 @@ __start: { } // world world: { - // [6] call print + // [6] call print // [16] phi from world to print [phi:world->print] print_from_world: // [16] phi print::msg#3 = world::msg [phi:world->print#0] -- pbuz1=pbuc1 @@ -432,7 +432,7 @@ world: { .segment Code // hello hello: { - // [9] call print + // [9] call print // [16] phi from hello to print [phi:hello->print] print_from_hello: // [16] phi print::msg#3 = hello::msg [phi:hello->print#0] -- pbuz1=pbuc1 @@ -453,7 +453,7 @@ hello: { .segment Code // main main: { - // [12] call do10 + // [12] call do10 // [23] phi from main to do10 [phi:main->do10] do10_from_main: // [23] phi do10::fn#3 = &hello [phi:main->do10#0] -- pprz1=pprc1 @@ -467,7 +467,7 @@ main: { jmp __b1 // main::@1 __b1: - // [14] call do10 + // [14] call do10 // [23] phi from main::@1 to do10 [phi:main::@1->do10] do10_from___b1: // [23] phi do10::fn#3 = &world [phi:main::@1->do10#0] -- pprz1=pprc1 @@ -532,8 +532,8 @@ do10: { jmp __b1 // do10::@1 __b1: - // [25] callexecute *do10::fn#3 - jsr bi_fn + // [25] callexecute *do10::fn#3 -- call__deref_pprz1 + jsr icall1 jmp __b2 // do10::@2 __b2: @@ -548,7 +548,8 @@ do10: { __breturn: // [28] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) } // File Data @@ -626,7 +627,7 @@ zp[1]:7 [ idx ] FINAL ASSEMBLER -Score: 676 +Score: 721 // File Comments // Tests calling into different function pointers which call a common sub-method @@ -652,7 +653,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main // [11] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -662,7 +663,7 @@ __start: { // world world: { // print("world ") - // [6] call print + // [6] call print // [16] phi from world to print [phi:world->print] // [16] phi print::msg#3 = world::msg [phi:world->print#0] -- pbuz1=pbuc1 lda #print] // [16] phi print::msg#3 = hello::msg [phi:hello->print#0] -- pbuz1=pbuc1 lda #do10] // [23] phi do10::fn#3 = &hello [phi:main->do10#0] -- pprz1=pprc1 lda #main::@1] // main::@1 // do10(&world) - // [14] call do10 + // [14] call do10 // [23] phi from main::@1 to do10 [phi:main::@1->do10] // [23] phi do10::fn#3 = &world [phi:main::@1->do10#0] -- pprz1=pprc1 lda #main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [3] callexecute myFunc2 -- jsr + // [3] callexecute myFunc2 -- call_vprc1 jsr myFunc2 jmp __breturn // main::@return @@ -262,12 +262,12 @@ Score: 42 // main main: { // (*funcPointer)() - // [1] callexecute myFunc -- jsr + // [1] callexecute myFunc -- call_vprc1 jsr myFunc // [2] phi from main to main::@1 [phi:main->main::@1] // main::@1 // (*funcPointer)() - // [3] callexecute myFunc2 -- jsr + // [3] callexecute myFunc2 -- call_vprc1 jsr myFunc2 // main::@return // } diff --git a/src/test/ref/function-pointer-noarg-call-12.asm b/src/test/ref/function-pointer-noarg-call-12.asm index 32c426a70..4a9037157 100644 --- a/src/test/ref/function-pointer-noarg-call-12.asm +++ b/src/test/ref/function-pointer-noarg-call-12.asm @@ -28,19 +28,19 @@ main: { lda addrtable+1 sta.z fn+1 // (*fn)() - jsr bi_fn + jsr icall1 // fn = addrtable[1] lda addrtable+1*SIZEOF_POINTER sta.z fn_1 lda addrtable+1*SIZEOF_POINTER+1 sta.z fn_1+1 // (*fn)() - jsr bi_fn_1 + jsr icall2 // } rts - bi_fn: + icall1: jmp (fn) - bi_fn_1: + icall2: jmp (fn_1) } myFunc2: { diff --git a/src/test/ref/function-pointer-noarg-call-12.log b/src/test/ref/function-pointer-noarg-call-12.log index 73d723823..32a6f7552 100644 --- a/src/test/ref/function-pointer-noarg-call-12.log +++ b/src/test/ref/function-pointer-noarg-call-12.log @@ -40,7 +40,7 @@ main::@return: scope:[main] from main::@1 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -195,10 +195,10 @@ Uplift Scope [myFunc] Uplift Scope [myFunc2] Uplift Scope [] -Uplifting [main] best 116 combination zp[2]:2 [ main::fn#0 ] zp[2]:4 [ main::fn#1 ] -Uplifting [myFunc] best 116 combination -Uplifting [myFunc2] best 116 combination -Uplifting [] best 116 combination +Uplifting [main] best 206 combination zp[2]:2 [ main::fn#0 ] zp[2]:4 [ main::fn#1 ] +Uplifting [myFunc] best 206 combination +Uplifting [myFunc2] best 206 combination +Uplifting [] best 206 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -234,8 +234,8 @@ main: { sta.z fn lda addrtable+1 sta.z fn+1 - // [3] callexecute *main::fn#0 - jsr bi_fn + // [3] callexecute *main::fn#0 -- call__deref_pprz1 + jsr icall1 jmp __b1 // main::@1 __b1: @@ -244,16 +244,17 @@ main: { sta.z fn_1 lda addrtable+1*SIZEOF_POINTER+1 sta.z fn_1+1 - // [5] callexecute *main::fn#1 - jsr bi_fn_1 + // [5] callexecute *main::fn#1 -- call__deref_pprz1 + jsr icall2 jmp __breturn // main::@return __breturn: // [6] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) - bi_fn_1: + icall2: jmp (fn_1) } // myFunc2 @@ -311,7 +312,7 @@ zp[2]:4 [ main::fn#1 ] FINAL ASSEMBLER -Score: 104 +Score: 194 // File Comments // Tests calling through pointers to non-args no-return functions @@ -350,8 +351,8 @@ main: { lda addrtable+1 sta.z fn+1 // (*fn)() - // [3] callexecute *main::fn#0 - jsr bi_fn + // [3] callexecute *main::fn#0 -- call__deref_pprz1 + jsr icall1 // main::@1 // fn = addrtable[1] // [4] main::fn#1 = *(addrtable+1*SIZEOF_POINTER) -- pprz1=_deref_qprc1 @@ -360,15 +361,16 @@ main: { lda addrtable+1*SIZEOF_POINTER+1 sta.z fn_1+1 // (*fn)() - // [5] callexecute *main::fn#1 - jsr bi_fn_1 + // [5] callexecute *main::fn#1 -- call__deref_pprz1 + jsr icall2 // main::@return // } // [6] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) - bi_fn_1: + icall2: jmp (fn_1) } // myFunc2 diff --git a/src/test/ref/function-pointer-noarg-call-14.asm b/src/test/ref/function-pointer-noarg-call-14.asm index 65a91bc07..e045d631a 100644 --- a/src/test/ref/function-pointer-noarg-call-14.asm +++ b/src/test/ref/function-pointer-noarg-call-14.asm @@ -203,10 +203,10 @@ gotoxy: { f1: { .label fn = 4 // (*fn)() - jsr bi_fn + jsr icall1 // } rts - bi_fn: + icall1: jmp (fn) } // Output one character at the current cursor position diff --git a/src/test/ref/function-pointer-noarg-call-14.log b/src/test/ref/function-pointer-noarg-call-14.log index 251b9faeb..a1505dbc8 100644 --- a/src/test/ref/function-pointer-noarg-call-14.log +++ b/src/test/ref/function-pointer-noarg-call-14.log @@ -4,7 +4,7 @@ Fixing struct type size struct printf_buffer_number to 12 Fixing struct type SIZE_OF struct printf_buffer_number to 12 Fixing struct type SIZE_OF struct printf_buffer_number to 12 Inlined call vicSelectGfxBank::$0 = call toDd00(vicSelectGfxBank::gfx) -Inlined call call __init +Inlined call call __init Eliminating unused variable with no statement memcpy::$0 Eliminating unused variable with no statement memset::$2 Eliminating unused variable with no statement gotoxy::$4 @@ -142,7 +142,7 @@ cputc: scope:[cputc] from cputs::@2 if(cputc::$0) goto cputc::@1 to:cputc::@2 cputc::@1: scope:[cputc] from cputc - call cputln + call cputln to:cputc::@4 cputc::@4: scope:[cputc] from cputc::@1 to:cputc::@return @@ -156,7 +156,7 @@ cputc::@2: scope:[cputc] from cputc if(cputc::$2) goto cputc::@return to:cputc::@3 cputc::@3: scope:[cputc] from cputc::@2 - call cputln + call cputln to:cputc::@5 cputc::@5: scope:[cputc] from cputc::@3 to:cputc::@return @@ -170,7 +170,7 @@ cputln: scope:[cputln] from cputc::@1 cputc::@3 conio_line_color = conio_line_color + $28 conio_cursor_x = 0 conio_cursor_y = ++ conio_cursor_y - call cscroll + call cscroll to:cputln::@1 cputln::@1: scope:[cputln] from cputln to:cputln::@return @@ -195,7 +195,7 @@ cputs::@2: scope:[cputs] from cputs::@1 cputs::s#6 = phi( cputs::@1/cputs::s#0 ) cputs::c#2 = phi( cputs::@1/cputs::c#1 ) cputc::c#0 = cputs::c#2 - call cputc + call cputc to:cputs::@3 cputs::@3: scope:[cputs] from cputs::@2 cputs::s#5 = phi( cputs::@2/cputs::s#6 ) @@ -218,28 +218,28 @@ cscroll::@3: scope:[cscroll] from cscroll::@1 memcpy::destination#0 = (void*)CONIO_SCREEN_TEXT memcpy::source#0 = (void*)CONIO_SCREEN_TEXT+$28 memcpy::num#0 = $19*$28-$28 - call memcpy + call memcpy memcpy::return#2 = memcpy::return#1 to:cscroll::@4 cscroll::@4: scope:[cscroll] from cscroll::@3 memcpy::destination#1 = (void*)CONIO_SCREEN_COLORS memcpy::source#1 = (void*)CONIO_SCREEN_COLORS+$28 memcpy::num#1 = $19*$28-$28 - call memcpy + call memcpy memcpy::return#3 = memcpy::return#1 to:cscroll::@5 cscroll::@5: scope:[cscroll] from cscroll::@4 memset::str#0 = (void*)CONIO_SCREEN_TEXT+$19*$28-$28 memset::c#0 = ' ' memset::num#0 = $28 - call memset + call memset memset::return#2 = memset::return#1 to:cscroll::@6 cscroll::@6: scope:[cscroll] from cscroll::@5 memset::str#1 = (void*)CONIO_SCREEN_COLORS+$19*$28-$28 memset::c#1 = conio_textcolor memset::num#1 = $28 - call memset + call memset memset::return#3 = memset::return#1 to:cscroll::@7 cscroll::@7: scope:[cscroll] from cscroll::@6 @@ -250,7 +250,7 @@ cscroll::@7: scope:[cscroll] from cscroll::@6 cscroll::@2: scope:[cscroll] from cscroll::@1 gotoxy::x#1 = 0 gotoxy::y#1 = 0 - call gotoxy + call gotoxy to:cscroll::@8 cscroll::@8: scope:[cscroll] from cscroll::@2 to:cscroll::@return @@ -269,7 +269,7 @@ conio_c64_init::@1: scope:[conio_c64_init] from conio_c64_init conio_c64_init:: conio_c64_init::line#2 = phi( conio_c64_init/conio_c64_init::line#0, conio_c64_init::@2/conio_c64_init::line#1 ) gotoxy::x#2 = 0 gotoxy::y#2 = conio_c64_init::line#2 - call gotoxy + call gotoxy to:conio_c64_init::@3 conio_c64_init::@3: scope:[conio_c64_init] from conio_c64_init::@1 to:conio_c64_init::@return @@ -292,7 +292,7 @@ f1::@return: scope:[f1] from f1 void hello() hello: scope:[hello] from cputs::s#1 = hello::s - call cputs + call cputs to:hello::@1 hello::@1: scope:[hello] from hello to:hello::@return @@ -303,7 +303,7 @@ hello::@return: scope:[hello] from hello::@1 void world() world: scope:[world] from cputs::s#2 = world::s - call cputs + call cputs to:world::@1 world::@1: scope:[world] from world to:world::@return @@ -314,11 +314,11 @@ world::@return: scope:[world] from world::@1 void main() main: scope:[main] from __start::@1 f1::fn#0 = &hello - call f1 + call f1 to:main::@1 main::@1: scope:[main] from main f1::fn#1 = &world - call f1 + call f1 to:main::@2 main::@2: scope:[main] from main::@1 to:main::@return @@ -336,12 +336,12 @@ __start::__init1: scope:[__start] from __start conio_line_color = CONIO_SCREEN_COLORS conio_textcolor = CONIO_TEXTCOLOR_DEFAULT conio_scroll_enable = 1 - call conio_c64_init + call conio_c64_init to:__start::@2 __start::@2: scope:[__start] from __start::__init1 to:__start::@1 __start::@1: scope:[__start] from __start::@2 - call main + call main to:__start::@3 __start::@3: scope:[__start] from __start::@1 to:__start::@return @@ -932,11 +932,11 @@ __start::__init1: scope:[__start] from __start [2] conio_cursor_y = 0 [3] conio_line_text = DEFAULT_SCREEN [4] conio_line_color = COLORRAM - [5] call conio_c64_init + [5] call conio_c64_init to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [6] phi() - [7] call main + [7] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [8] return @@ -945,7 +945,7 @@ __start::@return: scope:[__start] from __start::@1 void world() world: scope:[world] from [9] phi() - [10] call cputs + [10] call cputs to:world::@return world::@return: scope:[world] from world [11] return @@ -954,7 +954,7 @@ world::@return: scope:[world] from world void hello() hello: scope:[hello] from [12] phi() - [13] call cputs + [13] call cputs to:hello::@return hello::@return: scope:[hello] from hello [14] return @@ -971,7 +971,7 @@ conio_c64_init::@2: scope:[conio_c64_init] from conio_c64_init conio_c64_init::@1: scope:[conio_c64_init] from conio_c64_init conio_c64_init::@2 [18] conio_c64_init::line#2 = phi( conio_c64_init::@2/conio_c64_init::line#0, conio_c64_init/$19-1 ) [19] gotoxy::y#2 = conio_c64_init::line#2 - [20] call gotoxy + [20] call gotoxy to:conio_c64_init::@return conio_c64_init::@return: scope:[conio_c64_init] from conio_c64_init::@1 [21] return @@ -980,11 +980,11 @@ conio_c64_init::@return: scope:[conio_c64_init] from conio_c64_init::@1 void main() main: scope:[main] from __start::@1 [22] phi() - [23] call f1 + [23] call f1 to:main::@1 main::@1: scope:[main] from main [24] phi() - [25] call f1 + [25] call f1 to:main::@return main::@return: scope:[main] from main::@1 [26] return @@ -1005,7 +1005,7 @@ cputs::@return: scope:[cputs] from cputs::@1 to:@return cputs::@2: scope:[cputs] from cputs::@1 [33] cputc::c#0 = cputs::c#1 - [34] call cputc + [34] call cputc to:cputs::@1 void gotoxy(byte gotoxy::x , byte gotoxy::y) @@ -1056,14 +1056,14 @@ cputc::@2: scope:[cputc] from cputc to:cputc::@3 cputc::@3: scope:[cputc] from cputc::@2 [57] phi() - [58] call cputln + [58] call cputln to:cputc::@return cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3 [59] return to:@return cputc::@1: scope:[cputc] from cputc [60] phi() - [61] call cputln + [61] call cputln to:cputc::@return void cputln() @@ -1072,7 +1072,7 @@ cputln: scope:[cputln] from cputc::@1 cputc::@3 [63] conio_line_color = conio_line_color + $28 [64] conio_cursor_x = 0 [65] conio_cursor_y = ++ conio_cursor_y - [66] call cscroll + [66] call cscroll to:cputln::@return cputln::@return: scope:[cputln] from cputln [67] return @@ -1084,19 +1084,19 @@ cscroll: scope:[cscroll] from cputln to:cscroll::@1 cscroll::@1: scope:[cscroll] from cscroll [69] phi() - [70] call memcpy + [70] call memcpy to:cscroll::@2 cscroll::@2: scope:[cscroll] from cscroll::@1 [71] phi() - [72] call memcpy + [72] call memcpy to:cscroll::@3 cscroll::@3: scope:[cscroll] from cscroll::@2 [73] phi() - [74] call memset + [74] call memset to:cscroll::@4 cscroll::@4: scope:[cscroll] from cscroll::@3 [75] phi() - [76] call memset + [76] call memset to:cscroll::@5 cscroll::@5: scope:[cscroll] from cscroll::@4 [77] conio_line_text = conio_line_text - $28 @@ -1418,31 +1418,31 @@ Uplift Scope [world] Uplift Scope [main] Uplift Scope [__start] -Uplifting [memcpy] best 12986 combination zp[2]:12 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:14 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:41 [ memcpy::src_end#0 ] zp[2]:8 [ memcpy::source#2 ] zp[2]:10 [ memcpy::destination#2 ] -Uplifting [memset] best 12880 combination zp[2]:19 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:43 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:16 [ memset::str#3 ] -Uplifting [] best 12880 combination zp[1]:22 [ conio_cursor_y ] zp[2]:23 [ conio_line_text ] zp[2]:25 [ conio_line_color ] zp[1]:21 [ conio_cursor_x ] -Uplifting [gotoxy] best 12867 combination zp[2]:31 [ gotoxy::$8 ] zp[2]:33 [ gotoxy::$9 ] zp[2]:37 [ gotoxy::$5 ] zp[2]:39 [ gotoxy::$6 ] zp[2]:29 [ gotoxy::$7 ] reg byte x [ gotoxy::y#4 gotoxy::y#2 ] zp[2]:35 [ gotoxy::line_offset#0 ] -Uplifting [cputc] best 12831 combination reg byte a [ cputc::c#0 ] -Uplifting [cputs] best 12761 combination zp[2]:3 [ cputs::s#3 cputs::s#4 cputs::s#0 ] reg byte a [ cputs::c#1 ] -Uplifting [conio_c64_init] best 12749 combination reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ] -Uplifting [RADIX] best 12749 combination -Uplifting [cputln] best 12749 combination -Uplifting [MOS6526_CIA] best 12749 combination -Uplifting [MOS6569_VICII] best 12749 combination -Uplifting [MOS6581_SID] best 12749 combination -Uplifting [cscroll] best 12749 combination -Uplifting [printf_format_number] best 12749 combination -Uplifting [printf_buffer_number] best 12749 combination -Uplifting [printf_format_string] best 12749 combination -Uplifting [f1] best 12749 combination zp[2]:6 [ f1::fn#2 ] -Uplifting [hello] best 12749 combination -Uplifting [world] best 12749 combination -Uplifting [main] best 12749 combination -Uplifting [__start] best 12749 combination +Uplifting [memcpy] best 13031 combination zp[2]:12 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] zp[2]:14 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] zp[2]:41 [ memcpy::src_end#0 ] zp[2]:8 [ memcpy::source#2 ] zp[2]:10 [ memcpy::destination#2 ] +Uplifting [memset] best 12925 combination zp[2]:19 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:43 [ memset::end#0 ] reg byte x [ memset::c#4 ] zp[2]:16 [ memset::str#3 ] +Uplifting [] best 12925 combination zp[1]:22 [ conio_cursor_y ] zp[2]:23 [ conio_line_text ] zp[2]:25 [ conio_line_color ] zp[1]:21 [ conio_cursor_x ] +Uplifting [gotoxy] best 12912 combination zp[2]:31 [ gotoxy::$8 ] zp[2]:33 [ gotoxy::$9 ] zp[2]:37 [ gotoxy::$5 ] zp[2]:39 [ gotoxy::$6 ] zp[2]:29 [ gotoxy::$7 ] reg byte x [ gotoxy::y#4 gotoxy::y#2 ] zp[2]:35 [ gotoxy::line_offset#0 ] +Uplifting [cputc] best 12876 combination reg byte a [ cputc::c#0 ] +Uplifting [cputs] best 12806 combination zp[2]:3 [ cputs::s#3 cputs::s#4 cputs::s#0 ] reg byte a [ cputs::c#1 ] +Uplifting [conio_c64_init] best 12794 combination reg byte x [ conio_c64_init::line#2 conio_c64_init::line#0 ] +Uplifting [RADIX] best 12794 combination +Uplifting [cputln] best 12794 combination +Uplifting [MOS6526_CIA] best 12794 combination +Uplifting [MOS6569_VICII] best 12794 combination +Uplifting [MOS6581_SID] best 12794 combination +Uplifting [cscroll] best 12794 combination +Uplifting [printf_format_number] best 12794 combination +Uplifting [printf_buffer_number] best 12794 combination +Uplifting [printf_format_string] best 12794 combination +Uplifting [f1] best 12794 combination zp[2]:6 [ f1::fn#2 ] +Uplifting [hello] best 12794 combination +Uplifting [world] best 12794 combination +Uplifting [main] best 12794 combination +Uplifting [__start] best 12794 combination Attempting to uplift remaining variables inzp[1]:22 [ conio_cursor_y ] -Uplifting [] best 12749 combination zp[1]:22 [ conio_cursor_y ] +Uplifting [] best 12794 combination zp[1]:22 [ conio_cursor_y ] Attempting to uplift remaining variables inzp[1]:21 [ conio_cursor_x ] -Uplifting [] best 12749 combination zp[1]:21 [ conio_cursor_x ] +Uplifting [] best 12794 combination zp[1]:21 [ conio_cursor_x ] Coalescing zero page register [ zp[2]:8 [ memcpy::source#2 ] ] with [ zp[2]:12 [ memcpy::src#2 memcpy::src#4 memcpy::src#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:10 [ memcpy::destination#2 ] ] with [ zp[2]:14 [ memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ] ] - score: 1 Coalescing zero page register [ zp[2]:16 [ memset::str#3 ] ] with [ zp[2]:19 [ memset::dst#2 memset::dst#4 memset::dst#1 ] ] - score: 1 @@ -1513,14 +1513,14 @@ __start: { sta.z conio_line_color lda #>COLORRAM sta.z conio_line_color+1 - // [5] call conio_c64_init + // [5] call conio_c64_init jsr conio_c64_init // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] __b1_from___init1: jmp __b1 // __start::@1 __b1: - // [7] call main + // [7] call main // [22] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -1532,7 +1532,7 @@ __start: { } // world world: { - // [10] call cputs + // [10] call cputs // [27] phi from world to cputs [phi:world->cputs] cputs_from_world: // [27] phi cputs::s#4 = world::s [phi:world->cputs#0] -- pbuz1=pbuc1 @@ -1553,7 +1553,7 @@ world: { .segment Code // hello hello: { - // [13] call cputs + // [13] call cputs // [27] phi from hello to cputs [phi:hello->cputs] cputs_from_hello: // [27] phi cputs::s#4 = hello::s [phi:hello->cputs#0] -- pbuz1=pbuc1 @@ -1599,7 +1599,7 @@ conio_c64_init: { // conio_c64_init::@1 __b1: // [19] gotoxy::y#2 = conio_c64_init::line#2 - // [20] call gotoxy + // [20] call gotoxy jsr gotoxy jmp __breturn // conio_c64_init::@return @@ -1609,7 +1609,7 @@ conio_c64_init: { } // main main: { - // [23] call f1 + // [23] call f1 // [49] phi from main to f1 [phi:main->f1] f1_from_main: // [49] phi f1::fn#2 = &hello [phi:main->f1#0] -- pprz1=pprc1 @@ -1623,7 +1623,7 @@ main: { jmp __b1 // main::@1 __b1: - // [25] call f1 + // [25] call f1 // [49] phi from main::@1 to f1 [phi:main::@1->f1] f1_from___b1: // [49] phi f1::fn#2 = &world [phi:main::@1->f1#0] -- pprz1=pprc1 @@ -1669,7 +1669,7 @@ cputs: { // cputs::@2 __b2: // [33] cputc::c#0 = cputs::c#1 - // [34] call cputc + // [34] call cputc jsr cputc jmp __b1_from___b2 } @@ -1776,14 +1776,15 @@ gotoxy: { // f1(void()* zp(4) fn) f1: { .label fn = 4 - // [50] callexecute *f1::fn#2 - jsr bi_fn + // [50] callexecute *f1::fn#2 -- call__deref_pprz1 + jsr icall1 jmp __breturn // f1::@return __breturn: // [51] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) } // cputc @@ -1815,7 +1816,7 @@ cputc: { jmp __b3 // cputc::@3 __b3: - // [58] call cputln + // [58] call cputln jsr cputln jmp __breturn // cputc::@return @@ -1827,7 +1828,7 @@ cputc: { jmp __b1 // cputc::@1 __b1: - // [61] call cputln + // [61] call cputln jsr cputln jmp __breturn } @@ -1855,7 +1856,7 @@ cputln: { sta.z conio_cursor_x // [65] conio_cursor_y = ++ conio_cursor_y -- vbuz1=_inc_vbuz1 inc.z conio_cursor_y - // [66] call cscroll + // [66] call cscroll jsr cscroll jmp __breturn // cputln::@return @@ -1875,7 +1876,7 @@ cscroll: { jmp __b1 // cscroll::@1 __b1: - // [70] call memcpy + // [70] call memcpy // [81] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy] memcpy_from___b1: // [81] phi memcpy::destination#2 = (void*)DEFAULT_SCREEN [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1 @@ -1894,7 +1895,7 @@ cscroll: { jmp __b2 // cscroll::@2 __b2: - // [72] call memcpy + // [72] call memcpy // [81] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy] memcpy_from___b2: // [81] phi memcpy::destination#2 = (void*)COLORRAM [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1 @@ -1913,7 +1914,7 @@ cscroll: { jmp __b3 // cscroll::@3 __b3: - // [74] call memset + // [74] call memset // [91] phi from cscroll::@3 to memset [phi:cscroll::@3->memset] memset_from___b3: // [91] phi memset::c#4 = ' ' [phi:cscroll::@3->memset#0] -- vbuxx=vbuc1 @@ -1929,7 +1930,7 @@ cscroll: { jmp __b4 // cscroll::@4 __b4: - // [76] call memset + // [76] call memset // [91] phi from cscroll::@4 to memset [phi:cscroll::@4->memset] memset_from___b4: // [91] phi memset::c#4 = LIGHT_BLUE [phi:cscroll::@4->memset#0] -- vbuxx=vbuc1 @@ -2289,7 +2290,7 @@ zp[2]:22 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcp FINAL ASSEMBLER -Score: 11077 +Score: 11122 // File Comments // Tests trouble passing a function pointer @@ -2341,11 +2342,11 @@ __start: { lda #>COLORRAM sta.z conio_line_color+1 // #pragma constructor_for(conio_c64_init, cputc, clrscr, cscroll) - // [5] call conio_c64_init + // [5] call conio_c64_init jsr conio_c64_init // [6] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [7] call main + // [7] call main // [22] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -2355,7 +2356,7 @@ __start: { // world world: { // printf("world!") - // [10] call cputs + // [10] call cputs // [27] phi from world to cputs [phi:world->cputs] // [27] phi cputs::s#4 = world::s [phi:world->cputs#0] -- pbuz1=pbuc1 lda #cputs] // [27] phi cputs::s#4 = hello::s [phi:hello->cputs#0] -- pbuz1=pbuc1 lda #f1] // [49] phi f1::fn#2 = &hello [phi:main->f1#0] -- pprz1=pprc1 lda #main::@1] // main::@1 // f1(&world) - // [25] call f1 + // [25] call f1 // [49] phi from main::@1 to f1 [phi:main::@1->f1] // [49] phi f1::fn#2 = &world [phi:main::@1->f1#0] -- pprz1=pprc1 lda #cputc::@3] // cputc::@3 // cputln() - // [58] call cputln + // [58] call cputln jsr cputln // cputc::@return __breturn: @@ -2632,7 +2634,7 @@ cputc: { // cputc::@1 __b1: // cputln() - // [61] call cputln + // [61] call cputln jsr cputln rts } @@ -2665,7 +2667,7 @@ cputln: { // [65] conio_cursor_y = ++ conio_cursor_y -- vbuz1=_inc_vbuz1 inc.z conio_cursor_y // cscroll() - // [66] call cscroll + // [66] call cscroll jsr cscroll // cputln::@return // } @@ -2683,7 +2685,7 @@ cscroll: { // [69] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] // cscroll::@1 // memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH) - // [70] call memcpy + // [70] call memcpy // [81] phi from cscroll::@1 to memcpy [phi:cscroll::@1->memcpy] // [81] phi memcpy::destination#2 = (void*)DEFAULT_SCREEN [phi:cscroll::@1->memcpy#0] -- pvoz1=pvoc1 lda #cscroll::@2] // cscroll::@2 // memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH) - // [72] call memcpy + // [72] call memcpy // [81] phi from cscroll::@2 to memcpy [phi:cscroll::@2->memcpy] // [81] phi memcpy::destination#2 = (void*)COLORRAM [phi:cscroll::@2->memcpy#0] -- pvoz1=pvoc1 lda #cscroll::@3] // cscroll::@3 // memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH) - // [74] call memset + // [74] call memset // [91] phi from cscroll::@3 to memset [phi:cscroll::@3->memset] // [91] phi memset::c#4 = ' ' [phi:cscroll::@3->memset#0] -- vbuxx=vbuc1 ldx #' ' @@ -2728,7 +2730,7 @@ cscroll: { // [75] phi from cscroll::@3 to cscroll::@4 [phi:cscroll::@3->cscroll::@4] // cscroll::@4 // memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH) - // [76] call memset + // [76] call memset // [91] phi from cscroll::@4 to memset [phi:cscroll::@4->memset] // [91] phi memset::c#4 = LIGHT_BLUE [phi:cscroll::@4->memset#0] -- vbuxx=vbuc1 ldx #LIGHT_BLUE diff --git a/src/test/ref/function-pointer-noarg-call-2.asm b/src/test/ref/function-pointer-noarg-call-2.asm index f56f3aa7c..7703c3a1e 100644 --- a/src/test/ref/function-pointer-noarg-call-2.asm +++ b/src/test/ref/function-pointer-noarg-call-2.asm @@ -48,8 +48,8 @@ main: { sta.z f+1 __b4: // (*f)() - jsr bi_f + jsr icall1 jmp __b2 - bi_f: + icall1: jmp (f) } diff --git a/src/test/ref/function-pointer-noarg-call-2.log b/src/test/ref/function-pointer-noarg-call-2.log index e7ded3ecf..609973b70 100644 --- a/src/test/ref/function-pointer-noarg-call-2.log +++ b/src/test/ref/function-pointer-noarg-call-2.log @@ -55,7 +55,7 @@ fn2::@return: scope:[fn2] from fn2 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -309,13 +309,14 @@ main: { jmp __b4 // main::@4 __b4: - // [11] callexecute *main::f#3 - jsr bi_f + // [11] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall1 // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1] __b1_from___b4: // [5] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b1 - bi_f: + // Outside Flow + icall1: jmp (f) } // File Data @@ -438,12 +439,13 @@ main: { // main::@4 __b4: // (*f)() - // [11] callexecute *main::f#3 - jsr bi_f + // [11] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall1 // [5] phi from main::@4 to main::@1 [phi:main::@4->main::@1] // [5] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b2 - bi_f: + // Outside Flow + icall1: jmp (f) } // File Data diff --git a/src/test/ref/function-pointer-noarg-call-3.asm b/src/test/ref/function-pointer-noarg-call-3.asm index 88e17f2a2..c914c524c 100644 --- a/src/test/ref/function-pointer-noarg-call-3.asm +++ b/src/test/ref/function-pointer-noarg-call-3.asm @@ -34,9 +34,9 @@ main: { lda.z i jsr getfn // (*getfn(++i))() - jsr bi___0 + jsr icall1 jmp __b2 - bi___0: + icall1: jmp (__0) } // declare getfn as function (char b) returning pointer to function (void) returning void diff --git a/src/test/ref/function-pointer-noarg-call-3.log b/src/test/ref/function-pointer-noarg-call-3.log index 256cb3cc0..e01582965 100644 --- a/src/test/ref/function-pointer-noarg-call-3.log +++ b/src/test/ref/function-pointer-noarg-call-3.log @@ -16,7 +16,7 @@ main::@2: scope:[main] from main::@1 main::i#2 = phi( main::@1/main::i#3 ) main::i#1 = ++ main::i#2 getfn::b#0 = main::i#1 - call getfn + call getfn getfn::return#0 = getfn::return#3 to:main::@3 main::@3: scope:[main] from main::@2 @@ -66,7 +66,7 @@ fn2::@return: scope:[fn2] from fn2 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -185,7 +185,7 @@ main::@1: scope:[main] from main main::@3 main::@2: scope:[main] from main::@1 [6] main::i#1 = ++ main::i#2 [7] getfn::b#0 = main::i#1 - [8] call getfn + [8] call getfn [9] getfn::return#0 = getfn::return#3 to:main::@3 main::@3: scope:[main] from main::@2 @@ -332,20 +332,21 @@ main: { inc.z i // [7] getfn::b#0 = main::i#1 -- vbuaa=vbuz1 lda.z i - // [8] call getfn + // [8] call getfn jsr getfn // [9] getfn::return#0 = getfn::return#3 jmp __b3 // main::@3 __b3: // [10] main::$0 = getfn::return#0 - // [11] callexecute *main::$0 - jsr bi___0 + // [11] callexecute *main::$0 -- call__deref_pprz1 + jsr icall1 // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] __b1_from___b3: // [5] phi main::i#2 = main::i#1 [phi:main::@3->main::@1#0] -- register_copy jmp __b1 - bi___0: + // Outside Flow + icall1: jmp (__0) } // getfn @@ -492,18 +493,19 @@ main: { // getfn(++i) // [7] getfn::b#0 = main::i#1 -- vbuaa=vbuz1 lda.z i - // [8] call getfn + // [8] call getfn jsr getfn // [9] getfn::return#0 = getfn::return#3 // main::@3 // [10] main::$0 = getfn::return#0 // (*getfn(++i))() - // [11] callexecute *main::$0 - jsr bi___0 + // [11] callexecute *main::$0 -- call__deref_pprz1 + jsr icall1 // [5] phi from main::@3 to main::@1 [phi:main::@3->main::@1] // [5] phi main::i#2 = main::i#1 [phi:main::@3->main::@1#0] -- register_copy jmp __b2 - bi___0: + // Outside Flow + icall1: jmp (__0) } // getfn diff --git a/src/test/ref/function-pointer-noarg-call-4.log b/src/test/ref/function-pointer-noarg-call-4.log index 7903722c5..f4c941fb7 100644 --- a/src/test/ref/function-pointer-noarg-call-4.log +++ b/src/test/ref/function-pointer-noarg-call-4.log @@ -15,7 +15,7 @@ main::@2: scope:[main] from main::@1 main::i#2 = phi( main::@1/main::i#3 ) main::i#1 = ++ main::i#2 getfn::b#0 = main::i#1 - call getfn + call getfn getfn::return#0 = getfn::return#2 to:main::@3 main::@3: scope:[main] from main::@2 @@ -48,7 +48,7 @@ fn1::@return: scope:[fn1] from fn1 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -105,7 +105,7 @@ Eliminating unused constant getfn::return#0 Successful SSA optimization PassNEliminateUnusedVars Eliminating unused constant getfn::return#1 Successful SSA optimization PassNEliminateUnusedVars -Removing call to empty/unused procedure [2] call getfn +Removing call to empty/unused procedure [2] call getfn Removing unused procedure getfn Removing unused procedure block getfn Removing unused procedure block getfn::@return @@ -224,7 +224,7 @@ main: { jmp __b3 // main::@3 __b3: - // [6] callexecute fn1 -- jsr + // [6] callexecute fn1 -- call_vprc1 jsr fn1 // [3] phi from main::@3 to main::@1 [phi:main::@3->main::@1] __b1_from___b3: @@ -301,7 +301,7 @@ main: { // [5] phi from main::@2 to main::@3 [phi:main::@2->main::@3] // main::@3 // (*getfn(++i))() - // [6] callexecute fn1 -- jsr + // [6] callexecute fn1 -- call_vprc1 jsr fn1 // [3] phi from main::@3 to main::@1 [phi:main::@3->main::@1] // [3] phi main::i#2 = main::i#1 [phi:main::@3->main::@1#0] -- register_copy diff --git a/src/test/ref/function-pointer-noarg-call-5.asm b/src/test/ref/function-pointer-noarg-call-5.asm index 0b38cd136..8f12a5b36 100644 --- a/src/test/ref/function-pointer-noarg-call-5.asm +++ b/src/test/ref/function-pointer-noarg-call-5.asm @@ -27,9 +27,9 @@ main: { lda fns+1,y sta.z f+1 // (*f)() - jsr bi_f + jsr icall1 jmp __b2 - bi_f: + icall1: jmp (f) } fn2: { diff --git a/src/test/ref/function-pointer-noarg-call-5.log b/src/test/ref/function-pointer-noarg-call-5.log index 2cca16f0a..17237f8e8 100644 --- a/src/test/ref/function-pointer-noarg-call-5.log +++ b/src/test/ref/function-pointer-noarg-call-5.log @@ -40,7 +40,7 @@ main::@return: scope:[main] from main::@1 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -242,13 +242,14 @@ main: { sta.z f lda fns+1,y sta.z f+1 - // [6] callexecute *main::f#0 - jsr bi_f + // [6] callexecute *main::f#0 -- call__deref_pprz1 + jsr icall1 // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1] __b1_from___b2: // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#0] -- register_copy jmp __b1 - bi_f: + // Outside Flow + icall1: jmp (f) } // fn2 @@ -358,12 +359,13 @@ main: { lda fns+1,y sta.z f+1 // (*f)() - // [6] callexecute *main::f#0 - jsr bi_f + // [6] callexecute *main::f#0 -- call__deref_pprz1 + jsr icall1 // [1] phi from main::@2 to main::@1 [phi:main::@2->main::@1] // [1] phi main::i#2 = main::i#1 [phi:main::@2->main::@1#0] -- register_copy jmp __b2 - bi_f: + // Outside Flow + icall1: jmp (f) } // fn2 diff --git a/src/test/ref/function-pointer-noarg-call-6.log b/src/test/ref/function-pointer-noarg-call-6.log index 674b66459..6f352507b 100644 --- a/src/test/ref/function-pointer-noarg-call-6.log +++ b/src/test/ref/function-pointer-noarg-call-6.log @@ -44,7 +44,7 @@ main::@return: scope:[main] from main::@1 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -242,7 +242,7 @@ main: { jmp __b2 // main::@2 __b2: - // [5] callexecute fn1 -- jsr + // [5] callexecute fn1 -- call_vprc1 jsr fn1 jmp __b3 // main::@3 @@ -395,7 +395,7 @@ main: { // main::@2 __b2: // (*cls)() - // [5] callexecute fn1 -- jsr + // [5] callexecute fn1 -- call_vprc1 jsr fn1 // main::@3 // (*cols)++; diff --git a/src/test/ref/function-pointer-noarg-call-7.log b/src/test/ref/function-pointer-noarg-call-7.log index 560f1a33f..23c1d9a0a 100644 --- a/src/test/ref/function-pointer-noarg-call-7.log +++ b/src/test/ref/function-pointer-noarg-call-7.log @@ -1,4 +1,4 @@ -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *do10::fn CONTROL FLOW GRAPH SSA @@ -43,7 +43,7 @@ hello::@return: scope:[hello] from hello::@1 void main() main: scope:[main] from __start::@1 do10::fn#0 = main::f - call do10 + call do10 to:main::@1 main::@1: scope:[main] from main to:main::@return @@ -58,7 +58,7 @@ __start::__init1: scope:[__start] from __start idx = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -170,7 +170,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -194,7 +194,7 @@ hello::@return: scope:[hello] from hello::@1 void main() main: scope:[main] from __start::@1 [12] phi() - [13] call do10 + [13] call do10 to:main::@return main::@return: scope:[main] from main [14] return @@ -306,7 +306,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main // [12] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -349,7 +349,7 @@ hello: { } // main main: { - // [13] call do10 + // [13] call do10 // [15] phi from main to do10 [phi:main->do10] do10_from_main: jsr do10 @@ -374,7 +374,7 @@ do10: { jmp __b1 // do10::@1 __b1: - // [17] callexecute hello -- jsr + // [17] callexecute hello -- call_vprc1 jsr hello jmp __b2 // do10::@2 @@ -477,7 +477,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main // [12] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -516,7 +516,7 @@ hello: { // main main: { // do10(f) - // [13] call do10 + // [13] call do10 // [15] phi from main to do10 [phi:main->do10] jsr do10 // main::@return @@ -536,7 +536,7 @@ do10: { // do10::@1 __b1: // (*fn)() - // [17] callexecute hello -- jsr + // [17] callexecute hello -- call_vprc1 jsr hello // do10::@2 // for( byte i: 0..9) diff --git a/src/test/ref/function-pointer-noarg-call-8.log b/src/test/ref/function-pointer-noarg-call-8.log index 5a2b355fd..1701ef039 100644 --- a/src/test/ref/function-pointer-noarg-call-8.log +++ b/src/test/ref/function-pointer-noarg-call-8.log @@ -1,4 +1,4 @@ -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *do10::fn CONTROL FLOW GRAPH SSA @@ -44,12 +44,12 @@ void main() main: scope:[main] from __start::@1 msg = msg1 do10::fn#0 = main::f - call do10 + call do10 to:main::@1 main::@1: scope:[main] from main msg = msg2 do10::fn#1 = main::f - call do10 + call do10 to:main::@2 main::@2: scope:[main] from main::@1 to:main::@return @@ -65,7 +65,7 @@ __start::__init1: scope:[__start] from __start idx = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -183,7 +183,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [3] phi() - [4] call main + [4] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [5] return @@ -207,11 +207,11 @@ hello::@return: scope:[hello] from hello::@1 void main() main: scope:[main] from __start::@1 [13] msg = msg1 - [14] call do10 + [14] call do10 to:main::@1 main::@1: scope:[main] from main [15] msg = msg2 - [16] call do10 + [16] call do10 to:main::@return main::@return: scope:[main] from main::@1 [17] return @@ -341,7 +341,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [4] call main + // [4] call main jsr main jmp __breturn // __start::@return @@ -387,7 +387,7 @@ main: { sta.z msg lda #>msg1 sta.z msg+1 - // [14] call do10 + // [14] call do10 // [18] phi from main to do10 [phi:main->do10] do10_from_main: jsr do10 @@ -399,7 +399,7 @@ main: { sta.z msg lda #>msg2 sta.z msg+1 - // [16] call do10 + // [16] call do10 // [18] phi from main::@1 to do10 [phi:main::@1->do10] do10_from___b1: jsr do10 @@ -424,7 +424,7 @@ do10: { jmp __b1 // do10::@1 __b1: - // [20] callexecute hello -- jsr + // [20] callexecute hello -- call_vprc1 jsr hello jmp __b2 // do10::@2 @@ -542,7 +542,7 @@ __start: { sta.z idx // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [4] call main + // [4] call main jsr main // __start::@return // [5] return @@ -586,7 +586,7 @@ main: { lda #>msg1 sta.z msg+1 // do10(f) - // [14] call do10 + // [14] call do10 // [18] phi from main to do10 [phi:main->do10] jsr do10 // main::@1 @@ -597,7 +597,7 @@ main: { lda #>msg2 sta.z msg+1 // do10(f) - // [16] call do10 + // [16] call do10 // [18] phi from main::@1 to do10 [phi:main::@1->do10] jsr do10 // main::@return @@ -617,7 +617,7 @@ do10: { // do10::@1 __b1: // (*fn)() - // [20] callexecute hello -- jsr + // [20] callexecute hello -- call_vprc1 jsr hello // do10::@2 // for( byte i: 0..9) diff --git a/src/test/ref/function-pointer-noarg-call-9.log b/src/test/ref/function-pointer-noarg-call-9.log index ce709caa3..dba377543 100644 --- a/src/test/ref/function-pointer-noarg-call-9.log +++ b/src/test/ref/function-pointer-noarg-call-9.log @@ -1,4 +1,4 @@ -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *main::f Calling convention STACK_CALL adding prepare/execute/finalize for call *main::f @@ -34,7 +34,7 @@ __start::__init1: scope:[__start] from __start idx = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -83,7 +83,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -173,7 +173,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main // [7] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -195,7 +195,7 @@ fn1: { } // main main: { - // [8] callexecute fn1 -- jsr + // [8] callexecute fn1 -- call_vprc1 jsr fn1 jmp __b1 // main::@1 @@ -204,7 +204,7 @@ main: { lda #'a' ldy.z idx sta SCREEN,y - // [10] callexecute fn1 -- jsr + // [10] callexecute fn1 -- call_vprc1 jsr fn1 jmp __b2 // main::@2 @@ -279,7 +279,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main // [7] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -299,7 +299,7 @@ fn1: { // main main: { // (*f)() - // [8] callexecute fn1 -- jsr + // [8] callexecute fn1 -- call_vprc1 jsr fn1 // main::@1 // SCREEN[idx] = 'a' @@ -308,7 +308,7 @@ main: { ldy.z idx sta SCREEN,y // (*f)() - // [10] callexecute fn1 -- jsr + // [10] callexecute fn1 -- call_vprc1 jsr fn1 // main::@2 // SCREEN[idx] = 'a' diff --git a/src/test/ref/function-pointer-noarg-call.log b/src/test/ref/function-pointer-noarg-call.log index 86c426675..220c6f697 100644 --- a/src/test/ref/function-pointer-noarg-call.log +++ b/src/test/ref/function-pointer-noarg-call.log @@ -20,7 +20,7 @@ main::@return: scope:[main] from main void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -107,7 +107,7 @@ ASSEMBLER BEFORE OPTIMIZATION .segment Code // main main: { - // [1] callexecute fn1 -- jsr + // [1] callexecute fn1 -- call_vprc1 jsr fn1 jmp __breturn // main::@return @@ -162,7 +162,7 @@ Score: 24 // main main: { // (*f)() - // [1] callexecute fn1 -- jsr + // [1] callexecute fn1 -- call_vprc1 jsr fn1 // main::@return // } diff --git a/src/test/ref/function-pointer-param-0.asm b/src/test/ref/function-pointer-param-0.asm index 8c5d729eb..012b538d3 100644 --- a/src/test/ref/function-pointer-param-0.asm +++ b/src/test/ref/function-pointer-param-0.asm @@ -97,9 +97,9 @@ main: { // (*f)(i) lda.z i pha - jsr bi_f + jsr icall2 pla jmp __b4 - bi_f: + icall2: jmp (f) } diff --git a/src/test/ref/function-pointer-param-0.log b/src/test/ref/function-pointer-param-0.log index 999f2e5ef..4331cde5c 100644 --- a/src/test/ref/function-pointer-param-0.log +++ b/src/test/ref/function-pointer-param-0.log @@ -96,7 +96,7 @@ fn3::@return: scope:[fn3] from fn3 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -482,7 +482,7 @@ main: { // [15] stackpush(byte) = main::i#2 -- _stackpushbyte_=vbuz1 lda.z i pha - // [16] callexecute fn3 -- jsr + // [16] callexecute fn3 -- call_vprc1 jsr fn3 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -529,12 +529,13 @@ main: { // [23] stackpush(byte) = main::i#2 -- _stackpushbyte_=vbuz1 lda.z i pha - // [24] callexecute *main::f#3 - jsr bi_f + // [24] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall2 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla jmp __b4 - bi_f: + // Outside Flow + icall2: jmp (f) } // File Data @@ -702,7 +703,7 @@ main: { // [15] stackpush(byte) = main::i#2 -- _stackpushbyte_=vbuz1 lda.z i pha - // [16] callexecute fn3 -- jsr + // [16] callexecute fn3 -- call_vprc1 jsr fn3 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -746,12 +747,13 @@ main: { // [23] stackpush(byte) = main::i#2 -- _stackpushbyte_=vbuz1 lda.z i pha - // [24] callexecute *main::f#3 - jsr bi_f + // [24] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall2 // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla jmp __b4 - bi_f: + // Outside Flow + icall2: jmp (f) } // File Data diff --git a/src/test/ref/function-pointer-param-workaround.asm b/src/test/ref/function-pointer-param-workaround.asm index 308e0ce04..bc5568912 100644 --- a/src/test/ref/function-pointer-param-workaround.asm +++ b/src/test/ref/function-pointer-param-workaround.asm @@ -151,11 +151,11 @@ main: { lda fns+1,y sta.z f+1 // (*f)() - jsr bi_f + jsr icall1 // for(char j=0;j<2;j++) inc.z j jmp __b2 - bi_f: + icall1: jmp (f) .segment Data fns: .word fn1, fn2 diff --git a/src/test/ref/function-pointer-param-workaround.log b/src/test/ref/function-pointer-param-workaround.log index 2064cf309..cf1a75e0e 100644 --- a/src/test/ref/function-pointer-param-workaround.log +++ b/src/test/ref/function-pointer-param-workaround.log @@ -1,7 +1,7 @@ Setting inferred volatile on symbol affected by address-of: fn1::param_char in asm { pla staparam_char } Setting inferred volatile on symbol affected by address-of: fn2::param_char in asm { pla staparam_char } Setting inferred volatile on symbol affected by address-of: main::param_char in asm { ldaparam_char pha } -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *main::f CONTROL FLOW GRAPH SSA @@ -96,7 +96,7 @@ __start::__init1: scope:[__start] from __start idx2 = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -240,7 +240,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [3] phi() - [4] call main + [4] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [5] return @@ -482,25 +482,25 @@ Uplift Scope [fn2] 1.2: zp[1]:8 [ fn2::param_char ] 1: zp[1]:9 [ fn2::b#0 ] 1: z Uplift Scope [] 1.27: zp[1]:4 [ idx1 ] 1.27: zp[1]:5 [ idx2 ] Uplift Scope [__start] -Uplifting [main] best 9907 combination zp[2]:18 [ main::f#0 ] zp[1]:3 [ main::j#2 main::j#1 ] reg byte a [ main::$3 ] zp[1]:16 [ main::param_char ] zp[1]:2 [ main::i#2 main::i#1 ] -Uplifting [fn1] best 9899 combination zp[1]:13 [ fn1::param_char ] reg byte y [ fn1::b#0 ] reg byte x [ fn1::c#0 ] zp[2]:11 [ fn1::ret_addr ] -Uplifting [fn2] best 9891 combination zp[1]:8 [ fn2::param_char ] reg byte y [ fn2::b#0 ] reg byte x [ fn2::c#0 ] zp[2]:6 [ fn2::ret_addr ] -Uplifting [] best 9891 combination zp[1]:4 [ idx1 ] zp[1]:5 [ idx2 ] -Uplifting [__start] best 9891 combination +Uplifting [main] best 9457 combination zp[2]:18 [ main::f#0 ] zp[1]:3 [ main::j#2 main::j#1 ] reg byte a [ main::$3 ] zp[1]:16 [ main::param_char ] zp[1]:2 [ main::i#2 main::i#1 ] +Uplifting [fn1] best 9449 combination zp[1]:13 [ fn1::param_char ] reg byte y [ fn1::b#0 ] reg byte x [ fn1::c#0 ] zp[2]:11 [ fn1::ret_addr ] +Uplifting [fn2] best 9441 combination zp[1]:8 [ fn2::param_char ] reg byte y [ fn2::b#0 ] reg byte x [ fn2::c#0 ] zp[2]:6 [ fn2::ret_addr ] +Uplifting [] best 9441 combination zp[1]:4 [ idx1 ] zp[1]:5 [ idx2 ] +Uplifting [__start] best 9441 combination Attempting to uplift remaining variables inzp[1]:3 [ main::j#2 main::j#1 ] -Uplifting [main] best 9891 combination zp[1]:3 [ main::j#2 main::j#1 ] +Uplifting [main] best 9441 combination zp[1]:3 [ main::j#2 main::j#1 ] Attempting to uplift remaining variables inzp[1]:16 [ main::param_char ] -Uplifting [main] best 9891 combination zp[1]:16 [ main::param_char ] +Uplifting [main] best 9441 combination zp[1]:16 [ main::param_char ] Attempting to uplift remaining variables inzp[1]:2 [ main::i#2 main::i#1 ] -Uplifting [main] best 9891 combination zp[1]:2 [ main::i#2 main::i#1 ] +Uplifting [main] best 9441 combination zp[1]:2 [ main::i#2 main::i#1 ] Attempting to uplift remaining variables inzp[1]:4 [ idx1 ] -Uplifting [] best 9891 combination zp[1]:4 [ idx1 ] +Uplifting [] best 9441 combination zp[1]:4 [ idx1 ] Attempting to uplift remaining variables inzp[1]:5 [ idx2 ] -Uplifting [] best 9891 combination zp[1]:5 [ idx2 ] +Uplifting [] best 9441 combination zp[1]:5 [ idx2 ] Attempting to uplift remaining variables inzp[1]:8 [ fn2::param_char ] -Uplifting [fn2] best 9891 combination zp[1]:8 [ fn2::param_char ] +Uplifting [fn2] best 9441 combination zp[1]:8 [ fn2::param_char ] Attempting to uplift remaining variables inzp[1]:13 [ fn1::param_char ] -Uplifting [fn1] best 9891 combination zp[1]:13 [ fn1::param_char ] +Uplifting [fn1] best 9441 combination zp[1]:13 [ fn1::param_char ] Allocated (was zp[2]:11) zp[2]:9 [ fn1::ret_addr ] Allocated (was zp[1]:13) zp[1]:11 [ fn1::param_char ] Allocated (was zp[1]:16) zp[1]:12 [ main::param_char ] @@ -545,7 +545,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [4] call main + // [4] call main // [32] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -727,8 +727,8 @@ main: { sta.z f lda fns+1,y sta.z f+1 - // [46] callexecute *main::f#0 - jsr bi_f + // [46] callexecute *main::f#0 -- call__deref_pprz1 + jsr icall1 jmp __b5 // main::@5 __b5: @@ -738,7 +738,8 @@ main: { __b2_from___b5: // [36] phi main::j#2 = main::j#1 [phi:main::@5->main::@2#0] -- register_copy jmp __b2 - bi_f: + // Outside Flow + icall1: jmp (f) .segment Data fns: .word fn1, fn2 @@ -838,7 +839,7 @@ zp[2]:13 [ main::f#0 ] FINAL ASSEMBLER -Score: 8075 +Score: 7625 // File Comments // Demonstrates work-around for passing parameters to function pointers @@ -874,7 +875,7 @@ __start: { sta.z idx2 // [3] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [4] call main + // [4] call main // [32] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -1059,8 +1060,8 @@ main: { lda fns+1,y sta.z f+1 // (*f)() - // [46] callexecute *main::f#0 - jsr bi_f + // [46] callexecute *main::f#0 -- call__deref_pprz1 + jsr icall1 // main::@5 // for(char j=0;j<2;j++) // [47] main::j#1 = ++ main::j#2 -- vbuz1=_inc_vbuz1 @@ -1068,7 +1069,8 @@ main: { // [36] phi from main::@5 to main::@2 [phi:main::@5->main::@2] // [36] phi main::j#2 = main::j#1 [phi:main::@5->main::@2#0] -- register_copy jmp __b2 - bi_f: + // Outside Flow + icall1: jmp (f) .segment Data fns: .word fn1, fn2 diff --git a/src/test/ref/function-pointer-return-1.asm b/src/test/ref/function-pointer-return-1.asm index 9dafeb617..16b4c4801 100644 --- a/src/test/ref/function-pointer-return-1.asm +++ b/src/test/ref/function-pointer-return-1.asm @@ -61,12 +61,12 @@ main: { __b3: // (*f)() pha - jsr bi_f + jsr icall1 // char v = (*f)() pla // SCREEN[0] = v sta SCREEN jmp __b1 - bi_f: + icall1: jmp (f) } diff --git a/src/test/ref/function-pointer-return-1.log b/src/test/ref/function-pointer-return-1.log index 46b823e3f..d693b7b86 100644 --- a/src/test/ref/function-pointer-return-1.log +++ b/src/test/ref/function-pointer-return-1.log @@ -71,7 +71,7 @@ fn2::@return: scope:[fn2] from fn2 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -393,8 +393,8 @@ main: { __b3: // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [16] callexecute *main::f#3 - jsr bi_f + // [16] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall1 // [17] main::v#0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla jmp __b4 @@ -406,7 +406,8 @@ main: { __b1_from___b4: // [9] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b1 - bi_f: + // Outside Flow + icall1: jmp (f) } // File Data @@ -558,8 +559,8 @@ main: { // (*f)() // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [16] callexecute *main::f#3 - jsr bi_f + // [16] callexecute *main::f#3 -- call__deref_pprz1 + jsr icall1 // char v = (*f)() // [17] main::v#0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla @@ -570,7 +571,8 @@ main: { // [9] phi from main::@4 to main::@1 [phi:main::@4->main::@1] // [9] phi main::i#2 = main::i#1 [phi:main::@4->main::@1#0] -- register_copy jmp __b1 - bi_f: + // Outside Flow + icall1: jmp (f) } // File Data diff --git a/src/test/ref/function-pointer-return-2.asm b/src/test/ref/function-pointer-return-2.asm index b6816ed79..cadb17525 100644 --- a/src/test/ref/function-pointer-return-2.asm +++ b/src/test/ref/function-pointer-return-2.asm @@ -52,13 +52,13 @@ set_border: { .label fn = 2 // fn() pha - jsr bi_fn + jsr icall1 pla // *BORDER = fn() // Call pointer to a function without * sta BORDER // } rts - bi_fn: + icall1: jmp (fn) } diff --git a/src/test/ref/function-pointer-return-2.log b/src/test/ref/function-pointer-return-2.log index 52b6e622d..41b242577 100644 --- a/src/test/ref/function-pointer-return-2.log +++ b/src/test/ref/function-pointer-return-2.log @@ -230,11 +230,11 @@ Uplift Scope [fn2] Uplift Scope [main] Uplift Scope [] -Uplifting [set_border] best 200 combination reg byte a [ set_border::$0 ] zp[2]:2 [ set_border::fn#2 ] -Uplifting [fn1] best 194 combination reg byte a [ fn1::return#0 ] -Uplifting [fn2] best 194 combination -Uplifting [main] best 194 combination -Uplifting [] best 194 combination +Uplifting [set_border] best 245 combination reg byte a [ set_border::$0 ] zp[2]:2 [ set_border::fn#2 ] +Uplifting [fn1] best 239 combination reg byte a [ fn1::return#0 ] +Uplifting [fn2] best 239 combination +Uplifting [main] best 239 combination +Uplifting [] best 239 combination ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -322,8 +322,8 @@ set_border: { .label fn = 2 // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [13] callexecute *set_border::fn#2 - jsr bi_fn + // [13] callexecute *set_border::fn#2 -- call__deref_pprz1 + jsr icall1 // [14] set_border::$0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla jmp __b1 @@ -337,7 +337,8 @@ set_border: { __breturn: // [16] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) } // File Data @@ -388,7 +389,7 @@ reg byte a [ set_border::$0 ] FINAL ASSEMBLER -Score: 95 +Score: 140 // File Comments // Calling a function pointer with return value @@ -469,8 +470,8 @@ set_border: { // fn() // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [13] callexecute *set_border::fn#2 - jsr bi_fn + // [13] callexecute *set_border::fn#2 -- call__deref_pprz1 + jsr icall1 // [14] set_border::$0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla // set_border::@1 @@ -482,7 +483,8 @@ set_border: { // } // [16] return rts - bi_fn: + // Outside Flow + icall1: jmp (fn) } // File Data diff --git a/src/test/ref/procedure-callingconvention-stack-0.log b/src/test/ref/procedure-callingconvention-stack-0.log index 1e7e89fed..eee60feff 100644 --- a/src/test/ref/procedure-callingconvention-stack-0.log +++ b/src/test/ref/procedure-callingconvention-stack-0.log @@ -38,7 +38,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -231,7 +231,7 @@ main: { // [6] stackpush(byte) = 7 -- _stackpushbyte_=vbuc1 lda #7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -330,7 +330,7 @@ main: { // [6] stackpush(byte) = 7 -- _stackpushbyte_=vbuc1 lda #7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla diff --git a/src/test/ref/procedure-callingconvention-stack-1.log b/src/test/ref/procedure-callingconvention-stack-1.log index a04cf92b3..3f3ad0fe5 100644 --- a/src/test/ref/procedure-callingconvention-stack-1.log +++ b/src/test/ref/procedure-callingconvention-stack-1.log @@ -38,7 +38,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -231,7 +231,7 @@ main: { // [6] stackpush(byte) = 7 -- _stackpushbyte_=vbuc1 lda #7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -330,7 +330,7 @@ main: { // [6] stackpush(byte) = 7 -- _stackpushbyte_=vbuc1 lda #7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla diff --git a/src/test/ref/procedure-callingconvention-stack-10.log b/src/test/ref/procedure-callingconvention-stack-10.log index b9a6b1c78..5cfcefd37 100644 --- a/src/test/ref/procedure-callingconvention-stack-10.log +++ b/src/test/ref/procedure-callingconvention-stack-10.log @@ -1,11 +1,11 @@ Converting variable modified inside __stackcall procedure main() to load/store idx Adding parameter assignment in __stackcall procedure get::i = param(get::i) Adding parameter assignment in __stackcall procedure print::p = param(print::p) -Inlined call call __init +Inlined call call __init Eliminating unused variable with no statement main::$1 Calling convention __stackcall adding prepare/execute/finalize for main::p = call get(main::i) Calling convention __stackcall adding prepare/execute/finalize for call print(main::p) -Calling convention __stackcall adding prepare/execute/finalize for call main +Calling convention __stackcall adding prepare/execute/finalize for call main Calling convention STACK_CALL replacing param(get::i) with stackidx(byte,get::OFFSET_STACK_I) Calling convention STACK_CALL replacing param(print::p) with stackidx(struct Point,print::OFFSET_STACK_P) Calling convention STACK_CALL adding stack return stackidx(struct Point,get::OFFSET_STACK_RETURN_0) = get::return @@ -358,7 +358,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -460,7 +460,7 @@ main: { pha // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [24] callexecute get -- jsr + // [24] callexecute get -- call_vprc1 jsr get // [25] main::p = stackpull(struct Point) -- vssz1=_stackpullstruct_2_ pla @@ -472,7 +472,7 @@ main: { pha lda.z p pha - // [27] callexecute print -- jsr + // [27] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla @@ -573,7 +573,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main // __start::@return // [4] return @@ -677,7 +677,7 @@ main: { pha // sideeffect stackpushbytes(1) -- _stackpushbyte_1 pha - // [24] callexecute get -- jsr + // [24] callexecute get -- call_vprc1 jsr get // [25] main::p = stackpull(struct Point) -- vssz1=_stackpullstruct_2_ pla @@ -689,7 +689,7 @@ main: { pha lda.z p pha - // [27] callexecute print -- jsr + // [27] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla diff --git a/src/test/ref/procedure-callingconvention-stack-11.log b/src/test/ref/procedure-callingconvention-stack-11.log index c38e86f72..b41484332 100644 --- a/src/test/ref/procedure-callingconvention-stack-11.log +++ b/src/test/ref/procedure-callingconvention-stack-11.log @@ -1,11 +1,11 @@ Converting variable modified inside __stackcall procedure main() to load/store idx Adding parameter assignment in __stackcall procedure get::i = param(get::i) Adding parameter assignment in __stackcall procedure print::v = param(print::v) -Inlined call call __init +Inlined call call __init Eliminating unused variable with no statement main::$1 Calling convention __stackcall adding prepare/execute/finalize for main::v = call get(main::i) Calling convention __stackcall adding prepare/execute/finalize for call print(main::v) -Calling convention __stackcall adding prepare/execute/finalize for call main +Calling convention __stackcall adding prepare/execute/finalize for call main Calling convention STACK_CALL replacing param(get::i) with stackidx(byte,get::OFFSET_STACK_I) Calling convention STACK_CALL replacing param(print::v) with stackidx(struct Vector,print::OFFSET_STACK_V) Calling convention STACK_CALL adding stack return stackidx(struct Vector,get::OFFSET_STACK_RETURN_0) = get::return @@ -430,7 +430,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -577,7 +577,7 @@ main: { pha pha pha - // [34] callexecute get -- jsr + // [34] callexecute get -- call_vprc1 jsr get // [35] main::v = stackpull(struct Vector) -- vssz1=_stackpullstruct_4_ pla @@ -597,7 +597,7 @@ main: { pha lda.z v pha - // [37] callexecute print -- jsr + // [37] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(4) -- _stackpullbyte_4 tsx @@ -706,7 +706,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main // __start::@return // [4] return @@ -863,7 +863,7 @@ main: { pha pha pha - // [34] callexecute get -- jsr + // [34] callexecute get -- call_vprc1 jsr get // [35] main::v = stackpull(struct Vector) -- vssz1=_stackpullstruct_4_ pla @@ -883,7 +883,7 @@ main: { pha lda.z v pha - // [37] callexecute print -- jsr + // [37] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(4) -- _stackpullbyte_4 tsx diff --git a/src/test/ref/procedure-callingconvention-stack-12.log b/src/test/ref/procedure-callingconvention-stack-12.log index 9554a1da1..8bb698aec 100644 --- a/src/test/ref/procedure-callingconvention-stack-12.log +++ b/src/test/ref/procedure-callingconvention-stack-12.log @@ -1,10 +1,10 @@ Converting variable modified inside __stackcall procedure main() to load/store idx Adding parameter assignment in __stackcall procedure print::spacing = param(print::spacing) Adding parameter assignment in __stackcall procedure print::str = param(print::str) -Inlined call call __init +Inlined call call __init Calling convention __stackcall adding prepare/execute/finalize for call print(main::str, 1) Calling convention __stackcall adding prepare/execute/finalize for call print(main::str1, 2) -Calling convention __stackcall adding prepare/execute/finalize for call main +Calling convention __stackcall adding prepare/execute/finalize for call main Calling convention STACK_CALL replacing param(print::str) with stackidx(byte*,print::OFFSET_STACK_STR) Calling convention STACK_CALL replacing param(print::spacing) with stackidx(byte,print::OFFSET_STACK_SPACING) Calling convention STACK_CALL adding stack push stackpush(byte*) = main::str @@ -337,7 +337,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -430,7 +430,7 @@ main: { // [19] stackpush(byte) = 1 -- _stackpushbyte_=vbuc1 lda #1 pha - // [20] callexecute print -- jsr + // [20] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(3) -- _stackpullbyte_3 tsx @@ -446,7 +446,7 @@ main: { // [23] stackpush(byte) = 2 -- _stackpushbyte_=vbuc1 lda #2 pha - // [24] callexecute print -- jsr + // [24] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(3) -- _stackpullbyte_3 tsx @@ -545,7 +545,7 @@ __start: { sta.z idx // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main // __start::@return // [4] return @@ -637,7 +637,7 @@ main: { // [19] stackpush(byte) = 1 -- _stackpushbyte_=vbuc1 lda #1 pha - // [20] callexecute print -- jsr + // [20] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(3) -- _stackpullbyte_3 tsx @@ -654,7 +654,7 @@ main: { // [23] stackpush(byte) = 2 -- _stackpushbyte_=vbuc1 lda #2 pha - // [24] callexecute print -- jsr + // [24] callexecute print -- call_vprc1 jsr print // sideeffect stackpullbytes(3) -- _stackpullbyte_3 tsx diff --git a/src/test/ref/procedure-callingconvention-stack-13.log b/src/test/ref/procedure-callingconvention-stack-13.log index 8be684684..ad06386e5 100644 --- a/src/test/ref/procedure-callingconvention-stack-13.log +++ b/src/test/ref/procedure-callingconvention-stack-13.log @@ -48,7 +48,7 @@ pow2::@return: scope:[pow2] from pow2::@1 pow2::@2 void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -246,7 +246,7 @@ pow2: { sbc #1 // [3] stackpush(byte) = pow2::$1 -- _stackpushbyte_=vbuaa pha - // [4] callexecute pow2 -- jsr + // [4] callexecute pow2 -- call_vprc1 jsr pow2 // [5] pow2::c#0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla @@ -274,7 +274,7 @@ main: { // [10] stackpush(byte) = 6 -- _stackpushbyte_=vbuc1 lda #6 pha - // [11] callexecute pow2 -- jsr + // [11] callexecute pow2 -- call_vprc1 jsr pow2 // [12] main::$0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla @@ -363,7 +363,7 @@ pow2: { // char c = pow2(n-1) // [3] stackpush(byte) = pow2::$1 -- _stackpushbyte_=vbuaa pha - // [4] callexecute pow2 -- jsr + // [4] callexecute pow2 -- call_vprc1 jsr pow2 // [5] pow2::c#0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla @@ -392,7 +392,7 @@ main: { // [10] stackpush(byte) = 6 -- _stackpushbyte_=vbuc1 lda #6 pha - // [11] callexecute pow2 -- jsr + // [11] callexecute pow2 -- call_vprc1 jsr pow2 // [12] main::$0 = stackpull(byte) -- vbuaa=_stackpullbyte_ pla diff --git a/src/test/ref/procedure-callingconvention-stack-2.log b/src/test/ref/procedure-callingconvention-stack-2.log index 8680235f0..281677af1 100644 --- a/src/test/ref/procedure-callingconvention-stack-2.log +++ b/src/test/ref/procedure-callingconvention-stack-2.log @@ -39,7 +39,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -262,7 +262,7 @@ main: { pha lda #<$2345 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla @@ -386,7 +386,7 @@ main: { pha lda #<$2345 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla diff --git a/src/test/ref/procedure-callingconvention-stack-3.log b/src/test/ref/procedure-callingconvention-stack-3.log index fa616b837..378144c9c 100644 --- a/src/test/ref/procedure-callingconvention-stack-3.log +++ b/src/test/ref/procedure-callingconvention-stack-3.log @@ -39,7 +39,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -261,7 +261,7 @@ main: { pha lda #<7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla @@ -388,7 +388,7 @@ main: { pha lda #<7 pha - // [7] callexecute plus -- jsr + // [7] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(2) -- _stackpullbyte_2 pla diff --git a/src/test/ref/procedure-callingconvention-stack-4.log b/src/test/ref/procedure-callingconvention-stack-4.log index 2fe14cf35..9008ced6c 100644 --- a/src/test/ref/procedure-callingconvention-stack-4.log +++ b/src/test/ref/procedure-callingconvention-stack-4.log @@ -1,7 +1,7 @@ Converting variable modified inside __stackcall procedure plus() to load/store i Adding parameter assignment in __stackcall procedure plus::b = param(plus::b) Adding parameter assignment in __stackcall procedure plus::a = param(plus::a) -Inlined call call __init +Inlined call call __init Eliminating unused variable with no statement main::$0 Eliminating unused variable with no statement main::$1 Calling convention __stackcall adding prepare/execute/finalize for main::w = call plus('0', main::v) @@ -57,7 +57,7 @@ __start::__init1: scope:[__start] from __start i = 0 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -149,7 +149,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -324,7 +324,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main // [11] phi from __start::@1 to main [phi:__start::@1->main] main_from___b1: jsr main @@ -386,7 +386,7 @@ main: { // [15] stackpush(byte) = main::v#0 -- _stackpushbyte_=vbuxx txa pha - // [16] callexecute plus -- jsr + // [16] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla @@ -499,7 +499,7 @@ __start: { sta.z i // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main // [11] phi from __start::@1 to main [phi:__start::@1->main] jsr main // __start::@return @@ -557,7 +557,7 @@ main: { // [15] stackpush(byte) = main::v#0 -- _stackpushbyte_=vbuxx txa pha - // [16] callexecute plus -- jsr + // [16] callexecute plus -- call_vprc1 jsr plus // sideeffect stackpullbytes(1) -- _stackpullbyte_1 pla diff --git a/src/test/ref/procedure-callingconvention-stack-5.log b/src/test/ref/procedure-callingconvention-stack-5.log index aafd9dae7..c68a1ef9e 100644 --- a/src/test/ref/procedure-callingconvention-stack-5.log +++ b/src/test/ref/procedure-callingconvention-stack-5.log @@ -1,7 +1,7 @@ Converting variable modified inside __stackcall procedure next() to load/store current -Inlined call call __init -Calling convention __stackcall adding prepare/execute/finalize for main::$0 = call next -Calling convention __stackcall adding prepare/execute/finalize for main::$1 = call next +Inlined call call __init +Calling convention __stackcall adding prepare/execute/finalize for main::$0 = call next +Calling convention __stackcall adding prepare/execute/finalize for main::$1 = call next Calling convention STACK_CALL adding stack return stackidx(signed word,next::OFFSET_STACK_RETURN_0) = next::return Calling convention STACK_CALL adding stack pull main::$0 = stackpull(signed word) Calling convention STACK_CALL adding stack pull main::$1 = stackpull(signed word) @@ -43,7 +43,7 @@ __start::__init1: scope:[__start] from __start current = $30 to:__start::@1 __start::@1: scope:[__start] from __start::__init1 - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 to:__start::@return @@ -127,7 +127,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 [2] phi() - [3] call main + [3] call main to:__start::@return __start::@return: scope:[__start] from __start::@1 [4] return @@ -245,7 +245,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] call main + // [3] call main jsr main jmp __breturn // __start::@return @@ -286,7 +286,7 @@ main: { // sideeffect stackpushbytes(2) -- _stackpushbyte_2 pha pha - // [10] callexecute next -- jsr + // [10] callexecute next -- call_vprc1 jsr next // [11] main::$0 = stackpull(signed word) -- vwsz1=_stackpullsword_ pla @@ -301,7 +301,7 @@ main: { // sideeffect stackpushbytes(2) -- _stackpushbyte_2 pha pha - // [14] callexecute next -- jsr + // [14] callexecute next -- call_vprc1 jsr next // [15] main::$1 = stackpull(signed word) -- vwsz1=_stackpullsword_ pla @@ -387,7 +387,7 @@ __start: { sta.z current+1 // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] call main + // [3] call main jsr main // __start::@return // [4] return @@ -427,7 +427,7 @@ main: { // sideeffect stackpushbytes(2) -- _stackpushbyte_2 pha pha - // [10] callexecute next -- jsr + // [10] callexecute next -- call_vprc1 jsr next // [11] main::$0 = stackpull(signed word) -- vwsz1=_stackpullsword_ pla @@ -444,7 +444,7 @@ main: { // sideeffect stackpushbytes(2) -- _stackpushbyte_2 pha pha - // [14] callexecute next -- jsr + // [14] callexecute next -- call_vprc1 jsr next // [15] main::$1 = stackpull(signed word) -- vwsz1=_stackpullsword_ pla diff --git a/src/test/ref/procedure-callingconvention-stack-7.log b/src/test/ref/procedure-callingconvention-stack-7.log index 7e350049c..ea5f915ff 100644 --- a/src/test/ref/procedure-callingconvention-stack-7.log +++ b/src/test/ref/procedure-callingconvention-stack-7.log @@ -1,5 +1,5 @@ -Calling convention __stackcall adding prepare/execute/finalize for call printline -Calling convention __stackcall adding prepare/execute/finalize for call main +Calling convention __stackcall adding prepare/execute/finalize for call printline +Calling convention __stackcall adding prepare/execute/finalize for call main CONTROL FLOW GRAPH SSA @@ -184,7 +184,7 @@ ASSEMBLER BEFORE OPTIMIZATION .segment Code // __start __start: { - // [1] callexecute main -- jsr + // [1] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -225,7 +225,7 @@ printline: { main: { // [9] main::val#1 = *SCREEN -- vbuyy=_deref_pbuc1 ldy SCREEN - // [10] callexecute printline -- jsr + // [10] callexecute printline -- call_vprc1 jsr printline // [11] *(SCREEN+$50) = main::val#1 -- _deref_pbuc1=vbuyy sty SCREEN+$50 @@ -285,7 +285,7 @@ Score: 223 .segment Code // __start __start: { - // [1] callexecute main -- jsr + // [1] callexecute main -- call_vprc1 jsr main // __start::@return // [2] return @@ -325,7 +325,7 @@ main: { // [9] main::val#1 = *SCREEN -- vbuyy=_deref_pbuc1 ldy SCREEN // printline() - // [10] callexecute printline -- jsr + // [10] callexecute printline -- call_vprc1 jsr printline // SCREEN[80] = val // [11] *(SCREEN+$50) = main::val#1 -- _deref_pbuc1=vbuyy diff --git a/src/test/ref/procedure-callingconvention-stack-8.log b/src/test/ref/procedure-callingconvention-stack-8.log index b4641ed57..aae1829cf 100644 --- a/src/test/ref/procedure-callingconvention-stack-8.log +++ b/src/test/ref/procedure-callingconvention-stack-8.log @@ -1,7 +1,7 @@ Converting variable modified inside __stackcall procedure main() to load/store val -Inlined call call __init -Calling convention __stackcall adding prepare/execute/finalize for call printline -Calling convention __stackcall adding prepare/execute/finalize for call main +Inlined call call __init +Calling convention __stackcall adding prepare/execute/finalize for call printline +Calling convention __stackcall adding prepare/execute/finalize for call main CONTROL FLOW GRAPH SSA @@ -212,7 +212,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -254,7 +254,7 @@ main: { // [11] val = '-' -- vbuz1=vbuc1 lda #'-' sta.z val - // [12] callexecute printline -- jsr + // [12] callexecute printline -- call_vprc1 jsr printline // [13] *(SCREEN+$50) = val -- _deref_pbuc1=vbuz1 lda.z val @@ -328,7 +328,7 @@ __start: { sta.z val // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main // __start::@return // [4] return @@ -369,7 +369,7 @@ main: { lda #'-' sta.z val // printline() - // [12] callexecute printline -- jsr + // [12] callexecute printline -- call_vprc1 jsr printline // SCREEN[80] = val // [13] *(SCREEN+$50) = val -- _deref_pbuc1=vbuz1 diff --git a/src/test/ref/procedure-callingconvention-stack-9.log b/src/test/ref/procedure-callingconvention-stack-9.log index 78629d5b6..ce6da89cb 100644 --- a/src/test/ref/procedure-callingconvention-stack-9.log +++ b/src/test/ref/procedure-callingconvention-stack-9.log @@ -1,11 +1,11 @@ Converting variable modified inside __stackcall procedure main() to load/store val -Inlined call call __init -Calling convention __stackcall adding prepare/execute/finalize for call pval -Calling convention __stackcall adding prepare/execute/finalize for call printother -Calling convention __stackcall adding prepare/execute/finalize for call ival -Calling convention __stackcall adding prepare/execute/finalize for call printval -Calling convention __stackcall adding prepare/execute/finalize for call incval -Calling convention __stackcall adding prepare/execute/finalize for call main +Inlined call call __init +Calling convention __stackcall adding prepare/execute/finalize for call pval +Calling convention __stackcall adding prepare/execute/finalize for call printother +Calling convention __stackcall adding prepare/execute/finalize for call ival +Calling convention __stackcall adding prepare/execute/finalize for call printval +Calling convention __stackcall adding prepare/execute/finalize for call incval +Calling convention __stackcall adding prepare/execute/finalize for call main CONTROL FLOW GRAPH SSA @@ -346,7 +346,7 @@ __start: { jmp __b1 // __start::@1 __b1: - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main jmp __breturn // __start::@return @@ -403,7 +403,7 @@ printval: { } // ival ival: { - // [16] callexecute incval -- jsr + // [16] callexecute incval -- call_vprc1 jsr incval jmp __breturn // ival::@return @@ -413,7 +413,7 @@ ival: { } // pval pval: { - // [19] callexecute printval -- jsr + // [19] callexecute printval -- call_vprc1 jsr printval jmp __breturn // pval::@return @@ -434,11 +434,11 @@ main: { jmp __b1 // main::@1 __b1: - // [23] callexecute pval -- jsr + // [23] callexecute pval -- call_vprc1 jsr pval - // [24] callexecute printother -- jsr + // [24] callexecute printother -- call_vprc1 jsr printother - // [25] callexecute ival -- jsr + // [25] callexecute ival -- call_vprc1 jsr ival // [26] main::i#1 = ++ main::i#2 -- vbuyy=_inc_vbuyy iny @@ -538,7 +538,7 @@ __start: { sta.z val // [2] phi from __start::__init1 to __start::@1 [phi:__start::__init1->__start::@1] // __start::@1 - // [3] callexecute main -- jsr + // [3] callexecute main -- call_vprc1 jsr main // __start::@return // [4] return @@ -591,7 +591,7 @@ printval: { // ival ival: { // incval() - // [16] callexecute incval -- jsr + // [16] callexecute incval -- call_vprc1 jsr incval // ival::@return // } @@ -601,7 +601,7 @@ ival: { // pval pval: { // printval() - // [19] callexecute printval -- jsr + // [19] callexecute printval -- call_vprc1 jsr printval // pval::@return // } @@ -618,13 +618,13 @@ main: { // main::@1 __b1: // pval() - // [23] callexecute pval -- jsr + // [23] callexecute pval -- call_vprc1 jsr pval // printother() - // [24] callexecute printother -- jsr + // [24] callexecute printother -- call_vprc1 jsr printother // ival() - // [25] callexecute ival -- jsr + // [25] callexecute ival -- call_vprc1 jsr ival // for(char i:0..5) // [26] main::i#1 = ++ main::i#2 -- vbuyy=_inc_vbuyy diff --git a/src/test/ref/procedure-declare-8.log b/src/test/ref/procedure-declare-8.log index 26239d705..ab8e82656 100644 --- a/src/test/ref/procedure-declare-8.log +++ b/src/test/ref/procedure-declare-8.log @@ -1,4 +1,4 @@ -Inlined call call __init +Inlined call call __init Calling convention STACK_CALL adding prepare/execute/finalize for call *proc_ptr Calling convention STACK_CALL adding prepare/execute/finalize for call *proc_ptr @@ -43,7 +43,7 @@ __start::__init1: scope:[__start] from __start to:__start::@1 __start::@1: scope:[__start] from __start::__init1 proc_ptr#9 = phi( __start::__init1/proc_ptr#3 ) - call main + call main to:__start::@2 __start::@2: scope:[__start] from __start::@1 proc_ptr#7 = phi( __start::@1/proc_ptr#2 ) @@ -193,14 +193,14 @@ ASSEMBLER BEFORE OPTIMIZATION .segment Code // main main: { - // [1] callexecute proc1 -- jsr + // [1] callexecute proc1 -- call_vprc1 jsr proc1 // [2] phi from main to main::@1 [phi:main->main::@1] __b1_from_main: jmp __b1 // main::@1 __b1: - // [3] callexecute proc2 -- jsr + // [3] callexecute proc2 -- call_vprc1 jsr proc2 jmp __breturn // main::@return @@ -275,12 +275,12 @@ Score: 42 // main main: { // (*proc_ptr)() - // [1] callexecute proc1 -- jsr + // [1] callexecute proc1 -- call_vprc1 jsr proc1 // [2] phi from main to main::@1 [phi:main->main::@1] // main::@1 // (*proc_ptr)() - // [3] callexecute proc2 -- jsr + // [3] callexecute proc2 -- call_vprc1 jsr proc2 // main::@return // } diff --git a/src/test/ref/varcall-1.log b/src/test/ref/varcall-1.log index 79d465771..76c7d102c 100644 --- a/src/test/ref/varcall-1.log +++ b/src/test/ref/varcall-1.log @@ -25,7 +25,7 @@ setbg::@return: scope:[setbg] from setbg void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -147,12 +147,12 @@ main: { // [2] setbg::col = 0 -- vbuz1=vbuc1 lda #0 sta.z setbg.col - // [3] callexecute setbg -- jsr + // [3] callexecute setbg -- call_vprc1 jsr setbg // [4] setbg::col = $b -- vbuz1=vbuc1 lda #$b sta.z setbg.col - // [5] callexecute setbg -- jsr + // [5] callexecute setbg -- call_vprc1 jsr setbg jmp __breturn // main::@return @@ -216,13 +216,13 @@ main: { // [2] setbg::col = 0 -- vbuz1=vbuc1 lda #0 sta.z setbg.col - // [3] callexecute setbg -- jsr + // [3] callexecute setbg -- call_vprc1 jsr setbg // setbg(0x0b) // [4] setbg::col = $b -- vbuz1=vbuc1 lda #$b sta.z setbg.col - // [5] callexecute setbg -- jsr + // [5] callexecute setbg -- call_vprc1 jsr setbg // main::@return // } diff --git a/src/test/ref/varcall-2.log b/src/test/ref/varcall-2.log index 2e19cee29..5cae7fa0f 100644 --- a/src/test/ref/varcall-2.log +++ b/src/test/ref/varcall-2.log @@ -40,7 +40,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -234,7 +234,7 @@ main: { // [5] plus::b = 1 -- vbuz1=vbuc1 lda #1 sta.z plus.b - // [6] callexecute plus -- jsr + // [6] callexecute plus -- call_vprc1 jsr plus // [7] main::a#1 = plus::return -- vbuaa=vbuz1 lda.z plus.return @@ -244,7 +244,7 @@ main: { sta.z plus.a // [10] plus::b = main::a#1 -- vbuz1=vbuaa sta.z plus.b - // [11] callexecute plus -- jsr + // [11] callexecute plus -- call_vprc1 jsr plus // [12] main::a#2 = plus::return -- vbuaa=vbuz1 lda.z plus.return @@ -337,7 +337,7 @@ main: { sta.z plus.a // [5] plus::b = 1 -- vbuz1=vbuc1 sta.z plus.b - // [6] callexecute plus -- jsr + // [6] callexecute plus -- call_vprc1 jsr plus // a = plus(a, 1) // [7] main::a#1 = plus::return -- vbuaa=vbuz1 @@ -350,7 +350,7 @@ main: { sta.z plus.a // [10] plus::b = main::a#1 -- vbuz1=vbuaa sta.z plus.b - // [11] callexecute plus -- jsr + // [11] callexecute plus -- call_vprc1 jsr plus // a = plus(a, a) // [12] main::a#2 = plus::return -- vbuaa=vbuz1 diff --git a/src/test/ref/varcall-3.log b/src/test/ref/varcall-3.log index 81274ec86..10365c31a 100644 --- a/src/test/ref/varcall-3.log +++ b/src/test/ref/varcall-3.log @@ -40,7 +40,7 @@ plus::@return: scope:[plus] from plus void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -249,7 +249,7 @@ main: { sta.z plus.b lda #>$203 sta.z plus.b+1 - // [6] callexecute plus -- jsr + // [6] callexecute plus -- call_vprc1 jsr plus // [7] main::a#1 = plus::return -- vwsz1=vwsz2 lda.z plus.return @@ -267,7 +267,7 @@ main: { lda.z a+1 sta.z plus.a+1 // [10] plus::b = main::a#1 - // [11] callexecute plus -- jsr + // [11] callexecute plus -- call_vprc1 jsr plus // [12] main::a#2 = plus::return // [13] *BGCOL = main::a#2 -- _deref_pwsc1=vwsz1 @@ -369,7 +369,7 @@ main: { sta.z plus.b lda #>$203 sta.z plus.b+1 - // [6] callexecute plus -- jsr + // [6] callexecute plus -- call_vprc1 jsr plus // a = plus(a, 0x0203) // [7] main::a#1 = plus::return -- vwsz1=vwsz2 @@ -390,7 +390,7 @@ main: { lda.z a+1 sta.z plus.a+1 // [10] plus::b = main::a#1 - // [11] callexecute plus -- jsr + // [11] callexecute plus -- call_vprc1 jsr plus // a = plus(a, a) // [12] main::a#2 = plus::return diff --git a/src/test/ref/varcall-4.log b/src/test/ref/varcall-4.log index 80dac226f..c2fe18d63 100644 --- a/src/test/ref/varcall-4.log +++ b/src/test/ref/varcall-4.log @@ -50,7 +50,7 @@ fg_sum::@return: scope:[fg_sum] from fg_sum void __start() __start: scope:[__start] from - call main + call main to:__start::@1 __start::@1: scope:[__start] from __start to:__start::@return @@ -333,7 +333,7 @@ main: { // [8] fg_sum::b_fg = *((byte*)&b+OFFSET_STRUCT_COLS_FG) -- vbuz1=_deref_pbuc1 lda b+OFFSET_STRUCT_COLS_FG sta.z fg_sum.b_fg - // [9] callexecute fg_sum -- jsr + // [9] callexecute fg_sum -- call_vprc1 jsr fg_sum // [10] main::sum1#0 = fg_sum::return -- vbuaa=vbuz1 lda.z fg_sum.return @@ -364,7 +364,7 @@ main: { // [18] fg_sum::b_fg = *((byte*)&d+OFFSET_STRUCT_COLS_FG) -- vbuz1=_deref_pbuc1 lda d+OFFSET_STRUCT_COLS_FG sta.z fg_sum.b_fg - // [19] callexecute fg_sum -- jsr + // [19] callexecute fg_sum -- call_vprc1 jsr fg_sum // [20] main::sum2#0 = fg_sum::return -- vbuaa=vbuz1 lda.z fg_sum.return @@ -496,7 +496,7 @@ main: { // [8] fg_sum::b_fg = *((byte*)&b+OFFSET_STRUCT_COLS_FG) -- vbuz1=_deref_pbuc1 lda b+OFFSET_STRUCT_COLS_FG sta.z fg_sum.b_fg - // [9] callexecute fg_sum -- jsr + // [9] callexecute fg_sum -- call_vprc1 jsr fg_sum // [10] main::sum1#0 = fg_sum::return -- vbuaa=vbuz1 lda.z fg_sum.return @@ -530,7 +530,7 @@ main: { // [18] fg_sum::b_fg = *((byte*)&d+OFFSET_STRUCT_COLS_FG) -- vbuz1=_deref_pbuc1 lda d+OFFSET_STRUCT_COLS_FG sta.z fg_sum.b_fg - // [19] callexecute fg_sum -- jsr + // [19] callexecute fg_sum -- call_vprc1 jsr fg_sum // [20] main::sum2#0 = fg_sum::return -- vbuaa=vbuz1 lda.z fg_sum.return