Skip to content

Commit

Permalink
Add stub to_op(Label).
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 5, 2011
1 parent 298813f commit e1e5a28
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/POST/Compiler.pm
Expand Up @@ -379,6 +379,18 @@ our multi method to_op(POST::Register $reg, %context) {
$reg.regno;
}

our multi method to_op(POST::Label $l, %context) {
# Usage of Label. Put into todolist and reserve space.
my $bc := %context<bytecode>;
my $pos := +$bc;
# FIXME!!! We do need exact position for fixup labels.
# $bc.push(0);
%context<labels_todo>{$pos} := list($l.name, %context<opcode_offset>);
self.debug("Todo label '{ $l.name }' at $pos, { %context<opcode_offset> }") if $DEBUG;

0;
}

# /Emiting pbc
##########################################

Expand Down

0 comments on commit e1e5a28

Please sign in to comment.