New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow source written in perl6 #40
Comments
From @pmichaudCurrently all of the builtins for perl6 are written in PIR. We have all of the pieces we need to make this happen -- we just Pm |
From zev-perl6@strangersgate.comI would appreciate if someone would look over this patch before Zev |
From zev-perl6@strangersgate.comperl6-bootstrap.patchIndex: perl6.pir
===================================================================
--- perl6.pir (revision 25992)
+++ perl6.pir (working copy)
@@ -184,6 +184,7 @@
.include 'src/gen_grammar.pir'
.include 'src/parser/quote_expression.pir'
.include 'src/gen_actions.pir'
+.include 'src/gen_include_runtime.pir'
=back
Index: config/makefiles/root.in
===================================================================
--- config/makefiles/root.in (revision 25992)
+++ config/makefiles/root.in (working copy)
@@ -30,13 +30,17 @@
xmas: perl6$(EXE)
-SOURCES = perl6.pir \
+BOOTSTRAP_SOURCES = perl6.pir \
src/gen_grammar.pir \
src/gen_actions.pir \
src/gen_builtins.pir \
src/parser/quote_expression.pir \
$(PERL6_GROUP)
+SOURCES = \
+ src/gen_runtime.pir \
+ $(BOOTSTRAP_SOURCES)
+
BUILTINS_PIR = \
src/classes/Object.pir \
src/classes/Bool.pir \
@@ -60,8 +64,12 @@
src/builtins/op.pir \
src/builtins/parrot.pir \
src/builtins/range.pir \
+ src/builtins/system.pir \
src/builtins/traits.pir \
+RUNTIME_SOURCES = \
+ src/runtime/Dummy.pm
+
PMCS = perl6str
PMC_SOURCES = $(PMC_DIR)/perl6str.pmc
PERL6_GROUP = $(PMC_DIR)/perl6_group$(LOAD_EXT)
@@ -72,9 +80,14 @@
$(PBC_TO_EXE) perl6.pbc
# the default target
-perl6.pbc: $(PARROT) $(SOURCES)
+perl6.pbc: $(PARROT) perl6-bootstrap.pbc $(SOURCES)
+ echo ".include 'src/gen_runtime.pir'" > src/gen_include_runtime.pir
$(PARROT) $(PARROT_ARGS) -o perl6.pbc perl6.pir
+perl6-bootstrap.pbc: $(PARROT) $(BOOTSTRAP_SOURCES)
+ echo "" > src/gen_include_runtime.pir
+ $(PARROT) $(PARROT_ARGS) -o perl6-bootstrap.pbc perl6.pir
+
src/gen_grammar.pir: $(PERL6GRAMMAR) src/parser/grammar.pg src/parser/grammar-oper.pg
$(PARROT) $(PARROT_ARGS) $(PERL6GRAMMAR) \
--output=src/gen_grammar.pir \
@@ -85,8 +98,15 @@
--target=pir src/parser/actions.pm
src/gen_builtins.pir: $(BUILTINS_PIR)
- $(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir
+ $(CAT) $(BUILTINS_PIR) > src/gen_builtins.pir
+src/gen_runtime.pir: src/gen_runtime.pm
+ $(PARROT) $(PARROT_ARGS) perl6-bootstrap.pbc --output=src/gen_runtime.pir \
+ --target=pir src/gen_runtime.pm
+
+src/gen_runtime.pm: $(RUNTIME_SOURCES)
+ $(CAT) $(RUNTIME_SOURCES) > src/gen_runtime.pm
+
$(PERL6_GROUP): $(PARROT) $(PMC_SOURCES)
cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
@@ -150,12 +170,16 @@
CLEANUPS = \
perl6.pbc \
+ perl6-bootstrap.pbc \
perl6.c \
perl6$(O) \
perl6$(EXE) \
src/gen_grammar.pir \
src/gen_actions.pir \
src/gen_builtins.pir \
+ src/gen_runtime.pir \
+ src/gen_runtime.pm \
+ src/gen_include_runtime.pir \
$(PMC_DIR)/*.h \
$(PMC_DIR)/*.c \
$(PMC_DIR)/*.dump \
Index: src/runtime/Dummy.pm
===================================================================
--- src/runtime/Dummy.pm (revision 0)
+++ src/runtime/Dummy.pm (revision 0)
@@ -0,0 +1,2 @@
+# This is a dummy runtime file. It should be removed as soon as
+# there is a real file in this directory
|
From @pmichaudIf anyone wants to work on this ticket, writing a Perl 6 version of the Pm |
@pmichaud - Status changed from 'new' to 'open' |
From @cspencerThe attached file contains method definitions for splice and pick as A couple of caveats: - The parameter lists in the methods have been fudged so as to get by - I wasn't able to fully test them as methods, as the parser doesn't - It's not a patch against any given file, as I wasn't quite sure what On Fri May 09 14:36:59 2008, pmichaud wrote:
|
From @jnthnOn Fri Dec 28 15:59:18 2007, pmichaud wrote:
And boy did it take us a little while to get there, but today we have. :-) See under src/setting/ for various .pm files that make the start of our Also, this ticket had a patch supplying a Perl 6 implementation of So, resolving this ticket. Thanks, Jonathan |
@jnthn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#49173 (status was 'resolved')
Searchable as RT49173$
The text was updated successfully, but these errors were encountered: