Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Refactor outer_ctx handling a bit in HLL::Compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed May 21, 2010
1 parent 528fb67 commit c4649e1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/HLL/Compiler.pm
Expand Up @@ -129,19 +129,18 @@ class HLL::Compiler is PCT::HLLCompiler {
}

method eval($code, *@args, *%adverbs) {
my $output; my $outer;
my $output;
$output := self.compile($code, |%adverbs);

if !pir::isa($output, 'String')
&& %adverbs<target> eq '' {
$outer := %adverbs<outer_ctx>;

unless pir::isnull($outer) {
$output[0].set_outer($outer<current_sub>);
my $outer_ctx := %adverbs<outer_ctx>;
if pir::defined($outer_ctx) {
$output[0].set_outer($outer_ctx<current_sub>);
}

pir::trace(%adverbs<trace>);
$output := $output[0]();
$output := $output();
pir::trace(0);
}

Expand Down

0 comments on commit c4649e1

Please sign in to comment.