Ticket #796 (closed patch: fixed)

Opened 5 years ago

Last modified 5 years ago

Rewrite globals.t and integer.t in PIR

Reported by: flh Owned by: Infinoid
Priority: normal Milestone:
Component: none Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

The attached patches rewrite globals.t and integer.t in PIR, instead of perl5.

Attachments

globals.t_to_pir.patch Download (5.8 KB) - added by flh 5 years ago.
Rewrite globals.t
integer.t_to_pir.patch Download (44.3 KB) - added by flh 5 years ago.
Rewrite integer.t

Change History

Changed 5 years ago by flh

Rewrite globals.t

  Changed 5 years ago by Infinoid

  • owner set to Infinoid

Thanks for the patches. I've applied the globals.t one as r39817.

Unfortunately, the integer.t patch doesn't pass all tests on my box (linux/x86-64).

Here's how the output of "prove -v t/op/integer.t" used to end:

ok 40 - null
ok 41 - div_i_i by zero
ok 42 - div_i_ic by zero
ok 43 - div_i_i_i by zero
ok 44 - div_i_ic_i by zero
ok 45 - div_i_i_ic by zero
ok 46 - fdiv_i_i by zero
ok 47 - fdiv_i_ic by zero
ok 48 - fdiv_i_i_i by zero
ok 49 - fdiv_i_ic_i by zero
ok 50 - fdiv_i_i_ic by zero
ok 51 - cmod_i_i_i by zero
ok 52 - cmod_i_ic_i by zero
ok 53 - cmod_i_i_ic by zero
ok 54 - mod_i_i_i by zero
ok 55 - mod_i_ic_i by zero
ok 56 - mod_i_i_ic by zero
ok

After the patch, here's how it ends:

ok 185 - null_i - before null
ok 186 - null_i - after null
ok 187 - div_i_i by zero
ok 188 - div_i_ic by zero
ok 189 - div_i_i_i by zero
ok 190 - div_i_ic_i by zero
ok 191 - div_i_i_ic by zero
ok 192 - fdiv_i_i by zero
ok 193 - fdiv_i_ic by zero
ok 194 - fdiv_i_i_i by zero
ok 195 - fdiv_i_ic_i by zero
ok 196 - fdiv_i_i_ic by zero
ok 197 - cmod_i_i_i by zero
ok 198 - cmod_i_ic_i by zero
ok 199 - cmod_i_i_ic by zero
ok 200 - mod_i_i_i by zero
ok 201 - mod_i_ic_i by zero
not ok 202 - mod_i_i_ic by zero
# Have: 20579296
# Want: 10
Failed 1/202 subtests

Any idea what happened?

Mark

Changed 5 years ago by flh

Rewrite integer.t

follow-up: ↓ 3   Changed 5 years ago by flh

My mistake, the last test was actually wrong (but I don't understand which magic made it pass on my computer). I've updated the patch for integer.t, the last test now reads:

.sub 'test_mod_i_i_ic_by_zero'
    $I1 = 10
    $I2 = mod $I1, 0
    is($I2, 10, 'mod_i_i_ic by zero')
.end

(The previous one used an uninitialized $I1.)

in reply to: ↑ 2   Changed 5 years ago by Infinoid

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

Replying to flh:

My mistake, the last test was actually wrong (but I don't understand which magic made it pass on my computer). I've updated the patch for integer.t

Thanks, applied as r39848.

Mark

Note: See TracTickets for help on using tickets.