cvsuser 03/07/10 11:28:20
Added: languages/plot/t plot.t
languages/plot plot.pasm
Log:
Added PLOT - Parrot gets Lisp on OSCON Thursday
Part of an evil plan to create a reasonable Scheme implementation in a
day at OSCON. Lousy acroynym, but hey, it 'plot' means 'scheme' so...
Revision Changes Path
1.1 parrot/languages/plot/t/plot.t
Index: plot.t
===================================================================
#! perl -w
use lib '../../../lib';
use Parrot::Test tests => 1;
use Test::More;
output_is(<<'CODE', <<'OUTPUT', "Testing the empty list");
.include "../plot.pasm"
find_global P5, "()"
set S16, P5[0]
eq S16, "*nil*", OK_1
print "not "
OK_1: print "ok 1\n"
find_lex P0, "eval"
invokecc
set S17, P5[0]
eq S17, "*nil*", OK_2
print "not"
OK_2: print "ok 2\n"
nilp P5, OK_3
print "not "
OK_3: print "ok 3\n"
CODE
ok 1
ok 2
OUTPUT
1.1 parrot/languages/plot/plot.pasm
Index: plot.pasm
===================================================================
# Plot
# Copyright YAS -- will have more detail later...
# Making ()/nil
new P16, .PerlArray
set P16[0], "*nil*"
store_global "()", P16
.macro nilp ( T, L)
# Set up eval
new_pad 0
newsub P16, .Sub, eval
store_lex 0, "eval", P16
branch EVAL_END
eval:
invoke P1
EVAL_END: