I give. This:
print 2, "Argh!"
prints "Argh!" to stderr. And this:
open I1, "foo.bar", "w"
print I1, "Hi Mom\n"
close I1
to create the file foo.bar and write "Hi Mom" to it. With a newline.
I feel so... dirty now. :)
Dan
--
And added a readline op. And abused the open op. (Both of which are
temporary, and for debugging purposes/hacking about only!)
The signature is
open Ix, Sy[, Sz]
to open file Y (with optional mode Z, defaults to r+) and stick the
resulting FILE * into Ix. (Yes, FILE *. I'm casting a point
I've added a whole lot of string stuff, so that a repeat op can work.
When writing tests (*cough*) for your pmc stuff, if they're specific
to a given class, use or create a pmc_[classl].t file, so that the
tests you're running to check your shiny new features run through
fairly quickly.
Alex Gou
This patch adds the as2jit.pl script, and a couple example files:
jit/i386/as/Parrot_mul_i_i_i.as
and
jit/i386/as/Parrot_time_n.as
This script takes an AT&T format assembly source file that can also
include jit instructions, and assembles it to the .jit file format.
It is not written to be x86