This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java b/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java | |
index dc9fd60..9cb26cb 100644 | |
--- a/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java | |
+++ b/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6Opaque.java | |
@@ -644,7 +644,7 @@ public class P6Opaque extends REPR { | |
// Ensure target type is also P6opaque-based. | |
if (!(newType.st.REPR instanceof P6Opaque)) | |
throw ExceptionHandling.dieInternal(tc, "P6opaque can only rebless to another P6opaque-based type"); | |
- | |
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my role Foo { | |
has $!setup; | |
method postcircumfix:<( )>($args) { | |
#say self.?bar // 'not what we want'; | |
if nqp::can(self, 'bar') { say self.bar } | |
else { say 'no what we want' } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plan(1); | |
my $arg_hash; | |
my $return_hash; | |
class Call is repr('NativeCall') { } | |
class CPointer is repr('CPointer') { } | |
my $printf := nqp::create(Call); | |
$arg_hash := nqp::hash(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From cdeabc2ba7f357b886184c2a73b8beb48e1720c9 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?Arne=20Skj=C3=A6rholt?= <arnsholt@gmail.com> | |
Date: Thu, 29 Aug 2013 17:51:29 +0200 | |
Subject: [PATCH] Temporary commit for jnthn. | |
--- | |
lib/NativeCall.pm6 | 7 +++++-- | |
t/02-simple-args.t | 14 +++++++------- | |
2 files changed, 12 insertions(+), 9 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub foo() { say "in sub"; } | |
role Test { | |
method postcircumfix:<( )>($args) { | |
say "overridden"; | |
} | |
} | |
role Other { | |
method bar() { say "foo"; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expects to be live in .../zavolaj/ | |
use lib '.'; | |
use t::CompileTestLib; | |
use NativeCall; | |
compile_test_lib('08-callbacks'); | |
sub TakeACallback(&cb()) is native('./08-callbacks') { * } | |
sub simple_callback() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Grammar production: [Cat, [Cat]] or [Cat, Term] | |
* DI: [Cat, Consumed, Left] | |
*/ | |
%disr(Rest, Stack, Grammar) :- fail. | |
disr(Input, Grammar) :- disr(Input, [], Grammar). | |
% SHIFT: Word of category Cat next word in input: ``push Cat -> Word \dot'' onto stack. | |
disr([W|Rest], Stack, Grammar) :- grammar_terminal(Grammar, W, Cat), DI = [Cat, [W], []], disr(Rest, [DI|Stack], Grammar). | |
% SEED: Given a completed DI of category CatB on top of the stack and a production CatA -> CatB ..., replace the top item with a new DI [CatA, [CatB], ...] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use lib '.'; | |
use t::CompileTestLib; | |
use NativeCall; | |
compile_test_lib('08-callbacks'); | |
sub TakeACallback(&cb()) is native('./08-callbacks') { * } | |
sub simple_callback() { | |
say 'simple callback'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VTABLE INTVAL does(STRING *what) { | |
PMC *decont = decontainerize(interp, SELF); | |
if (Parrot_str_equal(interp, what, CONST_STRING(interp, "invokable"))) { | |
return 1; | |
} | |
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "array"))) { | |
return Parrot_str_equal(interp, REPR(decont)->name, CONST_STRING(interp, "VMArray")); | |
} | |
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "hash"))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QAST::Operations.add_core_op('list', :inlinable(1), -> $qastcomp, $op { | |
# Create register for the resulting list and make an empty one. | |
my $arr := $qastcomp.as_post(QAST::Op.new(:op('create'), QAST::Op.new(:op('hlllist')))); | |
# Push all the things. | |
if +$op.list { | |
my $list_reg := $*REGALLOC.fresh_p(); | |
my $ops := PIRT::Ops.new(:result($list_reg)); | |
$ops.push_pirop('set', $list_reg, $arr); |
NewerOlder