Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Build a QASTNode for the js backend.
  • Loading branch information
pmurias committed Mar 16, 2014
1 parent 0844fa0 commit 6b6e179
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/build/Makefile-JS.in
Expand Up @@ -56,10 +56,13 @@ $(PERL6_QCJ_PBC): $(PERL6_QCJ)
js-clean:
$(RM_RF) $(PERL6_QCJ_PBC)

cross_compiler=$(PERL6_QCJ_PBC) $(HLL_PBC) $(JS_STAGE2)/$(CORE_SETTING_COMBINED)x $(JS_STAGE2)/nqpmo.pbc $(JS_STAGE2)/$(NQPCORE_PBC)
cross_compiler=$(PERL6_QCJ_PBC) $(HLL_PBC) $(JS_STAGE2)/$(CORE_SETTING_COMBINED)x $(JS_STAGE2)/nqpmo.pbc $(JS_STAGE2)/$(NQPCORE_PBC) $(JS_STAGE2)/QASTNode.pbc

cross_compiler: $(cross_compiler)

core_compiler=$(HLL_PBC) $(PERL6_QCJ_PBC)
stage2_core=$(JS_STAGE2)/$(NQPCORE_PBC) $(JS_STAGE2)/nqpmo.pbc

$(HLL_PBC) : $(HLL_BACKEND) $(PERL6_QCJ_PIR)
$(MKPATH) $(JS_STAGE1)/HLL
$(NQP) --target=pir --module-path=gen/js/stage1 --output=$(HLL_PIR) --encoding=utf8 $(HLL_BACKEND)
Expand All @@ -81,6 +84,11 @@ $(JS_STAGE2)/$(NQPCORE_PBC) : $(JS_STAGE2)/$(CORE_SETTING_COMBINED)x $(JS_STAGE2
nqp-p --module-path $(JS_STAGE1) src/vm/js/bin/compile-setting.nqp $(JS_STAGE2)/$(CORE_SETTING_COMBINED)x $(JS_STAGE2)/NQPCORE.setting $(JS_STAGE2)/NQPCORE.setting.pir
$(PARROT) -o $(JS_STAGE2)/$(NQPCORE_PBC) $(JS_STAGE2)/NQPCORE.setting.pir

$(JS_STAGE2)/QASTNode.pbc: $(QASTNODE_SOURCES) $(stage2_core) $(core_compiler)
$(PERL) tools/build/gen-cat.pl moar $(QASTNODE_SOURCES) > $(JS_STAGE2)/$(QASTNODE_COMBINED)
nqp-p --module-path $(JS_STAGE1) src/vm/js/bin/compile-setting.nqp $(JS_STAGE2)/$(QASTNODE_COMBINED) node_modules/QASTNode $(JS_STAGE2)/QASTNode.pir NQPCORE
$(PARROT) -o $(JS_STAGE2)/QASTNode.pbc $(JS_STAGE2)/QASTNode.pir

js-test: js-all
prove -r --exec "./nqp-js" t/nqp/01-literals.t t/nqp/02-if.t

Expand Down

0 comments on commit 6b6e179

Please sign in to comment.