Skip to content

Instantly share code, notes, and snippets.

View jnthn's full-sized avatar

Jonathan Worthington jnthn

View GitHub Profile
class ACrappyAsyncHTTPServer {
has $.host;
has $.port;
has $.log;
has %!handlers;
method BUILD(:$!host, :$!port) {
$!log = Supply.new;
IO::Socket::Async.listen($!host, $!port).tap(-> $connection {
diff --git a/src/core/nativecall.c b/src/core/nativecall.c
index eee6069..60c99ec 100644
--- a/src/core/nativecall.c
+++ b/src/core/nativecall.c
@@ -363,7 +363,7 @@ static void * unmarshal_callback(MVMThreadContext *tc, MVMObject *callback, MVMO
callback_data->target = callback;
callback_data->cb = dcbNewCallback(signature, &callback_handler, callback_data);
- MVM_HASH_BIND(tc, tc->native_callback_cache, cuid, callback_data);
+/* MVM_HASH_BIND(tc, tc->native_callback_cache, cuid, callback_data);*/
--- a/src/spesh/candidate.c
+++ b/src/spesh/candidate.c
@@ -13,10 +13,13 @@ MVMSpeshCandidate * MVM_spesh_candidate_setup(MVMThreadContext *tc,
MVMint32 num_spesh_slots, num_log_slots, num_guards, *deopts, num_deopts;
MVMCollectable **spesh_slots, **log_slots;
char *before, *after;
+ MVMSpeshGraph *sg;
+
+ MVM_gc_allocate_gen2_default_set(tc);
diff --git a/src/spesh/facts.c b/src/spesh/facts.c
index 470d203..85b2fd8 100644
--- a/src/spesh/facts.c
+++ b/src/spesh/facts.c
@@ -134,7 +134,8 @@ static void log_facts(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshIns *ins)
if (!stable_value) {
stable_value = consider;
}
- else if (STABLE(stable_value) != STABLE(consider)) {
+ else if (STABLE(stable_value) != STABLE(consider)
diff --git a/lib/Panda/Builder.pm b/lib/Panda/Builder.pm
index b09aa0f..bff2994 100644
--- a/lib/Panda/Builder.pm
+++ b/lib/Panda/Builder.pm
@@ -25,7 +25,7 @@ sub topo-sort(@modules, %dependencies) {
}
sub path-to-module-name($path) {
- $path.subst(/^'lib/'/, '').subst(/^'lib6/'/, '').subst(/\.pm6?$/, '').subst('/', '::', :g);
+ $path.subst(/^'lib'<[/\\]>/, '').subst(/^'lib6'<[/\\]>/, '').subst(/\.pm6?$/, '').subst(/<[/\\]>/, '::', :g);
diff --git a/src/core/IO.pm b/src/core/IO.pm
index 5067ef5..01eb6b7 100644
--- a/src/core/IO.pm
+++ b/src/core/IO.pm
@@ -6,10 +6,17 @@ sub print(|) {
Bool::True
}
-sub say(|) {
+proto sub say(|) { * }
diff --git a/src/core/IO.pm b/src/core/IO.pm
index 5067ef5..8039ca7 100644
--- a/src/core/IO.pm
+++ b/src/core/IO.pm
@@ -6,10 +6,15 @@ sub print(|) {
Bool::True
}
-sub say(|) {
+proto sub say(|) { * }
diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp
index 239a171..d2ea6f3 100644
--- a/src/Perl6/Optimizer.nqp
+++ b/src/Perl6/Optimizer.nqp
@@ -31,6 +31,7 @@ my class Symbols {
has $!Block;
has $!PseudoStash;
has $!Routine;
+ has $!Nil;
compiling src\jit\jit.obj
jit.c
src\jit\jit.c(147) : error C2057: expected constant expression
src\jit\jit.c(147) : error C2466: cannot allocate an array of constant size 0
src\jit\jit.c(147) : error C2133: 'global_labels' : unknown size
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.EXE"' :
return code '0x2'
Stop.
class A {
has $!a;
method BUILD(:$a) {
$!a := $a;
}
method a() { $!a }
}