Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Start cross-compiling NQP itself.
We now survive "say('hello world')" running entirely on the JVM, with
NQP's grammar/actions parsing and building the AST, the QAST -> JVM
bytecode happening in-process and then evaluating the result. Much to
bug hunt, but very simple things work. Note, -e and file input work
but the REPL does not yet.
  • Loading branch information
jnthn committed Feb 27, 2013
1 parent b93079a commit 266da05
Show file tree
Hide file tree
Showing 2 changed files with 3,460 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Makefile
Expand Up @@ -6,9 +6,9 @@ PROVE = prove

NQPLIBS = NQPCOREJVM.setting.class nqp-mo.class ModuleLoader.class QASTNodeJVM.class \
QRegexJVM.class NQPHLLJVM.class JASTNodesJVM.class QASTJVM.class \
NQPP6QRegexJVM.class
NQPP6QRegexJVM.class NQPJVM.class
NQPLIBPIRS = NQPCOREJVM.setting.pir nqp-mo.pir QASTNodeJVM.pir QRegexJVM.pir NQPHLLJVM.pir \
JASTNodesJVM.pir QASTJVM.pir NQPP6QRegexJVM.pir
JASTNodesJVM.pir QASTJVM.pir NQPP6QRegexJVM.pir NQPJVM.pir
CROSSPBCS = JASTNodes.pbc QASTJASTCompiler.pbc helper.pbc

JAVAS = src/org/perl6/nqp/jast2bc/*.java \
Expand Down Expand Up @@ -81,6 +81,9 @@ QASTJVM.pir: nqp-src/QASTJVM.nqp JASTNodesJVM.pbc
NQPP6QRegexJVM.pir: nqp-src/NQPP6QRegex.pm QASTJVM.pbc
$(PRECOMPILE) nqp-src/NQPP6QRegex.pm

NQPJVM.pir: nqp-src/NQP.pm NQPP6QRegexJVM.pbc
$(PRECOMPILE) nqp-src/NQP.pm

nqp-mo.class: nqp-src/nqp-mo.pm nqp-mo.pbc
$(CROSSCOMPILE_NS) nqp-src/nqp-mo.pm

Expand All @@ -107,3 +110,6 @@ QASTJVM.class: nqp-src/QASTJVM.nqp QASTJVM.pbc

NQPP6QRegexJVM.class: nqp-src/NQPP6QRegex.pm NQPP6QRegexJVM.pbc
$(CROSSCOMPILE) nqp-src/NQPP6QRegex.pm

NQPJVM.class: nqp-src/NQP.pm NQPJVM.pbc
$(NQP) nqp-jvm-cc.nqp --no-regex-lib --target=classfile --output=NQPJVM.class --javaclass=NQPJVM nqp-src/NQP.pm

0 comments on commit 266da05

Please sign in to comment.