Skip to content

Commit

Permalink
Final push on converting new ['Failure'] to '!FAIL'(). Allows RT#5864…
Browse files Browse the repository at this point in the history
…6 which set out this task to be closed.
  • Loading branch information
jnthn committed Aug 19, 2009
1 parent 9729b05 commit 201ffc2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/builtins/control.pir
Expand Up @@ -383,7 +383,7 @@ on error.

# Invoke.
res = invokable()
exception = new ['Failure']
exception = '!FAIL'()
goto done

catch:
Expand Down
2 changes: 1 addition & 1 deletion src/classes/Failure.pir
Expand Up @@ -56,7 +56,7 @@
unless x goto no_args
die "Obsolete use of undef; in Perl 6 please use undefine instead"
no_args:
$P0 = new ['Failure']
$P0 = '!FAIL'()
.return ($P0)
.end

Expand Down
2 changes: 1 addition & 1 deletion src/classes/Nil.pir
Expand Up @@ -52,7 +52,7 @@ src/classes/Nil.pir - Nil objects

.namespace ['Nil']
.sub 'Scalar' :method
$P0 = new ['Failure']
$P0 = '!FAIL'()
.return ($P0)
.end

Expand Down
2 changes: 1 addition & 1 deletion src/parser/actions.pm
Expand Up @@ -625,7 +625,7 @@ method statement_prefix($/) {

## Add an 'else' node to the try op that clears $! if
## no exception occurred.
my $elsepir := " new %r, ['Failure']\n store_lex '$!', %r";
my $elsepir := " %r = '!FAIL'()\n store_lex '$!', %r";
$past.push( PAST::Op.new( :inline( $elsepir ) ) );
}
elsif $sym eq 'gather' {
Expand Down

0 comments on commit 201ffc2

Please sign in to comment.