# New Ticket Created by Jerry Gay # Please include the string: [perl #42974] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42974 >
it looks like the register alligator is eating integers in this code: .const int TESTS = 2 .sub 'main' :main load_bytecode 'Test/More.pir' .local pmc exp, test_ns test_ns = get_namespace ['Test::More'] exp = new 'Exporter' exp.'source'(test_ns) exp.'import'('plan ok is diag isa_ok' :named('globals')) plan(TESTS) .local pmc attrs attrs = new 'Hash' .local pmc red, green, blue attrs['name'] = 'Red' red = new 'Role', attrs attrs['name'] = 'Green' green = new 'Role', attrs attrs['name'] = 'Blue' blue = new 'Role', attrs green.'add_role'( blue ) .local pmc color color = new 'Class' $S0 = 'Red' $I0 = color.'does'($S0) is($I0, 0, 'does not Red') color.'add_role'( red ) $I0 = color.'does'($S0) is($I0, 1, 'does Red') .end which produces: 1..2 ok 1 - does not Red not ok 2 - does Red # Received: -888 # Expected: 1 either something's fishy in the PCCRETURN code, or the register allocator. the -888 is a dead giveaway that an integer register has been eaten. it's possible it's isolated in code called from the 'add_role' method in the Class PMC... this bug is preventing me from testing that code. ~jerry