Skip to content

Commit

Permalink
make the m0 interp run hello.m0b less improperly
Browse files Browse the repository at this point in the history
  • Loading branch information
cotto committed May 18, 2011
1 parent 98c720c commit ad540b2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/m0/m0_interp.pl
Expand Up @@ -576,8 +576,9 @@ sub m0_opfunc_copy_mem {

sub m0_opfunc_set_var {
my ($ctx, $a1, $a2, $a3) = @_;
my $idx = $a2 * 256 + $a3;
my $var = $ctx->[VAR][$idx];
my $idx = $a2 * 256 + $a3;
my $var = $ctx->[VAR][$idx];
$ctx->[$a1] = $var;
say "set_var $a1, $a2, $a3 (var = $var)";
}

Expand All @@ -604,6 +605,10 @@ sub m0_opfunc_ccall {
sub m0_opfunc_print_s {
my ($ctx, $a1, $a2, $a3) = @_;
say "print_s $a1, $a2, $a3";
my $var = $ctx->[$a2];
my $handle = $ctx->[$a1];
# TODO: print to $handle instead of stdout
say $var;
}

sub m0_opfunc_print_i {
Expand Down

0 comments on commit ad540b2

Please sign in to comment.