"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core.c/Buf.pm6" between
rakudo-2020.08.2.tar.gz and rakudo-2020.09.tar.gz

About: Rakudo is a compiler for the Perl 6 programming language.

Buf.pm6  (rakudo-2020.08.2):Buf.pm6  (rakudo-2020.09)
skipping to change at line 349 skipping to change at line 349
nqp::push($buffer,nqp::atpos_i(self,$i)) nqp::push($buffer,nqp::atpos_i(self,$i))
); );
$buffer.List $buffer.List
} }
my $char := nqp::list_s( my $char := nqp::list_s(
'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
); );
multi method gist(Blob:D:) { multi method gist(Blob:D:) {
my int $todo = nqp::elems(self) min 100; nqp::stmts(
my int $i = -1; (my int $todo = nqp::elems(self) min nqp::div_i(200,nqp::div_i(T.^n
my $bytes := nqp::list_s; ativesize,4) || 1)),
(my int $i = -1),
nqp::while( (my $chunks := nqp::list_s),
nqp::islt_i(($i = nqp::add_i($i,1)),$todo), nqp::while(
nqp::stmts( nqp::islt_i($i = nqp::add_i($i,1),$todo),
(my int $byte = nqp::atpos_i(self,$i)), nqp::stmts(
nqp::push_s( (my int $elem = nqp::atpos_i(self,$i)),
$bytes, (my $chunk := nqp::list_s),
nqp::concat( (my int $size = nqp::div_i(T.^nativesize,4) || 1),
nqp::atpos_s($char,nqp::bitshiftr_i($byte,4)), nqp::while(
nqp::atpos_s($char,nqp::bitand_i($byte,0xF)), nqp::isgt_i($size,0),
) nqp::stmts(
nqp::unshift_s(
$chunk,
nqp::atpos_s($char,nqp::bitand_i($elem,0xF))
),
($elem = nqp::bitshiftr_i($elem,4)),
($size = nqp::sub_i($size,1))
)
),
nqp::push_s($chunks,nqp::join('',$chunk))
) )
) ),
); nqp::if(
nqp::isgt_i(nqp::elems(self),$todo),
nqp::push_s($bytes,"...") if nqp::isgt_i(nqp::elems(self),$todo); nqp::push_s($chunks,"...")
),
nqp::join('',nqp::list_s(self.^name,':0x<',nqp::join(" ",$bytes),'>')) nqp::join('',nqp::list_s(self.^name,':0x<',nqp::join(" ",$chunks),'>')
)
)
} }
multi method raku(Blob:D:) { multi method raku(Blob:D:) {
self.^name ~ '.new(' ~ self.join(',') ~ ')'; self.^name ~ '.new(' ~ self.join(',') ~ ')';
} }
# Made this a sub instead of a private method so that the optimizer # Made this a sub instead of a private method so that the optimizer
# doesn't need to put in IntLexRef's for the native int parameters. # doesn't need to put in IntLexRef's for the native int parameters.
# Since we're not using any attributes, just self, that was an easy # Since we're not using any attributes, just self, that was an easy
# choice to make. # choice to make.
sub subbuf-end(\SELF, int $start, int $end, int $elems) { sub subbuf-end(\SELF, int $start, int $end, int $elems) {
 End of changes. 2 change blocks. 
20 lines changed or deleted 31 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)