Skip to content

Instantly share code, notes, and snippets.

View diakopter's full-sized avatar
💭
🤠

Matthew Wilson diakopter

💭
🤠
View GitHub Profile
>>> Bash: bash test/test.bash
Igpay atinlay
Ingystray ingythay
Iway Ikelay Applesway
PASS
>>> C++: g++ -o test/test-cpp test/test.cpp && test/test-cpp
Igpay atinlay
Ingystray ingythay
Iway Ikelay Applesway
Test Summary Report
-------------------
t/04-nativecall/02-simple-args.t (Wstat: 256 Tests: 12 Failed: 1)
Failed test: 11
Non-zero exit status: 1
t/04-nativecall/03-simple-returns.t (Wstat: 256 Tests: 11 Failed: 1)
Failed test: 3
Non-zero exit status: 1
t/04-nativecall/13-union.t (Wstat: 768 Tests: 28 Failed: 3)
Failed tests: 2, 15, 24
in t
hi from toplevel
in Frame_3
hi from sub 1
$a is: foo
in Frame_5
hi from sub 2
$a is: foo
in Frame_3
in Frame_5
CursorBase.pmc | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/CursorBase.pmc b/CursorBase.pmc
index 91c6546..2eb2460 100644
--- a/CursorBase.pmc
+++ b/CursorBase.pmc
@@ -525,9 +525,10 @@ sub delete {
# Cursor transformations
#############################################################
/// <summary>
/// Pops a value from a low level list (something that
/// uses the P6list representation).
/// </summary>
/// <param name="TC"></param>
/// <param name="LLList"></param>
/// <returns></returns>
public static RakudoObject lllist_pop(ThreadContext TC, RakudoObject LLList)
{
my $answers = List[int].new();
$answers.Add(1);
$answers.Add(0);
$answers.Add(-2);
$answers.Add(0);
$answers.Add(1);
$answers.Add(0);
$answers.Add(1);
$answers.Add(-1);
$answers.Add(-10);
dddddddddd
class knapsackItem{
has string $!name; has int $!weight;has int $!unit
method ToString(-->string) {
return self.name ~ ' ' ~ self.weight ~ ' ' ~ self.unit
}
}
sub makeItem(string $n, int $w, int $u --> knapsackItem) {
my $i = knapsackItem.new;
at Rakudo.Runtime.Ops.get_lex(ThreadContext TC, String Name) in c:\src\6model\dotnet\runtime\Runtime\Ops\Variables.cs:line 32
at Rakudo.Runtime.Ops.llcap_get_at_pos(ThreadContext TC, RakudoObject Capture, RakudoObject Index) in c:\src\6model\dotnet\runtime\Runtime\Ops\P6capture.cs:line 32
at NQPOutput_1296157879.block_98(ThreadContext TC, RakudoObject Block, RakudoObject Capture) in c:\src\6model\dotnet\compiler\P6Objects.cs:line 1234
at Rakudo.Metamodel.Representations.RakudoCodeRef.<type_object_for>b__0(ThreadContext TCi, RakudoObject Obj, RakudoObject Cap) in c:\src\6model\dotnet\runtime\Metamodel\Representations\RakudoCodeRef.cs:line 97
at Rakudo.Metamodel.SharedTable.Invoke(ThreadContext TC, RakudoObject Obj, RakudoObject Cap) in c:\src\6model\dotnet\runtime\Metamodel\SharedTable.cs:line 112
at NQPOutput_1296157989.block_1(ThreadContext TC, RakudoObject Block, RakudoObject Capture) in C:\src\6model\dotnet\compiler\x.cs:line 57
at Rakudo.Metamodel.Representations.RakudoCodeRef.<type_o
class knapsackItem {
has string $!name;
has int $!weight;
has int $!unit;
method ToString(-->string) {
return self.name ~ ' ' ~ self.weight ~ ' ' ~ self.unit
}
}
sub makeItem(string $n, int $w, int $u --> knapsackItem) {
my $i = knapsackItem.new;