3 # The dynamics PMCs used by Eclectus are loaded
4 .loadlib 'eclectus_group'
7 .include 'library/dumper.pir'
12 load_bytecode 'PGE.pbc'
13 load_bytecode 'PGE/Text.pbc'
14 load_bytecode 'PGE/Util.pbc'
15 load_bytecode 'PGE/Dumper.pbc'
16 load_bytecode 'PCT.pbc'
18 load_bytecode 'languages/eclectus/src/builtins/all.pbc'
26 .local string program_name, nqp_fn
27 program_name = shift argv
31 .local string pir_fn, cmd
34 substr pir_fn, -3, 3, 'pir'
35 cmd = "../../parrot ../../compilers/nqp/nqp.pbc --target=pir --output="
42 # load the generated PIR
43 $S1 = concat "languages/eclectus/", pir_fn
47 ( stmts ) = scheme_entry()
49 # compile and evaluate the PAST returned from scheme_entry()
50 .local pmc past_compiler
51 past_compiler = new [ 'PCT::HLLCompiler' ]
52 $P0 = split ' ', 'post pir'
53 past_compiler.'stages'( $P0 )
54 $P1 = past_compiler.'eval'(stmts)
56 $P0 = split ' ', 'evalpmc'
57 past_compiler.'stages'( $P0 )
58 past_compiler.'eval'( $P1 )
62 .sub '__initconst' :init
63 $P0 = new 'EclectusBoolean'
65 set_root_global ['_eclectus'], '#t', $P0
66 $P0 = new 'EclectusBoolean'
67 set_root_global ['_eclectus'], '#f', $P0
68 $P0 = new 'EclectusEmptyList'
69 set_root_global ['_eclectus'], '()', $P0
76 # vim: expandtab shiftwidth=4 ft=pir: