Permalink
Browse files

More checks and debug in handling pirop<=>

  • Loading branch information...
1 parent 6716d63 commit 0e82ef7f35272279d8fccb8ca350e31fb04254eb @bacek bacek committed May 2, 2011
Showing with 9 additions and 4 deletions.
  1. +9 −4 compilers/opsc/src/Ops/JIT.pm
View
13 compilers/opsc/src/Ops/JIT.pm
@@ -737,12 +737,17 @@ our method process:pirop<=> (PAST::Op $chunk, %c) {
# This will disable "loading" of variables.
%c<lhs>++;
my $lhs := self.process($chunk[0], %c);
+ if !defined($lhs) {
+ _dumper($chunk);
+ die("Horribly");
+ }
%c<lhs>--;
- $!builder.store(
- self.process($chunk[1], %c) // die("Can't do it"),
- $lhs
- );
+ my $rhs := self.process($chunk[1], %c) // die("Can't do it");
+ $!debug && say("LHS " ~ $lhs.dump());
+ $!debug && say("RHS " ~ $rhs.dump());
+
+ $!builder.store($rhs, $lhs);
}
our method process:pirop<==> (PAST::Op $chunk, %c) {

0 comments on commit 0e82ef7

Please sign in to comment.