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/PNil.pm

    r6270 r6376  
    1111 
    1212sub as_js { 
    13   return "" unless $PIL::IN_SUBLIKE; 
     13  # This is so even programs using function converted by PIL2JS.cps2normal can 
     14  # correctly terminate. 
     15  return "throw new PIL2JS.ControlException.end" unless $PIL::IN_SUBLIKE; 
    1416 
    1517  my $cxt   = "PIL2JS.Context.ItemAny";