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
[23:11] [inara:/Users/treed/code/cardinal]% ../parrot/parrot test.pir | |
foo | |
1 | |
set_string_native() not implemented in class 'String' | |
current instr.: 'main' pc 56 (test.pir:24) |
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 'reverse' :method | |
.local pmc res | |
.local int i | |
res = new 'CardinalString' | |
.local pmc iterator, item | |
iterator = iter self | |
each_loop: | |
unless iterator goto each_loop_done |
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
Test statistics: | |
The test suite took 0:3. | |
563 tests were run, from 92 files. | |
500 tests passed, 26 of which were unexpected. | |
Unexpected passes were found in the following files: | |
proc.t | |
range.t | |
time.t | |
array/insert.t | |
integer/integer.t |
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 uniq :method | |
.param pmc block :optional :named("!BLOCK") | |
.param int block_flag :opt_flag | |
.local pmc uarray, pair, hash, val, key, values | |
.local int i, len | |
uarray = new 'CardinalArray' | |
hash = new 'CardinalHash' | |
i = 0 |
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 'infix:-' :multi('CardinalArray','CardinalArray') | |
.param pmc this | |
.param pmc that | |
.local pmc array, hash, key, includes | |
.local int i, len | |
array = new 'CardinalArray' | |
hash = new 'CardinalHash' | |
len = that.'size'() | |
i = 0 |
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
a = [1,2,3] | |
puts a | |
a = a * 3 | |
puts a | |
a = [1,2,3] | |
a = a * ":" | |
puts a |
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 uniq :method | |
.local pmc uarray, hash, val | |
.local int i, len | |
uarray = new 'CardinalArray' | |
hash = new 'CardinalHash' | |
i = 0 | |
len = self.'Elems'() |
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 main :main | |
$P0 = new 'BigNum' | |
$P0 = 100 | |
say $P0 | |
.end |
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
> pamai dunxu'a li pa li pa | |
ok 1 | |
> vomai dunxu'a li pa su'i pa li re | |
ok 4 | |
> vomai dunxu'a li pa li re | |
not ok 4 |
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 'new' :method | |
.param int mei :named('mei') :optional | |
.param pmc args :slurpy | |
.local pmc iter, bridi | |
.local string selbri | |
selbri = typeof self | |
bridi = new selbri | |
bridi.'set_selbri'(selbri) | |
$P0 = new 'ResizablePMCArray' | |
bridi.'set_terbri'($P0) |