Skip to content

Instantly share code, notes, and snippets.

View jnthn's full-sized avatar

Jonathan Worthington jnthn

View GitHub Profile
sub trait_mod:<is>(&c, :$curried!) {
my $arity = &c.arity;
&c.wrap(-> |args {
args.list.elems == $arity
?? callsame()
!! &c.assuming(|args)
});
}
sub foo($a, $b) is curried {
emulates - after keeping things with packages vs compilation units clean, the
spec for emulates seems to blur the boundary again... Problem? Like, what are
the actual semantics of it? How does it emulate? Aliasing? Or is it up to the
module that declares itself as emulating another to export the correct things?
What is the development-time story for CompUnit? A module in development is
obviously not ready for production, but the developer will certainly want to
load it!
How do we specify (in a use statement?) that we are willing to accept a module
diff --git a/src/io/syncfile.c b/src/io/syncfile.c
index 904ab6c..6d32d34 100644
--- a/src/io/syncfile.c
+++ b/src/io/syncfile.c
@@ -183,8 +183,9 @@ static MVMint64 eof(MVMThreadContext *tc, MVMOSHandle *h) {
uv_fs_t req;
if (data->ds && !MVM_string_decodestream_is_empty(tc, data->ds))
return 0;
- if ((r = uv_fs_lstat(tc->loop, &req, data->filename, NULL)) == -1)
- MVM_exception_throw_adhoc(tc, "Failed to stat in filehandle: %d", errno);
diff --git a/src/Perl6/ModuleLoader.nqp b/src/Perl6/ModuleLoader.nqp
index 591c3ae..4abe848 100644
--- a/src/Perl6/ModuleLoader.nqp
+++ b/src/Perl6/ModuleLoader.nqp
@@ -281,7 +281,7 @@ class Perl6::ModuleLoader does Perl6::ModuleLoaderVMConfig {
# appropriately copied.
if $orig.HOW.name($orig) eq 'Stash' {
for $orig.FLATTENABLE_HASH() {
- unless nqp::existskey($current, $_.key) {
+ if !nqp::existskey($current, $_.key) || nqp::substr($_.key, 0, 1) eq '&' {
diff --git a/src/core/interp.c b/src/core/interp.c
index a1bc5cf..a6216eb 100644
--- a/src/core/interp.c
+++ b/src/core/interp.c
@@ -50,6 +50,8 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
/* The current call site we're constructing. */
MVMCallsite *cur_callsite = NULL;
+ MVMuint16 op, last_op;
+
diff --git a/build/probe.pm b/build/probe.pm
index 5e4cee2..ba5a06b 100644
--- a/build/probe.pm
+++ b/build/probe.pm
@@ -51,13 +51,13 @@ sub compile {
my @objs;
foreach my $file ("$leaf.c", @$files) {
(my $obj = $file) =~ s/\.c/$config->{obj}/;
- my $command = "$config->{cc} $cl_define $config->{ccout} $obj $config->{ccswitch} $file >$devnull 2>&1";
+ my $command = "$config->{cc} $cl_define $config->{ccout}$obj $config->{ccswitch} $file >$devnull 2>&1";
C:\consulting\rakudo>type flunk.pm
sub fail($a?) is export { use Test }
C:\consulting\rakudo>perl6-m -Ilib --target=mbc --output=flunk.moarvm flunk.pm
C:\consulting\rakudo>perl6-m -Ilib -I. -e "use flunk;"
C:\consulting\rakudo>perl6-m -Ilib -I. -e "use flunk; say 'ok'"
ok
diff --git a/src/core/interp.c b/src/core/interp.c
index a650dc2..89a5909 100644
--- a/src/core/interp.c
+++ b/src/core/interp.c
@@ -3316,7 +3316,10 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
cur_op += 4;
goto NEXT;
OP(readlineint_fh):
- GET_REG(cur_op, 0).s = MVM_file_readline_interactive_fh(tc, GET_REG(cur_op, 2).o, GET_REG(cur_op, 4).s);
+ /* XXX Avoid readline for now; spews infinite prompts on some
diff --git a/3rdparty/libuv b/3rdparty/libuv
--- a/3rdparty/libuv
+++ b/3rdparty/libuv
@@ -1 +1 @@
-Subproject commit 3e054c36294f9d8fc197c9d1b715ea2db334f6bf
+Subproject commit 3e054c36294f9d8fc197c9d1b715ea2db334f6bf-dirty
diff --git a/src/core/interp.c b/src/core/interp.c
index 5d8f0d5..d9ae539 100644
--- a/src/core/interp.c
+++ b/src/core/interp.c
diff --git a/src/vm/jvm/core/Supply.pm b/src/vm/jvm/core/Supply.pm
index d52519e..2de8ce9 100644
--- a/src/vm/jvm/core/Supply.pm
+++ b/src/vm/jvm/core/Supply.pm
@@ -127,15 +127,15 @@ sub on(&setup) {
$source.tap(
-> \val {
$lock.protect({ more(val) });
- CATCH { self.quit($_) }
+ CATCH { default { self.quit($_) } }