Ticket #1143 (new cage)

Opened 12 years ago

Last modified 11 years ago

examples/benchmarks/overload.pir requires rewriting.

Reported by: bacek Owned by:
Priority: normal Milestone:
Component: testing Version: trunk
Severity: medium Keywords:
Cc: jkeenan Language:
Patch status: Platform:

Description

Hello,

after fixing #452 examples/benchmarks/overload.pir doesn't test anything and requires rewriting to use classes inherited from Integer instead of direct use of Integer.

-- Bacek

Change History

Changed 11 years ago by jkeenan

  • cc jkeenan added
  • component changed from none to testing

Should anyone want to take on this ticket, here is the current content of the file in question:

$ cat examples/benchmarks/overload.pir
# Copyright (C) 2004-2009, Parrot Foundation.

.sub bench :main
.include "pmctypes.pasm"
   .local int i
   .local pmc r
   .local pmc a
   .local pmc b
   a = new 'Integer'
   b = new 'Integer'
   r = new 'Integer'
   a = 7
   b = 6
   i = 1
loop:
   r = a * b
   inc i
   if i <= 50000 goto loop
   print r
   print "\n"
   end
.end


.sub my_mul :multi(Integer, Integer, Integer)
   .param pmc left
   .param pmc right
   .param pmc dest
   $I0 = left
   $I1 = right
   $I2 = $I0 * $I1
   dest = $I2
   .return (dest)
.end

# Local Variables:
#   mode: pir
#   fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:

Thank you very much.

kid51

Note: See TracTickets for help on using tickets.