test script
sub ed_green_thread() { Q:PIR {
.local pmc interp, task, block, block_name
.local string name
interp = getinterp
task = interp.'current_task'()
block_name = pop task
name = block_name
diff --git a/src/QRegex/P6Regex/Actions.nqp b/src/QRegex/P6Regex/Actions.nqp | |
index dff6757..1ab5bc3 100755 | |
--- a/src/QRegex/P6Regex/Actions.nqp | |
+++ b/src/QRegex/P6Regex/Actions.nqp | |
@@ -432,6 +432,7 @@ class QRegex::P6Regex::Actions is HLL::Actions { | |
while $i < $n { | |
my $ast := $clist[$i].ast; | |
if $ast.negate { | |
+ say("method assertion:sym<[>($/) while negate"); | |
if $ast.rxtype eq 'cclass' { |
sub store_regex_alt_nfa($code_obj, $key, @alternatives) { | |
my @saved; | |
for @alternatives { | |
@saved.push($_.save(:non_empty)); | |
} | |
$code_obj.SET_ALT_NFA($key, @saved); | |
} | |
my $code_obj := nqp::create(NQPRegex); | |
my $ast := QAST::Regex.new( |
# References ISO/IEC 9899:1990 "Information technology - Programming Language C" (C89 for short) | |
grammar C::StdC89Lexer; | |
#rule TOP { | |
# ^ <c-token>+ $ | |
#} | |
# SS 6.4 | |
proto token c-token {*} |
diff --git a/src/Perl6/Grammar.pm b/src/Perl6/Grammar.pm | |
index abf96b7..c5f9177 100644 | |
--- a/src/Perl6/Grammar.pm | |
+++ b/src/Perl6/Grammar.pm | |
@@ -1156,7 +1156,12 @@ grammar Perl6::Grammar is HLL::Grammar does STD { | |
$<doc>=[ 'DOC' \h+ ]? | |
<sym> <.ws> | |
[ | |
- | <version> | |
+ | <version> <?{ ~$<version><vnum>[0] ne '5' }> |
diff --git a/src/QRegex/P5Regex/Grammar.nqp b/src/QRegex/P5Regex/Grammar.nqp | |
index e29167b..5be2be3 100644 | |
--- a/src/QRegex/P5Regex/Grammar.nqp | |
+++ b/src/QRegex/P5Regex/Grammar.nqp | |
@@ -69,7 +69,7 @@ grammar QRegex::P5Regex::Grammar is HLL::Grammar { | |
<![|)]> | |
<!rxstopper> | |
<atom> | |
- [ <.ws> <quantifier=p5quantifier> ]**0..1 | |
+ [ <.ws> <!before <rxstopper> > <quantifier=p5quantifier> ]**0..1 |
diff --git a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java | |
index c193007..e1d3418 100644 | |
--- a/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java | |
+++ b/src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java | |
@@ -2648,7 +2648,7 @@ public final class Ops { | |
/* String operations. */ | |
public static long chars(String val) { | |
- return val.length(); | |
+ return val.codePointCount(0, val.length()); |
# generate code that runs the block only once | |
make QAST::Stmts.new( | |
QAST::Op.new( | |
:op('if'), | |
QAST::Op.new( :op('p6stateinit') ), | |
QAST::Op.new( | |
:op('p6store'), | |
QAST::Var.new( :name($sym), :scope('lexical') ), | |
QAST::Op.new( :op('call'), $<blorst>.ast ) | |
), |
use QAST; | |
plan(1); | |
sub is_pirt_result($producer, $expected, $desc) { | |
my $pirt := $producer(); | |
my $pir := $pirt.pir(); | |
my $pbc := nqp::getcomp('nqp').compile($pir, :from('pir')); | |
$pbc := $pbc(); | |
if nqp::islist($pbc) { |
test script
sub ed_green_thread() { Q:PIR {
.local pmc interp, task, block, block_name
.local string name
interp = getinterp
task = interp.'current_task'()
block_name = pop task
name = block_name
my @items := nqp::unpack( 'U2 (xxxC)[W]', $binary_string );
I, FROGGS, solemnly propose the implementation of pack()
and unpack
in nqp.
For one, these are useful for Perl 5 and Perl 6, and the other reason is that they should be pretty fast.
If a backend then can even provide a faster implementation (e.g. in C), then it would be easy to #ifdef
it in.
The signatures I propose are: