Ticket #1641 (new RFC) — at Initial Version

Opened 12 years ago

Last modified 12 years ago

iseq does not support the same type of operands as the math operators

Reported by: shockwave Owned by:
Priority: normal Milestone:
Component: imcc Version: 2.3.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

# Within a method ... This doesn't work. $I0 = 1 $P0 = getattribute self, 'someIntField' $I1 = iseq $I0, $P0

# Error message: # error:imcc:The opcode 'iseq_i_i_p' (iseq<3>) was not found. Check the type and number of the arguments

There is already support for math operands with mixed types, so allowing iseq to have the same behavior is good for consistency:

# Test by bacek ~/src/parrot (ops_pct_local)$ cat t.pir .sub "main"

$N0 = 40.0 $I0 = 2 $N1 = $N0 + $I0 say $N1

.end ~/src/parrot (ops_pct_local)$ ./parrot t.pir

Note: See TracTickets for help on using tickets.