Skip to content

Commit

Permalink
The opcodes bsr and ret were removed in Parrot
Browse files Browse the repository at this point in the history
Signed-off-by: Ted Reed <ted.reed@gmail.com>
  • Loading branch information
joeri authored and treed committed Jul 27, 2009
1 parent 2527236 commit 7171222
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/classes/File.pir
Expand Up @@ -80,8 +80,11 @@ Perform initializations and create the File class
.param pmc path
.param string mode :optional
.local string parrot_io_mode
.local pmc jmpstack
jmpstack = new 'ResizableIntegerArray'

$S0 = self.'!to_path'(path)
bsr parse_mode
local_branch jmpstack, parse_mode
open $P1, $S0, parrot_io_mode
#setprop self, '!io', $P0
setattribute self, '!io', $P1
Expand All @@ -98,13 +101,13 @@ Perform initializations and create the File class
goto done
default_mode:
parrot_io_mode = "<"
ret
local_return jmpstack
append_mode:
parrot_io_mode = ">>"
ret
local_return jmpstack
write_mode:
parrot_io_mode = ">"
ret
local_return jmpstack
done:
.return (self)
.end
Expand Down

0 comments on commit 7171222

Please sign in to comment.