Skip to content

Instantly share code, notes, and snippets.

--- ./nqp/src/6model/reprs/P6opaque.c.orig 2011-07-11 11:05:56.000000000 +0000
+++ ./nqp/src/6model/reprs/P6opaque.c 2011-07-11 11:48:18.000000000 +0000
@@ -185,7 +185,6 @@ static void compute_allocation_strategy(
INTVAL info_alloc = num_attrs == 0 ? 1 : num_attrs;
INTVAL cur_pmc_attr = 0;
INTVAL cur_str_attr = 0;
- INTVAL cur_avc_attr = 0;
INTVAL i;
/* Allocate offset array and GC mark info arrays. */
--- ./src/6model/reprs/P6opaque.c.orig 2011-07-13 08:19:33.000000000 +0000
+++ ./src/6model/reprs/P6opaque.c 2011-07-13 10:18:43.000000000 +0000
@@ -185,14 +185,11 @@ static void compute_allocation_strategy(
INTVAL info_alloc = num_attrs == 0 ? 1 : num_attrs;
INTVAL cur_pmc_attr = 0;
INTVAL cur_str_attr = 0;
- INTVAL cur_avc_attr = 0;
INTVAL i;
/* Allocate offset array and GC mark info arrays. */
--- src/Perl6/Actions.pm.orig 2011-07-29 08:58:57.000000000 +0000
+++ src/Perl6/Actions.pm 2011-07-29 09:00:52.000000000 +0000
@@ -648,7 +648,7 @@ class Perl6::Actions is HLL::Actions {
PAST::Op.new(:pasttype<bind_6model>,
PAST::Var.new(:name<$!>, :scope<lexical_6model>),
PAST::Op.new(:name<&EXCEPTION>, :pasttype<call>,
- PAST::Op.new(:inline(' .get_results (%r)')))));
+ PAST::Op.new(:inline(" .get_results (%r)\n finalize %r")))));
# Otherwise, put Mu into $!.
--- ./Actions.pm.orig 2011-07-29 17:59:22.000000000 +0000
+++ ./Actions.pm 2011-07-29 18:02:21.000000000 +0000
@@ -648,7 +648,7 @@ class Perl6::Actions is HLL::Actions {
PAST::Op.new(:pasttype<bind_6model>,
PAST::Var.new(:name<$!>, :scope<lexical_6model>),
PAST::Op.new(:name<&EXCEPTION>, :pasttype<call>,
- PAST::Op.new(:inline(' .get_results (%r)')))));
+ PAST::Op.new(:inline(" .get_results (%r)\n finalize %r")))));
# Otherwise, put Mu into $!.
--- src/Perl6/Actions.pm.orig 2011-08-01 13:05:44.000000000 +0200
+++ src/Perl6/Actions.pm 2011-08-01 13:06:18.000000000 +0200
@@ -3534,6 +3534,7 @@
),
),
PAST::Op.new( :pasttype('bind_6model'),
+ PAST::Var.new( :scope('lexical_6model'), :name('$/'), :isdecl(1) ),
PAST::Var.new( :scope('lexical_6model'), :name('$!'), :isdecl(1) ),
PAST::Var.new( :scope('lexical_6model'), :name('$_') ),
),
--- src/Perl6/Actions.pm.orig 2011-08-01 11:05:44.000000000 +0000
+++ src/Perl6/Actions.pm 2011-08-01 12:21:22.000000000 +0000
@@ -3533,6 +3533,7 @@ class Perl6::Actions is HLL::Actions {
PAST::Var.new( :scope('lexical_6model'), :name('$_') ),
),
),
+ PAST::Var.new( :scope('lexical_6model'), :name('$/'), :isdecl(1) ),
PAST::Op.new( :pasttype('bind_6model'),
PAST::Var.new( :scope('lexical_6model'), :name('$!'), :isdecl(1) ),
PAST::Var.new( :scope('lexical_6model'), :name('$_') ),
--- src/Perl6/Actions.pm.orig 2011-08-01 11:05:44.000000000 +0000
+++ src/Perl6/Actions.pm 2011-08-01 13:36:00.000000000 +0000
@@ -708,6 +708,7 @@ class Perl6::Actions is HLL::Actions {
method statement_control:sym<CATCH>($/) {
my $block := $<block>.ast;
+ ($*ST.cur_lexpad())[0].pop;
push_block_handler($/, $*ST.cur_lexpad(), $block<past_block>);
$*ST.cur_lexpad().handlers()[0].handle_types_except('CONTROL');
make PAST::Var.new( :name('Nil'), :scope('lexical') );
--- src/Perl6/Actions.pm.orig 2011-08-02 12:56:25.000000000 +0000
+++ src/Perl6/Actions.pm 2011-08-02 13:43:01.000000000 +0000
@@ -3543,6 +3543,7 @@ class Perl6::Actions is HLL::Actions {
$handler.symbol('$_', :scope('lexical_6model'));
$handler.symbol('$!', :scope('lexical_6model'));
$handler := PAST::Stmts.new(
+ PAST::Op.new(:inline(" pop_eh")),
PAST::Op.new( :pasttype('call'),
$handler,
PAST::Var.new( :scope('register'), :name('exception') ),
--- ./src/Perl6/Actions.pm.orig 2011-08-02 12:56:25.000000000 +0000
+++ ./src/Perl6/Actions.pm 2011-08-04 10:23:17.000000000 +0000
@@ -3537,8 +3537,11 @@ class Perl6::Actions is HLL::Actions {
PAST::Var.new( :scope('lexical_6model'), :name('$!'), :isdecl(1) ),
PAST::Var.new( :scope('lexical_6model'), :name('$_') ),
),
+ PAST::Op.new( :pasttype('try'),
PAST::Op.new( :pasttype('call'),
$handler,
+ ),
--- src/Perl6/Actions.pm.orig 2011-08-02 12:56:25.000000000 +0000
+++ src/Perl6/Actions.pm 2011-08-04 14:05:13.000000000 +0000
@@ -706,6 +706,9 @@ class Perl6::Actions is HLL::Actions {
}
method statement_control:sym<CATCH>($/) {
+ if has_block_handler($*ST.cur_lexpad(), 'CONTROL', 1) {
+ $/.CURSOR.panic("only one CATCH block allowed");
+ }
my $block := $<block>.ast;