Ticket #1419 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

pbc_merge doesn't correctly merge

Reported by: cotto Owned by: cotto
Priority: normal Milestone:
Component: none Version: 2.0.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description (last modified by cotto) (diff)

I took a shot at switching compilers/pct/Rules.mak to generate separate pbcs and merge them into a single file using pbc_merge using the attached patch. Unfortunately this causes pct to fail several tests. A typical failure is below:

t/compilers/pct/past.t ............... 4/10 
#   Failed test 'set attributes for PAST;Op via method'
#   at t/compilers/pct/past.t line 39.
# Exited with error code: 1
# Received:
# Method 'language' not found for invocant of class ''
# current instr.: 'parrot;PAST;Compiler;onload' pc 1330 (compilers/pct/src/PAST/Compiler.pir:52)
# called from Sub 'parrot;PCT;__onload' pc 0 (compilers/pct/PCT.pir:18)
# ... call repeated 1 times
# 
# Expected:
# foo
# "ast" => PMC 'PAST;Op'  {
#     <name> => "foo"
#     [0] => PMC 'PAST;Op'  {
#         <name> => "bar"
#     }
# }
# 

Attachments

pct_makefile.patch Download (1.9 KB) - added by cotto 5 years ago.

Change History

Changed 5 years ago by cotto

Changed 5 years ago by cotto

  • description modified (diff)

Changed 5 years ago by cotto

Comparing a good and bad PAST.pbc with pbc_dump, I notice that that the number of constants is different. This may be a good place to start digging for someone who doesn't need to go to bed.

good (built directly with parrot):

DIRECTORY => [ # offs 0x30(48) = op_count 32420, itype 0, id 0, size 0, ...
    # 4 segments
    type 4  BYTECODE_compilers/pct/src/PAST.pir  offs 0x44(0x110)   op_count 10852
    type 2  FIXUP_compilers/pct/src/PAST.pir     offs 0x2aa8(0xaaa0)    op_count 572
    type 3  CONSTANT_compilers/pct/src/PAST.pir  offs 0x2ce4(0xb390)    op_count 17708
    type 5  BYTECODE_compilers/pct/src/PAST.pir_DB   offs 0x7210(0x1c840)   op_count 3232
]

bad (merged with pbc_merge):

DIRECTORY => [ # offs 0x30(48) = op_count 34812, itype 0, id 0, size 0, ...
    # 4 segments
    type 4  MERGED   offs 0x28(0xa0)    op_count 10852
    type 2  FIXUP    offs 0x2a8c(0xaa30)    op_count 572
    type 3  CONSTANT     offs 0x2cc8(0xb320)    op_count 20128
    type 5  MERGED_DB    offs 0x7b68(0x1eda0)   op_count 3232
]

Changed 5 years ago by cotto

  • status changed from new to closed
  • resolution set to fixed

Thanks to Austin's patch in TT #1425 (r43767), pct now passes its tests when built with the attached patch. I've applied it as r43768 and am marking this ticket as fixed.

Note: See TracTickets for help on using tickets.