RETURN causes the program counter to be incremented by that many opcodes.
So RETURN 4 would move forward 4 opcodes and RETURN -2 would move backward 2
opcodes.  Basically, it returns a relative offset from the current position.
-----Original Message-----
From: Dave Storrs
To: The Perl 6 Internals list
Sent: 9/20/2001 12:22 AM
Subject: question about branching/returning 

I'm working on documenting the opcodes, and I want to make sure that I
understand the 'RETURN' code properly.  I've poked around a little bit
to
see if I coudl figure it out, but I don't want to divert too much.
Would
someone please explain to me what each of the following does?

RETURN 4
RETURN 0
RETURN -2       # Is this even legal?


Thanks in advance,

Dave

Reply via email to