Skip to content

Instantly share code, notes, and snippets.

View jnthn's full-sized avatar

Jonathan Worthington jnthn

View GitHub Profile
===SORRY!===
Confused
at z.p6:1
------> <BOL><HERE>my @a = map { 2 * $_ } 3, 4, 5;
use v6;
class X::Overload::Missing does X::Comp {
has $.type;
has $.method;
method message() {
"Method $.method of type $.type doesn't override anything"
}
}
use MONKEY_TYPING;
augment class Signature {
multi method ACCEPTS(Signature:D: Signature:D $topic) {
return False unless $topic.params == self.params;
for $topic.params Z self.params -> $t, $s {
return False unless $t.type ~~ $s.type;
}
return True;
}
cl -I./include -I./include/pmc -nologo -GF -W4 -MD -Zi -DNDEBUG -Ox -GL
-fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -DUSE_SITECUST
OMIZE -D_CRT_SECURE_NO_DEPRECATE -DHASATTRIBUTE_DEPRECATED -wd4101 -DHASATTRIBU
TE_NORETURN -wd4101 -Zi -wd4127 -wd4054 -wd4310 -Isrc/dynpmc -Isrc/ -Fosrc/d
ynpmc/os.obj -c src/dynpmc/os.c
os.c
c:\consulting\rakudo\parrot\src\dynpmc\pmc_os.h(19) : warning C4431: missing typ
e specifier - int assumed. Note: C no longer supports default-int
c:\consulting\rakudo\parrot\src\dynpmc\pmc_os.h(19) : error C2054: expected '('
to follow 'PARROT_DYNEXT_EXPORT'
"== Installing binaries"
C:\Perl64\bin\perl.exe tools/build/bin-install.pl C:/consulting/rstar-rc
/rakudo-star-2012.08/install/bin/perl6.exe C:/consulting/rstar-rc/rakudo-star-20
12.08/install/bin modules/ufo/bin/ufo modules/panda/bin/panda
C:/consulting/rstar-rc/rakudo-star-2012.08/install/bin/nqp.exe --vmlibs=
perl6_group,perl6_ops --target=pir --output=modules/rakudo-debugger/perl6-debug
.pir modules/rakudo-debugger/bin/perl6-debug.nqp
C:/consulting/rstar-rc/rakudo-star-2012.08/install/bin/parrot.exe -o mod
ules/rakudo-debugger/perl6-debug.pbc modules/rakudo-debugger/perl6-debug.pir
C:/consulting/rstar-rc/rakudo-star-2012.08/install/bin/pbc_to_exe.exe mo
cd rakudo && "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.exe" install
C:\Perl64\bin\perl.exe -MExtUtils::Command -e mkpath C:\consulting\rstar-rc\rakudo-star-2012.08\install\lib\parrot\4.6.0\languages\nqp\lib\Perl6
C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp blib\Perl6\ModuleLoader.pbc C:\consulting\rstar-rc\rakudo-star-2012.08\install\lib\parrot\4.6.0\languages\nqp\lib\Perl6\ModuleLoader.pbc
C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp blib\Perl6\ConstantFolder.pbc C:\consulting\rstar-rc\rakudo-star-2012.08\install\lib\parrot\4.6.0\languages\nqp\lib\Perl6\ConstantFolder.pbc
C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp blib\Perl6\World.pbc C:\consulting\rstar-rc\rakudo-star-2012.08\install\lib\parrot\4.6.0\languages\nqp\lib\Perl6\World.pbc
C:\Perl64\bin\perl.exe -MExtUtils::Command -e cp blib\Perl6\Grammar.pbc C:\consulting\rstar-rc\rakudo-star-2012.08\install\lib\parrot\4.6.0\languages\nqp\lib\Perl6\Grammar.p
diff --git a/src/Perl6/Optimizer.pm b/src/Perl6/Optimizer.pm
index abcff71..7961ab1 100644
--- a/src/Perl6/Optimizer.pm
+++ b/src/Perl6/Optimizer.pm
@@ -503,6 +503,7 @@ class Perl6::Optimizer {
if $call.named -> $name {
$inlined.named($name);
}
+ $inlined.node($call.node);
Take a Rakudo repo. Place the above file in src/json.nqp. Build it like this:
nqp --vmlibs=perl6_group,perl6_ops --target=pir --combine src/json.nqp src/gen/main-version.nqp > src/json.pir
Then you can do:
install\bin\parrot.exe src\json.pir -e "say 42"
Which will dump the parse tree as JSON.
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm
index 4179a02..beeee86 100644
--- a/src/Perl6/Actions.pm
+++ b/src/Perl6/Actions.pm
@@ -173,9 +173,22 @@ class Perl6::Actions is HLL::Actions {
}
method deflongname($/) {
- make $<colonpair>
- ?? ~$<name> ~ ':<' ~ ~$<colonpair>[0]<circumfix><quote_EXPR><quote_delimited><quote_atom>[0] ~ '>'
diff --git a/src/pmc/qrpa.pmc b/src/pmc/qrpa.pmc
index 9aa98d3..77483a5 100644
--- a/src/pmc/qrpa.pmc
+++ b/src/pmc/qrpa.pmc
@@ -206,11 +206,11 @@ Resizes the array to C<n> elements.
VTABLE PMC * get_pmc_keyed_int(INTVAL pos) {
- INTVAL elems;
- INTVAL start;