Show
Ignore:
Timestamp:
08/20/05 15:47:35 (3 years ago)
Author:
iblech
svk:copy_cache_prev:
8581
Message:

* Usual svn props.
* PIL2JS: &?CALLER_CONTINUATION.

  • t/unspecced/cont.t: Added some type annotations and a new test. PIL2JS passes 14/14 with 6 unexpected succeedings. :)
  • PIL, PIL2JS.js: PIL2JS.cps2normal now works correctly with functions which reach the end of the program (this can happen, for example, with continuations :)). Previously, the program flow was restarted after the call to PIL2JS.cps2normal, resulting in certain regions running twice.
  • PIL, PIL::PVar, PIL::Subs: sub foo { {return}() } didn't compile, because PIL2JS only kept track of the current subtype, not of all subs it's currently in. Fixed.

* PIL2JS: PIL, PIL2JS.js, README: Context objects are now unboxed -- boxing was

never needed. Should give a small speedup.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • perl5/PIL2JS/lib/PIL/Subs.pm

    r6315 r6376  
    2323    $self->{pSubType} = bless [] => "PIL::$self->{pSubType}";  # minor hack 
    2424 
    25     local $PIL::IN_SUBLIKE = $self->{pSubType}->as_constant; 
     25    local $PIL::IN_SUBLIKE  = $self->{pSubType}->as_constant; 
     26    local @PIL::IN_SUBLIKES = (@PIL::IN_SUBLIKES, $self->{pSubType}->as_constant); 
    2627 
    2728    return bless { 
     
    4344 
    4445    local $PIL::IN_SUBLIKE  = $self->{pSubType}->as_constant; 
     46    local @PIL::IN_SUBLIKES = (@PIL::IN_SUBLIKES, $self->{pSubType}->as_constant); 
    4547    local $PIL::CUR_SUBNAME = $self->{pSubName}; 
    4648 
     
    132134    $self->{pType} = bless [] => "PIL::$self->{pType}";  # minor hack 
    133135 
    134     local $PIL::IN_SUBLIKE = $self->{pType}->as_constant; 
     136    local $PIL::IN_SUBLIKE  = $self->{pType}->as_constant; 
     137    local @PIL::IN_SUBLIKES = (@PIL::IN_SUBLIKES, $self->{pType}->as_constant); 
    135138 
    136139    # &PIL::Params::fixup returns the fixed PIL::Params and the fixed 
     
    155158 
    156159    local $PIL::IN_SUBLIKE  = $self->{pType}->as_constant; 
     160    local @PIL::IN_SUBLIKES = (@PIL::IN_SUBLIKES, $self->{pType}->as_constant); 
    157161    local $PIL::CUR_SUBNAME = "<anonymous@{[$PIL::CUR_SUBNAME ? ' in ' . $PIL::CUR_SUBNAME : '']}>"; 
    158162 
     
    201205    my $self = shift; 
    202206    local $PIL::IN_SUBLIKE  = PIL::SUBTHUNK; 
     207    local @PIL::IN_SUBLIKES = (@PIL::IN_SUBLIKES, PIL::SUBTHUNK); 
    203208    local $PIL::CUR_SUBNAME = "<thunk@{[$PIL::CUR_SUBNAME ? ' in ' . $PIL::CUR_SUBNAME : '']}>"; 
    204209