Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

autrijus (1505)

  (email not shown publicly)

Journal of autrijus (1505)

Saturday June 18, 2005
06:54 PM

Day 135: Eighth day at Leo's: runs on Parrot!

[ #25266 ]
The END block in now runs correctly, and the entire module has been compiled to Parrot:

$ ./pugs -BPIR ext/Test/lib/

As seen on #perl6:

* putter pictures trying to explain to someone,
  yes, it said "1..0", so we were quite happy...

With this, the zeroth phase -- that is, the sanity phase -- of PugsAST/PIR bootstrapping is done. Note that it currently passes none of the other 7000 tests; it's just sanity, and nothing more.

We also implemented these features on the PIR backend:

  • Tail call optimisation, so we don't run into Parrot's 1k-level recursion limit.
  • Optional parameter support: sub foo ($x, ?$y=$x) {say "$x = $y"}
  • Keyed access: say %*ENV<USER>
  • Symbolic dereference: &::("say").("Hello!")

Even when unoptimised, the PIR backend is already nearly an order of magnitude faster than Pugs's main Eval runloop. However, because of Parrot's current heavy penalty against snapshotting a continuation, we're still much slower than Perl 5 for common control structures, especially with large number of loop iterations. Let's hope Leo's O(1) CPS fix will land soon...

There are lots of things left to do before we can run our own harness in PIR, mostly at the Parrot side:

  • require and use needs to be redispatched to Parrot.
  • Static numbering of lexical pad levels needs more work -- currently I just used store_globals for everything.
  • The alligator is still eating the cc in call/cc, so we're forced into the slow and non-reentrant store_global passing style.
  • Optional parameters are currently discarded even if passed through.
  • Named parameters needs to hook up with the Pair PMC -- it requires callconv fix in the Parrot side.
  • Numerous builtins are still missing.

With the current level of PIR support in 6.2.8, I think our YAPC::NA Hackathon can devote some time into bringing the primitives into shape; then we can subject PugsAST/PIR/Parrot to our existing 7000+ tests, and see if there are any serious glitches left to be found.

But, sleep first. See you tomorrow!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.