[svn:parrot] r48984 - in branches/gc_massacre: . compilers/imcc compilers/opsc/src/Ops compilers/pct/src/PAST compilers/pct/src/PCT compilers/pct/src/POST config/auto config/gen/config_h config/gen/makefiles config/inter docs docs/book/pct docs/pmc docs/project editor examples/benchmarks examples/compilers examples/config/file examples/namespace ext/nqp-rx/src/stage0 include/parrot include/parrot/oplib lib/Parrot lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf lib/Parrot/Configure/Step lib/Parrot/Pmc2c runtime/parrot/include runtime/parrot/library runtime/parrot/library/Archive runtime/parrot/library/Test runtime/parrot/library/Test/Builder src src/call src/dynoplibs src/dynpmc src/gc src/interp src/io src/nci src/ops src/packfile src/pmc src/runcore src/string src/string/charset src/string/encoding t/compilers/pct t/dynpmc t/oo t/op t/pmc t/steps/auto tools/build tools/dev
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Sep 13 21:23:32 UTC 2010
Author: bacek
Date: Mon Sep 13 21:23:26 2010
New Revision: 48984
URL: https://trac.parrot.org/parrot/changeset/48984
Log:
Merge branch 'master' into gc_massacre
Conflicts:
src/gc/system.c
src/string/encoding/fixed_8.c
Added:
branches/gc_massacre/examples/benchmarks/boolean.pir
branches/gc_massacre/src/string/encoding/ascii.c
branches/gc_massacre/src/string/encoding/ascii.h
branches/gc_massacre/src/string/encoding/binary.c
branches/gc_massacre/src/string/encoding/binary.h
- copied, changed from r48799, branches/gc_massacre/src/string/charset/binary.h
branches/gc_massacre/src/string/encoding/latin1.c
branches/gc_massacre/src/string/encoding/latin1.h
branches/gc_massacre/src/string/encoding/shared.c
- copied, changed from r48799, branches/gc_massacre/src/string/charset/unicode.c
branches/gc_massacre/src/string/encoding/shared.h
branches/gc_massacre/src/string/encoding/tables.c
- copied, changed from r48799, branches/gc_massacre/src/string/charset/tables.c
branches/gc_massacre/src/string/encoding/tables.h
- copied, changed from r48799, branches/gc_massacre/src/string/charset/tables.h
Deleted:
branches/gc_massacre/config/inter/charset.pm
branches/gc_massacre/config/inter/encoding.pm
branches/gc_massacre/include/parrot/charset.h
branches/gc_massacre/src/string/charset.c
branches/gc_massacre/src/string/charset/ascii.c
branches/gc_massacre/src/string/charset/ascii.h
branches/gc_massacre/src/string/charset/binary.c
branches/gc_massacre/src/string/charset/binary.h
branches/gc_massacre/src/string/charset/iso-8859-1.c
branches/gc_massacre/src/string/charset/iso-8859-1.h
branches/gc_massacre/src/string/charset/tables.c
branches/gc_massacre/src/string/charset/tables.h
branches/gc_massacre/src/string/charset/unicode.c
branches/gc_massacre/src/string/charset/unicode.h
branches/gc_massacre/src/string/encoding/fixed_8.c
branches/gc_massacre/src/string/encoding/fixed_8.h
Modified:
branches/gc_massacre/CREDITS
branches/gc_massacre/ChangeLog
branches/gc_massacre/Configure.pl
branches/gc_massacre/DEPRECATED.pod
branches/gc_massacre/MANIFEST
branches/gc_massacre/MANIFEST.generated
branches/gc_massacre/compilers/imcc/cfg.c
branches/gc_massacre/compilers/imcc/debug.c
branches/gc_massacre/compilers/imcc/imc.h
branches/gc_massacre/compilers/imcc/imcc.y
branches/gc_massacre/compilers/imcc/imcparser.c
branches/gc_massacre/compilers/imcc/imcparser.h
branches/gc_massacre/compilers/imcc/instructions.c
branches/gc_massacre/compilers/imcc/instructions.h
branches/gc_massacre/compilers/imcc/optimizer.c
branches/gc_massacre/compilers/imcc/parser_util.c
branches/gc_massacre/compilers/imcc/pbc.c
branches/gc_massacre/compilers/imcc/pcc.c
branches/gc_massacre/compilers/imcc/reg_alloc.c
branches/gc_massacre/compilers/imcc/symreg.c
branches/gc_massacre/compilers/imcc/symreg.h
branches/gc_massacre/compilers/opsc/src/Ops/Emitter.pm
branches/gc_massacre/compilers/pct/src/PAST/Compiler.pir
branches/gc_massacre/compilers/pct/src/PCT/HLLCompiler.pir
branches/gc_massacre/compilers/pct/src/POST/Compiler.pir
branches/gc_massacre/config/auto/gcc.pm
branches/gc_massacre/config/auto/msvc.pm
branches/gc_massacre/config/auto/pcre.pm
branches/gc_massacre/config/auto/readline.pm
branches/gc_massacre/config/gen/config_h/config_h.in
branches/gc_massacre/config/gen/makefiles/root.in
branches/gc_massacre/docs/book/pct/ch04_pge.pod
branches/gc_massacre/docs/embed.pod
branches/gc_massacre/docs/pmc/subs.pod
branches/gc_massacre/docs/project/release_manager_guide.pod
branches/gc_massacre/editor/pir-mode.el
branches/gc_massacre/examples/compilers/japhc.c
branches/gc_massacre/examples/config/file/configcompiler
branches/gc_massacre/examples/config/file/configwithfatalstep
branches/gc_massacre/examples/namespace/namespace_dump.pir
branches/gc_massacre/ext/nqp-rx/src/stage0/HLL-s0.pir
branches/gc_massacre/ext/nqp-rx/src/stage0/NQP-s0.pir
branches/gc_massacre/ext/nqp-rx/src/stage0/P6Regex-s0.pir
branches/gc_massacre/ext/nqp-rx/src/stage0/Regex-s0.pir
branches/gc_massacre/include/parrot/call.h
branches/gc_massacre/include/parrot/encoding.h
branches/gc_massacre/include/parrot/hash.h
branches/gc_massacre/include/parrot/interpreter.h
branches/gc_massacre/include/parrot/library.h
branches/gc_massacre/include/parrot/misc.h
branches/gc_massacre/include/parrot/op.h
branches/gc_massacre/include/parrot/oplib.h
branches/gc_massacre/include/parrot/oplib/core_ops.h
branches/gc_massacre/include/parrot/packfile.h
branches/gc_massacre/include/parrot/parrot.h
branches/gc_massacre/include/parrot/pobj.h
branches/gc_massacre/include/parrot/runcore_api.h
branches/gc_massacre/include/parrot/string.h
branches/gc_massacre/include/parrot/string_funcs.h
branches/gc_massacre/include/parrot/sub.h
branches/gc_massacre/lib/Parrot/Configure/Options/Conf.pm
branches/gc_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm
branches/gc_massacre/lib/Parrot/Configure/Step/List.pm
branches/gc_massacre/lib/Parrot/Headerizer.pm
branches/gc_massacre/lib/Parrot/Manifest.pm
branches/gc_massacre/lib/Parrot/Pmc2c/PMC.pm
branches/gc_massacre/lib/Parrot/Pmc2c/PMCEmitter.pm
branches/gc_massacre/lib/Parrot/Test.pm
branches/gc_massacre/runtime/parrot/include/test_more.pir
branches/gc_massacre/runtime/parrot/library/Archive/Zip.pir
branches/gc_massacre/runtime/parrot/library/P6object.pir
branches/gc_massacre/runtime/parrot/library/Test/Builder.pir
branches/gc_massacre/runtime/parrot/library/Test/Builder/TestPlan.pir
branches/gc_massacre/runtime/parrot/library/Test/More.pir
branches/gc_massacre/runtime/parrot/library/distutils.pir
branches/gc_massacre/src/call/pcc.c
branches/gc_massacre/src/datatypes.c
branches/gc_massacre/src/debug.c
branches/gc_massacre/src/dynext.c
branches/gc_massacre/src/dynoplibs/sys.ops
branches/gc_massacre/src/dynpmc/Defines.in
branches/gc_massacre/src/dynpmc/gziphandle.pmc
branches/gc_massacre/src/embed.c
branches/gc_massacre/src/exceptions.c
branches/gc_massacre/src/gc/mark_sweep.c
branches/gc_massacre/src/gc/system.c
branches/gc_massacre/src/global_setup.c
branches/gc_massacre/src/hash.c
branches/gc_massacre/src/hll.c
branches/gc_massacre/src/interp/inter_create.c
branches/gc_massacre/src/interp/inter_misc.c
branches/gc_massacre/src/io/api.c
branches/gc_massacre/src/io/buffer.c
branches/gc_massacre/src/io/filehandle.c
branches/gc_massacre/src/io/socket_unix.c
branches/gc_massacre/src/io/socket_win32.c
branches/gc_massacre/src/io/utf8.c
branches/gc_massacre/src/library.c
branches/gc_massacre/src/misc.c
branches/gc_massacre/src/namespace.c
branches/gc_massacre/src/nci/core_thunks.c
branches/gc_massacre/src/nci/extra_thunks.c
branches/gc_massacre/src/oo.c
branches/gc_massacre/src/ops/core_ops.c
branches/gc_massacre/src/ops/experimental.ops
branches/gc_massacre/src/ops/object.ops
branches/gc_massacre/src/ops/string.ops
branches/gc_massacre/src/ops/sys.ops
branches/gc_massacre/src/packdump.c
branches/gc_massacre/src/packfile.c
branches/gc_massacre/src/packfile/pf_items.c
branches/gc_massacre/src/packout.c
branches/gc_massacre/src/parrot_debugger.c
branches/gc_massacre/src/pbc_dump.c
branches/gc_massacre/src/pbc_merge.c
branches/gc_massacre/src/pmc/addrregistry.pmc
branches/gc_massacre/src/pmc/boolean.pmc
branches/gc_massacre/src/pmc/bytebuffer.pmc
branches/gc_massacre/src/pmc/callcontext.pmc
branches/gc_massacre/src/pmc/class.pmc
branches/gc_massacre/src/pmc/codestring.pmc
branches/gc_massacre/src/pmc/complex.pmc
branches/gc_massacre/src/pmc/continuation.pmc
branches/gc_massacre/src/pmc/default.pmc
branches/gc_massacre/src/pmc/eval.pmc
branches/gc_massacre/src/pmc/filehandle.pmc
branches/gc_massacre/src/pmc/hash.pmc
branches/gc_massacre/src/pmc/nativepccmethod.pmc
branches/gc_massacre/src/pmc/nci.pmc
branches/gc_massacre/src/pmc/object.pmc
branches/gc_massacre/src/pmc/oplib.pmc
branches/gc_massacre/src/pmc/packfile.pmc
branches/gc_massacre/src/pmc/packfileannotations.pmc
branches/gc_massacre/src/pmc/packfilefixupentry.pmc
branches/gc_massacre/src/pmc/string.pmc
branches/gc_massacre/src/pmc/stringbuilder.pmc
branches/gc_massacre/src/pmc/stringhandle.pmc
branches/gc_massacre/src/pmc/stringiterator.pmc
branches/gc_massacre/src/pmc/sub.pmc
branches/gc_massacre/src/pmc/unmanagedstruct.pmc
branches/gc_massacre/src/pmc_freeze.c
branches/gc_massacre/src/runcore/main.c
branches/gc_massacre/src/spf_render.c
branches/gc_massacre/src/spf_vtable.c
branches/gc_massacre/src/string/api.c
branches/gc_massacre/src/string/encoding.c
branches/gc_massacre/src/string/encoding/ucs2.c
branches/gc_massacre/src/string/encoding/ucs2.h
branches/gc_massacre/src/string/encoding/ucs4.c
branches/gc_massacre/src/string/encoding/ucs4.h
branches/gc_massacre/src/string/encoding/utf16.c
branches/gc_massacre/src/string/encoding/utf16.h
branches/gc_massacre/src/string/encoding/utf8.c
branches/gc_massacre/src/string/encoding/utf8.h
branches/gc_massacre/src/string/primitives.c
branches/gc_massacre/src/sub.c
branches/gc_massacre/src/thread.c
branches/gc_massacre/t/compilers/pct/pct_hllcompiler.t
branches/gc_massacre/t/dynpmc/gziphandle.t
branches/gc_massacre/t/oo/objects.t
branches/gc_massacre/t/op/calling.t
branches/gc_massacre/t/op/exceptions.t
branches/gc_massacre/t/op/string_cs.t
branches/gc_massacre/t/pmc/bytebuffer.t
branches/gc_massacre/t/pmc/complex.t
branches/gc_massacre/t/pmc/exception-old.t
branches/gc_massacre/t/pmc/filehandle.t
branches/gc_massacre/t/pmc/hashiterator.t
branches/gc_massacre/t/pmc/hashiteratorkey.t
branches/gc_massacre/t/pmc/io.t
branches/gc_massacre/t/pmc/lexinfo.t
branches/gc_massacre/t/pmc/orderedhashiterator.t
branches/gc_massacre/t/pmc/packfile.t
branches/gc_massacre/t/pmc/parrotinterpreter.t
branches/gc_massacre/t/pmc/string.t
branches/gc_massacre/t/pmc/stringbuilder.t
branches/gc_massacre/t/pmc/stringhandle.t
branches/gc_massacre/t/steps/auto/readline-01.t
branches/gc_massacre/tools/build/parrot_config_c.pl
branches/gc_massacre/tools/dev/fetch_languages.pl
branches/gc_massacre/tools/dev/gen_charset_tables.pl
branches/gc_massacre/tools/dev/headerizer.pl
branches/gc_massacre/tools/dev/nci_thunk_gen.pir
branches/gc_massacre/tools/dev/pbc_to_exe.pir
Modified: branches/gc_massacre/CREDITS
==============================================================================
--- branches/gc_massacre/CREDITS Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/CREDITS Mon Sep 13 21:23:26 2010 (r48984)
@@ -644,7 +644,7 @@
N: Luben Karavelov
U: luben
-E: luben at unixsol.org
+E: karavelov at spnet.net
N: Luca Barbato
D: fix to make installable
Modified: branches/gc_massacre/ChangeLog
==============================================================================
--- branches/gc_massacre/ChangeLog Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/ChangeLog Mon Sep 13 21:23:26 2010 (r48984)
@@ -3865,9 +3865,9 @@
2002-01-04 16:09 dan
* classes/: genclass.pl, perlarray.pmc, perlint.pmc, perlnum.pmc,
- perlstring.pmc, perlundef.pmc: - genclass.pl attempts to put $Id$
+ perlstring.pmc, perlundef.pmc: - genclass.pl attempts to put the Id mark
into generated files
- but the $Id$ string gets mangled when it's committed.
+ but the Id mark string gets mangled when it's committed.
This patch fixes the existing .pmc files and fixes genclass.pl.
- Makes capitalization in .pmc header match actual filenames
Modified: branches/gc_massacre/Configure.pl
==============================================================================
--- branches/gc_massacre/Configure.pl Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/Configure.pl Mon Sep 13 21:23:26 2010 (r48984)
@@ -604,8 +604,6 @@
init::optimize
inter::shlibs
inter::libparrot
- inter::charset
- inter::encoding
inter::types
auto::ops
auto::alignptrs
Modified: branches/gc_massacre/DEPRECATED.pod
==============================================================================
--- branches/gc_massacre/DEPRECATED.pod Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/DEPRECATED.pod Mon Sep 13 21:23:26 2010 (r48984)
@@ -134,24 +134,33 @@
L<https://trac.parrot.org/parrot/ticket/1655>
-=item Method is_tty in PMCs derived from Handle [eligible in 2.7]
-
-Use isatty instead.
-
-L<https://trac.parrot.org/parrot/ticket/1689>
-
=item Method getpid on ParrotInterpreter [experimental]
Used to test the experimental function Parrot_getpid
L<https://trac.parrot.org/parrot/ticket/1564>
+=item Duplicated VTABLE functions [eligible in 2.10]
+
+In F<src/pmc/oplib.pmc>, C<INTVAL get_integer()> is declared twice.
+
+In F<src/pmc/resizablestringarray.pmc>, C<PMC *shift_pmc()> is declared twice.
+
+L<http://trac.parrot.org/parrot/ticket/1785>
+
=back
=head1 Opcodes
=over 4
+=item charset, charsetname, find_charset, trans_charset [eligible in 2.10]
+
+L<https://trac.parrot.org/parrot/ticket/1778>
+
+These opcodes will be removed. The corresponding encoding opcodes should be
+used instead.
+
=item open and close opcodes will be removed [eligible in 2.7]
L<https://trac.parrot.org/parrot/ticket/1697>
@@ -376,12 +385,6 @@
L<https://trac.parrot.org/parrot/ticket/1628>
-=item Parrot_get_runtime_prefix [eligible in 2.7]
-
-Use Parrot_get_runtime_path instead.
-
-L<https://trac.parrot.org/parrot/ticket/1191>
-
=item Parrot_getpid [experimental]
Get process id, experimental.
Modified: branches/gc_massacre/MANIFEST
==============================================================================
--- branches/gc_massacre/MANIFEST Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/MANIFEST Mon Sep 13 21:23:26 2010 (r48984)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Sep 5 23:53:29 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Sep 12 16:20:50 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -348,8 +348,6 @@
config/init/install.pm []
config/init/manifest.pm []
config/init/optimize.pm []
-config/inter/charset.pm []
-config/inter/encoding.pm []
config/inter/lex.pm []
config/inter/libparrot.pm []
config/inter/make.pm []
@@ -513,6 +511,7 @@
examples/benchmarks/arriter.rb [examples]
examples/benchmarks/arriter_o1.pir [examples]
examples/benchmarks/bench_newp.pasm [examples]
+examples/benchmarks/boolean.pir [examples]
examples/benchmarks/fib.cs [examples]
examples/benchmarks/fib.pir [examples]
examples/benchmarks/fib.pl [examples]
@@ -948,7 +947,6 @@
include/parrot/caches.h [main]include
include/parrot/call.h [main]include
include/parrot/cclass.h [main]include
-include/parrot/charset.h [main]include
include/parrot/compiler.h [main]include
include/parrot/context.h [main]include
include/parrot/core_types.h [main]include
@@ -1453,20 +1451,17 @@
src/spf_render.c []
src/spf_vtable.c []
src/string/api.c []
-src/string/charset.c []
-src/string/charset/ascii.c []
-src/string/charset/ascii.h []
-src/string/charset/binary.c []
-src/string/charset/binary.h []
-src/string/charset/iso-8859-1.c []
-src/string/charset/iso-8859-1.h []
-src/string/charset/tables.c []
-src/string/charset/tables.h []
-src/string/charset/unicode.c []
-src/string/charset/unicode.h []
src/string/encoding.c []
-src/string/encoding/fixed_8.c []
-src/string/encoding/fixed_8.h []
+src/string/encoding/ascii.c []
+src/string/encoding/ascii.h []
+src/string/encoding/binary.c []
+src/string/encoding/binary.h []
+src/string/encoding/latin1.c []
+src/string/encoding/latin1.h []
+src/string/encoding/shared.c []
+src/string/encoding/shared.h []
+src/string/encoding/tables.c []
+src/string/encoding/tables.h []
src/string/encoding/ucs2.c []
src/string/encoding/ucs2.h []
src/string/encoding/ucs4.c []
Modified: branches/gc_massacre/MANIFEST.generated
==============================================================================
--- branches/gc_massacre/MANIFEST.generated Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/MANIFEST.generated Mon Sep 13 21:23:26 2010 (r48984)
@@ -80,6 +80,7 @@
include/pmc/pmc_managedstruct.h [devel]include
include/pmc/pmc_multisub.h [devel]include
include/pmc/pmc_namespace.h [devel]include
+include/pmc/pmc_nativepccmethod.h [devel]include
include/pmc/pmc_nci.h [devel]include
include/pmc/pmc_null.h [devel]include
include/pmc/pmc_object.h [devel]include
@@ -374,6 +375,7 @@
src/pmc/managedstruct.dump [devel]src
src/pmc/multisub.dump [devel]src
src/pmc/namespace.dump [devel]src
+src/pmc/nativepccmethod.dump [devel]src
src/pmc/nci.dump [devel]src
src/pmc/null.dump [devel]src
src/pmc/object.dump [devel]src
Modified: branches/gc_massacre/compilers/imcc/cfg.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/cfg.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/cfg.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -29,6 +29,7 @@
#include <string.h>
#include "imc.h"
#include "optimizer.h"
+#include "parrot/oplib/core_ops.h"
/* HEADERIZER HFILE: compilers/imcc/cfg.h */
@@ -276,7 +277,7 @@
ins->index = ++i;
ins->bbindex = unit->n_basic_blocks - 1;
- if (ins->opnum == -1 && (ins->type & ITPCCSUB)) {
+ if (!ins->op && (ins->type & ITPCCSUB)) {
if (first) {
if (ins->type & ITLABEL) {
expand_pcc_sub_ret(interp, unit, ins);
@@ -347,9 +348,10 @@
{
ASSERT_ARGS(bb_check_set_addr)
const Instruction *ins;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
for (ins = unit->instructions; ins; ins = ins->next) {
- if ((ins->opnum == PARROT_OP_set_addr_p_ic)
+ if ((ins->op == &core_ops->op_info_table[PARROT_OP_set_addr_p_ic])
&& STREQ(label->name, ins->symregs[1]->name)) {
IMCC_debug(interp, DEBUG_CFG, "set_addr %s\n",
ins->symregs[1]->name);
Modified: branches/gc_massacre/compilers/imcc/debug.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/debug.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/debug.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2002-2009, Parrot Foundation.
+ * Copyright (C) 2002-2010, Parrot Foundation.
* $Id$
*/
@@ -200,10 +200,10 @@
if (bb) {
Parrot_io_fprintf(interp, Parrot_io_STDERR(interp),
- "%4i %4d %4d %4d\t%x\t%8x %4d %4d %4d %c ",
+ "%4i %4d %4d %4d\t%x\t%8x %4d %4d %4d ",
ins->index, ins->line, bb->index, bb->loop_depth,
- ins->flags, (ins->type & ~ITEXT), ins->opnum,
- ins->opsize, pc, ins->type & ITEXT ? 'X' : ' ');
+ ins->flags, ins->type, OP_INFO_OPNUM(ins->op),
+ ins->opsize, pc);
}
else {
fprintf(stderr, "\t");
Modified: branches/gc_massacre/compilers/imcc/imc.h
==============================================================================
--- branches/gc_massacre/compilers/imcc/imc.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/imc.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -196,8 +196,8 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*error_message);
-PARROT_WARN_UNUSED_RESULT
-int check_op(PARROT_INTERP,
+void check_op(PARROT_INTERP,
+ ARGOUT(op_info_t **op_info),
ARGOUT(char *fullname),
ARGIN(const char *name),
ARGIN(SymReg * const * r),
@@ -207,6 +207,8 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3)
__attribute__nonnull__(4)
+ __attribute__nonnull__(5)
+ FUNC_MODIFIES(*op_info)
FUNC_MODIFIES(*fullname);
PARROT_WARN_UNUSED_RESULT
@@ -316,27 +318,13 @@
void register_compilers(PARROT_INTERP)
__attribute__nonnull__(1);
-PARROT_WARN_UNUSED_RESULT
-int try_find_op(PARROT_INTERP,
- ARGMOD(IMC_Unit *unit),
- ARGIN(const char *name),
- ARGMOD(SymReg **r),
- int n,
- int keyvec,
- int emit)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- FUNC_MODIFIES(*unit)
- FUNC_MODIFIES(*r);
-
#define ASSERT_ARGS_imcc_compile_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(fullname) \
, PARROT_ASSERT_ARG(error_message))
#define ASSERT_ARGS_check_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(op_info) \
, PARROT_ASSERT_ARG(fullname) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(r))
@@ -386,11 +374,6 @@
, PARROT_ASSERT_ARG(args))
#define ASSERT_ARGS_register_compilers __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_try_find_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(name) \
- , PARROT_ASSERT_ARG(r))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: compilers/imcc/parser_util.c */
@@ -562,7 +545,6 @@
SymHash ghash;
jmp_buf jump_buf; /* The jump for error handling */
int IMCC_DEBUG;
- int allocated;
int cnr;
int debug;
int dont_optimize;
Modified: branches/gc_massacre/compilers/imcc/imcc.y
==============================================================================
--- branches/gc_massacre/compilers/imcc/imcc.y Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/imcc.y Mon Sep 13 21:23:26 2010 (r48984)
@@ -206,21 +206,6 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-static Instruction* mk_pmc_const(PARROT_INTERP,
- ARGMOD(IMC_Unit *unit),
- ARGIN(const char *type),
- ARGMOD(SymReg *left),
- ARGIN(const char *constant))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5)
- FUNC_MODIFIES(*unit)
- FUNC_MODIFIES(*left);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
static Instruction* mk_pmc_const_named(PARROT_INTERP,
ARGMOD(IMC_Unit *unit),
ARGIN(const char *name),
@@ -323,12 +308,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(fmt))
-#define ASSERT_ARGS_mk_pmc_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(type) \
- , PARROT_ASSERT_ARG(left) \
- , PARROT_ASSERT_ARG(constant))
#define ASSERT_ARGS_mk_pmc_const_named __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
@@ -422,70 +401,6 @@
/*
-=item C<static Instruction* mk_pmc_const(PARROT_INTERP, IMC_Unit *unit, const
-char *type, SymReg *left, const char *constant)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static Instruction*
-mk_pmc_const(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *type),
- ARGMOD(SymReg *left), ARGIN(const char *constant))
-{
- ASSERT_ARGS(mk_pmc_const)
- const int type_enum = atoi(type);
- const int ascii = (*constant == '\'' || *constant == '"');
- SymReg *rhs;
- SymReg *r[3];
- char *name;
-
- if (left->type == VTADDRESS) { /* IDENTIFIER */
- if (IMCC_INFO(interp)->state->pasm_file) {
- IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- "Ident as PMC constant",
- " %s\n", left->name);
- }
- left->type = VTIDENTIFIER;
- left->set = 'P';
- }
- r[0] = left;
- if (ascii) {
- /* strip delimiters */
- name = mem_sys_strdup(constant + 1);
- name[strlen(name) - 1] = 0;
- }
- else {
- name = mem_sys_strdup(constant);
- }
-
- switch (type_enum) {
- case enum_class_Sub:
- case enum_class_Coroutine:
- rhs = mk_const(interp, name, 'p');
-
- if (!ascii)
- rhs->type |= VT_ENCODED;
-
- rhs->usage |= U_FIXUP | U_SUBID_LOOKUP;
- break;
- default:
- rhs = mk_const(interp, name, 'P');
- break;
- }
-
- r[1] = rhs;
- rhs->pmc_type = type_enum;
-
- mem_sys_free(name);
-
- return INS(interp, unit, "set_p_pc", "", r, 2, 0, 1);
-}
-
-/*
-
=item C<static Instruction* mk_pmc_const_named(PARROT_INTERP, IMC_Unit *unit,
const char *name, SymReg *left, const char *constant)>
@@ -1251,14 +1166,7 @@
;
pmc_const:
- CONST { IMCC_INFO(interp)->is_def = 1; } INTC var_or_i '=' any_string
- {
- $$ = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, $3, $4, $6);
- mem_sys_free($6);
- IMCC_INFO(interp)->is_def = 0;
- }
-
- | CONST { IMCC_INFO(interp)->is_def = 1; } STRINGC var_or_i '=' any_string
+ CONST { IMCC_INFO(interp)->is_def = 1; } STRINGC var_or_i '=' any_string
{
$$ = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, $3, $4, $6);
mem_sys_free($3);
@@ -2269,9 +2177,8 @@
| ADV_NAMED { $$ = VT_NAMED; }
| ADV_CALL_SIG { $$ = VT_CALL_SIG; }
- /* don't free $3 here; adv_named_set uses the pointer directly */
- | ADV_NAMED '(' USTRINGC ')' { adv_named_set_u(interp, $3); $$ = 0; }
- | ADV_NAMED '(' STRINGC ')' { adv_named_set(interp, $3); $$ = 0; }
+ | ADV_NAMED '(' USTRINGC ')' { adv_named_set_u(interp, $3); mem_sys_free($3); $$ = 0; }
+ | ADV_NAMED '(' STRINGC ')' { adv_named_set(interp, $3); mem_sys_free($3); $$ = 0; }
;
result:
Modified: branches/gc_massacre/compilers/imcc/imcparser.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/imcparser.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/imcparser.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -9,26 +9,27 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -39,7 +40,7 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
@@ -57,7 +58,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.1"
+#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -65,20 +66,259 @@
/* Pure parsers. */
#define YYPURE 1
-/* Push parsers. */
-#define YYPUSH 0
-
-/* Pull parsers. */
-#define YYPULL 1
-
/* Using locations. */
#define YYLSP_NEEDED 0
-/* Copy the first part of user declarations. */
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ LOW_PREC = 258,
+ PARAM = 259,
+ SOL = 260,
+ HLL = 261,
+ TK_LINE = 262,
+ TK_FILE = 263,
+ GOTO = 264,
+ ARG = 265,
+ IF = 266,
+ UNLESS = 267,
+ PNULL = 268,
+ SET_RETURN = 269,
+ SET_YIELD = 270,
+ ADV_FLAT = 271,
+ ADV_SLURPY = 272,
+ ADV_OPTIONAL = 273,
+ ADV_OPT_FLAG = 274,
+ ADV_NAMED = 275,
+ ADV_ARROW = 276,
+ ADV_INVOCANT = 277,
+ ADV_CALL_SIG = 278,
+ NAMESPACE = 279,
+ DOT_METHOD = 280,
+ SUB = 281,
+ SYM = 282,
+ LOCAL = 283,
+ LEXICAL = 284,
+ CONST = 285,
+ ANNOTATE = 286,
+ GLOBAL_CONST = 287,
+ PLUS_ASSIGN = 288,
+ MINUS_ASSIGN = 289,
+ MUL_ASSIGN = 290,
+ DIV_ASSIGN = 291,
+ CONCAT_ASSIGN = 292,
+ BAND_ASSIGN = 293,
+ BOR_ASSIGN = 294,
+ BXOR_ASSIGN = 295,
+ FDIV = 296,
+ FDIV_ASSIGN = 297,
+ MOD_ASSIGN = 298,
+ SHR_ASSIGN = 299,
+ SHL_ASSIGN = 300,
+ SHR_U_ASSIGN = 301,
+ SHIFT_LEFT = 302,
+ SHIFT_RIGHT = 303,
+ INTV = 304,
+ FLOATV = 305,
+ STRINGV = 306,
+ PMCV = 307,
+ LOG_XOR = 308,
+ RELOP_EQ = 309,
+ RELOP_NE = 310,
+ RELOP_GT = 311,
+ RELOP_GTE = 312,
+ RELOP_LT = 313,
+ RELOP_LTE = 314,
+ RESULT = 315,
+ RETURN = 316,
+ TAILCALL = 317,
+ YIELDT = 318,
+ GET_RESULTS = 319,
+ POW = 320,
+ SHIFT_RIGHT_U = 321,
+ LOG_AND = 322,
+ LOG_OR = 323,
+ COMMA = 324,
+ ESUB = 325,
+ DOTDOT = 326,
+ PCC_BEGIN = 327,
+ PCC_END = 328,
+ PCC_CALL = 329,
+ PCC_SUB = 330,
+ PCC_BEGIN_RETURN = 331,
+ PCC_END_RETURN = 332,
+ PCC_BEGIN_YIELD = 333,
+ PCC_END_YIELD = 334,
+ NCI_CALL = 335,
+ METH_CALL = 336,
+ INVOCANT = 337,
+ MAIN = 338,
+ LOAD = 339,
+ INIT = 340,
+ IMMEDIATE = 341,
+ POSTCOMP = 342,
+ METHOD = 343,
+ ANON = 344,
+ OUTER = 345,
+ NEED_LEX = 346,
+ MULTI = 347,
+ VTABLE_METHOD = 348,
+ LOADLIB = 349,
+ SUB_INSTANCE_OF = 350,
+ SUBID = 351,
+ NS_ENTRY = 352,
+ UNIQUE_REG = 353,
+ LABEL = 354,
+ EMIT = 355,
+ EOM = 356,
+ IREG = 357,
+ NREG = 358,
+ SREG = 359,
+ PREG = 360,
+ IDENTIFIER = 361,
+ REG = 362,
+ MACRO = 363,
+ ENDM = 364,
+ STRINGC = 365,
+ INTC = 366,
+ FLOATC = 367,
+ USTRINGC = 368,
+ PARROT_OP = 369,
+ VAR = 370,
+ LINECOMMENT = 371,
+ FILECOMMENT = 372,
+ DOT = 373,
+ CONCAT = 374
+ };
+#endif
+/* Tokens. */
+#define LOW_PREC 258
+#define PARAM 259
+#define SOL 260
+#define HLL 261
+#define TK_LINE 262
+#define TK_FILE 263
+#define GOTO 264
+#define ARG 265
+#define IF 266
+#define UNLESS 267
+#define PNULL 268
+#define SET_RETURN 269
+#define SET_YIELD 270
+#define ADV_FLAT 271
+#define ADV_SLURPY 272
+#define ADV_OPTIONAL 273
+#define ADV_OPT_FLAG 274
+#define ADV_NAMED 275
+#define ADV_ARROW 276
+#define ADV_INVOCANT 277
+#define ADV_CALL_SIG 278
+#define NAMESPACE 279
+#define DOT_METHOD 280
+#define SUB 281
+#define SYM 282
+#define LOCAL 283
+#define LEXICAL 284
+#define CONST 285
+#define ANNOTATE 286
+#define GLOBAL_CONST 287
+#define PLUS_ASSIGN 288
+#define MINUS_ASSIGN 289
+#define MUL_ASSIGN 290
+#define DIV_ASSIGN 291
+#define CONCAT_ASSIGN 292
+#define BAND_ASSIGN 293
+#define BOR_ASSIGN 294
+#define BXOR_ASSIGN 295
+#define FDIV 296
+#define FDIV_ASSIGN 297
+#define MOD_ASSIGN 298
+#define SHR_ASSIGN 299
+#define SHL_ASSIGN 300
+#define SHR_U_ASSIGN 301
+#define SHIFT_LEFT 302
+#define SHIFT_RIGHT 303
+#define INTV 304
+#define FLOATV 305
+#define STRINGV 306
+#define PMCV 307
+#define LOG_XOR 308
+#define RELOP_EQ 309
+#define RELOP_NE 310
+#define RELOP_GT 311
+#define RELOP_GTE 312
+#define RELOP_LT 313
+#define RELOP_LTE 314
+#define RESULT 315
+#define RETURN 316
+#define TAILCALL 317
+#define YIELDT 318
+#define GET_RESULTS 319
+#define POW 320
+#define SHIFT_RIGHT_U 321
+#define LOG_AND 322
+#define LOG_OR 323
+#define COMMA 324
+#define ESUB 325
+#define DOTDOT 326
+#define PCC_BEGIN 327
+#define PCC_END 328
+#define PCC_CALL 329
+#define PCC_SUB 330
+#define PCC_BEGIN_RETURN 331
+#define PCC_END_RETURN 332
+#define PCC_BEGIN_YIELD 333
+#define PCC_END_YIELD 334
+#define NCI_CALL 335
+#define METH_CALL 336
+#define INVOCANT 337
+#define MAIN 338
+#define LOAD 339
+#define INIT 340
+#define IMMEDIATE 341
+#define POSTCOMP 342
+#define METHOD 343
+#define ANON 344
+#define OUTER 345
+#define NEED_LEX 346
+#define MULTI 347
+#define VTABLE_METHOD 348
+#define LOADLIB 349
+#define SUB_INSTANCE_OF 350
+#define SUBID 351
+#define NS_ENTRY 352
+#define UNIQUE_REG 353
+#define LABEL 354
+#define EMIT 355
+#define EOM 356
+#define IREG 357
+#define NREG 358
+#define SREG 359
+#define PREG 360
+#define IDENTIFIER 361
+#define REG 362
+#define MACRO 363
+#define ENDM 364
+#define STRINGC 365
+#define INTC 366
+#define FLOATC 367
+#define USTRINGC 368
+#define PARROT_OP 369
+#define VAR 370
+#define LINECOMMENT 371
+#define FILECOMMENT 372
+#define DOT 373
+#define CONCAT 374
-/* Line 189 of yacc.c */
+
+
+
+/* Copy the first part of user declarations. */
#line 1 "compilers/imcc/imcc.y"
/*
@@ -288,21 +528,6 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-static Instruction* mk_pmc_const(PARROT_INTERP,
- ARGMOD(IMC_Unit *unit),
- ARGIN(const char *type),
- ARGMOD(SymReg *left),
- ARGIN(const char *constant))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5)
- FUNC_MODIFIES(*unit)
- FUNC_MODIFIES(*left);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
static Instruction* mk_pmc_const_named(PARROT_INTERP,
ARGMOD(IMC_Unit *unit),
ARGIN(const char *name),
@@ -405,12 +630,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(fmt))
-#define ASSERT_ARGS_mk_pmc_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(type) \
- , PARROT_ASSERT_ARG(left) \
- , PARROT_ASSERT_ARG(constant))
#define ASSERT_ARGS_mk_pmc_const_named __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
@@ -504,70 +723,6 @@
/*
-=item C<static Instruction* mk_pmc_const(PARROT_INTERP, IMC_Unit *unit, const
-char *type, SymReg *left, const char *constant)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-static Instruction*
-mk_pmc_const(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *type),
- ARGMOD(SymReg *left), ARGIN(const char *constant))
-{
- ASSERT_ARGS(mk_pmc_const)
- const int type_enum = atoi(type);
- const int ascii = (*constant == '\'' || *constant == '"');
- SymReg *rhs;
- SymReg *r[3];
- char *name;
-
- if (left->type == VTADDRESS) { /* IDENTIFIER */
- if (IMCC_INFO(interp)->state->pasm_file) {
- IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- "Ident as PMC constant",
- " %s\n", left->name);
- }
- left->type = VTIDENTIFIER;
- left->set = 'P';
- }
- r[0] = left;
- if (ascii) {
- /* strip delimiters */
- name = mem_sys_strdup(constant + 1);
- name[strlen(name) - 1] = 0;
- }
- else {
- name = mem_sys_strdup(constant);
- }
-
- switch (type_enum) {
- case enum_class_Sub:
- case enum_class_Coroutine:
- rhs = mk_const(interp, name, 'p');
-
- if (!ascii)
- rhs->type |= VT_ENCODED;
-
- rhs->usage |= U_FIXUP | U_SUBID_LOOKUP;
- break;
- default:
- rhs = mk_const(interp, name, 'P');
- break;
- }
-
- r[1] = rhs;
- rhs->pmc_type = type_enum;
-
- mem_sys_free(name);
-
- return INS(interp, unit, "set_p_pc", "", r, 2, 0, 1);
-}
-
-/*
-
=item C<static Instruction* mk_pmc_const_named(PARROT_INTERP, IMC_Unit *unit,
const char *name, SymReg *left, const char *constant)>
@@ -1108,346 +1263,91 @@
{
ASSERT_ARGS(adv_named_set)
if (IMCC_INFO(interp)->adv_named_id)
- IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- "Named parameter with more than one name.\n");
-
- IMCC_INFO(interp)->adv_named_id = mk_const(interp, name, 'S');
-}
-
-static void
-adv_named_set_u(PARROT_INTERP, ARGIN(const char *name))
-{
- ASSERT_ARGS(adv_named_set_u)
- if (IMCC_INFO(interp)->adv_named_id)
- IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- "Named parameter with more than one name.\n");
-
- IMCC_INFO(interp)->adv_named_id = mk_const(interp, name, 'U');
-}
-
-/*
-
-=item C<static void do_loadlib(PARROT_INTERP, const char *lib)>
-
-=cut
-
-*/
-
-static void
-do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
-{
- ASSERT_ARGS(do_loadlib)
- STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
- PMC * const lib_pmc = Parrot_load_lib(interp, s, NULL);
- if (PMC_IS_NULL(lib_pmc) || !VTABLE_get_bool(interp, lib_pmc)) {
- IMCC_fataly(interp, EXCEPTION_LIBRARY_ERROR,
- "loadlib directive could not find library `%S'", s);
- }
- Parrot_register_HLL_lib(interp, s);
-}
-
-/* HEADERIZER STOP */
-
-
-
-/* Line 189 of yacc.c */
-#line 1144 "compilers/imcc/imcparser.c"
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- LOW_PREC = 258,
- PARAM = 259,
- SOL = 260,
- HLL = 261,
- TK_LINE = 262,
- TK_FILE = 263,
- GOTO = 264,
- ARG = 265,
- IF = 266,
- UNLESS = 267,
- PNULL = 268,
- SET_RETURN = 269,
- SET_YIELD = 270,
- ADV_FLAT = 271,
- ADV_SLURPY = 272,
- ADV_OPTIONAL = 273,
- ADV_OPT_FLAG = 274,
- ADV_NAMED = 275,
- ADV_ARROW = 276,
- ADV_INVOCANT = 277,
- ADV_CALL_SIG = 278,
- NAMESPACE = 279,
- DOT_METHOD = 280,
- SUB = 281,
- SYM = 282,
- LOCAL = 283,
- LEXICAL = 284,
- CONST = 285,
- ANNOTATE = 286,
- GLOBAL_CONST = 287,
- PLUS_ASSIGN = 288,
- MINUS_ASSIGN = 289,
- MUL_ASSIGN = 290,
- DIV_ASSIGN = 291,
- CONCAT_ASSIGN = 292,
- BAND_ASSIGN = 293,
- BOR_ASSIGN = 294,
- BXOR_ASSIGN = 295,
- FDIV = 296,
- FDIV_ASSIGN = 297,
- MOD_ASSIGN = 298,
- SHR_ASSIGN = 299,
- SHL_ASSIGN = 300,
- SHR_U_ASSIGN = 301,
- SHIFT_LEFT = 302,
- SHIFT_RIGHT = 303,
- INTV = 304,
- FLOATV = 305,
- STRINGV = 306,
- PMCV = 307,
- LOG_XOR = 308,
- RELOP_EQ = 309,
- RELOP_NE = 310,
- RELOP_GT = 311,
- RELOP_GTE = 312,
- RELOP_LT = 313,
- RELOP_LTE = 314,
- RESULT = 315,
- RETURN = 316,
- TAILCALL = 317,
- YIELDT = 318,
- GET_RESULTS = 319,
- POW = 320,
- SHIFT_RIGHT_U = 321,
- LOG_AND = 322,
- LOG_OR = 323,
- COMMA = 324,
- ESUB = 325,
- DOTDOT = 326,
- PCC_BEGIN = 327,
- PCC_END = 328,
- PCC_CALL = 329,
- PCC_SUB = 330,
- PCC_BEGIN_RETURN = 331,
- PCC_END_RETURN = 332,
- PCC_BEGIN_YIELD = 333,
- PCC_END_YIELD = 334,
- NCI_CALL = 335,
- METH_CALL = 336,
- INVOCANT = 337,
- MAIN = 338,
- LOAD = 339,
- INIT = 340,
- IMMEDIATE = 341,
- POSTCOMP = 342,
- METHOD = 343,
- ANON = 344,
- OUTER = 345,
- NEED_LEX = 346,
- MULTI = 347,
- VTABLE_METHOD = 348,
- LOADLIB = 349,
- SUB_INSTANCE_OF = 350,
- SUBID = 351,
- NS_ENTRY = 352,
- UNIQUE_REG = 353,
- LABEL = 354,
- EMIT = 355,
- EOM = 356,
- IREG = 357,
- NREG = 358,
- SREG = 359,
- PREG = 360,
- IDENTIFIER = 361,
- REG = 362,
- MACRO = 363,
- ENDM = 364,
- STRINGC = 365,
- INTC = 366,
- FLOATC = 367,
- USTRINGC = 368,
- PARROT_OP = 369,
- VAR = 370,
- LINECOMMENT = 371,
- FILECOMMENT = 372,
- DOT = 373,
- CONCAT = 374
- };
-#endif
-/* Tokens. */
-#define LOW_PREC 258
-#define PARAM 259
-#define SOL 260
-#define HLL 261
-#define TK_LINE 262
-#define TK_FILE 263
-#define GOTO 264
-#define ARG 265
-#define IF 266
-#define UNLESS 267
-#define PNULL 268
-#define SET_RETURN 269
-#define SET_YIELD 270
-#define ADV_FLAT 271
-#define ADV_SLURPY 272
-#define ADV_OPTIONAL 273
-#define ADV_OPT_FLAG 274
-#define ADV_NAMED 275
-#define ADV_ARROW 276
-#define ADV_INVOCANT 277
-#define ADV_CALL_SIG 278
-#define NAMESPACE 279
-#define DOT_METHOD 280
-#define SUB 281
-#define SYM 282
-#define LOCAL 283
-#define LEXICAL 284
-#define CONST 285
-#define ANNOTATE 286
-#define GLOBAL_CONST 287
-#define PLUS_ASSIGN 288
-#define MINUS_ASSIGN 289
-#define MUL_ASSIGN 290
-#define DIV_ASSIGN 291
-#define CONCAT_ASSIGN 292
-#define BAND_ASSIGN 293
-#define BOR_ASSIGN 294
-#define BXOR_ASSIGN 295
-#define FDIV 296
-#define FDIV_ASSIGN 297
-#define MOD_ASSIGN 298
-#define SHR_ASSIGN 299
-#define SHL_ASSIGN 300
-#define SHR_U_ASSIGN 301
-#define SHIFT_LEFT 302
-#define SHIFT_RIGHT 303
-#define INTV 304
-#define FLOATV 305
-#define STRINGV 306
-#define PMCV 307
-#define LOG_XOR 308
-#define RELOP_EQ 309
-#define RELOP_NE 310
-#define RELOP_GT 311
-#define RELOP_GTE 312
-#define RELOP_LT 313
-#define RELOP_LTE 314
-#define RESULT 315
-#define RETURN 316
-#define TAILCALL 317
-#define YIELDT 318
-#define GET_RESULTS 319
-#define POW 320
-#define SHIFT_RIGHT_U 321
-#define LOG_AND 322
-#define LOG_OR 323
-#define COMMA 324
-#define ESUB 325
-#define DOTDOT 326
-#define PCC_BEGIN 327
-#define PCC_END 328
-#define PCC_CALL 329
-#define PCC_SUB 330
-#define PCC_BEGIN_RETURN 331
-#define PCC_END_RETURN 332
-#define PCC_BEGIN_YIELD 333
-#define PCC_END_YIELD 334
-#define NCI_CALL 335
-#define METH_CALL 336
-#define INVOCANT 337
-#define MAIN 338
-#define LOAD 339
-#define INIT 340
-#define IMMEDIATE 341
-#define POSTCOMP 342
-#define METHOD 343
-#define ANON 344
-#define OUTER 345
-#define NEED_LEX 346
-#define MULTI 347
-#define VTABLE_METHOD 348
-#define LOADLIB 349
-#define SUB_INSTANCE_OF 350
-#define SUBID 351
-#define NS_ENTRY 352
-#define UNIQUE_REG 353
-#define LABEL 354
-#define EMIT 355
-#define EOM 356
-#define IREG 357
-#define NREG 358
-#define SREG 359
-#define PREG 360
-#define IDENTIFIER 361
-#define REG 362
-#define MACRO 363
-#define ENDM 364
-#define STRINGC 365
-#define INTC 366
-#define FLOATC 367
-#define USTRINGC 368
-#define PARROT_OP 369
-#define VAR 370
-#define LINECOMMENT 371
-#define FILECOMMENT 372
-#define DOT 373
-#define CONCAT 374
+ IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+ "Named parameter with more than one name.\n");
+ IMCC_INFO(interp)->adv_named_id = mk_const(interp, name, 'S');
+}
+static void
+adv_named_set_u(PARROT_INTERP, ARGIN(const char *name))
+{
+ ASSERT_ARGS(adv_named_set_u)
+ if (IMCC_INFO(interp)->adv_named_id)
+ IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+ "Named parameter with more than one name.\n");
+ IMCC_INFO(interp)->adv_named_id = mk_const(interp, name, 'U');
+}
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-typedef union YYSTYPE
+/*
+
+=item C<static void do_loadlib(PARROT_INTERP, const char *lib)>
+
+=cut
+
+*/
+
+static void
+do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
{
+ ASSERT_ARGS(do_loadlib)
+ STRING * const s = Parrot_str_unescape(interp, lib + 1, '"', NULL);
+ PMC * const lib_pmc = Parrot_load_lib(interp, s, NULL);
+ if (PMC_IS_NULL(lib_pmc) || !VTABLE_get_bool(interp, lib_pmc)) {
+ IMCC_fataly(interp, EXCEPTION_LIBRARY_ERROR,
+ "loadlib directive could not find library `%S'", s);
+ }
+ Parrot_register_HLL_lib(interp, s);
+}
+
+/* HEADERIZER STOP */
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
-/* Line 214 of yacc.c */
-#line 1071 "compilers/imcc/imcc.y"
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 986 "compilers/imcc/imcc.y"
+{
IdList * idlist;
int t;
char * s;
SymReg * sr;
Instruction *i;
-
-
-
-/* Line 214 of yacc.c */
-#line 1428 "compilers/imcc/imcparser.c"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 187 of yacc.c. */
+#line 1327 "compilers/imcc/imcparser.c"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
+
/* Copy the second part of user declarations. */
-/* Line 264 of yacc.c */
-#line 1440 "compilers/imcc/imcparser.c"
+/* Line 216 of yacc.c. */
+#line 1340 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1522,14 +1422,14 @@
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int yyi)
+YYID (int i)
#else
static int
-YYID (yyi)
- int yyi;
+YYID (i)
+ int i;
#endif
{
- return yyi;
+ return i;
}
#endif
@@ -1610,9 +1510,9 @@
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss_alloc;
- YYSTYPE yyvs_alloc;
-};
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -1646,12 +1546,12 @@
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
+# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
- Stack = &yyptr->Stack_alloc; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -1662,16 +1562,16 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 31
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 662
+#define YYLAST 664
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 136
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 129
+#define YYNNTS 128
/* YYNRULES -- Number of rules. */
-#define YYNRULES 342
+#define YYNRULES 340
/* YYNRULES -- Number of states. */
-#define YYNSTATES 545
+#define YYNSTATES 540
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
@@ -1730,181 +1630,180 @@
{
0, 0, 3, 5, 7, 10, 12, 14, 16, 18,
21, 23, 25, 27, 30, 34, 40, 44, 49, 52,
- 53, 60, 61, 68, 69, 76, 78, 80, 82, 85,
- 89, 92, 94, 96, 98, 100, 102, 103, 107, 108,
- 113, 116, 121, 122, 124, 125, 130, 131, 133, 137,
- 141, 144, 145, 148, 150, 154, 155, 156, 157, 168,
- 169, 172, 176, 177, 181, 185, 190, 195, 200, 202,
- 207, 209, 214, 216, 221, 226, 228, 233, 234, 238,
- 240, 242, 244, 246, 248, 250, 252, 256, 257, 259,
- 260, 270, 271, 274, 275, 279, 280, 282, 284, 287,
- 289, 291, 293, 295, 297, 299, 301, 303, 305, 307,
- 309, 311, 313, 315, 321, 325, 329, 333, 337, 343,
- 349, 350, 354, 357, 358, 362, 366, 367, 372, 373,
- 376, 378, 380, 382, 384, 389, 394, 396, 398, 399,
- 405, 407, 408, 414, 415, 418, 422, 423, 426, 430,
- 434, 438, 439, 445, 447, 449, 450, 452, 456, 460,
- 466, 468, 471, 472, 475, 478, 480, 482, 484, 486,
- 487, 489, 492, 494, 496, 500, 503, 505, 509, 512,
- 513, 515, 517, 519, 520, 525, 530, 535, 536, 543,
- 545, 546, 553, 556, 559, 562, 565, 567, 569, 571,
- 573, 574, 576, 578, 580, 582, 586, 591, 597, 604,
- 611, 615, 616, 626, 628, 630, 632, 636, 638, 640,
- 642, 644, 646, 648, 650, 652, 654, 656, 658, 660,
- 662, 664, 666, 668, 670, 672, 674, 676, 678, 680,
- 682, 684, 686, 688, 689, 695, 699, 701, 703, 705,
- 707, 709, 711, 713, 715, 717, 719, 721, 723, 725,
- 730, 732, 734, 736, 738, 742, 746, 750, 754, 755,
- 761, 762, 766, 768, 774, 778, 782, 785, 786, 789,
- 791, 793, 795, 800, 805, 808, 812, 818, 820, 824,
- 825, 827, 829, 836, 842, 847, 852, 859, 865, 867,
- 869, 871, 873, 875, 877, 879, 881, 883, 885, 886,
- 888, 892, 894, 896, 901, 905, 907, 909, 911, 913,
- 915, 917, 919, 921, 923, 925, 927, 928, 931, 932,
- 935, 937, 941, 943, 945, 947, 949, 951, 953, 955,
- 957, 959, 961
+ 53, 60, 61, 68, 70, 72, 74, 77, 81, 84,
+ 86, 88, 90, 92, 94, 95, 99, 100, 105, 108,
+ 113, 114, 116, 117, 122, 123, 125, 129, 133, 136,
+ 137, 140, 142, 146, 147, 148, 149, 160, 161, 164,
+ 168, 169, 173, 177, 182, 187, 192, 194, 199, 201,
+ 206, 208, 213, 218, 220, 225, 226, 230, 232, 234,
+ 236, 238, 240, 242, 244, 248, 249, 251, 252, 262,
+ 263, 266, 267, 271, 272, 274, 276, 279, 281, 283,
+ 285, 287, 289, 291, 293, 295, 297, 299, 301, 303,
+ 305, 307, 313, 317, 321, 325, 329, 335, 341, 342,
+ 346, 349, 350, 354, 358, 359, 364, 365, 368, 370,
+ 372, 374, 376, 381, 386, 388, 390, 391, 397, 399,
+ 400, 406, 407, 410, 414, 415, 418, 422, 426, 430,
+ 431, 437, 439, 441, 442, 444, 448, 452, 458, 460,
+ 463, 464, 467, 470, 472, 474, 476, 478, 479, 481,
+ 484, 486, 488, 492, 495, 497, 501, 504, 505, 507,
+ 509, 511, 512, 517, 522, 527, 528, 535, 537, 538,
+ 545, 548, 551, 554, 557, 559, 561, 563, 565, 566,
+ 568, 570, 572, 574, 578, 583, 589, 596, 603, 607,
+ 608, 618, 620, 622, 624, 628, 630, 632, 634, 636,
+ 638, 640, 642, 644, 646, 648, 650, 652, 654, 656,
+ 658, 660, 662, 664, 666, 668, 670, 672, 674, 676,
+ 678, 680, 681, 687, 691, 693, 695, 697, 699, 701,
+ 703, 705, 707, 709, 711, 713, 715, 717, 722, 724,
+ 726, 728, 730, 734, 738, 742, 746, 747, 753, 754,
+ 758, 760, 766, 770, 774, 777, 778, 781, 783, 785,
+ 787, 792, 797, 800, 804, 810, 812, 816, 817, 819,
+ 821, 828, 834, 839, 844, 851, 857, 859, 861, 863,
+ 865, 867, 869, 871, 873, 875, 877, 878, 880, 884,
+ 886, 888, 893, 897, 899, 901, 903, 905, 907, 909,
+ 911, 913, 915, 917, 919, 920, 923, 924, 927, 929,
+ 933, 935, 937, 939, 941, 943, 945, 947, 949, 951,
+ 953
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
137, 0, -1, 138, -1, 139, -1, 138, 139, -1,
- 159, -1, 144, -1, 164, -1, 156, -1, 109, 4,
+ 158, -1, 144, -1, 163, -1, 155, -1, 109, 4,
-1, 140, -1, 141, -1, 4, -1, 143, 4, -1,
95, 111, 4, -1, 8, 112, 70, 111, 4, -1,
- 9, 111, 4, -1, 32, 111, 70, 264, -1, 7,
- 111, -1, -1, 31, 145, 223, 107, 121, 264, -1,
- -1, 31, 147, 112, 254, 121, 149, -1, -1, 31,
- 148, 111, 254, 121, 149, -1, 111, -1, 114, -1,
- 151, -1, 150, 151, -1, 212, 152, 4, -1, 109,
- 4, -1, 118, -1, 117, -1, 159, -1, 146, -1,
- 140, -1, -1, 153, 115, 155, -1, -1, 76, 154,
- 186, 100, -1, 14, 255, -1, 30, 111, 70, 108,
- -1, -1, 248, -1, -1, 101, 157, 158, 102, -1,
- -1, 150, -1, 25, 160, 4, -1, 122, 161, 123,
- -1, 122, 123, -1, -1, 162, 163, -1, 263, -1,
- 163, 124, 263, -1, -1, -1, -1, 27, 165, 251,
- 166, 186, 4, 167, 168, 181, 71, -1, -1, 168,
- 4, -1, 168, 169, 4, -1, -1, 5, 170, 171,
- -1, 223, 107, 195, -1, 93, 125, 179, 126, -1,
- 91, 125, 111, 126, -1, 91, 125, 107, 126, -1,
- 94, -1, 94, 125, 111, 126, -1, 89, -1, 89,
- 125, 149, 126, -1, 98, -1, 98, 125, 149, 126,
- -1, 96, 125, 111, 126, -1, 97, -1, 97, 125,
- 149, 126, -1, -1, 179, 70, 180, -1, 180, -1,
- 50, -1, 51, -1, 53, -1, 52, -1, 107, -1,
- 111, -1, 122, 256, 123, -1, -1, 209, -1, -1,
- 73, 4, 183, 190, 185, 189, 184, 192, 74, -1,
- -1, 214, 4, -1, -1, 83, 255, 4, -1, -1,
- 187, -1, 188, -1, 187, 188, -1, 85, -1, 86,
- -1, 84, -1, 87, -1, 88, -1, 90, -1, 92,
- -1, 172, -1, 173, -1, 174, -1, 175, -1, 176,
- -1, 177, -1, 178, -1, 75, 255, 70, 255, 4,
- -1, 75, 255, 4, -1, 81, 255, 4, -1, 82,
- 247, 4, -1, 82, 111, 4, -1, 82, 247, 70,
- 255, 4, -1, 82, 111, 70, 255, 4, -1, -1,
- 190, 191, 4, -1, 11, 237, -1, -1, 192, 193,
- 4, -1, 61, 247, 195, -1, -1, 29, 194, 223,
- 217, -1, -1, 195, 196, -1, 18, -1, 19, -1,
- 20, -1, 21, -1, 21, 125, 111, 126, -1, 21,
- 125, 114, 126, -1, 99, -1, 24, -1, -1, 77,
- 4, 198, 201, 78, -1, 205, -1, -1, 79, 4,
- 200, 202, 80, -1, -1, 201, 4, -1, 201, 203,
- 4, -1, -1, 202, 4, -1, 202, 204, 4, -1,
- 15, 255, 238, -1, 16, 255, 238, -1, -1, 207,
- 125, 206, 208, 126, -1, 62, -1, 64, -1, -1,
- 237, -1, 111, 22, 255, -1, 208, 70, 237, -1,
- 208, 70, 111, 22, 255, -1, 211, -1, 209, 211,
- -1, -1, 210, 215, -1, 109, 4, -1, 118, -1,
- 117, -1, 141, -1, 142, -1, -1, 213, -1, 213,
- 214, -1, 214, -1, 100, -1, 212, 219, 4, -1,
- 1, 4, -1, 217, -1, 216, 70, 217, -1, 107,
- 218, -1, -1, 99, -1, 224, -1, 242, -1, -1,
- 29, 220, 223, 216, -1, 30, 111, 70, 247, -1,
- 30, 114, 70, 247, -1, -1, 31, 221, 223, 107,
- 121, 264, -1, 146, -1, -1, 33, 222, 223, 107,
- 121, 264, -1, 63, 234, -1, 10, 253, -1, 115,
- 248, -1, 14, 255, -1, 234, -1, 182, -1, 197,
- -1, 199, -1, -1, 50, -1, 51, -1, 52, -1,
- 53, -1, 247, 121, 255, -1, 247, 121, 226, 255,
- -1, 247, 121, 255, 227, 255, -1, 247, 121, 255,
- 122, 256, 123, -1, 247, 122, 256, 123, 121, 255,
- -1, 247, 121, 234, -1, -1, 125, 225, 241, 126,
- 121, 233, 125, 236, 126, -1, 228, -1, 230, -1,
- 232, -1, 247, 121, 14, -1, 127, -1, 128, -1,
- 129, -1, 129, -1, 130, -1, 131, -1, 132, -1,
- 133, -1, 42, -1, 66, -1, 120, -1, 55, -1,
- 56, -1, 57, -1, 58, -1, 59, -1, 60, -1,
- 48, -1, 49, -1, 67, -1, 68, -1, 69, -1,
- 54, -1, 134, -1, 135, -1, 128, -1, -1, 65,
- 229, 125, 241, 126, -1, 247, 231, 255, -1, 34,
- -1, 35, -1, 36, -1, 37, -1, 44, -1, 43,
- -1, 38, -1, 39, -1, 40, -1, 41, -1, 45,
- -1, 46, -1, 47, -1, 247, 121, 115, 155, -1,
- 107, -1, 111, -1, 114, -1, 247, -1, 247, 119,
- 252, -1, 247, 119, 114, -1, 247, 119, 111, -1,
- 247, 119, 247, -1, -1, 233, 235, 125, 236, 126,
- -1, -1, 236, 70, 237, -1, 237, -1, 236, 70,
- 111, 22, 255, -1, 255, 22, 255, -1, 111, 22,
- 255, -1, 255, 238, -1, -1, 238, 239, -1, 17,
- -1, 21, -1, 24, -1, 21, 125, 114, 126, -1,
- 21, 125, 111, 126, -1, 247, 195, -1, 241, 70,
- 240, -1, 241, 70, 111, 22, 247, -1, 240, -1,
- 111, 22, 247, -1, -1, 244, -1, 243, -1, 13,
- 255, 246, 255, 10, 253, -1, 13, 14, 255, 10,
- 253, -1, 13, 255, 245, 253, -1, 12, 255, 245,
- 253, -1, 12, 255, 246, 255, 10, 253, -1, 12,
- 14, 255, 10, 253, -1, 70, -1, 10, -1, 55,
- -1, 56, -1, 57, -1, 58, -1, 59, -1, 60,
- -1, 116, -1, 262, -1, -1, 249, -1, 249, 70,
- 250, -1, 250, -1, 254, -1, 247, 122, 256, 123,
- -1, 122, 258, 123, -1, 252, -1, 111, -1, 114,
- -1, 107, -1, 115, -1, 107, -1, 115, -1, 253,
- -1, 255, -1, 247, -1, 264, -1, -1, 257, 260,
- -1, -1, 259, 260, -1, 261, -1, 260, 124, 261,
- -1, 255, -1, 103, -1, 104, -1, 105, -1, 106,
- -1, 108, -1, 111, -1, 114, -1, 112, -1, 113,
- -1, 263, -1
+ 9, 111, 4, -1, 32, 111, 70, 263, -1, 7,
+ 111, -1, -1, 31, 145, 222, 107, 121, 263, -1,
+ -1, 31, 147, 111, 253, 121, 148, -1, 111, -1,
+ 114, -1, 150, -1, 149, 150, -1, 211, 151, 4,
+ -1, 109, 4, -1, 118, -1, 117, -1, 158, -1,
+ 146, -1, 140, -1, -1, 152, 115, 154, -1, -1,
+ 76, 153, 185, 100, -1, 14, 254, -1, 30, 111,
+ 70, 108, -1, -1, 247, -1, -1, 101, 156, 157,
+ 102, -1, -1, 149, -1, 25, 159, 4, -1, 122,
+ 160, 123, -1, 122, 123, -1, -1, 161, 162, -1,
+ 262, -1, 162, 124, 262, -1, -1, -1, -1, 27,
+ 164, 250, 165, 185, 4, 166, 167, 180, 71, -1,
+ -1, 167, 4, -1, 167, 168, 4, -1, -1, 5,
+ 169, 170, -1, 222, 107, 194, -1, 93, 125, 178,
+ 126, -1, 91, 125, 111, 126, -1, 91, 125, 107,
+ 126, -1, 94, -1, 94, 125, 111, 126, -1, 89,
+ -1, 89, 125, 148, 126, -1, 98, -1, 98, 125,
+ 148, 126, -1, 96, 125, 111, 126, -1, 97, -1,
+ 97, 125, 148, 126, -1, -1, 178, 70, 179, -1,
+ 179, -1, 50, -1, 51, -1, 53, -1, 52, -1,
+ 107, -1, 111, -1, 122, 255, 123, -1, -1, 208,
+ -1, -1, 73, 4, 182, 189, 184, 188, 183, 191,
+ 74, -1, -1, 213, 4, -1, -1, 83, 254, 4,
+ -1, -1, 186, -1, 187, -1, 186, 187, -1, 85,
+ -1, 86, -1, 84, -1, 87, -1, 88, -1, 90,
+ -1, 92, -1, 171, -1, 172, -1, 173, -1, 174,
+ -1, 175, -1, 176, -1, 177, -1, 75, 254, 70,
+ 254, 4, -1, 75, 254, 4, -1, 81, 254, 4,
+ -1, 82, 246, 4, -1, 82, 111, 4, -1, 82,
+ 246, 70, 254, 4, -1, 82, 111, 70, 254, 4,
+ -1, -1, 189, 190, 4, -1, 11, 236, -1, -1,
+ 191, 192, 4, -1, 61, 246, 194, -1, -1, 29,
+ 193, 222, 216, -1, -1, 194, 195, -1, 18, -1,
+ 19, -1, 20, -1, 21, -1, 21, 125, 111, 126,
+ -1, 21, 125, 114, 126, -1, 99, -1, 24, -1,
+ -1, 77, 4, 197, 200, 78, -1, 204, -1, -1,
+ 79, 4, 199, 201, 80, -1, -1, 200, 4, -1,
+ 200, 202, 4, -1, -1, 201, 4, -1, 201, 203,
+ 4, -1, 15, 254, 237, -1, 16, 254, 237, -1,
+ -1, 206, 125, 205, 207, 126, -1, 62, -1, 64,
+ -1, -1, 236, -1, 111, 22, 254, -1, 207, 70,
+ 236, -1, 207, 70, 111, 22, 254, -1, 210, -1,
+ 208, 210, -1, -1, 209, 214, -1, 109, 4, -1,
+ 118, -1, 117, -1, 141, -1, 142, -1, -1, 212,
+ -1, 212, 213, -1, 213, -1, 100, -1, 211, 218,
+ 4, -1, 1, 4, -1, 216, -1, 215, 70, 216,
+ -1, 107, 217, -1, -1, 99, -1, 223, -1, 241,
+ -1, -1, 29, 219, 222, 215, -1, 30, 111, 70,
+ 246, -1, 30, 114, 70, 246, -1, -1, 31, 220,
+ 222, 107, 121, 263, -1, 146, -1, -1, 33, 221,
+ 222, 107, 121, 263, -1, 63, 233, -1, 10, 252,
+ -1, 115, 247, -1, 14, 254, -1, 233, -1, 181,
+ -1, 196, -1, 198, -1, -1, 50, -1, 51, -1,
+ 52, -1, 53, -1, 246, 121, 254, -1, 246, 121,
+ 225, 254, -1, 246, 121, 254, 226, 254, -1, 246,
+ 121, 254, 122, 255, 123, -1, 246, 122, 255, 123,
+ 121, 254, -1, 246, 121, 233, -1, -1, 125, 224,
+ 240, 126, 121, 232, 125, 235, 126, -1, 227, -1,
+ 229, -1, 231, -1, 246, 121, 14, -1, 127, -1,
+ 128, -1, 129, -1, 129, -1, 130, -1, 131, -1,
+ 132, -1, 133, -1, 42, -1, 66, -1, 120, -1,
+ 55, -1, 56, -1, 57, -1, 58, -1, 59, -1,
+ 60, -1, 48, -1, 49, -1, 67, -1, 68, -1,
+ 69, -1, 54, -1, 134, -1, 135, -1, 128, -1,
+ -1, 65, 228, 125, 240, 126, -1, 246, 230, 254,
+ -1, 34, -1, 35, -1, 36, -1, 37, -1, 44,
+ -1, 43, -1, 38, -1, 39, -1, 40, -1, 41,
+ -1, 45, -1, 46, -1, 47, -1, 246, 121, 115,
+ 154, -1, 107, -1, 111, -1, 114, -1, 246, -1,
+ 246, 119, 251, -1, 246, 119, 114, -1, 246, 119,
+ 111, -1, 246, 119, 246, -1, -1, 232, 234, 125,
+ 235, 126, -1, -1, 235, 70, 236, -1, 236, -1,
+ 235, 70, 111, 22, 254, -1, 254, 22, 254, -1,
+ 111, 22, 254, -1, 254, 237, -1, -1, 237, 238,
+ -1, 17, -1, 21, -1, 24, -1, 21, 125, 114,
+ 126, -1, 21, 125, 111, 126, -1, 246, 194, -1,
+ 240, 70, 239, -1, 240, 70, 111, 22, 246, -1,
+ 239, -1, 111, 22, 246, -1, -1, 243, -1, 242,
+ -1, 13, 254, 245, 254, 10, 252, -1, 13, 14,
+ 254, 10, 252, -1, 13, 254, 244, 252, -1, 12,
+ 254, 244, 252, -1, 12, 254, 245, 254, 10, 252,
+ -1, 12, 14, 254, 10, 252, -1, 70, -1, 10,
+ -1, 55, -1, 56, -1, 57, -1, 58, -1, 59,
+ -1, 60, -1, 116, -1, 261, -1, -1, 248, -1,
+ 248, 70, 249, -1, 249, -1, 253, -1, 246, 122,
+ 255, 123, -1, 122, 257, 123, -1, 251, -1, 111,
+ -1, 114, -1, 107, -1, 115, -1, 107, -1, 115,
+ -1, 252, -1, 254, -1, 246, -1, 263, -1, -1,
+ 256, 259, -1, -1, 258, 259, -1, 260, -1, 259,
+ 124, 260, -1, 254, -1, 103, -1, 104, -1, 105,
+ -1, 106, -1, 108, -1, 111, -1, 114, -1, 112,
+ -1, 113, -1, 262, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1166, 1166, 1170, 1171, 1175, 1176, 1177, 1183, 1189,
- 1190, 1191, 1192, 1196, 1197, 1206, 1212, 1220, 1232, 1245,
- 1245, 1254, 1254, 1261, 1261, 1270, 1271, 1275, 1276, 1280,
- 1281, 1282, 1283, 1284, 1285, 1286, 1289, 1289, 1298, 1297,
- 1310, 1314, 1327, 1331, 1335, 1335, 1347, 1349, 1353, 1368,
- 1369, 1373, 1373, 1385, 1386, 1395, 1399, 1403, 1394, 1415,
- 1416, 1417, 1430, 1430, 1434, 1459, 1463, 1469, 1478, 1484,
- 1493, 1499, 1508, 1514, 1523, 1531, 1536, 1547, 1550, 1555,
- 1563, 1564, 1565, 1566, 1567, 1578, 1589, 1592, 1594, 1599,
- 1598, 1629, 1630, 1634, 1635, 1639, 1640, 1644, 1645, 1649,
- 1650, 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1658, 1659,
- 1660, 1661, 1662, 1666, 1671, 1675, 1679, 1683, 1687, 1692,
- 1701, 1702, 1714, 1719, 1720, 1728, 1729, 1729, 1741, 1742,
- 1746, 1747, 1748, 1749, 1750, 1751, 1752, 1753, 1758, 1758,
- 1761, 1769, 1769, 1775, 1776, 1781, 1789, 1790, 1795, 1803,
- 1807, 1812, 1811, 1824, 1825, 1829, 1830, 1840, 1845, 1855,
- 1864, 1865, 1877, 1881, 1883, 1884, 1885, 1886, 1887, 1891,
- 1892, 1896, 1897, 1901, 1912, 1913, 1924, 1931, 1940, 1948,
- 1950, 1955, 1956, 1957, 1957, 1970, 1987, 2000, 2000, 2007,
- 2008, 2008, 2014, 2020, 2024, 2036, 2037, 2038, 2039, 2040,
- 2041, 2045, 2046, 2047, 2048, 2052, 2054, 2056, 2058, 2060,
- 2063, 2070, 2069, 2078, 2079, 2080, 2081, 2089, 2090, 2091,
- 2095, 2096, 2097, 2098, 2099, 2100, 2101, 2102, 2103, 2104,
- 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113, 2114,
- 2115, 2116, 2117, 2123, 2122, 2134, 2139, 2140, 2141, 2142,
- 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2156,
- 2167, 2168, 2169, 2170, 2176, 2190, 2196, 2202, 2208, 2207,
- 2216, 2217, 2227, 2237, 2244, 2249, 2259, 2263, 2264, 2268,
- 2269, 2270, 2273, 2274, 2278, 2282, 2292, 2298, 2308, 2313,
- 2317, 2318, 2322, 2326, 2330, 2337, 2341, 2345, 2352, 2353,
- 2357, 2358, 2359, 2360, 2361, 2362, 2366, 2367, 2371, 2372,
- 2376, 2377, 2381, 2382, 2389, 2396, 2397, 2398, 2402, 2403,
- 2407, 2408, 2412, 2413, 2417, 2418, 2422, 2422, 2434, 2434,
- 2446, 2447, 2455, 2462, 2463, 2464, 2465, 2466, 2470, 2471,
- 2475, 2476, 2477
+ 0, 1081, 1081, 1085, 1086, 1090, 1091, 1092, 1098, 1104,
+ 1105, 1106, 1107, 1111, 1112, 1121, 1127, 1135, 1147, 1160,
+ 1160, 1169, 1169, 1178, 1179, 1183, 1184, 1188, 1189, 1190,
+ 1191, 1192, 1193, 1194, 1197, 1197, 1206, 1205, 1218, 1222,
+ 1235, 1239, 1243, 1243, 1255, 1257, 1261, 1276, 1277, 1281,
+ 1281, 1293, 1294, 1303, 1307, 1311, 1302, 1323, 1324, 1325,
+ 1338, 1338, 1342, 1367, 1371, 1377, 1386, 1392, 1401, 1407,
+ 1416, 1422, 1431, 1439, 1444, 1455, 1458, 1463, 1471, 1472,
+ 1473, 1474, 1475, 1486, 1497, 1500, 1502, 1507, 1506, 1537,
+ 1538, 1542, 1543, 1547, 1548, 1552, 1553, 1557, 1558, 1559,
+ 1560, 1561, 1562, 1563, 1564, 1565, 1566, 1567, 1568, 1569,
+ 1570, 1574, 1579, 1583, 1587, 1591, 1595, 1600, 1609, 1610,
+ 1622, 1627, 1628, 1636, 1637, 1637, 1649, 1650, 1654, 1655,
+ 1656, 1657, 1658, 1659, 1660, 1661, 1666, 1666, 1669, 1677,
+ 1677, 1683, 1684, 1689, 1697, 1698, 1703, 1711, 1715, 1720,
+ 1719, 1732, 1733, 1737, 1738, 1748, 1753, 1763, 1772, 1773,
+ 1785, 1789, 1791, 1792, 1793, 1794, 1795, 1799, 1800, 1804,
+ 1805, 1809, 1820, 1821, 1832, 1839, 1848, 1856, 1858, 1863,
+ 1864, 1865, 1865, 1878, 1895, 1908, 1908, 1915, 1916, 1916,
+ 1922, 1928, 1932, 1944, 1945, 1946, 1947, 1948, 1949, 1953,
+ 1954, 1955, 1956, 1960, 1962, 1964, 1966, 1968, 1971, 1978,
+ 1977, 1986, 1987, 1988, 1989, 1997, 1998, 1999, 2003, 2004,
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
+ 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024,
+ 2025, 2031, 2030, 2042, 2047, 2048, 2049, 2050, 2051, 2052,
+ 2053, 2054, 2055, 2056, 2057, 2058, 2059, 2064, 2075, 2076,
+ 2077, 2078, 2084, 2098, 2104, 2110, 2116, 2115, 2124, 2125,
+ 2135, 2145, 2152, 2157, 2167, 2171, 2172, 2176, 2177, 2178,
+ 2180, 2181, 2185, 2189, 2199, 2205, 2215, 2220, 2224, 2225,
+ 2229, 2233, 2237, 2244, 2248, 2252, 2259, 2260, 2264, 2265,
+ 2266, 2267, 2268, 2269, 2273, 2274, 2278, 2279, 2283, 2284,
+ 2288, 2289, 2296, 2303, 2304, 2305, 2309, 2310, 2314, 2315,
+ 2319, 2320, 2324, 2325, 2329, 2329, 2341, 2341, 2353, 2354,
+ 2362, 2369, 2370, 2371, 2372, 2373, 2377, 2378, 2382, 2383,
+ 2384
};
#endif
@@ -1936,29 +1835,28 @@
"DOT", "CONCAT", "'='", "'['", "']'", "';'", "'('", "')'", "'!'", "'~'",
"'-'", "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "$accept", "program",
"compilation_units", "compilation_unit", "pragma", "location_directive",
- "annotate_directive", "hll_def", "constdef", "$@1", "pmc_const", "$@2",
- "$@3", "any_string", "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5",
- "pasm_args", "emit", "$@6", "opt_pasmcode", "class_namespace",
- "maybe_ns", "nslist", "$@7", "_nslist", "sub", "$@8", "$@9", "$@10",
- "sub_params", "sub_param", "$@11", "sub_param_type_def", "multi",
- "outer", "vtable", "method", "ns_entry_name", "instanceof", "subid",
- "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@12",
- "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
- "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "$@13",
- "paramtype_list", "paramtype", "pcc_ret", "$@14", "pcc_yield", "$@15",
+ "annotate_directive", "hll_def", "constdef", "@1", "pmc_const", "@2",
+ "any_string", "pasmcode", "pasmline", "pasm_inst", "@3", "@4",
+ "pasm_args", "emit", "@5", "opt_pasmcode", "class_namespace", "maybe_ns",
+ "nslist", "@6", "_nslist", "sub", "@7", "@8", "@9", "sub_params",
+ "sub_param", "@10", "sub_param_type_def", "multi", "outer", "vtable",
+ "method", "ns_entry_name", "instanceof", "subid", "multi_types",
+ "multi_type", "sub_body", "pcc_sub_call", "@11", "opt_label",
+ "opt_invocant", "sub_proto", "sub_proto_list", "proto", "pcc_call",
+ "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "@12",
+ "paramtype_list", "paramtype", "pcc_ret", "@13", "pcc_yield", "@14",
"pcc_returns", "pcc_yields", "pcc_return", "pcc_set_yield",
- "pcc_return_many", "$@16", "return_or_yield", "var_returns",
- "statements", "helper_clear_state", "statement", "labels", "_labels",
- "label", "instruction", "id_list", "id_list_id", "opt_unique_reg",
- "labeled_inst", "$@17", "$@18", "$@19", "type", "assignment", "@20",
- "un_op", "bin_op", "get_results", "@21", "op_assign", "assign_op",
- "func_assign", "the_sub", "sub_call", "@22", "arglist", "arg",
- "argtype_list", "argtype", "result", "targetlist",
- "conditional_statement", "unless_statement", "if_statement",
- "comma_or_goto", "relop", "target", "vars", "_vars", "_var_or_i",
- "sub_label_op_c", "sub_label_op", "label_op", "var_or_i", "var",
- "keylist", "$@23", "keylist_force", "$@24", "_keylist", "key", "reg",
- "stringc", "const", 0
+ "pcc_return_many", "@15", "return_or_yield", "var_returns", "statements",
+ "helper_clear_state", "statement", "labels", "_labels", "label",
+ "instruction", "id_list", "id_list_id", "opt_unique_reg", "labeled_inst",
+ "@16", "@17", "@18", "type", "assignment", "@19", "un_op", "bin_op",
+ "get_results", "@20", "op_assign", "assign_op", "func_assign", "the_sub",
+ "sub_call", "@21", "arglist", "arg", "argtype_list", "argtype", "result",
+ "targetlist", "conditional_statement", "unless_statement",
+ "if_statement", "comma_or_goto", "relop", "target", "vars", "_vars",
+ "_var_or_i", "sub_label_op_c", "sub_label_op", "label_op", "var_or_i",
+ "var", "keylist", "@22", "keylist_force", "@23", "_keylist", "key",
+ "reg", "stringc", "const", 0
};
#endif
@@ -1989,39 +1887,39 @@
{
0, 136, 137, 138, 138, 139, 139, 139, 139, 139,
139, 139, 139, 140, 140, 141, 141, 142, 143, 145,
- 144, 147, 146, 148, 146, 149, 149, 150, 150, 151,
- 151, 151, 151, 151, 151, 151, 153, 152, 154, 152,
- 152, 152, 152, 155, 157, 156, 158, 158, 159, 160,
- 160, 162, 161, 163, 163, 165, 166, 167, 164, 168,
- 168, 168, 170, 169, 171, 172, 173, 173, 174, 174,
- 175, 175, 176, 176, 177, 178, 178, 179, 179, 179,
- 180, 180, 180, 180, 180, 180, 180, 181, 181, 183,
- 182, 184, 184, 185, 185, 186, 186, 187, 187, 188,
- 188, 188, 188, 188, 188, 188, 188, 188, 188, 188,
- 188, 188, 188, 189, 189, 189, 189, 189, 189, 189,
- 190, 190, 191, 192, 192, 193, 194, 193, 195, 195,
- 196, 196, 196, 196, 196, 196, 196, 196, 198, 197,
- 197, 200, 199, 201, 201, 201, 202, 202, 202, 203,
- 204, 206, 205, 207, 207, 208, 208, 208, 208, 208,
- 209, 209, 210, 211, 211, 211, 211, 211, 211, 212,
- 212, 213, 213, 214, 215, 215, 216, 216, 217, 218,
- 218, 219, 219, 220, 219, 219, 219, 221, 219, 219,
- 222, 219, 219, 219, 219, 219, 219, 219, 219, 219,
- 219, 223, 223, 223, 223, 224, 224, 224, 224, 224,
- 224, 225, 224, 224, 224, 224, 224, 226, 226, 226,
- 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
- 227, 227, 227, 227, 227, 227, 227, 227, 227, 227,
- 227, 227, 227, 229, 228, 230, 231, 231, 231, 231,
- 231, 231, 231, 231, 231, 231, 231, 231, 231, 232,
- 233, 233, 233, 233, 233, 233, 233, 233, 235, 234,
- 236, 236, 236, 236, 236, 236, 237, 238, 238, 239,
- 239, 239, 239, 239, 240, 241, 241, 241, 241, 241,
- 242, 242, 243, 243, 243, 244, 244, 244, 245, 245,
- 246, 246, 246, 246, 246, 246, 247, 247, 248, 248,
- 249, 249, 250, 250, 250, 251, 251, 251, 252, 252,
- 253, 253, 254, 254, 255, 255, 257, 256, 259, 258,
- 260, 260, 261, 262, 262, 262, 262, 262, 263, 263,
- 264, 264, 264
+ 144, 147, 146, 148, 148, 149, 149, 150, 150, 150,
+ 150, 150, 150, 150, 152, 151, 153, 151, 151, 151,
+ 151, 154, 156, 155, 157, 157, 158, 159, 159, 161,
+ 160, 162, 162, 164, 165, 166, 163, 167, 167, 167,
+ 169, 168, 170, 171, 172, 172, 173, 173, 174, 174,
+ 175, 175, 176, 177, 177, 178, 178, 178, 179, 179,
+ 179, 179, 179, 179, 179, 180, 180, 182, 181, 183,
+ 183, 184, 184, 185, 185, 186, 186, 187, 187, 187,
+ 187, 187, 187, 187, 187, 187, 187, 187, 187, 187,
+ 187, 188, 188, 188, 188, 188, 188, 188, 189, 189,
+ 190, 191, 191, 192, 193, 192, 194, 194, 195, 195,
+ 195, 195, 195, 195, 195, 195, 197, 196, 196, 199,
+ 198, 200, 200, 200, 201, 201, 201, 202, 203, 205,
+ 204, 206, 206, 207, 207, 207, 207, 207, 208, 208,
+ 209, 210, 210, 210, 210, 210, 210, 211, 211, 212,
+ 212, 213, 214, 214, 215, 215, 216, 217, 217, 218,
+ 218, 219, 218, 218, 218, 220, 218, 218, 221, 218,
+ 218, 218, 218, 218, 218, 218, 218, 218, 218, 222,
+ 222, 222, 222, 223, 223, 223, 223, 223, 223, 224,
+ 223, 223, 223, 223, 223, 225, 225, 225, 226, 226,
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
+ 226, 226, 226, 226, 226, 226, 226, 226, 226, 226,
+ 226, 228, 227, 229, 230, 230, 230, 230, 230, 230,
+ 230, 230, 230, 230, 230, 230, 230, 231, 232, 232,
+ 232, 232, 232, 232, 232, 232, 234, 233, 235, 235,
+ 235, 235, 235, 235, 236, 237, 237, 238, 238, 238,
+ 238, 238, 239, 240, 240, 240, 240, 240, 241, 241,
+ 242, 242, 242, 243, 243, 243, 244, 244, 245, 245,
+ 245, 245, 245, 245, 246, 246, 247, 247, 248, 248,
+ 249, 249, 249, 250, 250, 250, 251, 251, 252, 252,
+ 253, 253, 254, 254, 256, 255, 258, 257, 259, 259,
+ 260, 261, 261, 261, 261, 261, 262, 262, 263, 263,
+ 263
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -2029,39 +1927,39 @@
{
0, 2, 1, 1, 2, 1, 1, 1, 1, 2,
1, 1, 1, 2, 3, 5, 3, 4, 2, 0,
- 6, 0, 6, 0, 6, 1, 1, 1, 2, 3,
- 2, 1, 1, 1, 1, 1, 0, 3, 0, 4,
- 2, 4, 0, 1, 0, 4, 0, 1, 3, 3,
- 2, 0, 2, 1, 3, 0, 0, 0, 10, 0,
- 2, 3, 0, 3, 3, 4, 4, 4, 1, 4,
- 1, 4, 1, 4, 4, 1, 4, 0, 3, 1,
- 1, 1, 1, 1, 1, 1, 3, 0, 1, 0,
- 9, 0, 2, 0, 3, 0, 1, 1, 2, 1,
+ 6, 0, 6, 1, 1, 1, 2, 3, 2, 1,
+ 1, 1, 1, 1, 0, 3, 0, 4, 2, 4,
+ 0, 1, 0, 4, 0, 1, 3, 3, 2, 0,
+ 2, 1, 3, 0, 0, 0, 10, 0, 2, 3,
+ 0, 3, 3, 4, 4, 4, 1, 4, 1, 4,
+ 1, 4, 4, 1, 4, 0, 3, 1, 1, 1,
+ 1, 1, 1, 1, 3, 0, 1, 0, 9, 0,
+ 2, 0, 3, 0, 1, 1, 2, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 5, 3, 3, 3, 3, 5, 5, 0, 3,
+ 2, 0, 3, 3, 0, 4, 0, 2, 1, 1,
+ 1, 1, 4, 4, 1, 1, 0, 5, 1, 0,
+ 5, 0, 2, 3, 0, 2, 3, 3, 3, 0,
+ 5, 1, 1, 0, 1, 3, 3, 5, 1, 2,
+ 0, 2, 2, 1, 1, 1, 1, 0, 1, 2,
+ 1, 1, 3, 2, 1, 3, 2, 0, 1, 1,
+ 1, 0, 4, 4, 4, 0, 6, 1, 0, 6,
+ 2, 2, 2, 2, 1, 1, 1, 1, 0, 1,
+ 1, 1, 1, 3, 4, 5, 6, 6, 3, 0,
+ 9, 1, 1, 1, 3, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 5, 3, 3, 3, 3, 5, 5,
- 0, 3, 2, 0, 3, 3, 0, 4, 0, 2,
- 1, 1, 1, 1, 4, 4, 1, 1, 0, 5,
- 1, 0, 5, 0, 2, 3, 0, 2, 3, 3,
- 3, 0, 5, 1, 1, 0, 1, 3, 3, 5,
- 1, 2, 0, 2, 2, 1, 1, 1, 1, 0,
- 1, 2, 1, 1, 3, 2, 1, 3, 2, 0,
- 1, 1, 1, 0, 4, 4, 4, 0, 6, 1,
- 0, 6, 2, 2, 2, 2, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 3, 4, 5, 6, 6,
- 3, 0, 9, 1, 1, 1, 3, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 0, 5, 3, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 4, 1, 1,
+ 1, 1, 3, 3, 3, 3, 0, 5, 0, 3,
+ 1, 5, 3, 3, 2, 0, 2, 1, 1, 1,
+ 4, 4, 2, 3, 5, 1, 3, 0, 1, 1,
+ 6, 5, 4, 4, 6, 5, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 0, 1, 3, 1,
+ 1, 4, 3, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 2, 0, 2, 1, 3,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 0, 5, 3, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 4,
- 1, 1, 1, 1, 3, 3, 3, 3, 0, 5,
- 0, 3, 1, 5, 3, 3, 2, 0, 2, 1,
- 1, 1, 4, 4, 2, 3, 5, 1, 3, 0,
- 1, 1, 6, 5, 4, 4, 6, 5, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 1,
- 3, 1, 1, 4, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 2, 0, 2,
- 1, 3, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1
+ 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2069,306 +1967,304 @@
means the default is an error. */
static const yytype_uint16 yydefact[] =
{
- 0, 12, 0, 0, 0, 0, 55, 19, 0, 44,
+ 0, 12, 0, 0, 0, 0, 53, 19, 0, 42,
0, 0, 2, 3, 10, 11, 0, 6, 8, 5,
- 7, 18, 0, 0, 51, 0, 0, 0, 0, 169,
- 9, 1, 4, 13, 0, 16, 50, 0, 0, 48,
- 318, 316, 317, 319, 56, 315, 201, 202, 203, 204,
- 0, 14, 21, 173, 0, 32, 31, 35, 34, 169,
- 27, 0, 33, 36, 170, 172, 0, 49, 338, 339,
- 52, 53, 95, 0, 0, 0, 30, 28, 45, 0,
- 0, 38, 0, 0, 171, 15, 0, 101, 99, 100,
- 102, 103, 70, 104, 0, 105, 0, 68, 0, 75,
- 72, 106, 107, 108, 109, 110, 111, 112, 0, 96,
- 97, 0, 0, 0, 333, 334, 335, 336, 337, 340,
- 341, 306, 324, 40, 307, 342, 325, 0, 95, 29,
- 308, 54, 0, 0, 77, 0, 0, 0, 0, 57,
- 98, 20, 320, 321, 322, 0, 323, 0, 0, 0,
- 328, 37, 324, 43, 309, 311, 312, 25, 26, 0,
- 0, 0, 80, 81, 83, 82, 84, 85, 326, 0,
- 79, 0, 0, 0, 0, 59, 0, 0, 41, 39,
- 0, 0, 326, 0, 71, 67, 66, 0, 0, 0,
- 65, 69, 74, 76, 73, 162, 22, 24, 314, 332,
- 329, 330, 0, 310, 86, 327, 78, 60, 62, 0,
- 0, 166, 165, 167, 168, 0, 0, 162, 0, 160,
- 0, 313, 0, 0, 164, 61, 58, 161, 0, 200,
- 163, 331, 63, 0, 0, 175, 0, 0, 0, 0,
- 183, 0, 187, 190, 153, 0, 154, 243, 0, 0,
- 0, 260, 261, 262, 308, 211, 189, 197, 198, 199,
- 140, 0, 0, 181, 213, 214, 215, 268, 196, 182,
- 291, 290, 263, 128, 17, 193, 0, 0, 0, 0,
- 195, 0, 0, 0, 0, 0, 192, 263, 0, 89,
- 138, 141, 194, 289, 151, 174, 0, 246, 247, 248,
- 249, 252, 253, 254, 255, 251, 250, 256, 257, 258,
- 0, 0, 326, 0, 64, 0, 299, 300, 301, 302,
- 303, 304, 305, 298, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 289, 120, 143, 146, 0, 287,
- 0, 128, 155, 270, 266, 265, 267, 264, 216, 338,
- 339, 308, 217, 218, 219, 0, 210, 324, 205, 0,
- 245, 130, 131, 132, 133, 137, 136, 129, 0, 295,
- 0, 0, 294, 0, 179, 184, 176, 185, 186, 0,
- 0, 0, 93, 0, 0, 0, 0, 0, 284, 338,
- 0, 156, 277, 338, 0, 272, 277, 259, 206, 225,
- 234, 235, 239, 228, 229, 230, 231, 232, 233, 226,
- 236, 237, 238, 227, 326, 242, 220, 221, 222, 223,
- 224, 240, 241, 0, 0, 0, 297, 0, 293, 0,
- 180, 178, 0, 0, 0, 244, 0, 0, 0, 0,
- 144, 0, 139, 0, 147, 0, 142, 0, 288, 0,
- 285, 0, 0, 0, 152, 276, 0, 0, 269, 0,
- 0, 207, 0, 0, 0, 296, 292, 177, 188, 191,
- 122, 0, 0, 0, 0, 91, 121, 277, 145, 277,
- 148, 0, 0, 157, 338, 158, 279, 280, 281, 278,
- 275, 338, 271, 274, 208, 209, 134, 135, 94, 0,
- 0, 0, 0, 123, 0, 149, 150, 286, 270, 0,
- 0, 0, 114, 0, 115, 117, 0, 116, 0, 0,
- 92, 0, 159, 0, 0, 273, 0, 0, 0, 126,
- 0, 90, 0, 212, 283, 282, 113, 119, 118, 0,
- 128, 124, 0, 125, 127
+ 7, 18, 0, 0, 49, 0, 0, 0, 0, 167,
+ 9, 1, 4, 13, 0, 16, 48, 0, 0, 46,
+ 316, 314, 315, 317, 54, 313, 199, 200, 201, 202,
+ 0, 14, 21, 171, 0, 30, 29, 33, 32, 167,
+ 25, 0, 31, 34, 168, 170, 0, 47, 336, 337,
+ 50, 51, 93, 0, 0, 28, 26, 43, 0, 0,
+ 36, 0, 0, 169, 15, 0, 99, 97, 98, 100,
+ 101, 68, 102, 0, 103, 0, 66, 0, 73, 70,
+ 104, 105, 106, 107, 108, 109, 110, 0, 94, 95,
+ 0, 0, 331, 332, 333, 334, 335, 338, 339, 304,
+ 322, 38, 305, 340, 323, 0, 93, 27, 306, 52,
+ 0, 0, 75, 0, 0, 0, 0, 55, 96, 20,
+ 318, 319, 320, 0, 321, 0, 0, 326, 35, 322,
+ 41, 307, 309, 310, 23, 24, 0, 0, 0, 78,
+ 79, 81, 80, 82, 83, 324, 0, 77, 0, 0,
+ 0, 0, 57, 0, 39, 37, 0, 0, 324, 0,
+ 69, 65, 64, 0, 0, 0, 63, 67, 72, 74,
+ 71, 160, 22, 312, 330, 327, 328, 0, 308, 84,
+ 325, 76, 58, 60, 0, 0, 164, 163, 165, 166,
+ 0, 0, 160, 0, 158, 0, 311, 0, 0, 162,
+ 59, 56, 159, 0, 198, 161, 329, 61, 0, 0,
+ 173, 0, 0, 0, 0, 181, 0, 185, 188, 151,
+ 0, 152, 241, 0, 0, 0, 258, 259, 260, 306,
+ 209, 187, 195, 196, 197, 138, 0, 0, 179, 211,
+ 212, 213, 266, 194, 180, 289, 288, 261, 126, 17,
+ 191, 0, 0, 0, 0, 193, 0, 0, 0, 0,
+ 0, 190, 261, 0, 87, 136, 139, 192, 287, 149,
+ 172, 0, 244, 245, 246, 247, 250, 251, 252, 253,
+ 249, 248, 254, 255, 256, 0, 0, 324, 0, 62,
+ 0, 297, 298, 299, 300, 301, 302, 303, 296, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 287,
+ 118, 141, 144, 0, 285, 0, 126, 153, 268, 264,
+ 263, 265, 262, 214, 336, 337, 306, 215, 216, 217,
+ 0, 208, 322, 203, 0, 243, 128, 129, 130, 131,
+ 135, 134, 127, 0, 293, 0, 0, 292, 0, 177,
+ 182, 174, 183, 184, 0, 0, 0, 91, 0, 0,
+ 0, 0, 0, 282, 336, 0, 154, 275, 336, 0,
+ 270, 275, 257, 204, 223, 232, 233, 237, 226, 227,
+ 228, 229, 230, 231, 224, 234, 235, 236, 225, 324,
+ 240, 218, 219, 220, 221, 222, 238, 239, 0, 0,
+ 0, 295, 0, 291, 0, 178, 176, 0, 0, 0,
+ 242, 0, 0, 0, 0, 142, 0, 137, 0, 145,
+ 0, 140, 0, 286, 0, 283, 0, 0, 0, 150,
+ 274, 0, 0, 267, 0, 0, 205, 0, 0, 0,
+ 294, 290, 175, 186, 189, 120, 0, 0, 0, 0,
+ 89, 119, 275, 143, 275, 146, 0, 0, 155, 336,
+ 156, 277, 278, 279, 276, 273, 336, 269, 272, 206,
+ 207, 132, 133, 92, 0, 0, 0, 0, 121, 0,
+ 147, 148, 284, 268, 0, 0, 0, 112, 0, 113,
+ 115, 0, 114, 0, 0, 90, 0, 157, 0, 0,
+ 271, 0, 0, 0, 124, 0, 88, 0, 210, 281,
+ 280, 111, 117, 116, 0, 126, 122, 0, 123, 125
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
- -1, 11, 12, 13, 14, 15, 214, 16, 17, 27,
- 58, 74, 75, 159, 59, 60, 82, 83, 128, 151,
- 18, 29, 61, 19, 25, 37, 38, 70, 20, 26,
- 72, 175, 195, 215, 222, 232, 101, 102, 103, 104,
- 105, 106, 107, 169, 170, 216, 257, 335, 503, 438,
- 108, 109, 110, 475, 382, 439, 519, 532, 539, 314,
- 367, 258, 336, 259, 337, 383, 384, 443, 447, 260,
- 342, 261, 390, 217, 218, 219, 63, 64, 65, 230,
- 375, 376, 431, 262, 281, 284, 285, 50, 263, 293,
- 355, 423, 264, 288, 265, 313, 266, 267, 268, 296,
- 394, 395, 455, 489, 339, 340, 269, 270, 271, 324,
- 325, 122, 153, 154, 155, 44, 45, 144, 156, 146,
- 187, 188, 180, 181, 200, 201, 124, 125, 126
+ -1, 11, 12, 13, 14, 15, 209, 16, 17, 27,
+ 58, 74, 156, 59, 60, 81, 82, 126, 148, 18,
+ 29, 61, 19, 25, 37, 38, 70, 20, 26, 72,
+ 172, 191, 210, 217, 227, 100, 101, 102, 103, 104,
+ 105, 106, 166, 167, 211, 252, 330, 498, 433, 107,
+ 108, 109, 470, 377, 434, 514, 527, 534, 309, 362,
+ 253, 331, 254, 332, 378, 379, 438, 442, 255, 337,
+ 256, 385, 212, 213, 214, 63, 64, 65, 225, 370,
+ 371, 426, 257, 276, 279, 280, 50, 258, 288, 350,
+ 418, 259, 283, 260, 308, 261, 262, 263, 291, 389,
+ 390, 450, 484, 334, 335, 264, 265, 266, 319, 320,
+ 120, 150, 151, 152, 44, 45, 142, 153, 144, 183,
+ 184, 176, 177, 195, 196, 122, 123, 124
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -448
+#define YYPACT_NINF -413
static const yytype_int16 yypact[] =
{
- 69, -448, -70, -51, -44, -48, -448, -448, 22, -448,
- 136, 150, 69, -448, -448, -448, 153, -448, -448, -448,
- -448, -448, 91, 159, 51, 185, 200, 135, 191, 204,
- -448, -448, -448, -448, 90, -448, -448, 99, -68, -448,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- 117, -448, 141, -448, 251, -448, -448, -448, -448, 234,
- -448, 154, -448, 12, 160, -448, 257, -448, -448, -448,
- 138, -448, 413, 151, 170, 162, -448, -448, -448, 189,
- 164, -448, 279, 171, -448, -448, -68, -448, -448, -448,
- -448, -448, 166, -448, 183, -448, 184, 187, 192, 193,
- 194, -448, -448, -448, -448, -448, -448, -448, 281, 413,
- -448, 101, 426, 426, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, 226, 413, -448,
- 374, -448, 96, -24, -3, 199, 213, 96, 96, -448,
- -448, -448, -448, -448, -448, 207, -448, 209, 217, 231,
- -448, -448, 210, -448, 265, -448, -448, -448, -448, 211,
- 212, 214, -448, -448, -448, -448, -448, -448, -448, -58,
- -448, 215, 216, 219, 221, -448, 96, 96, -448, -448,
- 225, 189, -448, 374, -448, -448, -448, 227, 189, -3,
- -448, -448, -448, -448, -448, 19, -448, -448, -448, -448,
- 230, -448, 232, -448, -448, 230, -448, -448, -448, 222,
- 335, -448, -448, -448, -448, 345, 285, 172, 7, -448,
- 189, -448, 135, 289, -448, -448, -448, -448, 356, 163,
- -448, -448, -448, 254, 101, -448, -62, 284, 302, 189,
- -448, 119, 127, -448, -448, 317, -448, -448, 359, 360,
- 361, -448, -448, -448, 374, -448, -448, -448, -448, -448,
- -448, 242, 364, -448, -448, -448, -448, -448, -448, -448,
- -448, -448, 429, -448, -448, -448, 189, 161, 189, 161,
- -448, 135, 299, 300, 135, 135, -448, 252, 247, -448,
- -448, -448, -448, 519, -448, -448, 250, -448, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- 449, 40, -448, 189, 39, 366, -448, -448, -448, -448,
- -448, -448, -448, -448, -62, 189, 369, -62, 189, 274,
- 546, 546, 275, 277, 519, -448, -448, -448, 363, -448,
- -35, -448, 463, 477, -448, -448, -448, -448, -448, 261,
- 266, 374, -448, -448, -448, 189, -448, -40, 393, 276,
- -448, -448, -448, -448, 278, -448, -448, -448, -62, -448,
- 391, -62, -448, 394, 310, 341, -448, -448, -448, 296,
- 298, 5, -1, 14, 9, 546, 528, 305, 39, 405,
- 23, -448, -448, 414, 36, -448, 416, -448, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, 189, 319, 139, -448, -62, -448, -62,
- -448, -448, 274, 101, 101, -448, 189, 189, 109, 439,
- -448, 189, -448, 440, -448, 189, -448, 441, -448, 424,
- -448, 317, 189, 491, -448, 263, 189, 505, -448, 189,
- 331, -448, 189, 329, 330, -448, -448, -448, -448, -448,
- -448, 453, 189, 189, 537, 160, -448, -448, -448, -448,
- -448, 546, 333, -448, 461, -448, -448, 346, -448, -448,
- -448, 462, -448, -448, -448, -448, -448, -448, -448, 27,
- 487, 29, 35, -448, 488, 263, 263, -448, 477, 189,
- 140, 189, -448, 189, -448, -448, 189, -448, 189, 105,
- -448, 46, -448, 367, 368, -448, 504, 508, 510, -448,
- 546, -448, 512, -448, -448, -448, -448, -448, -448, 135,
- -448, -448, 274, 39, -448
+ 320, -413, -102, -90, -60, -61, -413, -413, -39, -413,
+ 70, 89, 320, -413, -413, -413, 93, -413, -413, -413,
+ -413, -413, 41, 121, -30, 135, -44, 139, 144, 57,
+ -413, -413, -413, -413, 50, -413, -413, 42, 72, -413,
+ -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
+ 65, -413, -413, -413, 172, -413, -413, -413, -413, 156,
+ -413, 75, -413, 24, 78, -413, 178, -413, -413, -413,
+ 60, -413, 427, 80, 91, -413, -413, -413, 455, 95,
+ -413, 208, 103, -413, -413, 72, -413, -413, -413, -413,
+ -413, 125, -413, 137, -413, 150, 151, 152, 153, 154,
+ -413, -413, -413, -413, -413, -413, -413, 233, 427, -413,
+ 97, 440, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, -413, 173, 427, -413, 388, -413,
+ 108, -26, 118, 141, 142, 108, 108, -413, -413, -413,
+ -413, -413, -413, 159, -413, 174, 164, -413, -413, 161,
+ -413, 215, -413, -413, -413, -413, 160, 167, 168, -413,
+ -413, -413, -413, -413, -413, -413, -53, -413, 170, 171,
+ 175, 176, -413, 108, -413, -413, 181, 455, -413, 388,
+ -413, -413, -413, 188, 455, 118, -413, -413, -413, -413,
+ -413, 25, -413, -413, -413, 193, -413, 189, -413, -413,
+ 193, -413, -413, -413, 214, 315, -413, -413, -413, -413,
+ 322, 259, 23, 184, -413, 455, -413, 139, 267, -413,
+ -413, -413, -413, 337, 13, -413, -413, -413, 231, 97,
+ -413, -49, 202, 334, 455, -413, 112, 235, -413, -413,
+ 228, -413, -413, 345, 348, 351, -413, -413, -413, 388,
+ -413, -413, -413, -413, -413, -413, 232, 352, -413, -413,
+ -413, -413, -413, -413, -413, -413, -413, 443, -413, -413,
+ -413, 455, 211, 455, 211, -413, 139, 290, 291, 139,
+ 139, -413, 240, 238, -413, -413, -413, -413, 128, -413,
+ -413, 239, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, -413, 469, 289, -413, 455, -8,
+ 355, -413, -413, -413, -413, -413, -413, -413, -413, -49,
+ 455, 356, -49, 455, 260, 306, 306, 261, 264, 128,
+ -413, -413, -413, 350, -413, -31, -413, 483, 497, -413,
+ -413, -413, -413, -413, 250, 252, 388, -413, -413, -413,
+ 455, -413, 28, 407, 255, -413, -413, -413, -413, 256,
+ -413, -413, -413, -49, -413, 370, -49, -413, 372, 284,
+ 314, -413, -413, -413, 265, 266, -22, -3, 32, 3,
+ 306, 539, 270, -8, 363, -18, -413, -413, 366, -14,
+ -413, 376, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, -413, -413, -413, -413, 455, 285,
+ 113, -413, -49, -413, -49, -413, -413, 260, 97, 97,
+ -413, 455, 455, 69, 404, -413, 455, -413, 409, -413,
+ 455, -413, 415, -413, 398, -413, 228, 455, 511, -413,
+ 143, 455, 525, -413, 455, 300, -413, 455, 298, 301,
+ -413, -413, -413, -413, -413, -413, 428, 455, 455, 548,
+ 78, -413, -413, -413, -413, -413, 306, 309, -413, 414,
+ -413, -413, 316, -413, -413, -413, 421, -413, -413, -413,
+ -413, -413, -413, -413, 14, 447, 31, 33, -413, 448,
+ 143, 143, -413, 497, 455, 127, 455, -413, 455, -413,
+ -413, 455, -413, 455, 84, -413, -11, -413, 305, 318,
+ -413, 449, 450, 453, -413, 306, -413, 454, -413, -413,
+ -413, -413, -413, -413, 139, -413, -413, 260, -8, -413
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -448, -448, -448, 483, -15, -161, -448, -448, -448, -448,
- 288, -448, -448, 71, -448, 459, -448, -448, -448, 168,
- -448, -448, -448, -7, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, -448, 347, -448, -448, -448, -448, -448,
- 392, -448, 434, -448, -448, -448, -448, -448, -448, -335,
- -448, -448, -448, -448, -448, -448, -448, -448, -448, -448,
- -448, -448, -448, -448, -448, 318, 326, -448, -63, -448,
- -448, -417, -448, -448, -448, -448, -448, -219, -448, -448,
- -448, -448, -448, -448, -448, -448, -448, 94, -181, -448,
- 38, -333, -447, -448, 173, 224, -448, -448, -448, 268,
- 270, -128, 307, -448, 379, -448, 260, -229, 132, -79,
- -177, -448, -448, -448, 384, 353, -448, 43, -107
+ -413, -413, -413, 456, -9, -167, -413, -413, -413, -413,
+ 236, -413, 0, -413, 400, -413, -413, -413, 123, -413,
+ -413, -413, 20, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, 286, -413, -413, -413, -413, -413, 344,
+ -413, 364, -413, -413, -413, -413, -413, -413, -331, -413,
+ -413, -413, -413, -413, -413, -413, -413, -413, -413, -413,
+ -413, -413, -413, -413, 273, 292, -413, -63, -413, -413,
+ -406, -413, -413, -413, -413, -413, -211, -413, -413, -413,
+ -413, -413, -413, -413, -413, -413, 51, -199, -413, -5,
+ -322, -412, -413, 126, 177, -413, -413, -413, 234, 248,
+ -126, 277, -413, 330, -413, 223, -217, 419, -78, -174,
+ -413, -413, -413, 347, 317, -413, 2, -107
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -264
+#define YYTABLE_NINF -262
static const yytype_int16 yytable[] =
{
- 123, 84, 152, 233, 141, 202, 388, 275, 228, 391,
- 436, -169, 189, 444, 57, 467, -42, -169, 440, -169,
- -169, -169, 62, 207, 208, 445, 79, 3, 4, 441,
- 505, 512, 506, 515, 213, 386, -169, -169, -169, 517,
- -169, 21, 80, 68, 57, 142, 69, 162, 163, 164,
- 165, 209, 62, 143, 348, 152, 213, 361, 362, 363,
- 364, 22, 329, 365, 286, 332, 333, 23, 190, -169,
- -169, -169, -169, 1, 24, 386, 2, 3, 4, 310,
- -169, 71, 437, 160, -169, -263, -169, 161, 81, 446,
- -87, 387, 442, 453, 5, 369, 6, 513, 372, 516,
- 7, 272, 199, 470, 166, 518, 457, 53, 167, 199,
- -169, -169, -169, -169, -169, -169, 457, 287, -169, 168,
- 485, -169, -169, -169, 492, 544, 152, 274, 210, 131,
- 356, 435, -169, 28, 529, 359, 211, 212, 366, 426,
- 30, 199, 428, 114, 115, 116, 117, 251, 118, 454,
- 31, 349, 119, 120, 350, 351, 121, 33, 277, 279,
- 280, 34, 458, 35, 8, 341, 530, 352, 353, 354,
- 9, 316, 533, 236, 36, 237, 238, 239, 10, 531,
- 3, 4, 346, 357, 472, 46, 47, 48, 49, 39,
- 473, 474, 240, 241, 242, 51, 243, 315, 465, 326,
- 466, 66, 377, 378, 209, 543, 341, 157, 173, 174,
- 158, 2, 68, 119, 120, 69, 317, 318, 319, 320,
- 321, 322, 67, 152, 73, 244, 245, 246, 247, 5,
- 282, 323, 358, 283, 360, 52, 248, 460, -23, -21,
- 249, 2, 250, -88, 145, 147, 370, 196, 197, 373,
- 463, 523, -23, 464, 524, 76, 78, 448, 341, 5,
- 53, 85, 86, 392, 396, 52, 114, 115, 116, 117,
- 251, 118, 111, 113, 252, 127, 398, 253, 254, 121,
- 486, 210, 112, 129, 487, 139, 130, 488, 255, 211,
- 212, 132, 114, 115, 116, 117, 148, 118, 276, 8,
- 68, 119, 120, 69, 53, 121, -46, 40, 133, 134,
- 171, 41, 135, 54, 42, 43, 278, 136, 137, 138,
- 542, 55, 56, 287, 172, 178, 468, 469, 176, 8,
- 177, 179, 182, 223, 53, 183, -47, 184, 185, 224,
- 186, 191, 192, 54, 461, 193, 502, 194, 198, 225,
- 204, 55, 56, 507, 220, 221, 226, 392, 471, 234,
- 235, 273, 477, 289, 290, 291, 479, 294, 295, 330,
- 331, 310, 334, 483, 392, 343, 368, 490, 392, 371,
- 493, 374, 379, 495, 380, 385, -261, 114, 115, 116,
- 117, -262, 118, 499, 500, 68, 119, 120, 69, 424,
- 121, 427, 540, 425, 429, 114, 115, 116, 117, 430,
- 118, 432, 504, 68, 119, 120, 69, 433, 121, 434,
- 114, 115, 116, 117, 251, 118, 451, 452, 252, 396,
- 522, 253, 525, 121, 526, 399, 456, 527, 459, 528,
- 462, 400, 401, 476, 478, 480, 481, 402, 403, 404,
- 405, 406, 407, 408, 494, 496, 497, 498, 508, 409,
- 410, 411, 412, 297, 298, 299, 300, 301, 302, 303,
- 304, 510, 305, 306, 307, 308, 309, 114, 115, 116,
- 117, 142, 118, 509, 511, 68, 119, 120, 69, 143,
- 121, 514, 520, 534, 535, 32, 150, 87, 88, 89,
- 90, 91, 92, 93, 94, 95, 96, 97, 536, 98,
- 99, 100, 537, 413, 538, 414, 541, 256, 77, 397,
- 149, 415, 416, 417, 418, 419, 420, 421, 422, 114,
- 115, 116, 117, 142, 118, 227, 206, 68, 119, 120,
- 69, 143, 121, 140, 229, 482, 521, 327, 310, 328,
- 311, 312, 114, 115, 116, 117, 40, 118, 381, 450,
- 344, 292, 203, 345, 43, 121, 114, 115, 116, 117,
- 347, 118, 205, 231, 389, 119, 120, 69, 0, 121,
- 114, 115, 116, 117, 0, 118, 0, 0, 393, 119,
- 120, 69, 0, 121, 114, 115, 116, 117, 0, 118,
- 0, 0, 484, 119, 120, 69, 0, 121, 114, 115,
- 116, 117, 0, 118, 0, 0, 491, 119, 120, 69,
- 0, 121, 114, 115, 116, 117, 0, 118, 0, 0,
- 338, 114, 115, 116, 117, 121, 118, 0, 0, 449,
- 114, 115, 116, 117, 121, 118, 0, 0, 501, 114,
- 115, 116, 117, 121, 118, 0, 0, 0, 0, 0,
- 0, 0, 121
+ 121, 83, 149, 139, 197, 383, 228, 439, 431, 21,
+ 356, 357, 358, 359, 270, 386, 360, 185, 507, 440,
+ 57, 462, 22, 231, 208, 232, 233, 234, -40, 202,
+ 203, 3, 4, 3, 4, 510, 435, 512, 78, 381,
+ 71, 281, 235, 236, 237, 208, 238, 436, 381, 62,
+ 57, 23, 448, 149, 79, 204, 452, 204, 140, 452,
+ 500, 24, 501, 40, 2, 324, 141, 41, 327, 328,
+ 42, 43, 28, 186, 30, 239, 240, 241, 242, 62,
+ 432, 157, 5, 441, 508, 158, 243, 129, 52, 31,
+ 244, 361, 245, 36, -86, 382, -85, 33, 267, 194,
+ 80, 511, 364, 513, 430, 367, 194, 351, 449, 465,
+ 437, 34, 453, 524, 282, 528, 112, 113, 114, 115,
+ 246, 116, 269, 149, 247, 35, 480, 248, 249, 119,
+ 487, 539, 205, 354, 205, 170, 171, 194, 250, 39,
+ 206, 207, 206, 207, 467, 525, 421, 305, 51, 423,
+ 468, 469, 8, -261, 272, 274, 275, 53, 526, -44,
+ 481, 66, 336, 2, 482, 67, 54, 483, 159, 160,
+ 161, 162, 73, 192, 55, 56, 75, 77, 53, 341,
+ 352, 5, 84, 68, 85, 223, 69, 52, -167, 46,
+ 47, 48, 49, 310, -167, 321, -167, -167, -167, 372,
+ 373, 110, 111, 336, 538, 460, 125, 461, 68, 117,
+ 118, 69, 127, -167, -167, -167, 271, -167, 128, 154,
+ 149, 311, 155, 277, 458, 163, 278, 459, 353, 164,
+ 355, 112, 113, 114, 115, 455, 116, 137, 518, 333,
+ 165, 519, 365, 145, 119, 368, -167, -167, -167, -167,
+ 130, 8, 168, 169, 443, 336, 53, -167, -45, 387,
+ 391, -167, 131, -167, 175, 54, 312, 313, 314, 315,
+ 316, 317, 393, 55, 56, 132, 133, 134, 135, 136,
+ 173, 318, 174, 178, 53, 179, 180, -167, -167, -167,
+ -167, -167, -167, 181, 182, -167, 187, 188, -167, -167,
+ -167, 189, 190, 343, 193, 112, 113, 114, 115, -167,
+ 116, 199, 216, 68, 117, 118, 69, 215, 119, 219,
+ 282, 463, 464, 537, 1, 218, 220, 2, 3, 4,
+ 221, 112, 113, 114, 115, 246, 116, 229, 268, 247,
+ 456, 230, 248, 497, 119, 5, -21, 6, 273, 284,
+ 502, 7, 285, 387, 466, 286, 290, 289, 472, 305,
+ 325, 326, 474, 329, 338, 363, 366, 369, 374, 478,
+ 387, 375, 380, 485, 387, -259, 488, -260, 419, 490,
+ 422, 420, 424, 425, 427, 447, 428, 429, 451, 494,
+ 495, 446, 112, 113, 114, 115, 246, 116, 454, 535,
+ 344, 117, 118, 345, 346, 119, 457, 499, 471, 112,
+ 113, 114, 115, 473, 116, 8, 347, 348, 349, 475,
+ 476, 9, 119, 489, 491, 391, 517, 492, 520, 10,
+ 521, 529, 493, 522, 503, 523, 504, 112, 113, 114,
+ 115, 505, 116, 506, 530, 68, 117, 118, 69, 394,
+ 119, 509, 515, 531, 532, 395, 396, 533, 536, 76,
+ 251, 397, 398, 399, 400, 401, 402, 403, 32, 392,
+ 146, 201, 138, 404, 405, 406, 407, 292, 293, 294,
+ 295, 296, 297, 298, 299, 222, 300, 301, 302, 303,
+ 304, 112, 113, 114, 115, 140, 116, 477, 516, 68,
+ 117, 118, 69, 141, 119, 224, 376, 445, 322, 198,
+ 147, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95, 96, 323, 97, 98, 99, 287, 408, 342, 409,
+ 143, 200, 226, 0, 0, 410, 411, 412, 413, 414,
+ 415, 416, 417, 112, 113, 114, 115, 140, 116, 0,
+ 0, 68, 117, 118, 69, 141, 119, 0, 112, 113,
+ 114, 115, 305, 116, 306, 307, 68, 117, 118, 69,
+ 0, 119, 112, 113, 114, 115, 40, 116, 0, 0,
+ 339, 0, 0, 340, 43, 119, 112, 113, 114, 115,
+ 0, 116, 0, 0, 384, 117, 118, 69, 0, 119,
+ 112, 113, 114, 115, 0, 116, 0, 0, 388, 117,
+ 118, 69, 0, 119, 112, 113, 114, 115, 0, 116,
+ 0, 0, 479, 117, 118, 69, 0, 119, 112, 113,
+ 114, 115, 0, 116, 0, 0, 486, 117, 118, 69,
+ 0, 119, 112, 113, 114, 115, 0, 116, 0, 0,
+ 444, 112, 113, 114, 115, 119, 116, 0, 0, 496,
+ 0, 0, 0, 0, 119
};
static const yytype_int16 yycheck[] =
{
- 79, 64, 130, 222, 111, 182, 341, 236, 1, 342,
- 11, 4, 70, 4, 29, 432, 4, 10, 4, 12,
- 13, 14, 29, 4, 5, 16, 14, 8, 9, 15,
- 477, 4, 479, 4, 195, 70, 29, 30, 31, 4,
- 33, 111, 30, 111, 59, 107, 114, 50, 51, 52,
- 53, 32, 59, 115, 14, 183, 217, 18, 19, 20,
- 21, 112, 281, 24, 245, 284, 285, 111, 126, 62,
- 63, 64, 65, 4, 122, 70, 7, 8, 9, 119,
- 73, 38, 83, 107, 77, 125, 79, 111, 76, 80,
- 71, 126, 78, 70, 25, 324, 27, 70, 327, 70,
- 31, 229, 181, 436, 107, 70, 70, 100, 111, 188,
- 103, 104, 105, 106, 107, 108, 70, 245, 111, 122,
- 453, 114, 115, 116, 457, 542, 254, 234, 109, 86,
- 311, 126, 125, 111, 29, 312, 117, 118, 99, 368,
- 4, 220, 371, 103, 104, 105, 106, 107, 108, 126,
- 0, 111, 112, 113, 114, 115, 116, 4, 237, 238,
- 239, 70, 126, 4, 95, 293, 61, 127, 128, 129,
- 101, 10, 126, 10, 123, 12, 13, 14, 109, 74,
- 8, 9, 310, 311, 75, 50, 51, 52, 53, 4,
- 81, 82, 29, 30, 31, 4, 33, 276, 427, 278,
- 429, 111, 330, 331, 32, 540, 334, 111, 137, 138,
- 114, 7, 111, 112, 113, 114, 55, 56, 57, 58,
- 59, 60, 123, 351, 107, 62, 63, 64, 65, 25,
- 111, 70, 311, 114, 313, 31, 73, 414, 111, 112,
- 77, 7, 79, 71, 112, 113, 325, 176, 177, 328,
- 111, 111, 111, 114, 114, 4, 102, 385, 386, 25,
- 100, 4, 124, 342, 343, 31, 103, 104, 105, 106,
- 107, 108, 121, 111, 111, 111, 355, 114, 115, 116,
- 17, 109, 112, 4, 21, 4, 115, 24, 125, 117,
- 118, 125, 103, 104, 105, 106, 70, 108, 14, 95,
- 111, 112, 113, 114, 100, 116, 102, 107, 125, 125,
- 111, 111, 125, 109, 114, 115, 14, 125, 125, 125,
- 539, 117, 118, 451, 111, 108, 433, 434, 121, 95,
- 121, 100, 122, 111, 100, 70, 102, 126, 126, 4,
- 126, 126, 126, 109, 423, 126, 474, 126, 123, 4,
- 123, 117, 118, 481, 124, 123, 71, 436, 437, 70,
- 4, 107, 441, 4, 4, 4, 445, 125, 4, 70,
- 70, 119, 125, 452, 453, 125, 10, 456, 457, 10,
- 459, 107, 107, 462, 107, 22, 125, 103, 104, 105,
- 106, 125, 108, 472, 473, 111, 112, 113, 114, 123,
- 116, 10, 530, 125, 10, 103, 104, 105, 106, 99,
- 108, 70, 475, 111, 112, 113, 114, 121, 116, 121,
- 103, 104, 105, 106, 107, 108, 121, 22, 111, 508,
- 509, 114, 511, 116, 513, 42, 22, 516, 22, 518,
- 121, 48, 49, 4, 4, 4, 22, 54, 55, 56,
- 57, 58, 59, 60, 123, 126, 126, 4, 125, 66,
- 67, 68, 69, 34, 35, 36, 37, 38, 39, 40,
- 41, 125, 43, 44, 45, 46, 47, 103, 104, 105,
- 106, 107, 108, 22, 22, 111, 112, 113, 114, 115,
- 116, 4, 4, 126, 126, 12, 122, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 4, 96,
- 97, 98, 4, 120, 4, 122, 4, 229, 59, 351,
- 128, 128, 129, 130, 131, 132, 133, 134, 135, 103,
- 104, 105, 106, 107, 108, 217, 189, 111, 112, 113,
- 114, 115, 116, 109, 218, 451, 508, 279, 119, 279,
- 121, 122, 103, 104, 105, 106, 107, 108, 334, 386,
- 111, 254, 183, 114, 115, 116, 103, 104, 105, 106,
- 310, 108, 188, 220, 111, 112, 113, 114, -1, 116,
+ 78, 64, 128, 110, 178, 336, 217, 4, 11, 111,
+ 18, 19, 20, 21, 231, 337, 24, 70, 4, 16,
+ 29, 427, 112, 10, 191, 12, 13, 14, 4, 4,
+ 5, 8, 9, 8, 9, 4, 4, 4, 14, 70,
+ 38, 240, 29, 30, 31, 212, 33, 15, 70, 29,
+ 59, 111, 70, 179, 30, 32, 70, 32, 107, 70,
+ 472, 122, 474, 107, 7, 276, 115, 111, 279, 280,
+ 114, 115, 111, 126, 4, 62, 63, 64, 65, 59,
+ 83, 107, 25, 80, 70, 111, 73, 85, 31, 0,
+ 77, 99, 79, 123, 71, 126, 71, 4, 224, 177,
+ 76, 70, 319, 70, 126, 322, 184, 306, 126, 431,
+ 78, 70, 126, 29, 240, 126, 103, 104, 105, 106,
+ 107, 108, 229, 249, 111, 4, 448, 114, 115, 116,
+ 452, 537, 109, 307, 109, 135, 136, 215, 125, 4,
+ 117, 118, 117, 118, 75, 61, 363, 119, 4, 366,
+ 81, 82, 95, 125, 232, 233, 234, 100, 74, 102,
+ 17, 111, 288, 7, 21, 123, 109, 24, 50, 51,
+ 52, 53, 107, 173, 117, 118, 4, 102, 100, 305,
+ 306, 25, 4, 111, 124, 1, 114, 31, 4, 50,
+ 51, 52, 53, 271, 10, 273, 12, 13, 14, 325,
+ 326, 121, 111, 329, 535, 422, 111, 424, 111, 112,
+ 113, 114, 4, 29, 30, 31, 14, 33, 115, 111,
+ 346, 10, 114, 111, 111, 107, 114, 114, 306, 111,
+ 308, 103, 104, 105, 106, 409, 108, 4, 111, 111,
+ 122, 114, 320, 70, 116, 323, 62, 63, 64, 65,
+ 125, 95, 111, 111, 380, 381, 100, 73, 102, 337,
+ 338, 77, 125, 79, 100, 109, 55, 56, 57, 58,
+ 59, 60, 350, 117, 118, 125, 125, 125, 125, 125,
+ 121, 70, 108, 122, 100, 70, 126, 103, 104, 105,
+ 106, 107, 108, 126, 126, 111, 126, 126, 114, 115,
+ 116, 126, 126, 14, 123, 103, 104, 105, 106, 125,
+ 108, 123, 123, 111, 112, 113, 114, 124, 116, 4,
+ 446, 428, 429, 534, 4, 111, 4, 7, 8, 9,
+ 71, 103, 104, 105, 106, 107, 108, 70, 107, 111,
+ 418, 4, 114, 469, 116, 25, 111, 27, 14, 4,
+ 476, 31, 4, 431, 432, 4, 4, 125, 436, 119,
+ 70, 70, 440, 125, 125, 10, 10, 107, 107, 447,
+ 448, 107, 22, 451, 452, 125, 454, 125, 123, 457,
+ 10, 125, 10, 99, 70, 22, 121, 121, 22, 467,
+ 468, 121, 103, 104, 105, 106, 107, 108, 22, 525,
+ 111, 112, 113, 114, 115, 116, 121, 470, 4, 103,
+ 104, 105, 106, 4, 108, 95, 127, 128, 129, 4,
+ 22, 101, 116, 123, 126, 503, 504, 126, 506, 109,
+ 508, 126, 4, 511, 125, 513, 22, 103, 104, 105,
+ 106, 125, 108, 22, 126, 111, 112, 113, 114, 42,
+ 116, 4, 4, 4, 4, 48, 49, 4, 4, 59,
+ 224, 54, 55, 56, 57, 58, 59, 60, 12, 346,
+ 126, 185, 108, 66, 67, 68, 69, 34, 35, 36,
+ 37, 38, 39, 40, 41, 212, 43, 44, 45, 46,
+ 47, 103, 104, 105, 106, 107, 108, 446, 503, 111,
+ 112, 113, 114, 115, 116, 213, 329, 381, 274, 179,
+ 122, 84, 85, 86, 87, 88, 89, 90, 91, 92,
+ 93, 94, 274, 96, 97, 98, 249, 120, 305, 122,
+ 111, 184, 215, -1, -1, 128, 129, 130, 131, 132,
+ 133, 134, 135, 103, 104, 105, 106, 107, 108, -1,
+ -1, 111, 112, 113, 114, 115, 116, -1, 103, 104,
+ 105, 106, 119, 108, 121, 122, 111, 112, 113, 114,
+ -1, 116, 103, 104, 105, 106, 107, 108, -1, -1,
+ 111, -1, -1, 114, 115, 116, 103, 104, 105, 106,
+ -1, 108, -1, -1, 111, 112, 113, 114, -1, 116,
103, 104, 105, 106, -1, 108, -1, -1, 111, 112,
113, 114, -1, 116, 103, 104, 105, 106, -1, 108,
-1, -1, 111, 112, 113, 114, -1, 116, 103, 104,
105, 106, -1, 108, -1, -1, 111, 112, 113, 114,
-1, 116, 103, 104, 105, 106, -1, 108, -1, -1,
111, 103, 104, 105, 106, 116, 108, -1, -1, 111,
- 103, 104, 105, 106, 116, 108, -1, -1, 111, 103,
- 104, 105, 106, 116, 108, -1, -1, -1, -1, -1,
- -1, -1, 116
+ -1, -1, -1, -1, 116
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -2376,60 +2272,59 @@
static const yytype_uint16 yystos[] =
{
0, 4, 7, 8, 9, 25, 27, 31, 95, 101,
- 109, 137, 138, 139, 140, 141, 143, 144, 156, 159,
- 164, 111, 112, 111, 122, 160, 165, 145, 111, 157,
- 4, 0, 139, 4, 70, 4, 123, 161, 162, 4,
- 107, 111, 114, 115, 251, 252, 50, 51, 52, 53,
- 223, 4, 31, 100, 109, 117, 118, 140, 146, 150,
- 151, 158, 159, 212, 213, 214, 111, 123, 111, 114,
- 163, 263, 166, 107, 147, 148, 4, 151, 102, 14,
- 30, 76, 152, 153, 214, 4, 124, 84, 85, 86,
- 87, 88, 89, 90, 91, 92, 93, 94, 96, 97,
- 98, 172, 173, 174, 175, 176, 177, 178, 186, 187,
- 188, 121, 112, 111, 103, 104, 105, 106, 108, 112,
- 113, 116, 247, 255, 262, 263, 264, 111, 154, 4,
- 115, 263, 125, 125, 125, 125, 125, 125, 125, 4,
- 188, 264, 107, 115, 253, 254, 255, 254, 70, 186,
- 122, 155, 247, 248, 249, 250, 254, 111, 114, 149,
- 107, 111, 50, 51, 52, 53, 107, 111, 122, 179,
- 180, 111, 111, 149, 149, 167, 121, 121, 108, 100,
- 258, 259, 122, 70, 126, 126, 126, 256, 257, 70,
- 126, 126, 126, 126, 126, 168, 149, 149, 123, 255,
- 260, 261, 256, 250, 123, 260, 180, 4, 5, 32,
- 109, 117, 118, 141, 142, 169, 181, 209, 210, 211,
- 124, 123, 170, 111, 4, 4, 71, 211, 1, 212,
- 215, 261, 171, 223, 70, 4, 10, 12, 13, 14,
- 29, 30, 31, 33, 62, 63, 64, 65, 73, 77,
- 79, 107, 111, 114, 115, 125, 146, 182, 197, 199,
- 205, 207, 219, 224, 228, 230, 232, 233, 234, 242,
- 243, 244, 247, 107, 264, 253, 14, 255, 14, 255,
- 255, 220, 111, 114, 221, 222, 234, 247, 229, 4,
- 4, 4, 248, 225, 125, 4, 235, 34, 35, 36,
- 37, 38, 39, 40, 41, 43, 44, 45, 46, 47,
- 119, 121, 122, 231, 195, 255, 10, 55, 56, 57,
- 58, 59, 60, 70, 245, 246, 255, 245, 246, 223,
- 70, 70, 223, 223, 125, 183, 198, 200, 111, 240,
- 241, 247, 206, 125, 111, 114, 247, 252, 14, 111,
- 114, 115, 127, 128, 129, 226, 234, 247, 255, 256,
- 255, 18, 19, 20, 21, 24, 99, 196, 10, 253,
- 255, 10, 253, 255, 107, 216, 217, 247, 247, 107,
- 107, 241, 190, 201, 202, 22, 70, 126, 195, 111,
- 208, 237, 255, 111, 236, 237, 255, 155, 255, 42,
- 48, 49, 54, 55, 56, 57, 58, 59, 60, 66,
- 67, 68, 69, 120, 122, 128, 129, 130, 131, 132,
- 133, 134, 135, 227, 123, 125, 253, 10, 253, 10,
- 99, 218, 70, 121, 121, 126, 11, 83, 185, 191,
- 4, 15, 78, 203, 4, 16, 80, 204, 247, 111,
- 240, 121, 22, 70, 126, 238, 22, 70, 126, 22,
- 256, 255, 121, 111, 114, 253, 253, 217, 264, 264,
- 237, 255, 75, 81, 82, 189, 4, 255, 4, 255,
- 4, 22, 233, 255, 111, 237, 17, 21, 24, 239,
- 255, 111, 237, 255, 123, 255, 126, 126, 4, 255,
- 255, 111, 247, 184, 214, 238, 238, 247, 125, 22,
- 125, 22, 4, 70, 4, 4, 70, 4, 70, 192,
- 4, 236, 255, 111, 114, 255, 255, 255, 255, 29,
- 61, 74, 193, 126, 126, 126, 4, 4, 4, 194,
- 247, 4, 223, 195, 217
+ 109, 137, 138, 139, 140, 141, 143, 144, 155, 158,
+ 163, 111, 112, 111, 122, 159, 164, 145, 111, 156,
+ 4, 0, 139, 4, 70, 4, 123, 160, 161, 4,
+ 107, 111, 114, 115, 250, 251, 50, 51, 52, 53,
+ 222, 4, 31, 100, 109, 117, 118, 140, 146, 149,
+ 150, 157, 158, 211, 212, 213, 111, 123, 111, 114,
+ 162, 262, 165, 107, 147, 4, 150, 102, 14, 30,
+ 76, 151, 152, 213, 4, 124, 84, 85, 86, 87,
+ 88, 89, 90, 91, 92, 93, 94, 96, 97, 98,
+ 171, 172, 173, 174, 175, 176, 177, 185, 186, 187,
+ 121, 111, 103, 104, 105, 106, 108, 112, 113, 116,
+ 246, 254, 261, 262, 263, 111, 153, 4, 115, 262,
+ 125, 125, 125, 125, 125, 125, 125, 4, 187, 263,
+ 107, 115, 252, 253, 254, 70, 185, 122, 154, 246,
+ 247, 248, 249, 253, 111, 114, 148, 107, 111, 50,
+ 51, 52, 53, 107, 111, 122, 178, 179, 111, 111,
+ 148, 148, 166, 121, 108, 100, 257, 258, 122, 70,
+ 126, 126, 126, 255, 256, 70, 126, 126, 126, 126,
+ 126, 167, 148, 123, 254, 259, 260, 255, 249, 123,
+ 259, 179, 4, 5, 32, 109, 117, 118, 141, 142,
+ 168, 180, 208, 209, 210, 124, 123, 169, 111, 4,
+ 4, 71, 210, 1, 211, 214, 260, 170, 222, 70,
+ 4, 10, 12, 13, 14, 29, 30, 31, 33, 62,
+ 63, 64, 65, 73, 77, 79, 107, 111, 114, 115,
+ 125, 146, 181, 196, 198, 204, 206, 218, 223, 227,
+ 229, 231, 232, 233, 241, 242, 243, 246, 107, 263,
+ 252, 14, 254, 14, 254, 254, 219, 111, 114, 220,
+ 221, 233, 246, 228, 4, 4, 4, 247, 224, 125,
+ 4, 234, 34, 35, 36, 37, 38, 39, 40, 41,
+ 43, 44, 45, 46, 47, 119, 121, 122, 230, 194,
+ 254, 10, 55, 56, 57, 58, 59, 60, 70, 244,
+ 245, 254, 244, 245, 222, 70, 70, 222, 222, 125,
+ 182, 197, 199, 111, 239, 240, 246, 205, 125, 111,
+ 114, 246, 251, 14, 111, 114, 115, 127, 128, 129,
+ 225, 233, 246, 254, 255, 254, 18, 19, 20, 21,
+ 24, 99, 195, 10, 252, 254, 10, 252, 254, 107,
+ 215, 216, 246, 246, 107, 107, 240, 189, 200, 201,
+ 22, 70, 126, 194, 111, 207, 236, 254, 111, 235,
+ 236, 254, 154, 254, 42, 48, 49, 54, 55, 56,
+ 57, 58, 59, 60, 66, 67, 68, 69, 120, 122,
+ 128, 129, 130, 131, 132, 133, 134, 135, 226, 123,
+ 125, 252, 10, 252, 10, 99, 217, 70, 121, 121,
+ 126, 11, 83, 184, 190, 4, 15, 78, 202, 4,
+ 16, 80, 203, 246, 111, 239, 121, 22, 70, 126,
+ 237, 22, 70, 126, 22, 255, 254, 121, 111, 114,
+ 252, 252, 216, 263, 263, 236, 254, 75, 81, 82,
+ 188, 4, 254, 4, 254, 4, 22, 232, 254, 111,
+ 236, 17, 21, 24, 238, 254, 111, 236, 254, 123,
+ 254, 126, 126, 4, 254, 254, 111, 246, 183, 213,
+ 237, 237, 246, 125, 22, 125, 22, 4, 70, 4,
+ 4, 70, 4, 70, 191, 4, 235, 254, 111, 114,
+ 254, 254, 254, 254, 29, 61, 74, 192, 126, 126,
+ 126, 4, 4, 4, 193, 246, 4, 222, 194, 216
};
#define yyerrok (yyerrstatus = 0)
@@ -2620,20 +2515,17 @@
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
-yy_stack_print (yybottom, yytop)
- yytype_int16 *yybottom;
- yytype_int16 *yytop;
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; yybottom <= yytop; yybottom++)
- {
- int yybot = *yybottom;
- YYFPRINTF (stderr, " %d", yybot);
- }
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
@@ -2669,11 +2561,11 @@
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, yyscanner, interp);
- YYFPRINTF (stderr, "\n");
+ fprintf (stderr, "\n");
}
}
@@ -2957,8 +2849,10 @@
break;
}
}
+
/* Prevent warnings from -Wmissing-prototypes. */
+
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -2977,9 +2871,10 @@
-/*-------------------------.
-| yyparse or yypush_parse. |
-`-------------------------*/
+
+/*----------.
+| yyparse. |
+`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -3004,46 +2899,22 @@
#endif
#endif
{
-/* The lookahead symbol. */
+ /* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
- /* Number of syntax errors so far. */
- int yynerrs;
-
- int yystate;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
-
- /* The stacks and their tools:
- `yyss': related to states.
- `yyvs': related to semantic values.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- yytype_int16 yyssa[YYINITDEPTH];
- yytype_int16 *yyss;
- yytype_int16 *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs;
- YYSTYPE *yyvsp;
-
- YYSIZE_T yystacksize;
+/* Number of syntax errors so far. */
+int yynerrs;
+ int yystate;
int yyn;
int yyresult;
- /* Lookahead token as an internal (translated) token number. */
- int yytoken;
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -3051,28 +2922,51 @@
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
- yytoken = 0;
- yyss = yyssa;
- yyvs = yyvsa;
- yystacksize = YYINITDEPTH;
-
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
+
yyssp = yyss;
yyvsp = yyvs;
@@ -3102,6 +2996,7 @@
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
+
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@@ -3109,6 +3004,7 @@
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
+
&yystacksize);
yyss = yyss1;
@@ -3131,8 +3027,9 @@
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss_alloc, yyss);
- YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -3143,6 +3040,7 @@
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
+
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -3152,9 +3050,6 @@
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- if (yystate == YYFINAL)
- YYACCEPT;
-
goto yybackup;
/*-----------.
@@ -3163,16 +3058,16 @@
yybackup:
/* Do appropriate processing given the current state. Read a
- lookahead token if we need one and don't already have one. */
+ look-ahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -3204,16 +3099,20 @@
goto yyreduce;
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the lookahead token. */
+ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token. */
- yychar = YYEMPTY;
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3253,30 +3152,22 @@
switch (yyn)
{
case 2:
-
-/* Line 1455 of yacc.c */
-#line 1166 "compilers/imcc/imcc.y"
+#line 1081 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
-
-/* Line 1455 of yacc.c */
-#line 1175 "compilers/imcc/imcc.y"
+#line 1090 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
-
-/* Line 1455 of yacc.c */
-#line 1176 "compilers/imcc/imcc.y"
+#line 1091 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
-
-/* Line 1455 of yacc.c */
-#line 1178 "compilers/imcc/imcc.y"
+#line 1093 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3285,9 +3176,7 @@
break;
case 8:
-
-/* Line 1455 of yacc.c */
-#line 1184 "compilers/imcc/imcc.y"
+#line 1099 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3296,44 +3185,32 @@
break;
case 9:
-
-/* Line 1455 of yacc.c */
-#line 1189 "compilers/imcc/imcc.y"
+#line 1104 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
-
-/* Line 1455 of yacc.c */
-#line 1190 "compilers/imcc/imcc.y"
+#line 1105 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
-
-/* Line 1455 of yacc.c */
-#line 1191 "compilers/imcc/imcc.y"
+#line 1106 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
-
-/* Line 1455 of yacc.c */
-#line 1192 "compilers/imcc/imcc.y"
+#line 1107 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
-
-/* Line 1455 of yacc.c */
-#line 1196 "compilers/imcc/imcc.y"
+#line 1111 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
-
-/* Line 1455 of yacc.c */
-#line 1198 "compilers/imcc/imcc.y"
+#line 1113 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
do_loadlib(interp, (yyvsp[(2) - (3)].s));
@@ -3342,9 +3219,7 @@
break;
case 15:
-
-/* Line 1455 of yacc.c */
-#line 1207 "compilers/imcc/imcc.y"
+#line 1122 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
/* set_filename() frees the STRINGC */
@@ -3353,9 +3228,7 @@
break;
case 16:
-
-/* Line 1455 of yacc.c */
-#line 1213 "compilers/imcc/imcc.y"
+#line 1128 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
set_filename(interp, (yyvsp[(2) - (3)].s));
@@ -3363,9 +3236,7 @@
break;
case 17:
-
-/* Line 1455 of yacc.c */
-#line 1221 "compilers/imcc/imcc.y"
+#line 1136 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
* store annotation like it's an instruction. */
@@ -3376,9 +3247,7 @@
break;
case 18:
-
-/* Line 1455 of yacc.c */
-#line 1233 "compilers/imcc/imcc.y"
+#line 1148 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp),
@@ -3391,16 +3260,12 @@
break;
case 19:
-
-/* Line 1455 of yacc.c */
-#line 1245 "compilers/imcc/imcc.y"
+#line 1160 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
-
-/* Line 1455 of yacc.c */
-#line 1246 "compilers/imcc/imcc.y"
+#line 1161 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
mem_sys_free((yyvsp[(4) - (6)].s));
@@ -3409,34 +3274,12 @@
break;
case 21:
-
-/* Line 1455 of yacc.c */
-#line 1254 "compilers/imcc/imcc.y"
+#line 1169 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
-
-/* Line 1455 of yacc.c */
-#line 1255 "compilers/imcc/imcc.y"
- {
- (yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
- mem_sys_free((yyvsp[(6) - (6)].s));
- IMCC_INFO(interp)->is_def = 0;
- }
- break;
-
- case 23:
-
-/* Line 1455 of yacc.c */
-#line 1261 "compilers/imcc/imcc.y"
- { IMCC_INFO(interp)->is_def = 1; }
- break;
-
- case 24:
-
-/* Line 1455 of yacc.c */
-#line 1262 "compilers/imcc/imcc.y"
+#line 1170 "compilers/imcc/imcc.y"
{
(yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
mem_sys_free((yyvsp[(3) - (6)].s));
@@ -3445,52 +3288,38 @@
}
break;
- case 29:
-
-/* Line 1455 of yacc.c */
-#line 1280 "compilers/imcc/imcc.y"
+ case 27:
+#line 1188 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 30:
-
-/* Line 1455 of yacc.c */
-#line 1281 "compilers/imcc/imcc.y"
+ case 28:
+#line 1189 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 31:
-
-/* Line 1455 of yacc.c */
-#line 1282 "compilers/imcc/imcc.y"
+ case 29:
+#line 1190 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 32:
-
-/* Line 1455 of yacc.c */
-#line 1283 "compilers/imcc/imcc.y"
+ case 30:
+#line 1191 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 33:
-
-/* Line 1455 of yacc.c */
-#line 1284 "compilers/imcc/imcc.y"
+ case 31:
+#line 1192 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 36:
-
-/* Line 1455 of yacc.c */
-#line 1289 "compilers/imcc/imcc.y"
+ case 34:
+#line 1197 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
- case 37:
-
-/* Line 1455 of yacc.c */
-#line 1291 "compilers/imcc/imcc.y"
+ case 35:
+#line 1199 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
(yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
@@ -3499,20 +3328,16 @@
}
break;
- case 38:
-
-/* Line 1455 of yacc.c */
-#line 1298 "compilers/imcc/imcc.y"
+ case 36:
+#line 1206 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
}
break;
- case 39:
-
-/* Line 1455 of yacc.c */
-#line 1303 "compilers/imcc/imcc.y"
+ case 37:
+#line 1211 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
IMCC_INFO(interp)->cur_unit,
@@ -3522,19 +3347,15 @@
}
break;
- case 40:
-
-/* Line 1455 of yacc.c */
-#line 1311 "compilers/imcc/imcc.y"
+ case 38:
+#line 1219 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
}
break;
- case 41:
-
-/* Line 1455 of yacc.c */
-#line 1315 "compilers/imcc/imcc.y"
+ case 39:
+#line 1223 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3549,24 +3370,18 @@
}
break;
- case 42:
-
-/* Line 1455 of yacc.c */
-#line 1327 "compilers/imcc/imcc.y"
+ case 40:
+#line 1235 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
- case 44:
-
-/* Line 1455 of yacc.c */
-#line 1335 "compilers/imcc/imcc.y"
+ case 42:
+#line 1243 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
- case 45:
-
-/* Line 1455 of yacc.c */
-#line 1338 "compilers/imcc/imcc.y"
+ case 43:
+#line 1246 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3576,10 +3391,8 @@
}
break;
- case 48:
-
-/* Line 1455 of yacc.c */
-#line 1354 "compilers/imcc/imcc.y"
+ case 46:
+#line 1262 "compilers/imcc/imcc.y"
{
int re_open = 0;
(yyval.i) = 0;
@@ -3593,33 +3406,25 @@
}
break;
- case 49:
-
-/* Line 1455 of yacc.c */
-#line 1368 "compilers/imcc/imcc.y"
+ case 47:
+#line 1276 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
- case 50:
-
-/* Line 1455 of yacc.c */
-#line 1369 "compilers/imcc/imcc.y"
+ case 48:
+#line 1277 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
- case 51:
-
-/* Line 1455 of yacc.c */
-#line 1373 "compilers/imcc/imcc.y"
+ case 49:
+#line 1281 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 52:
-
-/* Line 1455 of yacc.c */
-#line 1377 "compilers/imcc/imcc.y"
+ case 50:
+#line 1285 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -3627,45 +3432,35 @@
}
break;
- case 53:
-
-/* Line 1455 of yacc.c */
-#line 1385 "compilers/imcc/imcc.y"
+ case 51:
+#line 1293 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
- case 54:
-
-/* Line 1455 of yacc.c */
-#line 1387 "compilers/imcc/imcc.y"
+ case 52:
+#line 1295 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
}
break;
- case 55:
-
-/* Line 1455 of yacc.c */
-#line 1395 "compilers/imcc/imcc.y"
+ case 53:
+#line 1303 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
}
break;
- case 56:
-
-/* Line 1455 of yacc.c */
-#line 1399 "compilers/imcc/imcc.y"
+ case 54:
+#line 1307 "compilers/imcc/imcc.y"
{
iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
}
break;
- case 57:
-
-/* Line 1455 of yacc.c */
-#line 1403 "compilers/imcc/imcc.y"
+ case 55:
+#line 1311 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
@@ -3675,31 +3470,23 @@
}
break;
- case 58:
-
-/* Line 1455 of yacc.c */
-#line 1411 "compilers/imcc/imcc.y"
+ case 56:
+#line 1319 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 59:
-
-/* Line 1455 of yacc.c */
-#line 1415 "compilers/imcc/imcc.y"
+ case 57:
+#line 1323 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 60:
-
-/* Line 1455 of yacc.c */
-#line 1416 "compilers/imcc/imcc.y"
+ case 58:
+#line 1324 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 61:
-
-/* Line 1455 of yacc.c */
-#line 1418 "compilers/imcc/imcc.y"
+ case 59:
+#line 1326 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
@@ -3711,24 +3498,18 @@
}
break;
- case 62:
-
-/* Line 1455 of yacc.c */
-#line 1430 "compilers/imcc/imcc.y"
+ case 60:
+#line 1338 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 63:
-
-/* Line 1455 of yacc.c */
-#line 1430 "compilers/imcc/imcc.y"
+ case 61:
+#line 1338 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
- case 64:
-
-/* Line 1455 of yacc.c */
-#line 1435 "compilers/imcc/imcc.y"
+ case 62:
+#line 1343 "compilers/imcc/imcc.y"
{
if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') {
const char *type;
@@ -3750,17 +3531,13 @@
}
break;
- case 65:
-
-/* Line 1455 of yacc.c */
-#line 1459 "compilers/imcc/imcc.y"
+ case 63:
+#line 1367 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 66:
-
-/* Line 1455 of yacc.c */
-#line 1464 "compilers/imcc/imcc.y"
+ case 64:
+#line 1372 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3768,10 +3545,8 @@
}
break;
- case 67:
-
-/* Line 1455 of yacc.c */
-#line 1470 "compilers/imcc/imcc.y"
+ case 65:
+#line 1378 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3779,10 +3554,8 @@
}
break;
- case 68:
-
-/* Line 1455 of yacc.c */
-#line 1479 "compilers/imcc/imcc.y"
+ case 66:
+#line 1387 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
@@ -3790,10 +3563,8 @@
}
break;
- case 69:
-
-/* Line 1455 of yacc.c */
-#line 1485 "compilers/imcc/imcc.y"
+ case 67:
+#line 1393 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
@@ -3801,21 +3572,17 @@
}
break;
- case 70:
-
-/* Line 1455 of yacc.c */
-#line 1494 "compilers/imcc/imcc.y"
+ case 68:
+#line 1402 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = NULL;
IMCC_INFO(interp)->cur_unit->is_method = 1;
}
- break;
-
- case 71:
+ break;
-/* Line 1455 of yacc.c */
-#line 1500 "compilers/imcc/imcc.y"
+ case 69:
+#line 1408 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3823,10 +3590,8 @@
}
break;
- case 72:
-
-/* Line 1455 of yacc.c */
-#line 1509 "compilers/imcc/imcc.y"
+ case 70:
+#line 1417 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL;
@@ -3834,10 +3599,8 @@
}
break;
- case 73:
-
-/* Line 1455 of yacc.c */
-#line 1515 "compilers/imcc/imcc.y"
+ case 71:
+#line 1423 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3845,30 +3608,24 @@
}
break;
- case 74:
-
-/* Line 1455 of yacc.c */
-#line 1524 "compilers/imcc/imcc.y"
+ case 72:
+#line 1432 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
}
break;
- case 75:
-
-/* Line 1455 of yacc.c */
-#line 1532 "compilers/imcc/imcc.y"
+ case 73:
+#line 1440 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = NULL;
}
break;
- case 76:
-
-/* Line 1455 of yacc.c */
-#line 1537 "compilers/imcc/imcc.y"
+ case 74:
+#line 1445 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3877,67 +3634,51 @@
}
break;
- case 77:
-
-/* Line 1455 of yacc.c */
-#line 1547 "compilers/imcc/imcc.y"
+ case 75:
+#line 1455 "compilers/imcc/imcc.y"
{
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
}
break;
- case 78:
-
-/* Line 1455 of yacc.c */
-#line 1551 "compilers/imcc/imcc.y"
+ case 76:
+#line 1459 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
}
break;
- case 79:
-
-/* Line 1455 of yacc.c */
-#line 1556 "compilers/imcc/imcc.y"
+ case 77:
+#line 1464 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
}
break;
- case 80:
-
-/* Line 1455 of yacc.c */
-#line 1563 "compilers/imcc/imcc.y"
+ case 78:
+#line 1471 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
- case 81:
-
-/* Line 1455 of yacc.c */
-#line 1564 "compilers/imcc/imcc.y"
+ case 79:
+#line 1472 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
- case 82:
-
-/* Line 1455 of yacc.c */
-#line 1565 "compilers/imcc/imcc.y"
+ case 80:
+#line 1473 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
- case 83:
-
-/* Line 1455 of yacc.c */
-#line 1566 "compilers/imcc/imcc.y"
+ case 81:
+#line 1474 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
- case 84:
-
-/* Line 1455 of yacc.c */
-#line 1568 "compilers/imcc/imcc.y"
+ case 82:
+#line 1476 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3950,10 +3691,8 @@
}
break;
- case 85:
-
-/* Line 1455 of yacc.c */
-#line 1579 "compilers/imcc/imcc.y"
+ case 83:
+#line 1487 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3966,17 +3705,13 @@
}
break;
- case 86:
-
-/* Line 1455 of yacc.c */
-#line 1589 "compilers/imcc/imcc.y"
+ case 84:
+#line 1497 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
- case 89:
-
-/* Line 1455 of yacc.c */
-#line 1599 "compilers/imcc/imcc.y"
+ case 87:
+#line 1507 "compilers/imcc/imcc.y"
{
char name[128];
SymReg *r, *r1;
@@ -4000,188 +3735,140 @@
}
break;
- case 90:
-
-/* Line 1455 of yacc.c */
-#line 1625 "compilers/imcc/imcc.y"
+ case 88:
+#line 1533 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 91:
-
-/* Line 1455 of yacc.c */
-#line 1629 "compilers/imcc/imcc.y"
+ case 89:
+#line 1537 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
- case 92:
-
-/* Line 1455 of yacc.c */
-#line 1630 "compilers/imcc/imcc.y"
+ case 90:
+#line 1538 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
- case 93:
-
-/* Line 1455 of yacc.c */
-#line 1634 "compilers/imcc/imcc.y"
+ case 91:
+#line 1542 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
- case 94:
-
-/* Line 1455 of yacc.c */
-#line 1635 "compilers/imcc/imcc.y"
+ case 92:
+#line 1543 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
- case 95:
-
-/* Line 1455 of yacc.c */
-#line 1639 "compilers/imcc/imcc.y"
+ case 93:
+#line 1547 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 97:
-
-/* Line 1455 of yacc.c */
-#line 1644 "compilers/imcc/imcc.y"
+ case 95:
+#line 1552 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
- case 98:
-
-/* Line 1455 of yacc.c */
-#line 1645 "compilers/imcc/imcc.y"
+ case 96:
+#line 1553 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 99:
-
-/* Line 1455 of yacc.c */
-#line 1649 "compilers/imcc/imcc.y"
+ case 97:
+#line 1557 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
- case 100:
-
-/* Line 1455 of yacc.c */
-#line 1650 "compilers/imcc/imcc.y"
+ case 98:
+#line 1558 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
- case 101:
-
-/* Line 1455 of yacc.c */
-#line 1651 "compilers/imcc/imcc.y"
+ case 99:
+#line 1559 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
- case 102:
-
-/* Line 1455 of yacc.c */
-#line 1652 "compilers/imcc/imcc.y"
+ case 100:
+#line 1560 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
- case 103:
-
-/* Line 1455 of yacc.c */
-#line 1653 "compilers/imcc/imcc.y"
+ case 101:
+#line 1561 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
- case 104:
-
-/* Line 1455 of yacc.c */
-#line 1654 "compilers/imcc/imcc.y"
+ case 102:
+#line 1562 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
- case 105:
-
-/* Line 1455 of yacc.c */
-#line 1655 "compilers/imcc/imcc.y"
+ case 103:
+#line 1563 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
- case 113:
-
-/* Line 1455 of yacc.c */
-#line 1667 "compilers/imcc/imcc.y"
+ case 111:
+#line 1575 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 114:
-
-/* Line 1455 of yacc.c */
-#line 1672 "compilers/imcc/imcc.y"
+ case 112:
+#line 1580 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 115:
-
-/* Line 1455 of yacc.c */
-#line 1676 "compilers/imcc/imcc.y"
+ case 113:
+#line 1584 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 116:
-
-/* Line 1455 of yacc.c */
-#line 1680 "compilers/imcc/imcc.y"
+ case 114:
+#line 1588 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 117:
-
-/* Line 1455 of yacc.c */
-#line 1684 "compilers/imcc/imcc.y"
+ case 115:
+#line 1592 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
}
break;
- case 118:
-
-/* Line 1455 of yacc.c */
-#line 1688 "compilers/imcc/imcc.y"
+ case 116:
+#line 1596 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 119:
-
-/* Line 1455 of yacc.c */
-#line 1693 "compilers/imcc/imcc.y"
+ case 117:
+#line 1601 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
}
break;
- case 120:
-
-/* Line 1455 of yacc.c */
-#line 1701 "compilers/imcc/imcc.y"
+ case 118:
+#line 1609 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 121:
-
-/* Line 1455 of yacc.c */
-#line 1702 "compilers/imcc/imcc.y"
+ case 119:
+#line 1610 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
@@ -4193,48 +3880,36 @@
}
break;
- case 122:
-
-/* Line 1455 of yacc.c */
-#line 1714 "compilers/imcc/imcc.y"
+ case 120:
+#line 1622 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
- case 123:
-
-/* Line 1455 of yacc.c */
-#line 1719 "compilers/imcc/imcc.y"
+ case 121:
+#line 1627 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 124:
-
-/* Line 1455 of yacc.c */
-#line 1721 "compilers/imcc/imcc.y"
+ case 122:
+#line 1629 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
- case 125:
-
-/* Line 1455 of yacc.c */
-#line 1728 "compilers/imcc/imcc.y"
+ case 123:
+#line 1636 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 126:
-
-/* Line 1455 of yacc.c */
-#line 1729 "compilers/imcc/imcc.y"
+ case 124:
+#line 1637 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 127:
-
-/* Line 1455 of yacc.c */
-#line 1730 "compilers/imcc/imcc.y"
+ case 125:
+#line 1638 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
SymReg *ignored;
@@ -4245,227 +3920,169 @@
}
break;
- case 128:
-
-/* Line 1455 of yacc.c */
-#line 1741 "compilers/imcc/imcc.y"
+ case 126:
+#line 1649 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 129:
-
-/* Line 1455 of yacc.c */
-#line 1742 "compilers/imcc/imcc.y"
+ case 127:
+#line 1650 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 130:
-
-/* Line 1455 of yacc.c */
-#line 1746 "compilers/imcc/imcc.y"
+ case 128:
+#line 1654 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
- case 131:
-
-/* Line 1455 of yacc.c */
-#line 1747 "compilers/imcc/imcc.y"
+ case 129:
+#line 1655 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
- case 132:
-
-/* Line 1455 of yacc.c */
-#line 1748 "compilers/imcc/imcc.y"
+ case 130:
+#line 1656 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
- case 133:
-
-/* Line 1455 of yacc.c */
-#line 1749 "compilers/imcc/imcc.y"
+ case 131:
+#line 1657 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
- case 134:
-
-/* Line 1455 of yacc.c */
-#line 1750 "compilers/imcc/imcc.y"
+ case 132:
+#line 1658 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
- case 135:
-
-/* Line 1455 of yacc.c */
-#line 1751 "compilers/imcc/imcc.y"
+ case 133:
+#line 1659 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
- case 136:
-
-/* Line 1455 of yacc.c */
-#line 1752 "compilers/imcc/imcc.y"
+ case 134:
+#line 1660 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 137:
-
-/* Line 1455 of yacc.c */
-#line 1753 "compilers/imcc/imcc.y"
+ case 135:
+#line 1661 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
- case 138:
-
-/* Line 1455 of yacc.c */
-#line 1758 "compilers/imcc/imcc.y"
+ case 136:
+#line 1666 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
- case 139:
-
-/* Line 1455 of yacc.c */
-#line 1760 "compilers/imcc/imcc.y"
+ case 137:
+#line 1668 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
- case 140:
-
-/* Line 1455 of yacc.c */
-#line 1762 "compilers/imcc/imcc.y"
+ case 138:
+#line 1670 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.i) = 0;
}
break;
- case 141:
-
-/* Line 1455 of yacc.c */
-#line 1769 "compilers/imcc/imcc.y"
+ case 139:
+#line 1677 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
- case 142:
-
-/* Line 1455 of yacc.c */
-#line 1771 "compilers/imcc/imcc.y"
+ case 140:
+#line 1679 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
- case 143:
-
-/* Line 1455 of yacc.c */
-#line 1775 "compilers/imcc/imcc.y"
+ case 141:
+#line 1683 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 144:
-
-/* Line 1455 of yacc.c */
-#line 1777 "compilers/imcc/imcc.y"
+ case 142:
+#line 1685 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
- case 145:
-
-/* Line 1455 of yacc.c */
-#line 1782 "compilers/imcc/imcc.y"
+ case 143:
+#line 1690 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
- case 146:
-
-/* Line 1455 of yacc.c */
-#line 1789 "compilers/imcc/imcc.y"
+ case 144:
+#line 1697 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 147:
-
-/* Line 1455 of yacc.c */
-#line 1791 "compilers/imcc/imcc.y"
+ case 145:
+#line 1699 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
- case 148:
-
-/* Line 1455 of yacc.c */
-#line 1796 "compilers/imcc/imcc.y"
+ case 146:
+#line 1704 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
- case 149:
-
-/* Line 1455 of yacc.c */
-#line 1803 "compilers/imcc/imcc.y"
+ case 147:
+#line 1711 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 150:
-
-/* Line 1455 of yacc.c */
-#line 1807 "compilers/imcc/imcc.y"
+ case 148:
+#line 1715 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
- case 151:
-
-/* Line 1455 of yacc.c */
-#line 1812 "compilers/imcc/imcc.y"
+ case 149:
+#line 1720 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
}
break;
- case 152:
-
-/* Line 1455 of yacc.c */
-#line 1817 "compilers/imcc/imcc.y"
+ case 150:
+#line 1725 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.t) = 0;
}
break;
- case 153:
-
-/* Line 1455 of yacc.c */
-#line 1824 "compilers/imcc/imcc.y"
+ case 151:
+#line 1732 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 154:
-
-/* Line 1455 of yacc.c */
-#line 1825 "compilers/imcc/imcc.y"
+ case 152:
+#line 1733 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
- case 155:
-
-/* Line 1455 of yacc.c */
-#line 1829 "compilers/imcc/imcc.y"
+ case 153:
+#line 1737 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 156:
-
-/* Line 1455 of yacc.c */
-#line 1831 "compilers/imcc/imcc.y"
+ case 154:
+#line 1739 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4477,20 +4094,16 @@
}
break;
- case 157:
-
-/* Line 1455 of yacc.c */
-#line 1841 "compilers/imcc/imcc.y"
+ case 155:
+#line 1749 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
}
break;
- case 158:
-
-/* Line 1455 of yacc.c */
-#line 1846 "compilers/imcc/imcc.y"
+ case 156:
+#line 1754 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4502,76 +4115,56 @@
}
break;
- case 159:
-
-/* Line 1455 of yacc.c */
-#line 1856 "compilers/imcc/imcc.y"
+ case 157:
+#line 1764 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
}
break;
- case 162:
-
-/* Line 1455 of yacc.c */
-#line 1877 "compilers/imcc/imcc.y"
+ case 160:
+#line 1785 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
- case 163:
-
-/* Line 1455 of yacc.c */
-#line 1882 "compilers/imcc/imcc.y"
+ case 161:
+#line 1790 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
- case 164:
-
-/* Line 1455 of yacc.c */
-#line 1883 "compilers/imcc/imcc.y"
+ case 162:
+#line 1791 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 165:
-
-/* Line 1455 of yacc.c */
-#line 1884 "compilers/imcc/imcc.y"
+ case 163:
+#line 1792 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 166:
-
-/* Line 1455 of yacc.c */
-#line 1885 "compilers/imcc/imcc.y"
+ case 164:
+#line 1793 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 167:
-
-/* Line 1455 of yacc.c */
-#line 1886 "compilers/imcc/imcc.y"
+ case 165:
+#line 1794 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 168:
-
-/* Line 1455 of yacc.c */
-#line 1887 "compilers/imcc/imcc.y"
+ case 166:
+#line 1795 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 169:
-
-/* Line 1455 of yacc.c */
-#line 1891 "compilers/imcc/imcc.y"
+ case 167:
+#line 1799 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
- case 173:
-
-/* Line 1455 of yacc.c */
-#line 1902 "compilers/imcc/imcc.y"
+ case 171:
+#line 1810 "compilers/imcc/imcc.y"
{
Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
mem_sys_free((yyvsp[(1) - (1)].s));
@@ -4579,17 +4172,13 @@
}
break;
- case 174:
-
-/* Line 1455 of yacc.c */
-#line 1912 "compilers/imcc/imcc.y"
+ case 172:
+#line 1820 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
- case 175:
-
-/* Line 1455 of yacc.c */
-#line 1914 "compilers/imcc/imcc.y"
+ case 173:
+#line 1822 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4599,10 +4188,8 @@
}
break;
- case 176:
-
-/* Line 1455 of yacc.c */
-#line 1925 "compilers/imcc/imcc.y"
+ case 174:
+#line 1833 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
l->next = NULL;
@@ -4610,10 +4197,8 @@
}
break;
- case 177:
-
-/* Line 1455 of yacc.c */
-#line 1932 "compilers/imcc/imcc.y"
+ case 175:
+#line 1840 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
l->next = (yyvsp[(1) - (3)].idlist);
@@ -4621,10 +4206,8 @@
}
break;
- case 178:
-
-/* Line 1455 of yacc.c */
-#line 1941 "compilers/imcc/imcc.y"
+ case 176:
+#line 1849 "compilers/imcc/imcc.y"
{
IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
l->id = (yyvsp[(1) - (2)].s);
@@ -4632,17 +4215,13 @@
}
break;
- case 183:
-
-/* Line 1455 of yacc.c */
-#line 1957 "compilers/imcc/imcc.y"
+ case 181:
+#line 1865 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 184:
-
-/* Line 1455 of yacc.c */
-#line 1958 "compilers/imcc/imcc.y"
+ case 182:
+#line 1866 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
while (l) {
@@ -4657,10 +4236,8 @@
}
break;
- case 185:
-
-/* Line 1455 of yacc.c */
-#line 1971 "compilers/imcc/imcc.y"
+ case 183:
+#line 1879 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4679,10 +4256,8 @@
}
break;
- case 186:
-
-/* Line 1455 of yacc.c */
-#line 1988 "compilers/imcc/imcc.y"
+ case 184:
+#line 1896 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4697,17 +4272,13 @@
}
break;
- case 187:
-
-/* Line 1455 of yacc.c */
-#line 2000 "compilers/imcc/imcc.y"
+ case 185:
+#line 1908 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 188:
-
-/* Line 1455 of yacc.c */
-#line 2001 "compilers/imcc/imcc.y"
+ case 186:
+#line 1909 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
IMCC_INFO(interp)->is_def = 0;
@@ -4715,17 +4286,13 @@
}
break;
- case 190:
-
-/* Line 1455 of yacc.c */
-#line 2008 "compilers/imcc/imcc.y"
+ case 188:
+#line 1916 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
- case 191:
-
-/* Line 1455 of yacc.c */
-#line 2009 "compilers/imcc/imcc.y"
+ case 189:
+#line 1917 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
IMCC_INFO(interp)->is_def = 0;
@@ -4733,10 +4300,8 @@
}
break;
- case 192:
-
-/* Line 1455 of yacc.c */
-#line 2015 "compilers/imcc/imcc.y"
+ case 190:
+#line 1923 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
IMCC_INFO(interp)->cur_call->pcc_sub->tailcall = 1;
@@ -4744,19 +4309,15 @@
}
break;
- case 193:
-
-/* Line 1455 of yacc.c */
-#line 2021 "compilers/imcc/imcc.y"
+ case 191:
+#line 1929 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
}
break;
- case 194:
-
-/* Line 1455 of yacc.c */
-#line 2025 "compilers/imcc/imcc.y"
+ case 192:
+#line 1933 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
IMCC_INFO(interp)->cur_unit,
@@ -4770,101 +4331,73 @@
}
break;
- case 195:
-
-/* Line 1455 of yacc.c */
-#line 2036 "compilers/imcc/imcc.y"
+ case 193:
+#line 1944 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
- case 196:
-
-/* Line 1455 of yacc.c */
-#line 2037 "compilers/imcc/imcc.y"
+ case 194:
+#line 1945 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
- case 197:
-
-/* Line 1455 of yacc.c */
-#line 2038 "compilers/imcc/imcc.y"
+ case 195:
+#line 1946 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 200:
-
-/* Line 1455 of yacc.c */
-#line 2041 "compilers/imcc/imcc.y"
+ case 198:
+#line 1949 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
- case 201:
-
-/* Line 1455 of yacc.c */
-#line 2045 "compilers/imcc/imcc.y"
+ case 199:
+#line 1953 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
- case 202:
-
-/* Line 1455 of yacc.c */
-#line 2046 "compilers/imcc/imcc.y"
+ case 200:
+#line 1954 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
- case 203:
-
-/* Line 1455 of yacc.c */
-#line 2047 "compilers/imcc/imcc.y"
+ case 201:
+#line 1955 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
- case 204:
-
-/* Line 1455 of yacc.c */
-#line 2048 "compilers/imcc/imcc.y"
+ case 202:
+#line 1956 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
- case 205:
-
-/* Line 1455 of yacc.c */
-#line 2053 "compilers/imcc/imcc.y"
+ case 203:
+#line 1961 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
- case 206:
-
-/* Line 1455 of yacc.c */
-#line 2055 "compilers/imcc/imcc.y"
+ case 204:
+#line 1963 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
break;
- case 207:
-
-/* Line 1455 of yacc.c */
-#line 2057 "compilers/imcc/imcc.y"
+ case 205:
+#line 1965 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); }
break;
- case 208:
-
-/* Line 1455 of yacc.c */
-#line 2059 "compilers/imcc/imcc.y"
+ case 206:
+#line 1967 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
break;
- case 209:
-
-/* Line 1455 of yacc.c */
-#line 2061 "compilers/imcc/imcc.y"
+ case 207:
+#line 1969 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
break;
- case 210:
-
-/* Line 1455 of yacc.c */
-#line 2064 "compilers/imcc/imcc.y"
+ case 208:
+#line 1972 "compilers/imcc/imcc.y"
{
add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4872,220 +4405,160 @@
}
break;
- case 211:
-
-/* Line 1455 of yacc.c */
-#line 2070 "compilers/imcc/imcc.y"
+ case 209:
+#line 1978 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
}
break;
- case 212:
-
-/* Line 1455 of yacc.c */
-#line 2074 "compilers/imcc/imcc.y"
+ case 210:
+#line 1982 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
IMCC_INFO(interp)->cur_call = NULL;
}
break;
- case 216:
-
-/* Line 1455 of yacc.c */
-#line 2082 "compilers/imcc/imcc.y"
+ case 214:
+#line 1990 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
}
break;
- case 217:
-
-/* Line 1455 of yacc.c */
-#line 2089 "compilers/imcc/imcc.y"
+ case 215:
+#line 1997 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
- case 218:
-
-/* Line 1455 of yacc.c */
-#line 2090 "compilers/imcc/imcc.y"
+ case 216:
+#line 1998 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
- case 219:
-
-/* Line 1455 of yacc.c */
-#line 2091 "compilers/imcc/imcc.y"
+ case 217:
+#line 1999 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
- case 220:
-
-/* Line 1455 of yacc.c */
-#line 2095 "compilers/imcc/imcc.y"
+ case 218:
+#line 2003 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 221:
-
-/* Line 1455 of yacc.c */
-#line 2096 "compilers/imcc/imcc.y"
+ case 219:
+#line 2004 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 222:
-
-/* Line 1455 of yacc.c */
-#line 2097 "compilers/imcc/imcc.y"
+ case 220:
+#line 2005 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 223:
-
-/* Line 1455 of yacc.c */
-#line 2098 "compilers/imcc/imcc.y"
+ case 221:
+#line 2006 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 224:
-
-/* Line 1455 of yacc.c */
-#line 2099 "compilers/imcc/imcc.y"
+ case 222:
+#line 2007 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 225:
-
-/* Line 1455 of yacc.c */
-#line 2100 "compilers/imcc/imcc.y"
+ case 223:
+#line 2008 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 226:
-
-/* Line 1455 of yacc.c */
-#line 2101 "compilers/imcc/imcc.y"
+ case 224:
+#line 2009 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
- case 227:
-
-/* Line 1455 of yacc.c */
-#line 2102 "compilers/imcc/imcc.y"
+ case 225:
+#line 2010 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 228:
-
-/* Line 1455 of yacc.c */
-#line 2103 "compilers/imcc/imcc.y"
+ case 226:
+#line 2011 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
- case 229:
-
-/* Line 1455 of yacc.c */
-#line 2104 "compilers/imcc/imcc.y"
+ case 227:
+#line 2012 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
- case 230:
-
-/* Line 1455 of yacc.c */
-#line 2105 "compilers/imcc/imcc.y"
+ case 228:
+#line 2013 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
- case 231:
-
-/* Line 1455 of yacc.c */
-#line 2106 "compilers/imcc/imcc.y"
+ case 229:
+#line 2014 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
- case 232:
-
-/* Line 1455 of yacc.c */
-#line 2107 "compilers/imcc/imcc.y"
+ case 230:
+#line 2015 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
- case 233:
-
-/* Line 1455 of yacc.c */
-#line 2108 "compilers/imcc/imcc.y"
+ case 231:
+#line 2016 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
- case 234:
-
-/* Line 1455 of yacc.c */
-#line 2109 "compilers/imcc/imcc.y"
+ case 232:
+#line 2017 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 235:
-
-/* Line 1455 of yacc.c */
-#line 2110 "compilers/imcc/imcc.y"
+ case 233:
+#line 2018 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 236:
-
-/* Line 1455 of yacc.c */
-#line 2111 "compilers/imcc/imcc.y"
+ case 234:
+#line 2019 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 237:
-
-/* Line 1455 of yacc.c */
-#line 2112 "compilers/imcc/imcc.y"
+ case 235:
+#line 2020 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
- case 238:
-
-/* Line 1455 of yacc.c */
-#line 2113 "compilers/imcc/imcc.y"
+ case 236:
+#line 2021 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
- case 239:
-
-/* Line 1455 of yacc.c */
-#line 2114 "compilers/imcc/imcc.y"
+ case 237:
+#line 2022 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
- case 240:
-
-/* Line 1455 of yacc.c */
-#line 2115 "compilers/imcc/imcc.y"
+ case 238:
+#line 2023 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 241:
-
-/* Line 1455 of yacc.c */
-#line 2116 "compilers/imcc/imcc.y"
+ case 239:
+#line 2024 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 242:
-
-/* Line 1455 of yacc.c */
-#line 2117 "compilers/imcc/imcc.y"
+ case 240:
+#line 2025 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 243:
-
-/* Line 1455 of yacc.c */
-#line 2123 "compilers/imcc/imcc.y"
+ case 241:
+#line 2031 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
(yyval.i)->type &= ~ITCALL;
@@ -5093,115 +4566,83 @@
}
break;
- case 244:
-
-/* Line 1455 of yacc.c */
-#line 2128 "compilers/imcc/imcc.y"
+ case 242:
+#line 2036 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 245:
-
-/* Line 1455 of yacc.c */
-#line 2135 "compilers/imcc/imcc.y"
+ case 243:
+#line 2043 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
- case 246:
-
-/* Line 1455 of yacc.c */
-#line 2139 "compilers/imcc/imcc.y"
+ case 244:
+#line 2047 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 247:
-
-/* Line 1455 of yacc.c */
-#line 2140 "compilers/imcc/imcc.y"
+ case 245:
+#line 2048 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 248:
-
-/* Line 1455 of yacc.c */
-#line 2141 "compilers/imcc/imcc.y"
+ case 246:
+#line 2049 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 249:
-
-/* Line 1455 of yacc.c */
-#line 2142 "compilers/imcc/imcc.y"
+ case 247:
+#line 2050 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 250:
-
-/* Line 1455 of yacc.c */
-#line 2143 "compilers/imcc/imcc.y"
+ case 248:
+#line 2051 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 251:
-
-/* Line 1455 of yacc.c */
-#line 2144 "compilers/imcc/imcc.y"
+ case 249:
+#line 2052 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 252:
-
-/* Line 1455 of yacc.c */
-#line 2145 "compilers/imcc/imcc.y"
+ case 250:
+#line 2053 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 253:
-
-/* Line 1455 of yacc.c */
-#line 2146 "compilers/imcc/imcc.y"
+ case 251:
+#line 2054 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 254:
-
-/* Line 1455 of yacc.c */
-#line 2147 "compilers/imcc/imcc.y"
+ case 252:
+#line 2055 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 255:
-
-/* Line 1455 of yacc.c */
-#line 2148 "compilers/imcc/imcc.y"
+ case 253:
+#line 2056 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 256:
-
-/* Line 1455 of yacc.c */
-#line 2149 "compilers/imcc/imcc.y"
+ case 254:
+#line 2057 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 257:
-
-/* Line 1455 of yacc.c */
-#line 2150 "compilers/imcc/imcc.y"
+ case 255:
+#line 2058 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 258:
-
-/* Line 1455 of yacc.c */
-#line 2151 "compilers/imcc/imcc.y"
+ case 256:
+#line 2059 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 259:
-
-/* Line 1455 of yacc.c */
-#line 2157 "compilers/imcc/imcc.y"
+ case 257:
+#line 2065 "compilers/imcc/imcc.y"
{
(yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
IMCC_INFO(interp) -> regs,
@@ -5211,31 +4652,23 @@
}
break;
- case 260:
-
-/* Line 1455 of yacc.c */
-#line 2167 "compilers/imcc/imcc.y"
+ case 258:
+#line 2075 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 261:
-
-/* Line 1455 of yacc.c */
-#line 2168 "compilers/imcc/imcc.y"
+ case 259:
+#line 2076 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 262:
-
-/* Line 1455 of yacc.c */
-#line 2169 "compilers/imcc/imcc.y"
+ case 260:
+#line 2077 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 263:
-
-/* Line 1455 of yacc.c */
-#line 2171 "compilers/imcc/imcc.y"
+ case 261:
+#line 2079 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -5243,10 +4676,8 @@
}
break;
- case 264:
-
-/* Line 1455 of yacc.c */
-#line 2177 "compilers/imcc/imcc.y"
+ case 262:
+#line 2085 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -5262,10 +4693,8 @@
}
break;
- case 265:
-
-/* Line 1455 of yacc.c */
-#line 2191 "compilers/imcc/imcc.y"
+ case 263:
+#line 2099 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -5273,10 +4702,8 @@
}
break;
- case 266:
-
-/* Line 1455 of yacc.c */
-#line 2197 "compilers/imcc/imcc.y"
+ case 264:
+#line 2105 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -5284,41 +4711,31 @@
}
break;
- case 267:
-
-/* Line 1455 of yacc.c */
-#line 2202 "compilers/imcc/imcc.y"
+ case 265:
+#line 2110 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
- case 268:
-
-/* Line 1455 of yacc.c */
-#line 2208 "compilers/imcc/imcc.y"
+ case 266:
+#line 2116 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
}
break;
- case 269:
-
-/* Line 1455 of yacc.c */
-#line 2212 "compilers/imcc/imcc.y"
+ case 267:
+#line 2120 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
- case 270:
-
-/* Line 1455 of yacc.c */
-#line 2216 "compilers/imcc/imcc.y"
+ case 268:
+#line 2124 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 271:
-
-/* Line 1455 of yacc.c */
-#line 2218 "compilers/imcc/imcc.y"
+ case 269:
+#line 2126 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5330,10 +4747,8 @@
}
break;
- case 272:
-
-/* Line 1455 of yacc.c */
-#line 2228 "compilers/imcc/imcc.y"
+ case 270:
+#line 2136 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5345,10 +4760,8 @@
}
break;
- case 273:
-
-/* Line 1455 of yacc.c */
-#line 2238 "compilers/imcc/imcc.y"
+ case 271:
+#line 2146 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5357,20 +4770,16 @@
}
break;
- case 274:
-
-/* Line 1455 of yacc.c */
-#line 2245 "compilers/imcc/imcc.y"
+ case 272:
+#line 2153 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
}
break;
- case 275:
-
-/* Line 1455 of yacc.c */
-#line 2250 "compilers/imcc/imcc.y"
+ case 273:
+#line 2158 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5379,73 +4788,53 @@
}
break;
- case 276:
-
-/* Line 1455 of yacc.c */
-#line 2259 "compilers/imcc/imcc.y"
+ case 274:
+#line 2167 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 277:
-
-/* Line 1455 of yacc.c */
-#line 2263 "compilers/imcc/imcc.y"
+ case 275:
+#line 2171 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 278:
-
-/* Line 1455 of yacc.c */
-#line 2264 "compilers/imcc/imcc.y"
+ case 276:
+#line 2172 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 279:
-
-/* Line 1455 of yacc.c */
-#line 2268 "compilers/imcc/imcc.y"
+ case 277:
+#line 2176 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
- case 280:
-
-/* Line 1455 of yacc.c */
-#line 2269 "compilers/imcc/imcc.y"
+ case 278:
+#line 2177 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
- case 281:
-
-/* Line 1455 of yacc.c */
-#line 2270 "compilers/imcc/imcc.y"
+ case 279:
+#line 2178 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
- case 282:
-
-/* Line 1455 of yacc.c */
-#line 2273 "compilers/imcc/imcc.y"
- { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
+ case 280:
+#line 2180 "compilers/imcc/imcc.y"
+ { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); mem_sys_free((yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 283:
-
-/* Line 1455 of yacc.c */
-#line 2274 "compilers/imcc/imcc.y"
- { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
+ case 281:
+#line 2181 "compilers/imcc/imcc.y"
+ { adv_named_set(interp, (yyvsp[(3) - (4)].s)); mem_sys_free((yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 284:
-
-/* Line 1455 of yacc.c */
-#line 2278 "compilers/imcc/imcc.y"
+ case 282:
+#line 2185 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 285:
-
-/* Line 1455 of yacc.c */
-#line 2283 "compilers/imcc/imcc.y"
+ case 283:
+#line 2190 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5457,10 +4846,8 @@
}
break;
- case 286:
-
-/* Line 1455 of yacc.c */
-#line 2293 "compilers/imcc/imcc.y"
+ case 284:
+#line 2200 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
@@ -5468,10 +4855,8 @@
}
break;
- case 287:
-
-/* Line 1455 of yacc.c */
-#line 2299 "compilers/imcc/imcc.y"
+ case 285:
+#line 2206 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5483,179 +4868,133 @@
}
break;
- case 288:
-
-/* Line 1455 of yacc.c */
-#line 2309 "compilers/imcc/imcc.y"
+ case 286:
+#line 2216 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
mem_sys_free((yyvsp[(1) - (3)].s));
}
break;
- case 289:
-
-/* Line 1455 of yacc.c */
-#line 2313 "compilers/imcc/imcc.y"
+ case 287:
+#line 2220 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 290:
-
-/* Line 1455 of yacc.c */
-#line 2317 "compilers/imcc/imcc.y"
+ case 288:
+#line 2224 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 291:
-
-/* Line 1455 of yacc.c */
-#line 2318 "compilers/imcc/imcc.y"
+ case 289:
+#line 2225 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 292:
-
-/* Line 1455 of yacc.c */
-#line 2323 "compilers/imcc/imcc.y"
+ case 290:
+#line 2230 "compilers/imcc/imcc.y"
{
(yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
}
break;
- case 293:
-
-/* Line 1455 of yacc.c */
-#line 2327 "compilers/imcc/imcc.y"
+ case 291:
+#line 2234 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
- case 294:
-
-/* Line 1455 of yacc.c */
-#line 2331 "compilers/imcc/imcc.y"
+ case 292:
+#line 2238 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
- case 295:
-
-/* Line 1455 of yacc.c */
-#line 2338 "compilers/imcc/imcc.y"
+ case 293:
+#line 2245 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
- case 296:
-
-/* Line 1455 of yacc.c */
-#line 2342 "compilers/imcc/imcc.y"
+ case 294:
+#line 2249 "compilers/imcc/imcc.y"
{
(yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
}
break;
- case 297:
-
-/* Line 1455 of yacc.c */
-#line 2346 "compilers/imcc/imcc.y"
+ case 295:
+#line 2253 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
- case 298:
-
-/* Line 1455 of yacc.c */
-#line 2352 "compilers/imcc/imcc.y"
+ case 296:
+#line 2259 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 299:
-
-/* Line 1455 of yacc.c */
-#line 2353 "compilers/imcc/imcc.y"
+ case 297:
+#line 2260 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 300:
-
-/* Line 1455 of yacc.c */
-#line 2357 "compilers/imcc/imcc.y"
+ case 298:
+#line 2264 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
- case 301:
-
-/* Line 1455 of yacc.c */
-#line 2358 "compilers/imcc/imcc.y"
+ case 299:
+#line 2265 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
- case 302:
-
-/* Line 1455 of yacc.c */
-#line 2359 "compilers/imcc/imcc.y"
+ case 300:
+#line 2266 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
- case 303:
-
-/* Line 1455 of yacc.c */
-#line 2360 "compilers/imcc/imcc.y"
+ case 301:
+#line 2267 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
- case 304:
-
-/* Line 1455 of yacc.c */
-#line 2361 "compilers/imcc/imcc.y"
+ case 302:
+#line 2268 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
- case 305:
-
-/* Line 1455 of yacc.c */
-#line 2362 "compilers/imcc/imcc.y"
+ case 303:
+#line 2269 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
- case 308:
-
-/* Line 1455 of yacc.c */
-#line 2371 "compilers/imcc/imcc.y"
+ case 306:
+#line 2278 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
- case 309:
-
-/* Line 1455 of yacc.c */
-#line 2372 "compilers/imcc/imcc.y"
+ case 307:
+#line 2279 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
- case 310:
-
-/* Line 1455 of yacc.c */
-#line 2376 "compilers/imcc/imcc.y"
+ case 308:
+#line 2283 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
- case 312:
-
-/* Line 1455 of yacc.c */
-#line 2381 "compilers/imcc/imcc.y"
+ case 310:
+#line 2288 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
- case 313:
-
-/* Line 1455 of yacc.c */
-#line 2383 "compilers/imcc/imcc.y"
+ case 311:
+#line 2290 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
@@ -5664,71 +5003,53 @@
}
break;
- case 314:
-
-/* Line 1455 of yacc.c */
-#line 2390 "compilers/imcc/imcc.y"
+ case 312:
+#line 2297 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
break;
- case 316:
-
-/* Line 1455 of yacc.c */
-#line 2397 "compilers/imcc/imcc.y"
+ case 314:
+#line 2304 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 317:
-
-/* Line 1455 of yacc.c */
-#line 2398 "compilers/imcc/imcc.y"
+ case 315:
+#line 2305 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 318:
-
-/* Line 1455 of yacc.c */
-#line 2402 "compilers/imcc/imcc.y"
+ case 316:
+#line 2309 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 319:
-
-/* Line 1455 of yacc.c */
-#line 2403 "compilers/imcc/imcc.y"
+ case 317:
+#line 2310 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 320:
-
-/* Line 1455 of yacc.c */
-#line 2407 "compilers/imcc/imcc.y"
+ case 318:
+#line 2314 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 321:
-
-/* Line 1455 of yacc.c */
-#line 2408 "compilers/imcc/imcc.y"
+ case 319:
+#line 2315 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 326:
-
-/* Line 1455 of yacc.c */
-#line 2422 "compilers/imcc/imcc.y"
+ case 324:
+#line 2329 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 327:
-
-/* Line 1455 of yacc.c */
-#line 2426 "compilers/imcc/imcc.y"
+ case 325:
+#line 2333 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5736,19 +5057,15 @@
}
break;
- case 328:
-
-/* Line 1455 of yacc.c */
-#line 2434 "compilers/imcc/imcc.y"
+ case 326:
+#line 2341 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 329:
-
-/* Line 1455 of yacc.c */
-#line 2438 "compilers/imcc/imcc.y"
+ case 327:
+#line 2345 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5756,106 +5073,79 @@
}
break;
- case 330:
-
-/* Line 1455 of yacc.c */
-#line 2446 "compilers/imcc/imcc.y"
+ case 328:
+#line 2353 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
- case 331:
-
-/* Line 1455 of yacc.c */
-#line 2448 "compilers/imcc/imcc.y"
+ case 329:
+#line 2355 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
}
break;
- case 332:
-
-/* Line 1455 of yacc.c */
-#line 2456 "compilers/imcc/imcc.y"
+ case 330:
+#line 2363 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
}
break;
- case 333:
-
-/* Line 1455 of yacc.c */
-#line 2462 "compilers/imcc/imcc.y"
+ case 331:
+#line 2369 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
- case 334:
-
-/* Line 1455 of yacc.c */
-#line 2463 "compilers/imcc/imcc.y"
+ case 332:
+#line 2370 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
- case 335:
-
-/* Line 1455 of yacc.c */
-#line 2464 "compilers/imcc/imcc.y"
+ case 333:
+#line 2371 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
- case 336:
-
-/* Line 1455 of yacc.c */
-#line 2465 "compilers/imcc/imcc.y"
+ case 334:
+#line 2372 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
- case 337:
-
-/* Line 1455 of yacc.c */
-#line 2466 "compilers/imcc/imcc.y"
+ case 335:
+#line 2373 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 338:
-
-/* Line 1455 of yacc.c */
-#line 2470 "compilers/imcc/imcc.y"
+ case 336:
+#line 2377 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 339:
-
-/* Line 1455 of yacc.c */
-#line 2471 "compilers/imcc/imcc.y"
+ case 337:
+#line 2378 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 340:
-
-/* Line 1455 of yacc.c */
-#line 2475 "compilers/imcc/imcc.y"
+ case 338:
+#line 2382 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 341:
-
-/* Line 1455 of yacc.c */
-#line 2476 "compilers/imcc/imcc.y"
+ case 339:
+#line 2383 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 342:
-
-/* Line 1455 of yacc.c */
-#line 2477 "compilers/imcc/imcc.y"
+ case 340:
+#line 2384 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
-
-/* Line 1455 of yacc.c */
-#line 5848 "compilers/imcc/imcparser.c"
+/* Line 1267 of yacc.c. */
+#line 5138 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5866,6 +5156,7 @@
*++yyvsp = yyval;
+
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@@ -5930,7 +5221,7 @@
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5947,7 +5238,7 @@
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -6004,6 +5295,9 @@
YY_STACK_PRINT (yyss, yyssp);
}
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
*++yyvsp = yylval;
@@ -6028,7 +5322,7 @@
yyresult = 1;
goto yyreturn;
-#if !defined(yyoverflow) || YYERROR_VERBOSE
+#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -6039,7 +5333,7 @@
#endif
yyreturn:
- if (yychar != YYEMPTY)
+ if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, yyscanner, interp);
/* Do not reclaim the symbols of the rule which action triggered
@@ -6065,9 +5359,7 @@
}
-
-/* Line 1675 of yacc.c */
-#line 2483 "compilers/imcc/imcc.y"
+#line 2390 "compilers/imcc/imcc.y"
/* I need this prototype somewhere... */
Modified: branches/gc_massacre/compilers/imcc/imcparser.h
==============================================================================
--- branches/gc_massacre/compilers/imcc/imcparser.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/imcparser.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -9,26 +9,27 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-
-/* A Bison parser, made by GNU Bison 2.4.1. */
+/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
+
+ This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -39,11 +40,10 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
-
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@@ -293,27 +293,21 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
+#line 986 "compilers/imcc/imcc.y"
{
-
-/* Line 1676 of yacc.c */
-#line 1071 "compilers/imcc/imcc.y"
-
IdList * idlist;
int t;
char * s;
SymReg * sr;
Instruction *i;
-
-
-
-/* Line 1676 of yacc.c */
-#line 300 "compilers/imcc/imcparser.h"
-} YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
+}
+/* Line 1489 of yacc.c. */
+#line 295 "compilers/imcc/imcparser.h"
+ YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
#endif
-
Modified: branches/gc_massacre/compilers/imcc/instructions.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/instructions.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/instructions.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -10,6 +10,7 @@
#include "pbc.h"
#include "optimizer.h"
#include "pmc/pmc_callcontext.h"
+#include "parrot/oplib/core_ops.h"
/*
@@ -112,7 +113,7 @@
ins->symregs[i] = r[i];
ins->flags = flags;
- ins->opnum = -1;
+ ins->op = NULL;
return ins;
}
@@ -133,19 +134,22 @@
{
ASSERT_ARGS(instruction_reads)
int f, i;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(NULL);
- if (ins->opnum == PARROT_OP_set_args_pc
- || ins->opnum == PARROT_OP_set_returns_pc) {
+ if (ins->op && ins->op->lib == core_ops) {
+ if (OP_INFO_OPNUM(ins->op) == PARROT_OP_set_args_pc
+ || OP_INFO_OPNUM(ins->op) == PARROT_OP_set_returns_pc) {
+
+ for (i = ins->symreg_count - 1; i >= 0; --i)
+ if (r == ins->symregs[i])
+ return 1;
- for (i = ins->symreg_count - 1; i >= 0; --i)
- if (r == ins->symregs[i])
- return 1;
-
- return 0;
- }
- else if (ins->opnum == PARROT_OP_get_params_pc ||
- ins->opnum == PARROT_OP_get_results_pc) {
- return 0;
+ return 0;
+ }
+ else if (OP_INFO_OPNUM(ins->op) == PARROT_OP_get_params_pc ||
+ OP_INFO_OPNUM(ins->op) == PARROT_OP_get_results_pc) {
+ return 0;
+ }
}
f = ins->flags;
@@ -172,7 +176,7 @@
/* a sub call reads the previous args */
if (ins->type & ITPCCSUB) {
- while (ins && ins->opnum != PARROT_OP_set_args_pc)
+ while (ins && ins->op != &core_ops->op_info_table[PARROT_OP_set_args_pc])
ins = ins->prev;
if (!ins)
@@ -204,9 +208,10 @@
ASSERT_ARGS(instruction_writes)
const int f = ins->flags;
int j;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(NULL);
/* a get_results opcode occurs after the actual sub call */
- if (ins->opnum == PARROT_OP_get_results_pc) {
+ if (ins->op == &core_ops->op_info_table[PARROT_OP_get_results_pc]) {
int i;
/* but only if it isn't the get_results opcode of
@@ -231,7 +236,7 @@
* and point to the most recent pcc_sub
* structure
*/
- while (ins && ins->opnum != PARROT_OP_get_results_pc)
+ while (ins && ins->op != &core_ops->op_info_table[PARROT_OP_get_results_pc])
ins = ins->next;
if (!ins)
@@ -245,7 +250,7 @@
return 0;
}
- if (ins->opnum == PARROT_OP_get_params_pc) {
+ if (ins->op == &core_ops->op_info_table[PARROT_OP_get_params_pc]) {
int i;
for (i = ins->symreg_count - 1; i >= 0; --i) {
@@ -255,8 +260,8 @@
return 0;
}
- else if (ins->opnum == PARROT_OP_set_args_pc
- || ins->opnum == PARROT_OP_set_returns_pc) {
+ else if (ins->op == &core_ops->op_info_table[PARROT_OP_set_args_pc]
+ || ins->op == &core_ops->op_info_table[PARROT_OP_set_returns_pc]) {
return 0;
}
@@ -618,16 +623,6 @@
snprintf(regb[i], REGB_SIZE, "%c%d", p->set, (int)p->color);
regstr[i] = regb[i];
}
- else if (IMCC_INFO(interp)->allocated
- && (IMCC_INFO(interp)->optimizer_level & OPT_J)
- && p->set != 'K'
- && p->color < 0
- && REG_NEEDS_ALLOC(p)) {
- snprintf(regb[i], REGB_SIZE,
- "r%c%d", tolower((unsigned char)p->set),
- -1 -(int)p->color);
- regstr[i] = regb[i];
- }
else if (p->type & VTREGKEY) {
const SymReg *k = p;
@@ -639,13 +634,6 @@
if (k->reg && k->reg->color >= 0)
snprintf(regb[i]+used, REGB_SIZE - used, "%c%d",
k->reg->set, (int)k->reg->color);
- else if (IMCC_INFO(interp)->allocated
- && (IMCC_INFO(interp)->optimizer_level & OPT_J)
- && k->reg
- && k->reg->color < 0)
- snprintf(regb[i]+used, REGB_SIZE - used, "r%c%d",
- tolower((unsigned char)k->reg->set),
- -1 -(int)k->reg->color);
else
strncat(regb[i], k->name, REGB_SIZE - used - 1);
Modified: branches/gc_massacre/compilers/imcc/instructions.h
==============================================================================
--- branches/gc_massacre/compilers/imcc/instructions.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/instructions.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,10 +16,9 @@
ITALIAS = 0x100000, /* set P,P */
ITADDR = 0x200000, /* set_addr P, addr*/
ITRESULT = 0x400000, /* .get_results */
- ITEXT = 0x800000, /* instruction is extcall in JIT */
- ITSAVES = 0x1000000, /* saveall/restoreall in a bsr */
- ITPCCSUB = 0x2000000, /* PCC sub call */
- ITPCCYIELD = 0x4000000 /* yield from PCC call instead of return */
+ ITSAVES = 0x800000, /* saveall/restoreall in a bsr */
+ ITPCCSUB = 0x1000000, /* PCC sub call */
+ ITPCCYIELD = 0x2000000 /* yield from PCC call instead of return */
};
@@ -35,7 +34,7 @@
struct _Instruction *prev;
struct _Instruction *next;
- int opnum; /* parrot op number */
+ op_info_t *op; /* parrot opcode */
int opsize; /* parrot op size */
int line; /* source code line number */
int symreg_count; /* count of regs in **symregs */
Modified: branches/gc_massacre/compilers/imcc/optimizer.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/optimizer.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/optimizer.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -74,6 +74,7 @@
#include "pbc.h"
#include "optimizer.h"
#include "pmc/pmc_callcontext.h"
+#include "parrot/oplib/core_ops.h"
/* HEADERIZER HFILE: compilers/imcc/optimizer.h */
@@ -368,7 +369,7 @@
last->symregs[reg] = go;
tmp = INS(interp, unit, neg_op, "",
last->symregs, args, 0, 0);
- last->opnum = tmp->opnum;
+ last->op = tmp->op;
last->opsize = tmp->opsize;
mem_sys_free(last->opname);
last->opname = mem_sys_strdup(tmp->opname);
@@ -409,6 +410,7 @@
SymReg *r;
int changes = 0;
FLOATVAL f;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
IMCC_info(interp, 2, "\tstrength_reduce\n");
for (ins = unit->instructions; ins; ins = ins->next) {
@@ -428,37 +430,37 @@
* div Nx, Nx, Ny => sub Nx, Ny
* fdiv Nx, Nx, Ny => sub Nx, Ny
*/
- if (((ins->opnum == PARROT_OP_sub_i_i_i ||
- ins->opnum == PARROT_OP_sub_i_i_ic ||
- ins->opnum == PARROT_OP_sub_i_ic_i ||
- ins->opnum == PARROT_OP_div_i_i_i ||
- ins->opnum == PARROT_OP_div_i_i_ic ||
- ins->opnum == PARROT_OP_div_i_ic_i ||
- ins->opnum == PARROT_OP_fdiv_i_i_i ||
- ins->opnum == PARROT_OP_fdiv_i_i_ic ||
- ins->opnum == PARROT_OP_fdiv_i_ic_i ||
- ins->opnum == PARROT_OP_sub_n_n_n ||
- ins->opnum == PARROT_OP_sub_n_n_nc ||
- ins->opnum == PARROT_OP_sub_n_nc_n ||
- ins->opnum == PARROT_OP_div_n_n_n ||
- ins->opnum == PARROT_OP_div_n_n_nc ||
- ins->opnum == PARROT_OP_div_n_nc_n ||
- ins->opnum == PARROT_OP_fdiv_n_n_n ||
- ins->opnum == PARROT_OP_fdiv_n_n_nc ||
- ins->opnum == PARROT_OP_fdiv_n_nc_n) &&
+ if (((ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_i_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_i_i_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_i_i_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_n_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_nc_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_n_n_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_n_nc_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_n_n_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_n_nc_n]) &&
ins->symregs[0] == ins->symregs[1])
- || ((ins->opnum == PARROT_OP_add_i_i_i ||
- ins->opnum == PARROT_OP_add_i_i_ic ||
- ins->opnum == PARROT_OP_add_i_ic_i ||
- ins->opnum == PARROT_OP_mul_i_i_i ||
- ins->opnum == PARROT_OP_mul_i_i_ic ||
- ins->opnum == PARROT_OP_mul_i_ic_i ||
- ins->opnum == PARROT_OP_add_n_n_n ||
- ins->opnum == PARROT_OP_add_n_n_nc ||
- ins->opnum == PARROT_OP_add_n_nc_n ||
- ins->opnum == PARROT_OP_mul_n_n_n ||
- ins->opnum == PARROT_OP_mul_n_n_nc ||
- ins->opnum == PARROT_OP_mul_n_nc_n) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_add_i_i_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_i_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_n_n_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_n_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_nc_n]) &&
(ins->symregs[0] == ins->symregs[1] ||
ins->symregs[0] == ins->symregs[2]))) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
@@ -483,19 +485,19 @@
* div Nx, 1 => delete
* fdiv Nx, 1 => delete
*/
- if (((ins->opnum == PARROT_OP_add_i_ic ||
- ins->opnum == PARROT_OP_sub_i_ic) &&
+ if (((ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 0)
- || ((ins->opnum == PARROT_OP_mul_i_ic ||
- ins->opnum == PARROT_OP_div_i_ic ||
- ins->opnum == PARROT_OP_fdiv_i_ic) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 1)
- || ((ins->opnum == PARROT_OP_add_n_nc ||
- ins->opnum == PARROT_OP_sub_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_nc]) &&
(f = atof(ins->symregs[1]->name), FLOAT_IS_ZERO(f)))
- || ((ins->opnum == PARROT_OP_mul_n_nc ||
- ins->opnum == PARROT_OP_div_n_nc ||
- ins->opnum == PARROT_OP_fdiv_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_n_nc]) &&
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
ins = delete_ins(unit, ins);
@@ -513,16 +515,16 @@
* sub Ix, 1 => dec Ix
* sub Nx, 1 => dec Nx
*/
- if (((ins->opnum == PARROT_OP_add_i_ic ||
- ins->opnum == PARROT_OP_sub_i_ic) &&
+ if (((ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 1)
- || ((ins->opnum == PARROT_OP_add_n_nc ||
- ins->opnum == PARROT_OP_sub_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_nc]) &&
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
--ins->symregs[1]->use_count;
- if (ins->opnum == PARROT_OP_add_i_ic ||
- ins->opnum == PARROT_OP_add_n_nc)
+ if (ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc])
tmp = INS(interp, unit, "inc", "", ins->symregs, 1, 0, 0);
else
tmp = INS(interp, unit, "dec", "", ins->symregs, 1, 0, 0);
@@ -548,27 +550,27 @@
* div Nx, Ny, 1 => set Nx, Ny
* fdiv Nx, Ny, 1 => set Nx, Ny
*/
- if (((ins->opnum == PARROT_OP_add_i_i_ic ||
- ins->opnum == PARROT_OP_sub_i_i_ic) &&
+ if (((ins->op == &core_ops->op_info_table[PARROT_OP_add_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_i_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[2]) == 0)
- || (ins->opnum == PARROT_OP_add_i_ic_i &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_add_i_ic_i] &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 0)
- || ((ins->opnum == PARROT_OP_mul_i_i_ic ||
- ins->opnum == PARROT_OP_div_i_i_ic ||
- ins->opnum == PARROT_OP_fdiv_i_i_ic) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_i_i_ic] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_i_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[2]) == 1)
- || (ins->opnum == PARROT_OP_mul_i_ic_i &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_ic_i] &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 1)
- || ((ins->opnum == PARROT_OP_add_n_n_nc ||
- ins->opnum == PARROT_OP_sub_n_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_add_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_sub_n_n_nc]) &&
(f = atof(ins->symregs[2]->name), FLOAT_IS_ZERO(f)))
- || (ins->opnum == PARROT_OP_add_n_nc_n &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_add_n_nc_n] &&
(f = atof(ins->symregs[1]->name), FLOAT_IS_ZERO(f)))
- || ((ins->opnum == PARROT_OP_mul_n_n_nc ||
- ins->opnum == PARROT_OP_div_n_n_nc ||
- ins->opnum == PARROT_OP_fdiv_n_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_div_n_n_nc] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_fdiv_n_n_nc]) &&
atof(ins->symregs[2]->name) == 1.0)
- || (ins->opnum == PARROT_OP_mul_n_nc_n &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_nc_n] &&
atof(ins->symregs[1]->name) == 1.0)) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
if (ins->symregs[1]->type == VTCONST) {
@@ -590,15 +592,15 @@
* mul Ix, 0, Iy => set Ix, 0
* mul Ix, 0 => set Ix, 0
*/
- if ((ins->opnum == PARROT_OP_mul_i_i_ic &&
+ if ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_i_ic] &&
IMCC_int_from_reg(interp, ins->symregs[2]) == 0)
- || ((ins->opnum == PARROT_OP_mul_i_ic_i ||
- ins->opnum == PARROT_OP_mul_i_ic) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_ic_i] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_i_ic]) &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 0)
- || (ins->opnum == PARROT_OP_mul_n_n_nc &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_n_nc] &&
(f = atof(ins->symregs[2]->name), FLOAT_IS_ZERO(f)))
- || ((ins->opnum == PARROT_OP_mul_n_nc_n ||
- ins->opnum == PARROT_OP_mul_n_nc) &&
+ || ((ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_nc_n] ||
+ ins->op == &core_ops->op_info_table[PARROT_OP_mul_n_nc]) &&
(f = atof(ins->symregs[1]->name), FLOAT_IS_ZERO(f)))) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
r = mk_const(interp, "0", ins->symregs[0]->set);
@@ -616,9 +618,9 @@
* set Ix, 0 => null Ix
* set Nx, 0 => null Nx
*/
- if ((ins->opnum == PARROT_OP_set_i_ic &&
+ if ((ins->op == &core_ops->op_info_table[PARROT_OP_set_i_ic] &&
IMCC_int_from_reg(interp, ins->symregs[1]) == 0)
- || (ins->opnum == PARROT_OP_set_n_nc &&
+ || (ins->op == &core_ops->op_info_table[PARROT_OP_set_n_nc] &&
(f = atof(ins->symregs[1]->name), FLOAT_IS_ZERO(f)) &&
ins->symregs[1]->name[0] != '-')) {
IMCC_debug(interp, DEBUG_OPT1, "opt1 %d => ", ins);
@@ -714,16 +716,15 @@
}
else {
char fullname[128];
- const int op = check_op(interp, fullname, ins2->opname,
+ check_op(interp, &ins2->op, fullname, ins2->opname,
ins2->symregs, ins2->symreg_count, ins2->keys);
- if (op < 0) {
+ if (!ins2->op) {
ins2->symregs[i] = old;
IMCC_debug(interp, DEBUG_OPT2,
" - no %s\n", fullname);
}
else {
--old->use_count;
- ins2->opnum = op;
any = 1;
IMCC_debug(interp, DEBUG_OPT2,
" -> %d\n", ins2);
@@ -804,14 +805,11 @@
opcode_t eval[4], *pc;
int opnum;
int i;
- op_info_t *op_info;
-
- opnum = interp->op_lib->op_code(interp, op, 1);
- if (opnum < 0)
+ op_info_t *op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, (void *)op);
+ if (!op_info || !STREQ(op_info->full_name, op))
IMCC_fatal(interp, 1, "eval_ins: op '%s' not found\n", op);
- op_info = interp->op_info_table + opnum;
/* now fill registers */
- eval[0] = opnum;
+ eval[0] = 0;
for (i = 0; i < op_info->op_count - 1; i++) {
switch (op_info->types[i]) {
case PARROT_ARG_IC:
@@ -855,7 +853,7 @@
if (setjmp(interp->current_runloop->resume))
return -1;
- pc = (interp->op_func_table[opnum]) (eval, interp);
+ pc = (OP_INFO_OPFUNC(op_info)) (eval, interp);
free_runloop_jump_point(interp);
/* the returned pc is either incremented by op_count or is eval,
* as the branch offset is 0 - return true if it branched
Modified: branches/gc_massacre/compilers/imcc/parser_util.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/parser_util.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/parser_util.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -64,6 +64,22 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
+static op_info_t * try_find_op(PARROT_INTERP,
+ ARGMOD(IMC_Unit *unit),
+ ARGIN(const char *name),
+ ARGMOD(SymReg **r),
+ int n,
+ int keyvec,
+ int emit)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ __attribute__nonnull__(4)
+ FUNC_MODIFIES(*unit)
+ FUNC_MODIFIES(*r);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static const char * try_rev_cmp(ARGIN(const char *name), ARGMOD(SymReg **r))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -91,6 +107,11 @@
, PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_imcc_destroy_macro_values __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_try_find_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit) \
+ , PARROT_ASSERT_ARG(name) \
+ , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_try_rev_cmp __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(r))
@@ -175,8 +196,8 @@
/*
-=item C<int check_op(PARROT_INTERP, char *fullname, const char *name, SymReg *
-const * r, int narg, int keyvec)>
+=item C<void check_op(PARROT_INTERP, op_info_t **op_info, char *fullname, const
+char *name, SymReg * const * r, int narg, int keyvec)>
Return opcode value for op name
@@ -184,15 +205,15 @@
*/
-PARROT_WARN_UNUSED_RESULT
-int
-check_op(PARROT_INTERP, ARGOUT(char *fullname), ARGIN(const char *name),
- ARGIN(SymReg * const * r), int narg, int keyvec)
+void
+check_op(PARROT_INTERP, ARGOUT(op_info_t **op_info), ARGOUT(char *fullname),
+ ARGIN(const char *name), ARGIN(SymReg * const * r), int narg, int keyvec)
{
ASSERT_ARGS(check_op)
op_fullname(fullname, name, r, narg, keyvec);
-
- return interp->op_lib->op_code(interp, fullname, 1);
+ *op_info = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
+ if (*op_info && !STREQ((*op_info)->full_name, fullname))
+ *op_info = NULL;
}
/*
@@ -210,8 +231,7 @@
is_op(PARROT_INTERP, ARGIN(const char *name))
{
ASSERT_ARGS(is_op)
- return interp->op_lib->op_code(interp, name, 0) >= 0
- || interp->op_lib->op_code(interp, name, 1) >= 0;
+ return parrot_hash_exists(interp, interp->op_hash, (void *)name);
}
/*
@@ -234,7 +254,7 @@
ARGMOD(SymReg **r), int n, int emit)
{
ASSERT_ARGS(var_arg_ins)
- int op;
+ op_info_t *op;
Instruction *ins;
char fullname[64];
@@ -251,12 +271,12 @@
r[0]->pmc_type = enum_class_FixedIntegerArray;
op_fullname(fullname, name, r, 1, 0);
- op = interp->op_lib->op_code(interp, fullname, 1);
+ op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
- PARROT_ASSERT(op >= 0);
+ PARROT_ASSERT(op && STREQ(op->full_name, fullname));
ins = _mk_instruction(name, "", n, r, dirs);
- ins->opnum = op;
+ ins->op = op;
ins->opsize = n + 1;
if (emit)
@@ -309,33 +329,40 @@
return var_arg_ins(interp, unit, name, r, n, emit);
else {
Instruction *ins;
- int i, op, len;
+ int i, len;
int dirs = 0;
- op_info_t *op_info;
+ op_info_t *op;
char fullname[64] = "", format[128] = "";
op_fullname(fullname, name, r, n, keyvec);
- op = interp->op_lib->op_code(interp, fullname, 1);
+ op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
+ if (op && !STREQ(op->full_name, fullname))
+ op = NULL;
/* maybe we have a fullname */
- if (op < 0)
- op = interp->op_lib->op_code(interp, name, 1);
+ if (!op) {
+ op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, name);
+ if (op && !STREQ(op->full_name, name))
+ op = NULL;
+ }
/* still wrong, try reverse compare */
- if (op < 0) {
+ if (!op) {
const char * const n_name = try_rev_cmp(name, r);
if (n_name) {
name = n_name;
op_fullname(fullname, name, r, n, keyvec);
- op = interp->op_lib->op_code(interp, fullname, 1);
+ op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
+ if (op && !STREQ(op->full_name, fullname))
+ op = NULL;
}
}
/* still wrong, try to find an existing op */
- if (op < 0)
+ if (!op)
op = try_find_op(interp, unit, name, r, n, keyvec, emit);
- if (op < 0) {
+ if (!op) {
int ok = 0;
/* check mixed constants */
@@ -356,26 +383,25 @@
else
strcpy(fullname, name);
- if (op < 0)
+ if (!op)
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"The opcode '%s' (%s<%d>) was not found. "
"Check the type and number of the arguments",
fullname, name, n);
- op_info = &interp->op_info_table[op];
*format = '\0';
/* info->op_count is args + 1
* build instruction format
* set LV_in / out flags */
- if (n != op_info->op_count - 1)
+ if (n != op->op_count - 1)
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"arg count mismatch: op #%d '%s' needs %d given %d",
- op, fullname, op_info->op_count-1, n);
+ op, fullname, op->op_count-1, n);
/* XXX Speed up some by keep track of the end of format ourselves */
for (i = 0; i < n; i++) {
- switch (op_info->dirs[i]) {
+ switch (op->dirs[i]) {
case PARROT_ARGDIR_INOUT:
dirs |= 1 << (16 + i);
/* go on */
@@ -422,7 +448,7 @@
ins->keys |= keyvec;
/* fill in oplib's info */
- ins->opnum = op;
+ ins->op = op;
ins->opsize = n + 1;
/* mark end as absolute branch */
@@ -443,8 +469,8 @@
/* set up branch flags
* mark registers that are labels */
- for (i = 0; i < op_info->op_count - 1; i++) {
- if (op_info->labels[i])
+ for (i = 0; i < op->op_count - 1; i++) {
+ if (op->labels[i])
ins->type |= ITBRANCH | (1 << i);
else {
if (r[i]->type == VTADDRESS)
@@ -453,7 +479,7 @@
}
}
- if (op_info->jump) {
+ if (op->jump) {
ins->type |= ITBRANCH;
/* TODO use opnum constants */
if (STREQ(name, "branch")
@@ -805,7 +831,8 @@
IMCC_INFO(interp) = imc_info;
}
- fs = string_make(interp, fullname, strlen(fullname), NULL, 0);
+ fs = Parrot_str_new_init(interp, fullname, strlen(fullname),
+ Parrot_default_encoding_ptr, 0);
if (Parrot_stat_info_intval(interp, fs, STAT_ISDIR))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_EXTERNAL_ERROR,
@@ -964,8 +991,8 @@
/*
-=item C<int try_find_op(PARROT_INTERP, IMC_Unit *unit, const char *name, SymReg
-**r, int n, int keyvec, int emit)>
+=item C<static op_info_t * try_find_op(PARROT_INTERP, IMC_Unit *unit, const char
+*name, SymReg **r, int n, int keyvec, int emit)>
Try to find valid op doing the same operation e.g.
@@ -980,7 +1007,8 @@
*/
PARROT_WARN_UNUSED_RESULT
-int
+PARROT_CAN_RETURN_NULL
+static op_info_t *
try_find_op(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *name),
ARGMOD(SymReg **r), int n, int keyvec, int emit)
{
@@ -1016,11 +1044,15 @@
}
if (changed) {
+ op_info_t *op;
op_fullname(fullname, name, r, n, keyvec);
- return interp->op_lib->op_code(interp, fullname, 1);
+ op = (op_info_t *)parrot_hash_get(interp, interp->op_hash, fullname);
+ if (op && !STREQ(op->full_name, fullname))
+ op = NULL;
+ return op;
}
- return -1;
+ return NULL;
}
/*
Modified: branches/gc_massacre/compilers/imcc/pbc.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/pbc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/pbc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -9,6 +9,7 @@
#include "parrot/pmc_freeze.h"
#include "pmc/pmc_sub.h"
#include "pmc/pmc_callcontext.h"
+#include "parrot/oplib/core_ops.h"
/* HEADERIZER HFILE: compilers/imcc/pbc.h */
@@ -360,11 +361,9 @@
}
else {
/* initialize rlookup cache */
- interp->code->const_table->string_hash =
- Parrot_pmc_new_init_int(interp, enum_class_Hash, enum_type_INTVAL);
- ((Hash *)VTABLE_get_pointer(interp, interp->code->const_table->string_hash))->compare =
- (hash_comp_fn)hash_compare_string_distinct_enc;
-
+ interp->code->const_table->string_hash = parrot_create_hash(interp,
+ enum_type_INTVAL,
+ Hash_key_type_STRING_enc);
interp->code->const_table->constants =
mem_gc_allocate_n_zeroed_typed(interp, newcount, PackFile_Constant);
}
@@ -642,6 +641,7 @@
ASSERT_ARGS(get_code_size)
Instruction *ins = unit->instructions;
size_t code_size;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
/* run through instructions:
* - sanity check
@@ -664,12 +664,12 @@
}
else if (ins->opname && *ins->opname) {
(*src_lines)++;
- if (ins->opnum < 0)
+ if (!ins->op)
IMCC_fatal(interp, 1, "get_code_size: "
"no opnum ins#%d %d\n",
ins->index, ins);
- if (ins->opnum == PARROT_OP_set_p_pc) {
+ if (ins->op == &core_ops->op_info_table[PARROT_OP_set_p_pc]) {
/* set_p_pc opcode */
IMCC_debug(interp, DEBUG_PBC_FIXUP, "PMC constant %s\n",
ins->symregs[1]->name);
@@ -702,11 +702,10 @@
static
opcode_t
-bytecode_map_op(PARROT_INTERP, opcode_t op) {
+bytecode_map_op(PARROT_INTERP, op_info_t *info) {
int i;
- op_info_t *info = &interp->op_info_table[op];
op_lib_t *lib = info->lib;
- op_func_t op_func = interp->op_func_table[op];
+ op_func_t op_func = OP_INFO_OPFUNC(info);
PackFile_ByteCode *bc = interp->code;
PackFile_ByteCode_OpMappingEntry *om;
@@ -857,6 +856,7 @@
ASSERT_ARGS(fixup_globals)
subs_t *s;
int jumppc = 0;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
for (s = IMCC_INFO(interp)->globals->cs->first; s; s = s->next) {
const SymHash * const hsh = &s->fixup;
@@ -912,7 +912,7 @@
SymReg * const nam = mk_const(interp, fixup->name,
fixup->type & VT_ENCODED ? 'U' : 'S');
- const int op = interp->op_lib->op_code(interp, "find_sub_not_null_p_sc", 1);
+ op_info_t *op = &core_ops->op_info_table[PARROT_OP_find_sub_not_null_p_sc];
PARROT_ASSERT(op);
interp->code->base.data[addr] = bytecode_map_op(interp, op);
@@ -973,9 +973,8 @@
* get first part as charset, rest as string
*/
STRING *s;
- const CHARSET *s_charset;
- const ENCODING *s_encoding = NULL;
- const ENCODING *src_encoding;
+ const STR_VTABLE *s_encoding;
+ const STR_VTABLE *src_encoding;
#define MAX_NAME 31
char charset_name[MAX_NAME + 1];
char encoding_name[MAX_NAME + 1];
@@ -983,38 +982,38 @@
char * p2 = strchr(r->name, ':');
PARROT_ASSERT(p && p[-1] == ':');
if (p2 < p -1) {
+ /* Handle the old 'encoding:charset' format by trying
+ * encoding as well as charset */
strncpy(encoding_name, buf, p2 - buf);
encoding_name[p2-buf] = '\0';
strncpy(charset_name, p2 +1, p - p2 - 2);
charset_name[p- p2 - 2] = '\0';
/*fprintf(stderr, "%s:%s\n", charset_name, encoding_name);*/
- s_charset = Parrot_find_charset(interp, charset_name);
- if (s_charset == NULL)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Unknown charset '%s'", charset_name);
s_encoding = Parrot_find_encoding(interp, encoding_name);
- if (s_encoding == NULL)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Unknown encoding '%s'", encoding_name);
+ if (s_encoding == NULL) {
+ s_encoding = Parrot_find_encoding(interp, charset_name);
+ if (s_encoding == NULL)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_STRING_REPRESENTATION,
+ "Unknown encoding '%s:%s'",
+ encoding_name, charset_name);
+ }
}
else {
- strncpy(charset_name, buf, p - buf - 1);
- charset_name[p - buf - 1] = '\0';
- /*fprintf(stderr, "%s\n", charset_name);*/
- s_charset = Parrot_find_charset(interp, charset_name);
- if (s_charset == NULL)
+ strncpy(encoding_name, buf, p - buf - 1);
+ encoding_name[p - buf - 1] = '\0';
+ charset_name[0] = '\0';
+ /*fprintf(stderr, "%s\n", encoding_name);*/
+ s_encoding = Parrot_find_encoding(interp, encoding_name);
+ if (s_encoding == NULL)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Unknown charset '%s'", charset_name);
+ "Unknown encoding '%s'", encoding_name);
}
- if (strcmp(charset_name, "unicode") == 0)
- src_encoding = Parrot_utf8_encoding_ptr;
+ if (s_encoding->max_bytes_per_codepoint == 1)
+ src_encoding = Parrot_ascii_encoding_ptr;
else
- src_encoding = Parrot_fixed_8_encoding_ptr;
- if (s_encoding == NULL)
- s_encoding = src_encoding;
+ src_encoding = Parrot_utf8_encoding_ptr;
/* past delim */
buf = p + 1;
@@ -1032,10 +1031,10 @@
}
{
STRING * aux = Parrot_str_new_init(interp, buf, p - buf,
- src_encoding, s_charset, 0);
+ src_encoding, 0);
s = Parrot_str_unescape_string(interp, aux,
- s_charset, s_encoding, PObj_constant_FLAG);
- if (!CHARSET_VALIDATE(interp, s))
+ s_encoding, PObj_constant_FLAG);
+ if (!STRING_validate(interp, s))
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_STRING_REPRESENTATION,
"Malformed string");
@@ -1049,12 +1048,13 @@
}
else if (*buf == '\'') { /* TODO handle python raw strings */
buf++;
- return string_make(interp, buf, strlen(buf) - 1, "ascii",
- PObj_constant_FLAG);
+ return Parrot_str_new_init(interp, buf, strlen(buf) - 1,
+ Parrot_ascii_encoding_ptr, PObj_constant_FLAG);
}
/* unquoted bare name - ASCII only don't unescape it */
- return string_make(interp, buf, strlen(buf), "ascii", PObj_constant_FLAG);
+ return Parrot_str_new_init(interp, buf, strlen(buf),
+ Parrot_ascii_encoding_ptr, PObj_constant_FLAG);
}
/*
@@ -1102,7 +1102,8 @@
}
else if (*buf == '\'') {
buf++;
- return string_make(interp, buf, strlen(buf) - 1, "ascii", PObj_constant_FLAG);
+ return Parrot_str_new_init(interp, buf, strlen(buf) - 1,
+ Parrot_ascii_encoding_ptr, PObj_constant_FLAG);
}
else {
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "Unknown STRING format: '%s'\n", buf);
@@ -1141,7 +1142,7 @@
constant->type = PFC_STRING;
constant->u.string = s;
- VTABLE_set_integer_keyed_str(interp, table->string_hash, s, k);
+ parrot_hash_put(interp, table->string_hash, s, (void *)k);
return k;
}
@@ -1882,7 +1883,7 @@
char *src, *chr, *start;
int base;
- if (s->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s) != 1)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_ENCODING,
"unhandled string encoding in FixedIntegerArray initialization");
@@ -2226,9 +2227,10 @@
ASSERT_ARGS(verify_signature)
PMC *changed_sig = NULL;
PMC * const sig_arr = interp->code->const_table->constants[pc[-1]].u.key;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
int needed = 0;
- int no_consts = (ins->opnum == PARROT_OP_get_results_pc
- || ins->opnum == PARROT_OP_get_params_pc);
+ int no_consts = (ins->op == &core_ops->op_info_table[PARROT_OP_get_results_pc]
+ || ins->op == &core_ops->op_info_table[PARROT_OP_get_params_pc]);
INTVAL i, n;
@@ -2304,7 +2306,8 @@
{
ASSERT_ARGS(e_pbc_emit)
int ok = 0;
- int op, i;
+ int i;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
/* first instruction, do initialisation ... */
if (ins == unit->instructions) {
@@ -2428,16 +2431,14 @@
IMCC_INFO(interp)->debug_seg->base.data[IMCC_INFO(interp)->ins_line++] =
(opcode_t)ins->line;
- op = (opcode_t)ins->opnum;
-
/* Get the info for that opcode */
- op_info = &interp->op_info_table[op];
+ op_info = ins->op;
IMCC_debug(interp, DEBUG_PBC, "%d %s", IMCC_INFO(interp)->npc,
op_info->full_name);
/* Start generating the bytecode */
- *(IMCC_INFO(interp)->pc)++ = bytecode_map_op(interp, op);
+ *(IMCC_INFO(interp)->pc)++ = bytecode_map_op(interp, op_info);
for (i = 0; i < op_info->op_count-1; i++) {
switch (op_info->types[i]) {
@@ -2489,10 +2490,10 @@
break;
}
}
- if (ins->opnum == PARROT_OP_set_args_pc
- || ins->opnum == PARROT_OP_get_results_pc
- || ins->opnum == PARROT_OP_get_params_pc
- || ins->opnum == PARROT_OP_set_returns_pc) {
+ if (ins->op == &core_ops->op_info_table[PARROT_OP_set_args_pc]
+ || ins->op == &core_ops->op_info_table[PARROT_OP_get_results_pc]
+ || ins->op == &core_ops->op_info_table[PARROT_OP_get_params_pc]
+ || ins->op == &core_ops->op_info_table[PARROT_OP_set_returns_pc]) {
/* TODO get rid of verify_signature - PIR call sigs are already
* fixed, but PASM still needs it */
Modified: branches/gc_massacre/compilers/imcc/pcc.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/pcc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/pcc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -29,6 +29,7 @@
#include <string.h>
#include "imc.h"
#include "parser.h"
+#include "parrot/oplib/core_ops.h"
/* HEADERIZER HFILE: compilers/imcc/imc.h */
@@ -675,6 +676,7 @@
SymReg *regs[2];
Instruction *get_params, *tmp_ins, *unused_ins;
char *buf;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
if (!(unit->instructions->type & ITLABEL))
return 0;
@@ -696,7 +698,7 @@
get_params = unit->instructions->next;
- if (get_params->opnum != PARROT_OP_get_params_pc)
+ if (get_params->op != &core_ops->op_info_table[PARROT_OP_get_params_pc])
return 0;
buf = (char *)malloc(strlen(this_sub->name) + 3);
@@ -749,7 +751,13 @@
ins = insINS(interp, unit, ins, "tailcall", regs, 1);
}
+ /* don't leak this sub SymReg; it gets detached here */
+ if (regs[0]->pcc_sub)
+ free_pcc_sub(regs[0]->pcc_sub);
+
+ /* this register is always the symbol "self", global to this IMC_Unit */
regs[0]->pcc_sub = sub->pcc_sub;
+
sub->pcc_sub = NULL;
ins->type |= ITPCCSUB;
}
Modified: branches/gc_massacre/compilers/imcc/reg_alloc.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/reg_alloc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/reg_alloc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -167,8 +167,6 @@
(OPT_PRE|OPT_CFG|OPT_PASM)) && unit->pasm_file)
goto done;
- IMCC_INFO(interp)->allocated = 0;
-
if (unit->instructions->symreg_count)
function = unit->instructions->symregs[0]->name;
else
Modified: branches/gc_massacre/compilers/imcc/symreg.c
==============================================================================
--- branches/gc_massacre/compilers/imcc/symreg.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/symreg.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -1256,6 +1256,30 @@
/*
+=item C<void free_pcc_sub(pcc_sub_t *sub)>
+
+Frees all memory of the given pcc_sub_t.
+
+=cut
+
+*/
+
+void
+free_pcc_sub(ARGMOD(pcc_sub_t *sub))
+{
+ ASSERT_ARGS(free_pcc_sub)
+
+ mem_sys_free(sub->multi);
+ mem_sys_free(sub->args);
+ mem_sys_free(sub->arg_flags);
+ mem_sys_free(sub->ret);
+ mem_sys_free(sub->ret_flags);
+ mem_sys_free(sub);
+}
+
+
+/*
+
=item C<void free_sym(SymReg *r)>
Frees all memory of the specified SymReg. If it has a pcc_sub_t entry, frees
@@ -1271,14 +1295,8 @@
ASSERT_ARGS(free_sym)
pcc_sub_t * const sub = r->pcc_sub;
- if (sub) {
- mem_sys_free(sub->multi);
- mem_sys_free(sub->args);
- mem_sys_free(sub->arg_flags);
- mem_sys_free(sub->ret);
- mem_sys_free(sub->ret_flags);
- mem_sys_free(sub);
- }
+ if (sub)
+ free_pcc_sub(sub);
if (r->set == 'K') {
SymReg *key = r->nextkey;
Modified: branches/gc_massacre/compilers/imcc/symreg.h
==============================================================================
--- branches/gc_massacre/compilers/imcc/symreg.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/imcc/symreg.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -84,6 +84,45 @@
Identifier *idents;
};
+typedef enum {
+ P_NONE = 0x00, /* 0<<0 */
+ P_NEED_LEX = 0x01, /* 1<<0 */
+ P_VTABLE = SUB_COMP_FLAG_VTABLE, /* 1<<1 0x2 */
+ P_METHOD = SUB_COMP_FLAG_METHOD, /* 1<<2 0x4 */
+ P_ANON = SUB_FLAG_PF_ANON, /* 1<<3 0x8 - private3 */
+ P_MAIN = SUB_FLAG_PF_MAIN, /* 1<<4 0x10 - private4 */
+ P_LOAD = SUB_FLAG_PF_LOAD, /* 1<<5 0x20 - private5 */
+ P_IMMEDIATE = SUB_FLAG_PF_IMMEDIATE, /* 1<<6 0x40 - private6 */
+ P_POSTCOMP = SUB_FLAG_PF_POSTCOMP, /* 1<<7 0x80 - private7 */
+ P_INIT = SUB_COMP_FLAG_PF_INIT, /* 1<<10 0x400 - 10 */
+ P_NSENTRY = SUB_COMP_FLAG_NSENTRY /* 1<<11 0x800 - 11 */
+} pragma_enum_t;
+
+typedef struct pcc_sub_t {
+ SymReg *sub;
+ SymReg *cc;
+ SymReg **args;
+ SymReg **multi;
+ SymReg **ret;
+ SymReg *object;
+ int *arg_flags; /* :slurpy, :optional, ... */
+ int *ret_flags; /* :slurpy, :optional, ... */
+ int nargs;
+ int nret;
+ int nmulti;
+ int yield;
+ int tailcall;
+ int label;
+ INTVAL pragma;
+} pcc_sub_t;
+
+enum uniq_t {
+ U_add_once,
+ U_add_uniq_label,
+ U_add_uniq_sub,
+ U_add_all
+};
+
/* functions */
/* HEADERIZER BEGIN: compilers/imcc/symreg.c */
@@ -195,6 +234,10 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
+void free_pcc_sub(ARGMOD(pcc_sub_t *sub))
+ __attribute__nonnull__(1)
+ FUNC_MODIFIES(*sub);
+
void free_sym(ARGMOD(SymReg *r))
__attribute__nonnull__(1)
FUNC_MODIFIES(*r);
@@ -365,6 +408,8 @@
#define ASSERT_ARGS_find_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_free_pcc_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(sub))
#define ASSERT_ARGS_free_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_get_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -422,45 +467,6 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: compilers/imcc/symreg.c */
-typedef enum {
- P_NONE = 0x00, /* 0<<0 */
- P_NEED_LEX = 0x01, /* 1<<0 */
- P_VTABLE = SUB_COMP_FLAG_VTABLE, /* 1<<1 0x2 */
- P_METHOD = SUB_COMP_FLAG_METHOD, /* 1<<2 0x4 */
- P_ANON = SUB_FLAG_PF_ANON, /* 1<<3 0x8 - private3 */
- P_MAIN = SUB_FLAG_PF_MAIN, /* 1<<4 0x10 - private4 */
- P_LOAD = SUB_FLAG_PF_LOAD, /* 1<<5 0x20 - private5 */
- P_IMMEDIATE = SUB_FLAG_PF_IMMEDIATE, /* 1<<6 0x40 - private6 */
- P_POSTCOMP = SUB_FLAG_PF_POSTCOMP, /* 1<<7 0x80 - private7 */
- P_INIT = SUB_COMP_FLAG_PF_INIT, /* 1<<10 0x400 - 10 */
- P_NSENTRY = SUB_COMP_FLAG_NSENTRY /* 1<<11 0x800 - 11 */
-} pragma_enum_t;
-
-typedef struct pcc_sub_t {
- SymReg *sub;
- SymReg *cc;
- SymReg **args;
- SymReg **multi;
- SymReg **ret;
- SymReg *object;
- int *arg_flags; /* :slurpy, :optional, ... */
- int *ret_flags; /* :slurpy, :optional, ... */
- int nargs;
- int nret;
- int nmulti;
- int yield;
- int tailcall;
- int label;
- INTVAL pragma;
-} pcc_sub_t;
-
-enum uniq_t {
- U_add_once,
- U_add_uniq_label,
- U_add_uniq_sub,
- U_add_all
-};
-
#endif /* PARROT_IMCC_SYMREG_H_GUARD */
/*
Modified: branches/gc_massacre/compilers/opsc/src/Ops/Emitter.pm
==============================================================================
--- branches/gc_massacre/compilers/opsc/src/Ops/Emitter.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/opsc/src/Ops/Emitter.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -256,7 +256,7 @@
my $dispatch := self.trans.init_func_disaptch;
# TODO There is a bug in NQP about \{
- $fh.print(q|
+ $fh.print((self.flags<core> ?? 'PARROT_EXPORT' !! '') ~ q|
op_lib_t *
| ~ self.init_func ~ q|(PARROT_INTERP, long init) {
/* initialize and return op_lib ptr */
@@ -359,7 +359,8 @@
#include "parrot/oplib.h"
#include "parrot/runcore_api.h"
-{self.sym_export} op_lib_t *{self.init_func}(PARROT_INTERP, long init);
+| ~ (self.flags<core> ?? 'PARROT_EXPORT' !! '') ~ qq|
+op_lib_t *{self.init_func}(PARROT_INTERP, long init);
|);
}
Modified: branches/gc_massacre/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- branches/gc_massacre/compilers/pct/src/PAST/Compiler.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/pct/src/PAST/Compiler.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -2087,7 +2087,7 @@
$S0 = files
sourceline = concat ' (', $S0
concat sourceline, ':'
- $I0 = source.'lineof'(pos)
+ $I0 = self.'lineof'(source, pos)
inc $I0
$S0 = $I0
concat sourceline, $S0
Modified: branches/gc_massacre/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/gc_massacre/compilers/pct/src/PCT/HLLCompiler.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/pct/src/PCT/HLLCompiler.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -955,6 +955,70 @@
.return ($P0)
.end
+=item lineof(target, pos [, cache :named('cache')])
+
+Return the line number of offset C<pos> within C<target>. The return
+value uses zero for the first line. If C<cache> is true, then
+memoize the line offsets as a C<!lineof> property on C<target>.
+
+=cut
+
+.sub 'lineof' :method
+ .param pmc target
+ .param int pos
+ .param int cache :optional :named('cache')
+ .local pmc linepos
+
+ # If we've previously cached C<linepos> for target, we use it.
+ unless cache goto linepos_build
+ linepos = getprop '!linepos', target
+ unless null linepos goto linepos_done
+
+ # calculate a new linepos array.
+ linepos_build:
+ linepos = new ['ResizableIntegerArray']
+ unless cache goto linepos_build_1
+ setprop target, '!linepos', linepos
+ linepos_build_1:
+ .local string s
+ .local int jpos, eos
+ s = target
+ eos = length s
+ jpos = 0
+ # Search for all of the newline markers in C<target>. When we
+ # find one, mark the ending offset of the line in C<linepos>.
+ linepos_loop:
+ jpos = find_cclass .CCLASS_NEWLINE, s, jpos, eos
+ unless jpos < eos goto linepos_done
+ $I0 = ord s, jpos
+ inc jpos
+ push linepos, jpos
+ # Treat \r\n as a single logical newline.
+ if $I0 != 13 goto linepos_loop
+ $I0 = ord s, jpos
+ if $I0 != 10 goto linepos_loop
+ inc jpos
+ goto linepos_loop
+ linepos_done:
+
+ # We have C<linepos>, so now we search the array for the largest
+ # element that is not greater than C<pos>. The index of that
+ # element is the line number to be returned.
+ # (Potential optimization: use a binary search.)
+ .local int line, count
+ count = elements linepos
+ line = 0
+ line_loop:
+ if line >= count goto line_done
+ $I0 = linepos[line]
+ if $I0 > pos goto line_done
+ inc line
+ goto line_loop
+ line_done:
+ .return (line)
+.end
+
+
=item dumper(obj, name, options)
Dump C<obj> with C<name> according to C<options>.
Modified: branches/gc_massacre/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- branches/gc_massacre/compilers/pct/src/POST/Compiler.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/compilers/pct/src/POST/Compiler.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -130,9 +130,8 @@
pos = cpost['pos']
if null pos goto done_subline
source = cpost['source']
- $I0 = can source, 'lineof'
- unless $I0 goto done_subline
- line = source.'lineof'(pos)
+ if null source goto done_subline
+ line = self.'lineof'(source, pos, 'cache'=>1)
inc line
done_subline:
self.'pir'(cpost)
Modified: branches/gc_massacre/config/auto/gcc.pm
==============================================================================
--- branches/gc_massacre/config/auto/gcc.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/auto/gcc.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -86,6 +86,7 @@
$conf->data->set( sym_export => '__attribute__ ((visibility("default")))' )
if $gccversion >= 4.0 && !$conf->data->get('sym_export');
+ $conf->data->set( noinline => '__attribute__ ((noinline))' );
# sneaky check for g++
my $gpp = (index($conf->data->get('cc'), '++') > 0) ? 1 : 0;
Modified: branches/gc_massacre/config/auto/msvc.pm
==============================================================================
--- branches/gc_massacre/config/auto/msvc.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/auto/msvc.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -89,6 +89,9 @@
# for details.
$conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" );
}
+
+ $conf->data->set( noinline => '__declspec(noinline)' );
+
return 1;
}
Modified: branches/gc_massacre/config/auto/pcre.pm
==============================================================================
--- branches/gc_massacre/config/auto/pcre.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/auto/pcre.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -35,11 +35,10 @@
my $without = $conf->options->get( qw| without-pcre | );
- if ($without) {
- $conf->data->set( HAS_PCRE => 0 );
- $self->set_result('no');
- return 1;
- }
+ $self->set_result('no');
+ $conf->data->set( HAS_PCRE => 0 );
+
+ return 1 if ($without);
my $osname = $conf->data->get('osname');
@@ -53,12 +52,12 @@
$conf->cc_gen('config/auto/pcre/pcre_c.in');
eval { $conf->cc_build( q{}, $extra_libs ) };
- my $has_pcre = 0;
if ( !$@ ) {
my $test = $conf->cc_run();
- $has_pcre = $self->_evaluate_cc_run($conf, $test);
+ if ( my $has_pcre = $self->_evaluate_cc_run($conf, $test) ) {
+ $conf->data->set( HAS_PCRE => $has_pcre);
+ }
}
- $conf->data->set( HAS_PCRE => $has_pcre);
return 1;
}
Modified: branches/gc_massacre/config/auto/readline.pm
==============================================================================
--- branches/gc_massacre/config/auto/readline.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/auto/readline.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -36,6 +36,14 @@
sub runstep {
my ( $self, $conf ) = @_;
+ my $without_opt = $conf->options->get('without-readline');
+
+ if ($without_opt) {
+ $conf->data->set('HAS_READLINE' => 0);
+ $self->set_result('not requested');
+ return 1;
+ }
+
my $cc = $conf->data->get('cc');
my $osname = $conf->data->get('osname');
Modified: branches/gc_massacre/config/gen/config_h/config_h.in
==============================================================================
--- branches/gc_massacre/config/gen/config_h/config_h.in Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/gen/config_h/config_h.in Mon Sep 13 21:23:26 2010 (r48984)
@@ -84,6 +84,8 @@
#endif
#endif
+#define PARROT_NOINLINE @noinline@
+
#if defined(PARROT_IN_CORE)
/* Put any other symbols here. */
@@ -150,8 +152,10 @@
#define PARROT_ at jitcpu@ 1
/* Oplib and dynamic ops related. */
-#define PARROT_CORE_OPLIB_NAME "core_ops"
-#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_ at MAJOR@_ at MINOR@_ at PATCH@
+#define PARROT_CORE_OPLIB_NAME "core_ops"
+#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_ at MAJOR@_ at MINOR@_ at PATCH@
+
+#define PARROT_GET_CORE_OPLIB(i) PARROT_CORE_OPLIB_INIT((i), 1)
/* ICU. */
#define PARROT_HAS_ICU @has_icu@
Modified: branches/gc_massacre/config/gen/makefiles/root.in
==============================================================================
--- branches/gc_massacre/config/gen/makefiles/root.in Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/config/gen/makefiles/root.in Mon Sep 13 21:23:26 2010 (r48984)
@@ -368,7 +368,6 @@
$(INC_DIR)/interpreter.h \
$(INC_DIR)/datatypes.h \
$(INC_DIR)/encoding.h \
- $(INC_DIR)/charset.h \
$(INC_DIR)/string.h \
$(INC_DIR)/string_primitives.h \
$(INC_DIR)/hash.h \
@@ -418,11 +417,20 @@
GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) \
-CHARSET_O_FILES = @TEMP_charset_o@
CLASS_PMC_FILES = @TEMP_pmc_classes_pmc@
CLASS_O_FILES = @TEMP_pmc_classes_o@
CLASS_STR_FILES = @TEMP_pmc_classes_str@
-ENCODING_O_FILES = @TEMP_encoding_o@
+
+ENCODING_O_FILES = \
+ src/string/encoding/shared$(O) \
+ src/string/encoding/tables$(O) \
+ src/string/encoding/ascii$(O) \
+ src/string/encoding/latin1$(O) \
+ src/string/encoding/binary$(O) \
+ src/string/encoding/utf8$(O) \
+ src/string/encoding/utf16$(O) \
+ src/string/encoding/ucs2$(O) \
+ src/string/encoding/ucs4$(O)
IO_O_FILES = \
src/io/core$(O) \
@@ -441,7 +449,6 @@
src/string/api$(O) \
src/ops/core_ops$(O) \
#IF(i386_has_gcc_cmpxchg): src/atomic/gcc_x86$(O) \
- src/string/charset$(O) \
src/core_pmcs$(O) \
src/datatypes$(O) \
src/debug$(O) \
@@ -689,6 +696,7 @@
src/nci/core_thunks.str \
#IF(has_extra_nci_thunks): src/nci/extra_thunks.str \
src/packfile.str \
+ src/packfile/pf_items.str \
src/pmc.str \
src/pmc_freeze.str \
src/oo.str \
@@ -942,7 +950,6 @@
O_FILES = \
$(INTERP_O_FILES) \
- $(CHARSET_O_FILES) \
$(IO_O_FILES) \
$(CLASS_O_FILES) \
$(ENCODING_O_FILES) \
@@ -1463,7 +1470,8 @@
$(INC_DIR)/embed.h $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h \
$(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h
-src/packfile/pf_items$(O) : $(PARROT_H_HEADERS) src/packfile/pf_items.c
+src/packfile/pf_items$(O) : $(PARROT_H_HEADERS) src/packfile/pf_items.str \
+ src/packfile/pf_items.c
src/packout$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h src/packout.c
@@ -1530,18 +1538,40 @@
src/spf_vtable$(O) : $(PARROT_H_HEADERS) src/spf_vtable.str src/spf_vtable.c
-src/string/encoding$(O) : $(PARROT_H_HEADERS) src/string/encoding.c
+src/string/encoding$(O) : $(PARROT_H_HEADERS)
-src/string/charset$(O) : $(PARROT_H_HEADERS) src/string/charset.c \
- src/string/encoding/fixed_8.h \
- src/string/encoding/utf8.h \
- src/string/encoding/utf16.h \
- src/string/encoding/ucs2.h \
- src/string/encoding/ucs4.h \
- src/string/charset/ascii.h \
- src/string/charset/binary.h \
- src/string/charset/iso-8859-1.h \
- src/string/charset/unicode.h
+src/string/encoding/tables$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/tables.h
+src/string/encoding/shared$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/shared.h \
+ src/string/encoding/tables.h
+src/string/encoding/ascii$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/ascii.h \
+ src/string/encoding/shared.h \
+ src/string/encoding/tables.h
+src/string/encoding/latin1$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/latin1.h \
+ src/string/encoding/shared.h \
+ src/string/encoding/tables.h
+src/string/encoding/binary$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/binary.h \
+ src/string/encoding/shared.h
+src/string/encoding/utf8$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/utf8.h \
+ src/string/encoding/shared.h \
+ src/string/unicode.h
+src/string/encoding/utf16$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/utf16.h \
+ src/string/encoding/shared.h \
+ src/string/unicode.h
+src/string/encoding/ucs2$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/ucs2.h \
+ src/string/encoding/shared.h \
+ src/string/unicode.h
+src/string/encoding/ucs4$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/ucs4.h \
+ src/string/encoding/shared.h \
+ src/string/unicode.h
src/pbc_merge$(O) : $(INC_DIR)/embed.h src/pbc_merge.c \
include/pmc/pmc_sub.h $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS)
@@ -1572,10 +1602,6 @@
@TEMP_pmc_build@
- at TEMP_charset_build@
-
- at TEMP_encoding_build@
-
# $(CONFIGURE_GENERATED_FILES) : Configure.pl
# $(PERL) Configure.pl
@@ -2295,7 +2321,6 @@
src/pmc \
src/runcore \
src/string \
- src/string/charset \
src/string/encoding \
$(BUILD_DIR) \
$(BUILD_DIR)/t/perl \
Deleted: branches/gc_massacre/config/inter/charset.pm
==============================================================================
--- branches/gc_massacre/config/inter/charset.pm Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,96 +0,0 @@
-# Copyright (C) 2001-2003, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/inter/charset.pm - charset files
-
-=head1 DESCRIPTION
-
-Asks the user to select which charset files to include.
-
-=cut
-
-package inter::charset;
-
-use strict;
-use warnings;
-
-use File::Basename qw/basename/;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils ':inter';
-
-
-sub _init {
- my $self = shift;
- my %data;
- $data{description} = q{Which charset files should be compiled in};
- $data{result} = q{};
- return \%data;
-}
-
-my @charsets_defaults =
- defined( $ENV{TEST_CHARSET} )
- ? $ENV{TEST_CHARSET}
- : sort map { basename($_) } glob "./src/string/charset/*.c";
-
-sub runstep {
- my ( $self, $conf ) = @_;
-
- my @charset = @charsets_defaults;
-
- my $charset_list = join ( ' ', grep { defined $_ } @charset );
-
- if ( $conf->options->get('ask') ) {
- print <<"END";
-
-
-The following charsets are available:
- @charset
-END
- $charset_list = prompt(
- 'Which charsets would you like?',
- $charset_list
- );
- }
-
- # names of class files for src/pmc/Makefile
- ( my $TEMP_charset_o = $charset_list ) =~ s/\.c/\$(O)/g;
-
- my $TEMP_charset_build = <<"E_NOTE";
-
-# the following part of the Makefile was built by 'config/inter/charset.pm'
-
-E_NOTE
-
- foreach my $charset ( split( /\s+/, $charset_list ) ) {
- $charset =~ s/\.c$//;
- $TEMP_charset_build .= <<END
-src/string/charset/$charset\$(O): src/string/charset/$charset.h src/string/charset/ascii.h src/string/charset/$charset.c src/string/charset/tables.h \$(NONGEN_HEADERS)
-
-
-END
- }
-
- # build list of libraries for link line in Makefile
- $TEMP_charset_o =~ s{^| }{ src/string/charset/}g;
-
- $conf->data->set(
- charset => $charset_list,
- TEMP_charset_o => $TEMP_charset_o,
- TEMP_charset_build => $TEMP_charset_build,
- );
-
- return 1;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/gc_massacre/config/inter/encoding.pm
==============================================================================
--- branches/gc_massacre/config/inter/encoding.pm Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,96 +0,0 @@
-# Copyright (C) 2001-2003, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/inter/encoding.pm - encoding files
-
-=head1 DESCRIPTION
-
-Asks the user to select which encoding files to include.
-
-=cut
-
-package inter::encoding;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use File::Basename qw/basename/;
-
-use Parrot::Configure::Utils ':inter';
-
-
-sub _init {
- my $self = shift;
- my %data;
- $data{description} = q{Which encoding files should be compiled in};
- $data{result} = q{};
- return \%data;
-}
-
-my @encodings_defaults =
- defined( $ENV{TEST_ENCODING} )
- ? $ENV{TEST_ENCODING}
- : sort map { basename($_) } glob "./src/string/encoding/*.c";
-
-sub runstep {
- my ( $self, $conf ) = @_;
-
- my @encodings = @encodings_defaults;
-
- my $encoding_list = join( ' ', grep { defined $_ } @encodings );
-
- if ( $conf->options->get('ask') ) {
- print <<"END";
-
-
-The following encodings are available:
- @encodings
-END
- $encoding_list = prompt(
- 'Which encodings would you like?',
- $encoding_list
- );
- }
-
- # names of class files for src/pmc/Makefile
- ( my $TEMP_encoding_o = $encoding_list ) =~ s/\.c/\$(O)/g;
-
- my $TEMP_encoding_build = <<"E_NOTE";
-
-# the following part of the Makefile was built by 'config/inter/encoding.pm'
-
-E_NOTE
-
- foreach my $encoding ( split( /\s+/, $encoding_list ) ) {
- $encoding =~ s/\.c$//;
- $TEMP_encoding_build .= <<END
-src/string/encoding/$encoding\$(O): src/string/encoding/$encoding.h src/string/encoding/$encoding.c src/string/unicode.h \$(NONGEN_HEADERS)
-
-
-END
- }
-
- # build list of libraries for link line in Makefile
- $TEMP_encoding_o =~ s{^| }{ src/string/encoding/}g;
-
- $conf->data->set(
- encoding => $encoding_list,
- TEMP_encoding_o => $TEMP_encoding_o,
- TEMP_encoding_build => $TEMP_encoding_build,
- );
-
- return 1;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/gc_massacre/docs/book/pct/ch04_pge.pod
==============================================================================
--- branches/gc_massacre/docs/book/pct/ch04_pge.pod Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/docs/book/pct/ch04_pge.pod Mon Sep 13 21:23:26 2010 (r48984)
@@ -30,12 +30,12 @@
sub <function_name> { <function_body> }
A grammar is a collection of rules like the ones above that specify all the
-acceptable patterns in a language. Grammars group together these rules in
-much the same way that a groups together related data fields and methods
-N<In languages like Perl 6 for instance, a grammar is just a special kind
-of class and a rule is just a special kind of method.>. Each rule defines
-a pattern for matching one unit of text, and can be made up of various other
-rules which are called recursively to make a complete match.
+acceptable patterns in a language. Grammars group together these rules in much
+the same way that a class groups together related data fields and methods N<In
+languages like Perl 6 for instance, a grammar is just a special kind of class
+and a rule is just a special kind of method.>. Each rule defines a pattern for
+matching one unit of text, and can be made up of various other rules which are
+called recursively to make a complete match.
A rule can contain regular expressions to match patterns of characters:
Modified: branches/gc_massacre/docs/embed.pod
==============================================================================
--- branches/gc_massacre/docs/embed.pod Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/docs/embed.pod Mon Sep 13 21:23:26 2010 (r48984)
@@ -775,8 +775,6 @@
=item C<Parrot_get_runtime_path>
-=item C<Parrot_get_runtime_prefix>
-
=item C<Parrot_get_strreg>
=item C<Parrot_get_vtable>
Modified: branches/gc_massacre/docs/pmc/subs.pod
==============================================================================
--- branches/gc_massacre/docs/pmc/subs.pod Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/docs/pmc/subs.pod Mon Sep 13 21:23:26 2010 (r48984)
@@ -27,7 +27,6 @@
Coroutine
Eval
Continuation
- RetContinuation
ExceptionHandler
By "invokable" we mean that they can be supplied as the first argument to the
Modified: branches/gc_massacre/docs/project/release_manager_guide.pod
==============================================================================
--- branches/gc_massacre/docs/project/release_manager_guide.pod Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/docs/project/release_manager_guide.pod Mon Sep 13 21:23:26 2010 (r48984)
@@ -409,8 +409,14 @@
- Sep 21, 2010 - 2.8 - gerd
- Oct 19, 2010 - 2.9* - gerd
- Nov 16, 2010 - 2.10 - ??
- - Dec 21, 2010 - 2.11 - ??
- - Jan 18, 2010 - 3.0* - ??
+ - Dec 21, 2010 - 2.11 - whiteknight
+ - Jan 18, 2011 - 3.0* - ??
+ - Feb 15, 2011 - 3.1 - ??
+ - Mar 15, 2011 - 3.2 - ??
+ - Apr 19, 2011 - 3.3* - ??
+ - May 17, 2011 - 3.4 - ??
+ - Jun 21, 2011 - 3.5 - ??
+ - Jul 19, 2011 - 3.6* - kid51
=cut
Modified: branches/gc_massacre/editor/pir-mode.el
==============================================================================
--- branches/gc_massacre/editor/pir-mode.el Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/editor/pir-mode.el Mon Sep 13 21:23:26 2010 (r48984)
@@ -155,7 +155,7 @@
"ParrotIO" "ParrotInterpreter" "ParrotLibrary" "ParrotObject"
"ParrotThread" "Pointer"
"ResizableBooleanArray" "ResizableFloatArray" "ResizableIntegerArray"
- "ResizablePMCArray" "ResizableStringArray" "RetContinuation"
+ "ResizablePMCArray" "ResizableStringArray"
"Role" "Scalar" "String" "Sub" "Super"
"Timer" "UnManagedStruct" "Undef" "VtableCache"))
Added: branches/gc_massacre/examples/benchmarks/boolean.pir
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/examples/benchmarks/boolean.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,63 @@
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+examples/benchmarks/boolean.pir: Manipulate the Boolean PMC
+
+=head1 SYNOPSIS
+
+parrot examples/benchmarks/boolean.pir
+
+=head1 DESCRIPTION
+
+This benchmark operates on the Boolean PMC, allocating new ones, setting them,
+and performing logical operations on them.
+
+=cut
+
+.const num iterations = 10e6 # Number of iterations.
+
+.sub main :main
+
+ .local num start_time, end_time
+ .local int counter
+ .local pmc a, b, c, result
+
+ print "Perform "
+ print iterations
+ say " iterations of various Boolean operations"
+
+ a = new 'Boolean', 1
+ start_time = time
+
+ counter = iterations
+LOOP:
+ b = new 'Boolean'
+ b = 1
+ c = new 'Boolean', b
+ result = not a
+ result = and result, b
+ result = or result, c
+ not result
+ if result goto TRUE
+ a = 0
+ goto NEXT
+TRUE:
+ a = 1
+NEXT:
+ dec counter
+ if counter > 0 goto LOOP
+
+ end_time = time
+ end_time = end_time - start_time
+ end_time = end_time / iterations
+ print "Elapsed time per iteration: "
+ say end_time
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/gc_massacre/examples/compilers/japhc.c
==============================================================================
--- branches/gc_massacre/examples/compilers/japhc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/examples/compilers/japhc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -147,8 +147,8 @@
/* Allocate a new constant */
consts->constants[--k] = PackFile_Constant_new(interp);
consts->constants[k]->type = PFC_STRING;
- consts->constants[k]->u.string =
- string_make(interp, buf, (UINTVAL) l, "iso-8859-1", 0);
+ consts->constants[k]->u.string = Parrot_str_new_init(interp, buf,
+ (UINTVAL) l, Parrot_latin1_encoding_ptr, 0);
free(o);
return k;
}
Modified: branches/gc_massacre/examples/config/file/configcompiler
==============================================================================
--- branches/gc_massacre/examples/config/file/configcompiler Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/examples/config/file/configcompiler Mon Sep 13 21:23:26 2010 (r48984)
@@ -34,8 +34,6 @@
init::optimize
inter::shlibs
inter::libparrot
-inter::charset
-inter::encoding
inter::types
auto::ops
auto::pmc
Modified: branches/gc_massacre/examples/config/file/configwithfatalstep
==============================================================================
--- branches/gc_massacre/examples/config/file/configwithfatalstep Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/examples/config/file/configwithfatalstep Mon Sep 13 21:23:26 2010 (r48984)
@@ -26,8 +26,6 @@
init::optimize
inter::shlibs
inter::libparrot
-inter::charset
-inter::encoding
inter::types
auto::ops
auto::pmc
Modified: branches/gc_massacre/examples/namespace/namespace_dump.pir
==============================================================================
--- branches/gc_massacre/examples/namespace/namespace_dump.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/examples/namespace/namespace_dump.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -1,12 +1,13 @@
# Copyright (C) 2006-2009, Parrot Foundation.
# $Id$
+.include "interpinfo.pasm"
+.include "iterator.pasm"
+
#
# dump all namespaces and the contents recursively
#
.sub main :main
- .include "interpinfo.pasm"
- .include "iterator.pasm"
.local pmc ns
ns = get_root_namespace
dump(ns, 0)
@@ -14,55 +15,82 @@
# dump one namespace
.sub dump
- .param pmc ns
- .param int lev
- .local pmc it
- .local string spac
+ .param pmc ns
+ .param int lev
+ .local pmc it
+ .local string indent
+
+ $I0 = lev * 4
+ indent = repeat " ", $I0
it = iter ns
it = .ITERATE_FROM_START
- $I2 = lev * 4
- spac = repeat " ", $I2
-lp:
- unless it goto ex
- $S0 = shift it
- $P0 = it[$S0]
- # there might be a smy with the same name as a namespace
- $P1 = ns.'get_sym'($S0)
- if null $P1 goto no_sym
- eq_addr $P0, $P1, no_sym
- print spac
- print $S0
- print " => "
- print $P1
- print "\n"
-no_sym:
- $I0 = isa $P0, 'NCI'
- unless $I0 goto no_nci
- $P0 = new 'String'
- $P0 = "NCI"
-no_nci:
- print spac
- print $S0
+
+loop:
+ unless it goto return
+
+ .local string name
+ .local pmc entry, sym_entry
+ name = shift it
+ entry = it[name]
+ # there might be a sym with the same name as a namespace
+ sym_entry = ns.'get_sym'(name)
+
+ if_null sym_entry, done_sym
+ eq_addr sym_entry, entry, done_sym
+ dump_simple(name, sym_entry, indent)
+done_sym:
+
+ $I0 = isa entry, 'MultiSub'
+ if $I0 goto handle_multi
+
+ $I0 = isa entry, 'NameSpace'
+ if $I0 goto handle_ns
+
+ dump_simple(name, entry, indent)
+ goto loop
+
+handle_multi:
+ print indent
+ print name
print " => "
- $I0 = isa $P0, 'MultiSub'
- unless $I0 goto no_multi
- $I1 = lev + 1
+ $I0 = lev + 1
print " Multi [\n"
- dump_multi($P0, $I1)
- print spac
+ dump_multi(entry, $I0)
+ print indent
print "]\n"
- goto lp
-no_multi:
- print $P0
+ goto loop
+
+handle_ns:
+ dump_simple(name, entry, indent)
+ $I0 = lev + 1
+ dump(entry, $I0)
+ goto loop
+
+return:
+.end
+
+.sub dump_simple
+ .param string name
+ .param pmc x
+ .param string indent
+ print indent
+ print name
+ print " => "
+
+ .local string val_str
+ push_eh no_get_string
+ val_str = x
+
+got_val_str:
+ pop_eh
+ print val_str
print "\n"
- $I0 = isa $P0, 'NameSpace'
- unless $I0 goto no_ns
- $I1 = lev + 1
- dump($P0, $I1)
-no_ns:
- goto lp
-ex:
+ .return ()
+
+no_get_string:
+ val_str = typeof x
+ goto got_val_str
.end
# dump the types of a MultiSub
Modified: branches/gc_massacre/ext/nqp-rx/src/stage0/HLL-s0.pir
==============================================================================
--- branches/gc_massacre/ext/nqp-rx/src/stage0/HLL-s0.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/ext/nqp-rx/src/stage0/HLL-s0.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -18,6 +18,7 @@
### .include 'src/cheats/hll-compiler.pir'
# we have to overload PCT::HLLCompiler's parse method to support P6Regex grammars
+.include 'cclass.pasm'
.namespace ['HLL';'Compiler']
@@ -123,6 +124,79 @@
.end
+# Temporarily backport PCT::HLLCompiler's 'lineof' method
+# from Parrot r48866 into HLL::Compiler, so that nqp-rx can
+# continue to build from an older Parrot until parrot's trunk
+# is working again. When we're able to bump PARROT_REVISION,
+# this code can go away to fall back to Parrot's version (DRY).
+=over 4
+
+=item lineof(target, pos [, cache :named('cache')])
+
+Return the line number of offset C<pos> within C<target>. The return
+value uses zero for the first line. If C<cache> is true, then
+memoize the line offsets as a C<!lineof> property on C<target>.
+
+=back
+
+=cut
+
+.sub 'lineof' :method
+ .param pmc target
+ .param int pos
+ .param int cache :optional :named('cache')
+ .local pmc linepos
+
+ # If we've previously cached C<linepos> for target, we use it.
+ unless cache goto linepos_build
+ linepos = getprop '!linepos', target
+ unless null linepos goto linepos_done
+
+ # calculate a new linepos array.
+ linepos_build:
+ linepos = new ['ResizableIntegerArray']
+ unless cache goto linepos_build_1
+ setprop target, '!linepos', linepos
+ linepos_build_1:
+ .local string s
+ .local int jpos, eos
+ s = target
+ eos = length s
+ jpos = 0
+ # Search for all of the newline markers in C<target>. When we
+ # find one, mark the ending offset of the line in C<linepos>.
+ linepos_loop:
+ jpos = find_cclass .CCLASS_NEWLINE, s, jpos, eos
+ unless jpos < eos goto linepos_done
+ $I0 = ord s, jpos
+ inc jpos
+ push linepos, jpos
+ # Treat \r\n as a single logical newline.
+ if $I0 != 13 goto linepos_loop
+ $I0 = ord s, jpos
+ if $I0 != 10 goto linepos_loop
+ inc jpos
+ goto linepos_loop
+ linepos_done:
+
+ # We have C<linepos>, so now we search the array for the largest
+ # element that is not greater than C<pos>. The index of that
+ # element is the line number to be returned.
+ # (Potential optimization: use a binary search.)
+ .local int line, count
+ count = elements linepos
+ line = 0
+ line_loop:
+ if line >= count goto line_done
+ $I0 = linepos[line]
+ if $I0 > pos goto line_done
+ inc line
+ goto line_loop
+ line_done:
+ .return (line)
+.end
+
+
# This sub serves as a cumulative "outer context" for code
# executed in HLL::Compiler's interactive REPL. It's invoked
# exactly once upon load/init to obtain a context, and its
@@ -354,7 +428,8 @@
pos = self.'pos'()
target = getattribute self, '$!target'
- $I1 = target.'lineof'(pos)
+ $P0 = get_hll_global ['HLL'], 'Compiler'
+ $I1 = $P0.'lineof'(target, pos)
inc $I1
push args, ' at line '
push args, $I1
@@ -693,6 +768,11 @@
if inprec <= preclim goto term_done
inassoc = inO['assoc']
+ $P0 = inO['sub']
+ if null $P0 goto subprec_done
+ inO['prec'] = $P0
+ subprec_done:
+
reduce_loop:
unless opstack goto reduce_done
$P0 = opstack[-1]
@@ -924,32 +1004,29 @@
### .include 'gen/hllgrammar-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368192.21885")
+.sub "_block11" :anon :subid("10_1283975938.50512")
.annotate 'line', 0
get_hll_global $P14, ["HLL";"Grammar"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 5
get_hll_global $P14, ["HLL";"Grammar"], "_block13"
capture_lex $P14
$P332 = $P14()
-.annotate 'line', 1
.return ($P332)
- .const 'Sub' $P334 = "106_1283368192.21885"
+ .const 'Sub' $P334 = "106_1283975938.50512"
.return ($P334)
.end
.namespace []
-.sub "" :load :init :subid("post107") :outer("10_1283368192.21885")
+.sub "" :load :init :subid("post107") :outer("10_1283975938.50512")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368192.21885"
+ .const 'Sub' $P12 = "10_1283975938.50512"
.local pmc block
set block, $P12
$P337 = get_root_global ["parrot"], "P6metaclass"
@@ -958,83 +1035,83 @@
.namespace ["HLL";"Grammar"]
-.sub "_block13" :subid("11_1283368192.21885") :outer("10_1283368192.21885")
-.annotate 'line', 5
- .const 'Sub' $P319 = "103_1283368192.21885"
+.sub "_block13" :subid("11_1283975938.50512") :outer("10_1283975938.50512")
+.annotate 'line', 0
+ .const 'Sub' $P319 = "103_1283975938.50512"
capture_lex $P319
- .const 'Sub' $P313 = "101_1283368192.21885"
+ .const 'Sub' $P313 = "101_1283975938.50512"
capture_lex $P313
- .const 'Sub' $P300 = "98_1283368192.21885"
+ .const 'Sub' $P300 = "98_1283975938.50512"
capture_lex $P300
- .const 'Sub' $P268 = "93_1283368192.21885"
+ .const 'Sub' $P268 = "93_1283975938.50512"
capture_lex $P268
- .const 'Sub' $P262 = "91_1283368192.21885"
+ .const 'Sub' $P262 = "91_1283975938.50512"
capture_lex $P262
- .const 'Sub' $P257 = "89_1283368192.21885"
+ .const 'Sub' $P257 = "89_1283975938.50512"
capture_lex $P257
- .const 'Sub' $P251 = "87_1283368192.21885"
+ .const 'Sub' $P251 = "87_1283975938.50512"
capture_lex $P251
- .const 'Sub' $P245 = "85_1283368192.21885"
+ .const 'Sub' $P245 = "85_1283975938.50512"
capture_lex $P245
- .const 'Sub' $P240 = "83_1283368192.21885"
+ .const 'Sub' $P240 = "83_1283975938.50512"
capture_lex $P240
- .const 'Sub' $P235 = "81_1283368192.21885"
+ .const 'Sub' $P235 = "81_1283975938.50512"
capture_lex $P235
- .const 'Sub' $P230 = "79_1283368192.21885"
+ .const 'Sub' $P230 = "79_1283975938.50512"
capture_lex $P230
- .const 'Sub' $P225 = "77_1283368192.21885"
+ .const 'Sub' $P225 = "77_1283975938.50512"
capture_lex $P225
- .const 'Sub' $P220 = "75_1283368192.21885"
+ .const 'Sub' $P220 = "75_1283975938.50512"
capture_lex $P220
- .const 'Sub' $P215 = "73_1283368192.21885"
+ .const 'Sub' $P215 = "73_1283975938.50512"
capture_lex $P215
- .const 'Sub' $P210 = "71_1283368192.21885"
+ .const 'Sub' $P210 = "71_1283975938.50512"
capture_lex $P210
- .const 'Sub' $P205 = "69_1283368192.21885"
+ .const 'Sub' $P205 = "69_1283975938.50512"
capture_lex $P205
- .const 'Sub' $P195 = "65_1283368192.21885"
+ .const 'Sub' $P195 = "65_1283975938.50512"
capture_lex $P195
- .const 'Sub' $P182 = "63_1283368192.21885"
+ .const 'Sub' $P182 = "63_1283975938.50512"
capture_lex $P182
- .const 'Sub' $P170 = "61_1283368192.21885"
+ .const 'Sub' $P170 = "61_1283975938.50512"
capture_lex $P170
- .const 'Sub' $P164 = "59_1283368192.21885"
+ .const 'Sub' $P164 = "59_1283975938.50512"
capture_lex $P164
- .const 'Sub' $P157 = "57_1283368192.21885"
+ .const 'Sub' $P157 = "57_1283975938.50512"
capture_lex $P157
- .const 'Sub' $P151 = "55_1283368192.21885"
+ .const 'Sub' $P151 = "55_1283975938.50512"
capture_lex $P151
- .const 'Sub' $P144 = "53_1283368192.21885"
+ .const 'Sub' $P144 = "53_1283975938.50512"
capture_lex $P144
- .const 'Sub' $P138 = "51_1283368192.21885"
+ .const 'Sub' $P138 = "51_1283975938.50512"
capture_lex $P138
- .const 'Sub' $P131 = "49_1283368192.21885"
+ .const 'Sub' $P131 = "49_1283975938.50512"
capture_lex $P131
- .const 'Sub' $P125 = "47_1283368192.21885"
+ .const 'Sub' $P125 = "47_1283975938.50512"
capture_lex $P125
- .const 'Sub' $P119 = "45_1283368192.21885"
+ .const 'Sub' $P119 = "45_1283975938.50512"
capture_lex $P119
- .const 'Sub' $P110 = "43_1283368192.21885"
+ .const 'Sub' $P110 = "43_1283975938.50512"
capture_lex $P110
- .const 'Sub' $P102 = "41_1283368192.21885"
+ .const 'Sub' $P102 = "41_1283975938.50512"
capture_lex $P102
- .const 'Sub' $P92 = "40_1283368192.21885"
+ .const 'Sub' $P92 = "40_1283975938.50512"
capture_lex $P92
- .const 'Sub' $P86 = "38_1283368192.21885"
+ .const 'Sub' $P86 = "38_1283975938.50512"
capture_lex $P86
- .const 'Sub' $P81 = "36_1283368192.21885"
+ .const 'Sub' $P81 = "36_1283975938.50512"
capture_lex $P81
- .const 'Sub' $P73 = "34_1283368192.21885"
+ .const 'Sub' $P73 = "34_1283975938.50512"
capture_lex $P73
- .const 'Sub' $P67 = "32_1283368192.21885"
+ .const 'Sub' $P67 = "32_1283975938.50512"
capture_lex $P67
- .const 'Sub' $P61 = "30_1283368192.21885"
+ .const 'Sub' $P61 = "30_1283975938.50512"
capture_lex $P61
- .const 'Sub' $P55 = "28_1283368192.21885"
+ .const 'Sub' $P55 = "28_1283975938.50512"
capture_lex $P55
- .const 'Sub' $P22 = "14_1283368192.21885"
+ .const 'Sub' $P22 = "14_1283975938.50512"
capture_lex $P22
- .const 'Sub' $P15 = "12_1283368192.21885"
+ .const 'Sub' $P15 = "12_1283975938.50512"
capture_lex $P15
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
@@ -1042,19 +1119,17 @@
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 33
- .const 'Sub' $P319 = "103_1283368192.21885"
+ .const 'Sub' $P319 = "103_1283975938.50512"
capture_lex $P319
-.annotate 'line', 5
.return ($P319)
- .const 'Sub' $P329 = "105_1283368192.21885"
+ .const 'Sub' $P329 = "105_1283975938.50512"
.return ($P329)
.end
.namespace ["HLL";"Grammar"]
-.sub "ws" :subid("12_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "ws" :subid("12_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx16_tgt
.local int rx16_pos
.local int rx16_off
@@ -1153,8 +1228,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__ws" :subid("13_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__ws" :subid("13_1283975938.50512") :method
+.annotate 'line', 0
new $P18, "ResizablePMCArray"
push $P18, ""
.return ($P18)
@@ -1162,8 +1237,8 @@
.namespace ["HLL";"Grammar"]
-.sub "termish" :subid("14_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "termish" :subid("14_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx23_tgt
.local int rx23_pos
.local int rx23_off
@@ -1172,7 +1247,7 @@
.local pmc rx23_cur
.local pmc rx23_debug
(rx23_cur, rx23_pos, rx23_tgt, $I10) = self."!cursor_start"()
- rx23_cur."!cursor_caparray"("postfixish", "prefixish")
+ rx23_cur."!cursor_caparray"("prefixish", "postfixish")
getattribute rx23_debug, rx23_cur, "$!debug"
.lex unicode:"$\x{a2}", rx23_cur
.local pmc match
@@ -1200,7 +1275,6 @@
set_addr $I10, rxscan26_loop
rx23_cur."!mark_push"(0, rx23_pos, $I10)
rxscan26_done:
-.annotate 'line', 8
# rx rxquantr27 ** 0..*
set_addr $I10, rxquantr27_done
rx23_cur."!mark_push"(0, rx23_pos, $I10)
@@ -1224,7 +1298,6 @@
rx23_cur."!mark_push"(rx23_rep, rx23_pos, $I10)
goto rxquantr27_loop
rxquantr27_done:
-.annotate 'line', 9
# rx subrule "term" subtype=capture negate=
rx23_cur."!cursor_pos"(rx23_pos)
$P10 = rx23_cur."term"()
@@ -1232,7 +1305,6 @@
rx23_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("term")
rx23_pos = $P10."pos"()
-.annotate 'line', 10
# rx rxquantr29 ** 0..*
set_addr $I10, rxquantr29_done
rx23_cur."!mark_push"(0, rx23_pos, $I10)
@@ -1256,7 +1328,6 @@
rx23_cur."!mark_push"(rx23_rep, rx23_pos, $I10)
goto rxquantr29_loop
rxquantr29_done:
-.annotate 'line', 7
# rx pass
rx23_cur."!cursor_pass"(rx23_pos, "termish")
if_null rx23_debug, debug_113
@@ -1264,7 +1335,6 @@
debug_113:
.return (rx23_cur)
rx23_restart:
-.annotate 'line', 5
if_null rx23_debug, debug_114
rx23_cur."!cursor_debug"("NEXT", "termish")
debug_114:
@@ -1284,8 +1354,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__termish" :subid("15_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__termish" :subid("15_1283975938.50512") :method
+.annotate 'line', 0
new $P25, "ResizablePMCArray"
push $P25, ""
.return ($P25)
@@ -1293,104 +1363,104 @@
.namespace ["HLL";"Grammar"]
-.sub "term" :subid("16_1283368192.21885") :method
-.annotate 'line', 13
+.sub "term" :subid("16_1283975938.50512") :method
+.annotate 'line', 0
$P32 = self."!protoregex"("term")
.return ($P32)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__term" :subid("17_1283368192.21885") :method
-.annotate 'line', 13
+.sub "!PREFIX__term" :subid("17_1283975938.50512") :method
+.annotate 'line', 0
$P34 = self."!PREFIX__!protoregex"("term")
.return ($P34)
.end
.namespace ["HLL";"Grammar"]
-.sub "infix" :subid("18_1283368192.21885") :method
-.annotate 'line', 14
+.sub "infix" :subid("18_1283975938.50512") :method
+.annotate 'line', 0
$P36 = self."!protoregex"("infix")
.return ($P36)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__infix" :subid("19_1283368192.21885") :method
-.annotate 'line', 14
+.sub "!PREFIX__infix" :subid("19_1283975938.50512") :method
+.annotate 'line', 0
$P38 = self."!PREFIX__!protoregex"("infix")
.return ($P38)
.end
.namespace ["HLL";"Grammar"]
-.sub "prefix" :subid("20_1283368192.21885") :method
-.annotate 'line', 15
+.sub "prefix" :subid("20_1283975938.50512") :method
+.annotate 'line', 0
$P40 = self."!protoregex"("prefix")
.return ($P40)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__prefix" :subid("21_1283368192.21885") :method
-.annotate 'line', 15
+.sub "!PREFIX__prefix" :subid("21_1283975938.50512") :method
+.annotate 'line', 0
$P42 = self."!PREFIX__!protoregex"("prefix")
.return ($P42)
.end
.namespace ["HLL";"Grammar"]
-.sub "postfix" :subid("22_1283368192.21885") :method
-.annotate 'line', 16
+.sub "postfix" :subid("22_1283975938.50512") :method
+.annotate 'line', 0
$P44 = self."!protoregex"("postfix")
.return ($P44)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postfix" :subid("23_1283368192.21885") :method
-.annotate 'line', 16
+.sub "!PREFIX__postfix" :subid("23_1283975938.50512") :method
+.annotate 'line', 0
$P46 = self."!PREFIX__!protoregex"("postfix")
.return ($P46)
.end
.namespace ["HLL";"Grammar"]
-.sub "circumfix" :subid("24_1283368192.21885") :method
-.annotate 'line', 17
+.sub "circumfix" :subid("24_1283975938.50512") :method
+.annotate 'line', 0
$P48 = self."!protoregex"("circumfix")
.return ($P48)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__circumfix" :subid("25_1283368192.21885") :method
-.annotate 'line', 17
+.sub "!PREFIX__circumfix" :subid("25_1283975938.50512") :method
+.annotate 'line', 0
$P50 = self."!PREFIX__!protoregex"("circumfix")
.return ($P50)
.end
.namespace ["HLL";"Grammar"]
-.sub "postcircumfix" :subid("26_1283368192.21885") :method
-.annotate 'line', 18
+.sub "postcircumfix" :subid("26_1283975938.50512") :method
+.annotate 'line', 0
$P52 = self."!protoregex"("postcircumfix")
.return ($P52)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postcircumfix" :subid("27_1283368192.21885") :method
-.annotate 'line', 18
+.sub "!PREFIX__postcircumfix" :subid("27_1283975938.50512") :method
+.annotate 'line', 0
$P54 = self."!PREFIX__!protoregex"("postcircumfix")
.return ($P54)
.end
.namespace ["HLL";"Grammar"]
-.sub "term:sym<circumfix>" :subid("28_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "term:sym<circumfix>" :subid("28_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx56_tgt
.local int rx56_pos
.local int rx56_off
@@ -1426,7 +1496,6 @@
set_addr $I10, rxscan60_loop
rx56_cur."!mark_push"(0, rx56_pos, $I10)
rxscan60_done:
-.annotate 'line', 20
# rx subrule "circumfix" subtype=capture negate=
rx56_cur."!cursor_pos"(rx56_pos)
$P10 = rx56_cur."circumfix"()
@@ -1441,7 +1510,6 @@
debug_117:
.return (rx56_cur)
rx56_restart:
-.annotate 'line', 5
if_null rx56_debug, debug_118
rx56_cur."!cursor_debug"("NEXT", "term:sym<circumfix>")
debug_118:
@@ -1461,8 +1529,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__term:sym<circumfix>" :subid("29_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__term:sym<circumfix>" :subid("29_1283975938.50512") :method
+.annotate 'line', 0
$P58 = self."!PREFIX__!subrule"("circumfix", "")
new $P59, "ResizablePMCArray"
push $P59, $P58
@@ -1471,8 +1539,8 @@
.namespace ["HLL";"Grammar"]
-.sub "infixish" :subid("30_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "infixish" :subid("30_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx62_tgt
.local int rx62_pos
.local int rx62_off
@@ -1508,7 +1576,6 @@
set_addr $I10, rxscan66_loop
rx62_cur."!mark_push"(0, rx62_pos, $I10)
rxscan66_done:
-.annotate 'line', 22
# rx subrule "infix" subtype=capture negate=
rx62_cur."!cursor_pos"(rx62_pos)
$P10 = rx62_cur."infix"()
@@ -1523,7 +1590,6 @@
debug_121:
.return (rx62_cur)
rx62_restart:
-.annotate 'line', 5
if_null rx62_debug, debug_122
rx62_cur."!cursor_debug"("NEXT", "infixish")
debug_122:
@@ -1543,8 +1609,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__infixish" :subid("31_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__infixish" :subid("31_1283975938.50512") :method
+.annotate 'line', 0
$P64 = self."!PREFIX__!subrule"("infix", "")
new $P65, "ResizablePMCArray"
push $P65, $P64
@@ -1553,8 +1619,8 @@
.namespace ["HLL";"Grammar"]
-.sub "prefixish" :subid("32_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "prefixish" :subid("32_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx68_tgt
.local int rx68_pos
.local int rx68_off
@@ -1590,7 +1656,6 @@
set_addr $I10, rxscan72_loop
rx68_cur."!mark_push"(0, rx68_pos, $I10)
rxscan72_done:
-.annotate 'line', 23
# rx subrule "prefix" subtype=capture negate=
rx68_cur."!cursor_pos"(rx68_pos)
$P10 = rx68_cur."prefix"()
@@ -1610,7 +1675,6 @@
debug_125:
.return (rx68_cur)
rx68_restart:
-.annotate 'line', 5
if_null rx68_debug, debug_126
rx68_cur."!cursor_debug"("NEXT", "prefixish")
debug_126:
@@ -1630,8 +1694,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__prefixish" :subid("33_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__prefixish" :subid("33_1283975938.50512") :method
+.annotate 'line', 0
$P70 = self."!PREFIX__!subrule"("prefix", "")
new $P71, "ResizablePMCArray"
push $P71, $P70
@@ -1640,8 +1704,8 @@
.namespace ["HLL";"Grammar"]
-.sub "postfixish" :subid("34_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "postfixish" :subid("34_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx74_tgt
.local int rx74_pos
.local int rx74_off
@@ -1678,10 +1742,8 @@
rx74_cur."!mark_push"(0, rx74_pos, $I10)
rxscan79_done:
alt80_0:
-.annotate 'line', 24
set_addr $I10, alt80_1
rx74_cur."!mark_push"(0, rx74_pos, $I10)
-.annotate 'line', 25
# rx subrule "postfix" subtype=capture negate=
rx74_cur."!cursor_pos"(rx74_pos)
$P10 = rx74_cur."postfix"()
@@ -1691,7 +1753,6 @@
rx74_pos = $P10."pos"()
goto alt80_end
alt80_1:
-.annotate 'line', 26
# rx subrule "postcircumfix" subtype=capture negate=
rx74_cur."!cursor_pos"(rx74_pos)
$P10 = rx74_cur."postcircumfix"()
@@ -1700,7 +1761,6 @@
$P10."!cursor_names"("OPER=postcircumfix")
rx74_pos = $P10."pos"()
alt80_end:
-.annotate 'line', 24
# rx pass
rx74_cur."!cursor_pass"(rx74_pos, "postfixish")
if_null rx74_debug, debug_129
@@ -1708,7 +1768,6 @@
debug_129:
.return (rx74_cur)
rx74_restart:
-.annotate 'line', 5
if_null rx74_debug, debug_130
rx74_cur."!cursor_debug"("NEXT", "postfixish")
debug_130:
@@ -1728,8 +1787,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postfixish" :subid("35_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__postfixish" :subid("35_1283975938.50512") :method
+.annotate 'line', 0
$P76 = self."!PREFIX__!subrule"("postcircumfix", "")
$P77 = self."!PREFIX__!subrule"("postfix", "")
new $P78, "ResizablePMCArray"
@@ -1740,8 +1799,8 @@
.namespace ["HLL";"Grammar"]
-.sub "nullterm" :subid("36_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "nullterm" :subid("36_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx82_tgt
.local int rx82_pos
.local int rx82_off
@@ -1777,7 +1836,6 @@
set_addr $I10, rxscan85_loop
rx82_cur."!mark_push"(0, rx82_pos, $I10)
rxscan85_done:
-.annotate 'line', 29
# rx pass
rx82_cur."!cursor_pass"(rx82_pos, "nullterm")
if_null rx82_debug, debug_133
@@ -1785,7 +1843,6 @@
debug_133:
.return (rx82_cur)
rx82_restart:
-.annotate 'line', 5
if_null rx82_debug, debug_134
rx82_cur."!cursor_debug"("NEXT", "nullterm")
debug_134:
@@ -1805,8 +1862,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__nullterm" :subid("37_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__nullterm" :subid("37_1283975938.50512") :method
+.annotate 'line', 0
new $P84, "ResizablePMCArray"
push $P84, ""
.return ($P84)
@@ -1814,8 +1871,8 @@
.namespace ["HLL";"Grammar"]
-.sub "nullterm_alt" :subid("38_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 5
+.sub "nullterm_alt" :subid("38_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx87_tgt
.local int rx87_pos
.local int rx87_off
@@ -1851,7 +1908,6 @@
set_addr $I10, rxscan91_loop
rx87_cur."!mark_push"(0, rx87_pos, $I10)
rxscan91_done:
-.annotate 'line', 30
# rx subrule "nullterm" subtype=capture negate=
rx87_cur."!cursor_pos"(rx87_pos)
$P10 = rx87_cur."nullterm"()
@@ -1866,7 +1922,6 @@
debug_137:
.return (rx87_cur)
rx87_restart:
-.annotate 'line', 5
if_null rx87_debug, debug_138
rx87_cur."!cursor_debug"("NEXT", "nullterm_alt")
debug_138:
@@ -1886,8 +1941,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__nullterm_alt" :subid("39_1283368192.21885") :method
-.annotate 'line', 5
+.sub "!PREFIX__nullterm_alt" :subid("39_1283975938.50512") :method
+.annotate 'line', 0
$P89 = self."!PREFIX__!subrule"("nullterm", "")
new $P90, "ResizablePMCArray"
push $P90, $P89
@@ -1897,8 +1952,8 @@
.namespace ["HLL";"Grammar"]
.include "except_types.pasm"
-.sub "nulltermish" :subid("40_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "nulltermish" :subid("40_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
new $P94, 'ExceptionHandler'
set_addr $P94, control_93
$P94."handle_types"(.CONTROL_RETURN)
@@ -1924,8 +1979,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_delimited" :subid("41_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_delimited" :subid("41_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx103_tgt
.local int rx103_pos
.local int rx103_off
@@ -1962,7 +2017,6 @@
set_addr $I10, rxscan107_loop
rx103_cur."!mark_push"(0, rx103_pos, $I10)
rxscan107_done:
-.annotate 'line', 37
# rx subrule "starter" subtype=capture negate=
rx103_cur."!cursor_pos"(rx103_pos)
$P10 = rx103_cur."starter"()
@@ -2000,7 +2054,6 @@
rx103_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("stopper")
rx103_pos = $P10."pos"()
-.annotate 'line', 36
# rx pass
rx103_cur."!cursor_pass"(rx103_pos, "quote_delimited")
if_null rx103_debug, debug_141
@@ -2008,7 +2061,6 @@
debug_141:
.return (rx103_cur)
rx103_restart:
-.annotate 'line', 33
if_null rx103_debug, debug_142
rx103_cur."!cursor_debug"("NEXT", "quote_delimited")
debug_142:
@@ -2028,8 +2080,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_delimited" :subid("42_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_delimited" :subid("42_1283975938.50512") :method
+.annotate 'line', 0
$P105 = self."!PREFIX__!subrule"("starter", "")
new $P106, "ResizablePMCArray"
push $P106, $P105
@@ -2038,8 +2090,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_atom" :subid("43_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_atom" :subid("43_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx111_tgt
.local int rx111_pos
.local int rx111_off
@@ -2075,16 +2127,13 @@
set_addr $I10, rxscan114_loop
rx111_cur."!mark_push"(0, rx111_pos, $I10)
rxscan114_done:
-.annotate 'line', 41
# rx subrule "stopper" subtype=zerowidth negate=1
rx111_cur."!cursor_pos"(rx111_pos)
$P10 = rx111_cur."stopper"()
if $P10, rx111_fail
alt115_0:
-.annotate 'line', 42
set_addr $I10, alt115_1
rx111_cur."!mark_push"(0, rx111_pos, $I10)
-.annotate 'line', 43
# rx subrule "quote_escape" subtype=capture negate=
rx111_cur."!cursor_pos"(rx111_pos)
$P10 = rx111_cur."quote_escape"()
@@ -2094,7 +2143,6 @@
rx111_pos = $P10."pos"()
goto alt115_end
alt115_1:
-.annotate 'line', 44
# rx rxquantr116 ** 1..*
set_addr $I10, rxquantr116_done
rx111_cur."!mark_push"(0, -1, $I10)
@@ -2117,7 +2165,6 @@
goto rxquantr116_loop
rxquantr116_done:
alt115_end:
-.annotate 'line', 40
# rx pass
rx111_cur."!cursor_pass"(rx111_pos, "quote_atom")
if_null rx111_debug, debug_145
@@ -2125,7 +2172,6 @@
debug_145:
.return (rx111_cur)
rx111_restart:
-.annotate 'line', 33
if_null rx111_debug, debug_146
rx111_cur."!cursor_debug"("NEXT", "quote_atom")
debug_146:
@@ -2145,8 +2191,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_atom" :subid("44_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_atom" :subid("44_1283975938.50512") :method
+.annotate 'line', 0
new $P113, "ResizablePMCArray"
push $P113, ""
.return ($P113)
@@ -2154,8 +2200,8 @@
.namespace ["HLL";"Grammar"]
-.sub "decint" :subid("45_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "decint" :subid("45_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx120_tgt
.local int rx120_pos
.local int rx120_off
@@ -2191,7 +2237,6 @@
set_addr $I10, rxscan123_loop
rx120_cur."!mark_push"(0, rx120_pos, $I10)
rxscan123_done:
-.annotate 'line', 48
# rx rxquantr124 ** 1..*
set_addr $I10, rxquantr124_done
rx120_cur."!mark_push"(0, -1, $I10)
@@ -2222,7 +2267,6 @@
debug_149:
.return (rx120_cur)
rx120_restart:
-.annotate 'line', 33
if_null rx120_debug, debug_150
rx120_cur."!cursor_debug"("NEXT", "decint")
debug_150:
@@ -2242,8 +2286,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__decint" :subid("46_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__decint" :subid("46_1283975938.50512") :method
+.annotate 'line', 0
new $P122, "ResizablePMCArray"
push $P122, ""
.return ($P122)
@@ -2251,8 +2295,8 @@
.namespace ["HLL";"Grammar"]
-.sub "decints" :subid("47_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "decints" :subid("47_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx126_tgt
.local int rx126_pos
.local int rx126_off
@@ -2289,7 +2333,6 @@
set_addr $I10, rxscan129_loop
rx126_cur."!mark_push"(0, rx126_pos, $I10)
rxscan129_done:
-.annotate 'line', 49
# rx rxquantr130 ** 1..*
set_addr $I10, rxquantr130_done
rx126_cur."!mark_push"(0, -1, $I10)
@@ -2331,7 +2374,6 @@
debug_153:
.return (rx126_cur)
rx126_restart:
-.annotate 'line', 33
if_null rx126_debug, debug_154
rx126_cur."!cursor_debug"("NEXT", "decints")
debug_154:
@@ -2351,8 +2393,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__decints" :subid("48_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__decints" :subid("48_1283975938.50512") :method
+.annotate 'line', 0
new $P128, "ResizablePMCArray"
push $P128, ""
.return ($P128)
@@ -2360,8 +2402,8 @@
.namespace ["HLL";"Grammar"]
-.sub "hexint" :subid("49_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "hexint" :subid("49_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx132_tgt
.local int rx132_pos
.local int rx132_off
@@ -2397,7 +2439,6 @@
set_addr $I10, rxscan135_loop
rx132_cur."!mark_push"(0, rx132_pos, $I10)
rxscan135_done:
-.annotate 'line', 51
# rx rxquantr136 ** 1..*
set_addr $I10, rxquantr136_done
rx132_cur."!mark_push"(0, -1, $I10)
@@ -2438,7 +2479,6 @@
debug_157:
.return (rx132_cur)
rx132_restart:
-.annotate 'line', 33
if_null rx132_debug, debug_158
rx132_cur."!cursor_debug"("NEXT", "hexint")
debug_158:
@@ -2458,8 +2498,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__hexint" :subid("50_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__hexint" :subid("50_1283975938.50512") :method
+.annotate 'line', 0
new $P134, "ResizablePMCArray"
push $P134, ""
.return ($P134)
@@ -2467,8 +2507,8 @@
.namespace ["HLL";"Grammar"]
-.sub "hexints" :subid("51_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "hexints" :subid("51_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx139_tgt
.local int rx139_pos
.local int rx139_off
@@ -2505,7 +2545,6 @@
set_addr $I10, rxscan142_loop
rx139_cur."!mark_push"(0, rx139_pos, $I10)
rxscan142_done:
-.annotate 'line', 52
# rx rxquantr143 ** 1..*
set_addr $I10, rxquantr143_done
rx139_cur."!mark_push"(0, -1, $I10)
@@ -2547,7 +2586,6 @@
debug_161:
.return (rx139_cur)
rx139_restart:
-.annotate 'line', 33
if_null rx139_debug, debug_162
rx139_cur."!cursor_debug"("NEXT", "hexints")
debug_162:
@@ -2567,8 +2605,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__hexints" :subid("52_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__hexints" :subid("52_1283975938.50512") :method
+.annotate 'line', 0
new $P141, "ResizablePMCArray"
push $P141, ""
.return ($P141)
@@ -2576,8 +2614,8 @@
.namespace ["HLL";"Grammar"]
-.sub "octint" :subid("53_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "octint" :subid("53_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx145_tgt
.local int rx145_pos
.local int rx145_off
@@ -2613,7 +2651,6 @@
set_addr $I10, rxscan148_loop
rx145_cur."!mark_push"(0, rx145_pos, $I10)
rxscan148_done:
-.annotate 'line', 54
# rx rxquantr149 ** 1..*
set_addr $I10, rxquantr149_done
rx145_cur."!mark_push"(0, -1, $I10)
@@ -2654,7 +2691,6 @@
debug_165:
.return (rx145_cur)
rx145_restart:
-.annotate 'line', 33
if_null rx145_debug, debug_166
rx145_cur."!cursor_debug"("NEXT", "octint")
debug_166:
@@ -2674,8 +2710,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__octint" :subid("54_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__octint" :subid("54_1283975938.50512") :method
+.annotate 'line', 0
new $P147, "ResizablePMCArray"
push $P147, ""
.return ($P147)
@@ -2683,8 +2719,8 @@
.namespace ["HLL";"Grammar"]
-.sub "octints" :subid("55_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "octints" :subid("55_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx152_tgt
.local int rx152_pos
.local int rx152_off
@@ -2721,7 +2757,6 @@
set_addr $I10, rxscan155_loop
rx152_cur."!mark_push"(0, rx152_pos, $I10)
rxscan155_done:
-.annotate 'line', 55
# rx rxquantr156 ** 1..*
set_addr $I10, rxquantr156_done
rx152_cur."!mark_push"(0, -1, $I10)
@@ -2763,7 +2798,6 @@
debug_169:
.return (rx152_cur)
rx152_restart:
-.annotate 'line', 33
if_null rx152_debug, debug_170
rx152_cur."!cursor_debug"("NEXT", "octints")
debug_170:
@@ -2783,8 +2817,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__octints" :subid("56_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__octints" :subid("56_1283975938.50512") :method
+.annotate 'line', 0
new $P154, "ResizablePMCArray"
push $P154, ""
.return ($P154)
@@ -2792,8 +2826,8 @@
.namespace ["HLL";"Grammar"]
-.sub "binint" :subid("57_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "binint" :subid("57_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx158_tgt
.local int rx158_pos
.local int rx158_off
@@ -2829,7 +2863,6 @@
set_addr $I10, rxscan161_loop
rx158_cur."!mark_push"(0, rx158_pos, $I10)
rxscan161_done:
-.annotate 'line', 57
# rx rxquantr162 ** 1..*
set_addr $I10, rxquantr162_done
rx158_cur."!mark_push"(0, -1, $I10)
@@ -2870,7 +2903,6 @@
debug_173:
.return (rx158_cur)
rx158_restart:
-.annotate 'line', 33
if_null rx158_debug, debug_174
rx158_cur."!cursor_debug"("NEXT", "binint")
debug_174:
@@ -2890,8 +2922,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__binint" :subid("58_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__binint" :subid("58_1283975938.50512") :method
+.annotate 'line', 0
new $P160, "ResizablePMCArray"
push $P160, ""
.return ($P160)
@@ -2899,8 +2931,8 @@
.namespace ["HLL";"Grammar"]
-.sub "binints" :subid("59_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "binints" :subid("59_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx165_tgt
.local int rx165_pos
.local int rx165_off
@@ -2937,7 +2969,6 @@
set_addr $I10, rxscan168_loop
rx165_cur."!mark_push"(0, rx165_pos, $I10)
rxscan168_done:
-.annotate 'line', 58
# rx rxquantr169 ** 1..*
set_addr $I10, rxquantr169_done
rx165_cur."!mark_push"(0, -1, $I10)
@@ -2979,7 +3010,6 @@
debug_177:
.return (rx165_cur)
rx165_restart:
-.annotate 'line', 33
if_null rx165_debug, debug_178
rx165_cur."!cursor_debug"("NEXT", "binints")
debug_178:
@@ -2999,8 +3029,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__binints" :subid("60_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__binints" :subid("60_1283975938.50512") :method
+.annotate 'line', 0
new $P167, "ResizablePMCArray"
push $P167, ""
.return ($P167)
@@ -3008,8 +3038,8 @@
.namespace ["HLL";"Grammar"]
-.sub "integer" :subid("61_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "integer" :subid("61_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx171_tgt
.local int rx171_pos
.local int rx171_off
@@ -3046,10 +3076,8 @@
rx171_cur."!mark_push"(0, rx171_pos, $I10)
rxscan179_done:
alt180_0:
-.annotate 'line', 61
set_addr $I10, alt180_1
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 62
# rx literal "0"
add $I11, rx171_pos, 1
gt $I11, rx171_eos, rx171_fail
@@ -3078,7 +3106,6 @@
alt181_1:
set_addr $I10, alt181_2
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 63
# rx literal "o"
add $I11, rx171_pos, 1
gt $I11, rx171_eos, rx171_fail
@@ -3097,7 +3124,6 @@
alt181_2:
set_addr $I10, alt181_3
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 64
# rx literal "x"
add $I11, rx171_pos, 1
gt $I11, rx171_eos, rx171_fail
@@ -3114,7 +3140,6 @@
rx171_pos = $P10."pos"()
goto alt181_end
alt181_3:
-.annotate 'line', 65
# rx literal "d"
add $I11, rx171_pos, 1
gt $I11, rx171_eos, rx171_fail
@@ -3130,10 +3155,8 @@
$P10."!cursor_names"("VALUE=decint")
rx171_pos = $P10."pos"()
alt181_end:
-.annotate 'line', 62
goto alt180_end
alt180_1:
-.annotate 'line', 67
# rx subrule "decint" subtype=capture negate=
rx171_cur."!cursor_pos"(rx171_pos)
$P10 = rx171_cur."decint"()
@@ -3142,7 +3165,6 @@
$P10."!cursor_names"("VALUE=decint")
rx171_pos = $P10."pos"()
alt180_end:
-.annotate 'line', 60
# rx pass
rx171_cur."!cursor_pass"(rx171_pos, "integer")
if_null rx171_debug, debug_181
@@ -3150,7 +3172,6 @@
debug_181:
.return (rx171_cur)
rx171_restart:
-.annotate 'line', 33
if_null rx171_debug, debug_182
rx171_cur."!cursor_debug"("NEXT", "integer")
debug_182:
@@ -3170,8 +3191,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__integer" :subid("62_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__integer" :subid("62_1283975938.50512") :method
+.annotate 'line', 0
$P173 = self."!PREFIX__!subrule"("decint", "")
$P174 = self."!PREFIX__!subrule"("decint", "0d")
$P175 = self."!PREFIX__!subrule"("hexint", "0x")
@@ -3188,8 +3209,8 @@
.namespace ["HLL";"Grammar"]
-.sub "dec_number" :subid("63_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "dec_number" :subid("63_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx183_tgt
.local int rx183_pos
.local int rx183_off
@@ -3227,10 +3248,8 @@
rx183_cur."!mark_push"(0, rx183_pos, $I10)
rxscan186_done:
alt187_0:
-.annotate 'line', 71
set_addr $I10, alt187_1
rx183_cur."!mark_push"(0, rx183_pos, $I10)
-.annotate 'line', 72
# rx subcapture "coeff"
set_addr $I10, rxcap_188_fail
rx183_cur."!mark_push"(0, rx183_pos, $I10)
@@ -3282,7 +3301,6 @@
alt187_1:
set_addr $I10, alt187_2
rx183_cur."!mark_push"(0, rx183_pos, $I10)
-.annotate 'line', 73
# rx subcapture "coeff"
set_addr $I10, rxcap_191_fail
rx183_cur."!mark_push"(0, rx183_pos, $I10)
@@ -3338,7 +3356,6 @@
rxquantr192_done:
goto alt187_end
alt187_2:
-.annotate 'line', 74
# rx subcapture "coeff"
set_addr $I10, rxcap_194_fail
rx183_cur."!mark_push"(0, rx183_pos, $I10)
@@ -3367,7 +3384,6 @@
$P10."!cursor_names"("escale")
rx183_pos = $P10."pos"()
alt187_end:
-.annotate 'line', 71
# rx pass
rx183_cur."!cursor_pass"(rx183_pos, "dec_number")
if_null rx183_debug, debug_185
@@ -3375,7 +3391,6 @@
debug_185:
.return (rx183_cur)
rx183_restart:
-.annotate 'line', 33
if_null rx183_debug, debug_186
rx183_cur."!cursor_debug"("NEXT", "dec_number")
debug_186:
@@ -3395,8 +3410,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__dec_number" :subid("64_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__dec_number" :subid("64_1283975938.50512") :method
+.annotate 'line', 0
new $P185, "ResizablePMCArray"
push $P185, ""
push $P185, ""
@@ -3406,8 +3421,8 @@
.namespace ["HLL";"Grammar"]
-.sub "escale" :subid("65_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "escale" :subid("65_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx196_tgt
.local int rx196_pos
.local int rx196_off
@@ -3443,7 +3458,6 @@
set_addr $I10, rxscan199_loop
rx196_cur."!mark_push"(0, rx196_pos, $I10)
rxscan199_done:
-.annotate 'line', 77
# rx enumcharlist negate=0
ge rx196_pos, rx196_eos, rx196_fail
sub $I10, rx196_pos, rx196_off
@@ -3478,7 +3492,6 @@
debug_189:
.return (rx196_cur)
rx196_restart:
-.annotate 'line', 33
if_null rx196_debug, debug_190
rx196_cur."!cursor_debug"("NEXT", "escale")
debug_190:
@@ -3498,8 +3511,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__escale" :subid("66_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__escale" :subid("66_1283975938.50512") :method
+.annotate 'line', 0
new $P198, "ResizablePMCArray"
push $P198, "e"
push $P198, "E"
@@ -3508,24 +3521,24 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape" :subid("67_1283368192.21885") :method
-.annotate 'line', 79
+.sub "quote_escape" :subid("67_1283975938.50512") :method
+.annotate 'line', 0
$P202 = self."!protoregex"("quote_escape")
.return ($P202)
.end
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape" :subid("68_1283368192.21885") :method
-.annotate 'line', 79
+.sub "!PREFIX__quote_escape" :subid("68_1283975938.50512") :method
+.annotate 'line', 0
$P204 = self."!PREFIX__!protoregex"("quote_escape")
.return ($P204)
.end
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<backslash>" :subid("69_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<backslash>" :subid("69_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx206_tgt
.local int rx206_pos
.local int rx206_off
@@ -3561,7 +3574,6 @@
set_addr $I10, rxscan209_loop
rx206_cur."!mark_push"(0, rx206_pos, $I10)
rxscan209_done:
-.annotate 'line', 80
# rx literal "\\\\"
add $I11, rx206_pos, 2
gt $I11, rx206_eos, rx206_fail
@@ -3580,7 +3592,6 @@
debug_193:
.return (rx206_cur)
rx206_restart:
-.annotate 'line', 33
if_null rx206_debug, debug_194
rx206_cur."!cursor_debug"("NEXT", "quote_escape:sym<backslash>")
debug_194:
@@ -3600,8 +3611,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<backslash>" :subid("70_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<backslash>" :subid("70_1283975938.50512") :method
+.annotate 'line', 0
new $P208, "ResizablePMCArray"
push $P208, "\\\\"
.return ($P208)
@@ -3609,8 +3620,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<stopper>" :subid("71_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<stopper>" :subid("71_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx211_tgt
.local int rx211_pos
.local int rx211_off
@@ -3646,7 +3657,6 @@
set_addr $I10, rxscan214_loop
rx211_cur."!mark_push"(0, rx211_pos, $I10)
rxscan214_done:
-.annotate 'line', 81
# rx literal "\\"
add $I11, rx211_pos, 1
gt $I11, rx211_eos, rx211_fail
@@ -3672,7 +3682,6 @@
debug_197:
.return (rx211_cur)
rx211_restart:
-.annotate 'line', 33
if_null rx211_debug, debug_198
rx211_cur."!cursor_debug"("NEXT", "quote_escape:sym<stopper>")
debug_198:
@@ -3692,8 +3701,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<stopper>" :subid("72_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<stopper>" :subid("72_1283975938.50512") :method
+.annotate 'line', 0
new $P213, "ResizablePMCArray"
push $P213, "\\"
.return ($P213)
@@ -3701,8 +3710,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<bs>" :subid("73_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<bs>" :subid("73_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx216_tgt
.local int rx216_pos
.local int rx216_off
@@ -3738,7 +3747,6 @@
set_addr $I10, rxscan219_loop
rx216_cur."!mark_push"(0, rx216_pos, $I10)
rxscan219_done:
-.annotate 'line', 83
# rx literal "\\b"
add $I11, rx216_pos, 2
gt $I11, rx216_eos, rx216_fail
@@ -3757,7 +3765,6 @@
debug_201:
.return (rx216_cur)
rx216_restart:
-.annotate 'line', 33
if_null rx216_debug, debug_202
rx216_cur."!cursor_debug"("NEXT", "quote_escape:sym<bs>")
debug_202:
@@ -3777,8 +3784,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<bs>" :subid("74_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<bs>" :subid("74_1283975938.50512") :method
+.annotate 'line', 0
new $P218, "ResizablePMCArray"
push $P218, "\\b"
.return ($P218)
@@ -3786,8 +3793,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<nl>" :subid("75_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<nl>" :subid("75_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx221_tgt
.local int rx221_pos
.local int rx221_off
@@ -3823,7 +3830,6 @@
set_addr $I10, rxscan224_loop
rx221_cur."!mark_push"(0, rx221_pos, $I10)
rxscan224_done:
-.annotate 'line', 84
# rx literal "\\n"
add $I11, rx221_pos, 2
gt $I11, rx221_eos, rx221_fail
@@ -3842,7 +3848,6 @@
debug_205:
.return (rx221_cur)
rx221_restart:
-.annotate 'line', 33
if_null rx221_debug, debug_206
rx221_cur."!cursor_debug"("NEXT", "quote_escape:sym<nl>")
debug_206:
@@ -3862,8 +3867,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<nl>" :subid("76_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<nl>" :subid("76_1283975938.50512") :method
+.annotate 'line', 0
new $P223, "ResizablePMCArray"
push $P223, "\\n"
.return ($P223)
@@ -3871,8 +3876,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<cr>" :subid("77_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<cr>" :subid("77_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx226_tgt
.local int rx226_pos
.local int rx226_off
@@ -3908,7 +3913,6 @@
set_addr $I10, rxscan229_loop
rx226_cur."!mark_push"(0, rx226_pos, $I10)
rxscan229_done:
-.annotate 'line', 85
# rx literal "\\r"
add $I11, rx226_pos, 2
gt $I11, rx226_eos, rx226_fail
@@ -3927,7 +3931,6 @@
debug_209:
.return (rx226_cur)
rx226_restart:
-.annotate 'line', 33
if_null rx226_debug, debug_210
rx226_cur."!cursor_debug"("NEXT", "quote_escape:sym<cr>")
debug_210:
@@ -3947,8 +3950,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<cr>" :subid("78_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<cr>" :subid("78_1283975938.50512") :method
+.annotate 'line', 0
new $P228, "ResizablePMCArray"
push $P228, "\\r"
.return ($P228)
@@ -3956,8 +3959,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<tab>" :subid("79_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<tab>" :subid("79_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx231_tgt
.local int rx231_pos
.local int rx231_off
@@ -3993,7 +3996,6 @@
set_addr $I10, rxscan234_loop
rx231_cur."!mark_push"(0, rx231_pos, $I10)
rxscan234_done:
-.annotate 'line', 86
# rx literal "\\t"
add $I11, rx231_pos, 2
gt $I11, rx231_eos, rx231_fail
@@ -4012,7 +4014,6 @@
debug_213:
.return (rx231_cur)
rx231_restart:
-.annotate 'line', 33
if_null rx231_debug, debug_214
rx231_cur."!cursor_debug"("NEXT", "quote_escape:sym<tab>")
debug_214:
@@ -4032,8 +4033,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<tab>" :subid("80_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<tab>" :subid("80_1283975938.50512") :method
+.annotate 'line', 0
new $P233, "ResizablePMCArray"
push $P233, "\\t"
.return ($P233)
@@ -4041,8 +4042,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<ff>" :subid("81_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<ff>" :subid("81_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx236_tgt
.local int rx236_pos
.local int rx236_off
@@ -4078,7 +4079,6 @@
set_addr $I10, rxscan239_loop
rx236_cur."!mark_push"(0, rx236_pos, $I10)
rxscan239_done:
-.annotate 'line', 87
# rx literal "\\f"
add $I11, rx236_pos, 2
gt $I11, rx236_eos, rx236_fail
@@ -4097,7 +4097,6 @@
debug_217:
.return (rx236_cur)
rx236_restart:
-.annotate 'line', 33
if_null rx236_debug, debug_218
rx236_cur."!cursor_debug"("NEXT", "quote_escape:sym<ff>")
debug_218:
@@ -4117,8 +4116,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<ff>" :subid("82_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<ff>" :subid("82_1283975938.50512") :method
+.annotate 'line', 0
new $P238, "ResizablePMCArray"
push $P238, "\\f"
.return ($P238)
@@ -4126,8 +4125,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<esc>" :subid("83_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<esc>" :subid("83_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx241_tgt
.local int rx241_pos
.local int rx241_off
@@ -4163,7 +4162,6 @@
set_addr $I10, rxscan244_loop
rx241_cur."!mark_push"(0, rx241_pos, $I10)
rxscan244_done:
-.annotate 'line', 88
# rx literal "\\e"
add $I11, rx241_pos, 2
gt $I11, rx241_eos, rx241_fail
@@ -4182,7 +4180,6 @@
debug_221:
.return (rx241_cur)
rx241_restart:
-.annotate 'line', 33
if_null rx241_debug, debug_222
rx241_cur."!cursor_debug"("NEXT", "quote_escape:sym<esc>")
debug_222:
@@ -4202,8 +4199,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<esc>" :subid("84_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<esc>" :subid("84_1283975938.50512") :method
+.annotate 'line', 0
new $P243, "ResizablePMCArray"
push $P243, "\\e"
.return ($P243)
@@ -4211,8 +4208,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<hex>" :subid("85_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<hex>" :subid("85_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx246_tgt
.local int rx246_pos
.local int rx246_off
@@ -4248,7 +4245,6 @@
set_addr $I10, rxscan249_loop
rx246_cur."!mark_push"(0, rx246_pos, $I10)
rxscan249_done:
-.annotate 'line', 90
# rx literal unicode:"\\x"
add $I11, rx246_pos, 2
gt $I11, rx246_eos, rx246_fail
@@ -4261,7 +4257,6 @@
$P10 = rx246_cur."quotemod_check"("b")
unless $P10, rx246_fail
alt250_0:
-.annotate 'line', 91
set_addr $I10, alt250_1
rx246_cur."!mark_push"(0, rx246_pos, $I10)
# rx subrule "hexint" subtype=capture negate=
@@ -4295,7 +4290,6 @@
ne $I11, 93, rx246_fail
add rx246_pos, 1
alt250_end:
-.annotate 'line', 89
# rx pass
rx246_cur."!cursor_pass"(rx246_pos, "quote_escape:sym<hex>")
if_null rx246_debug, debug_225
@@ -4303,7 +4297,6 @@
debug_225:
.return (rx246_cur)
rx246_restart:
-.annotate 'line', 33
if_null rx246_debug, debug_226
rx246_cur."!cursor_debug"("NEXT", "quote_escape:sym<hex>")
debug_226:
@@ -4323,8 +4316,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<hex>" :subid("86_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<hex>" :subid("86_1283975938.50512") :method
+.annotate 'line', 0
new $P248, "ResizablePMCArray"
push $P248, unicode:"\\x"
.return ($P248)
@@ -4332,8 +4325,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<oct>" :subid("87_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<oct>" :subid("87_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx252_tgt
.local int rx252_pos
.local int rx252_off
@@ -4369,7 +4362,6 @@
set_addr $I10, rxscan255_loop
rx252_cur."!mark_push"(0, rx252_pos, $I10)
rxscan255_done:
-.annotate 'line', 94
# rx literal "\\o"
add $I11, rx252_pos, 2
gt $I11, rx252_eos, rx252_fail
@@ -4382,7 +4374,6 @@
$P10 = rx252_cur."quotemod_check"("b")
unless $P10, rx252_fail
alt256_0:
-.annotate 'line', 95
set_addr $I10, alt256_1
rx252_cur."!mark_push"(0, rx252_pos, $I10)
# rx subrule "octint" subtype=capture negate=
@@ -4416,7 +4407,6 @@
ne $I11, 93, rx252_fail
add rx252_pos, 1
alt256_end:
-.annotate 'line', 93
# rx pass
rx252_cur."!cursor_pass"(rx252_pos, "quote_escape:sym<oct>")
if_null rx252_debug, debug_229
@@ -4424,7 +4414,6 @@
debug_229:
.return (rx252_cur)
rx252_restart:
-.annotate 'line', 33
if_null rx252_debug, debug_230
rx252_cur."!cursor_debug"("NEXT", "quote_escape:sym<oct>")
debug_230:
@@ -4444,8 +4433,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<oct>" :subid("88_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<oct>" :subid("88_1283975938.50512") :method
+.annotate 'line', 0
new $P254, "ResizablePMCArray"
push $P254, "\\o"
.return ($P254)
@@ -4453,8 +4442,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<chr>" :subid("89_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<chr>" :subid("89_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx258_tgt
.local int rx258_pos
.local int rx258_off
@@ -4490,7 +4479,6 @@
set_addr $I10, rxscan261_loop
rx258_cur."!mark_push"(0, rx258_pos, $I10)
rxscan261_done:
-.annotate 'line', 97
# rx literal "\\c"
add $I11, rx258_pos, 2
gt $I11, rx258_eos, rx258_fail
@@ -4516,7 +4504,6 @@
debug_233:
.return (rx258_cur)
rx258_restart:
-.annotate 'line', 33
if_null rx258_debug, debug_234
rx258_cur."!cursor_debug"("NEXT", "quote_escape:sym<chr>")
debug_234:
@@ -4536,8 +4523,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<chr>" :subid("90_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<chr>" :subid("90_1283975938.50512") :method
+.annotate 'line', 0
new $P260, "ResizablePMCArray"
push $P260, "\\c"
.return ($P260)
@@ -4545,8 +4532,8 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<0>" :subid("91_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "quote_escape:sym<0>" :subid("91_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx263_tgt
.local int rx263_pos
.local int rx263_off
@@ -4582,7 +4569,6 @@
set_addr $I10, rxscan266_loop
rx263_cur."!mark_push"(0, rx263_pos, $I10)
rxscan266_done:
-.annotate 'line', 98
# rx literal "\\"
add $I11, rx263_pos, 1
gt $I11, rx263_eos, rx263_fail
@@ -4622,7 +4608,6 @@
debug_237:
.return (rx263_cur)
rx263_restart:
-.annotate 'line', 33
if_null rx263_debug, debug_238
rx263_cur."!cursor_debug"("NEXT", "quote_escape:sym<0>")
debug_238:
@@ -4642,8 +4627,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<0>" :subid("92_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<0>" :subid("92_1283975938.50512") :method
+.annotate 'line', 0
new $P265, "ResizablePMCArray"
push $P265, "\\0"
.return ($P265)
@@ -4651,13 +4636,13 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<misc>" :subid("93_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
- .const 'Sub' $P288 = "97_1283368192.21885"
+.sub "quote_escape:sym<misc>" :subid("93_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
+ .const 'Sub' $P288 = "97_1283975938.50512"
capture_lex $P288
- .const 'Sub' $P281 = "96_1283368192.21885"
+ .const 'Sub' $P281 = "96_1283975938.50512"
capture_lex $P281
- .const 'Sub' $P276 = "95_1283368192.21885"
+ .const 'Sub' $P276 = "95_1283975938.50512"
capture_lex $P276
.local string rx269_tgt
.local int rx269_pos
@@ -4694,12 +4679,11 @@
set_addr $I10, rxscan272_loop
rx269_cur."!mark_push"(0, rx269_pos, $I10)
rxscan272_done:
-.annotate 'line', 100
rx269_cur."!cursor_pos"(rx269_pos)
find_lex $P273, unicode:"$\x{a2}"
$P274 = $P273."MATCH"()
store_lex "$/", $P274
- .const 'Sub' $P276 = "95_1283368192.21885"
+ .const 'Sub' $P276 = "95_1283975938.50512"
capture_lex $P276
$P277 = $P276()
# rx literal "\\"
@@ -4710,22 +4694,18 @@
ne $I11, 92, rx269_fail
add rx269_pos, 1
alt278_0:
-.annotate 'line', 101
set_addr $I10, alt278_1
rx269_cur."!mark_push"(0, rx269_pos, $I10)
-.annotate 'line', 102
# rx subrule "quotemod_check" subtype=zerowidth negate=
rx269_cur."!cursor_pos"(rx269_pos)
$P10 = rx269_cur."quotemod_check"("b")
unless $P10, rx269_fail
alt279_0:
-.annotate 'line', 103
set_addr $I10, alt279_1
rx269_cur."!mark_push"(0, rx269_pos, $I10)
-.annotate 'line', 104
# rx subrule $P281 subtype=capture negate=
rx269_cur."!cursor_pos"(rx269_pos)
- .const 'Sub' $P281 = "96_1283368192.21885"
+ .const 'Sub' $P281 = "96_1283975938.50512"
capture_lex $P281
$P10 = rx269_cur.$P281()
unless $P10, rx269_fail
@@ -4734,7 +4714,6 @@
rx269_pos = $P10."pos"()
goto alt279_end
alt279_1:
-.annotate 'line', 105
# rx subcapture "x"
set_addr $I10, rxcap_284_fail
rx269_cur."!mark_push"(0, rx269_pos, $I10)
@@ -4759,14 +4738,12 @@
find_lex $P285, unicode:"$\x{a2}"
$P286 = $P285."MATCH"()
store_lex "$/", $P286
- .const 'Sub' $P288 = "97_1283368192.21885"
+ .const 'Sub' $P288 = "97_1283975938.50512"
capture_lex $P288
$P298 = $P288()
alt279_end:
-.annotate 'line', 102
goto alt278_end
alt278_1:
-.annotate 'line', 107
# rx subcapture "textq"
set_addr $I10, rxcap_299_fail
rx269_cur."!mark_push"(0, rx269_pos, $I10)
@@ -4785,7 +4762,6 @@
goto rx269_fail
rxcap_299_done:
alt278_end:
-.annotate 'line', 99
# rx pass
rx269_cur."!cursor_pass"(rx269_pos, "quote_escape:sym<misc>")
if_null rx269_debug, debug_247
@@ -4793,7 +4769,6 @@
debug_247:
.return (rx269_cur)
rx269_restart:
-.annotate 'line', 33
if_null rx269_debug, debug_248
rx269_cur."!cursor_debug"("NEXT", "quote_escape:sym<misc>")
debug_248:
@@ -4813,8 +4788,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<misc>" :subid("94_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__quote_escape:sym<misc>" :subid("94_1283975938.50512") :method
+.annotate 'line', 0
new $P271, "ResizablePMCArray"
push $P271, ""
.return ($P271)
@@ -4822,15 +4797,15 @@
.namespace ["HLL";"Grammar"]
-.sub "_block275" :anon :subid("95_1283368192.21885") :outer("93_1283368192.21885")
-.annotate 'line', 100
+.sub "_block275" :anon :subid("95_1283975938.50512") :outer("93_1283975938.50512")
+.annotate 'line', 0
.return ()
.end
.namespace ["HLL";"Grammar"]
-.sub "_block280" :anon :subid("96_1283368192.21885") :method :outer("93_1283368192.21885")
-.annotate 'line', 104
+.sub "_block280" :anon :subid("96_1283975938.50512") :method :outer("93_1283975938.50512")
+.annotate 'line', 0
.local string rx282_tgt
.local int rx282_pos
.local int rx282_off
@@ -4898,8 +4873,8 @@
.namespace ["HLL";"Grammar"]
-.sub "_block287" :anon :subid("97_1283368192.21885") :outer("93_1283368192.21885")
-.annotate 'line', 105
+.sub "_block287" :anon :subid("97_1283975938.50512") :outer("93_1283975938.50512")
+.annotate 'line', 0
find_lex $P289, "$/"
$P290 = $P289."CURSOR"()
new $P291, "String"
@@ -4921,9 +4896,9 @@
.namespace ["HLL";"Grammar"]
-.sub "charname" :subid("98_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
- .const 'Sub' $P310 = "100_1283368192.21885"
+.sub "charname" :subid("98_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
+ .const 'Sub' $P310 = "100_1283975938.50512"
capture_lex $P310
.local string rx301_tgt
.local int rx301_pos
@@ -4961,10 +4936,8 @@
rx301_cur."!mark_push"(0, rx301_pos, $I10)
rxscan305_done:
alt306_0:
-.annotate 'line', 111
set_addr $I10, alt306_1
rx301_cur."!mark_push"(0, rx301_pos, $I10)
-.annotate 'line', 112
# rx subrule "integer" subtype=capture negate=
rx301_cur."!cursor_pos"(rx301_pos)
$P10 = rx301_cur."integer"()
@@ -4974,7 +4947,6 @@
rx301_pos = $P10."pos"()
goto alt306_end
alt306_1:
-.annotate 'line', 113
# rx enumcharlist negate=0
ge rx301_pos, rx301_eos, rx301_fail
sub $I10, rx301_pos, rx301_off
@@ -5004,15 +4976,13 @@
index $I11, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ)", $S10
lt $I11, 0, rx301_fail
inc rx301_pos
-.annotate 'line', 114
# rx subrule "before" subtype=zerowidth negate=
rx301_cur."!cursor_pos"(rx301_pos)
- .const 'Sub' $P310 = "100_1283368192.21885"
+ .const 'Sub' $P310 = "100_1283975938.50512"
capture_lex $P310
$P10 = rx301_cur."before"($P310)
unless $P10, rx301_fail
alt306_end:
-.annotate 'line', 111
# rx pass
rx301_cur."!cursor_pass"(rx301_pos, "charname")
if_null rx301_debug, debug_255
@@ -5020,7 +4990,6 @@
debug_255:
.return (rx301_cur)
rx301_restart:
-.annotate 'line', 33
if_null rx301_debug, debug_256
rx301_cur."!cursor_debug"("NEXT", "charname")
debug_256:
@@ -5040,8 +5009,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charname" :subid("99_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__charname" :subid("99_1283975938.50512") :method
+.annotate 'line', 0
$P303 = self."!PREFIX__!subrule"("integer", "")
new $P304, "ResizablePMCArray"
push $P304, "Z"
@@ -5102,8 +5071,8 @@
.namespace ["HLL";"Grammar"]
-.sub "_block309" :anon :subid("100_1283368192.21885") :method :outer("98_1283368192.21885")
-.annotate 'line', 114
+.sub "_block309" :anon :subid("100_1283975938.50512") :method :outer("98_1283975938.50512")
+.annotate 'line', 0
.local string rx311_tgt
.local int rx311_pos
.local int rx311_off
@@ -5176,8 +5145,8 @@
.namespace ["HLL";"Grammar"]
-.sub "charnames" :subid("101_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "charnames" :subid("101_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx314_tgt
.local int rx314_pos
.local int rx314_off
@@ -5214,7 +5183,6 @@
set_addr $I10, rxscan317_loop
rx314_cur."!mark_push"(0, rx314_pos, $I10)
rxscan317_done:
-.annotate 'line', 116
# rx rxquantr318 ** 1..*
set_addr $I10, rxquantr318_done
rx314_cur."!mark_push"(0, -1, $I10)
@@ -5256,7 +5224,6 @@
debug_259:
.return (rx314_cur)
rx314_restart:
-.annotate 'line', 33
if_null rx314_debug, debug_260
rx314_cur."!cursor_debug"("NEXT", "charnames")
debug_260:
@@ -5276,8 +5243,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charnames" :subid("102_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__charnames" :subid("102_1283975938.50512") :method
+.annotate 'line', 0
new $P316, "ResizablePMCArray"
push $P316, ""
.return ($P316)
@@ -5285,8 +5252,8 @@
.namespace ["HLL";"Grammar"]
-.sub "charspec" :subid("103_1283368192.21885") :method :outer("11_1283368192.21885")
-.annotate 'line', 33
+.sub "charspec" :subid("103_1283975938.50512") :method :outer("11_1283975938.50512")
+.annotate 'line', 0
.local string rx320_tgt
.local int rx320_pos
.local int rx320_off
@@ -5323,10 +5290,8 @@
rx320_cur."!mark_push"(0, rx320_pos, $I10)
rxscan325_done:
alt326_0:
-.annotate 'line', 118
set_addr $I10, alt326_1
rx320_cur."!mark_push"(0, rx320_pos, $I10)
-.annotate 'line', 119
# rx literal "["
add $I11, rx320_pos, 1
gt $I11, rx320_eos, rx320_fail
@@ -5352,7 +5317,6 @@
alt326_1:
set_addr $I10, alt326_2
rx320_cur."!mark_push"(0, rx320_pos, $I10)
-.annotate 'line', 120
# rx charclass_q d r 1..-1
sub $I10, rx320_pos, rx320_off
find_not_cclass $I11, 8, rx320_tgt, $I10, rx320_eos
@@ -5386,7 +5350,6 @@
alt326_2:
set_addr $I10, alt326_3
rx320_cur."!mark_push"(0, rx320_pos, $I10)
-.annotate 'line', 121
# rx enumcharlist negate=0
ge rx320_pos, rx320_eos, rx320_fail
sub $I10, rx320_pos, rx320_off
@@ -5396,14 +5359,12 @@
inc rx320_pos
goto alt326_end
alt326_3:
-.annotate 'line', 122
# rx subrule "panic" subtype=method negate=
rx320_cur."!cursor_pos"(rx320_pos)
$P10 = rx320_cur."panic"("Unrecognized \\c character")
unless $P10, rx320_fail
rx320_pos = $P10."pos"()
alt326_end:
-.annotate 'line', 117
# rx pass
rx320_cur."!cursor_pass"(rx320_pos, "charspec")
if_null rx320_debug, debug_263
@@ -5411,7 +5372,6 @@
debug_263:
.return (rx320_cur)
rx320_restart:
-.annotate 'line', 33
if_null rx320_debug, debug_264
rx320_cur."!cursor_debug"("NEXT", "charspec")
debug_264:
@@ -5431,8 +5391,8 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charspec" :subid("104_1283368192.21885") :method
-.annotate 'line', 33
+.sub "!PREFIX__charspec" :subid("104_1283975938.50512") :method
+.annotate 'line', 0
$P322 = self."!PREFIX__!subrule"("panic", "")
$P323 = self."!PREFIX__!subrule"("charnames", "[")
new $P324, "ResizablePMCArray"
@@ -5472,18 +5432,18 @@
.namespace ["HLL";"Grammar"]
-.sub "_block328" :load :anon :subid("105_1283368192.21885")
-.annotate 'line', 5
- .const 'Sub' $P330 = "11_1283368192.21885"
+.sub "_block328" :load :anon :subid("105_1283975938.50512")
+.annotate 'line', 0
+ .const 'Sub' $P330 = "11_1283975938.50512"
$P331 = $P330()
.return ($P331)
.end
.namespace []
-.sub "_block333" :load :anon :subid("106_1283368192.21885")
-.annotate 'line', 1
- .const 'Sub' $P335 = "10_1283368192.21885"
+.sub "_block333" :load :anon :subid("106_1283975938.50512")
+.annotate 'line', 0
+ .const 'Sub' $P335 = "10_1283975938.50512"
$P336 = $P335()
.return ($P336)
.end
@@ -5491,32 +5451,29 @@
### .include 'gen/hllgrammar-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368194.22514")
+.sub "_block11" :anon :subid("10_1283975939.60403")
.annotate 'line', 0
get_hll_global $P14, ["HLL";"Actions"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 3
get_hll_global $P14, ["HLL";"Actions"], "_block13"
capture_lex $P14
$P627 = $P14()
-.annotate 'line', 1
.return ($P627)
- .const 'Sub' $P629 = "55_1283368194.22514"
+ .const 'Sub' $P629 = "55_1283975939.60403"
.return ($P629)
.end
.namespace []
-.sub "" :load :init :subid("post56") :outer("10_1283368194.22514")
+.sub "" :load :init :subid("post56") :outer("10_1283975939.60403")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368194.22514"
+ .const 'Sub' $P12 = "10_1283975939.60403"
.local pmc block
set block, $P12
$P632 = get_root_global ["parrot"], "P6metaclass"
@@ -5525,75 +5482,75 @@
.namespace ["HLL";"Actions"]
-.sub "_block13" :subid("11_1283368194.22514") :outer("10_1283368194.22514")
-.annotate 'line', 3
- .const 'Sub' $P605 = "53_1283368194.22514"
+.sub "_block13" :subid("11_1283975939.60403") :outer("10_1283975939.60403")
+.annotate 'line', 0
+ .const 'Sub' $P605 = "53_1283975939.60403"
capture_lex $P605
- .const 'Sub' $P580 = "51_1283368194.22514"
+ .const 'Sub' $P580 = "51_1283975939.60403"
capture_lex $P580
- .const 'Sub' $P550 = "50_1283368194.22514"
+ .const 'Sub' $P550 = "50_1283975939.60403"
capture_lex $P550
- .const 'Sub' $P531 = "49_1283368194.22514"
+ .const 'Sub' $P531 = "49_1283975939.60403"
capture_lex $P531
- .const 'Sub' $P524 = "48_1283368194.22514"
+ .const 'Sub' $P524 = "48_1283975939.60403"
capture_lex $P524
- .const 'Sub' $P514 = "47_1283368194.22514"
+ .const 'Sub' $P514 = "47_1283975939.60403"
capture_lex $P514
- .const 'Sub' $P497 = "46_1283368194.22514"
+ .const 'Sub' $P497 = "46_1283975939.60403"
capture_lex $P497
- .const 'Sub' $P480 = "45_1283368194.22514"
+ .const 'Sub' $P480 = "45_1283975939.60403"
capture_lex $P480
- .const 'Sub' $P473 = "44_1283368194.22514"
+ .const 'Sub' $P473 = "44_1283975939.60403"
capture_lex $P473
- .const 'Sub' $P466 = "43_1283368194.22514"
+ .const 'Sub' $P466 = "43_1283975939.60403"
capture_lex $P466
- .const 'Sub' $P459 = "42_1283368194.22514"
+ .const 'Sub' $P459 = "42_1283975939.60403"
capture_lex $P459
- .const 'Sub' $P452 = "41_1283368194.22514"
+ .const 'Sub' $P452 = "41_1283975939.60403"
capture_lex $P452
- .const 'Sub' $P445 = "40_1283368194.22514"
+ .const 'Sub' $P445 = "40_1283975939.60403"
capture_lex $P445
- .const 'Sub' $P438 = "39_1283368194.22514"
+ .const 'Sub' $P438 = "39_1283975939.60403"
capture_lex $P438
- .const 'Sub' $P428 = "38_1283368194.22514"
+ .const 'Sub' $P428 = "38_1283975939.60403"
capture_lex $P428
- .const 'Sub' $P421 = "37_1283368194.22514"
+ .const 'Sub' $P421 = "37_1283975939.60403"
capture_lex $P421
- .const 'Sub' $P405 = "36_1283368194.22514"
+ .const 'Sub' $P405 = "36_1283975939.60403"
capture_lex $P405
- .const 'Sub' $P330 = "34_1283368194.22514"
+ .const 'Sub' $P330 = "34_1283975939.60403"
capture_lex $P330
- .const 'Sub' $P267 = "31_1283368194.22514"
+ .const 'Sub' $P267 = "31_1283975939.60403"
capture_lex $P267
- .const 'Sub' $P258 = "30_1283368194.22514"
+ .const 'Sub' $P258 = "30_1283975939.60403"
capture_lex $P258
- .const 'Sub' $P249 = "29_1283368194.22514"
+ .const 'Sub' $P249 = "29_1283975939.60403"
capture_lex $P249
- .const 'Sub' $P240 = "28_1283368194.22514"
+ .const 'Sub' $P240 = "28_1283975939.60403"
capture_lex $P240
- .const 'Sub' $P231 = "27_1283368194.22514"
+ .const 'Sub' $P231 = "27_1283975939.60403"
capture_lex $P231
- .const 'Sub' $P222 = "26_1283368194.22514"
+ .const 'Sub' $P222 = "26_1283975939.60403"
capture_lex $P222
- .const 'Sub' $P212 = "25_1283368194.22514"
+ .const 'Sub' $P212 = "25_1283975939.60403"
capture_lex $P212
- .const 'Sub' $P202 = "24_1283368194.22514"
+ .const 'Sub' $P202 = "24_1283975939.60403"
capture_lex $P202
- .const 'Sub' $P194 = "23_1283368194.22514"
+ .const 'Sub' $P194 = "23_1283975939.60403"
capture_lex $P194
- .const 'Sub' $P184 = "22_1283368194.22514"
+ .const 'Sub' $P184 = "22_1283975939.60403"
capture_lex $P184
- .const 'Sub' $P174 = "21_1283368194.22514"
+ .const 'Sub' $P174 = "21_1283975939.60403"
capture_lex $P174
- .const 'Sub' $P73 = "18_1283368194.22514"
+ .const 'Sub' $P73 = "18_1283975939.60403"
capture_lex $P73
- .const 'Sub' $P35 = "15_1283368194.22514"
+ .const 'Sub' $P35 = "15_1283975939.60403"
capture_lex $P35
- .const 'Sub' $P28 = "14_1283368194.22514"
+ .const 'Sub' $P28 = "14_1283975939.60403"
capture_lex $P28
- .const 'Sub' $P22 = "13_1283368194.22514"
+ .const 'Sub' $P22 = "13_1283975939.60403"
capture_lex $P22
- .const 'Sub' $P15 = "12_1283368194.22514"
+ .const 'Sub' $P15 = "12_1283975939.60403"
capture_lex $P15
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
@@ -5601,29 +5558,26 @@
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 225
- .const 'Sub' $P605 = "53_1283368194.22514"
+ .const 'Sub' $P605 = "53_1283975939.60403"
newclosure $P622, $P605
-.annotate 'line', 3
.return ($P622)
- .const 'Sub' $P624 = "54_1283368194.22514"
+ .const 'Sub' $P624 = "54_1283975939.60403"
.return ($P624)
.end
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "string_to_int" :subid("12_1283368194.22514") :outer("11_1283368194.22514")
+.sub "string_to_int" :subid("12_1283975939.60403") :outer("11_1283975939.60403")
.param pmc param_18
.param pmc param_19
-.annotate 'line', 3
+.annotate 'line', 0
new $P17, 'ExceptionHandler'
set_addr $P17, control_16
$P17."handle_types"(.CONTROL_RETURN)
push_eh $P17
.lex "$src", param_18
.lex "$base", param_19
-.annotate 'line', 4
.local pmc src
.local string src_s
@@ -5655,7 +5609,6 @@
str_done:
$P20 = box result
-.annotate 'line', 3
.return ($P20)
control_16:
.local pmc exception
@@ -5667,15 +5620,14 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "ints_to_string" :subid("13_1283368194.22514") :outer("11_1283368194.22514")
+.sub "ints_to_string" :subid("13_1283975939.60403") :outer("11_1283975939.60403")
.param pmc param_25
-.annotate 'line', 37
+.annotate 'line', 0
new $P24, 'ExceptionHandler'
set_addr $P24, control_23
$P24."handle_types"(.CONTROL_RETURN)
push_eh $P24
.lex "$ints", param_25
-.annotate 'line', 38
.local string result
result = ''
@@ -5697,7 +5649,6 @@
ints_done:
$P26 = box result
-.annotate 'line', 37
.return ($P26)
control_23:
.local pmc exception
@@ -5709,16 +5660,14 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "CTXSAVE" :subid("14_1283368194.22514") :method :outer("11_1283368194.22514")
-.annotate 'line', 62
+.sub "CTXSAVE" :subid("14_1283975939.60403") :method :outer("11_1283975939.60403")
+.annotate 'line', 0
new $P30, 'ExceptionHandler'
set_addr $P30, control_29
$P30."handle_types"(.CONTROL_RETURN)
push_eh $P30
.lex "self", self
-.annotate 'line', 63
get_hll_global $P31, ["PAST"], "Op"
-.annotate 'line', 69
new $P32, "ResizablePMCArray"
push $P32, " $P0 = find_dynamic_lex \"$*CTXSAVE\""
push $P32, " if null $P0 goto ctxsave_done"
@@ -5727,7 +5676,6 @@
push $P32, " $P0.\"ctxsave\"()"
push $P32, " ctxsave_done:"
$P33 = $P31."new"($P32 :named("inline"))
-.annotate 'line', 62
.return ($P33)
control_29:
.local pmc exception
@@ -5739,10 +5687,10 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "SET_BLOCK_OUTER_CTX" :subid("15_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "SET_BLOCK_OUTER_CTX" :subid("15_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_38
-.annotate 'line', 76
- .const 'Sub' $P48 = "16_1283368194.22514"
+.annotate 'line', 0
+ .const 'Sub' $P48 = "16_1283975939.60403"
capture_lex $P48
new $P37, 'ExceptionHandler'
set_addr $P37, control_36
@@ -5750,7 +5698,6 @@
push_eh $P37
.lex "self", self
.lex "$block", param_38
-.annotate 'line', 77
new $P39, "Undef"
.lex "$outer_ctx", $P39
find_dynamic_lex $P40, "%*COMPILING"
@@ -5769,7 +5716,6 @@
new $P42, "Undef"
vivify_60:
store_lex "$outer_ctx", $P42
-.annotate 'line', 78
find_lex $P45, "$outer_ctx"
defined $I46, $P45
if $I46, if_44
@@ -5777,12 +5723,11 @@
set $P43, $I46
goto if_44_end
if_44:
- .const 'Sub' $P48 = "16_1283368194.22514"
+ .const 'Sub' $P48 = "16_1283975939.60403"
capture_lex $P48
$P71 = $P48()
set $P43, $P71
if_44_end:
-.annotate 'line', 76
.return ($P43)
control_36:
.local pmc exception
@@ -5794,25 +5739,21 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "_block47" :anon :subid("16_1283368194.22514") :outer("15_1283368194.22514")
-.annotate 'line', 78
- .const 'Sub' $P62 = "17_1283368194.22514"
+.sub "_block47" :anon :subid("16_1283975939.60403") :outer("15_1283975939.60403")
+.annotate 'line', 0
+ .const 'Sub' $P62 = "17_1283975939.60403"
capture_lex $P62
-.annotate 'line', 79
$P49 = root_new ['parrot';'ResizablePMCArray']
.lex "@ns", $P49
find_lex $P50, "$outer_ctx"
getattribute $P51, $P50, "current_namespace"
$P52 = $P51."get_name"()
store_lex "@ns", $P52
-.annotate 'line', 80
find_lex $P53, "@ns"
$P53."shift"()
-.annotate 'line', 81
find_lex $P54, "$block"
find_lex $P55, "@ns"
$P54."namespace"($P55)
-.annotate 'line', 82
find_lex $P57, "$outer_ctx"
$P58 = $P57."lexpad_full"()
defined $I59, $P58
@@ -5826,7 +5767,7 @@
unless $P56, loop68_done
shift $P60, $P56
loop68_redo:
- .const 'Sub' $P62 = "17_1283368194.22514"
+ .const 'Sub' $P62 = "17_1283975939.60403"
capture_lex $P62
$P62($P60)
loop68_next:
@@ -5840,36 +5781,33 @@
loop68_done:
pop_eh
for_undef_61:
-.annotate 'line', 78
.return ($P56)
.end
.namespace ["HLL";"Actions"]
-.sub "_block61" :anon :subid("17_1283368194.22514") :outer("16_1283368194.22514")
+.sub "_block61" :anon :subid("17_1283975939.60403") :outer("16_1283975939.60403")
.param pmc param_63
-.annotate 'line', 82
+.annotate 'line', 0
.lex "$_", param_63
-.annotate 'line', 83
find_lex $P64, "$block"
find_lex $P65, "$_"
$P66 = $P65."key"()
$P67 = $P64."symbol"($P66, "lexical" :named("scope"))
-.annotate 'line', 82
.return ($P67)
.end
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "EXPR" :subid("18_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "EXPR" :subid("18_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_76
.param pmc param_77 :optional
.param int has_param_77 :opt_flag
-.annotate 'line', 89
- .const 'Sub' $P156 = "20_1283368194.22514"
+.annotate 'line', 0
+ .const 'Sub' $P156 = "20_1283975939.60403"
capture_lex $P156
- .const 'Sub' $P123 = "19_1283368194.22514"
+ .const 'Sub' $P123 = "19_1283975939.60403"
capture_lex $P123
new $P75, 'ExceptionHandler'
set_addr $P75, control_74
@@ -5882,10 +5820,8 @@
set param_77, $P78
optparam_62:
.lex "$key", param_77
-.annotate 'line', 91
new $P79, "Undef"
.lex "$past", $P79
-.annotate 'line', 90
find_lex $P81, "$key"
if $P81, unless_80_end
new $P82, "Exception"
@@ -5895,7 +5831,6 @@
setattribute $P82, 'payload', $P83
throw $P82
unless_80_end:
-.annotate 'line', 91
find_lex $P85, "$/"
$P86 = $P85."ast"()
set $P84, $P86
@@ -5913,15 +5848,12 @@
set $P84, $P91
default_87:
store_lex "$past", $P84
-.annotate 'line', 92
find_lex $P93, "$past"
if $P93, unless_92_end
-.annotate 'line', 93
get_hll_global $P94, ["PAST"], "Op"
find_lex $P95, "$/"
$P96 = $P94."new"($P95 :named("node"))
store_lex "$past", $P96
-.annotate 'line', 94
find_lex $P98, "$/"
unless_null $P98, vivify_65
$P98 = root_new ['parrot';'Hash']
@@ -5939,7 +5871,6 @@
new $P101, "Undef"
vivify_68:
if $P101, if_97
-.annotate 'line', 95
find_lex $P109, "$/"
unless_null $P109, vivify_69
$P109 = root_new ['parrot';'Hash']
@@ -5979,7 +5910,6 @@
if_108_end:
goto if_97_end
if_97:
-.annotate 'line', 94
find_lex $P102, "$past"
find_lex $P103, "$/"
unless_null $P103, vivify_77
@@ -6000,21 +5930,18 @@
set $S107, $P106
$P102."pasttype"($S107)
if_97_end:
-.annotate 'line', 96
find_lex $P120, "$past"
$P121 = $P120."name"()
if $P121, unless_119_end
- .const 'Sub' $P123 = "19_1283368194.22514"
+ .const 'Sub' $P123 = "19_1283975939.60403"
capture_lex $P123
$P123()
unless_119_end:
unless_92_end:
-.annotate 'line', 107
find_lex $P143, "$key"
set $S144, $P143
iseq $I145, $S144, "POSTFIX"
if $I145, if_142
-.annotate 'line', 109
find_lex $P151, "$/"
$P152 = $P151."list"()
defined $I153, $P152
@@ -6028,7 +5955,7 @@
unless $P150, loop167_done
shift $P154, $P150
loop167_redo:
- .const 'Sub' $P156 = "20_1283368194.22514"
+ .const 'Sub' $P156 = "20_1283975939.60403"
capture_lex $P156
$P156($P154)
loop167_next:
@@ -6042,10 +5969,8 @@
loop167_done:
pop_eh
for_undef_84:
-.annotate 'line', 108
goto if_142_end
if_142:
-.annotate 'line', 107
find_lex $P146, "$past"
find_lex $P147, "$/"
unless_null $P147, vivify_85
@@ -6058,11 +5983,9 @@
$P149 = $P148."ast"()
$P146."unshift"($P149)
if_142_end:
-.annotate 'line', 111
find_lex $P170, "$/"
find_lex $P171, "$past"
$P172 = $P170."!make"($P171)
-.annotate 'line', 89
.return ($P172)
control_74:
.local pmc exception
@@ -6073,11 +5996,10 @@
.namespace ["HLL";"Actions"]
-.sub "_block122" :anon :subid("19_1283368194.22514") :outer("18_1283368194.22514")
-.annotate 'line', 98
+.sub "_block122" :anon :subid("19_1283975939.60403") :outer("18_1283975939.60403")
+.annotate 'line', 0
new $P124, "Undef"
.lex "$name", $P124
-.annotate 'line', 97
find_lex $P126, "$key"
set $S127, $P126
iseq $I128, $S127, "LIST"
@@ -6086,7 +6008,6 @@
assign $P129, "infix"
store_lex "$key", $P129
if_125_end:
-.annotate 'line', 98
$P0 = find_lex '$key'
$S0 = $P0
@@ -6094,7 +6015,6 @@
$P130 = box $S0
concat $P131, $P130, ":<"
-.annotate 'line', 103
find_lex $P132, "$/"
unless_null $P132, vivify_81
$P132 = root_new ['parrot';'Hash']
@@ -6110,22 +6030,20 @@
concat $P135, $P131, $P134
concat $P136, $P135, ">"
store_lex "$name", $P136
-.annotate 'line', 104
find_lex $P137, "$past"
new $P138, "String"
assign $P138, "&"
find_lex $P139, "$name"
concat $P140, $P138, $P139
$P141 = $P137."name"($P140)
-.annotate 'line', 96
.return ($P141)
.end
.namespace ["HLL";"Actions"]
-.sub "_block155" :anon :subid("20_1283368194.22514") :outer("18_1283368194.22514")
+.sub "_block155" :anon :subid("20_1283975939.60403") :outer("18_1283975939.60403")
.param pmc param_157
-.annotate 'line', 109
+.annotate 'line', 0
.lex "$_", param_157
find_lex $P160, "$_"
$P161 = $P160."ast"()
@@ -6147,9 +6065,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<circumfix>" :subid("21_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "term:sym<circumfix>" :subid("21_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_177
-.annotate 'line', 114
+.annotate 'line', 0
new $P176, 'ExceptionHandler'
set_addr $P176, control_175
$P176."handle_types"(.CONTROL_RETURN)
@@ -6178,9 +6096,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "termish" :subid("22_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "termish" :subid("22_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_187
-.annotate 'line', 116
+.annotate 'line', 0
new $P186, 'ExceptionHandler'
set_addr $P186, control_185
$P186."handle_types"(.CONTROL_RETURN)
@@ -6209,9 +6127,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "nullterm" :subid("23_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "nullterm" :subid("23_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_197
-.annotate 'line', 117
+.annotate 'line', 0
new $P196, 'ExceptionHandler'
set_addr $P196, control_195
$P196."handle_types"(.CONTROL_RETURN)
@@ -6232,9 +6150,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "nullterm_alt" :subid("24_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "nullterm_alt" :subid("24_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_205
-.annotate 'line', 118
+.annotate 'line', 0
new $P204, 'ExceptionHandler'
set_addr $P204, control_203
$P204."handle_types"(.CONTROL_RETURN)
@@ -6263,9 +6181,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "integer" :subid("25_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "integer" :subid("25_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_215
-.annotate 'line', 120
+.annotate 'line', 0
new $P214, 'ExceptionHandler'
set_addr $P214, control_213
$P214."handle_types"(.CONTROL_RETURN)
@@ -6294,9 +6212,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "dec_number" :subid("26_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "dec_number" :subid("26_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_225
-.annotate 'line', 122
+.annotate 'line', 0
new $P224, 'ExceptionHandler'
set_addr $P224, control_223
$P224."handle_types"(.CONTROL_RETURN)
@@ -6318,9 +6236,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "decint" :subid("27_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "decint" :subid("27_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_234
-.annotate 'line', 124
+.annotate 'line', 0
new $P233, 'ExceptionHandler'
set_addr $P233, control_232
$P233."handle_types"(.CONTROL_RETURN)
@@ -6342,9 +6260,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "hexint" :subid("28_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "hexint" :subid("28_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_243
-.annotate 'line', 125
+.annotate 'line', 0
new $P242, 'ExceptionHandler'
set_addr $P242, control_241
$P242."handle_types"(.CONTROL_RETURN)
@@ -6366,9 +6284,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "octint" :subid("29_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "octint" :subid("29_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_252
-.annotate 'line', 126
+.annotate 'line', 0
new $P251, 'ExceptionHandler'
set_addr $P251, control_250
$P251."handle_types"(.CONTROL_RETURN)
@@ -6390,9 +6308,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "binint" :subid("30_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "binint" :subid("30_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_261
-.annotate 'line', 127
+.annotate 'line', 0
new $P260, 'ExceptionHandler'
set_addr $P260, control_259
$P260."handle_types"(.CONTROL_RETURN)
@@ -6414,10 +6332,10 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_EXPR" :subid("31_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_EXPR" :subid("31_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_270
-.annotate 'line', 129
- .const 'Sub' $P286 = "32_1283368194.22514"
+.annotate 'line', 0
+ .const 'Sub' $P286 = "32_1283975939.60403"
capture_lex $P286
new $P269, 'ExceptionHandler'
set_addr $P269, control_268
@@ -6425,7 +6343,6 @@
push_eh $P269
.lex "self", self
.lex "$/", param_270
-.annotate 'line', 130
new $P271, "Undef"
.lex "$past", $P271
find_lex $P272, "$/"
@@ -6438,46 +6355,38 @@
vivify_96:
$P274 = $P273."ast"()
store_lex "$past", $P274
-.annotate 'line', 131
find_lex $P276, "$/"
$P277 = $P276."CURSOR"()
$P278 = $P277."quotemod_check"("w")
unless $P278, if_275_end
-.annotate 'line', 132
get_hll_global $P280, ["PAST"], "Node"
find_lex $P281, "$past"
$P282 = $P280."ACCEPTS"($P281)
if $P282, if_279
-.annotate 'line', 135
- .const 'Sub' $P286 = "32_1283368194.22514"
+ .const 'Sub' $P286 = "32_1283975939.60403"
capture_lex $P286
$P286()
goto if_279_end
if_279:
-.annotate 'line', 133
find_lex $P283, "$/"
$P284 = $P283."CURSOR"()
$P284."panic"("Can't form :w list from non-constant strings (yet)")
if_279_end:
if_275_end:
-.annotate 'line', 146
get_hll_global $P318, ["PAST"], "Node"
find_lex $P319, "$past"
$P320 = $P318."ACCEPTS"($P319)
isfalse $I321, $P320
unless $I321, if_317_end
-.annotate 'line', 147
get_hll_global $P322, ["PAST"], "Val"
find_lex $P323, "$past"
set $S324, $P323
$P325 = $P322."new"($S324 :named("value"))
store_lex "$past", $P325
if_317_end:
-.annotate 'line', 149
find_lex $P326, "$/"
find_lex $P327, "$past"
$P328 = $P326."!make"($P327)
-.annotate 'line', 129
.return ($P328)
control_268:
.local pmc exception
@@ -6489,11 +6398,10 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "_block285" :anon :subid("32_1283368194.22514") :outer("31_1283368194.22514")
-.annotate 'line', 135
- .const 'Sub' $P305 = "33_1283368194.22514"
+.sub "_block285" :anon :subid("32_1283975939.60403") :outer("31_1283975939.60403")
+.annotate 'line', 0
+ .const 'Sub' $P305 = "33_1283975939.60403"
capture_lex $P305
-.annotate 'line', 136
$P287 = root_new ['parrot';'ResizablePMCArray']
.lex "@words", $P287
get_hll_global $P288, ["HLL";"Grammar"], "split_words"
@@ -6501,12 +6409,10 @@
find_lex $P290, "$past"
$P291 = $P288($P289, $P290)
store_lex "@words", $P291
-.annotate 'line', 137
find_lex $P294, "@words"
set $N295, $P294
isne $I296, $N295, 1.0
if $I296, if_293
-.annotate 'line', 142
find_lex $P313, "@words"
unless_null $P313, vivify_97
$P313 = root_new ['parrot';'ResizablePMCArray']
@@ -6519,17 +6425,13 @@
new $P316, 'String'
set $P316, $S315
store_lex "$past", $P316
-.annotate 'line', 141
set $P292, $P316
-.annotate 'line', 137
goto if_293_end
if_293:
-.annotate 'line', 138
get_hll_global $P297, ["PAST"], "Op"
find_lex $P298, "$/"
$P299 = $P297."new"("list" :named("pasttype"), $P298 :named("node"))
store_lex "$past", $P299
-.annotate 'line', 139
find_lex $P301, "@words"
defined $I302, $P301
unless $I302, for_undef_99
@@ -6542,7 +6444,7 @@
unless $P300, loop310_done
shift $P303, $P300
loop310_redo:
- .const 'Sub' $P305 = "33_1283368194.22514"
+ .const 'Sub' $P305 = "33_1283975939.60403"
capture_lex $P305
$P305($P303)
loop310_next:
@@ -6556,18 +6458,16 @@
loop310_done:
pop_eh
for_undef_99:
-.annotate 'line', 137
set $P292, $P300
if_293_end:
-.annotate 'line', 135
.return ($P292)
.end
.namespace ["HLL";"Actions"]
-.sub "_block304" :anon :subid("33_1283368194.22514") :outer("32_1283368194.22514")
+.sub "_block304" :anon :subid("33_1283975939.60403") :outer("32_1283975939.60403")
.param pmc param_306
-.annotate 'line', 139
+.annotate 'line', 0
.lex "$_", param_306
find_lex $P307, "$past"
find_lex $P308, "$_"
@@ -6578,10 +6478,10 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_delimited" :subid("34_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_delimited" :subid("34_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_333
-.annotate 'line', 152
- .const 'Sub' $P345 = "35_1283368194.22514"
+.annotate 'line', 0
+ .const 'Sub' $P345 = "35_1283975939.60403"
capture_lex $P345
new $P332, 'ExceptionHandler'
set_addr $P332, control_331
@@ -6589,22 +6489,16 @@
push_eh $P332
.lex "self", self
.lex "$/", param_333
-.annotate 'line', 153
$P334 = root_new ['parrot';'ResizablePMCArray']
.lex "@parts", $P334
-.annotate 'line', 154
new $P335, "Undef"
.lex "$lastlit", $P335
-.annotate 'line', 170
new $P336, "Undef"
.lex "$past", $P336
-.annotate 'line', 152
find_lex $P337, "@parts"
-.annotate 'line', 154
new $P338, "String"
assign $P338, ""
store_lex "$lastlit", $P338
-.annotate 'line', 155
find_lex $P340, "$/"
unless_null $P340, vivify_100
$P340 = root_new ['parrot';'Hash']
@@ -6624,7 +6518,7 @@
unless $P339, loop377_done
shift $P343, $P339
loop377_redo:
- .const 'Sub' $P345 = "35_1283368194.22514"
+ .const 'Sub' $P345 = "35_1283975939.60403"
capture_lex $P345
$P345($P343)
loop377_next:
@@ -6638,7 +6532,6 @@
loop377_done:
pop_eh
for_undef_102:
-.annotate 'line', 169
find_lex $P381, "$lastlit"
set $S382, $P381
isgt $I383, $S382, ""
@@ -6647,7 +6540,6 @@
find_lex $P385, "$lastlit"
$P384."push"($P385)
if_380_end:
-.annotate 'line', 170
find_lex $P388, "@parts"
if $P388, if_387
new $P391, "String"
@@ -6660,7 +6552,6 @@
set $P386, $P390
if_387_end:
store_lex "$past", $P386
-.annotate 'line', 171
new $P399, 'ExceptionHandler'
set_addr $P399, loop398_handler
$P399."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST)
@@ -6669,7 +6560,6 @@
find_lex $P392, "@parts"
unless $P392, loop398_done
loop398_redo:
-.annotate 'line', 172
get_hll_global $P393, ["PAST"], "Op"
find_lex $P394, "$past"
find_lex $P395, "@parts"
@@ -6677,7 +6567,6 @@
$P397 = $P393."new"($P394, $P396, "concat" :named("pirop"))
store_lex "$past", $P397
loop398_next:
-.annotate 'line', 171
goto loop398_test
loop398_handler:
.local pmc exception
@@ -6687,11 +6576,9 @@
eq $P400, .CONTROL_LOOP_REDO, loop398_redo
loop398_done:
pop_eh
-.annotate 'line', 174
find_lex $P401, "$/"
find_lex $P402, "$past"
$P403 = $P401."!make"($P402)
-.annotate 'line', 152
.return ($P403)
control_331:
.local pmc exception
@@ -6702,27 +6589,24 @@
.namespace ["HLL";"Actions"]
-.sub "_block344" :anon :subid("35_1283368194.22514") :outer("34_1283368194.22514")
+.sub "_block344" :anon :subid("35_1283975939.60403") :outer("34_1283975939.60403")
.param pmc param_347
-.annotate 'line', 156
+.annotate 'line', 0
new $P346, "Undef"
.lex "$ast", $P346
.lex "$_", param_347
find_lex $P348, "$_"
$P349 = $P348."ast"()
store_lex "$ast", $P349
-.annotate 'line', 157
get_hll_global $P352, ["PAST"], "Node"
find_lex $P353, "$ast"
$P354 = $P352."ACCEPTS"($P353)
isfalse $I355, $P354
if $I355, if_351
-.annotate 'line', 160
find_lex $P361, "$ast"
get_hll_global $P362, ["PAST"], "Val"
$P363 = $P361."isa"($P362)
if $P363, if_360
-.annotate 'line', 164
find_lex $P369, "$lastlit"
set $S370, $P369
isgt $I371, $S370, ""
@@ -6731,57 +6615,46 @@
find_lex $P373, "$lastlit"
$P372."push"($P373)
if_368_end:
-.annotate 'line', 165
find_lex $P374, "@parts"
find_lex $P375, "$ast"
$P374."push"($P375)
-.annotate 'line', 166
new $P376, "String"
assign $P376, ""
store_lex "$lastlit", $P376
-.annotate 'line', 163
set $P359, $P376
-.annotate 'line', 160
goto if_360_end
if_360:
-.annotate 'line', 161
find_lex $P364, "$lastlit"
find_lex $P365, "$ast"
$S366 = $P365."value"()
concat $P367, $P364, $S366
store_lex "$lastlit", $P367
-.annotate 'line', 160
set $P359, $P367
if_360_end:
set $P350, $P359
-.annotate 'line', 157
goto if_351_end
if_351:
-.annotate 'line', 158
find_lex $P356, "$lastlit"
find_lex $P357, "$ast"
concat $P358, $P356, $P357
store_lex "$lastlit", $P358
-.annotate 'line', 157
set $P350, $P358
if_351_end:
-.annotate 'line', 155
.return ($P350)
.end
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_atom" :subid("36_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_atom" :subid("36_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_408
-.annotate 'line', 177
+.annotate 'line', 0
new $P407, 'ExceptionHandler'
set_addr $P407, control_406
$P407."handle_types"(.CONTROL_RETURN)
push_eh $P407
.lex "self", self
.lex "$/", param_408
-.annotate 'line', 178
find_lex $P409, "$/"
find_lex $P412, "$/"
unless_null $P412, vivify_103
@@ -6810,7 +6683,6 @@
set $P410, $P416
if_411_end:
$P419 = $P409."!make"($P410)
-.annotate 'line', 177
.return ($P419)
control_406:
.local pmc exception
@@ -6822,9 +6694,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<backslash>" :subid("37_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<backslash>" :subid("37_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_424
-.annotate 'line', 181
+.annotate 'line', 0
new $P423, 'ExceptionHandler'
set_addr $P423, control_422
$P423."handle_types"(.CONTROL_RETURN)
@@ -6844,9 +6716,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<stopper>" :subid("38_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<stopper>" :subid("38_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_431
-.annotate 'line', 182
+.annotate 'line', 0
new $P430, 'ExceptionHandler'
set_addr $P430, control_429
$P430."handle_types"(.CONTROL_RETURN)
@@ -6875,9 +6747,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<bs>" :subid("39_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<bs>" :subid("39_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_441
-.annotate 'line', 184
+.annotate 'line', 0
new $P440, 'ExceptionHandler'
set_addr $P440, control_439
$P440."handle_types"(.CONTROL_RETURN)
@@ -6897,9 +6769,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<nl>" :subid("40_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<nl>" :subid("40_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_448
-.annotate 'line', 185
+.annotate 'line', 0
new $P447, 'ExceptionHandler'
set_addr $P447, control_446
$P447."handle_types"(.CONTROL_RETURN)
@@ -6919,9 +6791,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<cr>" :subid("41_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<cr>" :subid("41_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_455
-.annotate 'line', 186
+.annotate 'line', 0
new $P454, 'ExceptionHandler'
set_addr $P454, control_453
$P454."handle_types"(.CONTROL_RETURN)
@@ -6941,9 +6813,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<tab>" :subid("42_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<tab>" :subid("42_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_462
-.annotate 'line', 187
+.annotate 'line', 0
new $P461, 'ExceptionHandler'
set_addr $P461, control_460
$P461."handle_types"(.CONTROL_RETURN)
@@ -6963,9 +6835,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<ff>" :subid("43_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<ff>" :subid("43_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_469
-.annotate 'line', 188
+.annotate 'line', 0
new $P468, 'ExceptionHandler'
set_addr $P468, control_467
$P468."handle_types"(.CONTROL_RETURN)
@@ -6985,9 +6857,9 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<esc>" :subid("44_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<esc>" :subid("44_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_476
-.annotate 'line', 189
+.annotate 'line', 0
new $P475, 'ExceptionHandler'
set_addr $P475, control_474
$P475."handle_types"(.CONTROL_RETURN)
@@ -7007,16 +6879,15 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<hex>" :subid("45_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<hex>" :subid("45_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_483
-.annotate 'line', 191
+.annotate 'line', 0
new $P482, 'ExceptionHandler'
set_addr $P482, control_481
$P482."handle_types"(.CONTROL_RETURN)
push_eh $P482
.lex "self", self
.lex "$/", param_483
-.annotate 'line', 192
find_lex $P484, "$/"
find_lex $P487, "$/"
unless_null $P487, vivify_109
@@ -7054,7 +6925,6 @@
if_486_end:
$P494 = "ints_to_string"($P485)
$P495 = $P484."!make"($P494)
-.annotate 'line', 191
.return ($P495)
control_481:
.local pmc exception
@@ -7066,16 +6936,15 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<oct>" :subid("46_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<oct>" :subid("46_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_500
-.annotate 'line', 195
+.annotate 'line', 0
new $P499, 'ExceptionHandler'
set_addr $P499, control_498
$P499."handle_types"(.CONTROL_RETURN)
push_eh $P499
.lex "self", self
.lex "$/", param_500
-.annotate 'line', 196
find_lex $P501, "$/"
find_lex $P504, "$/"
unless_null $P504, vivify_116
@@ -7113,7 +6982,6 @@
if_503_end:
$P511 = "ints_to_string"($P502)
$P512 = $P501."!make"($P511)
-.annotate 'line', 195
.return ($P512)
control_498:
.local pmc exception
@@ -7125,16 +6993,15 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<chr>" :subid("47_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<chr>" :subid("47_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_517
-.annotate 'line', 199
+.annotate 'line', 0
new $P516, 'ExceptionHandler'
set_addr $P516, control_515
$P516."handle_types"(.CONTROL_RETURN)
push_eh $P516
.lex "self", self
.lex "$/", param_517
-.annotate 'line', 200
find_lex $P518, "$/"
find_lex $P519, "$/"
unless_null $P519, vivify_123
@@ -7146,7 +7013,6 @@
vivify_124:
$P521 = $P520."ast"()
$P522 = $P518."!make"($P521)
-.annotate 'line', 199
.return ($P522)
control_515:
.local pmc exception
@@ -7158,19 +7024,17 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<0>" :subid("48_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<0>" :subid("48_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_527
-.annotate 'line', 203
+.annotate 'line', 0
new $P526, 'ExceptionHandler'
set_addr $P526, control_525
$P526."handle_types"(.CONTROL_RETURN)
push_eh $P526
.lex "self", self
.lex "$/", param_527
-.annotate 'line', 204
find_lex $P528, "$/"
$P529 = $P528."!make"(unicode:"\x{0}")
-.annotate 'line', 203
.return ($P529)
control_525:
.local pmc exception
@@ -7182,16 +7046,15 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<misc>" :subid("49_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "quote_escape:sym<misc>" :subid("49_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_534
-.annotate 'line', 207
+.annotate 'line', 0
new $P533, 'ExceptionHandler'
set_addr $P533, control_532
$P533."handle_types"(.CONTROL_RETURN)
push_eh $P533
.lex "self", self
.lex "$/", param_534
-.annotate 'line', 208
find_lex $P535, "$/"
find_lex $P538, "$/"
unless_null $P538, vivify_125
@@ -7229,7 +7092,6 @@
set $P536, $P544
if_537_end:
$P548 = $P535."!make"($P536)
-.annotate 'line', 207
.return ($P548)
control_532:
.local pmc exception
@@ -7241,19 +7103,17 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "charname" :subid("50_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "charname" :subid("50_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_553
-.annotate 'line', 211
+.annotate 'line', 0
new $P552, 'ExceptionHandler'
set_addr $P552, control_551
$P552."handle_types"(.CONTROL_RETURN)
push_eh $P552
.lex "self", self
.lex "$/", param_553
-.annotate 'line', 212
new $P554, "Undef"
.lex "$codepoint", $P554
-.annotate 'line', 213
find_lex $P557, "$/"
unless_null $P557, vivify_131
$P557 = root_new ['parrot';'Hash']
@@ -7263,13 +7123,11 @@
new $P558, "Undef"
vivify_132:
if $P558, if_556
-.annotate 'line', 214
find_lex $P562, "$/"
set $S563, $P562
find_codepoint $I564, $S563
new $P555, 'Integer'
set $P555, $I564
-.annotate 'line', 213
goto if_556_end
if_556:
find_lex $P559, "$/"
@@ -7284,7 +7142,6 @@
set $P555, $P561
if_556_end:
store_lex "$codepoint", $P555
-.annotate 'line', 215
find_lex $P566, "$codepoint"
set $N567, $P566
islt $I568, $N567, 0.0
@@ -7297,13 +7154,11 @@
concat $P573, $P571, $P572
$P570."panic"($P573)
if_565_end:
-.annotate 'line', 216
find_lex $P574, "$/"
find_lex $P575, "$codepoint"
set $I576, $P575
chr $S577, $I576
$P578 = $P574."!make"($S577)
-.annotate 'line', 211
.return ($P578)
control_551:
.local pmc exception
@@ -7315,10 +7170,10 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "charnames" :subid("51_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "charnames" :subid("51_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_583
-.annotate 'line', 219
- .const 'Sub' $P592 = "52_1283368194.22514"
+.annotate 'line', 0
+ .const 'Sub' $P592 = "52_1283975939.60403"
capture_lex $P592
new $P582, 'ExceptionHandler'
set_addr $P582, control_581
@@ -7326,13 +7181,11 @@
push_eh $P582
.lex "self", self
.lex "$/", param_583
-.annotate 'line', 220
new $P584, "Undef"
.lex "$str", $P584
new $P585, "String"
assign $P585, ""
store_lex "$str", $P585
-.annotate 'line', 221
find_lex $P587, "$/"
unless_null $P587, vivify_135
$P587 = root_new ['parrot';'Hash']
@@ -7352,7 +7205,7 @@
unless $P586, loop598_done
shift $P590, $P586
loop598_redo:
- .const 'Sub' $P592 = "52_1283368194.22514"
+ .const 'Sub' $P592 = "52_1283975939.60403"
capture_lex $P592
$P592($P590)
loop598_next:
@@ -7366,11 +7219,9 @@
loop598_done:
pop_eh
for_undef_137:
-.annotate 'line', 222
find_lex $P601, "$/"
find_lex $P602, "$str"
$P603 = $P601."!make"($P602)
-.annotate 'line', 219
.return ($P603)
control_581:
.local pmc exception
@@ -7381,9 +7232,9 @@
.namespace ["HLL";"Actions"]
-.sub "_block591" :anon :subid("52_1283368194.22514") :outer("51_1283368194.22514")
+.sub "_block591" :anon :subid("52_1283975939.60403") :outer("51_1283975939.60403")
.param pmc param_593
-.annotate 'line', 221
+.annotate 'line', 0
.lex "$_", param_593
find_lex $P594, "$str"
find_lex $P595, "$_"
@@ -7396,16 +7247,15 @@
.namespace ["HLL";"Actions"]
.include "except_types.pasm"
-.sub "charspec" :subid("53_1283368194.22514") :method :outer("11_1283368194.22514")
+.sub "charspec" :subid("53_1283975939.60403") :method :outer("11_1283975939.60403")
.param pmc param_608
-.annotate 'line', 225
+.annotate 'line', 0
new $P607, 'ExceptionHandler'
set_addr $P607, control_606
$P607."handle_types"(.CONTROL_RETURN)
push_eh $P607
.lex "self", self
.lex "$/", param_608
-.annotate 'line', 226
find_lex $P609, "$/"
find_lex $P612, "$/"
unless_null $P612, vivify_138
@@ -7435,7 +7285,6 @@
set $P610, $P616
if_611_end:
$P620 = $P609."!make"($P610)
-.annotate 'line', 225
.return ($P620)
control_606:
.local pmc exception
@@ -7446,18 +7295,18 @@
.namespace ["HLL";"Actions"]
-.sub "_block623" :load :anon :subid("54_1283368194.22514")
-.annotate 'line', 3
- .const 'Sub' $P625 = "11_1283368194.22514"
+.sub "_block623" :load :anon :subid("54_1283975939.60403")
+.annotate 'line', 0
+ .const 'Sub' $P625 = "11_1283975939.60403"
$P626 = $P625()
.return ($P626)
.end
.namespace []
-.sub "_block628" :load :anon :subid("55_1283368194.22514")
-.annotate 'line', 1
- .const 'Sub' $P630 = "10_1283368194.22514"
+.sub "_block628" :load :anon :subid("55_1283975939.60403")
+.annotate 'line', 0
+ .const 'Sub' $P630 = "10_1283975939.60403"
$P631 = $P630()
.return ($P631)
.end
@@ -7465,37 +7314,32 @@
### .include 'gen/hllcompiler.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368195.4695")
+.sub "_block11" :anon :subid("10_1283975940.27824")
.annotate 'line', 0
get_hll_global $P14, ["HLL";"Compiler"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 6
get_hll_global $P14, ["HLL";"Compiler"], "_block13"
capture_lex $P14
$P497 = $P14()
-.annotate 'line', 1
.return ($P497)
- .const 'Sub' $P499 = "36_1283368195.4695"
+ .const 'Sub' $P499 = "36_1283975940.27824"
.return ($P499)
.end
.namespace []
-.sub "" :load :init :subid("post37") :outer("10_1283368195.4695")
+.sub "" :load :init :subid("post37") :outer("10_1283975940.27824")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368195.4695"
+ .const 'Sub' $P12 = "10_1283975940.27824"
.local pmc block
set block, $P12
-.annotate 'line', 2
load_bytecode "PCT/HLLCompiler.pbc"
-.annotate 'line', 1
$P502 = get_root_global ["parrot"], "P6metaclass"
new $P503, "ResizablePMCArray"
push $P503, "$!language"
@@ -7504,49 +7348,44 @@
.namespace ["HLL";"Compiler"]
-.sub "_block13" :subid("11_1283368195.4695") :outer("10_1283368195.4695")
-.annotate 'line', 6
- .const 'Sub' $P489 = "35_1283368195.4695"
+.sub "_block13" :subid("11_1283975940.27824") :outer("10_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P489 = "35_1283975940.27824"
capture_lex $P489
- .const 'Sub' $P447 = "33_1283368195.4695"
+ .const 'Sub' $P447 = "33_1283975940.27824"
capture_lex $P447
- .const 'Sub' $P298 = "26_1283368195.4695"
+ .const 'Sub' $P298 = "26_1283975940.27824"
capture_lex $P298
- .const 'Sub' $P283 = "25_1283368195.4695"
+ .const 'Sub' $P283 = "25_1283975940.27824"
capture_lex $P283
- .const 'Sub' $P188 = "20_1283368195.4695"
+ .const 'Sub' $P188 = "20_1283975940.27824"
capture_lex $P188
- .const 'Sub' $P153 = "18_1283368195.4695"
+ .const 'Sub' $P153 = "18_1283975940.27824"
capture_lex $P153
- .const 'Sub' $P138 = "17_1283368195.4695"
+ .const 'Sub' $P138 = "17_1283975940.27824"
capture_lex $P138
- .const 'Sub' $P122 = "16_1283368195.4695"
+ .const 'Sub' $P122 = "16_1283975940.27824"
capture_lex $P122
- .const 'Sub' $P33 = "13_1283368195.4695"
+ .const 'Sub' $P33 = "13_1283975940.27824"
capture_lex $P33
- .const 'Sub' $P15 = "12_1283368195.4695"
+ .const 'Sub' $P15 = "12_1283975940.27824"
capture_lex $P15
-.annotate 'line', 14
- .const 'Sub' $P15 = "12_1283368195.4695"
+ .const 'Sub' $P15 = "12_1283975940.27824"
newclosure $P31, $P15
.lex "value_type", $P31
-.annotate 'line', 10
find_lex $P32, "value_type"
-.annotate 'line', 165
- .const 'Sub' $P489 = "35_1283368195.4695"
+ .const 'Sub' $P489 = "35_1283975940.27824"
newclosure $P495, $P489
-.annotate 'line', 6
.return ($P495)
.end
.namespace ["HLL";"Compiler"]
-.sub "" :load :init :subid("post38") :outer("11_1283368195.4695")
-.annotate 'line', 6
+.sub "" :load :init :subid("post38") :outer("11_1283975940.27824")
+.annotate 'line', 0
get_hll_global $P14, ["HLL";"Compiler"], "_block13"
.local pmc block
set block, $P14
-.annotate 'line', 11
get_hll_global $P496, ["HLL"], "Compiler"
$P496."language"("parrot")
.end
@@ -7554,19 +7393,17 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "value_type" :subid("12_1283368195.4695") :outer("11_1283368195.4695")
+.sub "value_type" :subid("12_1283975940.27824") :outer("11_1283975940.27824")
.param pmc param_18
-.annotate 'line', 14
+.annotate 'line', 0
new $P17, 'ExceptionHandler'
set_addr $P17, control_16
$P17."handle_types"(.CONTROL_RETURN)
push_eh $P17
.lex "$value", param_18
-.annotate 'line', 15
find_lex $P21, "$value"
isa $I22, $P21, "NameSpace"
if $I22, if_20
-.annotate 'line', 17
find_lex $P26, "$value"
isa $I27, $P26, "Sub"
if $I27, if_25
@@ -7580,14 +7417,12 @@
set $P24, $P28
if_25_end:
set $P19, $P24
-.annotate 'line', 15
goto if_20_end
if_20:
new $P23, "String"
assign $P23, "namespace"
set $P19, $P23
if_20_end:
-.annotate 'line', 14
.return ($P19)
control_16:
.local pmc exception
@@ -7599,15 +7434,15 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "get_exports" :subid("13_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "get_exports" :subid("13_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_36
.param pmc param_39 :slurpy
.param pmc param_37 :optional :named("tagset")
.param int has_param_37 :opt_flag
-.annotate 'line', 20
- .const 'Sub' $P105 = "15_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P105 = "15_1283975940.27824"
capture_lex $P105
- .const 'Sub' $P84 = "14_1283368195.4695"
+ .const 'Sub' $P84 = "14_1283975940.27824"
capture_lex $P84
new $P35, 'ExceptionHandler'
set_addr $P35, control_34
@@ -7621,26 +7456,21 @@
optparam_39:
.lex "$tagset", param_37
.lex "@symbols", param_39
-.annotate 'line', 27
$P40 = root_new ['parrot';'Hash']
.lex "%exports", $P40
-.annotate 'line', 28
$P41 = root_new ['parrot';'Hash']
.lex "%source", $P41
-.annotate 'line', 22
find_lex $P43, "$module"
does $I44, $P43, "hash"
new $P45, 'Integer'
set $P45, $I44
isfalse $I46, $P45
unless $I46, if_42_end
-.annotate 'line', 23
find_lex $P47, "self"
find_lex $P48, "$module"
$P49 = $P47."get_module"($P48)
store_lex "$module", $P49
if_42_end:
-.annotate 'line', 26
find_lex $P51, "$tagset"
set $P50, $P51
defined $I53, $P50
@@ -7660,7 +7490,6 @@
default_52:
store_lex "$tagset", $P50
find_lex $P59, "%exports"
-.annotate 'line', 28
find_lex $P60, "$tagset"
set $S61, $P60
find_lex $P62, "$module"
@@ -7676,14 +7505,12 @@
new $P64, "Undef"
vivify_42:
store_lex "%source", $P64
-.annotate 'line', 29
find_lex $P66, "%source"
defined $I67, $P66
new $P68, 'Integer'
set $P68, $I67
isfalse $I69, $P68
unless $I69, if_65_end
-.annotate 'line', 30
find_lex $P72, "$tagset"
set $S73, $P72
iseq $I74, $S73, "ALL"
@@ -7697,10 +7524,8 @@
if_71_end:
store_lex "%source", $P70
if_65_end:
-.annotate 'line', 32
find_lex $P78, "@symbols"
if $P78, if_77
-.annotate 'line', 39
find_lex $P101, "%source"
defined $I102, $P101
unless $I102, for_undef_43
@@ -7713,7 +7538,7 @@
unless $P100, loop117_done
shift $P103, $P100
loop117_redo:
- .const 'Sub' $P105 = "15_1283368195.4695"
+ .const 'Sub' $P105 = "15_1283975940.27824"
capture_lex $P105
$P105($P103)
loop117_next:
@@ -7727,10 +7552,8 @@
loop117_done:
pop_eh
for_undef_43:
-.annotate 'line', 38
goto if_77_end
if_77:
-.annotate 'line', 33
find_lex $P80, "@symbols"
defined $I81, $P80
unless $I81, for_undef_46
@@ -7743,7 +7566,7 @@
unless $P79, loop97_done
shift $P82, $P79
loop97_redo:
- .const 'Sub' $P84 = "14_1283368195.4695"
+ .const 'Sub' $P84 = "14_1283975940.27824"
capture_lex $P84
$P84($P82)
loop97_next:
@@ -7758,9 +7581,7 @@
pop_eh
for_undef_46:
if_77_end:
-.annotate 'line', 32
find_lex $P120, "%exports"
-.annotate 'line', 20
.return ($P120)
control_34:
.local pmc exception
@@ -7771,16 +7592,15 @@
.namespace ["HLL";"Compiler"]
-.sub "_block104" :anon :subid("15_1283368195.4695") :outer("13_1283368195.4695")
+.sub "_block104" :anon :subid("15_1283975940.27824") :outer("13_1283975940.27824")
.param pmc param_107
-.annotate 'line', 40
+.annotate 'line', 0
new $P106, "Undef"
.lex "$value", $P106
.lex "$_", param_107
find_lex $P108, "$_"
$P109 = $P108."value"()
store_lex "$value", $P109
-.annotate 'line', 41
find_lex $P110, "$value"
find_lex $P111, "$_"
$P112 = $P111."key"()
@@ -7797,15 +7617,14 @@
set $P115[$P114], $P116
vivify_45:
set $P116[$P112], $P110
-.annotate 'line', 39
.return ($P110)
.end
.namespace ["HLL";"Compiler"]
-.sub "_block83" :anon :subid("14_1283368195.4695") :outer("13_1283368195.4695")
+.sub "_block83" :anon :subid("14_1283975940.27824") :outer("13_1283975940.27824")
.param pmc param_86
-.annotate 'line', 34
+.annotate 'line', 0
new $P85, "Undef"
.lex "$value", $P85
.lex "$_", param_86
@@ -7820,7 +7639,6 @@
new $P90, "Undef"
vivify_48:
store_lex "$value", $P90
-.annotate 'line', 35
find_lex $P91, "$value"
find_lex $P92, "$_"
find_lex $P93, "$value"
@@ -7836,30 +7654,27 @@
set $P95[$P94], $P96
vivify_50:
set $P96[$P92], $P91
-.annotate 'line', 33
.return ($P91)
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "get_module" :subid("16_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "get_module" :subid("16_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_125
-.annotate 'line', 47
+.annotate 'line', 0
new $P124, 'ExceptionHandler'
set_addr $P124, control_123
$P124."handle_types"(.CONTROL_RETURN)
push_eh $P124
.lex "self", self
.lex "$name", param_125
-.annotate 'line', 48
$P126 = root_new ['parrot';'ResizablePMCArray']
.lex "@name", $P126
find_lex $P127, "self"
find_lex $P128, "$name"
$P129 = $P127."parse_name"($P128)
store_lex "@name", $P129
-.annotate 'line', 49
find_lex $P130, "@name"
find_lex $P131, "self"
getattribute $P132, $P131, "$!language"
@@ -7869,10 +7684,8 @@
set $S133, $P132
downcase $S134, $S133
$P130."unshift"($S134)
-.annotate 'line', 50
find_lex $P135, "@name"
get_root_namespace $P136, $P135
-.annotate 'line', 47
.return ($P136)
control_123:
.local pmc exception
@@ -7884,10 +7697,10 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "language" :subid("17_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "language" :subid("17_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_141 :optional
.param int has_param_141 :opt_flag
-.annotate 'line', 53
+.annotate 'line', 0
new $P140, 'ExceptionHandler'
set_addr $P140, control_139
$P140."handle_types"(.CONTROL_RETURN)
@@ -7898,26 +7711,21 @@
set param_141, $P142
optparam_52:
.lex "$name", param_141
-.annotate 'line', 54
find_lex $P144, "$name"
unless $P144, if_143_end
-.annotate 'line', 55
find_lex $P145, "$name"
find_lex $P146, "self"
setattribute $P146, "$!language", $P145
-.annotate 'line', 56
find_lex $P147, "$name"
set $S148, $P147
find_lex $P149, "self"
compreg $S148, $P149
if_143_end:
-.annotate 'line', 54
find_lex $P150, "self"
getattribute $P151, $P150, "$!language"
unless_null $P151, vivify_53
new $P151, "Undef"
vivify_53:
-.annotate 'line', 53
.return ($P151)
control_139:
.local pmc exception
@@ -7929,10 +7737,10 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "load_module" :subid("18_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "load_module" :subid("18_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_156
-.annotate 'line', 61
- .const 'Sub' $P166 = "19_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P166 = "19_1283975940.27824"
capture_lex $P166
new $P155, 'ExceptionHandler'
set_addr $P155, control_154
@@ -7940,13 +7748,10 @@
push_eh $P155
.lex "self", self
.lex "$name", param_156
-.annotate 'line', 62
new $P157, "Undef"
.lex "$base", $P157
-.annotate 'line', 63
new $P158, "Undef"
.lex "$loaded", $P158
-.annotate 'line', 62
find_lex $P159, "self"
find_lex $P160, "$name"
$P161 = $P159."parse_name"($P160)
@@ -7954,15 +7759,12 @@
new $P163, 'String'
set $P163, $S162
store_lex "$base", $P163
-.annotate 'line', 63
new $P164, "Integer"
assign $P164, 0
store_lex "$loaded", $P164
-.annotate 'line', 64
- .const 'Sub' $P166 = "19_1283368195.4695"
+ .const 'Sub' $P166 = "19_1283975940.27824"
capture_lex $P166
$P166()
-.annotate 'line', 65
find_lex $P179, "$loaded"
if $P179, unless_178_end
find_lex $P180, "$base"
@@ -7973,11 +7775,9 @@
assign $P183, 1
store_lex "$loaded", $P183
unless_178_end:
-.annotate 'line', 66
find_lex $P184, "self"
find_lex $P185, "$name"
$P186 = $P184."get_module"($P185)
-.annotate 'line', 61
.return ($P186)
control_154:
.local pmc exception
@@ -7989,8 +7789,8 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block165" :anon :subid("19_1283368195.4695") :outer("18_1283368195.4695")
-.annotate 'line', 64
+.sub "_block165" :anon :subid("19_1283975940.27824") :outer("18_1283975940.27824")
+.annotate 'line', 0
new $P173, 'ExceptionHandler'
set_addr $P173, control_172
$P173."handle_types_except"(.CONTROL_RETURN, .CONTROL_OK, .CONTROL_BREAK, .CONTROL_CONTINUE, .CONTROL_TAKE, .CONTROL_LEAVE, .CONTROL_EXIT, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_LAST, .CONTROL_LOOP_REDO)
@@ -8023,11 +7823,11 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "import" :subid("20_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "import" :subid("20_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_191
.param pmc param_192
-.annotate 'line', 69
- .const 'Sub' $P198 = "21_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P198 = "21_1283975940.27824"
capture_lex $P198
new $P190, 'ExceptionHandler'
set_addr $P190, control_189
@@ -8036,7 +7836,6 @@
.lex "self", self
.lex "$target", param_191
.lex "%exports", param_192
-.annotate 'line', 70
find_lex $P194, "%exports"
defined $I195, $P194
unless $I195, for_undef_54
@@ -8049,7 +7848,7 @@
unless $P193, loop279_done
shift $P196, $P193
loop279_redo:
- .const 'Sub' $P198 = "21_1283368195.4695"
+ .const 'Sub' $P198 = "21_1283975940.27824"
capture_lex $P198
$P198($P196)
loop279_next:
@@ -8063,7 +7862,6 @@
loop279_done:
pop_eh
for_undef_54:
-.annotate 'line', 69
.return ($P193)
control_189:
.local pmc exception
@@ -8075,31 +7873,26 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block197" :anon :subid("21_1283368195.4695") :outer("20_1283368195.4695")
+.sub "_block197" :anon :subid("21_1283975940.27824") :outer("20_1283975940.27824")
.param pmc param_201
-.annotate 'line', 70
- .const 'Sub' $P268 = "24_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P268 = "24_1283975940.27824"
capture_lex $P268
- .const 'Sub' $P248 = "23_1283368195.4695"
+ .const 'Sub' $P248 = "23_1283975940.27824"
capture_lex $P248
- .const 'Sub' $P219 = "22_1283368195.4695"
+ .const 'Sub' $P219 = "22_1283975940.27824"
capture_lex $P219
-.annotate 'line', 71
new $P199, "Undef"
.lex "$type", $P199
-.annotate 'line', 72
$P200 = root_new ['parrot';'Hash']
.lex "%items", $P200
.lex "$_", param_201
-.annotate 'line', 71
find_lex $P202, "$_"
$P203 = $P202."key"()
store_lex "$type", $P203
-.annotate 'line', 72
find_lex $P204, "$_"
$P205 = $P204."value"()
store_lex "%items", $P205
-.annotate 'line', 73
find_lex $P208, "self"
new $P209, 'String'
set $P209, "import_"
@@ -8108,7 +7901,6 @@
set $S212, $P211
can $I213, $P208, $S212
if $I213, if_207
-.annotate 'line', 76
find_lex $P237, "$target"
new $P238, 'String'
set $P238, "add_"
@@ -8117,7 +7909,6 @@
set $S241, $P240
can $I242, $P237, $S241
if $I242, if_236
-.annotate 'line', 80
find_lex $P264, "%items"
defined $I265, $P264
unless $I265, for_undef_55
@@ -8130,7 +7921,7 @@
unless $P263, loop276_done
shift $P266, $P263
loop276_redo:
- .const 'Sub' $P268 = "24_1283368195.4695"
+ .const 'Sub' $P268 = "24_1283975940.27824"
capture_lex $P268
$P268($P266)
loop276_next:
@@ -8144,12 +7935,9 @@
loop276_done:
pop_eh
for_undef_55:
-.annotate 'line', 79
set $P235, $P263
-.annotate 'line', 76
goto if_236_end
if_236:
-.annotate 'line', 77
find_lex $P244, "%items"
defined $I245, $P244
unless $I245, for_undef_57
@@ -8162,7 +7950,7 @@
unless $P243, loop260_done
shift $P246, $P243
loop260_redo:
- .const 'Sub' $P248 = "23_1283368195.4695"
+ .const 'Sub' $P248 = "23_1283975940.27824"
capture_lex $P248
$P248($P246)
loop260_next:
@@ -8176,14 +7964,11 @@
loop260_done:
pop_eh
for_undef_57:
-.annotate 'line', 76
set $P235, $P243
if_236_end:
set $P206, $P235
-.annotate 'line', 73
goto if_207_end
if_207:
-.annotate 'line', 74
find_lex $P215, "%items"
defined $I216, $P215
unless $I216, for_undef_58
@@ -8196,7 +7981,7 @@
unless $P214, loop232_done
shift $P217, $P214
loop232_redo:
- .const 'Sub' $P219 = "22_1283368195.4695"
+ .const 'Sub' $P219 = "22_1283975940.27824"
capture_lex $P219
$P219($P217)
loop232_next:
@@ -8210,18 +7995,16 @@
loop232_done:
pop_eh
for_undef_58:
-.annotate 'line', 73
set $P206, $P214
if_207_end:
-.annotate 'line', 70
.return ($P206)
.end
.namespace ["HLL";"Compiler"]
-.sub "_block267" :anon :subid("24_1283368195.4695") :outer("21_1283368195.4695")
+.sub "_block267" :anon :subid("24_1283975940.27824") :outer("21_1283975940.27824")
.param pmc param_269
-.annotate 'line', 80
+.annotate 'line', 0
.lex "$_", param_269
find_lex $P270, "$_"
$P271 = $P270."value"()
@@ -8239,9 +8022,9 @@
.namespace ["HLL";"Compiler"]
-.sub "_block247" :anon :subid("23_1283368195.4695") :outer("21_1283368195.4695")
+.sub "_block247" :anon :subid("23_1283975940.27824") :outer("21_1283975940.27824")
.param pmc param_249
-.annotate 'line', 77
+.annotate 'line', 0
.lex "$_", param_249
find_lex $P250, "$target"
find_lex $P251, "$_"
@@ -8259,9 +8042,9 @@
.namespace ["HLL";"Compiler"]
-.sub "_block218" :anon :subid("22_1283368195.4695") :outer("21_1283368195.4695")
+.sub "_block218" :anon :subid("22_1283975940.27824") :outer("21_1283975940.27824")
.param pmc param_220
-.annotate 'line', 74
+.annotate 'line', 0
.lex "$_", param_220
find_lex $P221, "self"
find_lex $P222, "$target"
@@ -8281,16 +8064,15 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "autoprint" :subid("25_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "autoprint" :subid("25_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_286
-.annotate 'line', 85
+.annotate 'line', 0
new $P285, 'ExceptionHandler'
set_addr $P285, control_284
$P285."handle_types"(.CONTROL_RETURN)
push_eh $P285
.lex "self", self
.lex "$value", param_286
-.annotate 'line', 87
getinterp $P289
$P290 = $P289."stdhandle"(1)
$N291 = $P290."tell"()
@@ -8308,12 +8090,10 @@
set $P287, $I294
goto unless_288_end
unless_288:
-.annotate 'line', 86
find_lex $P295, "$value"
set $S296, $P295
say $S296
unless_288_end:
-.annotate 'line', 85
.return ($P287)
control_284:
.local pmc exception
@@ -8325,10 +8105,10 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "interactive" :subid("26_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "interactive" :subid("26_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_301 :slurpy :named
-.annotate 'line', 90
- .const 'Sub' $P333 = "27_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P333 = "27_1283975940.27824"
capture_lex $P333
new $P300, 'ExceptionHandler'
set_addr $P300, control_299
@@ -8336,19 +8116,14 @@
push_eh $P300
.lex "self", self
.lex "%adverbs", param_301
-.annotate 'line', 91
new $P302, "Undef"
.lex "$target", $P302
-.annotate 'line', 95
new $P303, "Undef"
.lex "$stdin", $P303
-.annotate 'line', 96
new $P304, "Undef"
.lex "$encoding", $P304
-.annotate 'line', 101
new $P305, "Undef"
.lex "$save_ctx", $P305
-.annotate 'line', 91
find_lex $P306, "%adverbs"
unless_null $P306, vivify_61
$P306 = root_new ['parrot';'Hash']
@@ -8362,17 +8137,14 @@
new $P310, 'String'
set $P310, $S309
store_lex "$target", $P310
-.annotate 'line', 93
getinterp $P311
$P312 = $P311."stdhandle"(2)
find_lex $P313, "self"
$S314 = $P313."commandline_banner"()
print $P312, $S314
-.annotate 'line', 95
getinterp $P315
$P316 = $P315."stdhandle"(0)
store_lex "$stdin", $P316
-.annotate 'line', 96
find_lex $P317, "%adverbs"
unless_null $P317, vivify_63
$P317 = root_new ['parrot';'Hash']
@@ -8385,7 +8157,6 @@
new $P320, 'String'
set $P320, $S319
store_lex "$encoding", $P320
-.annotate 'line', 97
find_lex $P324, "$encoding"
if $P324, if_323
set $P322, $P324
@@ -8398,14 +8169,11 @@
set $P322, $I327
if_323_end:
unless $P322, if_321_end
-.annotate 'line', 98
find_lex $P328, "$stdin"
find_lex $P329, "$encoding"
$P328."encoding"($P329)
if_321_end:
-.annotate 'line', 97
find_lex $P330, "$save_ctx"
-.annotate 'line', 102
new $P444, 'ExceptionHandler'
set_addr $P444, loop443_handler
$P444."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST)
@@ -8415,7 +8183,7 @@
assign $P331, 1
unless $P331, loop443_done
loop443_redo:
- .const 'Sub' $P333 = "27_1283368195.4695"
+ .const 'Sub' $P333 = "27_1283975940.27824"
capture_lex $P333
$P333()
loop443_next:
@@ -8428,7 +8196,6 @@
eq $P445, .CONTROL_LOOP_REDO, loop443_redo
loop443_done:
pop_eh
-.annotate 'line', 90
.return ($P331)
control_299:
.local pmc exception
@@ -8440,32 +8207,25 @@
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block332" :anon :subid("27_1283368195.4695") :outer("26_1283368195.4695")
-.annotate 'line', 102
- .const 'Sub' $P365 = "28_1283368195.4695"
+.sub "_block332" :anon :subid("27_1283975940.27824") :outer("26_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P365 = "28_1283975940.27824"
capture_lex $P365
-.annotate 'line', 105
new $P334, "Undef"
.lex "$prompt", $P334
-.annotate 'line', 106
new $P335, "Undef"
.lex "$code", $P335
-.annotate 'line', 111
new $P336, "Undef"
.lex "$*AUTOPRINTPOS", $P336
-.annotate 'line', 112
new $P337, "Undef"
.lex "$*CTXSAVE", $P337
-.annotate 'line', 113
new $P338, "Undef"
.lex "$*MAIN_CTX", $P338
-.annotate 'line', 103
find_lex $P340, "$stdin"
if $P340, unless_339_end
set $I341, .CONTROL_LOOP_LAST
die 0, $I341
unless_339_end:
-.annotate 'line', 105
find_lex $P343, "self"
$P344 = $P343."commandline_prompt"()
set $P342, $P344
@@ -8476,25 +8236,21 @@
set $P342, $P347
default_345:
store_lex "$prompt", $P342
-.annotate 'line', 106
find_lex $P348, "$stdin"
find_lex $P349, "$prompt"
set $S350, $P349
$P351 = $P348."readline_interactive"($S350)
store_lex "$code", $P351
-.annotate 'line', 108
find_lex $P353, "$code"
isnull $I354, $P353
unless $I354, if_352_end
set $I355, .CONTROL_LOOP_LAST
die 0, $I355
if_352_end:
-.annotate 'line', 111
getinterp $P356
$P357 = $P356."stdhandle"(1)
$P358 = $P357."tell"()
store_lex "$*AUTOPRINTPOS", $P358
-.annotate 'line', 112
find_lex $P359, "self"
store_lex "$*CTXSAVE", $P359
find_lex $P360, "$*MAIN_CTX"
@@ -8504,43 +8260,37 @@
die "Contextual $*MAIN_CTX not found"
vivify_66:
vivify_65:
-.annotate 'line', 115
find_lex $P363, "$code"
if $P363, if_362
set $P361, $P363
goto if_362_end
if_362:
- .const 'Sub' $P365 = "28_1283368195.4695"
+ .const 'Sub' $P365 = "28_1283975940.27824"
capture_lex $P365
$P442 = $P365()
set $P361, $P442
if_362_end:
-.annotate 'line', 102
.return ($P361)
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block364" :anon :subid("28_1283368195.4695") :outer("27_1283368195.4695")
-.annotate 'line', 115
- .const 'Sub' $P398 = "31_1283368195.4695"
+.sub "_block364" :anon :subid("28_1283975940.27824") :outer("27_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P398 = "31_1283975940.27824"
capture_lex $P398
- .const 'Sub' $P371 = "29_1283368195.4695"
+ .const 'Sub' $P371 = "29_1283975940.27824"
capture_lex $P371
-.annotate 'line', 117
new $P366, "Undef"
.lex "$output", $P366
-.annotate 'line', 116
find_lex $P367, "$code"
concat $P368, $P367, "\n"
store_lex "$code", $P368
find_lex $P369, "$output"
-.annotate 'line', 118
- .const 'Sub' $P371 = "29_1283368195.4695"
+ .const 'Sub' $P371 = "29_1283975940.27824"
capture_lex $P371
$P371()
-.annotate 'line', 125
find_dynamic_lex $P395, "$*MAIN_CTX"
unless_null $P395, vivify_67
get_hll_global $P395, "$MAIN_CTX"
@@ -8550,83 +8300,68 @@
vivify_67:
defined $I396, $P395
unless $I396, if_394_end
- .const 'Sub' $P398 = "31_1283368195.4695"
+ .const 'Sub' $P398 = "31_1283975940.27824"
capture_lex $P398
$P398()
if_394_end:
-.annotate 'line', 133
find_lex $P421, "$output"
isnull $I422, $P421
unless $I422, if_420_end
set $I423, .CONTROL_LOOP_NEXT
die 0, $I423
if_420_end:
-.annotate 'line', 135
find_lex $P426, "$target"
isfalse $I427, $P426
if $I427, if_425
-.annotate 'line', 137
find_lex $P433, "$target"
set $S434, $P433
iseq $I435, $S434, "pir"
if $I435, if_432
-.annotate 'line', 140
find_lex $P437, "self"
find_lex $P438, "$output"
find_lex $P439, "$target"
find_lex $P440, "%adverbs"
$P441 = $P437."dumper"($P438, $P439, $P440 :flat)
-.annotate 'line', 139
set $P431, $P441
-.annotate 'line', 137
goto if_432_end
if_432:
-.annotate 'line', 138
find_lex $P436, "$output"
say $P436
if_432_end:
-.annotate 'line', 137
set $P424, $P431
-.annotate 'line', 135
goto if_425_end
if_425:
-.annotate 'line', 136
find_lex $P428, "self"
find_lex $P429, "$output"
$P430 = $P428."autoprint"($P429)
-.annotate 'line', 135
set $P424, $P430
if_425_end:
-.annotate 'line', 115
.return ($P424)
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block370" :anon :subid("29_1283368195.4695") :outer("28_1283368195.4695")
-.annotate 'line', 118
- .const 'Sub' $P383 = "30_1283368195.4695"
+.sub "_block370" :anon :subid("29_1283975940.27824") :outer("28_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P383 = "30_1283975940.27824"
capture_lex $P383
new $P379, 'ExceptionHandler'
set_addr $P379, control_378
$P379."handle_types_except"(.CONTROL_RETURN, .CONTROL_OK, .CONTROL_BREAK, .CONTROL_CONTINUE, .CONTROL_TAKE, .CONTROL_LEAVE, .CONTROL_EXIT, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_LAST, .CONTROL_LOOP_REDO)
push_eh $P379
-.annotate 'line', 119
find_lex $P372, "self"
find_lex $P373, "$code"
find_lex $P374, "$save_ctx"
find_lex $P375, "%adverbs"
$P376 = $P372."eval"($P373, $P375 :flat, $P374 :named("outer_ctx"))
store_lex "$output", $P376
-.annotate 'line', 118
pop_eh
goto skip_handler_377
control_378:
-.annotate 'line', 120
.local pmc exception
.get_results (exception)
- .const 'Sub' $P383 = "30_1283368195.4695"
+ .const 'Sub' $P383 = "30_1283975940.27824"
newclosure $P391, $P383
$P391(exception)
new $P392, 'Integer'
@@ -8639,56 +8374,48 @@
nothandled_381:
rethrow exception
skip_handler_377:
-.annotate 'line', 118
.return ()
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block382" :anon :subid("30_1283368195.4695") :outer("29_1283368195.4695")
+.sub "_block382" :anon :subid("30_1283975940.27824") :outer("29_1283975940.27824")
.param pmc param_384
-.annotate 'line', 120
+.annotate 'line', 0
.lex "$_", param_384
find_lex $P385, "$_"
.lex "$!", $P385
-.annotate 'line', 121
find_lex $P386, "$!"
set $S387, $P386
new $P388, 'String'
set $P388, $S387
concat $P389, $P388, "\n"
print $P389
-.annotate 'line', 122
set $I390, .CONTROL_LOOP_NEXT
die 0, $I390
-.annotate 'line', 120
.return ()
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "_block397" :anon :subid("31_1283368195.4695") :outer("28_1283368195.4695")
-.annotate 'line', 125
- .const 'Sub' $P409 = "32_1283368195.4695"
+.sub "_block397" :anon :subid("31_1283975940.27824") :outer("28_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P409 = "32_1283975940.27824"
capture_lex $P409
-.annotate 'line', 126
get_global $P399, "$interactive_ctx"
unless_null $P399, vivify_69
new $P399, "Undef"
set_global "$interactive_ctx", $P399
vivify_69:
-.annotate 'line', 127
get_global $P400, "%interactive_pad"
unless_null $P400, vivify_70
$P400 = root_new ['parrot';'Hash']
set_global "%interactive_pad", $P400
vivify_70:
-.annotate 'line', 125
get_global $P401, "$interactive_ctx"
get_global $P402, "%interactive_pad"
-.annotate 'line', 128
find_dynamic_lex $P404, "$*MAIN_CTX"
unless_null $P404, vivify_71
get_hll_global $P404, "$MAIN_CTX"
@@ -8708,7 +8435,7 @@
unless $P403, loop416_done
shift $P407, $P403
loop416_redo:
- .const 'Sub' $P409 = "32_1283368195.4695"
+ .const 'Sub' $P409 = "32_1283975940.27824"
capture_lex $P409
$P409($P407)
loop416_next:
@@ -8722,20 +8449,17 @@
loop416_done:
pop_eh
for_undef_73:
-.annotate 'line', 131
get_global $P419, "$interactive_ctx"
store_lex "$save_ctx", $P419
-.annotate 'line', 125
.return ($P419)
.end
.namespace ["HLL";"Compiler"]
-.sub "_block408" :anon :subid("32_1283368195.4695") :outer("31_1283368195.4695")
+.sub "_block408" :anon :subid("32_1283975940.27824") :outer("31_1283975940.27824")
.param pmc param_410
-.annotate 'line', 128
+.annotate 'line', 0
.lex "$_", param_410
-.annotate 'line', 129
find_lex $P411, "$_"
$P412 = $P411."value"()
find_lex $P413, "$_"
@@ -8746,19 +8470,18 @@
set_global "%interactive_pad", $P415
vivify_74:
set $P415[$P414], $P412
-.annotate 'line', 128
.return ($P412)
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "eval" :subid("33_1283368195.4695") :method :outer("11_1283368195.4695")
+.sub "eval" :subid("33_1283975940.27824") :method :outer("11_1283975940.27824")
.param pmc param_450
.param pmc param_451 :slurpy
.param pmc param_452 :slurpy :named
-.annotate 'line', 146
- .const 'Sub' $P471 = "34_1283368195.4695"
+.annotate 'line', 0
+ .const 'Sub' $P471 = "34_1283975940.27824"
capture_lex $P471
new $P449, 'ExceptionHandler'
set_addr $P449, control_448
@@ -8768,18 +8491,14 @@
.lex "$code", param_450
.lex "@args", param_451
.lex "%adverbs", param_452
-.annotate 'line', 147
new $P453, "Undef"
.lex "$output", $P453
-.annotate 'line', 146
find_lex $P454, "$output"
-.annotate 'line', 148
find_lex $P455, "self"
find_lex $P456, "$code"
find_lex $P457, "%adverbs"
$P458 = $P455."compile"($P456, $P457 :flat)
store_lex "$output", $P458
-.annotate 'line', 150
find_lex $P462, "$output"
isa $I463, $P462, "String"
new $P464, 'Integer'
@@ -8790,7 +8509,6 @@
set $P460, $I465
goto if_461_end
if_461:
-.annotate 'line', 151
find_lex $P466, "%adverbs"
unless_null $P466, vivify_75
$P466 = root_new ['parrot';'Hash']
@@ -8805,13 +8523,11 @@
set $P460, $I469
if_461_end:
unless $P460, if_459_end
- .const 'Sub' $P471 = "34_1283368195.4695"
+ .const 'Sub' $P471 = "34_1283975940.27824"
capture_lex $P471
$P471()
if_459_end:
-.annotate 'line', 150
find_lex $P487, "$output"
-.annotate 'line', 146
.return ($P487)
control_448:
.local pmc exception
@@ -8822,8 +8538,8 @@
.namespace ["HLL";"Compiler"]
-.sub "_block470" :anon :subid("34_1283368195.4695") :outer("33_1283368195.4695")
-.annotate 'line', 152
+.sub "_block470" :anon :subid("34_1283975940.27824") :outer("33_1283975940.27824")
+.annotate 'line', 0
new $P472, "Undef"
.lex "$outer_ctx", $P472
find_lex $P473, "%adverbs"
@@ -8835,11 +8551,9 @@
new $P474, "Undef"
vivify_78:
store_lex "$outer_ctx", $P474
-.annotate 'line', 153
find_lex $P476, "$outer_ctx"
defined $I477, $P476
unless $I477, if_475_end
-.annotate 'line', 154
find_lex $P478, "$output"
unless_null $P478, vivify_79
$P478 = root_new ['parrot';'ResizablePMCArray']
@@ -8851,7 +8565,6 @@
find_lex $P480, "$outer_ctx"
$P479."set_outer_ctx"($P480)
if_475_end:
-.annotate 'line', 157
find_lex $P481, "%adverbs"
unless_null $P481, vivify_81
$P481 = root_new ['parrot';'Hash']
@@ -8862,38 +8575,32 @@
vivify_82:
set $I483, $P482
trace $I483
-.annotate 'line', 158
find_lex $P484, "$output"
find_lex $P485, "@args"
$P486 = $P484($P485 :flat)
store_lex "$output", $P486
-.annotate 'line', 159
trace 0
-.annotate 'line', 151
.return ()
.end
.namespace ["HLL";"Compiler"]
.include "except_types.pasm"
-.sub "ctxsave" :subid("35_1283368195.4695") :method :outer("11_1283368195.4695")
-.annotate 'line', 165
+.sub "ctxsave" :subid("35_1283975940.27824") :method :outer("11_1283975940.27824")
+.annotate 'line', 0
new $P491, 'ExceptionHandler'
set_addr $P491, control_490
$P491."handle_types"(.CONTROL_RETURN)
push_eh $P491
.lex "self", self
-.annotate 'line', 167
$P0 = getinterp
$P492 = $P0['context';1]
store_dynamic_lex "$*MAIN_CTX", $P492
-.annotate 'line', 171
new $P493, "Integer"
assign $P493, 0
store_dynamic_lex "$*CTXSAVE", $P493
-.annotate 'line', 165
.return ($P493)
control_490:
.local pmc exception
@@ -8904,9 +8611,9 @@
.namespace []
-.sub "_block498" :load :anon :subid("36_1283368195.4695")
-.annotate 'line', 1
- .const 'Sub' $P500 = "10_1283368195.4695"
+.sub "_block498" :load :anon :subid("36_1283975940.27824")
+.annotate 'line', 0
+ .const 'Sub' $P500 = "10_1283975940.27824"
$P501 = $P500()
.return ($P501)
.end
Modified: branches/gc_massacre/ext/nqp-rx/src/stage0/NQP-s0.pir
==============================================================================
--- branches/gc_massacre/ext/nqp-rx/src/stage0/NQP-s0.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/ext/nqp-rx/src/stage0/NQP-s0.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -15,32 +15,29 @@
### .include 'gen/nqp-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368207.8572")
+.sub "_block11" :anon :subid("10_1283975947.19641")
.annotate 'line', 0
get_hll_global $P14, ["NQP";"Grammar"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 4
get_hll_global $P14, ["NQP";"Grammar"], "_block13"
capture_lex $P14
$P1423 = $P14()
-.annotate 'line', 1
.return ($P1423)
- .const 'Sub' $P1425 = "371_1283368207.8572"
+ .const 'Sub' $P1425 = "371_1283975947.19641"
.return ($P1425)
.end
.namespace []
-.sub "" :load :init :subid("post372") :outer("10_1283368207.8572")
+.sub "" :load :init :subid("post372") :outer("10_1283975947.19641")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368207.8572"
+ .const 'Sub' $P12 = "10_1283975947.19641"
.local pmc block
set block, $P12
$P1428 = get_root_global ["parrot"], "P6metaclass"
@@ -49,321 +46,321 @@
.namespace ["NQP";"Grammar"]
-.sub "_block13" :subid("11_1283368207.8572") :outer("10_1283368207.8572")
-.annotate 'line', 4
+.sub "_block13" :subid("11_1283975947.19641") :outer("10_1283975947.19641")
+.annotate 'line', 0
get_hll_global $P1340, ["NQP";"Regex"], "_block1339"
capture_lex $P1340
- .const 'Sub' $P1326 = "348_1283368207.8572"
+ .const 'Sub' $P1326 = "348_1283975947.19641"
capture_lex $P1326
- .const 'Sub' $P1320 = "346_1283368207.8572"
+ .const 'Sub' $P1320 = "346_1283975947.19641"
capture_lex $P1320
- .const 'Sub' $P1314 = "344_1283368207.8572"
+ .const 'Sub' $P1314 = "344_1283975947.19641"
capture_lex $P1314
- .const 'Sub' $P1308 = "342_1283368207.8572"
+ .const 'Sub' $P1308 = "342_1283975947.19641"
capture_lex $P1308
- .const 'Sub' $P1302 = "340_1283368207.8572"
+ .const 'Sub' $P1302 = "340_1283975947.19641"
capture_lex $P1302
- .const 'Sub' $P1296 = "338_1283368207.8572"
+ .const 'Sub' $P1296 = "338_1283975947.19641"
capture_lex $P1296
- .const 'Sub' $P1289 = "336_1283368207.8572"
+ .const 'Sub' $P1289 = "336_1283975947.19641"
capture_lex $P1289
- .const 'Sub' $P1282 = "334_1283368207.8572"
+ .const 'Sub' $P1282 = "334_1283975947.19641"
capture_lex $P1282
- .const 'Sub' $P1275 = "332_1283368207.8572"
+ .const 'Sub' $P1275 = "332_1283975947.19641"
capture_lex $P1275
- .const 'Sub' $P1268 = "330_1283368207.8572"
+ .const 'Sub' $P1268 = "330_1283975947.19641"
capture_lex $P1268
- .const 'Sub' $P1262 = "328_1283368207.8572"
+ .const 'Sub' $P1262 = "328_1283975947.19641"
capture_lex $P1262
- .const 'Sub' $P1255 = "326_1283368207.8572"
+ .const 'Sub' $P1255 = "326_1283975947.19641"
capture_lex $P1255
- .const 'Sub' $P1248 = "324_1283368207.8572"
+ .const 'Sub' $P1248 = "324_1283975947.19641"
capture_lex $P1248
- .const 'Sub' $P1241 = "322_1283368207.8572"
+ .const 'Sub' $P1241 = "322_1283975947.19641"
capture_lex $P1241
- .const 'Sub' $P1234 = "320_1283368207.8572"
+ .const 'Sub' $P1234 = "320_1283975947.19641"
capture_lex $P1234
- .const 'Sub' $P1227 = "318_1283368207.8572"
+ .const 'Sub' $P1227 = "318_1283975947.19641"
capture_lex $P1227
- .const 'Sub' $P1220 = "316_1283368207.8572"
+ .const 'Sub' $P1220 = "316_1283975947.19641"
capture_lex $P1220
- .const 'Sub' $P1213 = "314_1283368207.8572"
+ .const 'Sub' $P1213 = "314_1283975947.19641"
capture_lex $P1213
- .const 'Sub' $P1206 = "312_1283368207.8572"
+ .const 'Sub' $P1206 = "312_1283975947.19641"
capture_lex $P1206
- .const 'Sub' $P1199 = "310_1283368207.8572"
+ .const 'Sub' $P1199 = "310_1283975947.19641"
capture_lex $P1199
- .const 'Sub' $P1192 = "308_1283368207.8572"
+ .const 'Sub' $P1192 = "308_1283975947.19641"
capture_lex $P1192
- .const 'Sub' $P1185 = "306_1283368207.8572"
+ .const 'Sub' $P1185 = "306_1283975947.19641"
capture_lex $P1185
- .const 'Sub' $P1178 = "304_1283368207.8572"
+ .const 'Sub' $P1178 = "304_1283975947.19641"
capture_lex $P1178
- .const 'Sub' $P1171 = "302_1283368207.8572"
+ .const 'Sub' $P1171 = "302_1283975947.19641"
capture_lex $P1171
- .const 'Sub' $P1164 = "300_1283368207.8572"
+ .const 'Sub' $P1164 = "300_1283975947.19641"
capture_lex $P1164
- .const 'Sub' $P1157 = "298_1283368207.8572"
+ .const 'Sub' $P1157 = "298_1283975947.19641"
capture_lex $P1157
- .const 'Sub' $P1150 = "296_1283368207.8572"
+ .const 'Sub' $P1150 = "296_1283975947.19641"
capture_lex $P1150
- .const 'Sub' $P1143 = "294_1283368207.8572"
+ .const 'Sub' $P1143 = "294_1283975947.19641"
capture_lex $P1143
- .const 'Sub' $P1136 = "292_1283368207.8572"
+ .const 'Sub' $P1136 = "292_1283975947.19641"
capture_lex $P1136
- .const 'Sub' $P1129 = "290_1283368207.8572"
+ .const 'Sub' $P1129 = "290_1283975947.19641"
capture_lex $P1129
- .const 'Sub' $P1122 = "288_1283368207.8572"
+ .const 'Sub' $P1122 = "288_1283975947.19641"
capture_lex $P1122
- .const 'Sub' $P1115 = "286_1283368207.8572"
+ .const 'Sub' $P1115 = "286_1283975947.19641"
capture_lex $P1115
- .const 'Sub' $P1108 = "284_1283368207.8572"
+ .const 'Sub' $P1108 = "284_1283975947.19641"
capture_lex $P1108
- .const 'Sub' $P1101 = "282_1283368207.8572"
+ .const 'Sub' $P1101 = "282_1283975947.19641"
capture_lex $P1101
- .const 'Sub' $P1094 = "280_1283368207.8572"
+ .const 'Sub' $P1094 = "280_1283975947.19641"
capture_lex $P1094
- .const 'Sub' $P1087 = "278_1283368207.8572"
+ .const 'Sub' $P1087 = "278_1283975947.19641"
capture_lex $P1087
- .const 'Sub' $P1080 = "276_1283368207.8572"
+ .const 'Sub' $P1080 = "276_1283975947.19641"
capture_lex $P1080
- .const 'Sub' $P1073 = "274_1283368207.8572"
+ .const 'Sub' $P1073 = "274_1283975947.19641"
capture_lex $P1073
- .const 'Sub' $P1066 = "272_1283368207.8572"
+ .const 'Sub' $P1066 = "272_1283975947.19641"
capture_lex $P1066
- .const 'Sub' $P1059 = "270_1283368207.8572"
+ .const 'Sub' $P1059 = "270_1283975947.19641"
capture_lex $P1059
- .const 'Sub' $P1053 = "268_1283368207.8572"
+ .const 'Sub' $P1053 = "268_1283975947.19641"
capture_lex $P1053
- .const 'Sub' $P1046 = "266_1283368207.8572"
+ .const 'Sub' $P1046 = "266_1283975947.19641"
capture_lex $P1046
- .const 'Sub' $P1039 = "264_1283368207.8572"
+ .const 'Sub' $P1039 = "264_1283975947.19641"
capture_lex $P1039
- .const 'Sub' $P1032 = "262_1283368207.8572"
+ .const 'Sub' $P1032 = "262_1283975947.19641"
capture_lex $P1032
- .const 'Sub' $P1025 = "260_1283368207.8572"
+ .const 'Sub' $P1025 = "260_1283975947.19641"
capture_lex $P1025
- .const 'Sub' $P1018 = "258_1283368207.8572"
+ .const 'Sub' $P1018 = "258_1283975947.19641"
capture_lex $P1018
- .const 'Sub' $P1011 = "256_1283368207.8572"
+ .const 'Sub' $P1011 = "256_1283975947.19641"
capture_lex $P1011
- .const 'Sub' $P1004 = "254_1283368207.8572"
+ .const 'Sub' $P1004 = "254_1283975947.19641"
capture_lex $P1004
- .const 'Sub' $P998 = "252_1283368207.8572"
+ .const 'Sub' $P998 = "252_1283975947.19641"
capture_lex $P998
- .const 'Sub' $P992 = "250_1283368207.8572"
+ .const 'Sub' $P992 = "250_1283975947.19641"
capture_lex $P992
- .const 'Sub' $P987 = "248_1283368207.8572"
+ .const 'Sub' $P987 = "248_1283975947.19641"
capture_lex $P987
- .const 'Sub' $P981 = "246_1283368207.8572"
+ .const 'Sub' $P981 = "246_1283975947.19641"
capture_lex $P981
- .const 'Sub' $P975 = "244_1283368207.8572"
+ .const 'Sub' $P975 = "244_1283975947.19641"
capture_lex $P975
- .const 'Sub' $P970 = "242_1283368207.8572"
+ .const 'Sub' $P970 = "242_1283975947.19641"
capture_lex $P970
- .const 'Sub' $P965 = "240_1283368207.8572"
+ .const 'Sub' $P965 = "240_1283975947.19641"
capture_lex $P965
- .const 'Sub' $P957 = "238_1283368207.8572"
+ .const 'Sub' $P957 = "238_1283975947.19641"
capture_lex $P957
- .const 'Sub' $P948 = "236_1283368207.8572"
+ .const 'Sub' $P948 = "236_1283975947.19641"
capture_lex $P948
- .const 'Sub' $P943 = "234_1283368207.8572"
+ .const 'Sub' $P943 = "234_1283975947.19641"
capture_lex $P943
- .const 'Sub' $P938 = "232_1283368207.8572"
+ .const 'Sub' $P938 = "232_1283975947.19641"
capture_lex $P938
- .const 'Sub' $P933 = "230_1283368207.8572"
+ .const 'Sub' $P933 = "230_1283975947.19641"
capture_lex $P933
- .const 'Sub' $P925 = "228_1283368207.8572"
+ .const 'Sub' $P925 = "228_1283975947.19641"
capture_lex $P925
- .const 'Sub' $P917 = "226_1283368207.8572"
+ .const 'Sub' $P917 = "226_1283975947.19641"
capture_lex $P917
- .const 'Sub' $P912 = "224_1283368207.8572"
+ .const 'Sub' $P912 = "224_1283975947.19641"
capture_lex $P912
- .const 'Sub' $P907 = "222_1283368207.8572"
+ .const 'Sub' $P907 = "222_1283975947.19641"
capture_lex $P907
- .const 'Sub' $P902 = "220_1283368207.8572"
+ .const 'Sub' $P902 = "220_1283975947.19641"
capture_lex $P902
- .const 'Sub' $P896 = "218_1283368207.8572"
+ .const 'Sub' $P896 = "218_1283975947.19641"
capture_lex $P896
- .const 'Sub' $P890 = "216_1283368207.8572"
+ .const 'Sub' $P890 = "216_1283975947.19641"
capture_lex $P890
- .const 'Sub' $P884 = "214_1283368207.8572"
+ .const 'Sub' $P884 = "214_1283975947.19641"
capture_lex $P884
- .const 'Sub' $P878 = "212_1283368207.8572"
+ .const 'Sub' $P878 = "212_1283975947.19641"
capture_lex $P878
- .const 'Sub' $P872 = "210_1283368207.8572"
+ .const 'Sub' $P872 = "210_1283975947.19641"
capture_lex $P872
- .const 'Sub' $P867 = "208_1283368207.8572"
+ .const 'Sub' $P867 = "208_1283975947.19641"
capture_lex $P867
- .const 'Sub' $P862 = "206_1283368207.8572"
+ .const 'Sub' $P862 = "206_1283975947.19641"
capture_lex $P862
- .const 'Sub' $P850 = "202_1283368207.8572"
+ .const 'Sub' $P850 = "202_1283975947.19641"
capture_lex $P850
- .const 'Sub' $P842 = "200_1283368207.8572"
+ .const 'Sub' $P842 = "200_1283975947.19641"
capture_lex $P842
- .const 'Sub' $P836 = "198_1283368207.8572"
+ .const 'Sub' $P836 = "198_1283975947.19641"
capture_lex $P836
- .const 'Sub' $P829 = "196_1283368207.8572"
+ .const 'Sub' $P829 = "196_1283975947.19641"
capture_lex $P829
- .const 'Sub' $P823 = "194_1283368207.8572"
+ .const 'Sub' $P823 = "194_1283975947.19641"
capture_lex $P823
- .const 'Sub' $P815 = "192_1283368207.8572"
+ .const 'Sub' $P815 = "192_1283975947.19641"
capture_lex $P815
- .const 'Sub' $P807 = "190_1283368207.8572"
+ .const 'Sub' $P807 = "190_1283975947.19641"
capture_lex $P807
- .const 'Sub' $P801 = "188_1283368207.8572"
+ .const 'Sub' $P801 = "188_1283975947.19641"
capture_lex $P801
- .const 'Sub' $P795 = "186_1283368207.8572"
+ .const 'Sub' $P795 = "186_1283975947.19641"
capture_lex $P795
- .const 'Sub' $P781 = "182_1283368207.8572"
+ .const 'Sub' $P781 = "182_1283975947.19641"
capture_lex $P781
- .const 'Sub' $P744 = "180_1283368207.8572"
+ .const 'Sub' $P744 = "180_1283975947.19641"
capture_lex $P744
- .const 'Sub' $P735 = "178_1283368207.8572"
+ .const 'Sub' $P735 = "178_1283975947.19641"
capture_lex $P735
- .const 'Sub' $P729 = "176_1283368207.8572"
+ .const 'Sub' $P729 = "176_1283975947.19641"
capture_lex $P729
- .const 'Sub' $P719 = "174_1283368207.8572"
+ .const 'Sub' $P719 = "174_1283975947.19641"
capture_lex $P719
- .const 'Sub' $P706 = "172_1283368207.8572"
+ .const 'Sub' $P706 = "172_1283975947.19641"
capture_lex $P706
- .const 'Sub' $P699 = "170_1283368207.8572"
+ .const 'Sub' $P699 = "170_1283975947.19641"
capture_lex $P699
- .const 'Sub' $P691 = "168_1283368207.8572"
+ .const 'Sub' $P691 = "168_1283975947.19641"
capture_lex $P691
- .const 'Sub' $P681 = "166_1283368207.8572"
+ .const 'Sub' $P681 = "166_1283975947.19641"
capture_lex $P681
- .const 'Sub' $P657 = "162_1283368207.8572"
+ .const 'Sub' $P657 = "162_1283975947.19641"
capture_lex $P657
- .const 'Sub' $P634 = "160_1283368207.8572"
+ .const 'Sub' $P634 = "160_1283975947.19641"
capture_lex $P634
- .const 'Sub' $P627 = "158_1283368207.8572"
+ .const 'Sub' $P627 = "158_1283975947.19641"
capture_lex $P627
- .const 'Sub' $P620 = "156_1283368207.8572"
+ .const 'Sub' $P620 = "156_1283975947.19641"
capture_lex $P620
- .const 'Sub' $P610 = "152_1283368207.8572"
+ .const 'Sub' $P610 = "152_1283975947.19641"
capture_lex $P610
- .const 'Sub' $P602 = "150_1283368207.8572"
+ .const 'Sub' $P602 = "150_1283975947.19641"
capture_lex $P602
- .const 'Sub' $P596 = "148_1283368207.8572"
+ .const 'Sub' $P596 = "148_1283975947.19641"
capture_lex $P596
- .const 'Sub' $P583 = "146_1283368207.8572"
+ .const 'Sub' $P583 = "146_1283975947.19641"
capture_lex $P583
- .const 'Sub' $P576 = "144_1283368207.8572"
+ .const 'Sub' $P576 = "144_1283975947.19641"
capture_lex $P576
- .const 'Sub' $P569 = "142_1283368207.8572"
+ .const 'Sub' $P569 = "142_1283975947.19641"
capture_lex $P569
- .const 'Sub' $P562 = "140_1283368207.8572"
+ .const 'Sub' $P562 = "140_1283975947.19641"
capture_lex $P562
- .const 'Sub' $P535 = "136_1283368207.8572"
+ .const 'Sub' $P535 = "136_1283975947.19641"
capture_lex $P535
- .const 'Sub' $P526 = "134_1283368207.8572"
+ .const 'Sub' $P526 = "134_1283975947.19641"
capture_lex $P526
- .const 'Sub' $P519 = "132_1283368207.8572"
+ .const 'Sub' $P519 = "132_1283975947.19641"
capture_lex $P519
- .const 'Sub' $P510 = "128_1283368207.8572"
+ .const 'Sub' $P510 = "128_1283975947.19641"
capture_lex $P510
- .const 'Sub' $P505 = "126_1283368207.8572"
+ .const 'Sub' $P505 = "126_1283975947.19641"
capture_lex $P505
- .const 'Sub' $P493 = "124_1283368207.8572"
+ .const 'Sub' $P493 = "124_1283975947.19641"
capture_lex $P493
- .const 'Sub' $P481 = "122_1283368207.8572"
+ .const 'Sub' $P481 = "122_1283975947.19641"
capture_lex $P481
- .const 'Sub' $P474 = "120_1283368207.8572"
+ .const 'Sub' $P474 = "120_1283975947.19641"
capture_lex $P474
- .const 'Sub' $P469 = "118_1283368207.8572"
+ .const 'Sub' $P469 = "118_1283975947.19641"
capture_lex $P469
- .const 'Sub' $P463 = "116_1283368207.8572"
+ .const 'Sub' $P463 = "116_1283975947.19641"
capture_lex $P463
- .const 'Sub' $P457 = "114_1283368207.8572"
+ .const 'Sub' $P457 = "114_1283975947.19641"
capture_lex $P457
- .const 'Sub' $P447 = "111_1283368207.8572"
+ .const 'Sub' $P447 = "111_1283975947.19641"
capture_lex $P447
- .const 'Sub' $P441 = "109_1283368207.8572"
+ .const 'Sub' $P441 = "109_1283975947.19641"
capture_lex $P441
- .const 'Sub' $P435 = "107_1283368207.8572"
+ .const 'Sub' $P435 = "107_1283975947.19641"
capture_lex $P435
- .const 'Sub' $P429 = "105_1283368207.8572"
+ .const 'Sub' $P429 = "105_1283975947.19641"
capture_lex $P429
- .const 'Sub' $P423 = "103_1283368207.8572"
+ .const 'Sub' $P423 = "103_1283975947.19641"
capture_lex $P423
- .const 'Sub' $P417 = "101_1283368207.8572"
+ .const 'Sub' $P417 = "101_1283975947.19641"
capture_lex $P417
- .const 'Sub' $P411 = "99_1283368207.8572"
+ .const 'Sub' $P411 = "99_1283975947.19641"
capture_lex $P411
- .const 'Sub' $P402 = "97_1283368207.8572"
+ .const 'Sub' $P402 = "97_1283975947.19641"
capture_lex $P402
- .const 'Sub' $P393 = "95_1283368207.8572"
+ .const 'Sub' $P393 = "95_1283975947.19641"
capture_lex $P393
- .const 'Sub' $P384 = "93_1283368207.8572"
+ .const 'Sub' $P384 = "93_1283975947.19641"
capture_lex $P384
- .const 'Sub' $P371 = "89_1283368207.8572"
+ .const 'Sub' $P371 = "89_1283975947.19641"
capture_lex $P371
- .const 'Sub' $P362 = "87_1283368207.8572"
+ .const 'Sub' $P362 = "87_1283975947.19641"
capture_lex $P362
- .const 'Sub' $P352 = "83_1283368207.8572"
+ .const 'Sub' $P352 = "83_1283975947.19641"
capture_lex $P352
- .const 'Sub' $P345 = "81_1283368207.8572"
+ .const 'Sub' $P345 = "81_1283975947.19641"
capture_lex $P345
- .const 'Sub' $P338 = "79_1283368207.8572"
+ .const 'Sub' $P338 = "79_1283975947.19641"
capture_lex $P338
- .const 'Sub' $P326 = "75_1283368207.8572"
+ .const 'Sub' $P326 = "75_1283975947.19641"
capture_lex $P326
- .const 'Sub' $P318 = "73_1283368207.8572"
+ .const 'Sub' $P318 = "73_1283975947.19641"
capture_lex $P318
- .const 'Sub' $P310 = "71_1283368207.8572"
+ .const 'Sub' $P310 = "71_1283975947.19641"
capture_lex $P310
- .const 'Sub' $P290 = "69_1283368207.8572"
+ .const 'Sub' $P290 = "69_1283975947.19641"
capture_lex $P290
- .const 'Sub' $P281 = "67_1283368207.8572"
+ .const 'Sub' $P281 = "67_1283975947.19641"
capture_lex $P281
- .const 'Sub' $P263 = "64_1283368207.8572"
+ .const 'Sub' $P263 = "64_1283975947.19641"
capture_lex $P263
- .const 'Sub' $P245 = "62_1283368207.8572"
+ .const 'Sub' $P245 = "62_1283975947.19641"
capture_lex $P245
- .const 'Sub' $P236 = "58_1283368207.8572"
+ .const 'Sub' $P236 = "58_1283975947.19641"
capture_lex $P236
- .const 'Sub' $P231 = "56_1283368207.8572"
+ .const 'Sub' $P231 = "56_1283975947.19641"
capture_lex $P231
- .const 'Sub' $P222 = "52_1283368207.8572"
+ .const 'Sub' $P222 = "52_1283975947.19641"
capture_lex $P222
- .const 'Sub' $P217 = "50_1283368207.8572"
+ .const 'Sub' $P217 = "50_1283975947.19641"
capture_lex $P217
- .const 'Sub' $P212 = "48_1283368207.8572"
+ .const 'Sub' $P212 = "48_1283975947.19641"
capture_lex $P212
- .const 'Sub' $P203 = "46_1283368207.8572"
+ .const 'Sub' $P203 = "46_1283975947.19641"
capture_lex $P203
- .const 'Sub' $P196 = "44_1283368207.8572"
+ .const 'Sub' $P196 = "44_1283975947.19641"
capture_lex $P196
- .const 'Sub' $P190 = "42_1283368207.8572"
+ .const 'Sub' $P190 = "42_1283975947.19641"
capture_lex $P190
- .const 'Sub' $P182 = "40_1283368207.8572"
+ .const 'Sub' $P182 = "40_1283975947.19641"
capture_lex $P182
- .const 'Sub' $P176 = "38_1283368207.8572"
+ .const 'Sub' $P176 = "38_1283975947.19641"
capture_lex $P176
- .const 'Sub' $P170 = "36_1283368207.8572"
+ .const 'Sub' $P170 = "36_1283975947.19641"
capture_lex $P170
- .const 'Sub' $P155 = "33_1283368207.8572"
+ .const 'Sub' $P155 = "33_1283975947.19641"
capture_lex $P155
- .const 'Sub' $P141 = "31_1283368207.8572"
+ .const 'Sub' $P141 = "31_1283975947.19641"
capture_lex $P141
- .const 'Sub' $P134 = "29_1283368207.8572"
+ .const 'Sub' $P134 = "29_1283975947.19641"
capture_lex $P134
- .const 'Sub' $P95 = "26_1283368207.8572"
+ .const 'Sub' $P95 = "26_1283975947.19641"
capture_lex $P95
- .const 'Sub' $P80 = "23_1283368207.8572"
+ .const 'Sub' $P80 = "23_1283975947.19641"
capture_lex $P80
- .const 'Sub' $P69 = "21_1283368207.8572"
+ .const 'Sub' $P69 = "21_1283975947.19641"
capture_lex $P69
- .const 'Sub' $P57 = "19_1283368207.8572"
+ .const 'Sub' $P57 = "19_1283975947.19641"
capture_lex $P57
- .const 'Sub' $P49 = "17_1283368207.8572"
+ .const 'Sub' $P49 = "17_1283975947.19641"
capture_lex $P49
- .const 'Sub' $P42 = "15_1283368207.8572"
+ .const 'Sub' $P42 = "15_1283975947.19641"
capture_lex $P42
- .const 'Sub' $P35 = "13_1283368207.8572"
+ .const 'Sub' $P35 = "13_1283975947.19641"
capture_lex $P35
- .const 'Sub' $P15 = "12_1283368207.8572"
+ .const 'Sub' $P15 = "12_1283975947.19641"
capture_lex $P15
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
@@ -371,69 +368,51 @@
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 567
get_hll_global $P1340, ["NQP";"Regex"], "_block1339"
capture_lex $P1340
$P1402 = $P1340()
-.annotate 'line', 4
.return ($P1402)
- .const 'Sub' $P1404 = "370_1283368207.8572"
+ .const 'Sub' $P1404 = "370_1283975947.19641"
.return ($P1404)
.end
.namespace ["NQP";"Grammar"]
-.sub "" :load :init :subid("post373") :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "" :load :init :subid("post373") :outer("11_1283975947.19641")
+.annotate 'line', 0
get_hll_global $P14, ["NQP";"Grammar"], "_block13"
.local pmc block
set block, $P14
-.annotate 'line', 448
get_hll_global $P1407, ["NQP"], "Grammar"
$P1407."O"(":prec<y=>, :assoc<unary>", "%methodop")
-.annotate 'line', 449
get_hll_global $P1408, ["NQP"], "Grammar"
$P1408."O"(":prec<x=>, :assoc<unary>", "%autoincrement")
-.annotate 'line', 450
get_hll_global $P1409, ["NQP"], "Grammar"
$P1409."O"(":prec<w=>, :assoc<left>", "%exponentiation")
-.annotate 'line', 451
get_hll_global $P1410, ["NQP"], "Grammar"
$P1410."O"(":prec<v=>, :assoc<unary>", "%symbolic_unary")
-.annotate 'line', 452
get_hll_global $P1411, ["NQP"], "Grammar"
$P1411."O"(":prec<u=>, :assoc<left>", "%multiplicative")
-.annotate 'line', 453
get_hll_global $P1412, ["NQP"], "Grammar"
$P1412."O"(":prec<t=>, :assoc<left>", "%additive")
-.annotate 'line', 454
get_hll_global $P1413, ["NQP"], "Grammar"
$P1413."O"(":prec<r=>, :assoc<left>", "%concatenation")
-.annotate 'line', 455
get_hll_global $P1414, ["NQP"], "Grammar"
$P1414."O"(":prec<m=>, :assoc<left>", "%relational")
-.annotate 'line', 456
get_hll_global $P1415, ["NQP"], "Grammar"
$P1415."O"(":prec<l=>, :assoc<left>", "%tight_and")
-.annotate 'line', 457
get_hll_global $P1416, ["NQP"], "Grammar"
$P1416."O"(":prec<k=>, :assoc<left>", "%tight_or")
-.annotate 'line', 458
get_hll_global $P1417, ["NQP"], "Grammar"
$P1417."O"(":prec<j=>, :assoc<right>", "%conditional")
-.annotate 'line', 459
get_hll_global $P1418, ["NQP"], "Grammar"
$P1418."O"(":prec<i=>, :assoc<right>", "%assignment")
-.annotate 'line', 460
get_hll_global $P1419, ["NQP"], "Grammar"
$P1419."O"(":prec<g=>, :assoc<list>, :nextterm<nulltermish>", "%comma")
-.annotate 'line', 461
get_hll_global $P1420, ["NQP"], "Grammar"
$P1420."O"(":prec<f=>, :assoc<list>", "%list_infix")
-.annotate 'line', 462
get_hll_global $P1421, ["NQP"], "Grammar"
$P1421."O"(":prec<e=>, :assoc<unary>", "%list_prefix")
-.annotate 'line', 447
$P1422 = get_root_global ["parrot"], "P6metaclass"
$P1422."new_class"("NQP::Regex", "Regex::P6Regex::Grammar" :named("parent"))
.end
@@ -441,23 +420,19 @@
.namespace ["NQP";"Grammar"]
.include "except_types.pasm"
-.sub "TOP" :subid("12_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "TOP" :subid("12_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
new $P17, 'ExceptionHandler'
set_addr $P17, control_16
$P17."handle_types"(.CONTROL_RETURN)
push_eh $P17
.lex "self", self
-.annotate 'line', 5
$P18 = root_new ['parrot';'Hash']
.lex "%*LANG", $P18
-.annotate 'line', 10
new $P19, "Undef"
.lex "$*SCOPE", $P19
-.annotate 'line', 11
new $P20, "Undef"
.lex "$*MULTINESS", $P20
-.annotate 'line', 4
find_lex $P21, "%*LANG"
unless_null $P21, vivify_374
get_hll_global $P21, "%LANG"
@@ -465,7 +440,6 @@
die "Contextual %*LANG not found"
vivify_375:
vivify_374:
-.annotate 'line', 6
get_hll_global $P22, ["NQP"], "Regex"
find_lex $P23, "%*LANG"
unless_null $P23, vivify_376
@@ -476,7 +450,6 @@
store_lex "%*LANG", $P23
vivify_376:
set $P23["Regex"], $P22
-.annotate 'line', 7
get_hll_global $P24, ["NQP"], "RegexActions"
find_lex $P25, "%*LANG"
unless_null $P25, vivify_378
@@ -487,7 +460,6 @@
store_lex "%*LANG", $P25
vivify_378:
set $P25["Regex-actions"], $P24
-.annotate 'line', 8
get_hll_global $P26, ["NQP"], "Grammar"
find_lex $P27, "%*LANG"
unless_null $P27, vivify_380
@@ -498,7 +470,6 @@
store_lex "%*LANG", $P27
vivify_380:
set $P27["MAIN"], $P26
-.annotate 'line', 9
get_hll_global $P28, ["NQP"], "Actions"
find_lex $P29, "%*LANG"
unless_null $P29, vivify_382
@@ -509,18 +480,14 @@
store_lex "%*LANG", $P29
vivify_382:
set $P29["MAIN-actions"], $P28
-.annotate 'line', 10
new $P30, "String"
assign $P30, ""
store_lex "$*SCOPE", $P30
-.annotate 'line', 11
new $P31, "String"
assign $P31, ""
store_lex "$*MULTINESS", $P31
-.annotate 'line', 12
find_lex $P32, "self"
$P33 = $P32."comp_unit"()
-.annotate 'line', 4
.return ($P33)
control_16:
.local pmc exception
@@ -531,8 +498,8 @@
.namespace ["NQP";"Grammar"]
-.sub "identifier" :subid("13_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "identifier" :subid("13_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx36_tgt
.local int rx36_pos
.local int rx36_off
@@ -568,7 +535,6 @@
set_addr $I10, rxscan40_loop
rx36_cur."!mark_push"(0, rx36_pos, $I10)
rxscan40_done:
-.annotate 'line', 17
# rx subrule "ident" subtype=method negate=
rx36_cur."!cursor_pos"(rx36_pos)
$P10 = rx36_cur."ident"()
@@ -603,7 +569,6 @@
debug_385:
.return (rx36_cur)
rx36_restart:
-.annotate 'line', 4
if_null rx36_debug, debug_386
rx36_cur."!cursor_debug"("NEXT", "identifier")
debug_386:
@@ -623,8 +588,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__identifier" :subid("14_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__identifier" :subid("14_1283975947.19641") :method
+.annotate 'line', 0
$P38 = self."!PREFIX__!subrule"("ident", "")
new $P39, "ResizablePMCArray"
push $P39, $P38
@@ -633,8 +598,8 @@
.namespace ["NQP";"Grammar"]
-.sub "name" :subid("15_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "name" :subid("15_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx43_tgt
.local int rx43_pos
.local int rx43_off
@@ -671,7 +636,6 @@
set_addr $I10, rxscan46_loop
rx43_cur."!mark_push"(0, rx43_pos, $I10)
rxscan46_done:
-.annotate 'line', 19
# rx rxquantr47 ** 1..*
set_addr $I10, rxquantr47_done
rx43_cur."!mark_push"(0, -1, $I10)
@@ -709,7 +673,6 @@
debug_389:
.return (rx43_cur)
rx43_restart:
-.annotate 'line', 4
if_null rx43_debug, debug_390
rx43_cur."!cursor_debug"("NEXT", "name")
debug_390:
@@ -729,8 +692,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__name" :subid("16_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__name" :subid("16_1283975947.19641") :method
+.annotate 'line', 0
new $P45, "ResizablePMCArray"
push $P45, ""
.return ($P45)
@@ -738,8 +701,8 @@
.namespace ["NQP";"Grammar"]
-.sub "deflongname" :subid("17_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "deflongname" :subid("17_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx50_tgt
.local int rx50_pos
.local int rx50_off
@@ -776,7 +739,6 @@
set_addr $I10, rxscan54_loop
rx50_cur."!mark_push"(0, rx50_pos, $I10)
rxscan54_done:
-.annotate 'line', 22
# rx subrule "identifier" subtype=capture negate=
rx50_cur."!cursor_pos"(rx50_pos)
$P10 = rx50_cur."identifier"()
@@ -804,7 +766,6 @@
set_addr $I10, rxquantr55_done
(rx50_rep) = rx50_cur."!mark_commit"($I10)
rxquantr55_done:
-.annotate 'line', 21
# rx pass
rx50_cur."!cursor_pass"(rx50_pos, "deflongname")
if_null rx50_debug, debug_393
@@ -812,7 +773,6 @@
debug_393:
.return (rx50_cur)
rx50_restart:
-.annotate 'line', 4
if_null rx50_debug, debug_394
rx50_cur."!cursor_debug"("NEXT", "deflongname")
debug_394:
@@ -832,8 +792,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__deflongname" :subid("18_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__deflongname" :subid("18_1283975947.19641") :method
+.annotate 'line', 0
$P52 = self."!PREFIX__!subrule"("identifier", "")
new $P53, "ResizablePMCArray"
push $P53, $P52
@@ -842,8 +802,8 @@
.namespace ["NQP";"Grammar"]
-.sub "ENDSTMT" :subid("19_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "ENDSTMT" :subid("19_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx58_tgt
.local int rx58_pos
.local int rx58_off
@@ -879,16 +839,13 @@
set_addr $I10, rxscan61_loop
rx58_cur."!mark_push"(0, rx58_pos, $I10)
rxscan61_done:
-.annotate 'line', 29
# rx rxquantr62 ** 0..1
set_addr $I10, rxquantr62_done
rx58_cur."!mark_push"(0, rx58_pos, $I10)
rxquantr62_loop:
alt63_0:
-.annotate 'line', 26
set_addr $I10, alt63_1
rx58_cur."!mark_push"(0, rx58_pos, $I10)
-.annotate 'line', 27
# rx enumcharlist_q negate=0 r 0..-1
sub $I10, rx58_pos, rx58_off
set rx58_rep, 0
@@ -925,7 +882,6 @@
unless $P10, rx58_fail
goto alt63_end
alt63_1:
-.annotate 'line', 28
# rx rxquantr66 ** 0..1
set_addr $I10, rxquantr66_done
rx58_cur."!mark_push"(0, rx58_pos, $I10)
@@ -965,11 +921,9 @@
$P10 = rx58_cur."MARKER"("endstmt")
unless $P10, rx58_fail
alt63_end:
-.annotate 'line', 29
set_addr $I10, rxquantr62_done
(rx58_rep) = rx58_cur."!mark_commit"($I10)
rxquantr62_done:
-.annotate 'line', 25
# rx pass
rx58_cur."!cursor_pass"(rx58_pos, "ENDSTMT")
if_null rx58_debug, debug_397
@@ -977,7 +931,6 @@
debug_397:
.return (rx58_cur)
rx58_restart:
-.annotate 'line', 4
if_null rx58_debug, debug_398
rx58_cur."!cursor_debug"("NEXT", "ENDSTMT")
debug_398:
@@ -997,8 +950,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__ENDSTMT" :subid("20_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__ENDSTMT" :subid("20_1283975947.19641") :method
+.annotate 'line', 0
new $P60, "ResizablePMCArray"
push $P60, ""
.return ($P60)
@@ -1006,8 +959,8 @@
.namespace ["NQP";"Grammar"]
-.sub "ws" :subid("21_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "ws" :subid("21_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx70_tgt
.local int rx70_pos
.local int rx70_off
@@ -1044,28 +997,23 @@
rx70_cur."!mark_push"(0, rx70_pos, $I10)
rxscan73_done:
alt74_0:
-.annotate 'line', 32
set_addr $I10, alt74_1
rx70_cur."!mark_push"(0, rx70_pos, $I10)
-.annotate 'line', 33
# rx subrule "MARKED" subtype=zerowidth negate=
rx70_cur."!cursor_pos"(rx70_pos)
$P10 = rx70_cur."MARKED"("ws")
unless $P10, rx70_fail
goto alt74_end
alt74_1:
-.annotate 'line', 34
# rx subrule "ww" subtype=zerowidth negate=1
rx70_cur."!cursor_pos"(rx70_pos)
$P10 = rx70_cur."ww"()
if $P10, rx70_fail
-.annotate 'line', 39
# rx rxquantr75 ** 0..*
set_addr $I10, rxquantr75_done
rx70_cur."!mark_push"(0, rx70_pos, $I10)
rxquantr75_loop:
alt76_0:
-.annotate 'line', 35
set_addr $I10, alt76_1
rx70_cur."!mark_push"(0, rx70_pos, $I10)
# rx enumcharlist_q negate=0 r 1..-1
@@ -1088,7 +1036,6 @@
alt76_1:
set_addr $I10, alt76_2
rx70_cur."!mark_push"(0, rx70_pos, $I10)
-.annotate 'line', 36
# rx literal "#"
add $I11, rx70_pos, 1
gt $I11, rx70_eos, rx70_fail
@@ -1104,7 +1051,6 @@
alt76_2:
set_addr $I10, alt76_3
rx70_cur."!mark_push"(0, rx70_pos, $I10)
-.annotate 'line', 37
# rxanchor bol
eq rx70_pos, 0, rxanchor78_done
ge rx70_pos, rx70_eos, rx70_fail
@@ -1120,7 +1066,6 @@
rx70_pos = $P10."pos"()
goto alt76_end
alt76_3:
-.annotate 'line', 38
# rx enumcharlist_q negate=0 r 1..-1
sub $I10, rx70_pos, rx70_off
set rx70_rep, 0
@@ -1138,20 +1083,17 @@
lt rx70_rep, 1, rx70_fail
add rx70_pos, rx70_pos, rx70_rep
alt76_end:
-.annotate 'line', 39
set_addr $I10, rxquantr75_done
(rx70_rep) = rx70_cur."!mark_commit"($I10)
set_addr $I10, rxquantr75_done
rx70_cur."!mark_push"(rx70_rep, rx70_pos, $I10)
goto rxquantr75_loop
rxquantr75_done:
-.annotate 'line', 40
# rx subrule "MARKER" subtype=zerowidth negate=
rx70_cur."!cursor_pos"(rx70_pos)
$P10 = rx70_cur."MARKER"("ws")
unless $P10, rx70_fail
alt74_end:
-.annotate 'line', 32
# rx pass
rx70_cur."!cursor_pass"(rx70_pos, "ws")
if_null rx70_debug, debug_401
@@ -1159,7 +1101,6 @@
debug_401:
.return (rx70_cur)
rx70_restart:
-.annotate 'line', 4
if_null rx70_debug, debug_402
rx70_cur."!cursor_debug"("NEXT", "ws")
debug_402:
@@ -1179,8 +1120,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__ws" :subid("22_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__ws" :subid("22_1283975947.19641") :method
+.annotate 'line', 0
new $P72, "ResizablePMCArray"
push $P72, ""
push $P72, ""
@@ -1189,9 +1130,9 @@
.namespace ["NQP";"Grammar"]
-.sub "unv" :subid("23_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P88 = "25_1283368207.8572"
+.sub "unv" :subid("23_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P88 = "25_1283975947.19641"
capture_lex $P88
.local string rx81_tgt
.local int rx81_pos
@@ -1229,10 +1170,8 @@
rx81_cur."!mark_push"(0, rx81_pos, $I10)
rxscan84_done:
alt85_0:
-.annotate 'line', 45
set_addr $I10, alt85_1
rx81_cur."!mark_push"(0, rx81_pos, $I10)
-.annotate 'line', 46
# rxanchor bol
eq rx81_pos, 0, rxanchor86_done
ge rx81_pos, rx81_eos, rx81_fail
@@ -1243,7 +1182,7 @@
rxanchor86_done:
# rx subrule "before" subtype=zerowidth negate=
rx81_cur."!cursor_pos"(rx81_pos)
- .const 'Sub' $P88 = "25_1283368207.8572"
+ .const 'Sub' $P88 = "25_1283975947.19641"
capture_lex $P88
$P10 = rx81_cur."before"($P88)
unless $P10, rx81_fail
@@ -1256,7 +1195,6 @@
alt85_1:
set_addr $I10, alt85_2
rx81_cur."!mark_push"(0, rx81_pos, $I10)
-.annotate 'line', 47
# rx enumcharlist_q negate=0 r 0..-1
sub $I10, rx81_pos, rx81_off
set rx81_rep, 0
@@ -1285,7 +1223,6 @@
add rx81_pos, rx81_off, $I11
goto alt85_end
alt85_2:
-.annotate 'line', 48
# rx enumcharlist_q negate=0 r 1..-1
sub $I10, rx81_pos, rx81_off
set rx81_rep, 0
@@ -1303,7 +1240,6 @@
lt rx81_rep, 1, rx81_fail
add rx81_pos, rx81_pos, rx81_rep
alt85_end:
-.annotate 'line', 43
# rx pass
rx81_cur."!cursor_pass"(rx81_pos, "unv")
if_null rx81_debug, debug_409
@@ -1311,7 +1247,6 @@
debug_409:
.return (rx81_cur)
rx81_restart:
-.annotate 'line', 4
if_null rx81_debug, debug_410
rx81_cur."!cursor_debug"("NEXT", "unv")
debug_410:
@@ -1331,8 +1266,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__unv" :subid("24_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__unv" :subid("24_1283975947.19641") :method
+.annotate 'line', 0
new $P83, "ResizablePMCArray"
push $P83, ""
push $P83, ""
@@ -1342,8 +1277,8 @@
.namespace ["NQP";"Grammar"]
-.sub "_block87" :anon :subid("25_1283368207.8572") :method :outer("23_1283368207.8572")
-.annotate 'line', 46
+.sub "_block87" :anon :subid("25_1283975947.19641") :method :outer("23_1283975947.19641")
+.annotate 'line', 0
.local string rx89_tgt
.local int rx89_pos
.local int rx89_off
@@ -1446,9 +1381,9 @@
.namespace ["NQP";"Grammar"]
-.sub "pod_comment" :subid("26_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P127 = "28_1283368207.8572"
+.sub "pod_comment" :subid("26_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P127 = "28_1283975947.19641"
capture_lex $P127
.local string rx96_tgt
.local int rx96_pos
@@ -1485,7 +1420,6 @@
set_addr $I10, rxscan99_loop
rx96_cur."!mark_push"(0, rx96_pos, $I10)
rxscan99_done:
-.annotate 'line', 53
# rxanchor bol
eq rx96_pos, 0, rxanchor100_done
ge rx96_pos, rx96_eos, rx96_fail
@@ -1517,10 +1451,8 @@
ne $I11, 61, rx96_fail
add rx96_pos, 1
alt102_0:
-.annotate 'line', 54
set_addr $I10, alt102_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 55
# rx literal "begin"
add $I11, rx96_pos, 5
gt $I11, rx96_eos, rx96_fail
@@ -1560,7 +1492,6 @@
is_cclass $I11, 8192, rx96_tgt, $I10
unless $I11, rx96_fail
alt104_0:
-.annotate 'line', 56
set_addr $I10, alt104_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
# rx rxquantf105 ** 0..*
@@ -1647,12 +1578,10 @@
find_not_cclass $I11, 65535, rx96_tgt, $I10, rx96_eos
add rx96_pos, rx96_off, $I11
alt104_end:
-.annotate 'line', 55
goto alt102_end
alt102_1:
set_addr $I10, alt102_2
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 57
# rx literal "begin"
add $I11, rx96_pos, 5
gt $I11, rx96_eos, rx96_fail
@@ -1684,10 +1613,8 @@
$P10."!cursor_names"("identifier")
rx96_pos = $P10."pos"()
alt110_0:
-.annotate 'line', 58
set_addr $I10, alt110_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 59
# rx rxquantf111 ** 0..*
set_addr $I10, rxquantf111_loop
rx96_cur."!mark_push"(0, rx96_pos, $I10)
@@ -1765,19 +1692,16 @@
add rx96_pos, rx96_off, $I11
goto alt110_end
alt110_1:
-.annotate 'line', 60
# rx subrule "panic" subtype=method negate=
rx96_cur."!cursor_pos"(rx96_pos)
$P10 = rx96_cur."panic"("=begin without matching =end")
unless $P10, rx96_fail
rx96_pos = $P10."pos"()
alt110_end:
-.annotate 'line', 57
goto alt102_end
alt102_2:
set_addr $I10, alt102_3
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 62
# rx literal "begin"
add $I11, rx96_pos, 5
gt $I11, rx96_eos, rx96_fail
@@ -1809,7 +1733,6 @@
rxenumcharlistq116_done:
add rx96_pos, rx96_pos, rx96_rep
alt117_0:
-.annotate 'line', 63
set_addr $I10, alt117_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
# rxanchor eol
@@ -1842,10 +1765,8 @@
rx96_pos = $P10."pos"()
alt117_end:
alt119_0:
-.annotate 'line', 64
set_addr $I10, alt119_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 65
# rx rxquantf120 ** 0..*
set_addr $I10, rxquantf120_loop
rx96_cur."!mark_push"(0, rx96_pos, $I10)
@@ -1902,19 +1823,16 @@
add rx96_pos, rx96_off, $I11
goto alt119_end
alt119_1:
-.annotate 'line', 66
# rx subrule "panic" subtype=method negate=
rx96_cur."!cursor_pos"(rx96_pos)
$P10 = rx96_cur."panic"("=begin without matching =end")
unless $P10, rx96_fail
rx96_pos = $P10."pos"()
alt119_end:
-.annotate 'line', 62
goto alt102_end
alt102_3:
set_addr $I10, alt102_4
rx96_cur."!mark_push"(0, rx96_pos, $I10)
-.annotate 'line', 68
# rx subrule "identifier" subtype=capture negate=
rx96_cur."!cursor_pos"(rx96_pos)
$P10 = rx96_cur."identifier"()
@@ -1922,7 +1840,6 @@
rx96_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("identifier")
rx96_pos = $P10."pos"()
-.annotate 'line', 69
# rx rxquantf123 ** 0..*
set_addr $I10, rxquantf123_loop
rx96_cur."!mark_push"(0, rx96_pos, $I10)
@@ -1944,15 +1861,13 @@
rxanchor125_done:
# rx subrule "before" subtype=zerowidth negate=
rx96_cur."!cursor_pos"(rx96_pos)
- .const 'Sub' $P127 = "28_1283368207.8572"
+ .const 'Sub' $P127 = "28_1283975947.19641"
capture_lex $P127
$P10 = rx96_cur."before"($P127)
unless $P10, rx96_fail
-.annotate 'line', 68
goto alt102_end
alt102_4:
alt133_0:
-.annotate 'line', 75
set_addr $I10, alt133_1
rx96_cur."!mark_push"(0, rx96_pos, $I10)
# rx charclass s
@@ -1969,13 +1884,11 @@
unless $P10, rx96_fail
rx96_pos = $P10."pos"()
alt133_end:
-.annotate 'line', 76
# rx charclass_q N r 0..-1
sub $I10, rx96_pos, rx96_off
find_cclass $I11, 4096, rx96_tgt, $I10, rx96_eos
add rx96_pos, rx96_off, $I11
alt102_end:
-.annotate 'line', 52
# rx pass
rx96_cur."!cursor_pass"(rx96_pos, "pod_comment")
if_null rx96_debug, debug_417
@@ -1983,7 +1896,6 @@
debug_417:
.return (rx96_cur)
rx96_restart:
-.annotate 'line', 4
if_null rx96_debug, debug_418
rx96_cur."!cursor_debug"("NEXT", "pod_comment")
debug_418:
@@ -2003,8 +1915,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__pod_comment" :subid("27_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__pod_comment" :subid("27_1283975947.19641") :method
+.annotate 'line', 0
new $P98, "ResizablePMCArray"
push $P98, ""
.return ($P98)
@@ -2012,8 +1924,8 @@
.namespace ["NQP";"Grammar"]
-.sub "_block126" :anon :subid("28_1283368207.8572") :method :outer("26_1283368207.8572")
-.annotate 'line', 69
+.sub "_block126" :anon :subid("28_1283975947.19641") :method :outer("26_1283975947.19641")
+.annotate 'line', 0
.local string rx128_tgt
.local int rx128_pos
.local int rx128_off
@@ -2067,7 +1979,6 @@
alt131_0:
set_addr $I10, alt131_1
rx128_cur."!mark_push"(0, rx128_pos, $I10)
-.annotate 'line', 70
# rx literal "="
add $I11, rx128_pos, 1
gt $I11, rx128_eos, rx128_fail
@@ -2075,12 +1986,10 @@
ord $I11, rx128_tgt, $I11
ne $I11, 61, rx128_fail
add rx128_pos, 1
-.annotate 'line', 72
# rx rxquantr132 ** 0..1
set_addr $I10, rxquantr132_done
rx128_cur."!mark_push"(0, rx128_pos, $I10)
rxquantr132_loop:
-.annotate 'line', 71
# rx literal "cut"
add $I11, rx128_pos, 3
gt $I11, rx128_eos, rx128_fail
@@ -2096,7 +2005,6 @@
dec $I10
is_cclass $I11, 8192, rx128_tgt, $I10
unless $I11, rx128_fail
-.annotate 'line', 72
# rx subrule "panic" subtype=method negate=
rx128_cur."!cursor_pos"(rx128_pos)
$P10 = rx128_cur."panic"("Obsolete pod format, please use =begin/=end instead")
@@ -2105,10 +2013,8 @@
set_addr $I10, rxquantr132_done
(rx128_rep) = rx128_cur."!mark_commit"($I10)
rxquantr132_done:
-.annotate 'line', 69
goto alt131_end
alt131_1:
-.annotate 'line', 73
# rx charclass nl
ge rx128_pos, rx128_eos, rx128_fail
sub $I10, rx128_pos, rx128_off
@@ -2119,7 +2025,6 @@
add rx128_pos, $I11
inc rx128_pos
alt131_end:
-.annotate 'line', 69
# rx pass
rx128_cur."!cursor_pass"(rx128_pos, "")
if_null rx128_debug, debug_414
@@ -2146,8 +2051,8 @@
.namespace ["NQP";"Grammar"]
-.sub "comp_unit" :subid("29_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "comp_unit" :subid("29_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx135_tgt
.local int rx135_pos
.local int rx135_off
@@ -2183,19 +2088,16 @@
set_addr $I10, rxscan139_loop
rx135_cur."!mark_push"(0, rx135_pos, $I10)
rxscan139_done:
-.annotate 'line', 84
# rx subrule "newpad" subtype=method negate=
rx135_cur."!cursor_pos"(rx135_pos)
$P10 = rx135_cur."newpad"()
unless $P10, rx135_fail
rx135_pos = $P10."pos"()
-.annotate 'line', 85
# rx subrule "outerctx" subtype=method negate=
rx135_cur."!cursor_pos"(rx135_pos)
$P10 = rx135_cur."outerctx"()
unless $P10, rx135_fail
rx135_pos = $P10."pos"()
-.annotate 'line', 86
# rx subrule "statementlist" subtype=capture negate=
rx135_cur."!cursor_pos"(rx135_pos)
$P10 = rx135_cur."statementlist"()
@@ -2204,7 +2106,6 @@
$P10."!cursor_names"("statementlist")
rx135_pos = $P10."pos"()
alt140_0:
-.annotate 'line', 87
set_addr $I10, alt140_1
rx135_cur."!mark_push"(0, rx135_pos, $I10)
# rxanchor eos
@@ -2217,7 +2118,6 @@
unless $P10, rx135_fail
rx135_pos = $P10."pos"()
alt140_end:
-.annotate 'line', 83
# rx pass
rx135_cur."!cursor_pass"(rx135_pos, "comp_unit")
if_null rx135_debug, debug_421
@@ -2225,7 +2125,6 @@
debug_421:
.return (rx135_cur)
rx135_restart:
-.annotate 'line', 4
if_null rx135_debug, debug_422
rx135_cur."!cursor_debug"("NEXT", "comp_unit")
debug_422:
@@ -2245,8 +2144,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__comp_unit" :subid("30_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__comp_unit" :subid("30_1283975947.19641") :method
+.annotate 'line', 0
$P137 = self."!PREFIX__!subrule"("newpad", "")
new $P138, "ResizablePMCArray"
push $P138, $P137
@@ -2255,8 +2154,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statementlist" :subid("31_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statementlist" :subid("31_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx142_tgt
.local int rx142_pos
.local int rx142_off
@@ -2294,10 +2193,8 @@
rx142_cur."!mark_push"(0, rx142_pos, $I10)
rxscan147_done:
alt148_0:
-.annotate 'line', 90
set_addr $I10, alt148_1
rx142_cur."!mark_push"(0, rx142_pos, $I10)
-.annotate 'line', 91
# rx subrule "ws" subtype=method negate=
rx142_cur."!cursor_pos"(rx142_pos)
$P10 = rx142_cur."ws"()
@@ -2312,7 +2209,6 @@
rx142_pos = $P10."pos"()
goto alt148_end
alt148_1:
-.annotate 'line', 92
# rx subrule "ws" subtype=method negate=
rx142_cur."!cursor_pos"(rx142_pos)
$P10 = rx142_cur."ws"()
@@ -2351,7 +2247,6 @@
unless $P10, rx142_fail
rx142_pos = $P10."pos"()
alt148_end:
-.annotate 'line', 90
# rx pass
rx142_cur."!cursor_pass"(rx142_pos, "statementlist")
if_null rx142_debug, debug_425
@@ -2359,7 +2254,6 @@
debug_425:
.return (rx142_cur)
rx142_restart:
-.annotate 'line', 4
if_null rx142_debug, debug_426
rx142_cur."!cursor_debug"("NEXT", "statementlist")
debug_426:
@@ -2379,8 +2273,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statementlist" :subid("32_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statementlist" :subid("32_1283975947.19641") :method
+.annotate 'line', 0
$P144 = self."!PREFIX__!subrule"("ws", "")
$P145 = self."!PREFIX__!subrule"("ws", "")
new $P146, "ResizablePMCArray"
@@ -2391,9 +2285,9 @@
.namespace ["NQP";"Grammar"]
-.sub "statement" :subid("33_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P161 = "35_1283368207.8572"
+.sub "statement" :subid("33_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P161 = "35_1283975947.19641"
capture_lex $P161
.local string rx156_tgt
.local int rx156_pos
@@ -2403,7 +2297,7 @@
.local pmc rx156_cur
.local pmc rx156_debug
(rx156_cur, rx156_pos, rx156_tgt, $I10) = self."!cursor_start"()
- rx156_cur."!cursor_caparray"("statement_mod_loop", "statement_mod_cond")
+ rx156_cur."!cursor_caparray"("statement_mod_cond", "statement_mod_loop")
getattribute rx156_debug, rx156_cur, "$!debug"
.lex unicode:"$\x{a2}", rx156_cur
.local pmc match
@@ -2431,18 +2325,15 @@
set_addr $I10, rxscan159_loop
rx156_cur."!mark_push"(0, rx156_pos, $I10)
rxscan159_done:
-.annotate 'line', 96
# rx subrule "before" subtype=zerowidth negate=1
rx156_cur."!cursor_pos"(rx156_pos)
- .const 'Sub' $P161 = "35_1283368207.8572"
+ .const 'Sub' $P161 = "35_1283975947.19641"
capture_lex $P161
$P10 = rx156_cur."before"($P161)
if $P10, rx156_fail
alt165_0:
-.annotate 'line', 97
set_addr $I10, alt165_1
rx156_cur."!mark_push"(0, rx156_pos, $I10)
-.annotate 'line', 98
# rx subrule "statement_control" subtype=capture negate=
rx156_cur."!cursor_pos"(rx156_pos)
$P10 = rx156_cur."statement_control"()
@@ -2452,7 +2343,6 @@
rx156_pos = $P10."pos"()
goto alt165_end
alt165_1:
-.annotate 'line', 99
# rx subrule "EXPR" subtype=capture negate=
rx156_cur."!cursor_pos"(rx156_pos)
$P10 = rx156_cur."EXPR"()
@@ -2465,16 +2355,13 @@
$P10 = rx156_cur."ws"()
unless $P10, rx156_fail
rx156_pos = $P10."pos"()
-.annotate 'line', 104
# rx rxquantr166 ** 0..1
set_addr $I10, rxquantr166_done
rx156_cur."!mark_push"(0, rx156_pos, $I10)
rxquantr166_loop:
alt167_0:
-.annotate 'line', 100
set_addr $I10, alt167_1
rx156_cur."!mark_push"(0, rx156_pos, $I10)
-.annotate 'line', 101
# rx subrule "MARKED" subtype=zerowidth negate=
rx156_cur."!cursor_pos"(rx156_pos)
$P10 = rx156_cur."MARKED"("endstmt")
@@ -2483,7 +2370,6 @@
alt167_1:
set_addr $I10, alt167_2
rx156_cur."!mark_push"(0, rx156_pos, $I10)
-.annotate 'line', 102
# rx subrule "statement_mod_cond" subtype=capture negate=
rx156_cur."!cursor_pos"(rx156_pos)
$P10 = rx156_cur."statement_mod_cond"()
@@ -2513,7 +2399,6 @@
rxquantr168_done:
goto alt167_end
alt167_2:
-.annotate 'line', 103
# rx subrule "statement_mod_loop" subtype=capture negate=
rx156_cur."!cursor_pos"(rx156_pos)
$P10 = rx156_cur."statement_mod_loop"()
@@ -2522,12 +2407,10 @@
$P10."!cursor_names"("statement_mod_loop")
rx156_pos = $P10."pos"()
alt167_end:
-.annotate 'line', 104
set_addr $I10, rxquantr166_done
(rx156_rep) = rx156_cur."!mark_commit"($I10)
rxquantr166_done:
alt165_end:
-.annotate 'line', 95
# rx pass
rx156_cur."!cursor_pass"(rx156_pos, "statement")
if_null rx156_debug, debug_433
@@ -2535,7 +2418,6 @@
debug_433:
.return (rx156_cur)
rx156_restart:
-.annotate 'line', 4
if_null rx156_debug, debug_434
rx156_cur."!cursor_debug"("NEXT", "statement")
debug_434:
@@ -2555,8 +2437,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement" :subid("34_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement" :subid("34_1283975947.19641") :method
+.annotate 'line', 0
new $P158, "ResizablePMCArray"
push $P158, ""
.return ($P158)
@@ -2564,8 +2446,8 @@
.namespace ["NQP";"Grammar"]
-.sub "_block160" :anon :subid("35_1283368207.8572") :method :outer("33_1283368207.8572")
-.annotate 'line', 96
+.sub "_block160" :anon :subid("35_1283975947.19641") :method :outer("33_1283975947.19641")
+.annotate 'line', 0
.local string rx162_tgt
.local int rx162_pos
.local int rx162_off
@@ -2642,8 +2524,8 @@
.namespace ["NQP";"Grammar"]
-.sub "eat_terminator" :subid("36_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "eat_terminator" :subid("36_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx171_tgt
.local int rx171_pos
.local int rx171_off
@@ -2680,10 +2562,8 @@
rx171_cur."!mark_push"(0, rx171_pos, $I10)
rxscan174_done:
alt175_0:
-.annotate 'line', 108
set_addr $I10, alt175_1
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 109
# rx literal ";"
add $I11, rx171_pos, 1
gt $I11, rx171_eos, rx171_fail
@@ -2695,7 +2575,6 @@
alt175_1:
set_addr $I10, alt175_2
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 110
# rx subrule "MARKED" subtype=zerowidth negate=
rx171_cur."!cursor_pos"(rx171_pos)
$P10 = rx171_cur."MARKED"("endstmt")
@@ -2704,18 +2583,15 @@
alt175_2:
set_addr $I10, alt175_3
rx171_cur."!mark_push"(0, rx171_pos, $I10)
-.annotate 'line', 111
# rx subrule "terminator" subtype=zerowidth negate=
rx171_cur."!cursor_pos"(rx171_pos)
$P10 = rx171_cur."terminator"()
unless $P10, rx171_fail
goto alt175_end
alt175_3:
-.annotate 'line', 112
# rxanchor eos
ne rx171_pos, rx171_eos, rx171_fail
alt175_end:
-.annotate 'line', 108
# rx pass
rx171_cur."!cursor_pass"(rx171_pos, "eat_terminator")
if_null rx171_debug, debug_437
@@ -2723,7 +2599,6 @@
debug_437:
.return (rx171_cur)
rx171_restart:
-.annotate 'line', 4
if_null rx171_debug, debug_438
rx171_cur."!cursor_debug"("NEXT", "eat_terminator")
debug_438:
@@ -2743,8 +2618,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__eat_terminator" :subid("37_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__eat_terminator" :subid("37_1283975947.19641") :method
+.annotate 'line', 0
new $P173, "ResizablePMCArray"
push $P173, ""
push $P173, ""
@@ -2755,8 +2630,8 @@
.namespace ["NQP";"Grammar"]
-.sub "xblock" :subid("38_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "xblock" :subid("38_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx177_tgt
.local int rx177_pos
.local int rx177_off
@@ -2792,7 +2667,6 @@
set_addr $I10, rxscan181_loop
rx177_cur."!mark_push"(0, rx177_pos, $I10)
rxscan181_done:
-.annotate 'line', 116
# rx subrule "EXPR" subtype=capture negate=
rx177_cur."!cursor_pos"(rx177_pos)
$P10 = rx177_cur."EXPR"()
@@ -2812,7 +2686,6 @@
rx177_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("pblock")
rx177_pos = $P10."pos"()
-.annotate 'line', 115
# rx pass
rx177_cur."!cursor_pass"(rx177_pos, "xblock")
if_null rx177_debug, debug_441
@@ -2820,7 +2693,6 @@
debug_441:
.return (rx177_cur)
rx177_restart:
-.annotate 'line', 4
if_null rx177_debug, debug_442
rx177_cur."!cursor_debug"("NEXT", "xblock")
debug_442:
@@ -2840,8 +2712,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__xblock" :subid("39_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__xblock" :subid("39_1283975947.19641") :method
+.annotate 'line', 0
$P179 = self."!PREFIX__!subrule"("EXPR", "")
new $P180, "ResizablePMCArray"
push $P180, $P179
@@ -2850,8 +2722,8 @@
.namespace ["NQP";"Grammar"]
-.sub "pblock" :subid("40_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "pblock" :subid("40_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx183_tgt
.local int rx183_pos
.local int rx183_off
@@ -2888,22 +2760,18 @@
rx183_cur."!mark_push"(0, rx183_pos, $I10)
rxscan188_done:
alt189_0:
-.annotate 'line', 119
set_addr $I10, alt189_1
rx183_cur."!mark_push"(0, rx183_pos, $I10)
-.annotate 'line', 120
# rx subrule "lambda" subtype=method negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."lambda"()
unless $P10, rx183_fail
rx183_pos = $P10."pos"()
-.annotate 'line', 121
# rx subrule "newpad" subtype=method negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."newpad"()
unless $P10, rx183_fail
rx183_pos = $P10."pos"()
-.annotate 'line', 122
# rx subrule "signature" subtype=capture negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."signature"()
@@ -2911,7 +2779,6 @@
rx183_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("signature")
rx183_pos = $P10."pos"()
-.annotate 'line', 123
# rx subrule "blockoid" subtype=capture negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."blockoid"()
@@ -2919,25 +2786,21 @@
rx183_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("blockoid")
rx183_pos = $P10."pos"()
-.annotate 'line', 120
goto alt189_end
alt189_1:
set_addr $I10, alt189_2
rx183_cur."!mark_push"(0, rx183_pos, $I10)
-.annotate 'line', 124
# rx enumcharlist negate=0 zerowidth
ge rx183_pos, rx183_eos, rx183_fail
sub $I10, rx183_pos, rx183_off
substr $S10, rx183_tgt, $I10, 1
index $I11, "{", $S10
lt $I11, 0, rx183_fail
-.annotate 'line', 125
# rx subrule "newpad" subtype=method negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."newpad"()
unless $P10, rx183_fail
rx183_pos = $P10."pos"()
-.annotate 'line', 126
# rx subrule "blockoid" subtype=capture negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."blockoid"()
@@ -2945,17 +2808,14 @@
rx183_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("blockoid")
rx183_pos = $P10."pos"()
-.annotate 'line', 124
goto alt189_end
alt189_2:
-.annotate 'line', 127
# rx subrule "panic" subtype=method negate=
rx183_cur."!cursor_pos"(rx183_pos)
$P10 = rx183_cur."panic"("Missing block")
unless $P10, rx183_fail
rx183_pos = $P10."pos"()
alt189_end:
-.annotate 'line', 119
# rx pass
rx183_cur."!cursor_pass"(rx183_pos, "pblock")
if_null rx183_debug, debug_445
@@ -2963,7 +2823,6 @@
debug_445:
.return (rx183_cur)
rx183_restart:
-.annotate 'line', 4
if_null rx183_debug, debug_446
rx183_cur."!cursor_debug"("NEXT", "pblock")
debug_446:
@@ -2983,8 +2842,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__pblock" :subid("41_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__pblock" :subid("41_1283975947.19641") :method
+.annotate 'line', 0
$P185 = self."!PREFIX__!subrule"("panic", "")
$P186 = self."!PREFIX__!subrule"("lambda", "")
new $P187, "ResizablePMCArray"
@@ -2996,8 +2855,8 @@
.namespace ["NQP";"Grammar"]
-.sub "lambda" :subid("42_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "lambda" :subid("42_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx191_tgt
.local int rx191_pos
.local int rx191_off
@@ -3034,7 +2893,6 @@
rx191_cur."!mark_push"(0, rx191_pos, $I10)
rxscan194_done:
alt195_0:
-.annotate 'line', 130
set_addr $I10, alt195_1
rx191_cur."!mark_push"(0, rx191_pos, $I10)
# rx literal "->"
@@ -3061,7 +2919,6 @@
debug_449:
.return (rx191_cur)
rx191_restart:
-.annotate 'line', 4
if_null rx191_debug, debug_450
rx191_cur."!cursor_debug"("NEXT", "lambda")
debug_450:
@@ -3081,8 +2938,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__lambda" :subid("43_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__lambda" :subid("43_1283975947.19641") :method
+.annotate 'line', 0
new $P193, "ResizablePMCArray"
push $P193, "<->"
push $P193, "->"
@@ -3091,8 +2948,8 @@
.namespace ["NQP";"Grammar"]
-.sub "block" :subid("44_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "block" :subid("44_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx197_tgt
.local int rx197_pos
.local int rx197_off
@@ -3129,7 +2986,6 @@
rx197_cur."!mark_push"(0, rx197_pos, $I10)
rxscan201_done:
alt202_0:
-.annotate 'line', 133
set_addr $I10, alt202_1
rx197_cur."!mark_push"(0, rx197_pos, $I10)
# rx enumcharlist negate=0 zerowidth
@@ -3146,13 +3002,11 @@
unless $P10, rx197_fail
rx197_pos = $P10."pos"()
alt202_end:
-.annotate 'line', 134
# rx subrule "newpad" subtype=method negate=
rx197_cur."!cursor_pos"(rx197_pos)
$P10 = rx197_cur."newpad"()
unless $P10, rx197_fail
rx197_pos = $P10."pos"()
-.annotate 'line', 135
# rx subrule "blockoid" subtype=capture negate=
rx197_cur."!cursor_pos"(rx197_pos)
$P10 = rx197_cur."blockoid"()
@@ -3160,7 +3014,6 @@
rx197_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("blockoid")
rx197_pos = $P10."pos"()
-.annotate 'line', 132
# rx pass
rx197_cur."!cursor_pass"(rx197_pos, "block")
if_null rx197_debug, debug_453
@@ -3168,7 +3021,6 @@
debug_453:
.return (rx197_cur)
rx197_restart:
-.annotate 'line', 4
if_null rx197_debug, debug_454
rx197_cur."!cursor_debug"("NEXT", "block")
debug_454:
@@ -3188,8 +3040,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__block" :subid("45_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__block" :subid("45_1283975947.19641") :method
+.annotate 'line', 0
$P199 = self."!PREFIX__!subrule"("panic", "")
new $P200, "ResizablePMCArray"
push $P200, $P199
@@ -3199,8 +3051,8 @@
.namespace ["NQP";"Grammar"]
-.sub "blockoid" :subid("46_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "blockoid" :subid("46_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx204_tgt
.local int rx204_pos
.local int rx204_off
@@ -3236,13 +3088,11 @@
set_addr $I10, rxscan208_loop
rx204_cur."!mark_push"(0, rx204_pos, $I10)
rxscan208_done:
-.annotate 'line', 139
# rx subrule "finishpad" subtype=method negate=
rx204_cur."!cursor_pos"(rx204_pos)
$P10 = rx204_cur."finishpad"()
unless $P10, rx204_fail
rx204_pos = $P10."pos"()
-.annotate 'line', 140
# rx literal "{"
add $I11, rx204_pos, 1
gt $I11, rx204_eos, rx204_fail
@@ -3282,12 +3132,10 @@
rx204_cur."!mark_push"(0, rx204_pos, $I10, $P10)
rx204_pos = $P10."pos"()
alt209_end:
-.annotate 'line', 141
# rx subrule "ENDSTMT" subtype=zerowidth negate=
rx204_cur."!cursor_pos"(rx204_pos)
$P10 = rx204_cur."ENDSTMT"()
unless $P10, rx204_fail
-.annotate 'line', 138
# rx pass
rx204_cur."!cursor_pass"(rx204_pos, "blockoid")
if_null rx204_debug, debug_457
@@ -3295,7 +3143,6 @@
debug_457:
.return (rx204_cur)
rx204_restart:
-.annotate 'line', 4
if_null rx204_debug, debug_458
rx204_cur."!cursor_debug"("NEXT", "blockoid")
debug_458:
@@ -3315,8 +3162,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__blockoid" :subid("47_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__blockoid" :subid("47_1283975947.19641") :method
+.annotate 'line', 0
$P206 = self."!PREFIX__!subrule"("finishpad", "")
new $P207, "ResizablePMCArray"
push $P207, $P206
@@ -3325,8 +3172,8 @@
.namespace ["NQP";"Grammar"]
-.sub "newpad" :subid("48_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "newpad" :subid("48_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx213_tgt
.local int rx213_pos
.local int rx213_off
@@ -3362,7 +3209,6 @@
set_addr $I10, rxscan216_loop
rx213_cur."!mark_push"(0, rx213_pos, $I10)
rxscan216_done:
-.annotate 'line', 144
# rx pass
rx213_cur."!cursor_pass"(rx213_pos, "newpad")
if_null rx213_debug, debug_461
@@ -3370,7 +3216,6 @@
debug_461:
.return (rx213_cur)
rx213_restart:
-.annotate 'line', 4
if_null rx213_debug, debug_462
rx213_cur."!cursor_debug"("NEXT", "newpad")
debug_462:
@@ -3390,8 +3235,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__newpad" :subid("49_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__newpad" :subid("49_1283975947.19641") :method
+.annotate 'line', 0
new $P215, "ResizablePMCArray"
push $P215, ""
.return ($P215)
@@ -3399,8 +3244,8 @@
.namespace ["NQP";"Grammar"]
-.sub "outerctx" :subid("50_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "outerctx" :subid("50_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx218_tgt
.local int rx218_pos
.local int rx218_off
@@ -3436,7 +3281,6 @@
set_addr $I10, rxscan221_loop
rx218_cur."!mark_push"(0, rx218_pos, $I10)
rxscan221_done:
-.annotate 'line', 145
# rx pass
rx218_cur."!cursor_pass"(rx218_pos, "outerctx")
if_null rx218_debug, debug_465
@@ -3444,7 +3288,6 @@
debug_465:
.return (rx218_cur)
rx218_restart:
-.annotate 'line', 4
if_null rx218_debug, debug_466
rx218_cur."!cursor_debug"("NEXT", "outerctx")
debug_466:
@@ -3464,8 +3307,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__outerctx" :subid("51_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__outerctx" :subid("51_1283975947.19641") :method
+.annotate 'line', 0
new $P220, "ResizablePMCArray"
push $P220, ""
.return ($P220)
@@ -3473,8 +3316,8 @@
.namespace ["NQP";"Grammar"]
-.sub "finishpad" :subid("52_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "finishpad" :subid("52_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx223_tgt
.local int rx223_pos
.local int rx223_off
@@ -3510,7 +3353,6 @@
set_addr $I10, rxscan226_loop
rx223_cur."!mark_push"(0, rx223_pos, $I10)
rxscan226_done:
-.annotate 'line', 146
# rx pass
rx223_cur."!cursor_pass"(rx223_pos, "finishpad")
if_null rx223_debug, debug_469
@@ -3518,7 +3360,6 @@
debug_469:
.return (rx223_cur)
rx223_restart:
-.annotate 'line', 4
if_null rx223_debug, debug_470
rx223_cur."!cursor_debug"("NEXT", "finishpad")
debug_470:
@@ -3538,8 +3379,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__finishpad" :subid("53_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__finishpad" :subid("53_1283975947.19641") :method
+.annotate 'line', 0
new $P225, "ResizablePMCArray"
push $P225, ""
.return ($P225)
@@ -3547,24 +3388,24 @@
.namespace ["NQP";"Grammar"]
-.sub "terminator" :subid("54_1283368207.8572") :method
-.annotate 'line', 148
+.sub "terminator" :subid("54_1283975947.19641") :method
+.annotate 'line', 0
$P228 = self."!protoregex"("terminator")
.return ($P228)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator" :subid("55_1283368207.8572") :method
-.annotate 'line', 148
+.sub "!PREFIX__terminator" :subid("55_1283975947.19641") :method
+.annotate 'line', 0
$P230 = self."!PREFIX__!protoregex"("terminator")
.return ($P230)
.end
.namespace ["NQP";"Grammar"]
-.sub "terminator:sym<;>" :subid("56_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "terminator:sym<;>" :subid("56_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx232_tgt
.local int rx232_pos
.local int rx232_off
@@ -3600,7 +3441,6 @@
set_addr $I10, rxscan235_loop
rx232_cur."!mark_push"(0, rx232_pos, $I10)
rxscan235_done:
-.annotate 'line', 150
# rx enumcharlist negate=0 zerowidth
ge rx232_pos, rx232_eos, rx232_fail
sub $I10, rx232_pos, rx232_off
@@ -3614,7 +3454,6 @@
debug_473:
.return (rx232_cur)
rx232_restart:
-.annotate 'line', 4
if_null rx232_debug, debug_474
rx232_cur."!cursor_debug"("NEXT", "terminator:sym<;>")
debug_474:
@@ -3634,8 +3473,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator:sym<;>" :subid("57_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__terminator:sym<;>" :subid("57_1283975947.19641") :method
+.annotate 'line', 0
new $P234, "ResizablePMCArray"
push $P234, ";"
.return ($P234)
@@ -3643,8 +3482,8 @@
.namespace ["NQP";"Grammar"]
-.sub "terminator:sym<}>" :subid("58_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "terminator:sym<}>" :subid("58_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx237_tgt
.local int rx237_pos
.local int rx237_off
@@ -3680,7 +3519,6 @@
set_addr $I10, rxscan240_loop
rx237_cur."!mark_push"(0, rx237_pos, $I10)
rxscan240_done:
-.annotate 'line', 151
# rx enumcharlist negate=0 zerowidth
ge rx237_pos, rx237_eos, rx237_fail
sub $I10, rx237_pos, rx237_off
@@ -3694,7 +3532,6 @@
debug_477:
.return (rx237_cur)
rx237_restart:
-.annotate 'line', 4
if_null rx237_debug, debug_478
rx237_cur."!cursor_debug"("NEXT", "terminator:sym<}>")
debug_478:
@@ -3714,8 +3551,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator:sym<}>" :subid("59_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__terminator:sym<}>" :subid("59_1283975947.19641") :method
+.annotate 'line', 0
new $P239, "ResizablePMCArray"
push $P239, "}"
.return ($P239)
@@ -3723,24 +3560,24 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control" :subid("60_1283368207.8572") :method
-.annotate 'line', 155
+.sub "statement_control" :subid("60_1283975947.19641") :method
+.annotate 'line', 0
$P242 = self."!protoregex"("statement_control")
.return ($P242)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control" :subid("61_1283368207.8572") :method
-.annotate 'line', 155
+.sub "!PREFIX__statement_control" :subid("61_1283975947.19641") :method
+.annotate 'line', 0
$P244 = self."!PREFIX__!protoregex"("statement_control")
.return ($P244)
.end
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<if>" :subid("62_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<if>" :subid("62_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx246_tgt
.local int rx246_pos
.local int rx246_off
@@ -3777,7 +3614,6 @@
set_addr $I10, rxscan249_loop
rx246_cur."!mark_push"(0, rx246_pos, $I10)
rxscan249_done:
-.annotate 'line', 158
# rx subcapture "sym"
set_addr $I10, rxcap_250_fail
rx246_cur."!mark_push"(0, rx246_pos, $I10)
@@ -3810,7 +3646,6 @@
$P10 = rx246_cur."ws"()
unless $P10, rx246_fail
rx246_pos = $P10."pos"()
-.annotate 'line', 159
# rx subrule "xblock" subtype=capture negate=
rx246_cur."!cursor_pos"(rx246_pos)
$P10 = rx246_cur."xblock"()
@@ -3823,7 +3658,6 @@
$P10 = rx246_cur."ws"()
unless $P10, rx246_fail
rx246_pos = $P10."pos"()
-.annotate 'line', 160
# rx rxquantr253 ** 0..*
set_addr $I10, rxquantr253_done
rx246_cur."!mark_push"(0, rx246_pos, $I10)
@@ -3874,7 +3708,6 @@
$P10 = rx246_cur."ws"()
unless $P10, rx246_fail
rx246_pos = $P10."pos"()
-.annotate 'line', 161
# rx rxquantr258 ** 0..1
set_addr $I10, rxquantr258_done
rx246_cur."!mark_push"(0, rx246_pos, $I10)
@@ -3922,7 +3755,6 @@
$P10 = rx246_cur."ws"()
unless $P10, rx246_fail
rx246_pos = $P10."pos"()
-.annotate 'line', 157
# rx pass
rx246_cur."!cursor_pass"(rx246_pos, "statement_control:sym<if>")
if_null rx246_debug, debug_481
@@ -3930,7 +3762,6 @@
debug_481:
.return (rx246_cur)
rx246_restart:
-.annotate 'line', 4
if_null rx246_debug, debug_482
rx246_cur."!cursor_debug"("NEXT", "statement_control:sym<if>")
debug_482:
@@ -3950,8 +3781,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<if>" :subid("63_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<if>" :subid("63_1283975947.19641") :method
+.annotate 'line', 0
new $P248, "ResizablePMCArray"
push $P248, "if"
.return ($P248)
@@ -3959,9 +3790,9 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<unless>" :subid("64_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P274 = "66_1283368207.8572"
+.sub "statement_control:sym<unless>" :subid("64_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P274 = "66_1283975947.19641"
capture_lex $P274
.local string rx264_tgt
.local int rx264_pos
@@ -3998,7 +3829,6 @@
set_addr $I10, rxscan267_loop
rx264_cur."!mark_push"(0, rx264_pos, $I10)
rxscan267_done:
-.annotate 'line', 165
# rx subcapture "sym"
set_addr $I10, rxcap_268_fail
rx264_cur."!mark_push"(0, rx264_pos, $I10)
@@ -4031,7 +3861,6 @@
$P10 = rx264_cur."ws"()
unless $P10, rx264_fail
rx264_pos = $P10."pos"()
-.annotate 'line', 166
# rx subrule "xblock" subtype=capture negate=
rx264_cur."!cursor_pos"(rx264_pos)
$P10 = rx264_cur."xblock"()
@@ -4045,7 +3874,6 @@
unless $P10, rx264_fail
rx264_pos = $P10."pos"()
alt271_0:
-.annotate 'line', 167
set_addr $I10, alt271_1
rx264_cur."!mark_push"(0, rx264_pos, $I10)
# rx subrule "ws" subtype=method negate=
@@ -4055,7 +3883,7 @@
rx264_pos = $P10."pos"()
# rx subrule "before" subtype=zerowidth negate=1
rx264_cur."!cursor_pos"(rx264_pos)
- .const 'Sub' $P274 = "66_1283368207.8572"
+ .const 'Sub' $P274 = "66_1283975947.19641"
capture_lex $P274
$P10 = rx264_cur."before"($P274)
if $P10, rx264_fail
@@ -4087,7 +3915,6 @@
$P10 = rx264_cur."ws"()
unless $P10, rx264_fail
rx264_pos = $P10."pos"()
-.annotate 'line', 164
# rx pass
rx264_cur."!cursor_pass"(rx264_pos, "statement_control:sym<unless>")
if_null rx264_debug, debug_489
@@ -4095,7 +3922,6 @@
debug_489:
.return (rx264_cur)
rx264_restart:
-.annotate 'line', 4
if_null rx264_debug, debug_490
rx264_cur."!cursor_debug"("NEXT", "statement_control:sym<unless>")
debug_490:
@@ -4115,8 +3941,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<unless>" :subid("65_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<unless>" :subid("65_1283975947.19641") :method
+.annotate 'line', 0
new $P266, "ResizablePMCArray"
push $P266, "unless"
.return ($P266)
@@ -4124,8 +3950,8 @@
.namespace ["NQP";"Grammar"]
-.sub "_block273" :anon :subid("66_1283368207.8572") :method :outer("64_1283368207.8572")
-.annotate 'line', 167
+.sub "_block273" :anon :subid("66_1283975947.19641") :method :outer("64_1283975947.19641")
+.annotate 'line', 0
.local string rx275_tgt
.local int rx275_pos
.local int rx275_off
@@ -4194,8 +4020,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<while>" :subid("67_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<while>" :subid("67_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx282_tgt
.local int rx282_pos
.local int rx282_off
@@ -4231,7 +4057,6 @@
set_addr $I10, rxscan285_loop
rx282_cur."!mark_push"(0, rx282_pos, $I10)
rxscan285_done:
-.annotate 'line', 171
# rx subcapture "sym"
set_addr $I10, rxcap_287_fail
rx282_cur."!mark_push"(0, rx282_pos, $I10)
@@ -4277,7 +4102,6 @@
$P10 = rx282_cur."ws"()
unless $P10, rx282_fail
rx282_pos = $P10."pos"()
-.annotate 'line', 172
# rx subrule "xblock" subtype=capture negate=
rx282_cur."!cursor_pos"(rx282_pos)
$P10 = rx282_cur."xblock"()
@@ -4290,7 +4114,6 @@
$P10 = rx282_cur."ws"()
unless $P10, rx282_fail
rx282_pos = $P10."pos"()
-.annotate 'line', 170
# rx pass
rx282_cur."!cursor_pass"(rx282_pos, "statement_control:sym<while>")
if_null rx282_debug, debug_493
@@ -4298,7 +4121,6 @@
debug_493:
.return (rx282_cur)
rx282_restart:
-.annotate 'line', 4
if_null rx282_debug, debug_494
rx282_cur."!cursor_debug"("NEXT", "statement_control:sym<while>")
debug_494:
@@ -4318,8 +4140,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<while>" :subid("68_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<while>" :subid("68_1283975947.19641") :method
+.annotate 'line', 0
new $P284, "ResizablePMCArray"
push $P284, "until"
push $P284, "while"
@@ -4328,8 +4150,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<repeat>" :subid("69_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<repeat>" :subid("69_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx291_tgt
.local int rx291_pos
.local int rx291_off
@@ -4365,7 +4187,6 @@
set_addr $I10, rxscan294_loop
rx291_cur."!mark_push"(0, rx291_pos, $I10)
rxscan294_done:
-.annotate 'line', 176
# rx subcapture "sym"
set_addr $I10, rxcap_295_fail
rx291_cur."!mark_push"(0, rx291_pos, $I10)
@@ -4399,10 +4220,8 @@
unless $P10, rx291_fail
rx291_pos = $P10."pos"()
alt297_0:
-.annotate 'line', 177
set_addr $I10, alt297_1
rx291_cur."!mark_push"(0, rx291_pos, $I10)
-.annotate 'line', 178
# rx subrule "ws" subtype=method negate=
rx291_cur."!cursor_pos"(rx291_pos)
$P10 = rx291_cur."ws"()
@@ -4467,7 +4286,6 @@
rx291_pos = $P10."pos"()
goto alt297_end
alt297_1:
-.annotate 'line', 179
# rx subrule "ws" subtype=method negate=
rx291_cur."!cursor_pos"(rx291_pos)
$P10 = rx291_cur."ws"()
@@ -4543,13 +4361,11 @@
unless $P10, rx291_fail
rx291_pos = $P10."pos"()
alt297_end:
-.annotate 'line', 180
# rx subrule "ws" subtype=method negate=
rx291_cur."!cursor_pos"(rx291_pos)
$P10 = rx291_cur."ws"()
unless $P10, rx291_fail
rx291_pos = $P10."pos"()
-.annotate 'line', 175
# rx pass
rx291_cur."!cursor_pass"(rx291_pos, "statement_control:sym<repeat>")
if_null rx291_debug, debug_497
@@ -4557,7 +4373,6 @@
debug_497:
.return (rx291_cur)
rx291_restart:
-.annotate 'line', 4
if_null rx291_debug, debug_498
rx291_cur."!cursor_debug"("NEXT", "statement_control:sym<repeat>")
debug_498:
@@ -4577,8 +4392,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<repeat>" :subid("70_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<repeat>" :subid("70_1283975947.19641") :method
+.annotate 'line', 0
new $P293, "ResizablePMCArray"
push $P293, "repeat"
.return ($P293)
@@ -4586,8 +4401,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<for>" :subid("71_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<for>" :subid("71_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx311_tgt
.local int rx311_pos
.local int rx311_off
@@ -4623,7 +4438,6 @@
set_addr $I10, rxscan314_loop
rx311_cur."!mark_push"(0, rx311_pos, $I10)
rxscan314_done:
-.annotate 'line', 184
# rx subcapture "sym"
set_addr $I10, rxcap_315_fail
rx311_cur."!mark_push"(0, rx311_pos, $I10)
@@ -4656,7 +4470,6 @@
$P10 = rx311_cur."ws"()
unless $P10, rx311_fail
rx311_pos = $P10."pos"()
-.annotate 'line', 185
# rx subrule "xblock" subtype=capture negate=
rx311_cur."!cursor_pos"(rx311_pos)
$P10 = rx311_cur."xblock"()
@@ -4669,7 +4482,6 @@
$P10 = rx311_cur."ws"()
unless $P10, rx311_fail
rx311_pos = $P10."pos"()
-.annotate 'line', 183
# rx pass
rx311_cur."!cursor_pass"(rx311_pos, "statement_control:sym<for>")
if_null rx311_debug, debug_501
@@ -4677,7 +4489,6 @@
debug_501:
.return (rx311_cur)
rx311_restart:
-.annotate 'line', 4
if_null rx311_debug, debug_502
rx311_cur."!cursor_debug"("NEXT", "statement_control:sym<for>")
debug_502:
@@ -4697,8 +4508,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<for>" :subid("72_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<for>" :subid("72_1283975947.19641") :method
+.annotate 'line', 0
new $P313, "ResizablePMCArray"
push $P313, "for"
.return ($P313)
@@ -4706,8 +4517,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<CATCH>" :subid("73_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<CATCH>" :subid("73_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx319_tgt
.local int rx319_pos
.local int rx319_off
@@ -4743,7 +4554,6 @@
set_addr $I10, rxscan322_loop
rx319_cur."!mark_push"(0, rx319_pos, $I10)
rxscan322_done:
-.annotate 'line', 189
# rx subcapture "sym"
set_addr $I10, rxcap_323_fail
rx319_cur."!mark_push"(0, rx319_pos, $I10)
@@ -4776,7 +4586,6 @@
$P10 = rx319_cur."ws"()
unless $P10, rx319_fail
rx319_pos = $P10."pos"()
-.annotate 'line', 190
# rx subrule "block" subtype=capture negate=
rx319_cur."!cursor_pos"(rx319_pos)
$P10 = rx319_cur."block"()
@@ -4789,7 +4598,6 @@
$P10 = rx319_cur."ws"()
unless $P10, rx319_fail
rx319_pos = $P10."pos"()
-.annotate 'line', 188
# rx pass
rx319_cur."!cursor_pass"(rx319_pos, "statement_control:sym<CATCH>")
if_null rx319_debug, debug_505
@@ -4797,7 +4605,6 @@
debug_505:
.return (rx319_cur)
rx319_restart:
-.annotate 'line', 4
if_null rx319_debug, debug_506
rx319_cur."!cursor_debug"("NEXT", "statement_control:sym<CATCH>")
debug_506:
@@ -4817,8 +4624,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<CATCH>" :subid("74_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<CATCH>" :subid("74_1283975947.19641") :method
+.annotate 'line', 0
new $P321, "ResizablePMCArray"
push $P321, "CATCH"
.return ($P321)
@@ -4826,8 +4633,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<CONTROL>" :subid("75_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_control:sym<CONTROL>" :subid("75_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx327_tgt
.local int rx327_pos
.local int rx327_off
@@ -4863,7 +4670,6 @@
set_addr $I10, rxscan330_loop
rx327_cur."!mark_push"(0, rx327_pos, $I10)
rxscan330_done:
-.annotate 'line', 194
# rx subcapture "sym"
set_addr $I10, rxcap_331_fail
rx327_cur."!mark_push"(0, rx327_pos, $I10)
@@ -4896,7 +4702,6 @@
$P10 = rx327_cur."ws"()
unless $P10, rx327_fail
rx327_pos = $P10."pos"()
-.annotate 'line', 195
# rx subrule "block" subtype=capture negate=
rx327_cur."!cursor_pos"(rx327_pos)
$P10 = rx327_cur."block"()
@@ -4909,7 +4714,6 @@
$P10 = rx327_cur."ws"()
unless $P10, rx327_fail
rx327_pos = $P10."pos"()
-.annotate 'line', 193
# rx pass
rx327_cur."!cursor_pass"(rx327_pos, "statement_control:sym<CONTROL>")
if_null rx327_debug, debug_509
@@ -4917,7 +4721,6 @@
debug_509:
.return (rx327_cur)
rx327_restart:
-.annotate 'line', 4
if_null rx327_debug, debug_510
rx327_cur."!cursor_debug"("NEXT", "statement_control:sym<CONTROL>")
debug_510:
@@ -4937,8 +4740,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<CONTROL>" :subid("76_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_control:sym<CONTROL>" :subid("76_1283975947.19641") :method
+.annotate 'line', 0
new $P329, "ResizablePMCArray"
push $P329, "CONTROL"
.return ($P329)
@@ -4946,24 +4749,24 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix" :subid("77_1283368207.8572") :method
-.annotate 'line', 198
+.sub "statement_prefix" :subid("77_1283975947.19641") :method
+.annotate 'line', 0
$P335 = self."!protoregex"("statement_prefix")
.return ($P335)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix" :subid("78_1283368207.8572") :method
-.annotate 'line', 198
+.sub "!PREFIX__statement_prefix" :subid("78_1283975947.19641") :method
+.annotate 'line', 0
$P337 = self."!PREFIX__!protoregex"("statement_prefix")
.return ($P337)
.end
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix:sym<INIT>" :subid("79_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_prefix:sym<INIT>" :subid("79_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx339_tgt
.local int rx339_pos
.local int rx339_off
@@ -4999,7 +4802,6 @@
set_addr $I10, rxscan343_loop
rx339_cur."!mark_push"(0, rx339_pos, $I10)
rxscan343_done:
-.annotate 'line', 199
# rx subcapture "sym"
set_addr $I10, rxcap_344_fail
rx339_cur."!mark_push"(0, rx339_pos, $I10)
@@ -5035,7 +4837,6 @@
debug_513:
.return (rx339_cur)
rx339_restart:
-.annotate 'line', 4
if_null rx339_debug, debug_514
rx339_cur."!cursor_debug"("NEXT", "statement_prefix:sym<INIT>")
debug_514:
@@ -5055,8 +4856,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix:sym<INIT>" :subid("80_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_prefix:sym<INIT>" :subid("80_1283975947.19641") :method
+.annotate 'line', 0
$P341 = self."!PREFIX__!subrule"("blorst", "INIT")
new $P342, "ResizablePMCArray"
push $P342, $P341
@@ -5065,8 +4866,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix:sym<try>" :subid("81_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_prefix:sym<try>" :subid("81_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx346_tgt
.local int rx346_pos
.local int rx346_off
@@ -5102,7 +4903,6 @@
set_addr $I10, rxscan350_loop
rx346_cur."!mark_push"(0, rx346_pos, $I10)
rxscan350_done:
-.annotate 'line', 202
# rx subcapture "sym"
set_addr $I10, rxcap_351_fail
rx346_cur."!mark_push"(0, rx346_pos, $I10)
@@ -5124,7 +4924,6 @@
rxcap_351_fail:
goto rx346_fail
rxcap_351_done:
-.annotate 'line', 203
# rx subrule "blorst" subtype=capture negate=
rx346_cur."!cursor_pos"(rx346_pos)
$P10 = rx346_cur."blorst"()
@@ -5132,7 +4931,6 @@
rx346_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("blorst")
rx346_pos = $P10."pos"()
-.annotate 'line', 201
# rx pass
rx346_cur."!cursor_pass"(rx346_pos, "statement_prefix:sym<try>")
if_null rx346_debug, debug_517
@@ -5140,7 +4938,6 @@
debug_517:
.return (rx346_cur)
rx346_restart:
-.annotate 'line', 4
if_null rx346_debug, debug_518
rx346_cur."!cursor_debug"("NEXT", "statement_prefix:sym<try>")
debug_518:
@@ -5160,8 +4957,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix:sym<try>" :subid("82_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_prefix:sym<try>" :subid("82_1283975947.19641") :method
+.annotate 'line', 0
$P348 = self."!PREFIX__!subrule"("blorst", "try")
new $P349, "ResizablePMCArray"
push $P349, $P348
@@ -5170,8 +4967,8 @@
.namespace ["NQP";"Grammar"]
-.sub "blorst" :subid("83_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "blorst" :subid("83_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx353_tgt
.local int rx353_pos
.local int rx353_off
@@ -5207,7 +5004,6 @@
set_addr $I10, rxscan356_loop
rx353_cur."!mark_push"(0, rx353_pos, $I10)
rxscan356_done:
-.annotate 'line', 207
# rx charclass s
ge rx353_pos, rx353_eos, rx353_fail
sub $I10, rx353_pos, rx353_off
@@ -5245,7 +5041,6 @@
$P10."!cursor_names"("statement")
rx353_pos = $P10."pos"()
alt357_end:
-.annotate 'line', 206
# rx pass
rx353_cur."!cursor_pass"(rx353_pos, "blorst")
if_null rx353_debug, debug_521
@@ -5253,7 +5048,6 @@
debug_521:
.return (rx353_cur)
rx353_restart:
-.annotate 'line', 4
if_null rx353_debug, debug_522
rx353_cur."!cursor_debug"("NEXT", "blorst")
debug_522:
@@ -5273,8 +5067,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__blorst" :subid("84_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__blorst" :subid("84_1283975947.19641") :method
+.annotate 'line', 0
new $P355, "ResizablePMCArray"
push $P355, ""
.return ($P355)
@@ -5282,24 +5076,24 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond" :subid("85_1283368207.8572") :method
-.annotate 'line', 212
+.sub "statement_mod_cond" :subid("85_1283975947.19641") :method
+.annotate 'line', 0
$P359 = self."!protoregex"("statement_mod_cond")
.return ($P359)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond" :subid("86_1283368207.8572") :method
-.annotate 'line', 212
+.sub "!PREFIX__statement_mod_cond" :subid("86_1283975947.19641") :method
+.annotate 'line', 0
$P361 = self."!PREFIX__!protoregex"("statement_mod_cond")
.return ($P361)
.end
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond:sym<if>" :subid("87_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_mod_cond:sym<if>" :subid("87_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx363_tgt
.local int rx363_pos
.local int rx363_off
@@ -5335,7 +5129,6 @@
set_addr $I10, rxscan367_loop
rx363_cur."!mark_push"(0, rx363_pos, $I10)
rxscan367_done:
-.annotate 'line', 214
# rx subcapture "sym"
set_addr $I10, rxcap_368_fail
rx363_cur."!mark_push"(0, rx363_pos, $I10)
@@ -5381,7 +5174,6 @@
debug_525:
.return (rx363_cur)
rx363_restart:
-.annotate 'line', 4
if_null rx363_debug, debug_526
rx363_cur."!cursor_debug"("NEXT", "statement_mod_cond:sym<if>")
debug_526:
@@ -5401,8 +5193,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond:sym<if>" :subid("88_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_mod_cond:sym<if>" :subid("88_1283975947.19641") :method
+.annotate 'line', 0
$P365 = self."!PREFIX__!subrule"("ws", "if")
new $P366, "ResizablePMCArray"
push $P366, $P365
@@ -5411,8 +5203,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond:sym<unless>" :subid("89_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_mod_cond:sym<unless>" :subid("89_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx372_tgt
.local int rx372_pos
.local int rx372_off
@@ -5448,7 +5240,6 @@
set_addr $I10, rxscan376_loop
rx372_cur."!mark_push"(0, rx372_pos, $I10)
rxscan376_done:
-.annotate 'line', 215
# rx subcapture "sym"
set_addr $I10, rxcap_377_fail
rx372_cur."!mark_push"(0, rx372_pos, $I10)
@@ -5494,7 +5285,6 @@
debug_529:
.return (rx372_cur)
rx372_restart:
-.annotate 'line', 4
if_null rx372_debug, debug_530
rx372_cur."!cursor_debug"("NEXT", "statement_mod_cond:sym<unless>")
debug_530:
@@ -5514,8 +5304,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond:sym<unless>" :subid("90_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_mod_cond:sym<unless>" :subid("90_1283975947.19641") :method
+.annotate 'line', 0
$P374 = self."!PREFIX__!subrule"("ws", "unless")
new $P375, "ResizablePMCArray"
push $P375, $P374
@@ -5524,24 +5314,24 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop" :subid("91_1283368207.8572") :method
-.annotate 'line', 217
+.sub "statement_mod_loop" :subid("91_1283975947.19641") :method
+.annotate 'line', 0
$P381 = self."!protoregex"("statement_mod_loop")
.return ($P381)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop" :subid("92_1283368207.8572") :method
-.annotate 'line', 217
+.sub "!PREFIX__statement_mod_loop" :subid("92_1283975947.19641") :method
+.annotate 'line', 0
$P383 = self."!PREFIX__!protoregex"("statement_mod_loop")
.return ($P383)
.end
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop:sym<while>" :subid("93_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_mod_loop:sym<while>" :subid("93_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx385_tgt
.local int rx385_pos
.local int rx385_off
@@ -5577,7 +5367,6 @@
set_addr $I10, rxscan389_loop
rx385_cur."!mark_push"(0, rx385_pos, $I10)
rxscan389_done:
-.annotate 'line', 219
# rx subcapture "sym"
set_addr $I10, rxcap_390_fail
rx385_cur."!mark_push"(0, rx385_pos, $I10)
@@ -5623,7 +5412,6 @@
debug_533:
.return (rx385_cur)
rx385_restart:
-.annotate 'line', 4
if_null rx385_debug, debug_534
rx385_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym<while>")
debug_534:
@@ -5643,8 +5431,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop:sym<while>" :subid("94_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_mod_loop:sym<while>" :subid("94_1283975947.19641") :method
+.annotate 'line', 0
$P387 = self."!PREFIX__!subrule"("ws", "while")
new $P388, "ResizablePMCArray"
push $P388, $P387
@@ -5653,8 +5441,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop:sym<until>" :subid("95_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_mod_loop:sym<until>" :subid("95_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx394_tgt
.local int rx394_pos
.local int rx394_off
@@ -5690,7 +5478,6 @@
set_addr $I10, rxscan398_loop
rx394_cur."!mark_push"(0, rx394_pos, $I10)
rxscan398_done:
-.annotate 'line', 220
# rx subcapture "sym"
set_addr $I10, rxcap_399_fail
rx394_cur."!mark_push"(0, rx394_pos, $I10)
@@ -5736,7 +5523,6 @@
debug_537:
.return (rx394_cur)
rx394_restart:
-.annotate 'line', 4
if_null rx394_debug, debug_538
rx394_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym<until>")
debug_538:
@@ -5756,8 +5542,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop:sym<until>" :subid("96_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_mod_loop:sym<until>" :subid("96_1283975947.19641") :method
+.annotate 'line', 0
$P396 = self."!PREFIX__!subrule"("ws", "until")
new $P397, "ResizablePMCArray"
push $P397, $P396
@@ -5766,8 +5552,8 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop:sym<for>" :subid("97_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "statement_mod_loop:sym<for>" :subid("97_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx403_tgt
.local int rx403_pos
.local int rx403_off
@@ -5803,7 +5589,6 @@
set_addr $I10, rxscan407_loop
rx403_cur."!mark_push"(0, rx403_pos, $I10)
rxscan407_done:
-.annotate 'line', 221
# rx subcapture "sym"
set_addr $I10, rxcap_408_fail
rx403_cur."!mark_push"(0, rx403_pos, $I10)
@@ -5849,7 +5634,6 @@
debug_541:
.return (rx403_cur)
rx403_restart:
-.annotate 'line', 4
if_null rx403_debug, debug_542
rx403_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym<for>")
debug_542:
@@ -5869,8 +5653,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop:sym<for>" :subid("98_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__statement_mod_loop:sym<for>" :subid("98_1283975947.19641") :method
+.annotate 'line', 0
$P405 = self."!PREFIX__!subrule"("ws", "for")
new $P406, "ResizablePMCArray"
push $P406, $P405
@@ -5879,8 +5663,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<fatarrow>" :subid("99_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<fatarrow>" :subid("99_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx412_tgt
.local int rx412_pos
.local int rx412_off
@@ -5916,7 +5700,6 @@
set_addr $I10, rxscan416_loop
rx412_cur."!mark_push"(0, rx412_pos, $I10)
rxscan416_done:
-.annotate 'line', 225
# rx subrule "fatarrow" subtype=capture negate=
rx412_cur."!cursor_pos"(rx412_pos)
$P10 = rx412_cur."fatarrow"()
@@ -5931,7 +5714,6 @@
debug_545:
.return (rx412_cur)
rx412_restart:
-.annotate 'line', 4
if_null rx412_debug, debug_546
rx412_cur."!cursor_debug"("NEXT", "term:sym<fatarrow>")
debug_546:
@@ -5951,8 +5733,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<fatarrow>" :subid("100_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<fatarrow>" :subid("100_1283975947.19641") :method
+.annotate 'line', 0
$P414 = self."!PREFIX__!subrule"("fatarrow", "")
new $P415, "ResizablePMCArray"
push $P415, $P414
@@ -5961,8 +5743,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<colonpair>" :subid("101_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<colonpair>" :subid("101_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx418_tgt
.local int rx418_pos
.local int rx418_off
@@ -5998,7 +5780,6 @@
set_addr $I10, rxscan422_loop
rx418_cur."!mark_push"(0, rx418_pos, $I10)
rxscan422_done:
-.annotate 'line', 226
# rx subrule "colonpair" subtype=capture negate=
rx418_cur."!cursor_pos"(rx418_pos)
$P10 = rx418_cur."colonpair"()
@@ -6013,7 +5794,6 @@
debug_549:
.return (rx418_cur)
rx418_restart:
-.annotate 'line', 4
if_null rx418_debug, debug_550
rx418_cur."!cursor_debug"("NEXT", "term:sym<colonpair>")
debug_550:
@@ -6033,8 +5813,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<colonpair>" :subid("102_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<colonpair>" :subid("102_1283975947.19641") :method
+.annotate 'line', 0
$P420 = self."!PREFIX__!subrule"("colonpair", "")
new $P421, "ResizablePMCArray"
push $P421, $P420
@@ -6043,8 +5823,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<variable>" :subid("103_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<variable>" :subid("103_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx424_tgt
.local int rx424_pos
.local int rx424_off
@@ -6080,7 +5860,6 @@
set_addr $I10, rxscan428_loop
rx424_cur."!mark_push"(0, rx424_pos, $I10)
rxscan428_done:
-.annotate 'line', 227
# rx subrule "variable" subtype=capture negate=
rx424_cur."!cursor_pos"(rx424_pos)
$P10 = rx424_cur."variable"()
@@ -6095,7 +5874,6 @@
debug_553:
.return (rx424_cur)
rx424_restart:
-.annotate 'line', 4
if_null rx424_debug, debug_554
rx424_cur."!cursor_debug"("NEXT", "term:sym<variable>")
debug_554:
@@ -6115,8 +5893,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<variable>" :subid("104_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<variable>" :subid("104_1283975947.19641") :method
+.annotate 'line', 0
$P426 = self."!PREFIX__!subrule"("variable", "")
new $P427, "ResizablePMCArray"
push $P427, $P426
@@ -6125,8 +5903,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<package_declarator>" :subid("105_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<package_declarator>" :subid("105_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx430_tgt
.local int rx430_pos
.local int rx430_off
@@ -6162,7 +5940,6 @@
set_addr $I10, rxscan434_loop
rx430_cur."!mark_push"(0, rx430_pos, $I10)
rxscan434_done:
-.annotate 'line', 228
# rx subrule "package_declarator" subtype=capture negate=
rx430_cur."!cursor_pos"(rx430_pos)
$P10 = rx430_cur."package_declarator"()
@@ -6177,7 +5954,6 @@
debug_557:
.return (rx430_cur)
rx430_restart:
-.annotate 'line', 4
if_null rx430_debug, debug_558
rx430_cur."!cursor_debug"("NEXT", "term:sym<package_declarator>")
debug_558:
@@ -6197,8 +5973,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<package_declarator>" :subid("106_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<package_declarator>" :subid("106_1283975947.19641") :method
+.annotate 'line', 0
$P432 = self."!PREFIX__!subrule"("package_declarator", "")
new $P433, "ResizablePMCArray"
push $P433, $P432
@@ -6207,8 +5983,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<scope_declarator>" :subid("107_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<scope_declarator>" :subid("107_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx436_tgt
.local int rx436_pos
.local int rx436_off
@@ -6244,7 +6020,6 @@
set_addr $I10, rxscan440_loop
rx436_cur."!mark_push"(0, rx436_pos, $I10)
rxscan440_done:
-.annotate 'line', 229
# rx subrule "scope_declarator" subtype=capture negate=
rx436_cur."!cursor_pos"(rx436_pos)
$P10 = rx436_cur."scope_declarator"()
@@ -6259,7 +6034,6 @@
debug_561:
.return (rx436_cur)
rx436_restart:
-.annotate 'line', 4
if_null rx436_debug, debug_562
rx436_cur."!cursor_debug"("NEXT", "term:sym<scope_declarator>")
debug_562:
@@ -6279,8 +6053,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<scope_declarator>" :subid("108_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<scope_declarator>" :subid("108_1283975947.19641") :method
+.annotate 'line', 0
$P438 = self."!PREFIX__!subrule"("scope_declarator", "")
new $P439, "ResizablePMCArray"
push $P439, $P438
@@ -6289,8 +6063,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<routine_declarator>" :subid("109_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<routine_declarator>" :subid("109_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx442_tgt
.local int rx442_pos
.local int rx442_off
@@ -6326,7 +6100,6 @@
set_addr $I10, rxscan446_loop
rx442_cur."!mark_push"(0, rx442_pos, $I10)
rxscan446_done:
-.annotate 'line', 230
# rx subrule "routine_declarator" subtype=capture negate=
rx442_cur."!cursor_pos"(rx442_pos)
$P10 = rx442_cur."routine_declarator"()
@@ -6341,7 +6114,6 @@
debug_565:
.return (rx442_cur)
rx442_restart:
-.annotate 'line', 4
if_null rx442_debug, debug_566
rx442_cur."!cursor_debug"("NEXT", "term:sym<routine_declarator>")
debug_566:
@@ -6361,8 +6133,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<routine_declarator>" :subid("110_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<routine_declarator>" :subid("110_1283975947.19641") :method
+.annotate 'line', 0
$P444 = self."!PREFIX__!subrule"("routine_declarator", "")
new $P445, "ResizablePMCArray"
push $P445, $P444
@@ -6371,9 +6143,9 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<multi_declarator>" :subid("111_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P453 = "113_1283368207.8572"
+.sub "term:sym<multi_declarator>" :subid("111_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P453 = "113_1283975947.19641"
capture_lex $P453
.local string rx448_tgt
.local int rx448_pos
@@ -6410,10 +6182,9 @@
set_addr $I10, rxscan451_loop
rx448_cur."!mark_push"(0, rx448_pos, $I10)
rxscan451_done:
-.annotate 'line', 231
# rx subrule "before" subtype=zerowidth negate=
rx448_cur."!cursor_pos"(rx448_pos)
- .const 'Sub' $P453 = "113_1283368207.8572"
+ .const 'Sub' $P453 = "113_1283975947.19641"
capture_lex $P453
$P10 = rx448_cur."before"($P453)
unless $P10, rx448_fail
@@ -6431,7 +6202,6 @@
debug_573:
.return (rx448_cur)
rx448_restart:
-.annotate 'line', 4
if_null rx448_debug, debug_574
rx448_cur."!cursor_debug"("NEXT", "term:sym<multi_declarator>")
debug_574:
@@ -6451,8 +6221,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<multi_declarator>" :subid("112_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<multi_declarator>" :subid("112_1283975947.19641") :method
+.annotate 'line', 0
new $P450, "ResizablePMCArray"
push $P450, ""
.return ($P450)
@@ -6460,8 +6230,8 @@
.namespace ["NQP";"Grammar"]
-.sub "_block452" :anon :subid("113_1283368207.8572") :method :outer("111_1283368207.8572")
-.annotate 'line', 231
+.sub "_block452" :anon :subid("113_1283975947.19641") :method :outer("111_1283975947.19641")
+.annotate 'line', 0
.local string rx454_tgt
.local int rx454_pos
.local int rx454_off
@@ -6554,8 +6324,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<regex_declarator>" :subid("114_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<regex_declarator>" :subid("114_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx458_tgt
.local int rx458_pos
.local int rx458_off
@@ -6591,7 +6361,6 @@
set_addr $I10, rxscan462_loop
rx458_cur."!mark_push"(0, rx458_pos, $I10)
rxscan462_done:
-.annotate 'line', 232
# rx subrule "regex_declarator" subtype=capture negate=
rx458_cur."!cursor_pos"(rx458_pos)
$P10 = rx458_cur."regex_declarator"()
@@ -6606,7 +6375,6 @@
debug_577:
.return (rx458_cur)
rx458_restart:
-.annotate 'line', 4
if_null rx458_debug, debug_578
rx458_cur."!cursor_debug"("NEXT", "term:sym<regex_declarator>")
debug_578:
@@ -6626,8 +6394,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<regex_declarator>" :subid("115_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<regex_declarator>" :subid("115_1283975947.19641") :method
+.annotate 'line', 0
$P460 = self."!PREFIX__!subrule"("regex_declarator", "")
new $P461, "ResizablePMCArray"
push $P461, $P460
@@ -6636,8 +6404,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<statement_prefix>" :subid("116_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<statement_prefix>" :subid("116_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx464_tgt
.local int rx464_pos
.local int rx464_off
@@ -6673,7 +6441,6 @@
set_addr $I10, rxscan468_loop
rx464_cur."!mark_push"(0, rx464_pos, $I10)
rxscan468_done:
-.annotate 'line', 233
# rx subrule "statement_prefix" subtype=capture negate=
rx464_cur."!cursor_pos"(rx464_pos)
$P10 = rx464_cur."statement_prefix"()
@@ -6688,7 +6455,6 @@
debug_581:
.return (rx464_cur)
rx464_restart:
-.annotate 'line', 4
if_null rx464_debug, debug_582
rx464_cur."!cursor_debug"("NEXT", "term:sym<statement_prefix>")
debug_582:
@@ -6708,8 +6474,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<statement_prefix>" :subid("117_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<statement_prefix>" :subid("117_1283975947.19641") :method
+.annotate 'line', 0
$P466 = self."!PREFIX__!subrule"("statement_prefix", "")
new $P467, "ResizablePMCArray"
push $P467, $P466
@@ -6718,8 +6484,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<lambda>" :subid("118_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<lambda>" :subid("118_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx470_tgt
.local int rx470_pos
.local int rx470_off
@@ -6755,7 +6521,6 @@
set_addr $I10, rxscan473_loop
rx470_cur."!mark_push"(0, rx470_pos, $I10)
rxscan473_done:
-.annotate 'line', 234
# rx subrule "lambda" subtype=zerowidth negate=
rx470_cur."!cursor_pos"(rx470_pos)
$P10 = rx470_cur."lambda"()
@@ -6774,7 +6539,6 @@
debug_585:
.return (rx470_cur)
rx470_restart:
-.annotate 'line', 4
if_null rx470_debug, debug_586
rx470_cur."!cursor_debug"("NEXT", "term:sym<lambda>")
debug_586:
@@ -6794,8 +6558,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<lambda>" :subid("119_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<lambda>" :subid("119_1283975947.19641") :method
+.annotate 'line', 0
new $P472, "ResizablePMCArray"
push $P472, ""
.return ($P472)
@@ -6803,8 +6567,8 @@
.namespace ["NQP";"Grammar"]
-.sub "fatarrow" :subid("120_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "fatarrow" :subid("120_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx475_tgt
.local int rx475_pos
.local int rx475_off
@@ -6840,7 +6604,6 @@
set_addr $I10, rxscan479_loop
rx475_cur."!mark_push"(0, rx475_pos, $I10)
rxscan479_done:
-.annotate 'line', 237
# rx subrule "identifier" subtype=capture negate=
rx475_cur."!cursor_pos"(rx475_pos)
$P10 = rx475_cur."identifier"()
@@ -6882,7 +6645,6 @@
rx475_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("val")
rx475_pos = $P10."pos"()
-.annotate 'line', 236
# rx pass
rx475_cur."!cursor_pass"(rx475_pos, "fatarrow")
if_null rx475_debug, debug_589
@@ -6890,7 +6652,6 @@
debug_589:
.return (rx475_cur)
rx475_restart:
-.annotate 'line', 4
if_null rx475_debug, debug_590
rx475_cur."!cursor_debug"("NEXT", "fatarrow")
debug_590:
@@ -6910,8 +6671,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__fatarrow" :subid("121_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__fatarrow" :subid("121_1283975947.19641") :method
+.annotate 'line', 0
$P477 = self."!PREFIX__!subrule"("identifier", "")
new $P478, "ResizablePMCArray"
push $P478, $P477
@@ -6920,8 +6681,8 @@
.namespace ["NQP";"Grammar"]
-.sub "colonpair" :subid("122_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "colonpair" :subid("122_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx482_tgt
.local int rx482_pos
.local int rx482_off
@@ -6958,7 +6719,6 @@
set_addr $I10, rxscan488_loop
rx482_cur."!mark_push"(0, rx482_pos, $I10)
rxscan488_done:
-.annotate 'line', 241
# rx literal ":"
add $I11, rx482_pos, 1
gt $I11, rx482_eos, rx482_fail
@@ -6967,10 +6727,8 @@
ne $I11, 58, rx482_fail
add rx482_pos, 1
alt489_0:
-.annotate 'line', 242
set_addr $I10, alt489_1
rx482_cur."!mark_push"(0, rx482_pos, $I10)
-.annotate 'line', 243
# rx subcapture "not"
set_addr $I10, rxcap_490_fail
rx482_cur."!mark_push"(0, rx482_pos, $I10)
@@ -7003,7 +6761,6 @@
alt489_1:
set_addr $I10, alt489_2
rx482_cur."!mark_push"(0, rx482_pos, $I10)
-.annotate 'line', 244
# rx subrule "identifier" subtype=capture negate=
rx482_cur."!cursor_pos"(rx482_pos)
$P10 = rx482_cur."identifier"()
@@ -7033,7 +6790,6 @@
rxquantr491_done:
goto alt489_end
alt489_2:
-.annotate 'line', 245
# rx subrule "circumfix" subtype=capture negate=
rx482_cur."!cursor_pos"(rx482_pos)
$P10 = rx482_cur."circumfix"()
@@ -7042,7 +6798,6 @@
$P10."!cursor_names"("circumfix")
rx482_pos = $P10."pos"()
alt489_end:
-.annotate 'line', 240
# rx pass
rx482_cur."!cursor_pass"(rx482_pos, "colonpair")
if_null rx482_debug, debug_593
@@ -7050,7 +6805,6 @@
debug_593:
.return (rx482_cur)
rx482_restart:
-.annotate 'line', 4
if_null rx482_debug, debug_594
rx482_cur."!cursor_debug"("NEXT", "colonpair")
debug_594:
@@ -7070,8 +6824,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__colonpair" :subid("123_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__colonpair" :subid("123_1283975947.19641") :method
+.annotate 'line', 0
$P484 = self."!PREFIX__!subrule"("circumfix", ":")
$P485 = self."!PREFIX__!subrule"("identifier", ":")
$P486 = self."!PREFIX__!subrule"("identifier", ":!")
@@ -7084,8 +6838,8 @@
.namespace ["NQP";"Grammar"]
-.sub "variable" :subid("124_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "variable" :subid("124_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx494_tgt
.local int rx494_pos
.local int rx494_off
@@ -7123,10 +6877,8 @@
rx494_cur."!mark_push"(0, rx494_pos, $I10)
rxscan499_done:
alt500_0:
-.annotate 'line', 249
set_addr $I10, alt500_1
rx494_cur."!mark_push"(0, rx494_pos, $I10)
-.annotate 'line', 250
# rx subrule "sigil" subtype=capture negate=
rx494_cur."!cursor_pos"(rx494_pos)
$P10 = rx494_cur."sigil"()
@@ -7165,7 +6917,6 @@
alt500_1:
set_addr $I10, alt500_2
rx494_cur."!mark_push"(0, rx494_pos, $I10)
-.annotate 'line', 251
# rx subrule "sigil" subtype=capture negate=
rx494_cur."!cursor_pos"(rx494_pos)
$P10 = rx494_cur."sigil"()
@@ -7188,7 +6939,6 @@
rx494_pos = $P10."pos"()
goto alt500_end
alt500_2:
-.annotate 'line', 252
# rx subcapture "sigil"
set_addr $I10, rxcap_503_fail
rx494_cur."!mark_push"(0, rx494_pos, $I10)
@@ -7232,7 +6982,6 @@
goto rx494_fail
rxcap_504_done:
alt500_end:
-.annotate 'line', 249
# rx pass
rx494_cur."!cursor_pass"(rx494_pos, "variable")
if_null rx494_debug, debug_597
@@ -7240,7 +6989,6 @@
debug_597:
.return (rx494_cur)
rx494_restart:
-.annotate 'line', 4
if_null rx494_debug, debug_598
rx494_cur."!cursor_debug"("NEXT", "variable")
debug_598:
@@ -7260,8 +7008,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__variable" :subid("125_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__variable" :subid("125_1283975947.19641") :method
+.annotate 'line', 0
$P496 = self."!PREFIX__!subrule"("sigil", "")
$P497 = self."!PREFIX__!subrule"("sigil", "")
new $P498, "ResizablePMCArray"
@@ -7275,8 +7023,8 @@
.namespace ["NQP";"Grammar"]
-.sub "sigil" :subid("126_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "sigil" :subid("126_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx506_tgt
.local int rx506_pos
.local int rx506_off
@@ -7312,7 +7060,6 @@
set_addr $I10, rxscan509_loop
rx506_cur."!mark_push"(0, rx506_pos, $I10)
rxscan509_done:
-.annotate 'line', 255
# rx enumcharlist negate=0
ge rx506_pos, rx506_eos, rx506_fail
sub $I10, rx506_pos, rx506_off
@@ -7327,7 +7074,6 @@
debug_601:
.return (rx506_cur)
rx506_restart:
-.annotate 'line', 4
if_null rx506_debug, debug_602
rx506_cur."!cursor_debug"("NEXT", "sigil")
debug_602:
@@ -7347,8 +7093,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__sigil" :subid("127_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__sigil" :subid("127_1283975947.19641") :method
+.annotate 'line', 0
new $P508, "ResizablePMCArray"
push $P508, "&"
push $P508, "%"
@@ -7359,8 +7105,8 @@
.namespace ["NQP";"Grammar"]
-.sub "twigil" :subid("128_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "twigil" :subid("128_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx511_tgt
.local int rx511_pos
.local int rx511_off
@@ -7396,7 +7142,6 @@
set_addr $I10, rxscan514_loop
rx511_cur."!mark_push"(0, rx511_pos, $I10)
rxscan514_done:
-.annotate 'line', 257
# rx enumcharlist negate=0
ge rx511_pos, rx511_eos, rx511_fail
sub $I10, rx511_pos, rx511_off
@@ -7411,7 +7156,6 @@
debug_605:
.return (rx511_cur)
rx511_restart:
-.annotate 'line', 4
if_null rx511_debug, debug_606
rx511_cur."!cursor_debug"("NEXT", "twigil")
debug_606:
@@ -7431,8 +7175,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__twigil" :subid("129_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__twigil" :subid("129_1283975947.19641") :method
+.annotate 'line', 0
new $P513, "ResizablePMCArray"
push $P513, "?"
push $P513, "!"
@@ -7442,24 +7186,24 @@
.namespace ["NQP";"Grammar"]
-.sub "package_declarator" :subid("130_1283368207.8572") :method
-.annotate 'line', 259
+.sub "package_declarator" :subid("130_1283975947.19641") :method
+.annotate 'line', 0
$P516 = self."!protoregex"("package_declarator")
.return ($P516)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator" :subid("131_1283368207.8572") :method
-.annotate 'line', 259
+.sub "!PREFIX__package_declarator" :subid("131_1283975947.19641") :method
+.annotate 'line', 0
$P518 = self."!PREFIX__!protoregex"("package_declarator")
.return ($P518)
.end
.namespace ["NQP";"Grammar"]
-.sub "package_declarator:sym<module>" :subid("132_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "package_declarator:sym<module>" :subid("132_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx520_tgt
.local int rx520_pos
.local int rx520_off
@@ -7495,7 +7239,6 @@
set_addr $I10, rxscan524_loop
rx520_cur."!mark_push"(0, rx520_pos, $I10)
rxscan524_done:
-.annotate 'line', 260
# rx subcapture "sym"
set_addr $I10, rxcap_525_fail
rx520_cur."!mark_push"(0, rx520_pos, $I10)
@@ -7531,7 +7274,6 @@
debug_609:
.return (rx520_cur)
rx520_restart:
-.annotate 'line', 4
if_null rx520_debug, debug_610
rx520_cur."!cursor_debug"("NEXT", "package_declarator:sym<module>")
debug_610:
@@ -7551,8 +7293,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator:sym<module>" :subid("133_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__package_declarator:sym<module>" :subid("133_1283975947.19641") :method
+.annotate 'line', 0
$P522 = self."!PREFIX__!subrule"("package_def", "module")
new $P523, "ResizablePMCArray"
push $P523, $P522
@@ -7561,8 +7303,8 @@
.namespace ["NQP";"Grammar"]
-.sub "package_declarator:sym<class>" :subid("134_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "package_declarator:sym<class>" :subid("134_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx527_tgt
.local int rx527_pos
.local int rx527_off
@@ -7598,7 +7340,6 @@
set_addr $I10, rxscan532_loop
rx527_cur."!mark_push"(0, rx527_pos, $I10)
rxscan532_done:
-.annotate 'line', 261
# rx subcapture "sym"
set_addr $I10, rxcap_534_fail
rx527_cur."!mark_push"(0, rx527_pos, $I10)
@@ -7647,7 +7388,6 @@
debug_613:
.return (rx527_cur)
rx527_restart:
-.annotate 'line', 4
if_null rx527_debug, debug_614
rx527_cur."!cursor_debug"("NEXT", "package_declarator:sym<class>")
debug_614:
@@ -7667,8 +7407,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator:sym<class>" :subid("135_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__package_declarator:sym<class>" :subid("135_1283975947.19641") :method
+.annotate 'line', 0
$P529 = self."!PREFIX__!subrule"("package_def", "grammar")
$P530 = self."!PREFIX__!subrule"("package_def", "class")
new $P531, "ResizablePMCArray"
@@ -7679,8 +7419,8 @@
.namespace ["NQP";"Grammar"]
-.sub "package_def" :subid("136_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "package_def" :subid("136_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx536_tgt
.local int rx536_pos
.local int rx536_off
@@ -7717,13 +7457,11 @@
set_addr $I10, rxscan540_loop
rx536_cur."!mark_push"(0, rx536_pos, $I10)
rxscan540_done:
-.annotate 'line', 263
# rx subrule "ws" subtype=method negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."ws"()
unless $P10, rx536_fail
rx536_pos = $P10."pos"()
-.annotate 'line', 264
# rx subrule "name" subtype=capture negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."name"()
@@ -7736,7 +7474,6 @@
$P10 = rx536_cur."ws"()
unless $P10, rx536_fail
rx536_pos = $P10."pos"()
-.annotate 'line', 265
# rx rxquantr543 ** 0..1
set_addr $I10, rxquantr543_done
rx536_cur."!mark_push"(0, rx536_pos, $I10)
@@ -7779,10 +7516,8 @@
unless $P10, rx536_fail
rx536_pos = $P10."pos"()
alt548_0:
-.annotate 'line', 266
set_addr $I10, alt548_1
rx536_cur."!mark_push"(0, rx536_pos, $I10)
-.annotate 'line', 267
# rx subrule "ws" subtype=method negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."ws"()
@@ -7816,7 +7551,6 @@
alt548_1:
set_addr $I10, alt548_2
rx536_cur."!mark_push"(0, rx536_pos, $I10)
-.annotate 'line', 268
# rx subrule "ws" subtype=method negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."ws"()
@@ -7847,7 +7581,6 @@
rx536_pos = $P10."pos"()
goto alt548_end
alt548_2:
-.annotate 'line', 269
# rx subrule "ws" subtype=method negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."ws"()
@@ -7864,13 +7597,11 @@
unless $P10, rx536_fail
rx536_pos = $P10."pos"()
alt548_end:
-.annotate 'line', 270
# rx subrule "ws" subtype=method negate=
rx536_cur."!cursor_pos"(rx536_pos)
$P10 = rx536_cur."ws"()
unless $P10, rx536_fail
rx536_pos = $P10."pos"()
-.annotate 'line', 263
# rx pass
rx536_cur."!cursor_pass"(rx536_pos, "package_def")
if_null rx536_debug, debug_617
@@ -7878,7 +7609,6 @@
debug_617:
.return (rx536_cur)
rx536_restart:
-.annotate 'line', 4
if_null rx536_debug, debug_618
rx536_cur."!cursor_debug"("NEXT", "package_def")
debug_618:
@@ -7898,8 +7628,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_def" :subid("137_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__package_def" :subid("137_1283975947.19641") :method
+.annotate 'line', 0
$P538 = self."!PREFIX__!subrule"("ws", "")
new $P539, "ResizablePMCArray"
push $P539, $P538
@@ -7908,24 +7638,24 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator" :subid("138_1283368207.8572") :method
-.annotate 'line', 273
+.sub "scope_declarator" :subid("138_1283975947.19641") :method
+.annotate 'line', 0
$P559 = self."!protoregex"("scope_declarator")
.return ($P559)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator" :subid("139_1283368207.8572") :method
-.annotate 'line', 273
+.sub "!PREFIX__scope_declarator" :subid("139_1283975947.19641") :method
+.annotate 'line', 0
$P561 = self."!PREFIX__!protoregex"("scope_declarator")
.return ($P561)
.end
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<my>" :subid("140_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "scope_declarator:sym<my>" :subid("140_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx563_tgt
.local int rx563_pos
.local int rx563_off
@@ -7961,7 +7691,6 @@
set_addr $I10, rxscan567_loop
rx563_cur."!mark_push"(0, rx563_pos, $I10)
rxscan567_done:
-.annotate 'line', 274
# rx subcapture "sym"
set_addr $I10, rxcap_568_fail
rx563_cur."!mark_push"(0, rx563_pos, $I10)
@@ -7997,7 +7726,6 @@
debug_621:
.return (rx563_cur)
rx563_restart:
-.annotate 'line', 4
if_null rx563_debug, debug_622
rx563_cur."!cursor_debug"("NEXT", "scope_declarator:sym<my>")
debug_622:
@@ -8017,8 +7745,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<my>" :subid("141_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__scope_declarator:sym<my>" :subid("141_1283975947.19641") :method
+.annotate 'line', 0
$P565 = self."!PREFIX__!subrule"("scoped", "my")
new $P566, "ResizablePMCArray"
push $P566, $P565
@@ -8027,8 +7755,8 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<our>" :subid("142_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "scope_declarator:sym<our>" :subid("142_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx570_tgt
.local int rx570_pos
.local int rx570_off
@@ -8064,7 +7792,6 @@
set_addr $I10, rxscan574_loop
rx570_cur."!mark_push"(0, rx570_pos, $I10)
rxscan574_done:
-.annotate 'line', 275
# rx subcapture "sym"
set_addr $I10, rxcap_575_fail
rx570_cur."!mark_push"(0, rx570_pos, $I10)
@@ -8100,7 +7827,6 @@
debug_625:
.return (rx570_cur)
rx570_restart:
-.annotate 'line', 4
if_null rx570_debug, debug_626
rx570_cur."!cursor_debug"("NEXT", "scope_declarator:sym<our>")
debug_626:
@@ -8120,8 +7846,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<our>" :subid("143_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__scope_declarator:sym<our>" :subid("143_1283975947.19641") :method
+.annotate 'line', 0
$P572 = self."!PREFIX__!subrule"("scoped", "our")
new $P573, "ResizablePMCArray"
push $P573, $P572
@@ -8130,8 +7856,8 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<has>" :subid("144_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "scope_declarator:sym<has>" :subid("144_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx577_tgt
.local int rx577_pos
.local int rx577_off
@@ -8167,7 +7893,6 @@
set_addr $I10, rxscan581_loop
rx577_cur."!mark_push"(0, rx577_pos, $I10)
rxscan581_done:
-.annotate 'line', 276
# rx subcapture "sym"
set_addr $I10, rxcap_582_fail
rx577_cur."!mark_push"(0, rx577_pos, $I10)
@@ -8203,7 +7928,6 @@
debug_629:
.return (rx577_cur)
rx577_restart:
-.annotate 'line', 4
if_null rx577_debug, debug_630
rx577_cur."!cursor_debug"("NEXT", "scope_declarator:sym<has>")
debug_630:
@@ -8223,8 +7947,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<has>" :subid("145_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__scope_declarator:sym<has>" :subid("145_1283975947.19641") :method
+.annotate 'line', 0
$P579 = self."!PREFIX__!subrule"("scoped", "has")
new $P580, "ResizablePMCArray"
push $P580, $P579
@@ -8233,11 +7957,10 @@
.namespace ["NQP";"Grammar"]
-.sub "scoped" :subid("146_1283368207.8572") :method :outer("11_1283368207.8572")
+.sub "scoped" :subid("146_1283975947.19641") :method :outer("11_1283975947.19641")
.param pmc param_584
-.annotate 'line', 278
+.annotate 'line', 0
.lex "$*SCOPE", param_584
-.annotate 'line', 4
.local string rx585_tgt
.local int rx585_pos
.local int rx585_off
@@ -8274,10 +7997,8 @@
rx585_cur."!mark_push"(0, rx585_pos, $I10)
rxscan590_done:
alt591_0:
-.annotate 'line', 278
set_addr $I10, alt591_1
rx585_cur."!mark_push"(0, rx585_pos, $I10)
-.annotate 'line', 279
# rx subrule "ws" subtype=method negate=
rx585_cur."!cursor_pos"(rx585_pos)
$P10 = rx585_cur."ws"()
@@ -8297,7 +8018,6 @@
rx585_pos = $P10."pos"()
goto alt591_end
alt591_1:
-.annotate 'line', 280
# rx subrule "ws" subtype=method negate=
rx585_cur."!cursor_pos"(rx585_pos)
$P10 = rx585_cur."ws"()
@@ -8316,7 +8036,6 @@
unless $P10, rx585_fail
rx585_pos = $P10."pos"()
alt591_end:
-.annotate 'line', 278
# rx pass
rx585_cur."!cursor_pass"(rx585_pos, "scoped")
if_null rx585_debug, debug_633
@@ -8324,7 +8043,6 @@
debug_633:
.return (rx585_cur)
rx585_restart:
-.annotate 'line', 4
if_null rx585_debug, debug_634
rx585_cur."!cursor_debug"("NEXT", "scoped")
debug_634:
@@ -8344,8 +8062,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scoped" :subid("147_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__scoped" :subid("147_1283975947.19641") :method
+.annotate 'line', 0
$P587 = self."!PREFIX__!subrule"("ws", "")
$P588 = self."!PREFIX__!subrule"("ws", "")
new $P589, "ResizablePMCArray"
@@ -8356,8 +8074,8 @@
.namespace ["NQP";"Grammar"]
-.sub "typename" :subid("148_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "typename" :subid("148_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx597_tgt
.local int rx597_pos
.local int rx597_off
@@ -8393,7 +8111,6 @@
set_addr $I10, rxscan601_loop
rx597_cur."!mark_push"(0, rx597_pos, $I10)
rxscan601_done:
-.annotate 'line', 283
# rx subrule "name" subtype=capture negate=
rx597_cur."!cursor_pos"(rx597_pos)
$P10 = rx597_cur."name"()
@@ -8408,7 +8125,6 @@
debug_637:
.return (rx597_cur)
rx597_restart:
-.annotate 'line', 4
if_null rx597_debug, debug_638
rx597_cur."!cursor_debug"("NEXT", "typename")
debug_638:
@@ -8428,8 +8144,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__typename" :subid("149_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__typename" :subid("149_1283975947.19641") :method
+.annotate 'line', 0
$P599 = self."!PREFIX__!subrule"("name", "")
new $P600, "ResizablePMCArray"
push $P600, $P599
@@ -8438,8 +8154,8 @@
.namespace ["NQP";"Grammar"]
-.sub "declarator" :subid("150_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "declarator" :subid("150_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx603_tgt
.local int rx603_pos
.local int rx603_off
@@ -8476,10 +8192,8 @@
rx603_cur."!mark_push"(0, rx603_pos, $I10)
rxscan608_done:
alt609_0:
-.annotate 'line', 285
set_addr $I10, alt609_1
rx603_cur."!mark_push"(0, rx603_pos, $I10)
-.annotate 'line', 286
# rx subrule "variable_declarator" subtype=capture negate=
rx603_cur."!cursor_pos"(rx603_pos)
$P10 = rx603_cur."variable_declarator"()
@@ -8489,7 +8203,6 @@
rx603_pos = $P10."pos"()
goto alt609_end
alt609_1:
-.annotate 'line', 287
# rx subrule "routine_declarator" subtype=capture negate=
rx603_cur."!cursor_pos"(rx603_pos)
$P10 = rx603_cur."routine_declarator"()
@@ -8498,7 +8211,6 @@
$P10."!cursor_names"("routine_declarator")
rx603_pos = $P10."pos"()
alt609_end:
-.annotate 'line', 285
# rx pass
rx603_cur."!cursor_pass"(rx603_pos, "declarator")
if_null rx603_debug, debug_641
@@ -8506,7 +8218,6 @@
debug_641:
.return (rx603_cur)
rx603_restart:
-.annotate 'line', 4
if_null rx603_debug, debug_642
rx603_cur."!cursor_debug"("NEXT", "declarator")
debug_642:
@@ -8526,8 +8237,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__declarator" :subid("151_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__declarator" :subid("151_1283975947.19641") :method
+.annotate 'line', 0
$P605 = self."!PREFIX__!subrule"("routine_declarator", "")
$P606 = self."!PREFIX__!subrule"("variable_declarator", "")
new $P607, "ResizablePMCArray"
@@ -8538,8 +8249,8 @@
.namespace ["NQP";"Grammar"]
-.sub "variable_declarator" :subid("152_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "variable_declarator" :subid("152_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx611_tgt
.local int rx611_pos
.local int rx611_off
@@ -8575,7 +8286,6 @@
set_addr $I10, rxscan615_loop
rx611_cur."!mark_push"(0, rx611_pos, $I10)
rxscan615_done:
-.annotate 'line', 290
# rx subrule "variable" subtype=capture negate=
rx611_cur."!cursor_pos"(rx611_pos)
$P10 = rx611_cur."variable"()
@@ -8590,7 +8300,6 @@
debug_645:
.return (rx611_cur)
rx611_restart:
-.annotate 'line', 4
if_null rx611_debug, debug_646
rx611_cur."!cursor_debug"("NEXT", "variable_declarator")
debug_646:
@@ -8610,8 +8319,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__variable_declarator" :subid("153_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__variable_declarator" :subid("153_1283975947.19641") :method
+.annotate 'line', 0
$P613 = self."!PREFIX__!subrule"("variable", "")
new $P614, "ResizablePMCArray"
push $P614, $P613
@@ -8620,24 +8329,24 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator" :subid("154_1283368207.8572") :method
-.annotate 'line', 292
+.sub "routine_declarator" :subid("154_1283975947.19641") :method
+.annotate 'line', 0
$P617 = self."!protoregex"("routine_declarator")
.return ($P617)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator" :subid("155_1283368207.8572") :method
-.annotate 'line', 292
+.sub "!PREFIX__routine_declarator" :subid("155_1283975947.19641") :method
+.annotate 'line', 0
$P619 = self."!PREFIX__!protoregex"("routine_declarator")
.return ($P619)
.end
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator:sym<sub>" :subid("156_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "routine_declarator:sym<sub>" :subid("156_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx621_tgt
.local int rx621_pos
.local int rx621_off
@@ -8673,7 +8382,6 @@
set_addr $I10, rxscan625_loop
rx621_cur."!mark_push"(0, rx621_pos, $I10)
rxscan625_done:
-.annotate 'line', 293
# rx subcapture "sym"
set_addr $I10, rxcap_626_fail
rx621_cur."!mark_push"(0, rx621_pos, $I10)
@@ -8709,7 +8417,6 @@
debug_649:
.return (rx621_cur)
rx621_restart:
-.annotate 'line', 4
if_null rx621_debug, debug_650
rx621_cur."!cursor_debug"("NEXT", "routine_declarator:sym<sub>")
debug_650:
@@ -8729,8 +8436,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator:sym<sub>" :subid("157_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__routine_declarator:sym<sub>" :subid("157_1283975947.19641") :method
+.annotate 'line', 0
$P623 = self."!PREFIX__!subrule"("routine_def", "sub")
new $P624, "ResizablePMCArray"
push $P624, $P623
@@ -8739,8 +8446,8 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator:sym<method>" :subid("158_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "routine_declarator:sym<method>" :subid("158_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx628_tgt
.local int rx628_pos
.local int rx628_off
@@ -8776,7 +8483,6 @@
set_addr $I10, rxscan632_loop
rx628_cur."!mark_push"(0, rx628_pos, $I10)
rxscan632_done:
-.annotate 'line', 294
# rx subcapture "sym"
set_addr $I10, rxcap_633_fail
rx628_cur."!mark_push"(0, rx628_pos, $I10)
@@ -8812,7 +8518,6 @@
debug_653:
.return (rx628_cur)
rx628_restart:
-.annotate 'line', 4
if_null rx628_debug, debug_654
rx628_cur."!cursor_debug"("NEXT", "routine_declarator:sym<method>")
debug_654:
@@ -8832,8 +8537,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator:sym<method>" :subid("159_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__routine_declarator:sym<method>" :subid("159_1283975947.19641") :method
+.annotate 'line', 0
$P630 = self."!PREFIX__!subrule"("method_def", "method")
new $P631, "ResizablePMCArray"
push $P631, $P630
@@ -8842,8 +8547,8 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_def" :subid("160_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "routine_def" :subid("160_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx635_tgt
.local int rx635_pos
.local int rx635_off
@@ -8880,13 +8585,11 @@
set_addr $I10, rxscan639_loop
rx635_cur."!mark_push"(0, rx635_pos, $I10)
rxscan639_done:
-.annotate 'line', 296
# rx subrule "ws" subtype=method negate=
rx635_cur."!cursor_pos"(rx635_pos)
$P10 = rx635_cur."ws"()
unless $P10, rx635_fail
rx635_pos = $P10."pos"()
-.annotate 'line', 297
# rx rxquantr641 ** 0..1
set_addr $I10, rxquantr641_done
rx635_cur."!mark_push"(0, rx635_pos, $I10)
@@ -8944,7 +8647,6 @@
$P10 = rx635_cur."ws"()
unless $P10, rx635_fail
rx635_pos = $P10."pos"()
-.annotate 'line', 298
# rx subrule "newpad" subtype=method negate=
rx635_cur."!cursor_pos"(rx635_pos)
$P10 = rx635_cur."newpad"()
@@ -8956,7 +8658,6 @@
unless $P10, rx635_fail
rx635_pos = $P10."pos"()
alt648_0:
-.annotate 'line', 299
set_addr $I10, alt648_1
rx635_cur."!mark_push"(0, rx635_pos, $I10)
# rx subrule "ws" subtype=method negate=
@@ -9002,7 +8703,6 @@
rx635_pos = $P10."pos"()
goto alt648_end
alt648_1:
-.annotate 'line', 300
# rx subrule "ws" subtype=method negate=
rx635_cur."!cursor_pos"(rx635_pos)
$P10 = rx635_cur."ws"()
@@ -9024,7 +8724,6 @@
$P10 = rx635_cur."ws"()
unless $P10, rx635_fail
rx635_pos = $P10."pos"()
-.annotate 'line', 301
# rx subrule "blockoid" subtype=capture negate=
rx635_cur."!cursor_pos"(rx635_pos)
$P10 = rx635_cur."blockoid"()
@@ -9037,7 +8736,6 @@
$P10 = rx635_cur."ws"()
unless $P10, rx635_fail
rx635_pos = $P10."pos"()
-.annotate 'line', 296
# rx pass
rx635_cur."!cursor_pass"(rx635_pos, "routine_def")
if_null rx635_debug, debug_657
@@ -9045,7 +8743,6 @@
debug_657:
.return (rx635_cur)
rx635_restart:
-.annotate 'line', 4
if_null rx635_debug, debug_658
rx635_cur."!cursor_debug"("NEXT", "routine_def")
debug_658:
@@ -9065,8 +8762,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_def" :subid("161_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__routine_def" :subid("161_1283975947.19641") :method
+.annotate 'line', 0
$P637 = self."!PREFIX__!subrule"("ws", "")
new $P638, "ResizablePMCArray"
push $P638, $P637
@@ -9075,8 +8772,8 @@
.namespace ["NQP";"Grammar"]
-.sub "method_def" :subid("162_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "method_def" :subid("162_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx658_tgt
.local int rx658_pos
.local int rx658_off
@@ -9113,13 +8810,11 @@
set_addr $I10, rxscan662_loop
rx658_cur."!mark_push"(0, rx658_pos, $I10)
rxscan662_done:
-.annotate 'line', 304
# rx subrule "ws" subtype=method negate=
rx658_cur."!cursor_pos"(rx658_pos)
$P10 = rx658_cur."ws"()
unless $P10, rx658_fail
rx658_pos = $P10."pos"()
-.annotate 'line', 305
# rx rxquantr664 ** 0..1
set_addr $I10, rxquantr664_done
rx658_cur."!mark_push"(0, rx658_pos, $I10)
@@ -9145,7 +8840,6 @@
$P10 = rx658_cur."ws"()
unless $P10, rx658_fail
rx658_pos = $P10."pos"()
-.annotate 'line', 306
# rx subrule "newpad" subtype=method negate=
rx658_cur."!cursor_pos"(rx658_pos)
$P10 = rx658_cur."newpad"()
@@ -9157,7 +8851,6 @@
unless $P10, rx658_fail
rx658_pos = $P10."pos"()
alt668_0:
-.annotate 'line', 307
set_addr $I10, alt668_1
rx658_cur."!mark_push"(0, rx658_pos, $I10)
# rx subrule "ws" subtype=method negate=
@@ -9203,7 +8896,6 @@
rx658_pos = $P10."pos"()
goto alt668_end
alt668_1:
-.annotate 'line', 308
# rx subrule "ws" subtype=method negate=
rx658_cur."!cursor_pos"(rx658_pos)
$P10 = rx658_cur."ws"()
@@ -9225,7 +8917,6 @@
$P10 = rx658_cur."ws"()
unless $P10, rx658_fail
rx658_pos = $P10."pos"()
-.annotate 'line', 309
# rx subrule "blockoid" subtype=capture negate=
rx658_cur."!cursor_pos"(rx658_pos)
$P10 = rx658_cur."blockoid"()
@@ -9238,7 +8929,6 @@
$P10 = rx658_cur."ws"()
unless $P10, rx658_fail
rx658_pos = $P10."pos"()
-.annotate 'line', 304
# rx pass
rx658_cur."!cursor_pass"(rx658_pos, "method_def")
if_null rx658_debug, debug_661
@@ -9246,7 +8936,6 @@
debug_661:
.return (rx658_cur)
rx658_restart:
-.annotate 'line', 4
if_null rx658_debug, debug_662
rx658_cur."!cursor_debug"("NEXT", "method_def")
debug_662:
@@ -9266,8 +8955,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__method_def" :subid("163_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__method_def" :subid("163_1283975947.19641") :method
+.annotate 'line', 0
$P660 = self."!PREFIX__!subrule"("ws", "")
new $P661, "ResizablePMCArray"
push $P661, $P660
@@ -9276,27 +8965,26 @@
.namespace ["NQP";"Grammar"]
-.sub "multi_declarator" :subid("164_1283368207.8572") :method
-.annotate 'line', 312
+.sub "multi_declarator" :subid("164_1283975947.19641") :method
+.annotate 'line', 0
$P678 = self."!protoregex"("multi_declarator")
.return ($P678)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__multi_declarator" :subid("165_1283368207.8572") :method
-.annotate 'line', 312
+.sub "!PREFIX__multi_declarator" :subid("165_1283975947.19641") :method
+.annotate 'line', 0
$P680 = self."!PREFIX__!protoregex"("multi_declarator")
.return ($P680)
.end
.namespace ["NQP";"Grammar"]
-.sub "multi_declarator:sym<multi>" :subid("166_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 314
+.sub "multi_declarator:sym<multi>" :subid("166_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
new $P682, "Undef"
.lex "$*MULTINESS", $P682
-.annotate 'line', 4
.local string rx683_tgt
.local int rx683_pos
.local int rx683_off
@@ -9332,12 +9020,10 @@
set_addr $I10, rxscan687_loop
rx683_cur."!mark_push"(0, rx683_pos, $I10)
rxscan687_done:
-.annotate 'line', 314
rx683_cur."!cursor_pos"(rx683_pos)
new $P688, "String"
assign $P688, "multi"
store_lex "$*MULTINESS", $P688
-.annotate 'line', 315
# rx subcapture "sym"
set_addr $I10, rxcap_689_fail
rx683_cur."!mark_push"(0, rx683_pos, $I10)
@@ -9359,7 +9045,6 @@
rxcap_689_fail:
goto rx683_fail
rxcap_689_done:
-.annotate 'line', 316
# rx subrule "ws" subtype=method negate=
rx683_cur."!cursor_pos"(rx683_pos)
$P10 = rx683_cur."ws"()
@@ -9394,7 +9079,6 @@
unless $P10, rx683_fail
rx683_pos = $P10."pos"()
alt690_end:
-.annotate 'line', 313
# rx pass
rx683_cur."!cursor_pass"(rx683_pos, "multi_declarator:sym<multi>")
if_null rx683_debug, debug_665
@@ -9402,7 +9086,6 @@
debug_665:
.return (rx683_cur)
rx683_restart:
-.annotate 'line', 4
if_null rx683_debug, debug_666
rx683_cur."!cursor_debug"("NEXT", "multi_declarator:sym<multi>")
debug_666:
@@ -9422,8 +9105,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__multi_declarator:sym<multi>" :subid("167_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__multi_declarator:sym<multi>" :subid("167_1283975947.19641") :method
+.annotate 'line', 0
$P685 = self."!PREFIX__!subrule"("ws", "multi")
new $P686, "ResizablePMCArray"
push $P686, $P685
@@ -9432,11 +9115,10 @@
.namespace ["NQP";"Grammar"]
-.sub "multi_declarator:sym<null>" :subid("168_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 319
+.sub "multi_declarator:sym<null>" :subid("168_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
new $P692, "Undef"
.lex "$*MULTINESS", $P692
-.annotate 'line', 4
.local string rx693_tgt
.local int rx693_pos
.local int rx693_off
@@ -9472,12 +9154,10 @@
set_addr $I10, rxscan697_loop
rx693_cur."!mark_push"(0, rx693_pos, $I10)
rxscan697_done:
-.annotate 'line', 319
rx693_cur."!cursor_pos"(rx693_pos)
new $P698, "String"
assign $P698, ""
store_lex "$*MULTINESS", $P698
-.annotate 'line', 320
# rx subrule "declarator" subtype=capture negate=
rx693_cur."!cursor_pos"(rx693_pos)
$P10 = rx693_cur."declarator"()
@@ -9485,7 +9165,6 @@
rx693_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("declarator")
rx693_pos = $P10."pos"()
-.annotate 'line', 318
# rx pass
rx693_cur."!cursor_pass"(rx693_pos, "multi_declarator:sym<null>")
if_null rx693_debug, debug_669
@@ -9493,7 +9172,6 @@
debug_669:
.return (rx693_cur)
rx693_restart:
-.annotate 'line', 4
if_null rx693_debug, debug_670
rx693_cur."!cursor_debug"("NEXT", "multi_declarator:sym<null>")
debug_670:
@@ -9513,8 +9191,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__multi_declarator:sym<null>" :subid("169_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__multi_declarator:sym<null>" :subid("169_1283975947.19641") :method
+.annotate 'line', 0
$P695 = self."!PREFIX__!subrule"("declarator", "")
new $P696, "ResizablePMCArray"
push $P696, $P695
@@ -9523,8 +9201,8 @@
.namespace ["NQP";"Grammar"]
-.sub "signature" :subid("170_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "signature" :subid("170_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx700_tgt
.local int rx700_pos
.local int rx700_off
@@ -9561,7 +9239,6 @@
set_addr $I10, rxscan703_loop
rx700_cur."!mark_push"(0, rx700_pos, $I10)
rxscan703_done:
-.annotate 'line', 323
# rx rxquantr704 ** 0..1
set_addr $I10, rxquantr704_done
rx700_cur."!mark_push"(0, rx700_pos, $I10)
@@ -9610,7 +9287,6 @@
debug_673:
.return (rx700_cur)
rx700_restart:
-.annotate 'line', 4
if_null rx700_debug, debug_674
rx700_cur."!cursor_debug"("NEXT", "signature")
debug_674:
@@ -9630,8 +9306,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__signature" :subid("171_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__signature" :subid("171_1283975947.19641") :method
+.annotate 'line', 0
new $P702, "ResizablePMCArray"
push $P702, ""
.return ($P702)
@@ -9639,8 +9315,8 @@
.namespace ["NQP";"Grammar"]
-.sub "parameter" :subid("172_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "parameter" :subid("172_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx707_tgt
.local int rx707_pos
.local int rx707_off
@@ -9677,7 +9353,6 @@
set_addr $I10, rxscan710_loop
rx707_cur."!mark_push"(0, rx707_pos, $I10)
rxscan710_done:
-.annotate 'line', 326
# rx rxquantr711 ** 0..*
set_addr $I10, rxquantr711_done
rx707_cur."!mark_push"(0, rx707_pos, $I10)
@@ -9701,10 +9376,8 @@
goto rxquantr711_loop
rxquantr711_done:
alt712_0:
-.annotate 'line', 327
set_addr $I10, alt712_1
rx707_cur."!mark_push"(0, rx707_pos, $I10)
-.annotate 'line', 328
# rx subcapture "quant"
set_addr $I10, rxcap_713_fail
rx707_cur."!mark_push"(0, rx707_pos, $I10)
@@ -9736,7 +9409,6 @@
goto alt712_end
alt712_1:
alt714_0:
-.annotate 'line', 329
set_addr $I10, alt714_1
rx707_cur."!mark_push"(0, rx707_pos, $I10)
# rx subrule "param_var" subtype=capture negate=
@@ -9795,7 +9467,6 @@
goto rx707_fail
rxcap_716_done:
alt712_end:
-.annotate 'line', 331
# rx rxquantr717 ** 0..1
set_addr $I10, rxquantr717_done
rx707_cur."!mark_push"(0, rx707_pos, $I10)
@@ -9816,7 +9487,6 @@
set_addr $I10, rxquantr717_done
(rx707_rep) = rx707_cur."!mark_commit"($I10)
rxquantr717_done:
-.annotate 'line', 325
# rx pass
rx707_cur."!cursor_pass"(rx707_pos, "parameter")
if_null rx707_debug, debug_677
@@ -9824,7 +9494,6 @@
debug_677:
.return (rx707_cur)
rx707_restart:
-.annotate 'line', 4
if_null rx707_debug, debug_678
rx707_cur."!cursor_debug"("NEXT", "parameter")
debug_678:
@@ -9844,8 +9513,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__parameter" :subid("173_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__parameter" :subid("173_1283975947.19641") :method
+.annotate 'line', 0
new $P709, "ResizablePMCArray"
push $P709, ""
.return ($P709)
@@ -9853,8 +9522,8 @@
.namespace ["NQP";"Grammar"]
-.sub "param_var" :subid("174_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "param_var" :subid("174_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx720_tgt
.local int rx720_pos
.local int rx720_off
@@ -9891,7 +9560,6 @@
set_addr $I10, rxscan724_loop
rx720_cur."!mark_push"(0, rx720_pos, $I10)
rxscan724_done:
-.annotate 'line', 335
# rx subrule "sigil" subtype=capture negate=
rx720_cur."!cursor_pos"(rx720_pos)
$P10 = rx720_cur."sigil"()
@@ -9920,7 +9588,6 @@
(rx720_rep) = rx720_cur."!mark_commit"($I10)
rxquantr725_done:
alt727_0:
-.annotate 'line', 336
set_addr $I10, alt727_1
rx720_cur."!mark_push"(0, rx720_pos, $I10)
# rx subrule "ident" subtype=capture negate=
@@ -9954,7 +9621,6 @@
goto rx720_fail
rxcap_728_done:
alt727_end:
-.annotate 'line', 334
# rx pass
rx720_cur."!cursor_pass"(rx720_pos, "param_var")
if_null rx720_debug, debug_681
@@ -9962,7 +9628,6 @@
debug_681:
.return (rx720_cur)
rx720_restart:
-.annotate 'line', 4
if_null rx720_debug, debug_682
rx720_cur."!cursor_debug"("NEXT", "param_var")
debug_682:
@@ -9982,8 +9647,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__param_var" :subid("175_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__param_var" :subid("175_1283975947.19641") :method
+.annotate 'line', 0
$P722 = self."!PREFIX__!subrule"("sigil", "")
new $P723, "ResizablePMCArray"
push $P723, $P722
@@ -9992,8 +9657,8 @@
.namespace ["NQP";"Grammar"]
-.sub "named_param" :subid("176_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "named_param" :subid("176_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx730_tgt
.local int rx730_pos
.local int rx730_off
@@ -10029,7 +9694,6 @@
set_addr $I10, rxscan734_loop
rx730_cur."!mark_push"(0, rx730_pos, $I10)
rxscan734_done:
-.annotate 'line', 340
# rx literal ":"
add $I11, rx730_pos, 1
gt $I11, rx730_eos, rx730_fail
@@ -10044,7 +9708,6 @@
rx730_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("param_var")
rx730_pos = $P10."pos"()
-.annotate 'line', 339
# rx pass
rx730_cur."!cursor_pass"(rx730_pos, "named_param")
if_null rx730_debug, debug_685
@@ -10052,7 +9715,6 @@
debug_685:
.return (rx730_cur)
rx730_restart:
-.annotate 'line', 4
if_null rx730_debug, debug_686
rx730_cur."!cursor_debug"("NEXT", "named_param")
debug_686:
@@ -10072,8 +9734,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__named_param" :subid("177_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__named_param" :subid("177_1283975947.19641") :method
+.annotate 'line', 0
$P732 = self."!PREFIX__!subrule"("param_var", ":")
new $P733, "ResizablePMCArray"
push $P733, $P732
@@ -10082,8 +9744,8 @@
.namespace ["NQP";"Grammar"]
-.sub "default_value" :subid("178_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "default_value" :subid("178_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx736_tgt
.local int rx736_pos
.local int rx736_off
@@ -10119,7 +9781,6 @@
set_addr $I10, rxscan740_loop
rx736_cur."!mark_push"(0, rx736_pos, $I10)
rxscan740_done:
-.annotate 'line', 343
# rx subrule "ws" subtype=method negate=
rx736_cur."!cursor_pos"(rx736_pos)
$P10 = rx736_cur."ws"()
@@ -10156,7 +9817,6 @@
debug_689:
.return (rx736_cur)
rx736_restart:
-.annotate 'line', 4
if_null rx736_debug, debug_690
rx736_cur."!cursor_debug"("NEXT", "default_value")
debug_690:
@@ -10176,8 +9836,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__default_value" :subid("179_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__default_value" :subid("179_1283975947.19641") :method
+.annotate 'line', 0
$P738 = self."!PREFIX__!subrule"("ws", "")
new $P739, "ResizablePMCArray"
push $P739, $P738
@@ -10186,8 +9846,8 @@
.namespace ["NQP";"Grammar"]
-.sub "regex_declarator" :subid("180_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "regex_declarator" :subid("180_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx745_tgt
.local int rx745_pos
.local int rx745_off
@@ -10224,17 +9884,14 @@
set_addr $I10, rxscan749_loop
rx745_cur."!mark_push"(0, rx745_pos, $I10)
rxscan749_done:
-.annotate 'line', 345
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
alt751_0:
-.annotate 'line', 346
set_addr $I10, alt751_1
rx745_cur."!mark_push"(0, rx745_pos, $I10)
-.annotate 'line', 347
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
@@ -10302,7 +9959,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 348
# rx subrule "deflongname" subtype=capture negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."deflongname"()
@@ -10316,10 +9972,8 @@
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
alt758_0:
-.annotate 'line', 349
set_addr $I10, alt758_1
rx745_cur."!mark_push"(0, rx745_pos, $I10)
-.annotate 'line', 350
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
@@ -10367,7 +10021,6 @@
rx745_pos = $P10."pos"()
goto alt758_end
alt758_1:
-.annotate 'line', 351
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
@@ -10384,16 +10037,13 @@
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
alt758_end:
-.annotate 'line', 352
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 347
goto alt751_end
alt751_1:
-.annotate 'line', 353
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
@@ -10449,7 +10099,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 354
# rx subrule "deflongname" subtype=capture negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."deflongname"()
@@ -10462,7 +10111,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 355
# rx subrule "newpad" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."newpad"()
@@ -10473,7 +10121,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 356
# rx rxquantr772 ** 0..1
set_addr $I10, rxquantr772_done
rx745_cur."!mark_push"(0, rx745_pos, $I10)
@@ -10527,7 +10174,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 357
# rx reduce name="regex_declarator" key="open"
rx745_cur."!cursor_pos"(rx745_pos)
rx745_cur."!reduce"("regex_declarator", "open")
@@ -10536,7 +10182,6 @@
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 358
# rx literal "{"
add $I11, rx745_pos, 1
gt $I11, rx745_eos, rx745_fail
@@ -10568,13 +10213,11 @@
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
alt751_end:
-.annotate 'line', 359
# rx subrule "ws" subtype=method negate=
rx745_cur."!cursor_pos"(rx745_pos)
$P10 = rx745_cur."ws"()
unless $P10, rx745_fail
rx745_pos = $P10."pos"()
-.annotate 'line', 345
# rx pass
rx745_cur."!cursor_pass"(rx745_pos, "regex_declarator")
if_null rx745_debug, debug_693
@@ -10582,7 +10225,6 @@
debug_693:
.return (rx745_cur)
rx745_restart:
-.annotate 'line', 4
if_null rx745_debug, debug_694
rx745_cur."!cursor_debug"("NEXT", "regex_declarator")
debug_694:
@@ -10602,8 +10244,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__regex_declarator" :subid("181_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__regex_declarator" :subid("181_1283975947.19641") :method
+.annotate 'line', 0
$P747 = self."!PREFIX__!subrule"("ws", "")
new $P748, "ResizablePMCArray"
push $P748, $P747
@@ -10612,8 +10254,8 @@
.namespace ["NQP";"Grammar"]
-.sub "dotty" :subid("182_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "dotty" :subid("182_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx782_tgt
.local int rx782_pos
.local int rx782_off
@@ -10650,7 +10292,6 @@
set_addr $I10, rxscan786_loop
rx782_cur."!mark_push"(0, rx782_pos, $I10)
rxscan786_done:
-.annotate 'line', 363
# rx literal "."
add $I11, rx782_pos, 1
gt $I11, rx782_eos, rx782_fail
@@ -10659,7 +10300,6 @@
ne $I11, 46, rx782_fail
add rx782_pos, 1
alt787_0:
-.annotate 'line', 364
set_addr $I10, alt787_1
rx782_cur."!mark_push"(0, rx782_pos, $I10)
# rx subrule "deflongname" subtype=capture negate=
@@ -10671,7 +10311,6 @@
rx782_pos = $P10."pos"()
goto alt787_end
alt787_1:
-.annotate 'line', 365
# rx enumcharlist negate=0 zerowidth
ge rx782_pos, rx782_eos, rx782_fail
sub $I10, rx782_pos, rx782_off
@@ -10686,7 +10325,6 @@
$P10."!cursor_names"("quote")
rx782_pos = $P10."pos"()
alt788_0:
-.annotate 'line', 366
set_addr $I10, alt788_1
rx782_cur."!mark_push"(0, rx782_pos, $I10)
# rx enumcharlist negate=0 zerowidth
@@ -10704,16 +10342,13 @@
rx782_pos = $P10."pos"()
alt788_end:
alt787_end:
-.annotate 'line', 372
# rx rxquantr789 ** 0..1
set_addr $I10, rxquantr789_done
rx782_cur."!mark_push"(0, rx782_pos, $I10)
rxquantr789_loop:
alt790_0:
-.annotate 'line', 369
set_addr $I10, alt790_1
rx782_cur."!mark_push"(0, rx782_pos, $I10)
-.annotate 'line', 370
# rx enumcharlist negate=0 zerowidth
ge rx782_pos, rx782_eos, rx782_fail
sub $I10, rx782_pos, rx782_off
@@ -10729,7 +10364,6 @@
rx782_pos = $P10."pos"()
goto alt790_end
alt790_1:
-.annotate 'line', 371
# rx literal ":"
add $I11, rx782_pos, 1
gt $I11, rx782_eos, rx782_fail
@@ -10751,11 +10385,9 @@
$P10."!cursor_names"("args")
rx782_pos = $P10."pos"()
alt790_end:
-.annotate 'line', 372
set_addr $I10, rxquantr789_done
(rx782_rep) = rx782_cur."!mark_commit"($I10)
rxquantr789_done:
-.annotate 'line', 362
# rx pass
rx782_cur."!cursor_pass"(rx782_pos, "dotty")
if_null rx782_debug, debug_697
@@ -10763,7 +10395,6 @@
debug_697:
.return (rx782_cur)
rx782_restart:
-.annotate 'line', 4
if_null rx782_debug, debug_698
rx782_cur."!cursor_debug"("NEXT", "dotty")
debug_698:
@@ -10783,8 +10414,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__dotty" :subid("183_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__dotty" :subid("183_1283975947.19641") :method
+.annotate 'line', 0
$P784 = self."!PREFIX__!subrule"("deflongname", ".")
new $P785, "ResizablePMCArray"
push $P785, "'"
@@ -10795,24 +10426,24 @@
.namespace ["NQP";"Grammar"]
-.sub "term" :subid("184_1283368207.8572") :method
-.annotate 'line', 376
+.sub "term" :subid("184_1283975947.19641") :method
+.annotate 'line', 0
$P792 = self."!protoregex"("term")
.return ($P792)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term" :subid("185_1283368207.8572") :method
-.annotate 'line', 376
+.sub "!PREFIX__term" :subid("185_1283975947.19641") :method
+.annotate 'line', 0
$P794 = self."!PREFIX__!protoregex"("term")
.return ($P794)
.end
.namespace ["NQP";"Grammar"]
-.sub "term:sym<self>" :subid("186_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<self>" :subid("186_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx796_tgt
.local int rx796_pos
.local int rx796_off
@@ -10848,7 +10479,6 @@
set_addr $I10, rxscan799_loop
rx796_cur."!mark_push"(0, rx796_pos, $I10)
rxscan799_done:
-.annotate 'line', 378
# rx subcapture "sym"
set_addr $I10, rxcap_800_fail
rx796_cur."!mark_push"(0, rx796_pos, $I10)
@@ -10885,7 +10515,6 @@
debug_701:
.return (rx796_cur)
rx796_restart:
-.annotate 'line', 4
if_null rx796_debug, debug_702
rx796_cur."!cursor_debug"("NEXT", "term:sym<self>")
debug_702:
@@ -10905,8 +10534,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<self>" :subid("187_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<self>" :subid("187_1283975947.19641") :method
+.annotate 'line', 0
new $P798, "ResizablePMCArray"
push $P798, "self"
.return ($P798)
@@ -10914,8 +10543,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<identifier>" :subid("188_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<identifier>" :subid("188_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx802_tgt
.local int rx802_pos
.local int rx802_off
@@ -10951,7 +10580,6 @@
set_addr $I10, rxscan806_loop
rx802_cur."!mark_push"(0, rx802_pos, $I10)
rxscan806_done:
-.annotate 'line', 381
# rx subrule "deflongname" subtype=capture negate=
rx802_cur."!cursor_pos"(rx802_pos)
$P10 = rx802_cur."deflongname"()
@@ -10972,7 +10600,6 @@
rx802_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("args")
rx802_pos = $P10."pos"()
-.annotate 'line', 380
# rx pass
rx802_cur."!cursor_pass"(rx802_pos, "term:sym<identifier>")
if_null rx802_debug, debug_705
@@ -10980,7 +10607,6 @@
debug_705:
.return (rx802_cur)
rx802_restart:
-.annotate 'line', 4
if_null rx802_debug, debug_706
rx802_cur."!cursor_debug"("NEXT", "term:sym<identifier>")
debug_706:
@@ -11000,8 +10626,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<identifier>" :subid("189_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<identifier>" :subid("189_1283975947.19641") :method
+.annotate 'line', 0
$P804 = self."!PREFIX__!subrule"("deflongname", "")
new $P805, "ResizablePMCArray"
push $P805, $P804
@@ -11010,8 +10636,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<name>" :subid("190_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<name>" :subid("190_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx808_tgt
.local int rx808_pos
.local int rx808_off
@@ -11048,7 +10674,6 @@
set_addr $I10, rxscan812_loop
rx808_cur."!mark_push"(0, rx808_pos, $I10)
rxscan812_done:
-.annotate 'line', 385
# rx subrule "name" subtype=capture negate=
rx808_cur."!cursor_pos"(rx808_pos)
$P10 = rx808_cur."name"()
@@ -11076,7 +10701,6 @@
set_addr $I10, rxquantr813_done
(rx808_rep) = rx808_cur."!mark_commit"($I10)
rxquantr813_done:
-.annotate 'line', 384
# rx pass
rx808_cur."!cursor_pass"(rx808_pos, "term:sym<name>")
if_null rx808_debug, debug_709
@@ -11084,7 +10708,6 @@
debug_709:
.return (rx808_cur)
rx808_restart:
-.annotate 'line', 4
if_null rx808_debug, debug_710
rx808_cur."!cursor_debug"("NEXT", "term:sym<name>")
debug_710:
@@ -11104,8 +10727,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<name>" :subid("191_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<name>" :subid("191_1283975947.19641") :method
+.annotate 'line', 0
$P810 = self."!PREFIX__!subrule"("name", "")
new $P811, "ResizablePMCArray"
push $P811, $P810
@@ -11114,8 +10737,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<pir::op>" :subid("192_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<pir::op>" :subid("192_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx816_tgt
.local int rx816_pos
.local int rx816_off
@@ -11152,7 +10775,6 @@
set_addr $I10, rxscan819_loop
rx816_cur."!mark_push"(0, rx816_pos, $I10)
rxscan819_done:
-.annotate 'line', 389
# rx literal "pir::"
add $I11, rx816_pos, 5
gt $I11, rx816_eos, rx816_fail
@@ -11200,7 +10822,6 @@
set_addr $I10, rxquantr821_done
(rx816_rep) = rx816_cur."!mark_commit"($I10)
rxquantr821_done:
-.annotate 'line', 388
# rx pass
rx816_cur."!cursor_pass"(rx816_pos, "term:sym<pir::op>")
if_null rx816_debug, debug_713
@@ -11208,7 +10829,6 @@
debug_713:
.return (rx816_cur)
rx816_restart:
-.annotate 'line', 4
if_null rx816_debug, debug_714
rx816_cur."!cursor_debug"("NEXT", "term:sym<pir::op>")
debug_714:
@@ -11228,8 +10848,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<pir::op>" :subid("193_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<pir::op>" :subid("193_1283975947.19641") :method
+.annotate 'line', 0
new $P818, "ResizablePMCArray"
push $P818, "pir::"
.return ($P818)
@@ -11237,8 +10857,8 @@
.namespace ["NQP";"Grammar"]
-.sub "args" :subid("194_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "args" :subid("194_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx824_tgt
.local int rx824_pos
.local int rx824_off
@@ -11274,7 +10894,6 @@
set_addr $I10, rxscan828_loop
rx824_cur."!mark_push"(0, rx824_pos, $I10)
rxscan828_done:
-.annotate 'line', 393
# rx literal "("
add $I11, rx824_pos, 1
gt $I11, rx824_eos, rx824_fail
@@ -11303,7 +10922,6 @@
debug_717:
.return (rx824_cur)
rx824_restart:
-.annotate 'line', 4
if_null rx824_debug, debug_718
rx824_cur."!cursor_debug"("NEXT", "args")
debug_718:
@@ -11323,8 +10941,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__args" :subid("195_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__args" :subid("195_1283975947.19641") :method
+.annotate 'line', 0
$P826 = self."!PREFIX__!subrule"("arglist", "(")
new $P827, "ResizablePMCArray"
push $P827, $P826
@@ -11333,8 +10951,8 @@
.namespace ["NQP";"Grammar"]
-.sub "arglist" :subid("196_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "arglist" :subid("196_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx830_tgt
.local int rx830_pos
.local int rx830_off
@@ -11370,17 +10988,14 @@
set_addr $I10, rxscan834_loop
rx830_cur."!mark_push"(0, rx830_pos, $I10)
rxscan834_done:
-.annotate 'line', 397
# rx subrule "ws" subtype=method negate=
rx830_cur."!cursor_pos"(rx830_pos)
$P10 = rx830_cur."ws"()
unless $P10, rx830_fail
rx830_pos = $P10."pos"()
alt835_0:
-.annotate 'line', 398
set_addr $I10, alt835_1
rx830_cur."!mark_push"(0, rx830_pos, $I10)
-.annotate 'line', 399
# rx subrule "EXPR" subtype=capture negate=
rx830_cur."!cursor_pos"(rx830_pos)
$P10 = rx830_cur."EXPR"("f=")
@@ -11391,7 +11006,6 @@
goto alt835_end
alt835_1:
alt835_end:
-.annotate 'line', 396
# rx pass
rx830_cur."!cursor_pass"(rx830_pos, "arglist")
if_null rx830_debug, debug_721
@@ -11399,7 +11013,6 @@
debug_721:
.return (rx830_cur)
rx830_restart:
-.annotate 'line', 4
if_null rx830_debug, debug_722
rx830_cur."!cursor_debug"("NEXT", "arglist")
debug_722:
@@ -11419,8 +11032,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__arglist" :subid("197_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__arglist" :subid("197_1283975947.19641") :method
+.annotate 'line', 0
$P832 = self."!PREFIX__!subrule"("ws", "")
new $P833, "ResizablePMCArray"
push $P833, $P832
@@ -11429,8 +11042,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<value>" :subid("198_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "term:sym<value>" :subid("198_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx837_tgt
.local int rx837_pos
.local int rx837_off
@@ -11466,7 +11079,6 @@
set_addr $I10, rxscan841_loop
rx837_cur."!mark_push"(0, rx837_pos, $I10)
rxscan841_done:
-.annotate 'line', 405
# rx subrule "value" subtype=capture negate=
rx837_cur."!cursor_pos"(rx837_pos)
$P10 = rx837_cur."value"()
@@ -11481,7 +11093,6 @@
debug_725:
.return (rx837_cur)
rx837_restart:
-.annotate 'line', 4
if_null rx837_debug, debug_726
rx837_cur."!cursor_debug"("NEXT", "term:sym<value>")
debug_726:
@@ -11501,8 +11112,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<value>" :subid("199_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__term:sym<value>" :subid("199_1283975947.19641") :method
+.annotate 'line', 0
$P839 = self."!PREFIX__!subrule"("value", "")
new $P840, "ResizablePMCArray"
push $P840, $P839
@@ -11511,8 +11122,8 @@
.namespace ["NQP";"Grammar"]
-.sub "value" :subid("200_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "value" :subid("200_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx843_tgt
.local int rx843_pos
.local int rx843_off
@@ -11549,10 +11160,8 @@
rx843_cur."!mark_push"(0, rx843_pos, $I10)
rxscan848_done:
alt849_0:
-.annotate 'line', 407
set_addr $I10, alt849_1
rx843_cur."!mark_push"(0, rx843_pos, $I10)
-.annotate 'line', 408
# rx subrule "quote" subtype=capture negate=
rx843_cur."!cursor_pos"(rx843_pos)
$P10 = rx843_cur."quote"()
@@ -11562,7 +11171,6 @@
rx843_pos = $P10."pos"()
goto alt849_end
alt849_1:
-.annotate 'line', 409
# rx subrule "number" subtype=capture negate=
rx843_cur."!cursor_pos"(rx843_pos)
$P10 = rx843_cur."number"()
@@ -11571,7 +11179,6 @@
$P10."!cursor_names"("number")
rx843_pos = $P10."pos"()
alt849_end:
-.annotate 'line', 407
# rx pass
rx843_cur."!cursor_pass"(rx843_pos, "value")
if_null rx843_debug, debug_729
@@ -11579,7 +11186,6 @@
debug_729:
.return (rx843_cur)
rx843_restart:
-.annotate 'line', 4
if_null rx843_debug, debug_730
rx843_cur."!cursor_debug"("NEXT", "value")
debug_730:
@@ -11599,8 +11205,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__value" :subid("201_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__value" :subid("201_1283975947.19641") :method
+.annotate 'line', 0
$P845 = self."!PREFIX__!subrule"("number", "")
$P846 = self."!PREFIX__!subrule"("quote", "")
new $P847, "ResizablePMCArray"
@@ -11611,8 +11217,8 @@
.namespace ["NQP";"Grammar"]
-.sub "number" :subid("202_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "number" :subid("202_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx851_tgt
.local int rx851_pos
.local int rx851_off
@@ -11648,7 +11254,6 @@
set_addr $I10, rxscan854_loop
rx851_cur."!mark_push"(0, rx851_pos, $I10)
rxscan854_done:
-.annotate 'line', 413
# rx subcapture "sign"
set_addr $I10, rxcap_856_fail
rx851_cur."!mark_push"(0, rx851_pos, $I10)
@@ -11678,7 +11283,6 @@
goto rx851_fail
rxcap_856_done:
alt857_0:
-.annotate 'line', 414
set_addr $I10, alt857_1
rx851_cur."!mark_push"(0, rx851_pos, $I10)
# rx subrule "dec_number" subtype=capture negate=
@@ -11698,7 +11302,6 @@
$P10."!cursor_names"("integer")
rx851_pos = $P10."pos"()
alt857_end:
-.annotate 'line', 412
# rx pass
rx851_cur."!cursor_pass"(rx851_pos, "number")
if_null rx851_debug, debug_733
@@ -11706,7 +11309,6 @@
debug_733:
.return (rx851_cur)
rx851_restart:
-.annotate 'line', 4
if_null rx851_debug, debug_734
rx851_cur."!cursor_debug"("NEXT", "number")
debug_734:
@@ -11726,8 +11328,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__number" :subid("203_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__number" :subid("203_1283975947.19641") :method
+.annotate 'line', 0
new $P853, "ResizablePMCArray"
push $P853, ""
.return ($P853)
@@ -11735,24 +11337,24 @@
.namespace ["NQP";"Grammar"]
-.sub "quote" :subid("204_1283368207.8572") :method
-.annotate 'line', 417
+.sub "quote" :subid("204_1283975947.19641") :method
+.annotate 'line', 0
$P859 = self."!protoregex"("quote")
.return ($P859)
.end
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote" :subid("205_1283368207.8572") :method
-.annotate 'line', 417
+.sub "!PREFIX__quote" :subid("205_1283975947.19641") :method
+.annotate 'line', 0
$P861 = self."!PREFIX__!protoregex"("quote")
.return ($P861)
.end
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<apos>" :subid("206_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<apos>" :subid("206_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx863_tgt
.local int rx863_pos
.local int rx863_off
@@ -11788,7 +11390,6 @@
set_addr $I10, rxscan866_loop
rx863_cur."!mark_push"(0, rx863_pos, $I10)
rxscan866_done:
-.annotate 'line', 418
# rx enumcharlist negate=0 zerowidth
ge rx863_pos, rx863_eos, rx863_fail
sub $I10, rx863_pos, rx863_off
@@ -11809,7 +11410,6 @@
debug_737:
.return (rx863_cur)
rx863_restart:
-.annotate 'line', 4
if_null rx863_debug, debug_738
rx863_cur."!cursor_debug"("NEXT", "quote:sym<apos>")
debug_738:
@@ -11829,8 +11429,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<apos>" :subid("207_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<apos>" :subid("207_1283975947.19641") :method
+.annotate 'line', 0
new $P865, "ResizablePMCArray"
push $P865, "'"
.return ($P865)
@@ -11838,8 +11438,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<dblq>" :subid("208_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<dblq>" :subid("208_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx868_tgt
.local int rx868_pos
.local int rx868_off
@@ -11875,7 +11475,6 @@
set_addr $I10, rxscan871_loop
rx868_cur."!mark_push"(0, rx868_pos, $I10)
rxscan871_done:
-.annotate 'line', 419
# rx enumcharlist negate=0 zerowidth
ge rx868_pos, rx868_eos, rx868_fail
sub $I10, rx868_pos, rx868_off
@@ -11896,7 +11495,6 @@
debug_741:
.return (rx868_cur)
rx868_restart:
-.annotate 'line', 4
if_null rx868_debug, debug_742
rx868_cur."!cursor_debug"("NEXT", "quote:sym<dblq>")
debug_742:
@@ -11916,8 +11514,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<dblq>" :subid("209_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<dblq>" :subid("209_1283975947.19641") :method
+.annotate 'line', 0
new $P870, "ResizablePMCArray"
push $P870, "\""
.return ($P870)
@@ -11925,8 +11523,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<q>" :subid("210_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<q>" :subid("210_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx873_tgt
.local int rx873_pos
.local int rx873_off
@@ -11962,7 +11560,6 @@
set_addr $I10, rxscan877_loop
rx873_cur."!mark_push"(0, rx873_pos, $I10)
rxscan877_done:
-.annotate 'line', 420
# rx literal "q"
add $I11, rx873_pos, 1
gt $I11, rx873_eos, rx873_fail
@@ -12003,7 +11600,6 @@
debug_745:
.return (rx873_cur)
rx873_restart:
-.annotate 'line', 4
if_null rx873_debug, debug_746
rx873_cur."!cursor_debug"("NEXT", "quote:sym<q>")
debug_746:
@@ -12023,8 +11619,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<q>" :subid("211_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<q>" :subid("211_1283975947.19641") :method
+.annotate 'line', 0
$P875 = self."!PREFIX__!subrule"("ws", "q")
new $P876, "ResizablePMCArray"
push $P876, $P875
@@ -12033,8 +11629,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<qq>" :subid("212_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<qq>" :subid("212_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx879_tgt
.local int rx879_pos
.local int rx879_off
@@ -12070,7 +11666,6 @@
set_addr $I10, rxscan883_loop
rx879_cur."!mark_push"(0, rx879_pos, $I10)
rxscan883_done:
-.annotate 'line', 421
# rx literal "qq"
add $I11, rx879_pos, 2
gt $I11, rx879_eos, rx879_fail
@@ -12111,7 +11706,6 @@
debug_749:
.return (rx879_cur)
rx879_restart:
-.annotate 'line', 4
if_null rx879_debug, debug_750
rx879_cur."!cursor_debug"("NEXT", "quote:sym<qq>")
debug_750:
@@ -12131,8 +11725,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<qq>" :subid("213_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<qq>" :subid("213_1283975947.19641") :method
+.annotate 'line', 0
$P881 = self."!PREFIX__!subrule"("ws", "qq")
new $P882, "ResizablePMCArray"
push $P882, $P881
@@ -12141,8 +11735,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<Q>" :subid("214_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<Q>" :subid("214_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx885_tgt
.local int rx885_pos
.local int rx885_off
@@ -12178,7 +11772,6 @@
set_addr $I10, rxscan889_loop
rx885_cur."!mark_push"(0, rx885_pos, $I10)
rxscan889_done:
-.annotate 'line', 422
# rx literal "Q"
add $I11, rx885_pos, 1
gt $I11, rx885_eos, rx885_fail
@@ -12219,7 +11812,6 @@
debug_753:
.return (rx885_cur)
rx885_restart:
-.annotate 'line', 4
if_null rx885_debug, debug_754
rx885_cur."!cursor_debug"("NEXT", "quote:sym<Q>")
debug_754:
@@ -12239,8 +11831,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<Q>" :subid("215_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<Q>" :subid("215_1283975947.19641") :method
+.annotate 'line', 0
$P887 = self."!PREFIX__!subrule"("ws", "Q")
new $P888, "ResizablePMCArray"
push $P888, $P887
@@ -12249,8 +11841,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<Q:PIR>" :subid("216_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym<Q:PIR>" :subid("216_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx891_tgt
.local int rx891_pos
.local int rx891_off
@@ -12286,7 +11878,6 @@
set_addr $I10, rxscan895_loop
rx891_cur."!mark_push"(0, rx891_pos, $I10)
rxscan895_done:
-.annotate 'line', 423
# rx literal "Q:PIR"
add $I11, rx891_pos, 5
gt $I11, rx891_eos, rx891_fail
@@ -12313,7 +11904,6 @@
debug_757:
.return (rx891_cur)
rx891_restart:
-.annotate 'line', 4
if_null rx891_debug, debug_758
rx891_cur."!cursor_debug"("NEXT", "quote:sym<Q:PIR>")
debug_758:
@@ -12333,8 +11923,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<Q:PIR>" :subid("217_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym<Q:PIR>" :subid("217_1283975947.19641") :method
+.annotate 'line', 0
$P893 = self."!PREFIX__!subrule"("ws", "Q:PIR")
new $P894, "ResizablePMCArray"
push $P894, $P893
@@ -12343,8 +11933,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym</ />" :subid("218_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote:sym</ />" :subid("218_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx897_tgt
.local int rx897_pos
.local int rx897_off
@@ -12380,7 +11970,6 @@
set_addr $I10, rxscan901_loop
rx897_cur."!mark_push"(0, rx897_pos, $I10)
rxscan901_done:
-.annotate 'line', 425
# rx literal "/"
add $I11, rx897_pos, 1
gt $I11, rx897_eos, rx897_fail
@@ -12388,17 +11977,14 @@
ord $I11, rx897_tgt, $I11
ne $I11, 47, rx897_fail
add rx897_pos, 1
-.annotate 'line', 426
# rx subrule "newpad" subtype=method negate=
rx897_cur."!cursor_pos"(rx897_pos)
$P10 = rx897_cur."newpad"()
unless $P10, rx897_fail
rx897_pos = $P10."pos"()
-.annotate 'line', 427
# rx reduce name="quote:sym</ />" key="open"
rx897_cur."!cursor_pos"(rx897_pos)
rx897_cur."!reduce"("quote:sym</ />", "open")
-.annotate 'line', 428
# rx subrule "LANG" subtype=capture negate=
rx897_cur."!cursor_pos"(rx897_pos)
$P10 = rx897_cur."LANG"("Regex", "nibbler")
@@ -12406,7 +11992,6 @@
rx897_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("p6regex")
rx897_pos = $P10."pos"()
-.annotate 'line', 429
# rx literal "/"
add $I11, rx897_pos, 1
gt $I11, rx897_eos, rx897_fail
@@ -12414,7 +11999,6 @@
ord $I11, rx897_tgt, $I11
ne $I11, 47, rx897_fail
add rx897_pos, 1
-.annotate 'line', 424
# rx pass
rx897_cur."!cursor_pass"(rx897_pos, "quote:sym</ />")
if_null rx897_debug, debug_761
@@ -12422,7 +12006,6 @@
debug_761:
.return (rx897_cur)
rx897_restart:
-.annotate 'line', 4
if_null rx897_debug, debug_762
rx897_cur."!cursor_debug"("NEXT", "quote:sym</ />")
debug_762:
@@ -12442,8 +12025,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym</ />" :subid("219_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote:sym</ />" :subid("219_1283975947.19641") :method
+.annotate 'line', 0
$P899 = self."!PREFIX__!subrule"("newpad", "/")
new $P900, "ResizablePMCArray"
push $P900, $P899
@@ -12452,8 +12035,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote_escape:sym<$>" :subid("220_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote_escape:sym<$>" :subid("220_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx903_tgt
.local int rx903_pos
.local int rx903_off
@@ -12489,7 +12072,6 @@
set_addr $I10, rxscan906_loop
rx903_cur."!mark_push"(0, rx903_pos, $I10)
rxscan906_done:
-.annotate 'line', 432
# rx enumcharlist negate=0 zerowidth
ge rx903_pos, rx903_eos, rx903_fail
sub $I10, rx903_pos, rx903_off
@@ -12514,7 +12096,6 @@
debug_765:
.return (rx903_cur)
rx903_restart:
-.annotate 'line', 4
if_null rx903_debug, debug_766
rx903_cur."!cursor_debug"("NEXT", "quote_escape:sym<$>")
debug_766:
@@ -12534,8 +12115,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<$>" :subid("221_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote_escape:sym<$>" :subid("221_1283975947.19641") :method
+.annotate 'line', 0
new $P905, "ResizablePMCArray"
push $P905, "$"
.return ($P905)
@@ -12543,8 +12124,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote_escape:sym<{ }>" :subid("222_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote_escape:sym<{ }>" :subid("222_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx908_tgt
.local int rx908_pos
.local int rx908_off
@@ -12580,7 +12161,6 @@
set_addr $I10, rxscan911_loop
rx908_cur."!mark_push"(0, rx908_pos, $I10)
rxscan911_done:
-.annotate 'line', 433
# rx enumcharlist negate=0 zerowidth
ge rx908_pos, rx908_eos, rx908_fail
sub $I10, rx908_pos, rx908_off
@@ -12605,7 +12185,6 @@
debug_769:
.return (rx908_cur)
rx908_restart:
-.annotate 'line', 4
if_null rx908_debug, debug_770
rx908_cur."!cursor_debug"("NEXT", "quote_escape:sym<{ }>")
debug_770:
@@ -12625,8 +12204,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<{ }>" :subid("223_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote_escape:sym<{ }>" :subid("223_1283975947.19641") :method
+.annotate 'line', 0
new $P910, "ResizablePMCArray"
push $P910, "{"
.return ($P910)
@@ -12634,8 +12213,8 @@
.namespace ["NQP";"Grammar"]
-.sub "quote_escape:sym<esc>" :subid("224_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "quote_escape:sym<esc>" :subid("224_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx913_tgt
.local int rx913_pos
.local int rx913_off
@@ -12671,7 +12250,6 @@
set_addr $I10, rxscan916_loop
rx913_cur."!mark_push"(0, rx913_pos, $I10)
rxscan916_done:
-.annotate 'line', 434
# rx literal "\\e"
add $I11, rx913_pos, 2
gt $I11, rx913_eos, rx913_fail
@@ -12690,7 +12268,6 @@
debug_773:
.return (rx913_cur)
rx913_restart:
-.annotate 'line', 4
if_null rx913_debug, debug_774
rx913_cur."!cursor_debug"("NEXT", "quote_escape:sym<esc>")
debug_774:
@@ -12710,8 +12287,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<esc>" :subid("225_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__quote_escape:sym<esc>" :subid("225_1283975947.19641") :method
+.annotate 'line', 0
new $P915, "ResizablePMCArray"
push $P915, "\\e"
.return ($P915)
@@ -12719,8 +12296,8 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<( )>" :subid("226_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "circumfix:sym<( )>" :subid("226_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx918_tgt
.local int rx918_pos
.local int rx918_off
@@ -12757,7 +12334,6 @@
set_addr $I10, rxscan922_loop
rx918_cur."!mark_push"(0, rx918_pos, $I10)
rxscan922_done:
-.annotate 'line', 436
# rx literal "("
add $I11, rx918_pos, 1
gt $I11, rx918_eos, rx918_fail
@@ -12804,7 +12380,6 @@
debug_777:
.return (rx918_cur)
rx918_restart:
-.annotate 'line', 4
if_null rx918_debug, debug_778
rx918_cur."!cursor_debug"("NEXT", "circumfix:sym<( )>")
debug_778:
@@ -12824,8 +12399,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<( )>" :subid("227_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__circumfix:sym<( )>" :subid("227_1283975947.19641") :method
+.annotate 'line', 0
$P920 = self."!PREFIX__!subrule"("ws", "(")
new $P921, "ResizablePMCArray"
push $P921, $P920
@@ -12834,8 +12409,8 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<[ ]>" :subid("228_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "circumfix:sym<[ ]>" :subid("228_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx926_tgt
.local int rx926_pos
.local int rx926_off
@@ -12872,7 +12447,6 @@
set_addr $I10, rxscan930_loop
rx926_cur."!mark_push"(0, rx926_pos, $I10)
rxscan930_done:
-.annotate 'line', 437
# rx literal "["
add $I11, rx926_pos, 1
gt $I11, rx926_eos, rx926_fail
@@ -12919,7 +12493,6 @@
debug_781:
.return (rx926_cur)
rx926_restart:
-.annotate 'line', 4
if_null rx926_debug, debug_782
rx926_cur."!cursor_debug"("NEXT", "circumfix:sym<[ ]>")
debug_782:
@@ -12939,8 +12512,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<[ ]>" :subid("229_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__circumfix:sym<[ ]>" :subid("229_1283975947.19641") :method
+.annotate 'line', 0
$P928 = self."!PREFIX__!subrule"("ws", "[")
new $P929, "ResizablePMCArray"
push $P929, $P928
@@ -12949,8 +12522,8 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<ang>" :subid("230_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "circumfix:sym<ang>" :subid("230_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx934_tgt
.local int rx934_pos
.local int rx934_off
@@ -12986,7 +12559,6 @@
set_addr $I10, rxscan937_loop
rx934_cur."!mark_push"(0, rx934_pos, $I10)
rxscan937_done:
-.annotate 'line', 438
# rx enumcharlist negate=0 zerowidth
ge rx934_pos, rx934_eos, rx934_fail
sub $I10, rx934_pos, rx934_off
@@ -13007,7 +12579,6 @@
debug_785:
.return (rx934_cur)
rx934_restart:
-.annotate 'line', 4
if_null rx934_debug, debug_786
rx934_cur."!cursor_debug"("NEXT", "circumfix:sym<ang>")
debug_786:
@@ -13027,8 +12598,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<ang>" :subid("231_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__circumfix:sym<ang>" :subid("231_1283975947.19641") :method
+.annotate 'line', 0
new $P936, "ResizablePMCArray"
push $P936, "<"
.return ($P936)
@@ -13036,8 +12607,8 @@
.namespace ["NQP";"Grammar"]
-.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("232_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("232_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx939_tgt
.local int rx939_pos
.local int rx939_off
@@ -13073,7 +12644,6 @@
set_addr $I10, rxscan942_loop
rx939_cur."!mark_push"(0, rx939_pos, $I10)
rxscan942_done:
-.annotate 'line', 439
# rx enumcharlist negate=0 zerowidth
ge rx939_pos, rx939_eos, rx939_fail
sub $I10, rx939_pos, rx939_off
@@ -13094,7 +12664,6 @@
debug_789:
.return (rx939_cur)
rx939_restart:
-.annotate 'line', 4
if_null rx939_debug, debug_790
rx939_cur."!cursor_debug"("NEXT", unicode:"circumfix:sym<\x{ab} \x{bb}>")
debug_790:
@@ -13114,8 +12683,8 @@
.namespace ["NQP";"Grammar"]
-.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("233_1283368207.8572") :method
-.annotate 'line', 4
+.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("233_1283975947.19641") :method
+.annotate 'line', 0
new $P941, "ResizablePMCArray"
push $P941, unicode:"\x{ab}"
.return ($P941)
@@ -13123,8 +12692,8 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<{ }>" :subid("234_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "circumfix:sym<{ }>" :subid("234_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx944_tgt
.local int rx944_pos
.local int rx944_off
@@ -13160,7 +12729,6 @@
set_addr $I10, rxscan947_loop
rx944_cur."!mark_push"(0, rx944_pos, $I10)
rxscan947_done:
-.annotate 'line', 440
# rx enumcharlist negate=0 zerowidth
ge rx944_pos, rx944_eos, rx944_fail
sub $I10, rx944_pos, rx944_off
@@ -13181,7 +12749,6 @@
debug_793:
.return (rx944_cur)
rx944_restart:
-.annotate 'line', 4
if_null rx944_debug, debug_794
rx944_cur."!cursor_debug"("NEXT", "circumfix:sym<{ }>")
debug_794:
@@ -13201,8 +12768,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<{ }>" :subid("235_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__circumfix:sym<{ }>" :subid("235_1283975947.19641") :method
+.annotate 'line', 0
new $P946, "ResizablePMCArray"
push $P946, "{"
.return ($P946)
@@ -13210,8 +12777,8 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<sigil>" :subid("236_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "circumfix:sym<sigil>" :subid("236_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx949_tgt
.local int rx949_pos
.local int rx949_off
@@ -13247,7 +12814,6 @@
set_addr $I10, rxscan953_loop
rx949_cur."!mark_push"(0, rx949_pos, $I10)
rxscan953_done:
-.annotate 'line', 441
# rx subrule "sigil" subtype=capture negate=
rx949_cur."!cursor_pos"(rx949_pos)
$P10 = rx949_cur."sigil"()
@@ -13301,7 +12867,6 @@
debug_797:
.return (rx949_cur)
rx949_restart:
-.annotate 'line', 4
if_null rx949_debug, debug_798
rx949_cur."!cursor_debug"("NEXT", "circumfix:sym<sigil>")
debug_798:
@@ -13321,8 +12886,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<sigil>" :subid("237_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__circumfix:sym<sigil>" :subid("237_1283975947.19641") :method
+.annotate 'line', 0
$P951 = self."!PREFIX__!subrule"("sigil", "")
new $P952, "ResizablePMCArray"
push $P952, $P951
@@ -13331,8 +12896,8 @@
.namespace ["NQP";"Grammar"]
-.sub "semilist" :subid("238_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 4
+.sub "semilist" :subid("238_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx958_tgt
.local int rx958_pos
.local int rx958_off
@@ -13368,7 +12933,6 @@
set_addr $I10, rxscan962_loop
rx958_cur."!mark_push"(0, rx958_pos, $I10)
rxscan962_done:
-.annotate 'line', 443
# rx subrule "ws" subtype=method negate=
rx958_cur."!cursor_pos"(rx958_pos)
$P10 = rx958_cur."ws"()
@@ -13393,7 +12957,6 @@
debug_801:
.return (rx958_cur)
rx958_restart:
-.annotate 'line', 4
if_null rx958_debug, debug_802
rx958_cur."!cursor_debug"("NEXT", "semilist")
debug_802:
@@ -13413,8 +12976,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__semilist" :subid("239_1283368207.8572") :method
-.annotate 'line', 4
+.sub "!PREFIX__semilist" :subid("239_1283975947.19641") :method
+.annotate 'line', 0
$P960 = self."!PREFIX__!subrule"("ws", "")
new $P961, "ResizablePMCArray"
push $P961, $P960
@@ -13423,8 +12986,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infixish" :subid("240_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infixish" :subid("240_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx966_tgt
.local int rx966_pos
.local int rx966_off
@@ -13460,7 +13023,6 @@
set_addr $I10, rxscan969_loop
rx966_cur."!mark_push"(0, rx966_pos, $I10)
rxscan969_done:
-.annotate 'line', 466
# rx subrule "infixstopper" subtype=zerowidth negate=1
rx966_cur."!cursor_pos"(rx966_pos)
$P10 = rx966_cur."infixstopper"()
@@ -13479,7 +13041,6 @@
debug_805:
.return (rx966_cur)
rx966_restart:
-.annotate 'line', 447
if_null rx966_debug, debug_806
rx966_cur."!cursor_debug"("NEXT", "infixish")
debug_806:
@@ -13499,8 +13060,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infixish" :subid("241_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infixish" :subid("241_1283975947.19641") :method
+.annotate 'line', 0
new $P968, "ResizablePMCArray"
push $P968, ""
.return ($P968)
@@ -13508,8 +13069,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infixstopper" :subid("242_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infixstopper" :subid("242_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx971_tgt
.local int rx971_pos
.local int rx971_off
@@ -13545,7 +13106,6 @@
set_addr $I10, rxscan974_loop
rx971_cur."!mark_push"(0, rx971_pos, $I10)
rxscan974_done:
-.annotate 'line', 467
# rx subrule "lambda" subtype=zerowidth negate=
rx971_cur."!cursor_pos"(rx971_pos)
$P10 = rx971_cur."lambda"()
@@ -13557,7 +13117,6 @@
debug_809:
.return (rx971_cur)
rx971_restart:
-.annotate 'line', 447
if_null rx971_debug, debug_810
rx971_cur."!cursor_debug"("NEXT", "infixstopper")
debug_810:
@@ -13577,8 +13136,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infixstopper" :subid("243_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infixstopper" :subid("243_1283975947.19641") :method
+.annotate 'line', 0
new $P973, "ResizablePMCArray"
push $P973, ""
.return ($P973)
@@ -13586,8 +13145,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<[ ]>" :subid("244_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postcircumfix:sym<[ ]>" :subid("244_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx976_tgt
.local int rx976_pos
.local int rx976_off
@@ -13623,7 +13182,6 @@
set_addr $I10, rxscan980_loop
rx976_cur."!mark_push"(0, rx976_pos, $I10)
rxscan980_done:
-.annotate 'line', 470
# rx literal "["
add $I11, rx976_pos, 1
gt $I11, rx976_eos, rx976_fail
@@ -13650,7 +13208,6 @@
ord $I11, rx976_tgt, $I11
ne $I11, 93, rx976_fail
add rx976_pos, 1
-.annotate 'line', 471
# rx subrule "O" subtype=capture negate=
rx976_cur."!cursor_pos"(rx976_pos)
$P10 = rx976_cur."O"("%methodop")
@@ -13658,7 +13215,6 @@
rx976_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("O")
rx976_pos = $P10."pos"()
-.annotate 'line', 469
# rx pass
rx976_cur."!cursor_pass"(rx976_pos, "postcircumfix:sym<[ ]>")
if_null rx976_debug, debug_813
@@ -13666,7 +13222,6 @@
debug_813:
.return (rx976_cur)
rx976_restart:
-.annotate 'line', 447
if_null rx976_debug, debug_814
rx976_cur."!cursor_debug"("NEXT", "postcircumfix:sym<[ ]>")
debug_814:
@@ -13686,8 +13241,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("245_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("245_1283975947.19641") :method
+.annotate 'line', 0
$P978 = self."!PREFIX__!subrule"("ws", "[")
new $P979, "ResizablePMCArray"
push $P979, $P978
@@ -13696,8 +13251,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<{ }>" :subid("246_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postcircumfix:sym<{ }>" :subid("246_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx982_tgt
.local int rx982_pos
.local int rx982_off
@@ -13733,7 +13288,6 @@
set_addr $I10, rxscan986_loop
rx982_cur."!mark_push"(0, rx982_pos, $I10)
rxscan986_done:
-.annotate 'line', 475
# rx literal "{"
add $I11, rx982_pos, 1
gt $I11, rx982_eos, rx982_fail
@@ -13760,7 +13314,6 @@
ord $I11, rx982_tgt, $I11
ne $I11, 125, rx982_fail
add rx982_pos, 1
-.annotate 'line', 476
# rx subrule "O" subtype=capture negate=
rx982_cur."!cursor_pos"(rx982_pos)
$P10 = rx982_cur."O"("%methodop")
@@ -13768,7 +13321,6 @@
rx982_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("O")
rx982_pos = $P10."pos"()
-.annotate 'line', 474
# rx pass
rx982_cur."!cursor_pass"(rx982_pos, "postcircumfix:sym<{ }>")
if_null rx982_debug, debug_817
@@ -13776,7 +13328,6 @@
debug_817:
.return (rx982_cur)
rx982_restart:
-.annotate 'line', 447
if_null rx982_debug, debug_818
rx982_cur."!cursor_debug"("NEXT", "postcircumfix:sym<{ }>")
debug_818:
@@ -13796,8 +13347,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("247_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("247_1283975947.19641") :method
+.annotate 'line', 0
$P984 = self."!PREFIX__!subrule"("ws", "{")
new $P985, "ResizablePMCArray"
push $P985, $P984
@@ -13806,8 +13357,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<ang>" :subid("248_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postcircumfix:sym<ang>" :subid("248_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx988_tgt
.local int rx988_pos
.local int rx988_off
@@ -13843,7 +13394,6 @@
set_addr $I10, rxscan991_loop
rx988_cur."!mark_push"(0, rx988_pos, $I10)
rxscan991_done:
-.annotate 'line', 480
# rx enumcharlist negate=0 zerowidth
ge rx988_pos, rx988_eos, rx988_fail
sub $I10, rx988_pos, rx988_off
@@ -13857,7 +13407,6 @@
rx988_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("quote_EXPR")
rx988_pos = $P10."pos"()
-.annotate 'line', 481
# rx subrule "O" subtype=capture negate=
rx988_cur."!cursor_pos"(rx988_pos)
$P10 = rx988_cur."O"("%methodop")
@@ -13865,7 +13414,6 @@
rx988_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("O")
rx988_pos = $P10."pos"()
-.annotate 'line', 479
# rx pass
rx988_cur."!cursor_pass"(rx988_pos, "postcircumfix:sym<ang>")
if_null rx988_debug, debug_821
@@ -13873,7 +13421,6 @@
debug_821:
.return (rx988_cur)
rx988_restart:
-.annotate 'line', 447
if_null rx988_debug, debug_822
rx988_cur."!cursor_debug"("NEXT", "postcircumfix:sym<ang>")
debug_822:
@@ -13893,8 +13440,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<ang>" :subid("249_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postcircumfix:sym<ang>" :subid("249_1283975947.19641") :method
+.annotate 'line', 0
new $P990, "ResizablePMCArray"
push $P990, "<"
.return ($P990)
@@ -13902,8 +13449,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<( )>" :subid("250_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postcircumfix:sym<( )>" :subid("250_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx993_tgt
.local int rx993_pos
.local int rx993_off
@@ -13939,7 +13486,6 @@
set_addr $I10, rxscan997_loop
rx993_cur."!mark_push"(0, rx993_pos, $I10)
rxscan997_done:
-.annotate 'line', 485
# rx literal "("
add $I11, rx993_pos, 1
gt $I11, rx993_eos, rx993_fail
@@ -13966,7 +13512,6 @@
ord $I11, rx993_tgt, $I11
ne $I11, 41, rx993_fail
add rx993_pos, 1
-.annotate 'line', 486
# rx subrule "O" subtype=capture negate=
rx993_cur."!cursor_pos"(rx993_pos)
$P10 = rx993_cur."O"("%methodop")
@@ -13974,7 +13519,6 @@
rx993_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("O")
rx993_pos = $P10."pos"()
-.annotate 'line', 484
# rx pass
rx993_cur."!cursor_pass"(rx993_pos, "postcircumfix:sym<( )>")
if_null rx993_debug, debug_825
@@ -13982,7 +13526,6 @@
debug_825:
.return (rx993_cur)
rx993_restart:
-.annotate 'line', 447
if_null rx993_debug, debug_826
rx993_cur."!cursor_debug"("NEXT", "postcircumfix:sym<( )>")
debug_826:
@@ -14002,8 +13545,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<( )>" :subid("251_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postcircumfix:sym<( )>" :subid("251_1283975947.19641") :method
+.annotate 'line', 0
$P995 = self."!PREFIX__!subrule"("ws", "(")
new $P996, "ResizablePMCArray"
push $P996, $P995
@@ -14012,8 +13555,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<.>" :subid("252_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postfix:sym<.>" :subid("252_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx999_tgt
.local int rx999_pos
.local int rx999_off
@@ -14049,7 +13592,6 @@
set_addr $I10, rxscan1003_loop
rx999_cur."!mark_push"(0, rx999_pos, $I10)
rxscan1003_done:
-.annotate 'line', 489
# rx subrule "dotty" subtype=capture negate=
rx999_cur."!cursor_pos"(rx999_pos)
$P10 = rx999_cur."dotty"()
@@ -14071,7 +13613,6 @@
debug_829:
.return (rx999_cur)
rx999_restart:
-.annotate 'line', 447
if_null rx999_debug, debug_830
rx999_cur."!cursor_debug"("NEXT", "postfix:sym<.>")
debug_830:
@@ -14091,8 +13632,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<.>" :subid("253_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postfix:sym<.>" :subid("253_1283975947.19641") :method
+.annotate 'line', 0
$P1001 = self."!PREFIX__!subrule"("dotty", "")
new $P1002, "ResizablePMCArray"
push $P1002, $P1001
@@ -14101,8 +13642,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<++>" :subid("254_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<++>" :subid("254_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1005_tgt
.local int rx1005_pos
.local int rx1005_off
@@ -14138,7 +13679,6 @@
set_addr $I10, rxscan1009_loop
rx1005_cur."!mark_push"(0, rx1005_pos, $I10)
rxscan1009_done:
-.annotate 'line', 491
# rx subcapture "sym"
set_addr $I10, rxcap_1010_fail
rx1005_cur."!mark_push"(0, rx1005_pos, $I10)
@@ -14174,7 +13714,6 @@
debug_833:
.return (rx1005_cur)
rx1005_restart:
-.annotate 'line', 447
if_null rx1005_debug, debug_834
rx1005_cur."!cursor_debug"("NEXT", "prefix:sym<++>")
debug_834:
@@ -14194,8 +13733,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<++>" :subid("255_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<++>" :subid("255_1283975947.19641") :method
+.annotate 'line', 0
$P1007 = self."!PREFIX__!subrule"("O", "++")
new $P1008, "ResizablePMCArray"
push $P1008, $P1007
@@ -14204,8 +13743,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<-->" :subid("256_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<-->" :subid("256_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1012_tgt
.local int rx1012_pos
.local int rx1012_off
@@ -14241,7 +13780,6 @@
set_addr $I10, rxscan1016_loop
rx1012_cur."!mark_push"(0, rx1012_pos, $I10)
rxscan1016_done:
-.annotate 'line', 492
# rx subcapture "sym"
set_addr $I10, rxcap_1017_fail
rx1012_cur."!mark_push"(0, rx1012_pos, $I10)
@@ -14277,7 +13815,6 @@
debug_837:
.return (rx1012_cur)
rx1012_restart:
-.annotate 'line', 447
if_null rx1012_debug, debug_838
rx1012_cur."!cursor_debug"("NEXT", "prefix:sym<-->")
debug_838:
@@ -14297,8 +13834,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<-->" :subid("257_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<-->" :subid("257_1283975947.19641") :method
+.annotate 'line', 0
$P1014 = self."!PREFIX__!subrule"("O", "--")
new $P1015, "ResizablePMCArray"
push $P1015, $P1014
@@ -14307,8 +13844,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<++>" :subid("258_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postfix:sym<++>" :subid("258_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1019_tgt
.local int rx1019_pos
.local int rx1019_off
@@ -14344,7 +13881,6 @@
set_addr $I10, rxscan1023_loop
rx1019_cur."!mark_push"(0, rx1019_pos, $I10)
rxscan1023_done:
-.annotate 'line', 495
# rx subcapture "sym"
set_addr $I10, rxcap_1024_fail
rx1019_cur."!mark_push"(0, rx1019_pos, $I10)
@@ -14380,7 +13916,6 @@
debug_841:
.return (rx1019_cur)
rx1019_restart:
-.annotate 'line', 447
if_null rx1019_debug, debug_842
rx1019_cur."!cursor_debug"("NEXT", "postfix:sym<++>")
debug_842:
@@ -14400,8 +13935,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<++>" :subid("259_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postfix:sym<++>" :subid("259_1283975947.19641") :method
+.annotate 'line', 0
$P1021 = self."!PREFIX__!subrule"("O", "++")
new $P1022, "ResizablePMCArray"
push $P1022, $P1021
@@ -14410,8 +13945,8 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<-->" :subid("260_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "postfix:sym<-->" :subid("260_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1026_tgt
.local int rx1026_pos
.local int rx1026_off
@@ -14447,7 +13982,6 @@
set_addr $I10, rxscan1030_loop
rx1026_cur."!mark_push"(0, rx1026_pos, $I10)
rxscan1030_done:
-.annotate 'line', 496
# rx subcapture "sym"
set_addr $I10, rxcap_1031_fail
rx1026_cur."!mark_push"(0, rx1026_pos, $I10)
@@ -14483,7 +14017,6 @@
debug_845:
.return (rx1026_cur)
rx1026_restart:
-.annotate 'line', 447
if_null rx1026_debug, debug_846
rx1026_cur."!cursor_debug"("NEXT", "postfix:sym<-->")
debug_846:
@@ -14503,8 +14036,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<-->" :subid("261_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__postfix:sym<-->" :subid("261_1283975947.19641") :method
+.annotate 'line', 0
$P1028 = self."!PREFIX__!subrule"("O", "--")
new $P1029, "ResizablePMCArray"
push $P1029, $P1028
@@ -14513,8 +14046,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<**>" :subid("262_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<**>" :subid("262_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1033_tgt
.local int rx1033_pos
.local int rx1033_off
@@ -14550,7 +14083,6 @@
set_addr $I10, rxscan1037_loop
rx1033_cur."!mark_push"(0, rx1033_pos, $I10)
rxscan1037_done:
-.annotate 'line', 498
# rx subcapture "sym"
set_addr $I10, rxcap_1038_fail
rx1033_cur."!mark_push"(0, rx1033_pos, $I10)
@@ -14586,7 +14118,6 @@
debug_849:
.return (rx1033_cur)
rx1033_restart:
-.annotate 'line', 447
if_null rx1033_debug, debug_850
rx1033_cur."!cursor_debug"("NEXT", "infix:sym<**>")
debug_850:
@@ -14606,8 +14137,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<**>" :subid("263_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<**>" :subid("263_1283975947.19641") :method
+.annotate 'line', 0
$P1035 = self."!PREFIX__!subrule"("O", "**")
new $P1036, "ResizablePMCArray"
push $P1036, $P1035
@@ -14616,8 +14147,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<+>" :subid("264_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<+>" :subid("264_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1040_tgt
.local int rx1040_pos
.local int rx1040_off
@@ -14653,7 +14184,6 @@
set_addr $I10, rxscan1044_loop
rx1040_cur."!mark_push"(0, rx1040_pos, $I10)
rxscan1044_done:
-.annotate 'line', 500
# rx subcapture "sym"
set_addr $I10, rxcap_1045_fail
rx1040_cur."!mark_push"(0, rx1040_pos, $I10)
@@ -14689,7 +14219,6 @@
debug_853:
.return (rx1040_cur)
rx1040_restart:
-.annotate 'line', 447
if_null rx1040_debug, debug_854
rx1040_cur."!cursor_debug"("NEXT", "prefix:sym<+>")
debug_854:
@@ -14709,8 +14238,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<+>" :subid("265_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<+>" :subid("265_1283975947.19641") :method
+.annotate 'line', 0
$P1042 = self."!PREFIX__!subrule"("O", "+")
new $P1043, "ResizablePMCArray"
push $P1043, $P1042
@@ -14719,8 +14248,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<~>" :subid("266_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<~>" :subid("266_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1047_tgt
.local int rx1047_pos
.local int rx1047_off
@@ -14756,7 +14285,6 @@
set_addr $I10, rxscan1051_loop
rx1047_cur."!mark_push"(0, rx1047_pos, $I10)
rxscan1051_done:
-.annotate 'line', 501
# rx subcapture "sym"
set_addr $I10, rxcap_1052_fail
rx1047_cur."!mark_push"(0, rx1047_pos, $I10)
@@ -14792,7 +14320,6 @@
debug_857:
.return (rx1047_cur)
rx1047_restart:
-.annotate 'line', 447
if_null rx1047_debug, debug_858
rx1047_cur."!cursor_debug"("NEXT", "prefix:sym<~>")
debug_858:
@@ -14812,8 +14339,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<~>" :subid("267_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<~>" :subid("267_1283975947.19641") :method
+.annotate 'line', 0
$P1049 = self."!PREFIX__!subrule"("O", "~")
new $P1050, "ResizablePMCArray"
push $P1050, $P1049
@@ -14822,8 +14349,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<->" :subid("268_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<->" :subid("268_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1054_tgt
.local int rx1054_pos
.local int rx1054_off
@@ -14859,7 +14386,6 @@
set_addr $I10, rxscan1057_loop
rx1054_cur."!mark_push"(0, rx1054_pos, $I10)
rxscan1057_done:
-.annotate 'line', 502
# rx subcapture "sym"
set_addr $I10, rxcap_1058_fail
rx1054_cur."!mark_push"(0, rx1054_pos, $I10)
@@ -14905,7 +14431,6 @@
debug_861:
.return (rx1054_cur)
rx1054_restart:
-.annotate 'line', 447
if_null rx1054_debug, debug_862
rx1054_cur."!cursor_debug"("NEXT", "prefix:sym<->")
debug_862:
@@ -14925,8 +14450,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<->" :subid("269_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<->" :subid("269_1283975947.19641") :method
+.annotate 'line', 0
new $P1056, "ResizablePMCArray"
push $P1056, "-"
.return ($P1056)
@@ -14934,8 +14459,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<?>" :subid("270_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<?>" :subid("270_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1060_tgt
.local int rx1060_pos
.local int rx1060_off
@@ -14971,7 +14496,6 @@
set_addr $I10, rxscan1064_loop
rx1060_cur."!mark_push"(0, rx1060_pos, $I10)
rxscan1064_done:
-.annotate 'line', 503
# rx subcapture "sym"
set_addr $I10, rxcap_1065_fail
rx1060_cur."!mark_push"(0, rx1060_pos, $I10)
@@ -15007,7 +14531,6 @@
debug_865:
.return (rx1060_cur)
rx1060_restart:
-.annotate 'line', 447
if_null rx1060_debug, debug_866
rx1060_cur."!cursor_debug"("NEXT", "prefix:sym<?>")
debug_866:
@@ -15027,8 +14550,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<?>" :subid("271_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<?>" :subid("271_1283975947.19641") :method
+.annotate 'line', 0
$P1062 = self."!PREFIX__!subrule"("O", "?")
new $P1063, "ResizablePMCArray"
push $P1063, $P1062
@@ -15037,8 +14560,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<!>" :subid("272_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<!>" :subid("272_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1067_tgt
.local int rx1067_pos
.local int rx1067_off
@@ -15074,7 +14597,6 @@
set_addr $I10, rxscan1071_loop
rx1067_cur."!mark_push"(0, rx1067_pos, $I10)
rxscan1071_done:
-.annotate 'line', 504
# rx subcapture "sym"
set_addr $I10, rxcap_1072_fail
rx1067_cur."!mark_push"(0, rx1067_pos, $I10)
@@ -15110,7 +14632,6 @@
debug_869:
.return (rx1067_cur)
rx1067_restart:
-.annotate 'line', 447
if_null rx1067_debug, debug_870
rx1067_cur."!cursor_debug"("NEXT", "prefix:sym<!>")
debug_870:
@@ -15130,8 +14651,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<!>" :subid("273_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<!>" :subid("273_1283975947.19641") :method
+.annotate 'line', 0
$P1069 = self."!PREFIX__!subrule"("O", "!")
new $P1070, "ResizablePMCArray"
push $P1070, $P1069
@@ -15140,8 +14661,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<|>" :subid("274_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<|>" :subid("274_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1074_tgt
.local int rx1074_pos
.local int rx1074_off
@@ -15177,7 +14698,6 @@
set_addr $I10, rxscan1078_loop
rx1074_cur."!mark_push"(0, rx1074_pos, $I10)
rxscan1078_done:
-.annotate 'line', 505
# rx subcapture "sym"
set_addr $I10, rxcap_1079_fail
rx1074_cur."!mark_push"(0, rx1074_pos, $I10)
@@ -15213,7 +14733,6 @@
debug_873:
.return (rx1074_cur)
rx1074_restart:
-.annotate 'line', 447
if_null rx1074_debug, debug_874
rx1074_cur."!cursor_debug"("NEXT", "prefix:sym<|>")
debug_874:
@@ -15233,8 +14752,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<|>" :subid("275_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<|>" :subid("275_1283975947.19641") :method
+.annotate 'line', 0
$P1076 = self."!PREFIX__!subrule"("O", "|")
new $P1077, "ResizablePMCArray"
push $P1077, $P1076
@@ -15243,8 +14762,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<*>" :subid("276_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<*>" :subid("276_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1081_tgt
.local int rx1081_pos
.local int rx1081_off
@@ -15280,7 +14799,6 @@
set_addr $I10, rxscan1085_loop
rx1081_cur."!mark_push"(0, rx1081_pos, $I10)
rxscan1085_done:
-.annotate 'line', 507
# rx subcapture "sym"
set_addr $I10, rxcap_1086_fail
rx1081_cur."!mark_push"(0, rx1081_pos, $I10)
@@ -15316,7 +14834,6 @@
debug_877:
.return (rx1081_cur)
rx1081_restart:
-.annotate 'line', 447
if_null rx1081_debug, debug_878
rx1081_cur."!cursor_debug"("NEXT", "infix:sym<*>")
debug_878:
@@ -15336,8 +14853,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<*>" :subid("277_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<*>" :subid("277_1283975947.19641") :method
+.annotate 'line', 0
$P1083 = self."!PREFIX__!subrule"("O", "*")
new $P1084, "ResizablePMCArray"
push $P1084, $P1083
@@ -15346,8 +14863,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym</>" :subid("278_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym</>" :subid("278_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1088_tgt
.local int rx1088_pos
.local int rx1088_off
@@ -15383,7 +14900,6 @@
set_addr $I10, rxscan1092_loop
rx1088_cur."!mark_push"(0, rx1088_pos, $I10)
rxscan1092_done:
-.annotate 'line', 508
# rx subcapture "sym"
set_addr $I10, rxcap_1093_fail
rx1088_cur."!mark_push"(0, rx1088_pos, $I10)
@@ -15419,7 +14935,6 @@
debug_881:
.return (rx1088_cur)
rx1088_restart:
-.annotate 'line', 447
if_null rx1088_debug, debug_882
rx1088_cur."!cursor_debug"("NEXT", "infix:sym</>")
debug_882:
@@ -15439,8 +14954,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym</>" :subid("279_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym</>" :subid("279_1283975947.19641") :method
+.annotate 'line', 0
$P1090 = self."!PREFIX__!subrule"("O", "/")
new $P1091, "ResizablePMCArray"
push $P1091, $P1090
@@ -15449,8 +14964,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<%>" :subid("280_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<%>" :subid("280_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1095_tgt
.local int rx1095_pos
.local int rx1095_off
@@ -15486,7 +15001,6 @@
set_addr $I10, rxscan1099_loop
rx1095_cur."!mark_push"(0, rx1095_pos, $I10)
rxscan1099_done:
-.annotate 'line', 509
# rx subcapture "sym"
set_addr $I10, rxcap_1100_fail
rx1095_cur."!mark_push"(0, rx1095_pos, $I10)
@@ -15522,7 +15036,6 @@
debug_885:
.return (rx1095_cur)
rx1095_restart:
-.annotate 'line', 447
if_null rx1095_debug, debug_886
rx1095_cur."!cursor_debug"("NEXT", "infix:sym<%>")
debug_886:
@@ -15542,8 +15055,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<%>" :subid("281_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<%>" :subid("281_1283975947.19641") :method
+.annotate 'line', 0
$P1097 = self."!PREFIX__!subrule"("O", "%")
new $P1098, "ResizablePMCArray"
push $P1098, $P1097
@@ -15552,8 +15065,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<+&>" :subid("282_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<+&>" :subid("282_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1102_tgt
.local int rx1102_pos
.local int rx1102_off
@@ -15589,7 +15102,6 @@
set_addr $I10, rxscan1106_loop
rx1102_cur."!mark_push"(0, rx1102_pos, $I10)
rxscan1106_done:
-.annotate 'line', 510
# rx subcapture "sym"
set_addr $I10, rxcap_1107_fail
rx1102_cur."!mark_push"(0, rx1102_pos, $I10)
@@ -15625,7 +15137,6 @@
debug_889:
.return (rx1102_cur)
rx1102_restart:
-.annotate 'line', 447
if_null rx1102_debug, debug_890
rx1102_cur."!cursor_debug"("NEXT", "infix:sym<+&>")
debug_890:
@@ -15645,8 +15156,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<+&>" :subid("283_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<+&>" :subid("283_1283975947.19641") :method
+.annotate 'line', 0
$P1104 = self."!PREFIX__!subrule"("O", "+&")
new $P1105, "ResizablePMCArray"
push $P1105, $P1104
@@ -15655,8 +15166,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<+>" :subid("284_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<+>" :subid("284_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1109_tgt
.local int rx1109_pos
.local int rx1109_off
@@ -15692,7 +15203,6 @@
set_addr $I10, rxscan1113_loop
rx1109_cur."!mark_push"(0, rx1109_pos, $I10)
rxscan1113_done:
-.annotate 'line', 512
# rx subcapture "sym"
set_addr $I10, rxcap_1114_fail
rx1109_cur."!mark_push"(0, rx1109_pos, $I10)
@@ -15728,7 +15238,6 @@
debug_893:
.return (rx1109_cur)
rx1109_restart:
-.annotate 'line', 447
if_null rx1109_debug, debug_894
rx1109_cur."!cursor_debug"("NEXT", "infix:sym<+>")
debug_894:
@@ -15748,8 +15257,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<+>" :subid("285_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<+>" :subid("285_1283975947.19641") :method
+.annotate 'line', 0
$P1111 = self."!PREFIX__!subrule"("O", "+")
new $P1112, "ResizablePMCArray"
push $P1112, $P1111
@@ -15758,8 +15267,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<->" :subid("286_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<->" :subid("286_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1116_tgt
.local int rx1116_pos
.local int rx1116_off
@@ -15795,7 +15304,6 @@
set_addr $I10, rxscan1120_loop
rx1116_cur."!mark_push"(0, rx1116_pos, $I10)
rxscan1120_done:
-.annotate 'line', 513
# rx subcapture "sym"
set_addr $I10, rxcap_1121_fail
rx1116_cur."!mark_push"(0, rx1116_pos, $I10)
@@ -15831,7 +15339,6 @@
debug_897:
.return (rx1116_cur)
rx1116_restart:
-.annotate 'line', 447
if_null rx1116_debug, debug_898
rx1116_cur."!cursor_debug"("NEXT", "infix:sym<->")
debug_898:
@@ -15851,8 +15358,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<->" :subid("287_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<->" :subid("287_1283975947.19641") :method
+.annotate 'line', 0
$P1118 = self."!PREFIX__!subrule"("O", "-")
new $P1119, "ResizablePMCArray"
push $P1119, $P1118
@@ -15861,8 +15368,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<+|>" :subid("288_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<+|>" :subid("288_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1123_tgt
.local int rx1123_pos
.local int rx1123_off
@@ -15898,7 +15405,6 @@
set_addr $I10, rxscan1127_loop
rx1123_cur."!mark_push"(0, rx1123_pos, $I10)
rxscan1127_done:
-.annotate 'line', 514
# rx subcapture "sym"
set_addr $I10, rxcap_1128_fail
rx1123_cur."!mark_push"(0, rx1123_pos, $I10)
@@ -15934,7 +15440,6 @@
debug_901:
.return (rx1123_cur)
rx1123_restart:
-.annotate 'line', 447
if_null rx1123_debug, debug_902
rx1123_cur."!cursor_debug"("NEXT", "infix:sym<+|>")
debug_902:
@@ -15954,8 +15459,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<+|>" :subid("289_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<+|>" :subid("289_1283975947.19641") :method
+.annotate 'line', 0
$P1125 = self."!PREFIX__!subrule"("O", "+|")
new $P1126, "ResizablePMCArray"
push $P1126, $P1125
@@ -15964,8 +15469,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<+^>" :subid("290_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<+^>" :subid("290_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1130_tgt
.local int rx1130_pos
.local int rx1130_off
@@ -16001,7 +15506,6 @@
set_addr $I10, rxscan1134_loop
rx1130_cur."!mark_push"(0, rx1130_pos, $I10)
rxscan1134_done:
-.annotate 'line', 515
# rx subcapture "sym"
set_addr $I10, rxcap_1135_fail
rx1130_cur."!mark_push"(0, rx1130_pos, $I10)
@@ -16037,7 +15541,6 @@
debug_905:
.return (rx1130_cur)
rx1130_restart:
-.annotate 'line', 447
if_null rx1130_debug, debug_906
rx1130_cur."!cursor_debug"("NEXT", "infix:sym<+^>")
debug_906:
@@ -16057,8 +15560,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<+^>" :subid("291_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<+^>" :subid("291_1283975947.19641") :method
+.annotate 'line', 0
$P1132 = self."!PREFIX__!subrule"("O", "+^")
new $P1133, "ResizablePMCArray"
push $P1133, $P1132
@@ -16067,8 +15570,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<~>" :subid("292_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<~>" :subid("292_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1137_tgt
.local int rx1137_pos
.local int rx1137_off
@@ -16104,7 +15607,6 @@
set_addr $I10, rxscan1141_loop
rx1137_cur."!mark_push"(0, rx1137_pos, $I10)
rxscan1141_done:
-.annotate 'line', 517
# rx subcapture "sym"
set_addr $I10, rxcap_1142_fail
rx1137_cur."!mark_push"(0, rx1137_pos, $I10)
@@ -16140,7 +15642,6 @@
debug_909:
.return (rx1137_cur)
rx1137_restart:
-.annotate 'line', 447
if_null rx1137_debug, debug_910
rx1137_cur."!cursor_debug"("NEXT", "infix:sym<~>")
debug_910:
@@ -16160,8 +15661,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<~>" :subid("293_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<~>" :subid("293_1283975947.19641") :method
+.annotate 'line', 0
$P1139 = self."!PREFIX__!subrule"("O", "~")
new $P1140, "ResizablePMCArray"
push $P1140, $P1139
@@ -16170,8 +15671,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<==>" :subid("294_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<==>" :subid("294_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1144_tgt
.local int rx1144_pos
.local int rx1144_off
@@ -16207,7 +15708,6 @@
set_addr $I10, rxscan1148_loop
rx1144_cur."!mark_push"(0, rx1144_pos, $I10)
rxscan1148_done:
-.annotate 'line', 519
# rx subcapture "sym"
set_addr $I10, rxcap_1149_fail
rx1144_cur."!mark_push"(0, rx1144_pos, $I10)
@@ -16243,7 +15743,6 @@
debug_913:
.return (rx1144_cur)
rx1144_restart:
-.annotate 'line', 447
if_null rx1144_debug, debug_914
rx1144_cur."!cursor_debug"("NEXT", "infix:sym<==>")
debug_914:
@@ -16263,8 +15762,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<==>" :subid("295_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<==>" :subid("295_1283975947.19641") :method
+.annotate 'line', 0
$P1146 = self."!PREFIX__!subrule"("O", "==")
new $P1147, "ResizablePMCArray"
push $P1147, $P1146
@@ -16273,8 +15772,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<!=>" :subid("296_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<!=>" :subid("296_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1151_tgt
.local int rx1151_pos
.local int rx1151_off
@@ -16310,7 +15809,6 @@
set_addr $I10, rxscan1155_loop
rx1151_cur."!mark_push"(0, rx1151_pos, $I10)
rxscan1155_done:
-.annotate 'line', 520
# rx subcapture "sym"
set_addr $I10, rxcap_1156_fail
rx1151_cur."!mark_push"(0, rx1151_pos, $I10)
@@ -16346,7 +15844,6 @@
debug_917:
.return (rx1151_cur)
rx1151_restart:
-.annotate 'line', 447
if_null rx1151_debug, debug_918
rx1151_cur."!cursor_debug"("NEXT", "infix:sym<!=>")
debug_918:
@@ -16366,8 +15863,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<!=>" :subid("297_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<!=>" :subid("297_1283975947.19641") :method
+.annotate 'line', 0
$P1153 = self."!PREFIX__!subrule"("O", "!=")
new $P1154, "ResizablePMCArray"
push $P1154, $P1153
@@ -16376,8 +15873,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<<=>" :subid("298_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<<=>" :subid("298_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1158_tgt
.local int rx1158_pos
.local int rx1158_off
@@ -16413,7 +15910,6 @@
set_addr $I10, rxscan1162_loop
rx1158_cur."!mark_push"(0, rx1158_pos, $I10)
rxscan1162_done:
-.annotate 'line', 521
# rx subcapture "sym"
set_addr $I10, rxcap_1163_fail
rx1158_cur."!mark_push"(0, rx1158_pos, $I10)
@@ -16449,7 +15945,6 @@
debug_921:
.return (rx1158_cur)
rx1158_restart:
-.annotate 'line', 447
if_null rx1158_debug, debug_922
rx1158_cur."!cursor_debug"("NEXT", "infix:sym<<=>")
debug_922:
@@ -16469,8 +15964,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<<=>" :subid("299_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<<=>" :subid("299_1283975947.19641") :method
+.annotate 'line', 0
$P1160 = self."!PREFIX__!subrule"("O", "<=")
new $P1161, "ResizablePMCArray"
push $P1161, $P1160
@@ -16479,8 +15974,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<>=>" :subid("300_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<>=>" :subid("300_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1165_tgt
.local int rx1165_pos
.local int rx1165_off
@@ -16516,7 +16011,6 @@
set_addr $I10, rxscan1169_loop
rx1165_cur."!mark_push"(0, rx1165_pos, $I10)
rxscan1169_done:
-.annotate 'line', 522
# rx subcapture "sym"
set_addr $I10, rxcap_1170_fail
rx1165_cur."!mark_push"(0, rx1165_pos, $I10)
@@ -16552,7 +16046,6 @@
debug_925:
.return (rx1165_cur)
rx1165_restart:
-.annotate 'line', 447
if_null rx1165_debug, debug_926
rx1165_cur."!cursor_debug"("NEXT", "infix:sym<>=>")
debug_926:
@@ -16572,8 +16065,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<>=>" :subid("301_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<>=>" :subid("301_1283975947.19641") :method
+.annotate 'line', 0
$P1167 = self."!PREFIX__!subrule"("O", ">=")
new $P1168, "ResizablePMCArray"
push $P1168, $P1167
@@ -16582,8 +16075,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<<>" :subid("302_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<<>" :subid("302_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1172_tgt
.local int rx1172_pos
.local int rx1172_off
@@ -16619,7 +16112,6 @@
set_addr $I10, rxscan1176_loop
rx1172_cur."!mark_push"(0, rx1172_pos, $I10)
rxscan1176_done:
-.annotate 'line', 523
# rx subcapture "sym"
set_addr $I10, rxcap_1177_fail
rx1172_cur."!mark_push"(0, rx1172_pos, $I10)
@@ -16655,7 +16147,6 @@
debug_929:
.return (rx1172_cur)
rx1172_restart:
-.annotate 'line', 447
if_null rx1172_debug, debug_930
rx1172_cur."!cursor_debug"("NEXT", "infix:sym<<>")
debug_930:
@@ -16675,8 +16166,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<<>" :subid("303_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<<>" :subid("303_1283975947.19641") :method
+.annotate 'line', 0
$P1174 = self."!PREFIX__!subrule"("O", "<")
new $P1175, "ResizablePMCArray"
push $P1175, $P1174
@@ -16685,8 +16176,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<>>" :subid("304_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<>>" :subid("304_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1179_tgt
.local int rx1179_pos
.local int rx1179_off
@@ -16722,7 +16213,6 @@
set_addr $I10, rxscan1183_loop
rx1179_cur."!mark_push"(0, rx1179_pos, $I10)
rxscan1183_done:
-.annotate 'line', 524
# rx subcapture "sym"
set_addr $I10, rxcap_1184_fail
rx1179_cur."!mark_push"(0, rx1179_pos, $I10)
@@ -16758,7 +16248,6 @@
debug_933:
.return (rx1179_cur)
rx1179_restart:
-.annotate 'line', 447
if_null rx1179_debug, debug_934
rx1179_cur."!cursor_debug"("NEXT", "infix:sym<>>")
debug_934:
@@ -16778,8 +16267,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<>>" :subid("305_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<>>" :subid("305_1283975947.19641") :method
+.annotate 'line', 0
$P1181 = self."!PREFIX__!subrule"("O", ">")
new $P1182, "ResizablePMCArray"
push $P1182, $P1181
@@ -16788,8 +16277,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<eq>" :subid("306_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<eq>" :subid("306_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1186_tgt
.local int rx1186_pos
.local int rx1186_off
@@ -16825,7 +16314,6 @@
set_addr $I10, rxscan1190_loop
rx1186_cur."!mark_push"(0, rx1186_pos, $I10)
rxscan1190_done:
-.annotate 'line', 525
# rx subcapture "sym"
set_addr $I10, rxcap_1191_fail
rx1186_cur."!mark_push"(0, rx1186_pos, $I10)
@@ -16861,7 +16349,6 @@
debug_937:
.return (rx1186_cur)
rx1186_restart:
-.annotate 'line', 447
if_null rx1186_debug, debug_938
rx1186_cur."!cursor_debug"("NEXT", "infix:sym<eq>")
debug_938:
@@ -16881,8 +16368,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<eq>" :subid("307_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<eq>" :subid("307_1283975947.19641") :method
+.annotate 'line', 0
$P1188 = self."!PREFIX__!subrule"("O", "eq")
new $P1189, "ResizablePMCArray"
push $P1189, $P1188
@@ -16891,8 +16378,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<ne>" :subid("308_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<ne>" :subid("308_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1193_tgt
.local int rx1193_pos
.local int rx1193_off
@@ -16928,7 +16415,6 @@
set_addr $I10, rxscan1197_loop
rx1193_cur."!mark_push"(0, rx1193_pos, $I10)
rxscan1197_done:
-.annotate 'line', 526
# rx subcapture "sym"
set_addr $I10, rxcap_1198_fail
rx1193_cur."!mark_push"(0, rx1193_pos, $I10)
@@ -16964,7 +16450,6 @@
debug_941:
.return (rx1193_cur)
rx1193_restart:
-.annotate 'line', 447
if_null rx1193_debug, debug_942
rx1193_cur."!cursor_debug"("NEXT", "infix:sym<ne>")
debug_942:
@@ -16984,8 +16469,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<ne>" :subid("309_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<ne>" :subid("309_1283975947.19641") :method
+.annotate 'line', 0
$P1195 = self."!PREFIX__!subrule"("O", "ne")
new $P1196, "ResizablePMCArray"
push $P1196, $P1195
@@ -16994,8 +16479,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<le>" :subid("310_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<le>" :subid("310_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1200_tgt
.local int rx1200_pos
.local int rx1200_off
@@ -17031,7 +16516,6 @@
set_addr $I10, rxscan1204_loop
rx1200_cur."!mark_push"(0, rx1200_pos, $I10)
rxscan1204_done:
-.annotate 'line', 527
# rx subcapture "sym"
set_addr $I10, rxcap_1205_fail
rx1200_cur."!mark_push"(0, rx1200_pos, $I10)
@@ -17067,7 +16551,6 @@
debug_945:
.return (rx1200_cur)
rx1200_restart:
-.annotate 'line', 447
if_null rx1200_debug, debug_946
rx1200_cur."!cursor_debug"("NEXT", "infix:sym<le>")
debug_946:
@@ -17087,8 +16570,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<le>" :subid("311_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<le>" :subid("311_1283975947.19641") :method
+.annotate 'line', 0
$P1202 = self."!PREFIX__!subrule"("O", "le")
new $P1203, "ResizablePMCArray"
push $P1203, $P1202
@@ -17097,8 +16580,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<ge>" :subid("312_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<ge>" :subid("312_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1207_tgt
.local int rx1207_pos
.local int rx1207_off
@@ -17134,7 +16617,6 @@
set_addr $I10, rxscan1211_loop
rx1207_cur."!mark_push"(0, rx1207_pos, $I10)
rxscan1211_done:
-.annotate 'line', 528
# rx subcapture "sym"
set_addr $I10, rxcap_1212_fail
rx1207_cur."!mark_push"(0, rx1207_pos, $I10)
@@ -17170,7 +16652,6 @@
debug_949:
.return (rx1207_cur)
rx1207_restart:
-.annotate 'line', 447
if_null rx1207_debug, debug_950
rx1207_cur."!cursor_debug"("NEXT", "infix:sym<ge>")
debug_950:
@@ -17190,8 +16671,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<ge>" :subid("313_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<ge>" :subid("313_1283975947.19641") :method
+.annotate 'line', 0
$P1209 = self."!PREFIX__!subrule"("O", "ge")
new $P1210, "ResizablePMCArray"
push $P1210, $P1209
@@ -17200,8 +16681,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<lt>" :subid("314_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<lt>" :subid("314_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1214_tgt
.local int rx1214_pos
.local int rx1214_off
@@ -17237,7 +16718,6 @@
set_addr $I10, rxscan1218_loop
rx1214_cur."!mark_push"(0, rx1214_pos, $I10)
rxscan1218_done:
-.annotate 'line', 529
# rx subcapture "sym"
set_addr $I10, rxcap_1219_fail
rx1214_cur."!mark_push"(0, rx1214_pos, $I10)
@@ -17273,7 +16753,6 @@
debug_953:
.return (rx1214_cur)
rx1214_restart:
-.annotate 'line', 447
if_null rx1214_debug, debug_954
rx1214_cur."!cursor_debug"("NEXT", "infix:sym<lt>")
debug_954:
@@ -17293,8 +16772,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<lt>" :subid("315_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<lt>" :subid("315_1283975947.19641") :method
+.annotate 'line', 0
$P1216 = self."!PREFIX__!subrule"("O", "lt")
new $P1217, "ResizablePMCArray"
push $P1217, $P1216
@@ -17303,8 +16782,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<gt>" :subid("316_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<gt>" :subid("316_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1221_tgt
.local int rx1221_pos
.local int rx1221_off
@@ -17340,7 +16819,6 @@
set_addr $I10, rxscan1225_loop
rx1221_cur."!mark_push"(0, rx1221_pos, $I10)
rxscan1225_done:
-.annotate 'line', 530
# rx subcapture "sym"
set_addr $I10, rxcap_1226_fail
rx1221_cur."!mark_push"(0, rx1221_pos, $I10)
@@ -17376,7 +16854,6 @@
debug_957:
.return (rx1221_cur)
rx1221_restart:
-.annotate 'line', 447
if_null rx1221_debug, debug_958
rx1221_cur."!cursor_debug"("NEXT", "infix:sym<gt>")
debug_958:
@@ -17396,8 +16873,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<gt>" :subid("317_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<gt>" :subid("317_1283975947.19641") :method
+.annotate 'line', 0
$P1223 = self."!PREFIX__!subrule"("O", "gt")
new $P1224, "ResizablePMCArray"
push $P1224, $P1223
@@ -17406,8 +16883,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<=:=>" :subid("318_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<=:=>" :subid("318_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1228_tgt
.local int rx1228_pos
.local int rx1228_off
@@ -17443,7 +16920,6 @@
set_addr $I10, rxscan1232_loop
rx1228_cur."!mark_push"(0, rx1228_pos, $I10)
rxscan1232_done:
-.annotate 'line', 531
# rx subcapture "sym"
set_addr $I10, rxcap_1233_fail
rx1228_cur."!mark_push"(0, rx1228_pos, $I10)
@@ -17479,7 +16955,6 @@
debug_961:
.return (rx1228_cur)
rx1228_restart:
-.annotate 'line', 447
if_null rx1228_debug, debug_962
rx1228_cur."!cursor_debug"("NEXT", "infix:sym<=:=>")
debug_962:
@@ -17499,8 +16974,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<=:=>" :subid("319_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<=:=>" :subid("319_1283975947.19641") :method
+.annotate 'line', 0
$P1230 = self."!PREFIX__!subrule"("O", "=:=")
new $P1231, "ResizablePMCArray"
push $P1231, $P1230
@@ -17509,8 +16984,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<~~>" :subid("320_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<~~>" :subid("320_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1235_tgt
.local int rx1235_pos
.local int rx1235_off
@@ -17546,7 +17021,6 @@
set_addr $I10, rxscan1239_loop
rx1235_cur."!mark_push"(0, rx1235_pos, $I10)
rxscan1239_done:
-.annotate 'line', 532
# rx subcapture "sym"
set_addr $I10, rxcap_1240_fail
rx1235_cur."!mark_push"(0, rx1235_pos, $I10)
@@ -17582,7 +17056,6 @@
debug_965:
.return (rx1235_cur)
rx1235_restart:
-.annotate 'line', 447
if_null rx1235_debug, debug_966
rx1235_cur."!cursor_debug"("NEXT", "infix:sym<~~>")
debug_966:
@@ -17602,8 +17075,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<~~>" :subid("321_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<~~>" :subid("321_1283975947.19641") :method
+.annotate 'line', 0
$P1237 = self."!PREFIX__!subrule"("O", "~~")
new $P1238, "ResizablePMCArray"
push $P1238, $P1237
@@ -17612,8 +17085,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<&&>" :subid("322_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<&&>" :subid("322_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1242_tgt
.local int rx1242_pos
.local int rx1242_off
@@ -17649,7 +17122,6 @@
set_addr $I10, rxscan1246_loop
rx1242_cur."!mark_push"(0, rx1242_pos, $I10)
rxscan1246_done:
-.annotate 'line', 534
# rx subcapture "sym"
set_addr $I10, rxcap_1247_fail
rx1242_cur."!mark_push"(0, rx1242_pos, $I10)
@@ -17685,7 +17157,6 @@
debug_969:
.return (rx1242_cur)
rx1242_restart:
-.annotate 'line', 447
if_null rx1242_debug, debug_970
rx1242_cur."!cursor_debug"("NEXT", "infix:sym<&&>")
debug_970:
@@ -17705,8 +17176,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<&&>" :subid("323_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<&&>" :subid("323_1283975947.19641") :method
+.annotate 'line', 0
$P1244 = self."!PREFIX__!subrule"("O", "&&")
new $P1245, "ResizablePMCArray"
push $P1245, $P1244
@@ -17715,8 +17186,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<||>" :subid("324_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<||>" :subid("324_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1249_tgt
.local int rx1249_pos
.local int rx1249_off
@@ -17752,7 +17223,6 @@
set_addr $I10, rxscan1253_loop
rx1249_cur."!mark_push"(0, rx1249_pos, $I10)
rxscan1253_done:
-.annotate 'line', 536
# rx subcapture "sym"
set_addr $I10, rxcap_1254_fail
rx1249_cur."!mark_push"(0, rx1249_pos, $I10)
@@ -17788,7 +17258,6 @@
debug_973:
.return (rx1249_cur)
rx1249_restart:
-.annotate 'line', 447
if_null rx1249_debug, debug_974
rx1249_cur."!cursor_debug"("NEXT", "infix:sym<||>")
debug_974:
@@ -17808,8 +17277,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<||>" :subid("325_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<||>" :subid("325_1283975947.19641") :method
+.annotate 'line', 0
$P1251 = self."!PREFIX__!subrule"("O", "||")
new $P1252, "ResizablePMCArray"
push $P1252, $P1251
@@ -17818,8 +17287,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<//>" :subid("326_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<//>" :subid("326_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1256_tgt
.local int rx1256_pos
.local int rx1256_off
@@ -17855,7 +17324,6 @@
set_addr $I10, rxscan1260_loop
rx1256_cur."!mark_push"(0, rx1256_pos, $I10)
rxscan1260_done:
-.annotate 'line', 537
# rx subcapture "sym"
set_addr $I10, rxcap_1261_fail
rx1256_cur."!mark_push"(0, rx1256_pos, $I10)
@@ -17891,7 +17359,6 @@
debug_977:
.return (rx1256_cur)
rx1256_restart:
-.annotate 'line', 447
if_null rx1256_debug, debug_978
rx1256_cur."!cursor_debug"("NEXT", "infix:sym<//>")
debug_978:
@@ -17911,8 +17378,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<//>" :subid("327_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<//>" :subid("327_1283975947.19641") :method
+.annotate 'line', 0
$P1258 = self."!PREFIX__!subrule"("O", "//")
new $P1259, "ResizablePMCArray"
push $P1259, $P1258
@@ -17921,8 +17388,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<?? !!>" :subid("328_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<?? !!>" :subid("328_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1263_tgt
.local int rx1263_pos
.local int rx1263_off
@@ -17958,7 +17425,6 @@
set_addr $I10, rxscan1267_loop
rx1263_cur."!mark_push"(0, rx1263_pos, $I10)
rxscan1267_done:
-.annotate 'line', 540
# rx literal "??"
add $I11, rx1263_pos, 2
gt $I11, rx1263_eos, rx1263_fail
@@ -17966,13 +17432,11 @@
substr $S10, rx1263_tgt, $I11, 2
ne $S10, "??", rx1263_fail
add rx1263_pos, 2
-.annotate 'line', 541
# rx subrule "ws" subtype=method negate=
rx1263_cur."!cursor_pos"(rx1263_pos)
$P10 = rx1263_cur."ws"()
unless $P10, rx1263_fail
rx1263_pos = $P10."pos"()
-.annotate 'line', 542
# rx subrule "EXPR" subtype=capture negate=
rx1263_cur."!cursor_pos"(rx1263_pos)
$P10 = rx1263_cur."EXPR"("i=")
@@ -17980,7 +17444,6 @@
rx1263_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("EXPR")
rx1263_pos = $P10."pos"()
-.annotate 'line', 543
# rx literal "!!"
add $I11, rx1263_pos, 2
gt $I11, rx1263_eos, rx1263_fail
@@ -17988,7 +17451,6 @@
substr $S10, rx1263_tgt, $I11, 2
ne $S10, "!!", rx1263_fail
add rx1263_pos, 2
-.annotate 'line', 544
# rx subrule "O" subtype=capture negate=
rx1263_cur."!cursor_pos"(rx1263_pos)
$P10 = rx1263_cur."O"("%conditional, :reducecheck<ternary>, :pasttype<if>")
@@ -17996,7 +17458,6 @@
rx1263_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("O")
rx1263_pos = $P10."pos"()
-.annotate 'line', 539
# rx pass
rx1263_cur."!cursor_pass"(rx1263_pos, "infix:sym<?? !!>")
if_null rx1263_debug, debug_981
@@ -18004,7 +17465,6 @@
debug_981:
.return (rx1263_cur)
rx1263_restart:
-.annotate 'line', 447
if_null rx1263_debug, debug_982
rx1263_cur."!cursor_debug"("NEXT", "infix:sym<?? !!>")
debug_982:
@@ -18024,8 +17484,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<?? !!>" :subid("329_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<?? !!>" :subid("329_1283975947.19641") :method
+.annotate 'line', 0
$P1265 = self."!PREFIX__!subrule"("ws", "??")
new $P1266, "ResizablePMCArray"
push $P1266, $P1265
@@ -18034,8 +17494,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<=>" :subid("330_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<=>" :subid("330_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1269_tgt
.local int rx1269_pos
.local int rx1269_off
@@ -18071,7 +17531,6 @@
set_addr $I10, rxscan1273_loop
rx1269_cur."!mark_push"(0, rx1269_pos, $I10)
rxscan1273_done:
-.annotate 'line', 548
# rx subcapture "sym"
set_addr $I10, rxcap_1274_fail
rx1269_cur."!mark_push"(0, rx1269_pos, $I10)
@@ -18098,7 +17557,6 @@
$P10 = rx1269_cur."panic"("Assignment (\"=\") not supported in NQP, use \":=\" instead")
unless $P10, rx1269_fail
rx1269_pos = $P10."pos"()
-.annotate 'line', 547
# rx pass
rx1269_cur."!cursor_pass"(rx1269_pos, "infix:sym<=>")
if_null rx1269_debug, debug_985
@@ -18106,7 +17564,6 @@
debug_985:
.return (rx1269_cur)
rx1269_restart:
-.annotate 'line', 447
if_null rx1269_debug, debug_986
rx1269_cur."!cursor_debug"("NEXT", "infix:sym<=>")
debug_986:
@@ -18126,8 +17583,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<=>" :subid("331_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<=>" :subid("331_1283975947.19641") :method
+.annotate 'line', 0
$P1271 = self."!PREFIX__!subrule"("panic", "=")
new $P1272, "ResizablePMCArray"
push $P1272, $P1271
@@ -18136,8 +17593,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<:=>" :subid("332_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<:=>" :subid("332_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1276_tgt
.local int rx1276_pos
.local int rx1276_off
@@ -18173,7 +17630,6 @@
set_addr $I10, rxscan1280_loop
rx1276_cur."!mark_push"(0, rx1276_pos, $I10)
rxscan1280_done:
-.annotate 'line', 550
# rx subcapture "sym"
set_addr $I10, rxcap_1281_fail
rx1276_cur."!mark_push"(0, rx1276_pos, $I10)
@@ -18209,7 +17665,6 @@
debug_989:
.return (rx1276_cur)
rx1276_restart:
-.annotate 'line', 447
if_null rx1276_debug, debug_990
rx1276_cur."!cursor_debug"("NEXT", "infix:sym<:=>")
debug_990:
@@ -18229,8 +17684,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<:=>" :subid("333_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<:=>" :subid("333_1283975947.19641") :method
+.annotate 'line', 0
$P1278 = self."!PREFIX__!subrule"("O", ":=")
new $P1279, "ResizablePMCArray"
push $P1279, $P1278
@@ -18239,8 +17694,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<::=>" :subid("334_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<::=>" :subid("334_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1283_tgt
.local int rx1283_pos
.local int rx1283_off
@@ -18276,7 +17731,6 @@
set_addr $I10, rxscan1287_loop
rx1283_cur."!mark_push"(0, rx1283_pos, $I10)
rxscan1287_done:
-.annotate 'line', 551
# rx subcapture "sym"
set_addr $I10, rxcap_1288_fail
rx1283_cur."!mark_push"(0, rx1283_pos, $I10)
@@ -18312,7 +17766,6 @@
debug_993:
.return (rx1283_cur)
rx1283_restart:
-.annotate 'line', 447
if_null rx1283_debug, debug_994
rx1283_cur."!cursor_debug"("NEXT", "infix:sym<::=>")
debug_994:
@@ -18332,8 +17785,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<::=>" :subid("335_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<::=>" :subid("335_1283975947.19641") :method
+.annotate 'line', 0
$P1285 = self."!PREFIX__!subrule"("O", "::=")
new $P1286, "ResizablePMCArray"
push $P1286, $P1285
@@ -18342,8 +17795,8 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<,>" :subid("336_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "infix:sym<,>" :subid("336_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1290_tgt
.local int rx1290_pos
.local int rx1290_off
@@ -18379,7 +17832,6 @@
set_addr $I10, rxscan1294_loop
rx1290_cur."!mark_push"(0, rx1290_pos, $I10)
rxscan1294_done:
-.annotate 'line', 553
# rx subcapture "sym"
set_addr $I10, rxcap_1295_fail
rx1290_cur."!mark_push"(0, rx1290_pos, $I10)
@@ -18415,7 +17867,6 @@
debug_997:
.return (rx1290_cur)
rx1290_restart:
-.annotate 'line', 447
if_null rx1290_debug, debug_998
rx1290_cur."!cursor_debug"("NEXT", "infix:sym<,>")
debug_998:
@@ -18435,8 +17886,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<,>" :subid("337_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__infix:sym<,>" :subid("337_1283975947.19641") :method
+.annotate 'line', 0
$P1292 = self."!PREFIX__!subrule"("O", ",")
new $P1293, "ResizablePMCArray"
push $P1293, $P1292
@@ -18445,8 +17896,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<return>" :subid("338_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<return>" :subid("338_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1297_tgt
.local int rx1297_pos
.local int rx1297_off
@@ -18482,7 +17933,6 @@
set_addr $I10, rxscan1300_loop
rx1297_cur."!mark_push"(0, rx1297_pos, $I10)
rxscan1300_done:
-.annotate 'line', 555
# rx subcapture "sym"
set_addr $I10, rxcap_1301_fail
rx1297_cur."!mark_push"(0, rx1297_pos, $I10)
@@ -18524,7 +17974,6 @@
debug_1001:
.return (rx1297_cur)
rx1297_restart:
-.annotate 'line', 447
if_null rx1297_debug, debug_1002
rx1297_cur."!cursor_debug"("NEXT", "prefix:sym<return>")
debug_1002:
@@ -18544,8 +17993,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<return>" :subid("339_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<return>" :subid("339_1283975947.19641") :method
+.annotate 'line', 0
new $P1299, "ResizablePMCArray"
push $P1299, "return"
.return ($P1299)
@@ -18553,8 +18002,8 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<make>" :subid("340_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "prefix:sym<make>" :subid("340_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1303_tgt
.local int rx1303_pos
.local int rx1303_off
@@ -18590,7 +18039,6 @@
set_addr $I10, rxscan1306_loop
rx1303_cur."!mark_push"(0, rx1303_pos, $I10)
rxscan1306_done:
-.annotate 'line', 556
# rx subcapture "sym"
set_addr $I10, rxcap_1307_fail
rx1303_cur."!mark_push"(0, rx1303_pos, $I10)
@@ -18632,7 +18080,6 @@
debug_1005:
.return (rx1303_cur)
rx1303_restart:
-.annotate 'line', 447
if_null rx1303_debug, debug_1006
rx1303_cur."!cursor_debug"("NEXT", "prefix:sym<make>")
debug_1006:
@@ -18652,8 +18099,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<make>" :subid("341_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__prefix:sym<make>" :subid("341_1283975947.19641") :method
+.annotate 'line', 0
new $P1305, "ResizablePMCArray"
push $P1305, "make"
.return ($P1305)
@@ -18661,8 +18108,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<last>" :subid("342_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "term:sym<last>" :subid("342_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1309_tgt
.local int rx1309_pos
.local int rx1309_off
@@ -18698,7 +18145,6 @@
set_addr $I10, rxscan1312_loop
rx1309_cur."!mark_push"(0, rx1309_pos, $I10)
rxscan1312_done:
-.annotate 'line', 557
# rx subcapture "sym"
set_addr $I10, rxcap_1313_fail
rx1309_cur."!mark_push"(0, rx1309_pos, $I10)
@@ -18727,7 +18173,6 @@
debug_1009:
.return (rx1309_cur)
rx1309_restart:
-.annotate 'line', 447
if_null rx1309_debug, debug_1010
rx1309_cur."!cursor_debug"("NEXT", "term:sym<last>")
debug_1010:
@@ -18747,8 +18192,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<last>" :subid("343_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__term:sym<last>" :subid("343_1283975947.19641") :method
+.annotate 'line', 0
new $P1311, "ResizablePMCArray"
push $P1311, "last"
.return ($P1311)
@@ -18756,8 +18201,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<next>" :subid("344_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "term:sym<next>" :subid("344_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1315_tgt
.local int rx1315_pos
.local int rx1315_off
@@ -18793,7 +18238,6 @@
set_addr $I10, rxscan1318_loop
rx1315_cur."!mark_push"(0, rx1315_pos, $I10)
rxscan1318_done:
-.annotate 'line', 558
# rx subcapture "sym"
set_addr $I10, rxcap_1319_fail
rx1315_cur."!mark_push"(0, rx1315_pos, $I10)
@@ -18822,7 +18266,6 @@
debug_1013:
.return (rx1315_cur)
rx1315_restart:
-.annotate 'line', 447
if_null rx1315_debug, debug_1014
rx1315_cur."!cursor_debug"("NEXT", "term:sym<next>")
debug_1014:
@@ -18842,8 +18285,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<next>" :subid("345_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__term:sym<next>" :subid("345_1283975947.19641") :method
+.annotate 'line', 0
new $P1317, "ResizablePMCArray"
push $P1317, "next"
.return ($P1317)
@@ -18851,8 +18294,8 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<redo>" :subid("346_1283368207.8572") :method :outer("11_1283368207.8572")
-.annotate 'line', 447
+.sub "term:sym<redo>" :subid("346_1283975947.19641") :method :outer("11_1283975947.19641")
+.annotate 'line', 0
.local string rx1321_tgt
.local int rx1321_pos
.local int rx1321_off
@@ -18888,7 +18331,6 @@
set_addr $I10, rxscan1324_loop
rx1321_cur."!mark_push"(0, rx1321_pos, $I10)
rxscan1324_done:
-.annotate 'line', 559
# rx subcapture "sym"
set_addr $I10, rxcap_1325_fail
rx1321_cur."!mark_push"(0, rx1321_pos, $I10)
@@ -18917,7 +18359,6 @@
debug_1017:
.return (rx1321_cur)
rx1321_restart:
-.annotate 'line', 447
if_null rx1321_debug, debug_1018
rx1321_cur."!cursor_debug"("NEXT", "term:sym<redo>")
debug_1018:
@@ -18937,8 +18378,8 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<redo>" :subid("347_1283368207.8572") :method
-.annotate 'line', 447
+.sub "!PREFIX__term:sym<redo>" :subid("347_1283975947.19641") :method
+.annotate 'line', 0
new $P1323, "ResizablePMCArray"
push $P1323, "redo"
.return ($P1323)
@@ -18947,16 +18388,15 @@
.namespace ["NQP";"Grammar"]
.include "except_types.pasm"
-.sub "smartmatch" :subid("348_1283368207.8572") :method :outer("11_1283368207.8572")
+.sub "smartmatch" :subid("348_1283975947.19641") :method :outer("11_1283975947.19641")
.param pmc param_1329
-.annotate 'line', 561
+.annotate 'line', 0
new $P1328, 'ExceptionHandler'
set_addr $P1328, control_1327
$P1328."handle_types"(.CONTROL_RETURN)
push_eh $P1328
.lex "self", self
.lex "$/", param_1329
-.annotate 'line', 563
new $P1330, "Undef"
.lex "$t", $P1330
find_lex $P1331, "$/"
@@ -18989,7 +18429,6 @@
store_lex "$/", $P1337
vivify_1025:
set $P1337[1], $P1336
-.annotate 'line', 561
.return ($P1336)
control_1327:
.local pmc exception
@@ -19000,34 +18439,34 @@
.namespace ["NQP";"Regex"]
-.sub "_block1339" :subid("349_1283368207.8572") :outer("11_1283368207.8572")
-.annotate 'line', 567
- .const 'Sub' $P1396 = "368_1283368207.8572"
+.sub "_block1339" :subid("349_1283975947.19641") :outer("11_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1396 = "368_1283975947.19641"
capture_lex $P1396
- .const 'Sub' $P1391 = "366_1283368207.8572"
+ .const 'Sub' $P1391 = "366_1283975947.19641"
capture_lex $P1391
- .const 'Sub' $P1379 = "363_1283368207.8572"
+ .const 'Sub' $P1379 = "363_1283975947.19641"
capture_lex $P1379
- .const 'Sub' $P1369 = "360_1283368207.8572"
+ .const 'Sub' $P1369 = "360_1283975947.19641"
capture_lex $P1369
- .const 'Sub' $P1364 = "358_1283368207.8572"
+ .const 'Sub' $P1364 = "358_1283975947.19641"
capture_lex $P1364
- .const 'Sub' $P1355 = "355_1283368207.8572"
+ .const 'Sub' $P1355 = "355_1283975947.19641"
capture_lex $P1355
- .const 'Sub' $P1350 = "353_1283368207.8572"
+ .const 'Sub' $P1350 = "353_1283975947.19641"
capture_lex $P1350
- .const 'Sub' $P1341 = "350_1283368207.8572"
+ .const 'Sub' $P1341 = "350_1283975947.19641"
capture_lex $P1341
- .const 'Sub' $P1396 = "368_1283368207.8572"
+ .const 'Sub' $P1396 = "368_1283975947.19641"
capture_lex $P1396
.return ($P1396)
.end
.namespace ["NQP";"Regex"]
-.sub "metachar:sym<:my>" :subid("350_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
- .const 'Sub' $P1347 = "352_1283368207.8572"
+.sub "metachar:sym<:my>" :subid("350_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1347 = "352_1283975947.19641"
capture_lex $P1347
.local string rx1342_tgt
.local int rx1342_pos
@@ -19064,7 +18503,6 @@
set_addr $I10, rxscan1345_loop
rx1342_cur."!mark_push"(0, rx1342_pos, $I10)
rxscan1345_done:
-.annotate 'line', 569
# rx literal ":"
add $I11, rx1342_pos, 1
gt $I11, rx1342_eos, rx1342_fail
@@ -19074,7 +18512,7 @@
add rx1342_pos, 1
# rx subrule "before" subtype=zerowidth negate=
rx1342_cur."!cursor_pos"(rx1342_pos)
- .const 'Sub' $P1347 = "352_1283368207.8572"
+ .const 'Sub' $P1347 = "352_1283975947.19641"
capture_lex $P1347
$P10 = rx1342_cur."before"($P1347)
unless $P10, rx1342_fail
@@ -19097,7 +18535,6 @@
ord $I11, rx1342_tgt, $I11
ne $I11, 59, rx1342_fail
add rx1342_pos, 1
-.annotate 'line', 568
# rx pass
rx1342_cur."!cursor_pass"(rx1342_pos, "metachar:sym<:my>")
if_null rx1342_debug, debug_1031
@@ -19105,7 +18542,6 @@
debug_1031:
.return (rx1342_cur)
rx1342_restart:
-.annotate 'line', 567
if_null rx1342_debug, debug_1032
rx1342_cur."!cursor_debug"("NEXT", "metachar:sym<:my>")
debug_1032:
@@ -19125,8 +18561,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__metachar:sym<:my>" :subid("351_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__metachar:sym<:my>" :subid("351_1283975947.19641") :method
+.annotate 'line', 0
new $P1344, "ResizablePMCArray"
push $P1344, ":"
.return ($P1344)
@@ -19134,8 +18570,8 @@
.namespace ["NQP";"Regex"]
-.sub "_block1346" :anon :subid("352_1283368207.8572") :method :outer("350_1283368207.8572")
-.annotate 'line', 569
+.sub "_block1346" :anon :subid("352_1283975947.19641") :method :outer("350_1283975947.19641")
+.annotate 'line', 0
.local string rx1348_tgt
.local int rx1348_pos
.local int rx1348_off
@@ -19204,8 +18640,8 @@
.namespace ["NQP";"Regex"]
-.sub "metachar:sym<{ }>" :subid("353_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
+.sub "metachar:sym<{ }>" :subid("353_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
.local string rx1351_tgt
.local int rx1351_pos
.local int rx1351_off
@@ -19241,7 +18677,6 @@
set_addr $I10, rxscan1354_loop
rx1351_cur."!mark_push"(0, rx1351_pos, $I10)
rxscan1354_done:
-.annotate 'line', 573
# rx enumcharlist negate=0 zerowidth
ge rx1351_pos, rx1351_eos, rx1351_fail
sub $I10, rx1351_pos, rx1351_off
@@ -19255,7 +18690,6 @@
rx1351_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("codeblock")
rx1351_pos = $P10."pos"()
-.annotate 'line', 572
# rx pass
rx1351_cur."!cursor_pass"(rx1351_pos, "metachar:sym<{ }>")
if_null rx1351_debug, debug_1035
@@ -19263,7 +18697,6 @@
debug_1035:
.return (rx1351_cur)
rx1351_restart:
-.annotate 'line', 567
if_null rx1351_debug, debug_1036
rx1351_cur."!cursor_debug"("NEXT", "metachar:sym<{ }>")
debug_1036:
@@ -19283,8 +18716,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__metachar:sym<{ }>" :subid("354_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__metachar:sym<{ }>" :subid("354_1283975947.19641") :method
+.annotate 'line', 0
new $P1353, "ResizablePMCArray"
push $P1353, "{"
.return ($P1353)
@@ -19292,9 +18725,9 @@
.namespace ["NQP";"Regex"]
-.sub "metachar:sym<nqpvar>" :subid("355_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
- .const 'Sub' $P1361 = "357_1283368207.8572"
+.sub "metachar:sym<nqpvar>" :subid("355_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1361 = "357_1283975947.19641"
capture_lex $P1361
.local string rx1356_tgt
.local int rx1356_pos
@@ -19331,7 +18764,6 @@
set_addr $I10, rxscan1359_loop
rx1356_cur."!mark_push"(0, rx1356_pos, $I10)
rxscan1359_done:
-.annotate 'line', 577
# rx enumcharlist negate=0 zerowidth
ge rx1356_pos, rx1356_eos, rx1356_fail
sub $I10, rx1356_pos, rx1356_off
@@ -19340,7 +18772,7 @@
lt $I11, 0, rx1356_fail
# rx subrule "before" subtype=zerowidth negate=
rx1356_cur."!cursor_pos"(rx1356_pos)
- .const 'Sub' $P1361 = "357_1283368207.8572"
+ .const 'Sub' $P1361 = "357_1283975947.19641"
capture_lex $P1361
$P10 = rx1356_cur."before"($P1361)
unless $P10, rx1356_fail
@@ -19351,7 +18783,6 @@
rx1356_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("var")
rx1356_pos = $P10."pos"()
-.annotate 'line', 576
# rx pass
rx1356_cur."!cursor_pass"(rx1356_pos, "metachar:sym<nqpvar>")
if_null rx1356_debug, debug_1043
@@ -19359,7 +18790,6 @@
debug_1043:
.return (rx1356_cur)
rx1356_restart:
-.annotate 'line', 567
if_null rx1356_debug, debug_1044
rx1356_cur."!cursor_debug"("NEXT", "metachar:sym<nqpvar>")
debug_1044:
@@ -19379,8 +18809,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__metachar:sym<nqpvar>" :subid("356_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__metachar:sym<nqpvar>" :subid("356_1283975947.19641") :method
+.annotate 'line', 0
new $P1358, "ResizablePMCArray"
push $P1358, "$"
push $P1358, "@"
@@ -19389,8 +18819,8 @@
.namespace ["NQP";"Regex"]
-.sub "_block1360" :anon :subid("357_1283368207.8572") :method :outer("355_1283368207.8572")
-.annotate 'line', 577
+.sub "_block1360" :anon :subid("357_1283975947.19641") :method :outer("355_1283975947.19641")
+.annotate 'line', 0
.local string rx1362_tgt
.local int rx1362_pos
.local int rx1362_off
@@ -19461,8 +18891,8 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<{ }>" :subid("358_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
+.sub "assertion:sym<{ }>" :subid("358_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
.local string rx1365_tgt
.local int rx1365_pos
.local int rx1365_off
@@ -19498,7 +18928,6 @@
set_addr $I10, rxscan1368_loop
rx1365_cur."!mark_push"(0, rx1365_pos, $I10)
rxscan1368_done:
-.annotate 'line', 581
# rx enumcharlist negate=0 zerowidth
ge rx1365_pos, rx1365_eos, rx1365_fail
sub $I10, rx1365_pos, rx1365_off
@@ -19512,7 +18941,6 @@
rx1365_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("codeblock")
rx1365_pos = $P10."pos"()
-.annotate 'line', 580
# rx pass
rx1365_cur."!cursor_pass"(rx1365_pos, "assertion:sym<{ }>")
if_null rx1365_debug, debug_1047
@@ -19520,7 +18948,6 @@
debug_1047:
.return (rx1365_cur)
rx1365_restart:
-.annotate 'line', 567
if_null rx1365_debug, debug_1048
rx1365_cur."!cursor_debug"("NEXT", "assertion:sym<{ }>")
debug_1048:
@@ -19540,8 +18967,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<{ }>" :subid("359_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__assertion:sym<{ }>" :subid("359_1283975947.19641") :method
+.annotate 'line', 0
new $P1367, "ResizablePMCArray"
push $P1367, "{"
.return ($P1367)
@@ -19549,9 +18976,9 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<?{ }>" :subid("360_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
- .const 'Sub' $P1375 = "362_1283368207.8572"
+.sub "assertion:sym<?{ }>" :subid("360_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1375 = "362_1283975947.19641"
capture_lex $P1375
.local string rx1370_tgt
.local int rx1370_pos
@@ -19588,7 +19015,6 @@
set_addr $I10, rxscan1373_loop
rx1370_cur."!mark_push"(0, rx1370_pos, $I10)
rxscan1373_done:
-.annotate 'line', 585
# rx subcapture "zw"
set_addr $I10, rxcap_1378_fail
rx1370_cur."!mark_push"(0, rx1370_pos, $I10)
@@ -19601,7 +19027,7 @@
inc rx1370_pos
# rx subrule "before" subtype=zerowidth negate=
rx1370_cur."!cursor_pos"(rx1370_pos)
- .const 'Sub' $P1375 = "362_1283368207.8572"
+ .const 'Sub' $P1375 = "362_1283975947.19641"
capture_lex $P1375
$P10 = rx1370_cur."before"($P1375)
unless $P10, rx1370_fail
@@ -19623,7 +19049,6 @@
rx1370_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("codeblock")
rx1370_pos = $P10."pos"()
-.annotate 'line', 584
# rx pass
rx1370_cur."!cursor_pass"(rx1370_pos, "assertion:sym<?{ }>")
if_null rx1370_debug, debug_1055
@@ -19631,7 +19056,6 @@
debug_1055:
.return (rx1370_cur)
rx1370_restart:
-.annotate 'line', 567
if_null rx1370_debug, debug_1056
rx1370_cur."!cursor_debug"("NEXT", "assertion:sym<?{ }>")
debug_1056:
@@ -19651,8 +19075,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<?{ }>" :subid("361_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__assertion:sym<?{ }>" :subid("361_1283975947.19641") :method
+.annotate 'line', 0
new $P1372, "ResizablePMCArray"
push $P1372, "!"
push $P1372, "?"
@@ -19661,8 +19085,8 @@
.namespace ["NQP";"Regex"]
-.sub "_block1374" :anon :subid("362_1283368207.8572") :method :outer("360_1283368207.8572")
-.annotate 'line', 585
+.sub "_block1374" :anon :subid("362_1283975947.19641") :method :outer("360_1283975947.19641")
+.annotate 'line', 0
.local string rx1376_tgt
.local int rx1376_pos
.local int rx1376_off
@@ -19731,9 +19155,9 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<name>" :subid("363_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
- .const 'Sub' $P1388 = "365_1283368207.8572"
+.sub "assertion:sym<name>" :subid("363_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1388 = "365_1283975947.19641"
capture_lex $P1388
.local string rx1380_tgt
.local int rx1380_pos
@@ -19771,7 +19195,6 @@
set_addr $I10, rxscan1384_loop
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
rxscan1384_done:
-.annotate 'line', 589
# rx subrule "identifier" subtype=capture negate=
rx1380_cur."!cursor_pos"(rx1380_pos)
$P10 = rx1380_cur."identifier"()
@@ -19779,19 +19202,16 @@
rx1380_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("longname")
rx1380_pos = $P10."pos"()
-.annotate 'line', 596
# rx rxquantr1385 ** 0..1
set_addr $I10, rxquantr1385_done
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
rxquantr1385_loop:
alt1386_0:
-.annotate 'line', 590
set_addr $I10, alt1386_1
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
-.annotate 'line', 591
# rx subrule "before" subtype=zerowidth negate=
rx1380_cur."!cursor_pos"(rx1380_pos)
- .const 'Sub' $P1388 = "365_1283368207.8572"
+ .const 'Sub' $P1388 = "365_1283975947.19641"
capture_lex $P1388
$P10 = rx1380_cur."before"($P1388)
unless $P10, rx1380_fail
@@ -19799,7 +19219,6 @@
alt1386_1:
set_addr $I10, alt1386_2
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
-.annotate 'line', 592
# rx literal "="
add $I11, rx1380_pos, 1
gt $I11, rx1380_eos, rx1380_fail
@@ -19818,7 +19237,6 @@
alt1386_2:
set_addr $I10, alt1386_3
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
-.annotate 'line', 593
# rx literal ":"
add $I11, rx1380_pos, 1
gt $I11, rx1380_eos, rx1380_fail
@@ -19837,7 +19255,6 @@
alt1386_3:
set_addr $I10, alt1386_4
rx1380_cur."!mark_push"(0, rx1380_pos, $I10)
-.annotate 'line', 594
# rx literal "("
add $I11, rx1380_pos, 1
gt $I11, rx1380_eos, rx1380_fail
@@ -19861,7 +19278,6 @@
add rx1380_pos, 1
goto alt1386_end
alt1386_4:
-.annotate 'line', 595
# rx subrule "normspace" subtype=method negate=
rx1380_cur."!cursor_pos"(rx1380_pos)
$P10 = rx1380_cur."normspace"()
@@ -19875,11 +19291,9 @@
$P10."!cursor_names"("nibbler")
rx1380_pos = $P10."pos"()
alt1386_end:
-.annotate 'line', 596
set_addr $I10, rxquantr1385_done
(rx1380_rep) = rx1380_cur."!mark_commit"($I10)
rxquantr1385_done:
-.annotate 'line', 588
# rx pass
rx1380_cur."!cursor_pass"(rx1380_pos, "assertion:sym<name>")
if_null rx1380_debug, debug_1063
@@ -19887,7 +19301,6 @@
debug_1063:
.return (rx1380_cur)
rx1380_restart:
-.annotate 'line', 567
if_null rx1380_debug, debug_1064
rx1380_cur."!cursor_debug"("NEXT", "assertion:sym<name>")
debug_1064:
@@ -19907,8 +19320,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<name>" :subid("364_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__assertion:sym<name>" :subid("364_1283975947.19641") :method
+.annotate 'line', 0
$P1382 = self."!PREFIX__!subrule"("identifier", "")
new $P1383, "ResizablePMCArray"
push $P1383, $P1382
@@ -19917,8 +19330,8 @@
.namespace ["NQP";"Regex"]
-.sub "_block1387" :anon :subid("365_1283368207.8572") :method :outer("363_1283368207.8572")
-.annotate 'line', 591
+.sub "_block1387" :anon :subid("365_1283975947.19641") :method :outer("363_1283975947.19641")
+.annotate 'line', 0
.local string rx1389_tgt
.local int rx1389_pos
.local int rx1389_off
@@ -19987,8 +19400,8 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<var>" :subid("366_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
+.sub "assertion:sym<var>" :subid("366_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
.local string rx1392_tgt
.local int rx1392_pos
.local int rx1392_off
@@ -20024,7 +19437,6 @@
set_addr $I10, rxscan1395_loop
rx1392_cur."!mark_push"(0, rx1392_pos, $I10)
rxscan1395_done:
-.annotate 'line', 600
# rx enumcharlist negate=0 zerowidth
ge rx1392_pos, rx1392_eos, rx1392_fail
sub $I10, rx1392_pos, rx1392_off
@@ -20038,7 +19450,6 @@
rx1392_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("var")
rx1392_pos = $P10."pos"()
-.annotate 'line', 599
# rx pass
rx1392_cur."!cursor_pass"(rx1392_pos, "assertion:sym<var>")
if_null rx1392_debug, debug_1067
@@ -20046,7 +19457,6 @@
debug_1067:
.return (rx1392_cur)
rx1392_restart:
-.annotate 'line', 567
if_null rx1392_debug, debug_1068
rx1392_cur."!cursor_debug"("NEXT", "assertion:sym<var>")
debug_1068:
@@ -20066,8 +19476,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<var>" :subid("367_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__assertion:sym<var>" :subid("367_1283975947.19641") :method
+.annotate 'line', 0
new $P1394, "ResizablePMCArray"
push $P1394, "$"
push $P1394, "@"
@@ -20076,8 +19486,8 @@
.namespace ["NQP";"Regex"]
-.sub "codeblock" :subid("368_1283368207.8572") :method :outer("349_1283368207.8572")
-.annotate 'line', 567
+.sub "codeblock" :subid("368_1283975947.19641") :method :outer("349_1283975947.19641")
+.annotate 'line', 0
.local string rx1397_tgt
.local int rx1397_pos
.local int rx1397_off
@@ -20113,7 +19523,6 @@
set_addr $I10, rxscan1401_loop
rx1397_cur."!mark_push"(0, rx1397_pos, $I10)
rxscan1401_done:
-.annotate 'line', 604
# rx subrule "LANG" subtype=capture negate=
rx1397_cur."!cursor_pos"(rx1397_pos)
$P10 = rx1397_cur."LANG"("MAIN", "pblock")
@@ -20121,7 +19530,6 @@
rx1397_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("block")
rx1397_pos = $P10."pos"()
-.annotate 'line', 603
# rx pass
rx1397_cur."!cursor_pass"(rx1397_pos, "codeblock")
if_null rx1397_debug, debug_1071
@@ -20129,7 +19537,6 @@
debug_1071:
.return (rx1397_cur)
rx1397_restart:
-.annotate 'line', 567
if_null rx1397_debug, debug_1072
rx1397_cur."!cursor_debug"("NEXT", "codeblock")
debug_1072:
@@ -20149,8 +19556,8 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__codeblock" :subid("369_1283368207.8572") :method
-.annotate 'line', 567
+.sub "!PREFIX__codeblock" :subid("369_1283975947.19641") :method
+.annotate 'line', 0
$P1399 = self."!PREFIX__!subrule"("LANG", "")
new $P1400, "ResizablePMCArray"
push $P1400, $P1399
@@ -20159,18 +19566,18 @@
.namespace ["NQP";"Grammar"]
-.sub "_block1403" :load :anon :subid("370_1283368207.8572")
-.annotate 'line', 4
- .const 'Sub' $P1405 = "11_1283368207.8572"
+.sub "_block1403" :load :anon :subid("370_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1405 = "11_1283975947.19641"
$P1406 = $P1405()
.return ($P1406)
.end
.namespace []
-.sub "_block1424" :load :anon :subid("371_1283368207.8572")
-.annotate 'line', 1
- .const 'Sub' $P1426 = "10_1283368207.8572"
+.sub "_block1424" :load :anon :subid("371_1283975947.19641")
+.annotate 'line', 0
+ .const 'Sub' $P1426 = "10_1283975947.19641"
$P1427 = $P1426()
.return ($P1427)
.end
@@ -20178,32 +19585,29 @@
### .include 'gen/nqp-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368216.90714")
+.sub "_block11" :anon :subid("10_1283975952.27658")
.annotate 'line', 0
get_hll_global $P14, ["NQP";"Actions"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 3
get_hll_global $P14, ["NQP";"Actions"], "_block13"
capture_lex $P14
$P2464 = $P14()
-.annotate 'line', 1
.return ($P2464)
- .const 'Sub' $P2466 = "143_1283368216.90714"
+ .const 'Sub' $P2466 = "143_1283975952.27658"
.return ($P2466)
.end
.namespace []
-.sub "" :load :init :subid("post144") :outer("10_1283368216.90714")
+.sub "" :load :init :subid("post144") :outer("10_1283975952.27658")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368216.90714"
+ .const 'Sub' $P12 = "10_1283975952.27658"
.local pmc block
set block, $P12
$P2469 = get_root_global ["parrot"], "P6metaclass"
@@ -20212,248 +19616,241 @@
.namespace ["NQP";"Actions"]
-.sub "_block13" :subid("11_1283368216.90714") :outer("10_1283368216.90714")
-.annotate 'line', 3
- .const 'Sub' $P2460 = "142_1283368216.90714"
+.sub "_block13" :subid("11_1283975952.27658") :outer("10_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P2460 = "142_1283975952.27658"
capture_lex $P2460
get_hll_global $P2343, ["NQP";"RegexActions"], "_block2342"
capture_lex $P2343
- .const 'Sub' $P2332 = "132_1283368216.90714"
+ .const 'Sub' $P2332 = "132_1283975952.27658"
capture_lex $P2332
- .const 'Sub' $P2325 = "131_1283368216.90714"
+ .const 'Sub' $P2325 = "131_1283975952.27658"
capture_lex $P2325
- .const 'Sub' $P2318 = "130_1283368216.90714"
+ .const 'Sub' $P2318 = "130_1283975952.27658"
capture_lex $P2318
- .const 'Sub' $P2311 = "129_1283368216.90714"
+ .const 'Sub' $P2311 = "129_1283975952.27658"
capture_lex $P2311
- .const 'Sub' $P2298 = "128_1283368216.90714"
+ .const 'Sub' $P2298 = "128_1283975952.27658"
capture_lex $P2298
- .const 'Sub' $P2288 = "127_1283368216.90714"
+ .const 'Sub' $P2288 = "127_1283975952.27658"
capture_lex $P2288
- .const 'Sub' $P2278 = "126_1283368216.90714"
+ .const 'Sub' $P2278 = "126_1283975952.27658"
capture_lex $P2278
- .const 'Sub' $P2268 = "125_1283368216.90714"
+ .const 'Sub' $P2268 = "125_1283975952.27658"
capture_lex $P2268
- .const 'Sub' $P2261 = "124_1283368216.90714"
+ .const 'Sub' $P2261 = "124_1283975952.27658"
capture_lex $P2261
- .const 'Sub' $P2247 = "123_1283368216.90714"
+ .const 'Sub' $P2247 = "123_1283975952.27658"
capture_lex $P2247
- .const 'Sub' $P2237 = "122_1283368216.90714"
+ .const 'Sub' $P2237 = "122_1283975952.27658"
capture_lex $P2237
- .const 'Sub' $P2200 = "121_1283368216.90714"
+ .const 'Sub' $P2200 = "121_1283975952.27658"
capture_lex $P2200
- .const 'Sub' $P2186 = "120_1283368216.90714"
+ .const 'Sub' $P2186 = "120_1283975952.27658"
capture_lex $P2186
- .const 'Sub' $P2176 = "119_1283368216.90714"
+ .const 'Sub' $P2176 = "119_1283975952.27658"
capture_lex $P2176
- .const 'Sub' $P2166 = "118_1283368216.90714"
+ .const 'Sub' $P2166 = "118_1283975952.27658"
capture_lex $P2166
- .const 'Sub' $P2156 = "117_1283368216.90714"
+ .const 'Sub' $P2156 = "117_1283975952.27658"
capture_lex $P2156
- .const 'Sub' $P2146 = "116_1283368216.90714"
+ .const 'Sub' $P2146 = "116_1283975952.27658"
capture_lex $P2146
- .const 'Sub' $P2136 = "115_1283368216.90714"
+ .const 'Sub' $P2136 = "115_1283975952.27658"
capture_lex $P2136
- .const 'Sub' $P2108 = "114_1283368216.90714"
+ .const 'Sub' $P2108 = "114_1283975952.27658"
capture_lex $P2108
- .const 'Sub' $P2091 = "113_1283368216.90714"
+ .const 'Sub' $P2091 = "113_1283975952.27658"
capture_lex $P2091
- .const 'Sub' $P2081 = "112_1283368216.90714"
+ .const 'Sub' $P2081 = "112_1283975952.27658"
capture_lex $P2081
- .const 'Sub' $P2068 = "111_1283368216.90714"
+ .const 'Sub' $P2068 = "111_1283975952.27658"
capture_lex $P2068
- .const 'Sub' $P2055 = "110_1283368216.90714"
+ .const 'Sub' $P2055 = "110_1283975952.27658"
capture_lex $P2055
- .const 'Sub' $P2042 = "109_1283368216.90714"
+ .const 'Sub' $P2042 = "109_1283975952.27658"
capture_lex $P2042
- .const 'Sub' $P2032 = "108_1283368216.90714"
+ .const 'Sub' $P2032 = "108_1283975952.27658"
capture_lex $P2032
- .const 'Sub' $P2003 = "107_1283368216.90714"
+ .const 'Sub' $P2003 = "107_1283975952.27658"
capture_lex $P2003
- .const 'Sub' $P1979 = "106_1283368216.90714"
+ .const 'Sub' $P1979 = "106_1283975952.27658"
capture_lex $P1979
- .const 'Sub' $P1969 = "105_1283368216.90714"
+ .const 'Sub' $P1969 = "105_1283975952.27658"
capture_lex $P1969
- .const 'Sub' $P1959 = "104_1283368216.90714"
+ .const 'Sub' $P1959 = "104_1283975952.27658"
capture_lex $P1959
- .const 'Sub' $P1932 = "103_1283368216.90714"
+ .const 'Sub' $P1932 = "103_1283975952.27658"
capture_lex $P1932
- .const 'Sub' $P1914 = "102_1283368216.90714"
+ .const 'Sub' $P1914 = "102_1283975952.27658"
capture_lex $P1914
- .const 'Sub' $P1904 = "101_1283368216.90714"
+ .const 'Sub' $P1904 = "101_1283975952.27658"
capture_lex $P1904
- .const 'Sub' $P1800 = "98_1283368216.90714"
+ .const 'Sub' $P1800 = "98_1283975952.27658"
capture_lex $P1800
- .const 'Sub' $P1790 = "97_1283368216.90714"
+ .const 'Sub' $P1790 = "97_1283975952.27658"
capture_lex $P1790
- .const 'Sub' $P1761 = "96_1283368216.90714"
+ .const 'Sub' $P1761 = "96_1283975952.27658"
capture_lex $P1761
- .const 'Sub' $P1719 = "95_1283368216.90714"
+ .const 'Sub' $P1719 = "95_1283975952.27658"
capture_lex $P1719
- .const 'Sub' $P1703 = "94_1283368216.90714"
+ .const 'Sub' $P1703 = "94_1283975952.27658"
capture_lex $P1703
- .const 'Sub' $P1694 = "93_1283368216.90714"
+ .const 'Sub' $P1694 = "93_1283975952.27658"
capture_lex $P1694
- .const 'Sub' $P1662 = "92_1283368216.90714"
+ .const 'Sub' $P1662 = "92_1283975952.27658"
capture_lex $P1662
- .const 'Sub' $P1563 = "89_1283368216.90714"
+ .const 'Sub' $P1563 = "89_1283975952.27658"
capture_lex $P1563
- .const 'Sub' $P1546 = "88_1283368216.90714"
+ .const 'Sub' $P1546 = "88_1283975952.27658"
capture_lex $P1546
- .const 'Sub' $P1526 = "87_1283368216.90714"
+ .const 'Sub' $P1526 = "87_1283975952.27658"
capture_lex $P1526
- .const 'Sub' $P1414 = "84_1283368216.90714"
+ .const 'Sub' $P1414 = "84_1283975952.27658"
capture_lex $P1414
- .const 'Sub' $P1345 = "80_1283368216.90714"
+ .const 'Sub' $P1345 = "80_1283975952.27658"
capture_lex $P1345
- .const 'Sub' $P1300 = "78_1283368216.90714"
+ .const 'Sub' $P1300 = "78_1283975952.27658"
capture_lex $P1300
- .const 'Sub' $P1250 = "76_1283368216.90714"
+ .const 'Sub' $P1250 = "76_1283975952.27658"
capture_lex $P1250
- .const 'Sub' $P1240 = "75_1283368216.90714"
+ .const 'Sub' $P1240 = "75_1283975952.27658"
capture_lex $P1240
- .const 'Sub' $P1230 = "74_1283368216.90714"
+ .const 'Sub' $P1230 = "74_1283975952.27658"
capture_lex $P1230
- .const 'Sub' $P1159 = "72_1283368216.90714"
+ .const 'Sub' $P1159 = "72_1283975952.27658"
capture_lex $P1159
- .const 'Sub' $P1149 = "71_1283368216.90714"
+ .const 'Sub' $P1149 = "71_1283975952.27658"
capture_lex $P1149
- .const 'Sub' $P1132 = "70_1283368216.90714"
+ .const 'Sub' $P1132 = "70_1283975952.27658"
capture_lex $P1132
- .const 'Sub' $P1115 = "69_1283368216.90714"
+ .const 'Sub' $P1115 = "69_1283975952.27658"
capture_lex $P1115
- .const 'Sub' $P1098 = "68_1283368216.90714"
+ .const 'Sub' $P1098 = "68_1283975952.27658"
capture_lex $P1098
- .const 'Sub' $P1088 = "67_1283368216.90714"
+ .const 'Sub' $P1088 = "67_1283975952.27658"
capture_lex $P1088
- .const 'Sub' $P1078 = "66_1283368216.90714"
+ .const 'Sub' $P1078 = "66_1283975952.27658"
capture_lex $P1078
- .const 'Sub' $P1068 = "65_1283368216.90714"
+ .const 'Sub' $P1068 = "65_1283975952.27658"
capture_lex $P1068
- .const 'Sub' $P1044 = "64_1283368216.90714"
+ .const 'Sub' $P1044 = "64_1283975952.27658"
capture_lex $P1044
- .const 'Sub' $P991 = "63_1283368216.90714"
+ .const 'Sub' $P991 = "63_1283975952.27658"
capture_lex $P991
- .const 'Sub' $P981 = "62_1283368216.90714"
+ .const 'Sub' $P981 = "62_1283975952.27658"
capture_lex $P981
- .const 'Sub' $P892 = "60_1283368216.90714"
+ .const 'Sub' $P892 = "60_1283975952.27658"
capture_lex $P892
- .const 'Sub' $P866 = "59_1283368216.90714"
+ .const 'Sub' $P866 = "59_1283975952.27658"
capture_lex $P866
- .const 'Sub' $P850 = "58_1283368216.90714"
+ .const 'Sub' $P850 = "58_1283975952.27658"
capture_lex $P850
- .const 'Sub' $P840 = "57_1283368216.90714"
+ .const 'Sub' $P840 = "57_1283975952.27658"
capture_lex $P840
- .const 'Sub' $P830 = "56_1283368216.90714"
+ .const 'Sub' $P830 = "56_1283975952.27658"
capture_lex $P830
- .const 'Sub' $P820 = "55_1283368216.90714"
+ .const 'Sub' $P820 = "55_1283975952.27658"
capture_lex $P820
- .const 'Sub' $P810 = "54_1283368216.90714"
+ .const 'Sub' $P810 = "54_1283975952.27658"
capture_lex $P810
- .const 'Sub' $P800 = "53_1283368216.90714"
+ .const 'Sub' $P800 = "53_1283975952.27658"
capture_lex $P800
- .const 'Sub' $P790 = "52_1283368216.90714"
+ .const 'Sub' $P790 = "52_1283975952.27658"
capture_lex $P790
- .const 'Sub' $P780 = "51_1283368216.90714"
+ .const 'Sub' $P780 = "51_1283975952.27658"
capture_lex $P780
- .const 'Sub' $P770 = "50_1283368216.90714"
+ .const 'Sub' $P770 = "50_1283975952.27658"
capture_lex $P770
- .const 'Sub' $P760 = "49_1283368216.90714"
+ .const 'Sub' $P760 = "49_1283975952.27658"
capture_lex $P760
- .const 'Sub' $P750 = "48_1283368216.90714"
+ .const 'Sub' $P750 = "48_1283975952.27658"
capture_lex $P750
- .const 'Sub' $P740 = "47_1283368216.90714"
+ .const 'Sub' $P740 = "47_1283975952.27658"
capture_lex $P740
- .const 'Sub' $P730 = "46_1283368216.90714"
+ .const 'Sub' $P730 = "46_1283975952.27658"
capture_lex $P730
- .const 'Sub' $P720 = "45_1283368216.90714"
+ .const 'Sub' $P720 = "45_1283975952.27658"
capture_lex $P720
- .const 'Sub' $P702 = "44_1283368216.90714"
+ .const 'Sub' $P702 = "44_1283975952.27658"
capture_lex $P702
- .const 'Sub' $P667 = "43_1283368216.90714"
+ .const 'Sub' $P667 = "43_1283975952.27658"
capture_lex $P667
- .const 'Sub' $P651 = "42_1283368216.90714"
+ .const 'Sub' $P651 = "42_1283975952.27658"
capture_lex $P651
- .const 'Sub' $P630 = "41_1283368216.90714"
+ .const 'Sub' $P630 = "41_1283975952.27658"
capture_lex $P630
- .const 'Sub' $P610 = "40_1283368216.90714"
+ .const 'Sub' $P610 = "40_1283975952.27658"
capture_lex $P610
- .const 'Sub' $P597 = "39_1283368216.90714"
+ .const 'Sub' $P597 = "39_1283975952.27658"
capture_lex $P597
- .const 'Sub' $P571 = "38_1283368216.90714"
+ .const 'Sub' $P571 = "38_1283975952.27658"
capture_lex $P571
- .const 'Sub' $P535 = "37_1283368216.90714"
+ .const 'Sub' $P535 = "37_1283975952.27658"
capture_lex $P535
- .const 'Sub' $P518 = "36_1283368216.90714"
+ .const 'Sub' $P518 = "36_1283975952.27658"
capture_lex $P518
- .const 'Sub' $P504 = "35_1283368216.90714"
+ .const 'Sub' $P504 = "35_1283975952.27658"
capture_lex $P504
- .const 'Sub' $P451 = "33_1283368216.90714"
+ .const 'Sub' $P451 = "33_1283975952.27658"
capture_lex $P451
- .const 'Sub' $P440 = "32_1283368216.90714"
+ .const 'Sub' $P440 = "32_1283975952.27658"
capture_lex $P440
- .const 'Sub' $P427 = "31_1283368216.90714"
+ .const 'Sub' $P427 = "31_1283975952.27658"
capture_lex $P427
- .const 'Sub' $P407 = "30_1283368216.90714"
+ .const 'Sub' $P407 = "30_1283975952.27658"
capture_lex $P407
- .const 'Sub' $P397 = "29_1283368216.90714"
+ .const 'Sub' $P397 = "29_1283975952.27658"
capture_lex $P397
- .const 'Sub' $P387 = "28_1283368216.90714"
+ .const 'Sub' $P387 = "28_1283975952.27658"
capture_lex $P387
- .const 'Sub' $P371 = "27_1283368216.90714"
+ .const 'Sub' $P371 = "27_1283975952.27658"
capture_lex $P371
- .const 'Sub' $P288 = "25_1283368216.90714"
+ .const 'Sub' $P288 = "25_1283975952.27658"
capture_lex $P288
- .const 'Sub' $P245 = "23_1283368216.90714"
+ .const 'Sub' $P245 = "23_1283975952.27658"
capture_lex $P245
- .const 'Sub' $P213 = "22_1283368216.90714"
+ .const 'Sub' $P213 = "22_1283975952.27658"
capture_lex $P213
- .const 'Sub' $P180 = "21_1283368216.90714"
+ .const 'Sub' $P180 = "21_1283975952.27658"
capture_lex $P180
- .const 'Sub' $P170 = "20_1283368216.90714"
+ .const 'Sub' $P170 = "20_1283975952.27658"
capture_lex $P170
- .const 'Sub' $P151 = "19_1283368216.90714"
+ .const 'Sub' $P151 = "19_1283975952.27658"
capture_lex $P151
- .const 'Sub' $P100 = "18_1283368216.90714"
+ .const 'Sub' $P100 = "18_1283975952.27658"
capture_lex $P100
- .const 'Sub' $P84 = "17_1283368216.90714"
+ .const 'Sub' $P84 = "17_1283975952.27658"
capture_lex $P84
- .const 'Sub' $P63 = "16_1283368216.90714"
+ .const 'Sub' $P63 = "16_1283975952.27658"
capture_lex $P63
- .const 'Sub' $P27 = "13_1283368216.90714"
+ .const 'Sub' $P27 = "13_1283975952.27658"
capture_lex $P27
- .const 'Sub' $P16 = "12_1283368216.90714"
+ .const 'Sub' $P16 = "12_1283975952.27658"
capture_lex $P16
get_global $P15, "@BLOCK"
unless_null $P15, vivify_147
$P15 = root_new ['parrot';'ResizablePMCArray']
set_global "@BLOCK", $P15
vivify_147:
-.annotate 'line', 9
- .const 'Sub' $P16 = "12_1283368216.90714"
+ .const 'Sub' $P16 = "12_1283975952.27658"
newclosure $P26, $P16
.lex "xblock_immediate", $P26
-.annotate 'line', 14
- .const 'Sub' $P27 = "13_1283368216.90714"
+ .const 'Sub' $P27 = "13_1283975952.27658"
newclosure $P62, $P27
.lex "block_immediate", $P62
-.annotate 'line', 24
- .const 'Sub' $P63 = "16_1283368216.90714"
+ .const 'Sub' $P63 = "16_1283975952.27658"
newclosure $P83, $P63
.lex "vivitype", $P83
-.annotate 'line', 43
- .const 'Sub' $P84 = "17_1283368216.90714"
+ .const 'Sub' $P84 = "17_1283975952.27658"
newclosure $P99, $P84
.lex "colonpair_str", $P99
-.annotate 'line', 223
- .const 'Sub' $P100 = "18_1283368216.90714"
+ .const 'Sub' $P100 = "18_1283975952.27658"
newclosure $P150, $P100
.lex "push_block_handler", $P150
-.annotate 'line', 836
- .const 'Sub' $P151 = "19_1283368216.90714"
+ .const 'Sub' $P151 = "19_1283975952.27658"
newclosure $P165, $P151
.lex "control", $P165
-.annotate 'line', 3
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
@@ -20461,35 +19858,28 @@
$P0."ctxsave"()
ctxsave_done:
get_global $P166, "@BLOCK"
-.annotate 'line', 5
find_lex $P167, "xblock_immediate"
find_lex $P168, "block_immediate"
find_lex $P169, "vivitype"
-.annotate 'line', 35
find_lex $P212, "colonpair_str"
-.annotate 'line', 216
find_lex $P650, "push_block_handler"
-.annotate 'line', 827
find_lex $P2310, "control"
-.annotate 'line', 854
get_hll_global $P2343, ["NQP";"RegexActions"], "_block2342"
capture_lex $P2343
$P2454 = $P2343()
-.annotate 'line', 3
.return ($P2454)
- .const 'Sub' $P2456 = "141_1283368216.90714"
+ .const 'Sub' $P2456 = "141_1283975952.27658"
.return ($P2456)
.end
.namespace ["NQP";"Actions"]
-.sub "" :load :init :subid("post145") :outer("11_1283368216.90714")
-.annotate 'line', 3
+.sub "" :load :init :subid("post145") :outer("11_1283975952.27658")
+.annotate 'line', 0
get_hll_global $P14, ["NQP";"Actions"], "_block13"
.local pmc block
set block, $P14
-.annotate 'line', 5
- .const 'Sub' $P2460 = "142_1283368216.90714"
+ .const 'Sub' $P2460 = "142_1283975952.27658"
capture_lex $P2460
$P2460()
$P2463 = get_root_global ["parrot"], "P6metaclass"
@@ -20498,8 +19888,8 @@
.namespace ["NQP";"Actions"]
-.sub "_block2459" :anon :subid("142_1283368216.90714") :outer("11_1283368216.90714")
-.annotate 'line', 6
+.sub "_block2459" :anon :subid("142_1283975952.27658") :outer("11_1283975952.27658")
+.annotate 'line', 0
get_global $P2461, "@BLOCK"
unless_null $P2461, vivify_146
$P2461 = root_new ['parrot';'ResizablePMCArray']
@@ -20507,22 +19897,20 @@
vivify_146:
$P2462 = new ['ResizablePMCArray']
set_global "@BLOCK", $P2462
-.annotate 'line', 5
.return ($P2462)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "xblock_immediate" :subid("12_1283368216.90714") :outer("11_1283368216.90714")
+.sub "xblock_immediate" :subid("12_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_19
-.annotate 'line', 9
+.annotate 'line', 0
new $P18, 'ExceptionHandler'
set_addr $P18, control_17
$P18."handle_types"(.CONTROL_RETURN)
push_eh $P18
.lex "$xblock", param_19
-.annotate 'line', 10
find_lex $P20, "$xblock"
unless_null $P20, vivify_148
$P20 = root_new ['parrot';'ResizablePMCArray']
@@ -20539,7 +19927,6 @@
vivify_150:
set $P23[1], $P22
find_lex $P24, "$xblock"
-.annotate 'line', 9
.return ($P24)
control_17:
.local pmc exception
@@ -20551,20 +19938,18 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "block_immediate" :subid("13_1283368216.90714") :outer("11_1283368216.90714")
+.sub "block_immediate" :subid("13_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_30
-.annotate 'line', 14
- .const 'Sub' $P40 = "14_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P40 = "14_1283975952.27658"
capture_lex $P40
new $P29, 'ExceptionHandler'
set_addr $P29, control_28
$P29."handle_types"(.CONTROL_RETURN)
push_eh $P29
.lex "$block", param_30
-.annotate 'line', 15
find_lex $P31, "$block"
$P31."blocktype"("immediate")
-.annotate 'line', 16
find_lex $P35, "$block"
$P36 = $P35."symtable"()
unless $P36, unless_34
@@ -20576,12 +19961,11 @@
set $P33, $P38
unless_34_end:
if $P33, unless_32_end
- .const 'Sub' $P40 = "14_1283368216.90714"
+ .const 'Sub' $P40 = "14_1283975952.27658"
capture_lex $P40
$P40()
unless_32_end:
find_lex $P60, "$block"
-.annotate 'line', 14
.return ($P60)
control_28:
.local pmc exception
@@ -20593,18 +19977,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "_block39" :anon :subid("14_1283368216.90714") :outer("13_1283368216.90714")
-.annotate 'line', 16
- .const 'Sub' $P51 = "15_1283368216.90714"
+.sub "_block39" :anon :subid("14_1283975952.27658") :outer("13_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P51 = "15_1283975952.27658"
capture_lex $P51
-.annotate 'line', 17
new $P41, "Undef"
.lex "$stmts", $P41
get_hll_global $P42, ["PAST"], "Stmts"
find_lex $P43, "$block"
$P44 = $P42."new"($P43 :named("node"))
store_lex "$stmts", $P44
-.annotate 'line', 18
find_lex $P46, "$block"
$P47 = $P46."list"()
defined $I48, $P47
@@ -20618,7 +20000,7 @@
unless $P45, loop56_done
shift $P49, $P45
loop56_redo:
- .const 'Sub' $P51 = "15_1283368216.90714"
+ .const 'Sub' $P51 = "15_1283975952.27658"
capture_lex $P51
$P51($P49)
loop56_next:
@@ -20632,18 +20014,16 @@
loop56_done:
pop_eh
for_undef_151:
-.annotate 'line', 19
find_lex $P59, "$stmts"
store_lex "$block", $P59
-.annotate 'line', 16
.return ($P59)
.end
.namespace ["NQP";"Actions"]
-.sub "_block50" :anon :subid("15_1283368216.90714") :outer("14_1283368216.90714")
+.sub "_block50" :anon :subid("15_1283975952.27658") :outer("14_1283975952.27658")
.param pmc param_52
-.annotate 'line', 18
+.annotate 'line', 0
.lex "$_", param_52
find_lex $P53, "$stmts"
find_lex $P54, "$_"
@@ -20654,20 +20034,18 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "vivitype" :subid("16_1283368216.90714") :outer("11_1283368216.90714")
+.sub "vivitype" :subid("16_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_66
-.annotate 'line', 24
+.annotate 'line', 0
new $P65, 'ExceptionHandler'
set_addr $P65, control_64
$P65."handle_types"(.CONTROL_RETURN)
push_eh $P65
.lex "$sigil", param_66
-.annotate 'line', 25
find_lex $P69, "$sigil"
set $S70, $P69
iseq $I71, $S70, "%"
if $I71, if_68
-.annotate 'line', 27
find_lex $P76, "$sigil"
set $S77, $P76
iseq $I78, $S77, "@"
@@ -20677,21 +20055,17 @@
set $P74, $P81
goto if_75_end
if_75:
-.annotate 'line', 28
get_hll_global $P79, ["PAST"], "Op"
$P80 = $P79."new"(" %r = root_new ['parrot';'ResizablePMCArray']" :named("inline"))
set $P74, $P80
if_75_end:
set $P67, $P74
-.annotate 'line', 25
goto if_68_end
if_68:
-.annotate 'line', 26
get_hll_global $P72, ["PAST"], "Op"
$P73 = $P72."new"(" %r = root_new ['parrot';'Hash']" :named("inline"))
set $P67, $P73
if_68_end:
-.annotate 'line', 24
.return ($P67)
control_64:
.local pmc exception
@@ -20703,34 +20077,29 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "colonpair_str" :subid("17_1283368216.90714") :outer("11_1283368216.90714")
+.sub "colonpair_str" :subid("17_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_87
-.annotate 'line', 43
+.annotate 'line', 0
new $P86, 'ExceptionHandler'
set_addr $P86, control_85
$P86."handle_types"(.CONTROL_RETURN)
push_eh $P86
.lex "$ast", param_87
-.annotate 'line', 44
get_hll_global $P90, ["PAST"], "Op"
find_lex $P91, "$ast"
$P92 = $P90."ACCEPTS"($P91)
if $P92, if_89
-.annotate 'line', 46
find_lex $P96, "$ast"
$P97 = $P96."value"()
set $P88, $P97
-.annotate 'line', 44
goto if_89_end
if_89:
-.annotate 'line', 45
find_lex $P93, "$ast"
$P94 = $P93."list"()
join $S95, " ", $P94
new $P88, 'String'
set $P88, $S95
if_89_end:
-.annotate 'line', 43
.return ($P88)
control_85:
.local pmc exception
@@ -20742,17 +20111,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "push_block_handler" :subid("18_1283368216.90714") :outer("11_1283368216.90714")
+.sub "push_block_handler" :subid("18_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_103
.param pmc param_104
-.annotate 'line', 223
+.annotate 'line', 0
new $P102, 'ExceptionHandler'
set_addr $P102, control_101
$P102."handle_types"(.CONTROL_RETURN)
push_eh $P102
.lex "$/", param_103
.lex "$block", param_104
-.annotate 'line', 224
get_global $P106, "@BLOCK"
unless_null $P106, vivify_152
$P106 = root_new ['parrot';'ResizablePMCArray']
@@ -20763,7 +20131,6 @@
vivify_153:
$P108 = $P107."handlers"()
if $P108, unless_105_end
-.annotate 'line', 225
get_global $P109, "@BLOCK"
unless_null $P109, vivify_154
$P109 = root_new ['parrot';'ResizablePMCArray']
@@ -20775,42 +20142,30 @@
new $P111, "ResizablePMCArray"
$P110."handlers"($P111)
unless_105_end:
-.annotate 'line', 227
find_lex $P113, "$block"
$P114 = $P113."arity"()
if $P114, unless_112_end
-.annotate 'line', 228
find_lex $P115, "$block"
-.annotate 'line', 229
get_hll_global $P116, ["PAST"], "Op"
-.annotate 'line', 230
get_hll_global $P117, ["PAST"], "Var"
$P118 = $P117."new"("lexical" :named("scope"), "$!" :named("name"), 1 :named("isdecl"))
-.annotate 'line', 231
get_hll_global $P119, ["PAST"], "Var"
$P120 = $P119."new"("lexical" :named("scope"), "$_" :named("name"))
$P121 = $P116."new"($P118, $P120, "bind" :named("pasttype"))
-.annotate 'line', 229
$P115."unshift"($P121)
-.annotate 'line', 234
find_lex $P122, "$block"
get_hll_global $P123, ["PAST"], "Var"
$P124 = $P123."new"("$_" :named("name"), "parameter" :named("scope"))
$P122."unshift"($P124)
-.annotate 'line', 235
find_lex $P125, "$block"
$P125."symbol"("$_", "lexical" :named("scope"))
-.annotate 'line', 236
find_lex $P126, "$block"
$P126."symbol"("$!", "lexical" :named("scope"))
-.annotate 'line', 237
find_lex $P127, "$block"
$P127."arity"(1)
unless_112_end:
-.annotate 'line', 239
find_lex $P128, "$block"
$P128."blocktype"("declaration")
-.annotate 'line', 240
get_global $P129, "@BLOCK"
unless_null $P129, vivify_156
$P129 = root_new ['parrot';'ResizablePMCArray']
@@ -20820,35 +20175,23 @@
new $P130, "Undef"
vivify_157:
$P131 = $P130."handlers"()
-.annotate 'line', 241
get_hll_global $P132, ["PAST"], "Control"
find_lex $P133, "$/"
-.annotate 'line', 243
get_hll_global $P134, ["PAST"], "Stmts"
-.annotate 'line', 244
get_hll_global $P135, ["PAST"], "Op"
find_lex $P136, "$block"
-.annotate 'line', 246
get_hll_global $P137, ["PAST"], "Var"
$P138 = $P137."new"("register" :named("scope"), "exception" :named("name"))
$P139 = $P135."new"($P136, $P138, "call" :named("pasttype"))
-.annotate 'line', 248
get_hll_global $P140, ["PAST"], "Op"
-.annotate 'line', 249
get_hll_global $P141, ["PAST"], "Var"
-.annotate 'line', 250
get_hll_global $P142, ["PAST"], "Var"
$P143 = $P142."new"("register" :named("scope"), "exception" :named("name"))
$P144 = $P141."new"($P143, "handled", "keyed" :named("scope"))
-.annotate 'line', 249
$P145 = $P140."new"($P144, 1, "bind" :named("pasttype"))
-.annotate 'line', 248
$P146 = $P134."new"($P139, $P145)
-.annotate 'line', 243
$P147 = $P132."new"($P146, $P133 :named("node"))
-.annotate 'line', 241
$P148 = $P131."unshift"($P147)
-.annotate 'line', 223
.return ($P148)
control_101:
.local pmc exception
@@ -20860,28 +20203,24 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "control" :subid("19_1283368216.90714") :outer("11_1283368216.90714")
+.sub "control" :subid("19_1283975952.27658") :outer("11_1283975952.27658")
.param pmc param_154
.param pmc param_155
-.annotate 'line', 836
+.annotate 'line', 0
new $P153, 'ExceptionHandler'
set_addr $P153, control_152
$P153."handle_types"(.CONTROL_RETURN)
push_eh $P153
.lex "$/", param_154
.lex "$type", param_155
-.annotate 'line', 837
find_lex $P156, "$/"
get_hll_global $P157, ["PAST"], "Op"
find_lex $P158, "$/"
-.annotate 'line', 841
get_hll_global $P159, ["PAST"], "Val"
find_lex $P160, "$type"
$P161 = $P159."new"($P160 :named("value"), "!except_types" :named("returns"))
$P162 = $P157."new"(0, $P161, $P158 :named("node"), "die__vii" :named("pirop"))
-.annotate 'line', 837
$P163 = $P156."!make"($P162)
-.annotate 'line', 836
.return ($P163)
control_152:
.local pmc exception
@@ -20893,9 +20232,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "TOP" :subid("20_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "TOP" :subid("20_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_173
-.annotate 'line', 33
+.annotate 'line', 0
new $P172, 'ExceptionHandler'
set_addr $P172, control_171
$P172."handle_types"(.CONTROL_RETURN)
@@ -20924,18 +20263,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "deflongname" :subid("21_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "deflongname" :subid("21_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_183
-.annotate 'line', 35
+.annotate 'line', 0
new $P182, 'ExceptionHandler'
set_addr $P182, control_181
$P182."handle_types"(.CONTROL_RETURN)
push_eh $P182
.lex "self", self
.lex "$/", param_183
-.annotate 'line', 36
find_lex $P184, "$/"
-.annotate 'line', 37
find_lex $P187, "$/"
unless_null $P187, vivify_160
$P187 = root_new ['parrot';'Hash']
@@ -20945,12 +20282,10 @@
new $P188, "Undef"
vivify_161:
if $P188, if_186
-.annotate 'line', 39
find_lex $P208, "$/"
set $S209, $P208
new $P185, 'String'
set $P185, $S209
-.annotate 'line', 37
goto if_186_end
if_186:
find_lex $P189, "$/"
@@ -20981,7 +20316,6 @@
$S198 = $P197."named"()
concat $P199, $P193, $S198
concat $P200, $P199, "<"
-.annotate 'line', 38
find_lex $P201, "$/"
unless_null $P201, vivify_167
$P201 = root_new ['parrot';'Hash']
@@ -21000,9 +20334,7 @@
concat $P207, $P206, ">"
set $P185, $P207
if_186_end:
-.annotate 'line', 37
$P210 = $P184."!make"($P185)
-.annotate 'line', 35
.return ($P210)
control_181:
.local pmc exception
@@ -21014,22 +20346,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "comp_unit" :subid("22_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "comp_unit" :subid("22_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_216
-.annotate 'line', 49
+.annotate 'line', 0
new $P215, 'ExceptionHandler'
set_addr $P215, control_214
$P215."handle_types"(.CONTROL_RETURN)
push_eh $P215
.lex "self", self
.lex "$/", param_216
-.annotate 'line', 50
new $P217, "Undef"
.lex "$mainline", $P217
-.annotate 'line', 51
new $P218, "Undef"
.lex "$unit", $P218
-.annotate 'line', 50
find_lex $P219, "$/"
unless_null $P219, vivify_170
$P219 = root_new ['parrot';'Hash']
@@ -21040,44 +20369,33 @@
vivify_171:
$P221 = $P220."ast"()
store_lex "$mainline", $P221
-.annotate 'line', 51
get_global $P222, "@BLOCK"
$P223 = $P222."shift"()
store_lex "$unit", $P223
-.annotate 'line', 55
find_lex $P224, "$unit"
find_lex $P225, "self"
$P226 = $P225."CTXSAVE"()
$P224."push"($P226)
-.annotate 'line', 60
find_lex $P227, "$unit"
-.annotate 'line', 61
get_hll_global $P228, ["PAST"], "Op"
find_lex $P229, "$mainline"
$P230 = $P228."new"($P229, "return" :named("pirop"))
$P227."push"($P230)
-.annotate 'line', 66
find_lex $P231, "$unit"
-.annotate 'line', 67
get_hll_global $P232, ["PAST"], "Block"
-.annotate 'line', 69
get_hll_global $P233, ["PAST"], "Op"
get_hll_global $P234, ["PAST"], "Val"
find_lex $P235, "$unit"
$P236 = $P234."new"($P235 :named("value"))
$P237 = $P233."new"($P236, "call" :named("pasttype"))
$P238 = $P232."new"($P237, ":load" :named("pirflags"), 0 :named("lexical"), "" :named("namespace"))
-.annotate 'line', 67
$P231."push"($P238)
-.annotate 'line', 72
find_lex $P239, "$unit"
find_lex $P240, "$/"
$P239."node"($P240)
-.annotate 'line', 73
find_lex $P241, "$/"
find_lex $P242, "$unit"
$P243 = $P241."!make"($P242)
-.annotate 'line', 49
.return ($P243)
control_214:
.local pmc exception
@@ -21089,10 +20407,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statementlist" :subid("23_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statementlist" :subid("23_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_248
-.annotate 'line', 76
- .const 'Sub' $P262 = "24_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P262 = "24_1283975952.27658"
capture_lex $P262
new $P247, 'ExceptionHandler'
set_addr $P247, control_246
@@ -21100,14 +20418,12 @@
push_eh $P247
.lex "self", self
.lex "$/", param_248
-.annotate 'line', 77
new $P249, "Undef"
.lex "$past", $P249
get_hll_global $P250, ["PAST"], "Stmts"
find_lex $P251, "$/"
$P252 = $P250."new"($P251 :named("node"))
store_lex "$past", $P252
-.annotate 'line', 78
find_lex $P254, "$/"
unless_null $P254, vivify_172
$P254 = root_new ['parrot';'Hash']
@@ -21117,7 +20433,6 @@
new $P255, "Undef"
vivify_173:
unless $P255, if_253_end
-.annotate 'line', 79
find_lex $P257, "$/"
unless_null $P257, vivify_174
$P257 = root_new ['parrot';'Hash']
@@ -21137,7 +20452,7 @@
unless $P256, loop281_done
shift $P260, $P256
loop281_redo:
- .const 'Sub' $P262 = "24_1283368216.90714"
+ .const 'Sub' $P262 = "24_1283975952.27658"
capture_lex $P262
$P262($P260)
loop281_next:
@@ -21152,11 +20467,9 @@
pop_eh
for_undef_176:
if_253_end:
-.annotate 'line', 86
find_lex $P284, "$/"
find_lex $P285, "$past"
$P286 = $P284."!make"($P285)
-.annotate 'line', 76
.return ($P286)
control_246:
.local pmc exception
@@ -21167,16 +20480,15 @@
.namespace ["NQP";"Actions"]
-.sub "_block261" :anon :subid("24_1283368216.90714") :outer("23_1283368216.90714")
+.sub "_block261" :anon :subid("24_1283975952.27658") :outer("23_1283975952.27658")
.param pmc param_264
-.annotate 'line', 80
+.annotate 'line', 0
new $P263, "Undef"
.lex "$ast", $P263
.lex "$_", param_264
find_lex $P265, "$_"
$P266 = $P265."ast"()
store_lex "$ast", $P266
-.annotate 'line', 81
find_lex $P268, "$ast"
unless_null $P268, vivify_177
$P268 = root_new ['parrot';'Hash']
@@ -21197,7 +20509,6 @@
vivify_180:
store_lex "$ast", $P272
if_267_end:
-.annotate 'line', 82
find_lex $P274, "$ast"
unless_null $P274, vivify_181
$P274 = root_new ['parrot';'Hash']
@@ -21211,23 +20522,21 @@
$P277 = "block_immediate"($P276)
store_lex "$ast", $P277
if_273_end:
-.annotate 'line', 83
find_lex $P278, "$past"
find_lex $P279, "$ast"
$P280 = $P278."push"($P279)
-.annotate 'line', 79
.return ($P280)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement" :subid("25_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement" :subid("25_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_291
.param pmc param_292 :optional
.param int has_param_292 :opt_flag
-.annotate 'line', 89
- .const 'Sub' $P300 = "26_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P300 = "26_1283975952.27658"
capture_lex $P300
new $P290, 'ExceptionHandler'
set_addr $P290, control_289
@@ -21240,12 +20549,9 @@
set param_292, $P293
optparam_183:
.lex "$key", param_292
-.annotate 'line', 90
new $P294, "Undef"
.lex "$past", $P294
-.annotate 'line', 89
find_lex $P295, "$past"
-.annotate 'line', 91
find_lex $P297, "$/"
unless_null $P297, vivify_184
$P297 = root_new ['parrot';'Hash']
@@ -21255,7 +20561,6 @@
new $P298, "Undef"
vivify_185:
if $P298, if_296
-.annotate 'line', 112
find_lex $P361, "$/"
unless_null $P361, vivify_186
$P361 = root_new ['parrot';'Hash']
@@ -21265,13 +20570,11 @@
new $P362, "Undef"
vivify_187:
if $P362, if_360
-.annotate 'line', 113
new $P366, "Integer"
assign $P366, 0
store_lex "$past", $P366
goto if_360_end
if_360:
-.annotate 'line', 112
find_lex $P363, "$/"
unless_null $P363, vivify_188
$P363 = root_new ['parrot';'Hash']
@@ -21285,16 +20588,13 @@
if_360_end:
goto if_296_end
if_296:
-.annotate 'line', 91
- .const 'Sub' $P300 = "26_1283368216.90714"
+ .const 'Sub' $P300 = "26_1283975952.27658"
capture_lex $P300
$P300()
if_296_end:
-.annotate 'line', 114
find_lex $P367, "$/"
find_lex $P368, "$past"
$P369 = $P367."!make"($P368)
-.annotate 'line', 89
.return ($P369)
control_289:
.local pmc exception
@@ -21305,14 +20605,12 @@
.namespace ["NQP";"Actions"]
-.sub "_block299" :anon :subid("26_1283368216.90714") :outer("25_1283368216.90714")
-.annotate 'line', 92
+.sub "_block299" :anon :subid("26_1283975952.27658") :outer("25_1283975952.27658")
+.annotate 'line', 0
new $P301, "Undef"
.lex "$mc", $P301
-.annotate 'line', 93
new $P302, "Undef"
.lex "$ml", $P302
-.annotate 'line', 92
find_lex $P303, "$/"
unless_null $P303, vivify_190
$P303 = root_new ['parrot';'Hash']
@@ -21326,7 +20624,6 @@
new $P305, "Undef"
vivify_192:
store_lex "$mc", $P305
-.annotate 'line', 93
find_lex $P306, "$/"
unless_null $P306, vivify_193
$P306 = root_new ['parrot';'Hash']
@@ -21340,7 +20637,6 @@
new $P308, "Undef"
vivify_195:
store_lex "$ml", $P308
-.annotate 'line', 94
find_lex $P309, "$/"
unless_null $P309, vivify_196
$P309 = root_new ['parrot';'Hash']
@@ -21351,10 +20647,8 @@
vivify_197:
$P311 = $P310."ast"()
store_lex "$past", $P311
-.annotate 'line', 95
find_lex $P313, "$mc"
unless $P313, if_312_end
-.annotate 'line', 96
get_hll_global $P314, ["PAST"], "Op"
find_lex $P315, "$mc"
unless_null $P315, vivify_198
@@ -21379,13 +20673,11 @@
$P323 = $P314."new"($P317, $P318, $S321 :named("pasttype"), $P322 :named("node"))
store_lex "$past", $P323
if_312_end:
-.annotate 'line', 98
find_lex $P326, "$ml"
if $P326, if_325
set $P324, $P326
goto if_325_end
if_325:
-.annotate 'line', 99
find_lex $P329, "$ml"
unless_null $P329, vivify_202
$P329 = root_new ['parrot';'Hash']
@@ -21397,7 +20689,6 @@
set $S331, $P330
iseq $I332, $S331, "for"
if $I332, if_328
-.annotate 'line', 108
get_hll_global $P350, ["PAST"], "Op"
find_lex $P351, "$ml"
unless_null $P351, vivify_204
@@ -21421,27 +20712,19 @@
find_lex $P358, "$/"
$P359 = $P350."new"($P353, $P354, $S357 :named("pasttype"), $P358 :named("node"))
store_lex "$past", $P359
-.annotate 'line', 107
set $P327, $P359
-.annotate 'line', 99
goto if_328_end
if_328:
-.annotate 'line', 100
get_hll_global $P333, ["PAST"], "Block"
-.annotate 'line', 101
get_hll_global $P334, ["PAST"], "Var"
$P335 = $P334."new"("$_" :named("name"), "parameter" :named("scope"), 1 :named("isdecl"))
find_lex $P336, "$past"
$P337 = $P333."new"($P335, $P336, "immediate" :named("blocktype"))
-.annotate 'line', 100
store_lex "$past", $P337
-.annotate 'line', 103
find_lex $P338, "$past"
$P338."symbol"("$_", "lexical" :named("scope"))
-.annotate 'line', 104
find_lex $P339, "$past"
$P339."arity"(1)
-.annotate 'line', 105
get_hll_global $P340, ["PAST"], "Op"
find_lex $P341, "$ml"
unless_null $P341, vivify_208
@@ -21465,29 +20748,25 @@
find_lex $P348, "$/"
$P349 = $P340."new"($P343, $P344, $S347 :named("pasttype"), $P348 :named("node"))
store_lex "$past", $P349
-.annotate 'line', 99
set $P327, $P349
if_328_end:
-.annotate 'line', 98
set $P324, $P327
if_325_end:
-.annotate 'line', 91
.return ($P324)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "xblock" :subid("27_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "xblock" :subid("27_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_374
-.annotate 'line', 117
+.annotate 'line', 0
new $P373, 'ExceptionHandler'
set_addr $P373, control_372
$P373."handle_types"(.CONTROL_RETURN)
push_eh $P373
.lex "self", self
.lex "$/", param_374
-.annotate 'line', 118
find_lex $P375, "$/"
get_hll_global $P376, ["PAST"], "Op"
find_lex $P377, "$/"
@@ -21511,7 +20790,6 @@
find_lex $P383, "$/"
$P384 = $P376."new"($P379, $P382, "if" :named("pasttype"), $P383 :named("node"))
$P385 = $P375."!make"($P384)
-.annotate 'line', 117
.return ($P385)
control_372:
.local pmc exception
@@ -21523,16 +20801,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "pblock" :subid("28_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "pblock" :subid("28_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_390
-.annotate 'line', 121
+.annotate 'line', 0
new $P389, 'ExceptionHandler'
set_addr $P389, control_388
$P389."handle_types"(.CONTROL_RETURN)
push_eh $P389
.lex "self", self
.lex "$/", param_390
-.annotate 'line', 122
find_lex $P391, "$/"
find_lex $P392, "$/"
unless_null $P392, vivify_216
@@ -21544,7 +20821,6 @@
vivify_217:
$P394 = $P393."ast"()
$P395 = $P391."!make"($P394)
-.annotate 'line', 121
.return ($P395)
control_388:
.local pmc exception
@@ -21556,16 +20832,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "block" :subid("29_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "block" :subid("29_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_400
-.annotate 'line', 125
+.annotate 'line', 0
new $P399, 'ExceptionHandler'
set_addr $P399, control_398
$P399."handle_types"(.CONTROL_RETURN)
push_eh $P399
.lex "self", self
.lex "$/", param_400
-.annotate 'line', 126
find_lex $P401, "$/"
find_lex $P402, "$/"
unless_null $P402, vivify_218
@@ -21577,7 +20852,6 @@
vivify_219:
$P404 = $P403."ast"()
$P405 = $P401."!make"($P404)
-.annotate 'line', 125
.return ($P405)
control_398:
.local pmc exception
@@ -21589,22 +20863,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "blockoid" :subid("30_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "blockoid" :subid("30_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_410
-.annotate 'line', 129
+.annotate 'line', 0
new $P409, 'ExceptionHandler'
set_addr $P409, control_408
$P409."handle_types"(.CONTROL_RETURN)
push_eh $P409
.lex "self", self
.lex "$/", param_410
-.annotate 'line', 130
new $P411, "Undef"
.lex "$past", $P411
-.annotate 'line', 131
new $P412, "Undef"
.lex "$BLOCK", $P412
-.annotate 'line', 130
find_lex $P413, "$/"
unless_null $P413, vivify_220
$P413 = root_new ['parrot';'Hash']
@@ -21615,26 +20886,20 @@
vivify_221:
$P415 = $P414."ast"()
store_lex "$past", $P415
-.annotate 'line', 131
get_global $P416, "@BLOCK"
$P417 = $P416."shift"()
store_lex "$BLOCK", $P417
-.annotate 'line', 132
find_lex $P418, "$BLOCK"
find_lex $P419, "$past"
$P418."push"($P419)
-.annotate 'line', 133
find_lex $P420, "$BLOCK"
find_lex $P421, "$/"
$P420."node"($P421)
-.annotate 'line', 134
find_lex $P422, "$BLOCK"
$P422."closure"(1)
-.annotate 'line', 135
find_lex $P423, "$/"
find_lex $P424, "$BLOCK"
$P425 = $P423."!make"($P424)
-.annotate 'line', 129
.return ($P425)
control_408:
.local pmc exception
@@ -21646,31 +20911,27 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "newpad" :subid("31_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "newpad" :subid("31_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_430
-.annotate 'line', 138
+.annotate 'line', 0
new $P429, 'ExceptionHandler'
set_addr $P429, control_428
$P429."handle_types"(.CONTROL_RETURN)
push_eh $P429
.lex "self", self
.lex "$/", param_430
-.annotate 'line', 139
get_global $P431, "@BLOCK"
unless_null $P431, vivify_222
$P431 = root_new ['parrot';'ResizablePMCArray']
set_global "@BLOCK", $P431
vivify_222:
-.annotate 'line', 138
get_global $P432, "@BLOCK"
-.annotate 'line', 140
get_global $P433, "@BLOCK"
get_hll_global $P434, ["PAST"], "Block"
get_hll_global $P435, ["PAST"], "Stmts"
$P436 = $P435."new"()
$P437 = $P434."new"($P436)
$P438 = $P433."unshift"($P437)
-.annotate 'line', 138
.return ($P438)
control_428:
.local pmc exception
@@ -21682,24 +20943,21 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "outerctx" :subid("32_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "outerctx" :subid("32_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_443
-.annotate 'line', 143
+.annotate 'line', 0
new $P442, 'ExceptionHandler'
set_addr $P442, control_441
$P442."handle_types"(.CONTROL_RETURN)
push_eh $P442
.lex "self", self
.lex "$/", param_443
-.annotate 'line', 144
get_global $P444, "@BLOCK"
unless_null $P444, vivify_223
$P444 = root_new ['parrot';'ResizablePMCArray']
set_global "@BLOCK", $P444
vivify_223:
-.annotate 'line', 143
get_global $P445, "@BLOCK"
-.annotate 'line', 145
find_lex $P446, "self"
get_global $P447, "@BLOCK"
unless_null $P447, vivify_224
@@ -21710,7 +20968,6 @@
new $P448, "Undef"
vivify_225:
$P449 = $P446."SET_BLOCK_OUTER_CTX"($P448)
-.annotate 'line', 143
.return ($P449)
control_441:
.local pmc exception
@@ -21722,10 +20979,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<if>" :subid("33_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<if>" :subid("33_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_454
-.annotate 'line', 150
- .const 'Sub' $P482 = "34_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P482 = "34_1283975952.27658"
capture_lex $P482
new $P453, 'ExceptionHandler'
set_addr $P453, control_452
@@ -21733,13 +20990,10 @@
push_eh $P453
.lex "self", self
.lex "$/", param_454
-.annotate 'line', 151
new $P455, "Undef"
.lex "$count", $P455
-.annotate 'line', 152
new $P456, "Undef"
.lex "$past", $P456
-.annotate 'line', 151
find_lex $P457, "$/"
unless_null $P457, vivify_226
$P457 = root_new ['parrot';'Hash']
@@ -21753,7 +21007,6 @@
set $P460, $N459
sub $P461, $P460, 1
store_lex "$count", $P461
-.annotate 'line', 152
find_lex $P462, "$count"
set $I463, $P462
find_lex $P464, "$/"
@@ -21771,7 +21024,6 @@
$P467 = $P466."ast"()
$P468 = "xblock_immediate"($P467)
store_lex "$past", $P468
-.annotate 'line', 153
find_lex $P470, "$/"
unless_null $P470, vivify_231
$P470 = root_new ['parrot';'Hash']
@@ -21781,7 +21033,6 @@
new $P471, "Undef"
vivify_232:
unless $P471, if_469_end
-.annotate 'line', 154
find_lex $P472, "$past"
find_lex $P473, "$/"
unless_null $P473, vivify_233
@@ -21799,7 +21050,6 @@
$P477 = "block_immediate"($P476)
$P472."push"($P477)
if_469_end:
-.annotate 'line', 157
new $P498, 'ExceptionHandler'
set_addr $P498, loop497_handler
$P498."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST)
@@ -21810,7 +21060,7 @@
isgt $I480, $N479, 0.0
unless $I480, loop497_done
loop497_redo:
- .const 'Sub' $P482 = "34_1283368216.90714"
+ .const 'Sub' $P482 = "34_1283975952.27658"
capture_lex $P482
$P482()
loop497_next:
@@ -21823,11 +21073,9 @@
eq $P499, .CONTROL_LOOP_REDO, loop497_redo
loop497_done:
pop_eh
-.annotate 'line', 163
find_lex $P500, "$/"
find_lex $P501, "$past"
$P502 = $P500."!make"($P501)
-.annotate 'line', 150
.return ($P502)
control_452:
.local pmc exception
@@ -21838,18 +21086,15 @@
.namespace ["NQP";"Actions"]
-.sub "_block481" :anon :subid("34_1283368216.90714") :outer("33_1283368216.90714")
-.annotate 'line', 159
+.sub "_block481" :anon :subid("34_1283975952.27658") :outer("33_1283975952.27658")
+.annotate 'line', 0
new $P483, "Undef"
.lex "$else", $P483
-.annotate 'line', 157
find_lex $P484, "$count"
clone $P485, $P484
dec $P484
-.annotate 'line', 159
find_lex $P486, "$past"
store_lex "$else", $P486
-.annotate 'line', 160
find_lex $P487, "$count"
set $I488, $P487
find_lex $P489, "$/"
@@ -21867,27 +21112,24 @@
$P492 = $P491."ast"()
$P493 = "xblock_immediate"($P492)
store_lex "$past", $P493
-.annotate 'line', 161
find_lex $P494, "$past"
find_lex $P495, "$else"
$P496 = $P494."push"($P495)
-.annotate 'line', 157
.return ($P496)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<unless>" :subid("35_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<unless>" :subid("35_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_507
-.annotate 'line', 166
+.annotate 'line', 0
new $P506, 'ExceptionHandler'
set_addr $P506, control_505
$P506."handle_types"(.CONTROL_RETURN)
push_eh $P506
.lex "self", self
.lex "$/", param_507
-.annotate 'line', 167
new $P508, "Undef"
.lex "$past", $P508
find_lex $P509, "$/"
@@ -21901,14 +21143,11 @@
$P511 = $P510."ast"()
$P512 = "xblock_immediate"($P511)
store_lex "$past", $P512
-.annotate 'line', 168
find_lex $P513, "$past"
$P513."pasttype"("unless")
-.annotate 'line', 169
find_lex $P514, "$/"
find_lex $P515, "$past"
$P516 = $P514."!make"($P515)
-.annotate 'line', 166
.return ($P516)
control_505:
.local pmc exception
@@ -21920,16 +21159,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<while>" :subid("36_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<while>" :subid("36_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_521
-.annotate 'line', 172
+.annotate 'line', 0
new $P520, 'ExceptionHandler'
set_addr $P520, control_519
$P520."handle_types"(.CONTROL_RETURN)
push_eh $P520
.lex "self", self
.lex "$/", param_521
-.annotate 'line', 173
new $P522, "Undef"
.lex "$past", $P522
find_lex $P523, "$/"
@@ -21943,7 +21181,6 @@
$P525 = $P524."ast"()
$P526 = "xblock_immediate"($P525)
store_lex "$past", $P526
-.annotate 'line', 174
find_lex $P527, "$past"
find_lex $P528, "$/"
unless_null $P528, vivify_243
@@ -21955,11 +21192,9 @@
vivify_244:
set $S530, $P529
$P527."pasttype"($S530)
-.annotate 'line', 175
find_lex $P531, "$/"
find_lex $P532, "$past"
$P533 = $P531."!make"($P532)
-.annotate 'line', 172
.return ($P533)
control_519:
.local pmc exception
@@ -21971,22 +21206,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<repeat>" :subid("37_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<repeat>" :subid("37_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_538
-.annotate 'line', 178
+.annotate 'line', 0
new $P537, 'ExceptionHandler'
set_addr $P537, control_536
$P537."handle_types"(.CONTROL_RETURN)
push_eh $P537
.lex "self", self
.lex "$/", param_538
-.annotate 'line', 179
new $P539, "Undef"
.lex "$pasttype", $P539
-.annotate 'line', 180
new $P540, "Undef"
.lex "$past", $P540
-.annotate 'line', 179
new $P541, "String"
assign $P541, "repeat_"
find_lex $P542, "$/"
@@ -22001,7 +21233,6 @@
concat $P545, $P541, $S544
store_lex "$pasttype", $P545
find_lex $P546, "$past"
-.annotate 'line', 181
find_lex $P548, "$/"
unless_null $P548, vivify_247
$P548 = root_new ['parrot';'Hash']
@@ -22011,7 +21242,6 @@
new $P549, "Undef"
vivify_248:
if $P549, if_547
-.annotate 'line', 186
get_hll_global $P556, ["PAST"], "Op"
find_lex $P557, "$/"
unless_null $P557, vivify_249
@@ -22036,10 +21266,8 @@
find_lex $P565, "$/"
$P566 = $P556."new"($P559, $P563, $P564 :named("pasttype"), $P565 :named("node"))
store_lex "$past", $P566
-.annotate 'line', 185
goto if_547_end
if_547:
-.annotate 'line', 182
find_lex $P550, "$/"
unless_null $P550, vivify_253
$P550 = root_new ['parrot';'Hash']
@@ -22051,16 +21279,13 @@
$P552 = $P551."ast"()
$P553 = "xblock_immediate"($P552)
store_lex "$past", $P553
-.annotate 'line', 183
find_lex $P554, "$past"
find_lex $P555, "$pasttype"
$P554."pasttype"($P555)
if_547_end:
-.annotate 'line', 189
find_lex $P567, "$/"
find_lex $P568, "$past"
$P569 = $P567."!make"($P568)
-.annotate 'line', 178
.return ($P569)
control_536:
.local pmc exception
@@ -22072,22 +21297,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<for>" :subid("38_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<for>" :subid("38_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_574
-.annotate 'line', 192
+.annotate 'line', 0
new $P573, 'ExceptionHandler'
set_addr $P573, control_572
$P573."handle_types"(.CONTROL_RETURN)
push_eh $P573
.lex "self", self
.lex "$/", param_574
-.annotate 'line', 193
new $P575, "Undef"
.lex "$past", $P575
-.annotate 'line', 195
new $P576, "Undef"
.lex "$block", $P576
-.annotate 'line', 193
find_lex $P577, "$/"
unless_null $P577, vivify_255
$P577 = root_new ['parrot';'Hash']
@@ -22098,10 +21320,8 @@
vivify_256:
$P579 = $P578."ast"()
store_lex "$past", $P579
-.annotate 'line', 194
find_lex $P580, "$past"
$P580."pasttype"("for")
-.annotate 'line', 195
find_lex $P581, "$past"
unless_null $P581, vivify_257
$P581 = root_new ['parrot';'ResizablePMCArray']
@@ -22111,11 +21331,9 @@
new $P582, "Undef"
vivify_258:
store_lex "$block", $P582
-.annotate 'line', 196
find_lex $P584, "$block"
$P585 = $P584."arity"()
if $P585, unless_583_end
-.annotate 'line', 197
find_lex $P586, "$block"
unless_null $P586, vivify_259
$P586 = root_new ['parrot';'ResizablePMCArray']
@@ -22127,21 +21345,16 @@
get_hll_global $P588, ["PAST"], "Var"
$P589 = $P588."new"("$_" :named("name"), "parameter" :named("scope"))
$P587."push"($P589)
-.annotate 'line', 198
find_lex $P590, "$block"
$P590."symbol"("$_", "lexical" :named("scope"))
-.annotate 'line', 199
find_lex $P591, "$block"
$P591."arity"(1)
unless_583_end:
-.annotate 'line', 201
find_lex $P592, "$block"
$P592."blocktype"("immediate")
-.annotate 'line', 202
find_lex $P593, "$/"
find_lex $P594, "$past"
$P595 = $P593."!make"($P594)
-.annotate 'line', 192
.return ($P595)
control_572:
.local pmc exception
@@ -22153,16 +21366,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<return>" :subid("39_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<return>" :subid("39_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_600
-.annotate 'line', 205
+.annotate 'line', 0
new $P599, 'ExceptionHandler'
set_addr $P599, control_598
$P599."handle_types"(.CONTROL_RETURN)
push_eh $P599
.lex "self", self
.lex "$/", param_600
-.annotate 'line', 206
find_lex $P601, "$/"
get_hll_global $P602, ["PAST"], "Op"
find_lex $P603, "$/"
@@ -22177,7 +21389,6 @@
find_lex $P606, "$/"
$P607 = $P602."new"($P605, "return" :named("pasttype"), $P606 :named("node"))
$P608 = $P601."!make"($P607)
-.annotate 'line', 205
.return ($P608)
control_598:
.local pmc exception
@@ -22189,16 +21400,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<CATCH>" :subid("40_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<CATCH>" :subid("40_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_613
-.annotate 'line', 209
+.annotate 'line', 0
new $P612, 'ExceptionHandler'
set_addr $P612, control_611
$P612."handle_types"(.CONTROL_RETURN)
push_eh $P612
.lex "self", self
.lex "$/", param_613
-.annotate 'line', 210
new $P614, "Undef"
.lex "$block", $P614
find_lex $P615, "$/"
@@ -22211,11 +21421,9 @@
vivify_264:
$P617 = $P616."ast"()
store_lex "$block", $P617
-.annotate 'line', 211
find_lex $P618, "$/"
find_lex $P619, "$block"
"push_block_handler"($P618, $P619)
-.annotate 'line', 212
get_global $P620, "@BLOCK"
unless_null $P620, vivify_265
$P620 = root_new ['parrot';'ResizablePMCArray']
@@ -22230,13 +21438,11 @@
new $P623, "Undef"
vivify_267:
$P623."handle_types_except"("CONTROL")
-.annotate 'line', 213
find_lex $P624, "$/"
get_hll_global $P625, ["PAST"], "Stmts"
find_lex $P626, "$/"
$P627 = $P625."new"($P626 :named("node"))
$P628 = $P624."!make"($P627)
-.annotate 'line', 209
.return ($P628)
control_611:
.local pmc exception
@@ -22248,16 +21454,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_control:sym<CONTROL>" :subid("41_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_control:sym<CONTROL>" :subid("41_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_633
-.annotate 'line', 216
+.annotate 'line', 0
new $P632, 'ExceptionHandler'
set_addr $P632, control_631
$P632."handle_types"(.CONTROL_RETURN)
push_eh $P632
.lex "self", self
.lex "$/", param_633
-.annotate 'line', 217
new $P634, "Undef"
.lex "$block", $P634
find_lex $P635, "$/"
@@ -22270,11 +21475,9 @@
vivify_269:
$P637 = $P636."ast"()
store_lex "$block", $P637
-.annotate 'line', 218
find_lex $P638, "$/"
find_lex $P639, "$block"
"push_block_handler"($P638, $P639)
-.annotate 'line', 219
get_global $P640, "@BLOCK"
unless_null $P640, vivify_270
$P640 = root_new ['parrot';'ResizablePMCArray']
@@ -22289,13 +21492,11 @@
new $P643, "Undef"
vivify_272:
$P643."handle_types"("CONTROL")
-.annotate 'line', 220
find_lex $P644, "$/"
get_hll_global $P645, ["PAST"], "Stmts"
find_lex $P646, "$/"
$P647 = $P645."new"($P646 :named("node"))
$P648 = $P644."!make"($P647)
-.annotate 'line', 216
.return ($P648)
control_631:
.local pmc exception
@@ -22307,16 +21508,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_prefix:sym<INIT>" :subid("42_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_prefix:sym<INIT>" :subid("42_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_654
-.annotate 'line', 260
+.annotate 'line', 0
new $P653, 'ExceptionHandler'
set_addr $P653, control_652
$P653."handle_types"(.CONTROL_RETURN)
push_eh $P653
.lex "self", self
.lex "$/", param_654
-.annotate 'line', 261
get_global $P655, "@BLOCK"
unless_null $P655, vivify_273
$P655 = root_new ['parrot';'ResizablePMCArray']
@@ -22336,13 +21536,11 @@
vivify_276:
$P660 = $P659."ast"()
$P657."push"($P660)
-.annotate 'line', 262
find_lex $P661, "$/"
get_hll_global $P662, ["PAST"], "Stmts"
find_lex $P663, "$/"
$P664 = $P662."new"($P663 :named("node"))
$P665 = $P661."!make"($P664)
-.annotate 'line', 260
.return ($P665)
control_652:
.local pmc exception
@@ -22354,16 +21552,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_prefix:sym<try>" :subid("43_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_prefix:sym<try>" :subid("43_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_670
-.annotate 'line', 265
+.annotate 'line', 0
new $P669, 'ExceptionHandler'
set_addr $P669, control_668
$P669."handle_types"(.CONTROL_RETURN)
push_eh $P669
.lex "self", self
.lex "$/", param_670
-.annotate 'line', 266
new $P671, "Undef"
.lex "$past", $P671
find_lex $P672, "$/"
@@ -22376,51 +21573,37 @@
vivify_278:
$P674 = $P673."ast"()
store_lex "$past", $P674
-.annotate 'line', 267
find_lex $P676, "$past"
$S677 = $P676."WHAT"()
isne $I678, $S677, "PAST::Block()"
unless $I678, if_675_end
-.annotate 'line', 268
get_hll_global $P679, ["PAST"], "Block"
find_lex $P680, "$past"
find_lex $P681, "$/"
$P682 = $P679."new"($P680, "immediate" :named("blocktype"), $P681 :named("node"))
store_lex "$past", $P682
if_675_end:
-.annotate 'line', 270
find_lex $P684, "$past"
$P685 = $P684."handlers"()
if $P685, unless_683_end
-.annotate 'line', 271
find_lex $P686, "$past"
get_hll_global $P687, ["PAST"], "Control"
-.annotate 'line', 273
get_hll_global $P688, ["PAST"], "Stmts"
-.annotate 'line', 274
get_hll_global $P689, ["PAST"], "Op"
-.annotate 'line', 275
get_hll_global $P690, ["PAST"], "Var"
-.annotate 'line', 276
get_hll_global $P691, ["PAST"], "Var"
$P692 = $P691."new"("register" :named("scope"), "exception" :named("name"))
$P693 = $P690."new"($P692, "handled", "keyed" :named("scope"))
-.annotate 'line', 275
$P694 = $P689."new"($P693, 1, "bind" :named("pasttype"))
-.annotate 'line', 274
$P695 = $P688."new"($P694)
-.annotate 'line', 273
$P696 = $P687."new"($P695, "CONTROL" :named("handle_types_except"))
-.annotate 'line', 271
new $P697, "ResizablePMCArray"
push $P697, $P696
$P686."handlers"($P697)
unless_683_end:
-.annotate 'line', 285
find_lex $P698, "$/"
find_lex $P699, "$past"
$P700 = $P698."!make"($P699)
-.annotate 'line', 265
.return ($P700)
control_668:
.local pmc exception
@@ -22432,18 +21615,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "blorst" :subid("44_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "blorst" :subid("44_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_705
-.annotate 'line', 288
+.annotate 'line', 0
new $P704, 'ExceptionHandler'
set_addr $P704, control_703
$P704."handle_types"(.CONTROL_RETURN)
push_eh $P704
.lex "self", self
.lex "$/", param_705
-.annotate 'line', 289
find_lex $P706, "$/"
-.annotate 'line', 290
find_lex $P709, "$/"
unless_null $P709, vivify_279
$P709 = root_new ['parrot';'Hash']
@@ -22453,7 +21634,6 @@
new $P710, "Undef"
vivify_280:
if $P710, if_708
-.annotate 'line', 291
find_lex $P715, "$/"
unless_null $P715, vivify_281
$P715 = root_new ['parrot';'Hash']
@@ -22464,7 +21644,6 @@
vivify_282:
$P717 = $P716."ast"()
set $P707, $P717
-.annotate 'line', 290
goto if_708_end
if_708:
find_lex $P711, "$/"
@@ -22480,7 +21659,6 @@
set $P707, $P714
if_708_end:
$P718 = $P706."!make"($P707)
-.annotate 'line', 288
.return ($P718)
control_703:
.local pmc exception
@@ -22492,9 +21670,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_mod_cond:sym<if>" :subid("45_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_mod_cond:sym<if>" :subid("45_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_723
-.annotate 'line', 296
+.annotate 'line', 0
new $P722, 'ExceptionHandler'
set_addr $P722, control_721
$P722."handle_types"(.CONTROL_RETURN)
@@ -22523,9 +21701,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_mod_cond:sym<unless>" :subid("46_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_mod_cond:sym<unless>" :subid("46_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_733
-.annotate 'line', 297
+.annotate 'line', 0
new $P732, 'ExceptionHandler'
set_addr $P732, control_731
$P732."handle_types"(.CONTROL_RETURN)
@@ -22554,9 +21732,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_mod_loop:sym<while>" :subid("47_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_mod_loop:sym<while>" :subid("47_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_743
-.annotate 'line', 299
+.annotate 'line', 0
new $P742, 'ExceptionHandler'
set_addr $P742, control_741
$P742."handle_types"(.CONTROL_RETURN)
@@ -22585,9 +21763,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "statement_mod_loop:sym<until>" :subid("48_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "statement_mod_loop:sym<until>" :subid("48_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_753
-.annotate 'line', 300
+.annotate 'line', 0
new $P752, 'ExceptionHandler'
set_addr $P752, control_751
$P752."handle_types"(.CONTROL_RETURN)
@@ -22616,9 +21794,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<fatarrow>" :subid("49_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<fatarrow>" :subid("49_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_763
-.annotate 'line', 304
+.annotate 'line', 0
new $P762, 'ExceptionHandler'
set_addr $P762, control_761
$P762."handle_types"(.CONTROL_RETURN)
@@ -22647,9 +21825,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<colonpair>" :subid("50_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<colonpair>" :subid("50_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_773
-.annotate 'line', 305
+.annotate 'line', 0
new $P772, 'ExceptionHandler'
set_addr $P772, control_771
$P772."handle_types"(.CONTROL_RETURN)
@@ -22678,9 +21856,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<variable>" :subid("51_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<variable>" :subid("51_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_783
-.annotate 'line', 306
+.annotate 'line', 0
new $P782, 'ExceptionHandler'
set_addr $P782, control_781
$P782."handle_types"(.CONTROL_RETURN)
@@ -22709,9 +21887,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<package_declarator>" :subid("52_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<package_declarator>" :subid("52_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_793
-.annotate 'line', 307
+.annotate 'line', 0
new $P792, 'ExceptionHandler'
set_addr $P792, control_791
$P792."handle_types"(.CONTROL_RETURN)
@@ -22740,9 +21918,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<scope_declarator>" :subid("53_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<scope_declarator>" :subid("53_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_803
-.annotate 'line', 308
+.annotate 'line', 0
new $P802, 'ExceptionHandler'
set_addr $P802, control_801
$P802."handle_types"(.CONTROL_RETURN)
@@ -22771,9 +21949,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<routine_declarator>" :subid("54_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<routine_declarator>" :subid("54_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_813
-.annotate 'line', 309
+.annotate 'line', 0
new $P812, 'ExceptionHandler'
set_addr $P812, control_811
$P812."handle_types"(.CONTROL_RETURN)
@@ -22802,9 +21980,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<regex_declarator>" :subid("55_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<regex_declarator>" :subid("55_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_823
-.annotate 'line', 310
+.annotate 'line', 0
new $P822, 'ExceptionHandler'
set_addr $P822, control_821
$P822."handle_types"(.CONTROL_RETURN)
@@ -22833,9 +22011,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<statement_prefix>" :subid("56_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<statement_prefix>" :subid("56_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_833
-.annotate 'line', 311
+.annotate 'line', 0
new $P832, 'ExceptionHandler'
set_addr $P832, control_831
$P832."handle_types"(.CONTROL_RETURN)
@@ -22864,9 +22042,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<lambda>" :subid("57_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<lambda>" :subid("57_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_843
-.annotate 'line', 312
+.annotate 'line', 0
new $P842, 'ExceptionHandler'
set_addr $P842, control_841
$P842."handle_types"(.CONTROL_RETURN)
@@ -22895,16 +22073,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "fatarrow" :subid("58_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "fatarrow" :subid("58_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_853
-.annotate 'line', 314
+.annotate 'line', 0
new $P852, 'ExceptionHandler'
set_addr $P852, control_851
$P852."handle_types"(.CONTROL_RETURN)
push_eh $P852
.lex "self", self
.lex "$/", param_853
-.annotate 'line', 315
new $P854, "Undef"
.lex "$past", $P854
find_lex $P855, "$/"
@@ -22917,7 +22094,6 @@
vivify_312:
$P857 = $P856."ast"()
store_lex "$past", $P857
-.annotate 'line', 316
find_lex $P858, "$past"
find_lex $P859, "$/"
unless_null $P859, vivify_313
@@ -22929,11 +22105,9 @@
vivify_314:
$P861 = $P860."Str"()
$P858."named"($P861)
-.annotate 'line', 317
find_lex $P862, "$/"
find_lex $P863, "$past"
$P864 = $P862."!make"($P863)
-.annotate 'line', 314
.return ($P864)
control_851:
.local pmc exception
@@ -22945,19 +22119,17 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "colonpair" :subid("59_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "colonpair" :subid("59_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_869
-.annotate 'line', 320
+.annotate 'line', 0
new $P868, 'ExceptionHandler'
set_addr $P868, control_867
$P868."handle_types"(.CONTROL_RETURN)
push_eh $P868
.lex "self", self
.lex "$/", param_869
-.annotate 'line', 321
new $P870, "Undef"
.lex "$past", $P870
-.annotate 'line', 322
find_lex $P873, "$/"
unless_null $P873, vivify_315
$P873 = root_new ['parrot';'Hash']
@@ -22967,7 +22139,6 @@
new $P874, "Undef"
vivify_316:
if $P874, if_872
-.annotate 'line', 323
get_hll_global $P879, ["PAST"], "Val"
find_lex $P880, "$/"
unless_null $P880, vivify_317
@@ -22980,7 +22151,6 @@
isfalse $I882, $P881
$P883 = $P879."new"($I882 :named("value"))
set $P871, $P883
-.annotate 'line', 322
goto if_872_end
if_872:
find_lex $P875, "$/"
@@ -22999,7 +22169,6 @@
set $P871, $P878
if_872_end:
store_lex "$past", $P871
-.annotate 'line', 324
find_lex $P884, "$past"
find_lex $P885, "$/"
unless_null $P885, vivify_322
@@ -23011,11 +22180,9 @@
vivify_323:
set $S887, $P886
$P884."named"($S887)
-.annotate 'line', 325
find_lex $P888, "$/"
find_lex $P889, "$past"
$P890 = $P888."!make"($P889)
-.annotate 'line', 320
.return ($P890)
control_867:
.local pmc exception
@@ -23027,10 +22194,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "variable" :subid("60_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "variable" :subid("60_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_895
-.annotate 'line', 328
- .const 'Sub' $P908 = "61_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P908 = "61_1283975952.27658"
capture_lex $P908
new $P894, 'ExceptionHandler'
set_addr $P894, control_893
@@ -23038,12 +22205,9 @@
push_eh $P894
.lex "self", self
.lex "$/", param_895
-.annotate 'line', 329
new $P896, "Undef"
.lex "$past", $P896
-.annotate 'line', 328
find_lex $P897, "$past"
-.annotate 'line', 330
find_lex $P899, "$/"
unless_null $P899, vivify_324
$P899 = root_new ['parrot';'Hash']
@@ -23053,13 +22217,11 @@
new $P900, "Undef"
vivify_325:
if $P900, if_898
-.annotate 'line', 334
- .const 'Sub' $P908 = "61_1283368216.90714"
+ .const 'Sub' $P908 = "61_1283975952.27658"
capture_lex $P908
$P908()
goto if_898_end
if_898:
-.annotate 'line', 331
find_lex $P901, "$/"
unless_null $P901, vivify_342
$P901 = root_new ['parrot';'Hash']
@@ -23070,17 +22232,14 @@
vivify_343:
$P903 = $P902."ast"()
store_lex "$past", $P903
-.annotate 'line', 332
find_lex $P904, "$past"
get_hll_global $P905, ["PAST"], "Var"
$P906 = $P905."new"("$/" :named("name"))
$P904."unshift"($P906)
if_898_end:
-.annotate 'line', 363
find_lex $P977, "$/"
find_lex $P978, "$past"
$P979 = $P977."!make"($P978)
-.annotate 'line', 328
.return ($P979)
control_893:
.local pmc exception
@@ -23091,8 +22250,8 @@
.namespace ["NQP";"Actions"]
-.sub "_block907" :anon :subid("61_1283368216.90714") :outer("60_1283368216.90714")
-.annotate 'line', 335
+.sub "_block907" :anon :subid("61_1283975952.27658") :outer("60_1283975952.27658")
+.annotate 'line', 0
$P909 = root_new ['parrot';'ResizablePMCArray']
.lex "@name", $P909
get_hll_global $P910, ["NQP"], "Compiler"
@@ -23100,17 +22259,14 @@
set $S912, $P911
$P913 = $P910."parse_name"($S912)
store_lex "@name", $P913
-.annotate 'line', 336
get_hll_global $P914, ["PAST"], "Var"
find_lex $P915, "@name"
$P916 = $P915."pop"()
set $S917, $P916
$P918 = $P914."new"($S917 :named("name"))
store_lex "$past", $P918
-.annotate 'line', 337
find_lex $P920, "@name"
unless $P920, if_919_end
-.annotate 'line', 338
find_lex $P922, "@name"
unless_null $P922, vivify_326
$P922 = root_new ['parrot';'ResizablePMCArray']
@@ -23125,14 +22281,11 @@
find_lex $P926, "@name"
$P926."shift"()
if_921_end:
-.annotate 'line', 339
find_lex $P927, "$past"
find_lex $P928, "@name"
$P927."namespace"($P928)
-.annotate 'line', 340
find_lex $P929, "$past"
$P929."scope"("package")
-.annotate 'line', 341
find_lex $P930, "$past"
find_lex $P931, "$/"
unless_null $P931, vivify_328
@@ -23144,11 +22297,9 @@
vivify_329:
$P933 = "vivitype"($P932)
$P930."viviself"($P933)
-.annotate 'line', 342
find_lex $P934, "$past"
$P934."lvalue"(1)
if_919_end:
-.annotate 'line', 344
find_lex $P937, "$/"
unless_null $P937, vivify_330
$P937 = root_new ['parrot';'Hash']
@@ -23164,7 +22315,6 @@
set $S940, $P939
iseq $I941, $S940, "*"
if $I941, if_936
-.annotate 'line', 357
find_lex $P963, "$/"
unless_null $P963, vivify_333
$P963 = root_new ['parrot';'Hash']
@@ -23184,15 +22334,12 @@
set $P961, $I967
goto if_962_end
if_962:
-.annotate 'line', 358
find_lex $P968, "$past"
get_hll_global $P969, ["PAST"], "Var"
$P970 = $P969."new"("self" :named("name"))
$P968."push"($P970)
-.annotate 'line', 359
find_lex $P971, "$past"
$P971."scope"("attribute")
-.annotate 'line', 360
find_lex $P972, "$past"
find_lex $P973, "$/"
unless_null $P973, vivify_336
@@ -23204,21 +22351,15 @@
vivify_337:
$P975 = "vivitype"($P974)
$P976 = $P972."viviself"($P975)
-.annotate 'line', 357
set $P961, $P976
if_962_end:
set $P935, $P961
-.annotate 'line', 344
goto if_936_end
if_936:
-.annotate 'line', 345
find_lex $P942, "$past"
$P942."scope"("contextual")
-.annotate 'line', 346
find_lex $P943, "$past"
-.annotate 'line', 347
get_hll_global $P944, ["PAST"], "Var"
-.annotate 'line', 349
find_lex $P945, "$/"
unless_null $P945, vivify_338
$P945 = root_new ['parrot';'Hash']
@@ -23239,7 +22380,6 @@
new $P950, "Undef"
vivify_341:
concat $P951, $P948, $P950
-.annotate 'line', 351
get_hll_global $P952, ["PAST"], "Op"
new $P953, "String"
assign $P953, "Contextual "
@@ -23249,21 +22389,18 @@
concat $P957, $P956, " not found"
$P958 = $P952."new"($P957, "die" :named("pirop"))
$P959 = $P944."new"("package" :named("scope"), "" :named("namespace"), $P951 :named("name"), $P958 :named("viviself"))
-.annotate 'line', 347
$P960 = $P943."viviself"($P959)
-.annotate 'line', 344
set $P935, $P960
if_936_end:
-.annotate 'line', 334
.return ($P935)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "package_declarator:sym<module>" :subid("62_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "package_declarator:sym<module>" :subid("62_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_984
-.annotate 'line', 366
+.annotate 'line', 0
new $P983, 'ExceptionHandler'
set_addr $P983, control_982
$P983."handle_types"(.CONTROL_RETURN)
@@ -23292,25 +22429,21 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "package_declarator:sym<class>" :subid("63_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "package_declarator:sym<class>" :subid("63_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_994
-.annotate 'line', 367
+.annotate 'line', 0
new $P993, 'ExceptionHandler'
set_addr $P993, control_992
$P993."handle_types"(.CONTROL_RETURN)
push_eh $P993
.lex "self", self
.lex "$/", param_994
-.annotate 'line', 368
new $P995, "Undef"
.lex "$past", $P995
-.annotate 'line', 369
new $P996, "Undef"
.lex "$classinit", $P996
-.annotate 'line', 378
new $P997, "Undef"
.lex "$parent", $P997
-.annotate 'line', 368
find_lex $P998, "$/"
unless_null $P998, vivify_346
$P998 = root_new ['parrot';'Hash']
@@ -23321,12 +22454,9 @@
vivify_347:
$P1000 = $P999."ast"()
store_lex "$past", $P1000
-.annotate 'line', 370
get_hll_global $P1001, ["PAST"], "Op"
-.annotate 'line', 371
get_hll_global $P1002, ["PAST"], "Op"
$P1003 = $P1002."new"(" %r = get_root_global [\"parrot\"], \"P6metaclass\"" :named("inline"))
-.annotate 'line', 374
find_lex $P1004, "$/"
unless_null $P1004, vivify_348
$P1004 = root_new ['parrot';'Hash']
@@ -23341,9 +22471,7 @@
vivify_350:
set $S1007, $P1006
$P1008 = $P1001."new"($P1003, $S1007, "new_class" :named("name"), "callmethod" :named("pasttype"))
-.annotate 'line', 370
store_lex "$classinit", $P1008
-.annotate 'line', 378
find_lex $P1011, "$/"
unless_null $P1011, vivify_351
$P1011 = root_new ['parrot';'Hash']
@@ -23366,7 +22494,6 @@
set $P1009, $S1015
goto unless_1010_end
unless_1010:
-.annotate 'line', 379
find_lex $P1018, "$/"
unless_null $P1018, vivify_355
$P1018 = root_new ['parrot';'Hash']
@@ -23390,17 +22517,14 @@
set $P1009, $P1016
unless_1010_end:
store_lex "$parent", $P1009
-.annotate 'line', 380
find_lex $P1025, "$parent"
unless $P1025, if_1024_end
-.annotate 'line', 381
find_lex $P1026, "$classinit"
get_hll_global $P1027, ["PAST"], "Val"
find_lex $P1028, "$parent"
$P1029 = $P1027."new"($P1028 :named("value"), "parent" :named("named"))
$P1026."push"($P1029)
if_1024_end:
-.annotate 'line', 383
find_lex $P1031, "$past"
unless_null $P1031, vivify_357
$P1031 = root_new ['parrot';'Hash']
@@ -23410,7 +22534,6 @@
new $P1032, "Undef"
vivify_358:
unless $P1032, if_1030_end
-.annotate 'line', 384
find_lex $P1033, "$classinit"
find_lex $P1034, "$past"
unless_null $P1034, vivify_359
@@ -23422,7 +22545,6 @@
vivify_360:
$P1033."push"($P1035)
if_1030_end:
-.annotate 'line', 386
get_global $P1036, "@BLOCK"
unless_null $P1036, vivify_361
$P1036 = root_new ['parrot';'ResizablePMCArray']
@@ -23434,11 +22556,9 @@
$P1038 = $P1037."loadinit"()
find_lex $P1039, "$classinit"
$P1038."push"($P1039)
-.annotate 'line', 387
find_lex $P1040, "$/"
find_lex $P1041, "$past"
$P1042 = $P1040."!make"($P1041)
-.annotate 'line', 367
.return ($P1042)
control_992:
.local pmc exception
@@ -23450,16 +22570,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "package_def" :subid("64_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "package_def" :subid("64_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1047
-.annotate 'line', 390
+.annotate 'line', 0
new $P1046, 'ExceptionHandler'
set_addr $P1046, control_1045
$P1046."handle_types"(.CONTROL_RETURN)
push_eh $P1046
.lex "self", self
.lex "$/", param_1047
-.annotate 'line', 391
new $P1048, "Undef"
.lex "$past", $P1048
find_lex $P1051, "$/"
@@ -23495,7 +22614,6 @@
set $P1049, $P1055
if_1050_end:
store_lex "$past", $P1049
-.annotate 'line', 392
find_lex $P1059, "$past"
find_lex $P1060, "$/"
unless_null $P1060, vivify_369
@@ -23510,14 +22628,11 @@
new $P1062, "Undef"
vivify_371:
$P1059."namespace"($P1062)
-.annotate 'line', 393
find_lex $P1063, "$past"
$P1063."blocktype"("immediate")
-.annotate 'line', 394
find_lex $P1064, "$/"
find_lex $P1065, "$past"
$P1066 = $P1064."!make"($P1065)
-.annotate 'line', 390
.return ($P1066)
control_1045:
.local pmc exception
@@ -23529,9 +22644,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "scope_declarator:sym<my>" :subid("65_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "scope_declarator:sym<my>" :subid("65_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1071
-.annotate 'line', 397
+.annotate 'line', 0
new $P1070, 'ExceptionHandler'
set_addr $P1070, control_1069
$P1070."handle_types"(.CONTROL_RETURN)
@@ -23560,9 +22675,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "scope_declarator:sym<our>" :subid("66_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "scope_declarator:sym<our>" :subid("66_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1081
-.annotate 'line', 398
+.annotate 'line', 0
new $P1080, 'ExceptionHandler'
set_addr $P1080, control_1079
$P1080."handle_types"(.CONTROL_RETURN)
@@ -23591,9 +22706,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "scope_declarator:sym<has>" :subid("67_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "scope_declarator:sym<has>" :subid("67_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1091
-.annotate 'line', 399
+.annotate 'line', 0
new $P1090, 'ExceptionHandler'
set_addr $P1090, control_1089
$P1090."handle_types"(.CONTROL_RETURN)
@@ -23622,18 +22737,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "scoped" :subid("68_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "scoped" :subid("68_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1101
-.annotate 'line', 401
+.annotate 'line', 0
new $P1100, 'ExceptionHandler'
set_addr $P1100, control_1099
$P1100."handle_types"(.CONTROL_RETURN)
push_eh $P1100
.lex "self", self
.lex "$/", param_1101
-.annotate 'line', 402
find_lex $P1102, "$/"
-.annotate 'line', 403
find_lex $P1105, "$/"
unless_null $P1105, vivify_378
$P1105 = root_new ['parrot';'Hash']
@@ -23643,7 +22756,6 @@
new $P1106, "Undef"
vivify_379:
if $P1106, if_1104
-.annotate 'line', 404
find_lex $P1110, "$/"
unless_null $P1110, vivify_380
$P1110 = root_new ['parrot';'Hash']
@@ -23654,7 +22766,6 @@
vivify_381:
$P1112 = $P1111."ast"()
set $P1103, $P1112
-.annotate 'line', 403
goto if_1104_end
if_1104:
find_lex $P1107, "$/"
@@ -23669,7 +22780,6 @@
set $P1103, $P1109
if_1104_end:
$P1113 = $P1102."!make"($P1103)
-.annotate 'line', 401
.return ($P1113)
control_1099:
.local pmc exception
@@ -23681,18 +22791,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "declarator" :subid("69_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "declarator" :subid("69_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1118
-.annotate 'line', 407
+.annotate 'line', 0
new $P1117, 'ExceptionHandler'
set_addr $P1117, control_1116
$P1117."handle_types"(.CONTROL_RETURN)
push_eh $P1117
.lex "self", self
.lex "$/", param_1118
-.annotate 'line', 408
find_lex $P1119, "$/"
-.annotate 'line', 409
find_lex $P1122, "$/"
unless_null $P1122, vivify_384
$P1122 = root_new ['parrot';'Hash']
@@ -23702,7 +22810,6 @@
new $P1123, "Undef"
vivify_385:
if $P1123, if_1121
-.annotate 'line', 410
find_lex $P1127, "$/"
unless_null $P1127, vivify_386
$P1127 = root_new ['parrot';'Hash']
@@ -23713,7 +22820,6 @@
vivify_387:
$P1129 = $P1128."ast"()
set $P1120, $P1129
-.annotate 'line', 409
goto if_1121_end
if_1121:
find_lex $P1124, "$/"
@@ -23728,7 +22834,6 @@
set $P1120, $P1126
if_1121_end:
$P1130 = $P1119."!make"($P1120)
-.annotate 'line', 407
.return ($P1130)
control_1116:
.local pmc exception
@@ -23740,9 +22845,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "multi_declarator:sym<multi>" :subid("70_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "multi_declarator:sym<multi>" :subid("70_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1135
-.annotate 'line', 413
+.annotate 'line', 0
new $P1134, 'ExceptionHandler'
set_addr $P1134, control_1133
$P1134."handle_types"(.CONTROL_RETURN)
@@ -23794,9 +22899,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "multi_declarator:sym<null>" :subid("71_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "multi_declarator:sym<null>" :subid("71_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1152
-.annotate 'line', 414
+.annotate 'line', 0
new $P1151, 'ExceptionHandler'
set_addr $P1151, control_1150
$P1151."handle_types"(.CONTROL_RETURN)
@@ -23825,10 +22930,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "variable_declarator" :subid("72_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "variable_declarator" :subid("72_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1162
-.annotate 'line', 417
- .const 'Sub' $P1202 = "73_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1202 = "73_1283975952.27658"
capture_lex $P1202
new $P1161, 'ExceptionHandler'
set_addr $P1161, control_1160
@@ -23836,19 +22941,14 @@
push_eh $P1161
.lex "self", self
.lex "$/", param_1162
-.annotate 'line', 418
new $P1163, "Undef"
.lex "$past", $P1163
-.annotate 'line', 419
new $P1164, "Undef"
.lex "$sigil", $P1164
-.annotate 'line', 420
new $P1165, "Undef"
.lex "$name", $P1165
-.annotate 'line', 421
new $P1166, "Undef"
.lex "$BLOCK", $P1166
-.annotate 'line', 418
find_lex $P1167, "$/"
unless_null $P1167, vivify_398
$P1167 = root_new ['parrot';'Hash']
@@ -23859,7 +22959,6 @@
vivify_399:
$P1169 = $P1168."ast"()
store_lex "$past", $P1169
-.annotate 'line', 419
find_lex $P1170, "$/"
unless_null $P1170, vivify_400
$P1170 = root_new ['parrot';'Hash']
@@ -23873,11 +22972,9 @@
new $P1172, "Undef"
vivify_402:
store_lex "$sigil", $P1172
-.annotate 'line', 420
find_lex $P1173, "$past"
$P1174 = $P1173."name"()
store_lex "$name", $P1174
-.annotate 'line', 421
get_global $P1175, "@BLOCK"
unless_null $P1175, vivify_403
$P1175 = root_new ['parrot';'ResizablePMCArray']
@@ -23887,18 +22984,15 @@
new $P1176, "Undef"
vivify_404:
store_lex "$BLOCK", $P1176
-.annotate 'line', 422
find_lex $P1178, "$BLOCK"
find_lex $P1179, "$name"
$P1180 = $P1178."symbol"($P1179)
unless $P1180, if_1177_end
-.annotate 'line', 423
find_lex $P1181, "$/"
$P1182 = $P1181."CURSOR"()
find_lex $P1183, "$name"
$P1182."panic"("Redeclaration of symbol ", $P1183)
if_1177_end:
-.annotate 'line', 425
find_dynamic_lex $P1185, "$*SCOPE"
unless_null $P1185, vivify_405
get_hll_global $P1185, "$SCOPE"
@@ -23909,17 +23003,14 @@
set $S1186, $P1185
iseq $I1187, $S1186, "has"
if $I1187, if_1184
-.annotate 'line', 434
- .const 'Sub' $P1202 = "73_1283368216.90714"
+ .const 'Sub' $P1202 = "73_1283975952.27658"
capture_lex $P1202
$P1202()
goto if_1184_end
if_1184:
-.annotate 'line', 426
find_lex $P1188, "$BLOCK"
find_lex $P1189, "$name"
$P1188."symbol"($P1189, "attribute" :named("scope"))
-.annotate 'line', 427
find_lex $P1191, "$BLOCK"
unless_null $P1191, vivify_411
$P1191 = root_new ['parrot';'Hash']
@@ -23929,7 +23020,6 @@
new $P1192, "Undef"
vivify_412:
if $P1192, unless_1190_end
-.annotate 'line', 429
get_hll_global $P1193, ["PAST"], "Op"
$P1194 = $P1193."new"("list" :named("pasttype"), "attr" :named("named"))
find_lex $P1195, "$BLOCK"
@@ -23939,7 +23029,6 @@
vivify_413:
set $P1195["attributes"], $P1194
unless_1190_end:
-.annotate 'line', 431
find_lex $P1196, "$BLOCK"
unless_null $P1196, vivify_414
$P1196 = root_new ['parrot';'Hash']
@@ -23950,16 +23039,13 @@
vivify_415:
find_lex $P1198, "$name"
$P1197."push"($P1198)
-.annotate 'line', 432
get_hll_global $P1199, ["PAST"], "Stmts"
$P1200 = $P1199."new"()
store_lex "$past", $P1200
if_1184_end:
-.annotate 'line', 442
find_lex $P1226, "$/"
find_lex $P1227, "$past"
$P1228 = $P1226."!make"($P1227)
-.annotate 'line', 417
.return ($P1228)
control_1160:
.local pmc exception
@@ -23970,14 +23056,12 @@
.namespace ["NQP";"Actions"]
-.sub "_block1201" :anon :subid("73_1283368216.90714") :outer("72_1283368216.90714")
-.annotate 'line', 435
+.sub "_block1201" :anon :subid("73_1283975952.27658") :outer("72_1283975952.27658")
+.annotate 'line', 0
new $P1203, "Undef"
.lex "$scope", $P1203
-.annotate 'line', 436
new $P1204, "Undef"
.lex "$decl", $P1204
-.annotate 'line', 435
find_dynamic_lex $P1207, "$*SCOPE"
unless_null $P1207, vivify_407
get_hll_global $P1207, "$SCOPE"
@@ -23998,23 +23082,18 @@
set $P1205, $P1210
if_1206_end:
store_lex "$scope", $P1205
-.annotate 'line', 436
get_hll_global $P1212, ["PAST"], "Var"
find_lex $P1213, "$name"
find_lex $P1214, "$scope"
-.annotate 'line', 437
find_lex $P1215, "$sigil"
$P1216 = "vivitype"($P1215)
find_lex $P1217, "$/"
$P1218 = $P1212."new"($P1213 :named("name"), $P1214 :named("scope"), 1 :named("isdecl"), 1 :named("lvalue"), $P1216 :named("viviself"), $P1217 :named("node"))
-.annotate 'line', 436
store_lex "$decl", $P1218
-.annotate 'line', 439
find_lex $P1219, "$BLOCK"
find_lex $P1220, "$name"
find_lex $P1221, "$scope"
$P1219."symbol"($P1220, $P1221 :named("scope"))
-.annotate 'line', 440
find_lex $P1222, "$BLOCK"
unless_null $P1222, vivify_409
$P1222 = root_new ['parrot';'ResizablePMCArray']
@@ -24025,16 +23104,15 @@
vivify_410:
find_lex $P1224, "$decl"
$P1225 = $P1223."push"($P1224)
-.annotate 'line', 434
.return ($P1225)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "routine_declarator:sym<sub>" :subid("74_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "routine_declarator:sym<sub>" :subid("74_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1233
-.annotate 'line', 445
+.annotate 'line', 0
new $P1232, 'ExceptionHandler'
set_addr $P1232, control_1231
$P1232."handle_types"(.CONTROL_RETURN)
@@ -24063,9 +23141,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "routine_declarator:sym<method>" :subid("75_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "routine_declarator:sym<method>" :subid("75_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1243
-.annotate 'line', 446
+.annotate 'line', 0
new $P1242, 'ExceptionHandler'
set_addr $P1242, control_1241
$P1242."handle_types"(.CONTROL_RETURN)
@@ -24094,10 +23172,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "routine_def" :subid("76_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "routine_def" :subid("76_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1253
-.annotate 'line', 448
- .const 'Sub' $P1264 = "77_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1264 = "77_1283975952.27658"
capture_lex $P1264
new $P1252, 'ExceptionHandler'
set_addr $P1252, control_1251
@@ -24105,7 +23183,6 @@
push_eh $P1252
.lex "self", self
.lex "$/", param_1253
-.annotate 'line', 449
new $P1254, "Undef"
.lex "$past", $P1254
find_lex $P1255, "$/"
@@ -24118,13 +23195,10 @@
vivify_421:
$P1257 = $P1256."ast"()
store_lex "$past", $P1257
-.annotate 'line', 450
find_lex $P1258, "$past"
$P1258."blocktype"("declaration")
-.annotate 'line', 451
find_lex $P1259, "$past"
$P1259."control"("return_pir")
-.annotate 'line', 452
find_lex $P1261, "$/"
unless_null $P1261, vivify_422
$P1261 = root_new ['parrot';'Hash']
@@ -24134,15 +23208,13 @@
new $P1262, "Undef"
vivify_423:
unless $P1262, if_1260_end
- .const 'Sub' $P1264 = "77_1283368216.90714"
+ .const 'Sub' $P1264 = "77_1283975952.27658"
capture_lex $P1264
$P1264()
if_1260_end:
-.annotate 'line', 462
find_lex $P1296, "$/"
find_lex $P1297, "$past"
$P1298 = $P1296."!make"($P1297)
-.annotate 'line', 448
.return ($P1298)
control_1251:
.local pmc exception
@@ -24153,8 +23225,8 @@
.namespace ["NQP";"Actions"]
-.sub "_block1263" :anon :subid("77_1283368216.90714") :outer("76_1283368216.90714")
-.annotate 'line', 453
+.sub "_block1263" :anon :subid("77_1283975952.27658") :outer("76_1283975952.27658")
+.annotate 'line', 0
new $P1265, "Undef"
.lex "$name", $P1265
find_lex $P1266, "$/"
@@ -24187,11 +23259,9 @@
$S1274 = $P1273."ast"()
concat $P1275, $P1270, $S1274
store_lex "$name", $P1275
-.annotate 'line', 454
find_lex $P1276, "$past"
find_lex $P1277, "$name"
$P1276."name"($P1277)
-.annotate 'line', 455
find_dynamic_lex $P1280, "$*SCOPE"
unless_null $P1280, vivify_430
get_hll_global $P1280, "$SCOPE"
@@ -24206,7 +23276,6 @@
set $P1278, $I1282
goto if_1279_end
if_1279:
-.annotate 'line', 456
get_global $P1283, "@BLOCK"
unless_null $P1283, vivify_432
$P1283 = root_new ['parrot';'ResizablePMCArray']
@@ -24224,7 +23293,6 @@
find_lex $P1288, "$past"
$P1289 = $P1286."new"($P1287 :named("name"), 1 :named("isdecl"), $P1288 :named("viviself"), "lexical" :named("scope"))
$P1285."push"($P1289)
-.annotate 'line', 458
get_global $P1290, "@BLOCK"
unless_null $P1290, vivify_435
$P1290 = root_new ['parrot';'ResizablePMCArray']
@@ -24235,25 +23303,22 @@
vivify_436:
find_lex $P1292, "$name"
$P1291."symbol"($P1292, "lexical" :named("scope"))
-.annotate 'line', 459
get_hll_global $P1293, ["PAST"], "Var"
find_lex $P1294, "$name"
$P1295 = $P1293."new"($P1294 :named("name"))
store_lex "$past", $P1295
-.annotate 'line', 455
set $P1278, $P1295
if_1279_end:
-.annotate 'line', 452
.return ($P1278)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "method_def" :subid("78_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "method_def" :subid("78_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1303
-.annotate 'line', 466
- .const 'Sub' $P1324 = "79_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1324 = "79_1283975952.27658"
capture_lex $P1324
new $P1302, 'ExceptionHandler'
set_addr $P1302, control_1301
@@ -24261,7 +23326,6 @@
push_eh $P1302
.lex "self", self
.lex "$/", param_1303
-.annotate 'line', 467
new $P1304, "Undef"
.lex "$past", $P1304
find_lex $P1305, "$/"
@@ -24274,10 +23338,8 @@
vivify_438:
$P1307 = $P1306."ast"()
store_lex "$past", $P1307
-.annotate 'line', 468
find_lex $P1308, "$past"
$P1308."blocktype"("method")
-.annotate 'line', 469
find_dynamic_lex $P1310, "$*SCOPE"
unless_null $P1310, vivify_439
get_hll_global $P1310, "$SCOPE"
@@ -24288,14 +23350,11 @@
set $S1311, $P1310
iseq $I1312, $S1311, "our"
unless $I1312, if_1309_end
-.annotate 'line', 470
find_lex $P1313, "$past"
$P1313."pirflags"(":nsentry")
if_1309_end:
-.annotate 'line', 472
find_lex $P1314, "$past"
$P1314."control"("return_pir")
-.annotate 'line', 473
find_lex $P1315, "$past"
unless_null $P1315, vivify_441
$P1315 = root_new ['parrot';'ResizablePMCArray']
@@ -24307,10 +23366,8 @@
get_hll_global $P1317, ["PAST"], "Op"
$P1318 = $P1317."new"(" .lex \"self\", self" :named("inline"))
$P1316."unshift"($P1318)
-.annotate 'line', 474
find_lex $P1319, "$past"
$P1319."symbol"("self", "lexical" :named("scope"))
-.annotate 'line', 475
find_lex $P1321, "$/"
unless_null $P1321, vivify_443
$P1321 = root_new ['parrot';'Hash']
@@ -24320,11 +23377,10 @@
new $P1322, "Undef"
vivify_444:
unless $P1322, if_1320_end
- .const 'Sub' $P1324 = "79_1283368216.90714"
+ .const 'Sub' $P1324 = "79_1283975952.27658"
capture_lex $P1324
$P1324()
if_1320_end:
-.annotate 'line', 479
find_dynamic_lex $P1336, "$*MULTINESS"
unless_null $P1336, vivify_448
get_hll_global $P1336, "$MULTINESS"
@@ -24339,11 +23395,9 @@
$P1340 = $P1339."multi"()
$P1340."unshift"("_")
if_1335_end:
-.annotate 'line', 480
find_lex $P1341, "$/"
find_lex $P1342, "$past"
$P1343 = $P1341."!make"($P1342)
-.annotate 'line', 466
.return ($P1343)
control_1301:
.local pmc exception
@@ -24354,8 +23408,8 @@
.namespace ["NQP";"Actions"]
-.sub "_block1323" :anon :subid("79_1283368216.90714") :outer("78_1283368216.90714")
-.annotate 'line', 476
+.sub "_block1323" :anon :subid("79_1283975952.27658") :outer("78_1283975952.27658")
+.annotate 'line', 0
new $P1325, "Undef"
.lex "$name", $P1325
find_lex $P1326, "$/"
@@ -24375,23 +23429,21 @@
new $P1331, 'String'
set $P1331, $S1330
store_lex "$name", $P1331
-.annotate 'line', 477
find_lex $P1332, "$past"
find_lex $P1333, "$name"
$P1334 = $P1332."name"($P1333)
-.annotate 'line', 475
.return ($P1334)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "signature" :subid("80_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "signature" :subid("80_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1348
-.annotate 'line', 484
- .const 'Sub' $P1374 = "82_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1374 = "82_1283975952.27658"
capture_lex $P1374
- .const 'Sub' $P1359 = "81_1283368216.90714"
+ .const 'Sub' $P1359 = "81_1283975952.27658"
capture_lex $P1359
new $P1347, 'ExceptionHandler'
set_addr $P1347, control_1346
@@ -24399,7 +23451,6 @@
push_eh $P1347
.lex "self", self
.lex "$/", param_1348
-.annotate 'line', 485
new $P1349, "Undef"
.lex "$BLOCKINIT", $P1349
get_global $P1350, "@BLOCK"
@@ -24415,7 +23466,6 @@
new $P1352, "Undef"
vivify_452:
store_lex "$BLOCKINIT", $P1352
-.annotate 'line', 487
find_lex $P1354, "$/"
unless_null $P1354, vivify_453
$P1354 = root_new ['parrot';'Hash']
@@ -24435,7 +23485,7 @@
unless $P1353, loop1365_done
shift $P1357, $P1353
loop1365_redo:
- .const 'Sub' $P1359 = "81_1283368216.90714"
+ .const 'Sub' $P1359 = "81_1283975952.27658"
capture_lex $P1359
$P1359($P1357)
loop1365_next:
@@ -24449,7 +23499,6 @@
loop1365_done:
pop_eh
for_undef_455:
-.annotate 'line', 490
find_dynamic_lex $P1370, "$*MULTINESS"
unless_null $P1370, vivify_456
get_hll_global $P1370, "$MULTINESS"
@@ -24464,12 +23513,11 @@
set $P1368, $I1372
goto if_1369_end
if_1369:
- .const 'Sub' $P1374 = "82_1283368216.90714"
+ .const 'Sub' $P1374 = "82_1283975952.27658"
capture_lex $P1374
$P1412 = $P1374()
set $P1368, $P1412
if_1369_end:
-.annotate 'line', 484
.return ($P1368)
control_1346:
.local pmc exception
@@ -24480,9 +23528,9 @@
.namespace ["NQP";"Actions"]
-.sub "_block1358" :anon :subid("81_1283368216.90714") :outer("80_1283368216.90714")
+.sub "_block1358" :anon :subid("81_1283975952.27658") :outer("80_1283975952.27658")
.param pmc param_1360
-.annotate 'line', 487
+.annotate 'line', 0
.lex "$_", param_1360
find_lex $P1361, "$BLOCKINIT"
find_lex $P1362, "$_"
@@ -24494,16 +23542,13 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "_block1373" :anon :subid("82_1283368216.90714") :outer("80_1283368216.90714")
-.annotate 'line', 490
- .const 'Sub' $P1383 = "83_1283368216.90714"
+.sub "_block1373" :anon :subid("82_1283975952.27658") :outer("80_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P1383 = "83_1283975952.27658"
capture_lex $P1383
-.annotate 'line', 491
$P1375 = root_new ['parrot';'ResizablePMCArray']
.lex "@params", $P1375
-.annotate 'line', 490
find_lex $P1376, "@params"
-.annotate 'line', 492
find_lex $P1378, "$BLOCKINIT"
$P1379 = $P1378."list"()
defined $I1380, $P1379
@@ -24517,7 +23562,7 @@
unless $P1377, loop1405_done
shift $P1381, $P1377
loop1405_redo:
- .const 'Sub' $P1383 = "83_1283368216.90714"
+ .const 'Sub' $P1383 = "83_1283975952.27658"
capture_lex $P1383
$P1383($P1381)
loop1405_next:
@@ -24531,7 +23576,6 @@
loop1405_done:
pop_eh
for_undef_458:
-.annotate 'line', 496
get_global $P1408, "@BLOCK"
unless_null $P1408, vivify_459
$P1408 = root_new ['parrot';'ResizablePMCArray']
@@ -24542,17 +23586,15 @@
vivify_460:
find_lex $P1410, "@params"
$P1411 = $P1409."multi"($P1410)
-.annotate 'line', 490
.return ($P1411)
.end
.namespace ["NQP";"Actions"]
-.sub "_block1382" :anon :subid("83_1283368216.90714") :outer("82_1283368216.90714")
+.sub "_block1382" :anon :subid("83_1283975952.27658") :outer("82_1283975952.27658")
.param pmc param_1384
-.annotate 'line', 492
+.annotate 'line', 0
.lex "$_", param_1384
-.annotate 'line', 494
find_lex $P1391, "$_"
$P1392 = $P1391."slurpy"()
unless $P1392, unless_1390
@@ -24575,7 +23617,6 @@
set $P1385, $P1387
goto unless_1386_end
unless_1386:
-.annotate 'line', 493
find_lex $P1397, "@params"
find_lex $P1399, "$_"
$P1400 = $P1399."multitype"()
@@ -24589,17 +23630,16 @@
$P1404 = $P1397."push"($P1398)
set $P1385, $P1404
unless_1386_end:
-.annotate 'line', 492
.return ($P1385)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "parameter" :subid("84_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "parameter" :subid("84_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1417
-.annotate 'line', 500
- .const 'Sub' $P1498 = "85_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1498 = "85_1283975952.27658"
capture_lex $P1498
new $P1416, 'ExceptionHandler'
set_addr $P1416, control_1415
@@ -24607,13 +23647,10 @@
push_eh $P1416
.lex "self", self
.lex "$/", param_1417
-.annotate 'line', 501
new $P1418, "Undef"
.lex "$quant", $P1418
-.annotate 'line', 502
new $P1419, "Undef"
.lex "$past", $P1419
-.annotate 'line', 501
find_lex $P1420, "$/"
unless_null $P1420, vivify_461
$P1420 = root_new ['parrot';'Hash']
@@ -24624,7 +23661,6 @@
vivify_462:
store_lex "$quant", $P1421
find_lex $P1422, "$past"
-.annotate 'line', 503
find_lex $P1424, "$/"
unless_null $P1424, vivify_463
$P1424 = root_new ['parrot';'Hash']
@@ -24634,7 +23670,6 @@
new $P1425, "Undef"
vivify_464:
if $P1425, if_1423
-.annotate 'line', 510
find_lex $P1439, "$/"
unless_null $P1439, vivify_465
$P1439 = root_new ['parrot';'Hash']
@@ -24645,17 +23680,14 @@
vivify_466:
$P1441 = $P1440."ast"()
store_lex "$past", $P1441
-.annotate 'line', 511
find_lex $P1443, "$quant"
set $S1444, $P1443
iseq $I1445, $S1444, "*"
if $I1445, if_1442
-.annotate 'line', 515
find_lex $P1454, "$quant"
set $S1455, $P1454
iseq $I1456, $S1455, "?"
unless $I1456, if_1453_end
-.annotate 'line', 516
find_lex $P1457, "$past"
find_lex $P1458, "$/"
unless_null $P1458, vivify_467
@@ -24672,13 +23704,10 @@
$P1461 = "vivitype"($P1460)
$P1457."viviself"($P1461)
if_1453_end:
-.annotate 'line', 515
goto if_1442_end
if_1442:
-.annotate 'line', 512
find_lex $P1446, "$past"
$P1446."slurpy"(1)
-.annotate 'line', 513
find_lex $P1447, "$past"
find_lex $P1448, "$/"
unless_null $P1448, vivify_470
@@ -24696,10 +23725,8 @@
iseq $I1452, $S1451, "%"
$P1447."named"($I1452)
if_1442_end:
-.annotate 'line', 509
goto if_1423_end
if_1423:
-.annotate 'line', 504
find_lex $P1426, "$/"
unless_null $P1426, vivify_473
$P1426 = root_new ['parrot';'Hash']
@@ -24710,12 +23737,10 @@
vivify_474:
$P1428 = $P1427."ast"()
store_lex "$past", $P1428
-.annotate 'line', 505
find_lex $P1430, "$quant"
set $S1431, $P1430
isne $I1432, $S1431, "!"
unless $I1432, if_1429_end
-.annotate 'line', 506
find_lex $P1433, "$past"
find_lex $P1434, "$/"
unless_null $P1434, vivify_475
@@ -24737,7 +23762,6 @@
$P1433."viviself"($P1438)
if_1429_end:
if_1423_end:
-.annotate 'line', 519
find_lex $P1463, "$/"
unless_null $P1463, vivify_479
$P1463 = root_new ['parrot';'Hash']
@@ -24747,27 +23771,22 @@
new $P1464, "Undef"
vivify_480:
unless $P1464, if_1462_end
-.annotate 'line', 520
find_lex $P1466, "$quant"
set $S1467, $P1466
iseq $I1468, $S1467, "*"
unless $I1468, if_1465_end
-.annotate 'line', 521
find_lex $P1469, "$/"
$P1470 = $P1469."CURSOR"()
$P1470."panic"("Can't put default on slurpy parameter")
if_1465_end:
-.annotate 'line', 523
find_lex $P1472, "$quant"
set $S1473, $P1472
iseq $I1474, $S1473, "!"
unless $I1474, if_1471_end
-.annotate 'line', 524
find_lex $P1475, "$/"
$P1476 = $P1475."CURSOR"()
$P1476."panic"("Can't put default on required parameter")
if_1471_end:
-.annotate 'line', 526
find_lex $P1477, "$past"
find_lex $P1478, "$/"
unless_null $P1478, vivify_481
@@ -24788,7 +23807,6 @@
$P1482 = $P1481."ast"()
$P1477."viviself"($P1482)
if_1462_end:
-.annotate 'line', 528
find_lex $P1484, "$past"
$P1485 = $P1484."viviself"()
if $P1485, unless_1483_end
@@ -24815,7 +23833,6 @@
add $P1493, $P1492, 1
$P1487."arity"($P1493)
unless_1483_end:
-.annotate 'line', 531
find_lex $P1495, "$/"
unless_null $P1495, vivify_489
$P1495 = root_new ['parrot';'Hash']
@@ -24825,15 +23842,13 @@
new $P1496, "Undef"
vivify_490:
unless $P1496, if_1494_end
- .const 'Sub' $P1498 = "85_1283368216.90714"
+ .const 'Sub' $P1498 = "85_1283975952.27658"
capture_lex $P1498
$P1498()
if_1494_end:
-.annotate 'line', 537
find_lex $P1522, "$/"
find_lex $P1523, "$past"
$P1524 = $P1522."!make"($P1523)
-.annotate 'line', 500
.return ($P1524)
control_1415:
.local pmc exception
@@ -24845,16 +23860,13 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "_block1497" :anon :subid("85_1283368216.90714") :outer("84_1283368216.90714")
-.annotate 'line', 531
- .const 'Sub' $P1510 = "86_1283368216.90714"
+.sub "_block1497" :anon :subid("85_1283975952.27658") :outer("84_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P1510 = "86_1283975952.27658"
capture_lex $P1510
-.annotate 'line', 532
$P1499 = root_new ['parrot';'ResizablePMCArray']
.lex "@multitype", $P1499
-.annotate 'line', 531
find_lex $P1500, "@multitype"
-.annotate 'line', 533
find_lex $P1502, "$/"
unless_null $P1502, vivify_491
$P1502 = root_new ['parrot';'Hash']
@@ -24886,7 +23898,7 @@
unless $P1501, loop1516_done
shift $P1508, $P1501
loop1516_redo:
- .const 'Sub' $P1510 = "86_1283368216.90714"
+ .const 'Sub' $P1510 = "86_1283975952.27658"
capture_lex $P1510
$P1510($P1508)
loop1516_next:
@@ -24900,19 +23912,17 @@
loop1516_done:
pop_eh
for_undef_496:
-.annotate 'line', 534
find_lex $P1519, "$past"
find_lex $P1520, "@multitype"
$P1521 = $P1519."multitype"($P1520)
-.annotate 'line', 531
.return ($P1521)
.end
.namespace ["NQP";"Actions"]
-.sub "_block1509" :anon :subid("86_1283368216.90714") :outer("85_1283368216.90714")
+.sub "_block1509" :anon :subid("86_1283975952.27658") :outer("85_1283975952.27658")
.param pmc param_1511
-.annotate 'line', 533
+.annotate 'line', 0
.lex "$_", param_1511
find_lex $P1512, "@multitype"
find_lex $P1513, "$_"
@@ -24924,34 +23934,29 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "param_var" :subid("87_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "param_var" :subid("87_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1529
-.annotate 'line', 540
+.annotate 'line', 0
new $P1528, 'ExceptionHandler'
set_addr $P1528, control_1527
$P1528."handle_types"(.CONTROL_RETURN)
push_eh $P1528
.lex "self", self
.lex "$/", param_1529
-.annotate 'line', 541
new $P1530, "Undef"
.lex "$name", $P1530
-.annotate 'line', 542
new $P1531, "Undef"
.lex "$past", $P1531
-.annotate 'line', 541
find_lex $P1532, "$/"
set $S1533, $P1532
new $P1534, 'String'
set $P1534, $S1533
store_lex "$name", $P1534
-.annotate 'line', 542
get_hll_global $P1535, ["PAST"], "Var"
find_lex $P1536, "$name"
find_lex $P1537, "$/"
$P1538 = $P1535."new"($P1536 :named("name"), "parameter" :named("scope"), 1 :named("isdecl"), $P1537 :named("node"))
store_lex "$past", $P1538
-.annotate 'line', 544
get_global $P1539, "@BLOCK"
unless_null $P1539, vivify_497
$P1539 = root_new ['parrot';'ResizablePMCArray']
@@ -24962,11 +23967,9 @@
vivify_498:
find_lex $P1541, "$name"
$P1540."symbol"($P1541, "lexical" :named("scope"))
-.annotate 'line', 545
find_lex $P1542, "$/"
find_lex $P1543, "$past"
$P1544 = $P1542."!make"($P1543)
-.annotate 'line', 540
.return ($P1544)
control_1527:
.local pmc exception
@@ -24978,16 +23981,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "named_param" :subid("88_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "named_param" :subid("88_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1549
-.annotate 'line', 548
+.annotate 'line', 0
new $P1548, 'ExceptionHandler'
set_addr $P1548, control_1547
$P1548."handle_types"(.CONTROL_RETURN)
push_eh $P1548
.lex "self", self
.lex "$/", param_1549
-.annotate 'line', 549
new $P1550, "Undef"
.lex "$past", $P1550
find_lex $P1551, "$/"
@@ -25000,7 +24002,6 @@
vivify_500:
$P1553 = $P1552."ast"()
store_lex "$past", $P1553
-.annotate 'line', 550
find_lex $P1554, "$past"
find_lex $P1555, "$/"
unless_null $P1555, vivify_501
@@ -25016,11 +24017,9 @@
vivify_503:
set $S1558, $P1557
$P1554."named"($S1558)
-.annotate 'line', 551
find_lex $P1559, "$/"
find_lex $P1560, "$past"
$P1561 = $P1559."!make"($P1560)
-.annotate 'line', 548
.return ($P1561)
control_1547:
.local pmc exception
@@ -25032,14 +24031,14 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "regex_declarator" :subid("89_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "regex_declarator" :subid("89_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1566
.param pmc param_1567 :optional
.param int has_param_1567 :opt_flag
-.annotate 'line', 554
- .const 'Sub' $P1637 = "91_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1637 = "91_1283975952.27658"
capture_lex $P1637
- .const 'Sub' $P1609 = "90_1283368216.90714"
+ .const 'Sub' $P1609 = "90_1283975952.27658"
capture_lex $P1609
new $P1565, 'ExceptionHandler'
set_addr $P1565, control_1564
@@ -25052,21 +24051,16 @@
set param_1567, $P1568
optparam_504:
.lex "$key", param_1567
-.annotate 'line', 555
$P1569 = root_new ['parrot';'ResizablePMCArray']
.lex "@MODIFIERS", $P1569
-.annotate 'line', 558
new $P1570, "Undef"
.lex "$name", $P1570
-.annotate 'line', 559
new $P1571, "Undef"
.lex "$past", $P1571
-.annotate 'line', 555
$P1572 = get_hll_global ['Regex';'P6Regex';'Actions'], '@MODIFIERS'
store_lex "@MODIFIERS", $P1572
-.annotate 'line', 558
find_lex $P1573, "$/"
unless_null $P1573, vivify_505
$P1573 = root_new ['parrot';'Hash']
@@ -25081,7 +24075,6 @@
set $P1577, $S1576
store_lex "$name", $P1577
find_lex $P1578, "$past"
-.annotate 'line', 560
find_lex $P1580, "$/"
unless_null $P1580, vivify_507
$P1580 = root_new ['parrot';'Hash']
@@ -25091,65 +24084,49 @@
new $P1581, "Undef"
vivify_508:
if $P1581, if_1579
-.annotate 'line', 587
find_lex $P1605, "$key"
set $S1606, $P1605
iseq $I1607, $S1606, "open"
if $I1607, if_1604
-.annotate 'line', 600
- .const 'Sub' $P1637 = "91_1283368216.90714"
+ .const 'Sub' $P1637 = "91_1283975952.27658"
capture_lex $P1637
$P1637()
goto if_1604_end
if_1604:
-.annotate 'line', 587
- .const 'Sub' $P1609 = "90_1283368216.90714"
+ .const 'Sub' $P1609 = "90_1283975952.27658"
capture_lex $P1609
$P1609()
if_1604_end:
goto if_1579_end
if_1579:
-.annotate 'line', 562
get_hll_global $P1582, ["PAST"], "Stmts"
-.annotate 'line', 563
get_hll_global $P1583, ["PAST"], "Block"
find_lex $P1584, "$name"
-.annotate 'line', 564
get_hll_global $P1585, ["PAST"], "Op"
-.annotate 'line', 565
get_hll_global $P1586, ["PAST"], "Var"
$P1587 = $P1586."new"("self" :named("name"), "register" :named("scope"))
find_lex $P1588, "$name"
$P1589 = $P1585."new"($P1587, $P1588, "!protoregex" :named("name"), "callmethod" :named("pasttype"))
-.annotate 'line', 564
find_lex $P1590, "$/"
$P1591 = $P1583."new"($P1589, $P1584 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1590 :named("node"))
-.annotate 'line', 574
get_hll_global $P1592, ["PAST"], "Block"
new $P1593, "String"
assign $P1593, "!PREFIX__"
find_lex $P1594, "$name"
concat $P1595, $P1593, $P1594
-.annotate 'line', 575
get_hll_global $P1596, ["PAST"], "Op"
-.annotate 'line', 576
get_hll_global $P1597, ["PAST"], "Var"
$P1598 = $P1597."new"("self" :named("name"), "register" :named("scope"))
find_lex $P1599, "$name"
$P1600 = $P1596."new"($P1598, $P1599, "!PREFIX__!protoregex" :named("name"), "callmethod" :named("pasttype"))
-.annotate 'line', 575
find_lex $P1601, "$/"
$P1602 = $P1592."new"($P1600, $P1595 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1601 :named("node"))
-.annotate 'line', 574
$P1603 = $P1582."new"($P1591, $P1602)
-.annotate 'line', 562
store_lex "$past", $P1603
if_1579_end:
-.annotate 'line', 614
find_lex $P1658, "$/"
find_lex $P1659, "$past"
$P1660 = $P1658."!make"($P1659)
-.annotate 'line', 554
.return ($P1660)
control_1564:
.local pmc exception
@@ -25160,11 +24137,10 @@
.namespace ["NQP";"Actions"]
-.sub "_block1636" :anon :subid("91_1283368216.90714") :outer("89_1283368216.90714")
-.annotate 'line', 601
+.sub "_block1636" :anon :subid("91_1283975952.27658") :outer("89_1283975952.27658")
+.annotate 'line', 0
new $P1638, "Undef"
.lex "$regex", $P1638
-.annotate 'line', 602
get_hll_global $P1639, ["Regex";"P6Regex";"Actions"], "buildsub"
find_lex $P1640, "$/"
unless_null $P1640, vivify_509
@@ -25179,22 +24155,17 @@
$P1644 = $P1643."shift"()
$P1645 = $P1639($P1642, $P1644)
store_lex "$regex", $P1645
-.annotate 'line', 603
find_lex $P1646, "$regex"
find_lex $P1647, "$name"
$P1646."name"($P1647)
-.annotate 'line', 605
get_hll_global $P1648, ["PAST"], "Op"
-.annotate 'line', 607
get_hll_global $P1649, ["PAST"], "Var"
new $P1650, "ResizablePMCArray"
push $P1650, "Regex"
$P1651 = $P1649."new"("Method" :named("name"), $P1650 :named("namespace"), "package" :named("scope"))
find_lex $P1652, "$regex"
$P1653 = $P1648."new"($P1651, $P1652, "callmethod" :named("pasttype"), "new" :named("name"))
-.annotate 'line', 605
store_lex "$past", $P1653
-.annotate 'line', 611
find_lex $P1654, "$regex"
find_lex $P1655, "$past"
unless_null $P1655, vivify_511
@@ -25202,23 +24173,19 @@
store_lex "$past", $P1655
vivify_511:
set $P1655["sink"], $P1654
-.annotate 'line', 612
find_lex $P1656, "@MODIFIERS"
$P1657 = $P1656."shift"()
-.annotate 'line', 600
.return ($P1657)
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "_block1608" :anon :subid("90_1283368216.90714") :outer("89_1283368216.90714")
-.annotate 'line', 588
+.sub "_block1608" :anon :subid("90_1283975952.27658") :outer("89_1283975952.27658")
+.annotate 'line', 0
$P1610 = root_new ['parrot';'Hash']
.lex "%h", $P1610
-.annotate 'line', 587
find_lex $P1611, "%h"
-.annotate 'line', 589
find_lex $P1613, "$/"
unless_null $P1613, vivify_512
$P1613 = root_new ['parrot';'Hash']
@@ -25239,7 +24206,6 @@
vivify_514:
set $P1618["r"], $P1617
if_1612_end:
-.annotate 'line', 590
find_lex $P1620, "$/"
unless_null $P1620, vivify_515
$P1620 = root_new ['parrot';'Hash']
@@ -25268,16 +24234,13 @@
vivify_518:
set $P1627["s"], $P1626
if_1619_end:
-.annotate 'line', 591
find_lex $P1628, "@MODIFIERS"
find_lex $P1629, "%h"
$P1628."unshift"($P1629)
-.annotate 'line', 592
$P0 = find_lex '$name'
set_hll_global ['Regex';'P6Regex';'Actions'], '$REGEXNAME', $P0
-.annotate 'line', 596
get_global $P1630, "@BLOCK"
unless_null $P1630, vivify_519
$P1630 = root_new ['parrot';'ResizablePMCArray']
@@ -25287,7 +24250,6 @@
new $P1631, "Undef"
vivify_520:
$P1631."symbol"(unicode:"$\x{a2}", "lexical" :named("scope"))
-.annotate 'line', 597
get_global $P1632, "@BLOCK"
unless_null $P1632, vivify_521
$P1632 = root_new ['parrot';'ResizablePMCArray']
@@ -25297,30 +24259,27 @@
new $P1633, "Undef"
vivify_522:
$P1633."symbol"("$/", "lexical" :named("scope"))
-.annotate 'line', 598
new $P1634, "Exception"
set $P1634['type'], .CONTROL_RETURN
new $P1635, "Integer"
assign $P1635, 0
setattribute $P1634, 'payload', $P1635
throw $P1634
-.annotate 'line', 587
.return ()
.end
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "dotty" :subid("92_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "dotty" :subid("92_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1665
-.annotate 'line', 618
+.annotate 'line', 0
new $P1664, 'ExceptionHandler'
set_addr $P1664, control_1663
$P1664."handle_types"(.CONTROL_RETURN)
push_eh $P1664
.lex "self", self
.lex "$/", param_1665
-.annotate 'line', 619
new $P1666, "Undef"
.lex "$past", $P1666
find_lex $P1669, "$/"
@@ -25354,7 +24313,6 @@
set $P1667, $P1674
if_1668_end:
store_lex "$past", $P1667
-.annotate 'line', 620
find_lex $P1678, "$past"
find_lex $P1681, "$/"
unless_null $P1681, vivify_528
@@ -25390,14 +24348,11 @@
set $P1679, $P1685
if_1680_end:
$P1678."name"($P1679)
-.annotate 'line', 621
find_lex $P1689, "$past"
$P1689."pasttype"("callmethod")
-.annotate 'line', 622
find_lex $P1690, "$/"
find_lex $P1691, "$past"
$P1692 = $P1690."!make"($P1691)
-.annotate 'line', 618
.return ($P1692)
control_1663:
.local pmc exception
@@ -25409,21 +24364,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<self>" :subid("93_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<self>" :subid("93_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1697
-.annotate 'line', 627
+.annotate 'line', 0
new $P1696, 'ExceptionHandler'
set_addr $P1696, control_1695
$P1696."handle_types"(.CONTROL_RETURN)
push_eh $P1696
.lex "self", self
.lex "$/", param_1697
-.annotate 'line', 628
find_lex $P1698, "$/"
get_hll_global $P1699, ["PAST"], "Var"
$P1700 = $P1699."new"("self" :named("name"))
$P1701 = $P1698."!make"($P1700)
-.annotate 'line', 627
.return ($P1701)
control_1695:
.local pmc exception
@@ -25435,16 +24388,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<identifier>" :subid("94_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<identifier>" :subid("94_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1706
-.annotate 'line', 631
+.annotate 'line', 0
new $P1705, 'ExceptionHandler'
set_addr $P1705, control_1704
$P1705."handle_types"(.CONTROL_RETURN)
push_eh $P1705
.lex "self", self
.lex "$/", param_1706
-.annotate 'line', 632
new $P1707, "Undef"
.lex "$past", $P1707
find_lex $P1708, "$/"
@@ -25457,7 +24409,6 @@
vivify_535:
$P1710 = $P1709."ast"()
store_lex "$past", $P1710
-.annotate 'line', 633
find_lex $P1711, "$past"
find_lex $P1712, "$/"
unless_null $P1712, vivify_536
@@ -25469,11 +24420,9 @@
vivify_537:
set $S1714, $P1713
$P1711."name"($S1714)
-.annotate 'line', 634
find_lex $P1715, "$/"
find_lex $P1716, "$past"
$P1717 = $P1715."!make"($P1716)
-.annotate 'line', 631
.return ($P1717)
control_1704:
.local pmc exception
@@ -25485,28 +24434,23 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<name>" :subid("95_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<name>" :subid("95_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1722
-.annotate 'line', 637
+.annotate 'line', 0
new $P1721, 'ExceptionHandler'
set_addr $P1721, control_1720
$P1721."handle_types"(.CONTROL_RETURN)
push_eh $P1721
.lex "self", self
.lex "$/", param_1722
-.annotate 'line', 638
$P1723 = root_new ['parrot';'ResizablePMCArray']
.lex "@ns", $P1723
-.annotate 'line', 639
new $P1724, "Undef"
.lex "$name", $P1724
-.annotate 'line', 641
new $P1725, "Undef"
.lex "$var", $P1725
-.annotate 'line', 643
new $P1726, "Undef"
.lex "$past", $P1726
-.annotate 'line', 638
find_lex $P1727, "$/"
unless_null $P1727, vivify_538
$P1727 = root_new ['parrot';'Hash']
@@ -25521,11 +24465,9 @@
vivify_540:
clone $P1730, $P1729
store_lex "@ns", $P1730
-.annotate 'line', 639
find_lex $P1731, "@ns"
$P1732 = $P1731."pop"()
store_lex "$name", $P1732
-.annotate 'line', 640
find_lex $P1736, "@ns"
if $P1736, if_1735
set $P1734, $P1736
@@ -25548,17 +24490,14 @@
find_lex $P1741, "@ns"
$P1741."shift"()
if_1733_end:
-.annotate 'line', 642
get_hll_global $P1742, ["PAST"], "Var"
find_lex $P1743, "$name"
set $S1744, $P1743
find_lex $P1745, "@ns"
$P1746 = $P1742."new"($S1744 :named("name"), $P1745 :named("namespace"), "package" :named("scope"))
store_lex "$var", $P1746
-.annotate 'line', 643
find_lex $P1747, "$var"
store_lex "$past", $P1747
-.annotate 'line', 644
find_lex $P1749, "$/"
unless_null $P1749, vivify_543
$P1749 = root_new ['parrot';'Hash']
@@ -25568,7 +24507,6 @@
new $P1750, "Undef"
vivify_544:
unless $P1750, if_1748_end
-.annotate 'line', 645
find_lex $P1751, "$/"
unless_null $P1751, vivify_545
$P1751 = root_new ['parrot';'Hash']
@@ -25583,16 +24521,13 @@
vivify_547:
$P1754 = $P1753."ast"()
store_lex "$past", $P1754
-.annotate 'line', 646
find_lex $P1755, "$past"
find_lex $P1756, "$var"
$P1755."unshift"($P1756)
if_1748_end:
-.annotate 'line', 648
find_lex $P1757, "$/"
find_lex $P1758, "$past"
$P1759 = $P1757."!make"($P1758)
-.annotate 'line', 637
.return ($P1759)
control_1720:
.local pmc exception
@@ -25604,22 +24539,19 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<pir::op>" :subid("96_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<pir::op>" :subid("96_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1764
-.annotate 'line', 651
+.annotate 'line', 0
new $P1763, 'ExceptionHandler'
set_addr $P1763, control_1762
$P1763."handle_types"(.CONTROL_RETURN)
push_eh $P1763
.lex "self", self
.lex "$/", param_1764
-.annotate 'line', 652
new $P1765, "Undef"
.lex "$past", $P1765
-.annotate 'line', 653
new $P1766, "Undef"
.lex "$pirop", $P1766
-.annotate 'line', 652
find_lex $P1769, "$/"
unless_null $P1769, vivify_548
$P1769 = root_new ['parrot';'Hash']
@@ -25651,7 +24583,6 @@
set $P1767, $P1774
if_1768_end:
store_lex "$past", $P1767
-.annotate 'line', 653
find_lex $P1778, "$/"
unless_null $P1778, vivify_553
$P1778 = root_new ['parrot';'Hash']
@@ -25664,7 +24595,6 @@
new $P1781, 'String'
set $P1781, $S1780
store_lex "$pirop", $P1781
-.annotate 'line', 654
$P0 = find_lex '$pirop'
$S0 = $P0
@@ -25673,18 +24603,14 @@
$P1782 = box $S0
store_lex "$pirop", $P1782
-.annotate 'line', 661
find_lex $P1783, "$past"
find_lex $P1784, "$pirop"
$P1783."pirop"($P1784)
-.annotate 'line', 662
find_lex $P1785, "$past"
$P1785."pasttype"("pirop")
-.annotate 'line', 663
find_lex $P1786, "$/"
find_lex $P1787, "$past"
$P1788 = $P1786."!make"($P1787)
-.annotate 'line', 651
.return ($P1788)
control_1762:
.local pmc exception
@@ -25696,9 +24622,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "args" :subid("97_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "args" :subid("97_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1793
-.annotate 'line', 666
+.annotate 'line', 0
new $P1792, 'ExceptionHandler'
set_addr $P1792, control_1791
$P1792."handle_types"(.CONTROL_RETURN)
@@ -25727,10 +24653,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "arglist" :subid("98_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "arglist" :subid("98_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1803
-.annotate 'line', 668
- .const 'Sub' $P1814 = "99_1283368216.90714"
+.annotate 'line', 0
+ .const 'Sub' $P1814 = "99_1283975952.27658"
capture_lex $P1814
new $P1802, 'ExceptionHandler'
set_addr $P1802, control_1801
@@ -25738,21 +24664,16 @@
push_eh $P1802
.lex "self", self
.lex "$/", param_1803
-.annotate 'line', 669
new $P1804, "Undef"
.lex "$past", $P1804
-.annotate 'line', 677
new $P1805, "Undef"
.lex "$i", $P1805
-.annotate 'line', 678
new $P1806, "Undef"
.lex "$n", $P1806
-.annotate 'line', 669
get_hll_global $P1807, ["PAST"], "Op"
find_lex $P1808, "$/"
$P1809 = $P1807."new"("call" :named("pasttype"), $P1808 :named("node"))
store_lex "$past", $P1809
-.annotate 'line', 670
find_lex $P1811, "$/"
unless_null $P1811, vivify_557
$P1811 = root_new ['parrot';'Hash']
@@ -25762,22 +24683,19 @@
new $P1812, "Undef"
vivify_558:
unless $P1812, if_1810_end
- .const 'Sub' $P1814 = "99_1283368216.90714"
+ .const 'Sub' $P1814 = "99_1283975952.27658"
capture_lex $P1814
$P1814()
if_1810_end:
-.annotate 'line', 677
new $P1846, "Integer"
assign $P1846, 0
store_lex "$i", $P1846
-.annotate 'line', 678
find_lex $P1847, "$past"
$P1848 = $P1847."list"()
set $N1849, $P1848
new $P1850, 'Float'
set $P1850, $N1849
store_lex "$n", $P1850
-.annotate 'line', 679
new $P1898, 'ExceptionHandler'
set_addr $P1898, loop1897_handler
$P1898."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST)
@@ -25790,7 +24708,6 @@
islt $I1855, $N1852, $N1854
unless $I1855, loop1897_done
loop1897_redo:
-.annotate 'line', 680
find_lex $P1857, "$i"
set $I1858, $P1857
find_lex $P1859, "$past"
@@ -25804,7 +24721,6 @@
$S1861 = $P1860."name"()
iseq $I1862, $S1861, "&prefix:<|>"
unless $I1862, if_1856_end
-.annotate 'line', 681
find_lex $P1863, "$i"
set $I1864, $P1863
find_lex $P1865, "$past"
@@ -25827,7 +24743,6 @@
store_lex "$past", $P1870
vivify_567:
set $P1870[$I1869], $P1867
-.annotate 'line', 682
find_lex $P1871, "$i"
set $I1872, $P1871
find_lex $P1873, "$past"
@@ -25839,7 +24754,6 @@
new $P1874, "Undef"
vivify_569:
$P1874."flat"(1)
-.annotate 'line', 683
find_lex $P1878, "$i"
set $I1879, $P1878
find_lex $P1880, "$past"
@@ -25856,7 +24770,6 @@
set $P1876, $P1883
goto if_1877_end
if_1877:
-.annotate 'line', 684
find_lex $P1884, "$i"
set $I1885, $P1884
find_lex $P1886, "$past"
@@ -25874,7 +24787,6 @@
set $P1876, $I1890
if_1877_end:
unless $P1876, if_1875_end
-.annotate 'line', 685
find_lex $P1891, "$i"
set $I1892, $P1891
find_lex $P1893, "$past"
@@ -25888,12 +24800,10 @@
$P1894."named"(1)
if_1875_end:
if_1856_end:
-.annotate 'line', 680
find_lex $P1895, "$i"
clone $P1896, $P1895
inc $P1895
loop1897_next:
-.annotate 'line', 679
goto loop1897_test
loop1897_handler:
.local pmc exception
@@ -25903,11 +24813,9 @@
eq $P1899, .CONTROL_LOOP_REDO, loop1897_redo
loop1897_done:
pop_eh
-.annotate 'line', 690
find_lex $P1900, "$/"
find_lex $P1901, "$past"
$P1902 = $P1900."!make"($P1901)
-.annotate 'line', 668
.return ($P1902)
control_1801:
.local pmc exception
@@ -25919,11 +24827,10 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "_block1813" :anon :subid("99_1283368216.90714") :outer("98_1283368216.90714")
-.annotate 'line', 670
- .const 'Sub' $P1835 = "100_1283368216.90714"
+.sub "_block1813" :anon :subid("99_1283975952.27658") :outer("98_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P1835 = "100_1283975952.27658"
capture_lex $P1835
-.annotate 'line', 671
new $P1815, "Undef"
.lex "$expr", $P1815
find_lex $P1816, "$/"
@@ -25936,7 +24843,6 @@
vivify_560:
$P1818 = $P1817."ast"()
store_lex "$expr", $P1818
-.annotate 'line', 672
find_lex $P1823, "$expr"
$S1824 = $P1823."name"()
iseq $I1825, $S1824, "&infix:<,>"
@@ -25952,15 +24858,12 @@
set $P1821, $I1828
if_1822_end:
if $P1821, if_1820
-.annotate 'line', 675
find_lex $P1843, "$past"
find_lex $P1844, "$expr"
$P1845 = $P1843."push"($P1844)
set $P1819, $P1845
-.annotate 'line', 672
goto if_1820_end
if_1820:
-.annotate 'line', 673
find_lex $P1830, "$expr"
$P1831 = $P1830."list"()
defined $I1832, $P1831
@@ -25974,7 +24877,7 @@
unless $P1829, loop1840_done
shift $P1833, $P1829
loop1840_redo:
- .const 'Sub' $P1835 = "100_1283368216.90714"
+ .const 'Sub' $P1835 = "100_1283975952.27658"
capture_lex $P1835
$P1835($P1833)
loop1840_next:
@@ -25988,18 +24891,16 @@
loop1840_done:
pop_eh
for_undef_561:
-.annotate 'line', 672
set $P1819, $P1829
if_1820_end:
-.annotate 'line', 670
.return ($P1819)
.end
.namespace ["NQP";"Actions"]
-.sub "_block1834" :anon :subid("100_1283368216.90714") :outer("99_1283368216.90714")
+.sub "_block1834" :anon :subid("100_1283975952.27658") :outer("99_1283975952.27658")
.param pmc param_1836
-.annotate 'line', 673
+.annotate 'line', 0
.lex "$_", param_1836
find_lex $P1837, "$past"
find_lex $P1838, "$_"
@@ -26010,9 +24911,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<value>" :subid("101_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<value>" :subid("101_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1907
-.annotate 'line', 694
+.annotate 'line', 0
new $P1906, 'ExceptionHandler'
set_addr $P1906, control_1905
$P1906."handle_types"(.CONTROL_RETURN)
@@ -26041,18 +24942,16 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "circumfix:sym<( )>" :subid("102_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "circumfix:sym<( )>" :subid("102_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1917
-.annotate 'line', 696
+.annotate 'line', 0
new $P1916, 'ExceptionHandler'
set_addr $P1916, control_1915
$P1916."handle_types"(.CONTROL_RETURN)
push_eh $P1916
.lex "self", self
.lex "$/", param_1917
-.annotate 'line', 697
find_lex $P1918, "$/"
-.annotate 'line', 698
find_lex $P1921, "$/"
unless_null $P1921, vivify_578
$P1921 = root_new ['parrot';'Hash']
@@ -26062,12 +24961,10 @@
new $P1922, "Undef"
vivify_579:
if $P1922, if_1920
-.annotate 'line', 699
get_hll_global $P1927, ["PAST"], "Op"
find_lex $P1928, "$/"
$P1929 = $P1927."new"("list" :named("pasttype"), $P1928 :named("node"))
set $P1919, $P1929
-.annotate 'line', 698
goto if_1920_end
if_1920:
find_lex $P1923, "$/"
@@ -26086,7 +24983,6 @@
set $P1919, $P1926
if_1920_end:
$P1930 = $P1918."!make"($P1919)
-.annotate 'line', 696
.return ($P1930)
control_1915:
.local pmc exception
@@ -26098,21 +24994,18 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "circumfix:sym<[ ]>" :subid("103_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "circumfix:sym<[ ]>" :subid("103_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1935
-.annotate 'line', 702
+.annotate 'line', 0
new $P1934, 'ExceptionHandler'
set_addr $P1934, control_1933
$P1934."handle_types"(.CONTROL_RETURN)
push_eh $P1934
.lex "self", self
.lex "$/", param_1935
-.annotate 'line', 703
new $P1936, "Undef"
.lex "$past", $P1936
-.annotate 'line', 702
find_lex $P1937, "$past"
-.annotate 'line', 704
find_lex $P1939, "$/"
unless_null $P1939, vivify_583
$P1939 = root_new ['parrot';'Hash']
@@ -26122,14 +25015,11 @@
new $P1940, "Undef"
vivify_584:
if $P1940, if_1938
-.annotate 'line', 711
get_hll_global $P1952, ["PAST"], "Op"
$P1953 = $P1952."new"("list" :named("pasttype"))
store_lex "$past", $P1953
-.annotate 'line', 710
goto if_1938_end
if_1938:
-.annotate 'line', 705
find_lex $P1941, "$/"
unless_null $P1941, vivify_585
$P1941 = root_new ['parrot';'Hash']
@@ -26144,26 +25034,21 @@
vivify_587:
$P1944 = $P1943."ast"()
store_lex "$past", $P1944
-.annotate 'line', 706
find_lex $P1946, "$past"
$S1947 = $P1946."name"()
isne $I1948, $S1947, "&infix:<,>"
unless $I1948, if_1945_end
-.annotate 'line', 707
get_hll_global $P1949, ["PAST"], "Op"
find_lex $P1950, "$past"
$P1951 = $P1949."new"($P1950, "list" :named("pasttype"))
store_lex "$past", $P1951
if_1945_end:
if_1938_end:
-.annotate 'line', 713
find_lex $P1954, "$past"
$P1954."name"("&circumfix:<[ ]>")
-.annotate 'line', 714
find_lex $P1955, "$/"
find_lex $P1956, "$past"
$P1957 = $P1955."!make"($P1956)
-.annotate 'line', 702
.return ($P1957)
control_1933:
.local pmc exception
@@ -26175,9 +25060,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "circumfix:sym<ang>" :subid("104_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "circumfix:sym<ang>" :subid("104_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1962
-.annotate 'line', 717
+.annotate 'line', 0
new $P1961, 'ExceptionHandler'
set_addr $P1961, control_1960
$P1961."handle_types"(.CONTROL_RETURN)
@@ -26206,9 +25091,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("105_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("105_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1972
-.annotate 'line', 718
+.annotate 'line', 0
new $P1971, 'ExceptionHandler'
set_addr $P1971, control_1970
$P1971."handle_types"(.CONTROL_RETURN)
@@ -26237,16 +25122,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "circumfix:sym<{ }>" :subid("106_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "circumfix:sym<{ }>" :subid("106_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_1982
-.annotate 'line', 720
+.annotate 'line', 0
new $P1981, 'ExceptionHandler'
set_addr $P1981, control_1980
$P1981."handle_types"(.CONTROL_RETURN)
push_eh $P1981
.lex "self", self
.lex "$/", param_1982
-.annotate 'line', 721
new $P1983, "Undef"
.lex "$past", $P1983
find_lex $P1986, "$/"
@@ -26272,13 +25156,10 @@
set $N1991, $P1990
isgt $I1992, $N1991, 0.0
if $I1992, if_1985
-.annotate 'line', 723
$P1996 = "vivitype"("%")
set $P1984, $P1996
-.annotate 'line', 721
goto if_1985_end
if_1985:
-.annotate 'line', 722
find_lex $P1993, "$/"
unless_null $P1993, vivify_597
$P1993 = root_new ['parrot';'Hash']
@@ -26291,7 +25172,6 @@
set $P1984, $P1995
if_1985_end:
store_lex "$past", $P1984
-.annotate 'line', 724
new $P1997, "Integer"
assign $P1997, 1
find_lex $P1998, "$past"
@@ -26300,11 +25180,9 @@
store_lex "$past", $P1998
vivify_599:
set $P1998["bareblock"], $P1997
-.annotate 'line', 725
find_lex $P1999, "$/"
find_lex $P2000, "$past"
$P2001 = $P1999."!make"($P2000)
-.annotate 'line', 720
.return ($P2001)
control_1980:
.local pmc exception
@@ -26316,16 +25194,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "circumfix:sym<sigil>" :subid("107_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "circumfix:sym<sigil>" :subid("107_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2006
-.annotate 'line', 728
+.annotate 'line', 0
new $P2005, 'ExceptionHandler'
set_addr $P2005, control_2004
$P2005."handle_types"(.CONTROL_RETURN)
push_eh $P2005
.lex "self", self
.lex "$/", param_2006
-.annotate 'line', 729
new $P2007, "Undef"
.lex "$name", $P2007
find_lex $P2010, "$/"
@@ -26339,7 +25216,6 @@
set $S2012, $P2011
iseq $I2013, $S2012, "@"
if $I2013, if_2009
-.annotate 'line', 730
find_lex $P2017, "$/"
unless_null $P2017, vivify_602
$P2017 = root_new ['parrot';'Hash']
@@ -26361,7 +25237,6 @@
set $P2015, $P2021
if_2016_end:
set $P2008, $P2015
-.annotate 'line', 729
goto if_2009_end
if_2009:
new $P2014, "String"
@@ -26369,7 +25244,6 @@
set $P2008, $P2014
if_2009_end:
store_lex "$name", $P2008
-.annotate 'line', 732
find_lex $P2023, "$/"
get_hll_global $P2024, ["PAST"], "Op"
find_lex $P2025, "$name"
@@ -26384,7 +25258,6 @@
$P2028 = $P2027."ast"()
$P2029 = $P2024."new"($P2028, "callmethod" :named("pasttype"), $P2025 :named("name"))
$P2030 = $P2023."!make"($P2029)
-.annotate 'line', 728
.return ($P2030)
control_2004:
.local pmc exception
@@ -26396,9 +25269,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "semilist" :subid("108_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "semilist" :subid("108_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2035
-.annotate 'line', 735
+.annotate 'line', 0
new $P2034, 'ExceptionHandler'
set_addr $P2034, control_2033
$P2034."handle_types"(.CONTROL_RETURN)
@@ -26427,16 +25300,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postcircumfix:sym<[ ]>" :subid("109_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postcircumfix:sym<[ ]>" :subid("109_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2045
-.annotate 'line', 737
+.annotate 'line', 0
new $P2044, 'ExceptionHandler'
set_addr $P2044, control_2043
$P2044."handle_types"(.CONTROL_RETURN)
push_eh $P2044
.lex "self", self
.lex "$/", param_2045
-.annotate 'line', 738
find_lex $P2046, "$/"
get_hll_global $P2047, ["PAST"], "Var"
find_lex $P2048, "$/"
@@ -26448,12 +25320,9 @@
new $P2049, "Undef"
vivify_609:
$P2050 = $P2049."ast"()
-.annotate 'line', 740
$P2051 = "vivitype"("@")
$P2052 = $P2047."new"($P2050, "keyed_int" :named("scope"), "Undef" :named("viviself"), $P2051 :named("vivibase"))
-.annotate 'line', 738
$P2053 = $P2046."!make"($P2052)
-.annotate 'line', 737
.return ($P2053)
control_2043:
.local pmc exception
@@ -26465,16 +25334,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postcircumfix:sym<{ }>" :subid("110_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postcircumfix:sym<{ }>" :subid("110_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2058
-.annotate 'line', 743
+.annotate 'line', 0
new $P2057, 'ExceptionHandler'
set_addr $P2057, control_2056
$P2057."handle_types"(.CONTROL_RETURN)
push_eh $P2057
.lex "self", self
.lex "$/", param_2058
-.annotate 'line', 744
find_lex $P2059, "$/"
get_hll_global $P2060, ["PAST"], "Var"
find_lex $P2061, "$/"
@@ -26486,12 +25354,9 @@
new $P2062, "Undef"
vivify_611:
$P2063 = $P2062."ast"()
-.annotate 'line', 746
$P2064 = "vivitype"("%")
$P2065 = $P2060."new"($P2063, "keyed" :named("scope"), "Undef" :named("viviself"), $P2064 :named("vivibase"))
-.annotate 'line', 744
$P2066 = $P2059."!make"($P2065)
-.annotate 'line', 743
.return ($P2066)
control_2056:
.local pmc exception
@@ -26503,16 +25368,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postcircumfix:sym<ang>" :subid("111_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postcircumfix:sym<ang>" :subid("111_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2071
-.annotate 'line', 749
+.annotate 'line', 0
new $P2070, 'ExceptionHandler'
set_addr $P2070, control_2069
$P2070."handle_types"(.CONTROL_RETURN)
push_eh $P2070
.lex "self", self
.lex "$/", param_2071
-.annotate 'line', 750
find_lex $P2072, "$/"
get_hll_global $P2073, ["PAST"], "Var"
find_lex $P2074, "$/"
@@ -26524,12 +25388,9 @@
new $P2075, "Undef"
vivify_613:
$P2076 = $P2075."ast"()
-.annotate 'line', 752
$P2077 = "vivitype"("%")
$P2078 = $P2073."new"($P2076, "keyed" :named("scope"), "Undef" :named("viviself"), $P2077 :named("vivibase"))
-.annotate 'line', 750
$P2079 = $P2072."!make"($P2078)
-.annotate 'line', 749
.return ($P2079)
control_2069:
.local pmc exception
@@ -26541,16 +25402,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postcircumfix:sym<( )>" :subid("112_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postcircumfix:sym<( )>" :subid("112_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2084
-.annotate 'line', 755
+.annotate 'line', 0
new $P2083, 'ExceptionHandler'
set_addr $P2083, control_2082
$P2083."handle_types"(.CONTROL_RETURN)
push_eh $P2083
.lex "self", self
.lex "$/", param_2084
-.annotate 'line', 756
find_lex $P2085, "$/"
find_lex $P2086, "$/"
unless_null $P2086, vivify_614
@@ -26562,7 +25422,6 @@
vivify_615:
$P2088 = $P2087."ast"()
$P2089 = $P2085."!make"($P2088)
-.annotate 'line', 755
.return ($P2089)
control_2082:
.local pmc exception
@@ -26574,16 +25433,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "value" :subid("113_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "value" :subid("113_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2094
-.annotate 'line', 759
+.annotate 'line', 0
new $P2093, 'ExceptionHandler'
set_addr $P2093, control_2092
$P2093."handle_types"(.CONTROL_RETURN)
push_eh $P2093
.lex "self", self
.lex "$/", param_2094
-.annotate 'line', 760
find_lex $P2095, "$/"
find_lex $P2098, "$/"
unless_null $P2098, vivify_616
@@ -26618,7 +25476,6 @@
set $P2096, $P2102
if_2097_end:
$P2106 = $P2095."!make"($P2096)
-.annotate 'line', 759
.return ($P2106)
control_2092:
.local pmc exception
@@ -26630,16 +25487,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "number" :subid("114_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "number" :subid("114_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2111
-.annotate 'line', 763
+.annotate 'line', 0
new $P2110, 'ExceptionHandler'
set_addr $P2110, control_2109
$P2110."handle_types"(.CONTROL_RETURN)
push_eh $P2110
.lex "self", self
.lex "$/", param_2111
-.annotate 'line', 764
new $P2112, "Undef"
.lex "$value", $P2112
find_lex $P2115, "$/"
@@ -26675,7 +25531,6 @@
set $P2113, $P2119
if_2114_end:
store_lex "$value", $P2113
-.annotate 'line', 765
find_lex $P2124, "$/"
unless_null $P2124, vivify_628
$P2124 = root_new ['parrot';'Hash']
@@ -26691,13 +25546,11 @@
neg $P2129, $P2128
store_lex "$value", $P2129
if_2123_end:
-.annotate 'line', 766
find_lex $P2130, "$/"
get_hll_global $P2131, ["PAST"], "Val"
find_lex $P2132, "$value"
$P2133 = $P2131."new"($P2132 :named("value"))
$P2134 = $P2130."!make"($P2133)
-.annotate 'line', 763
.return ($P2134)
control_2109:
.local pmc exception
@@ -26709,9 +25562,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<apos>" :subid("115_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<apos>" :subid("115_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2139
-.annotate 'line', 769
+.annotate 'line', 0
new $P2138, 'ExceptionHandler'
set_addr $P2138, control_2137
$P2138."handle_types"(.CONTROL_RETURN)
@@ -26740,9 +25593,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<dblq>" :subid("116_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<dblq>" :subid("116_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2149
-.annotate 'line', 770
+.annotate 'line', 0
new $P2148, 'ExceptionHandler'
set_addr $P2148, control_2147
$P2148."handle_types"(.CONTROL_RETURN)
@@ -26771,9 +25624,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<qq>" :subid("117_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<qq>" :subid("117_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2159
-.annotate 'line', 771
+.annotate 'line', 0
new $P2158, 'ExceptionHandler'
set_addr $P2158, control_2157
$P2158."handle_types"(.CONTROL_RETURN)
@@ -26802,9 +25655,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<q>" :subid("118_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<q>" :subid("118_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2169
-.annotate 'line', 772
+.annotate 'line', 0
new $P2168, 'ExceptionHandler'
set_addr $P2168, control_2167
$P2168."handle_types"(.CONTROL_RETURN)
@@ -26833,9 +25686,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<Q>" :subid("119_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<Q>" :subid("119_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2179
-.annotate 'line', 773
+.annotate 'line', 0
new $P2178, 'ExceptionHandler'
set_addr $P2178, control_2177
$P2178."handle_types"(.CONTROL_RETURN)
@@ -26864,16 +25717,15 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym<Q:PIR>" :subid("120_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym<Q:PIR>" :subid("120_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2189
-.annotate 'line', 774
+.annotate 'line', 0
new $P2188, 'ExceptionHandler'
set_addr $P2188, control_2187
$P2188."handle_types"(.CONTROL_RETURN)
push_eh $P2188
.lex "self", self
.lex "$/", param_2189
-.annotate 'line', 775
find_lex $P2190, "$/"
get_hll_global $P2191, ["PAST"], "Op"
find_lex $P2192, "$/"
@@ -26889,7 +25741,6 @@
find_lex $P2196, "$/"
$P2197 = $P2191."new"($P2195 :named("inline"), "inline" :named("pasttype"), $P2196 :named("node"))
$P2198 = $P2190."!make"($P2197)
-.annotate 'line', 774
.return ($P2198)
control_2187:
.local pmc exception
@@ -26901,11 +25752,11 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote:sym</ />" :subid("121_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote:sym</ />" :subid("121_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2203
.param pmc param_2204 :optional
.param int has_param_2204 :opt_flag
-.annotate 'line', 780
+.annotate 'line', 0
new $P2202, 'ExceptionHandler'
set_addr $P2202, control_2201
$P2202."handle_types"(.CONTROL_RETURN)
@@ -26917,23 +25768,18 @@
set param_2204, $P2205
optparam_642:
.lex "$key", param_2204
-.annotate 'line', 790
new $P2206, "Undef"
.lex "$regex", $P2206
-.annotate 'line', 792
new $P2207, "Undef"
.lex "$past", $P2207
-.annotate 'line', 781
find_lex $P2209, "$key"
set $S2210, $P2209
iseq $I2211, $S2210, "open"
unless $I2211, if_2208_end
-.annotate 'line', 782
null $P0
set_hll_global ['Regex';'P6Regex';'Actions'], '$REGEXNAME', $P0
-.annotate 'line', 786
get_global $P2212, "@BLOCK"
unless_null $P2212, vivify_643
$P2212 = root_new ['parrot';'ResizablePMCArray']
@@ -26943,7 +25789,6 @@
new $P2213, "Undef"
vivify_644:
$P2213."symbol"(unicode:"$\x{a2}", "lexical" :named("scope"))
-.annotate 'line', 787
get_global $P2214, "@BLOCK"
unless_null $P2214, vivify_645
$P2214 = root_new ['parrot';'ResizablePMCArray']
@@ -26953,7 +25798,6 @@
new $P2215, "Undef"
vivify_646:
$P2215."symbol"("$/", "lexical" :named("scope"))
-.annotate 'line', 788
new $P2216, "Exception"
set $P2216['type'], .CONTROL_RETURN
new $P2217, "Integer"
@@ -26961,7 +25805,6 @@
setattribute $P2216, 'payload', $P2217
throw $P2216
if_2208_end:
-.annotate 'line', 791
get_hll_global $P2218, ["Regex";"P6Regex";"Actions"], "buildsub"
find_lex $P2219, "$/"
unless_null $P2219, vivify_647
@@ -26976,18 +25819,14 @@
$P2223 = $P2222."shift"()
$P2224 = $P2218($P2221, $P2223)
store_lex "$regex", $P2224
-.annotate 'line', 793
get_hll_global $P2225, ["PAST"], "Op"
-.annotate 'line', 795
get_hll_global $P2226, ["PAST"], "Var"
new $P2227, "ResizablePMCArray"
push $P2227, "Regex"
$P2228 = $P2226."new"("Regex" :named("name"), $P2227 :named("namespace"), "package" :named("scope"))
find_lex $P2229, "$regex"
$P2230 = $P2225."new"($P2228, $P2229, "callmethod" :named("pasttype"), "new" :named("name"))
-.annotate 'line', 793
store_lex "$past", $P2230
-.annotate 'line', 799
find_lex $P2231, "$regex"
find_lex $P2232, "$past"
unless_null $P2232, vivify_649
@@ -26995,11 +25834,9 @@
store_lex "$past", $P2232
vivify_649:
set $P2232["sink"], $P2231
-.annotate 'line', 800
find_lex $P2233, "$/"
find_lex $P2234, "$past"
$P2235 = $P2233."!make"($P2234)
-.annotate 'line', 780
.return ($P2235)
control_2201:
.local pmc exception
@@ -27011,9 +25848,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<$>" :subid("122_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote_escape:sym<$>" :subid("122_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2240
-.annotate 'line', 803
+.annotate 'line', 0
new $P2239, 'ExceptionHandler'
set_addr $P2239, control_2238
$P2239."handle_types"(.CONTROL_RETURN)
@@ -27042,19 +25879,17 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<{ }>" :subid("123_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote_escape:sym<{ }>" :subid("123_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2250
-.annotate 'line', 804
+.annotate 'line', 0
new $P2249, 'ExceptionHandler'
set_addr $P2249, control_2248
$P2249."handle_types"(.CONTROL_RETURN)
push_eh $P2249
.lex "self", self
.lex "$/", param_2250
-.annotate 'line', 805
find_lex $P2251, "$/"
get_hll_global $P2252, ["PAST"], "Op"
-.annotate 'line', 806
find_lex $P2253, "$/"
unless_null $P2253, vivify_652
$P2253 = root_new ['parrot';'Hash']
@@ -27067,9 +25902,7 @@
$P2256 = "block_immediate"($P2255)
find_lex $P2257, "$/"
$P2258 = $P2252."new"($P2256, "set S*" :named("pirop"), $P2257 :named("node"))
-.annotate 'line', 805
$P2259 = $P2251."!make"($P2258)
-.annotate 'line', 804
.return ($P2259)
control_2248:
.local pmc exception
@@ -27081,9 +25914,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "quote_escape:sym<esc>" :subid("124_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "quote_escape:sym<esc>" :subid("124_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2264
-.annotate 'line', 809
+.annotate 'line', 0
new $P2263, 'ExceptionHandler'
set_addr $P2263, control_2262
$P2263."handle_types"(.CONTROL_RETURN)
@@ -27103,9 +25936,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postfix:sym<.>" :subid("125_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postfix:sym<.>" :subid("125_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2271
-.annotate 'line', 813
+.annotate 'line', 0
new $P2270, 'ExceptionHandler'
set_addr $P2270, control_2269
$P2270."handle_types"(.CONTROL_RETURN)
@@ -27134,26 +25967,22 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postfix:sym<++>" :subid("126_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postfix:sym<++>" :subid("126_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2281
-.annotate 'line', 815
+.annotate 'line', 0
new $P2280, 'ExceptionHandler'
set_addr $P2280, control_2279
$P2280."handle_types"(.CONTROL_RETURN)
push_eh $P2280
.lex "self", self
.lex "$/", param_2281
-.annotate 'line', 816
find_lex $P2282, "$/"
get_hll_global $P2283, ["PAST"], "Op"
-.annotate 'line', 817
new $P2284, "ResizablePMCArray"
push $P2284, " clone %r, %0"
push $P2284, " inc %0"
$P2285 = $P2283."new"("postfix:<++>" :named("name"), $P2284 :named("inline"), "inline" :named("pasttype"))
-.annotate 'line', 816
$P2286 = $P2282."!make"($P2285)
-.annotate 'line', 815
.return ($P2286)
control_2279:
.local pmc exception
@@ -27165,26 +25994,22 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "postfix:sym<-->" :subid("127_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "postfix:sym<-->" :subid("127_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2291
-.annotate 'line', 821
+.annotate 'line', 0
new $P2290, 'ExceptionHandler'
set_addr $P2290, control_2289
$P2290."handle_types"(.CONTROL_RETURN)
push_eh $P2290
.lex "self", self
.lex "$/", param_2291
-.annotate 'line', 822
find_lex $P2292, "$/"
get_hll_global $P2293, ["PAST"], "Op"
-.annotate 'line', 823
new $P2294, "ResizablePMCArray"
push $P2294, " clone %r, %0"
push $P2294, " dec %0"
$P2295 = $P2293."new"("postfix:<-->" :named("name"), $P2294 :named("inline"), "inline" :named("pasttype"))
-.annotate 'line', 822
$P2296 = $P2292."!make"($P2295)
-.annotate 'line', 821
.return ($P2296)
control_2289:
.local pmc exception
@@ -27196,26 +26021,22 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "prefix:sym<make>" :subid("128_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "prefix:sym<make>" :subid("128_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2301
-.annotate 'line', 827
+.annotate 'line', 0
new $P2300, 'ExceptionHandler'
set_addr $P2300, control_2299
$P2300."handle_types"(.CONTROL_RETURN)
push_eh $P2300
.lex "self", self
.lex "$/", param_2301
-.annotate 'line', 828
find_lex $P2302, "$/"
get_hll_global $P2303, ["PAST"], "Op"
-.annotate 'line', 829
get_hll_global $P2304, ["PAST"], "Var"
$P2305 = $P2304."new"("$/" :named("name"), "contextual" :named("scope"))
find_lex $P2306, "$/"
$P2307 = $P2303."new"($P2305, "callmethod" :named("pasttype"), "!make" :named("name"), $P2306 :named("node"))
-.annotate 'line', 828
$P2308 = $P2302."!make"($P2307)
-.annotate 'line', 827
.return ($P2308)
control_2299:
.local pmc exception
@@ -27227,9 +26048,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<next>" :subid("129_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<next>" :subid("129_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2314
-.annotate 'line', 845
+.annotate 'line', 0
new $P2313, 'ExceptionHandler'
set_addr $P2313, control_2312
$P2313."handle_types"(.CONTROL_RETURN)
@@ -27249,9 +26070,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<last>" :subid("130_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<last>" :subid("130_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2321
-.annotate 'line', 846
+.annotate 'line', 0
new $P2320, 'ExceptionHandler'
set_addr $P2320, control_2319
$P2320."handle_types"(.CONTROL_RETURN)
@@ -27271,9 +26092,9 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "term:sym<redo>" :subid("131_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "term:sym<redo>" :subid("131_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2328
-.annotate 'line', 847
+.annotate 'line', 0
new $P2327, 'ExceptionHandler'
set_addr $P2327, control_2326
$P2327."handle_types"(.CONTROL_RETURN)
@@ -27293,22 +26114,20 @@
.namespace ["NQP";"Actions"]
.include "except_types.pasm"
-.sub "infix:sym<~~>" :subid("132_1283368216.90714") :method :outer("11_1283368216.90714")
+.sub "infix:sym<~~>" :subid("132_1283975952.27658") :method :outer("11_1283975952.27658")
.param pmc param_2335
-.annotate 'line', 849
+.annotate 'line', 0
new $P2334, 'ExceptionHandler'
set_addr $P2334, control_2333
$P2334."handle_types"(.CONTROL_RETURN)
push_eh $P2334
.lex "self", self
.lex "$/", param_2335
-.annotate 'line', 850
find_lex $P2336, "$/"
get_hll_global $P2337, ["PAST"], "Op"
find_lex $P2338, "$/"
$P2339 = $P2337."new"("callmethod" :named("pasttype"), "ACCEPTS" :named("name"), $P2338 :named("node"))
$P2340 = $P2336."!make"($P2339)
-.annotate 'line', 849
.return ($P2340)
control_2333:
.local pmc exception
@@ -27319,42 +26138,39 @@
.namespace ["NQP";"RegexActions"]
-.sub "_block2342" :subid("133_1283368216.90714") :outer("11_1283368216.90714")
-.annotate 'line', 854
- .const 'Sub' $P2428 = "140_1283368216.90714"
+.sub "_block2342" :subid("133_1283975952.27658") :outer("11_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P2428 = "140_1283975952.27658"
capture_lex $P2428
- .const 'Sub' $P2415 = "139_1283368216.90714"
+ .const 'Sub' $P2415 = "139_1283975952.27658"
capture_lex $P2415
- .const 'Sub' $P2398 = "138_1283368216.90714"
+ .const 'Sub' $P2398 = "138_1283975952.27658"
capture_lex $P2398
- .const 'Sub' $P2385 = "137_1283368216.90714"
+ .const 'Sub' $P2385 = "137_1283975952.27658"
capture_lex $P2385
- .const 'Sub' $P2372 = "136_1283368216.90714"
+ .const 'Sub' $P2372 = "136_1283975952.27658"
capture_lex $P2372
- .const 'Sub' $P2359 = "135_1283368216.90714"
+ .const 'Sub' $P2359 = "135_1283975952.27658"
capture_lex $P2359
- .const 'Sub' $P2344 = "134_1283368216.90714"
+ .const 'Sub' $P2344 = "134_1283975952.27658"
capture_lex $P2344
-.annotate 'line', 888
- .const 'Sub' $P2428 = "140_1283368216.90714"
+ .const 'Sub' $P2428 = "140_1283975952.27658"
newclosure $P2453, $P2428
-.annotate 'line', 854
.return ($P2453)
.end
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "metachar:sym<:my>" :subid("134_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "metachar:sym<:my>" :subid("134_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2347
-.annotate 'line', 856
+.annotate 'line', 0
new $P2346, 'ExceptionHandler'
set_addr $P2346, control_2345
$P2346."handle_types"(.CONTROL_RETURN)
push_eh $P2346
.lex "self", self
.lex "$/", param_2347
-.annotate 'line', 857
new $P2348, "Undef"
.lex "$past", $P2348
find_lex $P2349, "$/"
@@ -27367,14 +26183,12 @@
vivify_657:
$P2351 = $P2350."ast"()
store_lex "$past", $P2351
-.annotate 'line', 858
find_lex $P2352, "$/"
get_hll_global $P2353, ["PAST"], "Regex"
find_lex $P2354, "$past"
find_lex $P2355, "$/"
$P2356 = $P2353."new"($P2354, "pastnode" :named("pasttype"), "declarative" :named("subtype"), $P2355 :named("node"))
$P2357 = $P2352."!make"($P2356)
-.annotate 'line', 856
.return ($P2357)
control_2345:
.local pmc exception
@@ -27386,16 +26200,15 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "metachar:sym<{ }>" :subid("135_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "metachar:sym<{ }>" :subid("135_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2362
-.annotate 'line', 862
+.annotate 'line', 0
new $P2361, 'ExceptionHandler'
set_addr $P2361, control_2360
$P2361."handle_types"(.CONTROL_RETURN)
push_eh $P2361
.lex "self", self
.lex "$/", param_2362
-.annotate 'line', 863
find_lex $P2363, "$/"
get_hll_global $P2364, ["PAST"], "Regex"
find_lex $P2365, "$/"
@@ -27410,7 +26223,6 @@
find_lex $P2368, "$/"
$P2369 = $P2364."new"($P2367, "pastnode" :named("pasttype"), $P2368 :named("node"))
$P2370 = $P2363."!make"($P2369)
-.annotate 'line', 862
.return ($P2370)
control_2360:
.local pmc exception
@@ -27422,16 +26234,15 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "metachar:sym<nqpvar>" :subid("136_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "metachar:sym<nqpvar>" :subid("136_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2375
-.annotate 'line', 867
+.annotate 'line', 0
new $P2374, 'ExceptionHandler'
set_addr $P2374, control_2373
$P2374."handle_types"(.CONTROL_RETURN)
push_eh $P2374
.lex "self", self
.lex "$/", param_2375
-.annotate 'line', 868
find_lex $P2376, "$/"
get_hll_global $P2377, ["PAST"], "Regex"
find_lex $P2378, "$/"
@@ -27446,7 +26257,6 @@
find_lex $P2381, "$/"
$P2382 = $P2377."new"("!INTERPOLATE", $P2380, "subrule" :named("pasttype"), "method" :named("subtype"), $P2381 :named("node"))
$P2383 = $P2376."!make"($P2382)
-.annotate 'line', 867
.return ($P2383)
control_2373:
.local pmc exception
@@ -27458,16 +26268,15 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "assertion:sym<{ }>" :subid("137_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "assertion:sym<{ }>" :subid("137_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2388
-.annotate 'line', 872
+.annotate 'line', 0
new $P2387, 'ExceptionHandler'
set_addr $P2387, control_2386
$P2387."handle_types"(.CONTROL_RETURN)
push_eh $P2387
.lex "self", self
.lex "$/", param_2388
-.annotate 'line', 873
find_lex $P2389, "$/"
get_hll_global $P2390, ["PAST"], "Regex"
find_lex $P2391, "$/"
@@ -27482,7 +26291,6 @@
find_lex $P2394, "$/"
$P2395 = $P2390."new"("!INTERPOLATE_REGEX", $P2393, "subrule" :named("pasttype"), "method" :named("subtype"), $P2394 :named("node"))
$P2396 = $P2389."!make"($P2395)
-.annotate 'line', 872
.return ($P2396)
control_2386:
.local pmc exception
@@ -27494,16 +26302,15 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "assertion:sym<?{ }>" :subid("138_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "assertion:sym<?{ }>" :subid("138_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2401
-.annotate 'line', 877
+.annotate 'line', 0
new $P2400, 'ExceptionHandler'
set_addr $P2400, control_2399
$P2400."handle_types"(.CONTROL_RETURN)
push_eh $P2400
.lex "self", self
.lex "$/", param_2401
-.annotate 'line', 878
find_lex $P2402, "$/"
get_hll_global $P2403, ["PAST"], "Regex"
find_lex $P2404, "$/"
@@ -27515,7 +26322,6 @@
new $P2405, "Undef"
vivify_665:
$P2406 = $P2405."ast"()
-.annotate 'line', 879
find_lex $P2407, "$/"
unless_null $P2407, vivify_666
$P2407 = root_new ['parrot';'Hash']
@@ -27528,9 +26334,7 @@
iseq $I2410, $S2409, "!"
find_lex $P2411, "$/"
$P2412 = $P2403."new"($P2406, "zerowidth" :named("subtype"), $I2410 :named("negate"), "pastnode" :named("pasttype"), $P2411 :named("node"))
-.annotate 'line', 878
$P2413 = $P2402."!make"($P2412)
-.annotate 'line', 877
.return ($P2413)
control_2399:
.local pmc exception
@@ -27542,16 +26346,15 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "assertion:sym<var>" :subid("139_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "assertion:sym<var>" :subid("139_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2418
-.annotate 'line', 883
+.annotate 'line', 0
new $P2417, 'ExceptionHandler'
set_addr $P2417, control_2416
$P2417."handle_types"(.CONTROL_RETURN)
push_eh $P2417
.lex "self", self
.lex "$/", param_2418
-.annotate 'line', 884
find_lex $P2419, "$/"
get_hll_global $P2420, ["PAST"], "Regex"
find_lex $P2421, "$/"
@@ -27566,7 +26369,6 @@
find_lex $P2424, "$/"
$P2425 = $P2420."new"("!INTERPOLATE_REGEX", $P2423, "subrule" :named("pasttype"), "method" :named("subtype"), $P2424 :named("node"))
$P2426 = $P2419."!make"($P2425)
-.annotate 'line', 883
.return ($P2426)
control_2416:
.local pmc exception
@@ -27578,22 +26380,19 @@
.namespace ["NQP";"RegexActions"]
.include "except_types.pasm"
-.sub "codeblock" :subid("140_1283368216.90714") :method :outer("133_1283368216.90714")
+.sub "codeblock" :subid("140_1283975952.27658") :method :outer("133_1283975952.27658")
.param pmc param_2431
-.annotate 'line', 888
+.annotate 'line', 0
new $P2430, 'ExceptionHandler'
set_addr $P2430, control_2429
$P2430."handle_types"(.CONTROL_RETURN)
push_eh $P2430
.lex "self", self
.lex "$/", param_2431
-.annotate 'line', 889
new $P2432, "Undef"
.lex "$block", $P2432
-.annotate 'line', 891
new $P2433, "Undef"
.lex "$past", $P2433
-.annotate 'line', 889
find_lex $P2434, "$/"
unless_null $P2434, vivify_670
$P2434 = root_new ['parrot';'Hash']
@@ -27604,34 +26403,23 @@
vivify_671:
$P2436 = $P2435."ast"()
store_lex "$block", $P2436
-.annotate 'line', 890
find_lex $P2437, "$block"
$P2437."blocktype"("immediate")
-.annotate 'line', 892
get_hll_global $P2438, ["PAST"], "Stmts"
-.annotate 'line', 893
get_hll_global $P2439, ["PAST"], "Op"
-.annotate 'line', 894
get_hll_global $P2440, ["PAST"], "Var"
$P2441 = $P2440."new"("$/" :named("name"))
-.annotate 'line', 895
get_hll_global $P2442, ["PAST"], "Op"
-.annotate 'line', 896
get_hll_global $P2443, ["PAST"], "Var"
$P2444 = $P2443."new"(unicode:"$\x{a2}" :named("name"))
$P2445 = $P2442."new"($P2444, "MATCH" :named("name"), "callmethod" :named("pasttype"))
-.annotate 'line', 895
$P2446 = $P2439."new"($P2441, $P2445, "bind" :named("pasttype"))
-.annotate 'line', 893
find_lex $P2447, "$block"
$P2448 = $P2438."new"($P2446, $P2447)
-.annotate 'line', 892
store_lex "$past", $P2448
-.annotate 'line', 904
find_lex $P2449, "$/"
find_lex $P2450, "$past"
$P2451 = $P2449."!make"($P2450)
-.annotate 'line', 888
.return ($P2451)
control_2429:
.local pmc exception
@@ -27642,18 +26430,18 @@
.namespace ["NQP";"Actions"]
-.sub "_block2455" :load :anon :subid("141_1283368216.90714")
-.annotate 'line', 3
- .const 'Sub' $P2457 = "11_1283368216.90714"
+.sub "_block2455" :load :anon :subid("141_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P2457 = "11_1283975952.27658"
$P2458 = $P2457()
.return ($P2458)
.end
.namespace []
-.sub "_block2465" :load :anon :subid("143_1283368216.90714")
-.annotate 'line', 1
- .const 'Sub' $P2467 = "10_1283368216.90714"
+.sub "_block2465" :load :anon :subid("143_1283975952.27658")
+.annotate 'line', 0
+ .const 'Sub' $P2467 = "10_1283975952.27658"
$P2468 = $P2467()
.return ($P2468)
.end
Modified: branches/gc_massacre/ext/nqp-rx/src/stage0/P6Regex-s0.pir
==============================================================================
--- branches/gc_massacre/ext/nqp-rx/src/stage0/P6Regex-s0.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/ext/nqp-rx/src/stage0/P6Regex-s0.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,169 +16,170 @@
### .include 'gen/p6regex-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368197.39621")
+.sub "_block11" :anon :subid("10_1283975941.34404")
.annotate 'line', 0
get_hll_global $P14, ["Regex";"P6Regex";"Grammar"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 3
get_hll_global $P14, ["Regex";"P6Regex";"Grammar"], "_block13"
capture_lex $P14
- $P581 = $P14()
-.annotate 'line', 1
- .return ($P581)
- .const 'Sub' $P583 = "163_1283368197.39621"
- .return ($P583)
+ $P597 = $P14()
+ .return ($P597)
+ .const 'Sub' $P599 = "168_1283975941.34404"
+ .return ($P599)
.end
.namespace []
-.sub "" :load :init :subid("post164") :outer("10_1283368197.39621")
+.sub "" :load :init :subid("post169") :outer("10_1283975941.34404")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368197.39621"
+ .const 'Sub' $P12 = "10_1283975941.34404"
.local pmc block
set block, $P12
- $P586 = get_root_global ["parrot"], "P6metaclass"
- $P586."new_class"("Regex::P6Regex::Grammar", "HLL::Grammar" :named("parent"))
+ $P602 = get_root_global ["parrot"], "P6metaclass"
+ $P602."new_class"("Regex::P6Regex::Grammar", "HLL::Grammar" :named("parent"))
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block13" :subid("11_1283368197.39621") :outer("10_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P570 = "160_1283368197.39621"
- capture_lex $P570
- .const 'Sub' $P563 = "158_1283368197.39621"
- capture_lex $P563
- .const 'Sub' $P556 = "156_1283368197.39621"
- capture_lex $P556
- .const 'Sub' $P536 = "151_1283368197.39621"
- capture_lex $P536
- .const 'Sub' $P502 = "145_1283368197.39621"
- capture_lex $P502
- .const 'Sub' $P490 = "142_1283368197.39621"
- capture_lex $P490
- .const 'Sub' $P478 = "139_1283368197.39621"
- capture_lex $P478
- .const 'Sub' $P472 = "137_1283368197.39621"
- capture_lex $P472
- .const 'Sub' $P461 = "134_1283368197.39621"
- capture_lex $P461
- .const 'Sub' $P450 = "131_1283368197.39621"
- capture_lex $P450
- .const 'Sub' $P441 = "127_1283368197.39621"
+.sub "_block13" :subid("11_1283975941.34404") :outer("10_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P586 = "165_1283975941.34404"
+ capture_lex $P586
+ .const 'Sub' $P579 = "163_1283975941.34404"
+ capture_lex $P579
+ .const 'Sub' $P572 = "161_1283975941.34404"
+ capture_lex $P572
+ .const 'Sub' $P552 = "156_1283975941.34404"
+ capture_lex $P552
+ .const 'Sub' $P518 = "150_1283975941.34404"
+ capture_lex $P518
+ .const 'Sub' $P506 = "147_1283975941.34404"
+ capture_lex $P506
+ .const 'Sub' $P494 = "144_1283975941.34404"
+ capture_lex $P494
+ .const 'Sub' $P488 = "142_1283975941.34404"
+ capture_lex $P488
+ .const 'Sub' $P477 = "139_1283975941.34404"
+ capture_lex $P477
+ .const 'Sub' $P466 = "136_1283975941.34404"
+ capture_lex $P466
+ .const 'Sub' $P457 = "132_1283975941.34404"
+ capture_lex $P457
+ .const 'Sub' $P447 = "129_1283975941.34404"
+ capture_lex $P447
+ .const 'Sub' $P441 = "127_1283975941.34404"
capture_lex $P441
- .const 'Sub' $P435 = "125_1283368197.39621"
+ .const 'Sub' $P435 = "125_1283975941.34404"
capture_lex $P435
- .const 'Sub' $P429 = "123_1283368197.39621"
+ .const 'Sub' $P429 = "123_1283975941.34404"
capture_lex $P429
- .const 'Sub' $P423 = "121_1283368197.39621"
+ .const 'Sub' $P423 = "121_1283975941.34404"
capture_lex $P423
- .const 'Sub' $P417 = "119_1283368197.39621"
- capture_lex $P417
- .const 'Sub' $P409 = "117_1283368197.39621"
- capture_lex $P409
- .const 'Sub' $P398 = "115_1283368197.39621"
- capture_lex $P398
- .const 'Sub' $P387 = "113_1283368197.39621"
+ .const 'Sub' $P415 = "119_1283975941.34404"
+ capture_lex $P415
+ .const 'Sub' $P404 = "117_1283975941.34404"
+ capture_lex $P404
+ .const 'Sub' $P393 = "115_1283975941.34404"
+ capture_lex $P393
+ .const 'Sub' $P387 = "113_1283975941.34404"
capture_lex $P387
- .const 'Sub' $P381 = "111_1283368197.39621"
+ .const 'Sub' $P381 = "111_1283975941.34404"
capture_lex $P381
- .const 'Sub' $P375 = "109_1283368197.39621"
+ .const 'Sub' $P375 = "109_1283975941.34404"
capture_lex $P375
- .const 'Sub' $P369 = "107_1283368197.39621"
+ .const 'Sub' $P369 = "107_1283975941.34404"
capture_lex $P369
- .const 'Sub' $P363 = "105_1283368197.39621"
+ .const 'Sub' $P363 = "105_1283975941.34404"
capture_lex $P363
- .const 'Sub' $P357 = "103_1283368197.39621"
+ .const 'Sub' $P357 = "103_1283975941.34404"
capture_lex $P357
- .const 'Sub' $P351 = "101_1283368197.39621"
+ .const 'Sub' $P351 = "101_1283975941.34404"
capture_lex $P351
- .const 'Sub' $P345 = "99_1283368197.39621"
+ .const 'Sub' $P345 = "99_1283975941.34404"
capture_lex $P345
- .const 'Sub' $P339 = "97_1283368197.39621"
- capture_lex $P339
- .const 'Sub' $P327 = "93_1283368197.39621"
- capture_lex $P327
- .const 'Sub' $P317 = "91_1283368197.39621"
- capture_lex $P317
- .const 'Sub' $P310 = "89_1283368197.39621"
- capture_lex $P310
- .const 'Sub' $P298 = "87_1283368197.39621"
- capture_lex $P298
- .const 'Sub' $P291 = "85_1283368197.39621"
+ .const 'Sub' $P333 = "95_1283975941.34404"
+ capture_lex $P333
+ .const 'Sub' $P323 = "93_1283975941.34404"
+ capture_lex $P323
+ .const 'Sub' $P316 = "91_1283975941.34404"
+ capture_lex $P316
+ .const 'Sub' $P304 = "89_1283975941.34404"
+ capture_lex $P304
+ .const 'Sub' $P297 = "87_1283975941.34404"
+ capture_lex $P297
+ .const 'Sub' $P291 = "85_1283975941.34404"
capture_lex $P291
- .const 'Sub' $P285 = "83_1283368197.39621"
+ .const 'Sub' $P285 = "83_1283975941.34404"
capture_lex $P285
- .const 'Sub' $P279 = "81_1283368197.39621"
+ .const 'Sub' $P279 = "81_1283975941.34404"
capture_lex $P279
- .const 'Sub' $P272 = "79_1283368197.39621"
+ .const 'Sub' $P272 = "79_1283975941.34404"
capture_lex $P272
- .const 'Sub' $P265 = "77_1283368197.39621"
+ .const 'Sub' $P265 = "77_1283975941.34404"
capture_lex $P265
- .const 'Sub' $P258 = "75_1283368197.39621"
+ .const 'Sub' $P258 = "75_1283975941.34404"
capture_lex $P258
- .const 'Sub' $P251 = "73_1283368197.39621"
+ .const 'Sub' $P251 = "73_1283975941.34404"
capture_lex $P251
- .const 'Sub' $P245 = "71_1283368197.39621"
+ .const 'Sub' $P245 = "71_1283975941.34404"
capture_lex $P245
- .const 'Sub' $P239 = "69_1283368197.39621"
+ .const 'Sub' $P239 = "69_1283975941.34404"
capture_lex $P239
- .const 'Sub' $P233 = "67_1283368197.39621"
+ .const 'Sub' $P233 = "67_1283975941.34404"
capture_lex $P233
- .const 'Sub' $P227 = "65_1283368197.39621"
+ .const 'Sub' $P227 = "65_1283975941.34404"
capture_lex $P227
- .const 'Sub' $P221 = "63_1283368197.39621"
+ .const 'Sub' $P221 = "63_1283975941.34404"
capture_lex $P221
- .const 'Sub' $P216 = "61_1283368197.39621"
+ .const 'Sub' $P216 = "61_1283975941.34404"
capture_lex $P216
- .const 'Sub' $P211 = "59_1283368197.39621"
+ .const 'Sub' $P211 = "59_1283975941.34404"
capture_lex $P211
- .const 'Sub' $P205 = "57_1283368197.39621"
+ .const 'Sub' $P205 = "57_1283975941.34404"
capture_lex $P205
- .const 'Sub' $P199 = "55_1283368197.39621"
+ .const 'Sub' $P199 = "55_1283975941.34404"
capture_lex $P199
- .const 'Sub' $P193 = "53_1283368197.39621"
+ .const 'Sub' $P193 = "53_1283975941.34404"
capture_lex $P193
- .const 'Sub' $P178 = "48_1283368197.39621"
+ .const 'Sub' $P178 = "48_1283975941.34404"
capture_lex $P178
- .const 'Sub' $P163 = "46_1283368197.39621"
+ .const 'Sub' $P163 = "46_1283975941.34404"
capture_lex $P163
- .const 'Sub' $P156 = "44_1283368197.39621"
+ .const 'Sub' $P156 = "44_1283975941.34404"
capture_lex $P156
- .const 'Sub' $P149 = "42_1283368197.39621"
+ .const 'Sub' $P149 = "42_1283975941.34404"
capture_lex $P149
- .const 'Sub' $P142 = "40_1283368197.39621"
+ .const 'Sub' $P142 = "40_1283975941.34404"
capture_lex $P142
- .const 'Sub' $P125 = "35_1283368197.39621"
+ .const 'Sub' $P125 = "35_1283975941.34404"
capture_lex $P125
- .const 'Sub' $P113 = "32_1283368197.39621"
+ .const 'Sub' $P113 = "32_1283975941.34404"
capture_lex $P113
- .const 'Sub' $P106 = "30_1283368197.39621"
+ .const 'Sub' $P106 = "30_1283975941.34404"
capture_lex $P106
- .const 'Sub' $P97 = "28_1283368197.39621"
+ .const 'Sub' $P97 = "28_1283975941.34404"
capture_lex $P97
- .const 'Sub' $P87 = "26_1283368197.39621"
+ .const 'Sub' $P87 = "26_1283975941.34404"
capture_lex $P87
- .const 'Sub' $P80 = "24_1283368197.39621"
+ .const 'Sub' $P80 = "24_1283975941.34404"
capture_lex $P80
- .const 'Sub' $P68 = "22_1283368197.39621"
+ .const 'Sub' $P68 = "22_1283975941.34404"
capture_lex $P68
- .const 'Sub' $P61 = "20_1283368197.39621"
+ .const 'Sub' $P61 = "20_1283975941.34404"
capture_lex $P61
- .const 'Sub' $P54 = "18_1283368197.39621"
+ .const 'Sub' $P54 = "18_1283975941.34404"
capture_lex $P54
- .const 'Sub' $P44 = "15_1283368197.39621"
+ .const 'Sub' $P44 = "15_1283975941.34404"
capture_lex $P44
- .const 'Sub' $P37 = "13_1283368197.39621"
+ .const 'Sub' $P37 = "13_1283975941.34404"
capture_lex $P37
- .const 'Sub' $P15 = "12_1283368197.39621"
+ .const 'Sub' $P15 = "12_1283975941.34404"
capture_lex $P15
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
@@ -186,22 +187,22 @@
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
- .const 'Sub' $P570 = "160_1283368197.39621"
- capture_lex $P570
- .return ($P570)
- .const 'Sub' $P578 = "162_1283368197.39621"
- .return ($P578)
+ .const 'Sub' $P586 = "165_1283975941.34404"
+ capture_lex $P586
+ .return ($P586)
+ .const 'Sub' $P594 = "167_1283975941.34404"
+ .return ($P594)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
.include "except_types.pasm"
-.sub "obs" :subid("12_1283368197.39621") :method :outer("11_1283368197.39621")
+.sub "obs" :subid("12_1283975941.34404") :method :outer("11_1283975941.34404")
.param pmc param_18
.param pmc param_19
.param pmc param_20 :optional
.param int has_param_20 :opt_flag
-.annotate 'line', 3
+.annotate 'line', 0
new $P17, 'ExceptionHandler'
set_addr $P17, control_16
$P17."handle_types"(.CONTROL_RETURN)
@@ -209,13 +210,12 @@
.lex "self", self
.lex "$old", param_18
.lex "$new", param_19
- if has_param_20, optparam_165
+ if has_param_20, optparam_170
new $P21, "String"
assign $P21, "in Perl 6"
set param_20, $P21
- optparam_165:
+ optparam_170:
.lex "$when", param_20
-.annotate 'line', 4
find_lex $P22, "self"
new $P23, "String"
assign $P23, "Unsupported use of "
@@ -223,7 +223,6 @@
set $S25, $P24
concat $P26, $P23, $S25
concat $P27, $P26, ";"
-.annotate 'line', 5
find_lex $P28, "$when"
set $S29, $P28
concat $P30, $P27, $S29
@@ -232,7 +231,6 @@
set $S33, $P32
concat $P34, $P31, $S33
$P35 = $P22."panic"($P34)
-.annotate 'line', 3
.return ($P35)
control_16:
.local pmc exception
@@ -243,8 +241,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "ws" :subid("13_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "ws" :subid("13_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx38_tgt
.local int rx38_pos
.local int rx38_off
@@ -265,9 +263,9 @@
substr rx38_tgt, rx38_tgt, rx38_off
rx38_start:
eq $I10, 1, rx38_restart
- if_null rx38_debug, debug_166
+ if_null rx38_debug, debug_171
rx38_cur."!cursor_debug"("START", "ws")
- debug_166:
+ debug_171:
$I10 = self.'from'()
ne $I10, -1, rxscan41_done
goto rxscan41_scan
@@ -280,7 +278,6 @@
set_addr $I10, rxscan41_loop
rx38_cur."!mark_push"(0, rx38_pos, $I10)
rxscan41_done:
-.annotate 'line', 8
# rx rxquantr42 ** 0..*
set_addr $I10, rxquantr42_done
rx38_cur."!mark_push"(0, rx38_pos, $I10)
@@ -316,15 +313,14 @@
rxquantr42_done:
# rx pass
rx38_cur."!cursor_pass"(rx38_pos, "ws")
- if_null rx38_debug, debug_167
+ if_null rx38_debug, debug_172
rx38_cur."!cursor_debug"("PASS", "ws", " at pos=", rx38_pos)
- debug_167:
+ debug_172:
.return (rx38_cur)
rx38_restart:
-.annotate 'line', 3
- if_null rx38_debug, debug_168
+ if_null rx38_debug, debug_173
rx38_cur."!cursor_debug"("NEXT", "ws")
- debug_168:
+ debug_173:
rx38_fail:
(rx38_rep, rx38_pos, $I10, $P10) = rx38_cur."!mark_fail"(0)
lt rx38_pos, -1, rx38_done
@@ -332,17 +328,17 @@
jump $I10
rx38_done:
rx38_cur."!cursor_fail"()
- if_null rx38_debug, debug_169
+ if_null rx38_debug, debug_174
rx38_cur."!cursor_debug"("FAIL", "ws")
- debug_169:
+ debug_174:
.return (rx38_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__ws" :subid("14_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__ws" :subid("14_1283975941.34404") :method
+.annotate 'line', 0
new $P40, "ResizablePMCArray"
push $P40, ""
.return ($P40)
@@ -350,9 +346,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "normspace" :subid("15_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P50 = "17_1283368197.39621"
+.sub "normspace" :subid("15_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P50 = "17_1283975941.34404"
capture_lex $P50
.local string rx45_tgt
.local int rx45_pos
@@ -374,9 +370,9 @@
substr rx45_tgt, rx45_tgt, rx45_off
rx45_start:
eq $I10, 1, rx45_restart
- if_null rx45_debug, debug_170
+ if_null rx45_debug, debug_175
rx45_cur."!cursor_debug"("START", "normspace")
- debug_170:
+ debug_175:
$I10 = self.'from'()
ne $I10, -1, rxscan48_done
goto rxscan48_scan
@@ -389,10 +385,9 @@
set_addr $I10, rxscan48_loop
rx45_cur."!mark_push"(0, rx45_pos, $I10)
rxscan48_done:
-.annotate 'line', 10
# rx subrule "before" subtype=zerowidth negate=
rx45_cur."!cursor_pos"(rx45_pos)
- .const 'Sub' $P50 = "17_1283368197.39621"
+ .const 'Sub' $P50 = "17_1283975941.34404"
capture_lex $P50
$P10 = rx45_cur."before"($P50)
unless $P10, rx45_fail
@@ -403,15 +398,14 @@
rx45_pos = $P10."pos"()
# rx pass
rx45_cur."!cursor_pass"(rx45_pos, "normspace")
- if_null rx45_debug, debug_175
+ if_null rx45_debug, debug_180
rx45_cur."!cursor_debug"("PASS", "normspace", " at pos=", rx45_pos)
- debug_175:
+ debug_180:
.return (rx45_cur)
rx45_restart:
-.annotate 'line', 3
- if_null rx45_debug, debug_176
+ if_null rx45_debug, debug_181
rx45_cur."!cursor_debug"("NEXT", "normspace")
- debug_176:
+ debug_181:
rx45_fail:
(rx45_rep, rx45_pos, $I10, $P10) = rx45_cur."!mark_fail"(0)
lt rx45_pos, -1, rx45_done
@@ -419,17 +413,17 @@
jump $I10
rx45_done:
rx45_cur."!cursor_fail"()
- if_null rx45_debug, debug_177
+ if_null rx45_debug, debug_182
rx45_cur."!cursor_debug"("FAIL", "normspace")
- debug_177:
+ debug_182:
.return (rx45_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__normspace" :subid("16_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__normspace" :subid("16_1283975941.34404") :method
+.annotate 'line', 0
new $P47, "ResizablePMCArray"
push $P47, ""
.return ($P47)
@@ -437,8 +431,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block49" :anon :subid("17_1283368197.39621") :method :outer("15_1283368197.39621")
-.annotate 'line', 10
+.sub "_block49" :anon :subid("17_1283975941.34404") :method :outer("15_1283975941.34404")
+.annotate 'line', 0
.local string rx51_tgt
.local int rx51_pos
.local int rx51_off
@@ -459,9 +453,9 @@
substr rx51_tgt, rx51_tgt, rx51_off
rx51_start:
eq $I10, 1, rx51_restart
- if_null rx51_debug, debug_171
+ if_null rx51_debug, debug_176
rx51_cur."!cursor_debug"("START", "")
- debug_171:
+ debug_176:
$I10 = self.'from'()
ne $I10, -1, rxscan52_done
goto rxscan52_scan
@@ -495,14 +489,14 @@
alt53_end:
# rx pass
rx51_cur."!cursor_pass"(rx51_pos, "")
- if_null rx51_debug, debug_172
+ if_null rx51_debug, debug_177
rx51_cur."!cursor_debug"("PASS", "", " at pos=", rx51_pos)
- debug_172:
+ debug_177:
.return (rx51_cur)
rx51_restart:
- if_null rx51_debug, debug_173
+ if_null rx51_debug, debug_178
rx51_cur."!cursor_debug"("NEXT", "")
- debug_173:
+ debug_178:
rx51_fail:
(rx51_rep, rx51_pos, $I10, $P10) = rx51_cur."!mark_fail"(0)
lt rx51_pos, -1, rx51_done
@@ -510,17 +504,17 @@
jump $I10
rx51_done:
rx51_cur."!cursor_fail"()
- if_null rx51_debug, debug_174
+ if_null rx51_debug, debug_179
rx51_cur."!cursor_debug"("FAIL", "")
- debug_174:
+ debug_179:
.return (rx51_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "identifier" :subid("18_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "identifier" :subid("18_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx55_tgt
.local int rx55_pos
.local int rx55_off
@@ -541,9 +535,9 @@
substr rx55_tgt, rx55_tgt, rx55_off
rx55_start:
eq $I10, 1, rx55_restart
- if_null rx55_debug, debug_178
+ if_null rx55_debug, debug_183
rx55_cur."!cursor_debug"("START", "identifier")
- debug_178:
+ debug_183:
$I10 = self.'from'()
ne $I10, -1, rxscan59_done
goto rxscan59_scan
@@ -556,7 +550,6 @@
set_addr $I10, rxscan59_loop
rx55_cur."!mark_push"(0, rx55_pos, $I10)
rxscan59_done:
-.annotate 'line', 12
# rx subrule "ident" subtype=method negate=
rx55_cur."!cursor_pos"(rx55_pos)
$P10 = rx55_cur."ident"()
@@ -586,15 +579,14 @@
rxquantr60_done:
# rx pass
rx55_cur."!cursor_pass"(rx55_pos, "identifier")
- if_null rx55_debug, debug_179
+ if_null rx55_debug, debug_184
rx55_cur."!cursor_debug"("PASS", "identifier", " at pos=", rx55_pos)
- debug_179:
+ debug_184:
.return (rx55_cur)
rx55_restart:
-.annotate 'line', 3
- if_null rx55_debug, debug_180
+ if_null rx55_debug, debug_185
rx55_cur."!cursor_debug"("NEXT", "identifier")
- debug_180:
+ debug_185:
rx55_fail:
(rx55_rep, rx55_pos, $I10, $P10) = rx55_cur."!mark_fail"(0)
lt rx55_pos, -1, rx55_done
@@ -602,17 +594,17 @@
jump $I10
rx55_done:
rx55_cur."!cursor_fail"()
- if_null rx55_debug, debug_181
+ if_null rx55_debug, debug_186
rx55_cur."!cursor_debug"("FAIL", "identifier")
- debug_181:
+ debug_186:
.return (rx55_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__identifier" :subid("19_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__identifier" :subid("19_1283975941.34404") :method
+.annotate 'line', 0
$P57 = self."!PREFIX__!subrule"("ident", "")
new $P58, "ResizablePMCArray"
push $P58, $P57
@@ -621,8 +613,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "arg" :subid("20_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "arg" :subid("20_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx62_tgt
.local int rx62_pos
.local int rx62_off
@@ -643,9 +635,9 @@
substr rx62_tgt, rx62_tgt, rx62_off
rx62_start:
eq $I10, 1, rx62_restart
- if_null rx62_debug, debug_182
+ if_null rx62_debug, debug_187
rx62_cur."!cursor_debug"("START", "arg")
- debug_182:
+ debug_187:
$I10 = self.'from'()
ne $I10, -1, rxscan65_done
goto rxscan65_scan
@@ -659,10 +651,8 @@
rx62_cur."!mark_push"(0, rx62_pos, $I10)
rxscan65_done:
alt66_0:
-.annotate 'line', 15
set_addr $I10, alt66_1
rx62_cur."!mark_push"(0, rx62_pos, $I10)
-.annotate 'line', 16
# rx enumcharlist negate=0 zerowidth
ge rx62_pos, rx62_eos, rx62_fail
sub $I10, rx62_pos, rx62_off
@@ -680,7 +670,6 @@
alt66_1:
set_addr $I10, alt66_2
rx62_cur."!mark_push"(0, rx62_pos, $I10)
-.annotate 'line', 17
# rx enumcharlist negate=0 zerowidth
ge rx62_pos, rx62_eos, rx62_fail
sub $I10, rx62_pos, rx62_off
@@ -696,7 +685,6 @@
rx62_pos = $P10."pos"()
goto alt66_end
alt66_2:
-.annotate 'line', 18
# rx subcapture "val"
set_addr $I10, rxcap_67_fail
rx62_cur."!mark_push"(0, rx62_pos, $I10)
@@ -718,18 +706,16 @@
goto rx62_fail
rxcap_67_done:
alt66_end:
-.annotate 'line', 14
# rx pass
rx62_cur."!cursor_pass"(rx62_pos, "arg")
- if_null rx62_debug, debug_183
+ if_null rx62_debug, debug_188
rx62_cur."!cursor_debug"("PASS", "arg", " at pos=", rx62_pos)
- debug_183:
+ debug_188:
.return (rx62_cur)
rx62_restart:
-.annotate 'line', 3
- if_null rx62_debug, debug_184
+ if_null rx62_debug, debug_189
rx62_cur."!cursor_debug"("NEXT", "arg")
- debug_184:
+ debug_189:
rx62_fail:
(rx62_rep, rx62_pos, $I10, $P10) = rx62_cur."!mark_fail"(0)
lt rx62_pos, -1, rx62_done
@@ -737,17 +723,17 @@
jump $I10
rx62_done:
rx62_cur."!cursor_fail"()
- if_null rx62_debug, debug_185
+ if_null rx62_debug, debug_190
rx62_cur."!cursor_debug"("FAIL", "arg")
- debug_185:
+ debug_190:
.return (rx62_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__arg" :subid("21_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__arg" :subid("21_1283975941.34404") :method
+.annotate 'line', 0
new $P64, "ResizablePMCArray"
push $P64, ""
push $P64, "\""
@@ -757,8 +743,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "arglist" :subid("22_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "arglist" :subid("22_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx69_tgt
.local int rx69_pos
.local int rx69_off
@@ -780,9 +766,9 @@
substr rx69_tgt, rx69_tgt, rx69_off
rx69_start:
eq $I10, 1, rx69_restart
- if_null rx69_debug, debug_186
+ if_null rx69_debug, debug_191
rx69_cur."!cursor_debug"("START", "arglist")
- debug_186:
+ debug_191:
$I10 = self.'from'()
ne $I10, -1, rxscan73_done
goto rxscan73_scan
@@ -795,7 +781,6 @@
set_addr $I10, rxscan73_loop
rx69_cur."!mark_push"(0, rx69_pos, $I10)
rxscan73_done:
-.annotate 'line', 22
# rx subrule "ws" subtype=method negate=
rx69_cur."!cursor_pos"(rx69_pos)
$P10 = rx69_cur."ws"()
@@ -854,15 +839,14 @@
rx69_pos = $P10."pos"()
# rx pass
rx69_cur."!cursor_pass"(rx69_pos, "arglist")
- if_null rx69_debug, debug_187
+ if_null rx69_debug, debug_192
rx69_cur."!cursor_debug"("PASS", "arglist", " at pos=", rx69_pos)
- debug_187:
+ debug_192:
.return (rx69_cur)
rx69_restart:
-.annotate 'line', 3
- if_null rx69_debug, debug_188
+ if_null rx69_debug, debug_193
rx69_cur."!cursor_debug"("NEXT", "arglist")
- debug_188:
+ debug_193:
rx69_fail:
(rx69_rep, rx69_pos, $I10, $P10) = rx69_cur."!mark_fail"(0)
lt rx69_pos, -1, rx69_done
@@ -870,17 +854,17 @@
jump $I10
rx69_done:
rx69_cur."!cursor_fail"()
- if_null rx69_debug, debug_189
+ if_null rx69_debug, debug_194
rx69_cur."!cursor_debug"("FAIL", "arglist")
- debug_189:
+ debug_194:
.return (rx69_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__arglist" :subid("23_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__arglist" :subid("23_1283975941.34404") :method
+.annotate 'line', 0
$P71 = self."!PREFIX__!subrule"("ws", "")
new $P72, "ResizablePMCArray"
push $P72, $P71
@@ -889,8 +873,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "TOP" :subid("24_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "TOP" :subid("24_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx81_tgt
.local int rx81_pos
.local int rx81_off
@@ -911,9 +895,9 @@
substr rx81_tgt, rx81_tgt, rx81_off
rx81_start:
eq $I10, 1, rx81_restart
- if_null rx81_debug, debug_190
+ if_null rx81_debug, debug_195
rx81_cur."!cursor_debug"("START", "TOP")
- debug_190:
+ debug_195:
$I10 = self.'from'()
ne $I10, -1, rxscan85_done
goto rxscan85_scan
@@ -926,7 +910,6 @@
set_addr $I10, rxscan85_loop
rx81_cur."!mark_push"(0, rx81_pos, $I10)
rxscan85_done:
-.annotate 'line', 25
# rx subrule "nibbler" subtype=capture negate=
rx81_cur."!cursor_pos"(rx81_pos)
$P10 = rx81_cur."nibbler"()
@@ -935,7 +918,6 @@
$P10."!cursor_names"("nibbler")
rx81_pos = $P10."pos"()
alt86_0:
-.annotate 'line', 26
set_addr $I10, alt86_1
rx81_cur."!mark_push"(0, rx81_pos, $I10)
# rxanchor eos
@@ -948,18 +930,16 @@
unless $P10, rx81_fail
rx81_pos = $P10."pos"()
alt86_end:
-.annotate 'line', 24
# rx pass
rx81_cur."!cursor_pass"(rx81_pos, "TOP")
- if_null rx81_debug, debug_191
+ if_null rx81_debug, debug_196
rx81_cur."!cursor_debug"("PASS", "TOP", " at pos=", rx81_pos)
- debug_191:
+ debug_196:
.return (rx81_cur)
rx81_restart:
-.annotate 'line', 3
- if_null rx81_debug, debug_192
+ if_null rx81_debug, debug_197
rx81_cur."!cursor_debug"("NEXT", "TOP")
- debug_192:
+ debug_197:
rx81_fail:
(rx81_rep, rx81_pos, $I10, $P10) = rx81_cur."!mark_fail"(0)
lt rx81_pos, -1, rx81_done
@@ -967,17 +947,17 @@
jump $I10
rx81_done:
rx81_cur."!cursor_fail"()
- if_null rx81_debug, debug_193
+ if_null rx81_debug, debug_198
rx81_cur."!cursor_debug"("FAIL", "TOP")
- debug_193:
+ debug_198:
.return (rx81_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__TOP" :subid("25_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__TOP" :subid("25_1283975941.34404") :method
+.annotate 'line', 0
$P83 = self."!PREFIX__!subrule"("nibbler", "")
new $P84, "ResizablePMCArray"
push $P84, $P83
@@ -986,8 +966,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "nibbler" :subid("26_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "nibbler" :subid("26_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx88_tgt
.local int rx88_pos
.local int rx88_off
@@ -1009,9 +989,9 @@
substr rx88_tgt, rx88_tgt, rx88_off
rx88_start:
eq $I10, 1, rx88_restart
- if_null rx88_debug, debug_194
+ if_null rx88_debug, debug_199
rx88_cur."!cursor_debug"("START", "nibbler")
- debug_194:
+ debug_199:
$I10 = self.'from'()
ne $I10, -1, rxscan91_done
goto rxscan91_scan
@@ -1024,11 +1004,9 @@
set_addr $I10, rxscan91_loop
rx88_cur."!mark_push"(0, rx88_pos, $I10)
rxscan91_done:
-.annotate 'line', 30
# rx reduce name="nibbler" key="open"
rx88_cur."!cursor_pos"(rx88_pos)
rx88_cur."!reduce"("nibbler", "open")
-.annotate 'line', 31
# rx rxquantr92 ** 0..1
set_addr $I10, rxquantr92_done
rx88_cur."!mark_push"(0, rx88_pos, $I10)
@@ -1083,7 +1061,6 @@
set_addr $I10, rxquantr92_done
(rx88_rep) = rx88_cur."!mark_commit"($I10)
rxquantr92_done:
-.annotate 'line', 32
# rx subrule "termconj" subtype=capture negate=
rx88_cur."!cursor_pos"(rx88_pos)
$P10 = rx88_cur."termconj"()
@@ -1091,13 +1068,11 @@
rx88_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("termconj")
rx88_pos = $P10."pos"()
-.annotate 'line', 35
# rx rxquantr94 ** 0..*
set_addr $I10, rxquantr94_done
rx88_cur."!mark_push"(0, rx88_pos, $I10)
rxquantr94_loop:
alt95_0:
-.annotate 'line', 33
set_addr $I10, alt95_1
rx88_cur."!mark_push"(0, rx88_pos, $I10)
# rx literal "||"
@@ -1118,7 +1093,6 @@
add rx88_pos, 1
alt95_end:
alt96_0:
-.annotate 'line', 34
set_addr $I10, alt96_1
rx88_cur."!mark_push"(0, rx88_pos, $I10)
# rx subrule "termconj" subtype=capture negate=
@@ -1136,25 +1110,22 @@
unless $P10, rx88_fail
rx88_pos = $P10."pos"()
alt96_end:
-.annotate 'line', 35
set_addr $I10, rxquantr94_done
(rx88_rep) = rx88_cur."!mark_commit"($I10)
set_addr $I10, rxquantr94_done
rx88_cur."!mark_push"(rx88_rep, rx88_pos, $I10)
goto rxquantr94_loop
rxquantr94_done:
-.annotate 'line', 29
# rx pass
rx88_cur."!cursor_pass"(rx88_pos, "nibbler")
- if_null rx88_debug, debug_195
+ if_null rx88_debug, debug_200
rx88_cur."!cursor_debug"("PASS", "nibbler", " at pos=", rx88_pos)
- debug_195:
+ debug_200:
.return (rx88_cur)
rx88_restart:
-.annotate 'line', 3
- if_null rx88_debug, debug_196
+ if_null rx88_debug, debug_201
rx88_cur."!cursor_debug"("NEXT", "nibbler")
- debug_196:
+ debug_201:
rx88_fail:
(rx88_rep, rx88_pos, $I10, $P10) = rx88_cur."!mark_fail"(0)
lt rx88_pos, -1, rx88_done
@@ -1162,17 +1133,17 @@
jump $I10
rx88_done:
rx88_cur."!cursor_fail"()
- if_null rx88_debug, debug_197
+ if_null rx88_debug, debug_202
rx88_cur."!cursor_debug"("FAIL", "nibbler")
- debug_197:
+ debug_202:
.return (rx88_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__nibbler" :subid("27_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__nibbler" :subid("27_1283975941.34404") :method
+.annotate 'line', 0
new $P90, "ResizablePMCArray"
push $P90, ""
.return ($P90)
@@ -1180,8 +1151,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "termconj" :subid("28_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "termconj" :subid("28_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx98_tgt
.local int rx98_pos
.local int rx98_off
@@ -1203,9 +1174,9 @@
substr rx98_tgt, rx98_tgt, rx98_off
rx98_start:
eq $I10, 1, rx98_restart
- if_null rx98_debug, debug_198
+ if_null rx98_debug, debug_203
rx98_cur."!cursor_debug"("START", "termconj")
- debug_198:
+ debug_203:
$I10 = self.'from'()
ne $I10, -1, rxscan102_done
goto rxscan102_scan
@@ -1218,7 +1189,6 @@
set_addr $I10, rxscan102_loop
rx98_cur."!mark_push"(0, rx98_pos, $I10)
rxscan102_done:
-.annotate 'line', 39
# rx subrule "termish" subtype=capture negate=
rx98_cur."!cursor_pos"(rx98_pos)
$P10 = rx98_cur."termish"()
@@ -1226,13 +1196,11 @@
rx98_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("termish")
rx98_pos = $P10."pos"()
-.annotate 'line', 42
# rx rxquantr103 ** 0..*
set_addr $I10, rxquantr103_done
rx98_cur."!mark_push"(0, rx98_pos, $I10)
rxquantr103_loop:
alt104_0:
-.annotate 'line', 40
set_addr $I10, alt104_1
rx98_cur."!mark_push"(0, rx98_pos, $I10)
# rx literal "&&"
@@ -1253,7 +1221,6 @@
add rx98_pos, 1
alt104_end:
alt105_0:
-.annotate 'line', 41
set_addr $I10, alt105_1
rx98_cur."!mark_push"(0, rx98_pos, $I10)
# rx subrule "termish" subtype=capture negate=
@@ -1271,25 +1238,22 @@
unless $P10, rx98_fail
rx98_pos = $P10."pos"()
alt105_end:
-.annotate 'line', 42
set_addr $I10, rxquantr103_done
(rx98_rep) = rx98_cur."!mark_commit"($I10)
set_addr $I10, rxquantr103_done
rx98_cur."!mark_push"(rx98_rep, rx98_pos, $I10)
goto rxquantr103_loop
rxquantr103_done:
-.annotate 'line', 38
# rx pass
rx98_cur."!cursor_pass"(rx98_pos, "termconj")
- if_null rx98_debug, debug_199
+ if_null rx98_debug, debug_204
rx98_cur."!cursor_debug"("PASS", "termconj", " at pos=", rx98_pos)
- debug_199:
+ debug_204:
.return (rx98_cur)
rx98_restart:
-.annotate 'line', 3
- if_null rx98_debug, debug_200
+ if_null rx98_debug, debug_205
rx98_cur."!cursor_debug"("NEXT", "termconj")
- debug_200:
+ debug_205:
rx98_fail:
(rx98_rep, rx98_pos, $I10, $P10) = rx98_cur."!mark_fail"(0)
lt rx98_pos, -1, rx98_done
@@ -1297,17 +1261,17 @@
jump $I10
rx98_done:
rx98_cur."!cursor_fail"()
- if_null rx98_debug, debug_201
+ if_null rx98_debug, debug_206
rx98_cur."!cursor_debug"("FAIL", "termconj")
- debug_201:
+ debug_206:
.return (rx98_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__termconj" :subid("29_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__termconj" :subid("29_1283975941.34404") :method
+.annotate 'line', 0
$P100 = self."!PREFIX__!subrule"("termish", "")
new $P101, "ResizablePMCArray"
push $P101, $P100
@@ -1316,8 +1280,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "termish" :subid("30_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "termish" :subid("30_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx107_tgt
.local int rx107_pos
.local int rx107_off
@@ -1339,9 +1303,9 @@
substr rx107_tgt, rx107_tgt, rx107_off
rx107_start:
eq $I10, 1, rx107_restart
- if_null rx107_debug, debug_202
+ if_null rx107_debug, debug_207
rx107_cur."!cursor_debug"("START", "termish")
- debug_202:
+ debug_207:
$I10 = self.'from'()
ne $I10, -1, rxscan110_done
goto rxscan110_scan
@@ -1354,7 +1318,6 @@
set_addr $I10, rxscan110_loop
rx107_cur."!mark_push"(0, rx107_pos, $I10)
rxscan110_done:
-.annotate 'line', 46
# rx rxquantr111 ** 1..*
set_addr $I10, rxquantr111_done
rx107_cur."!mark_push"(0, -1, $I10)
@@ -1378,18 +1341,16 @@
rx107_cur."!mark_push"(rx107_rep, rx107_pos, $I10)
goto rxquantr111_loop
rxquantr111_done:
-.annotate 'line', 45
# rx pass
rx107_cur."!cursor_pass"(rx107_pos, "termish")
- if_null rx107_debug, debug_203
+ if_null rx107_debug, debug_208
rx107_cur."!cursor_debug"("PASS", "termish", " at pos=", rx107_pos)
- debug_203:
+ debug_208:
.return (rx107_cur)
rx107_restart:
-.annotate 'line', 3
- if_null rx107_debug, debug_204
+ if_null rx107_debug, debug_209
rx107_cur."!cursor_debug"("NEXT", "termish")
- debug_204:
+ debug_209:
rx107_fail:
(rx107_rep, rx107_pos, $I10, $P10) = rx107_cur."!mark_fail"(0)
lt rx107_pos, -1, rx107_done
@@ -1397,17 +1358,17 @@
jump $I10
rx107_done:
rx107_cur."!cursor_fail"()
- if_null rx107_debug, debug_205
+ if_null rx107_debug, debug_210
rx107_cur."!cursor_debug"("FAIL", "termish")
- debug_205:
+ debug_210:
.return (rx107_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__termish" :subid("31_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__termish" :subid("31_1283975941.34404") :method
+.annotate 'line', 0
new $P109, "ResizablePMCArray"
push $P109, ""
.return ($P109)
@@ -1415,9 +1376,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantified_atom" :subid("32_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P122 = "34_1283368197.39621"
+.sub "quantified_atom" :subid("32_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P122 = "34_1283975941.34404"
capture_lex $P122
.local string rx114_tgt
.local int rx114_pos
@@ -1440,9 +1401,9 @@
substr rx114_tgt, rx114_tgt, rx114_off
rx114_start:
eq $I10, 1, rx114_restart
- if_null rx114_debug, debug_206
+ if_null rx114_debug, debug_211
rx114_cur."!cursor_debug"("START", "quantified_atom")
- debug_206:
+ debug_211:
$I10 = self.'from'()
ne $I10, -1, rxscan118_done
goto rxscan118_scan
@@ -1455,7 +1416,6 @@
set_addr $I10, rxscan118_loop
rx114_cur."!mark_push"(0, rx114_pos, $I10)
rxscan118_done:
-.annotate 'line', 50
# rx subrule "atom" subtype=capture negate=
rx114_cur."!cursor_pos"(rx114_pos)
$P10 = rx114_cur."atom"()
@@ -1486,7 +1446,7 @@
alt120_1:
# rx subrule "before" subtype=zerowidth negate=
rx114_cur."!cursor_pos"(rx114_pos)
- .const 'Sub' $P122 = "34_1283368197.39621"
+ .const 'Sub' $P122 = "34_1283975941.34404"
capture_lex $P122
$P10 = rx114_cur."before"($P122)
unless $P10, rx114_fail
@@ -1505,18 +1465,16 @@
set_addr $I10, rxquantr119_done
(rx114_rep) = rx114_cur."!mark_commit"($I10)
rxquantr119_done:
-.annotate 'line', 49
# rx pass
rx114_cur."!cursor_pass"(rx114_pos, "quantified_atom")
- if_null rx114_debug, debug_211
+ if_null rx114_debug, debug_216
rx114_cur."!cursor_debug"("PASS", "quantified_atom", " at pos=", rx114_pos)
- debug_211:
+ debug_216:
.return (rx114_cur)
rx114_restart:
-.annotate 'line', 3
- if_null rx114_debug, debug_212
+ if_null rx114_debug, debug_217
rx114_cur."!cursor_debug"("NEXT", "quantified_atom")
- debug_212:
+ debug_217:
rx114_fail:
(rx114_rep, rx114_pos, $I10, $P10) = rx114_cur."!mark_fail"(0)
lt rx114_pos, -1, rx114_done
@@ -1524,17 +1482,17 @@
jump $I10
rx114_done:
rx114_cur."!cursor_fail"()
- if_null rx114_debug, debug_213
+ if_null rx114_debug, debug_218
rx114_cur."!cursor_debug"("FAIL", "quantified_atom")
- debug_213:
+ debug_218:
.return (rx114_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantified_atom" :subid("33_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__quantified_atom" :subid("33_1283975941.34404") :method
+.annotate 'line', 0
$P116 = self."!PREFIX__!subrule"("atom", "")
new $P117, "ResizablePMCArray"
push $P117, $P116
@@ -1543,8 +1501,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block121" :anon :subid("34_1283368197.39621") :method :outer("32_1283368197.39621")
-.annotate 'line', 50
+.sub "_block121" :anon :subid("34_1283975941.34404") :method :outer("32_1283975941.34404")
+.annotate 'line', 0
.local string rx123_tgt
.local int rx123_pos
.local int rx123_off
@@ -1565,9 +1523,9 @@
substr rx123_tgt, rx123_tgt, rx123_off
rx123_start:
eq $I10, 1, rx123_restart
- if_null rx123_debug, debug_207
+ if_null rx123_debug, debug_212
rx123_cur."!cursor_debug"("START", "")
- debug_207:
+ debug_212:
$I10 = self.'from'()
ne $I10, -1, rxscan124_done
goto rxscan124_scan
@@ -1589,14 +1547,14 @@
add rx123_pos, 1
# rx pass
rx123_cur."!cursor_pass"(rx123_pos, "")
- if_null rx123_debug, debug_208
+ if_null rx123_debug, debug_213
rx123_cur."!cursor_debug"("PASS", "", " at pos=", rx123_pos)
- debug_208:
+ debug_213:
.return (rx123_cur)
rx123_restart:
- if_null rx123_debug, debug_209
+ if_null rx123_debug, debug_214
rx123_cur."!cursor_debug"("NEXT", "")
- debug_209:
+ debug_214:
rx123_fail:
(rx123_rep, rx123_pos, $I10, $P10) = rx123_cur."!mark_fail"(0)
lt rx123_pos, -1, rx123_done
@@ -1604,18 +1562,18 @@
jump $I10
rx123_done:
rx123_cur."!cursor_fail"()
- if_null rx123_debug, debug_210
+ if_null rx123_debug, debug_215
rx123_cur."!cursor_debug"("FAIL", "")
- debug_210:
+ debug_215:
.return (rx123_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "atom" :subid("35_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P135 = "37_1283368197.39621"
+.sub "atom" :subid("35_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P135 = "37_1283975941.34404"
capture_lex $P135
.local string rx126_tgt
.local int rx126_pos
@@ -1637,9 +1595,9 @@
substr rx126_tgt, rx126_tgt, rx126_off
rx126_start:
eq $I10, 1, rx126_restart
- if_null rx126_debug, debug_214
+ if_null rx126_debug, debug_219
rx126_cur."!cursor_debug"("START", "atom")
- debug_214:
+ debug_219:
$I10 = self.'from'()
ne $I10, -1, rxscan130_done
goto rxscan130_scan
@@ -1653,10 +1611,8 @@
rx126_cur."!mark_push"(0, rx126_pos, $I10)
rxscan130_done:
alt131_0:
-.annotate 'line', 55
set_addr $I10, alt131_1
rx126_cur."!mark_push"(0, rx126_pos, $I10)
-.annotate 'line', 56
# rx charclass w
ge rx126_pos, rx126_eos, rx126_fail
sub $I10, rx126_pos, rx126_off
@@ -1681,7 +1637,7 @@
rxquantg133_done:
# rx subrule "before" subtype=zerowidth negate=
rx126_cur."!cursor_pos"(rx126_pos)
- .const 'Sub' $P135 = "37_1283368197.39621"
+ .const 'Sub' $P135 = "37_1283975941.34404"
capture_lex $P135
$P10 = rx126_cur."before"($P135)
unless $P10, rx126_fail
@@ -1690,7 +1646,6 @@
rxquantr132_done:
goto alt131_end
alt131_1:
-.annotate 'line', 57
# rx subrule "metachar" subtype=capture negate=
rx126_cur."!cursor_pos"(rx126_pos)
$P10 = rx126_cur."metachar"()
@@ -1699,18 +1654,16 @@
$P10."!cursor_names"("metachar")
rx126_pos = $P10."pos"()
alt131_end:
-.annotate 'line', 53
# rx pass
rx126_cur."!cursor_pass"(rx126_pos, "atom")
- if_null rx126_debug, debug_219
+ if_null rx126_debug, debug_224
rx126_cur."!cursor_debug"("PASS", "atom", " at pos=", rx126_pos)
- debug_219:
+ debug_224:
.return (rx126_cur)
rx126_restart:
-.annotate 'line', 3
- if_null rx126_debug, debug_220
+ if_null rx126_debug, debug_225
rx126_cur."!cursor_debug"("NEXT", "atom")
- debug_220:
+ debug_225:
rx126_fail:
(rx126_rep, rx126_pos, $I10, $P10) = rx126_cur."!mark_fail"(0)
lt rx126_pos, -1, rx126_done
@@ -1718,17 +1671,17 @@
jump $I10
rx126_done:
rx126_cur."!cursor_fail"()
- if_null rx126_debug, debug_221
+ if_null rx126_debug, debug_226
rx126_cur."!cursor_debug"("FAIL", "atom")
- debug_221:
+ debug_226:
.return (rx126_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__atom" :subid("36_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__atom" :subid("36_1283975941.34404") :method
+.annotate 'line', 0
$P128 = self."!PREFIX__!subrule"("metachar", "")
new $P129, "ResizablePMCArray"
push $P129, $P128
@@ -1738,8 +1691,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block134" :anon :subid("37_1283368197.39621") :method :outer("35_1283368197.39621")
-.annotate 'line', 56
+.sub "_block134" :anon :subid("37_1283975941.34404") :method :outer("35_1283975941.34404")
+.annotate 'line', 0
.local string rx136_tgt
.local int rx136_pos
.local int rx136_off
@@ -1760,9 +1713,9 @@
substr rx136_tgt, rx136_tgt, rx136_off
rx136_start:
eq $I10, 1, rx136_restart
- if_null rx136_debug, debug_215
+ if_null rx136_debug, debug_220
rx136_cur."!cursor_debug"("START", "")
- debug_215:
+ debug_220:
$I10 = self.'from'()
ne $I10, -1, rxscan137_done
goto rxscan137_scan
@@ -1783,14 +1736,14 @@
inc rx136_pos
# rx pass
rx136_cur."!cursor_pass"(rx136_pos, "")
- if_null rx136_debug, debug_216
+ if_null rx136_debug, debug_221
rx136_cur."!cursor_debug"("PASS", "", " at pos=", rx136_pos)
- debug_216:
+ debug_221:
.return (rx136_cur)
rx136_restart:
- if_null rx136_debug, debug_217
+ if_null rx136_debug, debug_222
rx136_cur."!cursor_debug"("NEXT", "")
- debug_217:
+ debug_222:
rx136_fail:
(rx136_rep, rx136_pos, $I10, $P10) = rx136_cur."!mark_fail"(0)
lt rx136_pos, -1, rx136_done
@@ -1798,33 +1751,33 @@
jump $I10
rx136_done:
rx136_cur."!cursor_fail"()
- if_null rx136_debug, debug_218
+ if_null rx136_debug, debug_223
rx136_cur."!cursor_debug"("FAIL", "")
- debug_218:
+ debug_223:
.return (rx136_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier" :subid("38_1283368197.39621") :method
-.annotate 'line', 61
+.sub "quantifier" :subid("38_1283975941.34404") :method
+.annotate 'line', 0
$P139 = self."!protoregex"("quantifier")
.return ($P139)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier" :subid("39_1283368197.39621") :method
-.annotate 'line', 61
+.sub "!PREFIX__quantifier" :subid("39_1283975941.34404") :method
+.annotate 'line', 0
$P141 = self."!PREFIX__!protoregex"("quantifier")
.return ($P141)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<*>" :subid("40_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "quantifier:sym<*>" :subid("40_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx143_tgt
.local int rx143_pos
.local int rx143_off
@@ -1845,9 +1798,9 @@
substr rx143_tgt, rx143_tgt, rx143_off
rx143_start:
eq $I10, 1, rx143_restart
- if_null rx143_debug, debug_222
+ if_null rx143_debug, debug_227
rx143_cur."!cursor_debug"("START", "quantifier:sym<*>")
- debug_222:
+ debug_227:
$I10 = self.'from'()
ne $I10, -1, rxscan147_done
goto rxscan147_scan
@@ -1860,7 +1813,6 @@
set_addr $I10, rxscan147_loop
rx143_cur."!mark_push"(0, rx143_pos, $I10)
rxscan147_done:
-.annotate 'line', 62
# rx subcapture "sym"
set_addr $I10, rxcap_148_fail
rx143_cur."!mark_push"(0, rx143_pos, $I10)
@@ -1891,15 +1843,14 @@
rx143_pos = $P10."pos"()
# rx pass
rx143_cur."!cursor_pass"(rx143_pos, "quantifier:sym<*>")
- if_null rx143_debug, debug_223
+ if_null rx143_debug, debug_228
rx143_cur."!cursor_debug"("PASS", "quantifier:sym<*>", " at pos=", rx143_pos)
- debug_223:
+ debug_228:
.return (rx143_cur)
rx143_restart:
-.annotate 'line', 3
- if_null rx143_debug, debug_224
+ if_null rx143_debug, debug_229
rx143_cur."!cursor_debug"("NEXT", "quantifier:sym<*>")
- debug_224:
+ debug_229:
rx143_fail:
(rx143_rep, rx143_pos, $I10, $P10) = rx143_cur."!mark_fail"(0)
lt rx143_pos, -1, rx143_done
@@ -1907,17 +1858,17 @@
jump $I10
rx143_done:
rx143_cur."!cursor_fail"()
- if_null rx143_debug, debug_225
+ if_null rx143_debug, debug_230
rx143_cur."!cursor_debug"("FAIL", "quantifier:sym<*>")
- debug_225:
+ debug_230:
.return (rx143_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<*>" :subid("41_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__quantifier:sym<*>" :subid("41_1283975941.34404") :method
+.annotate 'line', 0
$P145 = self."!PREFIX__!subrule"("backmod", "*")
new $P146, "ResizablePMCArray"
push $P146, $P145
@@ -1926,8 +1877,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<+>" :subid("42_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "quantifier:sym<+>" :subid("42_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx150_tgt
.local int rx150_pos
.local int rx150_off
@@ -1948,9 +1899,9 @@
substr rx150_tgt, rx150_tgt, rx150_off
rx150_start:
eq $I10, 1, rx150_restart
- if_null rx150_debug, debug_226
+ if_null rx150_debug, debug_231
rx150_cur."!cursor_debug"("START", "quantifier:sym<+>")
- debug_226:
+ debug_231:
$I10 = self.'from'()
ne $I10, -1, rxscan154_done
goto rxscan154_scan
@@ -1963,7 +1914,6 @@
set_addr $I10, rxscan154_loop
rx150_cur."!mark_push"(0, rx150_pos, $I10)
rxscan154_done:
-.annotate 'line', 63
# rx subcapture "sym"
set_addr $I10, rxcap_155_fail
rx150_cur."!mark_push"(0, rx150_pos, $I10)
@@ -1994,15 +1944,14 @@
rx150_pos = $P10."pos"()
# rx pass
rx150_cur."!cursor_pass"(rx150_pos, "quantifier:sym<+>")
- if_null rx150_debug, debug_227
+ if_null rx150_debug, debug_232
rx150_cur."!cursor_debug"("PASS", "quantifier:sym<+>", " at pos=", rx150_pos)
- debug_227:
+ debug_232:
.return (rx150_cur)
rx150_restart:
-.annotate 'line', 3
- if_null rx150_debug, debug_228
+ if_null rx150_debug, debug_233
rx150_cur."!cursor_debug"("NEXT", "quantifier:sym<+>")
- debug_228:
+ debug_233:
rx150_fail:
(rx150_rep, rx150_pos, $I10, $P10) = rx150_cur."!mark_fail"(0)
lt rx150_pos, -1, rx150_done
@@ -2010,17 +1959,17 @@
jump $I10
rx150_done:
rx150_cur."!cursor_fail"()
- if_null rx150_debug, debug_229
+ if_null rx150_debug, debug_234
rx150_cur."!cursor_debug"("FAIL", "quantifier:sym<+>")
- debug_229:
+ debug_234:
.return (rx150_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<+>" :subid("43_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__quantifier:sym<+>" :subid("43_1283975941.34404") :method
+.annotate 'line', 0
$P152 = self."!PREFIX__!subrule"("backmod", "+")
new $P153, "ResizablePMCArray"
push $P153, $P152
@@ -2029,8 +1978,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<?>" :subid("44_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "quantifier:sym<?>" :subid("44_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx157_tgt
.local int rx157_pos
.local int rx157_off
@@ -2051,9 +2000,9 @@
substr rx157_tgt, rx157_tgt, rx157_off
rx157_start:
eq $I10, 1, rx157_restart
- if_null rx157_debug, debug_230
+ if_null rx157_debug, debug_235
rx157_cur."!cursor_debug"("START", "quantifier:sym<?>")
- debug_230:
+ debug_235:
$I10 = self.'from'()
ne $I10, -1, rxscan161_done
goto rxscan161_scan
@@ -2066,7 +2015,6 @@
set_addr $I10, rxscan161_loop
rx157_cur."!mark_push"(0, rx157_pos, $I10)
rxscan161_done:
-.annotate 'line', 64
# rx subcapture "sym"
set_addr $I10, rxcap_162_fail
rx157_cur."!mark_push"(0, rx157_pos, $I10)
@@ -2097,15 +2045,14 @@
rx157_pos = $P10."pos"()
# rx pass
rx157_cur."!cursor_pass"(rx157_pos, "quantifier:sym<?>")
- if_null rx157_debug, debug_231
+ if_null rx157_debug, debug_236
rx157_cur."!cursor_debug"("PASS", "quantifier:sym<?>", " at pos=", rx157_pos)
- debug_231:
+ debug_236:
.return (rx157_cur)
rx157_restart:
-.annotate 'line', 3
- if_null rx157_debug, debug_232
+ if_null rx157_debug, debug_237
rx157_cur."!cursor_debug"("NEXT", "quantifier:sym<?>")
- debug_232:
+ debug_237:
rx157_fail:
(rx157_rep, rx157_pos, $I10, $P10) = rx157_cur."!mark_fail"(0)
lt rx157_pos, -1, rx157_done
@@ -2113,17 +2060,17 @@
jump $I10
rx157_done:
rx157_cur."!cursor_fail"()
- if_null rx157_debug, debug_233
+ if_null rx157_debug, debug_238
rx157_cur."!cursor_debug"("FAIL", "quantifier:sym<?>")
- debug_233:
+ debug_238:
.return (rx157_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<?>" :subid("45_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__quantifier:sym<?>" :subid("45_1283975941.34404") :method
+.annotate 'line', 0
$P159 = self."!PREFIX__!subrule"("backmod", "?")
new $P160, "ResizablePMCArray"
push $P160, $P159
@@ -2132,8 +2079,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<**>" :subid("46_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "quantifier:sym<**>" :subid("46_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx164_tgt
.local int rx164_pos
.local int rx164_off
@@ -2142,7 +2089,7 @@
.local pmc rx164_cur
.local pmc rx164_debug
(rx164_cur, rx164_pos, rx164_tgt, $I10) = self."!cursor_start"()
- rx164_cur."!cursor_caparray"("max", "normspace")
+ rx164_cur."!cursor_caparray"("normspace", "max")
getattribute rx164_debug, rx164_cur, "$!debug"
.lex unicode:"$\x{a2}", rx164_cur
.local pmc match
@@ -2155,9 +2102,9 @@
substr rx164_tgt, rx164_tgt, rx164_off
rx164_start:
eq $I10, 1, rx164_restart
- if_null rx164_debug, debug_234
+ if_null rx164_debug, debug_239
rx164_cur."!cursor_debug"("START", "quantifier:sym<**>")
- debug_234:
+ debug_239:
$I10 = self.'from'()
ne $I10, -1, rxscan167_done
goto rxscan167_scan
@@ -2170,7 +2117,6 @@
set_addr $I10, rxscan167_loop
rx164_cur."!mark_push"(0, rx164_pos, $I10)
rxscan167_done:
-.annotate 'line', 66
# rx subcapture "sym"
set_addr $I10, rxcap_168_fail
rx164_cur."!mark_push"(0, rx164_pos, $I10)
@@ -2240,10 +2186,8 @@
(rx164_rep) = rx164_cur."!mark_commit"($I10)
rxquantr171_done:
alt173_0:
-.annotate 'line', 67
set_addr $I10, alt173_1
rx164_cur."!mark_push"(0, rx164_pos, $I10)
-.annotate 'line', 68
# rx subcapture "min"
set_addr $I10, rxcap_174_fail
rx164_cur."!mark_push"(0, rx164_pos, $I10)
@@ -2264,12 +2208,10 @@
rxcap_174_fail:
goto rx164_fail
rxcap_174_done:
-.annotate 'line', 75
# rx rxquantr175 ** 0..1
set_addr $I10, rxquantr175_done
rx164_cur."!mark_push"(0, rx164_pos, $I10)
rxquantr175_loop:
-.annotate 'line', 69
# rx literal ".."
add $I11, rx164_pos, 2
gt $I11, rx164_eos, rx164_fail
@@ -2277,14 +2219,12 @@
substr $S10, rx164_tgt, $I11, 2
ne $S10, "..", rx164_fail
add rx164_pos, 2
-.annotate 'line', 70
# rx subcapture "max"
set_addr $I10, rxcap_177_fail
rx164_cur."!mark_push"(0, rx164_pos, $I10)
alt176_0:
set_addr $I10, alt176_1
rx164_cur."!mark_push"(0, rx164_pos, $I10)
-.annotate 'line', 71
# rx charclass_q d r 1..-1
sub $I10, rx164_pos, rx164_off
find_not_cclass $I11, 8, rx164_tgt, $I10, rx164_eos
@@ -2295,7 +2235,6 @@
alt176_1:
set_addr $I10, alt176_2
rx164_cur."!mark_push"(0, rx164_pos, $I10)
-.annotate 'line', 72
# rx literal "*"
add $I11, rx164_pos, 1
gt $I11, rx164_eos, rx164_fail
@@ -2305,14 +2244,12 @@
add rx164_pos, 1
goto alt176_end
alt176_2:
-.annotate 'line', 73
# rx subrule "panic" subtype=method negate=
rx164_cur."!cursor_pos"(rx164_pos)
$P10 = rx164_cur."panic"("Only integers or '*' allowed as range quantifier endpoint")
unless $P10, rx164_fail
rx164_pos = $P10."pos"()
alt176_end:
-.annotate 'line', 70
set_addr $I10, rxcap_177_fail
($I12, $I11) = rx164_cur."!mark_peek"($I10)
rx164_cur."!cursor_pos"($I11)
@@ -2324,14 +2261,11 @@
rxcap_177_fail:
goto rx164_fail
rxcap_177_done:
-.annotate 'line', 75
set_addr $I10, rxquantr175_done
(rx164_rep) = rx164_cur."!mark_commit"($I10)
rxquantr175_done:
-.annotate 'line', 68
goto alt173_end
alt173_1:
-.annotate 'line', 76
# rx subrule "quantified_atom" subtype=capture negate=
rx164_cur."!cursor_pos"(rx164_pos)
$P10 = rx164_cur."quantified_atom"()
@@ -2340,18 +2274,16 @@
$P10."!cursor_names"("quantified_atom")
rx164_pos = $P10."pos"()
alt173_end:
-.annotate 'line', 65
# rx pass
rx164_cur."!cursor_pass"(rx164_pos, "quantifier:sym<**>")
- if_null rx164_debug, debug_235
+ if_null rx164_debug, debug_240
rx164_cur."!cursor_debug"("PASS", "quantifier:sym<**>", " at pos=", rx164_pos)
- debug_235:
+ debug_240:
.return (rx164_cur)
rx164_restart:
-.annotate 'line', 3
- if_null rx164_debug, debug_236
+ if_null rx164_debug, debug_241
rx164_cur."!cursor_debug"("NEXT", "quantifier:sym<**>")
- debug_236:
+ debug_241:
rx164_fail:
(rx164_rep, rx164_pos, $I10, $P10) = rx164_cur."!mark_fail"(0)
lt rx164_pos, -1, rx164_done
@@ -2359,17 +2291,17 @@
jump $I10
rx164_done:
rx164_cur."!cursor_fail"()
- if_null rx164_debug, debug_237
+ if_null rx164_debug, debug_242
rx164_cur."!cursor_debug"("FAIL", "quantifier:sym<**>")
- debug_237:
+ debug_242:
.return (rx164_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<**>" :subid("47_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__quantifier:sym<**>" :subid("47_1283975941.34404") :method
+.annotate 'line', 0
new $P166, "ResizablePMCArray"
push $P166, "**"
.return ($P166)
@@ -2377,9 +2309,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backmod" :subid("48_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P186 = "50_1283368197.39621"
+.sub "backmod" :subid("48_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P186 = "50_1283975941.34404"
capture_lex $P186
.local string rx179_tgt
.local int rx179_pos
@@ -2401,9 +2333,9 @@
substr rx179_tgt, rx179_tgt, rx179_off
rx179_start:
eq $I10, 1, rx179_restart
- if_null rx179_debug, debug_238
+ if_null rx179_debug, debug_243
rx179_cur."!cursor_debug"("START", "backmod")
- debug_238:
+ debug_243:
$I10 = self.'from'()
ne $I10, -1, rxscan182_done
goto rxscan182_scan
@@ -2416,7 +2348,6 @@
set_addr $I10, rxscan182_loop
rx179_cur."!mark_push"(0, rx179_pos, $I10)
rxscan182_done:
-.annotate 'line', 80
# rx rxquantr183 ** 0..1
set_addr $I10, rxquantr183_done
rx179_cur."!mark_push"(0, rx179_pos, $I10)
@@ -2456,22 +2387,21 @@
alt184_2:
# rx subrule "before" subtype=zerowidth negate=1
rx179_cur."!cursor_pos"(rx179_pos)
- .const 'Sub' $P186 = "50_1283368197.39621"
+ .const 'Sub' $P186 = "50_1283975941.34404"
capture_lex $P186
$P10 = rx179_cur."before"($P186)
if $P10, rx179_fail
alt184_end:
# rx pass
rx179_cur."!cursor_pass"(rx179_pos, "backmod")
- if_null rx179_debug, debug_243
+ if_null rx179_debug, debug_248
rx179_cur."!cursor_debug"("PASS", "backmod", " at pos=", rx179_pos)
- debug_243:
+ debug_248:
.return (rx179_cur)
rx179_restart:
-.annotate 'line', 3
- if_null rx179_debug, debug_244
+ if_null rx179_debug, debug_249
rx179_cur."!cursor_debug"("NEXT", "backmod")
- debug_244:
+ debug_249:
rx179_fail:
(rx179_rep, rx179_pos, $I10, $P10) = rx179_cur."!mark_fail"(0)
lt rx179_pos, -1, rx179_done
@@ -2479,17 +2409,17 @@
jump $I10
rx179_done:
rx179_cur."!cursor_fail"()
- if_null rx179_debug, debug_245
+ if_null rx179_debug, debug_250
rx179_cur."!cursor_debug"("FAIL", "backmod")
- debug_245:
+ debug_250:
.return (rx179_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backmod" :subid("49_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backmod" :subid("49_1283975941.34404") :method
+.annotate 'line', 0
new $P181, "ResizablePMCArray"
push $P181, ""
.return ($P181)
@@ -2497,8 +2427,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block185" :anon :subid("50_1283368197.39621") :method :outer("48_1283368197.39621")
-.annotate 'line', 80
+.sub "_block185" :anon :subid("50_1283975941.34404") :method :outer("48_1283975941.34404")
+.annotate 'line', 0
.local string rx187_tgt
.local int rx187_pos
.local int rx187_off
@@ -2519,9 +2449,9 @@
substr rx187_tgt, rx187_tgt, rx187_off
rx187_start:
eq $I10, 1, rx187_restart
- if_null rx187_debug, debug_239
+ if_null rx187_debug, debug_244
rx187_cur."!cursor_debug"("START", "")
- debug_239:
+ debug_244:
$I10 = self.'from'()
ne $I10, -1, rxscan188_done
goto rxscan188_scan
@@ -2543,14 +2473,14 @@
add rx187_pos, 1
# rx pass
rx187_cur."!cursor_pass"(rx187_pos, "")
- if_null rx187_debug, debug_240
+ if_null rx187_debug, debug_245
rx187_cur."!cursor_debug"("PASS", "", " at pos=", rx187_pos)
- debug_240:
+ debug_245:
.return (rx187_cur)
rx187_restart:
- if_null rx187_debug, debug_241
+ if_null rx187_debug, debug_246
rx187_cur."!cursor_debug"("NEXT", "")
- debug_241:
+ debug_246:
rx187_fail:
(rx187_rep, rx187_pos, $I10, $P10) = rx187_cur."!mark_fail"(0)
lt rx187_pos, -1, rx187_done
@@ -2558,33 +2488,33 @@
jump $I10
rx187_done:
rx187_cur."!cursor_fail"()
- if_null rx187_debug, debug_242
+ if_null rx187_debug, debug_247
rx187_cur."!cursor_debug"("FAIL", "")
- debug_242:
+ debug_247:
.return (rx187_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar" :subid("51_1283368197.39621") :method
-.annotate 'line', 82
+.sub "metachar" :subid("51_1283975941.34404") :method
+.annotate 'line', 0
$P190 = self."!protoregex"("metachar")
.return ($P190)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar" :subid("52_1283368197.39621") :method
-.annotate 'line', 82
+.sub "!PREFIX__metachar" :subid("52_1283975941.34404") :method
+.annotate 'line', 0
$P192 = self."!PREFIX__!protoregex"("metachar")
.return ($P192)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<ws>" :subid("53_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<ws>" :subid("53_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx194_tgt
.local int rx194_pos
.local int rx194_off
@@ -2605,9 +2535,9 @@
substr rx194_tgt, rx194_tgt, rx194_off
rx194_start:
eq $I10, 1, rx194_restart
- if_null rx194_debug, debug_246
+ if_null rx194_debug, debug_251
rx194_cur."!cursor_debug"("START", "metachar:sym<ws>")
- debug_246:
+ debug_251:
$I10 = self.'from'()
ne $I10, -1, rxscan198_done
goto rxscan198_scan
@@ -2620,7 +2550,6 @@
set_addr $I10, rxscan198_loop
rx194_cur."!mark_push"(0, rx194_pos, $I10)
rxscan198_done:
-.annotate 'line', 83
# rx subrule "normspace" subtype=method negate=
rx194_cur."!cursor_pos"(rx194_pos)
$P10 = rx194_cur."normspace"()
@@ -2628,15 +2557,14 @@
rx194_pos = $P10."pos"()
# rx pass
rx194_cur."!cursor_pass"(rx194_pos, "metachar:sym<ws>")
- if_null rx194_debug, debug_247
+ if_null rx194_debug, debug_252
rx194_cur."!cursor_debug"("PASS", "metachar:sym<ws>", " at pos=", rx194_pos)
- debug_247:
+ debug_252:
.return (rx194_cur)
rx194_restart:
-.annotate 'line', 3
- if_null rx194_debug, debug_248
+ if_null rx194_debug, debug_253
rx194_cur."!cursor_debug"("NEXT", "metachar:sym<ws>")
- debug_248:
+ debug_253:
rx194_fail:
(rx194_rep, rx194_pos, $I10, $P10) = rx194_cur."!mark_fail"(0)
lt rx194_pos, -1, rx194_done
@@ -2644,17 +2572,17 @@
jump $I10
rx194_done:
rx194_cur."!cursor_fail"()
- if_null rx194_debug, debug_249
+ if_null rx194_debug, debug_254
rx194_cur."!cursor_debug"("FAIL", "metachar:sym<ws>")
- debug_249:
+ debug_254:
.return (rx194_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<ws>" :subid("54_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<ws>" :subid("54_1283975941.34404") :method
+.annotate 'line', 0
$P196 = self."!PREFIX__!subrule"("normspace", "")
new $P197, "ResizablePMCArray"
push $P197, $P196
@@ -2663,8 +2591,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<[ ]>" :subid("55_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<[ ]>" :subid("55_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx200_tgt
.local int rx200_pos
.local int rx200_off
@@ -2685,9 +2613,9 @@
substr rx200_tgt, rx200_tgt, rx200_off
rx200_start:
eq $I10, 1, rx200_restart
- if_null rx200_debug, debug_250
+ if_null rx200_debug, debug_255
rx200_cur."!cursor_debug"("START", "metachar:sym<[ ]>")
- debug_250:
+ debug_255:
$I10 = self.'from'()
ne $I10, -1, rxscan204_done
goto rxscan204_scan
@@ -2700,7 +2628,6 @@
set_addr $I10, rxscan204_loop
rx200_cur."!mark_push"(0, rx200_pos, $I10)
rxscan204_done:
-.annotate 'line', 84
# rx literal "["
add $I11, rx200_pos, 1
gt $I11, rx200_eos, rx200_fail
@@ -2724,15 +2651,14 @@
add rx200_pos, 1
# rx pass
rx200_cur."!cursor_pass"(rx200_pos, "metachar:sym<[ ]>")
- if_null rx200_debug, debug_251
+ if_null rx200_debug, debug_256
rx200_cur."!cursor_debug"("PASS", "metachar:sym<[ ]>", " at pos=", rx200_pos)
- debug_251:
+ debug_256:
.return (rx200_cur)
rx200_restart:
-.annotate 'line', 3
- if_null rx200_debug, debug_252
+ if_null rx200_debug, debug_257
rx200_cur."!cursor_debug"("NEXT", "metachar:sym<[ ]>")
- debug_252:
+ debug_257:
rx200_fail:
(rx200_rep, rx200_pos, $I10, $P10) = rx200_cur."!mark_fail"(0)
lt rx200_pos, -1, rx200_done
@@ -2740,17 +2666,17 @@
jump $I10
rx200_done:
rx200_cur."!cursor_fail"()
- if_null rx200_debug, debug_253
+ if_null rx200_debug, debug_258
rx200_cur."!cursor_debug"("FAIL", "metachar:sym<[ ]>")
- debug_253:
+ debug_258:
.return (rx200_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<[ ]>" :subid("56_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<[ ]>" :subid("56_1283975941.34404") :method
+.annotate 'line', 0
$P202 = self."!PREFIX__!subrule"("nibbler", "[")
new $P203, "ResizablePMCArray"
push $P203, $P202
@@ -2759,8 +2685,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<( )>" :subid("57_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<( )>" :subid("57_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx206_tgt
.local int rx206_pos
.local int rx206_off
@@ -2781,9 +2707,9 @@
substr rx206_tgt, rx206_tgt, rx206_off
rx206_start:
eq $I10, 1, rx206_restart
- if_null rx206_debug, debug_254
+ if_null rx206_debug, debug_259
rx206_cur."!cursor_debug"("START", "metachar:sym<( )>")
- debug_254:
+ debug_259:
$I10 = self.'from'()
ne $I10, -1, rxscan210_done
goto rxscan210_scan
@@ -2796,7 +2722,6 @@
set_addr $I10, rxscan210_loop
rx206_cur."!mark_push"(0, rx206_pos, $I10)
rxscan210_done:
-.annotate 'line', 85
# rx literal "("
add $I11, rx206_pos, 1
gt $I11, rx206_eos, rx206_fail
@@ -2820,15 +2745,14 @@
add rx206_pos, 1
# rx pass
rx206_cur."!cursor_pass"(rx206_pos, "metachar:sym<( )>")
- if_null rx206_debug, debug_255
+ if_null rx206_debug, debug_260
rx206_cur."!cursor_debug"("PASS", "metachar:sym<( )>", " at pos=", rx206_pos)
- debug_255:
+ debug_260:
.return (rx206_cur)
rx206_restart:
-.annotate 'line', 3
- if_null rx206_debug, debug_256
+ if_null rx206_debug, debug_261
rx206_cur."!cursor_debug"("NEXT", "metachar:sym<( )>")
- debug_256:
+ debug_261:
rx206_fail:
(rx206_rep, rx206_pos, $I10, $P10) = rx206_cur."!mark_fail"(0)
lt rx206_pos, -1, rx206_done
@@ -2836,17 +2760,17 @@
jump $I10
rx206_done:
rx206_cur."!cursor_fail"()
- if_null rx206_debug, debug_257
+ if_null rx206_debug, debug_262
rx206_cur."!cursor_debug"("FAIL", "metachar:sym<( )>")
- debug_257:
+ debug_262:
.return (rx206_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<( )>" :subid("58_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<( )>" :subid("58_1283975941.34404") :method
+.annotate 'line', 0
$P208 = self."!PREFIX__!subrule"("nibbler", "(")
new $P209, "ResizablePMCArray"
push $P209, $P208
@@ -2855,8 +2779,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<'>" :subid("59_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<'>" :subid("59_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx212_tgt
.local int rx212_pos
.local int rx212_off
@@ -2877,9 +2801,9 @@
substr rx212_tgt, rx212_tgt, rx212_off
rx212_start:
eq $I10, 1, rx212_restart
- if_null rx212_debug, debug_258
+ if_null rx212_debug, debug_263
rx212_cur."!cursor_debug"("START", "metachar:sym<'>")
- debug_258:
+ debug_263:
$I10 = self.'from'()
ne $I10, -1, rxscan215_done
goto rxscan215_scan
@@ -2892,7 +2816,6 @@
set_addr $I10, rxscan215_loop
rx212_cur."!mark_push"(0, rx212_pos, $I10)
rxscan215_done:
-.annotate 'line', 86
# rx enumcharlist negate=0 zerowidth
ge rx212_pos, rx212_eos, rx212_fail
sub $I10, rx212_pos, rx212_off
@@ -2908,15 +2831,14 @@
rx212_pos = $P10."pos"()
# rx pass
rx212_cur."!cursor_pass"(rx212_pos, "metachar:sym<'>")
- if_null rx212_debug, debug_259
+ if_null rx212_debug, debug_264
rx212_cur."!cursor_debug"("PASS", "metachar:sym<'>", " at pos=", rx212_pos)
- debug_259:
+ debug_264:
.return (rx212_cur)
rx212_restart:
-.annotate 'line', 3
- if_null rx212_debug, debug_260
+ if_null rx212_debug, debug_265
rx212_cur."!cursor_debug"("NEXT", "metachar:sym<'>")
- debug_260:
+ debug_265:
rx212_fail:
(rx212_rep, rx212_pos, $I10, $P10) = rx212_cur."!mark_fail"(0)
lt rx212_pos, -1, rx212_done
@@ -2924,17 +2846,17 @@
jump $I10
rx212_done:
rx212_cur."!cursor_fail"()
- if_null rx212_debug, debug_261
+ if_null rx212_debug, debug_266
rx212_cur."!cursor_debug"("FAIL", "metachar:sym<'>")
- debug_261:
+ debug_266:
.return (rx212_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<'>" :subid("60_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<'>" :subid("60_1283975941.34404") :method
+.annotate 'line', 0
new $P214, "ResizablePMCArray"
push $P214, "'"
.return ($P214)
@@ -2942,8 +2864,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<\">" :subid("61_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<\">" :subid("61_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx217_tgt
.local int rx217_pos
.local int rx217_off
@@ -2964,9 +2886,9 @@
substr rx217_tgt, rx217_tgt, rx217_off
rx217_start:
eq $I10, 1, rx217_restart
- if_null rx217_debug, debug_262
+ if_null rx217_debug, debug_267
rx217_cur."!cursor_debug"("START", "metachar:sym<\">")
- debug_262:
+ debug_267:
$I10 = self.'from'()
ne $I10, -1, rxscan220_done
goto rxscan220_scan
@@ -2979,7 +2901,6 @@
set_addr $I10, rxscan220_loop
rx217_cur."!mark_push"(0, rx217_pos, $I10)
rxscan220_done:
-.annotate 'line', 87
# rx enumcharlist negate=0 zerowidth
ge rx217_pos, rx217_eos, rx217_fail
sub $I10, rx217_pos, rx217_off
@@ -2995,15 +2916,14 @@
rx217_pos = $P10."pos"()
# rx pass
rx217_cur."!cursor_pass"(rx217_pos, "metachar:sym<\">")
- if_null rx217_debug, debug_263
+ if_null rx217_debug, debug_268
rx217_cur."!cursor_debug"("PASS", "metachar:sym<\">", " at pos=", rx217_pos)
- debug_263:
+ debug_268:
.return (rx217_cur)
rx217_restart:
-.annotate 'line', 3
- if_null rx217_debug, debug_264
+ if_null rx217_debug, debug_269
rx217_cur."!cursor_debug"("NEXT", "metachar:sym<\">")
- debug_264:
+ debug_269:
rx217_fail:
(rx217_rep, rx217_pos, $I10, $P10) = rx217_cur."!mark_fail"(0)
lt rx217_pos, -1, rx217_done
@@ -3011,17 +2931,17 @@
jump $I10
rx217_done:
rx217_cur."!cursor_fail"()
- if_null rx217_debug, debug_265
+ if_null rx217_debug, debug_270
rx217_cur."!cursor_debug"("FAIL", "metachar:sym<\">")
- debug_265:
+ debug_270:
.return (rx217_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<\">" :subid("62_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<\">" :subid("62_1283975941.34404") :method
+.annotate 'line', 0
new $P219, "ResizablePMCArray"
push $P219, "\""
.return ($P219)
@@ -3029,8 +2949,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<.>" :subid("63_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<.>" :subid("63_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx222_tgt
.local int rx222_pos
.local int rx222_off
@@ -3051,9 +2971,9 @@
substr rx222_tgt, rx222_tgt, rx222_off
rx222_start:
eq $I10, 1, rx222_restart
- if_null rx222_debug, debug_266
+ if_null rx222_debug, debug_271
rx222_cur."!cursor_debug"("START", "metachar:sym<.>")
- debug_266:
+ debug_271:
$I10 = self.'from'()
ne $I10, -1, rxscan225_done
goto rxscan225_scan
@@ -3066,7 +2986,6 @@
set_addr $I10, rxscan225_loop
rx222_cur."!mark_push"(0, rx222_pos, $I10)
rxscan225_done:
-.annotate 'line', 88
# rx subcapture "sym"
set_addr $I10, rxcap_226_fail
rx222_cur."!mark_push"(0, rx222_pos, $I10)
@@ -3090,15 +3009,14 @@
rxcap_226_done:
# rx pass
rx222_cur."!cursor_pass"(rx222_pos, "metachar:sym<.>")
- if_null rx222_debug, debug_267
+ if_null rx222_debug, debug_272
rx222_cur."!cursor_debug"("PASS", "metachar:sym<.>", " at pos=", rx222_pos)
- debug_267:
+ debug_272:
.return (rx222_cur)
rx222_restart:
-.annotate 'line', 3
- if_null rx222_debug, debug_268
+ if_null rx222_debug, debug_273
rx222_cur."!cursor_debug"("NEXT", "metachar:sym<.>")
- debug_268:
+ debug_273:
rx222_fail:
(rx222_rep, rx222_pos, $I10, $P10) = rx222_cur."!mark_fail"(0)
lt rx222_pos, -1, rx222_done
@@ -3106,17 +3024,17 @@
jump $I10
rx222_done:
rx222_cur."!cursor_fail"()
- if_null rx222_debug, debug_269
+ if_null rx222_debug, debug_274
rx222_cur."!cursor_debug"("FAIL", "metachar:sym<.>")
- debug_269:
+ debug_274:
.return (rx222_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<.>" :subid("64_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<.>" :subid("64_1283975941.34404") :method
+.annotate 'line', 0
new $P224, "ResizablePMCArray"
push $P224, "."
.return ($P224)
@@ -3124,8 +3042,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<^>" :subid("65_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<^>" :subid("65_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx228_tgt
.local int rx228_pos
.local int rx228_off
@@ -3146,9 +3064,9 @@
substr rx228_tgt, rx228_tgt, rx228_off
rx228_start:
eq $I10, 1, rx228_restart
- if_null rx228_debug, debug_270
+ if_null rx228_debug, debug_275
rx228_cur."!cursor_debug"("START", "metachar:sym<^>")
- debug_270:
+ debug_275:
$I10 = self.'from'()
ne $I10, -1, rxscan231_done
goto rxscan231_scan
@@ -3161,7 +3079,6 @@
set_addr $I10, rxscan231_loop
rx228_cur."!mark_push"(0, rx228_pos, $I10)
rxscan231_done:
-.annotate 'line', 89
# rx subcapture "sym"
set_addr $I10, rxcap_232_fail
rx228_cur."!mark_push"(0, rx228_pos, $I10)
@@ -3185,15 +3102,14 @@
rxcap_232_done:
# rx pass
rx228_cur."!cursor_pass"(rx228_pos, "metachar:sym<^>")
- if_null rx228_debug, debug_271
+ if_null rx228_debug, debug_276
rx228_cur."!cursor_debug"("PASS", "metachar:sym<^>", " at pos=", rx228_pos)
- debug_271:
+ debug_276:
.return (rx228_cur)
rx228_restart:
-.annotate 'line', 3
- if_null rx228_debug, debug_272
+ if_null rx228_debug, debug_277
rx228_cur."!cursor_debug"("NEXT", "metachar:sym<^>")
- debug_272:
+ debug_277:
rx228_fail:
(rx228_rep, rx228_pos, $I10, $P10) = rx228_cur."!mark_fail"(0)
lt rx228_pos, -1, rx228_done
@@ -3201,17 +3117,17 @@
jump $I10
rx228_done:
rx228_cur."!cursor_fail"()
- if_null rx228_debug, debug_273
+ if_null rx228_debug, debug_278
rx228_cur."!cursor_debug"("FAIL", "metachar:sym<^>")
- debug_273:
+ debug_278:
.return (rx228_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<^>" :subid("66_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<^>" :subid("66_1283975941.34404") :method
+.annotate 'line', 0
new $P230, "ResizablePMCArray"
push $P230, "^"
.return ($P230)
@@ -3219,8 +3135,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<^^>" :subid("67_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<^^>" :subid("67_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx234_tgt
.local int rx234_pos
.local int rx234_off
@@ -3241,9 +3157,9 @@
substr rx234_tgt, rx234_tgt, rx234_off
rx234_start:
eq $I10, 1, rx234_restart
- if_null rx234_debug, debug_274
+ if_null rx234_debug, debug_279
rx234_cur."!cursor_debug"("START", "metachar:sym<^^>")
- debug_274:
+ debug_279:
$I10 = self.'from'()
ne $I10, -1, rxscan237_done
goto rxscan237_scan
@@ -3256,7 +3172,6 @@
set_addr $I10, rxscan237_loop
rx234_cur."!mark_push"(0, rx234_pos, $I10)
rxscan237_done:
-.annotate 'line', 90
# rx subcapture "sym"
set_addr $I10, rxcap_238_fail
rx234_cur."!mark_push"(0, rx234_pos, $I10)
@@ -3280,15 +3195,14 @@
rxcap_238_done:
# rx pass
rx234_cur."!cursor_pass"(rx234_pos, "metachar:sym<^^>")
- if_null rx234_debug, debug_275
+ if_null rx234_debug, debug_280
rx234_cur."!cursor_debug"("PASS", "metachar:sym<^^>", " at pos=", rx234_pos)
- debug_275:
+ debug_280:
.return (rx234_cur)
rx234_restart:
-.annotate 'line', 3
- if_null rx234_debug, debug_276
+ if_null rx234_debug, debug_281
rx234_cur."!cursor_debug"("NEXT", "metachar:sym<^^>")
- debug_276:
+ debug_281:
rx234_fail:
(rx234_rep, rx234_pos, $I10, $P10) = rx234_cur."!mark_fail"(0)
lt rx234_pos, -1, rx234_done
@@ -3296,17 +3210,17 @@
jump $I10
rx234_done:
rx234_cur."!cursor_fail"()
- if_null rx234_debug, debug_277
+ if_null rx234_debug, debug_282
rx234_cur."!cursor_debug"("FAIL", "metachar:sym<^^>")
- debug_277:
+ debug_282:
.return (rx234_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<^^>" :subid("68_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<^^>" :subid("68_1283975941.34404") :method
+.annotate 'line', 0
new $P236, "ResizablePMCArray"
push $P236, "^^"
.return ($P236)
@@ -3314,8 +3228,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<$>" :subid("69_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<$>" :subid("69_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx240_tgt
.local int rx240_pos
.local int rx240_off
@@ -3336,9 +3250,9 @@
substr rx240_tgt, rx240_tgt, rx240_off
rx240_start:
eq $I10, 1, rx240_restart
- if_null rx240_debug, debug_278
+ if_null rx240_debug, debug_283
rx240_cur."!cursor_debug"("START", "metachar:sym<$>")
- debug_278:
+ debug_283:
$I10 = self.'from'()
ne $I10, -1, rxscan243_done
goto rxscan243_scan
@@ -3351,7 +3265,6 @@
set_addr $I10, rxscan243_loop
rx240_cur."!mark_push"(0, rx240_pos, $I10)
rxscan243_done:
-.annotate 'line', 91
# rx subcapture "sym"
set_addr $I10, rxcap_244_fail
rx240_cur."!mark_push"(0, rx240_pos, $I10)
@@ -3375,15 +3288,14 @@
rxcap_244_done:
# rx pass
rx240_cur."!cursor_pass"(rx240_pos, "metachar:sym<$>")
- if_null rx240_debug, debug_279
+ if_null rx240_debug, debug_284
rx240_cur."!cursor_debug"("PASS", "metachar:sym<$>", " at pos=", rx240_pos)
- debug_279:
+ debug_284:
.return (rx240_cur)
rx240_restart:
-.annotate 'line', 3
- if_null rx240_debug, debug_280
+ if_null rx240_debug, debug_285
rx240_cur."!cursor_debug"("NEXT", "metachar:sym<$>")
- debug_280:
+ debug_285:
rx240_fail:
(rx240_rep, rx240_pos, $I10, $P10) = rx240_cur."!mark_fail"(0)
lt rx240_pos, -1, rx240_done
@@ -3391,17 +3303,17 @@
jump $I10
rx240_done:
rx240_cur."!cursor_fail"()
- if_null rx240_debug, debug_281
+ if_null rx240_debug, debug_286
rx240_cur."!cursor_debug"("FAIL", "metachar:sym<$>")
- debug_281:
+ debug_286:
.return (rx240_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<$>" :subid("70_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<$>" :subid("70_1283975941.34404") :method
+.annotate 'line', 0
new $P242, "ResizablePMCArray"
push $P242, "$"
.return ($P242)
@@ -3409,8 +3321,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<$$>" :subid("71_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<$$>" :subid("71_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx246_tgt
.local int rx246_pos
.local int rx246_off
@@ -3431,9 +3343,9 @@
substr rx246_tgt, rx246_tgt, rx246_off
rx246_start:
eq $I10, 1, rx246_restart
- if_null rx246_debug, debug_282
+ if_null rx246_debug, debug_287
rx246_cur."!cursor_debug"("START", "metachar:sym<$$>")
- debug_282:
+ debug_287:
$I10 = self.'from'()
ne $I10, -1, rxscan249_done
goto rxscan249_scan
@@ -3446,7 +3358,6 @@
set_addr $I10, rxscan249_loop
rx246_cur."!mark_push"(0, rx246_pos, $I10)
rxscan249_done:
-.annotate 'line', 92
# rx subcapture "sym"
set_addr $I10, rxcap_250_fail
rx246_cur."!mark_push"(0, rx246_pos, $I10)
@@ -3470,15 +3381,14 @@
rxcap_250_done:
# rx pass
rx246_cur."!cursor_pass"(rx246_pos, "metachar:sym<$$>")
- if_null rx246_debug, debug_283
+ if_null rx246_debug, debug_288
rx246_cur."!cursor_debug"("PASS", "metachar:sym<$$>", " at pos=", rx246_pos)
- debug_283:
+ debug_288:
.return (rx246_cur)
rx246_restart:
-.annotate 'line', 3
- if_null rx246_debug, debug_284
+ if_null rx246_debug, debug_289
rx246_cur."!cursor_debug"("NEXT", "metachar:sym<$$>")
- debug_284:
+ debug_289:
rx246_fail:
(rx246_rep, rx246_pos, $I10, $P10) = rx246_cur."!mark_fail"(0)
lt rx246_pos, -1, rx246_done
@@ -3486,17 +3396,17 @@
jump $I10
rx246_done:
rx246_cur."!cursor_fail"()
- if_null rx246_debug, debug_285
+ if_null rx246_debug, debug_290
rx246_cur."!cursor_debug"("FAIL", "metachar:sym<$$>")
- debug_285:
+ debug_290:
.return (rx246_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<$$>" :subid("72_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<$$>" :subid("72_1283975941.34404") :method
+.annotate 'line', 0
new $P248, "ResizablePMCArray"
push $P248, "$$"
.return ($P248)
@@ -3504,8 +3414,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<:::>" :subid("73_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<:::>" :subid("73_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx252_tgt
.local int rx252_pos
.local int rx252_off
@@ -3526,9 +3436,9 @@
substr rx252_tgt, rx252_tgt, rx252_off
rx252_start:
eq $I10, 1, rx252_restart
- if_null rx252_debug, debug_286
+ if_null rx252_debug, debug_291
rx252_cur."!cursor_debug"("START", "metachar:sym<:::>")
- debug_286:
+ debug_291:
$I10 = self.'from'()
ne $I10, -1, rxscan256_done
goto rxscan256_scan
@@ -3541,7 +3451,6 @@
set_addr $I10, rxscan256_loop
rx252_cur."!mark_push"(0, rx252_pos, $I10)
rxscan256_done:
-.annotate 'line', 93
# rx subcapture "sym"
set_addr $I10, rxcap_257_fail
rx252_cur."!mark_push"(0, rx252_pos, $I10)
@@ -3570,15 +3479,14 @@
rx252_pos = $P10."pos"()
# rx pass
rx252_cur."!cursor_pass"(rx252_pos, "metachar:sym<:::>")
- if_null rx252_debug, debug_287
+ if_null rx252_debug, debug_292
rx252_cur."!cursor_debug"("PASS", "metachar:sym<:::>", " at pos=", rx252_pos)
- debug_287:
+ debug_292:
.return (rx252_cur)
rx252_restart:
-.annotate 'line', 3
- if_null rx252_debug, debug_288
+ if_null rx252_debug, debug_293
rx252_cur."!cursor_debug"("NEXT", "metachar:sym<:::>")
- debug_288:
+ debug_293:
rx252_fail:
(rx252_rep, rx252_pos, $I10, $P10) = rx252_cur."!mark_fail"(0)
lt rx252_pos, -1, rx252_done
@@ -3586,17 +3494,17 @@
jump $I10
rx252_done:
rx252_cur."!cursor_fail"()
- if_null rx252_debug, debug_289
+ if_null rx252_debug, debug_294
rx252_cur."!cursor_debug"("FAIL", "metachar:sym<:::>")
- debug_289:
+ debug_294:
.return (rx252_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<:::>" :subid("74_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<:::>" :subid("74_1283975941.34404") :method
+.annotate 'line', 0
$P254 = self."!PREFIX__!subrule"("panic", ":::")
new $P255, "ResizablePMCArray"
push $P255, $P254
@@ -3605,8 +3513,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<::>" :subid("75_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<::>" :subid("75_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx259_tgt
.local int rx259_pos
.local int rx259_off
@@ -3627,9 +3535,9 @@
substr rx259_tgt, rx259_tgt, rx259_off
rx259_start:
eq $I10, 1, rx259_restart
- if_null rx259_debug, debug_290
+ if_null rx259_debug, debug_295
rx259_cur."!cursor_debug"("START", "metachar:sym<::>")
- debug_290:
+ debug_295:
$I10 = self.'from'()
ne $I10, -1, rxscan263_done
goto rxscan263_scan
@@ -3642,7 +3550,6 @@
set_addr $I10, rxscan263_loop
rx259_cur."!mark_push"(0, rx259_pos, $I10)
rxscan263_done:
-.annotate 'line', 94
# rx subcapture "sym"
set_addr $I10, rxcap_264_fail
rx259_cur."!mark_push"(0, rx259_pos, $I10)
@@ -3671,15 +3578,14 @@
rx259_pos = $P10."pos"()
# rx pass
rx259_cur."!cursor_pass"(rx259_pos, "metachar:sym<::>")
- if_null rx259_debug, debug_291
+ if_null rx259_debug, debug_296
rx259_cur."!cursor_debug"("PASS", "metachar:sym<::>", " at pos=", rx259_pos)
- debug_291:
+ debug_296:
.return (rx259_cur)
rx259_restart:
-.annotate 'line', 3
- if_null rx259_debug, debug_292
+ if_null rx259_debug, debug_297
rx259_cur."!cursor_debug"("NEXT", "metachar:sym<::>")
- debug_292:
+ debug_297:
rx259_fail:
(rx259_rep, rx259_pos, $I10, $P10) = rx259_cur."!mark_fail"(0)
lt rx259_pos, -1, rx259_done
@@ -3687,17 +3593,17 @@
jump $I10
rx259_done:
rx259_cur."!cursor_fail"()
- if_null rx259_debug, debug_293
+ if_null rx259_debug, debug_298
rx259_cur."!cursor_debug"("FAIL", "metachar:sym<::>")
- debug_293:
+ debug_298:
.return (rx259_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<::>" :subid("76_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<::>" :subid("76_1283975941.34404") :method
+.annotate 'line', 0
$P261 = self."!PREFIX__!subrule"("panic", "::")
new $P262, "ResizablePMCArray"
push $P262, $P261
@@ -3706,8 +3612,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<lwb>" :subid("77_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<lwb>" :subid("77_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx266_tgt
.local int rx266_pos
.local int rx266_off
@@ -3728,9 +3634,9 @@
substr rx266_tgt, rx266_tgt, rx266_off
rx266_start:
eq $I10, 1, rx266_restart
- if_null rx266_debug, debug_294
+ if_null rx266_debug, debug_299
rx266_cur."!cursor_debug"("START", "metachar:sym<lwb>")
- debug_294:
+ debug_299:
$I10 = self.'from'()
ne $I10, -1, rxscan269_done
goto rxscan269_scan
@@ -3743,7 +3649,6 @@
set_addr $I10, rxscan269_loop
rx266_cur."!mark_push"(0, rx266_pos, $I10)
rxscan269_done:
-.annotate 'line', 95
# rx subcapture "sym"
set_addr $I10, rxcap_271_fail
rx266_cur."!mark_push"(0, rx266_pos, $I10)
@@ -3780,15 +3685,14 @@
rxcap_271_done:
# rx pass
rx266_cur."!cursor_pass"(rx266_pos, "metachar:sym<lwb>")
- if_null rx266_debug, debug_295
+ if_null rx266_debug, debug_300
rx266_cur."!cursor_debug"("PASS", "metachar:sym<lwb>", " at pos=", rx266_pos)
- debug_295:
+ debug_300:
.return (rx266_cur)
rx266_restart:
-.annotate 'line', 3
- if_null rx266_debug, debug_296
+ if_null rx266_debug, debug_301
rx266_cur."!cursor_debug"("NEXT", "metachar:sym<lwb>")
- debug_296:
+ debug_301:
rx266_fail:
(rx266_rep, rx266_pos, $I10, $P10) = rx266_cur."!mark_fail"(0)
lt rx266_pos, -1, rx266_done
@@ -3796,17 +3700,17 @@
jump $I10
rx266_done:
rx266_cur."!cursor_fail"()
- if_null rx266_debug, debug_297
+ if_null rx266_debug, debug_302
rx266_cur."!cursor_debug"("FAIL", "metachar:sym<lwb>")
- debug_297:
+ debug_302:
.return (rx266_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<lwb>" :subid("78_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<lwb>" :subid("78_1283975941.34404") :method
+.annotate 'line', 0
new $P268, "ResizablePMCArray"
push $P268, unicode:"\x{ab}"
push $P268, "<<"
@@ -3815,8 +3719,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<rwb>" :subid("79_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<rwb>" :subid("79_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx273_tgt
.local int rx273_pos
.local int rx273_off
@@ -3837,9 +3741,9 @@
substr rx273_tgt, rx273_tgt, rx273_off
rx273_start:
eq $I10, 1, rx273_restart
- if_null rx273_debug, debug_298
+ if_null rx273_debug, debug_303
rx273_cur."!cursor_debug"("START", "metachar:sym<rwb>")
- debug_298:
+ debug_303:
$I10 = self.'from'()
ne $I10, -1, rxscan276_done
goto rxscan276_scan
@@ -3852,7 +3756,6 @@
set_addr $I10, rxscan276_loop
rx273_cur."!mark_push"(0, rx273_pos, $I10)
rxscan276_done:
-.annotate 'line', 96
# rx subcapture "sym"
set_addr $I10, rxcap_278_fail
rx273_cur."!mark_push"(0, rx273_pos, $I10)
@@ -3889,15 +3792,14 @@
rxcap_278_done:
# rx pass
rx273_cur."!cursor_pass"(rx273_pos, "metachar:sym<rwb>")
- if_null rx273_debug, debug_299
+ if_null rx273_debug, debug_304
rx273_cur."!cursor_debug"("PASS", "metachar:sym<rwb>", " at pos=", rx273_pos)
- debug_299:
+ debug_304:
.return (rx273_cur)
rx273_restart:
-.annotate 'line', 3
- if_null rx273_debug, debug_300
+ if_null rx273_debug, debug_305
rx273_cur."!cursor_debug"("NEXT", "metachar:sym<rwb>")
- debug_300:
+ debug_305:
rx273_fail:
(rx273_rep, rx273_pos, $I10, $P10) = rx273_cur."!mark_fail"(0)
lt rx273_pos, -1, rx273_done
@@ -3905,17 +3807,17 @@
jump $I10
rx273_done:
rx273_cur."!cursor_fail"()
- if_null rx273_debug, debug_301
+ if_null rx273_debug, debug_306
rx273_cur."!cursor_debug"("FAIL", "metachar:sym<rwb>")
- debug_301:
+ debug_306:
.return (rx273_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<rwb>" :subid("80_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<rwb>" :subid("80_1283975941.34404") :method
+.annotate 'line', 0
new $P275, "ResizablePMCArray"
push $P275, unicode:"\x{bb}"
push $P275, ">>"
@@ -3924,8 +3826,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<bs>" :subid("81_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<bs>" :subid("81_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx280_tgt
.local int rx280_pos
.local int rx280_off
@@ -3946,9 +3848,9 @@
substr rx280_tgt, rx280_tgt, rx280_off
rx280_start:
eq $I10, 1, rx280_restart
- if_null rx280_debug, debug_302
+ if_null rx280_debug, debug_307
rx280_cur."!cursor_debug"("START", "metachar:sym<bs>")
- debug_302:
+ debug_307:
$I10 = self.'from'()
ne $I10, -1, rxscan284_done
goto rxscan284_scan
@@ -3961,7 +3863,6 @@
set_addr $I10, rxscan284_loop
rx280_cur."!mark_push"(0, rx280_pos, $I10)
rxscan284_done:
-.annotate 'line', 97
# rx literal "\\"
add $I11, rx280_pos, 1
gt $I11, rx280_eos, rx280_fail
@@ -3978,15 +3879,14 @@
rx280_pos = $P10."pos"()
# rx pass
rx280_cur."!cursor_pass"(rx280_pos, "metachar:sym<bs>")
- if_null rx280_debug, debug_303
+ if_null rx280_debug, debug_308
rx280_cur."!cursor_debug"("PASS", "metachar:sym<bs>", " at pos=", rx280_pos)
- debug_303:
+ debug_308:
.return (rx280_cur)
rx280_restart:
-.annotate 'line', 3
- if_null rx280_debug, debug_304
+ if_null rx280_debug, debug_309
rx280_cur."!cursor_debug"("NEXT", "metachar:sym<bs>")
- debug_304:
+ debug_309:
rx280_fail:
(rx280_rep, rx280_pos, $I10, $P10) = rx280_cur."!mark_fail"(0)
lt rx280_pos, -1, rx280_done
@@ -3994,17 +3894,17 @@
jump $I10
rx280_done:
rx280_cur."!cursor_fail"()
- if_null rx280_debug, debug_305
+ if_null rx280_debug, debug_310
rx280_cur."!cursor_debug"("FAIL", "metachar:sym<bs>")
- debug_305:
+ debug_310:
.return (rx280_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<bs>" :subid("82_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<bs>" :subid("82_1283975941.34404") :method
+.annotate 'line', 0
$P282 = self."!PREFIX__!subrule"("backslash", "\\")
new $P283, "ResizablePMCArray"
push $P283, $P282
@@ -4013,8 +3913,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<mod>" :subid("83_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<mod>" :subid("83_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx286_tgt
.local int rx286_pos
.local int rx286_off
@@ -4035,9 +3935,9 @@
substr rx286_tgt, rx286_tgt, rx286_off
rx286_start:
eq $I10, 1, rx286_restart
- if_null rx286_debug, debug_306
+ if_null rx286_debug, debug_311
rx286_cur."!cursor_debug"("START", "metachar:sym<mod>")
- debug_306:
+ debug_311:
$I10 = self.'from'()
ne $I10, -1, rxscan290_done
goto rxscan290_scan
@@ -4050,7 +3950,6 @@
set_addr $I10, rxscan290_loop
rx286_cur."!mark_push"(0, rx286_pos, $I10)
rxscan290_done:
-.annotate 'line', 98
# rx subrule "mod_internal" subtype=capture negate=
rx286_cur."!cursor_pos"(rx286_pos)
$P10 = rx286_cur."mod_internal"()
@@ -4060,15 +3959,14 @@
rx286_pos = $P10."pos"()
# rx pass
rx286_cur."!cursor_pass"(rx286_pos, "metachar:sym<mod>")
- if_null rx286_debug, debug_307
+ if_null rx286_debug, debug_312
rx286_cur."!cursor_debug"("PASS", "metachar:sym<mod>", " at pos=", rx286_pos)
- debug_307:
+ debug_312:
.return (rx286_cur)
rx286_restart:
-.annotate 'line', 3
- if_null rx286_debug, debug_308
+ if_null rx286_debug, debug_313
rx286_cur."!cursor_debug"("NEXT", "metachar:sym<mod>")
- debug_308:
+ debug_313:
rx286_fail:
(rx286_rep, rx286_pos, $I10, $P10) = rx286_cur."!mark_fail"(0)
lt rx286_pos, -1, rx286_done
@@ -4076,17 +3974,17 @@
jump $I10
rx286_done:
rx286_cur."!cursor_fail"()
- if_null rx286_debug, debug_309
+ if_null rx286_debug, debug_314
rx286_cur."!cursor_debug"("FAIL", "metachar:sym<mod>")
- debug_309:
+ debug_314:
.return (rx286_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<mod>" :subid("84_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__metachar:sym<mod>" :subid("84_1283975941.34404") :method
+.annotate 'line', 0
$P288 = self."!PREFIX__!subrule"("mod_internal", "")
new $P289, "ResizablePMCArray"
push $P289, $P288
@@ -4095,8 +3993,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<~>" :subid("85_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "metachar:sym<quantifier>" :subid("85_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx292_tgt
.local int rx292_pos
.local int rx292_off
@@ -4117,9 +4015,9 @@
substr rx292_tgt, rx292_tgt, rx292_off
rx292_start:
eq $I10, 1, rx292_restart
- if_null rx292_debug, debug_310
- rx292_cur."!cursor_debug"("START", "metachar:sym<~>")
- debug_310:
+ if_null rx292_debug, debug_315
+ rx292_cur."!cursor_debug"("START", "metachar:sym<quantifier>")
+ debug_315:
$I10 = self.'from'()
ne $I10, -1, rxscan296_done
goto rxscan296_scan
@@ -4132,66 +4030,28 @@
set_addr $I10, rxscan296_loop
rx292_cur."!mark_push"(0, rx292_pos, $I10)
rxscan296_done:
-.annotate 'line', 102
- # rx subcapture "sym"
- set_addr $I10, rxcap_297_fail
- rx292_cur."!mark_push"(0, rx292_pos, $I10)
- # rx literal "~"
- add $I11, rx292_pos, 1
- gt $I11, rx292_eos, rx292_fail
- sub $I11, rx292_pos, rx292_off
- ord $I11, rx292_tgt, $I11
- ne $I11, 126, rx292_fail
- add rx292_pos, 1
- set_addr $I10, rxcap_297_fail
- ($I12, $I11) = rx292_cur."!mark_peek"($I10)
- rx292_cur."!cursor_pos"($I11)
- ($P10) = rx292_cur."!cursor_start"()
- $P10."!cursor_pass"(rx292_pos, "")
- rx292_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("sym")
- goto rxcap_297_done
- rxcap_297_fail:
- goto rx292_fail
- rxcap_297_done:
-.annotate 'line', 103
- # rx subrule "ws" subtype=method negate=
- rx292_cur."!cursor_pos"(rx292_pos)
- $P10 = rx292_cur."ws"()
- unless $P10, rx292_fail
- rx292_pos = $P10."pos"()
- # rx subrule "quantified_atom" subtype=capture negate=
+ # rx subrule "quantifier" subtype=capture negate=
rx292_cur."!cursor_pos"(rx292_pos)
- $P10 = rx292_cur."quantified_atom"()
+ $P10 = rx292_cur."quantifier"()
unless $P10, rx292_fail
rx292_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("GOAL")
- rx292_pos = $P10."pos"()
-.annotate 'line', 104
- # rx subrule "ws" subtype=method negate=
- rx292_cur."!cursor_pos"(rx292_pos)
- $P10 = rx292_cur."ws"()
- unless $P10, rx292_fail
+ $P10."!cursor_names"("quantifier")
rx292_pos = $P10."pos"()
- # rx subrule "quantified_atom" subtype=capture negate=
+ # rx subrule "panic" subtype=method negate=
rx292_cur."!cursor_pos"(rx292_pos)
- $P10 = rx292_cur."quantified_atom"()
+ $P10 = rx292_cur."panic"("Quantifier quantifies nothing")
unless $P10, rx292_fail
- rx292_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("EXPR")
rx292_pos = $P10."pos"()
-.annotate 'line', 101
# rx pass
- rx292_cur."!cursor_pass"(rx292_pos, "metachar:sym<~>")
- if_null rx292_debug, debug_311
- rx292_cur."!cursor_debug"("PASS", "metachar:sym<~>", " at pos=", rx292_pos)
- debug_311:
+ rx292_cur."!cursor_pass"(rx292_pos, "metachar:sym<quantifier>")
+ if_null rx292_debug, debug_316
+ rx292_cur."!cursor_debug"("PASS", "metachar:sym<quantifier>", " at pos=", rx292_pos)
+ debug_316:
.return (rx292_cur)
rx292_restart:
-.annotate 'line', 3
- if_null rx292_debug, debug_312
- rx292_cur."!cursor_debug"("NEXT", "metachar:sym<~>")
- debug_312:
+ if_null rx292_debug, debug_317
+ rx292_cur."!cursor_debug"("NEXT", "metachar:sym<quantifier>")
+ debug_317:
rx292_fail:
(rx292_rep, rx292_pos, $I10, $P10) = rx292_cur."!mark_fail"(0)
lt rx292_pos, -1, rx292_done
@@ -4199,18 +4059,18 @@
jump $I10
rx292_done:
rx292_cur."!cursor_fail"()
- if_null rx292_debug, debug_313
- rx292_cur."!cursor_debug"("FAIL", "metachar:sym<~>")
- debug_313:
+ if_null rx292_debug, debug_318
+ rx292_cur."!cursor_debug"("FAIL", "metachar:sym<quantifier>")
+ debug_318:
.return (rx292_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<~>" :subid("86_1283368197.39621") :method
-.annotate 'line', 3
- $P294 = self."!PREFIX__!subrule"("ws", "~")
+.sub "!PREFIX__metachar:sym<quantifier>" :subid("86_1283975941.34404") :method
+.annotate 'line', 0
+ $P294 = self."!PREFIX__!subrule"("quantifier", "")
new $P295, "ResizablePMCArray"
push $P295, $P294
.return ($P295)
@@ -4218,731 +4078,730 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<{*}>" :subid("87_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx299_tgt
- .local int rx299_pos
- .local int rx299_off
- .local int rx299_eos
- .local int rx299_rep
- .local pmc rx299_cur
- .local pmc rx299_debug
- (rx299_cur, rx299_pos, rx299_tgt, $I10) = self."!cursor_start"()
- rx299_cur."!cursor_caparray"("key")
- getattribute rx299_debug, rx299_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx299_cur
- .local pmc match
- .lex "$/", match
- length rx299_eos, rx299_tgt
- gt rx299_pos, rx299_eos, rx299_done
- set rx299_off, 0
- lt rx299_pos, 2, rx299_start
- sub rx299_off, rx299_pos, 1
- substr rx299_tgt, rx299_tgt, rx299_off
- rx299_start:
- eq $I10, 1, rx299_restart
- if_null rx299_debug, debug_314
- rx299_cur."!cursor_debug"("START", "metachar:sym<{*}>")
- debug_314:
+.sub "metachar:sym<~>" :subid("87_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx298_tgt
+ .local int rx298_pos
+ .local int rx298_off
+ .local int rx298_eos
+ .local int rx298_rep
+ .local pmc rx298_cur
+ .local pmc rx298_debug
+ (rx298_cur, rx298_pos, rx298_tgt, $I10) = self."!cursor_start"()
+ getattribute rx298_debug, rx298_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx298_cur
+ .local pmc match
+ .lex "$/", match
+ length rx298_eos, rx298_tgt
+ gt rx298_pos, rx298_eos, rx298_done
+ set rx298_off, 0
+ lt rx298_pos, 2, rx298_start
+ sub rx298_off, rx298_pos, 1
+ substr rx298_tgt, rx298_tgt, rx298_off
+ rx298_start:
+ eq $I10, 1, rx298_restart
+ if_null rx298_debug, debug_319
+ rx298_cur."!cursor_debug"("START", "metachar:sym<~>")
+ debug_319:
$I10 = self.'from'()
ne $I10, -1, rxscan302_done
goto rxscan302_scan
rxscan302_loop:
- ($P10) = rx299_cur."from"()
+ ($P10) = rx298_cur."from"()
inc $P10
- set rx299_pos, $P10
- ge rx299_pos, rx299_eos, rxscan302_done
+ set rx298_pos, $P10
+ ge rx298_pos, rx298_eos, rxscan302_done
rxscan302_scan:
set_addr $I10, rxscan302_loop
- rx299_cur."!mark_push"(0, rx299_pos, $I10)
+ rx298_cur."!mark_push"(0, rx298_pos, $I10)
rxscan302_done:
-.annotate 'line', 108
# rx subcapture "sym"
set_addr $I10, rxcap_303_fail
- rx299_cur."!mark_push"(0, rx299_pos, $I10)
- # rx literal "{*}"
- add $I11, rx299_pos, 3
- gt $I11, rx299_eos, rx299_fail
- sub $I11, rx299_pos, rx299_off
- substr $S10, rx299_tgt, $I11, 3
- ne $S10, "{*}", rx299_fail
- add rx299_pos, 3
+ rx298_cur."!mark_push"(0, rx298_pos, $I10)
+ # rx literal "~"
+ add $I11, rx298_pos, 1
+ gt $I11, rx298_eos, rx298_fail
+ sub $I11, rx298_pos, rx298_off
+ ord $I11, rx298_tgt, $I11
+ ne $I11, 126, rx298_fail
+ add rx298_pos, 1
set_addr $I10, rxcap_303_fail
- ($I12, $I11) = rx299_cur."!mark_peek"($I10)
- rx299_cur."!cursor_pos"($I11)
- ($P10) = rx299_cur."!cursor_start"()
- $P10."!cursor_pass"(rx299_pos, "")
- rx299_cur."!mark_push"(0, -1, 0, $P10)
+ ($I12, $I11) = rx298_cur."!mark_peek"($I10)
+ rx298_cur."!cursor_pos"($I11)
+ ($P10) = rx298_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx298_pos, "")
+ rx298_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
goto rxcap_303_done
rxcap_303_fail:
- goto rx299_fail
+ goto rx298_fail
rxcap_303_done:
-.annotate 'line', 109
- # rx rxquantr304 ** 0..1
- set_addr $I10, rxquantr304_done
- rx299_cur."!mark_push"(0, rx299_pos, $I10)
- rxquantr304_loop:
+ # rx subrule "ws" subtype=method negate=
+ rx298_cur."!cursor_pos"(rx298_pos)
+ $P10 = rx298_cur."ws"()
+ unless $P10, rx298_fail
+ rx298_pos = $P10."pos"()
+ # rx subrule "quantified_atom" subtype=capture negate=
+ rx298_cur."!cursor_pos"(rx298_pos)
+ $P10 = rx298_cur."quantified_atom"()
+ unless $P10, rx298_fail
+ rx298_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("GOAL")
+ rx298_pos = $P10."pos"()
+ # rx subrule "ws" subtype=method negate=
+ rx298_cur."!cursor_pos"(rx298_pos)
+ $P10 = rx298_cur."ws"()
+ unless $P10, rx298_fail
+ rx298_pos = $P10."pos"()
+ # rx subrule "quantified_atom" subtype=capture negate=
+ rx298_cur."!cursor_pos"(rx298_pos)
+ $P10 = rx298_cur."quantified_atom"()
+ unless $P10, rx298_fail
+ rx298_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("EXPR")
+ rx298_pos = $P10."pos"()
+ # rx pass
+ rx298_cur."!cursor_pass"(rx298_pos, "metachar:sym<~>")
+ if_null rx298_debug, debug_320
+ rx298_cur."!cursor_debug"("PASS", "metachar:sym<~>", " at pos=", rx298_pos)
+ debug_320:
+ .return (rx298_cur)
+ rx298_restart:
+ if_null rx298_debug, debug_321
+ rx298_cur."!cursor_debug"("NEXT", "metachar:sym<~>")
+ debug_321:
+ rx298_fail:
+ (rx298_rep, rx298_pos, $I10, $P10) = rx298_cur."!mark_fail"(0)
+ lt rx298_pos, -1, rx298_done
+ eq rx298_pos, -1, rx298_fail
+ jump $I10
+ rx298_done:
+ rx298_cur."!cursor_fail"()
+ if_null rx298_debug, debug_322
+ rx298_cur."!cursor_debug"("FAIL", "metachar:sym<~>")
+ debug_322:
+ .return (rx298_cur)
+ .return ()
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "!PREFIX__metachar:sym<~>" :subid("88_1283975941.34404") :method
+.annotate 'line', 0
+ $P300 = self."!PREFIX__!subrule"("ws", "~")
+ new $P301, "ResizablePMCArray"
+ push $P301, $P300
+ .return ($P301)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "metachar:sym<{*}>" :subid("89_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx305_tgt
+ .local int rx305_pos
+ .local int rx305_off
+ .local int rx305_eos
+ .local int rx305_rep
+ .local pmc rx305_cur
+ .local pmc rx305_debug
+ (rx305_cur, rx305_pos, rx305_tgt, $I10) = self."!cursor_start"()
+ rx305_cur."!cursor_caparray"("key")
+ getattribute rx305_debug, rx305_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx305_cur
+ .local pmc match
+ .lex "$/", match
+ length rx305_eos, rx305_tgt
+ gt rx305_pos, rx305_eos, rx305_done
+ set rx305_off, 0
+ lt rx305_pos, 2, rx305_start
+ sub rx305_off, rx305_pos, 1
+ substr rx305_tgt, rx305_tgt, rx305_off
+ rx305_start:
+ eq $I10, 1, rx305_restart
+ if_null rx305_debug, debug_323
+ rx305_cur."!cursor_debug"("START", "metachar:sym<{*}>")
+ debug_323:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan308_done
+ goto rxscan308_scan
+ rxscan308_loop:
+ ($P10) = rx305_cur."from"()
+ inc $P10
+ set rx305_pos, $P10
+ ge rx305_pos, rx305_eos, rxscan308_done
+ rxscan308_scan:
+ set_addr $I10, rxscan308_loop
+ rx305_cur."!mark_push"(0, rx305_pos, $I10)
+ rxscan308_done:
+ # rx subcapture "sym"
+ set_addr $I10, rxcap_309_fail
+ rx305_cur."!mark_push"(0, rx305_pos, $I10)
+ # rx literal "{*}"
+ add $I11, rx305_pos, 3
+ gt $I11, rx305_eos, rx305_fail
+ sub $I11, rx305_pos, rx305_off
+ substr $S10, rx305_tgt, $I11, 3
+ ne $S10, "{*}", rx305_fail
+ add rx305_pos, 3
+ set_addr $I10, rxcap_309_fail
+ ($I12, $I11) = rx305_cur."!mark_peek"($I10)
+ rx305_cur."!cursor_pos"($I11)
+ ($P10) = rx305_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx305_pos, "")
+ rx305_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("sym")
+ goto rxcap_309_done
+ rxcap_309_fail:
+ goto rx305_fail
+ rxcap_309_done:
+ # rx rxquantr310 ** 0..1
+ set_addr $I10, rxquantr310_done
+ rx305_cur."!mark_push"(0, rx305_pos, $I10)
+ rxquantr310_loop:
# rx enumcharlist_q negate=0 r 0..-1
- sub $I10, rx299_pos, rx299_off
- set rx299_rep, 0
- sub $I12, rx299_eos, rx299_pos
- rxenumcharlistq305_loop:
- le $I12, 0, rxenumcharlistq305_done
- substr $S10, rx299_tgt, $I10, 1
+ sub $I10, rx305_pos, rx305_off
+ set rx305_rep, 0
+ sub $I12, rx305_eos, rx305_pos
+ rxenumcharlistq311_loop:
+ le $I12, 0, rxenumcharlistq311_done
+ substr $S10, rx305_tgt, $I10, 1
index $I11, unicode:"\t \x{a0}\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000", $S10
- lt $I11, 0, rxenumcharlistq305_done
- inc rx299_rep
+ lt $I11, 0, rxenumcharlistq311_done
+ inc rx305_rep
inc $I10
dec $I12
- goto rxenumcharlistq305_loop
- rxenumcharlistq305_done:
- add rx299_pos, rx299_pos, rx299_rep
+ goto rxenumcharlistq311_loop
+ rxenumcharlistq311_done:
+ add rx305_pos, rx305_pos, rx305_rep
# rx literal "#= "
- add $I11, rx299_pos, 3
- gt $I11, rx299_eos, rx299_fail
- sub $I11, rx299_pos, rx299_off
- substr $S10, rx299_tgt, $I11, 3
- ne $S10, "#= ", rx299_fail
- add rx299_pos, 3
+ add $I11, rx305_pos, 3
+ gt $I11, rx305_eos, rx305_fail
+ sub $I11, rx305_pos, rx305_off
+ substr $S10, rx305_tgt, $I11, 3
+ ne $S10, "#= ", rx305_fail
+ add rx305_pos, 3
# rx enumcharlist_q negate=0 r 0..-1
- sub $I10, rx299_pos, rx299_off
- set rx299_rep, 0
- sub $I12, rx299_eos, rx299_pos
- rxenumcharlistq306_loop:
- le $I12, 0, rxenumcharlistq306_done
- substr $S10, rx299_tgt, $I10, 1
+ sub $I10, rx305_pos, rx305_off
+ set rx305_rep, 0
+ sub $I12, rx305_eos, rx305_pos
+ rxenumcharlistq312_loop:
+ le $I12, 0, rxenumcharlistq312_done
+ substr $S10, rx305_tgt, $I10, 1
index $I11, unicode:"\t \x{a0}\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000", $S10
- lt $I11, 0, rxenumcharlistq306_done
- inc rx299_rep
+ lt $I11, 0, rxenumcharlistq312_done
+ inc rx305_rep
inc $I10
dec $I12
- goto rxenumcharlistq306_loop
- rxenumcharlistq306_done:
- add rx299_pos, rx299_pos, rx299_rep
+ goto rxenumcharlistq312_loop
+ rxenumcharlistq312_done:
+ add rx305_pos, rx305_pos, rx305_rep
# rx subcapture "key"
- set_addr $I10, rxcap_309_fail
- rx299_cur."!mark_push"(0, rx299_pos, $I10)
+ set_addr $I10, rxcap_315_fail
+ rx305_cur."!mark_push"(0, rx305_pos, $I10)
# rx charclass_q S r 1..-1
- sub $I10, rx299_pos, rx299_off
- find_cclass $I11, 32, rx299_tgt, $I10, rx299_eos
+ sub $I10, rx305_pos, rx305_off
+ find_cclass $I11, 32, rx305_tgt, $I10, rx305_eos
add $I12, $I10, 1
- lt $I11, $I12, rx299_fail
- add rx299_pos, rx299_off, $I11
- # rx rxquantr307 ** 0..*
- set_addr $I10, rxquantr307_done
- rx299_cur."!mark_push"(0, rx299_pos, $I10)
- rxquantr307_loop:
+ lt $I11, $I12, rx305_fail
+ add rx305_pos, rx305_off, $I11
+ # rx rxquantr313 ** 0..*
+ set_addr $I10, rxquantr313_done
+ rx305_cur."!mark_push"(0, rx305_pos, $I10)
+ rxquantr313_loop:
# rx enumcharlist_q negate=0 r 1..-1
- sub $I10, rx299_pos, rx299_off
- set rx299_rep, 0
- sub $I12, rx299_eos, rx299_pos
- rxenumcharlistq308_loop:
- le $I12, 0, rxenumcharlistq308_done
- substr $S10, rx299_tgt, $I10, 1
+ sub $I10, rx305_pos, rx305_off
+ set rx305_rep, 0
+ sub $I12, rx305_eos, rx305_pos
+ rxenumcharlistq314_loop:
+ le $I12, 0, rxenumcharlistq314_done
+ substr $S10, rx305_tgt, $I10, 1
index $I11, unicode:"\t \x{a0}\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000", $S10
- lt $I11, 0, rxenumcharlistq308_done
- inc rx299_rep
+ lt $I11, 0, rxenumcharlistq314_done
+ inc rx305_rep
inc $I10
dec $I12
- goto rxenumcharlistq308_loop
- rxenumcharlistq308_done:
- lt rx299_rep, 1, rx299_fail
- add rx299_pos, rx299_pos, rx299_rep
+ goto rxenumcharlistq314_loop
+ rxenumcharlistq314_done:
+ lt rx305_rep, 1, rx305_fail
+ add rx305_pos, rx305_pos, rx305_rep
# rx charclass_q S r 1..-1
- sub $I10, rx299_pos, rx299_off
- find_cclass $I11, 32, rx299_tgt, $I10, rx299_eos
+ sub $I10, rx305_pos, rx305_off
+ find_cclass $I11, 32, rx305_tgt, $I10, rx305_eos
add $I12, $I10, 1
- lt $I11, $I12, rx299_fail
- add rx299_pos, rx299_off, $I11
- set_addr $I10, rxquantr307_done
- (rx299_rep) = rx299_cur."!mark_commit"($I10)
- set_addr $I10, rxquantr307_done
- rx299_cur."!mark_push"(rx299_rep, rx299_pos, $I10)
- goto rxquantr307_loop
- rxquantr307_done:
- set_addr $I10, rxcap_309_fail
- ($I12, $I11) = rx299_cur."!mark_peek"($I10)
- rx299_cur."!cursor_pos"($I11)
- ($P10) = rx299_cur."!cursor_start"()
- $P10."!cursor_pass"(rx299_pos, "")
- rx299_cur."!mark_push"(0, -1, 0, $P10)
+ lt $I11, $I12, rx305_fail
+ add rx305_pos, rx305_off, $I11
+ set_addr $I10, rxquantr313_done
+ (rx305_rep) = rx305_cur."!mark_commit"($I10)
+ set_addr $I10, rxquantr313_done
+ rx305_cur."!mark_push"(rx305_rep, rx305_pos, $I10)
+ goto rxquantr313_loop
+ rxquantr313_done:
+ set_addr $I10, rxcap_315_fail
+ ($I12, $I11) = rx305_cur."!mark_peek"($I10)
+ rx305_cur."!cursor_pos"($I11)
+ ($P10) = rx305_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx305_pos, "")
+ rx305_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("key")
- goto rxcap_309_done
- rxcap_309_fail:
- goto rx299_fail
- rxcap_309_done:
- set_addr $I10, rxquantr304_done
- (rx299_rep) = rx299_cur."!mark_commit"($I10)
- rxquantr304_done:
-.annotate 'line', 107
- # rx pass
- rx299_cur."!cursor_pass"(rx299_pos, "metachar:sym<{*}>")
- if_null rx299_debug, debug_315
- rx299_cur."!cursor_debug"("PASS", "metachar:sym<{*}>", " at pos=", rx299_pos)
- debug_315:
- .return (rx299_cur)
- rx299_restart:
-.annotate 'line', 3
- if_null rx299_debug, debug_316
- rx299_cur."!cursor_debug"("NEXT", "metachar:sym<{*}>")
- debug_316:
- rx299_fail:
- (rx299_rep, rx299_pos, $I10, $P10) = rx299_cur."!mark_fail"(0)
- lt rx299_pos, -1, rx299_done
- eq rx299_pos, -1, rx299_fail
- jump $I10
- rx299_done:
- rx299_cur."!cursor_fail"()
- if_null rx299_debug, debug_317
- rx299_cur."!cursor_debug"("FAIL", "metachar:sym<{*}>")
- debug_317:
- .return (rx299_cur)
+ goto rxcap_315_done
+ rxcap_315_fail:
+ goto rx305_fail
+ rxcap_315_done:
+ set_addr $I10, rxquantr310_done
+ (rx305_rep) = rx305_cur."!mark_commit"($I10)
+ rxquantr310_done:
+ # rx pass
+ rx305_cur."!cursor_pass"(rx305_pos, "metachar:sym<{*}>")
+ if_null rx305_debug, debug_324
+ rx305_cur."!cursor_debug"("PASS", "metachar:sym<{*}>", " at pos=", rx305_pos)
+ debug_324:
+ .return (rx305_cur)
+ rx305_restart:
+ if_null rx305_debug, debug_325
+ rx305_cur."!cursor_debug"("NEXT", "metachar:sym<{*}>")
+ debug_325:
+ rx305_fail:
+ (rx305_rep, rx305_pos, $I10, $P10) = rx305_cur."!mark_fail"(0)
+ lt rx305_pos, -1, rx305_done
+ eq rx305_pos, -1, rx305_fail
+ jump $I10
+ rx305_done:
+ rx305_cur."!cursor_fail"()
+ if_null rx305_debug, debug_326
+ rx305_cur."!cursor_debug"("FAIL", "metachar:sym<{*}>")
+ debug_326:
+ .return (rx305_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<{*}>" :subid("88_1283368197.39621") :method
-.annotate 'line', 3
- new $P301, "ResizablePMCArray"
- push $P301, "{*}"
- .return ($P301)
+.sub "!PREFIX__metachar:sym<{*}>" :subid("90_1283975941.34404") :method
+.annotate 'line', 0
+ new $P307, "ResizablePMCArray"
+ push $P307, "{*}"
+ .return ($P307)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<assert>" :subid("89_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx311_tgt
- .local int rx311_pos
- .local int rx311_off
- .local int rx311_eos
- .local int rx311_rep
- .local pmc rx311_cur
- .local pmc rx311_debug
- (rx311_cur, rx311_pos, rx311_tgt, $I10) = self."!cursor_start"()
- getattribute rx311_debug, rx311_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx311_cur
- .local pmc match
- .lex "$/", match
- length rx311_eos, rx311_tgt
- gt rx311_pos, rx311_eos, rx311_done
- set rx311_off, 0
- lt rx311_pos, 2, rx311_start
- sub rx311_off, rx311_pos, 1
- substr rx311_tgt, rx311_tgt, rx311_off
- rx311_start:
- eq $I10, 1, rx311_restart
- if_null rx311_debug, debug_318
- rx311_cur."!cursor_debug"("START", "metachar:sym<assert>")
- debug_318:
+.sub "metachar:sym<assert>" :subid("91_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx317_tgt
+ .local int rx317_pos
+ .local int rx317_off
+ .local int rx317_eos
+ .local int rx317_rep
+ .local pmc rx317_cur
+ .local pmc rx317_debug
+ (rx317_cur, rx317_pos, rx317_tgt, $I10) = self."!cursor_start"()
+ getattribute rx317_debug, rx317_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx317_cur
+ .local pmc match
+ .lex "$/", match
+ length rx317_eos, rx317_tgt
+ gt rx317_pos, rx317_eos, rx317_done
+ set rx317_off, 0
+ lt rx317_pos, 2, rx317_start
+ sub rx317_off, rx317_pos, 1
+ substr rx317_tgt, rx317_tgt, rx317_off
+ rx317_start:
+ eq $I10, 1, rx317_restart
+ if_null rx317_debug, debug_327
+ rx317_cur."!cursor_debug"("START", "metachar:sym<assert>")
+ debug_327:
$I10 = self.'from'()
- ne $I10, -1, rxscan315_done
- goto rxscan315_scan
- rxscan315_loop:
- ($P10) = rx311_cur."from"()
- inc $P10
- set rx311_pos, $P10
- ge rx311_pos, rx311_eos, rxscan315_done
- rxscan315_scan:
- set_addr $I10, rxscan315_loop
- rx311_cur."!mark_push"(0, rx311_pos, $I10)
- rxscan315_done:
-.annotate 'line', 112
+ ne $I10, -1, rxscan321_done
+ goto rxscan321_scan
+ rxscan321_loop:
+ ($P10) = rx317_cur."from"()
+ inc $P10
+ set rx317_pos, $P10
+ ge rx317_pos, rx317_eos, rxscan321_done
+ rxscan321_scan:
+ set_addr $I10, rxscan321_loop
+ rx317_cur."!mark_push"(0, rx317_pos, $I10)
+ rxscan321_done:
# rx literal "<"
- add $I11, rx311_pos, 1
- gt $I11, rx311_eos, rx311_fail
- sub $I11, rx311_pos, rx311_off
- ord $I11, rx311_tgt, $I11
- ne $I11, 60, rx311_fail
- add rx311_pos, 1
+ add $I11, rx317_pos, 1
+ gt $I11, rx317_eos, rx317_fail
+ sub $I11, rx317_pos, rx317_off
+ ord $I11, rx317_tgt, $I11
+ ne $I11, 60, rx317_fail
+ add rx317_pos, 1
# rx subrule "assertion" subtype=capture negate=
- rx311_cur."!cursor_pos"(rx311_pos)
- $P10 = rx311_cur."assertion"()
- unless $P10, rx311_fail
- rx311_cur."!mark_push"(0, -1, 0, $P10)
+ rx317_cur."!cursor_pos"(rx317_pos)
+ $P10 = rx317_cur."assertion"()
+ unless $P10, rx317_fail
+ rx317_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("assertion")
- rx311_pos = $P10."pos"()
- alt316_0:
-.annotate 'line', 113
- set_addr $I10, alt316_1
- rx311_cur."!mark_push"(0, rx311_pos, $I10)
+ rx317_pos = $P10."pos"()
+ alt322_0:
+ set_addr $I10, alt322_1
+ rx317_cur."!mark_push"(0, rx317_pos, $I10)
# rx literal ">"
- add $I11, rx311_pos, 1
- gt $I11, rx311_eos, rx311_fail
- sub $I11, rx311_pos, rx311_off
- ord $I11, rx311_tgt, $I11
- ne $I11, 62, rx311_fail
- add rx311_pos, 1
- goto alt316_end
- alt316_1:
+ add $I11, rx317_pos, 1
+ gt $I11, rx317_eos, rx317_fail
+ sub $I11, rx317_pos, rx317_off
+ ord $I11, rx317_tgt, $I11
+ ne $I11, 62, rx317_fail
+ add rx317_pos, 1
+ goto alt322_end
+ alt322_1:
# rx subrule "panic" subtype=method negate=
- rx311_cur."!cursor_pos"(rx311_pos)
- $P10 = rx311_cur."panic"("regex assertion not terminated by angle bracket")
- unless $P10, rx311_fail
- rx311_pos = $P10."pos"()
- alt316_end:
-.annotate 'line', 111
- # rx pass
- rx311_cur."!cursor_pass"(rx311_pos, "metachar:sym<assert>")
- if_null rx311_debug, debug_319
- rx311_cur."!cursor_debug"("PASS", "metachar:sym<assert>", " at pos=", rx311_pos)
- debug_319:
- .return (rx311_cur)
- rx311_restart:
-.annotate 'line', 3
- if_null rx311_debug, debug_320
- rx311_cur."!cursor_debug"("NEXT", "metachar:sym<assert>")
- debug_320:
- rx311_fail:
- (rx311_rep, rx311_pos, $I10, $P10) = rx311_cur."!mark_fail"(0)
- lt rx311_pos, -1, rx311_done
- eq rx311_pos, -1, rx311_fail
- jump $I10
- rx311_done:
- rx311_cur."!cursor_fail"()
- if_null rx311_debug, debug_321
- rx311_cur."!cursor_debug"("FAIL", "metachar:sym<assert>")
- debug_321:
- .return (rx311_cur)
+ rx317_cur."!cursor_pos"(rx317_pos)
+ $P10 = rx317_cur."panic"("regex assertion not terminated by angle bracket")
+ unless $P10, rx317_fail
+ rx317_pos = $P10."pos"()
+ alt322_end:
+ # rx pass
+ rx317_cur."!cursor_pass"(rx317_pos, "metachar:sym<assert>")
+ if_null rx317_debug, debug_328
+ rx317_cur."!cursor_debug"("PASS", "metachar:sym<assert>", " at pos=", rx317_pos)
+ debug_328:
+ .return (rx317_cur)
+ rx317_restart:
+ if_null rx317_debug, debug_329
+ rx317_cur."!cursor_debug"("NEXT", "metachar:sym<assert>")
+ debug_329:
+ rx317_fail:
+ (rx317_rep, rx317_pos, $I10, $P10) = rx317_cur."!mark_fail"(0)
+ lt rx317_pos, -1, rx317_done
+ eq rx317_pos, -1, rx317_fail
+ jump $I10
+ rx317_done:
+ rx317_cur."!cursor_fail"()
+ if_null rx317_debug, debug_330
+ rx317_cur."!cursor_debug"("FAIL", "metachar:sym<assert>")
+ debug_330:
+ .return (rx317_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<assert>" :subid("90_1283368197.39621") :method
-.annotate 'line', 3
- $P313 = self."!PREFIX__!subrule"("assertion", "<")
- new $P314, "ResizablePMCArray"
- push $P314, $P313
- .return ($P314)
+.sub "!PREFIX__metachar:sym<assert>" :subid("92_1283975941.34404") :method
+.annotate 'line', 0
+ $P319 = self."!PREFIX__!subrule"("assertion", "<")
+ new $P320, "ResizablePMCArray"
+ push $P320, $P319
+ .return ($P320)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<var>" :subid("91_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx318_tgt
- .local int rx318_pos
- .local int rx318_off
- .local int rx318_eos
- .local int rx318_rep
- .local pmc rx318_cur
- .local pmc rx318_debug
- (rx318_cur, rx318_pos, rx318_tgt, $I10) = self."!cursor_start"()
- rx318_cur."!cursor_caparray"("quantified_atom")
- getattribute rx318_debug, rx318_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx318_cur
- .local pmc match
- .lex "$/", match
- length rx318_eos, rx318_tgt
- gt rx318_pos, rx318_eos, rx318_done
- set rx318_off, 0
- lt rx318_pos, 2, rx318_start
- sub rx318_off, rx318_pos, 1
- substr rx318_tgt, rx318_tgt, rx318_off
- rx318_start:
- eq $I10, 1, rx318_restart
- if_null rx318_debug, debug_322
- rx318_cur."!cursor_debug"("START", "metachar:sym<var>")
- debug_322:
+.sub "metachar:sym<var>" :subid("93_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx324_tgt
+ .local int rx324_pos
+ .local int rx324_off
+ .local int rx324_eos
+ .local int rx324_rep
+ .local pmc rx324_cur
+ .local pmc rx324_debug
+ (rx324_cur, rx324_pos, rx324_tgt, $I10) = self."!cursor_start"()
+ rx324_cur."!cursor_caparray"("quantified_atom")
+ getattribute rx324_debug, rx324_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx324_cur
+ .local pmc match
+ .lex "$/", match
+ length rx324_eos, rx324_tgt
+ gt rx324_pos, rx324_eos, rx324_done
+ set rx324_off, 0
+ lt rx324_pos, 2, rx324_start
+ sub rx324_off, rx324_pos, 1
+ substr rx324_tgt, rx324_tgt, rx324_off
+ rx324_start:
+ eq $I10, 1, rx324_restart
+ if_null rx324_debug, debug_331
+ rx324_cur."!cursor_debug"("START", "metachar:sym<var>")
+ debug_331:
$I10 = self.'from'()
- ne $I10, -1, rxscan321_done
- goto rxscan321_scan
- rxscan321_loop:
- ($P10) = rx318_cur."from"()
- inc $P10
- set rx318_pos, $P10
- ge rx318_pos, rx318_eos, rxscan321_done
- rxscan321_scan:
- set_addr $I10, rxscan321_loop
- rx318_cur."!mark_push"(0, rx318_pos, $I10)
- rxscan321_done:
- alt322_0:
-.annotate 'line', 117
- set_addr $I10, alt322_1
- rx318_cur."!mark_push"(0, rx318_pos, $I10)
-.annotate 'line', 118
+ ne $I10, -1, rxscan327_done
+ goto rxscan327_scan
+ rxscan327_loop:
+ ($P10) = rx324_cur."from"()
+ inc $P10
+ set rx324_pos, $P10
+ ge rx324_pos, rx324_eos, rxscan327_done
+ rxscan327_scan:
+ set_addr $I10, rxscan327_loop
+ rx324_cur."!mark_push"(0, rx324_pos, $I10)
+ rxscan327_done:
+ alt328_0:
+ set_addr $I10, alt328_1
+ rx324_cur."!mark_push"(0, rx324_pos, $I10)
# rx literal "$<"
- add $I11, rx318_pos, 2
- gt $I11, rx318_eos, rx318_fail
- sub $I11, rx318_pos, rx318_off
- substr $S10, rx318_tgt, $I11, 2
- ne $S10, "$<", rx318_fail
- add rx318_pos, 2
+ add $I11, rx324_pos, 2
+ gt $I11, rx324_eos, rx324_fail
+ sub $I11, rx324_pos, rx324_off
+ substr $S10, rx324_tgt, $I11, 2
+ ne $S10, "$<", rx324_fail
+ add rx324_pos, 2
# rx subcapture "name"
- set_addr $I10, rxcap_324_fail
- rx318_cur."!mark_push"(0, rx318_pos, $I10)
+ set_addr $I10, rxcap_330_fail
+ rx324_cur."!mark_push"(0, rx324_pos, $I10)
# rx enumcharlist_q negate=1 r 1..-1
- sub $I10, rx318_pos, rx318_off
- set rx318_rep, 0
- sub $I12, rx318_eos, rx318_pos
- rxenumcharlistq323_loop:
- le $I12, 0, rxenumcharlistq323_done
- substr $S10, rx318_tgt, $I10, 1
+ sub $I10, rx324_pos, rx324_off
+ set rx324_rep, 0
+ sub $I12, rx324_eos, rx324_pos
+ rxenumcharlistq329_loop:
+ le $I12, 0, rxenumcharlistq329_done
+ substr $S10, rx324_tgt, $I10, 1
index $I11, ">", $S10
- ge $I11, 0, rxenumcharlistq323_done
- inc rx318_rep
+ ge $I11, 0, rxenumcharlistq329_done
+ inc rx324_rep
inc $I10
dec $I12
- goto rxenumcharlistq323_loop
- rxenumcharlistq323_done:
- lt rx318_rep, 1, rx318_fail
- add rx318_pos, rx318_pos, rx318_rep
- set_addr $I10, rxcap_324_fail
- ($I12, $I11) = rx318_cur."!mark_peek"($I10)
- rx318_cur."!cursor_pos"($I11)
- ($P10) = rx318_cur."!cursor_start"()
- $P10."!cursor_pass"(rx318_pos, "")
- rx318_cur."!mark_push"(0, -1, 0, $P10)
+ goto rxenumcharlistq329_loop
+ rxenumcharlistq329_done:
+ lt rx324_rep, 1, rx324_fail
+ add rx324_pos, rx324_pos, rx324_rep
+ set_addr $I10, rxcap_330_fail
+ ($I12, $I11) = rx324_cur."!mark_peek"($I10)
+ rx324_cur."!cursor_pos"($I11)
+ ($P10) = rx324_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx324_pos, "")
+ rx324_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("name")
- goto rxcap_324_done
- rxcap_324_fail:
- goto rx318_fail
- rxcap_324_done:
+ goto rxcap_330_done
+ rxcap_330_fail:
+ goto rx324_fail
+ rxcap_330_done:
# rx literal ">"
- add $I11, rx318_pos, 1
- gt $I11, rx318_eos, rx318_fail
- sub $I11, rx318_pos, rx318_off
- ord $I11, rx318_tgt, $I11
- ne $I11, 62, rx318_fail
- add rx318_pos, 1
- goto alt322_end
- alt322_1:
-.annotate 'line', 119
+ add $I11, rx324_pos, 1
+ gt $I11, rx324_eos, rx324_fail
+ sub $I11, rx324_pos, rx324_off
+ ord $I11, rx324_tgt, $I11
+ ne $I11, 62, rx324_fail
+ add rx324_pos, 1
+ goto alt328_end
+ alt328_1:
# rx literal "$"
- add $I11, rx318_pos, 1
- gt $I11, rx318_eos, rx318_fail
- sub $I11, rx318_pos, rx318_off
- ord $I11, rx318_tgt, $I11
- ne $I11, 36, rx318_fail
- add rx318_pos, 1
+ add $I11, rx324_pos, 1
+ gt $I11, rx324_eos, rx324_fail
+ sub $I11, rx324_pos, rx324_off
+ ord $I11, rx324_tgt, $I11
+ ne $I11, 36, rx324_fail
+ add rx324_pos, 1
# rx subcapture "pos"
- set_addr $I10, rxcap_325_fail
- rx318_cur."!mark_push"(0, rx318_pos, $I10)
+ set_addr $I10, rxcap_331_fail
+ rx324_cur."!mark_push"(0, rx324_pos, $I10)
# rx charclass_q d r 1..-1
- sub $I10, rx318_pos, rx318_off
- find_not_cclass $I11, 8, rx318_tgt, $I10, rx318_eos
+ sub $I10, rx324_pos, rx324_off
+ find_not_cclass $I11, 8, rx324_tgt, $I10, rx324_eos
add $I12, $I10, 1
- lt $I11, $I12, rx318_fail
- add rx318_pos, rx318_off, $I11
- set_addr $I10, rxcap_325_fail
- ($I12, $I11) = rx318_cur."!mark_peek"($I10)
- rx318_cur."!cursor_pos"($I11)
- ($P10) = rx318_cur."!cursor_start"()
- $P10."!cursor_pass"(rx318_pos, "")
- rx318_cur."!mark_push"(0, -1, 0, $P10)
+ lt $I11, $I12, rx324_fail
+ add rx324_pos, rx324_off, $I11
+ set_addr $I10, rxcap_331_fail
+ ($I12, $I11) = rx324_cur."!mark_peek"($I10)
+ rx324_cur."!cursor_pos"($I11)
+ ($P10) = rx324_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx324_pos, "")
+ rx324_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("pos")
- goto rxcap_325_done
- rxcap_325_fail:
- goto rx318_fail
- rxcap_325_done:
- alt322_end:
-.annotate 'line', 122
- # rx rxquantr326 ** 0..1
- set_addr $I10, rxquantr326_done
- rx318_cur."!mark_push"(0, rx318_pos, $I10)
- rxquantr326_loop:
+ goto rxcap_331_done
+ rxcap_331_fail:
+ goto rx324_fail
+ rxcap_331_done:
+ alt328_end:
+ # rx rxquantr332 ** 0..1
+ set_addr $I10, rxquantr332_done
+ rx324_cur."!mark_push"(0, rx324_pos, $I10)
+ rxquantr332_loop:
# rx subrule "ws" subtype=method negate=
- rx318_cur."!cursor_pos"(rx318_pos)
- $P10 = rx318_cur."ws"()
- unless $P10, rx318_fail
- rx318_pos = $P10."pos"()
+ rx324_cur."!cursor_pos"(rx324_pos)
+ $P10 = rx324_cur."ws"()
+ unless $P10, rx324_fail
+ rx324_pos = $P10."pos"()
# rx literal "="
- add $I11, rx318_pos, 1
- gt $I11, rx318_eos, rx318_fail
- sub $I11, rx318_pos, rx318_off
- ord $I11, rx318_tgt, $I11
- ne $I11, 61, rx318_fail
- add rx318_pos, 1
+ add $I11, rx324_pos, 1
+ gt $I11, rx324_eos, rx324_fail
+ sub $I11, rx324_pos, rx324_off
+ ord $I11, rx324_tgt, $I11
+ ne $I11, 61, rx324_fail
+ add rx324_pos, 1
# rx subrule "ws" subtype=method negate=
- rx318_cur."!cursor_pos"(rx318_pos)
- $P10 = rx318_cur."ws"()
- unless $P10, rx318_fail
- rx318_pos = $P10."pos"()
+ rx324_cur."!cursor_pos"(rx324_pos)
+ $P10 = rx324_cur."ws"()
+ unless $P10, rx324_fail
+ rx324_pos = $P10."pos"()
# rx subrule "quantified_atom" subtype=capture negate=
- rx318_cur."!cursor_pos"(rx318_pos)
- $P10 = rx318_cur."quantified_atom"()
- unless $P10, rx318_fail
- rx318_cur."!mark_push"(0, -1, 0, $P10)
+ rx324_cur."!cursor_pos"(rx324_pos)
+ $P10 = rx324_cur."quantified_atom"()
+ unless $P10, rx324_fail
+ rx324_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("quantified_atom")
- rx318_pos = $P10."pos"()
- set_addr $I10, rxquantr326_done
- (rx318_rep) = rx318_cur."!mark_commit"($I10)
- rxquantr326_done:
-.annotate 'line', 116
- # rx pass
- rx318_cur."!cursor_pass"(rx318_pos, "metachar:sym<var>")
- if_null rx318_debug, debug_323
- rx318_cur."!cursor_debug"("PASS", "metachar:sym<var>", " at pos=", rx318_pos)
- debug_323:
- .return (rx318_cur)
- rx318_restart:
-.annotate 'line', 3
- if_null rx318_debug, debug_324
- rx318_cur."!cursor_debug"("NEXT", "metachar:sym<var>")
- debug_324:
- rx318_fail:
- (rx318_rep, rx318_pos, $I10, $P10) = rx318_cur."!mark_fail"(0)
- lt rx318_pos, -1, rx318_done
- eq rx318_pos, -1, rx318_fail
- jump $I10
- rx318_done:
- rx318_cur."!cursor_fail"()
- if_null rx318_debug, debug_325
- rx318_cur."!cursor_debug"("FAIL", "metachar:sym<var>")
- debug_325:
- .return (rx318_cur)
+ rx324_pos = $P10."pos"()
+ set_addr $I10, rxquantr332_done
+ (rx324_rep) = rx324_cur."!mark_commit"($I10)
+ rxquantr332_done:
+ # rx pass
+ rx324_cur."!cursor_pass"(rx324_pos, "metachar:sym<var>")
+ if_null rx324_debug, debug_332
+ rx324_cur."!cursor_debug"("PASS", "metachar:sym<var>", " at pos=", rx324_pos)
+ debug_332:
+ .return (rx324_cur)
+ rx324_restart:
+ if_null rx324_debug, debug_333
+ rx324_cur."!cursor_debug"("NEXT", "metachar:sym<var>")
+ debug_333:
+ rx324_fail:
+ (rx324_rep, rx324_pos, $I10, $P10) = rx324_cur."!mark_fail"(0)
+ lt rx324_pos, -1, rx324_done
+ eq rx324_pos, -1, rx324_fail
+ jump $I10
+ rx324_done:
+ rx324_cur."!cursor_fail"()
+ if_null rx324_debug, debug_334
+ rx324_cur."!cursor_debug"("FAIL", "metachar:sym<var>")
+ debug_334:
+ .return (rx324_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<var>" :subid("92_1283368197.39621") :method
-.annotate 'line', 3
- new $P320, "ResizablePMCArray"
- push $P320, "$"
- push $P320, "$<"
- .return ($P320)
+.sub "!PREFIX__metachar:sym<var>" :subid("94_1283975941.34404") :method
+.annotate 'line', 0
+ new $P326, "ResizablePMCArray"
+ push $P326, "$"
+ push $P326, "$<"
+ .return ($P326)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<PIR>" :subid("93_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx328_tgt
- .local int rx328_pos
- .local int rx328_off
- .local int rx328_eos
- .local int rx328_rep
- .local pmc rx328_cur
- .local pmc rx328_debug
- (rx328_cur, rx328_pos, rx328_tgt, $I10) = self."!cursor_start"()
- getattribute rx328_debug, rx328_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx328_cur
- .local pmc match
- .lex "$/", match
- length rx328_eos, rx328_tgt
- gt rx328_pos, rx328_eos, rx328_done
- set rx328_off, 0
- lt rx328_pos, 2, rx328_start
- sub rx328_off, rx328_pos, 1
- substr rx328_tgt, rx328_tgt, rx328_off
- rx328_start:
- eq $I10, 1, rx328_restart
- if_null rx328_debug, debug_326
- rx328_cur."!cursor_debug"("START", "metachar:sym<PIR>")
- debug_326:
+.sub "metachar:sym<PIR>" :subid("95_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx334_tgt
+ .local int rx334_pos
+ .local int rx334_off
+ .local int rx334_eos
+ .local int rx334_rep
+ .local pmc rx334_cur
+ .local pmc rx334_debug
+ (rx334_cur, rx334_pos, rx334_tgt, $I10) = self."!cursor_start"()
+ getattribute rx334_debug, rx334_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx334_cur
+ .local pmc match
+ .lex "$/", match
+ length rx334_eos, rx334_tgt
+ gt rx334_pos, rx334_eos, rx334_done
+ set rx334_off, 0
+ lt rx334_pos, 2, rx334_start
+ sub rx334_off, rx334_pos, 1
+ substr rx334_tgt, rx334_tgt, rx334_off
+ rx334_start:
+ eq $I10, 1, rx334_restart
+ if_null rx334_debug, debug_335
+ rx334_cur."!cursor_debug"("START", "metachar:sym<PIR>")
+ debug_335:
$I10 = self.'from'()
- ne $I10, -1, rxscan331_done
- goto rxscan331_scan
- rxscan331_loop:
- ($P10) = rx328_cur."from"()
- inc $P10
- set rx328_pos, $P10
- ge rx328_pos, rx328_eos, rxscan331_done
- rxscan331_scan:
- set_addr $I10, rxscan331_loop
- rx328_cur."!mark_push"(0, rx328_pos, $I10)
- rxscan331_done:
-.annotate 'line', 126
+ ne $I10, -1, rxscan337_done
+ goto rxscan337_scan
+ rxscan337_loop:
+ ($P10) = rx334_cur."from"()
+ inc $P10
+ set rx334_pos, $P10
+ ge rx334_pos, rx334_eos, rxscan337_done
+ rxscan337_scan:
+ set_addr $I10, rxscan337_loop
+ rx334_cur."!mark_push"(0, rx334_pos, $I10)
+ rxscan337_done:
# rx literal ":PIR{{"
- add $I11, rx328_pos, 6
- gt $I11, rx328_eos, rx328_fail
- sub $I11, rx328_pos, rx328_off
- substr $S10, rx328_tgt, $I11, 6
- ne $S10, ":PIR{{", rx328_fail
- add rx328_pos, 6
+ add $I11, rx334_pos, 6
+ gt $I11, rx334_eos, rx334_fail
+ sub $I11, rx334_pos, rx334_off
+ substr $S10, rx334_tgt, $I11, 6
+ ne $S10, ":PIR{{", rx334_fail
+ add rx334_pos, 6
# rx subcapture "pir"
- set_addr $I10, rxcap_334_fail
- rx328_cur."!mark_push"(0, rx328_pos, $I10)
- # rx rxquantf332 ** 0..*
- set_addr $I10, rxquantf332_loop
- rx328_cur."!mark_push"(0, rx328_pos, $I10)
- goto rxquantf332_done
- rxquantf332_loop:
+ set_addr $I10, rxcap_340_fail
+ rx334_cur."!mark_push"(0, rx334_pos, $I10)
+ # rx rxquantf338 ** 0..*
+ set_addr $I10, rxquantf338_loop
+ rx334_cur."!mark_push"(0, rx334_pos, $I10)
+ goto rxquantf338_done
+ rxquantf338_loop:
# rx charclass .
- ge rx328_pos, rx328_eos, rx328_fail
- inc rx328_pos
- set_addr $I10, rxquantf332_loop
- rx328_cur."!mark_push"(rx328_rep, rx328_pos, $I10)
- rxquantf332_done:
- set_addr $I10, rxcap_334_fail
- ($I12, $I11) = rx328_cur."!mark_peek"($I10)
- rx328_cur."!cursor_pos"($I11)
- ($P10) = rx328_cur."!cursor_start"()
- $P10."!cursor_pass"(rx328_pos, "")
- rx328_cur."!mark_push"(0, -1, 0, $P10)
+ ge rx334_pos, rx334_eos, rx334_fail
+ inc rx334_pos
+ set_addr $I10, rxquantf338_loop
+ rx334_cur."!mark_push"(rx334_rep, rx334_pos, $I10)
+ rxquantf338_done:
+ set_addr $I10, rxcap_340_fail
+ ($I12, $I11) = rx334_cur."!mark_peek"($I10)
+ rx334_cur."!cursor_pos"($I11)
+ ($P10) = rx334_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx334_pos, "")
+ rx334_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("pir")
- goto rxcap_334_done
- rxcap_334_fail:
- goto rx328_fail
- rxcap_334_done:
+ goto rxcap_340_done
+ rxcap_340_fail:
+ goto rx334_fail
+ rxcap_340_done:
# rx literal "}}"
- add $I11, rx328_pos, 2
- gt $I11, rx328_eos, rx328_fail
- sub $I11, rx328_pos, rx328_off
- substr $S10, rx328_tgt, $I11, 2
- ne $S10, "}}", rx328_fail
- add rx328_pos, 2
-.annotate 'line', 125
- # rx pass
- rx328_cur."!cursor_pass"(rx328_pos, "metachar:sym<PIR>")
- if_null rx328_debug, debug_327
- rx328_cur."!cursor_debug"("PASS", "metachar:sym<PIR>", " at pos=", rx328_pos)
- debug_327:
- .return (rx328_cur)
- rx328_restart:
-.annotate 'line', 3
- if_null rx328_debug, debug_328
- rx328_cur."!cursor_debug"("NEXT", "metachar:sym<PIR>")
- debug_328:
- rx328_fail:
- (rx328_rep, rx328_pos, $I10, $P10) = rx328_cur."!mark_fail"(0)
- lt rx328_pos, -1, rx328_done
- eq rx328_pos, -1, rx328_fail
- jump $I10
- rx328_done:
- rx328_cur."!cursor_fail"()
- if_null rx328_debug, debug_329
- rx328_cur."!cursor_debug"("FAIL", "metachar:sym<PIR>")
- debug_329:
- .return (rx328_cur)
+ add $I11, rx334_pos, 2
+ gt $I11, rx334_eos, rx334_fail
+ sub $I11, rx334_pos, rx334_off
+ substr $S10, rx334_tgt, $I11, 2
+ ne $S10, "}}", rx334_fail
+ add rx334_pos, 2
+ # rx pass
+ rx334_cur."!cursor_pass"(rx334_pos, "metachar:sym<PIR>")
+ if_null rx334_debug, debug_336
+ rx334_cur."!cursor_debug"("PASS", "metachar:sym<PIR>", " at pos=", rx334_pos)
+ debug_336:
+ .return (rx334_cur)
+ rx334_restart:
+ if_null rx334_debug, debug_337
+ rx334_cur."!cursor_debug"("NEXT", "metachar:sym<PIR>")
+ debug_337:
+ rx334_fail:
+ (rx334_rep, rx334_pos, $I10, $P10) = rx334_cur."!mark_fail"(0)
+ lt rx334_pos, -1, rx334_done
+ eq rx334_pos, -1, rx334_fail
+ jump $I10
+ rx334_done:
+ rx334_cur."!cursor_fail"()
+ if_null rx334_debug, debug_338
+ rx334_cur."!cursor_debug"("FAIL", "metachar:sym<PIR>")
+ debug_338:
+ .return (rx334_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<PIR>" :subid("94_1283368197.39621") :method
-.annotate 'line', 3
- new $P330, "ResizablePMCArray"
- push $P330, ":PIR{{"
- .return ($P330)
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash" :subid("95_1283368197.39621") :method
-.annotate 'line', 129
- $P336 = self."!protoregex"("backslash")
+.sub "!PREFIX__metachar:sym<PIR>" :subid("96_1283975941.34404") :method
+.annotate 'line', 0
+ new $P336, "ResizablePMCArray"
+ push $P336, ":PIR{{"
.return ($P336)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash" :subid("96_1283368197.39621") :method
-.annotate 'line', 129
- $P338 = self."!PREFIX__!protoregex"("backslash")
- .return ($P338)
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<w>" :subid("97_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx340_tgt
- .local int rx340_pos
- .local int rx340_off
- .local int rx340_eos
- .local int rx340_rep
- .local pmc rx340_cur
- .local pmc rx340_debug
- (rx340_cur, rx340_pos, rx340_tgt, $I10) = self."!cursor_start"()
- getattribute rx340_debug, rx340_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx340_cur
- .local pmc match
- .lex "$/", match
- length rx340_eos, rx340_tgt
- gt rx340_pos, rx340_eos, rx340_done
- set rx340_off, 0
- lt rx340_pos, 2, rx340_start
- sub rx340_off, rx340_pos, 1
- substr rx340_tgt, rx340_tgt, rx340_off
- rx340_start:
- eq $I10, 1, rx340_restart
- if_null rx340_debug, debug_330
- rx340_cur."!cursor_debug"("START", "backslash:sym<w>")
- debug_330:
- $I10 = self.'from'()
- ne $I10, -1, rxscan343_done
- goto rxscan343_scan
- rxscan343_loop:
- ($P10) = rx340_cur."from"()
- inc $P10
- set rx340_pos, $P10
- ge rx340_pos, rx340_eos, rxscan343_done
- rxscan343_scan:
- set_addr $I10, rxscan343_loop
- rx340_cur."!mark_push"(0, rx340_pos, $I10)
- rxscan343_done:
-.annotate 'line', 130
- # rx subcapture "sym"
- set_addr $I10, rxcap_344_fail
- rx340_cur."!mark_push"(0, rx340_pos, $I10)
- # rx enumcharlist negate=0
- ge rx340_pos, rx340_eos, rx340_fail
- sub $I10, rx340_pos, rx340_off
- substr $S10, rx340_tgt, $I10, 1
- index $I11, "dswnDSWN", $S10
- lt $I11, 0, rx340_fail
- inc rx340_pos
- set_addr $I10, rxcap_344_fail
- ($I12, $I11) = rx340_cur."!mark_peek"($I10)
- rx340_cur."!cursor_pos"($I11)
- ($P10) = rx340_cur."!cursor_start"()
- $P10."!cursor_pass"(rx340_pos, "")
- rx340_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("sym")
- goto rxcap_344_done
- rxcap_344_fail:
- goto rx340_fail
- rxcap_344_done:
- # rx pass
- rx340_cur."!cursor_pass"(rx340_pos, "backslash:sym<w>")
- if_null rx340_debug, debug_331
- rx340_cur."!cursor_debug"("PASS", "backslash:sym<w>", " at pos=", rx340_pos)
- debug_331:
- .return (rx340_cur)
- rx340_restart:
-.annotate 'line', 3
- if_null rx340_debug, debug_332
- rx340_cur."!cursor_debug"("NEXT", "backslash:sym<w>")
- debug_332:
- rx340_fail:
- (rx340_rep, rx340_pos, $I10, $P10) = rx340_cur."!mark_fail"(0)
- lt rx340_pos, -1, rx340_done
- eq rx340_pos, -1, rx340_fail
- jump $I10
- rx340_done:
- rx340_cur."!cursor_fail"()
- if_null rx340_debug, debug_333
- rx340_cur."!cursor_debug"("FAIL", "backslash:sym<w>")
- debug_333:
- .return (rx340_cur)
- .return ()
+.sub "backslash" :subid("97_1283975941.34404") :method
+.annotate 'line', 0
+ $P342 = self."!protoregex"("backslash")
+ .return ($P342)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<w>" :subid("98_1283368197.39621") :method
-.annotate 'line', 3
- new $P342, "ResizablePMCArray"
- push $P342, "N"
- push $P342, "W"
- push $P342, "S"
- push $P342, "D"
- push $P342, "n"
- push $P342, "w"
- push $P342, "s"
- push $P342, "d"
- .return ($P342)
+.sub "!PREFIX__backslash" :subid("98_1283975941.34404") :method
+.annotate 'line', 0
+ $P344 = self."!PREFIX__!protoregex"("backslash")
+ .return ($P344)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<b>" :subid("99_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<w>" :subid("99_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx346_tgt
.local int rx346_pos
.local int rx346_off
@@ -4963,9 +4822,9 @@
substr rx346_tgt, rx346_tgt, rx346_off
rx346_start:
eq $I10, 1, rx346_restart
- if_null rx346_debug, debug_334
- rx346_cur."!cursor_debug"("START", "backslash:sym<b>")
- debug_334:
+ if_null rx346_debug, debug_339
+ rx346_cur."!cursor_debug"("START", "backslash:sym<w>")
+ debug_339:
$I10 = self.'from'()
ne $I10, -1, rxscan349_done
goto rxscan349_scan
@@ -4978,7 +4837,6 @@
set_addr $I10, rxscan349_loop
rx346_cur."!mark_push"(0, rx346_pos, $I10)
rxscan349_done:
-.annotate 'line', 131
# rx subcapture "sym"
set_addr $I10, rxcap_350_fail
rx346_cur."!mark_push"(0, rx346_pos, $I10)
@@ -4986,7 +4844,7 @@
ge rx346_pos, rx346_eos, rx346_fail
sub $I10, rx346_pos, rx346_off
substr $S10, rx346_tgt, $I10, 1
- index $I11, "bB", $S10
+ index $I11, "dswnDSWN", $S10
lt $I11, 0, rx346_fail
inc rx346_pos
set_addr $I10, rxcap_350_fail
@@ -5001,16 +4859,15 @@
goto rx346_fail
rxcap_350_done:
# rx pass
- rx346_cur."!cursor_pass"(rx346_pos, "backslash:sym<b>")
- if_null rx346_debug, debug_335
- rx346_cur."!cursor_debug"("PASS", "backslash:sym<b>", " at pos=", rx346_pos)
- debug_335:
+ rx346_cur."!cursor_pass"(rx346_pos, "backslash:sym<w>")
+ if_null rx346_debug, debug_340
+ rx346_cur."!cursor_debug"("PASS", "backslash:sym<w>", " at pos=", rx346_pos)
+ debug_340:
.return (rx346_cur)
rx346_restart:
-.annotate 'line', 3
- if_null rx346_debug, debug_336
- rx346_cur."!cursor_debug"("NEXT", "backslash:sym<b>")
- debug_336:
+ if_null rx346_debug, debug_341
+ rx346_cur."!cursor_debug"("NEXT", "backslash:sym<w>")
+ debug_341:
rx346_fail:
(rx346_rep, rx346_pos, $I10, $P10) = rx346_cur."!mark_fail"(0)
lt rx346_pos, -1, rx346_done
@@ -5018,27 +4875,33 @@
jump $I10
rx346_done:
rx346_cur."!cursor_fail"()
- if_null rx346_debug, debug_337
- rx346_cur."!cursor_debug"("FAIL", "backslash:sym<b>")
- debug_337:
+ if_null rx346_debug, debug_342
+ rx346_cur."!cursor_debug"("FAIL", "backslash:sym<w>")
+ debug_342:
.return (rx346_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<b>" :subid("100_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<w>" :subid("100_1283975941.34404") :method
+.annotate 'line', 0
new $P348, "ResizablePMCArray"
- push $P348, "B"
- push $P348, "b"
+ push $P348, "N"
+ push $P348, "W"
+ push $P348, "S"
+ push $P348, "D"
+ push $P348, "n"
+ push $P348, "w"
+ push $P348, "s"
+ push $P348, "d"
.return ($P348)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<e>" :subid("101_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<b>" :subid("101_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx352_tgt
.local int rx352_pos
.local int rx352_off
@@ -5059,9 +4922,9 @@
substr rx352_tgt, rx352_tgt, rx352_off
rx352_start:
eq $I10, 1, rx352_restart
- if_null rx352_debug, debug_338
- rx352_cur."!cursor_debug"("START", "backslash:sym<e>")
- debug_338:
+ if_null rx352_debug, debug_343
+ rx352_cur."!cursor_debug"("START", "backslash:sym<b>")
+ debug_343:
$I10 = self.'from'()
ne $I10, -1, rxscan355_done
goto rxscan355_scan
@@ -5074,7 +4937,6 @@
set_addr $I10, rxscan355_loop
rx352_cur."!mark_push"(0, rx352_pos, $I10)
rxscan355_done:
-.annotate 'line', 132
# rx subcapture "sym"
set_addr $I10, rxcap_356_fail
rx352_cur."!mark_push"(0, rx352_pos, $I10)
@@ -5082,7 +4944,7 @@
ge rx352_pos, rx352_eos, rx352_fail
sub $I10, rx352_pos, rx352_off
substr $S10, rx352_tgt, $I10, 1
- index $I11, "eE", $S10
+ index $I11, "bB", $S10
lt $I11, 0, rx352_fail
inc rx352_pos
set_addr $I10, rxcap_356_fail
@@ -5097,16 +4959,15 @@
goto rx352_fail
rxcap_356_done:
# rx pass
- rx352_cur."!cursor_pass"(rx352_pos, "backslash:sym<e>")
- if_null rx352_debug, debug_339
- rx352_cur."!cursor_debug"("PASS", "backslash:sym<e>", " at pos=", rx352_pos)
- debug_339:
+ rx352_cur."!cursor_pass"(rx352_pos, "backslash:sym<b>")
+ if_null rx352_debug, debug_344
+ rx352_cur."!cursor_debug"("PASS", "backslash:sym<b>", " at pos=", rx352_pos)
+ debug_344:
.return (rx352_cur)
rx352_restart:
-.annotate 'line', 3
- if_null rx352_debug, debug_340
- rx352_cur."!cursor_debug"("NEXT", "backslash:sym<e>")
- debug_340:
+ if_null rx352_debug, debug_345
+ rx352_cur."!cursor_debug"("NEXT", "backslash:sym<b>")
+ debug_345:
rx352_fail:
(rx352_rep, rx352_pos, $I10, $P10) = rx352_cur."!mark_fail"(0)
lt rx352_pos, -1, rx352_done
@@ -5114,27 +4975,27 @@
jump $I10
rx352_done:
rx352_cur."!cursor_fail"()
- if_null rx352_debug, debug_341
- rx352_cur."!cursor_debug"("FAIL", "backslash:sym<e>")
- debug_341:
+ if_null rx352_debug, debug_346
+ rx352_cur."!cursor_debug"("FAIL", "backslash:sym<b>")
+ debug_346:
.return (rx352_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<e>" :subid("102_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<b>" :subid("102_1283975941.34404") :method
+.annotate 'line', 0
new $P354, "ResizablePMCArray"
- push $P354, "E"
- push $P354, "e"
+ push $P354, "B"
+ push $P354, "b"
.return ($P354)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<f>" :subid("103_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<e>" :subid("103_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx358_tgt
.local int rx358_pos
.local int rx358_off
@@ -5155,9 +5016,9 @@
substr rx358_tgt, rx358_tgt, rx358_off
rx358_start:
eq $I10, 1, rx358_restart
- if_null rx358_debug, debug_342
- rx358_cur."!cursor_debug"("START", "backslash:sym<f>")
- debug_342:
+ if_null rx358_debug, debug_347
+ rx358_cur."!cursor_debug"("START", "backslash:sym<e>")
+ debug_347:
$I10 = self.'from'()
ne $I10, -1, rxscan361_done
goto rxscan361_scan
@@ -5170,7 +5031,6 @@
set_addr $I10, rxscan361_loop
rx358_cur."!mark_push"(0, rx358_pos, $I10)
rxscan361_done:
-.annotate 'line', 133
# rx subcapture "sym"
set_addr $I10, rxcap_362_fail
rx358_cur."!mark_push"(0, rx358_pos, $I10)
@@ -5178,7 +5038,7 @@
ge rx358_pos, rx358_eos, rx358_fail
sub $I10, rx358_pos, rx358_off
substr $S10, rx358_tgt, $I10, 1
- index $I11, "fF", $S10
+ index $I11, "eE", $S10
lt $I11, 0, rx358_fail
inc rx358_pos
set_addr $I10, rxcap_362_fail
@@ -5193,16 +5053,15 @@
goto rx358_fail
rxcap_362_done:
# rx pass
- rx358_cur."!cursor_pass"(rx358_pos, "backslash:sym<f>")
- if_null rx358_debug, debug_343
- rx358_cur."!cursor_debug"("PASS", "backslash:sym<f>", " at pos=", rx358_pos)
- debug_343:
+ rx358_cur."!cursor_pass"(rx358_pos, "backslash:sym<e>")
+ if_null rx358_debug, debug_348
+ rx358_cur."!cursor_debug"("PASS", "backslash:sym<e>", " at pos=", rx358_pos)
+ debug_348:
.return (rx358_cur)
rx358_restart:
-.annotate 'line', 3
- if_null rx358_debug, debug_344
- rx358_cur."!cursor_debug"("NEXT", "backslash:sym<f>")
- debug_344:
+ if_null rx358_debug, debug_349
+ rx358_cur."!cursor_debug"("NEXT", "backslash:sym<e>")
+ debug_349:
rx358_fail:
(rx358_rep, rx358_pos, $I10, $P10) = rx358_cur."!mark_fail"(0)
lt rx358_pos, -1, rx358_done
@@ -5210,27 +5069,27 @@
jump $I10
rx358_done:
rx358_cur."!cursor_fail"()
- if_null rx358_debug, debug_345
- rx358_cur."!cursor_debug"("FAIL", "backslash:sym<f>")
- debug_345:
+ if_null rx358_debug, debug_350
+ rx358_cur."!cursor_debug"("FAIL", "backslash:sym<e>")
+ debug_350:
.return (rx358_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<f>" :subid("104_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<e>" :subid("104_1283975941.34404") :method
+.annotate 'line', 0
new $P360, "ResizablePMCArray"
- push $P360, "F"
- push $P360, "f"
+ push $P360, "E"
+ push $P360, "e"
.return ($P360)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<h>" :subid("105_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<f>" :subid("105_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx364_tgt
.local int rx364_pos
.local int rx364_off
@@ -5251,9 +5110,9 @@
substr rx364_tgt, rx364_tgt, rx364_off
rx364_start:
eq $I10, 1, rx364_restart
- if_null rx364_debug, debug_346
- rx364_cur."!cursor_debug"("START", "backslash:sym<h>")
- debug_346:
+ if_null rx364_debug, debug_351
+ rx364_cur."!cursor_debug"("START", "backslash:sym<f>")
+ debug_351:
$I10 = self.'from'()
ne $I10, -1, rxscan367_done
goto rxscan367_scan
@@ -5266,7 +5125,6 @@
set_addr $I10, rxscan367_loop
rx364_cur."!mark_push"(0, rx364_pos, $I10)
rxscan367_done:
-.annotate 'line', 134
# rx subcapture "sym"
set_addr $I10, rxcap_368_fail
rx364_cur."!mark_push"(0, rx364_pos, $I10)
@@ -5274,7 +5132,7 @@
ge rx364_pos, rx364_eos, rx364_fail
sub $I10, rx364_pos, rx364_off
substr $S10, rx364_tgt, $I10, 1
- index $I11, "hH", $S10
+ index $I11, "fF", $S10
lt $I11, 0, rx364_fail
inc rx364_pos
set_addr $I10, rxcap_368_fail
@@ -5289,16 +5147,15 @@
goto rx364_fail
rxcap_368_done:
# rx pass
- rx364_cur."!cursor_pass"(rx364_pos, "backslash:sym<h>")
- if_null rx364_debug, debug_347
- rx364_cur."!cursor_debug"("PASS", "backslash:sym<h>", " at pos=", rx364_pos)
- debug_347:
+ rx364_cur."!cursor_pass"(rx364_pos, "backslash:sym<f>")
+ if_null rx364_debug, debug_352
+ rx364_cur."!cursor_debug"("PASS", "backslash:sym<f>", " at pos=", rx364_pos)
+ debug_352:
.return (rx364_cur)
rx364_restart:
-.annotate 'line', 3
- if_null rx364_debug, debug_348
- rx364_cur."!cursor_debug"("NEXT", "backslash:sym<h>")
- debug_348:
+ if_null rx364_debug, debug_353
+ rx364_cur."!cursor_debug"("NEXT", "backslash:sym<f>")
+ debug_353:
rx364_fail:
(rx364_rep, rx364_pos, $I10, $P10) = rx364_cur."!mark_fail"(0)
lt rx364_pos, -1, rx364_done
@@ -5306,27 +5163,27 @@
jump $I10
rx364_done:
rx364_cur."!cursor_fail"()
- if_null rx364_debug, debug_349
- rx364_cur."!cursor_debug"("FAIL", "backslash:sym<h>")
- debug_349:
+ if_null rx364_debug, debug_354
+ rx364_cur."!cursor_debug"("FAIL", "backslash:sym<f>")
+ debug_354:
.return (rx364_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<h>" :subid("106_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<f>" :subid("106_1283975941.34404") :method
+.annotate 'line', 0
new $P366, "ResizablePMCArray"
- push $P366, "H"
- push $P366, "h"
+ push $P366, "F"
+ push $P366, "f"
.return ($P366)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<r>" :subid("107_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<h>" :subid("107_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx370_tgt
.local int rx370_pos
.local int rx370_off
@@ -5347,9 +5204,9 @@
substr rx370_tgt, rx370_tgt, rx370_off
rx370_start:
eq $I10, 1, rx370_restart
- if_null rx370_debug, debug_350
- rx370_cur."!cursor_debug"("START", "backslash:sym<r>")
- debug_350:
+ if_null rx370_debug, debug_355
+ rx370_cur."!cursor_debug"("START", "backslash:sym<h>")
+ debug_355:
$I10 = self.'from'()
ne $I10, -1, rxscan373_done
goto rxscan373_scan
@@ -5362,7 +5219,6 @@
set_addr $I10, rxscan373_loop
rx370_cur."!mark_push"(0, rx370_pos, $I10)
rxscan373_done:
-.annotate 'line', 135
# rx subcapture "sym"
set_addr $I10, rxcap_374_fail
rx370_cur."!mark_push"(0, rx370_pos, $I10)
@@ -5370,7 +5226,7 @@
ge rx370_pos, rx370_eos, rx370_fail
sub $I10, rx370_pos, rx370_off
substr $S10, rx370_tgt, $I10, 1
- index $I11, "rR", $S10
+ index $I11, "hH", $S10
lt $I11, 0, rx370_fail
inc rx370_pos
set_addr $I10, rxcap_374_fail
@@ -5385,16 +5241,15 @@
goto rx370_fail
rxcap_374_done:
# rx pass
- rx370_cur."!cursor_pass"(rx370_pos, "backslash:sym<r>")
- if_null rx370_debug, debug_351
- rx370_cur."!cursor_debug"("PASS", "backslash:sym<r>", " at pos=", rx370_pos)
- debug_351:
+ rx370_cur."!cursor_pass"(rx370_pos, "backslash:sym<h>")
+ if_null rx370_debug, debug_356
+ rx370_cur."!cursor_debug"("PASS", "backslash:sym<h>", " at pos=", rx370_pos)
+ debug_356:
.return (rx370_cur)
rx370_restart:
-.annotate 'line', 3
- if_null rx370_debug, debug_352
- rx370_cur."!cursor_debug"("NEXT", "backslash:sym<r>")
- debug_352:
+ if_null rx370_debug, debug_357
+ rx370_cur."!cursor_debug"("NEXT", "backslash:sym<h>")
+ debug_357:
rx370_fail:
(rx370_rep, rx370_pos, $I10, $P10) = rx370_cur."!mark_fail"(0)
lt rx370_pos, -1, rx370_done
@@ -5402,27 +5257,27 @@
jump $I10
rx370_done:
rx370_cur."!cursor_fail"()
- if_null rx370_debug, debug_353
- rx370_cur."!cursor_debug"("FAIL", "backslash:sym<r>")
- debug_353:
+ if_null rx370_debug, debug_358
+ rx370_cur."!cursor_debug"("FAIL", "backslash:sym<h>")
+ debug_358:
.return (rx370_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<r>" :subid("108_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<h>" :subid("108_1283975941.34404") :method
+.annotate 'line', 0
new $P372, "ResizablePMCArray"
- push $P372, "R"
- push $P372, "r"
+ push $P372, "H"
+ push $P372, "h"
.return ($P372)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<t>" :subid("109_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<r>" :subid("109_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx376_tgt
.local int rx376_pos
.local int rx376_off
@@ -5443,9 +5298,9 @@
substr rx376_tgt, rx376_tgt, rx376_off
rx376_start:
eq $I10, 1, rx376_restart
- if_null rx376_debug, debug_354
- rx376_cur."!cursor_debug"("START", "backslash:sym<t>")
- debug_354:
+ if_null rx376_debug, debug_359
+ rx376_cur."!cursor_debug"("START", "backslash:sym<r>")
+ debug_359:
$I10 = self.'from'()
ne $I10, -1, rxscan379_done
goto rxscan379_scan
@@ -5458,7 +5313,6 @@
set_addr $I10, rxscan379_loop
rx376_cur."!mark_push"(0, rx376_pos, $I10)
rxscan379_done:
-.annotate 'line', 136
# rx subcapture "sym"
set_addr $I10, rxcap_380_fail
rx376_cur."!mark_push"(0, rx376_pos, $I10)
@@ -5466,7 +5320,7 @@
ge rx376_pos, rx376_eos, rx376_fail
sub $I10, rx376_pos, rx376_off
substr $S10, rx376_tgt, $I10, 1
- index $I11, "tT", $S10
+ index $I11, "rR", $S10
lt $I11, 0, rx376_fail
inc rx376_pos
set_addr $I10, rxcap_380_fail
@@ -5481,16 +5335,15 @@
goto rx376_fail
rxcap_380_done:
# rx pass
- rx376_cur."!cursor_pass"(rx376_pos, "backslash:sym<t>")
- if_null rx376_debug, debug_355
- rx376_cur."!cursor_debug"("PASS", "backslash:sym<t>", " at pos=", rx376_pos)
- debug_355:
+ rx376_cur."!cursor_pass"(rx376_pos, "backslash:sym<r>")
+ if_null rx376_debug, debug_360
+ rx376_cur."!cursor_debug"("PASS", "backslash:sym<r>", " at pos=", rx376_pos)
+ debug_360:
.return (rx376_cur)
rx376_restart:
-.annotate 'line', 3
- if_null rx376_debug, debug_356
- rx376_cur."!cursor_debug"("NEXT", "backslash:sym<t>")
- debug_356:
+ if_null rx376_debug, debug_361
+ rx376_cur."!cursor_debug"("NEXT", "backslash:sym<r>")
+ debug_361:
rx376_fail:
(rx376_rep, rx376_pos, $I10, $P10) = rx376_cur."!mark_fail"(0)
lt rx376_pos, -1, rx376_done
@@ -5498,27 +5351,27 @@
jump $I10
rx376_done:
rx376_cur."!cursor_fail"()
- if_null rx376_debug, debug_357
- rx376_cur."!cursor_debug"("FAIL", "backslash:sym<t>")
- debug_357:
+ if_null rx376_debug, debug_362
+ rx376_cur."!cursor_debug"("FAIL", "backslash:sym<r>")
+ debug_362:
.return (rx376_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<t>" :subid("110_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<r>" :subid("110_1283975941.34404") :method
+.annotate 'line', 0
new $P378, "ResizablePMCArray"
- push $P378, "T"
- push $P378, "t"
+ push $P378, "R"
+ push $P378, "r"
.return ($P378)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<v>" :subid("111_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<t>" :subid("111_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx382_tgt
.local int rx382_pos
.local int rx382_off
@@ -5539,9 +5392,9 @@
substr rx382_tgt, rx382_tgt, rx382_off
rx382_start:
eq $I10, 1, rx382_restart
- if_null rx382_debug, debug_358
- rx382_cur."!cursor_debug"("START", "backslash:sym<v>")
- debug_358:
+ if_null rx382_debug, debug_363
+ rx382_cur."!cursor_debug"("START", "backslash:sym<t>")
+ debug_363:
$I10 = self.'from'()
ne $I10, -1, rxscan385_done
goto rxscan385_scan
@@ -5554,7 +5407,6 @@
set_addr $I10, rxscan385_loop
rx382_cur."!mark_push"(0, rx382_pos, $I10)
rxscan385_done:
-.annotate 'line', 137
# rx subcapture "sym"
set_addr $I10, rxcap_386_fail
rx382_cur."!mark_push"(0, rx382_pos, $I10)
@@ -5562,7 +5414,7 @@
ge rx382_pos, rx382_eos, rx382_fail
sub $I10, rx382_pos, rx382_off
substr $S10, rx382_tgt, $I10, 1
- index $I11, "vV", $S10
+ index $I11, "tT", $S10
lt $I11, 0, rx382_fail
inc rx382_pos
set_addr $I10, rxcap_386_fail
@@ -5577,16 +5429,15 @@
goto rx382_fail
rxcap_386_done:
# rx pass
- rx382_cur."!cursor_pass"(rx382_pos, "backslash:sym<v>")
- if_null rx382_debug, debug_359
- rx382_cur."!cursor_debug"("PASS", "backslash:sym<v>", " at pos=", rx382_pos)
- debug_359:
+ rx382_cur."!cursor_pass"(rx382_pos, "backslash:sym<t>")
+ if_null rx382_debug, debug_364
+ rx382_cur."!cursor_debug"("PASS", "backslash:sym<t>", " at pos=", rx382_pos)
+ debug_364:
.return (rx382_cur)
rx382_restart:
-.annotate 'line', 3
- if_null rx382_debug, debug_360
- rx382_cur."!cursor_debug"("NEXT", "backslash:sym<v>")
- debug_360:
+ if_null rx382_debug, debug_365
+ rx382_cur."!cursor_debug"("NEXT", "backslash:sym<t>")
+ debug_365:
rx382_fail:
(rx382_rep, rx382_pos, $I10, $P10) = rx382_cur."!mark_fail"(0)
lt rx382_pos, -1, rx382_done
@@ -5594,27 +5445,27 @@
jump $I10
rx382_done:
rx382_cur."!cursor_fail"()
- if_null rx382_debug, debug_361
- rx382_cur."!cursor_debug"("FAIL", "backslash:sym<v>")
- debug_361:
+ if_null rx382_debug, debug_366
+ rx382_cur."!cursor_debug"("FAIL", "backslash:sym<t>")
+ debug_366:
.return (rx382_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<v>" :subid("112_1283368197.39621") :method
-.annotate 'line', 3
+.sub "!PREFIX__backslash:sym<t>" :subid("112_1283975941.34404") :method
+.annotate 'line', 0
new $P384, "ResizablePMCArray"
- push $P384, "V"
- push $P384, "v"
+ push $P384, "T"
+ push $P384, "t"
.return ($P384)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<o>" :subid("113_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<v>" :subid("113_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx388_tgt
.local int rx388_pos
.local int rx388_off
@@ -5635,88 +5486,52 @@
substr rx388_tgt, rx388_tgt, rx388_off
rx388_start:
eq $I10, 1, rx388_restart
- if_null rx388_debug, debug_362
- rx388_cur."!cursor_debug"("START", "backslash:sym<o>")
- debug_362:
+ if_null rx388_debug, debug_367
+ rx388_cur."!cursor_debug"("START", "backslash:sym<v>")
+ debug_367:
$I10 = self.'from'()
- ne $I10, -1, rxscan395_done
- goto rxscan395_scan
- rxscan395_loop:
+ ne $I10, -1, rxscan391_done
+ goto rxscan391_scan
+ rxscan391_loop:
($P10) = rx388_cur."from"()
inc $P10
set rx388_pos, $P10
- ge rx388_pos, rx388_eos, rxscan395_done
- rxscan395_scan:
- set_addr $I10, rxscan395_loop
+ ge rx388_pos, rx388_eos, rxscan391_done
+ rxscan391_scan:
+ set_addr $I10, rxscan391_loop
rx388_cur."!mark_push"(0, rx388_pos, $I10)
- rxscan395_done:
-.annotate 'line', 138
+ rxscan391_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_396_fail
+ set_addr $I10, rxcap_392_fail
rx388_cur."!mark_push"(0, rx388_pos, $I10)
# rx enumcharlist negate=0
ge rx388_pos, rx388_eos, rx388_fail
sub $I10, rx388_pos, rx388_off
substr $S10, rx388_tgt, $I10, 1
- index $I11, "oO", $S10
+ index $I11, "vV", $S10
lt $I11, 0, rx388_fail
inc rx388_pos
- set_addr $I10, rxcap_396_fail
+ set_addr $I10, rxcap_392_fail
($I12, $I11) = rx388_cur."!mark_peek"($I10)
rx388_cur."!cursor_pos"($I11)
($P10) = rx388_cur."!cursor_start"()
$P10."!cursor_pass"(rx388_pos, "")
rx388_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_396_done
- rxcap_396_fail:
+ goto rxcap_392_done
+ rxcap_392_fail:
goto rx388_fail
- rxcap_396_done:
- alt397_0:
- set_addr $I10, alt397_1
- rx388_cur."!mark_push"(0, rx388_pos, $I10)
- # rx subrule "octint" subtype=capture negate=
- rx388_cur."!cursor_pos"(rx388_pos)
- $P10 = rx388_cur."octint"()
- unless $P10, rx388_fail
- rx388_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("octint")
- rx388_pos = $P10."pos"()
- goto alt397_end
- alt397_1:
- # rx literal "["
- add $I11, rx388_pos, 1
- gt $I11, rx388_eos, rx388_fail
- sub $I11, rx388_pos, rx388_off
- ord $I11, rx388_tgt, $I11
- ne $I11, 91, rx388_fail
- add rx388_pos, 1
- # rx subrule "octints" subtype=capture negate=
- rx388_cur."!cursor_pos"(rx388_pos)
- $P10 = rx388_cur."octints"()
- unless $P10, rx388_fail
- rx388_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("octints")
- rx388_pos = $P10."pos"()
- # rx literal "]"
- add $I11, rx388_pos, 1
- gt $I11, rx388_eos, rx388_fail
- sub $I11, rx388_pos, rx388_off
- ord $I11, rx388_tgt, $I11
- ne $I11, 93, rx388_fail
- add rx388_pos, 1
- alt397_end:
- # rx pass
- rx388_cur."!cursor_pass"(rx388_pos, "backslash:sym<o>")
- if_null rx388_debug, debug_363
- rx388_cur."!cursor_debug"("PASS", "backslash:sym<o>", " at pos=", rx388_pos)
- debug_363:
+ rxcap_392_done:
+ # rx pass
+ rx388_cur."!cursor_pass"(rx388_pos, "backslash:sym<v>")
+ if_null rx388_debug, debug_368
+ rx388_cur."!cursor_debug"("PASS", "backslash:sym<v>", " at pos=", rx388_pos)
+ debug_368:
.return (rx388_cur)
rx388_restart:
-.annotate 'line', 3
- if_null rx388_debug, debug_364
- rx388_cur."!cursor_debug"("NEXT", "backslash:sym<o>")
- debug_364:
+ if_null rx388_debug, debug_369
+ rx388_cur."!cursor_debug"("NEXT", "backslash:sym<v>")
+ debug_369:
rx388_fail:
(rx388_rep, rx388_pos, $I10, $P10) = rx388_cur."!mark_fail"(0)
lt rx388_pos, -1, rx388_done
@@ -5724,361 +5539,398 @@
jump $I10
rx388_done:
rx388_cur."!cursor_fail"()
- if_null rx388_debug, debug_365
- rx388_cur."!cursor_debug"("FAIL", "backslash:sym<o>")
- debug_365:
+ if_null rx388_debug, debug_370
+ rx388_cur."!cursor_debug"("FAIL", "backslash:sym<v>")
+ debug_370:
.return (rx388_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<o>" :subid("114_1283368197.39621") :method
-.annotate 'line', 3
- $P390 = self."!PREFIX__!subrule"("octints", "O[")
- $P391 = self."!PREFIX__!subrule"("octint", "O")
- $P392 = self."!PREFIX__!subrule"("octints", "o[")
- $P393 = self."!PREFIX__!subrule"("octint", "o")
- new $P394, "ResizablePMCArray"
- push $P394, $P390
- push $P394, $P391
- push $P394, $P392
- push $P394, $P393
- .return ($P394)
+.sub "!PREFIX__backslash:sym<v>" :subid("114_1283975941.34404") :method
+.annotate 'line', 0
+ new $P390, "ResizablePMCArray"
+ push $P390, "V"
+ push $P390, "v"
+ .return ($P390)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<x>" :subid("115_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx399_tgt
- .local int rx399_pos
- .local int rx399_off
- .local int rx399_eos
- .local int rx399_rep
- .local pmc rx399_cur
- .local pmc rx399_debug
- (rx399_cur, rx399_pos, rx399_tgt, $I10) = self."!cursor_start"()
- getattribute rx399_debug, rx399_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx399_cur
- .local pmc match
- .lex "$/", match
- length rx399_eos, rx399_tgt
- gt rx399_pos, rx399_eos, rx399_done
- set rx399_off, 0
- lt rx399_pos, 2, rx399_start
- sub rx399_off, rx399_pos, 1
- substr rx399_tgt, rx399_tgt, rx399_off
- rx399_start:
- eq $I10, 1, rx399_restart
- if_null rx399_debug, debug_366
- rx399_cur."!cursor_debug"("START", "backslash:sym<x>")
- debug_366:
+.sub "backslash:sym<o>" :subid("115_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx394_tgt
+ .local int rx394_pos
+ .local int rx394_off
+ .local int rx394_eos
+ .local int rx394_rep
+ .local pmc rx394_cur
+ .local pmc rx394_debug
+ (rx394_cur, rx394_pos, rx394_tgt, $I10) = self."!cursor_start"()
+ getattribute rx394_debug, rx394_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx394_cur
+ .local pmc match
+ .lex "$/", match
+ length rx394_eos, rx394_tgt
+ gt rx394_pos, rx394_eos, rx394_done
+ set rx394_off, 0
+ lt rx394_pos, 2, rx394_start
+ sub rx394_off, rx394_pos, 1
+ substr rx394_tgt, rx394_tgt, rx394_off
+ rx394_start:
+ eq $I10, 1, rx394_restart
+ if_null rx394_debug, debug_371
+ rx394_cur."!cursor_debug"("START", "backslash:sym<o>")
+ debug_371:
$I10 = self.'from'()
- ne $I10, -1, rxscan406_done
- goto rxscan406_scan
- rxscan406_loop:
- ($P10) = rx399_cur."from"()
- inc $P10
- set rx399_pos, $P10
- ge rx399_pos, rx399_eos, rxscan406_done
- rxscan406_scan:
- set_addr $I10, rxscan406_loop
- rx399_cur."!mark_push"(0, rx399_pos, $I10)
- rxscan406_done:
-.annotate 'line', 139
+ ne $I10, -1, rxscan401_done
+ goto rxscan401_scan
+ rxscan401_loop:
+ ($P10) = rx394_cur."from"()
+ inc $P10
+ set rx394_pos, $P10
+ ge rx394_pos, rx394_eos, rxscan401_done
+ rxscan401_scan:
+ set_addr $I10, rxscan401_loop
+ rx394_cur."!mark_push"(0, rx394_pos, $I10)
+ rxscan401_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_407_fail
- rx399_cur."!mark_push"(0, rx399_pos, $I10)
+ set_addr $I10, rxcap_402_fail
+ rx394_cur."!mark_push"(0, rx394_pos, $I10)
# rx enumcharlist negate=0
- ge rx399_pos, rx399_eos, rx399_fail
- sub $I10, rx399_pos, rx399_off
- substr $S10, rx399_tgt, $I10, 1
- index $I11, "xX", $S10
- lt $I11, 0, rx399_fail
- inc rx399_pos
- set_addr $I10, rxcap_407_fail
- ($I12, $I11) = rx399_cur."!mark_peek"($I10)
- rx399_cur."!cursor_pos"($I11)
- ($P10) = rx399_cur."!cursor_start"()
- $P10."!cursor_pass"(rx399_pos, "")
- rx399_cur."!mark_push"(0, -1, 0, $P10)
+ ge rx394_pos, rx394_eos, rx394_fail
+ sub $I10, rx394_pos, rx394_off
+ substr $S10, rx394_tgt, $I10, 1
+ index $I11, "oO", $S10
+ lt $I11, 0, rx394_fail
+ inc rx394_pos
+ set_addr $I10, rxcap_402_fail
+ ($I12, $I11) = rx394_cur."!mark_peek"($I10)
+ rx394_cur."!cursor_pos"($I11)
+ ($P10) = rx394_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx394_pos, "")
+ rx394_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_407_done
- rxcap_407_fail:
- goto rx399_fail
- rxcap_407_done:
- alt408_0:
- set_addr $I10, alt408_1
- rx399_cur."!mark_push"(0, rx399_pos, $I10)
- # rx subrule "hexint" subtype=capture negate=
- rx399_cur."!cursor_pos"(rx399_pos)
- $P10 = rx399_cur."hexint"()
- unless $P10, rx399_fail
- rx399_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("hexint")
- rx399_pos = $P10."pos"()
- goto alt408_end
- alt408_1:
+ goto rxcap_402_done
+ rxcap_402_fail:
+ goto rx394_fail
+ rxcap_402_done:
+ alt403_0:
+ set_addr $I10, alt403_1
+ rx394_cur."!mark_push"(0, rx394_pos, $I10)
+ # rx subrule "octint" subtype=capture negate=
+ rx394_cur."!cursor_pos"(rx394_pos)
+ $P10 = rx394_cur."octint"()
+ unless $P10, rx394_fail
+ rx394_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("octint")
+ rx394_pos = $P10."pos"()
+ goto alt403_end
+ alt403_1:
# rx literal "["
- add $I11, rx399_pos, 1
- gt $I11, rx399_eos, rx399_fail
- sub $I11, rx399_pos, rx399_off
- ord $I11, rx399_tgt, $I11
- ne $I11, 91, rx399_fail
- add rx399_pos, 1
- # rx subrule "hexints" subtype=capture negate=
- rx399_cur."!cursor_pos"(rx399_pos)
- $P10 = rx399_cur."hexints"()
- unless $P10, rx399_fail
- rx399_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("hexints")
- rx399_pos = $P10."pos"()
+ add $I11, rx394_pos, 1
+ gt $I11, rx394_eos, rx394_fail
+ sub $I11, rx394_pos, rx394_off
+ ord $I11, rx394_tgt, $I11
+ ne $I11, 91, rx394_fail
+ add rx394_pos, 1
+ # rx subrule "octints" subtype=capture negate=
+ rx394_cur."!cursor_pos"(rx394_pos)
+ $P10 = rx394_cur."octints"()
+ unless $P10, rx394_fail
+ rx394_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("octints")
+ rx394_pos = $P10."pos"()
# rx literal "]"
- add $I11, rx399_pos, 1
- gt $I11, rx399_eos, rx399_fail
- sub $I11, rx399_pos, rx399_off
- ord $I11, rx399_tgt, $I11
- ne $I11, 93, rx399_fail
- add rx399_pos, 1
- alt408_end:
- # rx pass
- rx399_cur."!cursor_pass"(rx399_pos, "backslash:sym<x>")
- if_null rx399_debug, debug_367
- rx399_cur."!cursor_debug"("PASS", "backslash:sym<x>", " at pos=", rx399_pos)
- debug_367:
- .return (rx399_cur)
- rx399_restart:
-.annotate 'line', 3
- if_null rx399_debug, debug_368
- rx399_cur."!cursor_debug"("NEXT", "backslash:sym<x>")
- debug_368:
- rx399_fail:
- (rx399_rep, rx399_pos, $I10, $P10) = rx399_cur."!mark_fail"(0)
- lt rx399_pos, -1, rx399_done
- eq rx399_pos, -1, rx399_fail
- jump $I10
- rx399_done:
- rx399_cur."!cursor_fail"()
- if_null rx399_debug, debug_369
- rx399_cur."!cursor_debug"("FAIL", "backslash:sym<x>")
- debug_369:
- .return (rx399_cur)
+ add $I11, rx394_pos, 1
+ gt $I11, rx394_eos, rx394_fail
+ sub $I11, rx394_pos, rx394_off
+ ord $I11, rx394_tgt, $I11
+ ne $I11, 93, rx394_fail
+ add rx394_pos, 1
+ alt403_end:
+ # rx pass
+ rx394_cur."!cursor_pass"(rx394_pos, "backslash:sym<o>")
+ if_null rx394_debug, debug_372
+ rx394_cur."!cursor_debug"("PASS", "backslash:sym<o>", " at pos=", rx394_pos)
+ debug_372:
+ .return (rx394_cur)
+ rx394_restart:
+ if_null rx394_debug, debug_373
+ rx394_cur."!cursor_debug"("NEXT", "backslash:sym<o>")
+ debug_373:
+ rx394_fail:
+ (rx394_rep, rx394_pos, $I10, $P10) = rx394_cur."!mark_fail"(0)
+ lt rx394_pos, -1, rx394_done
+ eq rx394_pos, -1, rx394_fail
+ jump $I10
+ rx394_done:
+ rx394_cur."!cursor_fail"()
+ if_null rx394_debug, debug_374
+ rx394_cur."!cursor_debug"("FAIL", "backslash:sym<o>")
+ debug_374:
+ .return (rx394_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<x>" :subid("116_1283368197.39621") :method
-.annotate 'line', 3
- $P401 = self."!PREFIX__!subrule"("hexints", "X[")
- $P402 = self."!PREFIX__!subrule"("hexint", "X")
- $P403 = self."!PREFIX__!subrule"("hexints", "x[")
- $P404 = self."!PREFIX__!subrule"("hexint", "x")
- new $P405, "ResizablePMCArray"
- push $P405, $P401
- push $P405, $P402
- push $P405, $P403
- push $P405, $P404
- .return ($P405)
+.sub "!PREFIX__backslash:sym<o>" :subid("116_1283975941.34404") :method
+.annotate 'line', 0
+ $P396 = self."!PREFIX__!subrule"("octints", "O[")
+ $P397 = self."!PREFIX__!subrule"("octint", "O")
+ $P398 = self."!PREFIX__!subrule"("octints", "o[")
+ $P399 = self."!PREFIX__!subrule"("octint", "o")
+ new $P400, "ResizablePMCArray"
+ push $P400, $P396
+ push $P400, $P397
+ push $P400, $P398
+ push $P400, $P399
+ .return ($P400)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<c>" :subid("117_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx410_tgt
- .local int rx410_pos
- .local int rx410_off
- .local int rx410_eos
- .local int rx410_rep
- .local pmc rx410_cur
- .local pmc rx410_debug
- (rx410_cur, rx410_pos, rx410_tgt, $I10) = self."!cursor_start"()
- getattribute rx410_debug, rx410_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx410_cur
- .local pmc match
- .lex "$/", match
- length rx410_eos, rx410_tgt
- gt rx410_pos, rx410_eos, rx410_done
- set rx410_off, 0
- lt rx410_pos, 2, rx410_start
- sub rx410_off, rx410_pos, 1
- substr rx410_tgt, rx410_tgt, rx410_off
- rx410_start:
- eq $I10, 1, rx410_restart
- if_null rx410_debug, debug_370
- rx410_cur."!cursor_debug"("START", "backslash:sym<c>")
- debug_370:
+.sub "backslash:sym<x>" :subid("117_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx405_tgt
+ .local int rx405_pos
+ .local int rx405_off
+ .local int rx405_eos
+ .local int rx405_rep
+ .local pmc rx405_cur
+ .local pmc rx405_debug
+ (rx405_cur, rx405_pos, rx405_tgt, $I10) = self."!cursor_start"()
+ getattribute rx405_debug, rx405_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx405_cur
+ .local pmc match
+ .lex "$/", match
+ length rx405_eos, rx405_tgt
+ gt rx405_pos, rx405_eos, rx405_done
+ set rx405_off, 0
+ lt rx405_pos, 2, rx405_start
+ sub rx405_off, rx405_pos, 1
+ substr rx405_tgt, rx405_tgt, rx405_off
+ rx405_start:
+ eq $I10, 1, rx405_restart
+ if_null rx405_debug, debug_375
+ rx405_cur."!cursor_debug"("START", "backslash:sym<x>")
+ debug_375:
$I10 = self.'from'()
- ne $I10, -1, rxscan415_done
- goto rxscan415_scan
- rxscan415_loop:
- ($P10) = rx410_cur."from"()
- inc $P10
- set rx410_pos, $P10
- ge rx410_pos, rx410_eos, rxscan415_done
- rxscan415_scan:
- set_addr $I10, rxscan415_loop
- rx410_cur."!mark_push"(0, rx410_pos, $I10)
- rxscan415_done:
-.annotate 'line', 140
+ ne $I10, -1, rxscan412_done
+ goto rxscan412_scan
+ rxscan412_loop:
+ ($P10) = rx405_cur."from"()
+ inc $P10
+ set rx405_pos, $P10
+ ge rx405_pos, rx405_eos, rxscan412_done
+ rxscan412_scan:
+ set_addr $I10, rxscan412_loop
+ rx405_cur."!mark_push"(0, rx405_pos, $I10)
+ rxscan412_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_416_fail
- rx410_cur."!mark_push"(0, rx410_pos, $I10)
+ set_addr $I10, rxcap_413_fail
+ rx405_cur."!mark_push"(0, rx405_pos, $I10)
# rx enumcharlist negate=0
- ge rx410_pos, rx410_eos, rx410_fail
- sub $I10, rx410_pos, rx410_off
- substr $S10, rx410_tgt, $I10, 1
- index $I11, "cC", $S10
- lt $I11, 0, rx410_fail
- inc rx410_pos
- set_addr $I10, rxcap_416_fail
- ($I12, $I11) = rx410_cur."!mark_peek"($I10)
- rx410_cur."!cursor_pos"($I11)
- ($P10) = rx410_cur."!cursor_start"()
- $P10."!cursor_pass"(rx410_pos, "")
- rx410_cur."!mark_push"(0, -1, 0, $P10)
+ ge rx405_pos, rx405_eos, rx405_fail
+ sub $I10, rx405_pos, rx405_off
+ substr $S10, rx405_tgt, $I10, 1
+ index $I11, "xX", $S10
+ lt $I11, 0, rx405_fail
+ inc rx405_pos
+ set_addr $I10, rxcap_413_fail
+ ($I12, $I11) = rx405_cur."!mark_peek"($I10)
+ rx405_cur."!cursor_pos"($I11)
+ ($P10) = rx405_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx405_pos, "")
+ rx405_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_416_done
- rxcap_416_fail:
- goto rx410_fail
- rxcap_416_done:
- # rx subrule "charspec" subtype=capture negate=
- rx410_cur."!cursor_pos"(rx410_pos)
- $P10 = rx410_cur."charspec"()
- unless $P10, rx410_fail
- rx410_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("charspec")
- rx410_pos = $P10."pos"()
- # rx pass
- rx410_cur."!cursor_pass"(rx410_pos, "backslash:sym<c>")
- if_null rx410_debug, debug_371
- rx410_cur."!cursor_debug"("PASS", "backslash:sym<c>", " at pos=", rx410_pos)
- debug_371:
- .return (rx410_cur)
- rx410_restart:
-.annotate 'line', 3
- if_null rx410_debug, debug_372
- rx410_cur."!cursor_debug"("NEXT", "backslash:sym<c>")
- debug_372:
- rx410_fail:
- (rx410_rep, rx410_pos, $I10, $P10) = rx410_cur."!mark_fail"(0)
- lt rx410_pos, -1, rx410_done
- eq rx410_pos, -1, rx410_fail
- jump $I10
- rx410_done:
- rx410_cur."!cursor_fail"()
- if_null rx410_debug, debug_373
- rx410_cur."!cursor_debug"("FAIL", "backslash:sym<c>")
- debug_373:
- .return (rx410_cur)
+ goto rxcap_413_done
+ rxcap_413_fail:
+ goto rx405_fail
+ rxcap_413_done:
+ alt414_0:
+ set_addr $I10, alt414_1
+ rx405_cur."!mark_push"(0, rx405_pos, $I10)
+ # rx subrule "hexint" subtype=capture negate=
+ rx405_cur."!cursor_pos"(rx405_pos)
+ $P10 = rx405_cur."hexint"()
+ unless $P10, rx405_fail
+ rx405_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("hexint")
+ rx405_pos = $P10."pos"()
+ goto alt414_end
+ alt414_1:
+ # rx literal "["
+ add $I11, rx405_pos, 1
+ gt $I11, rx405_eos, rx405_fail
+ sub $I11, rx405_pos, rx405_off
+ ord $I11, rx405_tgt, $I11
+ ne $I11, 91, rx405_fail
+ add rx405_pos, 1
+ # rx subrule "hexints" subtype=capture negate=
+ rx405_cur."!cursor_pos"(rx405_pos)
+ $P10 = rx405_cur."hexints"()
+ unless $P10, rx405_fail
+ rx405_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("hexints")
+ rx405_pos = $P10."pos"()
+ # rx literal "]"
+ add $I11, rx405_pos, 1
+ gt $I11, rx405_eos, rx405_fail
+ sub $I11, rx405_pos, rx405_off
+ ord $I11, rx405_tgt, $I11
+ ne $I11, 93, rx405_fail
+ add rx405_pos, 1
+ alt414_end:
+ # rx pass
+ rx405_cur."!cursor_pass"(rx405_pos, "backslash:sym<x>")
+ if_null rx405_debug, debug_376
+ rx405_cur."!cursor_debug"("PASS", "backslash:sym<x>", " at pos=", rx405_pos)
+ debug_376:
+ .return (rx405_cur)
+ rx405_restart:
+ if_null rx405_debug, debug_377
+ rx405_cur."!cursor_debug"("NEXT", "backslash:sym<x>")
+ debug_377:
+ rx405_fail:
+ (rx405_rep, rx405_pos, $I10, $P10) = rx405_cur."!mark_fail"(0)
+ lt rx405_pos, -1, rx405_done
+ eq rx405_pos, -1, rx405_fail
+ jump $I10
+ rx405_done:
+ rx405_cur."!cursor_fail"()
+ if_null rx405_debug, debug_378
+ rx405_cur."!cursor_debug"("FAIL", "backslash:sym<x>")
+ debug_378:
+ .return (rx405_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<c>" :subid("118_1283368197.39621") :method
-.annotate 'line', 3
- $P412 = self."!PREFIX__!subrule"("charspec", "C")
- $P413 = self."!PREFIX__!subrule"("charspec", "c")
- new $P414, "ResizablePMCArray"
- push $P414, $P412
- push $P414, $P413
- .return ($P414)
+.sub "!PREFIX__backslash:sym<x>" :subid("118_1283975941.34404") :method
+.annotate 'line', 0
+ $P407 = self."!PREFIX__!subrule"("hexints", "X[")
+ $P408 = self."!PREFIX__!subrule"("hexint", "X")
+ $P409 = self."!PREFIX__!subrule"("hexints", "x[")
+ $P410 = self."!PREFIX__!subrule"("hexint", "x")
+ new $P411, "ResizablePMCArray"
+ push $P411, $P407
+ push $P411, $P408
+ push $P411, $P409
+ push $P411, $P410
+ .return ($P411)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<A>" :subid("119_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx418_tgt
- .local int rx418_pos
- .local int rx418_off
- .local int rx418_eos
- .local int rx418_rep
- .local pmc rx418_cur
- .local pmc rx418_debug
- (rx418_cur, rx418_pos, rx418_tgt, $I10) = self."!cursor_start"()
- getattribute rx418_debug, rx418_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx418_cur
- .local pmc match
- .lex "$/", match
- length rx418_eos, rx418_tgt
- gt rx418_pos, rx418_eos, rx418_done
- set rx418_off, 0
- lt rx418_pos, 2, rx418_start
- sub rx418_off, rx418_pos, 1
- substr rx418_tgt, rx418_tgt, rx418_off
- rx418_start:
- eq $I10, 1, rx418_restart
- if_null rx418_debug, debug_374
- rx418_cur."!cursor_debug"("START", "backslash:sym<A>")
- debug_374:
+.sub "backslash:sym<c>" :subid("119_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx416_tgt
+ .local int rx416_pos
+ .local int rx416_off
+ .local int rx416_eos
+ .local int rx416_rep
+ .local pmc rx416_cur
+ .local pmc rx416_debug
+ (rx416_cur, rx416_pos, rx416_tgt, $I10) = self."!cursor_start"()
+ getattribute rx416_debug, rx416_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx416_cur
+ .local pmc match
+ .lex "$/", match
+ length rx416_eos, rx416_tgt
+ gt rx416_pos, rx416_eos, rx416_done
+ set rx416_off, 0
+ lt rx416_pos, 2, rx416_start
+ sub rx416_off, rx416_pos, 1
+ substr rx416_tgt, rx416_tgt, rx416_off
+ rx416_start:
+ eq $I10, 1, rx416_restart
+ if_null rx416_debug, debug_379
+ rx416_cur."!cursor_debug"("START", "backslash:sym<c>")
+ debug_379:
$I10 = self.'from'()
- ne $I10, -1, rxscan422_done
- goto rxscan422_scan
- rxscan422_loop:
- ($P10) = rx418_cur."from"()
- inc $P10
- set rx418_pos, $P10
- ge rx418_pos, rx418_eos, rxscan422_done
- rxscan422_scan:
- set_addr $I10, rxscan422_loop
- rx418_cur."!mark_push"(0, rx418_pos, $I10)
- rxscan422_done:
-.annotate 'line', 141
- # rx literal "A"
- add $I11, rx418_pos, 1
- gt $I11, rx418_eos, rx418_fail
- sub $I11, rx418_pos, rx418_off
- ord $I11, rx418_tgt, $I11
- ne $I11, 65, rx418_fail
- add rx418_pos, 1
- # rx subrule "obs" subtype=method negate=
- rx418_cur."!cursor_pos"(rx418_pos)
- $P10 = rx418_cur."obs"("\\A as beginning-of-string matcher", "^")
- unless $P10, rx418_fail
- rx418_pos = $P10."pos"()
- # rx pass
- rx418_cur."!cursor_pass"(rx418_pos, "backslash:sym<A>")
- if_null rx418_debug, debug_375
- rx418_cur."!cursor_debug"("PASS", "backslash:sym<A>", " at pos=", rx418_pos)
- debug_375:
- .return (rx418_cur)
- rx418_restart:
-.annotate 'line', 3
- if_null rx418_debug, debug_376
- rx418_cur."!cursor_debug"("NEXT", "backslash:sym<A>")
- debug_376:
- rx418_fail:
- (rx418_rep, rx418_pos, $I10, $P10) = rx418_cur."!mark_fail"(0)
- lt rx418_pos, -1, rx418_done
- eq rx418_pos, -1, rx418_fail
- jump $I10
- rx418_done:
- rx418_cur."!cursor_fail"()
- if_null rx418_debug, debug_377
- rx418_cur."!cursor_debug"("FAIL", "backslash:sym<A>")
- debug_377:
- .return (rx418_cur)
+ ne $I10, -1, rxscan421_done
+ goto rxscan421_scan
+ rxscan421_loop:
+ ($P10) = rx416_cur."from"()
+ inc $P10
+ set rx416_pos, $P10
+ ge rx416_pos, rx416_eos, rxscan421_done
+ rxscan421_scan:
+ set_addr $I10, rxscan421_loop
+ rx416_cur."!mark_push"(0, rx416_pos, $I10)
+ rxscan421_done:
+ # rx subcapture "sym"
+ set_addr $I10, rxcap_422_fail
+ rx416_cur."!mark_push"(0, rx416_pos, $I10)
+ # rx enumcharlist negate=0
+ ge rx416_pos, rx416_eos, rx416_fail
+ sub $I10, rx416_pos, rx416_off
+ substr $S10, rx416_tgt, $I10, 1
+ index $I11, "cC", $S10
+ lt $I11, 0, rx416_fail
+ inc rx416_pos
+ set_addr $I10, rxcap_422_fail
+ ($I12, $I11) = rx416_cur."!mark_peek"($I10)
+ rx416_cur."!cursor_pos"($I11)
+ ($P10) = rx416_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx416_pos, "")
+ rx416_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("sym")
+ goto rxcap_422_done
+ rxcap_422_fail:
+ goto rx416_fail
+ rxcap_422_done:
+ # rx subrule "charspec" subtype=capture negate=
+ rx416_cur."!cursor_pos"(rx416_pos)
+ $P10 = rx416_cur."charspec"()
+ unless $P10, rx416_fail
+ rx416_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("charspec")
+ rx416_pos = $P10."pos"()
+ # rx pass
+ rx416_cur."!cursor_pass"(rx416_pos, "backslash:sym<c>")
+ if_null rx416_debug, debug_380
+ rx416_cur."!cursor_debug"("PASS", "backslash:sym<c>", " at pos=", rx416_pos)
+ debug_380:
+ .return (rx416_cur)
+ rx416_restart:
+ if_null rx416_debug, debug_381
+ rx416_cur."!cursor_debug"("NEXT", "backslash:sym<c>")
+ debug_381:
+ rx416_fail:
+ (rx416_rep, rx416_pos, $I10, $P10) = rx416_cur."!mark_fail"(0)
+ lt rx416_pos, -1, rx416_done
+ eq rx416_pos, -1, rx416_fail
+ jump $I10
+ rx416_done:
+ rx416_cur."!cursor_fail"()
+ if_null rx416_debug, debug_382
+ rx416_cur."!cursor_debug"("FAIL", "backslash:sym<c>")
+ debug_382:
+ .return (rx416_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<A>" :subid("120_1283368197.39621") :method
-.annotate 'line', 3
- $P420 = self."!PREFIX__!subrule"("obs", "A")
- new $P421, "ResizablePMCArray"
- push $P421, $P420
- .return ($P421)
+.sub "!PREFIX__backslash:sym<c>" :subid("120_1283975941.34404") :method
+.annotate 'line', 0
+ $P418 = self."!PREFIX__!subrule"("charspec", "C")
+ $P419 = self."!PREFIX__!subrule"("charspec", "c")
+ new $P420, "ResizablePMCArray"
+ push $P420, $P418
+ push $P420, $P419
+ .return ($P420)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<z>" :subid("121_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<A>" :subid("121_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx424_tgt
.local int rx424_pos
.local int rx424_off
@@ -6099,9 +5951,9 @@
substr rx424_tgt, rx424_tgt, rx424_off
rx424_start:
eq $I10, 1, rx424_restart
- if_null rx424_debug, debug_378
- rx424_cur."!cursor_debug"("START", "backslash:sym<z>")
- debug_378:
+ if_null rx424_debug, debug_383
+ rx424_cur."!cursor_debug"("START", "backslash:sym<A>")
+ debug_383:
$I10 = self.'from'()
ne $I10, -1, rxscan428_done
goto rxscan428_scan
@@ -6114,30 +5966,28 @@
set_addr $I10, rxscan428_loop
rx424_cur."!mark_push"(0, rx424_pos, $I10)
rxscan428_done:
-.annotate 'line', 142
- # rx literal "z"
+ # rx literal "A"
add $I11, rx424_pos, 1
gt $I11, rx424_eos, rx424_fail
sub $I11, rx424_pos, rx424_off
ord $I11, rx424_tgt, $I11
- ne $I11, 122, rx424_fail
+ ne $I11, 65, rx424_fail
add rx424_pos, 1
# rx subrule "obs" subtype=method negate=
rx424_cur."!cursor_pos"(rx424_pos)
- $P10 = rx424_cur."obs"("\\z as end-of-string matcher", "$")
+ $P10 = rx424_cur."obs"("\\A as beginning-of-string matcher", "^")
unless $P10, rx424_fail
rx424_pos = $P10."pos"()
# rx pass
- rx424_cur."!cursor_pass"(rx424_pos, "backslash:sym<z>")
- if_null rx424_debug, debug_379
- rx424_cur."!cursor_debug"("PASS", "backslash:sym<z>", " at pos=", rx424_pos)
- debug_379:
+ rx424_cur."!cursor_pass"(rx424_pos, "backslash:sym<A>")
+ if_null rx424_debug, debug_384
+ rx424_cur."!cursor_debug"("PASS", "backslash:sym<A>", " at pos=", rx424_pos)
+ debug_384:
.return (rx424_cur)
rx424_restart:
-.annotate 'line', 3
- if_null rx424_debug, debug_380
- rx424_cur."!cursor_debug"("NEXT", "backslash:sym<z>")
- debug_380:
+ if_null rx424_debug, debug_385
+ rx424_cur."!cursor_debug"("NEXT", "backslash:sym<A>")
+ debug_385:
rx424_fail:
(rx424_rep, rx424_pos, $I10, $P10) = rx424_cur."!mark_fail"(0)
lt rx424_pos, -1, rx424_done
@@ -6145,18 +5995,18 @@
jump $I10
rx424_done:
rx424_cur."!cursor_fail"()
- if_null rx424_debug, debug_381
- rx424_cur."!cursor_debug"("FAIL", "backslash:sym<z>")
- debug_381:
+ if_null rx424_debug, debug_386
+ rx424_cur."!cursor_debug"("FAIL", "backslash:sym<A>")
+ debug_386:
.return (rx424_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<z>" :subid("122_1283368197.39621") :method
-.annotate 'line', 3
- $P426 = self."!PREFIX__!subrule"("obs", "z")
+.sub "!PREFIX__backslash:sym<A>" :subid("122_1283975941.34404") :method
+.annotate 'line', 0
+ $P426 = self."!PREFIX__!subrule"("obs", "A")
new $P427, "ResizablePMCArray"
push $P427, $P426
.return ($P427)
@@ -6164,8 +6014,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<Z>" :subid("123_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<z>" :subid("123_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx430_tgt
.local int rx430_pos
.local int rx430_off
@@ -6186,9 +6036,9 @@
substr rx430_tgt, rx430_tgt, rx430_off
rx430_start:
eq $I10, 1, rx430_restart
- if_null rx430_debug, debug_382
- rx430_cur."!cursor_debug"("START", "backslash:sym<Z>")
- debug_382:
+ if_null rx430_debug, debug_387
+ rx430_cur."!cursor_debug"("START", "backslash:sym<z>")
+ debug_387:
$I10 = self.'from'()
ne $I10, -1, rxscan434_done
goto rxscan434_scan
@@ -6201,30 +6051,28 @@
set_addr $I10, rxscan434_loop
rx430_cur."!mark_push"(0, rx430_pos, $I10)
rxscan434_done:
-.annotate 'line', 143
- # rx literal "Z"
+ # rx literal "z"
add $I11, rx430_pos, 1
gt $I11, rx430_eos, rx430_fail
sub $I11, rx430_pos, rx430_off
ord $I11, rx430_tgt, $I11
- ne $I11, 90, rx430_fail
+ ne $I11, 122, rx430_fail
add rx430_pos, 1
# rx subrule "obs" subtype=method negate=
rx430_cur."!cursor_pos"(rx430_pos)
- $P10 = rx430_cur."obs"("\\Z as end-of-string matcher", "\\n?$")
+ $P10 = rx430_cur."obs"("\\z as end-of-string matcher", "$")
unless $P10, rx430_fail
rx430_pos = $P10."pos"()
# rx pass
- rx430_cur."!cursor_pass"(rx430_pos, "backslash:sym<Z>")
- if_null rx430_debug, debug_383
- rx430_cur."!cursor_debug"("PASS", "backslash:sym<Z>", " at pos=", rx430_pos)
- debug_383:
+ rx430_cur."!cursor_pass"(rx430_pos, "backslash:sym<z>")
+ if_null rx430_debug, debug_388
+ rx430_cur."!cursor_debug"("PASS", "backslash:sym<z>", " at pos=", rx430_pos)
+ debug_388:
.return (rx430_cur)
rx430_restart:
-.annotate 'line', 3
- if_null rx430_debug, debug_384
- rx430_cur."!cursor_debug"("NEXT", "backslash:sym<Z>")
- debug_384:
+ if_null rx430_debug, debug_389
+ rx430_cur."!cursor_debug"("NEXT", "backslash:sym<z>")
+ debug_389:
rx430_fail:
(rx430_rep, rx430_pos, $I10, $P10) = rx430_cur."!mark_fail"(0)
lt rx430_pos, -1, rx430_done
@@ -6232,18 +6080,18 @@
jump $I10
rx430_done:
rx430_cur."!cursor_fail"()
- if_null rx430_debug, debug_385
- rx430_cur."!cursor_debug"("FAIL", "backslash:sym<Z>")
- debug_385:
+ if_null rx430_debug, debug_390
+ rx430_cur."!cursor_debug"("FAIL", "backslash:sym<z>")
+ debug_390:
.return (rx430_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<Z>" :subid("124_1283368197.39621") :method
-.annotate 'line', 3
- $P432 = self."!PREFIX__!subrule"("obs", "Z")
+.sub "!PREFIX__backslash:sym<z>" :subid("124_1283975941.34404") :method
+.annotate 'line', 0
+ $P432 = self."!PREFIX__!subrule"("obs", "z")
new $P433, "ResizablePMCArray"
push $P433, $P432
.return ($P433)
@@ -6251,8 +6099,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<Q>" :subid("125_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<Z>" :subid("125_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx436_tgt
.local int rx436_pos
.local int rx436_off
@@ -6273,9 +6121,9 @@
substr rx436_tgt, rx436_tgt, rx436_off
rx436_start:
eq $I10, 1, rx436_restart
- if_null rx436_debug, debug_386
- rx436_cur."!cursor_debug"("START", "backslash:sym<Q>")
- debug_386:
+ if_null rx436_debug, debug_391
+ rx436_cur."!cursor_debug"("START", "backslash:sym<Z>")
+ debug_391:
$I10 = self.'from'()
ne $I10, -1, rxscan440_done
goto rxscan440_scan
@@ -6288,30 +6136,28 @@
set_addr $I10, rxscan440_loop
rx436_cur."!mark_push"(0, rx436_pos, $I10)
rxscan440_done:
-.annotate 'line', 144
- # rx literal "Q"
+ # rx literal "Z"
add $I11, rx436_pos, 1
gt $I11, rx436_eos, rx436_fail
sub $I11, rx436_pos, rx436_off
ord $I11, rx436_tgt, $I11
- ne $I11, 81, rx436_fail
+ ne $I11, 90, rx436_fail
add rx436_pos, 1
# rx subrule "obs" subtype=method negate=
rx436_cur."!cursor_pos"(rx436_pos)
- $P10 = rx436_cur."obs"("\\Q as quotemeta", "quotes or literal variable match")
+ $P10 = rx436_cur."obs"("\\Z as end-of-string matcher", "\\n?$")
unless $P10, rx436_fail
rx436_pos = $P10."pos"()
# rx pass
- rx436_cur."!cursor_pass"(rx436_pos, "backslash:sym<Q>")
- if_null rx436_debug, debug_387
- rx436_cur."!cursor_debug"("PASS", "backslash:sym<Q>", " at pos=", rx436_pos)
- debug_387:
+ rx436_cur."!cursor_pass"(rx436_pos, "backslash:sym<Z>")
+ if_null rx436_debug, debug_392
+ rx436_cur."!cursor_debug"("PASS", "backslash:sym<Z>", " at pos=", rx436_pos)
+ debug_392:
.return (rx436_cur)
rx436_restart:
-.annotate 'line', 3
- if_null rx436_debug, debug_388
- rx436_cur."!cursor_debug"("NEXT", "backslash:sym<Q>")
- debug_388:
+ if_null rx436_debug, debug_393
+ rx436_cur."!cursor_debug"("NEXT", "backslash:sym<Z>")
+ debug_393:
rx436_fail:
(rx436_rep, rx436_pos, $I10, $P10) = rx436_cur."!mark_fail"(0)
lt rx436_pos, -1, rx436_done
@@ -6319,18 +6165,18 @@
jump $I10
rx436_done:
rx436_cur."!cursor_fail"()
- if_null rx436_debug, debug_389
- rx436_cur."!cursor_debug"("FAIL", "backslash:sym<Q>")
- debug_389:
+ if_null rx436_debug, debug_394
+ rx436_cur."!cursor_debug"("FAIL", "backslash:sym<Z>")
+ debug_394:
.return (rx436_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<Q>" :subid("126_1283368197.39621") :method
-.annotate 'line', 3
- $P438 = self."!PREFIX__!subrule"("obs", "Q")
+.sub "!PREFIX__backslash:sym<Z>" :subid("126_1283975941.34404") :method
+.annotate 'line', 0
+ $P438 = self."!PREFIX__!subrule"("obs", "Z")
new $P439, "ResizablePMCArray"
push $P439, $P438
.return ($P439)
@@ -6338,8 +6184,8 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<misc>" :subid("127_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
+.sub "backslash:sym<Q>" :subid("127_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
.local string rx442_tgt
.local int rx442_pos
.local int rx442_off
@@ -6360,39 +6206,43 @@
substr rx442_tgt, rx442_tgt, rx442_off
rx442_start:
eq $I10, 1, rx442_restart
- if_null rx442_debug, debug_390
- rx442_cur."!cursor_debug"("START", "backslash:sym<misc>")
- debug_390:
+ if_null rx442_debug, debug_395
+ rx442_cur."!cursor_debug"("START", "backslash:sym<Q>")
+ debug_395:
$I10 = self.'from'()
- ne $I10, -1, rxscan445_done
- goto rxscan445_scan
- rxscan445_loop:
+ ne $I10, -1, rxscan446_done
+ goto rxscan446_scan
+ rxscan446_loop:
($P10) = rx442_cur."from"()
inc $P10
set rx442_pos, $P10
- ge rx442_pos, rx442_eos, rxscan445_done
- rxscan445_scan:
- set_addr $I10, rxscan445_loop
+ ge rx442_pos, rx442_eos, rxscan446_done
+ rxscan446_scan:
+ set_addr $I10, rxscan446_loop
rx442_cur."!mark_push"(0, rx442_pos, $I10)
- rxscan445_done:
-.annotate 'line', 145
- # rx charclass W
- ge rx442_pos, rx442_eos, rx442_fail
- sub $I10, rx442_pos, rx442_off
- is_cclass $I11, 8192, rx442_tgt, $I10
- if $I11, rx442_fail
- inc rx442_pos
- # rx pass
- rx442_cur."!cursor_pass"(rx442_pos, "backslash:sym<misc>")
- if_null rx442_debug, debug_391
- rx442_cur."!cursor_debug"("PASS", "backslash:sym<misc>", " at pos=", rx442_pos)
- debug_391:
+ rxscan446_done:
+ # rx literal "Q"
+ add $I11, rx442_pos, 1
+ gt $I11, rx442_eos, rx442_fail
+ sub $I11, rx442_pos, rx442_off
+ ord $I11, rx442_tgt, $I11
+ ne $I11, 81, rx442_fail
+ add rx442_pos, 1
+ # rx subrule "obs" subtype=method negate=
+ rx442_cur."!cursor_pos"(rx442_pos)
+ $P10 = rx442_cur."obs"("\\Q as quotemeta", "quotes or literal variable match")
+ unless $P10, rx442_fail
+ rx442_pos = $P10."pos"()
+ # rx pass
+ rx442_cur."!cursor_pass"(rx442_pos, "backslash:sym<Q>")
+ if_null rx442_debug, debug_396
+ rx442_cur."!cursor_debug"("PASS", "backslash:sym<Q>", " at pos=", rx442_pos)
+ debug_396:
.return (rx442_cur)
rx442_restart:
-.annotate 'line', 3
- if_null rx442_debug, debug_392
- rx442_cur."!cursor_debug"("NEXT", "backslash:sym<misc>")
- debug_392:
+ if_null rx442_debug, debug_397
+ rx442_cur."!cursor_debug"("NEXT", "backslash:sym<Q>")
+ debug_397:
rx442_fail:
(rx442_rep, rx442_pos, $I10, $P10) = rx442_cur."!mark_fail"(0)
lt rx442_pos, -1, rx442_done
@@ -6400,1536 +6250,1474 @@
jump $I10
rx442_done:
rx442_cur."!cursor_fail"()
- if_null rx442_debug, debug_393
- rx442_cur."!cursor_debug"("FAIL", "backslash:sym<misc>")
- debug_393:
+ if_null rx442_debug, debug_398
+ rx442_cur."!cursor_debug"("FAIL", "backslash:sym<Q>")
+ debug_398:
.return (rx442_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<misc>" :subid("128_1283368197.39621") :method
-.annotate 'line', 3
- new $P444, "ResizablePMCArray"
- push $P444, ""
- .return ($P444)
+.sub "!PREFIX__backslash:sym<Q>" :subid("128_1283975941.34404") :method
+.annotate 'line', 0
+ $P444 = self."!PREFIX__!subrule"("obs", "Q")
+ new $P445, "ResizablePMCArray"
+ push $P445, $P444
+ .return ($P445)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "backslash:sym<unrec>" :subid("129_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P455 = "131_1283975941.34404"
+ capture_lex $P455
+ .local string rx448_tgt
+ .local int rx448_pos
+ .local int rx448_off
+ .local int rx448_eos
+ .local int rx448_rep
+ .local pmc rx448_cur
+ .local pmc rx448_debug
+ (rx448_cur, rx448_pos, rx448_tgt, $I10) = self."!cursor_start"()
+ getattribute rx448_debug, rx448_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx448_cur
+ .local pmc match
+ .lex "$/", match
+ length rx448_eos, rx448_tgt
+ gt rx448_pos, rx448_eos, rx448_done
+ set rx448_off, 0
+ lt rx448_pos, 2, rx448_start
+ sub rx448_off, rx448_pos, 1
+ substr rx448_tgt, rx448_tgt, rx448_off
+ rx448_start:
+ eq $I10, 1, rx448_restart
+ if_null rx448_debug, debug_399
+ rx448_cur."!cursor_debug"("START", "backslash:sym<unrec>")
+ debug_399:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan451_done
+ goto rxscan451_scan
+ rxscan451_loop:
+ ($P10) = rx448_cur."from"()
+ inc $P10
+ set rx448_pos, $P10
+ ge rx448_pos, rx448_eos, rxscan451_done
+ rxscan451_scan:
+ set_addr $I10, rxscan451_loop
+ rx448_cur."!mark_push"(0, rx448_pos, $I10)
+ rxscan451_done:
+ rx448_cur."!cursor_pos"(rx448_pos)
+ find_lex $P452, unicode:"$\x{a2}"
+ $P453 = $P452."MATCH"()
+ store_lex "$/", $P453
+ .const 'Sub' $P455 = "131_1283975941.34404"
+ capture_lex $P455
+ $P456 = $P455()
+ # rx charclass w
+ ge rx448_pos, rx448_eos, rx448_fail
+ sub $I10, rx448_pos, rx448_off
+ is_cclass $I11, 8192, rx448_tgt, $I10
+ unless $I11, rx448_fail
+ inc rx448_pos
+ # rx subrule "panic" subtype=method negate=
+ rx448_cur."!cursor_pos"(rx448_pos)
+ $P10 = rx448_cur."panic"("Unrecognized backslash sequence")
+ unless $P10, rx448_fail
+ rx448_pos = $P10."pos"()
+ # rx pass
+ rx448_cur."!cursor_pass"(rx448_pos, "backslash:sym<unrec>")
+ if_null rx448_debug, debug_400
+ rx448_cur."!cursor_debug"("PASS", "backslash:sym<unrec>", " at pos=", rx448_pos)
+ debug_400:
+ .return (rx448_cur)
+ rx448_restart:
+ if_null rx448_debug, debug_401
+ rx448_cur."!cursor_debug"("NEXT", "backslash:sym<unrec>")
+ debug_401:
+ rx448_fail:
+ (rx448_rep, rx448_pos, $I10, $P10) = rx448_cur."!mark_fail"(0)
+ lt rx448_pos, -1, rx448_done
+ eq rx448_pos, -1, rx448_fail
+ jump $I10
+ rx448_done:
+ rx448_cur."!cursor_fail"()
+ if_null rx448_debug, debug_402
+ rx448_cur."!cursor_debug"("FAIL", "backslash:sym<unrec>")
+ debug_402:
+ .return (rx448_cur)
+ .return ()
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "!PREFIX__backslash:sym<unrec>" :subid("130_1283975941.34404") :method
+.annotate 'line', 0
+ new $P450, "ResizablePMCArray"
+ push $P450, ""
+ .return ($P450)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion" :subid("129_1283368197.39621") :method
-.annotate 'line', 147
- $P447 = self."!protoregex"("assertion")
- .return ($P447)
+.sub "_block454" :anon :subid("131_1283975941.34404") :outer("129_1283975941.34404")
+.annotate 'line', 0
+ .return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion" :subid("130_1283368197.39621") :method
-.annotate 'line', 147
- $P449 = self."!PREFIX__!protoregex"("assertion")
- .return ($P449)
+.sub "backslash:sym<misc>" :subid("132_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx458_tgt
+ .local int rx458_pos
+ .local int rx458_off
+ .local int rx458_eos
+ .local int rx458_rep
+ .local pmc rx458_cur
+ .local pmc rx458_debug
+ (rx458_cur, rx458_pos, rx458_tgt, $I10) = self."!cursor_start"()
+ getattribute rx458_debug, rx458_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx458_cur
+ .local pmc match
+ .lex "$/", match
+ length rx458_eos, rx458_tgt
+ gt rx458_pos, rx458_eos, rx458_done
+ set rx458_off, 0
+ lt rx458_pos, 2, rx458_start
+ sub rx458_off, rx458_pos, 1
+ substr rx458_tgt, rx458_tgt, rx458_off
+ rx458_start:
+ eq $I10, 1, rx458_restart
+ if_null rx458_debug, debug_403
+ rx458_cur."!cursor_debug"("START", "backslash:sym<misc>")
+ debug_403:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan461_done
+ goto rxscan461_scan
+ rxscan461_loop:
+ ($P10) = rx458_cur."from"()
+ inc $P10
+ set rx458_pos, $P10
+ ge rx458_pos, rx458_eos, rxscan461_done
+ rxscan461_scan:
+ set_addr $I10, rxscan461_loop
+ rx458_cur."!mark_push"(0, rx458_pos, $I10)
+ rxscan461_done:
+ # rx charclass W
+ ge rx458_pos, rx458_eos, rx458_fail
+ sub $I10, rx458_pos, rx458_off
+ is_cclass $I11, 8192, rx458_tgt, $I10
+ if $I11, rx458_fail
+ inc rx458_pos
+ # rx pass
+ rx458_cur."!cursor_pass"(rx458_pos, "backslash:sym<misc>")
+ if_null rx458_debug, debug_404
+ rx458_cur."!cursor_debug"("PASS", "backslash:sym<misc>", " at pos=", rx458_pos)
+ debug_404:
+ .return (rx458_cur)
+ rx458_restart:
+ if_null rx458_debug, debug_405
+ rx458_cur."!cursor_debug"("NEXT", "backslash:sym<misc>")
+ debug_405:
+ rx458_fail:
+ (rx458_rep, rx458_pos, $I10, $P10) = rx458_cur."!mark_fail"(0)
+ lt rx458_pos, -1, rx458_done
+ eq rx458_pos, -1, rx458_fail
+ jump $I10
+ rx458_done:
+ rx458_cur."!cursor_fail"()
+ if_null rx458_debug, debug_406
+ rx458_cur."!cursor_debug"("FAIL", "backslash:sym<misc>")
+ debug_406:
+ .return (rx458_cur)
+ .return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<?>" :subid("131_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P458 = "133_1283368197.39621"
- capture_lex $P458
- .local string rx451_tgt
- .local int rx451_pos
- .local int rx451_off
- .local int rx451_eos
- .local int rx451_rep
- .local pmc rx451_cur
- .local pmc rx451_debug
- (rx451_cur, rx451_pos, rx451_tgt, $I10) = self."!cursor_start"()
- getattribute rx451_debug, rx451_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx451_cur
- .local pmc match
- .lex "$/", match
- length rx451_eos, rx451_tgt
- gt rx451_pos, rx451_eos, rx451_done
- set rx451_off, 0
- lt rx451_pos, 2, rx451_start
- sub rx451_off, rx451_pos, 1
- substr rx451_tgt, rx451_tgt, rx451_off
- rx451_start:
- eq $I10, 1, rx451_restart
- if_null rx451_debug, debug_394
- rx451_cur."!cursor_debug"("START", "assertion:sym<?>")
- debug_394:
+.sub "!PREFIX__backslash:sym<misc>" :subid("133_1283975941.34404") :method
+.annotate 'line', 0
+ new $P460, "ResizablePMCArray"
+ push $P460, ""
+ .return ($P460)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "assertion" :subid("134_1283975941.34404") :method
+.annotate 'line', 0
+ $P463 = self."!protoregex"("assertion")
+ .return ($P463)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "!PREFIX__assertion" :subid("135_1283975941.34404") :method
+.annotate 'line', 0
+ $P465 = self."!PREFIX__!protoregex"("assertion")
+ .return ($P465)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "assertion:sym<?>" :subid("136_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P474 = "138_1283975941.34404"
+ capture_lex $P474
+ .local string rx467_tgt
+ .local int rx467_pos
+ .local int rx467_off
+ .local int rx467_eos
+ .local int rx467_rep
+ .local pmc rx467_cur
+ .local pmc rx467_debug
+ (rx467_cur, rx467_pos, rx467_tgt, $I10) = self."!cursor_start"()
+ getattribute rx467_debug, rx467_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx467_cur
+ .local pmc match
+ .lex "$/", match
+ length rx467_eos, rx467_tgt
+ gt rx467_pos, rx467_eos, rx467_done
+ set rx467_off, 0
+ lt rx467_pos, 2, rx467_start
+ sub rx467_off, rx467_pos, 1
+ substr rx467_tgt, rx467_tgt, rx467_off
+ rx467_start:
+ eq $I10, 1, rx467_restart
+ if_null rx467_debug, debug_407
+ rx467_cur."!cursor_debug"("START", "assertion:sym<?>")
+ debug_407:
$I10 = self.'from'()
- ne $I10, -1, rxscan455_done
- goto rxscan455_scan
- rxscan455_loop:
- ($P10) = rx451_cur."from"()
- inc $P10
- set rx451_pos, $P10
- ge rx451_pos, rx451_eos, rxscan455_done
- rxscan455_scan:
- set_addr $I10, rxscan455_loop
- rx451_cur."!mark_push"(0, rx451_pos, $I10)
- rxscan455_done:
-.annotate 'line', 149
+ ne $I10, -1, rxscan471_done
+ goto rxscan471_scan
+ rxscan471_loop:
+ ($P10) = rx467_cur."from"()
+ inc $P10
+ set rx467_pos, $P10
+ ge rx467_pos, rx467_eos, rxscan471_done
+ rxscan471_scan:
+ set_addr $I10, rxscan471_loop
+ rx467_cur."!mark_push"(0, rx467_pos, $I10)
+ rxscan471_done:
# rx literal "?"
- add $I11, rx451_pos, 1
- gt $I11, rx451_eos, rx451_fail
- sub $I11, rx451_pos, rx451_off
- ord $I11, rx451_tgt, $I11
- ne $I11, 63, rx451_fail
- add rx451_pos, 1
- alt456_0:
- set_addr $I10, alt456_1
- rx451_cur."!mark_push"(0, rx451_pos, $I10)
+ add $I11, rx467_pos, 1
+ gt $I11, rx467_eos, rx467_fail
+ sub $I11, rx467_pos, rx467_off
+ ord $I11, rx467_tgt, $I11
+ ne $I11, 63, rx467_fail
+ add rx467_pos, 1
+ alt472_0:
+ set_addr $I10, alt472_1
+ rx467_cur."!mark_push"(0, rx467_pos, $I10)
# rx subrule "before" subtype=zerowidth negate=
- rx451_cur."!cursor_pos"(rx451_pos)
- .const 'Sub' $P458 = "133_1283368197.39621"
- capture_lex $P458
- $P10 = rx451_cur."before"($P458)
- unless $P10, rx451_fail
- goto alt456_end
- alt456_1:
+ rx467_cur."!cursor_pos"(rx467_pos)
+ .const 'Sub' $P474 = "138_1283975941.34404"
+ capture_lex $P474
+ $P10 = rx467_cur."before"($P474)
+ unless $P10, rx467_fail
+ goto alt472_end
+ alt472_1:
# rx subrule "assertion" subtype=capture negate=
- rx451_cur."!cursor_pos"(rx451_pos)
- $P10 = rx451_cur."assertion"()
- unless $P10, rx451_fail
- rx451_cur."!mark_push"(0, -1, 0, $P10)
+ rx467_cur."!cursor_pos"(rx467_pos)
+ $P10 = rx467_cur."assertion"()
+ unless $P10, rx467_fail
+ rx467_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("assertion")
- rx451_pos = $P10."pos"()
- alt456_end:
+ rx467_pos = $P10."pos"()
+ alt472_end:
# rx pass
- rx451_cur."!cursor_pass"(rx451_pos, "assertion:sym<?>")
- if_null rx451_debug, debug_399
- rx451_cur."!cursor_debug"("PASS", "assertion:sym<?>", " at pos=", rx451_pos)
- debug_399:
- .return (rx451_cur)
- rx451_restart:
-.annotate 'line', 3
- if_null rx451_debug, debug_400
- rx451_cur."!cursor_debug"("NEXT", "assertion:sym<?>")
- debug_400:
- rx451_fail:
- (rx451_rep, rx451_pos, $I10, $P10) = rx451_cur."!mark_fail"(0)
- lt rx451_pos, -1, rx451_done
- eq rx451_pos, -1, rx451_fail
- jump $I10
- rx451_done:
- rx451_cur."!cursor_fail"()
- if_null rx451_debug, debug_401
- rx451_cur."!cursor_debug"("FAIL", "assertion:sym<?>")
- debug_401:
- .return (rx451_cur)
+ rx467_cur."!cursor_pass"(rx467_pos, "assertion:sym<?>")
+ if_null rx467_debug, debug_412
+ rx467_cur."!cursor_debug"("PASS", "assertion:sym<?>", " at pos=", rx467_pos)
+ debug_412:
+ .return (rx467_cur)
+ rx467_restart:
+ if_null rx467_debug, debug_413
+ rx467_cur."!cursor_debug"("NEXT", "assertion:sym<?>")
+ debug_413:
+ rx467_fail:
+ (rx467_rep, rx467_pos, $I10, $P10) = rx467_cur."!mark_fail"(0)
+ lt rx467_pos, -1, rx467_done
+ eq rx467_pos, -1, rx467_fail
+ jump $I10
+ rx467_done:
+ rx467_cur."!cursor_fail"()
+ if_null rx467_debug, debug_414
+ rx467_cur."!cursor_debug"("FAIL", "assertion:sym<?>")
+ debug_414:
+ .return (rx467_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<?>" :subid("132_1283368197.39621") :method
-.annotate 'line', 3
- $P453 = self."!PREFIX__!subrule"("assertion", "?")
- new $P454, "ResizablePMCArray"
- push $P454, $P453
- push $P454, "?"
- .return ($P454)
+.sub "!PREFIX__assertion:sym<?>" :subid("137_1283975941.34404") :method
+.annotate 'line', 0
+ $P469 = self."!PREFIX__!subrule"("assertion", "?")
+ new $P470, "ResizablePMCArray"
+ push $P470, $P469
+ push $P470, "?"
+ .return ($P470)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block457" :anon :subid("133_1283368197.39621") :method :outer("131_1283368197.39621")
-.annotate 'line', 149
- .local string rx459_tgt
- .local int rx459_pos
- .local int rx459_off
- .local int rx459_eos
- .local int rx459_rep
- .local pmc rx459_cur
- .local pmc rx459_debug
- (rx459_cur, rx459_pos, rx459_tgt, $I10) = self."!cursor_start"()
- getattribute rx459_debug, rx459_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx459_cur
- .local pmc match
- .lex "$/", match
- length rx459_eos, rx459_tgt
- gt rx459_pos, rx459_eos, rx459_done
- set rx459_off, 0
- lt rx459_pos, 2, rx459_start
- sub rx459_off, rx459_pos, 1
- substr rx459_tgt, rx459_tgt, rx459_off
- rx459_start:
- eq $I10, 1, rx459_restart
- if_null rx459_debug, debug_395
- rx459_cur."!cursor_debug"("START", "")
- debug_395:
+.sub "_block473" :anon :subid("138_1283975941.34404") :method :outer("136_1283975941.34404")
+.annotate 'line', 0
+ .local string rx475_tgt
+ .local int rx475_pos
+ .local int rx475_off
+ .local int rx475_eos
+ .local int rx475_rep
+ .local pmc rx475_cur
+ .local pmc rx475_debug
+ (rx475_cur, rx475_pos, rx475_tgt, $I10) = self."!cursor_start"()
+ getattribute rx475_debug, rx475_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx475_cur
+ .local pmc match
+ .lex "$/", match
+ length rx475_eos, rx475_tgt
+ gt rx475_pos, rx475_eos, rx475_done
+ set rx475_off, 0
+ lt rx475_pos, 2, rx475_start
+ sub rx475_off, rx475_pos, 1
+ substr rx475_tgt, rx475_tgt, rx475_off
+ rx475_start:
+ eq $I10, 1, rx475_restart
+ if_null rx475_debug, debug_408
+ rx475_cur."!cursor_debug"("START", "")
+ debug_408:
$I10 = self.'from'()
- ne $I10, -1, rxscan460_done
- goto rxscan460_scan
- rxscan460_loop:
- ($P10) = rx459_cur."from"()
- inc $P10
- set rx459_pos, $P10
- ge rx459_pos, rx459_eos, rxscan460_done
- rxscan460_scan:
- set_addr $I10, rxscan460_loop
- rx459_cur."!mark_push"(0, rx459_pos, $I10)
- rxscan460_done:
+ ne $I10, -1, rxscan476_done
+ goto rxscan476_scan
+ rxscan476_loop:
+ ($P10) = rx475_cur."from"()
+ inc $P10
+ set rx475_pos, $P10
+ ge rx475_pos, rx475_eos, rxscan476_done
+ rxscan476_scan:
+ set_addr $I10, rxscan476_loop
+ rx475_cur."!mark_push"(0, rx475_pos, $I10)
+ rxscan476_done:
# rx literal ">"
- add $I11, rx459_pos, 1
- gt $I11, rx459_eos, rx459_fail
- sub $I11, rx459_pos, rx459_off
- ord $I11, rx459_tgt, $I11
- ne $I11, 62, rx459_fail
- add rx459_pos, 1
- # rx pass
- rx459_cur."!cursor_pass"(rx459_pos, "")
- if_null rx459_debug, debug_396
- rx459_cur."!cursor_debug"("PASS", "", " at pos=", rx459_pos)
- debug_396:
- .return (rx459_cur)
- rx459_restart:
- if_null rx459_debug, debug_397
- rx459_cur."!cursor_debug"("NEXT", "")
- debug_397:
- rx459_fail:
- (rx459_rep, rx459_pos, $I10, $P10) = rx459_cur."!mark_fail"(0)
- lt rx459_pos, -1, rx459_done
- eq rx459_pos, -1, rx459_fail
- jump $I10
- rx459_done:
- rx459_cur."!cursor_fail"()
- if_null rx459_debug, debug_398
- rx459_cur."!cursor_debug"("FAIL", "")
- debug_398:
- .return (rx459_cur)
+ add $I11, rx475_pos, 1
+ gt $I11, rx475_eos, rx475_fail
+ sub $I11, rx475_pos, rx475_off
+ ord $I11, rx475_tgt, $I11
+ ne $I11, 62, rx475_fail
+ add rx475_pos, 1
+ # rx pass
+ rx475_cur."!cursor_pass"(rx475_pos, "")
+ if_null rx475_debug, debug_409
+ rx475_cur."!cursor_debug"("PASS", "", " at pos=", rx475_pos)
+ debug_409:
+ .return (rx475_cur)
+ rx475_restart:
+ if_null rx475_debug, debug_410
+ rx475_cur."!cursor_debug"("NEXT", "")
+ debug_410:
+ rx475_fail:
+ (rx475_rep, rx475_pos, $I10, $P10) = rx475_cur."!mark_fail"(0)
+ lt rx475_pos, -1, rx475_done
+ eq rx475_pos, -1, rx475_fail
+ jump $I10
+ rx475_done:
+ rx475_cur."!cursor_fail"()
+ if_null rx475_debug, debug_411
+ rx475_cur."!cursor_debug"("FAIL", "")
+ debug_411:
+ .return (rx475_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<!>" :subid("134_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P469 = "136_1283368197.39621"
- capture_lex $P469
- .local string rx462_tgt
- .local int rx462_pos
- .local int rx462_off
- .local int rx462_eos
- .local int rx462_rep
- .local pmc rx462_cur
- .local pmc rx462_debug
- (rx462_cur, rx462_pos, rx462_tgt, $I10) = self."!cursor_start"()
- getattribute rx462_debug, rx462_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx462_cur
- .local pmc match
- .lex "$/", match
- length rx462_eos, rx462_tgt
- gt rx462_pos, rx462_eos, rx462_done
- set rx462_off, 0
- lt rx462_pos, 2, rx462_start
- sub rx462_off, rx462_pos, 1
- substr rx462_tgt, rx462_tgt, rx462_off
- rx462_start:
- eq $I10, 1, rx462_restart
- if_null rx462_debug, debug_402
- rx462_cur."!cursor_debug"("START", "assertion:sym<!>")
- debug_402:
+.sub "assertion:sym<!>" :subid("139_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P485 = "141_1283975941.34404"
+ capture_lex $P485
+ .local string rx478_tgt
+ .local int rx478_pos
+ .local int rx478_off
+ .local int rx478_eos
+ .local int rx478_rep
+ .local pmc rx478_cur
+ .local pmc rx478_debug
+ (rx478_cur, rx478_pos, rx478_tgt, $I10) = self."!cursor_start"()
+ getattribute rx478_debug, rx478_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx478_cur
+ .local pmc match
+ .lex "$/", match
+ length rx478_eos, rx478_tgt
+ gt rx478_pos, rx478_eos, rx478_done
+ set rx478_off, 0
+ lt rx478_pos, 2, rx478_start
+ sub rx478_off, rx478_pos, 1
+ substr rx478_tgt, rx478_tgt, rx478_off
+ rx478_start:
+ eq $I10, 1, rx478_restart
+ if_null rx478_debug, debug_415
+ rx478_cur."!cursor_debug"("START", "assertion:sym<!>")
+ debug_415:
$I10 = self.'from'()
- ne $I10, -1, rxscan466_done
- goto rxscan466_scan
- rxscan466_loop:
- ($P10) = rx462_cur."from"()
- inc $P10
- set rx462_pos, $P10
- ge rx462_pos, rx462_eos, rxscan466_done
- rxscan466_scan:
- set_addr $I10, rxscan466_loop
- rx462_cur."!mark_push"(0, rx462_pos, $I10)
- rxscan466_done:
-.annotate 'line', 150
+ ne $I10, -1, rxscan482_done
+ goto rxscan482_scan
+ rxscan482_loop:
+ ($P10) = rx478_cur."from"()
+ inc $P10
+ set rx478_pos, $P10
+ ge rx478_pos, rx478_eos, rxscan482_done
+ rxscan482_scan:
+ set_addr $I10, rxscan482_loop
+ rx478_cur."!mark_push"(0, rx478_pos, $I10)
+ rxscan482_done:
# rx literal "!"
- add $I11, rx462_pos, 1
- gt $I11, rx462_eos, rx462_fail
- sub $I11, rx462_pos, rx462_off
- ord $I11, rx462_tgt, $I11
- ne $I11, 33, rx462_fail
- add rx462_pos, 1
- alt467_0:
- set_addr $I10, alt467_1
- rx462_cur."!mark_push"(0, rx462_pos, $I10)
+ add $I11, rx478_pos, 1
+ gt $I11, rx478_eos, rx478_fail
+ sub $I11, rx478_pos, rx478_off
+ ord $I11, rx478_tgt, $I11
+ ne $I11, 33, rx478_fail
+ add rx478_pos, 1
+ alt483_0:
+ set_addr $I10, alt483_1
+ rx478_cur."!mark_push"(0, rx478_pos, $I10)
# rx subrule "before" subtype=zerowidth negate=
- rx462_cur."!cursor_pos"(rx462_pos)
- .const 'Sub' $P469 = "136_1283368197.39621"
- capture_lex $P469
- $P10 = rx462_cur."before"($P469)
- unless $P10, rx462_fail
- goto alt467_end
- alt467_1:
+ rx478_cur."!cursor_pos"(rx478_pos)
+ .const 'Sub' $P485 = "141_1283975941.34404"
+ capture_lex $P485
+ $P10 = rx478_cur."before"($P485)
+ unless $P10, rx478_fail
+ goto alt483_end
+ alt483_1:
# rx subrule "assertion" subtype=capture negate=
- rx462_cur."!cursor_pos"(rx462_pos)
- $P10 = rx462_cur."assertion"()
- unless $P10, rx462_fail
- rx462_cur."!mark_push"(0, -1, 0, $P10)
+ rx478_cur."!cursor_pos"(rx478_pos)
+ $P10 = rx478_cur."assertion"()
+ unless $P10, rx478_fail
+ rx478_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("assertion")
- rx462_pos = $P10."pos"()
- alt467_end:
+ rx478_pos = $P10."pos"()
+ alt483_end:
# rx pass
- rx462_cur."!cursor_pass"(rx462_pos, "assertion:sym<!>")
- if_null rx462_debug, debug_407
- rx462_cur."!cursor_debug"("PASS", "assertion:sym<!>", " at pos=", rx462_pos)
- debug_407:
- .return (rx462_cur)
- rx462_restart:
-.annotate 'line', 3
- if_null rx462_debug, debug_408
- rx462_cur."!cursor_debug"("NEXT", "assertion:sym<!>")
- debug_408:
- rx462_fail:
- (rx462_rep, rx462_pos, $I10, $P10) = rx462_cur."!mark_fail"(0)
- lt rx462_pos, -1, rx462_done
- eq rx462_pos, -1, rx462_fail
- jump $I10
- rx462_done:
- rx462_cur."!cursor_fail"()
- if_null rx462_debug, debug_409
- rx462_cur."!cursor_debug"("FAIL", "assertion:sym<!>")
- debug_409:
- .return (rx462_cur)
+ rx478_cur."!cursor_pass"(rx478_pos, "assertion:sym<!>")
+ if_null rx478_debug, debug_420
+ rx478_cur."!cursor_debug"("PASS", "assertion:sym<!>", " at pos=", rx478_pos)
+ debug_420:
+ .return (rx478_cur)
+ rx478_restart:
+ if_null rx478_debug, debug_421
+ rx478_cur."!cursor_debug"("NEXT", "assertion:sym<!>")
+ debug_421:
+ rx478_fail:
+ (rx478_rep, rx478_pos, $I10, $P10) = rx478_cur."!mark_fail"(0)
+ lt rx478_pos, -1, rx478_done
+ eq rx478_pos, -1, rx478_fail
+ jump $I10
+ rx478_done:
+ rx478_cur."!cursor_fail"()
+ if_null rx478_debug, debug_422
+ rx478_cur."!cursor_debug"("FAIL", "assertion:sym<!>")
+ debug_422:
+ .return (rx478_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<!>" :subid("135_1283368197.39621") :method
-.annotate 'line', 3
- $P464 = self."!PREFIX__!subrule"("assertion", "!")
- new $P465, "ResizablePMCArray"
- push $P465, $P464
- push $P465, "!"
- .return ($P465)
+.sub "!PREFIX__assertion:sym<!>" :subid("140_1283975941.34404") :method
+.annotate 'line', 0
+ $P480 = self."!PREFIX__!subrule"("assertion", "!")
+ new $P481, "ResizablePMCArray"
+ push $P481, $P480
+ push $P481, "!"
+ .return ($P481)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block468" :anon :subid("136_1283368197.39621") :method :outer("134_1283368197.39621")
-.annotate 'line', 150
- .local string rx470_tgt
- .local int rx470_pos
- .local int rx470_off
- .local int rx470_eos
- .local int rx470_rep
- .local pmc rx470_cur
- .local pmc rx470_debug
- (rx470_cur, rx470_pos, rx470_tgt, $I10) = self."!cursor_start"()
- getattribute rx470_debug, rx470_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx470_cur
- .local pmc match
- .lex "$/", match
- length rx470_eos, rx470_tgt
- gt rx470_pos, rx470_eos, rx470_done
- set rx470_off, 0
- lt rx470_pos, 2, rx470_start
- sub rx470_off, rx470_pos, 1
- substr rx470_tgt, rx470_tgt, rx470_off
- rx470_start:
- eq $I10, 1, rx470_restart
- if_null rx470_debug, debug_403
- rx470_cur."!cursor_debug"("START", "")
- debug_403:
+.sub "_block484" :anon :subid("141_1283975941.34404") :method :outer("139_1283975941.34404")
+.annotate 'line', 0
+ .local string rx486_tgt
+ .local int rx486_pos
+ .local int rx486_off
+ .local int rx486_eos
+ .local int rx486_rep
+ .local pmc rx486_cur
+ .local pmc rx486_debug
+ (rx486_cur, rx486_pos, rx486_tgt, $I10) = self."!cursor_start"()
+ getattribute rx486_debug, rx486_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx486_cur
+ .local pmc match
+ .lex "$/", match
+ length rx486_eos, rx486_tgt
+ gt rx486_pos, rx486_eos, rx486_done
+ set rx486_off, 0
+ lt rx486_pos, 2, rx486_start
+ sub rx486_off, rx486_pos, 1
+ substr rx486_tgt, rx486_tgt, rx486_off
+ rx486_start:
+ eq $I10, 1, rx486_restart
+ if_null rx486_debug, debug_416
+ rx486_cur."!cursor_debug"("START", "")
+ debug_416:
$I10 = self.'from'()
- ne $I10, -1, rxscan471_done
- goto rxscan471_scan
- rxscan471_loop:
- ($P10) = rx470_cur."from"()
- inc $P10
- set rx470_pos, $P10
- ge rx470_pos, rx470_eos, rxscan471_done
- rxscan471_scan:
- set_addr $I10, rxscan471_loop
- rx470_cur."!mark_push"(0, rx470_pos, $I10)
- rxscan471_done:
+ ne $I10, -1, rxscan487_done
+ goto rxscan487_scan
+ rxscan487_loop:
+ ($P10) = rx486_cur."from"()
+ inc $P10
+ set rx486_pos, $P10
+ ge rx486_pos, rx486_eos, rxscan487_done
+ rxscan487_scan:
+ set_addr $I10, rxscan487_loop
+ rx486_cur."!mark_push"(0, rx486_pos, $I10)
+ rxscan487_done:
# rx literal ">"
- add $I11, rx470_pos, 1
- gt $I11, rx470_eos, rx470_fail
- sub $I11, rx470_pos, rx470_off
- ord $I11, rx470_tgt, $I11
- ne $I11, 62, rx470_fail
- add rx470_pos, 1
- # rx pass
- rx470_cur."!cursor_pass"(rx470_pos, "")
- if_null rx470_debug, debug_404
- rx470_cur."!cursor_debug"("PASS", "", " at pos=", rx470_pos)
- debug_404:
- .return (rx470_cur)
- rx470_restart:
- if_null rx470_debug, debug_405
- rx470_cur."!cursor_debug"("NEXT", "")
- debug_405:
- rx470_fail:
- (rx470_rep, rx470_pos, $I10, $P10) = rx470_cur."!mark_fail"(0)
- lt rx470_pos, -1, rx470_done
- eq rx470_pos, -1, rx470_fail
- jump $I10
- rx470_done:
- rx470_cur."!cursor_fail"()
- if_null rx470_debug, debug_406
- rx470_cur."!cursor_debug"("FAIL", "")
- debug_406:
- .return (rx470_cur)
+ add $I11, rx486_pos, 1
+ gt $I11, rx486_eos, rx486_fail
+ sub $I11, rx486_pos, rx486_off
+ ord $I11, rx486_tgt, $I11
+ ne $I11, 62, rx486_fail
+ add rx486_pos, 1
+ # rx pass
+ rx486_cur."!cursor_pass"(rx486_pos, "")
+ if_null rx486_debug, debug_417
+ rx486_cur."!cursor_debug"("PASS", "", " at pos=", rx486_pos)
+ debug_417:
+ .return (rx486_cur)
+ rx486_restart:
+ if_null rx486_debug, debug_418
+ rx486_cur."!cursor_debug"("NEXT", "")
+ debug_418:
+ rx486_fail:
+ (rx486_rep, rx486_pos, $I10, $P10) = rx486_cur."!mark_fail"(0)
+ lt rx486_pos, -1, rx486_done
+ eq rx486_pos, -1, rx486_fail
+ jump $I10
+ rx486_done:
+ rx486_cur."!cursor_fail"()
+ if_null rx486_debug, debug_419
+ rx486_cur."!cursor_debug"("FAIL", "")
+ debug_419:
+ .return (rx486_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<method>" :subid("137_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx473_tgt
- .local int rx473_pos
- .local int rx473_off
- .local int rx473_eos
- .local int rx473_rep
- .local pmc rx473_cur
- .local pmc rx473_debug
- (rx473_cur, rx473_pos, rx473_tgt, $I10) = self."!cursor_start"()
- getattribute rx473_debug, rx473_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx473_cur
- .local pmc match
- .lex "$/", match
- length rx473_eos, rx473_tgt
- gt rx473_pos, rx473_eos, rx473_done
- set rx473_off, 0
- lt rx473_pos, 2, rx473_start
- sub rx473_off, rx473_pos, 1
- substr rx473_tgt, rx473_tgt, rx473_off
- rx473_start:
- eq $I10, 1, rx473_restart
- if_null rx473_debug, debug_410
- rx473_cur."!cursor_debug"("START", "assertion:sym<method>")
- debug_410:
+.sub "assertion:sym<method>" :subid("142_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx489_tgt
+ .local int rx489_pos
+ .local int rx489_off
+ .local int rx489_eos
+ .local int rx489_rep
+ .local pmc rx489_cur
+ .local pmc rx489_debug
+ (rx489_cur, rx489_pos, rx489_tgt, $I10) = self."!cursor_start"()
+ getattribute rx489_debug, rx489_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx489_cur
+ .local pmc match
+ .lex "$/", match
+ length rx489_eos, rx489_tgt
+ gt rx489_pos, rx489_eos, rx489_done
+ set rx489_off, 0
+ lt rx489_pos, 2, rx489_start
+ sub rx489_off, rx489_pos, 1
+ substr rx489_tgt, rx489_tgt, rx489_off
+ rx489_start:
+ eq $I10, 1, rx489_restart
+ if_null rx489_debug, debug_423
+ rx489_cur."!cursor_debug"("START", "assertion:sym<method>")
+ debug_423:
$I10 = self.'from'()
- ne $I10, -1, rxscan477_done
- goto rxscan477_scan
- rxscan477_loop:
- ($P10) = rx473_cur."from"()
- inc $P10
- set rx473_pos, $P10
- ge rx473_pos, rx473_eos, rxscan477_done
- rxscan477_scan:
- set_addr $I10, rxscan477_loop
- rx473_cur."!mark_push"(0, rx473_pos, $I10)
- rxscan477_done:
-.annotate 'line', 153
+ ne $I10, -1, rxscan493_done
+ goto rxscan493_scan
+ rxscan493_loop:
+ ($P10) = rx489_cur."from"()
+ inc $P10
+ set rx489_pos, $P10
+ ge rx489_pos, rx489_eos, rxscan493_done
+ rxscan493_scan:
+ set_addr $I10, rxscan493_loop
+ rx489_cur."!mark_push"(0, rx489_pos, $I10)
+ rxscan493_done:
# rx literal "."
- add $I11, rx473_pos, 1
- gt $I11, rx473_eos, rx473_fail
- sub $I11, rx473_pos, rx473_off
- ord $I11, rx473_tgt, $I11
- ne $I11, 46, rx473_fail
- add rx473_pos, 1
+ add $I11, rx489_pos, 1
+ gt $I11, rx489_eos, rx489_fail
+ sub $I11, rx489_pos, rx489_off
+ ord $I11, rx489_tgt, $I11
+ ne $I11, 46, rx489_fail
+ add rx489_pos, 1
# rx subrule "assertion" subtype=capture negate=
- rx473_cur."!cursor_pos"(rx473_pos)
- $P10 = rx473_cur."assertion"()
- unless $P10, rx473_fail
- rx473_cur."!mark_push"(0, -1, 0, $P10)
+ rx489_cur."!cursor_pos"(rx489_pos)
+ $P10 = rx489_cur."assertion"()
+ unless $P10, rx489_fail
+ rx489_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("assertion")
- rx473_pos = $P10."pos"()
-.annotate 'line', 152
+ rx489_pos = $P10."pos"()
# rx pass
- rx473_cur."!cursor_pass"(rx473_pos, "assertion:sym<method>")
- if_null rx473_debug, debug_411
- rx473_cur."!cursor_debug"("PASS", "assertion:sym<method>", " at pos=", rx473_pos)
- debug_411:
- .return (rx473_cur)
- rx473_restart:
-.annotate 'line', 3
- if_null rx473_debug, debug_412
- rx473_cur."!cursor_debug"("NEXT", "assertion:sym<method>")
- debug_412:
- rx473_fail:
- (rx473_rep, rx473_pos, $I10, $P10) = rx473_cur."!mark_fail"(0)
- lt rx473_pos, -1, rx473_done
- eq rx473_pos, -1, rx473_fail
- jump $I10
- rx473_done:
- rx473_cur."!cursor_fail"()
- if_null rx473_debug, debug_413
- rx473_cur."!cursor_debug"("FAIL", "assertion:sym<method>")
- debug_413:
- .return (rx473_cur)
+ rx489_cur."!cursor_pass"(rx489_pos, "assertion:sym<method>")
+ if_null rx489_debug, debug_424
+ rx489_cur."!cursor_debug"("PASS", "assertion:sym<method>", " at pos=", rx489_pos)
+ debug_424:
+ .return (rx489_cur)
+ rx489_restart:
+ if_null rx489_debug, debug_425
+ rx489_cur."!cursor_debug"("NEXT", "assertion:sym<method>")
+ debug_425:
+ rx489_fail:
+ (rx489_rep, rx489_pos, $I10, $P10) = rx489_cur."!mark_fail"(0)
+ lt rx489_pos, -1, rx489_done
+ eq rx489_pos, -1, rx489_fail
+ jump $I10
+ rx489_done:
+ rx489_cur."!cursor_fail"()
+ if_null rx489_debug, debug_426
+ rx489_cur."!cursor_debug"("FAIL", "assertion:sym<method>")
+ debug_426:
+ .return (rx489_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<method>" :subid("138_1283368197.39621") :method
-.annotate 'line', 3
- $P475 = self."!PREFIX__!subrule"("assertion", ".")
- new $P476, "ResizablePMCArray"
- push $P476, $P475
- .return ($P476)
+.sub "!PREFIX__assertion:sym<method>" :subid("143_1283975941.34404") :method
+.annotate 'line', 0
+ $P491 = self."!PREFIX__!subrule"("assertion", ".")
+ new $P492, "ResizablePMCArray"
+ push $P492, $P491
+ .return ($P492)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<name>" :subid("139_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P487 = "141_1283368197.39621"
- capture_lex $P487
- .local string rx479_tgt
- .local int rx479_pos
- .local int rx479_off
- .local int rx479_eos
- .local int rx479_rep
- .local pmc rx479_cur
- .local pmc rx479_debug
- (rx479_cur, rx479_pos, rx479_tgt, $I10) = self."!cursor_start"()
- rx479_cur."!cursor_caparray"("nibbler", "arglist", "assertion")
- getattribute rx479_debug, rx479_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx479_cur
- .local pmc match
- .lex "$/", match
- length rx479_eos, rx479_tgt
- gt rx479_pos, rx479_eos, rx479_done
- set rx479_off, 0
- lt rx479_pos, 2, rx479_start
- sub rx479_off, rx479_pos, 1
- substr rx479_tgt, rx479_tgt, rx479_off
- rx479_start:
- eq $I10, 1, rx479_restart
- if_null rx479_debug, debug_414
- rx479_cur."!cursor_debug"("START", "assertion:sym<name>")
- debug_414:
+.sub "assertion:sym<name>" :subid("144_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P503 = "146_1283975941.34404"
+ capture_lex $P503
+ .local string rx495_tgt
+ .local int rx495_pos
+ .local int rx495_off
+ .local int rx495_eos
+ .local int rx495_rep
+ .local pmc rx495_cur
+ .local pmc rx495_debug
+ (rx495_cur, rx495_pos, rx495_tgt, $I10) = self."!cursor_start"()
+ rx495_cur."!cursor_caparray"("assertion", "nibbler", "arglist")
+ getattribute rx495_debug, rx495_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx495_cur
+ .local pmc match
+ .lex "$/", match
+ length rx495_eos, rx495_tgt
+ gt rx495_pos, rx495_eos, rx495_done
+ set rx495_off, 0
+ lt rx495_pos, 2, rx495_start
+ sub rx495_off, rx495_pos, 1
+ substr rx495_tgt, rx495_tgt, rx495_off
+ rx495_start:
+ eq $I10, 1, rx495_restart
+ if_null rx495_debug, debug_427
+ rx495_cur."!cursor_debug"("START", "assertion:sym<name>")
+ debug_427:
$I10 = self.'from'()
- ne $I10, -1, rxscan483_done
- goto rxscan483_scan
- rxscan483_loop:
- ($P10) = rx479_cur."from"()
- inc $P10
- set rx479_pos, $P10
- ge rx479_pos, rx479_eos, rxscan483_done
- rxscan483_scan:
- set_addr $I10, rxscan483_loop
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
- rxscan483_done:
-.annotate 'line', 157
+ ne $I10, -1, rxscan499_done
+ goto rxscan499_scan
+ rxscan499_loop:
+ ($P10) = rx495_cur."from"()
+ inc $P10
+ set rx495_pos, $P10
+ ge rx495_pos, rx495_eos, rxscan499_done
+ rxscan499_scan:
+ set_addr $I10, rxscan499_loop
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
+ rxscan499_done:
# rx subrule "identifier" subtype=capture negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."identifier"()
- unless $P10, rx479_fail
- rx479_cur."!mark_push"(0, -1, 0, $P10)
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."identifier"()
+ unless $P10, rx495_fail
+ rx495_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("longname")
- rx479_pos = $P10."pos"()
-.annotate 'line', 164
- # rx rxquantr484 ** 0..1
- set_addr $I10, rxquantr484_done
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
- rxquantr484_loop:
- alt485_0:
-.annotate 'line', 158
- set_addr $I10, alt485_1
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
-.annotate 'line', 159
+ rx495_pos = $P10."pos"()
+ # rx rxquantr500 ** 0..1
+ set_addr $I10, rxquantr500_done
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
+ rxquantr500_loop:
+ alt501_0:
+ set_addr $I10, alt501_1
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
# rx subrule "before" subtype=zerowidth negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- .const 'Sub' $P487 = "141_1283368197.39621"
- capture_lex $P487
- $P10 = rx479_cur."before"($P487)
- unless $P10, rx479_fail
- goto alt485_end
- alt485_1:
- set_addr $I10, alt485_2
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
-.annotate 'line', 160
+ rx495_cur."!cursor_pos"(rx495_pos)
+ .const 'Sub' $P503 = "146_1283975941.34404"
+ capture_lex $P503
+ $P10 = rx495_cur."before"($P503)
+ unless $P10, rx495_fail
+ goto alt501_end
+ alt501_1:
+ set_addr $I10, alt501_2
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
# rx literal "="
- add $I11, rx479_pos, 1
- gt $I11, rx479_eos, rx479_fail
- sub $I11, rx479_pos, rx479_off
- ord $I11, rx479_tgt, $I11
- ne $I11, 61, rx479_fail
- add rx479_pos, 1
+ add $I11, rx495_pos, 1
+ gt $I11, rx495_eos, rx495_fail
+ sub $I11, rx495_pos, rx495_off
+ ord $I11, rx495_tgt, $I11
+ ne $I11, 61, rx495_fail
+ add rx495_pos, 1
# rx subrule "assertion" subtype=capture negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."assertion"()
- unless $P10, rx479_fail
- rx479_cur."!mark_push"(0, -1, 0, $P10)
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."assertion"()
+ unless $P10, rx495_fail
+ rx495_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("assertion")
- rx479_pos = $P10."pos"()
- goto alt485_end
- alt485_2:
- set_addr $I10, alt485_3
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
-.annotate 'line', 161
+ rx495_pos = $P10."pos"()
+ goto alt501_end
+ alt501_2:
+ set_addr $I10, alt501_3
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
# rx literal ":"
- add $I11, rx479_pos, 1
- gt $I11, rx479_eos, rx479_fail
- sub $I11, rx479_pos, rx479_off
- ord $I11, rx479_tgt, $I11
- ne $I11, 58, rx479_fail
- add rx479_pos, 1
+ add $I11, rx495_pos, 1
+ gt $I11, rx495_eos, rx495_fail
+ sub $I11, rx495_pos, rx495_off
+ ord $I11, rx495_tgt, $I11
+ ne $I11, 58, rx495_fail
+ add rx495_pos, 1
# rx subrule "arglist" subtype=capture negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."arglist"()
- unless $P10, rx479_fail
- rx479_cur."!mark_push"(0, -1, 0, $P10)
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."arglist"()
+ unless $P10, rx495_fail
+ rx495_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("arglist")
- rx479_pos = $P10."pos"()
- goto alt485_end
- alt485_3:
- set_addr $I10, alt485_4
- rx479_cur."!mark_push"(0, rx479_pos, $I10)
-.annotate 'line', 162
+ rx495_pos = $P10."pos"()
+ goto alt501_end
+ alt501_3:
+ set_addr $I10, alt501_4
+ rx495_cur."!mark_push"(0, rx495_pos, $I10)
# rx literal "("
- add $I11, rx479_pos, 1
- gt $I11, rx479_eos, rx479_fail
- sub $I11, rx479_pos, rx479_off
- ord $I11, rx479_tgt, $I11
- ne $I11, 40, rx479_fail
- add rx479_pos, 1
+ add $I11, rx495_pos, 1
+ gt $I11, rx495_eos, rx495_fail
+ sub $I11, rx495_pos, rx495_off
+ ord $I11, rx495_tgt, $I11
+ ne $I11, 40, rx495_fail
+ add rx495_pos, 1
# rx subrule "arglist" subtype=capture negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."arglist"()
- unless $P10, rx479_fail
- rx479_cur."!mark_push"(0, -1, 0, $P10)
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."arglist"()
+ unless $P10, rx495_fail
+ rx495_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("arglist")
- rx479_pos = $P10."pos"()
+ rx495_pos = $P10."pos"()
# rx literal ")"
- add $I11, rx479_pos, 1
- gt $I11, rx479_eos, rx479_fail
- sub $I11, rx479_pos, rx479_off
- ord $I11, rx479_tgt, $I11
- ne $I11, 41, rx479_fail
- add rx479_pos, 1
- goto alt485_end
- alt485_4:
-.annotate 'line', 163
+ add $I11, rx495_pos, 1
+ gt $I11, rx495_eos, rx495_fail
+ sub $I11, rx495_pos, rx495_off
+ ord $I11, rx495_tgt, $I11
+ ne $I11, 41, rx495_fail
+ add rx495_pos, 1
+ goto alt501_end
+ alt501_4:
# rx subrule "normspace" subtype=method negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."normspace"()
- unless $P10, rx479_fail
- rx479_pos = $P10."pos"()
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."normspace"()
+ unless $P10, rx495_fail
+ rx495_pos = $P10."pos"()
# rx subrule "nibbler" subtype=capture negate=
- rx479_cur."!cursor_pos"(rx479_pos)
- $P10 = rx479_cur."nibbler"()
- unless $P10, rx479_fail
- rx479_cur."!mark_push"(0, -1, 0, $P10)
+ rx495_cur."!cursor_pos"(rx495_pos)
+ $P10 = rx495_cur."nibbler"()
+ unless $P10, rx495_fail
+ rx495_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("nibbler")
- rx479_pos = $P10."pos"()
- alt485_end:
-.annotate 'line', 164
- set_addr $I10, rxquantr484_done
- (rx479_rep) = rx479_cur."!mark_commit"($I10)
- rxquantr484_done:
-.annotate 'line', 156
- # rx pass
- rx479_cur."!cursor_pass"(rx479_pos, "assertion:sym<name>")
- if_null rx479_debug, debug_419
- rx479_cur."!cursor_debug"("PASS", "assertion:sym<name>", " at pos=", rx479_pos)
- debug_419:
- .return (rx479_cur)
- rx479_restart:
-.annotate 'line', 3
- if_null rx479_debug, debug_420
- rx479_cur."!cursor_debug"("NEXT", "assertion:sym<name>")
- debug_420:
- rx479_fail:
- (rx479_rep, rx479_pos, $I10, $P10) = rx479_cur."!mark_fail"(0)
- lt rx479_pos, -1, rx479_done
- eq rx479_pos, -1, rx479_fail
- jump $I10
- rx479_done:
- rx479_cur."!cursor_fail"()
- if_null rx479_debug, debug_421
- rx479_cur."!cursor_debug"("FAIL", "assertion:sym<name>")
- debug_421:
- .return (rx479_cur)
+ rx495_pos = $P10."pos"()
+ alt501_end:
+ set_addr $I10, rxquantr500_done
+ (rx495_rep) = rx495_cur."!mark_commit"($I10)
+ rxquantr500_done:
+ # rx pass
+ rx495_cur."!cursor_pass"(rx495_pos, "assertion:sym<name>")
+ if_null rx495_debug, debug_432
+ rx495_cur."!cursor_debug"("PASS", "assertion:sym<name>", " at pos=", rx495_pos)
+ debug_432:
+ .return (rx495_cur)
+ rx495_restart:
+ if_null rx495_debug, debug_433
+ rx495_cur."!cursor_debug"("NEXT", "assertion:sym<name>")
+ debug_433:
+ rx495_fail:
+ (rx495_rep, rx495_pos, $I10, $P10) = rx495_cur."!mark_fail"(0)
+ lt rx495_pos, -1, rx495_done
+ eq rx495_pos, -1, rx495_fail
+ jump $I10
+ rx495_done:
+ rx495_cur."!cursor_fail"()
+ if_null rx495_debug, debug_434
+ rx495_cur."!cursor_debug"("FAIL", "assertion:sym<name>")
+ debug_434:
+ .return (rx495_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<name>" :subid("140_1283368197.39621") :method
-.annotate 'line', 3
- $P481 = self."!PREFIX__!subrule"("identifier", "")
- new $P482, "ResizablePMCArray"
- push $P482, $P481
- .return ($P482)
+.sub "!PREFIX__assertion:sym<name>" :subid("145_1283975941.34404") :method
+.annotate 'line', 0
+ $P497 = self."!PREFIX__!subrule"("identifier", "")
+ new $P498, "ResizablePMCArray"
+ push $P498, $P497
+ .return ($P498)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block486" :anon :subid("141_1283368197.39621") :method :outer("139_1283368197.39621")
-.annotate 'line', 159
- .local string rx488_tgt
- .local int rx488_pos
- .local int rx488_off
- .local int rx488_eos
- .local int rx488_rep
- .local pmc rx488_cur
- .local pmc rx488_debug
- (rx488_cur, rx488_pos, rx488_tgt, $I10) = self."!cursor_start"()
- getattribute rx488_debug, rx488_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx488_cur
- .local pmc match
- .lex "$/", match
- length rx488_eos, rx488_tgt
- gt rx488_pos, rx488_eos, rx488_done
- set rx488_off, 0
- lt rx488_pos, 2, rx488_start
- sub rx488_off, rx488_pos, 1
- substr rx488_tgt, rx488_tgt, rx488_off
- rx488_start:
- eq $I10, 1, rx488_restart
- if_null rx488_debug, debug_415
- rx488_cur."!cursor_debug"("START", "")
- debug_415:
+.sub "_block502" :anon :subid("146_1283975941.34404") :method :outer("144_1283975941.34404")
+.annotate 'line', 0
+ .local string rx504_tgt
+ .local int rx504_pos
+ .local int rx504_off
+ .local int rx504_eos
+ .local int rx504_rep
+ .local pmc rx504_cur
+ .local pmc rx504_debug
+ (rx504_cur, rx504_pos, rx504_tgt, $I10) = self."!cursor_start"()
+ getattribute rx504_debug, rx504_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx504_cur
+ .local pmc match
+ .lex "$/", match
+ length rx504_eos, rx504_tgt
+ gt rx504_pos, rx504_eos, rx504_done
+ set rx504_off, 0
+ lt rx504_pos, 2, rx504_start
+ sub rx504_off, rx504_pos, 1
+ substr rx504_tgt, rx504_tgt, rx504_off
+ rx504_start:
+ eq $I10, 1, rx504_restart
+ if_null rx504_debug, debug_428
+ rx504_cur."!cursor_debug"("START", "")
+ debug_428:
$I10 = self.'from'()
- ne $I10, -1, rxscan489_done
- goto rxscan489_scan
- rxscan489_loop:
- ($P10) = rx488_cur."from"()
- inc $P10
- set rx488_pos, $P10
- ge rx488_pos, rx488_eos, rxscan489_done
- rxscan489_scan:
- set_addr $I10, rxscan489_loop
- rx488_cur."!mark_push"(0, rx488_pos, $I10)
- rxscan489_done:
+ ne $I10, -1, rxscan505_done
+ goto rxscan505_scan
+ rxscan505_loop:
+ ($P10) = rx504_cur."from"()
+ inc $P10
+ set rx504_pos, $P10
+ ge rx504_pos, rx504_eos, rxscan505_done
+ rxscan505_scan:
+ set_addr $I10, rxscan505_loop
+ rx504_cur."!mark_push"(0, rx504_pos, $I10)
+ rxscan505_done:
# rx literal ">"
- add $I11, rx488_pos, 1
- gt $I11, rx488_eos, rx488_fail
- sub $I11, rx488_pos, rx488_off
- ord $I11, rx488_tgt, $I11
- ne $I11, 62, rx488_fail
- add rx488_pos, 1
- # rx pass
- rx488_cur."!cursor_pass"(rx488_pos, "")
- if_null rx488_debug, debug_416
- rx488_cur."!cursor_debug"("PASS", "", " at pos=", rx488_pos)
- debug_416:
- .return (rx488_cur)
- rx488_restart:
- if_null rx488_debug, debug_417
- rx488_cur."!cursor_debug"("NEXT", "")
- debug_417:
- rx488_fail:
- (rx488_rep, rx488_pos, $I10, $P10) = rx488_cur."!mark_fail"(0)
- lt rx488_pos, -1, rx488_done
- eq rx488_pos, -1, rx488_fail
- jump $I10
- rx488_done:
- rx488_cur."!cursor_fail"()
- if_null rx488_debug, debug_418
- rx488_cur."!cursor_debug"("FAIL", "")
- debug_418:
- .return (rx488_cur)
+ add $I11, rx504_pos, 1
+ gt $I11, rx504_eos, rx504_fail
+ sub $I11, rx504_pos, rx504_off
+ ord $I11, rx504_tgt, $I11
+ ne $I11, 62, rx504_fail
+ add rx504_pos, 1
+ # rx pass
+ rx504_cur."!cursor_pass"(rx504_pos, "")
+ if_null rx504_debug, debug_429
+ rx504_cur."!cursor_debug"("PASS", "", " at pos=", rx504_pos)
+ debug_429:
+ .return (rx504_cur)
+ rx504_restart:
+ if_null rx504_debug, debug_430
+ rx504_cur."!cursor_debug"("NEXT", "")
+ debug_430:
+ rx504_fail:
+ (rx504_rep, rx504_pos, $I10, $P10) = rx504_cur."!mark_fail"(0)
+ lt rx504_pos, -1, rx504_done
+ eq rx504_pos, -1, rx504_fail
+ jump $I10
+ rx504_done:
+ rx504_cur."!cursor_fail"()
+ if_null rx504_debug, debug_431
+ rx504_cur."!cursor_debug"("FAIL", "")
+ debug_431:
+ .return (rx504_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<[>" :subid("142_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P496 = "144_1283368197.39621"
- capture_lex $P496
- .local string rx491_tgt
- .local int rx491_pos
- .local int rx491_off
- .local int rx491_eos
- .local int rx491_rep
- .local pmc rx491_cur
- .local pmc rx491_debug
- (rx491_cur, rx491_pos, rx491_tgt, $I10) = self."!cursor_start"()
- rx491_cur."!cursor_caparray"("cclass_elem")
- getattribute rx491_debug, rx491_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx491_cur
- .local pmc match
- .lex "$/", match
- length rx491_eos, rx491_tgt
- gt rx491_pos, rx491_eos, rx491_done
- set rx491_off, 0
- lt rx491_pos, 2, rx491_start
- sub rx491_off, rx491_pos, 1
- substr rx491_tgt, rx491_tgt, rx491_off
- rx491_start:
- eq $I10, 1, rx491_restart
- if_null rx491_debug, debug_422
- rx491_cur."!cursor_debug"("START", "assertion:sym<[>")
- debug_422:
+.sub "assertion:sym<[>" :subid("147_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P512 = "149_1283975941.34404"
+ capture_lex $P512
+ .local string rx507_tgt
+ .local int rx507_pos
+ .local int rx507_off
+ .local int rx507_eos
+ .local int rx507_rep
+ .local pmc rx507_cur
+ .local pmc rx507_debug
+ (rx507_cur, rx507_pos, rx507_tgt, $I10) = self."!cursor_start"()
+ rx507_cur."!cursor_caparray"("cclass_elem")
+ getattribute rx507_debug, rx507_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx507_cur
+ .local pmc match
+ .lex "$/", match
+ length rx507_eos, rx507_tgt
+ gt rx507_pos, rx507_eos, rx507_done
+ set rx507_off, 0
+ lt rx507_pos, 2, rx507_start
+ sub rx507_off, rx507_pos, 1
+ substr rx507_tgt, rx507_tgt, rx507_off
+ rx507_start:
+ eq $I10, 1, rx507_restart
+ if_null rx507_debug, debug_435
+ rx507_cur."!cursor_debug"("START", "assertion:sym<[>")
+ debug_435:
$I10 = self.'from'()
- ne $I10, -1, rxscan494_done
- goto rxscan494_scan
- rxscan494_loop:
- ($P10) = rx491_cur."from"()
- inc $P10
- set rx491_pos, $P10
- ge rx491_pos, rx491_eos, rxscan494_done
- rxscan494_scan:
- set_addr $I10, rxscan494_loop
- rx491_cur."!mark_push"(0, rx491_pos, $I10)
- rxscan494_done:
-.annotate 'line', 167
+ ne $I10, -1, rxscan510_done
+ goto rxscan510_scan
+ rxscan510_loop:
+ ($P10) = rx507_cur."from"()
+ inc $P10
+ set rx507_pos, $P10
+ ge rx507_pos, rx507_eos, rxscan510_done
+ rxscan510_scan:
+ set_addr $I10, rxscan510_loop
+ rx507_cur."!mark_push"(0, rx507_pos, $I10)
+ rxscan510_done:
# rx subrule "before" subtype=zerowidth negate=
- rx491_cur."!cursor_pos"(rx491_pos)
- .const 'Sub' $P496 = "144_1283368197.39621"
- capture_lex $P496
- $P10 = rx491_cur."before"($P496)
- unless $P10, rx491_fail
- # rx rxquantr500 ** 1..*
- set_addr $I10, rxquantr500_done
- rx491_cur."!mark_push"(0, -1, $I10)
- rxquantr500_loop:
+ rx507_cur."!cursor_pos"(rx507_pos)
+ .const 'Sub' $P512 = "149_1283975941.34404"
+ capture_lex $P512
+ $P10 = rx507_cur."before"($P512)
+ unless $P10, rx507_fail
+ # rx rxquantr516 ** 1..*
+ set_addr $I10, rxquantr516_done
+ rx507_cur."!mark_push"(0, -1, $I10)
+ rxquantr516_loop:
# rx subrule "cclass_elem" subtype=capture negate=
- rx491_cur."!cursor_pos"(rx491_pos)
- $P10 = rx491_cur."cclass_elem"()
- unless $P10, rx491_fail
- goto rxsubrule501_pass
- rxsubrule501_back:
+ rx507_cur."!cursor_pos"(rx507_pos)
+ $P10 = rx507_cur."cclass_elem"()
+ unless $P10, rx507_fail
+ goto rxsubrule517_pass
+ rxsubrule517_back:
$P10 = $P10."!cursor_next"()
- unless $P10, rx491_fail
- rxsubrule501_pass:
- set_addr $I10, rxsubrule501_back
- rx491_cur."!mark_push"(0, rx491_pos, $I10, $P10)
+ unless $P10, rx507_fail
+ rxsubrule517_pass:
+ set_addr $I10, rxsubrule517_back
+ rx507_cur."!mark_push"(0, rx507_pos, $I10, $P10)
$P10."!cursor_names"("cclass_elem")
- rx491_pos = $P10."pos"()
- set_addr $I10, rxquantr500_done
- (rx491_rep) = rx491_cur."!mark_commit"($I10)
- set_addr $I10, rxquantr500_done
- rx491_cur."!mark_push"(rx491_rep, rx491_pos, $I10)
- goto rxquantr500_loop
- rxquantr500_done:
- # rx pass
- rx491_cur."!cursor_pass"(rx491_pos, "assertion:sym<[>")
- if_null rx491_debug, debug_427
- rx491_cur."!cursor_debug"("PASS", "assertion:sym<[>", " at pos=", rx491_pos)
- debug_427:
- .return (rx491_cur)
- rx491_restart:
-.annotate 'line', 3
- if_null rx491_debug, debug_428
- rx491_cur."!cursor_debug"("NEXT", "assertion:sym<[>")
- debug_428:
- rx491_fail:
- (rx491_rep, rx491_pos, $I10, $P10) = rx491_cur."!mark_fail"(0)
- lt rx491_pos, -1, rx491_done
- eq rx491_pos, -1, rx491_fail
- jump $I10
- rx491_done:
- rx491_cur."!cursor_fail"()
- if_null rx491_debug, debug_429
- rx491_cur."!cursor_debug"("FAIL", "assertion:sym<[>")
- debug_429:
- .return (rx491_cur)
+ rx507_pos = $P10."pos"()
+ set_addr $I10, rxquantr516_done
+ (rx507_rep) = rx507_cur."!mark_commit"($I10)
+ set_addr $I10, rxquantr516_done
+ rx507_cur."!mark_push"(rx507_rep, rx507_pos, $I10)
+ goto rxquantr516_loop
+ rxquantr516_done:
+ # rx pass
+ rx507_cur."!cursor_pass"(rx507_pos, "assertion:sym<[>")
+ if_null rx507_debug, debug_440
+ rx507_cur."!cursor_debug"("PASS", "assertion:sym<[>", " at pos=", rx507_pos)
+ debug_440:
+ .return (rx507_cur)
+ rx507_restart:
+ if_null rx507_debug, debug_441
+ rx507_cur."!cursor_debug"("NEXT", "assertion:sym<[>")
+ debug_441:
+ rx507_fail:
+ (rx507_rep, rx507_pos, $I10, $P10) = rx507_cur."!mark_fail"(0)
+ lt rx507_pos, -1, rx507_done
+ eq rx507_pos, -1, rx507_fail
+ jump $I10
+ rx507_done:
+ rx507_cur."!cursor_fail"()
+ if_null rx507_debug, debug_442
+ rx507_cur."!cursor_debug"("FAIL", "assertion:sym<[>")
+ debug_442:
+ .return (rx507_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<[>" :subid("143_1283368197.39621") :method
-.annotate 'line', 3
- new $P493, "ResizablePMCArray"
- push $P493, ""
- .return ($P493)
+.sub "!PREFIX__assertion:sym<[>" :subid("148_1283975941.34404") :method
+.annotate 'line', 0
+ new $P509, "ResizablePMCArray"
+ push $P509, ""
+ .return ($P509)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block495" :anon :subid("144_1283368197.39621") :method :outer("142_1283368197.39621")
-.annotate 'line', 167
- .local string rx497_tgt
- .local int rx497_pos
- .local int rx497_off
- .local int rx497_eos
- .local int rx497_rep
- .local pmc rx497_cur
- .local pmc rx497_debug
- (rx497_cur, rx497_pos, rx497_tgt, $I10) = self."!cursor_start"()
- getattribute rx497_debug, rx497_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx497_cur
- .local pmc match
- .lex "$/", match
- length rx497_eos, rx497_tgt
- gt rx497_pos, rx497_eos, rx497_done
- set rx497_off, 0
- lt rx497_pos, 2, rx497_start
- sub rx497_off, rx497_pos, 1
- substr rx497_tgt, rx497_tgt, rx497_off
- rx497_start:
- eq $I10, 1, rx497_restart
- if_null rx497_debug, debug_423
- rx497_cur."!cursor_debug"("START", "")
- debug_423:
+.sub "_block511" :anon :subid("149_1283975941.34404") :method :outer("147_1283975941.34404")
+.annotate 'line', 0
+ .local string rx513_tgt
+ .local int rx513_pos
+ .local int rx513_off
+ .local int rx513_eos
+ .local int rx513_rep
+ .local pmc rx513_cur
+ .local pmc rx513_debug
+ (rx513_cur, rx513_pos, rx513_tgt, $I10) = self."!cursor_start"()
+ getattribute rx513_debug, rx513_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx513_cur
+ .local pmc match
+ .lex "$/", match
+ length rx513_eos, rx513_tgt
+ gt rx513_pos, rx513_eos, rx513_done
+ set rx513_off, 0
+ lt rx513_pos, 2, rx513_start
+ sub rx513_off, rx513_pos, 1
+ substr rx513_tgt, rx513_tgt, rx513_off
+ rx513_start:
+ eq $I10, 1, rx513_restart
+ if_null rx513_debug, debug_436
+ rx513_cur."!cursor_debug"("START", "")
+ debug_436:
$I10 = self.'from'()
- ne $I10, -1, rxscan498_done
- goto rxscan498_scan
- rxscan498_loop:
- ($P10) = rx497_cur."from"()
- inc $P10
- set rx497_pos, $P10
- ge rx497_pos, rx497_eos, rxscan498_done
- rxscan498_scan:
- set_addr $I10, rxscan498_loop
- rx497_cur."!mark_push"(0, rx497_pos, $I10)
- rxscan498_done:
- alt499_0:
- set_addr $I10, alt499_1
- rx497_cur."!mark_push"(0, rx497_pos, $I10)
+ ne $I10, -1, rxscan514_done
+ goto rxscan514_scan
+ rxscan514_loop:
+ ($P10) = rx513_cur."from"()
+ inc $P10
+ set rx513_pos, $P10
+ ge rx513_pos, rx513_eos, rxscan514_done
+ rxscan514_scan:
+ set_addr $I10, rxscan514_loop
+ rx513_cur."!mark_push"(0, rx513_pos, $I10)
+ rxscan514_done:
+ alt515_0:
+ set_addr $I10, alt515_1
+ rx513_cur."!mark_push"(0, rx513_pos, $I10)
# rx literal "["
- add $I11, rx497_pos, 1
- gt $I11, rx497_eos, rx497_fail
- sub $I11, rx497_pos, rx497_off
- ord $I11, rx497_tgt, $I11
- ne $I11, 91, rx497_fail
- add rx497_pos, 1
- goto alt499_end
- alt499_1:
- set_addr $I10, alt499_2
- rx497_cur."!mark_push"(0, rx497_pos, $I10)
+ add $I11, rx513_pos, 1
+ gt $I11, rx513_eos, rx513_fail
+ sub $I11, rx513_pos, rx513_off
+ ord $I11, rx513_tgt, $I11
+ ne $I11, 91, rx513_fail
+ add rx513_pos, 1
+ goto alt515_end
+ alt515_1:
+ set_addr $I10, alt515_2
+ rx513_cur."!mark_push"(0, rx513_pos, $I10)
# rx literal "+"
- add $I11, rx497_pos, 1
- gt $I11, rx497_eos, rx497_fail
- sub $I11, rx497_pos, rx497_off
- ord $I11, rx497_tgt, $I11
- ne $I11, 43, rx497_fail
- add rx497_pos, 1
- goto alt499_end
- alt499_2:
+ add $I11, rx513_pos, 1
+ gt $I11, rx513_eos, rx513_fail
+ sub $I11, rx513_pos, rx513_off
+ ord $I11, rx513_tgt, $I11
+ ne $I11, 43, rx513_fail
+ add rx513_pos, 1
+ goto alt515_end
+ alt515_2:
# rx literal "-"
- add $I11, rx497_pos, 1
- gt $I11, rx497_eos, rx497_fail
- sub $I11, rx497_pos, rx497_off
- ord $I11, rx497_tgt, $I11
- ne $I11, 45, rx497_fail
- add rx497_pos, 1
- alt499_end:
- # rx pass
- rx497_cur."!cursor_pass"(rx497_pos, "")
- if_null rx497_debug, debug_424
- rx497_cur."!cursor_debug"("PASS", "", " at pos=", rx497_pos)
- debug_424:
- .return (rx497_cur)
- rx497_restart:
- if_null rx497_debug, debug_425
- rx497_cur."!cursor_debug"("NEXT", "")
- debug_425:
- rx497_fail:
- (rx497_rep, rx497_pos, $I10, $P10) = rx497_cur."!mark_fail"(0)
- lt rx497_pos, -1, rx497_done
- eq rx497_pos, -1, rx497_fail
- jump $I10
- rx497_done:
- rx497_cur."!cursor_fail"()
- if_null rx497_debug, debug_426
- rx497_cur."!cursor_debug"("FAIL", "")
- debug_426:
- .return (rx497_cur)
+ add $I11, rx513_pos, 1
+ gt $I11, rx513_eos, rx513_fail
+ sub $I11, rx513_pos, rx513_off
+ ord $I11, rx513_tgt, $I11
+ ne $I11, 45, rx513_fail
+ add rx513_pos, 1
+ alt515_end:
+ # rx pass
+ rx513_cur."!cursor_pass"(rx513_pos, "")
+ if_null rx513_debug, debug_437
+ rx513_cur."!cursor_debug"("PASS", "", " at pos=", rx513_pos)
+ debug_437:
+ .return (rx513_cur)
+ rx513_restart:
+ if_null rx513_debug, debug_438
+ rx513_cur."!cursor_debug"("NEXT", "")
+ debug_438:
+ rx513_fail:
+ (rx513_rep, rx513_pos, $I10, $P10) = rx513_cur."!mark_fail"(0)
+ lt rx513_pos, -1, rx513_done
+ eq rx513_pos, -1, rx513_fail
+ jump $I10
+ rx513_done:
+ rx513_cur."!cursor_fail"()
+ if_null rx513_debug, debug_439
+ rx513_cur."!cursor_debug"("FAIL", "")
+ debug_439:
+ .return (rx513_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "cclass_elem" :subid("145_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P514 = "147_1283368197.39621"
- capture_lex $P514
- .local string rx503_tgt
- .local int rx503_pos
- .local int rx503_off
- .local int rx503_eos
- .local int rx503_rep
- .local pmc rx503_cur
- .local pmc rx503_debug
- (rx503_cur, rx503_pos, rx503_tgt, $I10) = self."!cursor_start"()
- rx503_cur."!cursor_caparray"("charspec")
- getattribute rx503_debug, rx503_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx503_cur
- .local pmc match
- .lex "$/", match
- length rx503_eos, rx503_tgt
- gt rx503_pos, rx503_eos, rx503_done
- set rx503_off, 0
- lt rx503_pos, 2, rx503_start
- sub rx503_off, rx503_pos, 1
- substr rx503_tgt, rx503_tgt, rx503_off
- rx503_start:
- eq $I10, 1, rx503_restart
- if_null rx503_debug, debug_430
- rx503_cur."!cursor_debug"("START", "cclass_elem")
- debug_430:
+.sub "cclass_elem" :subid("150_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P530 = "152_1283975941.34404"
+ capture_lex $P530
+ .local string rx519_tgt
+ .local int rx519_pos
+ .local int rx519_off
+ .local int rx519_eos
+ .local int rx519_rep
+ .local pmc rx519_cur
+ .local pmc rx519_debug
+ (rx519_cur, rx519_pos, rx519_tgt, $I10) = self."!cursor_start"()
+ rx519_cur."!cursor_caparray"("charspec")
+ getattribute rx519_debug, rx519_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx519_cur
+ .local pmc match
+ .lex "$/", match
+ length rx519_eos, rx519_tgt
+ gt rx519_pos, rx519_eos, rx519_done
+ set rx519_off, 0
+ lt rx519_pos, 2, rx519_start
+ sub rx519_off, rx519_pos, 1
+ substr rx519_tgt, rx519_tgt, rx519_off
+ rx519_start:
+ eq $I10, 1, rx519_restart
+ if_null rx519_debug, debug_443
+ rx519_cur."!cursor_debug"("START", "cclass_elem")
+ debug_443:
$I10 = self.'from'()
- ne $I10, -1, rxscan506_done
- goto rxscan506_scan
- rxscan506_loop:
- ($P10) = rx503_cur."from"()
- inc $P10
- set rx503_pos, $P10
- ge rx503_pos, rx503_eos, rxscan506_done
- rxscan506_scan:
- set_addr $I10, rxscan506_loop
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
- rxscan506_done:
-.annotate 'line', 170
+ ne $I10, -1, rxscan522_done
+ goto rxscan522_scan
+ rxscan522_loop:
+ ($P10) = rx519_cur."from"()
+ inc $P10
+ set rx519_pos, $P10
+ ge rx519_pos, rx519_eos, rxscan522_done
+ rxscan522_scan:
+ set_addr $I10, rxscan522_loop
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
+ rxscan522_done:
# rx subcapture "sign"
- set_addr $I10, rxcap_508_fail
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
- alt507_0:
- set_addr $I10, alt507_1
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
+ set_addr $I10, rxcap_524_fail
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
+ alt523_0:
+ set_addr $I10, alt523_1
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
# rx literal "+"
- add $I11, rx503_pos, 1
- gt $I11, rx503_eos, rx503_fail
- sub $I11, rx503_pos, rx503_off
- ord $I11, rx503_tgt, $I11
- ne $I11, 43, rx503_fail
- add rx503_pos, 1
- goto alt507_end
- alt507_1:
- set_addr $I10, alt507_2
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
+ add $I11, rx519_pos, 1
+ gt $I11, rx519_eos, rx519_fail
+ sub $I11, rx519_pos, rx519_off
+ ord $I11, rx519_tgt, $I11
+ ne $I11, 43, rx519_fail
+ add rx519_pos, 1
+ goto alt523_end
+ alt523_1:
+ set_addr $I10, alt523_2
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
# rx literal "-"
- add $I11, rx503_pos, 1
- gt $I11, rx503_eos, rx503_fail
- sub $I11, rx503_pos, rx503_off
- ord $I11, rx503_tgt, $I11
- ne $I11, 45, rx503_fail
- add rx503_pos, 1
- goto alt507_end
- alt507_2:
- alt507_end:
- set_addr $I10, rxcap_508_fail
- ($I12, $I11) = rx503_cur."!mark_peek"($I10)
- rx503_cur."!cursor_pos"($I11)
- ($P10) = rx503_cur."!cursor_start"()
- $P10."!cursor_pass"(rx503_pos, "")
- rx503_cur."!mark_push"(0, -1, 0, $P10)
+ add $I11, rx519_pos, 1
+ gt $I11, rx519_eos, rx519_fail
+ sub $I11, rx519_pos, rx519_off
+ ord $I11, rx519_tgt, $I11
+ ne $I11, 45, rx519_fail
+ add rx519_pos, 1
+ goto alt523_end
+ alt523_2:
+ alt523_end:
+ set_addr $I10, rxcap_524_fail
+ ($I12, $I11) = rx519_cur."!mark_peek"($I10)
+ rx519_cur."!cursor_pos"($I11)
+ ($P10) = rx519_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx519_pos, "")
+ rx519_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sign")
- goto rxcap_508_done
- rxcap_508_fail:
- goto rx503_fail
- rxcap_508_done:
-.annotate 'line', 171
- # rx rxquantr509 ** 0..1
- set_addr $I10, rxquantr509_done
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
- rxquantr509_loop:
+ goto rxcap_524_done
+ rxcap_524_fail:
+ goto rx519_fail
+ rxcap_524_done:
+ # rx rxquantr525 ** 0..1
+ set_addr $I10, rxquantr525_done
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
+ rxquantr525_loop:
# rx subrule "normspace" subtype=method negate=
- rx503_cur."!cursor_pos"(rx503_pos)
- $P10 = rx503_cur."normspace"()
- unless $P10, rx503_fail
- goto rxsubrule510_pass
- rxsubrule510_back:
+ rx519_cur."!cursor_pos"(rx519_pos)
+ $P10 = rx519_cur."normspace"()
+ unless $P10, rx519_fail
+ goto rxsubrule526_pass
+ rxsubrule526_back:
$P10 = $P10."!cursor_next"()
- unless $P10, rx503_fail
- rxsubrule510_pass:
- set_addr $I10, rxsubrule510_back
- rx503_cur."!mark_push"(0, rx503_pos, $I10, $P10)
- rx503_pos = $P10."pos"()
- set_addr $I10, rxquantr509_done
- (rx503_rep) = rx503_cur."!mark_commit"($I10)
- rxquantr509_done:
- alt511_0:
-.annotate 'line', 172
- set_addr $I10, alt511_1
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
-.annotate 'line', 173
+ unless $P10, rx519_fail
+ rxsubrule526_pass:
+ set_addr $I10, rxsubrule526_back
+ rx519_cur."!mark_push"(0, rx519_pos, $I10, $P10)
+ rx519_pos = $P10."pos"()
+ set_addr $I10, rxquantr525_done
+ (rx519_rep) = rx519_cur."!mark_commit"($I10)
+ rxquantr525_done:
+ alt527_0:
+ set_addr $I10, alt527_1
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
# rx literal "["
- add $I11, rx503_pos, 1
- gt $I11, rx503_eos, rx503_fail
- sub $I11, rx503_pos, rx503_off
- ord $I11, rx503_tgt, $I11
- ne $I11, 91, rx503_fail
- add rx503_pos, 1
-.annotate 'line', 176
- # rx rxquantr512 ** 0..*
- set_addr $I10, rxquantr512_done
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
- rxquantr512_loop:
-.annotate 'line', 173
- # rx subrule $P514 subtype=capture negate=
- rx503_cur."!cursor_pos"(rx503_pos)
- .const 'Sub' $P514 = "147_1283368197.39621"
- capture_lex $P514
- $P10 = rx503_cur.$P514()
- unless $P10, rx503_fail
- goto rxsubrule532_pass
- rxsubrule532_back:
+ add $I11, rx519_pos, 1
+ gt $I11, rx519_eos, rx519_fail
+ sub $I11, rx519_pos, rx519_off
+ ord $I11, rx519_tgt, $I11
+ ne $I11, 91, rx519_fail
+ add rx519_pos, 1
+ # rx rxquantr528 ** 0..*
+ set_addr $I10, rxquantr528_done
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
+ rxquantr528_loop:
+ # rx subrule $P530 subtype=capture negate=
+ rx519_cur."!cursor_pos"(rx519_pos)
+ .const 'Sub' $P530 = "152_1283975941.34404"
+ capture_lex $P530
+ $P10 = rx519_cur.$P530()
+ unless $P10, rx519_fail
+ goto rxsubrule548_pass
+ rxsubrule548_back:
$P10 = $P10."!cursor_next"()
- unless $P10, rx503_fail
- rxsubrule532_pass:
- set_addr $I10, rxsubrule532_back
- rx503_cur."!mark_push"(0, rx503_pos, $I10, $P10)
+ unless $P10, rx519_fail
+ rxsubrule548_pass:
+ set_addr $I10, rxsubrule548_back
+ rx519_cur."!mark_push"(0, rx519_pos, $I10, $P10)
$P10."!cursor_names"("charspec")
- rx503_pos = $P10."pos"()
-.annotate 'line', 176
- set_addr $I10, rxquantr512_done
- (rx503_rep) = rx503_cur."!mark_commit"($I10)
- set_addr $I10, rxquantr512_done
- rx503_cur."!mark_push"(rx503_rep, rx503_pos, $I10)
- goto rxquantr512_loop
- rxquantr512_done:
-.annotate 'line', 177
+ rx519_pos = $P10."pos"()
+ set_addr $I10, rxquantr528_done
+ (rx519_rep) = rx519_cur."!mark_commit"($I10)
+ set_addr $I10, rxquantr528_done
+ rx519_cur."!mark_push"(rx519_rep, rx519_pos, $I10)
+ goto rxquantr528_loop
+ rxquantr528_done:
# rx charclass_q s r 0..-1
- sub $I10, rx503_pos, rx503_off
- find_not_cclass $I11, 32, rx503_tgt, $I10, rx503_eos
- add rx503_pos, rx503_off, $I11
+ sub $I10, rx519_pos, rx519_off
+ find_not_cclass $I11, 32, rx519_tgt, $I10, rx519_eos
+ add rx519_pos, rx519_off, $I11
# rx literal "]"
- add $I11, rx503_pos, 1
- gt $I11, rx503_eos, rx503_fail
- sub $I11, rx503_pos, rx503_off
- ord $I11, rx503_tgt, $I11
- ne $I11, 93, rx503_fail
- add rx503_pos, 1
-.annotate 'line', 173
- goto alt511_end
- alt511_1:
-.annotate 'line', 178
+ add $I11, rx519_pos, 1
+ gt $I11, rx519_eos, rx519_fail
+ sub $I11, rx519_pos, rx519_off
+ ord $I11, rx519_tgt, $I11
+ ne $I11, 93, rx519_fail
+ add rx519_pos, 1
+ goto alt527_end
+ alt527_1:
# rx subcapture "name"
- set_addr $I10, rxcap_533_fail
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
+ set_addr $I10, rxcap_549_fail
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
# rx charclass_q w r 1..-1
- sub $I10, rx503_pos, rx503_off
- find_not_cclass $I11, 8192, rx503_tgt, $I10, rx503_eos
+ sub $I10, rx519_pos, rx519_off
+ find_not_cclass $I11, 8192, rx519_tgt, $I10, rx519_eos
add $I12, $I10, 1
- lt $I11, $I12, rx503_fail
- add rx503_pos, rx503_off, $I11
- set_addr $I10, rxcap_533_fail
- ($I12, $I11) = rx503_cur."!mark_peek"($I10)
- rx503_cur."!cursor_pos"($I11)
- ($P10) = rx503_cur."!cursor_start"()
- $P10."!cursor_pass"(rx503_pos, "")
- rx503_cur."!mark_push"(0, -1, 0, $P10)
+ lt $I11, $I12, rx519_fail
+ add rx519_pos, rx519_off, $I11
+ set_addr $I10, rxcap_549_fail
+ ($I12, $I11) = rx519_cur."!mark_peek"($I10)
+ rx519_cur."!cursor_pos"($I11)
+ ($P10) = rx519_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx519_pos, "")
+ rx519_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("name")
- goto rxcap_533_done
- rxcap_533_fail:
- goto rx503_fail
- rxcap_533_done:
- alt511_end:
-.annotate 'line', 180
- # rx rxquantr534 ** 0..1
- set_addr $I10, rxquantr534_done
- rx503_cur."!mark_push"(0, rx503_pos, $I10)
- rxquantr534_loop:
+ goto rxcap_549_done
+ rxcap_549_fail:
+ goto rx519_fail
+ rxcap_549_done:
+ alt527_end:
+ # rx rxquantr550 ** 0..1
+ set_addr $I10, rxquantr550_done
+ rx519_cur."!mark_push"(0, rx519_pos, $I10)
+ rxquantr550_loop:
# rx subrule "normspace" subtype=method negate=
- rx503_cur."!cursor_pos"(rx503_pos)
- $P10 = rx503_cur."normspace"()
- unless $P10, rx503_fail
- goto rxsubrule535_pass
- rxsubrule535_back:
+ rx519_cur."!cursor_pos"(rx519_pos)
+ $P10 = rx519_cur."normspace"()
+ unless $P10, rx519_fail
+ goto rxsubrule551_pass
+ rxsubrule551_back:
$P10 = $P10."!cursor_next"()
- unless $P10, rx503_fail
- rxsubrule535_pass:
- set_addr $I10, rxsubrule535_back
- rx503_cur."!mark_push"(0, rx503_pos, $I10, $P10)
- rx503_pos = $P10."pos"()
- set_addr $I10, rxquantr534_done
- (rx503_rep) = rx503_cur."!mark_commit"($I10)
- rxquantr534_done:
-.annotate 'line', 169
- # rx pass
- rx503_cur."!cursor_pass"(rx503_pos, "cclass_elem")
- if_null rx503_debug, debug_447
- rx503_cur."!cursor_debug"("PASS", "cclass_elem", " at pos=", rx503_pos)
- debug_447:
- .return (rx503_cur)
- rx503_restart:
-.annotate 'line', 3
- if_null rx503_debug, debug_448
- rx503_cur."!cursor_debug"("NEXT", "cclass_elem")
- debug_448:
- rx503_fail:
- (rx503_rep, rx503_pos, $I10, $P10) = rx503_cur."!mark_fail"(0)
- lt rx503_pos, -1, rx503_done
- eq rx503_pos, -1, rx503_fail
- jump $I10
- rx503_done:
- rx503_cur."!cursor_fail"()
- if_null rx503_debug, debug_449
- rx503_cur."!cursor_debug"("FAIL", "cclass_elem")
- debug_449:
- .return (rx503_cur)
- .return ()
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__cclass_elem" :subid("146_1283368197.39621") :method
-.annotate 'line', 3
- new $P505, "ResizablePMCArray"
- push $P505, ""
- push $P505, "-"
- push $P505, "+"
- .return ($P505)
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block513" :anon :subid("147_1283368197.39621") :method :outer("145_1283368197.39621")
-.annotate 'line', 173
- .const 'Sub' $P529 = "150_1283368197.39621"
- capture_lex $P529
- .const 'Sub' $P524 = "149_1283368197.39621"
- capture_lex $P524
- .const 'Sub' $P520 = "148_1283368197.39621"
- capture_lex $P520
- .local string rx515_tgt
- .local int rx515_pos
- .local int rx515_off
- .local int rx515_eos
- .local int rx515_rep
- .local pmc rx515_cur
- .local pmc rx515_debug
- (rx515_cur, rx515_pos, rx515_tgt, $I10) = self."!cursor_start"()
- rx515_cur."!cursor_caparray"("1")
- getattribute rx515_debug, rx515_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx515_cur
- .local pmc match
- .lex "$/", match
- length rx515_eos, rx515_tgt
- gt rx515_pos, rx515_eos, rx515_done
- set rx515_off, 0
- lt rx515_pos, 2, rx515_start
- sub rx515_off, rx515_pos, 1
- substr rx515_tgt, rx515_tgt, rx515_off
- rx515_start:
- eq $I10, 1, rx515_restart
- if_null rx515_debug, debug_431
- rx515_cur."!cursor_debug"("START", "")
- debug_431:
- $I10 = self.'from'()
- ne $I10, -1, rxscan516_done
- goto rxscan516_scan
- rxscan516_loop:
- ($P10) = rx515_cur."from"()
- inc $P10
- set rx515_pos, $P10
- ge rx515_pos, rx515_eos, rxscan516_done
- rxscan516_scan:
- set_addr $I10, rxscan516_loop
- rx515_cur."!mark_push"(0, rx515_pos, $I10)
- rxscan516_done:
- alt517_0:
- set_addr $I10, alt517_1
- rx515_cur."!mark_push"(0, rx515_pos, $I10)
-.annotate 'line', 174
- # rx charclass_q s r 0..-1
- sub $I10, rx515_pos, rx515_off
- find_not_cclass $I11, 32, rx515_tgt, $I10, rx515_eos
- add rx515_pos, rx515_off, $I11
- # rx literal "-"
- add $I11, rx515_pos, 1
- gt $I11, rx515_eos, rx515_fail
- sub $I11, rx515_pos, rx515_off
- ord $I11, rx515_tgt, $I11
- ne $I11, 45, rx515_fail
- add rx515_pos, 1
- # rx subrule "obs" subtype=method negate=
- rx515_cur."!cursor_pos"(rx515_pos)
- $P10 = rx515_cur."obs"("- as character range", "..")
- unless $P10, rx515_fail
- rx515_pos = $P10."pos"()
- goto alt517_end
- alt517_1:
-.annotate 'line', 175
- # rx charclass_q s r 0..-1
- sub $I10, rx515_pos, rx515_off
- find_not_cclass $I11, 32, rx515_tgt, $I10, rx515_eos
- add rx515_pos, rx515_off, $I11
- alt518_0:
- set_addr $I10, alt518_1
- rx515_cur."!mark_push"(0, rx515_pos, $I10)
- # rx literal "\\"
- add $I11, rx515_pos, 1
- gt $I11, rx515_eos, rx515_fail
- sub $I11, rx515_pos, rx515_off
- ord $I11, rx515_tgt, $I11
- ne $I11, 92, rx515_fail
- add rx515_pos, 1
- # rx subrule $P520 subtype=capture negate=
- rx515_cur."!cursor_pos"(rx515_pos)
- .const 'Sub' $P520 = "148_1283368197.39621"
- capture_lex $P520
- $P10 = rx515_cur.$P520()
- unless $P10, rx515_fail
- rx515_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"(0)
- rx515_pos = $P10."pos"()
- goto alt518_end
- alt518_1:
- # rx subrule $P524 subtype=capture negate=
- rx515_cur."!cursor_pos"(rx515_pos)
- .const 'Sub' $P524 = "149_1283368197.39621"
- capture_lex $P524
- $P10 = rx515_cur.$P524()
- unless $P10, rx515_fail
- rx515_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"(0)
- rx515_pos = $P10."pos"()
- alt518_end:
- # rx rxquantr527 ** 0..1
- set_addr $I10, rxquantr527_done
- rx515_cur."!mark_push"(0, rx515_pos, $I10)
- rxquantr527_loop:
- # rx charclass_q s r 0..-1
- sub $I10, rx515_pos, rx515_off
- find_not_cclass $I11, 32, rx515_tgt, $I10, rx515_eos
- add rx515_pos, rx515_off, $I11
- # rx literal ".."
- add $I11, rx515_pos, 2
- gt $I11, rx515_eos, rx515_fail
- sub $I11, rx515_pos, rx515_off
- substr $S10, rx515_tgt, $I11, 2
- ne $S10, "..", rx515_fail
- add rx515_pos, 2
- # rx charclass_q s r 0..-1
- sub $I10, rx515_pos, rx515_off
- find_not_cclass $I11, 32, rx515_tgt, $I10, rx515_eos
- add rx515_pos, rx515_off, $I11
- # rx subrule $P529 subtype=capture negate=
- rx515_cur."!cursor_pos"(rx515_pos)
- .const 'Sub' $P529 = "150_1283368197.39621"
- capture_lex $P529
- $P10 = rx515_cur.$P529()
- unless $P10, rx515_fail
- rx515_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("1")
- rx515_pos = $P10."pos"()
- set_addr $I10, rxquantr527_done
- (rx515_rep) = rx515_cur."!mark_commit"($I10)
- rxquantr527_done:
- alt517_end:
-.annotate 'line', 173
- # rx pass
- rx515_cur."!cursor_pass"(rx515_pos, "")
- if_null rx515_debug, debug_444
- rx515_cur."!cursor_debug"("PASS", "", " at pos=", rx515_pos)
- debug_444:
- .return (rx515_cur)
- rx515_restart:
- if_null rx515_debug, debug_445
- rx515_cur."!cursor_debug"("NEXT", "")
- debug_445:
- rx515_fail:
- (rx515_rep, rx515_pos, $I10, $P10) = rx515_cur."!mark_fail"(0)
- lt rx515_pos, -1, rx515_done
- eq rx515_pos, -1, rx515_fail
- jump $I10
- rx515_done:
- rx515_cur."!cursor_fail"()
- if_null rx515_debug, debug_446
- rx515_cur."!cursor_debug"("FAIL", "")
- debug_446:
- .return (rx515_cur)
- .return ()
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block519" :anon :subid("148_1283368197.39621") :method :outer("147_1283368197.39621")
-.annotate 'line', 175
- .local string rx521_tgt
- .local int rx521_pos
- .local int rx521_off
- .local int rx521_eos
- .local int rx521_rep
- .local pmc rx521_cur
- .local pmc rx521_debug
- (rx521_cur, rx521_pos, rx521_tgt, $I10) = self."!cursor_start"()
- getattribute rx521_debug, rx521_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx521_cur
- .local pmc match
- .lex "$/", match
- length rx521_eos, rx521_tgt
- gt rx521_pos, rx521_eos, rx521_done
- set rx521_off, 0
- lt rx521_pos, 2, rx521_start
- sub rx521_off, rx521_pos, 1
- substr rx521_tgt, rx521_tgt, rx521_off
- rx521_start:
- eq $I10, 1, rx521_restart
- if_null rx521_debug, debug_432
- rx521_cur."!cursor_debug"("START", "")
- debug_432:
- $I10 = self.'from'()
- ne $I10, -1, rxscan522_done
- goto rxscan522_scan
- rxscan522_loop:
- ($P10) = rx521_cur."from"()
- inc $P10
- set rx521_pos, $P10
- ge rx521_pos, rx521_eos, rxscan522_done
- rxscan522_scan:
- set_addr $I10, rxscan522_loop
- rx521_cur."!mark_push"(0, rx521_pos, $I10)
- rxscan522_done:
- # rx charclass .
- ge rx521_pos, rx521_eos, rx521_fail
- inc rx521_pos
+ unless $P10, rx519_fail
+ rxsubrule551_pass:
+ set_addr $I10, rxsubrule551_back
+ rx519_cur."!mark_push"(0, rx519_pos, $I10, $P10)
+ rx519_pos = $P10."pos"()
+ set_addr $I10, rxquantr550_done
+ (rx519_rep) = rx519_cur."!mark_commit"($I10)
+ rxquantr550_done:
# rx pass
- rx521_cur."!cursor_pass"(rx521_pos, "")
- if_null rx521_debug, debug_433
- rx521_cur."!cursor_debug"("PASS", "", " at pos=", rx521_pos)
- debug_433:
- .return (rx521_cur)
- rx521_restart:
- if_null rx521_debug, debug_434
- rx521_cur."!cursor_debug"("NEXT", "")
- debug_434:
- rx521_fail:
- (rx521_rep, rx521_pos, $I10, $P10) = rx521_cur."!mark_fail"(0)
- lt rx521_pos, -1, rx521_done
- eq rx521_pos, -1, rx521_fail
- jump $I10
- rx521_done:
- rx521_cur."!cursor_fail"()
- if_null rx521_debug, debug_435
- rx521_cur."!cursor_debug"("FAIL", "")
- debug_435:
- .return (rx521_cur)
+ rx519_cur."!cursor_pass"(rx519_pos, "cclass_elem")
+ if_null rx519_debug, debug_460
+ rx519_cur."!cursor_debug"("PASS", "cclass_elem", " at pos=", rx519_pos)
+ debug_460:
+ .return (rx519_cur)
+ rx519_restart:
+ if_null rx519_debug, debug_461
+ rx519_cur."!cursor_debug"("NEXT", "cclass_elem")
+ debug_461:
+ rx519_fail:
+ (rx519_rep, rx519_pos, $I10, $P10) = rx519_cur."!mark_fail"(0)
+ lt rx519_pos, -1, rx519_done
+ eq rx519_pos, -1, rx519_fail
+ jump $I10
+ rx519_done:
+ rx519_cur."!cursor_fail"()
+ if_null rx519_debug, debug_462
+ rx519_cur."!cursor_debug"("FAIL", "cclass_elem")
+ debug_462:
+ .return (rx519_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block523" :anon :subid("149_1283368197.39621") :method :outer("147_1283368197.39621")
-.annotate 'line', 175
- .local string rx525_tgt
- .local int rx525_pos
- .local int rx525_off
- .local int rx525_eos
- .local int rx525_rep
- .local pmc rx525_cur
- .local pmc rx525_debug
- (rx525_cur, rx525_pos, rx525_tgt, $I10) = self."!cursor_start"()
- getattribute rx525_debug, rx525_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx525_cur
- .local pmc match
- .lex "$/", match
- length rx525_eos, rx525_tgt
- gt rx525_pos, rx525_eos, rx525_done
- set rx525_off, 0
- lt rx525_pos, 2, rx525_start
- sub rx525_off, rx525_pos, 1
- substr rx525_tgt, rx525_tgt, rx525_off
- rx525_start:
- eq $I10, 1, rx525_restart
- if_null rx525_debug, debug_436
- rx525_cur."!cursor_debug"("START", "")
- debug_436:
- $I10 = self.'from'()
- ne $I10, -1, rxscan526_done
- goto rxscan526_scan
- rxscan526_loop:
- ($P10) = rx525_cur."from"()
- inc $P10
- set rx525_pos, $P10
- ge rx525_pos, rx525_eos, rxscan526_done
- rxscan526_scan:
- set_addr $I10, rxscan526_loop
- rx525_cur."!mark_push"(0, rx525_pos, $I10)
- rxscan526_done:
- # rx enumcharlist negate=1
- ge rx525_pos, rx525_eos, rx525_fail
- sub $I10, rx525_pos, rx525_off
- substr $S10, rx525_tgt, $I10, 1
- index $I11, "]\\", $S10
- ge $I11, 0, rx525_fail
- inc rx525_pos
- # rx pass
- rx525_cur."!cursor_pass"(rx525_pos, "")
- if_null rx525_debug, debug_437
- rx525_cur."!cursor_debug"("PASS", "", " at pos=", rx525_pos)
- debug_437:
- .return (rx525_cur)
- rx525_restart:
- if_null rx525_debug, debug_438
- rx525_cur."!cursor_debug"("NEXT", "")
- debug_438:
- rx525_fail:
- (rx525_rep, rx525_pos, $I10, $P10) = rx525_cur."!mark_fail"(0)
- lt rx525_pos, -1, rx525_done
- eq rx525_pos, -1, rx525_fail
- jump $I10
- rx525_done:
- rx525_cur."!cursor_fail"()
- if_null rx525_debug, debug_439
- rx525_cur."!cursor_debug"("FAIL", "")
- debug_439:
- .return (rx525_cur)
- .return ()
+.sub "!PREFIX__cclass_elem" :subid("151_1283975941.34404") :method
+.annotate 'line', 0
+ new $P521, "ResizablePMCArray"
+ push $P521, ""
+ push $P521, "-"
+ push $P521, "+"
+ .return ($P521)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block528" :anon :subid("150_1283368197.39621") :method :outer("147_1283368197.39621")
-.annotate 'line', 175
- .local string rx530_tgt
- .local int rx530_pos
- .local int rx530_off
- .local int rx530_eos
- .local int rx530_rep
- .local pmc rx530_cur
- .local pmc rx530_debug
- (rx530_cur, rx530_pos, rx530_tgt, $I10) = self."!cursor_start"()
- getattribute rx530_debug, rx530_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx530_cur
- .local pmc match
- .lex "$/", match
- length rx530_eos, rx530_tgt
- gt rx530_pos, rx530_eos, rx530_done
- set rx530_off, 0
- lt rx530_pos, 2, rx530_start
- sub rx530_off, rx530_pos, 1
- substr rx530_tgt, rx530_tgt, rx530_off
- rx530_start:
- eq $I10, 1, rx530_restart
- if_null rx530_debug, debug_440
- rx530_cur."!cursor_debug"("START", "")
- debug_440:
+.sub "_block529" :anon :subid("152_1283975941.34404") :method :outer("150_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P545 = "155_1283975941.34404"
+ capture_lex $P545
+ .const 'Sub' $P540 = "154_1283975941.34404"
+ capture_lex $P540
+ .const 'Sub' $P536 = "153_1283975941.34404"
+ capture_lex $P536
+ .local string rx531_tgt
+ .local int rx531_pos
+ .local int rx531_off
+ .local int rx531_eos
+ .local int rx531_rep
+ .local pmc rx531_cur
+ .local pmc rx531_debug
+ (rx531_cur, rx531_pos, rx531_tgt, $I10) = self."!cursor_start"()
+ rx531_cur."!cursor_caparray"("1")
+ getattribute rx531_debug, rx531_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx531_cur
+ .local pmc match
+ .lex "$/", match
+ length rx531_eos, rx531_tgt
+ gt rx531_pos, rx531_eos, rx531_done
+ set rx531_off, 0
+ lt rx531_pos, 2, rx531_start
+ sub rx531_off, rx531_pos, 1
+ substr rx531_tgt, rx531_tgt, rx531_off
+ rx531_start:
+ eq $I10, 1, rx531_restart
+ if_null rx531_debug, debug_444
+ rx531_cur."!cursor_debug"("START", "")
+ debug_444:
$I10 = self.'from'()
- ne $I10, -1, rxscan531_done
- goto rxscan531_scan
- rxscan531_loop:
- ($P10) = rx530_cur."from"()
- inc $P10
- set rx530_pos, $P10
- ge rx530_pos, rx530_eos, rxscan531_done
- rxscan531_scan:
- set_addr $I10, rxscan531_loop
- rx530_cur."!mark_push"(0, rx530_pos, $I10)
- rxscan531_done:
- # rx charclass .
- ge rx530_pos, rx530_eos, rx530_fail
- inc rx530_pos
+ ne $I10, -1, rxscan532_done
+ goto rxscan532_scan
+ rxscan532_loop:
+ ($P10) = rx531_cur."from"()
+ inc $P10
+ set rx531_pos, $P10
+ ge rx531_pos, rx531_eos, rxscan532_done
+ rxscan532_scan:
+ set_addr $I10, rxscan532_loop
+ rx531_cur."!mark_push"(0, rx531_pos, $I10)
+ rxscan532_done:
+ alt533_0:
+ set_addr $I10, alt533_1
+ rx531_cur."!mark_push"(0, rx531_pos, $I10)
+ # rx charclass_q s r 0..-1
+ sub $I10, rx531_pos, rx531_off
+ find_not_cclass $I11, 32, rx531_tgt, $I10, rx531_eos
+ add rx531_pos, rx531_off, $I11
+ # rx literal "-"
+ add $I11, rx531_pos, 1
+ gt $I11, rx531_eos, rx531_fail
+ sub $I11, rx531_pos, rx531_off
+ ord $I11, rx531_tgt, $I11
+ ne $I11, 45, rx531_fail
+ add rx531_pos, 1
+ # rx subrule "obs" subtype=method negate=
+ rx531_cur."!cursor_pos"(rx531_pos)
+ $P10 = rx531_cur."obs"("- as character range", "..")
+ unless $P10, rx531_fail
+ rx531_pos = $P10."pos"()
+ goto alt533_end
+ alt533_1:
+ # rx charclass_q s r 0..-1
+ sub $I10, rx531_pos, rx531_off
+ find_not_cclass $I11, 32, rx531_tgt, $I10, rx531_eos
+ add rx531_pos, rx531_off, $I11
+ alt534_0:
+ set_addr $I10, alt534_1
+ rx531_cur."!mark_push"(0, rx531_pos, $I10)
+ # rx literal "\\"
+ add $I11, rx531_pos, 1
+ gt $I11, rx531_eos, rx531_fail
+ sub $I11, rx531_pos, rx531_off
+ ord $I11, rx531_tgt, $I11
+ ne $I11, 92, rx531_fail
+ add rx531_pos, 1
+ # rx subrule $P536 subtype=capture negate=
+ rx531_cur."!cursor_pos"(rx531_pos)
+ .const 'Sub' $P536 = "153_1283975941.34404"
+ capture_lex $P536
+ $P10 = rx531_cur.$P536()
+ unless $P10, rx531_fail
+ rx531_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"(0)
+ rx531_pos = $P10."pos"()
+ goto alt534_end
+ alt534_1:
+ # rx subrule $P540 subtype=capture negate=
+ rx531_cur."!cursor_pos"(rx531_pos)
+ .const 'Sub' $P540 = "154_1283975941.34404"
+ capture_lex $P540
+ $P10 = rx531_cur.$P540()
+ unless $P10, rx531_fail
+ rx531_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"(0)
+ rx531_pos = $P10."pos"()
+ alt534_end:
+ # rx rxquantr543 ** 0..1
+ set_addr $I10, rxquantr543_done
+ rx531_cur."!mark_push"(0, rx531_pos, $I10)
+ rxquantr543_loop:
+ # rx charclass_q s r 0..-1
+ sub $I10, rx531_pos, rx531_off
+ find_not_cclass $I11, 32, rx531_tgt, $I10, rx531_eos
+ add rx531_pos, rx531_off, $I11
+ # rx literal ".."
+ add $I11, rx531_pos, 2
+ gt $I11, rx531_eos, rx531_fail
+ sub $I11, rx531_pos, rx531_off
+ substr $S10, rx531_tgt, $I11, 2
+ ne $S10, "..", rx531_fail
+ add rx531_pos, 2
+ # rx charclass_q s r 0..-1
+ sub $I10, rx531_pos, rx531_off
+ find_not_cclass $I11, 32, rx531_tgt, $I10, rx531_eos
+ add rx531_pos, rx531_off, $I11
+ # rx subrule $P545 subtype=capture negate=
+ rx531_cur."!cursor_pos"(rx531_pos)
+ .const 'Sub' $P545 = "155_1283975941.34404"
+ capture_lex $P545
+ $P10 = rx531_cur.$P545()
+ unless $P10, rx531_fail
+ rx531_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("1")
+ rx531_pos = $P10."pos"()
+ set_addr $I10, rxquantr543_done
+ (rx531_rep) = rx531_cur."!mark_commit"($I10)
+ rxquantr543_done:
+ alt533_end:
# rx pass
- rx530_cur."!cursor_pass"(rx530_pos, "")
- if_null rx530_debug, debug_441
- rx530_cur."!cursor_debug"("PASS", "", " at pos=", rx530_pos)
- debug_441:
- .return (rx530_cur)
- rx530_restart:
- if_null rx530_debug, debug_442
- rx530_cur."!cursor_debug"("NEXT", "")
- debug_442:
- rx530_fail:
- (rx530_rep, rx530_pos, $I10, $P10) = rx530_cur."!mark_fail"(0)
- lt rx530_pos, -1, rx530_done
- eq rx530_pos, -1, rx530_fail
- jump $I10
- rx530_done:
- rx530_cur."!cursor_fail"()
- if_null rx530_debug, debug_443
- rx530_cur."!cursor_debug"("FAIL", "")
- debug_443:
- .return (rx530_cur)
+ rx531_cur."!cursor_pass"(rx531_pos, "")
+ if_null rx531_debug, debug_457
+ rx531_cur."!cursor_debug"("PASS", "", " at pos=", rx531_pos)
+ debug_457:
+ .return (rx531_cur)
+ rx531_restart:
+ if_null rx531_debug, debug_458
+ rx531_cur."!cursor_debug"("NEXT", "")
+ debug_458:
+ rx531_fail:
+ (rx531_rep, rx531_pos, $I10, $P10) = rx531_cur."!mark_fail"(0)
+ lt rx531_pos, -1, rx531_done
+ eq rx531_pos, -1, rx531_fail
+ jump $I10
+ rx531_done:
+ rx531_cur."!cursor_fail"()
+ if_null rx531_debug, debug_459
+ rx531_cur."!cursor_debug"("FAIL", "")
+ debug_459:
+ .return (rx531_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_internal" :subid("151_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P545 = "153_1283368197.39621"
- capture_lex $P545
+.sub "_block535" :anon :subid("153_1283975941.34404") :method :outer("152_1283975941.34404")
+.annotate 'line', 0
.local string rx537_tgt
.local int rx537_pos
.local int rx537_off
@@ -7938,7 +7726,6 @@
.local pmc rx537_cur
.local pmc rx537_debug
(rx537_cur, rx537_pos, rx537_tgt, $I10) = self."!cursor_start"()
- rx537_cur."!cursor_caparray"("n")
getattribute rx537_debug, rx537_cur, "$!debug"
.lex unicode:"$\x{a2}", rx537_cur
.local pmc match
@@ -7951,141 +7738,34 @@
substr rx537_tgt, rx537_tgt, rx537_off
rx537_start:
eq $I10, 1, rx537_restart
- if_null rx537_debug, debug_450
- rx537_cur."!cursor_debug"("START", "mod_internal")
- debug_450:
+ if_null rx537_debug, debug_445
+ rx537_cur."!cursor_debug"("START", "")
+ debug_445:
$I10 = self.'from'()
- ne $I10, -1, rxscan541_done
- goto rxscan541_scan
- rxscan541_loop:
+ ne $I10, -1, rxscan538_done
+ goto rxscan538_scan
+ rxscan538_loop:
($P10) = rx537_cur."from"()
inc $P10
set rx537_pos, $P10
- ge rx537_pos, rx537_eos, rxscan541_done
- rxscan541_scan:
- set_addr $I10, rxscan541_loop
- rx537_cur."!mark_push"(0, rx537_pos, $I10)
- rxscan541_done:
- alt542_0:
-.annotate 'line', 184
- set_addr $I10, alt542_1
- rx537_cur."!mark_push"(0, rx537_pos, $I10)
-.annotate 'line', 185
- # rx literal ":"
- add $I11, rx537_pos, 1
- gt $I11, rx537_eos, rx537_fail
- sub $I11, rx537_pos, rx537_off
- ord $I11, rx537_tgt, $I11
- ne $I11, 58, rx537_fail
- add rx537_pos, 1
- # rx rxquantr543 ** 1..1
- set_addr $I10, rxquantr543_done
- rx537_cur."!mark_push"(0, -1, $I10)
- rxquantr543_loop:
- # rx subrule $P545 subtype=capture negate=
- rx537_cur."!cursor_pos"(rx537_pos)
- .const 'Sub' $P545 = "153_1283368197.39621"
- capture_lex $P545
- $P10 = rx537_cur.$P545()
- unless $P10, rx537_fail
- goto rxsubrule549_pass
- rxsubrule549_back:
- $P10 = $P10."!cursor_next"()
- unless $P10, rx537_fail
- rxsubrule549_pass:
- set_addr $I10, rxsubrule549_back
- rx537_cur."!mark_push"(0, rx537_pos, $I10, $P10)
- $P10."!cursor_names"("n")
- rx537_pos = $P10."pos"()
- set_addr $I10, rxquantr543_done
- (rx537_rep) = rx537_cur."!mark_commit"($I10)
- rxquantr543_done:
- # rx subrule "mod_ident" subtype=capture negate=
- rx537_cur."!cursor_pos"(rx537_pos)
- $P10 = rx537_cur."mod_ident"()
- unless $P10, rx537_fail
- rx537_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("mod_ident")
- rx537_pos = $P10."pos"()
- # rxanchor rwb
- le rx537_pos, 0, rx537_fail
- sub $I10, rx537_pos, rx537_off
- is_cclass $I11, 8192, rx537_tgt, $I10
- if $I11, rx537_fail
- dec $I10
- is_cclass $I11, 8192, rx537_tgt, $I10
- unless $I11, rx537_fail
- goto alt542_end
- alt542_1:
-.annotate 'line', 186
- # rx literal ":"
- add $I11, rx537_pos, 1
- gt $I11, rx537_eos, rx537_fail
- sub $I11, rx537_pos, rx537_off
- ord $I11, rx537_tgt, $I11
- ne $I11, 58, rx537_fail
- add rx537_pos, 1
- # rx subrule "mod_ident" subtype=capture negate=
- rx537_cur."!cursor_pos"(rx537_pos)
- $P10 = rx537_cur."mod_ident"()
- unless $P10, rx537_fail
- rx537_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("mod_ident")
- rx537_pos = $P10."pos"()
- # rx rxquantr550 ** 0..1
- set_addr $I10, rxquantr550_done
- rx537_cur."!mark_push"(0, rx537_pos, $I10)
- rxquantr550_loop:
- # rx literal "("
- add $I11, rx537_pos, 1
- gt $I11, rx537_eos, rx537_fail
- sub $I11, rx537_pos, rx537_off
- ord $I11, rx537_tgt, $I11
- ne $I11, 40, rx537_fail
- add rx537_pos, 1
- # rx subcapture "n"
- set_addr $I10, rxcap_551_fail
+ ge rx537_pos, rx537_eos, rxscan538_done
+ rxscan538_scan:
+ set_addr $I10, rxscan538_loop
rx537_cur."!mark_push"(0, rx537_pos, $I10)
- # rx charclass_q d r 1..-1
- sub $I10, rx537_pos, rx537_off
- find_not_cclass $I11, 8, rx537_tgt, $I10, rx537_eos
- add $I12, $I10, 1
- lt $I11, $I12, rx537_fail
- add rx537_pos, rx537_off, $I11
- set_addr $I10, rxcap_551_fail
- ($I12, $I11) = rx537_cur."!mark_peek"($I10)
- rx537_cur."!cursor_pos"($I11)
- ($P10) = rx537_cur."!cursor_start"()
- $P10."!cursor_pass"(rx537_pos, "")
- rx537_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("n")
- goto rxcap_551_done
- rxcap_551_fail:
- goto rx537_fail
- rxcap_551_done:
- # rx literal ")"
- add $I11, rx537_pos, 1
- gt $I11, rx537_eos, rx537_fail
- sub $I11, rx537_pos, rx537_off
- ord $I11, rx537_tgt, $I11
- ne $I11, 41, rx537_fail
- add rx537_pos, 1
- set_addr $I10, rxquantr550_done
- (rx537_rep) = rx537_cur."!mark_commit"($I10)
- rxquantr550_done:
- alt542_end:
-.annotate 'line', 183
+ rxscan538_done:
+ # rx charclass .
+ ge rx537_pos, rx537_eos, rx537_fail
+ inc rx537_pos
# rx pass
- rx537_cur."!cursor_pass"(rx537_pos, "mod_internal")
- if_null rx537_debug, debug_455
- rx537_cur."!cursor_debug"("PASS", "mod_internal", " at pos=", rx537_pos)
- debug_455:
+ rx537_cur."!cursor_pass"(rx537_pos, "")
+ if_null rx537_debug, debug_446
+ rx537_cur."!cursor_debug"("PASS", "", " at pos=", rx537_pos)
+ debug_446:
.return (rx537_cur)
rx537_restart:
-.annotate 'line', 3
- if_null rx537_debug, debug_456
- rx537_cur."!cursor_debug"("NEXT", "mod_internal")
- debug_456:
+ if_null rx537_debug, debug_447
+ rx537_cur."!cursor_debug"("NEXT", "")
+ debug_447:
rx537_fail:
(rx537_rep, rx537_pos, $I10, $P10) = rx537_cur."!mark_fail"(0)
lt rx537_pos, -1, rx537_done
@@ -8093,28 +7773,87 @@
jump $I10
rx537_done:
rx537_cur."!cursor_fail"()
- if_null rx537_debug, debug_457
- rx537_cur."!cursor_debug"("FAIL", "mod_internal")
- debug_457:
+ if_null rx537_debug, debug_448
+ rx537_cur."!cursor_debug"("FAIL", "")
+ debug_448:
.return (rx537_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_internal" :subid("152_1283368197.39621") :method
-.annotate 'line', 3
- $P539 = self."!PREFIX__!subrule"("mod_ident", ":")
- new $P540, "ResizablePMCArray"
- push $P540, $P539
- push $P540, ":"
- .return ($P540)
+.sub "_block539" :anon :subid("154_1283975941.34404") :method :outer("152_1283975941.34404")
+.annotate 'line', 0
+ .local string rx541_tgt
+ .local int rx541_pos
+ .local int rx541_off
+ .local int rx541_eos
+ .local int rx541_rep
+ .local pmc rx541_cur
+ .local pmc rx541_debug
+ (rx541_cur, rx541_pos, rx541_tgt, $I10) = self."!cursor_start"()
+ getattribute rx541_debug, rx541_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx541_cur
+ .local pmc match
+ .lex "$/", match
+ length rx541_eos, rx541_tgt
+ gt rx541_pos, rx541_eos, rx541_done
+ set rx541_off, 0
+ lt rx541_pos, 2, rx541_start
+ sub rx541_off, rx541_pos, 1
+ substr rx541_tgt, rx541_tgt, rx541_off
+ rx541_start:
+ eq $I10, 1, rx541_restart
+ if_null rx541_debug, debug_449
+ rx541_cur."!cursor_debug"("START", "")
+ debug_449:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan542_done
+ goto rxscan542_scan
+ rxscan542_loop:
+ ($P10) = rx541_cur."from"()
+ inc $P10
+ set rx541_pos, $P10
+ ge rx541_pos, rx541_eos, rxscan542_done
+ rxscan542_scan:
+ set_addr $I10, rxscan542_loop
+ rx541_cur."!mark_push"(0, rx541_pos, $I10)
+ rxscan542_done:
+ # rx enumcharlist negate=1
+ ge rx541_pos, rx541_eos, rx541_fail
+ sub $I10, rx541_pos, rx541_off
+ substr $S10, rx541_tgt, $I10, 1
+ index $I11, "]\\", $S10
+ ge $I11, 0, rx541_fail
+ inc rx541_pos
+ # rx pass
+ rx541_cur."!cursor_pass"(rx541_pos, "")
+ if_null rx541_debug, debug_450
+ rx541_cur."!cursor_debug"("PASS", "", " at pos=", rx541_pos)
+ debug_450:
+ .return (rx541_cur)
+ rx541_restart:
+ if_null rx541_debug, debug_451
+ rx541_cur."!cursor_debug"("NEXT", "")
+ debug_451:
+ rx541_fail:
+ (rx541_rep, rx541_pos, $I10, $P10) = rx541_cur."!mark_fail"(0)
+ lt rx541_pos, -1, rx541_done
+ eq rx541_pos, -1, rx541_fail
+ jump $I10
+ rx541_done:
+ rx541_cur."!cursor_fail"()
+ if_null rx541_debug, debug_452
+ rx541_cur."!cursor_debug"("FAIL", "")
+ debug_452:
+ .return (rx541_cur)
+ .return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block544" :anon :subid("153_1283368197.39621") :method :outer("151_1283368197.39621")
-.annotate 'line', 185
+.sub "_block544" :anon :subid("155_1283975941.34404") :method :outer("152_1283975941.34404")
+.annotate 'line', 0
.local string rx546_tgt
.local int rx546_pos
.local int rx546_off
@@ -8135,9 +7874,9 @@
substr rx546_tgt, rx546_tgt, rx546_off
rx546_start:
eq $I10, 1, rx546_restart
- if_null rx546_debug, debug_451
+ if_null rx546_debug, debug_453
rx546_cur."!cursor_debug"("START", "")
- debug_451:
+ debug_453:
$I10 = self.'from'()
ne $I10, -1, rxscan547_done
goto rxscan547_scan
@@ -8150,35 +7889,19 @@
set_addr $I10, rxscan547_loop
rx546_cur."!mark_push"(0, rx546_pos, $I10)
rxscan547_done:
- alt548_0:
- set_addr $I10, alt548_1
- rx546_cur."!mark_push"(0, rx546_pos, $I10)
- # rx literal "!"
- add $I11, rx546_pos, 1
- gt $I11, rx546_eos, rx546_fail
- sub $I11, rx546_pos, rx546_off
- ord $I11, rx546_tgt, $I11
- ne $I11, 33, rx546_fail
- add rx546_pos, 1
- goto alt548_end
- alt548_1:
- # rx charclass_q d r 1..-1
- sub $I10, rx546_pos, rx546_off
- find_not_cclass $I11, 8, rx546_tgt, $I10, rx546_eos
- add $I12, $I10, 1
- lt $I11, $I12, rx546_fail
- add rx546_pos, rx546_off, $I11
- alt548_end:
+ # rx charclass .
+ ge rx546_pos, rx546_eos, rx546_fail
+ inc rx546_pos
# rx pass
rx546_cur."!cursor_pass"(rx546_pos, "")
- if_null rx546_debug, debug_452
+ if_null rx546_debug, debug_454
rx546_cur."!cursor_debug"("PASS", "", " at pos=", rx546_pos)
- debug_452:
+ debug_454:
.return (rx546_cur)
rx546_restart:
- if_null rx546_debug, debug_453
+ if_null rx546_debug, debug_455
rx546_cur."!cursor_debug"("NEXT", "")
- debug_453:
+ debug_455:
rx546_fail:
(rx546_rep, rx546_pos, $I10, $P10) = rx546_cur."!mark_fail"(0)
lt rx546_pos, -1, rx546_done
@@ -8186,403 +7909,658 @@
jump $I10
rx546_done:
rx546_cur."!cursor_fail"()
- if_null rx546_debug, debug_454
+ if_null rx546_debug, debug_456
rx546_cur."!cursor_debug"("FAIL", "")
- debug_454:
+ debug_456:
.return (rx546_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident" :subid("154_1283368197.39621") :method
-.annotate 'line', 190
- $P553 = self."!protoregex"("mod_ident")
- .return ($P553)
+.sub "mod_internal" :subid("156_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P561 = "158_1283975941.34404"
+ capture_lex $P561
+ .local string rx553_tgt
+ .local int rx553_pos
+ .local int rx553_off
+ .local int rx553_eos
+ .local int rx553_rep
+ .local pmc rx553_cur
+ .local pmc rx553_debug
+ (rx553_cur, rx553_pos, rx553_tgt, $I10) = self."!cursor_start"()
+ rx553_cur."!cursor_caparray"("n")
+ getattribute rx553_debug, rx553_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx553_cur
+ .local pmc match
+ .lex "$/", match
+ length rx553_eos, rx553_tgt
+ gt rx553_pos, rx553_eos, rx553_done
+ set rx553_off, 0
+ lt rx553_pos, 2, rx553_start
+ sub rx553_off, rx553_pos, 1
+ substr rx553_tgt, rx553_tgt, rx553_off
+ rx553_start:
+ eq $I10, 1, rx553_restart
+ if_null rx553_debug, debug_463
+ rx553_cur."!cursor_debug"("START", "mod_internal")
+ debug_463:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan557_done
+ goto rxscan557_scan
+ rxscan557_loop:
+ ($P10) = rx553_cur."from"()
+ inc $P10
+ set rx553_pos, $P10
+ ge rx553_pos, rx553_eos, rxscan557_done
+ rxscan557_scan:
+ set_addr $I10, rxscan557_loop
+ rx553_cur."!mark_push"(0, rx553_pos, $I10)
+ rxscan557_done:
+ alt558_0:
+ set_addr $I10, alt558_1
+ rx553_cur."!mark_push"(0, rx553_pos, $I10)
+ # rx literal ":"
+ add $I11, rx553_pos, 1
+ gt $I11, rx553_eos, rx553_fail
+ sub $I11, rx553_pos, rx553_off
+ ord $I11, rx553_tgt, $I11
+ ne $I11, 58, rx553_fail
+ add rx553_pos, 1
+ # rx rxquantr559 ** 1..1
+ set_addr $I10, rxquantr559_done
+ rx553_cur."!mark_push"(0, -1, $I10)
+ rxquantr559_loop:
+ # rx subrule $P561 subtype=capture negate=
+ rx553_cur."!cursor_pos"(rx553_pos)
+ .const 'Sub' $P561 = "158_1283975941.34404"
+ capture_lex $P561
+ $P10 = rx553_cur.$P561()
+ unless $P10, rx553_fail
+ goto rxsubrule565_pass
+ rxsubrule565_back:
+ $P10 = $P10."!cursor_next"()
+ unless $P10, rx553_fail
+ rxsubrule565_pass:
+ set_addr $I10, rxsubrule565_back
+ rx553_cur."!mark_push"(0, rx553_pos, $I10, $P10)
+ $P10."!cursor_names"("n")
+ rx553_pos = $P10."pos"()
+ set_addr $I10, rxquantr559_done
+ (rx553_rep) = rx553_cur."!mark_commit"($I10)
+ rxquantr559_done:
+ # rx subrule "mod_ident" subtype=capture negate=
+ rx553_cur."!cursor_pos"(rx553_pos)
+ $P10 = rx553_cur."mod_ident"()
+ unless $P10, rx553_fail
+ rx553_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("mod_ident")
+ rx553_pos = $P10."pos"()
+ # rxanchor rwb
+ le rx553_pos, 0, rx553_fail
+ sub $I10, rx553_pos, rx553_off
+ is_cclass $I11, 8192, rx553_tgt, $I10
+ if $I11, rx553_fail
+ dec $I10
+ is_cclass $I11, 8192, rx553_tgt, $I10
+ unless $I11, rx553_fail
+ goto alt558_end
+ alt558_1:
+ # rx literal ":"
+ add $I11, rx553_pos, 1
+ gt $I11, rx553_eos, rx553_fail
+ sub $I11, rx553_pos, rx553_off
+ ord $I11, rx553_tgt, $I11
+ ne $I11, 58, rx553_fail
+ add rx553_pos, 1
+ # rx subrule "mod_ident" subtype=capture negate=
+ rx553_cur."!cursor_pos"(rx553_pos)
+ $P10 = rx553_cur."mod_ident"()
+ unless $P10, rx553_fail
+ rx553_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("mod_ident")
+ rx553_pos = $P10."pos"()
+ # rx rxquantr566 ** 0..1
+ set_addr $I10, rxquantr566_done
+ rx553_cur."!mark_push"(0, rx553_pos, $I10)
+ rxquantr566_loop:
+ # rx literal "("
+ add $I11, rx553_pos, 1
+ gt $I11, rx553_eos, rx553_fail
+ sub $I11, rx553_pos, rx553_off
+ ord $I11, rx553_tgt, $I11
+ ne $I11, 40, rx553_fail
+ add rx553_pos, 1
+ # rx subcapture "n"
+ set_addr $I10, rxcap_567_fail
+ rx553_cur."!mark_push"(0, rx553_pos, $I10)
+ # rx charclass_q d r 1..-1
+ sub $I10, rx553_pos, rx553_off
+ find_not_cclass $I11, 8, rx553_tgt, $I10, rx553_eos
+ add $I12, $I10, 1
+ lt $I11, $I12, rx553_fail
+ add rx553_pos, rx553_off, $I11
+ set_addr $I10, rxcap_567_fail
+ ($I12, $I11) = rx553_cur."!mark_peek"($I10)
+ rx553_cur."!cursor_pos"($I11)
+ ($P10) = rx553_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx553_pos, "")
+ rx553_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("n")
+ goto rxcap_567_done
+ rxcap_567_fail:
+ goto rx553_fail
+ rxcap_567_done:
+ # rx literal ")"
+ add $I11, rx553_pos, 1
+ gt $I11, rx553_eos, rx553_fail
+ sub $I11, rx553_pos, rx553_off
+ ord $I11, rx553_tgt, $I11
+ ne $I11, 41, rx553_fail
+ add rx553_pos, 1
+ set_addr $I10, rxquantr566_done
+ (rx553_rep) = rx553_cur."!mark_commit"($I10)
+ rxquantr566_done:
+ alt558_end:
+ # rx pass
+ rx553_cur."!cursor_pass"(rx553_pos, "mod_internal")
+ if_null rx553_debug, debug_468
+ rx553_cur."!cursor_debug"("PASS", "mod_internal", " at pos=", rx553_pos)
+ debug_468:
+ .return (rx553_cur)
+ rx553_restart:
+ if_null rx553_debug, debug_469
+ rx553_cur."!cursor_debug"("NEXT", "mod_internal")
+ debug_469:
+ rx553_fail:
+ (rx553_rep, rx553_pos, $I10, $P10) = rx553_cur."!mark_fail"(0)
+ lt rx553_pos, -1, rx553_done
+ eq rx553_pos, -1, rx553_fail
+ jump $I10
+ rx553_done:
+ rx553_cur."!cursor_fail"()
+ if_null rx553_debug, debug_470
+ rx553_cur."!cursor_debug"("FAIL", "mod_internal")
+ debug_470:
+ .return (rx553_cur)
+ .return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident" :subid("155_1283368197.39621") :method
-.annotate 'line', 190
- $P555 = self."!PREFIX__!protoregex"("mod_ident")
- .return ($P555)
+.sub "!PREFIX__mod_internal" :subid("157_1283975941.34404") :method
+.annotate 'line', 0
+ $P555 = self."!PREFIX__!subrule"("mod_ident", ":")
+ new $P556, "ResizablePMCArray"
+ push $P556, $P555
+ push $P556, ":"
+ .return ($P556)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<ignorecase>" :subid("156_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx557_tgt
- .local int rx557_pos
- .local int rx557_off
- .local int rx557_eos
- .local int rx557_rep
- .local pmc rx557_cur
- .local pmc rx557_debug
- (rx557_cur, rx557_pos, rx557_tgt, $I10) = self."!cursor_start"()
- getattribute rx557_debug, rx557_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx557_cur
- .local pmc match
- .lex "$/", match
- length rx557_eos, rx557_tgt
- gt rx557_pos, rx557_eos, rx557_done
- set rx557_off, 0
- lt rx557_pos, 2, rx557_start
- sub rx557_off, rx557_pos, 1
- substr rx557_tgt, rx557_tgt, rx557_off
- rx557_start:
- eq $I10, 1, rx557_restart
- if_null rx557_debug, debug_458
- rx557_cur."!cursor_debug"("START", "mod_ident:sym<ignorecase>")
- debug_458:
+.sub "_block560" :anon :subid("158_1283975941.34404") :method :outer("156_1283975941.34404")
+.annotate 'line', 0
+ .local string rx562_tgt
+ .local int rx562_pos
+ .local int rx562_off
+ .local int rx562_eos
+ .local int rx562_rep
+ .local pmc rx562_cur
+ .local pmc rx562_debug
+ (rx562_cur, rx562_pos, rx562_tgt, $I10) = self."!cursor_start"()
+ getattribute rx562_debug, rx562_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx562_cur
+ .local pmc match
+ .lex "$/", match
+ length rx562_eos, rx562_tgt
+ gt rx562_pos, rx562_eos, rx562_done
+ set rx562_off, 0
+ lt rx562_pos, 2, rx562_start
+ sub rx562_off, rx562_pos, 1
+ substr rx562_tgt, rx562_tgt, rx562_off
+ rx562_start:
+ eq $I10, 1, rx562_restart
+ if_null rx562_debug, debug_464
+ rx562_cur."!cursor_debug"("START", "")
+ debug_464:
$I10 = self.'from'()
- ne $I10, -1, rxscan560_done
- goto rxscan560_scan
- rxscan560_loop:
- ($P10) = rx557_cur."from"()
- inc $P10
- set rx557_pos, $P10
- ge rx557_pos, rx557_eos, rxscan560_done
- rxscan560_scan:
- set_addr $I10, rxscan560_loop
- rx557_cur."!mark_push"(0, rx557_pos, $I10)
- rxscan560_done:
-.annotate 'line', 191
+ ne $I10, -1, rxscan563_done
+ goto rxscan563_scan
+ rxscan563_loop:
+ ($P10) = rx562_cur."from"()
+ inc $P10
+ set rx562_pos, $P10
+ ge rx562_pos, rx562_eos, rxscan563_done
+ rxscan563_scan:
+ set_addr $I10, rxscan563_loop
+ rx562_cur."!mark_push"(0, rx562_pos, $I10)
+ rxscan563_done:
+ alt564_0:
+ set_addr $I10, alt564_1
+ rx562_cur."!mark_push"(0, rx562_pos, $I10)
+ # rx literal "!"
+ add $I11, rx562_pos, 1
+ gt $I11, rx562_eos, rx562_fail
+ sub $I11, rx562_pos, rx562_off
+ ord $I11, rx562_tgt, $I11
+ ne $I11, 33, rx562_fail
+ add rx562_pos, 1
+ goto alt564_end
+ alt564_1:
+ # rx charclass_q d r 1..-1
+ sub $I10, rx562_pos, rx562_off
+ find_not_cclass $I11, 8, rx562_tgt, $I10, rx562_eos
+ add $I12, $I10, 1
+ lt $I11, $I12, rx562_fail
+ add rx562_pos, rx562_off, $I11
+ alt564_end:
+ # rx pass
+ rx562_cur."!cursor_pass"(rx562_pos, "")
+ if_null rx562_debug, debug_465
+ rx562_cur."!cursor_debug"("PASS", "", " at pos=", rx562_pos)
+ debug_465:
+ .return (rx562_cur)
+ rx562_restart:
+ if_null rx562_debug, debug_466
+ rx562_cur."!cursor_debug"("NEXT", "")
+ debug_466:
+ rx562_fail:
+ (rx562_rep, rx562_pos, $I10, $P10) = rx562_cur."!mark_fail"(0)
+ lt rx562_pos, -1, rx562_done
+ eq rx562_pos, -1, rx562_fail
+ jump $I10
+ rx562_done:
+ rx562_cur."!cursor_fail"()
+ if_null rx562_debug, debug_467
+ rx562_cur."!cursor_debug"("FAIL", "")
+ debug_467:
+ .return (rx562_cur)
+ .return ()
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "mod_ident" :subid("159_1283975941.34404") :method
+.annotate 'line', 0
+ $P569 = self."!protoregex"("mod_ident")
+ .return ($P569)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "!PREFIX__mod_ident" :subid("160_1283975941.34404") :method
+.annotate 'line', 0
+ $P571 = self."!PREFIX__!protoregex"("mod_ident")
+ .return ($P571)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "mod_ident:sym<ignorecase>" :subid("161_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx573_tgt
+ .local int rx573_pos
+ .local int rx573_off
+ .local int rx573_eos
+ .local int rx573_rep
+ .local pmc rx573_cur
+ .local pmc rx573_debug
+ (rx573_cur, rx573_pos, rx573_tgt, $I10) = self."!cursor_start"()
+ getattribute rx573_debug, rx573_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx573_cur
+ .local pmc match
+ .lex "$/", match
+ length rx573_eos, rx573_tgt
+ gt rx573_pos, rx573_eos, rx573_done
+ set rx573_off, 0
+ lt rx573_pos, 2, rx573_start
+ sub rx573_off, rx573_pos, 1
+ substr rx573_tgt, rx573_tgt, rx573_off
+ rx573_start:
+ eq $I10, 1, rx573_restart
+ if_null rx573_debug, debug_471
+ rx573_cur."!cursor_debug"("START", "mod_ident:sym<ignorecase>")
+ debug_471:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan576_done
+ goto rxscan576_scan
+ rxscan576_loop:
+ ($P10) = rx573_cur."from"()
+ inc $P10
+ set rx573_pos, $P10
+ ge rx573_pos, rx573_eos, rxscan576_done
+ rxscan576_scan:
+ set_addr $I10, rxscan576_loop
+ rx573_cur."!mark_push"(0, rx573_pos, $I10)
+ rxscan576_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_561_fail
- rx557_cur."!mark_push"(0, rx557_pos, $I10)
+ set_addr $I10, rxcap_577_fail
+ rx573_cur."!mark_push"(0, rx573_pos, $I10)
# rx literal "i"
- add $I11, rx557_pos, 1
- gt $I11, rx557_eos, rx557_fail
- sub $I11, rx557_pos, rx557_off
- ord $I11, rx557_tgt, $I11
- ne $I11, 105, rx557_fail
- add rx557_pos, 1
- set_addr $I10, rxcap_561_fail
- ($I12, $I11) = rx557_cur."!mark_peek"($I10)
- rx557_cur."!cursor_pos"($I11)
- ($P10) = rx557_cur."!cursor_start"()
- $P10."!cursor_pass"(rx557_pos, "")
- rx557_cur."!mark_push"(0, -1, 0, $P10)
+ add $I11, rx573_pos, 1
+ gt $I11, rx573_eos, rx573_fail
+ sub $I11, rx573_pos, rx573_off
+ ord $I11, rx573_tgt, $I11
+ ne $I11, 105, rx573_fail
+ add rx573_pos, 1
+ set_addr $I10, rxcap_577_fail
+ ($I12, $I11) = rx573_cur."!mark_peek"($I10)
+ rx573_cur."!cursor_pos"($I11)
+ ($P10) = rx573_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx573_pos, "")
+ rx573_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_561_done
- rxcap_561_fail:
- goto rx557_fail
- rxcap_561_done:
- # rx rxquantr562 ** 0..1
- set_addr $I10, rxquantr562_done
- rx557_cur."!mark_push"(0, rx557_pos, $I10)
- rxquantr562_loop:
+ goto rxcap_577_done
+ rxcap_577_fail:
+ goto rx573_fail
+ rxcap_577_done:
+ # rx rxquantr578 ** 0..1
+ set_addr $I10, rxquantr578_done
+ rx573_cur."!mark_push"(0, rx573_pos, $I10)
+ rxquantr578_loop:
# rx literal "gnorecase"
- add $I11, rx557_pos, 9
- gt $I11, rx557_eos, rx557_fail
- sub $I11, rx557_pos, rx557_off
- substr $S10, rx557_tgt, $I11, 9
- ne $S10, "gnorecase", rx557_fail
- add rx557_pos, 9
- set_addr $I10, rxquantr562_done
- (rx557_rep) = rx557_cur."!mark_commit"($I10)
- rxquantr562_done:
- # rx pass
- rx557_cur."!cursor_pass"(rx557_pos, "mod_ident:sym<ignorecase>")
- if_null rx557_debug, debug_459
- rx557_cur."!cursor_debug"("PASS", "mod_ident:sym<ignorecase>", " at pos=", rx557_pos)
- debug_459:
- .return (rx557_cur)
- rx557_restart:
-.annotate 'line', 3
- if_null rx557_debug, debug_460
- rx557_cur."!cursor_debug"("NEXT", "mod_ident:sym<ignorecase>")
- debug_460:
- rx557_fail:
- (rx557_rep, rx557_pos, $I10, $P10) = rx557_cur."!mark_fail"(0)
- lt rx557_pos, -1, rx557_done
- eq rx557_pos, -1, rx557_fail
- jump $I10
- rx557_done:
- rx557_cur."!cursor_fail"()
- if_null rx557_debug, debug_461
- rx557_cur."!cursor_debug"("FAIL", "mod_ident:sym<ignorecase>")
- debug_461:
- .return (rx557_cur)
+ add $I11, rx573_pos, 9
+ gt $I11, rx573_eos, rx573_fail
+ sub $I11, rx573_pos, rx573_off
+ substr $S10, rx573_tgt, $I11, 9
+ ne $S10, "gnorecase", rx573_fail
+ add rx573_pos, 9
+ set_addr $I10, rxquantr578_done
+ (rx573_rep) = rx573_cur."!mark_commit"($I10)
+ rxquantr578_done:
+ # rx pass
+ rx573_cur."!cursor_pass"(rx573_pos, "mod_ident:sym<ignorecase>")
+ if_null rx573_debug, debug_472
+ rx573_cur."!cursor_debug"("PASS", "mod_ident:sym<ignorecase>", " at pos=", rx573_pos)
+ debug_472:
+ .return (rx573_cur)
+ rx573_restart:
+ if_null rx573_debug, debug_473
+ rx573_cur."!cursor_debug"("NEXT", "mod_ident:sym<ignorecase>")
+ debug_473:
+ rx573_fail:
+ (rx573_rep, rx573_pos, $I10, $P10) = rx573_cur."!mark_fail"(0)
+ lt rx573_pos, -1, rx573_done
+ eq rx573_pos, -1, rx573_fail
+ jump $I10
+ rx573_done:
+ rx573_cur."!cursor_fail"()
+ if_null rx573_debug, debug_474
+ rx573_cur."!cursor_debug"("FAIL", "mod_ident:sym<ignorecase>")
+ debug_474:
+ .return (rx573_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<ignorecase>" :subid("157_1283368197.39621") :method
-.annotate 'line', 3
- new $P559, "ResizablePMCArray"
- push $P559, "i"
- .return ($P559)
+.sub "!PREFIX__mod_ident:sym<ignorecase>" :subid("162_1283975941.34404") :method
+.annotate 'line', 0
+ new $P575, "ResizablePMCArray"
+ push $P575, "i"
+ .return ($P575)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<ratchet>" :subid("158_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx564_tgt
- .local int rx564_pos
- .local int rx564_off
- .local int rx564_eos
- .local int rx564_rep
- .local pmc rx564_cur
- .local pmc rx564_debug
- (rx564_cur, rx564_pos, rx564_tgt, $I10) = self."!cursor_start"()
- getattribute rx564_debug, rx564_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx564_cur
- .local pmc match
- .lex "$/", match
- length rx564_eos, rx564_tgt
- gt rx564_pos, rx564_eos, rx564_done
- set rx564_off, 0
- lt rx564_pos, 2, rx564_start
- sub rx564_off, rx564_pos, 1
- substr rx564_tgt, rx564_tgt, rx564_off
- rx564_start:
- eq $I10, 1, rx564_restart
- if_null rx564_debug, debug_462
- rx564_cur."!cursor_debug"("START", "mod_ident:sym<ratchet>")
- debug_462:
- $I10 = self.'from'()
- ne $I10, -1, rxscan567_done
- goto rxscan567_scan
- rxscan567_loop:
- ($P10) = rx564_cur."from"()
- inc $P10
- set rx564_pos, $P10
- ge rx564_pos, rx564_eos, rxscan567_done
- rxscan567_scan:
- set_addr $I10, rxscan567_loop
- rx564_cur."!mark_push"(0, rx564_pos, $I10)
- rxscan567_done:
-.annotate 'line', 192
+.sub "mod_ident:sym<ratchet>" :subid("163_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx580_tgt
+ .local int rx580_pos
+ .local int rx580_off
+ .local int rx580_eos
+ .local int rx580_rep
+ .local pmc rx580_cur
+ .local pmc rx580_debug
+ (rx580_cur, rx580_pos, rx580_tgt, $I10) = self."!cursor_start"()
+ getattribute rx580_debug, rx580_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx580_cur
+ .local pmc match
+ .lex "$/", match
+ length rx580_eos, rx580_tgt
+ gt rx580_pos, rx580_eos, rx580_done
+ set rx580_off, 0
+ lt rx580_pos, 2, rx580_start
+ sub rx580_off, rx580_pos, 1
+ substr rx580_tgt, rx580_tgt, rx580_off
+ rx580_start:
+ eq $I10, 1, rx580_restart
+ if_null rx580_debug, debug_475
+ rx580_cur."!cursor_debug"("START", "mod_ident:sym<ratchet>")
+ debug_475:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan583_done
+ goto rxscan583_scan
+ rxscan583_loop:
+ ($P10) = rx580_cur."from"()
+ inc $P10
+ set rx580_pos, $P10
+ ge rx580_pos, rx580_eos, rxscan583_done
+ rxscan583_scan:
+ set_addr $I10, rxscan583_loop
+ rx580_cur."!mark_push"(0, rx580_pos, $I10)
+ rxscan583_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_568_fail
- rx564_cur."!mark_push"(0, rx564_pos, $I10)
+ set_addr $I10, rxcap_584_fail
+ rx580_cur."!mark_push"(0, rx580_pos, $I10)
# rx literal "r"
- add $I11, rx564_pos, 1
- gt $I11, rx564_eos, rx564_fail
- sub $I11, rx564_pos, rx564_off
- ord $I11, rx564_tgt, $I11
- ne $I11, 114, rx564_fail
- add rx564_pos, 1
- set_addr $I10, rxcap_568_fail
- ($I12, $I11) = rx564_cur."!mark_peek"($I10)
- rx564_cur."!cursor_pos"($I11)
- ($P10) = rx564_cur."!cursor_start"()
- $P10."!cursor_pass"(rx564_pos, "")
- rx564_cur."!mark_push"(0, -1, 0, $P10)
+ add $I11, rx580_pos, 1
+ gt $I11, rx580_eos, rx580_fail
+ sub $I11, rx580_pos, rx580_off
+ ord $I11, rx580_tgt, $I11
+ ne $I11, 114, rx580_fail
+ add rx580_pos, 1
+ set_addr $I10, rxcap_584_fail
+ ($I12, $I11) = rx580_cur."!mark_peek"($I10)
+ rx580_cur."!cursor_pos"($I11)
+ ($P10) = rx580_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx580_pos, "")
+ rx580_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_568_done
- rxcap_568_fail:
- goto rx564_fail
- rxcap_568_done:
- # rx rxquantr569 ** 0..1
- set_addr $I10, rxquantr569_done
- rx564_cur."!mark_push"(0, rx564_pos, $I10)
- rxquantr569_loop:
+ goto rxcap_584_done
+ rxcap_584_fail:
+ goto rx580_fail
+ rxcap_584_done:
+ # rx rxquantr585 ** 0..1
+ set_addr $I10, rxquantr585_done
+ rx580_cur."!mark_push"(0, rx580_pos, $I10)
+ rxquantr585_loop:
# rx literal "atchet"
- add $I11, rx564_pos, 6
- gt $I11, rx564_eos, rx564_fail
- sub $I11, rx564_pos, rx564_off
- substr $S10, rx564_tgt, $I11, 6
- ne $S10, "atchet", rx564_fail
- add rx564_pos, 6
- set_addr $I10, rxquantr569_done
- (rx564_rep) = rx564_cur."!mark_commit"($I10)
- rxquantr569_done:
- # rx pass
- rx564_cur."!cursor_pass"(rx564_pos, "mod_ident:sym<ratchet>")
- if_null rx564_debug, debug_463
- rx564_cur."!cursor_debug"("PASS", "mod_ident:sym<ratchet>", " at pos=", rx564_pos)
- debug_463:
- .return (rx564_cur)
- rx564_restart:
-.annotate 'line', 3
- if_null rx564_debug, debug_464
- rx564_cur."!cursor_debug"("NEXT", "mod_ident:sym<ratchet>")
- debug_464:
- rx564_fail:
- (rx564_rep, rx564_pos, $I10, $P10) = rx564_cur."!mark_fail"(0)
- lt rx564_pos, -1, rx564_done
- eq rx564_pos, -1, rx564_fail
- jump $I10
- rx564_done:
- rx564_cur."!cursor_fail"()
- if_null rx564_debug, debug_465
- rx564_cur."!cursor_debug"("FAIL", "mod_ident:sym<ratchet>")
- debug_465:
- .return (rx564_cur)
+ add $I11, rx580_pos, 6
+ gt $I11, rx580_eos, rx580_fail
+ sub $I11, rx580_pos, rx580_off
+ substr $S10, rx580_tgt, $I11, 6
+ ne $S10, "atchet", rx580_fail
+ add rx580_pos, 6
+ set_addr $I10, rxquantr585_done
+ (rx580_rep) = rx580_cur."!mark_commit"($I10)
+ rxquantr585_done:
+ # rx pass
+ rx580_cur."!cursor_pass"(rx580_pos, "mod_ident:sym<ratchet>")
+ if_null rx580_debug, debug_476
+ rx580_cur."!cursor_debug"("PASS", "mod_ident:sym<ratchet>", " at pos=", rx580_pos)
+ debug_476:
+ .return (rx580_cur)
+ rx580_restart:
+ if_null rx580_debug, debug_477
+ rx580_cur."!cursor_debug"("NEXT", "mod_ident:sym<ratchet>")
+ debug_477:
+ rx580_fail:
+ (rx580_rep, rx580_pos, $I10, $P10) = rx580_cur."!mark_fail"(0)
+ lt rx580_pos, -1, rx580_done
+ eq rx580_pos, -1, rx580_fail
+ jump $I10
+ rx580_done:
+ rx580_cur."!cursor_fail"()
+ if_null rx580_debug, debug_478
+ rx580_cur."!cursor_debug"("FAIL", "mod_ident:sym<ratchet>")
+ debug_478:
+ .return (rx580_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<ratchet>" :subid("159_1283368197.39621") :method
-.annotate 'line', 3
- new $P566, "ResizablePMCArray"
- push $P566, "r"
- .return ($P566)
+.sub "!PREFIX__mod_ident:sym<ratchet>" :subid("164_1283975941.34404") :method
+.annotate 'line', 0
+ new $P582, "ResizablePMCArray"
+ push $P582, "r"
+ .return ($P582)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<sigspace>" :subid("160_1283368197.39621") :method :outer("11_1283368197.39621")
-.annotate 'line', 3
- .local string rx571_tgt
- .local int rx571_pos
- .local int rx571_off
- .local int rx571_eos
- .local int rx571_rep
- .local pmc rx571_cur
- .local pmc rx571_debug
- (rx571_cur, rx571_pos, rx571_tgt, $I10) = self."!cursor_start"()
- getattribute rx571_debug, rx571_cur, "$!debug"
- .lex unicode:"$\x{a2}", rx571_cur
- .local pmc match
- .lex "$/", match
- length rx571_eos, rx571_tgt
- gt rx571_pos, rx571_eos, rx571_done
- set rx571_off, 0
- lt rx571_pos, 2, rx571_start
- sub rx571_off, rx571_pos, 1
- substr rx571_tgt, rx571_tgt, rx571_off
- rx571_start:
- eq $I10, 1, rx571_restart
- if_null rx571_debug, debug_466
- rx571_cur."!cursor_debug"("START", "mod_ident:sym<sigspace>")
- debug_466:
- $I10 = self.'from'()
- ne $I10, -1, rxscan574_done
- goto rxscan574_scan
- rxscan574_loop:
- ($P10) = rx571_cur."from"()
- inc $P10
- set rx571_pos, $P10
- ge rx571_pos, rx571_eos, rxscan574_done
- rxscan574_scan:
- set_addr $I10, rxscan574_loop
- rx571_cur."!mark_push"(0, rx571_pos, $I10)
- rxscan574_done:
-.annotate 'line', 193
+.sub "mod_ident:sym<sigspace>" :subid("165_1283975941.34404") :method :outer("11_1283975941.34404")
+.annotate 'line', 0
+ .local string rx587_tgt
+ .local int rx587_pos
+ .local int rx587_off
+ .local int rx587_eos
+ .local int rx587_rep
+ .local pmc rx587_cur
+ .local pmc rx587_debug
+ (rx587_cur, rx587_pos, rx587_tgt, $I10) = self."!cursor_start"()
+ getattribute rx587_debug, rx587_cur, "$!debug"
+ .lex unicode:"$\x{a2}", rx587_cur
+ .local pmc match
+ .lex "$/", match
+ length rx587_eos, rx587_tgt
+ gt rx587_pos, rx587_eos, rx587_done
+ set rx587_off, 0
+ lt rx587_pos, 2, rx587_start
+ sub rx587_off, rx587_pos, 1
+ substr rx587_tgt, rx587_tgt, rx587_off
+ rx587_start:
+ eq $I10, 1, rx587_restart
+ if_null rx587_debug, debug_479
+ rx587_cur."!cursor_debug"("START", "mod_ident:sym<sigspace>")
+ debug_479:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan590_done
+ goto rxscan590_scan
+ rxscan590_loop:
+ ($P10) = rx587_cur."from"()
+ inc $P10
+ set rx587_pos, $P10
+ ge rx587_pos, rx587_eos, rxscan590_done
+ rxscan590_scan:
+ set_addr $I10, rxscan590_loop
+ rx587_cur."!mark_push"(0, rx587_pos, $I10)
+ rxscan590_done:
# rx subcapture "sym"
- set_addr $I10, rxcap_575_fail
- rx571_cur."!mark_push"(0, rx571_pos, $I10)
+ set_addr $I10, rxcap_591_fail
+ rx587_cur."!mark_push"(0, rx587_pos, $I10)
# rx literal "s"
- add $I11, rx571_pos, 1
- gt $I11, rx571_eos, rx571_fail
- sub $I11, rx571_pos, rx571_off
- ord $I11, rx571_tgt, $I11
- ne $I11, 115, rx571_fail
- add rx571_pos, 1
- set_addr $I10, rxcap_575_fail
- ($I12, $I11) = rx571_cur."!mark_peek"($I10)
- rx571_cur."!cursor_pos"($I11)
- ($P10) = rx571_cur."!cursor_start"()
- $P10."!cursor_pass"(rx571_pos, "")
- rx571_cur."!mark_push"(0, -1, 0, $P10)
+ add $I11, rx587_pos, 1
+ gt $I11, rx587_eos, rx587_fail
+ sub $I11, rx587_pos, rx587_off
+ ord $I11, rx587_tgt, $I11
+ ne $I11, 115, rx587_fail
+ add rx587_pos, 1
+ set_addr $I10, rxcap_591_fail
+ ($I12, $I11) = rx587_cur."!mark_peek"($I10)
+ rx587_cur."!cursor_pos"($I11)
+ ($P10) = rx587_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx587_pos, "")
+ rx587_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_575_done
- rxcap_575_fail:
- goto rx571_fail
- rxcap_575_done:
- # rx rxquantr576 ** 0..1
- set_addr $I10, rxquantr576_done
- rx571_cur."!mark_push"(0, rx571_pos, $I10)
- rxquantr576_loop:
+ goto rxcap_591_done
+ rxcap_591_fail:
+ goto rx587_fail
+ rxcap_591_done:
+ # rx rxquantr592 ** 0..1
+ set_addr $I10, rxquantr592_done
+ rx587_cur."!mark_push"(0, rx587_pos, $I10)
+ rxquantr592_loop:
# rx literal "igspace"
- add $I11, rx571_pos, 7
- gt $I11, rx571_eos, rx571_fail
- sub $I11, rx571_pos, rx571_off
- substr $S10, rx571_tgt, $I11, 7
- ne $S10, "igspace", rx571_fail
- add rx571_pos, 7
- set_addr $I10, rxquantr576_done
- (rx571_rep) = rx571_cur."!mark_commit"($I10)
- rxquantr576_done:
- # rx pass
- rx571_cur."!cursor_pass"(rx571_pos, "mod_ident:sym<sigspace>")
- if_null rx571_debug, debug_467
- rx571_cur."!cursor_debug"("PASS", "mod_ident:sym<sigspace>", " at pos=", rx571_pos)
- debug_467:
- .return (rx571_cur)
- rx571_restart:
-.annotate 'line', 3
- if_null rx571_debug, debug_468
- rx571_cur."!cursor_debug"("NEXT", "mod_ident:sym<sigspace>")
- debug_468:
- rx571_fail:
- (rx571_rep, rx571_pos, $I10, $P10) = rx571_cur."!mark_fail"(0)
- lt rx571_pos, -1, rx571_done
- eq rx571_pos, -1, rx571_fail
- jump $I10
- rx571_done:
- rx571_cur."!cursor_fail"()
- if_null rx571_debug, debug_469
- rx571_cur."!cursor_debug"("FAIL", "mod_ident:sym<sigspace>")
- debug_469:
- .return (rx571_cur)
+ add $I11, rx587_pos, 7
+ gt $I11, rx587_eos, rx587_fail
+ sub $I11, rx587_pos, rx587_off
+ substr $S10, rx587_tgt, $I11, 7
+ ne $S10, "igspace", rx587_fail
+ add rx587_pos, 7
+ set_addr $I10, rxquantr592_done
+ (rx587_rep) = rx587_cur."!mark_commit"($I10)
+ rxquantr592_done:
+ # rx pass
+ rx587_cur."!cursor_pass"(rx587_pos, "mod_ident:sym<sigspace>")
+ if_null rx587_debug, debug_480
+ rx587_cur."!cursor_debug"("PASS", "mod_ident:sym<sigspace>", " at pos=", rx587_pos)
+ debug_480:
+ .return (rx587_cur)
+ rx587_restart:
+ if_null rx587_debug, debug_481
+ rx587_cur."!cursor_debug"("NEXT", "mod_ident:sym<sigspace>")
+ debug_481:
+ rx587_fail:
+ (rx587_rep, rx587_pos, $I10, $P10) = rx587_cur."!mark_fail"(0)
+ lt rx587_pos, -1, rx587_done
+ eq rx587_pos, -1, rx587_fail
+ jump $I10
+ rx587_done:
+ rx587_cur."!cursor_fail"()
+ if_null rx587_debug, debug_482
+ rx587_cur."!cursor_debug"("FAIL", "mod_ident:sym<sigspace>")
+ debug_482:
+ .return (rx587_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<sigspace>" :subid("161_1283368197.39621") :method
-.annotate 'line', 3
- new $P573, "ResizablePMCArray"
- push $P573, "s"
- .return ($P573)
+.sub "!PREFIX__mod_ident:sym<sigspace>" :subid("166_1283975941.34404") :method
+.annotate 'line', 0
+ new $P589, "ResizablePMCArray"
+ push $P589, "s"
+ .return ($P589)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block577" :load :anon :subid("162_1283368197.39621")
-.annotate 'line', 3
- .const 'Sub' $P579 = "11_1283368197.39621"
- $P580 = $P579()
- .return ($P580)
+.sub "_block593" :load :anon :subid("167_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P595 = "11_1283975941.34404"
+ $P596 = $P595()
+ .return ($P596)
.end
.namespace []
-.sub "_block582" :load :anon :subid("163_1283368197.39621")
-.annotate 'line', 1
- .const 'Sub' $P584 = "10_1283368197.39621"
- $P585 = $P584()
- .return ($P585)
+.sub "_block598" :load :anon :subid("168_1283975941.34404")
+.annotate 'line', 0
+ .const 'Sub' $P600 = "10_1283975941.34404"
+ $P601 = $P600()
+ .return ($P601)
.end
### .include 'gen/p6regex-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1283368202.55748")
+.sub "_block11" :anon :subid("10_1283975944.26638")
.annotate 'line', 0
get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13"
capture_lex $P14
-.annotate 'line', 1
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
unless $I0 goto ctxsave_done
$P0."ctxsave"()
ctxsave_done:
-.annotate 'line', 4
get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13"
capture_lex $P14
$P1671 = $P14()
-.annotate 'line', 1
.return ($P1671)
- .const 'Sub' $P1673 = "94_1283368202.55748"
+ .const 'Sub' $P1673 = "94_1283975944.26638"
.return ($P1673)
.end
.namespace []
-.sub "" :load :init :subid("post95") :outer("10_1283368202.55748")
+.sub "" :load :init :subid("post95") :outer("10_1283975944.26638")
.annotate 'line', 0
- .const 'Sub' $P12 = "10_1283368202.55748"
+ .const 'Sub' $P12 = "10_1283975944.26638"
.local pmc block
set block, $P12
$P1676 = get_root_global ["parrot"], "P6metaclass"
@@ -8591,138 +8569,134 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block13" :subid("11_1283368202.55748") :outer("10_1283368202.55748")
-.annotate 'line', 4
- .const 'Sub' $P1648 = "92_1283368202.55748"
+.sub "_block13" :subid("11_1283975944.26638") :outer("10_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P1648 = "92_1283975944.26638"
capture_lex $P1648
- .const 'Sub' $P1628 = "91_1283368202.55748"
+ .const 'Sub' $P1628 = "91_1283975944.26638"
capture_lex $P1628
- .const 'Sub' $P1596 = "90_1283368202.55748"
+ .const 'Sub' $P1596 = "90_1283975944.26638"
capture_lex $P1596
- .const 'Sub' $P1527 = "86_1283368202.55748"
+ .const 'Sub' $P1527 = "86_1283975944.26638"
capture_lex $P1527
- .const 'Sub' $P1459 = "84_1283368202.55748"
+ .const 'Sub' $P1459 = "84_1283975944.26638"
capture_lex $P1459
- .const 'Sub' $P1387 = "81_1283368202.55748"
+ .const 'Sub' $P1387 = "81_1283975944.26638"
capture_lex $P1387
- .const 'Sub' $P1373 = "80_1283368202.55748"
+ .const 'Sub' $P1373 = "80_1283975944.26638"
capture_lex $P1373
- .const 'Sub' $P1349 = "79_1283368202.55748"
+ .const 'Sub' $P1349 = "79_1283975944.26638"
capture_lex $P1349
- .const 'Sub' $P1331 = "78_1283368202.55748"
+ .const 'Sub' $P1331 = "78_1283975944.26638"
capture_lex $P1331
- .const 'Sub' $P1317 = "77_1283368202.55748"
+ .const 'Sub' $P1317 = "77_1283975944.26638"
capture_lex $P1317
- .const 'Sub' $P1304 = "76_1283368202.55748"
+ .const 'Sub' $P1304 = "76_1283975944.26638"
capture_lex $P1304
- .const 'Sub' $P1273 = "75_1283368202.55748"
+ .const 'Sub' $P1273 = "75_1283975944.26638"
capture_lex $P1273
- .const 'Sub' $P1242 = "74_1283368202.55748"
+ .const 'Sub' $P1242 = "74_1283975944.26638"
capture_lex $P1242
- .const 'Sub' $P1226 = "73_1283368202.55748"
+ .const 'Sub' $P1226 = "73_1283975944.26638"
capture_lex $P1226
- .const 'Sub' $P1210 = "72_1283368202.55748"
+ .const 'Sub' $P1210 = "72_1283975944.26638"
capture_lex $P1210
- .const 'Sub' $P1194 = "71_1283368202.55748"
+ .const 'Sub' $P1194 = "71_1283975944.26638"
capture_lex $P1194
- .const 'Sub' $P1178 = "70_1283368202.55748"
+ .const 'Sub' $P1178 = "70_1283975944.26638"
capture_lex $P1178
- .const 'Sub' $P1162 = "69_1283368202.55748"
+ .const 'Sub' $P1162 = "69_1283975944.26638"
capture_lex $P1162
- .const 'Sub' $P1146 = "68_1283368202.55748"
+ .const 'Sub' $P1146 = "68_1283975944.26638"
capture_lex $P1146
- .const 'Sub' $P1130 = "67_1283368202.55748"
+ .const 'Sub' $P1130 = "67_1283975944.26638"
capture_lex $P1130
- .const 'Sub' $P1106 = "66_1283368202.55748"
+ .const 'Sub' $P1106 = "66_1283975944.26638"
capture_lex $P1106
- .const 'Sub' $P1091 = "65_1283368202.55748"
+ .const 'Sub' $P1091 = "65_1283975944.26638"
capture_lex $P1091
- .const 'Sub' $P1033 = "64_1283368202.55748"
+ .const 'Sub' $P1033 = "64_1283975944.26638"
capture_lex $P1033
- .const 'Sub' $P1012 = "63_1283368202.55748"
+ .const 'Sub' $P1012 = "63_1283975944.26638"
capture_lex $P1012
- .const 'Sub' $P990 = "62_1283368202.55748"
+ .const 'Sub' $P990 = "62_1283975944.26638"
capture_lex $P990
- .const 'Sub' $P980 = "61_1283368202.55748"
+ .const 'Sub' $P980 = "61_1283975944.26638"
capture_lex $P980
- .const 'Sub' $P970 = "60_1283368202.55748"
+ .const 'Sub' $P970 = "60_1283975944.26638"
capture_lex $P970
- .const 'Sub' $P960 = "59_1283368202.55748"
+ .const 'Sub' $P960 = "59_1283975944.26638"
capture_lex $P960
- .const 'Sub' $P948 = "58_1283368202.55748"
+ .const 'Sub' $P948 = "58_1283975944.26638"
capture_lex $P948
- .const 'Sub' $P936 = "57_1283368202.55748"
+ .const 'Sub' $P936 = "57_1283975944.26638"
capture_lex $P936
- .const 'Sub' $P924 = "56_1283368202.55748"
+ .const 'Sub' $P924 = "56_1283975944.26638"
capture_lex $P924
- .const 'Sub' $P912 = "55_1283368202.55748"
+ .const 'Sub' $P912 = "55_1283975944.26638"
capture_lex $P912
- .const 'Sub' $P900 = "54_1283368202.55748"
+ .const 'Sub' $P900 = "54_1283975944.26638"
capture_lex $P900
- .const 'Sub' $P888 = "53_1283368202.55748"
+ .const 'Sub' $P888 = "53_1283975944.26638"
capture_lex $P888
- .const 'Sub' $P876 = "52_1283368202.55748"
+ .const 'Sub' $P876 = "52_1283975944.26638"
capture_lex $P876
- .const 'Sub' $P864 = "51_1283368202.55748"
+ .const 'Sub' $P864 = "51_1283975944.26638"
capture_lex $P864
- .const 'Sub' $P836 = "50_1283368202.55748"
+ .const 'Sub' $P836 = "50_1283975944.26638"
capture_lex $P836
- .const 'Sub' $P808 = "49_1283368202.55748"
+ .const 'Sub' $P808 = "49_1283975944.26638"
capture_lex $P808
- .const 'Sub' $P790 = "48_1283368202.55748"
+ .const 'Sub' $P790 = "48_1283975944.26638"
capture_lex $P790
- .const 'Sub' $P780 = "47_1283368202.55748"
+ .const 'Sub' $P780 = "47_1283975944.26638"
capture_lex $P780
- .const 'Sub' $P762 = "46_1283368202.55748"
+ .const 'Sub' $P762 = "46_1283975944.26638"
capture_lex $P762
- .const 'Sub' $P689 = "44_1283368202.55748"
+ .const 'Sub' $P689 = "44_1283975944.26638"
capture_lex $P689
- .const 'Sub' $P672 = "43_1283368202.55748"
+ .const 'Sub' $P672 = "43_1283975944.26638"
capture_lex $P672
- .const 'Sub' $P657 = "42_1283368202.55748"
+ .const 'Sub' $P657 = "42_1283975944.26638"
capture_lex $P657
- .const 'Sub' $P642 = "41_1283368202.55748"
+ .const 'Sub' $P642 = "41_1283975944.26638"
capture_lex $P642
- .const 'Sub' $P616 = "40_1283368202.55748"
+ .const 'Sub' $P616 = "40_1283975944.26638"
capture_lex $P616
- .const 'Sub' $P565 = "38_1283368202.55748"
+ .const 'Sub' $P565 = "38_1283975944.26638"
capture_lex $P565
- .const 'Sub' $P497 = "36_1283368202.55748"
+ .const 'Sub' $P497 = "36_1283975944.26638"
capture_lex $P497
- .const 'Sub' $P460 = "34_1283368202.55748"
+ .const 'Sub' $P460 = "34_1283975944.26638"
capture_lex $P460
- .const 'Sub' $P404 = "31_1283368202.55748"
+ .const 'Sub' $P404 = "31_1283975944.26638"
capture_lex $P404
- .const 'Sub' $P389 = "30_1283368202.55748"
+ .const 'Sub' $P389 = "30_1283975944.26638"
capture_lex $P389
- .const 'Sub' $P363 = "28_1283368202.55748"
+ .const 'Sub' $P363 = "28_1283975944.26638"
capture_lex $P363
- .const 'Sub' $P346 = "27_1283368202.55748"
+ .const 'Sub' $P346 = "27_1283975944.26638"
capture_lex $P346
- .const 'Sub' $P312 = "26_1283368202.55748"
+ .const 'Sub' $P312 = "26_1283975944.26638"
capture_lex $P312
- .const 'Sub' $P57 = "13_1283368202.55748"
+ .const 'Sub' $P57 = "13_1283975944.26638"
capture_lex $P57
- .const 'Sub' $P16 = "12_1283368202.55748"
+ .const 'Sub' $P16 = "12_1283975944.26638"
capture_lex $P16
get_global $P15, "@MODIFIERS"
unless_null $P15, vivify_97
$P15 = root_new ['parrot';'ResizablePMCArray']
set_global "@MODIFIERS", $P15
vivify_97:
-.annotate 'line', 506
- .const 'Sub' $P16 = "12_1283368202.55748"
+ .const 'Sub' $P16 = "12_1283975944.26638"
newclosure $P56, $P16
.lex "buildsub", $P56
-.annotate 'line', 524
- .const 'Sub' $P57 = "13_1283368202.55748"
+ .const 'Sub' $P57 = "13_1283975944.26638"
newclosure $P311, $P57
.lex "capnames", $P311
-.annotate 'line', 590
- .const 'Sub' $P312 = "26_1283368202.55748"
+ .const 'Sub' $P312 = "26_1283975944.26638"
newclosure $P344, $P312
.lex "backmod", $P344
-.annotate 'line', 4
$P0 = find_dynamic_lex "$*CTXSAVE"
if null $P0 goto ctxsave_done
$I0 = can $P0, "ctxsave"
@@ -8730,27 +8704,23 @@
$P0."ctxsave"()
ctxsave_done:
get_global $P345, "@MODIFIERS"
-.annotate 'line', 499
find_lex $P1625, "buildsub"
find_lex $P1626, "capnames"
find_lex $P1627, "backmod"
-.annotate 'line', 603
- .const 'Sub' $P1648 = "92_1283368202.55748"
+ .const 'Sub' $P1648 = "92_1283975944.26638"
newclosure $P1665, $P1648
-.annotate 'line', 4
.return ($P1665)
- .const 'Sub' $P1667 = "93_1283368202.55748"
+ .const 'Sub' $P1667 = "93_1283975944.26638"
.return ($P1667)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "" :load :init :subid("post96") :outer("11_1283368202.55748")
-.annotate 'line', 4
+.sub "" :load :init :subid("post96") :outer("11_1283975944.26638")
+.annotate 'line', 0
get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13"
.local pmc block
set block, $P14
-.annotate 'line', 7
$P1670 = new ['ResizablePMCArray']
$P0 = new ['Hash']
@@ -8762,11 +8732,11 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "buildsub" :subid("12_1283368202.55748") :outer("11_1283368202.55748")
+.sub "buildsub" :subid("12_1283975944.26638") :outer("11_1283975944.26638")
.param pmc param_19
.param pmc param_20 :optional
.param int has_param_20 :opt_flag
-.annotate 'line', 506
+.annotate 'line', 0
new $P18, 'ExceptionHandler'
set_addr $P18, control_17
$P18."handle_types"(.CONTROL_RETURN)
@@ -8778,13 +8748,11 @@
set param_20, $P22
optparam_98:
.lex "$block", param_20
-.annotate 'line', 507
$P23 = root_new ['parrot';'Hash']
.lex "%capnames", $P23
find_lex $P24, "$rpast"
$P25 = "capnames"($P24, 0)
store_lex "%capnames", $P25
-.annotate 'line', 508
new $P26, "Integer"
assign $P26, 0
find_lex $P27, "%capnames"
@@ -8793,15 +8761,11 @@
store_lex "%capnames", $P27
vivify_99:
set $P27[""], $P26
-.annotate 'line', 509
get_hll_global $P28, ["PAST"], "Regex"
-.annotate 'line', 510
get_hll_global $P29, ["PAST"], "Regex"
$P30 = $P29."new"("scan" :named("pasttype"))
find_lex $P31, "$rpast"
-.annotate 'line', 512
get_hll_global $P32, ["PAST"], "Regex"
-.annotate 'line', 513
get_global $P35, "@MODIFIERS"
unless_null $P35, vivify_100
$P35 = root_new ['parrot';'ResizablePMCArray']
@@ -8825,34 +8789,27 @@
set $P33, $P38
if_34_end:
$P40 = $P32."new"("pass" :named("pasttype"), $P33 :named("backtrack"))
-.annotate 'line', 512
find_lex $P41, "%capnames"
$P42 = $P28."new"($P30, $P31, $P40, "concat" :named("pasttype"), $P41 :named("capnames"))
-.annotate 'line', 509
store_lex "$rpast", $P42
-.annotate 'line', 517
find_lex $P44, "$block"
$P45 = $P44."symbol"(unicode:"$\x{a2}")
if $P45, unless_43_end
find_lex $P46, "$block"
$P46."symbol"(unicode:"$\x{a2}", "lexical" :named("scope"))
unless_43_end:
-.annotate 'line', 518
find_lex $P48, "$block"
$P49 = $P48."symbol"("$/")
if $P49, unless_47_end
find_lex $P50, "$block"
$P50."symbol"("$/", "lexical" :named("scope"))
unless_47_end:
-.annotate 'line', 519
find_lex $P51, "$block"
find_lex $P52, "$rpast"
$P51."push"($P52)
-.annotate 'line', 520
find_lex $P53, "$block"
$P53."blocktype"("method")
find_lex $P54, "$block"
-.annotate 'line', 506
.return ($P54)
control_17:
.local pmc exception
@@ -8864,19 +8821,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "capnames" :subid("13_1283368202.55748") :outer("11_1283368202.55748")
+.sub "capnames" :subid("13_1283975944.26638") :outer("11_1283975944.26638")
.param pmc param_60
.param pmc param_61
-.annotate 'line', 524
- .const 'Sub' $P286 = "24_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P286 = "24_1283975944.26638"
capture_lex $P286
- .const 'Sub' $P223 = "21_1283368202.55748"
+ .const 'Sub' $P223 = "21_1283975944.26638"
capture_lex $P223
- .const 'Sub' $P181 = "19_1283368202.55748"
+ .const 'Sub' $P181 = "19_1283975944.26638"
capture_lex $P181
- .const 'Sub' $P139 = "17_1283368202.55748"
+ .const 'Sub' $P139 = "17_1283975944.26638"
capture_lex $P139
- .const 'Sub' $P72 = "14_1283368202.55748"
+ .const 'Sub' $P72 = "14_1283975944.26638"
capture_lex $P72
new $P59, 'ExceptionHandler'
set_addr $P59, control_58
@@ -8884,29 +8841,22 @@
push_eh $P59
.lex "$ast", param_60
.lex "$count", param_61
-.annotate 'line', 525
$P62 = root_new ['parrot';'Hash']
.lex "%capnames", $P62
-.annotate 'line', 526
new $P63, "Undef"
.lex "$pasttype", $P63
-.annotate 'line', 524
find_lex $P64, "%capnames"
-.annotate 'line', 526
find_lex $P65, "$ast"
$P66 = $P65."pasttype"()
store_lex "$pasttype", $P66
-.annotate 'line', 527
find_lex $P68, "$pasttype"
set $S69, $P68
iseq $I70, $S69, "alt"
if $I70, if_67
-.annotate 'line', 540
find_lex $P130, "$pasttype"
set $S131, $P130
iseq $I132, $S131, "concat"
if $I132, if_129
-.annotate 'line', 549
find_lex $P174, "$pasttype"
set $S175, $P174
iseq $I176, $S175, "subrule"
@@ -8922,37 +8872,32 @@
set $P172, $I179
if_173_end:
if $P172, if_171
-.annotate 'line', 562
find_lex $P219, "$pasttype"
set $S220, $P219
iseq $I221, $S220, "subcapture"
if $I221, if_218
-.annotate 'line', 579
find_lex $P282, "$pasttype"
set $S283, $P282
iseq $I284, $S283, "quant"
unless $I284, if_281_end
- .const 'Sub' $P286 = "24_1283368202.55748"
+ .const 'Sub' $P286 = "24_1283975944.26638"
capture_lex $P286
$P286()
if_281_end:
goto if_218_end
if_218:
-.annotate 'line', 562
- .const 'Sub' $P223 = "21_1283368202.55748"
+ .const 'Sub' $P223 = "21_1283975944.26638"
capture_lex $P223
$P223()
if_218_end:
goto if_171_end
if_171:
-.annotate 'line', 549
- .const 'Sub' $P181 = "19_1283368202.55748"
+ .const 'Sub' $P181 = "19_1283975944.26638"
capture_lex $P181
$P181()
if_171_end:
goto if_129_end
if_129:
-.annotate 'line', 541
find_lex $P134, "$ast"
$P135 = $P134."list"()
defined $I136, $P135
@@ -8966,7 +8911,7 @@
unless $P133, loop168_done
shift $P137, $P133
loop168_redo:
- .const 'Sub' $P139 = "17_1283368202.55748"
+ .const 'Sub' $P139 = "17_1283975944.26638"
capture_lex $P139
$P139($P137)
loop168_next:
@@ -8981,15 +8926,12 @@
pop_eh
for_undef_123:
if_129_end:
-.annotate 'line', 540
goto if_67_end
if_67:
-.annotate 'line', 527
- .const 'Sub' $P72 = "14_1283368202.55748"
+ .const 'Sub' $P72 = "14_1283975944.26638"
capture_lex $P72
$P72()
if_67_end:
-.annotate 'line', 586
find_lex $P307, "$count"
find_lex $P308, "%capnames"
unless_null $P308, vivify_143
@@ -8998,7 +8940,6 @@
vivify_143:
set $P308[""], $P307
find_lex $P309, "%capnames"
-.annotate 'line', 524
.return ($P309)
control_58:
.local pmc exception
@@ -9010,11 +8951,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block285" :anon :subid("24_1283368202.55748") :outer("13_1283368202.55748")
-.annotate 'line', 579
- .const 'Sub' $P297 = "25_1283368202.55748"
+.sub "_block285" :anon :subid("24_1283975944.26638") :outer("13_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P297 = "25_1283975944.26638"
capture_lex $P297
-.annotate 'line', 580
$P287 = root_new ['parrot';'Hash']
.lex "%astcap", $P287
find_lex $P288, "$ast"
@@ -9028,7 +8968,6 @@
find_lex $P290, "$count"
$P291 = "capnames"($P289, $P290)
store_lex "%astcap", $P291
-.annotate 'line', 581
find_lex $P293, "%astcap"
defined $I294, $P293
unless $I294, for_undef_105
@@ -9041,7 +8980,7 @@
unless $P292, loop302_done
shift $P295, $P292
loop302_redo:
- .const 'Sub' $P297 = "25_1283368202.55748"
+ .const 'Sub' $P297 = "25_1283975944.26638"
capture_lex $P297
$P297($P295)
loop302_next:
@@ -9055,7 +8994,6 @@
loop302_done:
pop_eh
for_undef_105:
-.annotate 'line', 584
find_lex $P305, "%astcap"
unless_null $P305, vivify_107
$P305 = root_new ['parrot';'Hash']
@@ -9065,17 +9003,15 @@
new $P306, "Undef"
vivify_108:
store_lex "$count", $P306
-.annotate 'line', 579
.return ($P306)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block296" :anon :subid("25_1283368202.55748") :outer("24_1283368202.55748")
+.sub "_block296" :anon :subid("25_1283975944.26638") :outer("24_1283975944.26638")
.param pmc param_298
-.annotate 'line', 581
+.annotate 'line', 0
.lex "$_", param_298
-.annotate 'line', 582
new $P299, "Integer"
assign $P299, 2
find_lex $P300, "$_"
@@ -9085,40 +9021,33 @@
store_lex "%capnames", $P301
vivify_106:
set $P301[$P300], $P299
-.annotate 'line', 581
.return ($P299)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block222" :anon :subid("21_1283368202.55748") :outer("13_1283368202.55748")
-.annotate 'line', 562
- .const 'Sub' $P263 = "23_1283368202.55748"
+.sub "_block222" :anon :subid("21_1283975944.26638") :outer("13_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P263 = "23_1283975944.26638"
capture_lex $P263
- .const 'Sub' $P235 = "22_1283368202.55748"
+ .const 'Sub' $P235 = "22_1283975944.26638"
capture_lex $P235
-.annotate 'line', 563
new $P224, "Undef"
.lex "$name", $P224
-.annotate 'line', 564
$P225 = root_new ['parrot';'ResizablePMCArray']
.lex "@names", $P225
-.annotate 'line', 573
$P226 = root_new ['parrot';'Hash']
.lex "%x", $P226
-.annotate 'line', 563
find_lex $P227, "$ast"
$P228 = $P227."name"()
store_lex "$name", $P228
-.annotate 'line', 564
$P0 = find_lex '$name'
$S0 = $P0
$P229 = split '=', $S0
store_lex "@names", $P229
-.annotate 'line', 569
find_lex $P231, "@names"
defined $I232, $P231
unless $I232, for_undef_109
@@ -9131,7 +9060,7 @@
unless $P230, loop251_done
shift $P233, $P230
loop251_redo:
- .const 'Sub' $P235 = "22_1283368202.55748"
+ .const 'Sub' $P235 = "22_1283975944.26638"
capture_lex $P235
$P235($P233)
loop251_next:
@@ -9145,7 +9074,6 @@
loop251_done:
pop_eh
for_undef_109:
-.annotate 'line', 573
find_lex $P254, "$ast"
unless_null $P254, vivify_111
$P254 = root_new ['parrot';'ResizablePMCArray']
@@ -9157,7 +9085,6 @@
find_lex $P256, "$count"
$P257 = "capnames"($P255, $P256)
store_lex "%x", $P257
-.annotate 'line', 574
find_lex $P259, "%x"
defined $I260, $P259
unless $I260, for_undef_113
@@ -9170,7 +9097,7 @@
unless $P258, loop276_done
shift $P261, $P258
loop276_redo:
- .const 'Sub' $P263 = "23_1283368202.55748"
+ .const 'Sub' $P263 = "23_1283975944.26638"
capture_lex $P263
$P263($P261)
loop276_next:
@@ -9184,7 +9111,6 @@
loop276_done:
pop_eh
for_undef_113:
-.annotate 'line', 577
find_lex $P279, "%x"
unless_null $P279, vivify_119
$P279 = root_new ['parrot';'Hash']
@@ -9194,17 +9120,15 @@
new $P280, "Undef"
vivify_120:
store_lex "$count", $P280
-.annotate 'line', 562
.return ($P280)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block234" :anon :subid("22_1283368202.55748") :outer("21_1283368202.55748")
+.sub "_block234" :anon :subid("22_1283975944.26638") :outer("21_1283975944.26638")
.param pmc param_236
-.annotate 'line', 569
+.annotate 'line', 0
.lex "$_", param_236
-.annotate 'line', 570
find_lex $P240, "$_"
set $S241, $P240
iseq $I242, $S241, "0"
@@ -9224,7 +9148,6 @@
add $P247, $P246, 1
store_lex "$count", $P247
if_237_end:
-.annotate 'line', 571
new $P248, "Integer"
assign $P248, 1
find_lex $P249, "$_"
@@ -9234,17 +9157,15 @@
store_lex "%capnames", $P250
vivify_110:
set $P250[$P249], $P248
-.annotate 'line', 569
.return ($P248)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block262" :anon :subid("23_1283368202.55748") :outer("21_1283368202.55748")
+.sub "_block262" :anon :subid("23_1283975944.26638") :outer("21_1283975944.26638")
.param pmc param_264
-.annotate 'line', 574
+.annotate 'line', 0
.lex "$_", param_264
-.annotate 'line', 575
find_lex $P265, "$_"
find_lex $P266, "%capnames"
unless_null $P266, vivify_114
@@ -9274,28 +9195,23 @@
store_lex "%capnames", $P275
vivify_118:
set $P275[$P274], $P273
-.annotate 'line', 574
.return ($P273)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block180" :anon :subid("19_1283368202.55748") :outer("13_1283368202.55748")
-.annotate 'line', 549
- .const 'Sub' $P199 = "20_1283368202.55748"
+.sub "_block180" :anon :subid("19_1283975944.26638") :outer("13_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P199 = "20_1283975944.26638"
capture_lex $P199
-.annotate 'line', 550
new $P182, "Undef"
.lex "$name", $P182
-.annotate 'line', 552
$P183 = root_new ['parrot';'ResizablePMCArray']
.lex "@names", $P183
-.annotate 'line', 550
find_lex $P184, "$ast"
$P185 = $P184."name"()
store_lex "$name", $P185
-.annotate 'line', 551
find_lex $P187, "$name"
set $S188, $P187
iseq $I189, $S188, ""
@@ -9306,14 +9222,12 @@
find_lex $P192, "$name"
$P191."name"($P192)
if_186_end:
-.annotate 'line', 552
$P0 = find_lex '$name'
$S0 = $P0
$P193 = split '=', $S0
store_lex "@names", $P193
-.annotate 'line', 557
find_lex $P195, "@names"
defined $I196, $P195
unless $I196, for_undef_121
@@ -9326,7 +9240,7 @@
unless $P194, loop215_done
shift $P197, $P194
loop215_redo:
- .const 'Sub' $P199 = "20_1283368202.55748"
+ .const 'Sub' $P199 = "20_1283975944.26638"
capture_lex $P199
$P199($P197)
loop215_next:
@@ -9340,17 +9254,15 @@
loop215_done:
pop_eh
for_undef_121:
-.annotate 'line', 549
.return ($P194)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block198" :anon :subid("20_1283368202.55748") :outer("19_1283368202.55748")
+.sub "_block198" :anon :subid("20_1283975944.26638") :outer("19_1283975944.26638")
.param pmc param_200
-.annotate 'line', 557
+.annotate 'line', 0
.lex "$_", param_200
-.annotate 'line', 558
find_lex $P204, "$_"
set $S205, $P204
iseq $I206, $S205, "0"
@@ -9370,7 +9282,6 @@
add $P211, $P210, 1
store_lex "$count", $P211
if_201_end:
-.annotate 'line', 559
new $P212, "Integer"
assign $P212, 1
find_lex $P213, "$_"
@@ -9380,19 +9291,17 @@
store_lex "%capnames", $P214
vivify_122:
set $P214[$P213], $P212
-.annotate 'line', 557
.return ($P212)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block138" :anon :subid("17_1283368202.55748") :outer("13_1283368202.55748")
+.sub "_block138" :anon :subid("17_1283975944.26638") :outer("13_1283975944.26638")
.param pmc param_141
-.annotate 'line', 541
- .const 'Sub' $P150 = "18_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P150 = "18_1283975944.26638"
capture_lex $P150
-.annotate 'line', 542
$P140 = root_new ['parrot';'Hash']
.lex "%x", $P140
.lex "$_", param_141
@@ -9400,7 +9309,6 @@
find_lex $P143, "$count"
$P144 = "capnames"($P142, $P143)
store_lex "%x", $P144
-.annotate 'line', 543
find_lex $P146, "%x"
defined $I147, $P146
unless $I147, for_undef_124
@@ -9413,7 +9321,7 @@
unless $P145, loop163_done
shift $P148, $P145
loop163_redo:
- .const 'Sub' $P150 = "18_1283368202.55748"
+ .const 'Sub' $P150 = "18_1283975944.26638"
capture_lex $P150
$P150($P148)
loop163_next:
@@ -9427,7 +9335,6 @@
loop163_done:
pop_eh
for_undef_124:
-.annotate 'line', 546
find_lex $P166, "%x"
unless_null $P166, vivify_130
$P166 = root_new ['parrot';'Hash']
@@ -9437,17 +9344,15 @@
new $P167, "Undef"
vivify_131:
store_lex "$count", $P167
-.annotate 'line', 541
.return ($P167)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block149" :anon :subid("18_1283368202.55748") :outer("17_1283368202.55748")
+.sub "_block149" :anon :subid("18_1283975944.26638") :outer("17_1283975944.26638")
.param pmc param_151
-.annotate 'line', 543
+.annotate 'line', 0
.lex "$_", param_151
-.annotate 'line', 544
find_lex $P152, "$_"
find_lex $P153, "%capnames"
unless_null $P153, vivify_125
@@ -9477,23 +9382,20 @@
store_lex "%capnames", $P162
vivify_129:
set $P162[$P161], $P160
-.annotate 'line', 543
.return ($P160)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block71" :anon :subid("14_1283368202.55748") :outer("13_1283368202.55748")
-.annotate 'line', 527
- .const 'Sub' $P81 = "15_1283368202.55748"
+.sub "_block71" :anon :subid("14_1283975944.26638") :outer("13_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P81 = "15_1283975944.26638"
capture_lex $P81
-.annotate 'line', 528
new $P73, "Undef"
.lex "$max", $P73
find_lex $P74, "$count"
store_lex "$max", $P74
-.annotate 'line', 529
find_lex $P76, "$ast"
$P77 = $P76."list"()
defined $I78, $P77
@@ -9507,7 +9409,7 @@
unless $P75, loop125_done
shift $P79, $P75
loop125_redo:
- .const 'Sub' $P81 = "15_1283368202.55748"
+ .const 'Sub' $P81 = "15_1283975944.26638"
capture_lex $P81
$P81($P79)
loop125_next:
@@ -9521,22 +9423,19 @@
loop125_done:
pop_eh
for_undef_132:
-.annotate 'line', 538
find_lex $P128, "$max"
store_lex "$count", $P128
-.annotate 'line', 527
.return ($P128)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block80" :anon :subid("15_1283368202.55748") :outer("14_1283368202.55748")
+.sub "_block80" :anon :subid("15_1283975944.26638") :outer("14_1283975944.26638")
.param pmc param_83
-.annotate 'line', 529
- .const 'Sub' $P92 = "16_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P92 = "16_1283975944.26638"
capture_lex $P92
-.annotate 'line', 530
$P82 = root_new ['parrot';'Hash']
.lex "%x", $P82
.lex "$_", param_83
@@ -9544,7 +9443,6 @@
find_lex $P85, "$count"
$P86 = "capnames"($P84, $P85)
store_lex "%x", $P86
-.annotate 'line', 531
find_lex $P88, "%x"
defined $I89, $P88
unless $I89, for_undef_133
@@ -9557,7 +9455,7 @@
unless $P87, loop112_done
shift $P90, $P87
loop112_redo:
- .const 'Sub' $P92 = "16_1283368202.55748"
+ .const 'Sub' $P92 = "16_1283975944.26638"
capture_lex $P92
$P92($P90)
loop112_next:
@@ -9571,7 +9469,6 @@
loop112_done:
pop_eh
for_undef_133:
-.annotate 'line', 536
find_lex $P117, "%x"
unless_null $P117, vivify_139
$P117 = root_new ['parrot';'Hash']
@@ -9600,17 +9497,15 @@
store_lex "$max", $P124
set $P115, $P124
if_116_end:
-.annotate 'line', 529
.return ($P115)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block91" :anon :subid("16_1283368202.55748") :outer("15_1283368202.55748")
+.sub "_block91" :anon :subid("16_1283975944.26638") :outer("15_1283975944.26638")
.param pmc param_93
-.annotate 'line', 531
+.annotate 'line', 0
.lex "$_", param_93
-.annotate 'line', 532
find_lex $P98, "$_"
find_lex $P99, "%capnames"
unless_null $P99, vivify_134
@@ -9651,7 +9546,6 @@
assign $P108, 1
set $P94, $P108
if_95_end:
-.annotate 'line', 533
find_lex $P110, "$_"
find_lex $P111, "%capnames"
unless_null $P111, vivify_138
@@ -9659,29 +9553,26 @@
store_lex "%capnames", $P111
vivify_138:
set $P111[$P110], $P94
-.annotate 'line', 531
.return ($P94)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backmod" :subid("26_1283368202.55748") :outer("11_1283368202.55748")
+.sub "backmod" :subid("26_1283975944.26638") :outer("11_1283975944.26638")
.param pmc param_315
.param pmc param_316
-.annotate 'line', 590
+.annotate 'line', 0
new $P314, 'ExceptionHandler'
set_addr $P314, control_313
$P314."handle_types"(.CONTROL_RETURN)
push_eh $P314
.lex "$ast", param_315
.lex "$backmod", param_316
-.annotate 'line', 591
find_lex $P318, "$backmod"
set $S319, $P318
iseq $I320, $S319, ":"
if $I320, if_317
-.annotate 'line', 592
find_lex $P325, "$backmod"
set $S326, $P325
iseq $I327, $S326, ":?"
@@ -9697,7 +9588,6 @@
set $P323, $I330
unless_324_end:
if $P323, if_322
-.annotate 'line', 593
find_lex $P335, "$backmod"
set $S336, $P335
iseq $I337, $S336, ":!"
@@ -9718,18 +9608,15 @@
if_332_end:
goto if_322_end
if_322:
-.annotate 'line', 592
find_lex $P331, "$ast"
$P331."backtrack"("f")
if_322_end:
goto if_317_end
if_317:
-.annotate 'line', 591
find_lex $P321, "$ast"
$P321."backtrack"("r")
if_317_end:
find_lex $P342, "$ast"
-.annotate 'line', 590
.return ($P342)
control_313:
.local pmc exception
@@ -9741,16 +9628,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "arg" :subid("27_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "arg" :subid("27_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_349
-.annotate 'line', 14
+.annotate 'line', 0
new $P348, 'ExceptionHandler'
set_addr $P348, control_347
$P348."handle_types"(.CONTROL_RETURN)
push_eh $P348
.lex "self", self
.lex "$/", param_349
-.annotate 'line', 15
find_lex $P350, "$/"
find_lex $P353, "$/"
unless_null $P353, vivify_144
@@ -9786,7 +9672,6 @@
set $P351, $P357
if_352_end:
$P361 = $P350."!make"($P351)
-.annotate 'line', 14
.return ($P361)
control_347:
.local pmc exception
@@ -9798,10 +9683,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "arglist" :subid("28_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "arglist" :subid("28_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_366
-.annotate 'line', 18
- .const 'Sub' $P376 = "29_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P376 = "29_1283975944.26638"
capture_lex $P376
new $P365, 'ExceptionHandler'
set_addr $P365, control_364
@@ -9809,13 +9694,11 @@
push_eh $P365
.lex "self", self
.lex "$/", param_366
-.annotate 'line', 19
new $P367, "Undef"
.lex "$past", $P367
get_hll_global $P368, ["PAST"], "Op"
$P369 = $P368."new"("list" :named("pasttype"))
store_lex "$past", $P369
-.annotate 'line', 20
find_lex $P371, "$/"
unless_null $P371, vivify_150
$P371 = root_new ['parrot';'Hash']
@@ -9835,7 +9718,7 @@
unless $P370, loop382_done
shift $P374, $P370
loop382_redo:
- .const 'Sub' $P376 = "29_1283368202.55748"
+ .const 'Sub' $P376 = "29_1283975944.26638"
capture_lex $P376
$P376($P374)
loop382_next:
@@ -9849,11 +9732,9 @@
loop382_done:
pop_eh
for_undef_152:
-.annotate 'line', 21
find_lex $P385, "$/"
find_lex $P386, "$past"
$P387 = $P385."!make"($P386)
-.annotate 'line', 18
.return ($P387)
control_364:
.local pmc exception
@@ -9864,9 +9745,9 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block375" :anon :subid("29_1283368202.55748") :outer("28_1283368202.55748")
+.sub "_block375" :anon :subid("29_1283975944.26638") :outer("28_1283975944.26638")
.param pmc param_377
-.annotate 'line', 20
+.annotate 'line', 0
.lex "$_", param_377
find_lex $P378, "$past"
find_lex $P379, "$_"
@@ -9878,16 +9759,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "TOP" :subid("30_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "TOP" :subid("30_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_392
-.annotate 'line', 24
+.annotate 'line', 0
new $P391, 'ExceptionHandler'
set_addr $P391, control_390
$P391."handle_types"(.CONTROL_RETURN)
push_eh $P391
.lex "self", self
.lex "$/", param_392
-.annotate 'line', 25
new $P393, "Undef"
.lex "$past", $P393
find_lex $P394, "$/"
@@ -9901,15 +9781,12 @@
$P396 = $P395."ast"()
$P397 = "buildsub"($P396)
store_lex "$past", $P397
-.annotate 'line', 26
find_lex $P398, "$past"
find_lex $P399, "$/"
$P398."node"($P399)
-.annotate 'line', 27
find_lex $P400, "$/"
find_lex $P401, "$past"
$P402 = $P400."!make"($P401)
-.annotate 'line', 24
.return ($P402)
control_390:
.local pmc exception
@@ -9921,14 +9798,14 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "nibbler" :subid("31_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "nibbler" :subid("31_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_407
.param pmc param_408 :optional
.param int has_param_408 :opt_flag
-.annotate 'line', 30
- .const 'Sub' $P443 = "33_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P443 = "33_1283975944.26638"
capture_lex $P443
- .const 'Sub' $P416 = "32_1283368202.55748"
+ .const 'Sub' $P416 = "32_1283975944.26638"
capture_lex $P416
new $P406, 'ExceptionHandler'
set_addr $P406, control_405
@@ -9941,23 +9818,19 @@
set param_408, $P409
optparam_155:
.lex "$key", param_408
-.annotate 'line', 39
new $P410, "Undef"
.lex "$past", $P410
-.annotate 'line', 31
find_lex $P412, "$key"
set $S413, $P412
iseq $I414, $S413, "open"
unless $I414, if_411_end
- .const 'Sub' $P416 = "32_1283368202.55748"
+ .const 'Sub' $P416 = "32_1283975944.26638"
capture_lex $P416
$P416()
if_411_end:
-.annotate 'line', 38
get_global $P427, "@MODIFIERS"
$P427."shift"()
find_lex $P428, "$past"
-.annotate 'line', 40
find_lex $P430, "$/"
unless_null $P430, vivify_158
$P430 = root_new ['parrot';'Hash']
@@ -9969,7 +9842,6 @@
set $N432, $P431
isgt $I433, $N432, 1.0
if $I433, if_429
-.annotate 'line', 47
find_lex $P452, "$/"
unless_null $P452, vivify_160
$P452 = root_new ['parrot';'Hash']
@@ -9984,15 +9856,12 @@
vivify_162:
$P455 = $P454."ast"()
store_lex "$past", $P455
-.annotate 'line', 46
goto if_429_end
if_429:
-.annotate 'line', 41
get_hll_global $P434, ["PAST"], "Regex"
find_lex $P435, "$/"
$P436 = $P434."new"("alt" :named("pasttype"), $P435 :named("node"))
store_lex "$past", $P436
-.annotate 'line', 42
find_lex $P438, "$/"
unless_null $P438, vivify_163
$P438 = root_new ['parrot';'Hash']
@@ -10012,7 +9881,7 @@
unless $P437, loop449_done
shift $P441, $P437
loop449_redo:
- .const 'Sub' $P443 = "33_1283368202.55748"
+ .const 'Sub' $P443 = "33_1283975944.26638"
capture_lex $P443
$P443($P441)
loop449_next:
@@ -10027,11 +9896,9 @@
pop_eh
for_undef_165:
if_429_end:
-.annotate 'line', 49
find_lex $P456, "$/"
find_lex $P457, "$past"
$P458 = $P456."!make"($P457)
-.annotate 'line', 30
.return ($P458)
control_405:
.local pmc exception
@@ -10043,14 +9910,12 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "_block415" :anon :subid("32_1283368202.55748") :outer("31_1283368202.55748")
-.annotate 'line', 32
+.sub "_block415" :anon :subid("32_1283975944.26638") :outer("31_1283975944.26638")
+.annotate 'line', 0
$P417 = root_new ['parrot';'Hash']
.lex "%old", $P417
-.annotate 'line', 33
$P418 = root_new ['parrot';'Hash']
.lex "%new", $P418
-.annotate 'line', 32
get_global $P419, "@MODIFIERS"
unless_null $P419, vivify_156
$P419 = root_new ['parrot';'ResizablePMCArray']
@@ -10060,47 +9925,41 @@
new $P420, "Undef"
vivify_157:
store_lex "%old", $P420
-.annotate 'line', 33
find_lex $P421, "%old"
clone $P422, $P421
store_lex "%new", $P422
-.annotate 'line', 34
get_global $P423, "@MODIFIERS"
find_lex $P424, "%new"
$P423."unshift"($P424)
-.annotate 'line', 35
new $P425, "Exception"
set $P425['type'], .CONTROL_RETURN
new $P426, "Integer"
assign $P426, 1
setattribute $P425, 'payload', $P426
throw $P425
-.annotate 'line', 31
.return ()
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block442" :anon :subid("33_1283368202.55748") :outer("31_1283368202.55748")
+.sub "_block442" :anon :subid("33_1283975944.26638") :outer("31_1283975944.26638")
.param pmc param_444
-.annotate 'line', 42
+.annotate 'line', 0
.lex "$_", param_444
-.annotate 'line', 43
find_lex $P445, "$past"
find_lex $P446, "$_"
$P447 = $P446."ast"()
$P448 = $P445."push"($P447)
-.annotate 'line', 42
.return ($P448)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "termconj" :subid("34_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "termconj" :subid("34_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_463
-.annotate 'line', 52
- .const 'Sub' $P480 = "35_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P480 = "35_1283975944.26638"
capture_lex $P480
new $P462, 'ExceptionHandler'
set_addr $P462, control_461
@@ -10108,12 +9967,9 @@
push_eh $P462
.lex "self", self
.lex "$/", param_463
-.annotate 'line', 53
new $P464, "Undef"
.lex "$past", $P464
-.annotate 'line', 52
find_lex $P465, "$past"
-.annotate 'line', 54
find_lex $P467, "$/"
unless_null $P467, vivify_166
$P467 = root_new ['parrot';'Hash']
@@ -10125,7 +9981,6 @@
set $N469, $P468
isgt $I470, $N469, 1.0
if $I470, if_466
-.annotate 'line', 61
find_lex $P489, "$/"
unless_null $P489, vivify_168
$P489 = root_new ['parrot';'Hash']
@@ -10140,15 +9995,12 @@
vivify_170:
$P492 = $P491."ast"()
store_lex "$past", $P492
-.annotate 'line', 60
goto if_466_end
if_466:
-.annotate 'line', 55
get_hll_global $P471, ["PAST"], "Regex"
find_lex $P472, "$/"
$P473 = $P471."new"("conj" :named("pasttype"), $P472 :named("node"))
store_lex "$past", $P473
-.annotate 'line', 56
find_lex $P475, "$/"
unless_null $P475, vivify_171
$P475 = root_new ['parrot';'Hash']
@@ -10168,7 +10020,7 @@
unless $P474, loop486_done
shift $P478, $P474
loop486_redo:
- .const 'Sub' $P480 = "35_1283368202.55748"
+ .const 'Sub' $P480 = "35_1283975944.26638"
capture_lex $P480
$P480($P478)
loop486_next:
@@ -10183,11 +10035,9 @@
pop_eh
for_undef_173:
if_466_end:
-.annotate 'line', 63
find_lex $P493, "$/"
find_lex $P494, "$past"
$P495 = $P493."!make"($P494)
-.annotate 'line', 52
.return ($P495)
control_461:
.local pmc exception
@@ -10198,26 +10048,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block479" :anon :subid("35_1283368202.55748") :outer("34_1283368202.55748")
+.sub "_block479" :anon :subid("35_1283975944.26638") :outer("34_1283975944.26638")
.param pmc param_481
-.annotate 'line', 56
+.annotate 'line', 0
.lex "$_", param_481
-.annotate 'line', 57
find_lex $P482, "$past"
find_lex $P483, "$_"
$P484 = $P483."ast"()
$P485 = $P482."push"($P484)
-.annotate 'line', 56
.return ($P485)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "termish" :subid("36_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "termish" :subid("36_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_500
-.annotate 'line', 66
- .const 'Sub' $P513 = "37_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P513 = "37_1283975944.26638"
capture_lex $P513
new $P499, 'ExceptionHandler'
set_addr $P499, control_498
@@ -10225,22 +10073,17 @@
push_eh $P499
.lex "self", self
.lex "$/", param_500
-.annotate 'line', 67
new $P501, "Undef"
.lex "$past", $P501
-.annotate 'line', 68
new $P502, "Undef"
.lex "$lastlit", $P502
-.annotate 'line', 67
get_hll_global $P503, ["PAST"], "Regex"
find_lex $P504, "$/"
$P505 = $P503."new"("concat" :named("pasttype"), $P504 :named("node"))
store_lex "$past", $P505
-.annotate 'line', 68
new $P506, "Integer"
assign $P506, 0
store_lex "$lastlit", $P506
-.annotate 'line', 69
find_lex $P508, "$/"
unless_null $P508, vivify_174
$P508 = root_new ['parrot';'Hash']
@@ -10260,7 +10103,7 @@
unless $P507, loop558_done
shift $P511, $P507
loop558_redo:
- .const 'Sub' $P513 = "37_1283368202.55748"
+ .const 'Sub' $P513 = "37_1283975944.26638"
capture_lex $P513
$P513($P511)
loop558_next:
@@ -10274,11 +10117,9 @@
loop558_done:
pop_eh
for_undef_176:
-.annotate 'line', 84
find_lex $P561, "$/"
find_lex $P562, "$past"
$P563 = $P561."!make"($P562)
-.annotate 'line', 66
.return ($P563)
control_498:
.local pmc exception
@@ -10289,22 +10130,20 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block512" :anon :subid("37_1283368202.55748") :outer("36_1283368202.55748")
+.sub "_block512" :anon :subid("37_1283975944.26638") :outer("36_1283975944.26638")
.param pmc param_515
-.annotate 'line', 70
+.annotate 'line', 0
new $P514, "Undef"
.lex "$ast", $P514
.lex "$_", param_515
find_lex $P516, "$_"
$P517 = $P516."ast"()
store_lex "$ast", $P517
-.annotate 'line', 71
find_lex $P520, "$ast"
if $P520, if_519
set $P518, $P520
goto if_519_end
if_519:
-.annotate 'line', 72
find_lex $P527, "$lastlit"
if $P527, if_526
set $P525, $P527
@@ -10320,7 +10159,6 @@
set $P523, $P525
goto if_524_end
if_524:
-.annotate 'line', 73
get_hll_global $P531, ["PAST"], "Node"
find_lex $P532, "$ast"
unless_null $P532, vivify_177
@@ -10336,11 +10174,9 @@
set $P523, $I535
if_524_end:
if $P523, if_522
-.annotate 'line', 77
find_lex $P542, "$past"
find_lex $P543, "$ast"
$P542."push"($P543)
-.annotate 'line', 78
find_lex $P548, "$ast"
$S549 = $P548."pasttype"()
iseq $I550, $S549, "literal"
@@ -10349,7 +10185,6 @@
set $P546, $I550
goto if_547_end
if_547:
-.annotate 'line', 79
get_hll_global $P551, ["PAST"], "Node"
find_lex $P552, "$ast"
unless_null $P552, vivify_179
@@ -10373,14 +10208,10 @@
find_lex $P556, "$ast"
set $P544, $P556
if_545_end:
-.annotate 'line', 80
store_lex "$lastlit", $P544
-.annotate 'line', 76
set $P521, $P544
-.annotate 'line', 73
goto if_522_end
if_522:
-.annotate 'line', 74
find_lex $P536, "$lastlit"
unless_null $P536, vivify_181
$P536 = root_new ['parrot';'ResizablePMCArray']
@@ -10404,23 +10235,20 @@
store_lex "$lastlit", $P541
vivify_185:
set $P541[0], $P540
-.annotate 'line', 73
set $P521, $P540
if_522_end:
-.annotate 'line', 71
set $P518, $P521
if_519_end:
-.annotate 'line', 69
.return ($P518)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "quantified_atom" :subid("38_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "quantified_atom" :subid("38_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_568
-.annotate 'line', 87
- .const 'Sub' $P577 = "39_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P577 = "39_1283975944.26638"
capture_lex $P577
new $P567, 'ExceptionHandler'
set_addr $P567, control_566
@@ -10428,7 +10256,6 @@
push_eh $P567
.lex "self", self
.lex "$/", param_568
-.annotate 'line', 88
new $P569, "Undef"
.lex "$past", $P569
find_lex $P570, "$/"
@@ -10441,7 +10268,6 @@
vivify_187:
$P572 = $P571."ast"()
store_lex "$past", $P572
-.annotate 'line', 89
find_lex $P574, "$/"
unless_null $P574, vivify_188
$P574 = root_new ['parrot';'Hash']
@@ -10451,7 +10277,6 @@
new $P575, "Undef"
vivify_189:
if $P575, if_573
-.annotate 'line', 95
find_lex $P592, "$/"
unless_null $P592, vivify_190
$P592 = root_new ['parrot';'Hash']
@@ -10482,12 +10307,10 @@
if_591_end:
goto if_573_end
if_573:
-.annotate 'line', 89
- .const 'Sub' $P577 = "39_1283368202.55748"
+ .const 'Sub' $P577 = "39_1283975944.26638"
capture_lex $P577
$P577()
if_573_end:
-.annotate 'line', 96
find_lex $P604, "$past"
if $P604, if_603
set $P602, $P604
@@ -10518,15 +10341,12 @@
set $P600, $P610
if_601_end:
unless $P600, if_599_end
-.annotate 'line', 97
find_lex $P611, "$past"
$P611."backtrack"("r")
if_599_end:
-.annotate 'line', 99
find_lex $P612, "$/"
find_lex $P613, "$past"
$P614 = $P612."!make"($P613)
-.annotate 'line', 87
.return ($P614)
control_566:
.local pmc exception
@@ -10537,11 +10357,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block576" :anon :subid("39_1283368202.55748") :outer("38_1283368202.55748")
-.annotate 'line', 91
+.sub "_block576" :anon :subid("39_1283975944.26638") :outer("38_1283975944.26638")
+.annotate 'line', 0
new $P578, "Undef"
.lex "$qast", $P578
-.annotate 'line', 90
find_lex $P580, "$past"
isfalse $I581, $P580
unless $I581, if_579_end
@@ -10549,7 +10368,6 @@
$P583 = $P582."CURSOR"()
$P583."panic"("Quantifier follows nothing")
if_579_end:
-.annotate 'line', 91
find_lex $P584, "$/"
unless_null $P584, vivify_196
$P584 = root_new ['parrot';'Hash']
@@ -10564,35 +10382,29 @@
vivify_198:
$P587 = $P586."ast"()
store_lex "$qast", $P587
-.annotate 'line', 92
find_lex $P588, "$qast"
find_lex $P589, "$past"
$P588."unshift"($P589)
-.annotate 'line', 93
find_lex $P590, "$qast"
store_lex "$past", $P590
-.annotate 'line', 89
.return ($P590)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "atom" :subid("40_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "atom" :subid("40_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_619
-.annotate 'line', 102
+.annotate 'line', 0
new $P618, 'ExceptionHandler'
set_addr $P618, control_617
$P618."handle_types"(.CONTROL_RETURN)
push_eh $P618
.lex "self", self
.lex "$/", param_619
-.annotate 'line', 103
new $P620, "Undef"
.lex "$past", $P620
-.annotate 'line', 102
find_lex $P621, "$past"
-.annotate 'line', 104
find_lex $P623, "$/"
unless_null $P623, vivify_202
$P623 = root_new ['parrot';'Hash']
@@ -10602,14 +10414,12 @@
new $P624, "Undef"
vivify_203:
if $P624, if_622
-.annotate 'line', 106
get_hll_global $P628, ["PAST"], "Regex"
find_lex $P629, "$/"
set $S630, $P629
find_lex $P631, "$/"
$P632 = $P628."new"($S630, "literal" :named("pasttype"), $P631 :named("node"))
store_lex "$past", $P632
-.annotate 'line', 107
get_global $P634, "@MODIFIERS"
unless_null $P634, vivify_204
$P634 = root_new ['parrot';'ResizablePMCArray']
@@ -10626,10 +10436,8 @@
find_lex $P637, "$past"
$P637."subtype"("ignorecase")
if_633_end:
-.annotate 'line', 105
goto if_622_end
if_622:
-.annotate 'line', 104
find_lex $P625, "$/"
unless_null $P625, vivify_207
$P625 = root_new ['parrot';'Hash']
@@ -10641,11 +10449,9 @@
$P627 = $P626."ast"()
store_lex "$past", $P627
if_622_end:
-.annotate 'line', 109
find_lex $P638, "$/"
find_lex $P639, "$past"
$P640 = $P638."!make"($P639)
-.annotate 'line', 102
.return ($P640)
control_617:
.local pmc exception
@@ -10657,23 +10463,21 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "quantifier:sym<*>" :subid("41_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "quantifier:sym<*>" :subid("41_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_645
-.annotate 'line', 112
+.annotate 'line', 0
new $P644, 'ExceptionHandler'
set_addr $P644, control_643
$P644."handle_types"(.CONTROL_RETURN)
push_eh $P644
.lex "self", self
.lex "$/", param_645
-.annotate 'line', 113
new $P646, "Undef"
.lex "$past", $P646
get_hll_global $P647, ["PAST"], "Regex"
find_lex $P648, "$/"
$P649 = $P647."new"("quant" :named("pasttype"), $P648 :named("node"))
store_lex "$past", $P649
-.annotate 'line', 114
find_lex $P650, "$/"
find_lex $P651, "$past"
find_lex $P652, "$/"
@@ -10686,7 +10490,6 @@
vivify_210:
$P654 = "backmod"($P651, $P653)
$P655 = $P650."!make"($P654)
-.annotate 'line', 112
.return ($P655)
control_643:
.local pmc exception
@@ -10698,23 +10501,21 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "quantifier:sym<+>" :subid("42_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "quantifier:sym<+>" :subid("42_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_660
-.annotate 'line', 117
+.annotate 'line', 0
new $P659, 'ExceptionHandler'
set_addr $P659, control_658
$P659."handle_types"(.CONTROL_RETURN)
push_eh $P659
.lex "self", self
.lex "$/", param_660
-.annotate 'line', 118
new $P661, "Undef"
.lex "$past", $P661
get_hll_global $P662, ["PAST"], "Regex"
find_lex $P663, "$/"
$P664 = $P662."new"("quant" :named("pasttype"), 1 :named("min"), $P663 :named("node"))
store_lex "$past", $P664
-.annotate 'line', 119
find_lex $P665, "$/"
find_lex $P666, "$past"
find_lex $P667, "$/"
@@ -10727,7 +10528,6 @@
vivify_212:
$P669 = "backmod"($P666, $P668)
$P670 = $P665."!make"($P669)
-.annotate 'line', 117
.return ($P670)
control_658:
.local pmc exception
@@ -10739,23 +10539,21 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "quantifier:sym<?>" :subid("43_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "quantifier:sym<?>" :subid("43_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_675
-.annotate 'line', 122
+.annotate 'line', 0
new $P674, 'ExceptionHandler'
set_addr $P674, control_673
$P674."handle_types"(.CONTROL_RETURN)
push_eh $P674
.lex "self", self
.lex "$/", param_675
-.annotate 'line', 123
new $P676, "Undef"
.lex "$past", $P676
get_hll_global $P677, ["PAST"], "Regex"
find_lex $P678, "$/"
$P679 = $P677."new"("quant" :named("pasttype"), 0 :named("min"), 1 :named("max"), $P678 :named("node"))
store_lex "$past", $P679
-.annotate 'line', 124
find_lex $P680, "$/"
find_lex $P681, "$past"
find_lex $P682, "$/"
@@ -10768,11 +10566,9 @@
vivify_214:
$P684 = "backmod"($P681, $P683)
$P680."!make"($P684)
-.annotate 'line', 125
find_lex $P685, "$/"
find_lex $P686, "$past"
$P687 = $P685."!make"($P686)
-.annotate 'line', 122
.return ($P687)
control_673:
.local pmc exception
@@ -10784,10 +10580,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "quantifier:sym<**>" :subid("44_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "quantifier:sym<**>" :subid("44_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_692
-.annotate 'line', 128
- .const 'Sub' $P707 = "45_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P707 = "45_1283975944.26638"
capture_lex $P707
new $P691, 'ExceptionHandler'
set_addr $P691, control_690
@@ -10795,15 +10591,11 @@
push_eh $P691
.lex "self", self
.lex "$/", param_692
-.annotate 'line', 129
new $P693, "Undef"
.lex "$past", $P693
-.annotate 'line', 130
new $P694, "Undef"
.lex "$ws", $P694
-.annotate 'line', 128
find_lex $P695, "$past"
-.annotate 'line', 130
find_lex $P698, "$/"
unless_null $P698, vivify_215
$P698 = root_new ['parrot';'Hash']
@@ -10831,7 +10623,6 @@
set $P696, $P702
if_697_end:
store_lex "$ws", $P696
-.annotate 'line', 131
find_lex $P704, "$/"
unless_null $P704, vivify_220
$P704 = root_new ['parrot';'Hash']
@@ -10841,7 +10632,6 @@
new $P705, "Undef"
vivify_221:
if $P705, if_703
-.annotate 'line', 147
get_hll_global $P725, ["PAST"], "Regex"
find_lex $P726, "$/"
unless_null $P726, vivify_222
@@ -10855,7 +10645,6 @@
find_lex $P729, "$/"
$P730 = $P725."new"("quant" :named("pasttype"), $N728 :named("min"), $P729 :named("node"))
store_lex "$past", $P730
-.annotate 'line', 148
find_lex $P732, "$/"
unless_null $P732, vivify_224
$P732 = root_new ['parrot';'Hash']
@@ -10866,7 +10655,6 @@
vivify_225:
isfalse $I734, $P733
if $I734, if_731
-.annotate 'line', 149
find_lex $P740, "$/"
unless_null $P740, vivify_226
$P740 = root_new ['parrot';'Hash']
@@ -10900,7 +10688,6 @@
if_739_end:
goto if_731_end
if_731:
-.annotate 'line', 148
find_lex $P735, "$past"
find_lex $P736, "$/"
unless_null $P736, vivify_232
@@ -10913,7 +10700,6 @@
set $N738, $P737
$P735."max"($N738)
if_731_end:
-.annotate 'line', 150
find_lex $P751, "$ws"
unless $P751, if_750_end
find_lex $P752, "$past"
@@ -10921,15 +10707,12 @@
$P754 = $P753."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype"))
$P752."sep"($P754)
if_750_end:
-.annotate 'line', 146
goto if_703_end
if_703:
-.annotate 'line', 131
- .const 'Sub' $P707 = "45_1283368202.55748"
+ .const 'Sub' $P707 = "45_1283975944.26638"
capture_lex $P707
$P707()
if_703_end:
-.annotate 'line', 154
find_lex $P755, "$/"
find_lex $P756, "$past"
find_lex $P757, "$/"
@@ -10942,7 +10725,6 @@
vivify_237:
$P759 = "backmod"($P756, $P758)
$P760 = $P755."!make"($P759)
-.annotate 'line', 128
.return ($P760)
control_690:
.local pmc exception
@@ -10953,8 +10735,8 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block706" :anon :subid("45_1283368202.55748") :outer("44_1283368202.55748")
-.annotate 'line', 132
+.sub "_block706" :anon :subid("45_1283975944.26638") :outer("44_1283975944.26638")
+.annotate 'line', 0
new $P708, "Undef"
.lex "$ast", $P708
find_lex $P709, "$/"
@@ -10967,48 +10749,39 @@
vivify_235:
$P711 = $P710."ast"()
store_lex "$ast", $P711
-.annotate 'line', 133
find_lex $P713, "$ws"
unless $P713, if_712_end
-.annotate 'line', 134
get_hll_global $P714, ["PAST"], "Regex"
-.annotate 'line', 136
get_hll_global $P715, ["PAST"], "Regex"
$P716 = $P715."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype"))
find_lex $P717, "$ast"
-.annotate 'line', 139
get_hll_global $P718, ["PAST"], "Regex"
$P719 = $P718."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype"))
$P720 = $P714."new"($P716, $P717, $P719, "concat" :named("pasttype"))
-.annotate 'line', 134
store_lex "$ast", $P720
if_712_end:
-.annotate 'line', 143
get_hll_global $P721, ["PAST"], "Regex"
find_lex $P722, "$ast"
find_lex $P723, "$/"
$P724 = $P721."new"("quant" :named("pasttype"), 1 :named("min"), $P722 :named("sep"), $P723 :named("node"))
store_lex "$past", $P724
-.annotate 'line', 131
.return ($P724)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<ws>" :subid("46_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<ws>" :subid("46_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_765
-.annotate 'line', 157
+.annotate 'line', 0
new $P764, 'ExceptionHandler'
set_addr $P764, control_763
$P764."handle_types"(.CONTROL_RETURN)
push_eh $P764
.lex "self", self
.lex "$/", param_765
-.annotate 'line', 158
new $P766, "Undef"
.lex "$past", $P766
-.annotate 'line', 159
get_global $P769, "@MODIFIERS"
unless_null $P769, vivify_238
$P769 = root_new ['parrot';'ResizablePMCArray']
@@ -11033,11 +10806,9 @@
set $P767, $P774
if_768_end:
store_lex "$past", $P767
-.annotate 'line', 162
find_lex $P776, "$/"
find_lex $P777, "$past"
$P778 = $P776."!make"($P777)
-.annotate 'line', 157
.return ($P778)
control_763:
.local pmc exception
@@ -11049,16 +10820,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<[ ]>" :subid("47_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<[ ]>" :subid("47_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_783
-.annotate 'line', 166
+.annotate 'line', 0
new $P782, 'ExceptionHandler'
set_addr $P782, control_781
$P782."handle_types"(.CONTROL_RETURN)
push_eh $P782
.lex "self", self
.lex "$/", param_783
-.annotate 'line', 167
find_lex $P784, "$/"
find_lex $P785, "$/"
unless_null $P785, vivify_241
@@ -11070,7 +10840,6 @@
vivify_242:
$P787 = $P786."ast"()
$P788 = $P784."!make"($P787)
-.annotate 'line', 166
.return ($P788)
control_781:
.local pmc exception
@@ -11082,22 +10851,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<( )>" :subid("48_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<( )>" :subid("48_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_793
-.annotate 'line', 170
+.annotate 'line', 0
new $P792, 'ExceptionHandler'
set_addr $P792, control_791
$P792."handle_types"(.CONTROL_RETURN)
push_eh $P792
.lex "self", self
.lex "$/", param_793
-.annotate 'line', 171
new $P794, "Undef"
.lex "$subpast", $P794
-.annotate 'line', 172
new $P795, "Undef"
.lex "$past", $P795
-.annotate 'line', 171
find_lex $P796, "$/"
unless_null $P796, vivify_243
$P796 = root_new ['parrot';'Hash']
@@ -11109,17 +10875,14 @@
$P798 = $P797."ast"()
$P799 = "buildsub"($P798)
store_lex "$subpast", $P799
-.annotate 'line', 172
get_hll_global $P800, ["PAST"], "Regex"
find_lex $P801, "$subpast"
find_lex $P802, "$/"
$P803 = $P800."new"($P801, "subrule" :named("pasttype"), "capture" :named("subtype"), $P802 :named("node"))
store_lex "$past", $P803
-.annotate 'line', 174
find_lex $P804, "$/"
find_lex $P805, "$past"
$P806 = $P804."!make"($P805)
-.annotate 'line', 170
.return ($P806)
control_791:
.local pmc exception
@@ -11131,22 +10894,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<'>" :subid("49_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<'>" :subid("49_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_811
-.annotate 'line', 177
+.annotate 'line', 0
new $P810, 'ExceptionHandler'
set_addr $P810, control_809
$P810."handle_types"(.CONTROL_RETURN)
push_eh $P810
.lex "self", self
.lex "$/", param_811
-.annotate 'line', 178
new $P812, "Undef"
.lex "$quote", $P812
-.annotate 'line', 180
new $P813, "Undef"
.lex "$past", $P813
-.annotate 'line', 178
find_lex $P814, "$/"
unless_null $P814, vivify_245
$P814 = root_new ['parrot';'Hash']
@@ -11157,7 +10917,6 @@
vivify_246:
$P816 = $P815."ast"()
store_lex "$quote", $P816
-.annotate 'line', 179
get_hll_global $P818, ["PAST"], "Val"
find_lex $P819, "$quote"
$P820 = $P818."ACCEPTS"($P819)
@@ -11166,13 +10925,11 @@
$P822 = $P821."value"()
store_lex "$quote", $P822
if_817_end:
-.annotate 'line', 180
get_hll_global $P823, ["PAST"], "Regex"
find_lex $P824, "$quote"
find_lex $P825, "$/"
$P826 = $P823."new"($P824, "literal" :named("pasttype"), $P825 :named("node"))
store_lex "$past", $P826
-.annotate 'line', 181
get_global $P828, "@MODIFIERS"
unless_null $P828, vivify_247
$P828 = root_new ['parrot';'ResizablePMCArray']
@@ -11189,11 +10946,9 @@
find_lex $P831, "$past"
$P831."subtype"("ignorecase")
if_827_end:
-.annotate 'line', 182
find_lex $P832, "$/"
find_lex $P833, "$past"
$P834 = $P832."!make"($P833)
-.annotate 'line', 177
.return ($P834)
control_809:
.local pmc exception
@@ -11205,22 +10960,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<\">" :subid("50_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<\">" :subid("50_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_839
-.annotate 'line', 185
+.annotate 'line', 0
new $P838, 'ExceptionHandler'
set_addr $P838, control_837
$P838."handle_types"(.CONTROL_RETURN)
push_eh $P838
.lex "self", self
.lex "$/", param_839
-.annotate 'line', 186
new $P840, "Undef"
.lex "$quote", $P840
-.annotate 'line', 188
new $P841, "Undef"
.lex "$past", $P841
-.annotate 'line', 186
find_lex $P842, "$/"
unless_null $P842, vivify_250
$P842 = root_new ['parrot';'Hash']
@@ -11231,7 +10983,6 @@
vivify_251:
$P844 = $P843."ast"()
store_lex "$quote", $P844
-.annotate 'line', 187
get_hll_global $P846, ["PAST"], "Val"
find_lex $P847, "$quote"
$P848 = $P846."ACCEPTS"($P847)
@@ -11240,13 +10991,11 @@
$P850 = $P849."value"()
store_lex "$quote", $P850
if_845_end:
-.annotate 'line', 188
get_hll_global $P851, ["PAST"], "Regex"
find_lex $P852, "$quote"
find_lex $P853, "$/"
$P854 = $P851."new"($P852, "literal" :named("pasttype"), $P853 :named("node"))
store_lex "$past", $P854
-.annotate 'line', 189
get_global $P856, "@MODIFIERS"
unless_null $P856, vivify_252
$P856 = root_new ['parrot';'ResizablePMCArray']
@@ -11263,11 +11012,9 @@
find_lex $P859, "$past"
$P859."subtype"("ignorecase")
if_855_end:
-.annotate 'line', 190
find_lex $P860, "$/"
find_lex $P861, "$past"
$P862 = $P860."!make"($P861)
-.annotate 'line', 185
.return ($P862)
control_837:
.local pmc exception
@@ -11279,27 +11026,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<.>" :subid("51_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<.>" :subid("51_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_867
-.annotate 'line', 193
+.annotate 'line', 0
new $P866, 'ExceptionHandler'
set_addr $P866, control_865
$P866."handle_types"(.CONTROL_RETURN)
push_eh $P866
.lex "self", self
.lex "$/", param_867
-.annotate 'line', 194
new $P868, "Undef"
.lex "$past", $P868
get_hll_global $P869, ["PAST"], "Regex"
find_lex $P870, "$/"
$P871 = $P869."new"("charclass" :named("pasttype"), "." :named("subtype"), $P870 :named("node"))
store_lex "$past", $P871
-.annotate 'line', 195
find_lex $P872, "$/"
find_lex $P873, "$past"
$P874 = $P872."!make"($P873)
-.annotate 'line', 193
.return ($P874)
control_865:
.local pmc exception
@@ -11311,27 +11055,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<^>" :subid("52_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<^>" :subid("52_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_879
-.annotate 'line', 198
+.annotate 'line', 0
new $P878, 'ExceptionHandler'
set_addr $P878, control_877
$P878."handle_types"(.CONTROL_RETURN)
push_eh $P878
.lex "self", self
.lex "$/", param_879
-.annotate 'line', 199
new $P880, "Undef"
.lex "$past", $P880
get_hll_global $P881, ["PAST"], "Regex"
find_lex $P882, "$/"
$P883 = $P881."new"("anchor" :named("pasttype"), "bos" :named("subtype"), $P882 :named("node"))
store_lex "$past", $P883
-.annotate 'line', 200
find_lex $P884, "$/"
find_lex $P885, "$past"
$P886 = $P884."!make"($P885)
-.annotate 'line', 198
.return ($P886)
control_877:
.local pmc exception
@@ -11343,27 +11084,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<^^>" :subid("53_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<^^>" :subid("53_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_891
-.annotate 'line', 203
+.annotate 'line', 0
new $P890, 'ExceptionHandler'
set_addr $P890, control_889
$P890."handle_types"(.CONTROL_RETURN)
push_eh $P890
.lex "self", self
.lex "$/", param_891
-.annotate 'line', 204
new $P892, "Undef"
.lex "$past", $P892
get_hll_global $P893, ["PAST"], "Regex"
find_lex $P894, "$/"
$P895 = $P893."new"("anchor" :named("pasttype"), "bol" :named("subtype"), $P894 :named("node"))
store_lex "$past", $P895
-.annotate 'line', 205
find_lex $P896, "$/"
find_lex $P897, "$past"
$P898 = $P896."!make"($P897)
-.annotate 'line', 203
.return ($P898)
control_889:
.local pmc exception
@@ -11375,27 +11113,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<$>" :subid("54_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<$>" :subid("54_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_903
-.annotate 'line', 208
+.annotate 'line', 0
new $P902, 'ExceptionHandler'
set_addr $P902, control_901
$P902."handle_types"(.CONTROL_RETURN)
push_eh $P902
.lex "self", self
.lex "$/", param_903
-.annotate 'line', 209
new $P904, "Undef"
.lex "$past", $P904
get_hll_global $P905, ["PAST"], "Regex"
find_lex $P906, "$/"
$P907 = $P905."new"("anchor" :named("pasttype"), "eos" :named("subtype"), $P906 :named("node"))
store_lex "$past", $P907
-.annotate 'line', 210
find_lex $P908, "$/"
find_lex $P909, "$past"
$P910 = $P908."!make"($P909)
-.annotate 'line', 208
.return ($P910)
control_901:
.local pmc exception
@@ -11407,27 +11142,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<$$>" :subid("55_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<$$>" :subid("55_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_915
-.annotate 'line', 213
+.annotate 'line', 0
new $P914, 'ExceptionHandler'
set_addr $P914, control_913
$P914."handle_types"(.CONTROL_RETURN)
push_eh $P914
.lex "self", self
.lex "$/", param_915
-.annotate 'line', 214
new $P916, "Undef"
.lex "$past", $P916
get_hll_global $P917, ["PAST"], "Regex"
find_lex $P918, "$/"
$P919 = $P917."new"("anchor" :named("pasttype"), "eol" :named("subtype"), $P918 :named("node"))
store_lex "$past", $P919
-.annotate 'line', 215
find_lex $P920, "$/"
find_lex $P921, "$past"
$P922 = $P920."!make"($P921)
-.annotate 'line', 213
.return ($P922)
control_913:
.local pmc exception
@@ -11439,27 +11171,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<:::>" :subid("56_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<:::>" :subid("56_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_927
-.annotate 'line', 218
+.annotate 'line', 0
new $P926, 'ExceptionHandler'
set_addr $P926, control_925
$P926."handle_types"(.CONTROL_RETURN)
push_eh $P926
.lex "self", self
.lex "$/", param_927
-.annotate 'line', 219
new $P928, "Undef"
.lex "$past", $P928
get_hll_global $P929, ["PAST"], "Regex"
find_lex $P930, "$/"
$P931 = $P929."new"("cut" :named("pasttype"), $P930 :named("node"))
store_lex "$past", $P931
-.annotate 'line', 220
find_lex $P932, "$/"
find_lex $P933, "$past"
$P934 = $P932."!make"($P933)
-.annotate 'line', 218
.return ($P934)
control_925:
.local pmc exception
@@ -11471,27 +11200,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<lwb>" :subid("57_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<lwb>" :subid("57_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_939
-.annotate 'line', 223
+.annotate 'line', 0
new $P938, 'ExceptionHandler'
set_addr $P938, control_937
$P938."handle_types"(.CONTROL_RETURN)
push_eh $P938
.lex "self", self
.lex "$/", param_939
-.annotate 'line', 224
new $P940, "Undef"
.lex "$past", $P940
get_hll_global $P941, ["PAST"], "Regex"
find_lex $P942, "$/"
$P943 = $P941."new"("anchor" :named("pasttype"), "lwb" :named("subtype"), $P942 :named("node"))
store_lex "$past", $P943
-.annotate 'line', 225
find_lex $P944, "$/"
find_lex $P945, "$past"
$P946 = $P944."!make"($P945)
-.annotate 'line', 223
.return ($P946)
control_937:
.local pmc exception
@@ -11503,27 +11229,24 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<rwb>" :subid("58_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<rwb>" :subid("58_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_951
-.annotate 'line', 228
+.annotate 'line', 0
new $P950, 'ExceptionHandler'
set_addr $P950, control_949
$P950."handle_types"(.CONTROL_RETURN)
push_eh $P950
.lex "self", self
.lex "$/", param_951
-.annotate 'line', 229
new $P952, "Undef"
.lex "$past", $P952
get_hll_global $P953, ["PAST"], "Regex"
find_lex $P954, "$/"
$P955 = $P953."new"("anchor" :named("pasttype"), "rwb" :named("subtype"), $P954 :named("node"))
store_lex "$past", $P955
-.annotate 'line', 230
find_lex $P956, "$/"
find_lex $P957, "$past"
$P958 = $P956."!make"($P957)
-.annotate 'line', 228
.return ($P958)
control_949:
.local pmc exception
@@ -11535,16 +11258,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<bs>" :subid("59_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<bs>" :subid("59_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_963
-.annotate 'line', 233
+.annotate 'line', 0
new $P962, 'ExceptionHandler'
set_addr $P962, control_961
$P962."handle_types"(.CONTROL_RETURN)
push_eh $P962
.lex "self", self
.lex "$/", param_963
-.annotate 'line', 234
find_lex $P964, "$/"
find_lex $P965, "$/"
unless_null $P965, vivify_255
@@ -11556,7 +11278,6 @@
vivify_256:
$P967 = $P966."ast"()
$P968 = $P964."!make"($P967)
-.annotate 'line', 233
.return ($P968)
control_961:
.local pmc exception
@@ -11568,16 +11289,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<mod>" :subid("60_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<mod>" :subid("60_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_973
-.annotate 'line', 237
+.annotate 'line', 0
new $P972, 'ExceptionHandler'
set_addr $P972, control_971
$P972."handle_types"(.CONTROL_RETURN)
push_eh $P972
.lex "self", self
.lex "$/", param_973
-.annotate 'line', 238
find_lex $P974, "$/"
find_lex $P975, "$/"
unless_null $P975, vivify_257
@@ -11589,7 +11309,6 @@
vivify_258:
$P977 = $P976."ast"()
$P978 = $P974."!make"($P977)
-.annotate 'line', 237
.return ($P978)
control_971:
.local pmc exception
@@ -11601,16 +11320,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<assert>" :subid("61_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<assert>" :subid("61_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_983
-.annotate 'line', 241
+.annotate 'line', 0
new $P982, 'ExceptionHandler'
set_addr $P982, control_981
$P982."handle_types"(.CONTROL_RETURN)
push_eh $P982
.lex "self", self
.lex "$/", param_983
-.annotate 'line', 242
find_lex $P984, "$/"
find_lex $P985, "$/"
unless_null $P985, vivify_259
@@ -11622,7 +11340,6 @@
vivify_260:
$P987 = $P986."ast"()
$P988 = $P984."!make"($P987)
-.annotate 'line', 241
.return ($P988)
control_981:
.local pmc exception
@@ -11634,19 +11351,17 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<~>" :subid("62_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<~>" :subid("62_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_993
-.annotate 'line', 245
+.annotate 'line', 0
new $P992, 'ExceptionHandler'
set_addr $P992, control_991
$P992."handle_types"(.CONTROL_RETURN)
push_eh $P992
.lex "self", self
.lex "$/", param_993
-.annotate 'line', 246
find_lex $P994, "$/"
get_hll_global $P995, ["PAST"], "Regex"
-.annotate 'line', 247
find_lex $P996, "$/"
unless_null $P996, vivify_261
$P996 = root_new ['parrot';'Hash']
@@ -11656,9 +11371,7 @@
new $P997, "Undef"
vivify_262:
$P998 = $P997."ast"()
-.annotate 'line', 248
get_hll_global $P999, ["PAST"], "Regex"
-.annotate 'line', 249
find_lex $P1000, "$/"
unless_null $P1000, vivify_263
$P1000 = root_new ['parrot';'Hash']
@@ -11668,7 +11381,6 @@
new $P1001, "Undef"
vivify_264:
$P1002 = $P1001."ast"()
-.annotate 'line', 250
get_hll_global $P1003, ["PAST"], "Regex"
find_lex $P1004, "$/"
unless_null $P1004, vivify_265
@@ -11681,11 +11393,8 @@
set $S1006, $P1005
$P1007 = $P1003."new"("FAILGOAL", $S1006, "subrule" :named("pasttype"), "method" :named("subtype"))
$P1008 = $P999."new"($P1002, $P1007, "alt" :named("pasttype"))
-.annotate 'line', 248
$P1009 = $P995."new"($P998, $P1008, "concat" :named("pasttype"))
-.annotate 'line', 246
$P1010 = $P994."!make"($P1009)
-.annotate 'line', 245
.return ($P1010)
control_991:
.local pmc exception
@@ -11697,19 +11406,17 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<{*}>" :subid("63_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<{*}>" :subid("63_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1015
-.annotate 'line', 258
+.annotate 'line', 0
new $P1014, 'ExceptionHandler'
set_addr $P1014, control_1013
$P1014."handle_types"(.CONTROL_RETURN)
push_eh $P1014
.lex "self", self
.lex "$/", param_1015
-.annotate 'line', 259
new $P1016, "Undef"
.lex "$past", $P1016
-.annotate 'line', 260
find_lex $P1019, "$/"
unless_null $P1019, vivify_267
$P1019 = root_new ['parrot';'Hash']
@@ -11743,11 +11450,9 @@
set $P1017, $P1027
if_1018_end:
store_lex "$past", $P1017
-.annotate 'line', 262
find_lex $P1029, "$/"
find_lex $P1030, "$past"
$P1031 = $P1029."!make"($P1030)
-.annotate 'line', 258
.return ($P1031)
control_1013:
.local pmc exception
@@ -11759,24 +11464,20 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<var>" :subid("64_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<var>" :subid("64_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1036
-.annotate 'line', 265
+.annotate 'line', 0
new $P1035, 'ExceptionHandler'
set_addr $P1035, control_1034
$P1035."handle_types"(.CONTROL_RETURN)
push_eh $P1035
.lex "self", self
.lex "$/", param_1036
-.annotate 'line', 266
new $P1037, "Undef"
.lex "$past", $P1037
-.annotate 'line', 267
new $P1038, "Undef"
.lex "$name", $P1038
-.annotate 'line', 265
find_lex $P1039, "$past"
-.annotate 'line', 267
find_lex $P1042, "$/"
unless_null $P1042, vivify_272
$P1042 = root_new ['parrot';'Hash']
@@ -11812,7 +11513,6 @@
set $P1040, $N1046
if_1041_end:
store_lex "$name", $P1040
-.annotate 'line', 268
find_lex $P1051, "$/"
unless_null $P1051, vivify_278
$P1051 = root_new ['parrot';'Hash']
@@ -11822,16 +11522,13 @@
new $P1052, "Undef"
vivify_279:
if $P1052, if_1050
-.annotate 'line', 279
get_hll_global $P1083, ["PAST"], "Regex"
find_lex $P1084, "$name"
find_lex $P1085, "$/"
$P1086 = $P1083."new"("!BACKREF", $P1084, "subrule" :named("pasttype"), "method" :named("subtype"), $P1085 :named("node"))
store_lex "$past", $P1086
-.annotate 'line', 278
goto if_1050_end
if_1050:
-.annotate 'line', 269
find_lex $P1053, "$/"
unless_null $P1053, vivify_280
$P1053 = root_new ['parrot';'Hash']
@@ -11846,7 +11543,6 @@
vivify_282:
$P1056 = $P1055."ast"()
store_lex "$past", $P1056
-.annotate 'line', 270
find_lex $P1060, "$past"
$S1061 = $P1060."pasttype"()
iseq $I1062, $S1061, "quant"
@@ -11869,22 +11565,18 @@
set $P1058, $I1066
if_1059_end:
if $P1058, if_1057
-.annotate 'line', 273
find_lex $P1072, "$past"
$S1073 = $P1072."pasttype"()
iseq $I1074, $S1073, "subrule"
if $I1074, if_1071
-.annotate 'line', 275
get_hll_global $P1078, ["PAST"], "Regex"
find_lex $P1079, "$past"
find_lex $P1080, "$name"
find_lex $P1081, "$/"
$P1082 = $P1078."new"($P1079, $P1080 :named("name"), "subcapture" :named("pasttype"), $P1081 :named("node"))
store_lex "$past", $P1082
-.annotate 'line', 274
goto if_1071_end
if_1071:
-.annotate 'line', 273
find_lex $P1075, "self"
find_lex $P1076, "$past"
find_lex $P1077, "$name"
@@ -11892,7 +11584,6 @@
if_1071_end:
goto if_1057_end
if_1057:
-.annotate 'line', 271
find_lex $P1067, "self"
find_lex $P1068, "$past"
unless_null $P1068, vivify_285
@@ -11906,11 +11597,9 @@
$P1067."subrule_alias"($P1069, $P1070)
if_1057_end:
if_1050_end:
-.annotate 'line', 282
find_lex $P1087, "$/"
find_lex $P1088, "$past"
$P1089 = $P1087."!make"($P1088)
-.annotate 'line', 265
.return ($P1089)
control_1034:
.local pmc exception
@@ -11922,19 +11611,17 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "metachar:sym<PIR>" :subid("65_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "metachar:sym<PIR>" :subid("65_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1094
-.annotate 'line', 285
+.annotate 'line', 0
new $P1093, 'ExceptionHandler'
set_addr $P1093, control_1092
$P1093."handle_types"(.CONTROL_RETURN)
push_eh $P1093
.lex "self", self
.lex "$/", param_1094
-.annotate 'line', 286
find_lex $P1095, "$/"
get_hll_global $P1096, ["PAST"], "Regex"
-.annotate 'line', 287
get_hll_global $P1097, ["PAST"], "Op"
find_lex $P1098, "$/"
unless_null $P1098, vivify_287
@@ -11948,9 +11635,7 @@
$P1101 = $P1097."new"($S1100 :named("inline"), "inline" :named("pasttype"))
find_lex $P1102, "$/"
$P1103 = $P1096."new"($P1101, "pastnode" :named("pasttype"), $P1102 :named("node"))
-.annotate 'line', 286
$P1104 = $P1095."!make"($P1103)
-.annotate 'line', 285
.return ($P1104)
control_1092:
.local pmc exception
@@ -11962,22 +11647,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<w>" :subid("66_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<w>" :subid("66_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1109
-.annotate 'line', 293
+.annotate 'line', 0
new $P1108, 'ExceptionHandler'
set_addr $P1108, control_1107
$P1108."handle_types"(.CONTROL_RETURN)
push_eh $P1108
.lex "self", self
.lex "$/", param_1109
-.annotate 'line', 294
new $P1110, "Undef"
.lex "$subtype", $P1110
-.annotate 'line', 295
new $P1111, "Undef"
.lex "$past", $P1111
-.annotate 'line', 294
find_lex $P1114, "$/"
unless_null $P1114, vivify_289
$P1114 = root_new ['parrot';'Hash']
@@ -12007,17 +11689,14 @@
set $P1112, $P1118
if_1113_end:
store_lex "$subtype", $P1112
-.annotate 'line', 295
get_hll_global $P1122, ["PAST"], "Regex"
find_lex $P1123, "$subtype"
find_lex $P1124, "$/"
$P1125 = $P1122."new"("charclass" :named("pasttype"), $P1123 :named("subtype"), $P1124 :named("node"))
store_lex "$past", $P1125
-.annotate 'line', 296
find_lex $P1126, "$/"
find_lex $P1127, "$past"
$P1128 = $P1126."!make"($P1127)
-.annotate 'line', 293
.return ($P1128)
control_1107:
.local pmc exception
@@ -12029,20 +11708,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<b>" :subid("67_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<b>" :subid("67_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1133
-.annotate 'line', 299
+.annotate 'line', 0
new $P1132, 'ExceptionHandler'
set_addr $P1132, control_1131
$P1132."handle_types"(.CONTROL_RETURN)
push_eh $P1132
.lex "self", self
.lex "$/", param_1133
-.annotate 'line', 300
new $P1134, "Undef"
.lex "$past", $P1134
get_hll_global $P1135, ["PAST"], "Regex"
-.annotate 'line', 301
find_lex $P1136, "$/"
unless_null $P1136, vivify_293
$P1136 = root_new ['parrot';'Hash']
@@ -12055,13 +11732,10 @@
iseq $I1139, $S1138, "B"
find_lex $P1140, "$/"
$P1141 = $P1135."new"("\b", "enumcharlist" :named("pasttype"), $I1139 :named("negate"), $P1140 :named("node"))
-.annotate 'line', 300
store_lex "$past", $P1141
-.annotate 'line', 302
find_lex $P1142, "$/"
find_lex $P1143, "$past"
$P1144 = $P1142."!make"($P1143)
-.annotate 'line', 299
.return ($P1144)
control_1131:
.local pmc exception
@@ -12073,20 +11747,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<e>" :subid("68_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<e>" :subid("68_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1149
-.annotate 'line', 305
+.annotate 'line', 0
new $P1148, 'ExceptionHandler'
set_addr $P1148, control_1147
$P1148."handle_types"(.CONTROL_RETURN)
push_eh $P1148
.lex "self", self
.lex "$/", param_1149
-.annotate 'line', 306
new $P1150, "Undef"
.lex "$past", $P1150
get_hll_global $P1151, ["PAST"], "Regex"
-.annotate 'line', 307
find_lex $P1152, "$/"
unless_null $P1152, vivify_295
$P1152 = root_new ['parrot';'Hash']
@@ -12099,13 +11771,10 @@
iseq $I1155, $S1154, "E"
find_lex $P1156, "$/"
$P1157 = $P1151."new"("\e", "enumcharlist" :named("pasttype"), $I1155 :named("negate"), $P1156 :named("node"))
-.annotate 'line', 306
store_lex "$past", $P1157
-.annotate 'line', 308
find_lex $P1158, "$/"
find_lex $P1159, "$past"
$P1160 = $P1158."!make"($P1159)
-.annotate 'line', 305
.return ($P1160)
control_1147:
.local pmc exception
@@ -12117,20 +11786,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<f>" :subid("69_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<f>" :subid("69_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1165
-.annotate 'line', 311
+.annotate 'line', 0
new $P1164, 'ExceptionHandler'
set_addr $P1164, control_1163
$P1164."handle_types"(.CONTROL_RETURN)
push_eh $P1164
.lex "self", self
.lex "$/", param_1165
-.annotate 'line', 312
new $P1166, "Undef"
.lex "$past", $P1166
get_hll_global $P1167, ["PAST"], "Regex"
-.annotate 'line', 313
find_lex $P1168, "$/"
unless_null $P1168, vivify_297
$P1168 = root_new ['parrot';'Hash']
@@ -12143,13 +11810,10 @@
iseq $I1171, $S1170, "F"
find_lex $P1172, "$/"
$P1173 = $P1167."new"("\f", "enumcharlist" :named("pasttype"), $I1171 :named("negate"), $P1172 :named("node"))
-.annotate 'line', 312
store_lex "$past", $P1173
-.annotate 'line', 314
find_lex $P1174, "$/"
find_lex $P1175, "$past"
$P1176 = $P1174."!make"($P1175)
-.annotate 'line', 311
.return ($P1176)
control_1163:
.local pmc exception
@@ -12161,20 +11825,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<h>" :subid("70_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<h>" :subid("70_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1181
-.annotate 'line', 317
+.annotate 'line', 0
new $P1180, 'ExceptionHandler'
set_addr $P1180, control_1179
$P1180."handle_types"(.CONTROL_RETURN)
push_eh $P1180
.lex "self", self
.lex "$/", param_1181
-.annotate 'line', 318
new $P1182, "Undef"
.lex "$past", $P1182
get_hll_global $P1183, ["PAST"], "Regex"
-.annotate 'line', 319
find_lex $P1184, "$/"
unless_null $P1184, vivify_299
$P1184 = root_new ['parrot';'Hash']
@@ -12187,13 +11849,10 @@
iseq $I1187, $S1186, "H"
find_lex $P1188, "$/"
$P1189 = $P1183."new"(unicode:"\t \x{a0}\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000", "enumcharlist" :named("pasttype"), $I1187 :named("negate"), $P1188 :named("node"))
-.annotate 'line', 318
store_lex "$past", $P1189
-.annotate 'line', 320
find_lex $P1190, "$/"
find_lex $P1191, "$past"
$P1192 = $P1190."!make"($P1191)
-.annotate 'line', 317
.return ($P1192)
control_1179:
.local pmc exception
@@ -12205,20 +11864,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<r>" :subid("71_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<r>" :subid("71_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1197
-.annotate 'line', 323
+.annotate 'line', 0
new $P1196, 'ExceptionHandler'
set_addr $P1196, control_1195
$P1196."handle_types"(.CONTROL_RETURN)
push_eh $P1196
.lex "self", self
.lex "$/", param_1197
-.annotate 'line', 324
new $P1198, "Undef"
.lex "$past", $P1198
get_hll_global $P1199, ["PAST"], "Regex"
-.annotate 'line', 325
find_lex $P1200, "$/"
unless_null $P1200, vivify_301
$P1200 = root_new ['parrot';'Hash']
@@ -12231,13 +11888,10 @@
iseq $I1203, $S1202, "R"
find_lex $P1204, "$/"
$P1205 = $P1199."new"("\r", "enumcharlist" :named("pasttype"), $I1203 :named("negate"), $P1204 :named("node"))
-.annotate 'line', 324
store_lex "$past", $P1205
-.annotate 'line', 326
find_lex $P1206, "$/"
find_lex $P1207, "$past"
$P1208 = $P1206."!make"($P1207)
-.annotate 'line', 323
.return ($P1208)
control_1195:
.local pmc exception
@@ -12249,20 +11903,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<t>" :subid("72_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<t>" :subid("72_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1213
-.annotate 'line', 329
+.annotate 'line', 0
new $P1212, 'ExceptionHandler'
set_addr $P1212, control_1211
$P1212."handle_types"(.CONTROL_RETURN)
push_eh $P1212
.lex "self", self
.lex "$/", param_1213
-.annotate 'line', 330
new $P1214, "Undef"
.lex "$past", $P1214
get_hll_global $P1215, ["PAST"], "Regex"
-.annotate 'line', 331
find_lex $P1216, "$/"
unless_null $P1216, vivify_303
$P1216 = root_new ['parrot';'Hash']
@@ -12275,13 +11927,10 @@
iseq $I1219, $S1218, "T"
find_lex $P1220, "$/"
$P1221 = $P1215."new"("\t", "enumcharlist" :named("pasttype"), $I1219 :named("negate"), $P1220 :named("node"))
-.annotate 'line', 330
store_lex "$past", $P1221
-.annotate 'line', 332
find_lex $P1222, "$/"
find_lex $P1223, "$past"
$P1224 = $P1222."!make"($P1223)
-.annotate 'line', 329
.return ($P1224)
control_1211:
.local pmc exception
@@ -12293,20 +11942,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<v>" :subid("73_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<v>" :subid("73_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1229
-.annotate 'line', 335
+.annotate 'line', 0
new $P1228, 'ExceptionHandler'
set_addr $P1228, control_1227
$P1228."handle_types"(.CONTROL_RETURN)
push_eh $P1228
.lex "self", self
.lex "$/", param_1229
-.annotate 'line', 336
new $P1230, "Undef"
.lex "$past", $P1230
get_hll_global $P1231, ["PAST"], "Regex"
-.annotate 'line', 338
find_lex $P1232, "$/"
unless_null $P1232, vivify_305
$P1232 = root_new ['parrot';'Hash']
@@ -12319,13 +11966,10 @@
iseq $I1235, $S1234, "V"
find_lex $P1236, "$/"
$P1237 = $P1231."new"(unicode:"\n\x{b}\f\r\x{85}\u2028\u2029", "enumcharlist" :named("pasttype"), $I1235 :named("negate"), $P1236 :named("node"))
-.annotate 'line', 336
store_lex "$past", $P1237
-.annotate 'line', 339
find_lex $P1238, "$/"
find_lex $P1239, "$past"
$P1240 = $P1238."!make"($P1239)
-.annotate 'line', 335
.return ($P1240)
control_1227:
.local pmc exception
@@ -12337,19 +11981,17 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<o>" :subid("74_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<o>" :subid("74_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1245
-.annotate 'line', 342
+.annotate 'line', 0
new $P1244, 'ExceptionHandler'
set_addr $P1244, control_1243
$P1244."handle_types"(.CONTROL_RETURN)
push_eh $P1244
.lex "self", self
.lex "$/", param_1245
-.annotate 'line', 343
new $P1246, "Undef"
.lex "$octlit", $P1246
-.annotate 'line', 344
get_hll_global $P1247, ["HLL";"Actions"], "ints_to_string"
find_lex $P1250, "$/"
unless_null $P1250, vivify_307
@@ -12379,7 +12021,6 @@
unless_1249_end:
$P1255 = $P1247($P1248)
store_lex "$octlit", $P1255
-.annotate 'line', 345
find_lex $P1256, "$/"
find_lex $P1259, "$/"
unless_null $P1259, vivify_312
@@ -12392,16 +12033,13 @@
set $S1261, $P1260
iseq $I1262, $S1261, "O"
if $I1262, if_1258
-.annotate 'line', 348
get_hll_global $P1267, ["PAST"], "Regex"
find_lex $P1268, "$octlit"
find_lex $P1269, "$/"
$P1270 = $P1267."new"($P1268, "literal" :named("pasttype"), $P1269 :named("node"))
set $P1257, $P1270
-.annotate 'line', 345
goto if_1258_end
if_1258:
-.annotate 'line', 346
get_hll_global $P1263, ["PAST"], "Regex"
find_lex $P1264, "$octlit"
find_lex $P1265, "$/"
@@ -12409,7 +12047,6 @@
set $P1257, $P1266
if_1258_end:
$P1271 = $P1256."!make"($P1257)
-.annotate 'line', 342
.return ($P1271)
control_1243:
.local pmc exception
@@ -12421,19 +12058,17 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<x>" :subid("75_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<x>" :subid("75_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1276
-.annotate 'line', 351
+.annotate 'line', 0
new $P1275, 'ExceptionHandler'
set_addr $P1275, control_1274
$P1275."handle_types"(.CONTROL_RETURN)
push_eh $P1275
.lex "self", self
.lex "$/", param_1276
-.annotate 'line', 352
new $P1277, "Undef"
.lex "$hexlit", $P1277
-.annotate 'line', 353
get_hll_global $P1278, ["HLL";"Actions"], "ints_to_string"
find_lex $P1281, "$/"
unless_null $P1281, vivify_314
@@ -12463,7 +12098,6 @@
unless_1280_end:
$P1286 = $P1278($P1279)
store_lex "$hexlit", $P1286
-.annotate 'line', 354
find_lex $P1287, "$/"
find_lex $P1290, "$/"
unless_null $P1290, vivify_319
@@ -12476,16 +12110,13 @@
set $S1292, $P1291
iseq $I1293, $S1292, "X"
if $I1293, if_1289
-.annotate 'line', 357
get_hll_global $P1298, ["PAST"], "Regex"
find_lex $P1299, "$hexlit"
find_lex $P1300, "$/"
$P1301 = $P1298."new"($P1299, "literal" :named("pasttype"), $P1300 :named("node"))
set $P1288, $P1301
-.annotate 'line', 354
goto if_1289_end
if_1289:
-.annotate 'line', 355
get_hll_global $P1294, ["PAST"], "Regex"
find_lex $P1295, "$hexlit"
find_lex $P1296, "$/"
@@ -12493,7 +12124,6 @@
set $P1288, $P1297
if_1289_end:
$P1302 = $P1287."!make"($P1288)
-.annotate 'line', 351
.return ($P1302)
control_1274:
.local pmc exception
@@ -12505,16 +12135,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<c>" :subid("76_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<c>" :subid("76_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1307
-.annotate 'line', 360
+.annotate 'line', 0
new $P1306, 'ExceptionHandler'
set_addr $P1306, control_1305
$P1306."handle_types"(.CONTROL_RETURN)
push_eh $P1306
.lex "self", self
.lex "$/", param_1307
-.annotate 'line', 361
find_lex $P1308, "$/"
get_hll_global $P1309, ["PAST"], "Regex"
find_lex $P1310, "$/"
@@ -12529,7 +12158,6 @@
find_lex $P1313, "$/"
$P1314 = $P1309."new"($P1312, "literal" :named("pasttype"), $P1313 :named("node"))
$P1315 = $P1308."!make"($P1314)
-.annotate 'line', 360
.return ($P1315)
control_1305:
.local pmc exception
@@ -12541,16 +12169,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "backslash:sym<misc>" :subid("77_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "backslash:sym<misc>" :subid("77_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1320
-.annotate 'line', 364
+.annotate 'line', 0
new $P1319, 'ExceptionHandler'
set_addr $P1319, control_1318
$P1319."handle_types"(.CONTROL_RETURN)
push_eh $P1319
.lex "self", self
.lex "$/", param_1320
-.annotate 'line', 365
new $P1321, "Undef"
.lex "$past", $P1321
get_hll_global $P1322, ["PAST"], "Regex"
@@ -12559,11 +12186,9 @@
find_lex $P1325, "$/"
$P1326 = $P1322."new"($S1324, "literal" :named("pasttype"), $P1325 :named("node"))
store_lex "$past", $P1326
-.annotate 'line', 366
find_lex $P1327, "$/"
find_lex $P1328, "$past"
$P1329 = $P1327."!make"($P1328)
-.annotate 'line', 364
.return ($P1329)
control_1318:
.local pmc exception
@@ -12575,21 +12200,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "assertion:sym<?>" :subid("78_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "assertion:sym<?>" :subid("78_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1334
-.annotate 'line', 370
+.annotate 'line', 0
new $P1333, 'ExceptionHandler'
set_addr $P1333, control_1332
$P1333."handle_types"(.CONTROL_RETURN)
push_eh $P1333
.lex "self", self
.lex "$/", param_1334
-.annotate 'line', 371
new $P1335, "Undef"
.lex "$past", $P1335
-.annotate 'line', 370
find_lex $P1336, "$past"
-.annotate 'line', 372
find_lex $P1338, "$/"
unless_null $P1338, vivify_323
$P1338 = root_new ['parrot';'Hash']
@@ -12599,13 +12221,11 @@
new $P1339, "Undef"
vivify_324:
if $P1339, if_1337
-.annotate 'line', 376
new $P1344, "Integer"
assign $P1344, 0
store_lex "$past", $P1344
goto if_1337_end
if_1337:
-.annotate 'line', 373
find_lex $P1340, "$/"
unless_null $P1340, vivify_325
$P1340 = root_new ['parrot';'Hash']
@@ -12616,15 +12236,12 @@
vivify_326:
$P1342 = $P1341."ast"()
store_lex "$past", $P1342
-.annotate 'line', 374
find_lex $P1343, "$past"
$P1343."subtype"("zerowidth")
if_1337_end:
-.annotate 'line', 377
find_lex $P1345, "$/"
find_lex $P1346, "$past"
$P1347 = $P1345."!make"($P1346)
-.annotate 'line', 370
.return ($P1347)
control_1332:
.local pmc exception
@@ -12636,21 +12253,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "assertion:sym<!>" :subid("79_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "assertion:sym<!>" :subid("79_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1352
-.annotate 'line', 380
+.annotate 'line', 0
new $P1351, 'ExceptionHandler'
set_addr $P1351, control_1350
$P1351."handle_types"(.CONTROL_RETURN)
push_eh $P1351
.lex "self", self
.lex "$/", param_1352
-.annotate 'line', 381
new $P1353, "Undef"
.lex "$past", $P1353
-.annotate 'line', 380
find_lex $P1354, "$past"
-.annotate 'line', 382
find_lex $P1356, "$/"
unless_null $P1356, vivify_327
$P1356 = root_new ['parrot';'Hash']
@@ -12660,15 +12274,12 @@
new $P1357, "Undef"
vivify_328:
if $P1357, if_1355
-.annotate 'line', 388
get_hll_global $P1366, ["PAST"], "Regex"
find_lex $P1367, "$/"
$P1368 = $P1366."new"("anchor" :named("pasttype"), "fail" :named("subtype"), $P1367 :named("node"))
store_lex "$past", $P1368
-.annotate 'line', 387
goto if_1355_end
if_1355:
-.annotate 'line', 383
find_lex $P1358, "$/"
unless_null $P1358, vivify_329
$P1358 = root_new ['parrot';'Hash']
@@ -12679,21 +12290,17 @@
vivify_330:
$P1360 = $P1359."ast"()
store_lex "$past", $P1360
-.annotate 'line', 384
find_lex $P1361, "$past"
find_lex $P1362, "$past"
$P1363 = $P1362."negate"()
isfalse $I1364, $P1363
$P1361."negate"($I1364)
-.annotate 'line', 385
find_lex $P1365, "$past"
$P1365."subtype"("zerowidth")
if_1355_end:
-.annotate 'line', 390
find_lex $P1369, "$/"
find_lex $P1370, "$past"
$P1371 = $P1369."!make"($P1370)
-.annotate 'line', 380
.return ($P1371)
control_1350:
.local pmc exception
@@ -12705,16 +12312,15 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "assertion:sym<method>" :subid("80_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "assertion:sym<method>" :subid("80_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1376
-.annotate 'line', 393
+.annotate 'line', 0
new $P1375, 'ExceptionHandler'
set_addr $P1375, control_1374
$P1375."handle_types"(.CONTROL_RETURN)
push_eh $P1375
.lex "self", self
.lex "$/", param_1376
-.annotate 'line', 394
new $P1377, "Undef"
.lex "$past", $P1377
find_lex $P1378, "$/"
@@ -12727,17 +12333,13 @@
vivify_332:
$P1380 = $P1379."ast"()
store_lex "$past", $P1380
-.annotate 'line', 395
find_lex $P1381, "$past"
$P1381."subtype"("method")
-.annotate 'line', 396
find_lex $P1382, "$past"
$P1382."name"("")
-.annotate 'line', 397
find_lex $P1383, "$/"
find_lex $P1384, "$past"
$P1385 = $P1383."!make"($P1384)
-.annotate 'line', 393
.return ($P1385)
control_1374:
.local pmc exception
@@ -12749,12 +12351,12 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "assertion:sym<name>" :subid("81_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "assertion:sym<name>" :subid("81_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1390
-.annotate 'line', 400
- .const 'Sub' $P1447 = "83_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P1447 = "83_1283975944.26638"
capture_lex $P1447
- .const 'Sub' $P1413 = "82_1283368202.55748"
+ .const 'Sub' $P1413 = "82_1283975944.26638"
capture_lex $P1413
new $P1389, 'ExceptionHandler'
set_addr $P1389, control_1388
@@ -12762,13 +12364,10 @@
push_eh $P1389
.lex "self", self
.lex "$/", param_1390
-.annotate 'line', 401
new $P1391, "Undef"
.lex "$name", $P1391
-.annotate 'line', 402
new $P1392, "Undef"
.lex "$past", $P1392
-.annotate 'line', 401
find_lex $P1393, "$/"
unless_null $P1393, vivify_333
$P1393 = root_new ['parrot';'Hash']
@@ -12782,7 +12381,6 @@
set $P1396, $S1395
store_lex "$name", $P1396
find_lex $P1397, "$past"
-.annotate 'line', 403
find_lex $P1399, "$/"
unless_null $P1399, vivify_335
$P1399 = root_new ['parrot';'Hash']
@@ -12792,17 +12390,14 @@
new $P1400, "Undef"
vivify_336:
if $P1400, if_1398
-.annotate 'line', 407
find_lex $P1409, "$name"
set $S1410, $P1409
iseq $I1411, $S1410, "sym"
if $I1411, if_1408
-.annotate 'line', 423
find_lex $P1423, "self"
find_lex $P1424, "$/"
$P1425 = $P1423."named_assertion"($P1424)
store_lex "$past", $P1425
-.annotate 'line', 424
find_lex $P1427, "$/"
unless_null $P1427, vivify_337
$P1427 = root_new ['parrot';'Hash']
@@ -12812,7 +12407,6 @@
new $P1428, "Undef"
vivify_338:
if $P1428, if_1426
-.annotate 'line', 427
find_lex $P1436, "$/"
unless_null $P1436, vivify_339
$P1436 = root_new ['parrot';'Hash']
@@ -12822,7 +12416,6 @@
new $P1437, "Undef"
vivify_340:
unless $P1437, if_1435_end
-.annotate 'line', 428
find_lex $P1439, "$/"
unless_null $P1439, vivify_341
$P1439 = root_new ['parrot';'Hash']
@@ -12848,7 +12441,7 @@
unless $P1438, loop1452_done
shift $P1445, $P1438
loop1452_redo:
- .const 'Sub' $P1447 = "83_1283368202.55748"
+ .const 'Sub' $P1447 = "83_1283975944.26638"
capture_lex $P1447
$P1447($P1445)
loop1452_next:
@@ -12863,10 +12456,8 @@
pop_eh
for_undef_344:
if_1435_end:
-.annotate 'line', 427
goto if_1426_end
if_1426:
-.annotate 'line', 425
find_lex $P1429, "$past"
find_lex $P1430, "$/"
unless_null $P1430, vivify_345
@@ -12884,17 +12475,14 @@
$P1434 = "buildsub"($P1433)
$P1429."push"($P1434)
if_1426_end:
-.annotate 'line', 422
goto if_1408_end
if_1408:
-.annotate 'line', 407
- .const 'Sub' $P1413 = "82_1283368202.55748"
+ .const 'Sub' $P1413 = "82_1283975944.26638"
capture_lex $P1413
$P1413()
if_1408_end:
goto if_1398_end
if_1398:
-.annotate 'line', 404
find_lex $P1401, "$/"
unless_null $P1401, vivify_348
$P1401 = root_new ['parrot';'Hash']
@@ -12909,17 +12497,14 @@
vivify_350:
$P1404 = $P1403."ast"()
store_lex "$past", $P1404
-.annotate 'line', 405
find_lex $P1405, "self"
find_lex $P1406, "$past"
find_lex $P1407, "$name"
$P1405."subrule_alias"($P1406, $P1407)
if_1398_end:
-.annotate 'line', 431
find_lex $P1455, "$/"
find_lex $P1456, "$past"
$P1457 = $P1455."!make"($P1456)
-.annotate 'line', 400
.return ($P1457)
control_1388:
.local pmc exception
@@ -12930,9 +12515,9 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1446" :anon :subid("83_1283368202.55748") :outer("81_1283368202.55748")
+.sub "_block1446" :anon :subid("83_1283975944.26638") :outer("81_1283975944.26638")
.param pmc param_1448
-.annotate 'line', 428
+.annotate 'line', 0
.lex "$_", param_1448
find_lex $P1449, "$past"
find_lex $P1450, "$_"
@@ -12942,8 +12527,8 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1412" :anon :subid("82_1283368202.55748") :outer("81_1283368202.55748")
-.annotate 'line', 408
+.sub "_block1412" :anon :subid("82_1283975944.26638") :outer("81_1283975944.26638")
+.annotate 'line', 0
new $P1414, "Undef"
.lex "$regexsym", $P1414
@@ -12956,28 +12541,24 @@
$P1415 = box $S0
store_lex "$regexsym", $P1415
-.annotate 'line', 417
get_hll_global $P1416, ["PAST"], "Regex"
-.annotate 'line', 418
get_hll_global $P1417, ["PAST"], "Regex"
find_lex $P1418, "$regexsym"
$P1419 = $P1417."new"($P1418, "literal" :named("pasttype"))
find_lex $P1420, "$name"
find_lex $P1421, "$/"
$P1422 = $P1416."new"($P1419, $P1420 :named("name"), "subcapture" :named("pasttype"), $P1421 :named("node"))
-.annotate 'line', 417
store_lex "$past", $P1422
-.annotate 'line', 407
.return ($P1422)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "assertion:sym<[>" :subid("84_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "assertion:sym<[>" :subid("84_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1462
-.annotate 'line', 434
- .const 'Sub' $P1497 = "85_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P1497 = "85_1283975944.26638"
capture_lex $P1497
new $P1461, 'ExceptionHandler'
set_addr $P1461, control_1460
@@ -12985,19 +12566,14 @@
push_eh $P1461
.lex "self", self
.lex "$/", param_1462
-.annotate 'line', 435
new $P1463, "Undef"
.lex "$clist", $P1463
-.annotate 'line', 436
new $P1464, "Undef"
.lex "$past", $P1464
-.annotate 'line', 445
new $P1465, "Undef"
.lex "$i", $P1465
-.annotate 'line', 446
new $P1466, "Undef"
.lex "$n", $P1466
-.annotate 'line', 435
find_lex $P1467, "$/"
unless_null $P1467, vivify_351
$P1467 = root_new ['parrot';'Hash']
@@ -13007,7 +12583,6 @@
new $P1468, "Undef"
vivify_352:
store_lex "$clist", $P1468
-.annotate 'line', 436
find_lex $P1469, "$clist"
unless_null $P1469, vivify_353
$P1469 = root_new ['parrot';'ResizablePMCArray']
@@ -13018,7 +12593,6 @@
vivify_354:
$P1471 = $P1470."ast"()
store_lex "$past", $P1471
-.annotate 'line', 437
find_lex $P1475, "$past"
$P1476 = $P1475."negate"()
if $P1476, if_1474
@@ -13032,31 +12606,24 @@
set $P1473, $I1479
if_1474_end:
unless $P1473, if_1472_end
-.annotate 'line', 438
find_lex $P1480, "$past"
$P1480."subtype"("zerowidth")
-.annotate 'line', 439
get_hll_global $P1481, ["PAST"], "Regex"
find_lex $P1482, "$past"
-.annotate 'line', 441
get_hll_global $P1483, ["PAST"], "Regex"
$P1484 = $P1483."new"("charclass" :named("pasttype"), "." :named("subtype"))
find_lex $P1485, "$/"
$P1486 = $P1481."new"($P1482, $P1484, $P1485 :named("node"))
-.annotate 'line', 439
store_lex "$past", $P1486
if_1472_end:
-.annotate 'line', 445
new $P1487, "Integer"
assign $P1487, 1
store_lex "$i", $P1487
-.annotate 'line', 446
find_lex $P1488, "$clist"
set $N1489, $P1488
new $P1490, 'Float'
set $P1490, $N1489
store_lex "$n", $P1490
-.annotate 'line', 447
new $P1521, 'ExceptionHandler'
set_addr $P1521, loop1520_handler
$P1521."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST)
@@ -13069,7 +12636,7 @@
islt $I1495, $N1492, $N1494
unless $I1495, loop1520_done
loop1520_redo:
- .const 'Sub' $P1497 = "85_1283368202.55748"
+ .const 'Sub' $P1497 = "85_1283975944.26638"
capture_lex $P1497
$P1497()
loop1520_next:
@@ -13082,11 +12649,9 @@
eq $P1522, .CONTROL_LOOP_REDO, loop1520_redo
loop1520_done:
pop_eh
-.annotate 'line', 458
find_lex $P1523, "$/"
find_lex $P1524, "$past"
$P1525 = $P1523."!make"($P1524)
-.annotate 'line', 434
.return ($P1525)
control_1460:
.local pmc exception
@@ -13097,8 +12662,8 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1496" :anon :subid("85_1283368202.55748") :outer("84_1283368202.55748")
-.annotate 'line', 448
+.sub "_block1496" :anon :subid("85_1283975944.26638") :outer("84_1283975944.26638")
+.annotate 'line', 0
new $P1498, "Undef"
.lex "$ast", $P1498
find_lex $P1499, "$i"
@@ -13113,24 +12678,19 @@
vivify_356:
$P1503 = $P1502."ast"()
store_lex "$ast", $P1503
-.annotate 'line', 449
find_lex $P1505, "$ast"
$P1506 = $P1505."negate"()
if $P1506, if_1504
-.annotate 'line', 454
get_hll_global $P1513, ["PAST"], "Regex"
find_lex $P1514, "$past"
find_lex $P1515, "$ast"
find_lex $P1516, "$/"
$P1517 = $P1513."new"($P1514, $P1515, "alt" :named("pasttype"), $P1516 :named("node"))
store_lex "$past", $P1517
-.annotate 'line', 453
goto if_1504_end
if_1504:
-.annotate 'line', 450
find_lex $P1507, "$ast"
$P1507."subtype"("zerowidth")
-.annotate 'line', 451
get_hll_global $P1508, ["PAST"], "Regex"
find_lex $P1509, "$ast"
find_lex $P1510, "$past"
@@ -13138,23 +12698,21 @@
$P1512 = $P1508."new"($P1509, $P1510, "concat" :named("pasttype"), $P1511 :named("node"))
store_lex "$past", $P1512
if_1504_end:
-.annotate 'line', 456
find_lex $P1518, "$i"
add $P1519, $P1518, 1
store_lex "$i", $P1519
-.annotate 'line', 447
.return ($P1519)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "cclass_elem" :subid("86_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "cclass_elem" :subid("86_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1530
-.annotate 'line', 461
- .const 'Sub' $P1555 = "88_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P1555 = "88_1283975944.26638"
capture_lex $P1555
- .const 'Sub' $P1539 = "87_1283368202.55748"
+ .const 'Sub' $P1539 = "87_1283975944.26638"
capture_lex $P1539
new $P1529, 'ExceptionHandler'
set_addr $P1529, control_1528
@@ -13162,18 +12720,14 @@
push_eh $P1529
.lex "self", self
.lex "$/", param_1530
-.annotate 'line', 462
new $P1531, "Undef"
.lex "$str", $P1531
-.annotate 'line', 463
new $P1532, "Undef"
.lex "$past", $P1532
-.annotate 'line', 462
new $P1533, "String"
assign $P1533, ""
store_lex "$str", $P1533
find_lex $P1534, "$past"
-.annotate 'line', 464
find_lex $P1536, "$/"
unless_null $P1536, vivify_357
$P1536 = root_new ['parrot';'Hash']
@@ -13183,7 +12737,6 @@
new $P1537, "Undef"
vivify_358:
if $P1537, if_1535
-.annotate 'line', 468
find_lex $P1550, "$/"
unless_null $P1550, vivify_359
$P1550 = root_new ['parrot';'Hash']
@@ -13203,7 +12756,7 @@
unless $P1549, loop1580_done
shift $P1553, $P1549
loop1580_redo:
- .const 'Sub' $P1555 = "88_1283368202.55748"
+ .const 'Sub' $P1555 = "88_1283975944.26638"
capture_lex $P1555
$P1555($P1553)
loop1580_next:
@@ -13217,21 +12770,17 @@
loop1580_done:
pop_eh
for_undef_361:
-.annotate 'line', 493
get_hll_global $P1583, ["PAST"], "Regex"
find_lex $P1584, "$str"
find_lex $P1585, "$/"
$P1586 = $P1583."new"($P1584, "enumcharlist" :named("pasttype"), $P1585 :named("node"))
store_lex "$past", $P1586
-.annotate 'line', 467
goto if_1535_end
if_1535:
-.annotate 'line', 464
- .const 'Sub' $P1539 = "87_1283368202.55748"
+ .const 'Sub' $P1539 = "87_1283975944.26638"
capture_lex $P1539
$P1539()
if_1535_end:
-.annotate 'line', 495
find_lex $P1587, "$past"
find_lex $P1588, "$/"
unless_null $P1588, vivify_373
@@ -13244,11 +12793,9 @@
set $S1590, $P1589
iseq $I1591, $S1590, "-"
$P1587."negate"($I1591)
-.annotate 'line', 496
find_lex $P1592, "$/"
find_lex $P1593, "$past"
$P1594 = $P1592."!make"($P1593)
-.annotate 'line', 461
.return ($P1594)
control_1528:
.local pmc exception
@@ -13259,13 +12806,12 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1554" :anon :subid("88_1283368202.55748") :outer("86_1283368202.55748")
+.sub "_block1554" :anon :subid("88_1283975944.26638") :outer("86_1283975944.26638")
.param pmc param_1556
-.annotate 'line', 468
- .const 'Sub' $P1562 = "89_1283368202.55748"
+.annotate 'line', 0
+ .const 'Sub' $P1562 = "89_1283975944.26638"
capture_lex $P1562
.lex "$_", param_1556
-.annotate 'line', 469
find_lex $P1559, "$_"
unless_null $P1559, vivify_362
$P1559 = root_new ['parrot';'ResizablePMCArray']
@@ -13275,7 +12821,6 @@
new $P1560, "Undef"
vivify_363:
if $P1560, if_1558
-.annotate 'line', 491
find_lex $P1576, "$str"
find_lex $P1577, "$_"
unless_null $P1577, vivify_364
@@ -13288,31 +12833,26 @@
concat $P1579, $P1576, $P1578
store_lex "$str", $P1579
set $P1557, $P1579
-.annotate 'line', 469
goto if_1558_end
if_1558:
- .const 'Sub' $P1562 = "89_1283368202.55748"
+ .const 'Sub' $P1562 = "89_1283975944.26638"
capture_lex $P1562
$P1575 = $P1562()
set $P1557, $P1575
if_1558_end:
-.annotate 'line', 468
.return ($P1557)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1561" :anon :subid("89_1283368202.55748") :outer("88_1283368202.55748")
-.annotate 'line', 470
+.sub "_block1561" :anon :subid("89_1283975944.26638") :outer("88_1283975944.26638")
+.annotate 'line', 0
new $P1563, "Undef"
.lex "$a", $P1563
-.annotate 'line', 471
new $P1564, "Undef"
.lex "$b", $P1564
-.annotate 'line', 472
new $P1565, "Undef"
.lex "$c", $P1565
-.annotate 'line', 470
find_lex $P1566, "$_"
unless_null $P1566, vivify_366
$P1566 = root_new ['parrot';'ResizablePMCArray']
@@ -13322,7 +12862,6 @@
new $P1567, "Undef"
vivify_367:
store_lex "$a", $P1567
-.annotate 'line', 471
find_lex $P1568, "$_"
unless_null $P1568, vivify_368
$P1568 = root_new ['parrot';'ResizablePMCArray']
@@ -13336,7 +12875,6 @@
new $P1570, "Undef"
vivify_370:
store_lex "$b", $P1570
-.annotate 'line', 472
$P0 = find_lex '$a'
$S0 = $P0
@@ -13355,19 +12893,17 @@
$P1571 = box $S2
store_lex "$c", $P1571
-.annotate 'line', 489
find_lex $P1572, "$str"
find_lex $P1573, "$c"
concat $P1574, $P1572, $P1573
store_lex "$str", $P1574
-.annotate 'line', 469
.return ($P1574)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1538" :anon :subid("87_1283368202.55748") :outer("86_1283368202.55748")
-.annotate 'line', 465
+.sub "_block1538" :anon :subid("87_1283975944.26638") :outer("86_1283975944.26638")
+.annotate 'line', 0
new $P1540, "Undef"
.lex "$name", $P1540
find_lex $P1541, "$/"
@@ -13382,35 +12918,30 @@
new $P1544, 'String'
set $P1544, $S1543
store_lex "$name", $P1544
-.annotate 'line', 466
get_hll_global $P1545, ["PAST"], "Regex"
find_lex $P1546, "$name"
find_lex $P1547, "$/"
$P1548 = $P1545."new"($P1546, "subrule" :named("pasttype"), "method" :named("subtype"), $P1547 :named("node"))
store_lex "$past", $P1548
-.annotate 'line', 464
.return ($P1548)
.end
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "mod_internal" :subid("90_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "mod_internal" :subid("90_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1599
-.annotate 'line', 499
+.annotate 'line', 0
new $P1598, 'ExceptionHandler'
set_addr $P1598, control_1597
$P1598."handle_types"(.CONTROL_RETURN)
push_eh $P1598
.lex "self", self
.lex "$/", param_1599
-.annotate 'line', 500
$P1600 = root_new ['parrot';'Hash']
.lex "%mods", $P1600
-.annotate 'line', 501
new $P1601, "Undef"
.lex "$n", $P1601
-.annotate 'line', 500
get_global $P1602, "@MODIFIERS"
unless_null $P1602, vivify_375
$P1602 = root_new ['parrot';'ResizablePMCArray']
@@ -13420,7 +12951,6 @@
new $P1603, "Undef"
vivify_376:
store_lex "%mods", $P1603
-.annotate 'line', 501
find_lex $P1606, "$/"
unless_null $P1606, vivify_377
$P1606 = root_new ['parrot';'Hash']
@@ -13458,7 +12988,6 @@
set $P1604, $N1614
if_1605_end:
store_lex "$n", $P1604
-.annotate 'line', 502
find_lex $P1616, "$n"
find_lex $P1617, "$/"
unless_null $P1617, vivify_383
@@ -13479,10 +13008,8 @@
store_lex "%mods", $P1621
vivify_386:
set $P1621[$S1620], $P1616
-.annotate 'line', 503
find_lex $P1622, "$/"
$P1623 = $P1622."!make"(0)
-.annotate 'line', 499
.return ($P1623)
control_1597:
.local pmc exception
@@ -13494,10 +13021,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "subrule_alias" :subid("91_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "subrule_alias" :subid("91_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1631
.param pmc param_1632
-.annotate 'line', 597
+.annotate 'line', 0
new $P1630, 'ExceptionHandler'
set_addr $P1630, control_1629
$P1630."handle_types"(.CONTROL_RETURN)
@@ -13505,18 +13032,15 @@
.lex "self", self
.lex "$past", param_1631
.lex "$name", param_1632
-.annotate 'line', 598
find_lex $P1634, "$past"
$S1635 = $P1634."name"()
isgt $I1636, $S1635, ""
if $I1636, if_1633
-.annotate 'line', 599
find_lex $P1643, "$past"
find_lex $P1644, "$name"
$P1643."name"($P1644)
goto if_1633_end
if_1633:
-.annotate 'line', 598
find_lex $P1637, "$past"
find_lex $P1638, "$name"
concat $P1639, $P1638, "="
@@ -13525,10 +13049,8 @@
concat $P1642, $P1639, $S1641
$P1637."name"($P1642)
if_1633_end:
-.annotate 'line', 600
find_lex $P1645, "$past"
$P1646 = $P1645."subtype"("capture")
-.annotate 'line', 597
.return ($P1646)
control_1629:
.local pmc exception
@@ -13540,22 +13062,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
.include "except_types.pasm"
-.sub "named_assertion" :subid("92_1283368202.55748") :method :outer("11_1283368202.55748")
+.sub "named_assertion" :subid("92_1283975944.26638") :method :outer("11_1283975944.26638")
.param pmc param_1651
-.annotate 'line', 603
+.annotate 'line', 0
new $P1650, 'ExceptionHandler'
set_addr $P1650, control_1649
$P1650."handle_types"(.CONTROL_RETURN)
push_eh $P1650
.lex "self", self
.lex "$/", param_1651
-.annotate 'line', 604
new $P1652, "Undef"
.lex "$name", $P1652
-.annotate 'line', 605
new $P1653, "Undef"
.lex "$past", $P1653
-.annotate 'line', 604
find_lex $P1654, "$/"
unless_null $P1654, vivify_387
$P1654 = root_new ['parrot';'Hash']
@@ -13568,7 +13087,6 @@
new $P1657, 'String'
set $P1657, $S1656
store_lex "$name", $P1657
-.annotate 'line', 605
get_hll_global $P1658, ["PAST"], "Regex"
find_lex $P1659, "$name"
find_lex $P1660, "$name"
@@ -13576,7 +13094,6 @@
$P1662 = $P1658."new"($P1659, $P1660 :named("name"), "subrule" :named("pasttype"), "capture" :named("subtype"), $P1661 :named("node"))
store_lex "$past", $P1662
find_lex $P1663, "$past"
-.annotate 'line', 603
.return ($P1663)
control_1649:
.local pmc exception
@@ -13587,18 +13104,18 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1666" :load :anon :subid("93_1283368202.55748")
-.annotate 'line', 4
- .const 'Sub' $P1668 = "11_1283368202.55748"
+.sub "_block1666" :load :anon :subid("93_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P1668 = "11_1283975944.26638"
$P1669 = $P1668()
.return ($P1669)
.end
.namespace []
-.sub "_block1672" :load :anon :subid("94_1283368202.55748")
-.annotate 'line', 1
- .const 'Sub' $P1674 = "10_1283368202.55748"
+.sub "_block1672" :load :anon :subid("94_1283975944.26638")
+.annotate 'line', 0
+ .const 'Sub' $P1674 = "10_1283975944.26638"
$P1675 = $P1674()
.return ($P1675)
.end
Modified: branches/gc_massacre/ext/nqp-rx/src/stage0/Regex-s0.pir
==============================================================================
--- branches/gc_massacre/ext/nqp-rx/src/stage0/Regex-s0.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/ext/nqp-rx/src/stage0/Regex-s0.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -294,8 +294,7 @@
parrotclass = getattribute $P0, 'parrotclass'
cur = new parrotclass
- $P0 = new ['CodeString']
- $P0 = target
+ $P0 = box target
setattribute cur, '$!target', $P0
if has_cont goto cursor_cont
@@ -502,7 +501,8 @@
fmt = new ['ResizablePMCArray']
from = getattribute self, '$!from'
orig = getattribute self, '$!target'
- line = orig.'lineof'(from)
+ $P0 = get_hll_global ['HLL'], 'Compiler'
+ line = $P0.'lineof'(orig, from, 'cache'=>1)
$P0 = getinterp
$P1 = $P0.'stdhandle'(2)
@@ -1180,12 +1180,11 @@
message = concat "Unable to parse ", dba
message .= ", couldn't find final "
message .= goal
- $P0 = getattribute self, '$!target'
- $I0 = can $P0, 'lineof'
- unless $I0 goto have_line
message .= ' at line '
+ $P0 = getattribute self, '$!target'
+ $P1 = get_hll_global ['HLL'], 'Compiler'
$I0 = self.'pos'()
- $I0 = $P0.'lineof'($I0)
+ $I0 = $P1.'lineof'($P0, $I0)
inc $I0
$S0 = $I0
message .= $S0
Modified: branches/gc_massacre/include/parrot/call.h
==============================================================================
--- branches/gc_massacre/include/parrot/call.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/call.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -303,10 +303,11 @@
} while (0)
#define ADD_OP_VAR_PART(interp, seg, pc, n) do { \
- if (OPCODE_IS((interp), (seg), *(pc), PARROT_OP_set_args_pc) \
- || OPCODE_IS((interp), (seg), *(pc), PARROT_OP_get_results_pc) \
- || OPCODE_IS((interp), (seg), *(pc), PARROT_OP_get_params_pc) \
- || OPCODE_IS((interp), (seg), *(pc), PARROT_OP_set_returns_pc)) { \
+ op_lib_t *_core_ops = PARROT_GET_CORE_OPLIB(interp); \
+ if (OPCODE_IS((interp), (seg), *(pc), _core_ops, PARROT_OP_set_args_pc) \
+ || OPCODE_IS((interp), (seg), *(pc), _core_ops, PARROT_OP_get_results_pc) \
+ || OPCODE_IS((interp), (seg), *(pc), _core_ops, PARROT_OP_get_params_pc) \
+ || OPCODE_IS((interp), (seg), *(pc), _core_ops, PARROT_OP_set_returns_pc)) { \
PMC * const sig = (seg)->const_table->constants[(pc)[1]].u.key; \
(n) += VTABLE_elements((interp), sig); \
} \
Deleted: branches/gc_massacre/include/parrot/charset.h
==============================================================================
--- branches/gc_massacre/include/parrot/charset.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,277 +0,0 @@
-/* charset.h
- * Copyright (C) 2004-2010, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the 8-bit fixed-width encoding
- */
-
-#ifndef PARROT_CHARSET_H_GUARD
-#define PARROT_CHARSET_H_GUARD
-
-
-#include "parrot/encoding.h"
-#include "parrot/cclass.h"
-
-struct _charset;
-typedef struct _charset CHARSET;
-
-
-#if !defined PARROT_NO_EXTERN_CHARSET_PTRS
-PARROT_DATA CHARSET *Parrot_iso_8859_1_charset_ptr;
-PARROT_DATA CHARSET *Parrot_binary_charset_ptr;
-PARROT_DATA CHARSET *Parrot_default_charset_ptr;
-PARROT_DATA CHARSET *Parrot_unicode_charset_ptr;
-PARROT_DATA CHARSET *Parrot_ascii_charset_ptr;
-#endif
-
-#define PARROT_DEFAULT_CHARSET Parrot_ascii_charset_ptr
-#define PARROT_BINARY_CHARSET Parrot_binary_charset_ptr
-#define PARROT_UNICODE_CHARSET Parrot_unicode_charset_ptr
-
-typedef STRING * (*charset_get_graphemes_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef STRING * (*charset_to_charset_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_from_unicode_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_compose_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_decompose_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_upcase_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_downcase_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_titlecase_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_upcase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_downcase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef STRING * (*charset_titlecase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef INTVAL (*charset_compare_t)(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs));
-typedef INTVAL (*charset_index_t)(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search_string), UINTVAL offset);
-typedef INTVAL (*charset_rindex_t)(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search_string), UINTVAL offset);
-typedef UINTVAL (*charset_validate_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef INTVAL (*charset_is_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef INTVAL (*charset_find_not_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef INTVAL (*charset_is_wordchar_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_wordchar_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_not_wordchar_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_is_whitespace_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_whitespace_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_not_whitespace_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_is_digit_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_digit_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_not_digit_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_is_punctuation_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_punctuation_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_not_punctuation_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_is_newline_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_newline_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_not_newline_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef INTVAL (*charset_find_word_boundary_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef STRING * (*charset_string_from_codepoint_t)(PARROT_INTERP, UINTVAL codepoint);
-typedef size_t (*charset_compute_hash_t)(PARROT_INTERP, ARGIN(const STRING *src), size_t seed);
-
-typedef STRING * (*charset_converter_t)(PARROT_INTERP, ARGIN(const STRING *src));
-
-/* HEADERIZER BEGIN: src/string/charset.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const char * Parrot_charset_c_name(SHIM_INTERP, INTVAL number_of_charset);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING * Parrot_charset_name(SHIM_INTERP, INTVAL number_of_charset);
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-INTVAL Parrot_charset_number(PARROT_INTERP,
- ARGIN(const STRING *charsetname))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-INTVAL Parrot_charset_number_of_str(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
-void Parrot_charsets_encodings_deinit(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-void Parrot_charsets_encodings_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-const CHARSET * Parrot_default_charset(SHIM_INTERP);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET * Parrot_find_charset(SHIM_INTERP,
- ARGIN(const char *charsetname))
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-charset_converter_t Parrot_find_charset_converter(SHIM_INTERP,
- ARGIN(const CHARSET *lhs),
- ARGIN(const CHARSET *rhs))
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET * Parrot_get_charset(SHIM_INTERP, INTVAL number_of_charset);
-
-PARROT_EXPORT
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET * Parrot_load_charset(PARROT_INTERP,
- ARGIN(const char *charsetname))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
-INTVAL Parrot_make_default_charset(SHIM_INTERP,
- SHIM(const char *charsetname),
- ARGIN(const CHARSET *charset))
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_MALLOC
-CHARSET * Parrot_new_charset(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-INTVAL Parrot_register_charset(PARROT_INTERP,
- ARGIN(const char *charsetname),
- ARGIN(CHARSET *charset))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
-void Parrot_register_charset_converter(PARROT_INTERP,
- ARGIN(const CHARSET *lhs),
- ARGIN(const CHARSET *rhs),
- ARGIN(charset_converter_t func))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4);
-
-#define ASSERT_ARGS_Parrot_charset_c_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_charset_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_charset_number __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(charsetname))
-#define ASSERT_ARGS_Parrot_charset_number_of_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_Parrot_charsets_encodings_deinit \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_charsets_encodings_init \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_default_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_find_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(charsetname))
-#define ASSERT_ARGS_Parrot_find_charset_converter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
-#define ASSERT_ARGS_Parrot_get_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_load_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(charsetname))
-#define ASSERT_ARGS_Parrot_make_default_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(charset))
-#define ASSERT_ARGS_Parrot_new_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_register_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(charsetname) \
- , PARROT_ASSERT_ARG(charset))
-#define ASSERT_ARGS_Parrot_register_charset_converter \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs) \
- , PARROT_ASSERT_ARG(func))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset.c */
-
-struct _charset {
- const char *name;
- charset_get_graphemes_t get_graphemes;
- charset_to_charset_t to_charset;
- charset_compose_t compose;
- charset_decompose_t decompose;
- charset_upcase_t upcase;
- charset_downcase_t downcase;
- charset_titlecase_t titlecase;
- charset_upcase_first_t upcase_first;
- charset_downcase_first_t downcase_first;
- charset_titlecase_first_t titlecase_first;
- charset_compare_t compare;
- charset_index_t index;
- charset_rindex_t rindex;
- charset_validate_t validate;
- charset_is_cclass_t is_cclass;
- charset_find_cclass_t find_cclass;
- charset_find_not_cclass_t find_not_cclass;
- charset_string_from_codepoint_t string_from_codepoint;
- charset_compute_hash_t compute_hash;
- const ENCODING *preferred_encoding;
-};
-
-#define CHARSET_GET_GRAPEMES(interp, source, offset, count) ((source)->charset)->get_graphemes((interp), (source), (offset), (count))
-#define CHARSET_TO_UNICODE(interp, source, dest) ((source)->charset)->to_unicode((interp), (source), (dest))
-#define CHARSET_COMPOSE(interp, source) ((source)->charset)->compose((interp), (source))
-#define CHARSET_DECOMPOSE(interp, source) ((source)->charset)->decompose((interp), (source))
-#define CHARSET_UPCASE(interp, source) ((source)->charset)->upcase((interp), (source))
-#define CHARSET_DOWNCASE(interp, source) ((source)->charset)->downcase((interp), (source))
-#define CHARSET_TITLECASE(interp, source) ((source)->charset)->titlecase((interp), (source))
-#define CHARSET_UPCASE_FIRST(interp, source) ((source)->charset)->upcase_first((interp), (source))
-#define CHARSET_DOWNCASE_FIRST(interp, source) ((source)->charset)->downcase_first((interp), (source))
-#define CHARSET_TITLECASE_FIRST(interp, source) ((source)->charset)->titlecase_first((interp), (source))
-#define CHARSET_COMPARE(interp, lhs, rhs) ((const CHARSET *)(lhs)->charset)->compare((interp), (lhs), (rhs))
-#define CHARSET_INDEX(interp, source, search, offset) ((source)->charset)->index((interp), (source), (search), (offset))
-#define CHARSET_RINDEX(interp, source, search, offset) ((source)->charset)->rindex((interp), (source), (search), (offset))
-#define CHARSET_VALIDATE(interp, source) ((source)->charset)->validate((interp), (source))
-#define CHARSET_IS_CCLASS(interp, flags, source, offset) ((source)->charset)->is_cclass((interp), (flags), (source), (offset))
-#define CHARSET_FIND_CCLASS(interp, flags, source, offset, count) ((source)->charset)->find_cclass((interp), (flags), (source), (offset), (count))
-#define CHARSET_FIND_NOT_CCLASS(interp, flags, source, offset, count) ((source)->charset)->find_not_cclass((interp), (flags), (source), (offset), (count))
-#define CHARSET_COMPUTE_HASH(interp, source, seed) ((source)->charset)->compute_hash((interp), (source), (seed))
-#define CHARSET_GET_PREFERRED_ENCODING(interp, source) ((source)->charset)->preferred_encoding
-
-#define CHARSET_TO_ENCODING(interp, source) ((source)->encoding)->to_encoding((interp), (source))
-#define CHARSET_COPY_TO_ENCODING(interp, source) ((source)->encoding)->copy_to_encoding((interp), (source))
-#define CHARSET_GET_CODEPOINT(interp, source, offset) ((source)->encoding)->get_codepoint((interp), (source), (offset))
-#define CHARSET_GET_BYTE(interp, source, offset) ((source)->encoding)->get_byte((interp), (source), (offset))
-#define CHARSET_SET_BYTE(interp, source, offset, value) ((source)->encoding)->set_byte((interp), (source), (offset), (value))
-#define CHARSET_GET_CODEPOINTS(interp, source, offset, count) ((source)->encoding)->get_codepoints((interp), (source), (offset), (count))
-#define CHARSET_GET_BYTES(interp, source, offset, count) ((source)->encoding)->get_bytes((interp), (source), (offset), (count))
-#define CHARSET_CODEPOINTS(interp, source) ((source)->encoding)->codepoints((interp), (source))
-#define CHARSET_BYTES(interp, source) ((source)->encoding)->bytes((interp), (source))
-
-
-#endif /* PARROT_CHARSET_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Modified: branches/gc_massacre/include/parrot/encoding.h
==============================================================================
--- branches/gc_massacre/include/parrot/encoding.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/encoding.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -15,68 +15,15 @@
#include "parrot/parrot.h"
-typedef STRING * (*encoding_to_encoding_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef UINTVAL (*encoding_get_codepoint_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef UINTVAL (*encoding_get_byte_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
-typedef void (*encoding_set_byte_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef STRING * (*encoding_get_codepoints_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef STRING * (*encoding_get_bytes_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
-typedef UINTVAL (*encoding_codepoints_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef UINTVAL (*encoding_bytes_t)(PARROT_INTERP, ARGIN(const STRING *src));
-typedef UINTVAL (*encoding_find_cclass_t)(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable), INTVAL flags, UINTVAL offset, UINTVAL count);
-typedef size_t (*encoding_hash_t)(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval);
-
-/* iterator support */
-
-struct string_iterator_t; /* s. parrot/string.h */
-
-typedef UINTVAL (*encoding_iter_get_t)(
- PARROT_INTERP, const STRING *str, const String_iter *i, INTVAL offset);
-typedef void (*encoding_iter_skip_t)(
- PARROT_INTERP, const STRING *str, String_iter *i, INTVAL skip);
-typedef UINTVAL (*encoding_iter_get_and_advance_t)(
- PARROT_INTERP, const STRING *str, String_iter *i);
-typedef void (*encoding_iter_set_and_advance_t)(
- PARROT_INTERP, STRING *str, String_iter *i, UINTVAL c);
-typedef void (*encoding_iter_set_position_t)(
- PARROT_INTERP, const STRING *str, String_iter *i, UINTVAL pos);
-
-struct _encoding {
- ARGIN(const char *name);
- UINTVAL max_bytes_per_codepoint;
- encoding_to_encoding_t to_encoding;
- encoding_get_codepoint_t get_codepoint;
- encoding_get_byte_t get_byte;
- encoding_set_byte_t set_byte;
- encoding_get_codepoints_t get_codepoints;
- encoding_get_bytes_t get_bytes;
- encoding_codepoints_t codepoints;
- encoding_bytes_t bytes;
- encoding_find_cclass_t find_cclass;
- encoding_hash_t hash;
- encoding_iter_get_t iter_get;
- encoding_iter_skip_t iter_skip;
- encoding_iter_get_and_advance_t iter_get_and_advance;
- encoding_iter_set_and_advance_t iter_set_and_advance;
- encoding_iter_set_position_t iter_set_position;
-};
-
-typedef struct _encoding ENCODING;
-
-#if !defined PARROT_NO_EXTERN_ENCODING_PTRS
-PARROT_DATA ENCODING *Parrot_fixed_8_encoding_ptr;
-PARROT_DATA ENCODING *Parrot_utf8_encoding_ptr;
-PARROT_DATA ENCODING *Parrot_utf16_encoding_ptr;
-PARROT_DATA ENCODING *Parrot_ucs2_encoding_ptr;
-PARROT_DATA ENCODING *Parrot_ucs4_encoding_ptr;
-PARROT_DATA ENCODING *Parrot_default_encoding_ptr;
-#endif
-
-#define PARROT_DEFAULT_ENCODING Parrot_fixed_8_encoding_ptr
-#define PARROT_FIXED_8_ENCODING Parrot_fixed_8_encoding_ptr
-#define PARROT_DEFAULT_FOR_UNICODE_ENCODING NULL
+PARROT_DATA STR_VTABLE *Parrot_ascii_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_latin1_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_binary_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_utf8_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_utf16_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_ucs2_encoding_ptr;
+PARROT_DATA STR_VTABLE *Parrot_ucs4_encoding_ptr;
-typedef INTVAL (*encoding_converter_t)(PARROT_INTERP, ENCODING *lhs, ENCODING *rhs);
+PARROT_DATA STR_VTABLE *Parrot_default_encoding_ptr;
/* HEADERIZER BEGIN: src/string/encoding.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -85,7 +32,7 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-const ENCODING * Parrot_default_encoding(SHIM_INTERP);
+const STR_VTABLE * Parrot_default_encoding(SHIM_INTERP);
PARROT_EXPORT
PARROT_PURE_FUNCTION
@@ -114,32 +61,28 @@
__attribute__nonnull__(2);
PARROT_EXPORT
+void Parrot_encodings_init(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-const ENCODING * Parrot_find_encoding(SHIM_INTERP,
+const STR_VTABLE * Parrot_find_encoding(SHIM_INTERP,
ARGIN(const char *encodingname))
__attribute__nonnull__(2);
PARROT_EXPORT
-PARROT_DOES_NOT_RETURN
-encoding_converter_t Parrot_find_encoding_converter(PARROT_INTERP,
- ARGIN(ENCODING *lhs),
- ARGIN(ENCODING *rhs))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-const ENCODING* Parrot_get_encoding(SHIM_INTERP, INTVAL number_of_encoding);
+const STR_VTABLE* Parrot_get_encoding(SHIM_INTERP,
+ INTVAL number_of_encoding);
PARROT_EXPORT
PARROT_DOES_NOT_RETURN
PARROT_CANNOT_RETURN_NULL
-const ENCODING * Parrot_load_encoding(PARROT_INTERP,
+const STR_VTABLE * Parrot_load_encoding(PARROT_INTERP,
ARGIN(const char *encodingname))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -147,24 +90,21 @@
PARROT_EXPORT
INTVAL Parrot_make_default_encoding(SHIM_INTERP,
SHIM(const char *encodingname),
- ARGIN(ENCODING *encoding))
+ ARGIN(STR_VTABLE *encoding))
__attribute__nonnull__(3);
PARROT_EXPORT
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_new_encoding(PARROT_INTERP)
+STR_VTABLE * Parrot_new_encoding(PARROT_INTERP)
__attribute__nonnull__(1);
PARROT_EXPORT
-INTVAL Parrot_register_encoding(PARROT_INTERP,
- ARGIN(const char *encodingname),
- ARGIN(ENCODING *encoding))
+INTVAL Parrot_register_encoding(PARROT_INTERP, ARGIN(STR_VTABLE *encoding))
__attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
+ __attribute__nonnull__(2);
-void parrot_deinit_encodings(PARROT_INTERP)
+void Parrot_deinit_encodings(PARROT_INTERP)
__attribute__nonnull__(1);
void Parrot_str_internal_register_encoding_names(PARROT_INTERP)
@@ -178,13 +118,10 @@
, PARROT_ASSERT_ARG(encodingname))
#define ASSERT_ARGS_Parrot_encoding_number_of_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_Parrot_encodings_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_find_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(encodingname))
-#define ASSERT_ARGS_Parrot_find_encoding_converter \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
#define ASSERT_ARGS_Parrot_get_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_load_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -195,9 +132,8 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(encodingname) \
, PARROT_ASSERT_ARG(encoding))
-#define ASSERT_ARGS_parrot_deinit_encodings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_deinit_encodings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_str_internal_register_encoding_names \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -205,27 +141,6 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/string/encoding.c */
-#define ENCODING_MAX_BYTES_PER_CODEPOINT(i, src) \
- ((src)->encoding)->max_bytes_per_codepoint
-#define ENCODING_GET_CODEPOINT(i, src, offset) \
- ((src)->encoding)->get_codepoint((i), (src), (offset))
-#define ENCODING_GET_BYTE(i, src, offset) \
- ((src)->encoding)->get_byte((i), (src), (offset))
-#define ENCODING_SET_BYTE(i, src, offset, value) \
- ((src)->encoding)->set_byte((i), (src), (offset), (value))
-#define ENCODING_GET_CODEPOINTS(i, src, offset, count) \
- ((src)->encoding)->get_codepoints((i), (src), (offset), (count))
-#define ENCODING_GET_BYTES(i, src, offset, count) \
- ((src)->encoding)->get_bytes((i), (src), (offset), (count))
-#define ENCODING_CODEPOINTS(i, src) \
- ((src)->encoding)->codepoints((i), (src))
-#define ENCODING_BYTES(i, src) \
- ((src)->encoding)->bytes((i), (src))
-#define ENCODING_FIND_CCLASS(i, src, typetable, flags, pos, end) \
- ((src)->encoding)->find_cclass((i), (src), (typetable), (flags), (pos), (end))
-#define ENCODING_HASH(i, src, seed) \
- ((src)->encoding)->hash((i), (src), (seed))
-
#endif /* PARROT_ENCODING_H_GUARD */
/*
Modified: branches/gc_massacre/include/parrot/hash.h
==============================================================================
--- branches/gc_massacre/include/parrot/hash.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/hash.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -26,16 +26,15 @@
#define HASH_ALLOC_SIZE(n) (N_BUCKETS(n) * sizeof (HashBucket) + \
(n) * sizeof (HashBucket *))
-typedef int (*hash_comp_fn)(PARROT_INTERP, ARGIN(const void *), ARGIN(const void *));
-typedef size_t (*hash_hash_key_fn)(PARROT_INTERP, ARGIN(const void *), size_t seed);
-
/* &gen_from_enum(hash_key_type.pasm) */
typedef enum {
Hash_key_type_int,
Hash_key_type_cstring,
Hash_key_type_STRING,
Hash_key_type_PMC,
- Hash_key_type_ptr
+ Hash_key_type_ptr,
+ Hash_key_type_PMC_ptr,
+ Hash_key_type_STRING_enc,
} Hash_key_type;
/* &end_gen */
@@ -69,12 +68,6 @@
/* Random seed value for seeding hash algorithms */
size_t seed;
-
- /* Comparison function pointer. Returns 0 if elements are equal */
- hash_comp_fn compare;
-
- /* Function pointer to generate a hash value for the object */
- hash_hash_key_fn hash_val;
};
/* Utility macros - use them, do not reinvent the wheel */
@@ -86,10 +79,8 @@
UINTVAL _found = 0; \
while (_found < (_hash)->entries){ \
if (_bucket->key){ \
+ _code \
_found++; \
- { \
- _code \
- } \
} \
_bucket++; \
} \
@@ -233,40 +224,6 @@
Hash * parrot_new_pointer_hash(PARROT_INTERP)
__attribute__nonnull__(1);
-PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-int hash_compare_int(SHIM_INTERP,
- ARGIN_NULLOK(const void *a),
- ARGIN_NULLOK(const void *b));
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_PURE_FUNCTION
-int hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-int hash_compare_pointer(SHIM_INTERP,
- ARGIN_NULLOK(const void *a),
- ARGIN_NULLOK(const void *b));
-
-PARROT_WARN_UNUSED_RESULT
-int hash_compare_string(PARROT_INTERP,
- ARGIN(const void *search_key),
- ARGIN_NULLOK(const void *bucket_key))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-int hash_compare_string_distinct_enc(PARROT_INTERP,
- ARGIN(const void *search_key),
- ARGIN(const void *bucket_key))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
PARROT_CAN_RETURN_NULL
void* hash_key_from_int(PARROT_INTERP, ARGIN(const Hash *hash), INTVAL key)
__attribute__nonnull__(1)
@@ -363,26 +320,6 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-size_t key_hash_int(SHIM_INTERP,
- ARGIN_NULLOK(const void *value),
- size_t seed);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_PURE_FUNCTION
-size_t key_hash_PMC(PARROT_INTERP, ARGIN(PMC *value), NULLOK(size_t seed))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-size_t key_hash_STRING(PARROT_INTERP,
- ARGMOD(STRING *s),
- NULLOK(size_t seed))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*s);
-
void parrot_chash_destroy(PARROT_INTERP, ARGMOD(Hash *hash))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -401,12 +338,8 @@
PARROT_MALLOC
Hash * parrot_create_hash(PARROT_INTERP,
PARROT_DATA_TYPE val_type,
- Hash_key_type hkey_type,
- NOTNULL(hash_comp_fn compare),
- NOTNULL(hash_hash_key_fn keyhash))
- __attribute__nonnull__(1)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5);
+ Hash_key_type hkey_type)
+ __attribute__nonnull__(1);
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
@@ -414,12 +347,8 @@
Hash * parrot_create_hash_sized(PARROT_INTERP,
PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
- NOTNULL(hash_comp_fn compare),
- NOTNULL(hash_hash_key_fn keyhash),
UINTVAL size)
- __attribute__nonnull__(1)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5);
+ __attribute__nonnull__(1);
void parrot_hash_clone_prunable(PARROT_INTERP,
ARGIN(const Hash *hash),
@@ -485,20 +414,6 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_parrot_new_pointer_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_hash_compare_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_hash_compare_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(a) \
- , PARROT_ASSERT_ARG(b))
-#define ASSERT_ARGS_hash_compare_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_hash_compare_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(search_key))
-#define ASSERT_ARGS_hash_compare_string_distinct_enc \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(search_key) \
- , PARROT_ASSERT_ARG(bucket_key))
#define ASSERT_ARGS_hash_key_from_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
@@ -544,13 +459,6 @@
#define ASSERT_ARGS_hash_value_to_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
-#define ASSERT_ARGS_key_hash_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_key_hash_PMC __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(value))
-#define ASSERT_ARGS_key_hash_STRING __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_parrot_chash_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
@@ -559,13 +467,9 @@
, PARROT_ASSERT_ARG(hash) \
, PARROT_ASSERT_ARG(func))
#define ASSERT_ARGS_parrot_create_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(compare) \
- , PARROT_ASSERT_ARG(keyhash))
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_parrot_create_hash_sized __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(compare) \
- , PARROT_ASSERT_ARG(keyhash))
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_parrot_hash_clone_prunable __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash) \
Modified: branches/gc_massacre/include/parrot/interpreter.h
==============================================================================
--- branches/gc_massacre/include/parrot/interpreter.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/interpreter.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -182,19 +182,8 @@
struct _ParrotIOData *piodata; /* interpreter's IO system */
- op_lib_t *op_lib; /* Opcode library */
- size_t op_count; /* The number of ops */
- op_info_t *op_info_table; /* Opcode info table
- * (name, nargs, arg types) */
-
- op_func_t *op_func_table; /* opcode dispatch table
- * (functions, labels, or nothing
- * (e.g. switched core), which
- * the interpreter is currently
- * running */
-
op_func_t *evc_func_table; /* event check opcode dispatch */
- op_func_t *save_func_table; /* for restoring op_func_table */
+ size_t evc_func_table_size;
int n_libs; /* count of libs below */
op_lib_t **all_op_libs; /* all loaded opcode libraries */
@@ -216,6 +205,8 @@
struct PackFile *initial_pf; /* first created PF */
struct _imc_info_t *imc_info; /* imcc data */
+ Hash *op_hash; /* mapping from op names to op_info_t */
+
const char *output_file; /* where to write output */
Modified: branches/gc_massacre/include/parrot/library.h
==============================================================================
--- branches/gc_massacre/include/parrot/library.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/library.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -46,12 +46,6 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-char* Parrot_get_runtime_prefix(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
void Parrot_lib_add_path(PARROT_INTERP,
ARGIN(STRING *path_str),
enum_lib_paths which)
@@ -104,8 +98,6 @@
#define ASSERT_ARGS_Parrot_get_runtime_path __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_get_runtime_prefix __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_lib_add_path __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(path_str))
Modified: branches/gc_massacre/include/parrot/misc.h
==============================================================================
--- branches/gc_massacre/include/parrot/misc.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/misc.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -259,8 +259,15 @@
*/
# define PARROT_SPRINTF_MAX_PREC 3 * PARROT_SPRINTF_BUFFER_SIZE / 4
-# define cstr2pstr(cstr) string_make(interp, (cstr), strlen(cstr), "ascii", 0)
-# define char2pstr(ch) string_make(interp, &(ch), 1, "ascii", 0)
+ /* Floats formatted in exponent notation should have this number
+ * of exponent digits unless they need more.
+ */
+# define PARROT_SPRINTF_EXP_DIGITS 2
+
+# define cstr2pstr(cstr) Parrot_str_new_init(interp, (cstr), strlen(cstr), \
+ Parrot_ascii_encoding_ptr, 0)
+# define char2pstr(ch) Parrot_str_new_init(interp, &(ch), 1, \
+ Parrot_ascii_encoding_ptr, 0)
/* SPRINTF DATA STRUCTURE AND FLAGS */
Modified: branches/gc_massacre/include/parrot/op.h
==============================================================================
--- branches/gc_massacre/include/parrot/op.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/op.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -78,8 +78,11 @@
struct op_lib_t *lib;
} op_info_t;
-#define OPCODE_IS(interp, seg, opnum, global_opnum) \
- ((seg)->op_func_table[(opnum)] == (interp)->op_func_table[(global_opnum)])
+#define OP_INFO_OPNUM(oi) ((oi) - (oi)->lib->op_info_table)
+#define OP_INFO_OPFUNC(oi) ((oi)->lib->op_func_table[OP_INFO_OPNUM(oi)])
+
+#define OPCODE_IS(interp, seg, opnum, lib, oplibnum) \
+ ((seg)->op_func_table[(opnum)] == (lib)->op_func_table[(oplibnum)])
#endif /* PARROT_OP_H_GUARD */
Modified: branches/gc_massacre/include/parrot/oplib.h
==============================================================================
--- branches/gc_massacre/include/parrot/oplib.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/oplib.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -32,7 +32,7 @@
size_t op_count;
op_info_t * op_info_table;
op_func_t * op_func_table;
- int (*op_code)(PARROT_INTERP, const char * name, int full);
+ int (*_op_code)(PARROT_INTERP, const char * name, int full);
} op_lib_t;
typedef enum {
Modified: branches/gc_massacre/include/parrot/oplib/core_ops.h
==============================================================================
--- branches/gc_massacre/include/parrot/oplib/core_ops.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/oplib/core_ops.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,7 +20,8 @@
#include "parrot/oplib.h"
#include "parrot/runcore_api.h"
- op_lib_t *Parrot_DynOp_core_2_7_0(PARROT_INTERP, long init);
+PARROT_EXPORT
+op_lib_t *Parrot_DynOp_core_2_7_0(PARROT_INTERP, long init);
opcode_t * Parrot_end(opcode_t *, PARROT_INTERP);
opcode_t * Parrot_noop(opcode_t *, PARROT_INTERP);
Modified: branches/gc_massacre/include/parrot/packfile.h
==============================================================================
--- branches/gc_massacre/include/parrot/packfile.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/packfile.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -263,7 +263,7 @@
opcode_t const_count;
PackFile_Constant *constants;
PackFile_ByteCode *code; /* where this segment belongs to */
- PMC *string_hash; /* Hash for lookup strings and numbers */
+ Hash *string_hash; /* Hash for lookup strings and numbers */
} PackFile_ConstTable;
typedef struct PackFile_ByteCode_OpMappingEntry {
Modified: branches/gc_massacre/include/parrot/parrot.h
==============================================================================
--- branches/gc_massacre/include/parrot/parrot.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/parrot.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -255,7 +255,6 @@
#include "parrot/interpreter.h"
#include "parrot/datatypes.h"
#include "parrot/encoding.h"
-#include "parrot/charset.h"
#include "parrot/string.h"
#include "parrot/string_primitives.h"
#include "parrot/hash.h"
Modified: branches/gc_massacre/include/parrot/pobj.h
==============================================================================
--- branches/gc_massacre/include/parrot/pobj.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/pobj.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -31,6 +31,11 @@
size_t _buflen; /* Length of buffer data. */
} Buffer;
+typedef enum Forward_flag {
+ Buffer_moved_FLAG = 1 << 0,
+ Buffer_shared_FLAG = 1 << 1
+} Forward_flags;
+
/* Use these macros to access the two buffer header slots. */
#define Buffer_bufstart(buffer) (buffer)->_bufstart
@@ -76,13 +81,6 @@
#define Buffer_poolptr(b) ((Memory_Block **)Buffer_bufprolog(b))
-typedef enum {
- enum_stringrep_unknown = 0,
- enum_stringrep_one = 1,
- enum_stringrep_two = 2,
- enum_stringrep_four = 4
-} parrot_string_representation_t;
-
/* Here is the Parrot string header object, "inheriting" from Buffer. */
struct parrot_string_t {
@@ -96,8 +94,7 @@
UINTVAL hashval; /* Cached hash value. */
/* parrot_string_representation_t representation;*/
- const struct _encoding *encoding; /* Pointer to encoding structure. */
- const struct _charset *charset; /* Pointer to charset structure. */
+ const struct _str_vtable *encoding; /* Pointer to string vtable. */
};
/* Here is the Parrot PMC object, "inheriting" from PObj. */
Modified: branches/gc_massacre/include/parrot/runcore_api.h
==============================================================================
--- branches/gc_massacre/include/parrot/runcore_api.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/runcore_api.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -78,9 +78,9 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_EXPORT
-void Parrot_setup_event_func_ptrs(PARROT_INTERP)
- __attribute__nonnull__(1);
+void parrot_hash_oplib(PARROT_INTERP, ARGIN(op_lib_t *lib))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
void Parrot_runcore_destroy(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -107,8 +107,9 @@
#define ASSERT_ARGS_Parrot_runcore_switch __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_Parrot_setup_event_func_ptrs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_parrot_hash_oplib __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lib))
#define ASSERT_ARGS_Parrot_runcore_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_runcore_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/gc_massacre/include/parrot/string.h
==============================================================================
--- branches/gc_massacre/include/parrot/string.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/string.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -18,38 +18,51 @@
#ifdef PARROT_IN_CORE
+#include "parrot/compiler.h"
#include "parrot/pobj.h"
+#include "parrot/cclass.h"
#include "parrot/parrot.h"
-typedef struct parrot_string_t STRING;
-
-typedef enum Forward_flag {
- Buffer_moved_FLAG = 1 << 0,
- Buffer_shared_FLAG = 1 << 1
-} Forward_flags;
-
-/* String iterator */
-typedef struct string_iterator_t {
- UINTVAL bytepos;
- UINTVAL charpos;
-} String_iter;
-
-#define STRING_ITER_INIT(i, iter) \
- (iter)->charpos = (iter)->bytepos = 0
-#define STRING_ITER_GET(i, str, iter, offset) \
- ((str)->encoding)->iter_get((i), (str), (iter), (offset))
-#define STRING_ITER_SKIP(i, str, iter, skip) \
- ((str)->encoding)->iter_skip((i), (str), (iter), (skip))
-#define STRING_ITER_GET_AND_ADVANCE(i, str, iter) \
- ((str)->encoding)->iter_get_and_advance((i), (str), (iter))
-#define STRING_ITER_SET_AND_ADVANCE(i, str, iter, c) \
- ((str)->encoding)->iter_set_and_advance((i), (str), (iter), (c))
-#define STRING_ITER_SET_POSITION(i, str, iter, pos) \
- ((str)->encoding)->iter_set_position((i), (str), (iter), (pos))
-
#define STREQ(x, y) (strcmp((x), (y))==0)
#define STRNEQ(x, y) (strcmp((x), (y))!=0)
+#define STRING_length(src) ((src) ? (src)->strlen : 0U)
+#define STRING_byte_length(src) ((src) ? (src)->bufused : 0U)
+#define STRING_max_bytes_per_codepoint(src) ((src)->encoding)->max_bytes_per_codepoint
+
+#define STRING_equal(interp, lhs, rhs) ((lhs)->encoding)->equal((interp), (lhs), (rhs))
+#define STRING_compare(interp, lhs, rhs) ((lhs)->encoding)->compare((interp), (lhs), (rhs))
+#define STRING_index(interp, src, search, offset) ((src)->encoding)->index((interp), (src), (search), (offset))
+#define STRING_rindex(interp, src, search, offset) ((src)->encoding)->rindex((interp), (src), (search), (offset))
+#define STRING_hash(i, src, seed) ((src)->encoding)->hash((i), (src), (seed))
+#define STRING_validate(interp, src) ((src)->encoding)->validate((interp), (src))
+
+#define STRING_scan(i, src) ((src)->encoding)->scan((i), (src))
+#define STRING_ord(i, src, offset) ((src)->encoding)->ord((i), (src), (offset))
+#define STRING_substr(i, src, offset, count) ((src)->encoding)->substr((i), (src), (offset), (count))
+
+#define STRING_is_cclass(interp, flags, src, offset) ((src)->encoding)->is_cclass((interp), (flags), (src), (offset))
+#define STRING_find_cclass(interp, flags, src, offset, count) ((src)->encoding)->find_cclass((interp), (flags), (src), (offset), (count))
+#define STRING_find_not_cclass(interp, flags, src, offset, count) ((src)->encoding)->find_not_cclass((interp), (flags), (src), (offset), (count))
+
+#define STRING_get_graphemes(interp, src, offset, count) ((src)->encoding)->get_graphemes((interp), (src), (offset), (count))
+#define STRING_compose(interp, src) ((src)->encoding)->compose((interp), (src))
+#define STRING_decompose(interp, src) ((src)->encoding)->decompose((interp), (src))
+
+#define STRING_upcase(interp, src) ((src)->encoding)->upcase((interp), (src))
+#define STRING_downcase(interp, src) ((src)->encoding)->downcase((interp), (src))
+#define STRING_titlecase(interp, src) ((src)->encoding)->titlecase((interp), (src))
+#define STRING_upcase_first(interp, src) ((src)->encoding)->upcase_first((interp), (src))
+#define STRING_downcase_first(interp, src) ((src)->encoding)->downcase_first((interp), (src))
+#define STRING_titlecase_first(interp, src) ((src)->encoding)->titlecase_first((interp), (src))
+
+#define STRING_ITER_INIT(i, iter) (iter)->charpos = (iter)->bytepos = 0
+#define STRING_iter_get(i, str, iter, offset) ((str)->encoding)->iter_get((i), (str), (iter), (offset))
+#define STRING_iter_skip(i, str, iter, skip) ((str)->encoding)->iter_skip((i), (str), (iter), (skip))
+#define STRING_iter_get_and_advance(i, str, iter) ((str)->encoding)->iter_get_and_advance((i), (str), (iter))
+#define STRING_iter_set_and_advance(i, str, iter, c) ((str)->encoding)->iter_set_and_advance((i), (str), (iter), (c))
+#define STRING_iter_set_position(i, str, iter, pos) ((str)->encoding)->iter_set_position((i), (str), (iter), (pos))
+
/* stringinfo parameters */
/* &gen_from_def(stringinfo.pasm) */
@@ -63,6 +76,98 @@
/* &end_gen */
+typedef struct parrot_string_t STRING;
+
+/* String iterator */
+typedef struct string_iterator_t {
+ UINTVAL bytepos;
+ UINTVAL charpos;
+} String_iter;
+
+/* constructors */
+typedef STRING * (*str_vtable_to_encoding_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_chr_t)(PARROT_INTERP, UINTVAL codepoint);
+
+typedef INTVAL (*str_vtable_equal_t)(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs));
+typedef INTVAL (*str_vtable_compare_t)(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs));
+typedef INTVAL (*str_vtable_index_t)(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search_string), UINTVAL offset);
+typedef INTVAL (*str_vtable_rindex_t)(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search_string), UINTVAL offset);
+typedef size_t (*str_vtable_hash_t)(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval);
+typedef UINTVAL (*str_vtable_validate_t)(PARROT_INTERP, ARGIN(const STRING *src));
+
+typedef UINTVAL (*str_vtable_scan_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef UINTVAL (*str_vtable_ord_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset);
+typedef STRING * (*str_vtable_substr_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+
+/* character classes */
+typedef INTVAL (*str_vtable_is_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset);
+typedef INTVAL (*str_vtable_find_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+typedef INTVAL (*str_vtable_find_not_cclass_t)(PARROT_INTERP, INTVAL, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+
+/* graphemes */
+typedef STRING * (*str_vtable_get_graphemes_t)(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count);
+typedef STRING * (*str_vtable_compose_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_decompose_t)(PARROT_INTERP, ARGIN(const STRING *src));
+
+/* case conversion, TODO: move to single function with a flag */
+typedef STRING * (*str_vtable_upcase_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_downcase_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_titlecase_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_upcase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_downcase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
+typedef STRING * (*str_vtable_titlecase_first_t)(PARROT_INTERP, ARGIN(const STRING *src));
+
+/* iterator functions */
+typedef UINTVAL (*str_vtable_iter_get_t)(PARROT_INTERP, const STRING *str, const String_iter *i, INTVAL offset);
+typedef void (*str_vtable_iter_skip_t)(PARROT_INTERP, const STRING *str, String_iter *i, INTVAL skip);
+typedef UINTVAL (*str_vtable_iter_get_and_advance_t)(PARROT_INTERP, const STRING *str, String_iter *i);
+typedef void (*str_vtable_iter_set_and_advance_t)(PARROT_INTERP, STRING *str, String_iter *i, UINTVAL c);
+typedef void (*str_vtable_iter_set_position_t)(PARROT_INTERP, const STRING *str, String_iter *i, UINTVAL pos);
+
+struct _str_vtable {
+ int num;
+ const char *name;
+ STRING *name_str;
+ UINTVAL max_bytes_per_codepoint;
+
+ str_vtable_to_encoding_t to_encoding;
+ str_vtable_chr_t chr;
+
+ str_vtable_equal_t equal;
+ str_vtable_compare_t compare;
+ str_vtable_index_t index;
+ str_vtable_rindex_t rindex;
+ str_vtable_hash_t hash;
+ str_vtable_validate_t validate;
+
+ str_vtable_scan_t scan;
+ str_vtable_ord_t ord;
+ str_vtable_substr_t substr;
+
+ str_vtable_is_cclass_t is_cclass;
+ str_vtable_find_cclass_t find_cclass;
+ str_vtable_find_not_cclass_t find_not_cclass;
+
+ str_vtable_get_graphemes_t get_graphemes;
+ str_vtable_compose_t compose;
+ str_vtable_decompose_t decompose;
+
+ str_vtable_upcase_t upcase;
+ str_vtable_downcase_t downcase;
+ str_vtable_titlecase_t titlecase;
+ str_vtable_upcase_first_t upcase_first;
+ str_vtable_downcase_first_t downcase_first;
+ str_vtable_titlecase_first_t titlecase_first;
+
+ str_vtable_iter_get_t iter_get;
+ str_vtable_iter_skip_t iter_skip;
+ str_vtable_iter_get_and_advance_t iter_get_and_advance;
+ str_vtable_iter_set_and_advance_t iter_set_and_advance;
+ str_vtable_iter_set_position_t iter_set_position;
+};
+
+typedef struct _str_vtable STR_VTABLE;
+
#endif /* PARROT_IN_CORE */
#endif /* PARROT_STRING_H_GUARD */
Modified: branches/gc_massacre/include/parrot/string_funcs.h
==============================================================================
--- branches/gc_massacre/include/parrot/string_funcs.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/string_funcs.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -297,18 +297,14 @@
STRING * Parrot_str_new_init(PARROT_INTERP,
ARGIN_NULLOK(const char *buffer),
UINTVAL len,
- ARGIN(const ENCODING *encoding),
- ARGIN(const CHARSET *charset),
+ ARGIN(const STR_VTABLE *encoding),
UINTVAL flags)
__attribute__nonnull__(1)
- __attribute__nonnull__(4)
- __attribute__nonnull__(5);
+ __attribute__nonnull__(4);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-STRING * Parrot_str_new_noinit(PARROT_INTERP,
- parrot_string_representation_t representation,
- UINTVAL capacity)
+STRING * Parrot_str_new_noinit(PARROT_INTERP, UINTVAL capacity)
__attribute__nonnull__(1);
PARROT_EXPORT
@@ -326,15 +322,12 @@
PARROT_EXPORT
PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
-const CHARSET * Parrot_str_rep_compatible(PARROT_INTERP,
+const STR_VTABLE * Parrot_str_rep_compatible(PARROT_INTERP,
ARGIN(const STRING *a),
- ARGIN(const STRING *b),
- ARGOUT(const ENCODING **e))
+ ARGIN(const STRING *b))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- FUNC_MODIFIES(*e);
+ __attribute__nonnull__(3);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
@@ -415,13 +408,11 @@
PARROT_CANNOT_RETURN_NULL
STRING * Parrot_str_unescape_string(PARROT_INTERP,
ARGIN(const STRING *src),
- ARGIN(const CHARSET *charset),
- ARGIN(const ENCODING *encoding),
+ ARGIN(const STR_VTABLE *encoding),
UINTVAL flags)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4);
+ __attribute__nonnull__(3);
PARROT_EXPORT
void Parrot_str_unpin(PARROT_INTERP, ARGMOD(STRING *s))
@@ -454,17 +445,7 @@
STRING * string_make(PARROT_INTERP,
ARGIN_NULLOK(const char *buffer),
UINTVAL len,
- ARGIN_NULLOK(const char *charset_name),
- UINTVAL flags)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-STRING * string_make_from_charset(PARROT_INTERP,
- ARGIN_NULLOK(const char *buffer),
- UINTVAL len,
- INTVAL charset_nr,
+ ARGIN_NULLOK(const char *encoding_name),
UINTVAL flags)
__attribute__nonnull__(1);
@@ -481,13 +462,6 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_OBSERVER
-const char* string_primary_encoding_for_representation(PARROT_INTERP,
- parrot_string_representation_t representation)
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
PARROT_MALLOC
PARROT_CAN_RETURN_NULL
char * string_to_cstring_nullable(SHIM_INTERP,
@@ -608,8 +582,7 @@
, PARROT_ASSERT_ARG(buffer))
#define ASSERT_ARGS_Parrot_str_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(encoding) \
- , PARROT_ASSERT_ARG(charset))
+ , PARROT_ASSERT_ARG(encoding))
#define ASSERT_ARGS_Parrot_str_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_str_not_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -619,8 +592,7 @@
#define ASSERT_ARGS_Parrot_str_rep_compatible __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(a) \
- , PARROT_ASSERT_ARG(b) \
- , PARROT_ASSERT_ARG(e))
+ , PARROT_ASSERT_ARG(b))
#define ASSERT_ARGS_Parrot_str_repeat __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
@@ -649,7 +621,6 @@
#define ASSERT_ARGS_Parrot_str_unescape_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(src) \
- , PARROT_ASSERT_ARG(charset) \
, PARROT_ASSERT_ARG(encoding))
#define ASSERT_ARGS_Parrot_str_unpin __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -663,16 +634,11 @@
, PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_string_make __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_string_make_from_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_string_max_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_string_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
-#define ASSERT_ARGS_string_primary_encoding_for_representation \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_string_to_cstring_nullable __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_str_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
Modified: branches/gc_massacre/include/parrot/sub.h
==============================================================================
--- branches/gc_massacre/include/parrot/sub.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/include/parrot/sub.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -106,7 +106,7 @@
#define Sub_comp_INIT_CLEAR(o) Sub_comp_flag_CLEAR(PF_INIT, o)
/*
- * a flag to signal a Sub that a new RetContinuation should be created
+ * a flag to signal a Sub that a new Continuation should be created
*/
#define NEED_CONTINUATION ((PMC *)1)
Modified: branches/gc_massacre/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Configure/Options/Conf.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Configure/Options/Conf.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -102,6 +102,7 @@
--without-gettext Build parrot without gettext support
--without-gmp Build parrot without GMP support
--without-opengl Build parrot without OpenGL support (GL/GLU/GLUT)
+ --without-readline Build parrot without readline support
--without-pcre Build parrot without pcre support
--without-zlib Build parrot without zlib support
Modified: branches/gc_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Configure/Options/Conf/Shared.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -77,6 +77,7 @@
without-gmp
without-icu
without-opengl
+ without-readline
without-pcre
without-threads
without-zlib
Modified: branches/gc_massacre/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Configure/Step/List.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Configure/Step/List.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -28,8 +28,6 @@
init::optimize
inter::shlibs
inter::libparrot
- inter::charset
- inter::encoding
inter::types
auto::ops
auto::pmc
Modified: branches/gc_massacre/lib/Parrot/Headerizer.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Headerizer.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Headerizer.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -45,6 +45,7 @@
$self->{valid_macros} = { map { ( $_, 1 ) } qw(
PARROT_EXPORT
PARROT_INLINE
+ PARROT_NOINLINE
PARROT_CAN_RETURN_NULL
PARROT_CANNOT_RETURN_NULL
Modified: branches/gc_massacre/lib/Parrot/Manifest.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Manifest.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Manifest.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -112,9 +112,9 @@
$manifest_lines_ref = $mani->prepare_manifest();
-Prepares the manifest from the read in by the C<new()> method, and returns a
-hash of the files. The keys of the hash are the filenames, and the values are
-strings representing the package and a list of the meta flags.
+Prepares the manifest from the data read in by the C<new()> method, and
+returns a hash of the files. The keys of the hash are the filenames, and the
+values are strings representing the package and a list of the meta flags.
=cut
Modified: branches/gc_massacre/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Pmc2c/PMC.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Pmc2c/PMC.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -71,6 +71,8 @@
# methods
sub add_method {
my ( $self, $method ) = @_;
+ warn "FATAL ERROR: Duplicated VTABLE function: " . $method->name
+ if exists $self->{has_method}{$method->name};
$self->{has_method}{ $method->name } = @{ $self->{methods} };
push @{ $self->{methods} }, $method;
}
Modified: branches/gc_massacre/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Pmc2c/PMCEmitter.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Pmc2c/PMCEmitter.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -569,10 +569,10 @@
if ( $self->is_dynamic ) {
$cout .= <<"EOC";
vt->base_type = entry;
- vt->whoami = string_make(interp, "$classname", @{[length($classname)]},
- "ascii", PObj_constant_FLAG|PObj_external_FLAG);
+ vt->whoami = Parrot_str_new_init(interp, "$classname", @{[length($classname)]},
+ Parrot_ascii_encoding_ptr, PObj_constant_FLAG|PObj_external_FLAG);
vt->provides_str = Parrot_str_concat(interp, vt->provides_str,
- string_make(interp, "$provides", @{[length($provides)]}, "ascii",
+ Parrot_str_new_init(interp, "$provides", @{[length($provides)]}, Parrot_ascii_encoding_ptr,
PObj_constant_FLAG|PObj_external_FLAG));
EOC
@@ -835,7 +835,8 @@
}
$get_mro
VTABLE_unshift_string(interp, mro,
- string_make(interp, "$classname", @{[length($classname)]}, NULL, 0));
+ Parrot_str_new_init(interp, "$classname", @{[length($classname)]},
+ Parrot_default_encoding_ptr, 0));
return mro;
}
Modified: branches/gc_massacre/lib/Parrot/Test.pm
==============================================================================
--- branches/gc_massacre/lib/Parrot/Test.pm Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/lib/Parrot/Test.pm Mon Sep 13 21:23:26 2010 (r48984)
@@ -298,7 +298,6 @@
Memoize::memoize('path_to_parrot');
# Tell parrot it's being tested--disables searching of installed libraries.
-# (see Parrot_get_runtime_prefix in src/library.c).
$ENV{PARROT_TEST} = 1 unless defined $ENV{PARROT_TEST};
my $builder = Test::Builder->new();
Modified: branches/gc_massacre/runtime/parrot/include/test_more.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/include/test_more.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/include/test_more.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,7 +20,7 @@
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_root_namespace [ 'parrot'; 'Test'; 'More' ]
- exports = split ' ', 'plan diag ok nok is is_deeply is_null like substring isa_ok skip isnt todo throws_like lives_ok dies_ok throws_substring done_testing'
+ exports = split ' ', 'plan diag ok nok is is_deeply is_null like substring isa_ok skip skip_all isnt todo throws_like lives_ok dies_ok throws_substring done_testing'
test_namespace.'export_to'(curr_namespace, exports)
Modified: branches/gc_massacre/runtime/parrot/library/Archive/Zip.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/Archive/Zip.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/Archive/Zip.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -15,6 +15,7 @@
.loadlib 'sys_ops'
.loadlib 'io_ops'
+.include 'iglobals.pasm'
.include 'stat.pasm'
.include 'tm.pasm'
@@ -25,6 +26,12 @@
.namespace ['Archive';'Zip';'Base']
.sub '' :init :load :anon
+ $P0 = getinterp
+ $P1 = $P0[.IGLOBALS_CONFIG_HASH]
+ $I0 = $P1['has_zlib']
+ if $I0 goto L1
+ die "Need a parrot built with zlib"
+ L1:
$P0 = loadlib 'gziphandle'
$P0 = newclass ['Archive';'Zip';'Base']
.globalconst int AZ_OK = 0
Modified: branches/gc_massacre/runtime/parrot/library/P6object.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/P6object.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/P6object.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -260,6 +260,9 @@
.local pmc methodpmc
methodname = shift methoditer
methodpmc = methods[methodname]
+ # don't add NativePCCMethods
+ $I0 = isa methodpmc, 'NativePCCMethod'
+ if $I0 goto method_loop
# don't add NCI methods (they don't work)
$I0 = isa methodpmc, 'NCI'
if $I0 goto method_loop
Modified: branches/gc_massacre/runtime/parrot/library/Test/Builder.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/Test/Builder.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/Test/Builder.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -494,6 +494,9 @@
=cut
.sub 'skip_all' :method
+ .param string reason :optional
+ .param int has_reason :opt_flag
+
.local pmc testplan
testplan = self.'testplan'()
@@ -505,9 +508,14 @@
throw plan_exception
SKIP_ALL:
+ $S0 = "1..0 # SKIP"
+ unless has_reason goto NO_REASON
+ $S0 .= " "
+ $S0 .= reason
+ NO_REASON:
.local pmc output
output = self.'output'()
- output.'write'( "1..0" )
+ output.'write'( $S0 )
exit 0
.end
Modified: branches/gc_massacre/runtime/parrot/library/Test/Builder/TestPlan.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/Test/Builder/TestPlan.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/Test/Builder/TestPlan.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -54,6 +54,15 @@
setattribute self, 'plan', plan
.end
+.sub 'get_bool' :vtable :method
+ .local pmc plan
+ plan = getattribute self, 'plan'
+
+ $I0 = isa plan, [ 'Test'; 'Builder'; 'NullPlan' ]
+ $I0 = not $I0
+ .return ($I0)
+.end
+
.sub 'set_tests' :method
.param int tests
Modified: branches/gc_massacre/runtime/parrot/library/Test/More.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/Test/More.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/Test/More.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -13,7 +13,7 @@
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_namespace [ 'Test'; 'More' ]
- exports = split ' ', 'plan diag ok nok is is_deeply like isa_ok skip isnt todo throws_like lives_ok dies_ok'
+ exports = split ' ', 'plan diag ok nok is is_deeply like isa_ok skip skip_all isnt todo throws_like lives_ok dies_ok'
test_namespace.'export_to'(curr_namespace, exports)
@@ -1318,6 +1318,18 @@
test.'skip'()
.end
+=item C<skip_all( reason )>
+
+=cut
+
+.sub skip_all
+ .param string reason :optional
+
+ .local pmc test
+ get_hll_global test, [ 'Test'; 'More' ], '_test'
+ test.'skip_all'(reason)
+.end
+
=item C<todo( passed, description, reason )>
Records a test as pass or fail (like C<ok>, but marks it as TODO so it always
Modified: branches/gc_massacre/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/gc_massacre/runtime/parrot/library/distutils.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/runtime/parrot/library/distutils.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -320,6 +320,15 @@
.const 'Sub' _clean_wininst = '_clean_wininst'
register_step_after('clean', _clean_wininst)
L1:
+
+ $I0 = $P0['has_zlib']
+ if $I0 goto L2
+ .const 'Sub' _no_zlib = '_no_zlib'
+ register_step('smoke', _no_zlib)
+ register_step('sdist_gztar', _no_zlib)
+ register_step('sdist_zip', _no_zlib)
+ register_step('bdist_rpm', _no_zlib)
+ L2:
.end
=head2 Functions
@@ -4107,6 +4116,12 @@
unlink($S0, 1 :named('verbose'))
.end
+
+.sub '_no_zlib' :anon
+ .param pmc kv :slurpy :named
+ say "This step needs a parrot built with zlib"
+.end
+
=head2 Configuration Helpers
=over 4
Modified: branches/gc_massacre/src/call/pcc.c
==============================================================================
--- branches/gc_massacre/src/call/pcc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/call/pcc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -270,8 +270,7 @@
=item C<INTVAL Parrot_pcc_do_run_ops(PARROT_INTERP, PMC *sub_obj)>
-Check if current object require running ops. Used in tailcall for updating
-RetContinuation.
+Check if current object require running ops.
=cut
Modified: branches/gc_massacre/src/datatypes.c
==============================================================================
--- branches/gc_massacre/src/datatypes.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/datatypes.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -78,7 +78,8 @@
? "illegal"
: data_types[type - enum_first_type].name;
- return string_make(interp, s, strlen(s), NULL, PObj_external_FLAG);
+ return Parrot_str_new_init(interp, s, strlen(s),
+ Parrot_default_encoding_ptr, PObj_external_FLAG);
}
/*
Modified: branches/gc_massacre/src/debug.c
==============================================================================
--- branches/gc_massacre/src/debug.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/debug.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -33,6 +33,7 @@
#include "debug.str"
#include "pmc/pmc_continuation.h"
#include "pmc/pmc_callcontext.h"
+#include "parrot/oplib/core_ops.h"
/* Hand switched debugger tracing
* Set to 1 to enable tracing to stderr
@@ -1415,8 +1416,8 @@
#if TRACE_DEBUGGER
fprintf(stderr, "PDB_break: '%s'\n", str);
#endif
- condition->value = string_make(interp, str, (UINTVAL)(i - 1),
- NULL, 0);
+ condition->value = Parrot_str_new_init(interp, str, (UINTVAL)(i - 1),
+ Parrot_default_encoding_ptr, 0);
condition->type |= PDB_cond_const;
}
@@ -2256,6 +2257,7 @@
int j;
size_t size = 0;
int specialop = 0;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
/* Write the opcode name */
const char * p = full_name ? info->full_name : info->name;
@@ -2452,15 +2454,15 @@
one fixed parameter (the signature vector), plus a varying number of
registers/constants. For each arg/return, we show the register and its
flags using PIR syntax. */
- if (OPCODE_IS(interp, interp->code, *(op), PARROT_OP_set_args_pc)
- || OPCODE_IS(interp, interp->code, *(op), PARROT_OP_set_returns_pc))
+ if (OPCODE_IS(interp, interp->code, *(op), core_ops, PARROT_OP_set_args_pc)
+ || OPCODE_IS(interp, interp->code, *(op), core_ops, PARROT_OP_set_returns_pc))
specialop = 1;
/* if it's a retrieving op, specialop = 2, so that later a :flat flag
* can be changed into a :slurpy flag. See flag handling below.
*/
- if (OPCODE_IS(interp, interp->code, *(op), PARROT_OP_get_results_pc)
- || OPCODE_IS(interp, interp->code, *(op), PARROT_OP_get_params_pc))
+ if (OPCODE_IS(interp, interp->code, *(op), core_ops, PARROT_OP_get_results_pc)
+ || OPCODE_IS(interp, interp->code, *(op), core_ops, PARROT_OP_get_params_pc))
specialop = 2;
if (specialop > 0) {
Modified: branches/gc_massacre/src/dynext.c
==============================================================================
--- branches/gc_massacre/src/dynext.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/dynext.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -282,6 +282,8 @@
Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG,
"Couldn't dlopen(NULL): %s\n",
err ? err : "unknown reason");
+ /* clear the error memory */
+ (void)Parrot_dlerror();
return NULL;
}
}
@@ -307,6 +309,8 @@
Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG,
"Couldn't load '%Ss': %s\n",
full_name, err ? err : "unknown reason");
+ /* clear the error memory */
+ (void)Parrot_dlerror();
return NULL;
}
}
@@ -372,6 +376,9 @@
Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG,
"Couldn't load '%Ss': %s\n",
lib, err ? err : "unknown reason");
+
+ /* clear the error memory */
+ (void)Parrot_dlerror();
return NULL;
}
}
@@ -539,7 +546,7 @@
char * const raw_str = Parrot_str_to_cstring(s, orig);
STRING * const ret =
Parrot_str_new_init(d, raw_str, strlen(raw_str),
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_constant_FLAG);
Parrot_str_free_cstring(raw_str);
return ret;
Modified: branches/gc_massacre/src/dynoplibs/sys.ops
==============================================================================
--- branches/gc_massacre/src/dynoplibs/sys.ops Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/dynoplibs/sys.ops Mon Sep 13 21:23:26 2010 (r48984)
@@ -203,7 +203,8 @@
{
struct utsname info;
if (uname(&info) == 0) {
- $1 = string_make(interp, info.version, strlen(info.version), "ascii", 0);
+ $1 = Parrot_str_new_init(interp, info.version, strlen(info.version),
+ Parrot_ascii_encoding_ptr, 0);
}
}
break;
@@ -212,14 +213,16 @@
{
struct utsname info;
if (uname(&info) == 0) {
- $1 = string_make(interp, info.release, strlen(info.version), "ascii", 0);
+ $1 = Parrot_str_new_init(interp, info.release, strlen(info.version),
+ Parrot_ascii_encoding_ptr, 0);
}
}
break;
#endif
case CPU_ARCH:
- $1 = string_make(interp, PARROT_CPU_ARCH, sizeof (PARROT_CPU_ARCH) - 1, "ascii", 0);
+ $1 = Parrot_str_new_init(interp, PARROT_CPU_ARCH, sizeof (PARROT_CPU_ARCH) - 1,
+ Parrot_ascii_encoding_ptr, 0);
break;
case CPU_TYPE:
Modified: branches/gc_massacre/src/dynpmc/Defines.in
==============================================================================
--- branches/gc_massacre/src/dynpmc/Defines.in Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/dynpmc/Defines.in Mon Sep 13 21:23:26 2010 (r48984)
@@ -24,7 +24,6 @@
include/parrot/caches.h \
include/parrot/call.h \
include/parrot/cclass.h \
- include/parrot/charset.h \
include/parrot/compiler.h \
include/parrot/config.h \
include/parrot/context.h \
Modified: branches/gc_massacre/src/dynpmc/gziphandle.pmc
==============================================================================
--- branches/gc_massacre/src/dynpmc/gziphandle.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/dynpmc/gziphandle.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -216,21 +216,6 @@
/*
-=item C<METHOD is_tty()>
-
-GzipHandles are never tty's, returns false.
-
-=cut
-
-*/
- METHOD is_tty() {
- Parrot_warn_deprecated(INTERP,
- "'is_tty' is deprecated, use 'isatty' instead - TT #1689");
- RETURN(INTVAL 0);
- }
-
-/*
-
=back
=head2 Basic Methods
Modified: branches/gc_massacre/src/embed.c
==============================================================================
--- branches/gc_massacre/src/embed.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/embed.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -25,6 +25,7 @@
#include "pmc/pmc_sub.h"
#include "pmc/pmc_callcontext.h"
#include "parrot/runcore_api.h"
+#include "parrot/oplib/core_ops.h"
#include "../compilers/imcc/imc.h"
@@ -427,8 +428,8 @@
program_size = 0;
}
else {
- STRING * const fs = string_make(interp, fullname, strlen(fullname),
- NULL, 0);
+ STRING * const fs = Parrot_str_new_init(interp, fullname, strlen(fullname),
+ Parrot_default_encoding_ptr, 0);
/* can't read a file that doesn't exist */
if (!Parrot_stat_info_intval(interp, fs, STAT_EXISTS)) {
@@ -658,9 +659,8 @@
for (i = 0; i < argc; ++i) {
/* Run through argv, adding everything to @ARGS. */
- STRING * const arg =
- string_make(interp, argv[i], strlen(argv[i]), "unicode",
- PObj_external_FLAG);
+ STRING * const arg = Parrot_str_new_init(interp, argv[i], strlen(argv[i]),
+ Parrot_utf8_encoding_ptr, PObj_external_FLAG);
if (Interp_debug_TEST(interp, PARROT_START_DEBUG_FLAG))
Parrot_io_eprintf(interp, "\t%vd: %s\n", i, argv[i]);
@@ -1078,6 +1078,7 @@
Parrot_run_native(PARROT_INTERP, native_func_t func)
{
ASSERT_ARGS(Parrot_run_native)
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
PackFile * const pf = PackFile_new(interp, 0);
static opcode_t program_code[2] = {
0, /* enternative */
@@ -1085,8 +1086,8 @@
};
static op_func_t op_func_table[2];
- op_func_table[0] = interp->op_func_table[ interp->op_lib->op_code(interp, "enternative", 0) ];
- op_func_table[1] = interp->op_func_table[ interp->op_lib->op_code(interp, "end", 0) ];
+ op_func_table[0] = core_ops->op_func_table[PARROT_OP_enternative];
+ op_func_table[1] = core_ops->op_func_table[PARROT_OP_end];
pf->cur_cs = (PackFile_ByteCode *)
Modified: branches/gc_massacre/src/exceptions.c
==============================================================================
--- branches/gc_massacre/src/exceptions.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/exceptions.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -94,52 +94,68 @@
die_from_exception(PARROT_INTERP, ARGIN(PMC *exception))
{
ASSERT_ARGS(die_from_exception)
- STRING * const message = VTABLE_get_string(interp, exception);
+ /* Avoid anyhting that can throw if we are already throwing from
+ * a previous call to this function */
+ static int already_dying = 0;
+
+ STRING * const message = already_dying ? STRINGNULL :
+ VTABLE_get_string(interp, exception);
INTVAL exit_status = 1;
- const INTVAL severity = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
+ const INTVAL severity = already_dying ? EXCEPT_fatal :
+ VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"));
- /* In some cases we have a fatal exception before the IO system
- * is completely initialized. Do some attempt to output the
- * message to stderr, to help diagnosing. */
- int use_perr = !PMC_IS_NULL(Parrot_io_STDERR(interp));
-
- /* flush interpreter output to get things printed in order */
- if (!PMC_IS_NULL(Parrot_io_STDOUT(interp)))
- Parrot_io_flush(interp, Parrot_io_STDOUT(interp));
- if (use_perr)
- Parrot_io_flush(interp, Parrot_io_STDERR(interp));
-
- if (interp->pdb) {
- Interp * interpdeb = interp->pdb->debugger;
- if (interpdeb) {
- Parrot_io_flush(interpdeb, Parrot_io_STDOUT(interpdeb));
- Parrot_io_flush(interpdeb, Parrot_io_STDERR(interpdeb));
- }
- }
- if (Parrot_str_not_equal(interp, message, CONST_STRING(interp, ""))) {
+ if (already_dying) {
+ fflush(stderr);
+ fprintf(stderr, "\n***FATAL ERROR: "
+ "Exception thrown while dying from previous unhandled Exception\n");
+ }
+ else {
+ /* In some cases we have a fatal exception before the IO system
+ * is completely initialized. Do some attempt to output the
+ * message to stderr, to help diagnosing. */
+ int use_perr = !PMC_IS_NULL(Parrot_io_STDERR(interp));
+ already_dying = 1;
+
+ /* flush interpreter output to get things printed in order */
+ if (!PMC_IS_NULL(Parrot_io_STDOUT(interp)))
+ Parrot_io_flush(interp, Parrot_io_STDOUT(interp));
if (use_perr)
- Parrot_io_eprintf(interp, "%S\n", message);
+ Parrot_io_flush(interp, Parrot_io_STDERR(interp));
+
+ if (interp->pdb) {
+ Interp * interpdeb = interp->pdb->debugger;
+ if (interpdeb) {
+ Parrot_io_flush(interpdeb, Parrot_io_STDOUT(interpdeb));
+ Parrot_io_flush(interpdeb, Parrot_io_STDERR(interpdeb));
+ }
+ }
+
+ if (Parrot_str_not_equal(interp, message, CONST_STRING(interp, ""))) {
+ if (use_perr)
+ Parrot_io_eprintf(interp, "%S\n", message);
+ else {
+ char * const msg = Parrot_str_to_cstring(interp, message);
+ fflush(stderr);
+ fprintf(stderr, "\n%s\n", msg);
+ Parrot_str_free_cstring(msg);
+ }
+
+ /* caution against output swap (with PDB_backtrace) */
+ fflush(stderr);
+ PDB_backtrace(interp);
+ }
+ else if (severity == EXCEPT_exit) {
+ /* TODO: get exit status based on type */
+ exit_status = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "exit_code"));
+ }
else {
- char * const msg = Parrot_str_to_cstring(interp, message);
+ Parrot_io_eprintf(interp, "No exception handler and no message\n");
+ /* caution against output swap (with PDB_backtrace) */
fflush(stderr);
- fprintf(stderr, "\n%s\n", msg);
- Parrot_str_free_cstring(msg);
+ PDB_backtrace(interp);
}
- /* caution against output swap (with PDB_backtrace) */
- fflush(stderr);
- PDB_backtrace(interp);
- }
- else if (severity == EXCEPT_exit) {
- /* TODO: get exit status based on type */
- exit_status = VTABLE_get_integer_keyed_str(interp, exception, CONST_STRING(interp, "exit_code"));
- }
- else {
- Parrot_io_eprintf(interp, "No exception handler and no message\n");
- /* caution against output swap (with PDB_backtrace) */
- fflush(stderr);
- PDB_backtrace(interp);
}
/*
@@ -300,7 +316,8 @@
STRING * const msg =
strchr(format, '%')
? Parrot_vsprintf_c(interp, format, arglist)
- : string_make(interp, format, strlen(format), NULL, 0);
+ : Parrot_str_new_init(interp, format, strlen(format),
+ Parrot_default_encoding_ptr, 0);
return Parrot_ex_build_exception(interp, EXCEPT_error, ex_type, msg);
}
Modified: branches/gc_massacre/src/gc/mark_sweep.c
==============================================================================
--- branches/gc_massacre/src/gc/mark_sweep.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/gc/mark_sweep.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -258,10 +258,12 @@
PObj *b;
Fixed_Size_Arena *cur_arena;
- gc_object_fn_type gc_object = pool->gc_object;
UINTVAL total_used = 0;
const UINTVAL object_size = pool->object_size;
+ const gc_object_fn_type gc_object = pool->gc_object;
+ const add_free_object_fn_type add_free_object = pool->add_free_object;
+
/* Run through all the PObj header pools and mark */
for (cur_arena = pool->last_Arena; cur_arena; cur_arena = cur_arena->prev) {
const size_t objects_end = cur_arena->used;
@@ -298,7 +300,7 @@
if (gc_object)
gc_object(interp, mem_pools, pool, b);
- pool->add_free_object(interp, mem_pools, pool, b);
+ add_free_object(interp, mem_pools, pool, b);
}
next:
b = (PObj *)((char *)b + object_size);
Modified: branches/gc_massacre/src/gc/system.c
==============================================================================
--- branches/gc_massacre/src/gc/system.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/gc/system.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -73,6 +73,7 @@
size_t hi_var_ptr)
__attribute__nonnull__(1);
+PARROT_NOINLINE
static void trace_system_stack(PARROT_INTERP,
ARGIN_NULLOK(const Memory_Pools *mem_pools))
__attribute__nonnull__(1);
@@ -224,12 +225,14 @@
Traces the memory block starting at C<< interp->lo_var_ptr >>. This should be
the address of a local variable which has been created on the stack early in
the interpreter's lifecycle. We trace until the address of another local stack
-variable in this function, which should be at the "top" of the stack.
+variable in this function, which should be at the "top" of the stack. For this
+reason, this function must never be inlined.
=cut
*/
+PARROT_NOINLINE
static void
trace_system_stack(PARROT_INTERP, ARGIN_NULLOK(const Memory_Pools *mem_pools))
{
@@ -452,8 +455,8 @@
: 0;
for (cur_var_ptr = hi_var_ptr;
- (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr;
- cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) {
+ (ptrdiff_t)cur_var_ptr < (ptrdiff_t)lo_var_ptr;
+ cur_var_ptr = (size_t)((ptrdiff_t)cur_var_ptr + sizeof (void *))) {
const size_t ptr = *(size_t *)cur_var_ptr;
if (!ptr)
@@ -465,15 +468,17 @@
* guaranteed to be live pmcs/buffers, and could very well have
* had their bufstart/vtable destroyed due to the linked list of
* free headers... */
- if ((pmc_min <= ptr) && (ptr < pmc_max)
- && interp->gc_sys->is_pmc_ptr(interp, (void *)ptr)) {
+ if ((pmc_min <= ptr)
+ && (ptr < pmc_max)
+ && interp->gc_sys->is_pmc_ptr(interp, (void *)ptr)) {
Parrot_gc_mark_PMC_alive(interp, (PMC *)ptr);
}
else if ((buffer_min <= ptr) && (ptr < buffer_max)
- && interp->gc_sys->is_string_ptr(interp, (void *)ptr)) {
- /* ...and since Parrot_gc_mark_PObj_alive doesn't care about bufstart, it
- * doesn't really matter if it sets a flag */
- Parrot_gc_mark_STRING_alive(interp, (STRING *)ptr);
+ && interp->gc_sys->is_string_ptr(interp, (void *)ptr)) {
+ if (PObj_is_string_TEST((PObj *)ptr))
+ Parrot_gc_mark_STRING_alive(interp, (STRING *)ptr);
+ else
+ PObj_live_SET((PObj *)ptr);
}
}
}
@@ -528,7 +533,8 @@
is_pmc_ptr(ARGIN(const Memory_Pools *mem_pools), ARGIN(const void *ptr))
{
ASSERT_ARGS(is_pmc_ptr)
- return contained_in_pool(mem_pools->pmc_pool, ptr);
+ return contained_in_pool(mem_pools->pmc_pool, ptr)
+ && PObj_is_PMC_TEST((PObj *)ptr);
}
Modified: branches/gc_massacre/src/global_setup.c
==============================================================================
--- branches/gc_massacre/src/global_setup.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/global_setup.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -23,6 +23,7 @@
#define INSIDE_GLOBAL_SETUP
#include "parrot/parrot.h"
+#include "parrot/oplib/core_ops.h"
#include "global_setup.str"
/* These functions are defined in the auto-generated file core_pmcs.c */
@@ -98,7 +99,7 @@
STRING * const config_string =
Parrot_str_new_init(interp,
(const char *)parrot_config_stored, parrot_config_size_stored,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_external_FLAG|PObj_constant_FLAG);
config_hash = Parrot_thaw(interp, config_string);
@@ -217,6 +218,17 @@
create_initial_context(interp);
+ /* initialize the ops hash */
+ if (interp->parent_interpreter) {
+ interp->op_hash = interp->parent_interpreter->op_hash;
+ }
+ else {
+ op_lib_t *core_ops = PARROT_CORE_OPLIB_INIT(interp, 1);
+ interp->op_hash = parrot_create_hash_sized(interp, enum_type_ptr,
+ Hash_key_type_cstring, core_ops->op_count);
+ parrot_hash_oplib(interp, core_ops);
+ }
+
/* create the namespace root stash */
interp->root_namespace = Parrot_pmc_new(interp, enum_class_NameSpace);
Parrot_init_HLL(interp);
Modified: branches/gc_massacre/src/hash.c
==============================================================================
--- branches/gc_massacre/src/hash.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/hash.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -55,6 +55,17 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int hash_compare(PARROT_INTERP,
+ ARGIN(const Hash *hash),
+ ARGIN_NULLOK(void *a),
+ ARGIN_NULLOK(void *b))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
static int hash_compare_cstring(SHIM_INTERP,
ARGIN(const char *a),
ARGIN(const char *b))
@@ -63,18 +74,92 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int hash_compare_int(SHIM_INTERP,
+ ARGIN_NULLOK(const void *a),
+ ARGIN_NULLOK(const void *b));
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int hash_compare_pointer(SHIM_INTERP,
+ ARGIN_NULLOK(const void *a),
+ ARGIN_NULLOK(const void *b));
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int hash_compare_string(PARROT_INTERP,
+ ARGIN(const void *search_key),
+ ARGIN_NULLOK(const void *bucket_key))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static int hash_compare_string_enc(PARROT_INTERP,
+ ARGIN(const void *search_key),
+ ARGIN(const void *bucket_key))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t key_hash(PARROT_INTERP,
+ ARGIN(const Hash *hash),
+ ARGIN_NULLOK(void *key))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
static size_t key_hash_cstring(SHIM_INTERP,
ARGIN(const void *value),
size_t seed)
__attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t key_hash_int(SHIM_INTERP,
+ ARGIN_NULLOK(const void *value),
+ size_t seed);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t key_hash_PMC(PARROT_INTERP,
+ ARGIN(PMC *value),
+ SHIM(size_t seed))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
static size_t key_hash_pointer(SHIM_INTERP,
ARGIN(const void *value),
size_t seed)
__attribute__nonnull__(2);
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t key_hash_STRING(PARROT_INTERP, ARGMOD(STRING *s), size_t seed)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*s);
+
static void parrot_mark_hash_both(PARROT_INTERP, ARGIN(Hash *hash))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -97,13 +182,39 @@
#define ASSERT_ARGS_get_string_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_hash_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_hash_compare_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(a) \
, PARROT_ASSERT_ARG(b))
+#define ASSERT_ARGS_hash_compare_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_hash_compare_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(a) \
+ , PARROT_ASSERT_ARG(b))
+#define ASSERT_ARGS_hash_compare_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_hash_compare_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(search_key))
+#define ASSERT_ARGS_hash_compare_string_enc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(search_key) \
+ , PARROT_ASSERT_ARG(bucket_key))
+#define ASSERT_ARGS_key_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_key_hash_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_key_hash_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_key_hash_PMC __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_key_hash_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_key_hash_STRING __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_parrot_mark_hash_both __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash))
@@ -116,11 +227,9 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
-
-
/*
-=item C<size_t key_hash_STRING(PARROT_INTERP, STRING *s, size_t seed)>
+=item C<static size_t key_hash_STRING(PARROT_INTERP, STRING *s, size_t seed)>
Returns the hashed value of the key C<value>. See also string.c.
@@ -130,8 +239,10 @@
PARROT_WARN_UNUSED_RESULT
-size_t
-key_hash_STRING(PARROT_INTERP, ARGMOD(STRING *s), SHIM(size_t seed))
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t
+key_hash_STRING(PARROT_INTERP, ARGMOD(STRING *s), size_t seed)
{
ASSERT_ARGS(key_hash_STRING)
@@ -144,8 +255,8 @@
/*
-=item C<int hash_compare_string(PARROT_INTERP, const void *search_key, const
-void *bucket_key)>
+=item C<static int hash_compare_string(PARROT_INTERP, const void *search_key,
+const void *bucket_key)>
Compares the two strings, returning 0 if they are identical.
@@ -154,7 +265,9 @@
*/
PARROT_WARN_UNUSED_RESULT
-int
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int
hash_compare_string(PARROT_INTERP, ARGIN(const void *search_key),
ARGIN_NULLOK(const void *bucket_key))
{
@@ -162,16 +275,13 @@
STRING const *s1 = (STRING const *)search_key;
STRING const *s2 = (STRING const *)bucket_key;
- if (s1->hashval != s2->hashval)
- return 1;
-
- return CHARSET_COMPARE(interp, s1, s2);
+ return STRING_equal(interp, s1, s2) == 0;
}
/*
-=item C<int hash_compare_string_distinct_enc(PARROT_INTERP, const void
+=item C<static int hash_compare_string_enc(PARROT_INTERP, const void
*search_key, const void *bucket_key)>
Compare two strings. Returns 0 if they are identical. Considers differing
@@ -180,27 +290,27 @@
*/
PARROT_WARN_UNUSED_RESULT
-int
-hash_compare_string_distinct_enc(PARROT_INTERP, ARGIN(const void *search_key),
- ARGIN(const void *bucket_key))
+static int
+hash_compare_string_enc(PARROT_INTERP, ARGIN(const void *search_key),
+ ARGIN(const void *bucket_key))
{
- ASSERT_ARGS(hash_compare_string_distinct_enc)
+ ASSERT_ARGS(hash_compare_string_enc)
STRING const *s1 = (STRING const *)search_key;
STRING const *s2 = (STRING const *)bucket_key;
- if (s1 && s2 && (
- s1->charset != s2->charset ||
- s1->encoding != s2->encoding)) {
+ if (s1->hashval != s2->hashval)
return 1;
- }
-
- return hash_compare_string(interp, search_key, bucket_key);
+ if (s1 && s2 && s1->encoding != s2->encoding)
+ return 1;
+ else
+ return memcmp(s1->strstart, s2->strstart, s1->bufused);
}
/*
-=item C<int hash_compare_pointer(PARROT_INTERP, const void *a, const void *b)>
+=item C<static int hash_compare_pointer(PARROT_INTERP, const void *a, const void
+*b)>
Compares the two pointers, returning 0 if they are identical
@@ -209,8 +319,9 @@
*/
PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-int
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int
hash_compare_pointer(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b))
{
ASSERT_ARGS(hash_compare_pointer)
@@ -230,7 +341,8 @@
*/
PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
+PARROT_PURE_FUNCTION
+PARROT_INLINE
static size_t
key_hash_pointer(SHIM_INTERP, ARGIN(const void *value), size_t seed)
{
@@ -257,18 +369,17 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
+PARROT_INLINE
static size_t
key_hash_cstring(SHIM_INTERP, ARGIN(const void *value), size_t seed)
{
ASSERT_ARGS(key_hash_cstring)
- const unsigned char * p = (const unsigned char *) value;
- register size_t h = seed;
-
+ const unsigned char *p = (const unsigned char *) value;
+ size_t h = seed;
while (*p) {
h += h << 5;
h += *p++;
}
-
return h;
}
@@ -287,6 +398,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
+PARROT_INLINE
static int
hash_compare_cstring(SHIM_INTERP, ARGIN(const char *a), ARGIN(const char *b))
{
@@ -297,7 +409,7 @@
/*
-=item C<size_t key_hash_PMC(PARROT_INTERP, PMC *value, size_t seed)>
+=item C<static size_t key_hash_PMC(PARROT_INTERP, PMC *value, size_t seed)>
Returns a hashed value for an PMC key (passed as a void pointer, sadly).
@@ -307,7 +419,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
-size_t
+PARROT_INLINE
+static size_t
key_hash_PMC(PARROT_INTERP, ARGIN(PMC *value), SHIM(size_t seed))
{
ASSERT_ARGS(key_hash_PMC)
@@ -316,7 +429,7 @@
/*
-=item C<int hash_compare_pmc(PARROT_INTERP, PMC *a, PMC *b)>
+=item C<static int hash_compare_pmc(PARROT_INTERP, PMC *a, PMC *b)>
Compares two PMC for equality, returning 0 if the first is equal to second.
Uses void pointers to store the PMC, sadly.
@@ -327,7 +440,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_PURE_FUNCTION
-int
+PARROT_INLINE
+static int
hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b))
{
ASSERT_ARGS(hash_compare_pmc)
@@ -345,7 +459,8 @@
/*
-=item C<size_t key_hash_int(PARROT_INTERP, const void *value, size_t seed)>
+=item C<static size_t key_hash_int(PARROT_INTERP, const void *value, size_t
+seed)>
Returns a hashed value for an integer key (passed as a void pointer, sadly).
@@ -354,8 +469,9 @@
*/
PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-size_t
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t
key_hash_int(SHIM_INTERP, ARGIN_NULLOK(const void *value), size_t seed)
{
ASSERT_ARGS(key_hash_int)
@@ -364,7 +480,8 @@
/*
-=item C<int hash_compare_int(PARROT_INTERP, const void *a, const void *b)>
+=item C<static int hash_compare_int(PARROT_INTERP, const void *a, const void
+*b)>
Compares two integers for equality, returning -1, 0, and 1 if the first is less
than, equal to, or greater than the second, respectively. Uses void pointers
@@ -375,8 +492,9 @@
*/
PARROT_WARN_UNUSED_RESULT
-PARROT_CONST_FUNCTION
-int
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int
hash_compare_int(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b))
{
ASSERT_ARGS(hash_compare_int)
@@ -385,6 +503,80 @@
/*
+=item C<static size_t key_hash(PARROT_INTERP, const Hash *hash, void *key)>
+
+Generic function to get the hashvalue of a given key. It may dispatches to
+key_hash_STRING, key_hash_cstring, etc. depending on hash->key_type.
+
+=cut
+
+*/
+
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static size_t
+key_hash(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(void *key))
+{
+ ASSERT_ARGS(key_hash)
+
+ if (hash->key_type == Hash_key_type_STRING
+ || hash->key_type == Hash_key_type_STRING_enc)
+ return key_hash_STRING(interp, (STRING *)key, hash->seed);
+
+ if (hash->key_type == Hash_key_type_cstring)
+ return key_hash_cstring(interp, (char *)key, hash->seed);
+
+ if (hash->key_type == Hash_key_type_PMC)
+ return VTABLE_hashvalue(interp, (PMC *)key);
+
+ return ((size_t) key) ^ hash->seed;
+
+}
+
+/*
+
+=item C<static int hash_compare(PARROT_INTERP, const Hash *hash, void *a, void
+*b)>
+
+Generic function to compare values. It may dispatches to
+hash_compare_string, hash_compare_cstring, etc. depending on hash->key_type.
+
+=cut
+
+*/
+
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_PURE_FUNCTION
+PARROT_INLINE
+static int
+hash_compare(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(void *a),
+ ARGIN_NULLOK(void *b))
+{
+ ASSERT_ARGS(hash_compare)
+
+ if (a == b)
+ return 0;
+
+ if (hash->key_type == Hash_key_type_STRING)
+ return hash_compare_string(interp, (STRING *)a, (STRING *)b);
+
+ if (hash->key_type == Hash_key_type_STRING_enc)
+ return hash_compare_string_enc(interp, (STRING *)a, (STRING *)b);
+
+ if (hash->key_type == Hash_key_type_cstring)
+ return strcmp((char *)a, (char *)b);
+
+ if (hash->key_type == Hash_key_type_PMC)
+ return hash_compare_pmc(interp, (PMC *)a, (PMC *) b);
+
+ return 1;
+}
+
+/*
+
=item C<void parrot_dump_hash(PARROT_INTERP, const Hash *hash)>
Prints out the hash in human-readable form, at least once someone implements
@@ -426,7 +618,9 @@
mark_value = 1;
if (hash->key_type == Hash_key_type_STRING
- || hash->key_type == Hash_key_type_PMC)
+ || hash->key_type == Hash_key_type_STRING_enc
+ || hash->key_type == Hash_key_type_PMC
+ || hash->key_type == Hash_key_type_PMC_ptr)
mark_key = 1;
if (mark_key) {
@@ -456,9 +650,18 @@
parrot_mark_hash_keys(PARROT_INTERP, ARGIN(Hash *hash))
{
ASSERT_ARGS(parrot_mark_hash_keys)
- parrot_hash_iterate(hash,
- PARROT_ASSERT(_bucket->key);
- Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->key););
+
+ if (hash->key_type == Hash_key_type_STRING
+ || hash->key_type == Hash_key_type_STRING_enc) {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->key);
+ Parrot_gc_mark_STRING_alive(interp, (STRING *)_bucket->key););
+ }
+ else {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->key);
+ Parrot_gc_mark_PMC_alive(interp, (PMC *)_bucket->key););
+ }
}
@@ -476,9 +679,17 @@
parrot_mark_hash_values(PARROT_INTERP, ARGIN(Hash *hash))
{
ASSERT_ARGS(parrot_mark_hash_values)
- parrot_hash_iterate(hash,
- PARROT_ASSERT(_bucket->value);
- Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->value););
+
+ if (hash->entry_type == (PARROT_DATA_TYPE) enum_hash_string) {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->value);
+ Parrot_gc_mark_STRING_alive(interp, (STRING *)_bucket->value););
+ }
+ else if (hash->entry_type == (PARROT_DATA_TYPE) enum_hash_pmc) {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->value);
+ Parrot_gc_mark_PMC_alive(interp, (PMC *)_bucket->value););
+ }
}
@@ -496,11 +707,23 @@
parrot_mark_hash_both(PARROT_INTERP, ARGIN(Hash *hash))
{
ASSERT_ARGS(parrot_mark_hash_both)
- parrot_hash_iterate(hash,
- PARROT_ASSERT(_bucket->key);
- Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->key);
- PARROT_ASSERT(_bucket->value);
- Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->value););
+
+ if ((hash->key_type == Hash_key_type_STRING
+ || hash->key_type == Hash_key_type_STRING_enc)
+ && hash->entry_type == (PARROT_DATA_TYPE) enum_hash_pmc) {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->key);
+ Parrot_gc_mark_STRING_alive(interp, (STRING *)_bucket->key);
+ PARROT_ASSERT(_bucket->value);
+ Parrot_gc_mark_PMC_alive(interp, (PMC *)_bucket->value););
+ }
+ else {
+ parrot_hash_iterate(hash,
+ PARROT_ASSERT(_bucket->key);
+ Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->key);
+ PARROT_ASSERT(_bucket->value);
+ Parrot_gc_mark_PObj_alive(interp, (PObj *)_bucket->value););
+ }
}
/*
@@ -527,34 +750,7 @@
const Hash_key_type key_type = (Hash_key_type)VTABLE_shift_integer(interp, info);
const PARROT_DATA_TYPE entry_type = (PARROT_DATA_TYPE)VTABLE_shift_integer(interp, info);
size_t entry_index;
- Hash *hash;
-
- {
- hash_comp_fn cmp_fn;
- hash_hash_key_fn key_fn;
-
- switch (key_type) {
- case Hash_key_type_int:
- key_fn = (hash_hash_key_fn)key_hash_int;
- cmp_fn = (hash_comp_fn)hash_compare_int;
- break;
- case Hash_key_type_STRING:
- key_fn = (hash_hash_key_fn)key_hash_STRING;
- cmp_fn = (hash_comp_fn)hash_compare_string;
- break;
- case Hash_key_type_PMC:
- key_fn = (hash_hash_key_fn)key_hash_PMC;
- cmp_fn = (hash_comp_fn)hash_compare_pmc;
- break;
- default:
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
- "unimplemented key type");
- break;
- }
-
- hash = parrot_create_hash_sized(interp, entry_type, key_type, cmp_fn, key_fn, num_entries);
-
- }
+ Hash *hash = parrot_create_hash_sized(interp, entry_type, key_type, num_entries);
/* special case for great speed */
if (key_type == Hash_key_type_STRING
@@ -579,12 +775,14 @@
}
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
{
STRING * const s_key = VTABLE_shift_string(interp, info);
key = (void *)s_key;
}
break;
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
{
PMC * const p_key = VTABLE_shift_pmc(interp, info);
key = (void *)p_key;
@@ -658,9 +856,11 @@
VTABLE_push_integer(interp, info, (INTVAL)_bucket->key);
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
VTABLE_push_string(interp, info, (STRING *)_bucket->key);
break;
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
VTABLE_push_pmc(interp, info, (PMC *)_bucket->key);
break;
default:
@@ -721,20 +921,18 @@
expand_hash(PARROT_INTERP, ARGMOD(Hash *hash))
{
ASSERT_ARGS(expand_hash)
- HashBucket **old_bi, **new_bi;
- HashBucket *bs, *b, *new_mem;
- HashBucket * const old_offset = (HashBucket *)((char *)hash + sizeof (Hash));
+ HashBucket **new_index, **index;
+ HashBucket *new_buckets, *bucket;
+
+ HashBucket * const initial_offset = (HashBucket *)((char *)hash + sizeof (Hash));
+ void * new_mem;
void * const old_mem = hash->buckets;
const UINTVAL old_size = hash->mask + 1;
- const UINTVAL new_size = old_size << 1; /* Double. Right-shift is 2x */
- const UINTVAL old_nb = N_BUCKETS(old_size);
- const UINTVAL new_nb = N_BUCKETS(new_size);
+ const UINTVAL new_size = old_size << 1; /* Double. Right-shift is 2x */
+ const UINTVAL new_mask = new_size - 1;
size_t offset, i;
- const hash_hash_key_fn hash_val_func = hash->hash_val;
- const int is_string_key = (hash_val_func == (hash_hash_key_fn)key_hash_STRING);
-
/*
allocate some less buckets
e.g. 3 buckets, 4 pointers:
@@ -747,86 +945,103 @@
*/
/* resize mem */
- if (old_offset != old_mem) {
+ if (initial_offset != old_mem) {
/* This buffer has been reallocated at least once before. */
- new_mem = (HashBucket *)Parrot_gc_reallocate_memory_chunk_with_interior_pointers(
- interp, old_mem, HASH_ALLOC_SIZE(new_size), HASH_ALLOC_SIZE(old_size));
+ new_mem = Parrot_gc_reallocate_memory_chunk_with_interior_pointers(
+ interp, old_mem,
+ HASH_ALLOC_SIZE(new_size),
+ HASH_ALLOC_SIZE(old_size));
+
+ new_buckets = (HashBucket *) new_mem;
+ new_index = (HashBucket **)(new_buckets + N_BUCKETS(new_size));
+
+ offset = (char *)new_mem - (char *)old_mem;
+
+ /* old index is here */
+ index = (HashBucket **)(new_buckets + N_BUCKETS(old_size));
+ /* reallocate index */
+ mem_sys_memcopy(new_index, index, sizeof (HashBucket *) * old_size);
+
+ /* clear second half of the buckets, freed by old the index */
+ memset(new_buckets + N_BUCKETS(old_size), 0,
+ sizeof (HashBucket *) * old_size);
}
else {
/* Allocate a new buffer. */
- new_mem = (HashBucket *)Parrot_gc_allocate_memory_chunk_with_interior_pointers(
+ new_mem = Parrot_gc_allocate_memory_chunk_with_interior_pointers(
interp, HASH_ALLOC_SIZE(new_size));
- memcpy(new_mem, old_mem, HASH_ALLOC_SIZE(old_size));
+
+ new_buckets = (HashBucket *) new_mem;
+ new_index = (HashBucket **)(new_buckets + N_BUCKETS(new_size));
+
+ offset = (char *)new_buckets - (char *)hash->buckets;
+
+ mem_sys_memcopy(new_buckets, hash->buckets ,
+ N_BUCKETS(old_size) * sizeof (HashBucket));
+ mem_sys_memcopy(new_index, hash->index,
+ sizeof (HashBucket *) * old_size);
}
+
/*
+---+---+---+---+---+---+-+-+-+-+-+-+-+-+
- | buckets | old_bi | new_bi |
+ | buckets | old_index | new_index |
+---+---+---+---+---+---+-+-+-+-+-+-+-+-+
^ ^
| new_mem | hash->index
*/
- bs = new_mem;
- old_bi = (HashBucket **)(bs + old_nb);
- new_bi = (HashBucket **)(bs + new_nb);
-
- /* things can have moved by this offset */
- offset = (char *)new_mem - (char *)old_mem;
-
- /* relocate the bucket index */
- mem_sys_memmove(new_bi, old_bi, old_size * sizeof (HashBucket *));
-
/* update hash data */
- hash->index = new_bi;
- hash->buckets = bs;
- hash->mask = new_size - 1;
-
- /* clear freshly allocated bucket index */
- memset(new_bi + old_size, 0, sizeof (HashBucket *) * (new_size - old_size));
+ hash->index = new_index;
+ hash->buckets = new_buckets;
+ hash->mask = new_mask;
/* reloc pointers and recalc bucket indices */
for (i = 0; i < old_size; ++i) {
- HashBucket **next_p = new_bi + i;
+ index = new_index + i;
- while (*next_p != NULL) {
+ while (*index != NULL) {
size_t new_loc;
size_t hashval;
- b = (HashBucket *)((char *)*next_p + offset);
+ bucket = (HashBucket *)((char *)*index + offset);
/* rehash the bucket */
- if (is_string_key) {
- STRING *s = (STRING *)b->key;
+ if (hash->key_type == Hash_key_type_STRING
+ || hash->key_type == Hash_key_type_STRING_enc) {
+ STRING *s = (STRING *)bucket->key;
hashval = s->hashval;
}
else {
- hashval = hash_val_func(interp, b->key, hash->seed);
+ hashval = key_hash(interp, hash, bucket->key);
}
- new_loc = hashval & (new_size - 1);
+ new_loc = hashval & new_mask;
if (i != new_loc) {
- *next_p = b->next;
- b->next = new_bi[new_loc];
- new_bi[new_loc] = b;
+ *index = bucket->next;
+ bucket->next = new_index[new_loc];
+ new_index[new_loc] = bucket;
}
else {
- *next_p = b;
- next_p = &b->next;
+ *index = bucket;
+ index = &bucket->next;
}
}
}
/* add new buckets to free_list
* lowest bucket is top on free list and will be used first */
- for (b = bs + old_nb; b < bs + new_nb - 1; ++b) {
- b->next = b + 1;
- b->key = b->value = NULL;
+
+ bucket = new_buckets + N_BUCKETS(old_size);
+
+ for (; bucket < new_buckets + N_BUCKETS(new_size) - 1; ++bucket) {
+ bucket->next = bucket + 1;
+ bucket->key = bucket->value = NULL;
}
- b->next = hash->free_list;
- hash->free_list = bs + old_nb;
+ hash->free_list = new_buckets + N_BUCKETS(old_size);
+ bucket->next = NULL;
}
@@ -848,9 +1063,7 @@
ASSERT_ARGS(parrot_new_hash)
return parrot_create_hash(interp,
enum_type_PMC,
- Hash_key_type_STRING,
- hash_compare_string,
- (hash_hash_key_fn)key_hash_STRING);
+ Hash_key_type_STRING);
}
@@ -872,9 +1085,7 @@
ASSERT_ARGS(parrot_new_cstring_hash)
return parrot_create_hash(interp,
enum_type_PMC,
- Hash_key_type_cstring,
- (hash_comp_fn)hash_compare_cstring,
- (hash_hash_key_fn)key_hash_cstring);
+ Hash_key_type_cstring);
}
@@ -896,9 +1107,7 @@
ASSERT_ARGS(parrot_new_pointer_hash)
return parrot_create_hash(interp,
enum_type_ptr,
- Hash_key_type_ptr,
- hash_compare_pointer,
- key_hash_pointer);
+ Hash_key_type_ptr);
}
@@ -923,15 +1132,13 @@
ASSERT_ARGS(parrot_new_intval_hash)
return parrot_create_hash(interp,
enum_type_INTVAL,
- Hash_key_type_int,
- hash_compare_int,
- key_hash_int);
+ Hash_key_type_int);
}
/*
=item C<Hash * parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type,
-Hash_key_type hkey_type, hash_comp_fn compare, hash_hash_key_fn keyhash)>
+Hash_key_type hkey_type)>
Creates and initializes a hash. Function pointers determine its behaviors.
@@ -945,12 +1152,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_MALLOC
Hash *
-parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type,
- NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash))
+parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type)
{
ASSERT_ARGS(parrot_create_hash)
- return parrot_create_hash_sized(interp, val_type, hkey_type, compare, keyhash,
- INITIAL_SIZE);
+ return parrot_create_hash_sized(interp, val_type, hkey_type, INITIAL_SIZE);
}
@@ -977,8 +1182,7 @@
/*
=item C<Hash * parrot_create_hash_sized(PARROT_INTERP, PARROT_DATA_TYPE
-val_type, Hash_key_type hkey_type, hash_comp_fn compare, hash_hash_key_fn
-keyhash, UINTVAL size)>
+val_type, Hash_key_type hkey_type, UINTVAL size)>
Creates and initializes a hash, similar to C<parrot_create_hash>.
@@ -993,7 +1197,7 @@
PARROT_MALLOC
Hash *
parrot_create_hash_sized(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type,
- NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash), UINTVAL size)
+ UINTVAL size)
{
ASSERT_ARGS(parrot_create_hash_sized)
UINTVAL initial_buckets = size > INITIAL_SIZE ? round_up_pow2(size) : INITIAL_SIZE;
@@ -1005,8 +1209,6 @@
PARROT_ASSERT(initial_buckets % 4 == 0);
- hash->compare = compare;
- hash->hash_val = keyhash;
hash->entry_type = val_type;
hash->key_type = hkey_type;
hash->seed = interp->hash_seed;
@@ -1148,57 +1350,53 @@
parrot_hash_get_bucket(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(const void *key))
{
ASSERT_ARGS(parrot_hash_get_bucket)
- UINTVAL hashval;
+ DECL_CONST_CAST;
HashBucket *bucket;
- const hash_hash_key_fn hash_val = hash->hash_val;
- const hash_comp_fn compare = hash->compare;
if (hash->entries <= 0)
return NULL;
- if (hash_val == (hash_hash_key_fn)key_hash_STRING
- && compare == hash_compare_string) {
- /* fast path for string keys */
- DECL_CONST_CAST;
- STRING * const s = (STRING *)PARROT_const_cast(void *, key);
+ if (hash->key_type == Hash_key_type_STRING) {
+ STRING * const s = (STRING *)PARROT_const_cast(void *, key);
+ const size_t hashval = key_hash_STRING(interp, s, hash->seed);
- if (s->hashval)
- hashval = s->hashval;
- else
- hashval = Parrot_str_to_hashval(interp, s);
-
- bucket = hash->index[hashval & hash->mask];
+ bucket = hash->index[hashval & hash->mask];
while (bucket) {
const STRING *s2 = (const STRING *)bucket->key;
- if (s == s2
- || (hashval == s2->hashval
- && CHARSET_COMPARE(interp, s, s2) == 0))
- return bucket;
+ if (s == s2)
+ break;
+ /* manually inline part of string_equal */
+ if (hashval == s2->hashval) {
+ if (s->encoding == s2->encoding){
+ if ((STRING_byte_length(s) == STRING_byte_length(s2))
+ && (memcmp(s->strstart, s2->strstart, STRING_byte_length(s)) == 0))
+ break;
+ } else if (STRING_equal(interp, s, s2))
+ break;
+ }
bucket = bucket->next;
}
}
else {
- hashval = hash_val(interp, key, hash->seed);
- bucket = hash->index[hashval & hash->mask];
+ const size_t hashval = key_hash(interp, hash,
+ PARROT_const_cast(void *, key));
+ bucket = hash->index[hashval & hash->mask];
while (bucket) {
- /* key equality is always a match, so it's worth checking */
- if (bucket->key == key
-
- /* ... but the slower comparison is more accurate */
- || ((compare)(interp, key, bucket->key) == 0))
- return bucket;
+ if (hash_compare(interp, hash,
+ PARROT_const_cast(void *, key),
+ bucket->key) == 0)
+ break;
bucket = bucket->next;
}
}
- return NULL;
+ return bucket;
}
-
/*
=item C<void * parrot_hash_get(PARROT_INTERP, const Hash *hash, const void
@@ -1262,42 +1460,36 @@
ARGIN_NULLOK(void *key), ARGIN_NULLOK(void *value))
{
ASSERT_ARGS(parrot_hash_put)
- UINTVAL hashval;
HashBucket *bucket;
- const hash_hash_key_fn hash_val = hash->hash_val;
- const hash_comp_fn compare = hash->compare;
-
- if (hash_val == (hash_hash_key_fn)key_hash_STRING
- && compare == hash_compare_string) {
- /* fast path for string keys */
- STRING *s = (STRING *)key;
-
- if (s->hashval)
- hashval = s->hashval;
- else
- hashval = Parrot_str_to_hashval(interp, s);
+ size_t hashval;
- bucket = hash->index[hashval & hash->mask];
+ if (hash->key_type == Hash_key_type_STRING) {
+ const STRING * const s = (STRING *)key;
+ hashval = key_hash_STRING(interp, s, hash->seed);
+ bucket = hash->index[hashval & hash->mask];
while (bucket) {
const STRING *s2 = (const STRING *)bucket->key;
-
- if (s == s2
- || (hashval == s2->hashval
- && CHARSET_COMPARE(interp, s, s2) == 0))
+ if (s == s2)
break;
-
+ /* manually inline part of string_equal */
+ if (hashval == s2->hashval) {
+ if (s->encoding == s2->encoding) {
+ if ((STRING_byte_length(s) == STRING_byte_length(s2))
+ && (memcmp(s->strstart, s2->strstart, STRING_byte_length(s)) == 0))
+ break;
+ } else if (STRING_equal(interp, s, s2))
+ break;
+ }
bucket = bucket->next;
}
}
else {
- hashval = hash_val(interp, key, hash->seed);
+ hashval = key_hash(interp, hash, key);
bucket = hash->index[hashval & hash->mask];
- /* See if we have an existing value for this key */
while (bucket) {
- /* store hash_val or not */
- if (compare(interp, key, bucket->key) == 0)
+ if (hash_compare(interp, hash, key, bucket->key) == 0)
break;
bucket = bucket->next;
}
@@ -1310,18 +1502,17 @@
else {
/* Get a new bucket off the free list. If the free list is empty, we
expand the hash so we get more items on the free list */
- bucket = hash->free_list;
- if (!bucket) {
+ if (!hash->free_list)
expand_hash(interp, hash);
- bucket = hash->free_list;
- }
+
+ bucket = hash->free_list;
/* Add the value to the new bucket, increasing the count of elements */
++hash->entries;
- hash->free_list = bucket->next;
- bucket->key = key;
- bucket->value = value;
- bucket->next = hash->index[hashval & hash->mask];
+ hash->free_list = bucket->next;
+ bucket->key = key;
+ bucket->value = value;
+ bucket->next = hash->index[hashval & hash->mask];
hash->index[hashval & hash->mask] = bucket;
}
@@ -1344,13 +1535,12 @@
parrot_hash_delete(PARROT_INTERP, ARGMOD(Hash *hash), ARGIN(void *key))
{
ASSERT_ARGS(parrot_hash_delete)
- const UINTVAL hashval = (hash->hash_val)(interp, key, hash->seed) & hash->mask;
+ const UINTVAL hashval = key_hash(interp, hash, key) & hash->mask;
HashBucket **prev = &hash->index[hashval];
if (*prev) {
- const hash_comp_fn compare = hash->compare;
for (; *prev; prev = &(*prev)->next) {
HashBucket *current = *prev;
- if ((compare)(interp, key, current->key) == 0) {
+ if (hash_compare(interp, hash, key, current->key) == 0) {
*prev = current->next;
--hash->entries;
current->next = hash->free_list;
@@ -1405,12 +1595,6 @@
void * const key = _bucket->key;
switch (hash->entry_type) {
- case enum_type_undef:
- case enum_type_ptr:
- case enum_type_INTVAL:
- valtmp = (void *)_bucket->value;
- break;
-
case enum_type_STRING:
valtmp = _bucket->value;
break;
@@ -1425,6 +1609,12 @@
valtmp = _bucket->value;
break;
+ case enum_type_undef:
+ case enum_type_ptr:
+ case enum_type_INTVAL:
+ valtmp = (void *)_bucket->value;
+ break;
+
default:
valtmp = NULL; /* avoid warning */
Parrot_ex_throw_from_c_args(interp, NULL, -1,
@@ -1532,9 +1722,11 @@
break;
/* Currently PMCs are stringified */
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
ret = (void *)get_integer_pmc(interp, key);
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
ret = (void *)Parrot_str_from_int(interp, key);
break;
default:
@@ -1571,10 +1763,12 @@
}
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
ret = get_string_pmc(interp, key);
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
ret = key;
break;
@@ -1609,6 +1803,7 @@
break;
}
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
{
/* Extract real value from Key (and box it if nessary) */
if (key->vtable->base_type == enum_class_Key)
@@ -1637,6 +1832,7 @@
break;
}
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
{
STRING * const tmp = VTABLE_get_string(interp, key);
if (STRING_IS_NULL(tmp))
@@ -1672,9 +1868,11 @@
ret = (INTVAL)key;
break;
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
ret = VTABLE_get_integer(interp, (PMC *)key);
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
ret = Parrot_str_to_int(interp, (STRING *)key);
break;
default:
@@ -1706,10 +1904,12 @@
break;
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
ret = VTABLE_get_string(interp, (PMC *)key);
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
ret = (STRING *)key;
break;
@@ -1741,9 +1941,11 @@
ret = get_integer_pmc(interp, (INTVAL)key);
break;
case Hash_key_type_PMC:
+ case Hash_key_type_PMC_ptr:
ret = (PMC*)key;
break;
case Hash_key_type_STRING:
+ case Hash_key_type_STRING_enc:
ret = get_string_pmc(interp, (STRING*)key);
break;
default:
Modified: branches/gc_massacre/src/hll.c
==============================================================================
--- branches/gc_massacre/src/hll.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/hll.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -329,21 +329,26 @@
INTVAL core_type, INTVAL hll_type)
{
ASSERT_ARGS(Parrot_register_HLL_type)
- PMC *entry, *type_hash;
- PMC *hll_info = interp->HLL_info;
- const INTVAL n = VTABLE_elements(interp, hll_info);
- if (hll_id >= n)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_GLOBAL_NOT_FOUND,
- "no such HLL ID (%vd)", hll_id);
-
- entry = VTABLE_get_pmc_keyed_int(interp, hll_info, hll_id);
- PARROT_ASSERT(!PMC_IS_NULL(entry));
-
- type_hash = VTABLE_get_pmc_keyed_int(interp, entry, e_HLL_typemap);
- PARROT_ASSERT(!PMC_IS_NULL(type_hash));
+ if (hll_id == Parrot_get_HLL_id(interp, CONST_STRING(interp, "parrot")))
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "Cannot map without an HLL");
+ else {
+ PMC *hll_info = interp->HLL_info;
+ const INTVAL n = VTABLE_elements(interp, hll_info);
+ if (hll_id >= n)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_GLOBAL_NOT_FOUND,
+ "no such HLL ID (%vd)", hll_id);
+ else {
+ PMC *type_hash;
+ PMC *entry = VTABLE_get_pmc_keyed_int(interp, hll_info, hll_id);
+ PARROT_ASSERT(!PMC_IS_NULL(entry));
+ type_hash = VTABLE_get_pmc_keyed_int(interp, entry, e_HLL_typemap);
+ PARROT_ASSERT(!PMC_IS_NULL(type_hash));
- VTABLE_set_integer_keyed_int(interp, type_hash, core_type, hll_type);
+ VTABLE_set_integer_keyed_int(interp, type_hash, core_type, hll_type);
+ }
+ }
}
/*
Modified: branches/gc_massacre/src/interp/inter_create.c
==============================================================================
--- branches/gc_massacre/src/interp/inter_create.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/interp/inter_create.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -256,14 +256,10 @@
Parrot_runcore_init(interp);
/* Load the core op func and info tables */
- interp->op_lib = PARROT_CORE_OPLIB_INIT(interp, 1);
- interp->op_count = interp->op_lib->op_count;
- interp->op_func_table = interp->op_lib->op_func_table;
- interp->op_info_table = interp->op_lib->op_info_table;
- interp->all_op_libs = NULL;
- interp->evc_func_table = NULL;
- interp->save_func_table = NULL;
- interp->code = NULL;
+ interp->all_op_libs = NULL;
+ interp->evc_func_table = NULL;
+ interp->evc_func_table_size = 0;
+ interp->code = NULL;
/* And a dynamic environment stack */
/* TODO: We should really consider removing this (TT #876) */
@@ -447,7 +443,8 @@
if (interp->evc_func_table) {
mem_gc_free(interp, interp->evc_func_table);
- interp->evc_func_table = NULL;
+ interp->evc_func_table = NULL;
+ interp->evc_func_table_size = 0;
}
/* strings, charsets, encodings - only once */
Modified: branches/gc_massacre/src/interp/inter_misc.c
==============================================================================
--- branches/gc_massacre/src/interp/inter_misc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/interp/inter_misc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -48,13 +48,13 @@
{
ASSERT_ARGS(register_nci_method)
PMC * const method = Parrot_pmc_new(interp, enum_class_NCI);
- STRING * const method_name = string_make(interp, name, strlen(name),
- NULL, PObj_constant_FLAG|PObj_external_FLAG);
+ STRING * const method_name = Parrot_str_new_init(interp, name, strlen(name),
+ Parrot_default_encoding_ptr, PObj_constant_FLAG|PObj_external_FLAG);
/* create call func */
VTABLE_set_pointer_keyed_str(interp, method,
- string_make(interp, proto, strlen(proto), NULL,
- PObj_constant_FLAG|PObj_external_FLAG),
+ Parrot_str_new_init(interp, proto, strlen(proto),
+ Parrot_default_encoding_ptr, PObj_constant_FLAG|PObj_external_FLAG),
func);
/* insert it into namespace */
Modified: branches/gc_massacre/src/io/api.c
==============================================================================
--- branches/gc_massacre/src/io/api.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/api.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -335,7 +335,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
"Cannot read from a closed or non-readable filehandle");
- result = Parrot_str_new_noinit(interp, enum_stringrep_one, length);
+ result = Parrot_str_new_noinit(interp, length);
result->bufused = length;
if (Parrot_io_is_encoding(interp, pmc, CONST_STRING(interp, "utf8")))
Modified: branches/gc_massacre/src/io/buffer.c
==============================================================================
--- branches/gc_massacre/src/io/buffer.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/buffer.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -232,7 +232,7 @@
char *buf = (char *) Parrot_io_get_buffer_start(interp, filehandle);
size_t size = Parrot_io_get_buffer_size(interp, filehandle);
STRING *s = Parrot_str_new_init(interp, buf, size,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_external_FLAG);
size_t got = PIO_READ(interp, filehandle, &s);
@@ -293,7 +293,7 @@
return Parrot_io_readline_buffer(interp, filehandle, buf);
if (*buf == NULL)
- *buf = Parrot_str_new_noinit(interp, enum_stringrep_one, 2048);
+ *buf = Parrot_str_new_noinit(interp, 2048);
s = *buf;
len = s->bufused;
@@ -338,7 +338,7 @@
if (len >= Parrot_io_get_buffer_size(interp, filehandle)) {
STRING *sf = Parrot_str_new_init(interp, (char *)out_buf, len,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_external_FLAG);
got = PIO_READ(interp, filehandle, &sf);
s->strlen = s->bufused = current + got;
Modified: branches/gc_massacre/src/io/filehandle.c
==============================================================================
--- branches/gc_massacre/src/io/filehandle.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/filehandle.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -121,7 +121,7 @@
* when we get a NULL string, we read a default len
*/
if (*buf == NULL) {
- *buf = Parrot_str_new_noinit(interp, enum_stringrep_one, len);
+ *buf = Parrot_str_new_noinit(interp, len);
return *buf;
}
else {
Modified: branches/gc_massacre/src/io/socket_unix.c
==============================================================================
--- branches/gc_massacre/src/io/socket_unix.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/socket_unix.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -352,7 +352,8 @@
/* The charset should probably be 'binary', but right now httpd.pir
* only works with 'ascii'
*/
- *s = string_make(interp, buf, bytesread, "ascii", 0);
+ *s = Parrot_str_new_init(interp, buf, bytesread,
+ Parrot_ascii_encoding_ptr, 0);
return bytesread;
}
else {
@@ -369,11 +370,11 @@
case ECONNRESET:
/* XXX why close it on err return result is -1 anyway */
close(io->os_handle);
- *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ *s = Parrot_str_new_noinit(interp, 0);
return -1;
default:
close(io->os_handle);
- *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ *s = Parrot_str_new_noinit(interp, 0);
return -1;
}
}
Modified: branches/gc_massacre/src/io/socket_win32.c
==============================================================================
--- branches/gc_massacre/src/io/socket_win32.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/socket_win32.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -302,7 +302,8 @@
/* The charset should probably be 'binary', but right now httpd.pir
* only works with 'ascii'
*/
- *s = string_make(interp, buf, bytesread, "ascii", 0);
+ *s = Parrot_str_new_init(interp, buf, bytesread,
+ Parrot_ascii_encoding_ptr, 0);
return bytesread;
}
else {
@@ -319,11 +320,11 @@
case WSAECONNRESET:
/* XXX why close it on err return result is -1 anyway */
close((int)io->os_handle);
- *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ *s = Parrot_str_new_noinit(interp, 0);
return -1;
default:
close((int)io->os_handle);
- *s = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ *s = Parrot_str_new_noinit(interp, 0);
return -1;
}
}
Modified: branches/gc_massacre/src/io/utf8.c
==============================================================================
--- branches/gc_massacre/src/io/utf8.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/io/utf8.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -53,7 +53,6 @@
size_t len = Parrot_io_read_buffer(interp, filehandle, buf);
s = *buf;
- s->charset = Parrot_unicode_charset_ptr;
s->encoding = Parrot_utf8_encoding_ptr;
/* count chars, verify utf8 */
@@ -74,8 +73,8 @@
/* need len - 1 more chars */
--len2;
- s2 = Parrot_str_new_init(interp, NULL, len2, Parrot_utf8_encoding_ptr,
- Parrot_unicode_charset_ptr, 0);
+ s2 = Parrot_str_new_init(interp, NULL, len2,
+ Parrot_utf8_encoding_ptr, 0);
s2->bufused = len2;
read = Parrot_io_read_buffer(interp, filehandle, &s2);
Modified: branches/gc_massacre/src/library.c
==============================================================================
--- branches/gc_massacre/src/library.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/library.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -345,7 +345,7 @@
const char * const file_name = (const char *)file->strstart;
if (file->strlen <= 1)
return 0;
- PARROT_ASSERT(file->encoding == Parrot_fixed_8_encoding_ptr ||
+ PARROT_ASSERT(STRING_max_bytes_per_codepoint(file) == 1 ||
file->encoding == Parrot_utf8_encoding_ptr);
/* XXX ../foo, ./bar */
@@ -380,12 +380,8 @@
cnv_to_win32_filesep(ARGMOD(STRING *path))
{
ASSERT_ARGS(cnv_to_win32_filesep)
- char* cnv;
+ char *cnv = path->strstart;
- PARROT_ASSERT(path->encoding == Parrot_fixed_8_encoding_ptr ||
- path->encoding == Parrot_utf8_encoding_ptr);
-
- cnv = path->strstart;
while ((cnv = strchr(cnv, path_separator)) != NULL)
*cnv = win32_path_separator;
}
@@ -788,46 +784,6 @@
/*
-=item C<char* Parrot_get_runtime_prefix(PARROT_INTERP)>
-
-Return a malloced C-string for the runtime prefix. The calling function
-must free it.
-
-This function is deprecated, use Parrot_get_runtime_path instead.
-See TT #1191
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-char*
-Parrot_get_runtime_prefix(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_get_runtime_prefix)
- char * const env = Parrot_getenv(interp, CONST_STRING(interp, "PARROT_RUNTIME"));
-
- Parrot_warn_deprecated(interp, "Parrot_get_runtime_prefix is deprecated TT #1191");
- if (env)
- return env;
- else {
- PMC * const config_hash =
- VTABLE_get_pmc_keyed_int(interp, interp->iglobals, (INTVAL) IGLOBALS_CONFIG_HASH);
-
- if (VTABLE_elements(interp, config_hash)) {
- STRING * const key = CONST_STRING(interp, "prefix");
- STRING * const s = VTABLE_get_string_keyed_str(interp, config_hash, key);
- return Parrot_str_to_cstring(interp, s);
- }
- else
- return mem_sys_strdup(".");
- }
-}
-
-/*
-
=item C<STRING * Parrot_get_runtime_path(PARROT_INTERP)>
Return a string for the runtime prefix.
@@ -887,23 +843,21 @@
/* This is a quick fix for TT #65
* TODO: redo it with the string reimplementation
*/
- const char * charset = Parrot_charset_c_name(interp,
- Parrot_charset_number_of_str(interp, in));
- STRING * const slash1 = string_make(interp, "/", 1, charset,
- PObj_external_FLAG|PObj_constant_FLAG);
- STRING * const slash2 = string_make(interp, "\\", 1, charset,
- PObj_external_FLAG|PObj_constant_FLAG);
- STRING * const dot = string_make(interp, ".", 1, charset,
- PObj_external_FLAG|PObj_constant_FLAG);
+ STRING * const slash1 = Parrot_str_new_init(interp, "/", 1,
+ in->encoding, PObj_external_FLAG|PObj_constant_FLAG);
+ STRING * const slash2 = Parrot_str_new_init(interp, "\\", 1,
+ in->encoding, PObj_external_FLAG|PObj_constant_FLAG);
+ STRING * const dot = Parrot_str_new_init(interp, ".", 1,
+ in->encoding, PObj_external_FLAG|PObj_constant_FLAG);
const INTVAL len = Parrot_str_byte_length(interp, in);
STRING *stem;
INTVAL pos_sl, pos_dot;
- pos_sl = CHARSET_RINDEX(interp, in, slash1, len);
+ pos_sl = STRING_rindex(interp, in, slash1, len);
if (pos_sl == -1)
- pos_sl = CHARSET_RINDEX(interp, in, slash2, len);
- pos_dot = CHARSET_RINDEX(interp, in, dot, len);
+ pos_sl = STRING_rindex(interp, in, slash2, len);
+ pos_dot = STRING_rindex(interp, in, dot, len);
/* ignore dot in directory name */
if (pos_dot != -1 && pos_dot < pos_sl)
Modified: branches/gc_massacre/src/misc.c
==============================================================================
--- branches/gc_massacre/src/misc.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/misc.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -87,8 +87,8 @@
Parrot_vsprintf_c(PARROT_INTERP, ARGIN(const char *pat), va_list args)
{
ASSERT_ARGS(Parrot_vsprintf_c)
- STRING * const realpat = string_make(interp, pat, strlen(pat),
- NULL, PObj_external_FLAG);
+ STRING * const realpat = Parrot_str_new_init(interp, pat, strlen(pat),
+ Parrot_default_encoding_ptr, PObj_external_FLAG);
STRING * const ret = Parrot_vsprintf_s(interp, realpat, args);
Modified: branches/gc_massacre/src/namespace.c
==============================================================================
--- branches/gc_massacre/src/namespace.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/namespace.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2004-2009, Parrot Foundation.
+Copyright (C) 2004-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -131,9 +131,12 @@
ARGIN(STRING *key), int flags)
{
ASSERT_ARGS(internal_ns_keyed_str)
- PMC * const ns = VTABLE_get_pmc_keyed_str(interp, base_ns, key);
+ PMC * const ns = VTABLE_get_pmc_keyed_str(interp, base_ns, key);
+ STRING * const namesp = CONST_STRING(interp, "NameSpace");
- if (!PMC_IS_NULL(ns) && VTABLE_isa(interp, ns, CONST_STRING(interp, "NameSpace")))
+ if (!PMC_IS_NULL(ns)
+ && (ns->vtable->base_type == enum_class_NameSpace
+ || VTABLE_isa(interp, ns, namesp)))
return ns;
return internal_ns_maybe_create(interp, base_ns, key, flags);
@@ -200,12 +203,12 @@
{
ASSERT_ARGS(internal_ns_keyed)
- if (VTABLE_isa(interp, pmc_key, CONST_STRING(interp, "String"))) {
+ if (PMC_IS_TYPE(pmc_key, Key))
+ return internal_ns_keyed_key(interp, base_ns, pmc_key, flags);
+ else if (VTABLE_isa(interp, pmc_key, CONST_STRING(interp, "String"))) {
STRING * const str_key = VTABLE_get_string(interp, pmc_key);
return internal_ns_keyed_str(interp, base_ns, str_key, flags);
}
- else if (PMC_IS_TYPE(pmc_key, Key))
- return internal_ns_keyed_key(interp, base_ns, pmc_key, flags);
else {
/* array of strings */
STRING * const isans = CONST_STRING(interp, "NameSpace");
Modified: branches/gc_massacre/src/nci/core_thunks.c
==============================================================================
--- branches/gc_massacre/src/nci/core_thunks.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/nci/core_thunks.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -45,7 +45,7 @@
typedef double(* func_t)(PARROT_INTERP, PMC *, double);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
FLOATVAL return_data;
@@ -69,7 +69,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -93,7 +93,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, long);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -117,7 +117,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, char *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -131,7 +131,7 @@
return_data = (PMC *)(*fn_pointer)(interp, t_1);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_S_JOS(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -139,7 +139,7 @@
typedef STRING *(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
STRING * return_data;
@@ -163,7 +163,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, INTVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -185,7 +185,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -211,7 +211,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -235,7 +235,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -259,7 +259,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -283,7 +283,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -307,7 +307,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -333,7 +333,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -361,7 +361,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -387,7 +387,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -413,7 +413,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -439,7 +439,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -465,7 +465,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -489,7 +489,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -513,7 +513,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -537,7 +537,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -561,7 +561,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -587,7 +587,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -613,7 +613,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -639,7 +639,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -665,7 +665,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -689,7 +689,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -713,7 +713,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -737,7 +737,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -759,7 +759,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -781,7 +781,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *, int);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -805,7 +805,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *, int, int);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -831,7 +831,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *, int, int, int);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -859,7 +859,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *, char *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -875,7 +875,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_P_JOSSS(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -883,7 +883,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -911,7 +911,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -937,7 +937,7 @@
typedef STRING *(* func_t)(PARROT_INTERP, PMC *, INTVAL);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
STRING * return_data;
@@ -961,7 +961,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, void *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -985,7 +985,7 @@
typedef int(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -1011,7 +1011,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -1037,7 +1037,7 @@
typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
INTVAL return_data;
@@ -1065,7 +1065,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
@@ -1087,7 +1087,7 @@
typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
void * return_data;
@@ -1111,7 +1111,7 @@
typedef PMC *(* func_t)(PARROT_INTERP, int);
func_t fn_pointer;
void *orig_func;
- PMC * ctx = CURRENT_CONTEXT(interp);
+ PMC * const ctx = CURRENT_CONTEXT(interp);
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx);
PMC * ret_object = PMCNULL;
PMC * return_data;
Modified: branches/gc_massacre/src/nci/extra_thunks.c
==============================================================================
--- branches/gc_massacre/src/nci/extra_thunks.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/nci/extra_thunks.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -200,7 +200,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
@@ -304,7 +304,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -353,7 +353,7 @@
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_v_p(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -399,7 +399,7 @@
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_v_ptt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -423,8 +423,8 @@
(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_v_Jtiiipt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -451,12 +451,12 @@
(*fn_pointer)(interp, t_1, t_2, t_3, t_4, PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
-if (t_6) Parrot_str_free_cstring(t_6);
+if (!STRING_IS_NULL(ts_6)) Parrot_str_free_cstring(t_6);
}
static void
pcf_p_JttPP(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -486,8 +486,8 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
@@ -513,7 +513,7 @@
return_data = (PMC *)(*fn_pointer)(interp, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
@@ -591,7 +591,7 @@
(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_v_Jpt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -615,7 +615,7 @@
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_v_(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -1375,7 +1375,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
@@ -1431,8 +1431,8 @@
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -1459,7 +1459,7 @@
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -1488,9 +1488,9 @@
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
}
static void
@@ -1648,8 +1648,8 @@
return_data = (char *)(*fn_pointer)(t_0, t_1);
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
-if (t_1) Parrot_str_free_cstring(t_1);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_I_JOt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -1673,7 +1673,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_v_JOSI(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2033,8 +2033,8 @@
return_data = (long)(*fn_pointer)(t_0, t_1, t_2, t_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -2229,11 +2229,11 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
-if (t_4) Parrot_str_free_cstring(t_4);
-if (t_5) Parrot_str_free_cstring(t_5);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_4)) Parrot_str_free_cstring(t_4);
+if (!STRING_IS_NULL(ts_5)) Parrot_str_free_cstring(t_5);
}
static void
pcf_c_pttt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2258,9 +2258,9 @@
return_data = (char)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
}
static void
pcf_p_pttttiti(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2294,12 +2294,12 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
-if (t_4) Parrot_str_free_cstring(t_4);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_4)) Parrot_str_free_cstring(t_4);
-if (t_6) Parrot_str_free_cstring(t_6);
+if (!STRING_IS_NULL(ts_6)) Parrot_str_free_cstring(t_6);
}
static void
@@ -2323,7 +2323,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_i_ptl(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2347,7 +2347,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -2441,7 +2441,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_p_ptt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2470,8 +2470,8 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_i_pit(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2496,7 +2496,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_p_pp(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2547,8 +2547,8 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (long)(*fn_pointer)(t_0, t_1, t_2);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
-if (t_1) Parrot_str_free_cstring(t_1);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -2574,8 +2574,8 @@
return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -2597,7 +2597,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
(*fn_pointer)(t_0);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_p_pttttitl(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -2631,12 +2631,12 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
-if (t_4) Parrot_str_free_cstring(t_4);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_4)) Parrot_str_free_cstring(t_4);
-if (t_6) Parrot_str_free_cstring(t_6);
+if (!STRING_IS_NULL(ts_6)) Parrot_str_free_cstring(t_6);
}
static void
@@ -2667,9 +2667,9 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
VTABLE_set_integer_native(interp, t_3, i_3);
}
@@ -2701,7 +2701,7 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
VTABLE_set_integer_native(interp, t_3, i_3);
@@ -2735,7 +2735,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
@@ -2766,7 +2766,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, Buffer_bufstart(t_4), t_5);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
@@ -2805,7 +2805,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
@@ -2880,8 +2880,8 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
@@ -2916,7 +2916,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
@@ -3062,7 +3062,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -3118,7 +3118,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
@@ -3147,7 +3147,7 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
@@ -3177,7 +3177,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -3203,7 +3203,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, &i_2, &i_3);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
VTABLE_set_integer_native(interp, t_2, i_2);
VTABLE_set_integer_native(interp, t_3, i_3);
}
@@ -3650,7 +3650,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_i_iiti(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -3676,7 +3676,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -3728,7 +3728,7 @@
return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -4261,7 +4261,7 @@
-if (t_3) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
}
static void
pcf_i_piiti(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -4289,7 +4289,7 @@
-if (t_3) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
}
static void
@@ -4621,7 +4621,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
@@ -4648,7 +4648,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
@@ -4818,7 +4818,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (int)(*fn_pointer)(t_0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_i_ti(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -4840,7 +4840,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (int)(*fn_pointer)(t_0, t_1);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
@@ -5106,7 +5106,7 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_p_b(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -5159,7 +5159,7 @@
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_p_i(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -5411,7 +5411,7 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_p_tpp(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -5439,7 +5439,7 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
@@ -5473,13 +5473,13 @@
VTABLE_set_pointer(interp, final_destination, return_data);
}
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
-if (t_1) Parrot_str_free_cstring(t_1);
-if (t_2) Parrot_str_free_cstring(t_2);
-if (t_3) Parrot_str_free_cstring(t_3);
-if (t_4) Parrot_str_free_cstring(t_4);
-if (t_5) Parrot_str_free_cstring(t_5);
-if (t_6) Parrot_str_free_cstring(t_6);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_3)) Parrot_str_free_cstring(t_3);
+if (!STRING_IS_NULL(ts_4)) Parrot_str_free_cstring(t_4);
+if (!STRING_IS_NULL(ts_5)) Parrot_str_free_cstring(t_5);
+if (!STRING_IS_NULL(ts_6)) Parrot_str_free_cstring(t_6);
}
static void
pcf_s_(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -5642,7 +5642,7 @@
return_data = (char *)(*fn_pointer)(t_0);
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_t_tl4(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -5667,7 +5667,7 @@
return_data = (char *)(*fn_pointer)(t_0, t_1, &i_2);
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
VTABLE_set_integer_native(interp, t_2, i_2);
}
@@ -5693,7 +5693,7 @@
return_data = (char *)(*fn_pointer)(t_0, &i_1);
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
VTABLE_set_integer_native(interp, t_1, i_1);
}
static void
@@ -5857,7 +5857,7 @@
return_data = (char *)(*fn_pointer)(&t_0);
final_destination = Parrot_str_new(interp, return_data, 0);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "S", final_destination);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
}
static void
pcf_v_P(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -6069,7 +6069,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_i_Jt(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -6091,7 +6091,7 @@
return_data = (int)(*fn_pointer)(interp, t_1);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
}
static void
pcf_i_Ji(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -6392,7 +6392,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
static void
pcf_i_pppi(PARROT_INTERP, PMC *nci, SHIM(PMC *self))
@@ -6613,7 +6613,7 @@
fn_pointer = (func_t)D2FPTR(orig_func);
return_data = (int)(*fn_pointer)(t_0, &v_1);
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
- if (t_0) Parrot_str_free_cstring(t_0);
+ if (!STRING_IS_NULL(ts_0)) Parrot_str_free_cstring(t_0);
VTABLE_set_pointer(interp, t_1, v_1);
}
static void
@@ -6640,7 +6640,7 @@
return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, &v_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_1) Parrot_str_free_cstring(t_1);
+if (!STRING_IS_NULL(ts_1)) Parrot_str_free_cstring(t_1);
VTABLE_set_pointer(interp, t_3, v_3);
@@ -6695,7 +6695,7 @@
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", return_data);
-if (t_2) Parrot_str_free_cstring(t_2);
+if (!STRING_IS_NULL(ts_2)) Parrot_str_free_cstring(t_2);
}
Modified: branches/gc_massacre/src/oo.c
==============================================================================
--- branches/gc_massacre/src/oo.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/oo.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -260,8 +260,12 @@
|| base_type == enum_class_ResizableStringArray
|| base_type == enum_class_String)
type = Parrot_pmc_get_type(interp, key);
- else
+ else if (VTABLE_does(interp, key, CONST_STRING(interp, "string")) ||
+ base_type == enum_class_NameSpace)
type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
+ else
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "can't get class from an instance of class '%Ss'", VTABLE_name(interp, key));
classobj = get_pmc_proxy(interp, type);
}
Modified: branches/gc_massacre/src/ops/core_ops.c
==============================================================================
--- branches/gc_massacre/src/ops/core_ops.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/ops/core_ops.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -22854,21 +22854,21 @@
opcode_t *
Parrot_new_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ SREG(1) = Parrot_str_new_noinit(interp, 0);
return (opcode_t *)cur_opcode + 2;}
opcode_t *
Parrot_new_s_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_new_noinit(interp, enum_stringrep_one, IREG(2));
+ SREG(1) = Parrot_str_new_noinit(interp, IREG(2));
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_new_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_str_new_noinit(interp, enum_stringrep_one, cur_opcode[2]);
+ SREG(1) = Parrot_str_new_noinit(interp, cur_opcode[2]);
return (opcode_t *)cur_opcode + 3;}
@@ -23103,35 +23103,35 @@
opcode_t *
Parrot_charset_i_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_charset_number_of_str(interp, SREG(2));
+ IREG(1) = Parrot_encoding_number_of_str(interp, SREG(2));
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_charset_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- IREG(1) = Parrot_charset_number_of_str(interp, CONST(2).u.string);
+ IREG(1) = Parrot_encoding_number_of_str(interp, CONST(2).u.string);
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_charsetname_s_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_charset_name(interp, IREG(2));
+ SREG(1) = Parrot_encoding_name(interp, IREG(2));
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_charsetname_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- SREG(1) = Parrot_charset_name(interp, cur_opcode[2]);
+ SREG(1) = Parrot_encoding_name(interp, cur_opcode[2]);
return (opcode_t *)cur_opcode + 3;}
opcode_t *
Parrot_find_charset_i_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL n = Parrot_charset_number(interp, SREG(2));
+ const INTVAL n = Parrot_encoding_number(interp, SREG(2));
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_CHARTYPE,
@@ -23144,7 +23144,7 @@
opcode_t *
Parrot_find_charset_i_sc(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
- const INTVAL n = Parrot_charset_number(interp, CONST(2).u.string);
+ const INTVAL n = Parrot_encoding_number(interp, CONST(2).u.string);
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_CHARTYPE,
@@ -23597,7 +23597,8 @@
Parrot_err_s(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
const char * const tmp = strerror(errno);
- SREG(1) = string_make(interp, tmp, strlen(tmp), "ascii", 0);
+ SREG(1) = Parrot_str_new_init(interp, tmp, strlen(tmp),
+ Parrot_ascii_encoding_ptr, 0);
return (opcode_t *)cur_opcode + 2;}
@@ -23605,7 +23606,8 @@
Parrot_err_s_i(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
const char * const tmp = strerror(IREG(2));
- SREG(1) = string_make(interp, tmp, strlen(tmp), "ascii", 0);
+ SREG(1) = Parrot_str_new_init(interp, tmp, strlen(tmp),
+ Parrot_ascii_encoding_ptr, 0);
return (opcode_t *)cur_opcode + 3;}
@@ -23613,7 +23615,8 @@
Parrot_err_s_ic(opcode_t *cur_opcode, PARROT_INTERP) {
const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx);
const char * const tmp = strerror(cur_opcode[2]);
- SREG(1) = string_make(interp, tmp, strlen(tmp), "ascii", 0);
+ SREG(1) = Parrot_str_new_init(interp, tmp, strlen(tmp),
+ Parrot_ascii_encoding_ptr, 0);
return (opcode_t *)cur_opcode + 3;}
@@ -25962,9 +25965,8 @@
Parrot_str_free_cstring(cstr);
IREG(1) = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
#else
- opcode_t * const dest = cur_opcode + 3;
- Parrot_ex_throw_from_op_args(interp, dest, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ EXCEPTION_LIBRARY_ERROR, "no ICU lib loaded");return (opcode_t *)dest;
#endif
return (opcode_t *)cur_opcode + 3;}
@@ -25979,9 +25981,8 @@
Parrot_str_free_cstring(cstr);
IREG(1) = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
#else
- opcode_t * const dest = cur_opcode + 3;
- Parrot_ex_throw_from_op_args(interp, dest, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, cur_opcode + 3,
+ EXCEPTION_LIBRARY_ERROR, "no ICU lib loaded");return (opcode_t *)dest;
#endif
return (opcode_t *)cur_opcode + 3;}
@@ -26201,7 +26202,7 @@
hop = NULL;
hop_buckets = NULL;
-}
+}PARROT_EXPORT
op_lib_t *
Parrot_DynOp_core_2_7_0(PARROT_INTERP, long init) {
/* initialize and return op_lib ptr */
Modified: branches/gc_massacre/src/ops/experimental.ops
==============================================================================
--- branches/gc_massacre/src/ops/experimental.ops Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/ops/experimental.ops Mon Sep 13 21:23:26 2010 (r48984)
@@ -363,9 +363,9 @@
Parrot_str_free_cstring(cstr);
$1 = U_SUCCESS(err) ? (INTVAL) codepoint : -1;
#else
- opcode_t * const dest = expr NEXT();
- Parrot_ex_throw_from_op_args(interp, dest, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
+ opcode_t * const dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
+ EXCEPTION_LIBRARY_ERROR, "no ICU lib loaded");
+ goto ADDRESS(dest);
#endif
}
Modified: branches/gc_massacre/src/ops/object.ops
==============================================================================
--- branches/gc_massacre/src/ops/object.ops Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/ops/object.ops Mon Sep 13 21:23:26 2010 (r48984)
@@ -399,7 +399,8 @@
=item B<get_class>(out PMC, in PMC)
-Find the PMC for a class, by string name or by key.
+Find the PMC for a class, by string name, key or namespace. This op does
+C<not> find the class of an instance of an object. use C<typeof> for that.
=cut
Modified: branches/gc_massacre/src/ops/string.ops
==============================================================================
--- branches/gc_massacre/src/ops/string.ops Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/ops/string.ops Mon Sep 13 21:23:26 2010 (r48984)
@@ -323,14 +323,16 @@
Allocate a new empty string of length $2 (optional).
+XXX: Do these ops make sense with immutable strings?
+
=cut
inline op new(out STR) :base_mem {
- $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ $1 = Parrot_str_new_noinit(interp, 0);
}
inline op new(out STR, in INT) :base_mem {
- $1 = Parrot_str_new_noinit(interp, enum_stringrep_one, $2);
+ $1 = Parrot_str_new_noinit(interp, $2);
}
@@ -474,15 +476,15 @@
=cut
op charset(out INT, in STR) :base_core {
- $1 = Parrot_charset_number_of_str(interp, $2);
+ $1 = Parrot_encoding_number_of_str(interp, $2);
}
op charsetname(out STR, in INT) :base_core {
- $1 = Parrot_charset_name(interp, $2);
+ $1 = Parrot_encoding_name(interp, $2);
}
op find_charset(out INT, in STR) :base_core {
- const INTVAL n = Parrot_charset_number(interp, $2);
+ const INTVAL n = Parrot_encoding_number(interp, $2);
if (n < 0) {
opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL,
EXCEPTION_INVALID_CHARTYPE,
Modified: branches/gc_massacre/src/ops/sys.ops
==============================================================================
--- branches/gc_massacre/src/ops/sys.ops Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/ops/sys.ops Mon Sep 13 21:23:26 2010 (r48984)
@@ -72,12 +72,14 @@
op err(out STR) {
const char * const tmp = strerror(errno);
- $1 = string_make(interp, tmp, strlen(tmp), "ascii", 0);
+ $1 = Parrot_str_new_init(interp, tmp, strlen(tmp),
+ Parrot_ascii_encoding_ptr, 0);
}
op err(out STR, in INT) {
const char * const tmp = strerror($2);
- $1 = string_make(interp, tmp, strlen(tmp), "ascii", 0);
+ $1 = Parrot_str_new_init(interp, tmp, strlen(tmp),
+ Parrot_ascii_encoding_ptr, 0);
}
Modified: branches/gc_massacre/src/packdump.c
==============================================================================
--- branches/gc_massacre/src/packdump.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/packdump.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -169,8 +169,8 @@
case PFC_STRING:
Parrot_io_printf(interp, " [ 'PFC_STRING', {\n");
pobj_flag_dump(interp, (long)PObj_get_FLAGS(self->u.string));
- Parrot_io_printf(interp, " CHARSET => %ld,\n",
- self->u.string->charset);
+ Parrot_io_printf(interp, " ENCODING => %ld,\n",
+ self->u.string->encoding);
i = self->u.string->bufused;
Parrot_io_printf(interp, " SIZE => %ld,\n",
(long)i);
Modified: branches/gc_massacre/src/packfile.c
==============================================================================
--- branches/gc_massacre/src/packfile.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/packfile.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -2778,7 +2778,7 @@
ASSERT_ARGS(byte_code_unpack)
PackFile_ByteCode * const byte_code = (PackFile_ByteCode *)self;
int i;
- int total_ops = 0;
+ size_t total_ops = 0;
byte_code->op_count = PF_fetch_opcode(self->pf, &cursor);
byte_code->op_func_table = mem_gc_allocate_n_zeroed_typed(interp,
@@ -2849,12 +2849,12 @@
opcode_t idx = PF_fetch_opcode(self->pf, &cursor);
opcode_t op = PF_fetch_opcode(self->pf, &cursor);
- if (0 > op || op >= entry->lib->op_count)
+ if (0 > op || (size_t)op >= entry->lib->op_count)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"opcode index out of bounds on library `%s'. Found %d, expected 0 to %d.",
entry->lib->name, op, entry->lib->op_count - 1);
- if (0 > idx || idx >= byte_code->op_count)
+ if (0 > idx || (size_t)idx >= byte_code->op_count)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_PACKFILE,
"op table index out of bounds for entry from library `%s'."
" Found %d, expected 0 to %d",
@@ -3202,7 +3202,7 @@
/* Set up new entry and insert it. */
PackFile_DebugFilenameMapping *mapping = debug->mappings + insert_pos;
STRING *namestr = Parrot_str_new_init(interp, filename, strlen(filename),
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET, 0);
+ Parrot_default_encoding_ptr, 0);
size_t count = ct->const_count;
size_t i;
@@ -3228,7 +3228,7 @@
fnconst = &ct->constants[ct->const_count - 1];
fnconst->type = PFC_STRING;
fnconst->u.string = Parrot_str_new_init(interp, filename, strlen(filename),
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_constant_FLAG);
}
@@ -3912,6 +3912,11 @@
self->const_count = 0;
+ if (self->string_hash) {
+ parrot_hash_destroy(interp, self->string_hash);
+ self->string_hash = NULL;
+ }
+
return;
}
Modified: branches/gc_massacre/src/packfile/pf_items.c
==============================================================================
--- branches/gc_massacre/src/packfile/pf_items.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/packfile/pf_items.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -34,6 +34,7 @@
#include "parrot/parrot.h"
#include "byteorder.h"
+#include "pf_items.str"
/* HEADERIZER HFILE: include/parrot/packfile.h */
@@ -959,14 +960,16 @@
PF_fetch_opcode(ARGIN_NULLOK(const PackFile *pf), ARGMOD(const opcode_t **stream))
{
ASSERT_ARGS(PF_fetch_opcode)
- opcode_t o;
- if (!pf || !pf->fetch_op)
+ if (!pf || !pf->fetch_op) {
return *(*stream)++;
- o = (pf->fetch_op)(*((const unsigned char **)stream));
- TRACE_PRINTF_VAL((" PF_fetch_opcode: 0x%lx (%ld), at 0x%x\n",
- o, o, OFFS(pf, *stream)));
- *((const unsigned char **) (stream)) += pf->header->wordsize;
- return o;
+ }
+ else {
+ const unsigned char *ucstream = *(const unsigned char **)stream;
+ opcode_t o = (pf->fetch_op)(ucstream);
+ ucstream += pf->header->wordsize;
+ *stream = (opcode_t *)ucstream;
+ return o;
+ }
}
/*
@@ -1217,7 +1220,7 @@
const int wordsize = pf ? pf->header->wordsize : sizeof (opcode_t);
size_t size = PF_fetch_opcode(pf, cursor);
STRING *s = Parrot_str_new_init(interp, (const char *)*cursor, size,
- Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr,
+ Parrot_binary_encoding_ptr,
PObj_external_FLAG);
*((const unsigned char **)(cursor)) += ROUND_UP_B(size, wordsize);
return s;
@@ -1244,8 +1247,7 @@
ASSERT_ARGS(PF_store_buf)
const int wordsize = sizeof (opcode_t);
- PARROT_ASSERT(s->encoding == Parrot_fixed_8_encoding_ptr);
- PARROT_ASSERT(s->charset == Parrot_binary_charset_ptr);
+ PARROT_ASSERT(s->encoding == Parrot_binary_encoding_ptr);
*cursor++ = s->bufused;
@@ -1315,9 +1317,7 @@
STRING *s;
UINTVAL flags;
UINTVAL encoding_nr;
- UINTVAL charset_nr;
- const ENCODING *encoding;
- const CHARSET *charset;
+ const STR_VTABLE *encoding;
size_t size;
const int wordsize = pf ? pf->header->wordsize : sizeof (opcode_t);
opcode_t flag_charset_word = PF_fetch_opcode(pf, cursor);
@@ -1326,30 +1326,26 @@
return STRINGNULL;
/* decode flags, charset and encoding */
- flags = (flag_charset_word & 0x1 ? PObj_constant_FLAG : 0) |
- (flag_charset_word & 0x2 ? PObj_private7_FLAG : 0) ;
- encoding_nr = (flag_charset_word >> 16);
- charset_nr = (flag_charset_word >> 8) & 0xFF;
-
+ flags = (flag_charset_word & 0x1 ? PObj_constant_FLAG : 0) |
+ (flag_charset_word & 0x2 ? PObj_private7_FLAG : 0) ;
+ encoding_nr = (flag_charset_word >> 8) & 0xFF;
size = (size_t)PF_fetch_opcode(pf, cursor);
TRACE_PRINTF(("PF_fetch_string(): flags=0x%04x, ", flags));
TRACE_PRINTF(("encoding_nr=%ld, ", encoding_nr));
- TRACE_PRINTF(("charset_nr=%ld, ", charset_nr));
TRACE_PRINTF(("size=%ld.\n", size));
encoding = Parrot_get_encoding(interp, encoding_nr);
- charset = Parrot_get_charset(interp, charset_nr);
if (!encoding)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
"Invalid encoding number '%d' specified", encoding_nr);
- if (!charset)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Invalid charset number '%d' specified", charset_nr);
- s = Parrot_str_new_init(interp, (const char *)*cursor, size,
- encoding, charset, flags);
+ if (size)
+ s = Parrot_str_new_init(interp, (const char *)*cursor, size,
+ encoding, flags);
+ else
+ s = CONST_STRING(interp, "");
/* print only printable characters */
TRACE_PRINTF_VAL(("PF_fetch_string(): string is '%s' at 0x%x\n",
@@ -1411,8 +1407,7 @@
*/
/* encode charset_nr, encoding_nr and flags into the same word */
- *cursor++ = (Parrot_encoding_number_of_str(NULL, s) << 16) |
- (Parrot_charset_number_of_str(NULL, s) << 8) |
+ *cursor++ = (Parrot_encoding_number_of_str(NULL, s) << 8) |
(PObj_get_FLAGS(s) & PObj_constant_FLAG ? 0x1 : 0x0) |
(PObj_get_FLAGS(s) & PObj_private7_FLAG ? 0x2 : 0x0) ;
*cursor++ = s->bufused;
Modified: branches/gc_massacre/src/packout.c
==============================================================================
--- branches/gc_massacre/src/packout.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/packout.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -273,9 +273,11 @@
GETATTR_Key_str_key(interp, key, key_str);
GETATTR_Key_num_key(interp, key, key_num);
- if (type == PFC_STRING && !PMC_IS_NULL(ct->string_hash)) {
- if (VTABLE_exists_keyed_str(interp, ct->string_hash, key_str)) {
- i = VTABLE_get_integer_keyed_str(interp, ct->string_hash, key_str);
+ if (type == PFC_STRING && ct->string_hash) {
+ HashBucket *bucket = parrot_hash_get_bucket(interp, ct->string_hash,
+ key_str);
+ if (bucket) {
+ i = (int)PTR2INTVAL(bucket->value);
if (i < ct->const_count) /* only consider constants that have already occured */
return i;
}
@@ -290,10 +292,7 @@
if (constant->type == PFC_STRING) {
STRING * const sc = constant->u.string;
if (Parrot_str_equal(interp, key_str, sc)
- && Parrot_charset_number_of_str(interp, key_str)
- == Parrot_charset_number_of_str(interp, sc)
- && Parrot_encoding_number_of_str(interp, key_str)
- == Parrot_encoding_number_of_str(interp, sc)) {
+ && key_str->encoding == sc->encoding) {
return i;
}
}
Modified: branches/gc_massacre/src/parrot_debugger.c
==============================================================================
--- branches/gc_massacre/src/parrot_debugger.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/parrot_debugger.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -113,7 +113,7 @@
=item C<gcdebug>
Toggle garbage collection debugging mode. In gcdebug mode a garbage collection
-cycle is run before each opcocde, which is the same as using the gcdebug core.
+cycle is run before each opcode, which is the same as using the gcdebug core.
=item C<quit> or C<q>
@@ -136,6 +136,8 @@
*/
+#define PARROT_IN_EXTENSION
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -152,7 +154,7 @@
=item C<int main(int argc, const char *argv[])>
-Reads the PIR, PASM or PBC file from argv[1], loads it, and then calls
+Reads the PIR, PASM, or PBC file from argv[1], loads it, and then calls
Parrot_debug().
=cut
@@ -229,7 +231,7 @@
const char source []= ".sub aux :main\nexit 0\n.end\n";
Parrot_compile_string(interp, compiler, source, &errstr);
- if (!Parrot_str_is_null(interp, errstr))
+ if (!STRING_IS_NULL(errstr))
Parrot_io_eprintf(interp, "%Ss\n", errstr);
}
@@ -247,11 +249,12 @@
Parrot_exit(interp, 0);
}
+
/*
=item C<static void PDB_run_code(PARROT_INTERP, int argc, const char *argv[])>
-Run the code, catching exceptions if they are left unhandled.
+Runs the code, catching exceptions if they are left unhandled.
=cut
@@ -275,6 +278,7 @@
free_runloop_jump_point(interp);
}
+
/*
=item C<static void PDB_printwelcome(void)>
@@ -331,11 +335,7 @@
=item * Print the interpreter info.
-=item * Make the user interface better (add comands
-history/completion).
-
-=item * Some other things I don't remember now because it's late.
-
+=item * Make the user interface better (add command history/completion).
=back
Modified: branches/gc_massacre/src/pbc_dump.c
==============================================================================
--- branches/gc_massacre/src/pbc_dump.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pbc_dump.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -59,6 +59,7 @@
#include "parrot/parrot.h"
#include "parrot/embed.h"
#include "parrot/oplib/ops.h"
+#include "parrot/oplib/core_ops.h"
/*
Modified: branches/gc_massacre/src/pbc_merge.c
==============================================================================
--- branches/gc_massacre/src/pbc_merge.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pbc_merge.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -36,10 +36,12 @@
*/
+#define PARROT_IN_EXTENSION
#include "parrot/parrot.h"
#include "parrot/embed.h"
#include "parrot/oplib/ops.h"
+#include "parrot/oplib/core_ops.h"
#include "pmc/pmc_sub.h"
@@ -232,8 +234,8 @@
INTVAL read_result;
/* Check the file exists. */
- STRING * const fs = string_make(interp, fullname,
- strlen(fullname), NULL, 0);
+ STRING * const fs = Parrot_str_new_init(interp, fullname,
+ strlen(fullname), Parrot_default_encoding_ptr, 0);
if (!Parrot_stat_info_intval(interp, fs, STAT_EXISTS)) {
Parrot_io_eprintf(interp, "PBC Merge: Can't stat %s, code %i.\n",
fullname, errno);
@@ -698,6 +700,7 @@
opcode_t *ops = bc->base.data;
opcode_t cur_op = 0;
int cur_input = 0;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(interp);
/* Loop over the ops in the merged bytecode. */
while (cur_op < (opcode_t)bc->base.size) {
@@ -737,10 +740,10 @@
/* Handle special case variable argument opcodes. */
op_func = interp->code->op_func_table[op_num];
- if (op_func == interp->op_func_table[PARROT_OP_set_args_pc] ||
- op_func == interp->op_func_table[PARROT_OP_get_results_pc] ||
- op_func == interp->op_func_table[PARROT_OP_get_params_pc] ||
- op_func == interp->op_func_table[PARROT_OP_set_returns_pc]) {
+ if (op_func == core_ops->op_func_table[PARROT_OP_set_args_pc] ||
+ op_func == core_ops->op_func_table[PARROT_OP_get_results_pc] ||
+ op_func == core_ops->op_func_table[PARROT_OP_get_params_pc] ||
+ op_func == core_ops->op_func_table[PARROT_OP_set_returns_pc]) {
/* Get the signature. */
PMC * const sig = bc->const_table->constants[op_ptr[1]].u.key;
Modified: branches/gc_massacre/src/pmc/addrregistry.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/addrregistry.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/addrregistry.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -46,9 +46,7 @@
VTABLE void init() {
Hash *registry = parrot_create_hash(INTERP,
enum_type_int,
- Hash_key_type_PMC,
- hash_compare_int,
- key_hash_int);
+ Hash_key_type_PMC_ptr);
SET_ATTR_hash(INTERP, SELF, registry);
PObj_custom_mark_destroy_SETALL(SELF);
Modified: branches/gc_massacre/src/pmc/boolean.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/boolean.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/boolean.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -8,125 +8,186 @@
=head1 DESCRIPTION
-This class implements a boolean value variable.
+This PMC implements a Boolean type with a single true/false value.
+A C<Boolean> does not morph to other types when its value is set; it simply
+changes its value.
-Albeit the C<Boolean PMC> is derived from the C<Integer PMC>,
-it doesn't morph to other types. Only its value is changed.
+This implementation of C<Boolean> inherits from the C<Scalar> PMC.
+Unlike the previous implementation, it does I<not> inherit
+from C<Integer>.
-=head2 Methods
+=head2 Functions
-=over 4
+=over
=cut
*/
-/* HEADERIZER HFILE: none */
+/* This new Boolean PMC stores its boolean value in a private PObj flag. */
-pmclass Boolean extends Integer provides boolean provides scalar auto_attrs {
+#define boolean_FLAG PObj_private0_FLAG
+
+#define get_boolean_FLAG(pmc) \
+ ((PObj_get_FLAGS(pmc) & boolean_FLAG) != 0)
+
+#define set_boolean_FLAG(pmc, val) \
+ if (val) \
+ PObj_get_FLAGS(pmc) |= boolean_FLAG; \
+ else \
+ PObj_get_FLAGS(pmc) &= ~boolean_FLAG;
+
+#define flip_boolean_FLAG(pmc) \
+ PObj_get_FLAGS(pmc) ^= boolean_FLAG
+
+
+pmclass Boolean extends scalar provides boolean provides scalar manual_attrs {
/*
+=item C<void init()>
+
+Create a new C<Boolean> with initial value C<FALSE>.
+
=item C<void init_pmc(PMC *value)>
-Initialises SELF value according to the boolean value of the passed PMC.
+Create a new C<Boolean> with the given initial value interpreted
+as a Boolean.
=cut
*/
+
+ /* These two init functions set the boolean flag directly. */
+
+ VTABLE void init() {
+ set_boolean_FLAG(SELF, 0);
+ }
+
VTABLE void init_pmc(PMC *value) {
- INTVAL v = PMC_IS_NULL(value) ? (INTVAL) 0 : VTABLE_get_bool(INTERP, value);
- SELF.set_bool(v);
+ INTVAL v = PMC_IS_NULL(value) ? 0 : VTABLE_get_bool(INTERP, value);
+ set_boolean_FLAG(SELF, v);
}
-/*
-=item C<STRING *get_string()>
+/*
-Return "1" or "0".
+=item C<INTVAL get_bool()>
-=cut
+Obtain the value of the C<Boolean> as an integer: 1 = C<TRUE>, 0 = C<FALSE>.
-*/
- VTABLE STRING *get_string() {
- return SUPER();
- }
+=item C<INTVAL get_integer()>
+Same as C<get_bool()>.
-/*
+=item C<FLOATVAL get_number()>
-=item C<void set_integer_native(INTVAL value)>
+Obtain the value of the C<Boolean> as a float: 1.0 = C<TRUE>, 0.0 = C<FALSE>.
-=item C<void set_bool(INTVAL value)>
+=item C<STRING *get_string()>
-=item C<void set_pmc(PMC *value)>
+Obtain the value of the C<Boolean> as a string: "1" = C<TRUE>, "0" = C<FALSE>.
=cut
*/
- VTABLE void set_integer_native(INTVAL value) {
- SUPER((value != 0));
+
+ VTABLE INTVAL get_bool() {
+ return get_boolean_FLAG(SELF);
}
+ VTABLE INTVAL get_integer() {
+ return SELF.get_bool();
+ }
- VTABLE void set_bool(INTVAL value) {
- SELF.set_integer_native(value);
+ VTABLE FLOATVAL get_number() {
+ INTVAL value = SELF.get_bool();
+ return (FLOATVAL)value;
+ }
+
+ VTABLE STRING *get_string() {
+ return Parrot_str_from_int(INTERP, SELF.get_integer());
}
/*
-=item C<void set_number_native(FLOATVAL value)>
+=item C<void set_bool(INTVAL value)>
-Sets the value to C<value> evaluated in a boolean context.
+Sets the value of the Boolean to the specified integer value: 0 = C<FALSE>, non-0 =
+C<TRUE>.
-=cut
+=item C<void set_integer_native(INTVAL value)>
-*/
+Same as C<set_bool()>.
- VTABLE void set_number_native(FLOATVAL value) {
- SELF.set_bool(!FLOAT_IS_ZERO(value));
- }
+=item C<void set_number_native(FLOATVAL value)>
-/*
+Sets the value of the Boolean to the specified float value: 0.0 = C<FALSE>, non-0.0 =
+C<TRUE>.
=item C<void set_string_native(STRING *value)>
-Sets the value to C<*value> evaluated in a boolean context.
+Sets the Boolean to the value represented by the specified string. All values are
+considered C<TRUE> except for C<""> and C<"0>", which are considered
+C<FALSE>.
=cut
*/
+ VTABLE void set_bool(INTVAL value) {
+ set_boolean_FLAG(SELF, value);
+ }
+
+ VTABLE void set_integer_native(INTVAL value) {
+ SELF.set_bool(value);
+ }
+
+ VTABLE void set_number_native(FLOATVAL value) {
+ SELF.set_bool(!FLOAT_IS_ZERO(value));
+ }
+
VTABLE void set_string_native(STRING *value) {
SELF.set_bool(Parrot_str_boolean(INTERP, value));
}
+ /* No POD documentation, since the reader should see Scalar. */
+
+ VTABLE void i_logical_not() {
+ flip_boolean_FLAG(SELF);
+ }
+
/*
-=item C<PMC *neg(PMC *dest)>
+=item C<void freeze(PMC *info)>
-=item C<void i_neg()>
+Used to archive the C<Boolean>.
-Set C<dest> to the ''negated'' value of C<SELF>. The negative of a
-boolean value is the identical value.
+=item C<void thaw(PMC *info)>
+
+Used to unarchive the C<Boolean>.
=cut
*/
- VTABLE PMC *neg(PMC *dest) {
- dest = Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF),
- SELF.get_bool());
- return dest;
+ VTABLE void freeze(PMC *info) {
+ SUPER(info);
+ VTABLE_push_integer(INTERP, info, SELF.get_bool());
}
- VTABLE void i_neg() {
+ VTABLE void thaw(PMC *info) {
+ SUPER(info);
+ SELF.set_bool(VTABLE_shift_integer(INTERP, info));
}
+
}
/*
=back
+See also the C<Scalar> PMC.
+
=cut
*/
Modified: branches/gc_massacre/src/pmc/bytebuffer.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/bytebuffer.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/bytebuffer.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -21,17 +21,14 @@
PARROT_CANNOT_RETURN_NULL
static STRING * build_string(PARROT_INTERP,
- ARGIN(const unsigned char *content),
+ ARGIN_NULLOK(const unsigned char *content),
INTVAL size,
- ARGIN_NULLOK(const CHARSET *charset),
- ARGIN_NULLOK(const ENCODING *encoding))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ ARGIN_NULLOK(const STR_VTABLE *encoding))
+ __attribute__nonnull__(1);
static INTVAL grow_to(INTVAL position);
#define ASSERT_ARGS_build_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(content))
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_grow_to __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -315,17 +312,15 @@
*/
- METHOD get_string(STRING *charsetname, STRING *encodingname) {
+ METHOD get_string(STRING *encodingname) {
STRING *result;
unsigned char *content;
INTVAL size;
- const CHARSET *charset = Parrot_get_charset(INTERP,
- Parrot_charset_number(INTERP, charsetname));
- const ENCODING *encoding = Parrot_get_encoding(INTERP,
+ const STR_VTABLE *encoding = Parrot_get_encoding(INTERP,
Parrot_encoding_number(INTERP, encodingname));
GET_ATTR_content(INTERP, SELF, content);
GET_ATTR_size(INTERP, SELF, size);
- result = build_string(INTERP, content, size, charset, encoding);
+ result = build_string(INTERP, content, size, encoding);
RETURN(STRING *result);
}
@@ -344,11 +339,11 @@
STRING *result;
unsigned char *content;
INTVAL size;
- const CHARSET* charset = STRING_IS_NULL(as) ? PARROT_DEFAULT_CHARSET : as->charset;
- const ENCODING *encoding = STRING_IS_NULL(as) ? PARROT_DEFAULT_ENCODING : as->encoding;
+ const STR_VTABLE *encoding = STRING_IS_NULL(as) ?
+ Parrot_default_encoding_ptr : as->encoding;
GET_ATTR_content(INTERP, SELF, content);
GET_ATTR_size(INTERP, SELF, size);
- result = build_string(INTERP, content, size, charset, encoding);
+ result = build_string(INTERP, content, size, encoding);
RETURN(STRING *result);
}
@@ -368,7 +363,7 @@
decrease the number of reallocations.
=item C<static STRING * build_string(PARROT_INTERP, const unsigned char
-*content, INTVAL size, const CHARSET *charset, const ENCODING *encoding)>
+*content, INTVAL size, const STR_VTABLE *encoding)>
Build a string fro the buffer content with the charset and encoding specified.
@@ -391,25 +386,15 @@
PARROT_CANNOT_RETURN_NULL
static STRING *
-build_string(PARROT_INTERP, ARGIN(const unsigned char *content),
+build_string(PARROT_INTERP, ARGIN_NULLOK(const unsigned char *content),
INTVAL size,
- ARGIN_NULLOK(const CHARSET *charset),
- ARGIN_NULLOK(const ENCODING *encoding))
+ ARGIN_NULLOK(const STR_VTABLE *encoding))
{
ASSERT_ARGS(build_string)
- STRING *result;
- if (charset == NULL)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_ENCODING,
- "Invalid charset");
if (encoding == NULL)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_ENCODING,
"Invalid encoding");
- result = Parrot_str_new_init(interp, (const char *)content, size, encoding, charset, 0);
- if (!CHARSET_VALIDATE(interp, result))
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Invalid buffer content");
- return result;
+ return Parrot_str_new_init(interp, (const char *)content, size, encoding, 0);
}
/*
Modified: branches/gc_massacre/src/pmc/callcontext.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/callcontext.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/callcontext.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -390,9 +390,7 @@
if (!hash) {
hash = parrot_create_hash(interp,
enum_type_ptr,
- Hash_key_type_STRING,
- hash_compare_string,
- (hash_hash_key_fn)key_hash_STRING);
+ Hash_key_type_STRING);
SETATTR_CallContext_hash(interp, SELF, hash);
}
Modified: branches/gc_massacre/src/pmc/class.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/class.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/class.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -141,11 +141,6 @@
__attribute__nonnull__(3)
__attribute__nonnull__(4);
-static size_t key_hash_pointer(SHIM_INTERP,
- ARGIN(const void *value),
- size_t seed)
- __attribute__nonnull__(2);
-
PARROT_CANNOT_RETURN_NULL
static STRING * make_class_name(PARROT_INTERP, ARGIN(PMC *SELF))
__attribute__nonnull__(1)
@@ -174,8 +169,6 @@
, PARROT_ASSERT_ARG(object) \
, PARROT_ASSERT_ARG(all_parents) \
, PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_key_hash_pointer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_make_class_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(SELF))
@@ -184,22 +177,6 @@
/*
-=item C<static size_t key_hash_pointer(PARROT_INTERP, const void *value, size_t
-seed)>
-
-=cut
-
-*/
-
-static size_t
-key_hash_pointer(SHIM_INTERP, ARGIN(const void *value), size_t seed)
-{
- ASSERT_ARGS(key_hash_pointer)
- return ((size_t) value ^ seed);
-}
-
-/*
-
=item C<static int cache_class_attribs(PARROT_INTERP, PMC *cur_class, PMC
*attrib_index, PMC *cache, int cur_index)>
@@ -685,9 +662,10 @@
_class->vtable_overrides = Parrot_pmc_new(INTERP, enum_class_Hash);
_class->parent_overrides = Parrot_pmc_new(INTERP, enum_class_Hash);
+
_class->isa_cache = parrot_create_hash(INTERP,
- enum_type_INTVAL, Hash_key_type_PMC,
- (hash_comp_fn)hash_compare_pointer, (hash_hash_key_fn)key_hash_pointer);
+ enum_type_INTVAL, Hash_key_type_PMC_ptr);
+
/* We put ourself on the all parents list. */
VTABLE_push_pmc(INTERP, _class->all_parents, SELF);
Modified: branches/gc_massacre/src/pmc/codestring.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/codestring.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/codestring.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -107,8 +107,6 @@
STRING * const percent = CONST_STRING(INTERP, "%");
STRING * const comma = CONST_STRING(INTERP, ",");
STRING * const comma_space = CONST_STRING(INTERP, ", ");
- STRING * const newline = CONST_STRING(INTERP, "\n");
- PMC *parts = PMCNULL;
STRING *key, *repl, *S1;
INTVAL pos = 0;
INTVAL replen = 0;
@@ -146,15 +144,18 @@
GET_ATTR_str_val(INTERP, SELF, S1);
- parts = Parrot_pmc_new_init_int(INTERP, enum_class_FixedStringArray, 3);
- VTABLE_set_string_keyed_int(INTERP, parts, 0, S1);
- VTABLE_set_string_keyed_int(INTERP, parts, 1, fmt);
-
/* Add a newline if necessary */
- if ('\n' != Parrot_str_indexed(INTERP, fmt, Parrot_str_length(INTERP, fmt) - 1))
+ if ('\n' != Parrot_str_indexed(INTERP, fmt, Parrot_str_length(INTERP, fmt) - 1)) {
+ STRING * const newline = CONST_STRING(INTERP, "\n");
+ PMC *parts = Parrot_pmc_new_init_int(INTERP, enum_class_FixedStringArray, 3);
+ VTABLE_set_string_keyed_int(INTERP, parts, 0, S1);
+ VTABLE_set_string_keyed_int(INTERP, parts, 1, fmt);
VTABLE_set_string_keyed_int(INTERP, parts, 2, newline);
+ S1 = Parrot_str_join(INTERP, STRINGNULL, parts);
+ }
+ else
+ S1 = Parrot_str_concat(INTERP, S1, fmt);
- S1 = Parrot_str_join(INTERP, STRINGNULL, parts);
VTABLE_set_string_native(INTERP, SELF, S1);
RETURN(PMC *SELF);
Modified: branches/gc_massacre/src/pmc/complex.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/complex.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/complex.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -301,7 +301,7 @@
}
-pmclass Complex auto_attrs {
+pmclass Complex provides complex provides scalar auto_attrs {
ATTR FLOATVAL re; /* real part */
ATTR FLOATVAL im; /* imaginary part */
Modified: branches/gc_massacre/src/pmc/continuation.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/continuation.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/continuation.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -42,8 +42,8 @@
/*
- * A Continuation (and RetContinuation, ExceptionHandler) has in its
- * context a pointer to the register frame, which contains active objects.
+ * A Continuation (and an ExceptionHandler) has in its context a pointer
+ * to the register frame, which contains active objects.
* Additionally ct->current_cont has the continuation of the caller.
*/
Modified: branches/gc_massacre/src/pmc/default.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/default.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/default.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -797,7 +797,7 @@
INTVAL hashvalue() {
STRING *s = SELF.get_string();
- return key_hash_STRING(INTERP, s, 0);
+ return Parrot_str_to_hashval(INTERP, s);
}
/*
Modified: branches/gc_massacre/src/pmc/eval.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/eval.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/eval.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -240,7 +240,6 @@
return;
}
- /* TT #1315 create PF API, move it there */
seg = (PackFile_Segment *)cur_cs->const_table;
if (seg) {
PackFile_Segment_destroy(INTERP, seg);
@@ -321,8 +320,7 @@
* effect
*/
aligned_size = size + 15;
- res = Parrot_str_new_noinit(INTERP, enum_stringrep_one,
- aligned_size);
+ res = Parrot_str_new_noinit(INTERP, aligned_size);
res->strlen = res->bufused = size;
if ((size_t)(res->strstart) & 0xf) {
Modified: branches/gc_massacre/src/pmc/filehandle.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/filehandle.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/filehandle.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -463,6 +463,8 @@
Parrot_io_close(INTERP, filehandle);
}
else {
+ PMC *sb;
+
/* slurp open file */
if (Parrot_io_is_closed_filehandle(INTERP, SELF))
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_PIO_ERROR,
@@ -472,12 +474,15 @@
if (!(PARROT_FILEHANDLE(SELF)->flags & PIO_F_LINEBUF))
Parrot_io_setlinebuf(INTERP, SELF);
- result = STRINGNULL;
+ sb = Parrot_pmc_new_init_int(interp, enum_class_StringBuilder,
+ 4096);
+
do {
STRING * const part = Parrot_io_reads(INTERP, SELF, 0);
- result = STRING_IS_NULL(result) ? part :
- Parrot_str_concat(INTERP, result, part);
+ VTABLE_push_string(interp, sb, part);
} while (!Parrot_io_eof(INTERP, SELF));
+
+ result = VTABLE_get_string(interp, sb);
}
RETURN(STRING *result);
Modified: branches/gc_massacre/src/pmc/hash.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/hash.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/hash.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -141,9 +141,7 @@
attr->hash = parrot_create_hash(INTERP,
(PARROT_DATA_TYPE)value_type,
- Hash_key_type_STRING,
- hash_compare_string,
- (hash_hash_key_fn)key_hash_STRING);
+ Hash_key_type_STRING);
PObj_custom_mark_destroy_SETALL(SELF);
}
@@ -233,23 +231,17 @@
if (type == Hash_key_type_STRING)
new_hash = parrot_create_hash(INTERP,
entry_type,
- Hash_key_type_STRING,
- hash_compare_string,
- (hash_hash_key_fn)key_hash_STRING);
+ Hash_key_type_STRING);
else if (type == Hash_key_type_int)
/* new_int_hash set BOTH keys and values to INTVAL */
new_hash = parrot_create_hash(INTERP,
entry_type,
- Hash_key_type_int,
- hash_compare_int,
- key_hash_int);
+ Hash_key_type_int);
else if (type == Hash_key_type_PMC)
/* new_int_hash set BOTH keys and values to INTVAL */
new_hash = parrot_create_hash(INTERP,
entry_type,
- Hash_key_type_PMC,
- (hash_comp_fn)hash_compare_pmc,
- (hash_hash_key_fn)key_hash_PMC);
+ Hash_key_type_PMC);
else
/* We probably will not implement other types of keys. They are way
* too dangerous to use from PIR */
@@ -310,9 +302,7 @@
case enum_type_PMC:
new_hash = parrot_create_hash(INTERP,
(PARROT_DATA_TYPE)type,
- old_hash ? old_hash->key_type : Hash_key_type_STRING,
- old_hash ? old_hash->compare : hash_compare_string,
- old_hash ? old_hash->hash_val : (hash_hash_key_fn)key_hash_STRING);
+ old_hash ? old_hash->key_type : Hash_key_type_STRING);
break;
default:
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_UNIMPLEMENTED,
@@ -628,8 +618,9 @@
HashBucket * const b =
parrot_hash_get_bucket(INTERP, hash, hash_key_from_string(INTERP, hash, key));
+ /* XXX: shouldn't we return STRINGNULL? */
if (!b)
- return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+ return CONST_STRING(INTERP, "");
return hash_value_to_string(INTERP, hash, b->value);
}
@@ -640,7 +631,7 @@
parrot_hash_get_bucket(INTERP, hash, hash_key_from_int(INTERP, hash, key));
if (!b)
- return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+ return CONST_STRING(INTERP, "");
return hash_value_to_string(INTERP, hash, b->value);
}
@@ -661,7 +652,7 @@
HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, hash_key);
if (!b)
- return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+ return CONST_STRING(INTERP, "");
key = key_next(INTERP, key);
Modified: branches/gc_massacre/src/pmc/nativepccmethod.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/nativepccmethod.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/nativepccmethod.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,7 +20,7 @@
/* HEADERIZER HFILE: none */
-pmclass NativePCCMethod auto_attrs {
+pmclass NativePCCMethod auto_attrs provides invokable {
ATTR STRING *signature;
ATTR void *func;
@@ -113,7 +113,7 @@
EXCEPTION_INVALID_OPERATION,
"attempt to call NULL native function");
- fptr = D2FPTR(func);
+ fptr = (native_pcc_method_t)D2FPTR(func);
fptr(INTERP);
/*
Modified: branches/gc_massacre/src/pmc/nci.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/nci.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/nci.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -257,8 +257,8 @@
if (!PObj_constant_TEST(key)) {
char * const key_c = Parrot_str_to_cstring(INTERP, key);
const size_t key_length = Parrot_str_byte_length(interp, key);
- key = string_make(interp, key_c, key_length,
- NULL, PObj_constant_FLAG);
+ key = Parrot_str_new_init(interp, key_c, key_length,
+ Parrot_default_encoding_ptr, PObj_constant_FLAG);
Parrot_str_free_cstring(key_c);
}
@@ -279,11 +279,12 @@
Parrot_NCI_attributes * const nci_info = PARROT_NCI(SELF);
Parrot_gc_mark_PMC_alive(interp, nci_info->fb_info);
+ Parrot_gc_mark_PMC_alive(interp, nci_info->multi_sig);
+
Parrot_gc_mark_STRING_alive(interp, nci_info->signature);
- Parrot_gc_mark_STRING_alive(interp, nci_info->pcc_params_signature);
- Parrot_gc_mark_STRING_alive(interp, nci_info->pcc_params_signature);
Parrot_gc_mark_STRING_alive(interp, nci_info->long_signature);
- Parrot_gc_mark_PMC_alive(interp, nci_info->multi_sig);
+ Parrot_gc_mark_STRING_alive(interp, nci_info->pcc_params_signature);
+ Parrot_gc_mark_STRING_alive(interp, nci_info->pcc_return_signature);
}
}
@@ -356,7 +357,7 @@
PMC *cont;
GET_ATTR_orig_func(INTERP, SELF, orig_func);
- func = D2FPTR(nci_info->func);
+ func = (nci_thunk_t)D2FPTR(nci_info->func);
GET_ATTR_fb_info(INTERP, SELF, fb_info);
Modified: branches/gc_massacre/src/pmc/object.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/object.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/object.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -677,10 +677,11 @@
*/
VTABLE INTVAL isa(STRING *classname) {
- if (SUPER(classname))
+ if (SELF->vtable->whoami == classname
+ || Parrot_str_equal(INTERP, SELF->vtable->whoami, classname))
return 1;
else {
- PMC * _class = VTABLE_get_class(INTERP, SELF);
+ PMC *_class = PARROT_OBJECT(SELF)->_class;
return VTABLE_isa(INTERP, _class, classname);
}
}
Modified: branches/gc_massacre/src/pmc/oplib.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/oplib.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/oplib.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -64,9 +64,9 @@
INTVAL num;
GET_ATTR_oplib(INTERP, SELF, oplib);
- num = oplib->op_code(INTERP, cstr, 1);
+ num = oplib->_op_code(INTERP, cstr, 1);
if (num == -1)
- num = oplib->op_code(INTERP, cstr, 0);
+ num = oplib->_op_code(INTERP, cstr, 0);
Parrot_str_free_cstring(cstr);
return num;
Modified: branches/gc_massacre/src/pmc/packfile.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/packfile.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/packfile.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -21,6 +21,19 @@
#include "pmc/pmc_packfiledirectory.h"
+typedef enum {
+ attr_wordsize,
+ attr_byteorder,
+ attr_fptype,
+ attr_version_major,
+ attr_version_minor,
+ attr_version_patch,
+ attr_bytecode_major,
+ attr_bytecode_minor,
+ attr_uuid_type,
+ attr_NONE = -1
+} AttrEnumPackfile;
+
/* HEADERIZER HFILE: none */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -33,10 +46,18 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*self);
+static AttrEnumPackfile getAttrEnum(PARROT_INTERP,
+ ARGIN(const STRING *name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_copy_packfile_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(pf))
+#define ASSERT_ARGS_getAttrEnum __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(name))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -100,7 +121,7 @@
PMC_data_typed(SELF, Parrot_Packfile_attributes*);
PackFile *pf;
- attrs->uuid = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+ attrs->uuid = CONST_STRING(INTERP, "");
attrs->directory = Parrot_pmc_new(INTERP, enum_class_PackfileDirectory);
/* Create dummy PackFile and copy default attributes to self */
@@ -160,7 +181,7 @@
PackFile_pack(INTERP, pf, ptr);
str = Parrot_str_new_init(INTERP, (const char*)ptr, length,
- PARROT_FIXED_8_ENCODING, PARROT_BINARY_CHARSET, 0);
+ Parrot_binary_encoding_ptr, 0);
Parrot_gc_free_memory_chunk(INTERP, ptr);
PackFile_destroy(INTERP, pf);
@@ -243,28 +264,40 @@
VTABLE INTVAL get_integer_keyed_str(STRING *key) {
Parrot_Packfile_attributes * const attrs = PARROT_PACKFILE(SELF);
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "wordsize")))
- return attrs->wordsize;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "byteorder")))
- return attrs->byteorder;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "fptype")))
- return attrs->fptype;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_major")))
- return attrs->version_major;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_minor")))
- return attrs->version_minor;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_patch")))
- return attrs->version_patch;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "bytecode_major")))
- return attrs->bytecode_major;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "bytecode_minor")))
- return attrs->bytecode_minor;
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "uuid_type")))
- return attrs->uuid_type;
-
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "Packfile: No such integer key \"%s\"",
- Parrot_str_cstring(INTERP, key));
+ INTVAL result;
+ switch (getAttrEnum(INTERP, key)) {
+ case attr_wordsize:
+ result = attrs->wordsize;
+ break;
+ case attr_byteorder:
+ result = attrs->byteorder;
+ break;
+ case attr_fptype:
+ result = attrs->fptype;
+ break;
+ case attr_version_major:
+ result = attrs->version_major;
+ break;
+ case attr_version_minor:
+ result = attrs->version_minor;
+ break;
+ case attr_version_patch:
+ result = attrs->version_patch;
+ break;
+ case attr_bytecode_major:
+ result = attrs->bytecode_major;
+ break;
+ case attr_bytecode_minor:
+ result = attrs->bytecode_minor;
+ break;
+ case attr_uuid_type:
+ result = attrs->uuid_type;
+ break;
+ default:
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
+ "Packfile: No such integer key \"%Ss\"", key);
+ }
+ return result;
}
/*
@@ -287,8 +320,7 @@
return PARROT_PACKFILE(SELF)->uuid;
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "Packfile: No such string key \"%s\"",
- Parrot_str_cstring(INTERP, key));
+ "Packfile: No such string key \"%Ss\"", key);
}
@@ -346,25 +378,23 @@
*/
VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) {
Parrot_Packfile_attributes * const attrs = PARROT_PACKFILE(SELF);
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_major"))) {
+ switch (getAttrEnum(INTERP, key)) {
+ case attr_version_major:
attrs->version_major = value;
- return;
- }
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_minor"))) {
+ break;
+ case attr_version_minor:
attrs->version_minor = value;
- return;
- }
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "version_patch"))) {
+ break;
+ case attr_version_patch:
attrs->version_patch = value;
- return;
- }
- if (!Parrot_str_compare(INTERP, key, CONST_STRING(INTERP, "uuid_type"))) {
+ break;
+ case attr_uuid_type:
attrs->uuid_type = value;
- return;
+ break;
+ default:
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
+ "Packfile: No such integer key \"%Ss\"", key);
}
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "Packfile: No such integer key \"%s\"",
- Parrot_str_cstring(INTERP, key));
}
@@ -407,8 +437,7 @@
}
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "Packfile: No such string key \"%s\"",
- Parrot_str_cstring(INTERP, key));
+ "Packfile: No such string key \"%Ss\"", key);
}
/*
@@ -471,7 +500,61 @@
PMC * const dir = PARROT_PACKFILE(SELF)->directory;
RETURN(PMC *dir);
}
+
}
+
+
+/*
+
+=back
+
+=cut
+
+*/
+
+/*
+
+=head2 Auxliary functions
+
+=over 4
+
+=item C<static AttrEnumPackfile getAttrEnum(PARROT_INTERP, const STRING *name)>
+
+Gets an enumerated value corresponding to the attribute with that name.
+
+=cut
+
+*/
+
+static AttrEnumPackfile
+getAttrEnum(PARROT_INTERP, ARGIN(const STRING *name))
+{
+ ASSERT_ARGS(getAttrEnum)
+
+ AttrEnumPackfile r;
+ if (Parrot_str_equal(interp, name, CONST_STRING(interp, "wordsize")))
+ r = attr_wordsize;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "byteorder")))
+ r = attr_byteorder;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "fptype")))
+ r = attr_fptype;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "version_major")))
+ r = attr_version_major;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "version_minor")))
+ r = attr_version_minor;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "version_patch")))
+ r = attr_version_patch;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "bytecode_major")))
+ r = attr_bytecode_major;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "bytecode_minor")))
+ r = attr_bytecode_minor;
+ else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "uuid_type")))
+ r = attr_uuid_type;
+ else
+ r = attr_NONE;
+ return r;
+}
+
/*
=back
Modified: branches/gc_massacre/src/pmc/packfileannotations.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/packfileannotations.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/packfileannotations.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -80,6 +80,8 @@
PARROT_PACKFILEANNOTATIONS(SELF);
Parrot_gc_mark_PMC_alive(INTERP, attrs->const_table);
+ Parrot_gc_mark_PMC_alive(INTERP, attrs->gr_byte);
+ Parrot_gc_mark_PMC_alive(INTERP, attrs->gr_entries);
Parrot_gc_mark_PMC_alive(INTERP, attrs->annotations);
SUPER();
Modified: branches/gc_massacre/src/pmc/packfilefixupentry.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/packfilefixupentry.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/packfilefixupentry.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -42,7 +42,7 @@
Parrot_PackfileFixupEntry_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileFixupEntry_attributes*);
- attrs->name = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
+ attrs->name = CONST_STRING(INTERP, "");
PObj_custom_mark_SET(SELF);
}
@@ -98,8 +98,7 @@
attrs->type = entry->type;
attrs->name = Parrot_str_new_init(INTERP, entry->name,
- strlen(entry->name), PARROT_FIXED_8_ENCODING,
- PARROT_BINARY_CHARSET, 0);
+ strlen(entry->name), Parrot_binary_encoding_ptr, 0);
attrs->offset = entry->offset;
}
Modified: branches/gc_massacre/src/pmc/string.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/string.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/string.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -193,7 +193,7 @@
if (PObj_constant_TEST(SELF) && !PObj_constant_TEST(value)) {
char * const copy = Parrot_str_to_cstring(INTERP, value);
value = Parrot_str_new_init(INTERP, copy, strlen(copy),
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_constant_FLAG);
Parrot_str_free_cstring(copy);
}
@@ -692,7 +692,7 @@
if (!len)
RETURN(STRING src);
- if (src->charset != Parrot_ascii_charset_ptr)
+ if (src->encoding != Parrot_ascii_encoding_ptr)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_ENCODING,
"Can't translate non-ascii");
@@ -724,18 +724,18 @@
METHOD is_integer(STRING *src) {
INTVAL i;
- unsigned char *p;
+ char *p;
const INTVAL len = Parrot_str_length(INTERP, src);
if (!len)
RETURN(INTVAL 0);
- if (src->charset != Parrot_ascii_charset_ptr)
+ if (STRING_max_bytes_per_codepoint(src) != 1)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_ENCODING,
- "Can't is_integer non-ascii");
+ "Can't is_integer non fixed_8");
i = 0;
- p = (unsigned char *)Buffer_bufstart(src);
+ p = src->strstart;
if (p[i] == '-' || p[i] == '+' ||
(p[i] >= '0' && p[i] <= '9')) {
@@ -794,7 +794,7 @@
if (!Parrot_str_length(INTERP, substring))
RETURN(INTVAL res);
- res = CHARSET_RINDEX(INTERP, src, substring, (UINTVAL)start);
+ res = STRING_rindex(INTERP, src, substring, (UINTVAL)start);
RETURN(INTVAL res);
}
@@ -808,15 +808,13 @@
*/
- METHOD unescape(STRING *charsetname, STRING *encodingname)
+ METHOD unescape(STRING *encodingname)
{
- const CHARSET *charset = Parrot_get_charset(INTERP,
- Parrot_charset_number(INTERP, charsetname));
- const ENCODING *encoding = Parrot_get_encoding(INTERP,
+ const STR_VTABLE *encoding = Parrot_get_encoding(INTERP,
Parrot_encoding_number(INTERP, encodingname));
STRING * const src = VTABLE_get_string(INTERP, SELF);
STRING * const dest = Parrot_str_unescape_string(INTERP, src,
- charset, encoding, 0);
+ encoding, 0);
RETURN(STRING *dest);
}
Modified: branches/gc_massacre/src/pmc/stringbuilder.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/stringbuilder.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/stringbuilder.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -24,10 +24,7 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static size_t calculate_capacity(SHIM_INTERP,
- size_t current,
- size_t additional);
-
+static size_t calculate_capacity(SHIM_INTERP, size_t needed);
#define ASSERT_ARGS_calculate_capacity __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -64,21 +61,17 @@
*/
VTABLE void init_int(INTVAL initial_size) {
- STRING * const buffer = mem_gc_allocate_zeroed_typed(INTERP, STRING);
+ STRING * const buffer = Parrot_gc_new_string_header(INTERP, 0);
- buffer->encoding = Parrot_default_encoding_ptr;
- buffer->charset = Parrot_default_charset_ptr;
- buffer->_buflen = initial_size;
- buffer->_bufstart = buffer->strstart
- = mem_gc_allocate_n_typed(INTERP,
- initial_size, char);
+ if (initial_size < INITIAL_STRING_CAPACITY)
+ initial_size = INITIAL_STRING_CAPACITY;
- /* We need these string flags to use this buffer in substr_str */
- buffer->flags = PObj_is_string_FLAG | PObj_external_FLAG;
+ Parrot_gc_allocate_string_storage(INTERP, buffer, initial_size);
+ buffer->encoding = Parrot_default_encoding_ptr;
SET_ATTR_buffer(INTERP, SELF, buffer);
- PObj_custom_destroy_SET(SELF);
+ PObj_custom_mark_SET(SELF);
}
@@ -111,24 +104,21 @@
}
}
-
/*
-=item C<void destroy()>
+=item C<void mark()>
-Free the buffer on destruction.
+Mark the buffer.
=cut
*/
- VTABLE void destroy() {
+ VTABLE void mark() {
if (PMC_data(SELF)) {
STRING *buffer;
GET_ATTR_buffer(INTERP, SELF, buffer);
- if (buffer->_bufstart)
- mem_gc_free(INTERP, buffer->_bufstart);
- mem_gc_free(INTERP, buffer);
+ Parrot_gc_mark_STRING_alive(INTERP, buffer);
}
}
@@ -143,10 +133,10 @@
*/
VTABLE STRING *get_string() {
- STRING *buffer;
+ STRING *buffer, *result;
GET_ATTR_buffer(INTERP, SELF, buffer);
- /* We need to clone buffer because outside of StringBuilder strings */
- /* are immutable */
+ /* We need to build a new string because outside of StringBuilder
+ * strings are immutable. */
return Parrot_str_clone(INTERP, buffer);
}
@@ -161,10 +151,9 @@
*/
VTABLE void push_string(STRING *s) {
- STRING *buffer;
- size_t total_size;
- const CHARSET *cs;
- const ENCODING *enc = NULL;
+ STRING *buffer;
+ size_t total_size;
+ const STR_VTABLE *enc;
/* Early return on NULL strings */
if (STRING_IS_NULL(s))
@@ -172,43 +161,63 @@
GET_ATTR_buffer(INTERP, SELF, buffer);
- /* If strings are incompatible - convert them */
- /* TODO Ask chromatic why in Parrot_str_join he ignored charset */
- cs = Parrot_str_rep_compatible(interp, buffer, s, &enc);
- if (!cs) {
-
- /* Create new temporary string */
- STRING * const new_buffer = Parrot_unicode_charset_ptr->to_charset(interp, buffer);
- mem_gc_free(INTERP, buffer->_bufstart);
- STRUCT_COPY(buffer, new_buffer);
- buffer->flags = PObj_is_string_FLAG | PObj_external_FLAG;
-
- buffer->_bufstart = buffer->strstart = mem_gc_allocate_n_typed(INTERP,
- new_buffer->_buflen, char);
- mem_sys_memcopy(buffer->_bufstart, new_buffer->_bufstart, new_buffer->_buflen);
+ if (buffer->bufused == 0) {
+ /* Always copy the encoding of the first string. The IO functions
+ assume that the concatenation of utf8 strings doesn't change
+ the encoding. */
+ buffer->encoding = s->encoding;
+ }
+ else {
+ enc = Parrot_str_rep_compatible(interp, buffer, s);
- SET_ATTR_buffer(INTERP, SELF, buffer);
+ if (enc) {
+ buffer->encoding = enc;
+ }
+ else {
+ /* If strings are incompatible - convert them to utf8 */
- s = Parrot_unicode_charset_ptr->to_charset(interp, s);
+ if (s->encoding != Parrot_utf8_encoding_ptr)
+ s = Parrot_utf8_encoding_ptr->to_encoding(interp, s);
+
+ if (buffer->encoding != Parrot_utf8_encoding_ptr) {
+ /* Create new temporary string */
+ STRING * new_buffer;
+
+ new_buffer = Parrot_utf8_encoding_ptr->to_encoding(interp, buffer);
+ total_size = new_buffer->bufused + s->bufused;
+
+ if (total_size > buffer->_buflen) {
+ /* Reallocate */
+ total_size = calculate_capacity(INTERP, total_size);
+ Parrot_gc_reallocate_string_storage(INTERP, buffer, total_size);
+ }
+ buffer->bufused = new_buffer->bufused;
+ buffer->encoding = new_buffer->encoding;
+
+ mem_sys_memcopy(buffer->strstart, new_buffer->strstart,
+ new_buffer->bufused);
+ }
+ }
}
- /* Calculate (possibly new) total size */
- total_size = calculate_capacity(INTERP, buffer->bufused, s->bufused);
+ total_size = buffer->bufused + s->bufused;
/* Reallocate if necessary */
- if (total_size > Buffer_buflen(buffer)) {
- /* Parrot_unicode_charset_ptr can produce NULL buffer */
- buffer->_bufstart = buffer->strstart = mem_gc_realloc_n_typed(INTERP,
- buffer->_bufstart, total_size, char);
- buffer->_buflen = total_size;
+ if (total_size > buffer->_buflen) {
+ /* Calculate (possibly new) total size */
+ total_size = calculate_capacity(INTERP, total_size);
+
+ Parrot_gc_reallocate_string_storage(INTERP, buffer, total_size);
+ buffer->_buflen = total_size;
}
/* Tack s on the end of buffer */
- mem_sys_memcopy((void *)((ptrcast_t)buffer->strstart + buffer->bufused),
+ mem_sys_memcopy((void *)((ptrcast_t)buffer->_bufstart + buffer->bufused),
s->strstart, s->bufused);
/* Update buffer */
buffer->bufused += s->bufused;
+ buffer->strstart = (char *)buffer->_bufstart;
buffer->strlen += Parrot_str_length(INTERP, s);
buffer->hashval = 0; /* hash is invalid */
@@ -254,26 +263,24 @@
STRING * buffer;
/* Calculate (possibly new) total size */
- size_t total_size = calculate_capacity(INTERP, 0, s->bufused);
+ size_t total_size = calculate_capacity(INTERP, s->bufused);
GET_ATTR_buffer(INTERP, SELF, buffer);
/* Reallocate if necessary */
if (total_size > Buffer_buflen(buffer)) {
- buffer->_bufstart = buffer->strstart = mem_gc_realloc_n_typed(INTERP,
- buffer->_bufstart, total_size, char);
- buffer->_buflen = total_size;
+ Parrot_gc_reallocate_string_storage(INTERP, buffer, total_size);
+ buffer->strstart = (char*)buffer->_bufstart;
}
/* Tack s on the buffer */
- mem_sys_memcopy((void *)((ptrcast_t)buffer->strstart),
+ mem_sys_memcopy((void *)((char*)buffer->_bufstart),
s->strstart, s->bufused);
/* Update buffer */
buffer->bufused = s->bufused;
buffer->strlen = Parrot_str_length(INTERP, s);
buffer->encoding = s->encoding;
- buffer->charset = s->charset;
}
VTABLE void set_pmc(PMC *s) {
@@ -451,17 +458,9 @@
/*
-=item C<static size_t calculate_capacity(PARROT_INTERP, size_t current, size_t
-additional)>
+=item C<static size_t calculate_capacity(PARROT_INTERP, size_t needed)>
-Calculate capacity for string. Usually StringBuilders used for "large"
-strings. So capacity rounded up by next algorithm:
- - By 128 bytes if total capacity less then 1KB
- - By 1KB if total less than 4KB
- - By 4KB if total less than 1MB
- - By 1MB otherwise.
-
-This function is subject for tuning on real-world usage scenarios.
+Calculate capacity for string. We allocate double the amount needed.
=back
@@ -470,22 +469,15 @@
*/
static size_t
-calculate_capacity(SHIM_INTERP, size_t current, size_t additional)
+calculate_capacity(SHIM_INTERP, size_t needed)
{
ASSERT_ARGS(calculate_capacity)
- size_t total_size = current + additional;
- size_t chunk_size = 1024*1024;
-
- if (total_size < 1024)
- chunk_size = 128;
- else if (total_size < 4096)
- chunk_size = 1024;
- else if (total_size < 1024*1024)
- chunk_size = 4096;
- total_size = (total_size / chunk_size + 1) * chunk_size;
+ needed *= 2;
+ /* round up to 16 */
+ needed = (needed + 15) & ~15;
- return total_size;
+ return needed;
}
/*
Modified: branches/gc_massacre/src/pmc/stringhandle.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/stringhandle.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/stringhandle.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -193,7 +193,8 @@
GET_ATTR_encoding(INTERP, SELF, encoding);
if (encoding_is_utf8(INTERP, encoding))
- new_string = string_make(INTERP, "", 0, "unicode", 0);
+ new_string = Parrot_str_new_init(INTERP, "", 0,
+ Parrot_utf8_encoding_ptr, 0);
else
new_string = CONST_STRING(INTERP, "");
@@ -215,21 +216,6 @@
/*
-=item C<METHOD is_tty()>
-
-StringHandles are never tty's, returns false.
-
-=cut
-
-*/
- METHOD is_tty() {
- Parrot_warn_deprecated(INTERP,
- "'is_tty' is deprecated, use 'isatty' instead - TT #1689");
- RETURN(INTVAL 0);
- }
-
-/*
-
=item C<METHOD close()>
Reset some core data for the StringHandle, but don't delete the string data, as
@@ -313,7 +299,8 @@
STRING *encoding;
GET_ATTR_encoding(INTERP, SELF, encoding);
if (encoding_is_utf8(INTERP, encoding))
- string_result = string_make(INTERP, "", 0, "unicode", 0);
+ string_result = Parrot_str_new_init(INTERP, "", 0,
+ Parrot_utf8_encoding_ptr, 0);
else
string_result = CONST_STRING(INTERP, "");
}
Modified: branches/gc_massacre/src/pmc/stringiterator.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/stringiterator.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/stringiterator.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -156,11 +156,11 @@
GET_ATTR_str_val(INTERP, SELF, str_val);
if (value == ITERATE_FROM_START) {
SET_ATTR_reverse(INTERP, SELF, 0);
- STRING_ITER_SET_POSITION(INTERP, str_val, iter, 0);
+ STRING_iter_set_position(INTERP, str_val, iter, 0);
}
else if (value == ITERATE_FROM_END) {
SET_ATTR_reverse(INTERP, SELF, 1);
- STRING_ITER_SET_POSITION(INTERP, str_val, iter, str_val->strlen);
+ STRING_iter_set_position(INTERP, str_val, iter, str_val->strlen);
}
else {
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
@@ -209,7 +209,7 @@
"StopIteration");
ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
- STRING_ITER_SKIP(INTERP, str_val, iter, 1);
+ STRING_iter_skip(INTERP, str_val, iter, 1);
substr = Parrot_str_iter_substr(INTERP, str_val, &old_iter, iter);
VTABLE_set_string_native(INTERP, ret, substr);
return ret;
@@ -234,7 +234,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- STRING_ITER_SKIP(INTERP, str_val, iter, 1);
+ STRING_iter_skip(INTERP, str_val, iter, 1);
return Parrot_str_iter_substr(INTERP, str_val, &old_iter, iter);
}
@@ -256,7 +256,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- return STRING_ITER_GET_AND_ADVANCE(INTERP, str_val, iter);
+ return STRING_iter_get_and_advance(INTERP, str_val, iter);
}
/*
@@ -281,7 +281,7 @@
"StopIteration");
ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
- STRING_ITER_SKIP(INTERP, str_val, iter, -1);
+ STRING_iter_skip(INTERP, str_val, iter, -1);
substr = Parrot_str_iter_substr(INTERP, str_val, iter, &old_iter);
VTABLE_set_string_native(INTERP, ret, substr);
return ret;
@@ -307,7 +307,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- STRING_ITER_SKIP(INTERP, str_val, iter, -1);
+ STRING_iter_skip(INTERP, str_val, iter, -1);
return Parrot_str_iter_substr(INTERP, str_val, iter, &old_iter);
}
@@ -330,8 +330,8 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- STRING_ITER_SKIP(INTERP, str_val, iter, -1);
- return STRING_ITER_GET(INTERP, str_val, iter, 0);
+ STRING_iter_skip(INTERP, str_val, iter, -1);
+ return STRING_iter_get(INTERP, str_val, iter, 0);
}
/*
@@ -354,7 +354,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- return STRING_ITER_GET(INTERP, str_val, iter, idx);
+ return STRING_iter_get(INTERP, str_val, iter, idx);
}
/*
@@ -379,9 +379,9 @@
"StopIteration");
if (idx != 0)
- STRING_ITER_SKIP(INTERP, str_val, &iter, idx);
+ STRING_iter_skip(INTERP, str_val, &iter, idx);
next_iter = iter;
- STRING_ITER_SKIP(INTERP, str_val, &next_iter, 1);
+ STRING_iter_skip(INTERP, str_val, &next_iter, 1);
return Parrot_str_iter_substr(INTERP, str_val, &iter, &next_iter);
}
Modified: branches/gc_massacre/src/pmc/sub.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/sub.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/sub.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -19,6 +19,7 @@
*/
#include "parrot/oplib/ops.h"
+#include "parrot/oplib/core_ops.h"
#include "sub.str"
/* HEADERIZER HFILE: none */
@@ -863,14 +864,14 @@
if (!sub->arg_info) {
/* Get pointer into the bytecode where this sub starts. */
const opcode_t *pc = sub->seg->base.data + sub->start_offs;
+ op_lib_t *core_ops = PARROT_GET_CORE_OPLIB(INTERP);
/* Allocate structure to store argument information in. */
sub->arg_info = mem_gc_allocate_zeroed_typed(INTERP,
Parrot_sub_arginfo);
/* If the first instruction is a get_params... */
- if (sub->seg->op_func_table[*pc]
- == interp->op_func_table[PARROT_OP_get_params_pc]) {
+ if (OPCODE_IS(INTERP, sub->seg, *pc, core_ops, PARROT_OP_get_params_pc)) {
/* Get the signature (the next thing in the bytecode). */
PMC * const sig = PF_CONST(sub->seg, *(++pc)).u.key;
Modified: branches/gc_massacre/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/gc_massacre/src/pmc/unmanagedstruct.pmc Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc/unmanagedstruct.pmc Mon Sep 13 21:23:26 2010 (r48984)
@@ -488,7 +488,8 @@
other type or flag must be added.
Need to provide some way to specify charset and encoding.
*/
- return string_make(interp, cstr, len, "iso-8859-1", 0);
+ return Parrot_str_new_init(interp, cstr, len,
+ Parrot_latin1_encoding_ptr, 0);
}
else
return NULL;
Modified: branches/gc_massacre/src/pmc_freeze.c
==============================================================================
--- branches/gc_massacre/src/pmc_freeze.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/pmc_freeze.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -318,15 +318,17 @@
PMC * const todo = VTABLE_get_iter(interp, info);
const INTVAL action = VTABLE_get_integer(interp, info);
- const INTVAL e = VTABLE_elements(interp, todo);
INTVAL i;
/* can't cache upper limit, visit may append items */
for (i = 0; i < VTABLE_elements(interp, todo); ++i) {
PMC * const current = VTABLE_get_pmc_keyed_int(interp, todo, i);
- if (!current)
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
- "NULL current PMC in visit_loop_todo_list");
+ if (PMC_IS_NULL(current))
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_MALFORMED_PACKFILE,
+ "NULL current PMC at %d in visit_loop_todo_list - %s",
+ (int) i,
+ action == VISIT_FREEZE_NORMAL ? "feeze" : "thaw");
PARROT_ASSERT(current->vtable);
Modified: branches/gc_massacre/src/runcore/main.c
==============================================================================
--- branches/gc_massacre/src/runcore/main.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/runcore/main.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -36,28 +36,14 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new)
- __attribute__nonnull__(1);
-
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static oplib_init_f get_dynamic_op_lib_init(SHIM_INTERP,
ARGIN(const PMC *lib))
__attribute__nonnull__(2);
-static void notify_func_table(PARROT_INTERP,
- ARGIN(op_func_t *table),
- int on)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_dynop_register_switch __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_get_dynamic_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(lib))
-#define ASSERT_ARGS_notify_func_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(table))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -219,10 +205,6 @@
{
ASSERT_ARGS(runops_int)
- /* setup event function ptrs */
- if (!interp->save_func_table)
- Parrot_setup_event_func_ptrs(interp);
-
interp->resume_offset = offset;
interp->resume_flag |= RESUME_RESTART;
@@ -250,47 +232,6 @@
/*
-=item C<void Parrot_setup_event_func_ptrs(PARROT_INTERP)>
-
-Setup a C<func_table> containing pointers (or addresses) of the
-C<check_event__> opcode.
-
-TODO: Free it at destroy. Handle run-core changes.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_setup_event_func_ptrs(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_setup_event_func_ptrs)
- const size_t n = interp->op_count;
- const oplib_init_f init_func = get_core_op_lib_init(interp, interp->run_core);
- op_lib_t * const lib = init_func(interp, 1);
-
- /* remember op_func_table */
- interp->save_func_table = lib->op_func_table;
-
- if (!lib->op_func_table)
- return;
-
- /* function or CG core - prepare func_table */
- if (!interp->evc_func_table) {
- size_t i;
-
- interp->evc_func_table = mem_gc_allocate_n_zeroed_typed(interp, n, op_func_t);
-
- for (i = 0; i < n; ++i)
- interp->evc_func_table[i] = (op_func_t)
- D2FPTR(((void**)lib->op_func_table)[CORE_OPS_check_events__]);
- }
-}
-
-
-/*
-
=item C<void Parrot_runcore_destroy(PARROT_INTERP)>
Shuts down the runcores and deallocates any dynops memory.
@@ -326,15 +267,6 @@
mem_gc_free(interp, interp->all_op_libs);
interp->all_op_libs = NULL;
-
- /* dynop libs */
- if (interp->n_libs <= 0)
- return;
-
- mem_gc_free(interp, interp->op_info_table);
- mem_gc_free(interp, interp->op_func_table);
- interp->op_info_table = NULL;
- interp->op_func_table = NULL;
}
@@ -359,21 +291,12 @@
dynop_register(PARROT_INTERP, ARGIN(PMC *lib_pmc))
{
ASSERT_ARGS(dynop_register)
- op_lib_t *lib, *core;
- oplib_init_f init_func;
- op_func_t *new_func_table, *new_evc_func_table;
- op_info_t *new_info_table;
- size_t i, n_old, n_new, n_tot;
+ op_lib_t *lib;
+ oplib_init_f init_func;
if (n_interpreters > 1) {
- /* This is not supported because oplibs are always shared.
- * If we mem_sys_reallocate() the op_func_table while another
- * interpreter is running using that exact op_func_table,
- * this will cause problems
- * Also, the mapping from op name to op number is global even for
- * dynops (!). The mapping is done by get_op in core_ops.c (even for
- * dynops) and uses a global hash as a cache and relies on modifications
- * to the static-scoped core_op_lib data structure to see dynops.
+ /* This is not supported yet because interp->all_op_libs
+ * and interp->op_hash are shared.
*/
Parrot_ex_throw_from_c_args(interp, NULL, 1, "loading a new dynoplib while "
"more than one thread is running is not supported.");
@@ -394,116 +317,33 @@
/* if we are registering an op_lib variant, called from below the base
* names of this lib and the previous one are the same */
if (interp->n_libs >= 2
- && (STREQ(interp->all_op_libs[interp->n_libs-2]->name, lib->name))) {
- /* registering is handled below */
+ && (STREQ(interp->all_op_libs[interp->n_libs-2]->name, lib->name)))
return;
- }
-
- /* when called from yyparse, we have to set up the evc_func_table */
- Parrot_setup_event_func_ptrs(interp);
-
- n_old = interp->op_count;
- n_new = lib->op_count;
- n_tot = n_old + n_new;
- core = PARROT_CORE_OPLIB_INIT(interp, 1);
-
- PARROT_ASSERT(interp->op_count == core->op_count);
-
- new_evc_func_table = mem_gc_realloc_n_typed_zeroed(interp,
- interp->evc_func_table, n_tot, n_old, op_func_t);
- if (core->flags & OP_FUNC_IS_ALLOCATED) {
- new_func_table = mem_gc_realloc_n_typed_zeroed(interp,
- core->op_func_table, n_tot, n_old, op_func_t);
- new_info_table = mem_gc_realloc_n_typed_zeroed(interp,
- core->op_info_table, n_tot, n_old, op_info_t);
- }
- else {
- /* allocate new op_func and info tables */
- new_func_table = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_func_t);
- new_info_table = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_info_t);
-
- /* copy old */
- for (i = 0; i < n_old; ++i) {
- new_func_table[i] = interp->op_func_table[i];
- new_info_table[i] = interp->op_info_table[i];
- }
- }
-
- /* add new */
- for (i = n_old; i < n_tot; ++i) {
- new_func_table[i] = ((op_func_t*)lib->op_func_table)[i - n_old];
- new_info_table[i] = lib->op_info_table[i - n_old];
-
- /*
- * fill new ops of event checker func table
- * if we are running a different core, entries are
- * changed below
- */
- new_evc_func_table[i] = new_func_table[CORE_OPS_check_events__];
- }
-
- interp->evc_func_table = new_evc_func_table;
- interp->save_func_table = new_func_table;
-
- /* deinit core, so that it gets rehashed */
- (void) PARROT_CORE_OPLIB_INIT(interp, 0);
-
- /* set table */
- core->op_func_table = interp->op_func_table = new_func_table;
- core->op_info_table = interp->op_info_table = new_info_table;
- core->op_count = interp->op_count = n_tot;
- core->flags = OP_FUNC_IS_ALLOCATED | OP_INFO_IS_ALLOCATED;
- /* done for plain core */
- dynop_register_switch(interp, n_old, n_new);
+ parrot_hash_oplib(interp, lib);
}
-
-
/*
-=item C<static void dynop_register_switch(PARROT_INTERP, size_t n_old, size_t
-n_new)>
+=item C<void parrot_hash_oplib(PARROT_INTERP, op_lib_t *lib)>
-Used only at the end of dynop_register. Sums the old and new op_counts
-storing the result into the operations count field of the interpreter
-object.
+Add the ops in C<lib> to the global name => op_info hash.
=cut
*/
-static void
-dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new)
-{
- ASSERT_ARGS(dynop_register_switch)
- op_lib_t * const lib = PARROT_CORE_OPLIB_INIT(interp, 1);
- lib->op_count = n_old + n_new;
-}
-
-
-/*
-
-=item C<static void notify_func_table(PARROT_INTERP, op_func_t *table, int on)>
-
-Tell the interpreter's running core about the new function table.
-
-=cut
-
-*/
-
-static void
-notify_func_table(PARROT_INTERP, ARGIN(op_func_t *table), int on)
+void
+parrot_hash_oplib(PARROT_INTERP, ARGIN(op_lib_t *lib))
{
- ASSERT_ARGS(notify_func_table)
- const oplib_init_f init_func = get_core_op_lib_init(interp, interp->run_core);
-
- init_func(interp, (long) table);
-
- if (PARROT_RUNCORE_FUNC_TABLE_TEST(interp->run_core)) {
- PARROT_ASSERT(table);
- interp->op_func_table = table;
+ ASSERT_ARGS(parrot_hash_oplib)
+ int i;
+ for (i = 0; i < lib->op_count; i++) {
+ op_info_t *op = &lib->op_info_table[i];
+ parrot_hash_put(interp, interp->op_hash, (void *)op->full_name, (void *)op);
+ if (!parrot_hash_exists(interp, interp->op_hash, (void *)op->name))
+ parrot_hash_put(interp, interp->op_hash, (void *)op->name, (void *)op);
}
}
@@ -554,9 +394,30 @@
{
ASSERT_ARGS(enable_event_checking)
PackFile_ByteCode *cs = interp->code;
+
/* only save if we're not already event checking */
if (cs->save_func_table == NULL)
cs->save_func_table = cs->op_func_table;
+
+ /* ensure event checking table is big enough */
+ if (interp->evc_func_table_size < cs->op_count) {
+ int i;
+ op_lib_t *core_lib = get_core_op_lib_init(interp, interp->run_core)(interp, 1);
+
+ interp->evc_func_table = interp->evc_func_table ?
+ mem_gc_realloc_n_typed_zeroed(interp,
+ interp->evc_func_table, cs->op_count,
+ interp->evc_func_table_size, op_func_t) :
+ mem_gc_allocate_n_zeroed_typed(interp,
+ cs->op_count, op_func_t);
+
+ for (i = interp->evc_func_table_size; i < cs->op_count; i++)
+ interp->evc_func_table[i] = (op_func_t)
+ D2FPTR(((void**)core_lib->op_func_table)[CORE_OPS_check_events__]);
+
+ interp->evc_func_table_size = cs->op_count;
+ }
+
/* put evc table in place */
cs->op_func_table = interp->evc_func_table;
}
Modified: branches/gc_massacre/src/spf_render.c
==============================================================================
--- branches/gc_massacre/src/spf_render.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/spf_render.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -56,6 +56,14 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+static void canonicalize_exponent(PARROT_INTERP,
+ ARGMOD(char *tc),
+ ARGIN(SpfInfo *info))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*tc);
+
static void gen_sprintf_call(
ARGOUT(char *out),
ARGMOD(SpfInfo *info),
@@ -89,6 +97,10 @@
FUNC_MODIFIES(*dest)
FUNC_MODIFIES(*src);
+#define ASSERT_ARGS_canonicalize_exponent __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(tc) \
+ , PARROT_ASSERT_ARG(info))
#define ASSERT_ARGS_gen_sprintf_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(out) \
, PARROT_ASSERT_ARG(info))
@@ -292,6 +304,96 @@
*p = '\0';
}
+/*
+
+=item C<static void canonicalize_exponent(PARROT_INTERP, char *tc, SpfInfo
+*info)>
+
+ This function is called to canonicalize any exponent in a formatted
+ float. PARROT_SPRINTF_EXP_DIGITS specifies the standard number of
+ exponent digits that we want. Remember that the exponent has the
+ form '...Esddd ', where 's' is the sign, 'ddd' is some number of digits,
+ and there may be trailing spaces
+
+=cut
+
+*/
+
+static void
+canonicalize_exponent(PARROT_INTERP, ARGMOD(char *tc), ARGIN(SpfInfo *info))
+{
+ ASSERT_ARGS(canonicalize_exponent)
+
+ const size_t exp_digits = PARROT_SPRINTF_EXP_DIGITS;
+ size_t len = strlen(tc),
+ last_pos = len,
+ non0_pos = len,
+ sign_pos = 0,
+ e_pos = 0;
+ int i;
+
+ /* Scan the formatted number backward to find the positions of the
+ last digit, leftmost non-0 exponent digit, sign, and E. */
+
+ for (i = len-1; i >= 0 && e_pos == 0; --i) {
+ switch (tc[i]) {
+ case '1': case '2': case '3':
+ case '4': case '5': case '6':
+ case '7': case '8': case '9': non0_pos = i;
+ /* fall through */
+
+ case '0': if (last_pos == len) last_pos = i;
+ break;
+
+ case '+': case '-': sign_pos = i;
+ break;
+
+ case 'E': case 'e': e_pos = i;
+ break;
+
+ default: break;
+ }
+ }
+
+ /* If there is an E, and it is followed by a sign, and there are
+ leading zeroes on the exponent, and there are more than the
+ standard number of exponent digits, then we have work to do. */
+
+ if (e_pos != 0 && sign_pos == e_pos + 1 &&
+ non0_pos > sign_pos + 1 &&
+ last_pos - sign_pos > exp_digits) {
+
+ /* Close up to eliminate excess exponent digits and
+ adjust the length. Don't forget to move the NUL. */
+
+ size_t keep = (last_pos - non0_pos + 1 > exp_digits)
+ ? len - non0_pos
+ : exp_digits + (len - last_pos - 1);
+
+ mem_sys_memmove(&tc[sign_pos+1], &tc[len - keep], keep+1);
+ len = sign_pos + 1 + keep;
+
+ /* If it's a fixed-width field and we're too short now,
+ we have more work to do. If the field is left-justified,
+ pad the number on the right. Otherwise pad the number on
+ the left, possibly with leading zeroes. */
+
+ if ((info->flags & FLAG_WIDTH) && len < info->width) {
+ if (info->flags & FLAG_MINUS) {
+ while (len < info->width) {
+ strcat(tc, " ");
+ ++len;
+ }
+ }
+ else {
+ size_t i;
+ mem_sys_memmove(&tc[info->width - len], &tc[0], len+1);
+ for (i = 0; i < info->width - len; ++i)
+ tc[i] = (info->flags & FLAG_ZERO) ? '0' : ' ';
+ }
+ }
+ }
+}
/*
@@ -317,7 +419,7 @@
HUGEINTVAL num;
/* start with a buffer; double the pattern length to avoid realloc #1 */
- STRING *targ = Parrot_str_new_noinit(interp, enum_stringrep_one, pat_len * 2);
+ STRING *targ = Parrot_str_new_noinit(interp, pat_len * 2);
/* ts is used almost universally as an intermediate target;
* tc is used as a temporary buffer by Parrot_str_from_uint and
@@ -759,45 +861,9 @@
Parrot_str_free_cstring(tempstr);
}
-#ifdef WIN32
-
- /* Microsoft defaults to three digits for
- * exponents, even when fewer digits would suffice.
- * For the sake of portability, we will here
- * attempt to hide that. */
- if (ch == 'g' || ch == 'G'
- || ch == 'e' || ch == 'E') {
- const size_t tclen = strlen(tc);
- size_t j;
- for (j = 0; j < tclen; ++j) {
- if ((tc[j] == 'e' || tc[j] == 'E')
- && (tc[j+1] == '+' || tc[j+1] == '-')
- && tc[j+2] == '0'
- && isdigit((unsigned char)tc[j+3])
- && isdigit((unsigned char)tc[j+4]))
- {
- mem_sys_memmove(&tc[j+2], &tc[j+3],
- strlen(&tc[j+2]));
-
- /* now fix any broken length */
-
- if ((info.flags & FLAG_WIDTH)
- && strlen(tc) < info.width) {
- if (info.flags & FLAG_MINUS)
- strcat(tc, " ");
- else {
- mem_sys_memmove(&tc[1], &tc[0],
- strlen(tc) + 1);
- tc[0] = (info.flags & FLAG_ZERO) ? '0' : ' ';
- }
- }
-
- /* only one fix required per string */
- break;
- }
- }
- }
-#endif /* WIN32 */
+ if (ch == 'e' || ch == 'E' ||
+ ch == 'g' || ch == 'G')
+ canonicalize_exponent(interp, tc, &info);
targ = Parrot_str_concat(interp, targ, cstr2pstr(tc));
}
Modified: branches/gc_massacre/src/spf_vtable.c
==============================================================================
--- branches/gc_massacre/src/spf_vtable.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/spf_vtable.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -183,7 +183,7 @@
/* char promoted to int */
char ch = (char)va_arg(*arg, int);
- return string_make(interp, &ch, 1, "iso-8859-1", 0);
+ return Parrot_str_new_init(interp, &ch, 1, Parrot_latin1_encoding_ptr, 0);
}
/*
@@ -452,7 +452,6 @@
++obj->index;
s = VTABLE_get_string(interp, tmp);
- /* XXX Parrot_str_copy like below? + adjusting bufused */
return Parrot_str_substr(interp, s, 0, 1);
}
Modified: branches/gc_massacre/src/string/api.c
==============================================================================
--- branches/gc_massacre/src/string/api.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/api.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -35,7 +35,6 @@
#define nonnull_encoding_name(s) (s) ? (s)->encoding->name : "null string"
#define ASSERT_STRING_SANITY(s) \
PARROT_ASSERT((s)->encoding); \
- PARROT_ASSERT((s)->charset); \
PARROT_ASSERT(!PObj_on_free_list_TEST(s))
/* HEADERIZER HFILE: include/parrot/string_funcs.h */
@@ -46,14 +45,11 @@
PARROT_INLINE
PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
-static const CHARSET * string_rep_compatible(SHIM_INTERP,
+static const STR_VTABLE * string_rep_compatible(SHIM_INTERP,
ARGIN(const STRING *a),
- ARGIN(const STRING *b),
- ARGOUT(const ENCODING **e))
+ ARGIN(const STRING *b))
__attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- FUNC_MODIFIES(*e);
+ __attribute__nonnull__(3);
PARROT_DOES_NOT_RETURN
PARROT_COLD
@@ -62,8 +58,7 @@
#define ASSERT_ARGS_string_rep_compatible __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(a) \
- , PARROT_ASSERT_ARG(b) \
- , PARROT_ASSERT_ARG(e))
+ , PARROT_ASSERT_ARG(b))
#define ASSERT_ARGS_throw_illegal_escape __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -137,15 +132,18 @@
return;
}
- /* Set up the cstring cache, then load the basic encodings and charsets */
- const_cstring_hash = parrot_new_cstring_hash(interp);
+ /* Set up the cstring cache, then load the basic encodings */
+ const_cstring_hash = parrot_create_hash_sized(interp,
+ enum_type_PMC,
+ Hash_key_type_cstring,
+ n_parrot_cstrings);
interp->const_cstring_hash = const_cstring_hash;
- Parrot_charsets_encodings_init(interp);
+ Parrot_encodings_init(interp);
#if PARROT_CATCH_NULL
/* initialize STRINGNULL, but not in the constant table */
STRINGNULL = Parrot_str_new_init(interp, NULL, 0,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_constant_FLAG);
#endif
@@ -158,7 +156,7 @@
Parrot_str_new_init(interp,
parrot_cstrings[i].string,
parrot_cstrings[i].len,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_external_FLAG|PObj_constant_FLAG);
parrot_hash_put(interp, const_cstring_hash,
PARROT_const_cast(char *, parrot_cstrings[i].string), (void *)s);
@@ -187,7 +185,7 @@
if (!interp->parent_interpreter) {
mem_internal_free(interp->const_cstring_table);
interp->const_cstring_table = NULL;
- Parrot_charsets_encodings_deinit(interp);
+ Parrot_deinit_encodings(interp);
parrot_hash_destroy(interp, interp->const_cstring_hash);
}
}
@@ -195,8 +193,7 @@
/*
-=item C<STRING * Parrot_str_new_noinit(PARROT_INTERP,
-parrot_string_representation_t representation, UINTVAL capacity)>
+=item C<STRING * Parrot_str_new_noinit(PARROT_INTERP, UINTVAL capacity)>
Creates and returns an empty Parrot string.
@@ -207,19 +204,12 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
STRING *
-Parrot_str_new_noinit(PARROT_INTERP,
- parrot_string_representation_t representation, UINTVAL capacity)
+Parrot_str_new_noinit(PARROT_INTERP, UINTVAL capacity)
{
ASSERT_ARGS(Parrot_str_new_noinit)
STRING * const s = Parrot_gc_new_string_header(interp, 0);
- /* TODO adapt string creation functions */
- if (representation != enum_stringrep_one)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_CHARTYPE,
- "Unsupported representation");
-
- s->charset = PARROT_DEFAULT_CHARSET;
- s->encoding = CHARSET_GET_PREFERRED_ENCODING(interp, s);
+ s->encoding = Parrot_default_encoding_ptr;
Parrot_gc_allocate_string_storage(interp, s,
(size_t)string_max_bytes(interp, s, capacity));
@@ -230,10 +220,10 @@
/*
-=item C<static const CHARSET * string_rep_compatible(PARROT_INTERP, const STRING
-*a, const STRING *b, const ENCODING **e)>
+=item C<static const STR_VTABLE * string_rep_compatible(PARROT_INTERP, const
+STRING *a, const STRING *b)>
-Find the "lowest" possible charset and encoding for the given string. E.g.
+Find the "lowest" possible encoding for the given string. E.g.
ascii <op> utf8 => utf8
=> ascii, B<if> C<STRING *b> has ascii chars only.
@@ -247,66 +237,59 @@
PARROT_INLINE
PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
-static const CHARSET *
+static const STR_VTABLE *
string_rep_compatible(SHIM_INTERP,
- ARGIN(const STRING *a), ARGIN(const STRING *b), ARGOUT(const ENCODING **e))
+ ARGIN(const STRING *a), ARGIN(const STRING *b))
{
ASSERT_ARGS(string_rep_compatible)
- if (a->encoding == b->encoding && a->charset == b->charset) {
- *e = a->encoding;
- return a->charset;
+ if (a->encoding == b->encoding) {
+ return a->encoding;
}
/* a table could possibly simplify the logic */
if (a->encoding == Parrot_utf8_encoding_ptr
- && b->charset == Parrot_ascii_charset_ptr) {
+ && b->encoding == Parrot_ascii_encoding_ptr) {
if (a->strlen == a->bufused) {
- *e = Parrot_fixed_8_encoding_ptr;
- return b->charset;
+ return b->encoding;
}
- *e = a->encoding;
- return a->charset;
+ return a->encoding;
}
if (b->encoding == Parrot_utf8_encoding_ptr
- && a->charset == Parrot_ascii_charset_ptr) {
+ && a->encoding == Parrot_ascii_encoding_ptr) {
if (b->strlen == b->bufused) {
- *e = Parrot_fixed_8_encoding_ptr;
- return a->charset;
+ return a->encoding;
}
- *e = b->encoding;
- return b->charset;
+ return b->encoding;
}
- if (a->encoding != b->encoding)
+ /* Sanity check before dereferencing the encoding pointers */
+ if (a->encoding == NULL || b->encoding == NULL)
return NULL;
- if (a->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(a) != 1 ||
+ STRING_max_bytes_per_codepoint(b) != 1)
return NULL;
- *e = Parrot_fixed_8_encoding_ptr;
-
- if (a->charset == b->charset)
- return a->charset;
- if (b->charset == Parrot_ascii_charset_ptr)
- return a->charset;
- if (a->charset == Parrot_ascii_charset_ptr)
- return b->charset;
- if (a->charset == Parrot_binary_charset_ptr)
- return a->charset;
- if (b->charset == Parrot_binary_charset_ptr)
- return b->charset;
+ if (b->encoding == Parrot_ascii_encoding_ptr)
+ return a->encoding;
+ if (a->encoding == Parrot_ascii_encoding_ptr)
+ return b->encoding;
+ if (a->encoding == Parrot_binary_encoding_ptr)
+ return a->encoding;
+ if (b->encoding == Parrot_binary_encoding_ptr)
+ return b->encoding;
return NULL;
}
/*
-=item C<const CHARSET * Parrot_str_rep_compatible(PARROT_INTERP, const STRING
-*a, const STRING *b, const ENCODING **e)>
+=item C<const STR_VTABLE * Parrot_str_rep_compatible(PARROT_INTERP, const STRING
+*a, const STRING *b)>
-Find the "lowest" possible charset and encoding for the given string. E.g.
+Find the "lowest" possible encoding for the given string. E.g.
ascii <op> utf8 => utf8
=> ascii, B<if> C<STRING *b> has ascii chars only.
@@ -320,12 +303,12 @@
PARROT_EXPORT
PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
-const CHARSET *
+const STR_VTABLE *
Parrot_str_rep_compatible(PARROT_INTERP,
- ARGIN(const STRING *a), ARGIN(const STRING *b), ARGOUT(const ENCODING **e))
+ ARGIN(const STRING *a), ARGIN(const STRING *b))
{
ASSERT_ARGS(Parrot_str_rep_compatible)
- return string_rep_compatible(interp, a, b, e);
+ return string_rep_compatible(interp, a, b);
}
/*
@@ -348,18 +331,18 @@
const size_t alloc_size = s->bufused;
STRING * const result = Parrot_gc_new_string_header(interp, 0);
- /* Copy encoding/charset/etc */
- STRUCT_COPY(result, s);
-
- /* Clear COW flag. We own buffer */
- PObj_get_FLAGS(result) = PObj_is_string_FLAG
- | PObj_is_COWable_FLAG;
-
- /* Allocate new chunk of memory */
- Parrot_gc_allocate_string_storage(interp, result, alloc_size);
+ if (alloc_size) {
+ /* Allocate new chunk of memory */
+ Parrot_gc_allocate_string_storage(interp, result, alloc_size);
+
+ /* and copy it over */
+ mem_sys_memcopy(result->strstart, s->strstart, alloc_size);
+ }
- /* and copy it over */
- mem_sys_memcopy(result->strstart, s->strstart, alloc_size);
+ result->bufused = alloc_size;
+ result->strlen = s->strlen;
+ result->hashval = s->hashval;
+ result->encoding = s->encoding;
return result;
}
@@ -433,30 +416,28 @@
ARGIN_NULLOK(const STRING *b))
{
ASSERT_ARGS(Parrot_str_concat)
- const CHARSET *cs;
- const ENCODING *enc = NULL;
- STRING *dest;
- UINTVAL total_length;
-
- /* XXX should this be a CHARSET method? */
-
- /* If B isn't real, we just bail */
- const UINTVAL b_len = b ? Parrot_str_length(interp, b) : 0;
- if (!b_len)
- return STRING_IS_NULL(a) ? STRINGNULL : Parrot_str_copy(interp, a);
-
- /* Is A real? */
- if (STRING_IS_NULL(a) || Buffer_bufstart(a) == NULL)
- return Parrot_str_copy(interp, b);
+ const STR_VTABLE *enc;
+ STRING *dest;
+ UINTVAL total_length;
+
+ if (STRING_IS_NULL(a)) {
+ if (STRING_IS_NULL(b))
+ return STRINGNULL;
+ else
+ return Parrot_str_copy(interp, b);
+ }
+ else {
+ if (STRING_IS_NULL(b))
+ return Parrot_str_copy(interp, a);
+ }
ASSERT_STRING_SANITY(a);
ASSERT_STRING_SANITY(b);
- cs = string_rep_compatible(interp, a, b, &enc);
+ enc = string_rep_compatible(interp, a, b);
- if (!cs) {
+ if (!enc) {
/* upgrade strings for concatenation */
- cs = Parrot_unicode_charset_ptr;
if (a->encoding == Parrot_ucs4_encoding_ptr
|| b->encoding == Parrot_ucs4_encoding_ptr)
enc = Parrot_ucs4_encoding_ptr;
@@ -468,22 +449,15 @@
else
enc = Parrot_utf8_encoding_ptr;
- a = Parrot_unicode_charset_ptr->to_charset(interp, a);
- b = Parrot_unicode_charset_ptr->to_charset(interp, b);
-
- if (a->encoding != enc)
- a = enc->to_encoding(interp, a);
- if (b->encoding != enc)
- b = enc->to_encoding(interp, b);
+ a = enc->to_encoding(interp, a);
+ b = enc->to_encoding(interp, b);
}
/* calc usable and total bytes */
total_length = a->bufused + b->bufused;
- dest = Parrot_str_new_noinit(interp, enum_stringrep_one, total_length);
+ dest = Parrot_str_new_noinit(interp, total_length);
PARROT_ASSERT(enc);
- PARROT_ASSERT(cs);
dest->encoding = enc;
- dest->charset = cs;
/* Copy A first */
mem_sys_memcopy(dest->strstart, a->strstart, a->bufused);
@@ -493,7 +467,7 @@
b->strstart, b->bufused);
dest->bufused = a->bufused + b->bufused;
- dest->strlen = a->strlen + b_len;
+ dest->strlen = a->strlen + b->strlen;
return dest;
}
@@ -522,7 +496,7 @@
const UINTVAL buff_length = (len > 0) ? len : buffer ? strlen(buffer) : 0;
return Parrot_str_new_init(interp, buffer, buff_length,
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET, 0);
+ Parrot_default_encoding_ptr, 0);
}
@@ -555,8 +529,7 @@
result->strstart = (char *)Buffer_bufstart(result);
result->bufused = len;
result->strlen = len;
- result->encoding = Parrot_fixed_8_encoding_ptr;
- result->charset = Parrot_binary_charset_ptr;
+ result->encoding = Parrot_binary_encoding_ptr;
Buffer_buflen(buffer) = 0;
Buffer_bufstart(buffer) = NULL;
@@ -567,37 +540,6 @@
/*
-=item C<const char* string_primary_encoding_for_representation(PARROT_INTERP,
-parrot_string_representation_t representation)>
-
-Returns the primary encoding for the specified representation.
-
-This is needed for packfile unpacking, unless we just always use UTF-8 or BOCU.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_OBSERVER
-const char*
-string_primary_encoding_for_representation(PARROT_INTERP,
- parrot_string_representation_t representation)
-{
- ASSERT_ARGS(string_primary_encoding_for_representation)
- if (representation == enum_stringrep_one)
- return "ascii";
-
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "string_primary_encoding_for_representation: "
- "invalid string representation");
-}
-
-
-/*
-
=item C<STRING * Parrot_str_new_constant(PARROT_INTERP, const char *buffer)>
Creates and returns a constant Parrot string.
@@ -622,7 +564,7 @@
return s;
s = Parrot_str_new_init(interp, buffer, strlen(buffer),
- PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET,
+ Parrot_default_encoding_ptr,
PObj_external_FLAG|PObj_constant_FLAG);
parrot_hash_put(interp, cstring_cache,
@@ -635,12 +577,12 @@
/*
=item C<STRING * string_make(PARROT_INTERP, const char *buffer, UINTVAL len,
-const char *charset_name, UINTVAL flags)>
+const char *encoding_name, UINTVAL flags)>
Creates and returns a new Parrot string using C<len> bytes of string data read
from C<buffer>.
-The value of C<charset_name> specifies the string's representation.
+The value of C<encoding_name> specifies the string's representation.
The currently recognised values are:
'iso-8859-1'
@@ -651,7 +593,7 @@
The encoding is implicitly guessed; C<unicode> implies the C<utf-8> encoding,
and the other three assume C<fixed-8> encoding.
-If C<charset> is unspecified, the default charset 'ascii' will be used.
+If C<encoding_name> is unspecified, the default encoding 'ascii' will be used.
The value of C<flags> is optionally one or more C<PObj_*> flags C<OR>-ed
together.
@@ -665,74 +607,28 @@
PARROT_CANNOT_RETURN_NULL
STRING *
string_make(PARROT_INTERP, ARGIN_NULLOK(const char *buffer),
- UINTVAL len, ARGIN_NULLOK(const char *charset_name), UINTVAL flags)
+ UINTVAL len, ARGIN_NULLOK(const char *encoding_name), UINTVAL flags)
{
ASSERT_ARGS(string_make)
- const CHARSET *charset;
+ const STR_VTABLE *encoding;
- if (charset_name) {
- charset = Parrot_find_charset(interp, charset_name);
- if (!charset)
+ if (encoding_name) {
+ encoding = Parrot_find_encoding(interp, encoding_name);
+ if (!encoding)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Can't make '%s' charset strings", charset_name);
+ "Can't make '%s' encoding strings", encoding_name);
}
else
- charset = Parrot_get_charset(interp, 0);
+ encoding = Parrot_default_encoding_ptr;
- return Parrot_str_new_init(interp, buffer, len,
- charset->preferred_encoding, charset, flags);
-}
-
-
-/*
-
-=item C<STRING * string_make_from_charset(PARROT_INTERP, const char *buffer,
-UINTVAL len, INTVAL charset_nr, UINTVAL flags)>
-
-Creates and returns a new Parrot string using C<len> bytes of string data read
-from C<buffer>.
-
-The value of C<charset_name> specifies the string's representation. It must be
-a valid charset identifier.
-
- 'iso-8859-1'
- 'ascii'
- 'binary'
- 'unicode'
-
-The encoding is implicitly guessed; C<unicode> implies the C<utf-8> encoding,
-and the other three assume C<fixed-8> encoding.
-
-The value of C<flags> is optionally one or more C<PObj_*> flags C<OR>-ed
-together.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-STRING *
-string_make_from_charset(PARROT_INTERP, ARGIN_NULLOK(const char *buffer),
- UINTVAL len, INTVAL charset_nr, UINTVAL flags)
-{
- ASSERT_ARGS(string_make_from_charset)
- const CHARSET *charset = Parrot_get_charset(interp, charset_nr);
-
- if (!charset)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Invalid charset number '%d' specified", charset_nr);
-
- return Parrot_str_new_init(interp, buffer, len,
- charset->preferred_encoding, charset, flags);
+ return Parrot_str_new_init(interp, buffer, len, encoding, flags);
}
/*
=item C<STRING * Parrot_str_new_init(PARROT_INTERP, const char *buffer, UINTVAL
-len, const ENCODING *encoding, const CHARSET *charset, UINTVAL flags)>
+len, const STR_VTABLE *encoding, UINTVAL flags)>
Given a buffer, its length, an encoding, a character set, and STRING flags,
creates and returns a new string. Don't call this directly.
@@ -746,13 +642,12 @@
PARROT_CANNOT_RETURN_NULL
STRING *
Parrot_str_new_init(PARROT_INTERP, ARGIN_NULLOK(const char *buffer), UINTVAL len,
- ARGIN(const ENCODING *encoding), ARGIN(const CHARSET *charset), UINTVAL flags)
+ ARGIN(const STR_VTABLE *encoding), UINTVAL flags)
{
ASSERT_ARGS(Parrot_str_new_init)
DECL_CONST_CAST;
STRING * const s = Parrot_gc_new_string_header(interp, flags);
s->encoding = encoding;
- s->charset = charset;
if (flags & PObj_external_FLAG) {
/*
@@ -767,23 +662,23 @@
Buffer_bufstart(s) = s->strstart = PARROT_const_cast(char *, buffer);
Buffer_buflen(s) = s->bufused = len;
- if (encoding == Parrot_fixed_8_encoding_ptr)
+ if (encoding->max_bytes_per_codepoint == 1)
s->strlen = len;
else
- s->strlen = CHARSET_CODEPOINTS(interp, s);
+ s->strlen = STRING_scan(interp, s);
return s;
}
Parrot_gc_allocate_string_storage(interp, s, len);
- if (buffer) {
+ if (buffer && len) {
mem_sys_memcopy(s->strstart, buffer, len);
s->bufused = len;
- if (encoding == Parrot_fixed_8_encoding_ptr)
+ if (encoding->max_bytes_per_codepoint == 1)
s->strlen = len;
else
- s->strlen = CHARSET_CODEPOINTS(interp, s);
+ s->strlen = STRING_scan(interp, s);
}
else
s->strlen = s->bufused = 0;
@@ -841,7 +736,7 @@
{
ASSERT_ARGS(Parrot_str_indexed)
ASSERT_STRING_SANITY(s);
- return (INTVAL)CHARSET_GET_CODEPOINT(interp, s, idx);
+ return (INTVAL)STRING_ord(interp, s, idx);
}
@@ -889,7 +784,7 @@
STRING *src = PARROT_const_cast(STRING *, s);
STRING *search = PARROT_const_cast(STRING *, s2);
- return CHARSET_INDEX(interp, src, search, (UINTVAL)start);
+ return STRING_index(interp, src, search, (UINTVAL)start);
}
}
@@ -957,17 +852,13 @@
string_chr(PARROT_INTERP, UINTVAL character)
{
ASSERT_ARGS(string_chr)
- if (character > 0xff)
- return Parrot_unicode_charset_ptr->string_from_codepoint(interp,
- character);
+ if (character > 0xff)
+ return Parrot_utf8_encoding_ptr->chr(interp, character);
else if (character > 0x7f)
- return Parrot_iso_8859_1_charset_ptr->string_from_codepoint(interp,
- character);
-
+ return Parrot_latin1_encoding_ptr->chr(interp, character);
else
- return Parrot_ascii_charset_ptr->string_from_codepoint(interp,
- character);
+ return Parrot_ascii_encoding_ptr->chr(interp, character);
}
@@ -1018,7 +909,7 @@
{
ASSERT_ARGS(string_max_bytes)
PARROT_ASSERT(s->encoding);
- return ENCODING_MAX_BYTES_PER_CODEPOINT(interp, s) * nchars;
+ return STRING_max_bytes_per_codepoint(s) * nchars;
}
@@ -1040,7 +931,7 @@
ASSERT_ARGS(Parrot_str_repeat)
STRING * const dest = Parrot_str_new_init(interp, NULL,
s->bufused * num,
- s->encoding, s->charset, 0);
+ s->encoding, 0);
if (num > 0) {
/* copy s into dest num times */
UINTVAL length = s->bufused;
@@ -1081,8 +972,9 @@
{
ASSERT_ARGS(Parrot_str_substr)
- UINTVAL true_length;
- UINTVAL true_offset = (UINTVAL)offset;
+ UINTVAL true_length;
+ UINTVAL true_offset = (UINTVAL)offset;
+ const UINTVAL src_length = Parrot_str_length(interp, src);
if (STRING_IS_NULL(src))
Parrot_ex_throw_from_c_args(interp, NULL,
@@ -1091,24 +983,27 @@
ASSERT_STRING_SANITY(src);
/* Allow regexes to return $' easily for "aaa" =~ /aaa/ */
- if (offset == (INTVAL)Parrot_str_length(interp, src) || length < 1)
- return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ if (offset == src_length || length < 1)
+ return CONST_STRING(interp, "");
if (offset < 0)
- true_offset = (UINTVAL)(src->strlen + offset);
+ true_offset = src_length + offset;
/* 0 based... */
- if (src->strlen == 0 || true_offset > src->strlen - 1)
+ if (src_length == 0 || true_offset > src_length - 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_SUBSTR_OUT_OF_STRING,
"Cannot take substr outside string");
true_length = (UINTVAL)length;
- if (true_length > (src->strlen - true_offset))
- true_length = (UINTVAL)(src->strlen - true_offset);
+ if (true_length > (src_length - true_offset))
+ true_length = (UINTVAL)(src_length - true_offset);
- return CHARSET_GET_CODEPOINTS(interp, src, true_offset, true_length);
+ if (true_length == src_length && !offset)
+ return src;
+ else
+ return STRING_substr(interp, src, true_offset, true_length);
}
/*
@@ -1182,12 +1077,12 @@
}
STRING_ITER_INIT(interp, &search_iter);
- c0 = STRING_ITER_GET_AND_ADVANCE(interp, search, &search_iter);
+ c0 = STRING_iter_get_and_advance(interp, search, &search_iter);
search_start = search_iter;
next_start = *start;
while (start->charpos + len <= src->strlen) {
- UINTVAL c1 = STRING_ITER_GET_AND_ADVANCE(interp, src, &next_start);
+ UINTVAL c1 = STRING_iter_get_and_advance(interp, src, &next_start);
if (c1 == c0) {
UINTVAL c2;
@@ -1196,8 +1091,8 @@
do {
if (search_iter.charpos >= len)
return start->charpos;
- c1 = STRING_ITER_GET_AND_ADVANCE(interp, src, end);
- c2 = STRING_ITER_GET_AND_ADVANCE(interp, search, &search_iter);
+ c1 = STRING_iter_get_and_advance(interp, src, end);
+ c2 = STRING_iter_get_and_advance(interp, search, &search_iter);
} while (c1 == c2);
search_iter = search_start;
@@ -1243,12 +1138,11 @@
INTVAL offset, INTVAL length, ARGIN(const STRING *rep))
{
ASSERT_ARGS(Parrot_str_replace)
- String_iter iter;
- const CHARSET *cs;
- const ENCODING *enc;
- STRING *dest = NULL;
- UINTVAL true_offset = (UINTVAL)offset;
- UINTVAL true_length = (UINTVAL)length;
+ String_iter iter;
+ const STR_VTABLE *enc;
+ STRING *dest = NULL;
+ UINTVAL true_offset = (UINTVAL)offset;
+ UINTVAL true_length = (UINTVAL)length;
UINTVAL start_byte, end_byte, start_char, end_char;
INTVAL buf_size;
@@ -1275,24 +1169,25 @@
true_length = (UINTVAL)(src->strlen - true_offset);
/* may have different reps..... */
- cs = string_rep_compatible(interp, src, rep, &enc);
+ enc = string_rep_compatible(interp, src, rep);
- if (!cs) {
- src = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- rep = Parrot_utf16_encoding_ptr->to_encoding(interp, rep);
- /* Remember selected charset and encoding */
+ if (!enc) {
+ if (src->encoding != Parrot_utf8_encoding_ptr)
+ src = Parrot_utf8_encoding_ptr->to_encoding(interp, src);
+ if (rep->encoding != Parrot_utf8_encoding_ptr)
+ rep = Parrot_utf8_encoding_ptr->to_encoding(interp, rep);
+ /* Remember selected encoding */
enc = src->encoding;
- cs = src->charset;
}
/* get byte position of the part that will be replaced */
STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_POSITION(interp, src, &iter, true_offset);
+ STRING_iter_set_position(interp, src, &iter, true_offset);
start_byte = iter.bytepos;
start_char = iter.charpos;
- STRING_ITER_SKIP(interp, src, &iter, true_length);
+ STRING_iter_skip(interp, src, &iter, true_length);
end_byte = iter.bytepos;
end_char = iter.charpos;
@@ -1305,9 +1200,8 @@
/* Now do the replacement */
dest = Parrot_gc_new_string_header(interp, 0);
- /* Set encoding and charset to compatible */
+ /* Set encoding to compatible */
dest->encoding = enc;
- dest->charset = cs;
/* Clear COW flag. We own buffer */
PObj_get_FLAGS(dest) = PObj_is_string_FLAG
@@ -1379,7 +1273,7 @@
return chopped;
}
- if (chopped->encoding == Parrot_fixed_8_encoding_ptr) {
+ if (STRING_max_bytes_per_codepoint(chopped) == 1) {
chopped->bufused = new_length;
}
else if (chopped->encoding == Parrot_ucs2_encoding_ptr) {
@@ -1390,7 +1284,7 @@
String_iter iter;
STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_POSITION(interp, s, &iter, new_length);
+ STRING_iter_set_position(interp, s, &iter, new_length);
chopped->bufused = iter.bytepos;
}
@@ -1429,7 +1323,7 @@
ASSERT_STRING_SANITY(s1);
ASSERT_STRING_SANITY(s2);
- return CHARSET_COMPARE(interp, s1, s2);
+ return STRING_compare(interp, s1, s2);
}
@@ -1502,7 +1396,7 @@
* both strings are non-null
* both strings have same length
*/
- return CHARSET_COMPARE(interp, s1, s2) == 0;
+ return STRING_compare(interp, s1, s2) == 0;
}
@@ -1528,13 +1422,13 @@
STRING *res;
size_t minlen;
- /* we could also trans_charset to iso-8859-1 */
- if (s1 && s1->encoding != Parrot_fixed_8_encoding_ptr)
+ /* we could also trans_encoding to iso-8859-1 */
+ if (s1 && STRING_max_bytes_per_codepoint(s1) != 1)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_ENCODING,
"string bitwise_and (%s/%s) unsupported",
s1->encoding->name, nonnull_encoding_name(s2));
- if (s2 && s2->encoding != Parrot_fixed_8_encoding_ptr)
+ if (s2 && STRING_max_bytes_per_codepoint(s2) != 1)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_ENCODING,
"string bitwise_and (%s/%s) unsupported",
nonnull_encoding_name(s1), s2->encoding->name);
@@ -1546,7 +1440,7 @@
minlen = 0;
res = Parrot_str_new_init(interp, NULL, minlen,
- Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
+ Parrot_binary_encoding_ptr, 0);
if (STRING_IS_NULL(s1) || STRING_IS_NULL(s2)) {
res->bufused = 0;
@@ -1670,7 +1564,7 @@
size_t maxlen = 0;
if (!STRING_IS_NULL(s1)) {
- if (s1->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s1) != 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
"string bitwise_or (%s/%s) unsupported",
@@ -1680,7 +1574,7 @@
}
if (!STRING_IS_NULL(s2)) {
- if (s2->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s2) != 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
"string bitwise_or (%s/%s) unsupported",
@@ -1691,7 +1585,7 @@
}
res = Parrot_str_new_init(interp, NULL, maxlen,
- Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
+ Parrot_binary_encoding_ptr, 0);
if (!maxlen) {
res->bufused = 0;
@@ -1736,7 +1630,7 @@
size_t maxlen = 0;
if (!STRING_IS_NULL(s1)) {
- if (s1->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s1) != 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
"string bitwise_xor (%s/%s) unsupported",
@@ -1746,7 +1640,7 @@
}
if (!STRING_IS_NULL(s2)) {
- if (s2->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s2) != 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
"string bitwise_xor (%s/%s) unsupported",
@@ -1757,7 +1651,7 @@
}
res = Parrot_str_new_init(interp, NULL, maxlen,
- Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
+ Parrot_binary_encoding_ptr, 0);
if (!maxlen) {
res->bufused = 0;
@@ -1813,11 +1707,11 @@
size_t len;
if (!STRING_IS_NULL(s)) {
- if (s->encoding != Parrot_fixed_8_encoding_ptr)
+ if (STRING_max_bytes_per_codepoint(s) != 1)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_ENCODING,
- "string bitwise_not (%s/%s) unsupported",
- s->encoding->name, s->encoding->name);
+ "string bitwise_not (%s) unsupported",
+ s->encoding->name);
len = s->bufused;
}
@@ -1825,7 +1719,7 @@
len = 0;
res = Parrot_str_new_init(interp, NULL, len,
- Parrot_fixed_8_encoding_ptr, Parrot_binary_charset_ptr, 0);
+ Parrot_binary_encoding_ptr, 0);
if (!len) {
res->bufused = 0;
@@ -1971,7 +1865,7 @@
STRING_ITER_INIT(interp, &iter);
while (state != parse_end && iter.charpos < s->strlen) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, s, &iter);
+ const UINTVAL c = STRING_iter_get_and_advance(interp, s, &iter);
/* Check for overflow */
if (c > 255)
break;
@@ -2070,7 +1964,7 @@
/* Handcrafted FSM to read float value */
while (state != parse_end && iter.charpos < s->strlen) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, s, &iter);
+ const UINTVAL c = STRING_iter_get_and_advance(interp, s, &iter);
/* Check for overflow */
if (c > 255)
break;
@@ -2437,15 +2331,8 @@
size_t hashval = interp->hash_seed;
if (!STRING_IS_NULL(s)) {
- if (s->strlen) {
- if (s->encoding->hash)
- hashval = ENCODING_HASH(interp, s, hashval);
- else if (s->charset->compute_hash)
- hashval = CHARSET_COMPUTE_HASH(interp, s, hashval);
- else {
- exit_fatal(1, "String subsystem not properly initialized");
- }
- }
+ if (s->strlen)
+ hashval = STRING_hash(interp, s, hashval);
s->hashval = hashval;
}
@@ -2518,14 +2405,14 @@
/* create ascii result */
result = Parrot_str_new_init(interp, NULL, charlen,
- Parrot_fixed_8_encoding_ptr, Parrot_ascii_charset_ptr, 0);
+ Parrot_ascii_encoding_ptr, 0);
/* more work TODO */
STRING_ITER_INIT(interp, &iter);
dp = (unsigned char *)result->strstart;
for (i = 0; len > 0; --len) {
- UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
+ UINTVAL c = STRING_iter_get_and_advance(interp, src, &iter);
if (c < 0x7f) {
/* process ASCII chars */
if (i >= charlen - 2) {
@@ -2628,12 +2515,11 @@
/*
=item C<STRING * Parrot_str_unescape_string(PARROT_INTERP, const STRING *src,
-const CHARSET *charset, const ENCODING *encoding, UINTVAL flags)>
+const STR_VTABLE *encoding, UINTVAL flags)>
EXPERIMENTAL, see TT #1628
-Unescapes the src string returnning a new string with the charset
-and encoding specified.
+Unescapes the src string returnning a new string with the encoding specified.
=cut
@@ -2644,8 +2530,7 @@
PARROT_CANNOT_RETURN_NULL
STRING *
Parrot_str_unescape_string(PARROT_INTERP, ARGIN(const STRING *src),
- ARGIN(const CHARSET *charset),
- ARGIN(const ENCODING *encoding),
+ ARGIN(const STR_VTABLE *encoding),
UINTVAL flags)
{
ASSERT_ARGS(Parrot_str_unescape_string)
@@ -2659,7 +2544,6 @@
char digbuf[9];
int pending;
- result->charset = charset;
result->encoding = encoding;
reserved = string_max_bytes(interp, result, srclen);
Parrot_gc_allocate_string_storage(interp, result, reserved);
@@ -2668,14 +2552,14 @@
STRING_ITER_INIT(interp, &itersrc);
STRING_ITER_INIT(interp, &iterdest);
while (itersrc.bytepos < srclen) {
- INTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ INTVAL c = STRING_iter_get_and_advance(interp, src, &itersrc);
INTVAL next;
do {
pending = 0;
next = c;
if (c == '\\') {
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
switch (c) {
/* Common one char sequences */
case 'a': next = '\a'; break;
@@ -2688,7 +2572,7 @@
case 'e': next = '\x1B'; break;
/* Escape character */
case 'c':
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
/* This assumes ascii-alike encoding */
if (c < 'A' || c > 'Z')
throw_illegal_escape(interp);
@@ -2696,11 +2580,11 @@
break;
case 'x':
digcount = 0;
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
if (c == '{') {
/* \x{h..h} 1..8 hex digits */
while (itersrc.bytepos < srclen) {
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
if (c == '}')
break;
if (!isxdigit(c))
@@ -2724,7 +2608,7 @@
pending = 0;
break;
}
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
}
}
if (digcount == 0)
@@ -2735,7 +2619,7 @@
case 'u':
/* \uhhhh 4 hex digits */
for (digcount = 0; digcount < 4; ++digcount) {
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
if (!isxdigit(c))
throw_illegal_escape(interp);
digbuf[digcount] = c;
@@ -2746,7 +2630,7 @@
case 'U':
/* \Uhhhhhhhh 8 hex digits */
for (digcount = 0; digcount < 8; ++digcount) {
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
if (!isxdigit(c))
throw_illegal_escape(interp);
digbuf[digcount] = c;
@@ -2759,7 +2643,7 @@
/* \ooo 1..3 oct digits */
digbuf[0] = c;
for (digcount = 1; digcount < 3; ++digcount) {
- c = STRING_ITER_GET_AND_ADVANCE(interp, src, &itersrc);
+ c = STRING_iter_get_and_advance(interp, src, &itersrc);
if (c < '0' || c > '7')
break;
digbuf[digcount] = c;
@@ -2773,7 +2657,7 @@
next = c;
}
}
- STRING_ITER_SET_AND_ADVANCE(interp, result, &iterdest, next);
+ STRING_iter_set_and_advance(interp, result, &iterdest, next);
} while (pending);
}
result->bufused = iterdest.bytepos;
@@ -2808,9 +2692,8 @@
{
ASSERT_ARGS(Parrot_str_unescape)
- STRING *result;
- const CHARSET *charset;
- const ENCODING *encoding = NULL;
+ STRING *result;
+ const STR_VTABLE *encoding;
/* does the encoding have a character set? */
const char *p = enc_char ? strchr(enc_char, ':') : NULL;
@@ -2829,25 +2712,17 @@
#define MAX_ENCODING_NAME_ALLOWED 63
char buffer[MAX_ENCODING_NAME_ALLOWED + 1];
size_t l = p - enc_char;
- charset = NULL;
if (l < MAX_ENCODING_NAME_ALLOWED) {
memcpy(buffer, enc_char, l);
buffer[l] = '\0';
- encoding = Parrot_find_encoding(interp, buffer);
}
- if (!encoding)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Can't make '%s' encoding strings", enc_char);
-
- charset = Parrot_find_charset(interp, p + 1);
- if (!charset)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Can't make '%s' charset strings", p + 1);
+ else {
+ buffer[0] = '\0';
+ }
- result = Parrot_str_new_init(interp, cstring, clength,
- encoding, charset, flags);
- encoding = Parrot_fixed_8_encoding_ptr;
+ result = string_make(interp, cstring, clength, buffer, flags);
+ encoding = Parrot_ascii_encoding_ptr;
}
else {
result = string_make(interp, cstring, clength, enc_char, flags);
@@ -2886,9 +2761,9 @@
/* Force validating the string */
if (encoding != result->encoding)
- result->strlen = CHARSET_CODEPOINTS(interp, result);
+ result->strlen = STRING_scan(interp, result);
- if (!CHARSET_VALIDATE(interp, result))
+ if (!STRING_validate(interp, result))
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_STRING_REPRESENTATION, "Malformed string");
@@ -2918,7 +2793,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
"Can't upcase NULL string");
else {
- STRING * const res = CHARSET_UPCASE(interp, s);
+ STRING * const res = STRING_upcase(interp, s);
res->hashval = 0;
return res;
}
@@ -2948,7 +2823,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
"Can't downcase NULL string");
else {
- STRING * const res = CHARSET_DOWNCASE(interp, s);
+ STRING * const res = STRING_downcase(interp, s);
res->hashval = 0;
return res;
}
@@ -2978,7 +2853,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
"Can't titlecase NULL string");
else {
- STRING * const res = CHARSET_TITLECASE(interp, s);
+ STRING * const res = STRING_titlecase(interp, s);
res->hashval = 0;
return res;
}
@@ -3069,7 +2944,7 @@
if (!Parrot_str_byte_length(interp, s))
return 0;
- return CHARSET_IS_CCLASS(interp, flags, s, offset);
+ return STRING_is_cclass(interp, flags, s, offset);
}
@@ -3096,7 +2971,7 @@
if (STRING_IS_NULL(s))
return -1;
- return CHARSET_FIND_CCLASS(interp, flags, s, offset, count);
+ return STRING_find_cclass(interp, flags, s, offset, count);
}
@@ -3125,7 +3000,7 @@
if (STRING_IS_NULL(s))
return -1;
- return CHARSET_FIND_NOT_CCLASS(interp, flags, s, offset, count);
+ return STRING_find_not_cclass(interp, flags, s, offset, count);
}
@@ -3149,21 +3024,8 @@
INTVAL charset_nr)
{
ASSERT_ARGS(Parrot_str_change_charset)
- const CHARSET *new_charset;
-
- if (STRING_IS_NULL(src))
- return STRINGNULL;
-
- new_charset = Parrot_get_charset(interp, charset_nr);
- if (!new_charset)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_CHARTYPE,
- "charset #%d not found", (int) charset_nr);
-
- if (new_charset == src->charset)
- return src;
-
- return new_charset->to_charset(interp, src);
+ return Parrot_str_change_encoding(interp, src, charset_nr);
}
@@ -3172,8 +3034,7 @@
=item C<STRING* Parrot_str_change_encoding(PARROT_INTERP, STRING *src, INTVAL
encoding_nr)>
-Converts C<src> to the given charset or encoding and returns the result as a
-new string.
+Converts C<src> to the given encoding and returns the result as a new string.
=cut
@@ -3187,7 +3048,7 @@
INTVAL encoding_nr)
{
ASSERT_ARGS(Parrot_str_change_encoding)
- const ENCODING *new_encoding;
+ const STR_VTABLE *new_encoding;
if (STRING_IS_NULL(src))
return STRINGNULL;
@@ -3227,9 +3088,9 @@
return NULL;
if (!src->strlen)
- return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ return CONST_STRING(interp, "");
- return CHARSET_COMPOSE(interp, src);
+ return STRING_compose(interp, src);
}
@@ -3264,7 +3125,7 @@
int i;
if (count == 0)
- return Parrot_str_new_noinit(interp, enum_stringrep_one, 0);
+ return Parrot_str_new_noinit(interp, 0);
first = VTABLE_get_string_keyed_int(interp, ar, 0);
length = Parrot_str_byte_length(interp, first);
@@ -3331,7 +3192,7 @@
do {
const String_iter old_iter = iter;
- STRING_ITER_SKIP(interp, str, &iter, 1);
+ STRING_iter_skip(interp, str, &iter, 1);
tstr = Parrot_str_iter_substr(interp, str, &old_iter, &iter);
VTABLE_set_string_keyed_int(interp, res, old_iter.charpos, tstr);
} while (iter.charpos < slen);
@@ -3403,7 +3264,8 @@
if (minus)
*--p = '-';
- return string_make(interp, p, (UINTVAL)(tail - p), NULL, 0);
+ return Parrot_str_new_init(interp, p, (UINTVAL)(tail - p),
+ Parrot_default_encoding_ptr, 0);
}
Deleted: branches/gc_massacre/src/string/charset.c
==============================================================================
--- branches/gc_massacre/src/string/charset.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,640 +0,0 @@
-/*
-Copyright (C) 2004-2009, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/charset.c - global charset functions
-
-=head1 DESCRIPTION
-
-These are Parrot's generic charset handling functions
-
-=over 4
-
-=cut
-
-*/
-
-#define PARROT_NO_EXTERN_CHARSET_PTRS
-#include "parrot/parrot.h"
-
-#include "encoding/fixed_8.h"
-#include "encoding/utf8.h"
-#include "encoding/utf16.h"
-#include "encoding/ucs2.h"
-#include "encoding/ucs4.h"
-
-#include "charset/ascii.h"
-#include "charset/binary.h"
-#include "charset/iso-8859-1.h"
-#include "charset/unicode.h"
-
-const CHARSET *Parrot_iso_8859_1_charset_ptr;
-const CHARSET *Parrot_binary_charset_ptr;
-const CHARSET *Parrot_default_charset_ptr;
-const CHARSET *Parrot_unicode_charset_ptr;
-const CHARSET *Parrot_ascii_charset_ptr;
-
-/* all registered charsets are collected in one global structure */
-
-typedef struct To_converter {
- NOTNULL(const CHARSET *to);
- NOTNULL(charset_converter_t func);
-} To_converter;
-
-typedef struct One_charset {
- NOTNULL(CHARSET *charset);
- STRING *name;
- To_converter *to_converters;
- int n_converters;
-} One_charset;
-
-typedef struct All_charsets {
- One_charset *set;
- int n_charsets;
-} All_charsets;
-
-static All_charsets *all_charsets;
-
-/* HEADERIZER HFILE: include/parrot/charset.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-static void Parrot_str_internal_register_charset_names(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-static INTVAL register_charset(PARROT_INTERP,
- ARGIN(const char *charsetname),
- ARGIN(CHARSET *charset))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static void register_static_converters(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_Parrot_str_internal_register_charset_names \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_register_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(charsetname) \
- , PARROT_ASSERT_ARG(charset))
-#define ASSERT_ARGS_register_static_converters __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-/*
-
-=item C<CHARSET * Parrot_new_charset(PARROT_INTERP)>
-
-Allocates a new C<CHARSET> structure from the system.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_MALLOC
-CHARSET *
-Parrot_new_charset(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_new_charset)
- return mem_gc_allocate_zeroed_typed(interp, CHARSET);
-}
-
-/*
-
-=item C<void Parrot_charsets_encodings_deinit(PARROT_INTERP)>
-
-Deinitializes (unloads) the charset system. Frees all charsets and the array
-that holds the charsets back to the system.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_charsets_encodings_deinit(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charsets_encodings_deinit)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (all_charsets->set[i].n_converters)
- mem_gc_free(interp, all_charsets->set[i].to_converters);
- mem_gc_free(interp, all_charsets->set[i].charset);
- }
- mem_gc_free(interp, all_charsets->set);
- mem_gc_free(interp, all_charsets);
- all_charsets = NULL;
- parrot_deinit_encodings(interp);
-}
-
-/*
-
-=item C<const CHARSET * Parrot_find_charset(PARROT_INTERP, const char
-*charsetname)>
-
-Searches through the list of charsets for the charset given by C<charsetname>.
-Returns the charset if it is found, NULL otherwise.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET *
-Parrot_find_charset(SHIM_INTERP, ARGIN(const char *charsetname))
-{
- ASSERT_ARGS(Parrot_find_charset)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (STREQ(all_charsets->set[i].charset->name, charsetname))
- return all_charsets->set[i].charset;
- }
-
- return NULL;
-}
-
-/*
-
-=item C<const CHARSET * Parrot_load_charset(PARROT_INTERP, const char
-*charsetname)>
-
-Throws an exception (Can't load charsets dynamically yet. https://trac.parrot.org/parrot/wiki/StringsTasklist).
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET *
-Parrot_load_charset(PARROT_INTERP, ARGIN(const char *charsetname))
-{
- ASSERT_ARGS(Parrot_load_charset)
- UNUSED(charsetname);
-
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Can't load charsets yet");
-}
-
-/*
-
-=item C<INTVAL Parrot_charset_number(PARROT_INTERP, const STRING *charsetname)>
-
-Return the number of the charset or -1 if not found.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-Parrot_charset_number(PARROT_INTERP, ARGIN(const STRING *charsetname))
-{
- ASSERT_ARGS(Parrot_charset_number)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (Parrot_str_equal(interp, all_charsets->set[i].name, charsetname))
- return i;
- }
- return -1;
-}
-
-/*
-
-=item C<INTVAL Parrot_charset_number_of_str(PARROT_INTERP, const STRING *src)>
-
-Return the number of the charset of the given string or -1 if not found.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-Parrot_charset_number_of_str(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(Parrot_charset_number_of_str)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (src->charset == all_charsets->set[i].charset)
- return i;
- }
- return -1;
-}
-
-/*
-
-=item C<STRING * Parrot_charset_name(PARROT_INTERP, INTVAL number_of_charset)>
-
-Returns the name of the charset given by the INTVAL index
-C<number_of_charset>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING *
-Parrot_charset_name(SHIM_INTERP, INTVAL number_of_charset)
-{
- ASSERT_ARGS(Parrot_charset_name)
- if (number_of_charset < 0 || number_of_charset >= all_charsets->n_charsets)
- return STRINGNULL;
- return all_charsets->set[number_of_charset].name;
-}
-
-/*
-
-=item C<const CHARSET * Parrot_get_charset(PARROT_INTERP, INTVAL
-number_of_charset)>
-
-Returns the charset given by the INTVAL index C<number_of_charset>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const CHARSET *
-Parrot_get_charset(SHIM_INTERP, INTVAL number_of_charset)
-{
- ASSERT_ARGS(Parrot_get_charset)
- if (number_of_charset < 0 || number_of_charset >= all_charsets->n_charsets)
- return NULL;
- return all_charsets->set[number_of_charset].charset;
-}
-
-/*
-
-=item C<const char * Parrot_charset_c_name(PARROT_INTERP, INTVAL
-number_of_charset)>
-
-Returns a NULL-terminated C string with the name of the charset given by
-INTVAL index C<number_of_charset>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-const char *
-Parrot_charset_c_name(SHIM_INTERP, INTVAL number_of_charset)
-{
- ASSERT_ARGS(Parrot_charset_c_name)
- if (number_of_charset < 0 || number_of_charset >= all_charsets->n_charsets)
- return NULL;
- return all_charsets->set[number_of_charset].charset->name;
-}
-
-/*
-
-=item C<static INTVAL register_charset(PARROT_INTERP, const char *charsetname,
-CHARSET *charset)>
-
-Adds a new charset C<charset> with name <charsetname> to the list of
-all charsets. Returns 0 and does nothing if a charset with that name
-already exists. Returns 1 otherwise.
-
-=cut
-
-*/
-
-static INTVAL
-register_charset(PARROT_INTERP, ARGIN(const char *charsetname),
- ARGIN(CHARSET *charset))
-{
- ASSERT_ARGS(register_charset)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (STREQ(all_charsets->set[i].charset->name, charsetname))
- return 0;
- }
- /*
- * TODO
- * this needs either a LOCK or we just forbid dynamic
- * loading of charsets from inside threads
- */
- if (!n)
- all_charsets->set = mem_gc_allocate_zeroed_typed(interp, One_charset);
- else
- all_charsets->set = mem_gc_realloc_n_typed_zeroed(interp,
- all_charsets->set, n + 1, n, One_charset);
-
- ++all_charsets->n_charsets;
- all_charsets->set[n].charset = charset;
- all_charsets->set[n].n_converters = 0;
-
- return 1;
-}
-
-/*
-
-=item C<static void Parrot_str_internal_register_charset_names(PARROT_INTERP)>
-
-Helper function for initializing characterset names. We can't create the
-STRING names until the default encodings and charsets are already initted,
-so the name generation is split into a second init stage.
-
-=cut
-
-*/
-
-static void
-Parrot_str_internal_register_charset_names(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_str_internal_register_charset_names)
- int n;
- for (n = 0; n < all_charsets->n_charsets; ++n)
- all_charsets->set[n].name =
- Parrot_str_new_constant(interp, all_charsets->set[n].charset->name);
-}
-
-/*
-
-=item C<static void register_static_converters(PARROT_INTERP)>
-
-Registers several standard converters between common charsets, including:
-
- ISO 8859_1 -> ascii
- ISO 8859_1 -> bin
- ascii -> bin
- ascii -> ISO 8859_1
-
-=cut
-
-*/
-
-static void
-register_static_converters(PARROT_INTERP)
-{
- ASSERT_ARGS(register_static_converters)
- Parrot_register_charset_converter(interp,
- Parrot_iso_8859_1_charset_ptr, Parrot_ascii_charset_ptr,
- charset_cvt_iso_8859_1_to_ascii);
- Parrot_register_charset_converter(interp,
- Parrot_iso_8859_1_charset_ptr, Parrot_binary_charset_ptr,
- charset_cvt_ascii_to_binary);
-
- Parrot_register_charset_converter(interp,
- Parrot_ascii_charset_ptr, Parrot_binary_charset_ptr,
- charset_cvt_ascii_to_binary);
- Parrot_register_charset_converter(interp,
- Parrot_ascii_charset_ptr, Parrot_iso_8859_1_charset_ptr,
- charset_cvt_ascii_to_iso_8859_1);
-}
-
-/*
-
-=item C<INTVAL Parrot_register_charset(PARROT_INTERP, const char *charsetname,
-CHARSET *charset)>
-
-Register a new charset C<charset> with name C<charsetname>. Charset may only
-be one of the 4 following names:
-
- binary
- iso-8859-1
- unicode
- ascii
-
-Attempts to register other charsets are ignored. Returns 0 if the registration
-failed, for any reason.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-INTVAL
-Parrot_register_charset(PARROT_INTERP, ARGIN(const char *charsetname),
- ARGIN(CHARSET *charset))
-{
- ASSERT_ARGS(Parrot_register_charset)
- if (!all_charsets) {
- all_charsets = mem_gc_allocate_zeroed_typed(interp, All_charsets);
- all_charsets->set = NULL;
- all_charsets->n_charsets = 0;
- }
-
- if (STREQ("binary", charsetname)) {
- Parrot_binary_charset_ptr = charset;
- return register_charset(interp, charsetname, charset);
- }
-
- if (STREQ("iso-8859-1", charsetname)) {
- Parrot_iso_8859_1_charset_ptr = charset;
- return register_charset(interp, charsetname, charset);
- }
-
- if (STREQ("unicode", charsetname)) {
- Parrot_unicode_charset_ptr = charset;
- return register_charset(interp, charsetname, charset);
- }
-
- if (STREQ("ascii", charsetname)) {
- if (!Parrot_default_charset_ptr)
- Parrot_default_charset_ptr = charset;
-
- Parrot_ascii_charset_ptr = charset;
- return register_charset(interp, charsetname, charset);
- }
-
- return 0;
-}
-
-/*
-
-=item C<void Parrot_charsets_encodings_init(PARROT_INTERP)>
-
-Creates the initial charsets and encodings, and registers the initial
-charset converters.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_charsets_encodings_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charsets_encodings_init)
- /* the order is crucial here:
- * 1) encodings, default = fixed_8
- * 2) charsets default = ascii */
- Parrot_encoding_fixed_8_init(interp);
- Parrot_encoding_utf8_init(interp);
- Parrot_encoding_ucs2_init(interp);
- Parrot_encoding_utf16_init(interp);
- Parrot_encoding_ucs4_init(interp);
-
- Parrot_charset_ascii_init(interp);
- Parrot_charset_iso_8859_1_init(interp);
- Parrot_charset_binary_init(interp);
- Parrot_charset_unicode_init(interp);
-
- /* Now that the plugins are registered, we can create STRING
- * names for them. */
- Parrot_str_internal_register_encoding_names(interp);
- Parrot_str_internal_register_charset_names(interp);
-
- /* now install charset converters */
- register_static_converters(interp);
-}
-
-/*
-
-=item C<INTVAL Parrot_make_default_charset(PARROT_INTERP, const char
-*charsetname, const CHARSET *charset)>
-
-Sets the current default charset to C<charset> with name C<charsetname>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-INTVAL
-Parrot_make_default_charset(SHIM_INTERP, SHIM(const char *charsetname),
- ARGIN(const CHARSET *charset))
-{
- ASSERT_ARGS(Parrot_make_default_charset)
- Parrot_default_charset_ptr = charset;
- return 1;
-}
-
-/*
-
-=item C<const CHARSET * Parrot_default_charset(PARROT_INTERP)>
-
-Returns the default charset.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-const CHARSET *
-Parrot_default_charset(SHIM_INTERP)
-{
- ASSERT_ARGS(Parrot_default_charset)
- return Parrot_default_charset_ptr;
-}
-
-/*
-
-=item C<charset_converter_t Parrot_find_charset_converter(PARROT_INTERP, const
-CHARSET *lhs, const CHARSET *rhs)>
-
-Finds a converter from charset C<lhs> to charset C<rhs>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-charset_converter_t
-Parrot_find_charset_converter(SHIM_INTERP,
- ARGIN(const CHARSET *lhs), ARGIN(const CHARSET *rhs))
-{
- ASSERT_ARGS(Parrot_find_charset_converter)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (lhs == all_charsets->set[i].charset) {
- const One_charset * const left = all_charsets->set + i;
- const int nc = left->n_converters;
- int j;
-
- for (j = 0; j < nc; ++j) {
- if (left->to_converters[j].to == rhs)
- return left->to_converters[j].func;
- }
- }
- }
- return NULL;
-}
-
-/*
-
-=item C<void Parrot_register_charset_converter(PARROT_INTERP, const CHARSET
-*lhs, const CHARSET *rhs, charset_converter_t func)>
-
-Registers a converter C<func> from charset C<lhs> to C<rhs>.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-void
-Parrot_register_charset_converter(PARROT_INTERP,
- ARGIN(const CHARSET *lhs), ARGIN(const CHARSET *rhs),
- ARGIN(charset_converter_t func))
-{
- ASSERT_ARGS(Parrot_register_charset_converter)
- int i;
- const int n = all_charsets->n_charsets;
-
- for (i = 0; i < n; ++i) {
- if (lhs == all_charsets->set[i].charset) {
- One_charset * const left = all_charsets->set + i;
- const int nc = left->n_converters++;
-
- if (nc) {
- left->to_converters = mem_gc_realloc_n_typed_zeroed(interp,
- left->to_converters, nc + 1, nc, To_converter);
- }
- else
- left->to_converters = mem_gc_allocate_zeroed_typed(interp, To_converter);
- left->to_converters[nc].to = rhs;
- left->to_converters[nc].func = func;
- }
- }
-}
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/ascii.c
==============================================================================
--- branches/gc_massacre/src/string/charset/ascii.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,876 +0,0 @@
-/*
-Copyright (C) 2004-2010, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/charset/ascii.c
-
-=head1 DESCRIPTION
-
-This file implements the charset functions for ascii data and common
-charset functionality for similar charsets like iso-8859-1.
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "ascii.h"
-
-/*
- * TODO check interpreter error and warnings setting
- */
-
-#include "tables.h"
-
-/* HEADERIZER HFILE: src/string/charset/ascii.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* compose(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* decompose(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static INTVAL find_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-static INTVAL find_not_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_WARN_UNUSED_RESULT
-static INTVAL is_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_ascii(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_charset(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL validate(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_string_from_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_ascii __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-/*
-
-=item C<STRING * ascii_get_graphemes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Retrieves the graphemes for the STRING C<src>, starting at
-C<offset> and ending at C<offset + count>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING *
-ascii_get_graphemes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(ascii_get_graphemes)
- return ENCODING_GET_BYTES(interp, src, offset, count);
-}
-
-/*
-
-=item C<static STRING * to_ascii(PARROT_INTERP, const STRING *src)>
-
-Attempts to convert STRING C<src> to ASCII in STRING C<dest>. Throws
-an exception if unconvertable UNICODE characters are involved.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-to_ascii(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_ascii)
- String_iter iter;
- unsigned char *p;
- const UINTVAL len = src->strlen;
-
- /* the string can't grow. Just clone it */
- STRING * const dest = Parrot_str_clone(interp, src);
-
- p = (unsigned char *)dest->strstart;
- STRING_ITER_INIT(interp, &iter);
- while (iter.charpos < len) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (c >= 128)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
- "can't convert unicode string to ascii");
- *p++ = (unsigned char)c;
- }
- dest->bufused = len;
- dest->strlen = len;
- dest->charset = Parrot_ascii_charset_ptr;
- dest->encoding = CHARSET_GET_PREFERRED_ENCODING(interp, dest);
- return dest;
-}
-
-/*
-
-=item C<static STRING * to_charset(PARROT_INTERP, const STRING *src)>
-
-Converts STRING C<src> to ASCII charset STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-to_charset(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_charset)
- const charset_converter_t conversion_func =
- Parrot_find_charset_converter(interp, src->charset, Parrot_ascii_charset_ptr);
-
- if (conversion_func) {
- return conversion_func(interp, src);
- }
- else {
- return to_ascii(interp, src);
- }
-}
-
-/*
-
-=item C<static STRING* compose(PARROT_INTERP, const STRING *src)>
-
-Can't compose ASCII strings, so performs a string copy on it and
-returns the new string.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-compose(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(compose)
-
- STRING * const dest = Parrot_str_copy(interp, src);
-
- return dest;
-}
-
-/*
-
-=item C<static STRING* decompose(PARROT_INTERP, const STRING *src)>
-
-Can't decompose ASCII, so we perform a string copy instead and return
-a pointer to the new string.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-decompose(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(decompose)
-
- STRING * const dest = Parrot_str_copy(interp, src);
-
- return dest;
-}
-
-/*
-
-=item C<static STRING* upcase(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to all uppercase.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(upcase)
- STRING * const result = Parrot_str_clone(interp, src);
- const UINTVAL n = src->strlen;
-
- if (n) {
- char * const buffer = result->strstart;
- UINTVAL offset;
-
- for (offset = 0; offset < n; ++offset) {
- buffer[offset] = (char)toupper((unsigned char)buffer[offset]);
- }
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* downcase(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to all lower-case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(downcase)
- STRING *result = Parrot_str_clone(interp, src);
- const UINTVAL n = src->strlen;
-
- if (n) {
- char * const buffer = result->strstart;
- UINTVAL offset;
-
- for (offset = 0; offset < n; ++offset) {
- buffer[offset] = (char)tolower((unsigned char)buffer[offset]);
- }
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* titlecase(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING given by C<src> to title case, where
-the first character is upper case and all the rest of the characters
-are lower-case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(titlecase)
- STRING *result = Parrot_str_clone(interp, src);
- const UINTVAL n = src->strlen;
-
- if (n) {
- char * const buffer = result->strstart;
- UINTVAL offset;
-
- buffer[0] = (char)toupper((unsigned char)buffer[0]);
- for (offset = 1; offset < n; ++offset) {
- buffer[offset] = (char)tolower((unsigned char)buffer[offset]);
- }
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* upcase_first(PARROT_INTERP, const STRING *src)>
-
-Sets the first character in the STRING C<src> to upper case,
-but doesn't modify the rest of the string.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(upcase_first)
- STRING * const result = Parrot_str_clone(interp, src);
-
- if (result->strlen > 0) {
- char * const buffer = result->strstart;
- buffer[0] = (char)toupper((unsigned char)buffer[0]);
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* downcase_first(PARROT_INTERP, const STRING *src)>
-
-Sets the first character of the STRING C<src> to lowercase,
-but doesn't modify the rest of the characters.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(downcase_first)
- STRING * const result = Parrot_str_clone(interp, src);
-
- if (result->strlen > 0) {
- char * const buffer = result->strstart;
- buffer[0] = (char)tolower((unsigned char)buffer[0]);
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* titlecase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first letter of STRING C<src> to upper case,
-but doesn't modify the rest of the string.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(titlecase_first)
- STRING * const result = Parrot_str_clone(interp, src);
-
- if (result->strlen > 0) {
- char * const buffer = result->strstart;
- buffer[0] = (char)toupper((unsigned char)buffer[0]);
- }
-
- return result;
-}
-
-/*
-
-=item C<INTVAL ascii_compare(PARROT_INTERP, const STRING *lhs, const STRING
-*rhs)>
-
-Compares two strings as ASCII strings. If STRING C<lhs> > C<rhs>, returns
-1. If C<lhs> == C<rhs> returns 0. If STRING C<lhs> < C<rhs>, returns -1.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-ascii_compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
-{
- ASSERT_ARGS(ascii_compare)
- const UINTVAL l_len = lhs->strlen;
- const UINTVAL r_len = rhs->strlen;
- const UINTVAL min_len = l_len > r_len ? r_len : l_len;
- String_iter iter;
-
- if (lhs->encoding == rhs->encoding) {
- const int ret_val = memcmp(lhs->strstart, rhs->strstart, min_len);
- if (ret_val)
- return ret_val < 0 ? -1 : 1;
- }
- else {
- STRING_ITER_INIT(interp, &iter);
- while (iter.charpos < min_len) {
- const UINTVAL cl = ENCODING_GET_BYTE(interp, lhs, iter.charpos);
- const UINTVAL cr = STRING_ITER_GET_AND_ADVANCE(interp, rhs, &iter);
- if (cl != cr)
- return cl < cr ? -1 : 1;
- }
- }
- if (l_len < r_len) {
- return -1;
- }
- if (l_len > r_len) {
- return 1;
- }
- return 0;
-}
-
-/*
-
-=item C<INTVAL mixed_cs_index(PARROT_INTERP, const STRING *src, const STRING
-*search, UINTVAL offs)>
-
-Searches for the first instance of STRING C<search> in STRING C<src>.
-returns the position where the substring is found if it is indeed found.
-Returns -1 otherwise. Operates on different types of strings, not just
-ASCII.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-mixed_cs_index(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search),
- UINTVAL offs)
-{
- ASSERT_ARGS(mixed_cs_index)
- String_iter start, end;
-
- STRING_ITER_INIT(interp, &start);
- STRING_ITER_SET_POSITION(interp, src, &start, offs);
-
- return Parrot_str_iter_index(interp, src, &start, &end, search);
-}
-
-/*
-
-=item C<INTVAL ascii_cs_index(PARROT_INTERP, const STRING *src, const STRING
-*search_string, UINTVAL offset)>
-
-Searches for the first instance of STRING C<search> in STRING C<src>.
-returns the position where the substring is found if it is indeed found.
-Returns -1 otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-ascii_cs_index(PARROT_INTERP, ARGIN(const STRING *src),
- ARGIN(const STRING *search_string), UINTVAL offset)
-{
- ASSERT_ARGS(ascii_cs_index)
- INTVAL retval;
- if (src->charset != search_string->charset) {
- return mixed_cs_index(interp, src, search_string, offset);
- }
-
- PARROT_ASSERT(src->encoding == Parrot_fixed_8_encoding_ptr);
- retval = Parrot_byte_index(interp, src,
- search_string, offset);
- return retval;
-}
-
-/*
-
-=item C<INTVAL ascii_cs_rindex(PARROT_INTERP, const STRING *src, const STRING
-*search_string, UINTVAL offset)>
-
-Searches for the last instance of STRING C<search_string> in STRING
-C<src>. Starts searching at C<offset>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL
-ascii_cs_rindex(PARROT_INTERP, ARGIN(const STRING *src),
- ARGIN(const STRING *search_string), UINTVAL offset)
-{
- ASSERT_ARGS(ascii_cs_rindex)
- INTVAL retval;
-
- if (src->charset != search_string->charset)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Cross-charset index not supported");
-
- PARROT_ASSERT(src->encoding == Parrot_fixed_8_encoding_ptr);
- retval = Parrot_byte_rindex(interp, src,
- search_string, offset);
- return retval;
-}
-
-/*
-
-=item C<static UINTVAL validate(PARROT_INTERP, const STRING *src)>
-
-Verifies that the given string is valid ASCII. Returns 1 if it is ASCII,
-returns 0 otherwise.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-validate(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(validate)
- String_iter iter;
- const INTVAL length = Parrot_str_length(interp, src);
-
- STRING_ITER_INIT(interp, &iter);
- while (iter.charpos < length) {
- const UINTVAL codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (codepoint >= 0x80)
- return 0;
- }
- return 1;
-}
-
-/*
-
-=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
-
-Creates a new STRING object from a single codepoint C<codepoint>. Returns
-the new STRING.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING *
-string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
-{
- ASSERT_ARGS(string_from_codepoint)
- char real_codepoint = (char)codepoint;
- STRING * const return_string = string_make(interp, &real_codepoint, 1, "ascii", 0);
- return return_string;
-}
-
-/*
-
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src,
-UINTVAL offset)>
-
-Returns Boolean.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static INTVAL
-is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(is_cclass)
- UINTVAL codepoint;
-
- if (offset >= src->strlen)
- return 0;
- codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
-
- if (codepoint >= sizeof (Parrot_ascii_typetable) / sizeof (Parrot_ascii_typetable[0])) {
- return 0;
- }
- return (Parrot_ascii_typetable[codepoint] & flags) ? 1 : 0;
-}
-
-/*
-
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Find a character in the given character class. Delegates to the find_cclass
-method of the encoding plugin.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static INTVAL
-find_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_cclass)
- UINTVAL pos = offset;
- UINTVAL end = offset + count;
-
- end = src->strlen < end ? src->strlen : end;
- return ENCODING_FIND_CCLASS(interp, src, Parrot_ascii_typetable,
- flags, pos, end);
-}
-
-/*
-
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Returns C<INTVAL>.
-
-=cut
-
-*/
-
-static INTVAL
-find_not_cclass(PARROT_INTERP,
- INTVAL flags, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_not_cclass)
- UINTVAL pos = offset;
- UINTVAL end = offset + count;
-
- end = src->strlen < end ? src->strlen : end;
- for (; pos < end; ++pos) {
- const UINTVAL codepoint = ENCODING_GET_CODEPOINT(interp, src, pos);
- if ((Parrot_ascii_typetable[codepoint] & flags) == 0) {
- return pos;
- }
- }
- return end;
-}
-
-/*
-
-=item C<size_t ascii_compute_hash(PARROT_INTERP, const STRING *src, size_t
-seed)>
-
-Computes the hash of STRING C<src> starting with seed value
-C<seed>.
-
-=cut
-
-*/
-
-PARROT_PURE_FUNCTION
-size_t
-ascii_compute_hash(SHIM_INTERP, ARGIN(const STRING *src), size_t seed)
-{
- ASSERT_ARGS(ascii_compute_hash)
- size_t hashval = seed;
- const char *buffptr = (const char *)src->strstart;
- UINTVAL len = src->strlen;
-
- PARROT_ASSERT(src->encoding == Parrot_fixed_8_encoding_ptr);
- while (len--) {
- hashval += hashval << 5;
- hashval += *buffptr++;
- }
- return hashval;
-}
-
-/*
-
-=item C<void Parrot_charset_ascii_init(PARROT_INTERP)>
-
-Initialize the ASCII charset but registering all the necessary
-function pointers and settings.
-
-=cut
-
-*/
-
-void
-Parrot_charset_ascii_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charset_ascii_init)
- CHARSET * const return_set = Parrot_new_charset(interp);
- static const CHARSET base_set = {
- "ascii",
- ascii_get_graphemes,
- to_charset,
- compose,
- decompose,
- upcase,
- downcase,
- titlecase,
- upcase_first,
- downcase_first,
- titlecase_first,
- ascii_compare,
- ascii_cs_index,
- ascii_cs_rindex,
- validate,
- is_cclass,
- find_cclass,
- find_not_cclass,
- string_from_codepoint,
- ascii_compute_hash,
- NULL
- };
-
- STRUCT_COPY_FROM_STRUCT(return_set, base_set);
- return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
- Parrot_register_charset(interp, "ascii", return_set);
-
- return;
-}
-
-/*
-
-=item C<STRING * charset_cvt_ascii_to_binary(PARROT_INTERP, const STRING *src)>
-
-Converts an ASCII STRING C<src> to a binary STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-STRING *
-charset_cvt_ascii_to_binary(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(charset_cvt_ascii_to_binary)
- STRING * const dest = Parrot_str_clone(interp, src);
- UINTVAL offs;
-
- for (offs = 0; offs < src->strlen; ++offs) {
- const UINTVAL c = ENCODING_GET_BYTE(interp, src, offs);
- ENCODING_SET_BYTE(interp, dest, offs, c);
- }
-
- dest->charset = Parrot_binary_charset_ptr;
- return dest;
-}
-
-/*
-
-=item C<STRING * charset_cvt_ascii_to_iso_8859_1(PARROT_INTERP, const STRING
-*src)>
-
-Converts ASCII STRING C<src> to ISO8859-1 STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-STRING *
-charset_cvt_ascii_to_iso_8859_1(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(charset_cvt_ascii_to_iso_8859_1)
- STRING * const dest = Parrot_str_clone(interp, src);
- UINTVAL offs;
-
- for (offs = 0; offs < src->strlen; ++offs) {
- const UINTVAL c = ENCODING_GET_BYTE(interp, src, offs);
- ENCODING_SET_BYTE(interp, dest, offs, c);
- }
-
- dest->charset = Parrot_iso_8859_1_charset_ptr;
- return dest;
-}
-
-/*
-
-=back
-
-=cut
-
-*/
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/ascii.h
==============================================================================
--- branches/gc_massacre/src/string/charset/ascii.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,128 +0,0 @@
-/* ascii.h
- * Copyright (C) 2004-2007, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the ascii charset functions
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-#ifndef PARROT_CHARSET_ASCII_H_GUARD
-#define PARROT_CHARSET_ASCII_H_GUARD
-
-/*
- * common functions for ascii-ish charsets
- */
-
-/* HEADERIZER BEGIN: src/string/charset/ascii.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL ascii_compare(PARROT_INTERP,
- ARGIN(const STRING *lhs),
- ARGIN(const STRING *rhs))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_PURE_FUNCTION
-size_t ascii_compute_hash(SHIM_INTERP,
- ARGIN(const STRING *src),
- size_t seed)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL ascii_cs_index(PARROT_INTERP,
- ARGIN(const STRING *src),
- ARGIN(const STRING *search_string),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL ascii_cs_rindex(PARROT_INTERP,
- ARGIN(const STRING *src),
- ARGIN(const STRING *search_string),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING * ascii_get_graphemes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-STRING * charset_cvt_ascii_to_binary(PARROT_INTERP,
- ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-STRING * charset_cvt_ascii_to_iso_8859_1(PARROT_INTERP,
- ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-INTVAL mixed_cs_index(PARROT_INTERP,
- ARGIN(const STRING *src),
- ARGIN(const STRING *search),
- UINTVAL offs)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-void Parrot_charset_ascii_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_ascii_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
-#define ASSERT_ARGS_ascii_compute_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_ascii_cs_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src) \
- , PARROT_ASSERT_ARG(search_string))
-#define ASSERT_ARGS_ascii_cs_rindex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src) \
- , PARROT_ASSERT_ARG(search_string))
-#define ASSERT_ARGS_ascii_get_graphemes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_charset_cvt_ascii_to_binary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_charset_cvt_ascii_to_iso_8859_1 \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_mixed_cs_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src) \
- , PARROT_ASSERT_ARG(search))
-#define ASSERT_ARGS_Parrot_charset_ascii_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset/ascii.c */
-
-#endif /* PARROT_CHARSET_ASCII_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/binary.c
==============================================================================
--- branches/gc_massacre/src/string/charset/binary.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,494 +0,0 @@
-/*
-Copyright (C) 2004-2010, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/charset/binary.c
-
-=head1 DESCRIPTION
-
-This file implements the charset functions for binary data
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-
-/* In local src/string/charset/ directory */
-#include "ascii.h"
-#include "binary.h"
-
-/* HEADERIZER HFILE: src/string/charset/binary.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-static INTVAL compare(SHIM_INTERP,
- ARGIN(const STRING *lhs),
- ARGIN(const STRING *rhs))
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* compose(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* decompose(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-static INTVAL find_cclass(SHIM_INTERP,
- SHIM(INTVAL flags),
- SHIM(const STRING *src),
- UINTVAL offset,
- UINTVAL count);
-
-static INTVAL find_not_cclass(SHIM_INTERP,
- SHIM(INTVAL flags),
- SHIM(const STRING *src),
- UINTVAL offset,
- UINTVAL count);
-
-static INTVAL is_cclass(SHIM_INTERP,
- SHIM(INTVAL flags),
- SHIM(const STRING *src),
- SHIM(UINTVAL offset));
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* to_charset(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-static UINTVAL validate(SHIM_INTERP, SHIM(const STRING *src));
-#define ASSERT_ARGS_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
-#define ASSERT_ARGS_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_string_from_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_to_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-#ifdef EXCEPTION
-# undef EXCEPTION
-#endif
-
-#define EXCEPTION(err, str) \
- Parrot_ex_throw_from_c_args(interp, NULL, (err), (str))
-
-
-/*
-
-=item C<static STRING* to_charset(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to STRING C<dest> in binary mode. Throws
-an exception if a suitable conversion function is not found.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-to_charset(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_charset)
- charset_converter_t conversion_func =
- Parrot_find_charset_converter(interp, src->charset, Parrot_binary_charset_ptr);
-
- if (conversion_func)
- return conversion_func(interp, src);
-
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "to_charset for binary not implemented");
-}
-
-/*
-
-=item C<static STRING* compose(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot compose a binary string.
-
-=cut
-
-*/
-
-/* A err. can't compose binary */
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-compose(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(compose)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't compose binary data");
-}
-
-/*
-
-=item C<static STRING* decompose(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot decompose a binary string.
-
-=cut
-
-*/
-
-/* A err. can't decompose binary */
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-decompose(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(decompose)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't decompose binary data");
-}
-
-/*
-
-=item C<static STRING* upcase(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot convert a binary string to
-upper case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(upcase)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't upcase binary data");
-}
-
-/*
-
-=item C<static STRING* downcase(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot convert a binary string to
-lower-case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(downcase)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't downcase binary data");
-}
-
-/*
-
-=item C<static STRING* titlecase(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot convert a binary string to
-title case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(titlecase)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't titlecase binary data");
-}
-
-/*
-
-=item C<static STRING* upcase_first(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot set the first "character" of the
-binary string to uppercase.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(upcase_first)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't upcase binary data");
-}
-
-/*
-
-=item C<static STRING* downcase_first(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we cannot set the first "character"
-of the binary string to lowercase.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(downcase_first)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't downcase binary data");
-}
-
-/*
-
-=item C<static STRING* titlecase_first(PARROT_INTERP, const STRING *src)>
-
-Throws an exception because we can't convert the first "character"
-of binary data to title case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(titlecase_first)
- EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't titlecase binary data");
-}
-
-/*
-
-=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING
-*rhs)>
-
-Compare the two buffers, first by size, then with memcmp.
-
-=cut
-
-*/
-
-static INTVAL
-compare(SHIM_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
-{
- ASSERT_ARGS(compare)
- const UINTVAL l_len = lhs->strlen;
- const UINTVAL r_len = rhs->strlen;
- if (l_len != r_len)
- return l_len - r_len;
-
- return memcmp(lhs->strstart, rhs->strstart, l_len);
-}
-
-/*
-
-=item C<static UINTVAL validate(PARROT_INTERP, const STRING *src)>
-
-Returns 1. All sequential data is valid binary data.
-
-=cut
-
-*/
-
-/* Binary's always valid */
-static UINTVAL
-validate(SHIM_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(validate)
- return 1;
-}
-
-/*
-
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src,
-UINTVAL offset)>
-
-Returns Boolean.
-
-=cut
-
-*/
-
-static INTVAL
-is_cclass(SHIM_INTERP, SHIM(INTVAL flags), SHIM(const STRING *src), SHIM(UINTVAL offset))
-{
- ASSERT_ARGS(is_cclass)
- return 0;
-}
-
-/*
-
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Find a character in the given character class.
-
-=cut
-
-*/
-
-static INTVAL
-find_cclass(SHIM_INTERP, SHIM(INTVAL flags),
- SHIM(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_cclass)
- return offset + count;
-}
-
-/*
-
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Returns C<INTVAL>.
-
-=cut
-
-*/
-
-static INTVAL
-find_not_cclass(SHIM_INTERP, SHIM(INTVAL flags),
- SHIM(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_not_cclass)
- return offset + count;
-}
-
-/*
-
-=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
-
-Creates a new STRING object from a single codepoint C<codepoint>. Returns
-the new STRING.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
-{
- ASSERT_ARGS(string_from_codepoint)
- STRING *return_string;
- char real_codepoint = (char)codepoint;
- return_string = string_make(interp, &real_codepoint, 1, "binary", 0);
- return return_string;
-}
-
-
-/*
-
-=item C<void Parrot_charset_binary_init(PARROT_INTERP)>
-
-Initialize the binary charset, including function pointers and
-settings.
-
-=cut
-
-*/
-
-void
-Parrot_charset_binary_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charset_binary_init)
- CHARSET * const return_set = Parrot_new_charset(interp);
- static const CHARSET base_set = {
- "binary",
- ascii_get_graphemes,
- to_charset,
- compose,
- decompose,
- upcase,
- downcase,
- titlecase,
- upcase_first,
- downcase_first,
- titlecase_first,
- compare,
- ascii_cs_index,
- ascii_cs_rindex,
- validate,
- is_cclass,
- find_cclass,
- find_not_cclass,
- string_from_codepoint,
- ascii_compute_hash,
- NULL
- };
-
- STRUCT_COPY_FROM_STRUCT(return_set, base_set);
- return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
- Parrot_register_charset(interp, "binary", return_set);
-
- return;
-
-}
-
-/*
-
-=back
-
-=cut
-
-*/
-
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/binary.h
==============================================================================
--- branches/gc_massacre/src/string/charset/binary.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,34 +0,0 @@
-/* binary.h
- * Copyright (C) 2004-2007, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the binary charset functions
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-#ifndef PARROT_CHARSET_BINARY_H_GUARD
-#define PARROT_CHARSET_BINARY_H_GUARD
-
-/* HEADERIZER BEGIN: src/string/charset/binary.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-void Parrot_charset_binary_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_Parrot_charset_binary_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset/binary.c */
-
-#endif /* PARROT_CHARSET_BINARY_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/iso-8859-1.c
==============================================================================
--- branches/gc_massacre/src/string/charset/iso-8859-1.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,733 +0,0 @@
-/*
-Copyright (C) 2004-2010, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/charset/iso-8859-1.c
-
-=head1 DESCRIPTION
-
-This file implements the charset functions for iso-8859-1 data
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "iso-8859-1.h"
-#include "ascii.h"
-
-/* HEADERIZER HFILE: src/string/charset/iso-8859-1.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING* compose(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* decompose(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static INTVAL find_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-static INTVAL find_not_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-static INTVAL is_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING * to_charset(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_iso_8859_1(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_unicode(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static UINTVAL validate(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_string_from_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_iso_8859_1 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_unicode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-#include "tables.h"
-
-/*
-
-=item C<static STRING * to_iso_8859_1(PARROT_INTERP, const STRING *src)>
-
-Converts STRING C<src> to iso-8859-1 in STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-to_iso_8859_1(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_iso_8859_1)
- UINTVAL src_len;
- String_iter iter;
- /* iso-8859-1 is never bigger then source */
- STRING * dest = Parrot_str_clone(interp, src);
-
- STRING_ITER_INIT(interp, &iter);
- src_len = src->strlen;
- dest->bufused = src_len;
- while (iter.charpos < src_len) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (c >= 0x100)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
- "lossy conversion to iso-8559-1");
-
- Parrot_fixed_8_encoding_ptr->set_byte(interp, dest, iter.charpos - 1, c);
- }
- dest->charset = Parrot_iso_8859_1_charset_ptr;
- dest->encoding = Parrot_fixed_8_encoding_ptr;
- return dest;
-}
-
-/*
-
-=item C<static STRING * to_unicode(PARROT_INTERP, const STRING *src)>
-
-Converts STRING C<src> to unicode STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-to_unicode(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_unicode)
- STRING * dest = Parrot_str_clone(interp, src);
- UINTVAL offs;
- String_iter iter;
-
- dest->charset = Parrot_unicode_charset_ptr;
- dest->encoding = CHARSET_GET_PREFERRED_ENCODING(interp, dest);
- Parrot_gc_reallocate_string_storage(interp, dest, src->strlen);
- STRING_ITER_INIT(interp, &iter);
- while (iter.charpos < src->strlen) {
- const UINTVAL c = ENCODING_GET_BYTE(interp, src, iter.charpos);
-
- if (iter.bytepos >= Buffer_buflen(dest) - 4) {
- UINTVAL need = (UINTVAL)((src->strlen - iter.charpos) * 1.5);
- if (need < 16)
- need = 16;
- Parrot_gc_reallocate_string_storage(interp, dest,
- Buffer_buflen(dest) + need);
- }
- STRING_ITER_SET_AND_ADVANCE(interp, dest, &iter, c);
- }
- dest->bufused = iter.bytepos;
- dest->strlen = iter.charpos;
- return dest;
-}
-
-/*
-
-=item C<static STRING * to_charset(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to an ISO-8859-1 STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING *
-to_charset(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_charset)
- const charset_converter_t conversion_func =
- Parrot_find_charset_converter(interp, src->charset, Parrot_iso_8859_1_charset_ptr);
-
- if (conversion_func)
- return conversion_func(interp, src);
- else
- return to_iso_8859_1(interp, src);
-}
-
-
-/*
-
-=item C<static STRING* compose(PARROT_INTERP, const STRING *src)>
-
-ISO-8859-1 does not support composing, so we just copy the STRING C<src> and return the
-copy.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-static STRING*
-compose(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(compose)
-
- STRING * const dest = Parrot_str_copy(interp, src);
-
- return dest;
-}
-
-/*
-
-=item C<static STRING* decompose(PARROT_INTERP, const STRING *src)>
-
-SO-8859-1 does not support decomposing, so we throw an exception.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-decompose(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(decompose)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "decompose for iso-8859-1 not implemented");
-}
-
-/*
-
-=item C<static STRING* upcase(PARROT_INTERP, const STRING *src)>
-
-Convert all graphemes in the STRING C<src> to upper case, for those
-graphemes that support cases.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(upcase)
- unsigned char *buffer;
- UINTVAL offset = 0;
- STRING *result = Parrot_str_clone(interp, src);
-
- if (!result->strlen)
- return result;
-
- buffer = (unsigned char *)result->strstart;
- for (offset = 0; offset < result->strlen; ++offset) {
- unsigned int c = buffer[offset]; /* XXX use encoding ? */
- if (c >= 0xe0 && c != 0xf7)
- c &= ~0x20;
- else
- c = toupper((unsigned char)c);
- buffer[offset] = (unsigned char)c;
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* downcase(PARROT_INTERP, const STRING *src)>
-
-Converts all graphemes in STRING C<src> to lower-case, for those graphemes
-that support cases.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(downcase)
- unsigned char *buffer;
- UINTVAL offset = 0;
- STRING *result = Parrot_str_clone(interp, src);
-
- if (!result->strlen)
- return result;
-
- buffer = (unsigned char *)result->strstart;
- for (offset = 0; offset < result->strlen; ++offset) {
- unsigned int c = buffer[offset];
- if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
- c |= 0x20;
- else
- c = tolower((unsigned char)c);
- buffer[offset] = (unsigned char)c;
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* titlecase(PARROT_INTERP, const STRING *src)>
-
-Converts the graphemes in STRING C<src> to title case, for those graphemes
-that support cases.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(titlecase)
- unsigned char *buffer;
- unsigned int c;
- UINTVAL offset;
- STRING *result = Parrot_str_clone(interp, src);
-
- if (!result->strlen)
- return result;
-
- buffer = (unsigned char *)result->strstart;
- c = buffer[0];
- if (c >= 0xe0 && c != 0xf7)
- c &= ~0x20;
- else
- c = toupper((unsigned char)c);
- buffer[0] = (unsigned char)c;
-
- for (offset = 1; offset < result->strlen; ++offset) {
- c = buffer[offset];
- if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
- c |= 0x20;
- else
- c = tolower((unsigned char)c);
- buffer[offset] = (unsigned char)c;
- }
-
- return result;
-}
-
-/*
-
-=item C<static STRING* upcase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first grapheme in STRING C<src> to upper case, if it
-supports cases.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(upcase_first)
- unsigned char *buffer;
- unsigned int c;
- STRING *result = Parrot_str_clone(interp, src);
-
- if (!result->strlen)
- return result;
-
- buffer = (unsigned char *)result->strstart;
- c = buffer[0];
- if (c >= 0xe0 && c != 0xf7)
- c &= ~0x20;
- else
- c = toupper((unsigned char)c);
- buffer[0] = (unsigned char)c;
-
- return result;
-}
-
-/*
-
-=item C<static STRING* downcase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first character of the STRING C<src> to lower case, if the
-grapheme supports lower case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(downcase_first)
- unsigned char *buffer;
- unsigned int c;
- STRING *result = Parrot_str_clone(interp, src);
-
- if (!result->strlen)
- return result;
-
- buffer = (unsigned char *)result->strstart;
- c = buffer[0];
- if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
- c &= ~0x20;
- else
- c = tolower((unsigned char)c);
- buffer[0] = (unsigned char)c;
-
- return result;
-}
-
-/*
-
-=item C<static STRING* titlecase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first grapheme in STRING C<src> to title case, if the grapheme
-supports case.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(titlecase_first)
- return upcase_first(interp, src);
-}
-
-
-/*
-
-=item C<static UINTVAL validate(PARROT_INTERP, const STRING *src)>
-
-Returns 1 if the STRING C<src> is a valid ISO-8859-1 STRING. Returns 0 otherwise.
-
-=cut
-
-*/
-
-static UINTVAL
-validate(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(validate)
- INTVAL offset;
- const INTVAL length = Parrot_str_length(interp, src);
-
- for (offset = 0; offset < length; ++offset) {
- const UINTVAL codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
- if (codepoint >= 0x100)
- return 0;
- }
- return 1;
-}
-
-/*
-
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src,
-UINTVAL offset)>
-
-Returns Boolean.
-
-=cut
-
-*/
-
-static INTVAL
-is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(is_cclass)
- UINTVAL codepoint;
-
- if (offset >= src->strlen) return 0;
- codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
-
- if (codepoint >= sizeof (Parrot_ascii_typetable) /
- sizeof (Parrot_ascii_typetable[0])) {
- return 0;
- }
- return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
-}
-
-/*
-
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Find a character in the given character class. Delegates to the find_cclass
-method of the encoding plugin.
-
-=cut
-
-*/
-
-static INTVAL
-find_cclass(PARROT_INTERP, INTVAL flags,
- ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_cclass)
- const UINTVAL pos = offset;
- UINTVAL end = offset + count;
-
- end = src->strlen < end ? src->strlen : end;
- return ENCODING_FIND_CCLASS(interp, src,
- Parrot_iso_8859_1_typetable, flags, pos, end);
-}
-
-/*
-
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Returns C<INTVAL>.
-
-=cut
-
-*/
-
-static INTVAL
-find_not_cclass(PARROT_INTERP, INTVAL flags,
- ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_not_cclass)
- UINTVAL pos = offset;
- UINTVAL end = offset + count;
-
- end = src->strlen < end ? src->strlen : end;
- for (; pos < end; ++pos) {
- const UINTVAL codepoint = ENCODING_GET_CODEPOINT(interp, src, pos);
- if ((Parrot_iso_8859_1_typetable[codepoint] & flags) == 0) {
- return pos;
- }
- }
- return end;
-}
-
-
-/*
-
-=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
-
-Creates a new STRING from the single codepoint C<codepoint>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
-{
- ASSERT_ARGS(string_from_codepoint)
- char real_codepoint = (char)codepoint;
- STRING * const return_string = string_make(interp, &real_codepoint, 1,
- "iso-8859-1", 0);
- return return_string;
-}
-
-/*
-
-=item C<void Parrot_charset_iso_8859_1_init(PARROT_INTERP)>
-
-Initializes the ISO-8859-1 charset by installing all the necessary function pointers.
-
-=cut
-
-*/
-
-void
-Parrot_charset_iso_8859_1_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charset_iso_8859_1_init)
- CHARSET * const return_set = Parrot_new_charset(interp);
- static const CHARSET base_set = {
- "iso-8859-1",
- ascii_get_graphemes,
- to_charset,
- compose,
- decompose,
- upcase,
- downcase,
- titlecase,
- upcase_first,
- downcase_first,
- titlecase_first,
- ascii_compare,
- ascii_cs_index,
- ascii_cs_rindex,
- validate,
- is_cclass,
- find_cclass,
- find_not_cclass,
- string_from_codepoint,
- ascii_compute_hash,
- NULL
- };
-
- STRUCT_COPY_FROM_STRUCT(return_set, base_set);
- return_set->preferred_encoding = Parrot_fixed_8_encoding_ptr;
- Parrot_register_charset(interp, "iso-8859-1", return_set);
-
- return;
-}
-
-/*
-
-=item C<STRING * charset_cvt_iso_8859_1_to_ascii(PARROT_INTERP, const STRING
-*src)>
-
-Converts STRING C<src> in ISO-8859-1 to ASCII STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING *
-charset_cvt_iso_8859_1_to_ascii(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(charset_cvt_iso_8859_1_to_ascii)
- UINTVAL offs;
- STRING *dest = Parrot_str_clone(interp, src);
-
- for (offs = 0; offs < src->strlen; ++offs) {
- UINTVAL c = ENCODING_GET_BYTE(interp, src, offs);
- if (c >= 0x80)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
- "lossy conversion to ascii");
-
- ENCODING_SET_BYTE(interp, dest, offs, c);
- }
- return dest;
-}
-
-/*
-
-=back
-
-=cut
-
-*/
-
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/iso-8859-1.h
==============================================================================
--- branches/gc_massacre/src/string/charset/iso-8859-1.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,46 +0,0 @@
-/* iso_8859_1.h
- * Copyright (C) 2004-2007, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the iso_8859-1 charset functions
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-#ifndef PARROT_CHARSET_ISO_8859_1_H_GUARD
-#define PARROT_CHARSET_ISO_8859_1_H_GUARD
-
-/* HEADERIZER BEGIN: src/string/charset/iso-8859-1.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-STRING * charset_cvt_iso_8859_1_to_ascii(PARROT_INTERP,
- ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-void Parrot_charset_iso_8859_1_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_charset_cvt_iso_8859_1_to_ascii \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_Parrot_charset_iso_8859_1_init \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset/iso-8859-1.c */
-
-#endif /* PARROT_CHARSET_ISO_8859_1_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/tables.c
==============================================================================
--- branches/gc_massacre/src/string/charset/tables.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,93 +0,0 @@
-/* $Id$
- * Copyright (C) 2005-2007, Parrot Foundation.
- *
- * DO NOT EDIT THIS FILE DIRECTLY!
- * please update the tools/dev/gen_charset_tables.pl script instead.
- *
- * Created by gen_charset_tables.pl 19534 2007-07-02 02:12:08Z petdance
- * Overview:
- * This file contains various charset tables.
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-/* HEADERIZER HFILE: none */
-
-
-#include "tables.h"
-const INTVAL Parrot_iso_8859_1_typetable[256] = {
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 0-7 */
-0x0200, 0x0320, 0x1220, 0x0220, 0x1220, 0x1220, 0x0200, 0x0200, /* 8-15 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 16-23 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 24-31 */
-0x0160, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 32-39 */
-0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 40-47 */
-0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, /* 48-55 */
-0x28d8, 0x28d8, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 56-63 */
-0x04c0, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28c5, /* 64-71 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 72-79 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 80-87 */
-0x28c5, 0x28c5, 0x28c5, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x24c0, /* 88-95 */
-0x04c0, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28c6, /* 96-103 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 104-111 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 112-119 */
-0x28c6, 0x28c6, 0x28c6, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x0200, /* 120-127 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x1220, 0x0200, 0x0200, /* 128-135 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 136-143 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 144-151 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 152-159 */
-0x04e0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 160-167 */
-0x04c0, 0x04c0, 0x28c4, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 168-175 */
-0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x28c6, 0x04c0, 0x04c0, /* 176-183 */
-0x04c0, 0x04c0, 0x28c4, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 184-191 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 192-199 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 200-207 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x04c0, /* 208-215 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c6, /* 216-223 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 224-231 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 232-239 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x04c0, /* 240-247 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 248-255 */
-};
-const INTVAL Parrot_ascii_typetable[256] = {
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 0-7 */
-0x0200, 0x0320, 0x1220, 0x0220, 0x1220, 0x1220, 0x0200, 0x0200, /* 8-15 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 16-23 */
-0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, 0x0200, /* 24-31 */
-0x0160, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 32-39 */
-0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 40-47 */
-0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, 0x28d8, /* 48-55 */
-0x28d8, 0x28d8, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x04c0, /* 56-63 */
-0x04c0, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28d5, 0x28c5, /* 64-71 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 72-79 */
-0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, 0x28c5, /* 80-87 */
-0x28c5, 0x28c5, 0x28c5, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x24c0, /* 88-95 */
-0x04c0, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28d6, 0x28c6, /* 96-103 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 104-111 */
-0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, 0x28c6, /* 112-119 */
-0x28c6, 0x28c6, 0x28c6, 0x04c0, 0x04c0, 0x04c0, 0x04c0, 0x0200, /* 120-127 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1020, 0x0000, 0x0000, /* 128-135 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 136-143 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 144-151 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 152-159 */
-0x0020, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 160-167 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 168-175 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 176-183 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 184-191 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 192-199 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 200-207 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 208-215 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 216-223 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 224-231 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 232-239 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 240-247 */
-0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 248-255 */
-};
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/tables.h
==============================================================================
--- branches/gc_massacre/src/string/charset/tables.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,36 +0,0 @@
-/* $Id$
- * Copyright (C) 2005-2007, Parrot Foundation.
- *
- * DO NOT EDIT THIS FILE DIRECTLY!
- * please update the tools/dev/gen_charset_tables.pl script instead.
- *
- * Created by gen_charset_tables.pl 19534 2007-07-02 02:12:08Z petdance
- * Overview:
- * This file contains various charset tables.
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-/* HEADERIZER HFILE: none */
-
-
-#ifndef PARROT_CHARSET_TABLES_H_GUARD
-#define PARROT_CHARSET_TABLES_H_GUARD
-#include "parrot/cclass.h"
-#include "parrot/parrot.h"
-#define WHITESPACE enum_cclass_whitespace
-#define WORDCHAR enum_cclass_word
-#define PUNCTUATION enum_cclass_punctuation
-#define DIGIT enum_cclass_numeric
-extern const INTVAL Parrot_iso_8859_1_typetable[256];
-extern const INTVAL Parrot_ascii_typetable[256];
-#endif /* PARROT_CHARSET_TABLES_H_GUARD */
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-
Deleted: branches/gc_massacre/src/string/charset/unicode.c
==============================================================================
--- branches/gc_massacre/src/string/charset/unicode.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,1075 +0,0 @@
-/*
-Copyright (C) 2005-2010, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/charset/unicode.c
-
-=head1 DESCRIPTION
-
-This file implements the charset functions for unicode data
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "unicode.h"
-#include "ascii.h"
-#include "tables.h"
-
-/* HEADERIZER HFILE: src/string/charset/unicode.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-static INTVAL compare(PARROT_INTERP,
- ARGIN(const STRING *lhs),
- ARGIN(const STRING *rhs))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* compose(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static size_t compute_hash(PARROT_INTERP,
- ARGIN(const STRING *src),
- size_t seed)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static INTVAL cs_rindex(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(const STRING *search_string),
- SHIM(UINTVAL offset))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* decompose(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-static INTVAL find_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-static INTVAL find_not_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_graphemes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static INTVAL is_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* to_charset(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-static UINTVAL validate(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
-#define ASSERT_ARGS_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_compute_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_cs_rindex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_graphemes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_string_from_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_to_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_u_iscclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-#ifdef EXCEPTION
-# undef EXCEPTION
-#endif
-
-#if PARROT_HAS_ICU
-# include <unicode/ucnv.h>
-# include <unicode/utypes.h>
-# include <unicode/uchar.h>
-# include <unicode/ustring.h>
-# include <unicode/unorm.h>
-#endif
-#define EXCEPTION(err, str) \
- Parrot_ex_throw_from_c_args(interp, NULL, (err), (str))
-
-#define UNIMPL EXCEPTION(EXCEPTION_UNIMPLEMENTED, "unimplemented unicode")
-
-
-/*
-
-=item C<static STRING * get_graphemes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Gets the graphemes from STRING C<src> starting at C<offset>. Gets
-C<count> graphemes total.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_graphemes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_graphemes)
- return ENCODING_GET_CODEPOINTS(interp, src, offset, count);
-}
-
-
-/*
-
-=item C<static STRING* to_charset(PARROT_INTERP, const STRING *src)>
-
-Converts input STRING C<src> to unicode STRING C<dest>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-to_charset(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_charset)
- const charset_converter_t conversion_func =
- Parrot_find_charset_converter(interp, src->charset,
- Parrot_unicode_charset_ptr);
-
- if (conversion_func)
- return conversion_func(interp, src);
-
- return Parrot_utf8_encoding_ptr->to_encoding(interp, src);
-}
-
-
-/*
-
-=item C<static STRING* compose(PARROT_INTERP, const STRING *src)>
-
-If Parrot is built with ICU, composes the STRING C<src>. Attempts to
-denormalize the STRING into the ICU default, NFC.
-
-If Parrot does not have ICU included, throws an exception.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-compose(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(compose)
-#if PARROT_HAS_ICU
- STRING *dest;
- int src_len, dest_len;
- UErrorCode err;
- /*
- U_STABLE int32_t U_EXPORT2
- unorm_normalize(const UChar *source, int32_t sourceLength,
- UNormalizationMode mode, int32_t options,
- UChar *result, int32_t resultLength,
- UErrorCode *status);
- */
- dest_len = src_len = src->strlen;
- dest = Parrot_str_new_init(interp, NULL, src_len * sizeof (UChar),
- src->encoding, src->charset, 0);
-
- err = U_ZERO_ERROR;
- dest_len = unorm_normalize((UChar *)src->strstart, src_len,
- UNORM_DEFAULT, /* default is NFC */
- 0, /* options 0 default - no specific icu
- * version */
- (UChar *)dest->strstart, dest_len, &err);
-
- dest->bufused = dest_len * sizeof (UChar);
-
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, dest, dest->bufused);
- dest_len = unorm_normalize((UChar *)src->strstart, src_len,
- UNORM_DEFAULT, /* default is NFC */
- 0, /* options 0 default - no specific
- * icu version */
- (UChar *)dest->strstart, dest_len, &err);
- PARROT_ASSERT(U_SUCCESS(err));
- dest->bufused = dest_len * sizeof (UChar);
- }
- dest->strlen = dest_len;
- return dest;
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
-}
-
-
-/*
-
-=item C<static STRING* decompose(PARROT_INTERP, const STRING *src)>
-
-Decompose function for unicode charset. This function is not yet implemented.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-decompose(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(decompose)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
-}
-
-
-/*
-
-=item C<static STRING* upcase(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to all upper-case graphemes, for those characters
-which support upper-case versions.
-
-Throws an exception if ICU is not installed.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(upcase)
-#if PARROT_HAS_ICU
- UErrorCode err;
- int dest_len, src_len, needed;
- STRING *res;
-#endif
-
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->upcase(interp, src);
- }
-
-#if PARROT_HAS_ICU
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- /*
- U_CAPI int32_t U_EXPORT2
- u_strToUpper(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- const char *locale,
- UErrorCode *pErrorCode);
- */
- err = U_ZERO_ERROR;
-
- /* use all available space - see below XXX */
- /* TODO downcase, titlecase too */
- dest_len = Buffer_buflen(res) / sizeof (UChar);
- src_len = res->bufused / sizeof (UChar);
-
- /*
- * XXX troubles:
- * t/op/string_cs_45 upcase unicode:"\u01f0"
- * this creates \u004a \u030c J+NON-SPACING HACEK
- * the string needs resizing, *if* the src buffer is
- * too short. *But* with icu 3.2/3.4 the src string is
- * overwritten with partial result, despite the icu docs sayeth:
- *
- * The source string and the destination buffer
- * are allowed to overlap.
- *
- * Workaround: 'preflighting' returns needed length
- * Alternative: forget about inplace operation - create new result
- *
- * TODO downcase, titlecase
- */
- needed = u_strToUpper(NULL, 0,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
-
- if (needed > dest_len) {
- Parrot_gc_reallocate_string_storage(interp, res, needed * sizeof (UChar));
- dest_len = needed;
- }
-
- err = U_ZERO_ERROR;
- dest_len = u_strToUpper((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
- res->bufused = dest_len * sizeof (UChar);
-
- /* downgrade if possible */
- if (dest_len == (int)src->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
- else {
- /* string is likely still ucs2 if it was earlier
- * but strlen changed due to combining char
- */
- res->strlen = dest_len;
- }
-
- return res;
-
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
-}
-
-
-/*
-
-=item C<static STRING* downcase(PARROT_INTERP, const STRING *src)>
-
-Converts all graphemes to lower-case, for those graphemes which have cases.
-
-Throws an exception if ICU is not installed.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(downcase)
-#if PARROT_HAS_ICU
- UErrorCode err;
- int dest_len, src_len;
- STRING *res;
-#endif
-
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->downcase(interp, src);
- }
-
-#if PARROT_HAS_ICU
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- /*
-U_CAPI int32_t U_EXPORT2
-u_strToLower(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- const char *locale,
- UErrorCode *pErrorCode);
- */
- err = U_ZERO_ERROR;
- src_len = res->bufused / sizeof (UChar);
- dest_len = u_strToLower((UChar *)res->strstart, src_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- res->bufused = dest_len * sizeof (UChar);
-
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
- dest_len = u_strToLower((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
- }
-
- /* downgrade if possible */
- if (dest_len == (int)res->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
-
- return res;
-
-#else
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
-}
-
-
-/*
-
-=item C<static STRING* titlecase(PARROT_INTERP, const STRING *src)>
-
-Converts the string to title case, for those characters which support cases.
-
-Throws an exception if ICU is not installed.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(titlecase)
-#if PARROT_HAS_ICU
-
- UErrorCode err;
- int dest_len, src_len;
- STRING *res;
-
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->titlecase(interp, src);
- }
-
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
-
- /*
-U_CAPI int32_t U_EXPORT2
-u_strToTitle(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- UBreakIterator *titleIter,
- const char *locale,
- UErrorCode *pErrorCode);
- */
-
- err = U_ZERO_ERROR;
- src_len = res->bufused / sizeof (UChar);
- dest_len = u_strToTitle((UChar *)res->strstart, src_len,
- (UChar *)res->strstart, src_len,
- NULL, /* default titleiter */
- NULL, /* locale = default */
- &err);
- res->bufused = dest_len * sizeof (UChar);
-
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
- dest_len = u_strToTitle((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, NULL,
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
- }
-
- /* downgrade if possible */
- if (dest_len == (int)res->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
-
- return res;
-
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
-}
-
-
-/*
-
-=item C<static STRING* upcase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first grapheme in the STRING C<src> to uppercase, if the
-grapheme supports it. Not implemented.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(upcase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
-}
-
-
-/*
-
-=item C<static STRING* downcase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first grapheme in the STRING C<src> to lower-case, if
-the grapheme supports it. Not implemented
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(downcase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
-}
-
-
-/*
-
-=item C<static STRING* titlecase_first(PARROT_INTERP, const STRING *src)>
-
-Converts the first grapheme in STRING C<src> to title case, if the
-string supports it. Not implemented.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(titlecase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
-}
-
-
-/*
-
-=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING
-*rhs)>
-
-Compares two STRINGs, C<lhs> and C<rhs>. Returns -1 if C<lhs> < C<rhs>. Returns
-0 if C<lhs> = C<rhs>. Returns 1 if C<lhs> > C<rhs>.
-
-=cut
-
-*/
-
-static INTVAL
-compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
-{
- ASSERT_ARGS(compare)
- String_iter l_iter, r_iter;
- UINTVAL min_len, l_len, r_len;
-
- /* TODO make optimized equal - strings are equal length then already */
- STRING_ITER_INIT(interp, &l_iter);
- STRING_ITER_INIT(interp, &r_iter);
-
- l_len = lhs->strlen;
- r_len = rhs->strlen;
-
- min_len = l_len > r_len ? r_len : l_len;
-
- while (l_iter.charpos < min_len) {
- const UINTVAL cl = STRING_ITER_GET_AND_ADVANCE(interp, lhs, &l_iter);
- const UINTVAL cr = STRING_ITER_GET_AND_ADVANCE(interp, rhs, &r_iter);
-
- if (cl != cr)
- return cl < cr ? -1 : 1;
- }
-
- if (l_len < r_len)
- return -1;
-
- if (l_len > r_len)
- return 1;
-
- return 0;
-}
-
-
-/*
-
-=item C<static INTVAL cs_rindex(PARROT_INTERP, const STRING *src, const STRING
-*search_string, UINTVAL offset)>
-
-Finds the last index of substring C<search_string> in STRING C<src>,
-starting from C<offset>. Not implemented.
-
-=cut
-
-*/
-
-static INTVAL
-cs_rindex(PARROT_INTERP, SHIM(const STRING *src),
- SHIM(const STRING *search_string), SHIM(UINTVAL offset))
-{
- ASSERT_ARGS(cs_rindex)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
-}
-
-
-/*
-
-=item C<static UINTVAL validate(PARROT_INTERP, const STRING *src)>
-
-Returns 1 if the STRING C<src> is a valid unicode string, returns 0 otherwise.
-
-=cut
-
-*/
-
-static UINTVAL
-validate(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(validate)
- String_iter iter;
- const INTVAL length = Parrot_str_length(interp, src);
-
- STRING_ITER_INIT(interp, &iter);
- while (iter.charpos < length) {
- const UINTVAL codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- /* Check for Unicode non-characters */
- if (codepoint >= 0xfdd0
- && (codepoint <= 0xfdef || (codepoint & 0xfffe) == 0xfffe)
- && codepoint <= 0x10ffff)
- return 0;
- }
-
- return 1;
-}
-
-
-/*
-
-=item C<static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)>
-
-Returns Boolean.
-
-=cut
-
-*/
-
-static int
-u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
-{
- ASSERT_ARGS(u_iscclass)
-#if PARROT_HAS_ICU
- UNUSED(interp);
- /* XXX which one
- return u_charDigitValue(codepoint);
- */
- if ((flags & enum_cclass_uppercase) && u_isupper(codepoint)) return 1;
- if ((flags & enum_cclass_lowercase) && u_islower(codepoint)) return 1;
- if ((flags & enum_cclass_alphabetic) && u_isalpha(codepoint)) return 1;
- if ((flags & enum_cclass_numeric) && u_isdigit(codepoint)) return 1;
- if ((flags & enum_cclass_hexadecimal) && u_isxdigit(codepoint)) return 1;
- if ((flags & enum_cclass_whitespace) && u_isspace(codepoint)) return 1;
- if ((flags & enum_cclass_printing) && u_isprint(codepoint)) return 1;
- if ((flags & enum_cclass_graphical) && u_isgraph(codepoint)) return 1;
- if ((flags & enum_cclass_blank) && u_isblank(codepoint)) return 1;
- if ((flags & enum_cclass_control) && u_iscntrl(codepoint)) return 1;
- if ((flags & enum_cclass_alphanumeric) && u_isalnum(codepoint)) return 1;
- if ((flags & enum_cclass_word) &&
- (u_isalnum(codepoint) || codepoint == '_')) return 1;
-
- return 0;
-#else
- if (codepoint < 256)
- return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
-
- if (flags == enum_cclass_any)
- return 1;
-
- /* All codepoints from u+0100 to u+02af are alphabetic, so we
- * cheat on the WORD and ALPHABETIC properties to include these
- * (and incorrectly exclude all others). This is a stopgap until
- * ICU is everywhere, or we have better non-ICU unicode support. */
- if (flags == enum_cclass_word || flags == enum_cclass_alphabetic)
- return (codepoint < 0x2b0);
-
- if (flags & enum_cclass_whitespace) {
- /* from http://www.unicode.org/Public/UNIDATA/PropList.txt */
- switch (codepoint) {
- case 0x1680: case 0x180e: case 0x2000: case 0x2001:
- case 0x2002: case 0x2003: case 0x2004: case 0x2005:
- case 0x2006: case 0x2007: case 0x2008: case 0x2009:
- case 0x200a: case 0x2028: case 0x2029: case 0x202f:
- case 0x205f: case 0x3000:
- return 1;
- default:
- break;
- }
- }
-
- if (flags & enum_cclass_numeric) {
- /* from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */
- if (codepoint >= 0x0660 && codepoint <= 0x0669) return 1;
- if (codepoint >= 0x06f0 && codepoint <= 0x06f9) return 1;
- if (codepoint >= 0x07c0 && codepoint <= 0x07c9) return 1;
- if (codepoint >= 0x0966 && codepoint <= 0x096f) return 1;
- if (codepoint >= 0x09e6 && codepoint <= 0x09ef) return 1;
- if (codepoint >= 0x0a66 && codepoint <= 0x0a6f) return 1;
- if (codepoint >= 0x0ae6 && codepoint <= 0x0aef) return 1;
- if (codepoint >= 0x0b66 && codepoint <= 0x0b6f) return 1;
- if (codepoint >= 0x0be6 && codepoint <= 0x0bef) return 1;
- if (codepoint >= 0x0c66 && codepoint <= 0x0c6f) return 1;
- if (codepoint >= 0x0ce6 && codepoint <= 0x0cef) return 1;
- if (codepoint >= 0x0d66 && codepoint <= 0x0d6f) return 1;
- if (codepoint >= 0x0e50 && codepoint <= 0x0e59) return 1;
- if (codepoint >= 0x0ed0 && codepoint <= 0x0ed9) return 1;
- if (codepoint >= 0x0f20 && codepoint <= 0x0f29) return 1;
- if (codepoint >= 0x1040 && codepoint <= 0x1049) return 1;
- if (codepoint >= 0x17e0 && codepoint <= 0x17e9) return 1;
- if (codepoint >= 0x1810 && codepoint <= 0x1819) return 1;
- if (codepoint >= 0x1946 && codepoint <= 0x194f) return 1;
- if (codepoint >= 0x19d0 && codepoint <= 0x19d9) return 1;
- if (codepoint >= 0x1b50 && codepoint <= 0x1b59) return 1;
- if (codepoint >= 0xff10 && codepoint <= 0xff19) return 1;
- }
-
- if (flags & ~(enum_cclass_whitespace | enum_cclass_numeric | enum_cclass_newline))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-
- return 0;
-#endif
-}
-
-
-/*
-
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src,
-UINTVAL offset)>
-
-Returns Boolean.
-
-=cut
-
-*/
-
-static INTVAL
-is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(is_cclass)
- UINTVAL codepoint;
-
- if (offset >= src->strlen)
- return 0;
-
- codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
-
- if (codepoint >= 256)
- return u_iscclass(interp, codepoint, flags) != 0;
-
- return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
-}
-
-
-/*
-
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Find a character in the given character class.
-
-=cut
-
-*/
-
-static INTVAL
-find_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_cclass)
- String_iter iter;
- UINTVAL codepoint;
- UINTVAL end = offset + count;
-
- STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_POSITION(interp, src, &iter, offset);
-
- end = src->strlen < end ? src->strlen : end;
-
- while (iter.charpos < end) {
- codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (codepoint >= 256) {
- if (u_iscclass(interp, codepoint, flags))
- return iter.charpos - 1;
- }
- else {
- if (Parrot_iso_8859_1_typetable[codepoint] & flags)
- return iter.charpos - 1;
- }
- }
-
- return end;
-}
-
-
-/*
-
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
-
-Returns C<INTVAL>.
-
-=cut
-
-*/
-
-static INTVAL
-find_not_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src),
- UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(find_not_cclass)
- String_iter iter;
- UINTVAL codepoint;
- UINTVAL end = offset + count;
- int bit;
-
- if (offset > src->strlen) {
- /* XXX: Throw in this case? */
- return offset + count;
- }
-
- STRING_ITER_INIT(interp, &iter);
-
- if (offset)
- STRING_ITER_SET_POSITION(interp, src, &iter, offset);
-
- end = src->strlen < end ? src->strlen : end;
-
- if (flags == enum_cclass_any)
- return end;
-
- while (iter.charpos < end) {
- codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (codepoint >= 256) {
- for (bit = enum_cclass_uppercase;
- bit <= enum_cclass_word ; bit <<= 1) {
- if ((bit & flags) && !u_iscclass(interp, codepoint, bit))
- return iter.charpos - 1;
- }
- }
- else {
- if (!(Parrot_iso_8859_1_typetable[codepoint] & flags))
- return iter.charpos - 1;
- }
- }
-
- return end;
-}
-
-
-/*
-
-=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
-
-Returns a one-codepoint string for the given codepoint.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
-{
- ASSERT_ARGS(string_from_codepoint)
- String_iter iter;
- STRING * const dest = string_make(interp, "", 1, "unicode", 0);
-
- dest->strlen = 1;
-
- STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_AND_ADVANCE(interp, dest, &iter, codepoint);
- dest->bufused = iter.bytepos;
-
- return dest;
-}
-
-
-/*
-
-=item C<static size_t compute_hash(PARROT_INTERP, const STRING *src, size_t
-seed)>
-
-Computes the hash of the given STRING C<src> with starting seed value C<seed>.
-
-=cut
-
-*/
-
-static size_t
-compute_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed)
-{
- ASSERT_ARGS(compute_hash)
- String_iter iter;
- size_t hashval = seed;
-
- STRING_ITER_INIT(interp, &iter);
-
- while (iter.charpos < src->strlen) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- hashval += hashval << 5;
- hashval += c;
- }
-
- return hashval;
-}
-
-
-/*
-
-=item C<void Parrot_charset_unicode_init(PARROT_INTERP)>
-
-Initializes the Unicode charset by installing all the necessary function
-pointers.
-
-=cut
-
-*/
-
-void
-Parrot_charset_unicode_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_charset_unicode_init)
- CHARSET * const return_set = Parrot_new_charset(interp);
- static const CHARSET base_set = {
- "unicode",
- get_graphemes,
- to_charset,
- compose,
- decompose,
- upcase,
- downcase,
- titlecase,
- upcase_first,
- downcase_first,
- titlecase_first,
- compare,
- mixed_cs_index,
- cs_rindex,
- validate,
- is_cclass,
- find_cclass,
- find_not_cclass,
- string_from_codepoint,
- compute_hash,
- NULL
- };
-
- STRUCT_COPY_FROM_STRUCT(return_set, base_set);
-
- /*
- * for now use utf8
- * TODO replace it with a fixed uint_16 or uint_32 encoding
- * XXX if this is changed, modify string_make so it
- * still takes "utf8" when fed "unicode" as charset!
- */
- return_set->preferred_encoding = Parrot_utf8_encoding_ptr;
- Parrot_register_charset(interp, "unicode", return_set);
-
- return;
-}
-
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Deleted: branches/gc_massacre/src/string/charset/unicode.h
==============================================================================
--- branches/gc_massacre/src/string/charset/unicode.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,40 +0,0 @@
-/* unicode.h
- * Copyright (C) 2005-2007, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the unicode charset functions
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-#ifndef PARROT_CHARSET_UNICODE_H_GUARD
-#define PARROT_CHARSET_UNICODE_H_GUARD
-
-/*
- * init function
- */
-
-
-/* HEADERIZER BEGIN: src/string/charset/unicode.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-void Parrot_charset_unicode_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_Parrot_charset_unicode_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset/unicode.c */
-
-
-#endif /* PARROT_CHARSET_UNICODE_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Modified: branches/gc_massacre/src/string/encoding.c
==============================================================================
--- branches/gc_massacre/src/string/encoding.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,50 +16,28 @@
*/
-#define PARROT_NO_EXTERN_ENCODING_PTRS
-#include "parrot/parrot.h"
+#include "parrot/encoding.h"
+
+STR_VTABLE *Parrot_default_encoding_ptr = NULL;
+
+static STR_VTABLE **encodings;
+static int n_encodings;
+/* for backwards compatibility */
+static STRING *unicode_str;
+static STRING *fixed_8_str;
/* HEADERIZER HFILE: include/parrot/encoding.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static INTVAL register_encoding(PARROT_INTERP,
- ARGIN(const char *encodingname),
- ARGIN(ENCODING *encoding))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-#define ASSERT_ARGS_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(encodingname) \
- , PARROT_ASSERT_ARG(encoding))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
-ENCODING *Parrot_default_encoding_ptr = NULL;
-ENCODING *Parrot_fixed_8_encoding_ptr = NULL;
-ENCODING *Parrot_utf8_encoding_ptr = NULL;
-ENCODING *Parrot_ucs2_encoding_ptr = NULL;
-ENCODING *Parrot_utf16_encoding_ptr = NULL;
-ENCODING *Parrot_ucs4_encoding_ptr = NULL;
-
-typedef struct One_encoding {
- NOTNULL(ENCODING *encoding);
- STRING *name;
-} One_encoding;
-
-typedef struct All_encodings {
- int n_encodings;
- One_encoding *enc;
-} All_encodings;
-
-static All_encodings *all_encodings;
/*
-=item C<void parrot_deinit_encodings(PARROT_INTERP)>
+=item C<void Parrot_deinit_encodings(PARROT_INTERP)>
Deinitialize encodings and free all memory used by them.
@@ -68,25 +46,20 @@
*/
void
-parrot_deinit_encodings(PARROT_INTERP)
+Parrot_deinit_encodings(PARROT_INTERP)
{
- ASSERT_ARGS(parrot_deinit_encodings)
- const int n = all_encodings->n_encodings;
- int i;
+ ASSERT_ARGS(Parrot_deinit_encodings)
- for (i = 0; i < n; ++i) {
- mem_gc_free(interp, all_encodings->enc[i].encoding);
- }
- mem_gc_free(interp, all_encodings->enc);
- mem_gc_free(interp, all_encodings);
- all_encodings = NULL;
+ mem_gc_free(interp, encodings);
+ encodings = NULL;
+ n_encodings = 0;
}
/*
-=item C<ENCODING * Parrot_new_encoding(PARROT_INTERP)>
+=item C<STR_VTABLE * Parrot_new_encoding(PARROT_INTERP)>
-Allocates the memory for a new C<ENCODING> from the system.
+Allocates the memory for a new string vtable from the system.
=cut
@@ -95,16 +68,16 @@
PARROT_EXPORT
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-ENCODING *
+STR_VTABLE *
Parrot_new_encoding(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_new_encoding)
- return mem_gc_allocate_typed(interp, ENCODING);
+ return mem_gc_allocate_typed(interp, STR_VTABLE);
}
/*
-=item C<const ENCODING * Parrot_find_encoding(PARROT_INTERP, const char
+=item C<const STR_VTABLE * Parrot_find_encoding(PARROT_INTERP, const char
*encodingname)>
Finds an encoding with the name C<encodingname>. Returns the encoding
@@ -118,22 +91,27 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-const ENCODING *
+const STR_VTABLE *
Parrot_find_encoding(SHIM_INTERP, ARGIN(const char *encodingname))
{
ASSERT_ARGS(Parrot_find_encoding)
- const int n = all_encodings->n_encodings;
+ const int n = n_encodings;
int i;
for (i = 0; i < n; ++i)
- if (STREQ(all_encodings->enc[i].encoding->name, encodingname))
- return all_encodings->enc[i].encoding;
+ if (STREQ(encodings[i]->name, encodingname))
+ return encodings[i];
+
+ /* backwards compatibility */
+ if (strcmp(encodingname, "unicode") == 0)
+ return Parrot_utf8_encoding_ptr;
+
return NULL;
}
/*
-=item C<const ENCODING * Parrot_load_encoding(PARROT_INTERP, const char
+=item C<const STR_VTABLE * Parrot_load_encoding(PARROT_INTERP, const char
*encodingname)>
Loads an encoding. Currently throws an exception because we cannot load
@@ -154,7 +132,7 @@
PARROT_EXPORT
PARROT_DOES_NOT_RETURN
PARROT_CANNOT_RETURN_NULL
-const ENCODING *
+const STR_VTABLE *
Parrot_load_encoding(PARROT_INTERP, ARGIN(const char *encodingname))
{
ASSERT_ARGS(Parrot_load_encoding)
@@ -181,13 +159,28 @@
Parrot_encoding_number(PARROT_INTERP, ARGIN(const STRING *encodingname))
{
ASSERT_ARGS(Parrot_encoding_number)
- const int n = all_encodings->n_encodings;
+ const int n = n_encodings;
int i;
for (i = 0; i < n; ++i) {
- if (Parrot_str_equal(interp, all_encodings->enc[i].name, encodingname))
+ if (Parrot_str_equal(interp, encodings[i]->name_str, encodingname))
return i;
}
+
+ /* backwards compatibility */
+ if (Parrot_str_equal(interp, encodingname, unicode_str)) {
+ for (i = 0; i < n; ++i) {
+ if (STREQ(encodings[i]->name, "utf8"))
+ return i;
+ }
+ }
+ else if (STRING_equal(interp, encodingname, fixed_8_str)) {
+ for (i = 0; i < n; ++i) {
+ if (STREQ(encodings[i]->name, "ascii"))
+ return i;
+ }
+ }
+
return -1;
}
@@ -197,6 +190,8 @@
Return the number of the encoding of the given string or -1 if not found.
+This could be converted to a macro.
+
=cut
*/
@@ -208,14 +203,8 @@
Parrot_encoding_number_of_str(SHIM_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(Parrot_encoding_number_of_str)
- const int n = all_encodings->n_encodings;
- int i;
- for (i = 0; i < n; ++i) {
- if (src->encoding == all_encodings->enc[i].encoding)
- return i;
- }
- return -1;
+ return src->encoding->num;
}
/*
@@ -225,6 +214,8 @@
Returns the name of a character encoding based on the INTVAL index
C<number_of_encoding> to the All_encodings array.
+This could be converted to a macro.
+
=cut
*/
@@ -237,15 +228,15 @@
Parrot_encoding_name(SHIM_INTERP, INTVAL number_of_encoding)
{
ASSERT_ARGS(Parrot_encoding_name)
- if (number_of_encoding >= all_encodings->n_encodings ||
+ if (number_of_encoding >= n_encodings ||
number_of_encoding < 0)
return NULL;
- return all_encodings->enc[number_of_encoding].name;
+ return encodings[number_of_encoding]->name_str;
}
/*
-=item C<const ENCODING* Parrot_get_encoding(PARROT_INTERP, INTVAL
+=item C<const STR_VTABLE* Parrot_get_encoding(PARROT_INTERP, INTVAL
number_of_encoding)>
Returns the encoding given by the INTVAL index C<number_of_encoding>.
@@ -258,14 +249,14 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-const ENCODING*
+const STR_VTABLE*
Parrot_get_encoding(SHIM_INTERP, INTVAL number_of_encoding)
{
ASSERT_ARGS(Parrot_get_encoding)
- if (number_of_encoding >= all_encodings->n_encodings ||
+ if (number_of_encoding >= n_encodings ||
number_of_encoding < 0)
return NULL;
- return all_encodings->enc[number_of_encoding].encoding;
+ return encodings[number_of_encoding];
}
/*
@@ -288,50 +279,10 @@
Parrot_encoding_c_name(SHIM_INTERP, INTVAL number_of_encoding)
{
ASSERT_ARGS(Parrot_encoding_c_name)
- if (number_of_encoding >= all_encodings->n_encodings ||
+ if (number_of_encoding >= n_encodings ||
number_of_encoding < 0)
return NULL;
- return all_encodings->enc[number_of_encoding].encoding->name;
-}
-
-/*
-
-=item C<static INTVAL register_encoding(PARROT_INTERP, const char *encodingname,
-ENCODING *encoding)>
-
-Registers a new character encoding C<encoding> with the given name
-C<encodingname>. Returns 1 if successful, returns 0 otherwise.
-
-=cut
-
-*/
-
-static INTVAL
-register_encoding(PARROT_INTERP, ARGIN(const char *encodingname),
- ARGIN(ENCODING *encoding))
-{
- ASSERT_ARGS(register_encoding)
- const int n = all_encodings->n_encodings;
- int i;
-
- for (i = 0; i < n; ++i) {
- if (STREQ(all_encodings->enc[i].encoding->name, encodingname))
- return 0;
- }
- /*
- * TODO
- * this needs either a LOCK or we just forbid dynamic
- * loading of encodings from inside threads
- */
- if (!n)
- all_encodings->enc = mem_gc_allocate_zeroed_typed(interp, One_encoding);
- else
- all_encodings->enc = mem_gc_realloc_n_typed_zeroed(interp,
- all_encodings->enc, n + 1, n, One_encoding);
- ++all_encodings->n_encodings;
- all_encodings->enc[n].encoding = encoding;
-
- return 1;
+ return encodings[number_of_encoding]->name;
}
/*
@@ -352,15 +303,16 @@
{
ASSERT_ARGS(Parrot_str_internal_register_encoding_names)
int n;
- for (n = 0; n < all_encodings->n_encodings; ++n)
- all_encodings->enc[n].name =
- Parrot_str_new_constant(interp, all_encodings->enc[n].encoding->name);
+ for (n = 0; n < n_encodings; ++n)
+ encodings[n]->name_str =
+ Parrot_str_new_constant(interp, encodings[n]->name);
+ unicode_str = Parrot_str_new_constant(interp, "unicode");
+ fixed_8_str = Parrot_str_new_constant(interp, "fixed_8");
}
/*
-=item C<INTVAL Parrot_register_encoding(PARROT_INTERP, const char *encodingname,
-ENCODING *encoding)>
+=item C<INTVAL Parrot_register_encoding(PARROT_INTERP, STR_VTABLE *encoding)>
Registers a character encoding C<encoding> with name C<encodingname>.
Only allows one of 5 possibilities: fixed_8, utf8, utf16, ucs2 and ucs4.
@@ -371,46 +323,66 @@
PARROT_EXPORT
INTVAL
-Parrot_register_encoding(PARROT_INTERP, ARGIN(const char *encodingname),
- ARGIN(ENCODING *encoding))
+Parrot_register_encoding(PARROT_INTERP, ARGIN(STR_VTABLE *encoding))
{
ASSERT_ARGS(Parrot_register_encoding)
- if (!all_encodings) {
- all_encodings = mem_gc_allocate_zeroed_typed(interp, All_encodings);
- all_encodings->n_encodings = 0;
- all_encodings->enc = NULL;
- }
- if (STREQ("fixed_8", encodingname)) {
- Parrot_fixed_8_encoding_ptr = encoding;
- if (!Parrot_default_encoding_ptr) {
- Parrot_default_encoding_ptr = encoding;
+ int i;
+ int n = n_encodings;
- }
- return register_encoding(interp, encodingname, encoding);
- }
- if (STREQ("utf8", encodingname)) {
- Parrot_utf8_encoding_ptr = encoding;
- return register_encoding(interp, encodingname, encoding);
- }
- if (STREQ("utf16", encodingname)) {
- Parrot_utf16_encoding_ptr = encoding;
- return register_encoding(interp, encodingname, encoding);
- }
- if (STREQ("ucs2", encodingname)) {
- Parrot_ucs2_encoding_ptr = encoding;
- return register_encoding(interp, encodingname, encoding);
- }
- if (STREQ("ucs4", encodingname)) {
- Parrot_ucs4_encoding_ptr = encoding;
- return register_encoding(interp, encodingname, encoding);
+ for (i = 0; i < n_encodings; ++i) {
+ if (STREQ(encodings[i]->name, encoding->name))
+ return 0;
}
- return 0;
+
+ if (!n)
+ encodings = mem_gc_allocate_zeroed_typed(interp, STR_VTABLE *);
+ else
+ encodings = mem_gc_realloc_n_typed_zeroed(interp,
+ encodings, n + 1, n, STR_VTABLE *);
+
+ encoding->num = n;
+ encodings[n] = encoding;
+ ++n_encodings;
+
+ return 1;
+}
+
+/*
+
+=item C<void Parrot_encodings_init(PARROT_INTERP)>
+
+Creates the initial charsets and encodings, and registers the initial
+charset converters.
+
+=cut
+
+*/
+
+PARROT_EXPORT
+void
+Parrot_encodings_init(PARROT_INTERP)
+{
+ ASSERT_ARGS(Parrot_encodings_init)
+
+ Parrot_register_encoding(interp, Parrot_ascii_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_latin1_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_binary_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_utf8_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_utf16_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_ucs2_encoding_ptr);
+ Parrot_register_encoding(interp, Parrot_ucs4_encoding_ptr);
+
+ Parrot_default_encoding_ptr = Parrot_ascii_encoding_ptr;
+
+ /* Now that the plugins are registered, we can create STRING
+ * names for them. */
+ Parrot_str_internal_register_encoding_names(interp);
}
/*
=item C<INTVAL Parrot_make_default_encoding(PARROT_INTERP, const char
-*encodingname, ENCODING *encoding)>
+*encodingname, STR_VTABLE *encoding)>
Sets the default encoding to C<encoding> with name C<encodingname>.
@@ -421,7 +393,7 @@
PARROT_EXPORT
INTVAL
Parrot_make_default_encoding(SHIM_INTERP, SHIM(const char *encodingname),
- ARGIN(ENCODING *encoding))
+ ARGIN(STR_VTABLE *encoding))
{
ASSERT_ARGS(Parrot_make_default_encoding)
Parrot_default_encoding_ptr = encoding;
@@ -430,7 +402,7 @@
/*
-=item C<const ENCODING * Parrot_default_encoding(PARROT_INTERP)>
+=item C<const STR_VTABLE * Parrot_default_encoding(PARROT_INTERP)>
Gets the default encoding.
@@ -442,39 +414,13 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-const ENCODING *
+const STR_VTABLE *
Parrot_default_encoding(SHIM_INTERP)
{
ASSERT_ARGS(Parrot_default_encoding)
return Parrot_default_encoding_ptr;
}
-/*
-
-=item C<encoding_converter_t Parrot_find_encoding_converter(PARROT_INTERP,
-ENCODING *lhs, ENCODING *rhs)>
-
-Finds a converter from encoding C<rhs> to C<lhs>. Not yet implemented, so
-throws an exception.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_DOES_NOT_RETURN
-encoding_converter_t
-Parrot_find_encoding_converter(PARROT_INTERP, ARGIN(ENCODING *lhs), ARGIN(ENCODING *rhs))
-{
- ASSERT_ARGS(Parrot_find_encoding_converter)
- UNUSED(lhs);
- UNUSED(rhs);
-
- /* XXX Apparently unwritten https://trac.parrot.org/parrot/wiki/StringsTasklist */
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
- "Can't find encoding converters yet.");
-}
-
/*
* Local variables:
Added: branches/gc_massacre/src/string/encoding/ascii.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/ascii.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,555 @@
+/*
+Copyright (C) 2004-2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/string/encoding/ascii.c
+
+=head1 DESCRIPTION
+
+This file implements encoding functions for ASCII strings.
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+#include "ascii.h"
+#include "shared.h"
+#include "tables.h"
+
+/* HEADERIZER HFILE: src/string/encoding/ascii.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static STRING * ascii_chr(PARROT_INTERP, UINTVAL codepoint)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_downcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static INTVAL ascii_find_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+static INTVAL ascii_find_not_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+static INTVAL ascii_is_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_titlecase_first(PARROT_INTERP,
+ ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING * ascii_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* ascii_upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL ascii_validate(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_ascii_chr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_ascii_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ascii_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
+
+/*
+
+=item C<static STRING * ascii_to_encoding(PARROT_INTERP, const STRING *src)>
+
+Converts STRING C<src> to ASCII charset STRING C<dest>.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+ascii_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_to_encoding)
+ STRING *dest;
+
+ if (STRING_max_bytes_per_codepoint(src) == 1) {
+ unsigned char * const src_buf = (unsigned char *)src->strstart;
+ UINTVAL offs;
+
+ for (offs = 0; offs < src->strlen; ++offs) {
+ UINTVAL c = src_buf[offs];
+ if (c >= 0x80)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
+ "lossy conversion to ascii");
+ }
+
+ dest = Parrot_str_clone(interp, src);
+ dest->encoding = Parrot_ascii_encoding_ptr;
+ }
+ else {
+ String_iter iter;
+ unsigned char *p;
+ const UINTVAL len = src->strlen;
+
+ dest = Parrot_str_new_init(interp, NULL, len,
+ Parrot_ascii_encoding_ptr, 0);
+ p = (unsigned char *)dest->strstart;
+ STRING_ITER_INIT(interp, &iter);
+
+ while (iter.charpos < len) {
+ const UINTVAL c = STRING_iter_get_and_advance(interp, src, &iter);
+ if (c >= 0x80)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
+ "can't convert unicode string to ascii");
+ *p++ = c;
+ }
+
+ dest->bufused = len;
+ dest->strlen = len;
+ }
+
+ return dest;
+}
+
+/*
+
+=item C<static STRING * ascii_chr(PARROT_INTERP, UINTVAL codepoint)>
+
+Creates a new STRING object from a single codepoint C<codepoint>. Returns
+the new STRING.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static STRING *
+ascii_chr(PARROT_INTERP, UINTVAL codepoint)
+{
+ ASSERT_ARGS(ascii_chr)
+ char real_codepoint = (char)codepoint;
+ return Parrot_str_new_init(interp, &real_codepoint, 1,
+ Parrot_ascii_encoding_ptr, 0);
+}
+
+/*
+
+=item C<static UINTVAL ascii_validate(PARROT_INTERP, const STRING *src)>
+
+Verifies that the given string is valid ASCII. Returns 1 if it is ASCII,
+returns 0 otherwise.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL
+ascii_validate(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_validate)
+ String_iter iter;
+ const UINTVAL length = Parrot_str_length(interp, src);
+
+ STRING_ITER_INIT(interp, &iter);
+ while (iter.charpos < length) {
+ const UINTVAL codepoint = STRING_iter_get_and_advance(interp, src, &iter);
+ if (codepoint >= 0x80)
+ return 0;
+ }
+ return 1;
+}
+
+/*
+
+=item C<static INTVAL ascii_is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*src, UINTVAL offset)>
+
+Returns Boolean.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static INTVAL
+ascii_is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
+{
+ ASSERT_ARGS(ascii_is_cclass)
+ UINTVAL codepoint;
+
+ if (offset >= src->strlen)
+ return 0;
+ codepoint = STRING_ord(interp, src, offset);
+
+ if (codepoint >= sizeof (Parrot_ascii_typetable) / sizeof (Parrot_ascii_typetable[0])) {
+ return 0;
+ }
+ return (Parrot_ascii_typetable[codepoint] & flags) ? 1 : 0;
+}
+
+/*
+
+=item C<static INTVAL ascii_find_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Find a character in the given character class. Delegates to the find_cclass
+method of the encoding plugin.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+static INTVAL
+ascii_find_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset,
+ UINTVAL count)
+{
+ ASSERT_ARGS(ascii_find_cclass)
+ const unsigned char *contents = (const unsigned char *)src->strstart;
+ UINTVAL pos = offset;
+ UINTVAL end = offset + count;
+
+ end = src->strlen < end ? src->strlen : end;
+ for (; pos < end; ++pos) {
+ if ((Parrot_ascii_typetable[contents[pos]] & flags) != 0) {
+ return pos;
+ }
+ }
+ return end;
+}
+
+/*
+
+=item C<static INTVAL ascii_find_not_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Returns C<INTVAL>.
+
+=cut
+
+*/
+
+static INTVAL
+ascii_find_not_cclass(PARROT_INTERP,
+ INTVAL flags, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(ascii_find_not_cclass)
+ const unsigned char *contents = (const unsigned char *)src->strstart;
+ UINTVAL pos = offset;
+ UINTVAL end = offset + count;
+
+ end = src->strlen < end ? src->strlen : end;
+ for (; pos < end; ++pos) {
+ if ((Parrot_ascii_typetable[contents[pos]] & flags) == 0) {
+ return pos;
+ }
+ }
+ return end;
+}
+
+/*
+
+=item C<static STRING* ascii_upcase(PARROT_INTERP, const STRING *src)>
+
+Converts the STRING C<src> to all uppercase.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_upcase)
+ STRING * const result = Parrot_str_clone(interp, src);
+ const UINTVAL n = src->strlen;
+
+ if (n) {
+ char * const buffer = result->strstart;
+ UINTVAL offset;
+
+ for (offset = 0; offset < n; ++offset) {
+ buffer[offset] = (char)toupper((unsigned char)buffer[offset]);
+ }
+ }
+
+ return result;
+}
+
+/*
+
+=item C<static STRING* ascii_downcase(PARROT_INTERP, const STRING *src)>
+
+Converts the STRING C<src> to all lower-case.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_downcase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_downcase)
+ STRING *result = Parrot_str_clone(interp, src);
+ const UINTVAL n = src->strlen;
+
+ if (n) {
+ char * const buffer = result->strstart;
+ UINTVAL offset;
+
+ for (offset = 0; offset < n; ++offset) {
+ buffer[offset] = (char)tolower((unsigned char)buffer[offset]);
+ }
+ }
+
+ return result;
+}
+
+/*
+
+=item C<static STRING* ascii_titlecase(PARROT_INTERP, const STRING *src)>
+
+Converts the STRING given by C<src> to title case, where
+the first character is upper case and all the rest of the characters
+are lower-case.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_titlecase)
+ STRING *result = Parrot_str_clone(interp, src);
+ const UINTVAL n = src->strlen;
+
+ if (n) {
+ char * const buffer = result->strstart;
+ UINTVAL offset;
+
+ buffer[0] = (char)toupper((unsigned char)buffer[0]);
+ for (offset = 1; offset < n; ++offset) {
+ buffer[offset] = (char)tolower((unsigned char)buffer[offset]);
+ }
+ }
+
+ return result;
+}
+
+/*
+
+=item C<static STRING* ascii_upcase_first(PARROT_INTERP, const STRING *src)>
+
+Sets the first character in the STRING C<src> to upper case,
+but doesn't modify the rest of the string.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_upcase_first)
+ STRING * const result = Parrot_str_clone(interp, src);
+
+ if (result->strlen > 0) {
+ char * const buffer = result->strstart;
+ buffer[0] = (char)toupper((unsigned char)buffer[0]);
+ }
+
+ return result;
+}
+
+/*
+
+=item C<static STRING* ascii_downcase_first(PARROT_INTERP, const STRING *src)>
+
+Sets the first character of the STRING C<src> to lowercase,
+but doesn't modify the rest of the characters.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_downcase_first)
+ STRING * const result = Parrot_str_clone(interp, src);
+
+ if (result->strlen > 0) {
+ char * const buffer = result->strstart;
+ buffer[0] = (char)tolower((unsigned char)buffer[0]);
+ }
+
+ return result;
+}
+
+/*
+
+=item C<static STRING* ascii_titlecase_first(PARROT_INTERP, const STRING *src)>
+
+Converts the first letter of STRING C<src> to upper case,
+but doesn't modify the rest of the string.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+ascii_titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(ascii_titlecase_first)
+ STRING * const result = Parrot_str_clone(interp, src);
+
+ if (result->strlen > 0) {
+ char * const buffer = result->strstart;
+ buffer[0] = (char)toupper((unsigned char)buffer[0]);
+ }
+
+ return result;
+}
+
+static STR_VTABLE Parrot_ascii_encoding = {
+ 0,
+ "ascii",
+ NULL,
+ 1, /* Max bytes per codepoint */
+
+ ascii_to_encoding,
+ ascii_chr,
+
+ fixed8_equal,
+ fixed8_compare,
+ fixed8_index,
+ fixed8_rindex,
+ fixed8_hash,
+ ascii_validate,
+
+ fixed8_scan,
+ fixed8_ord,
+ fixed8_substr,
+
+ ascii_is_cclass,
+ ascii_find_cclass,
+ ascii_find_not_cclass,
+
+ encoding_get_graphemes,
+ fixed8_compose,
+ encoding_decompose,
+
+ ascii_upcase,
+ ascii_downcase,
+ ascii_titlecase,
+ ascii_upcase_first,
+ ascii_downcase_first,
+ ascii_titlecase_first,
+
+ fixed8_iter_get,
+ fixed8_iter_skip,
+ fixed8_iter_get_and_advance,
+ fixed8_iter_set_and_advance,
+ fixed8_iter_set_position
+};
+
+STR_VTABLE *Parrot_ascii_encoding_ptr = &Parrot_ascii_encoding;
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
+
Added: branches/gc_massacre/src/string/encoding/ascii.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/ascii.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,30 @@
+/* ascii.h
+ * Copyright (C) 2004-2010, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * This is the header for the 8-bit fixed-width encoding
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+#ifndef PARROT_ENCODING_ASCII_H_GUARD
+#define PARROT_ENCODING_ASCII_H_GUARD
+
+/* HEADERIZER BEGIN: src/string/encoding/ascii.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/string/encoding/ascii.c */
+
+#endif /* PARROT_ENCODING_ASCII_H_GUARD */
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Added: branches/gc_massacre/src/string/encoding/binary.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/binary.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,276 @@
+/*
+Copyright (C) 2004-2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/string/encoding/binary.c
+
+=head1 DESCRIPTION
+
+This file implements encoding functions for binary strings.
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+#include "binary.h"
+#include "shared.h"
+
+/* HEADERIZER HFILE: src/string/encoding/binary.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* binary_change_case(PARROT_INTERP, SHIM(const STRING *src))
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING * binary_chr(PARROT_INTERP, UINTVAL codepoint)
+ __attribute__nonnull__(1);
+
+static INTVAL binary_find_cclass(SHIM_INTERP,
+ SHIM(INTVAL flags),
+ SHIM(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count);
+
+static INTVAL binary_find_not_cclass(SHIM_INTERP,
+ SHIM(INTVAL flags),
+ SHIM(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count);
+
+static INTVAL binary_is_cclass(SHIM_INTERP,
+ SHIM(INTVAL flags),
+ SHIM(const STRING *src),
+ SHIM(UINTVAL offset));
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* binary_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static UINTVAL binary_validate(SHIM_INTERP, SHIM(const STRING *src));
+#define ASSERT_ARGS_binary_change_case __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_binary_chr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_binary_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_binary_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_binary_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_binary_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_binary_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
+#ifdef EXCEPTION
+# undef EXCEPTION
+#endif
+
+#define EXCEPTION(err, str) \
+ Parrot_ex_throw_from_c_args(interp, NULL, (err), (str))
+
+
+/*
+
+=item C<static STRING* binary_to_encoding(PARROT_INTERP, const STRING *src)>
+
+Converts the STRING C<src> to STRING C<dest> in binary mode.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+binary_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(binary_to_encoding)
+ STRING *dest;
+
+ dest = Parrot_str_clone(interp, src);
+ dest->encoding = Parrot_binary_encoding_ptr;
+ dest->strlen = dest->bufused;
+ dest->hashval = 0;
+
+ return dest;
+}
+
+
+/*
+
+=item C<static STRING * binary_chr(PARROT_INTERP, UINTVAL codepoint)>
+
+Creates a new STRING object from a single codepoint C<codepoint>. Returns
+the new STRING.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+binary_chr(PARROT_INTERP, UINTVAL codepoint)
+{
+ ASSERT_ARGS(binary_chr)
+ char real_codepoint = (char)codepoint;
+ return Parrot_str_new_init(interp, &real_codepoint, 1,
+ Parrot_binary_encoding_ptr, 0);
+}
+
+
+/*
+
+=item C<static UINTVAL binary_validate(PARROT_INTERP, const STRING *src)>
+
+Returns 1. All sequential data is valid binary data.
+
+=cut
+
+*/
+
+/* Binary's always valid */
+static UINTVAL
+binary_validate(SHIM_INTERP, SHIM(const STRING *src))
+{
+ ASSERT_ARGS(binary_validate)
+ return 1;
+}
+
+
+/*
+
+=item C<static INTVAL binary_is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*src, UINTVAL offset)>
+
+Returns Boolean.
+
+=cut
+
+*/
+
+static INTVAL
+binary_is_cclass(SHIM_INTERP, SHIM(INTVAL flags), SHIM(const STRING *src), SHIM(UINTVAL offset))
+{
+ ASSERT_ARGS(binary_is_cclass)
+ return 0;
+}
+
+
+/*
+
+=item C<static INTVAL binary_find_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Find a character in the given character class.
+
+=cut
+
+*/
+
+static INTVAL
+binary_find_cclass(SHIM_INTERP, SHIM(INTVAL flags),
+ SHIM(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(binary_find_cclass)
+ return offset + count;
+}
+
+
+/*
+
+=item C<static INTVAL binary_find_not_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Returns C<INTVAL>.
+
+=cut
+
+*/
+
+static INTVAL
+binary_find_not_cclass(SHIM_INTERP, SHIM(INTVAL flags),
+ SHIM(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(binary_find_not_cclass)
+ return offset;
+}
+
+
+/*
+
+=item C<static STRING* binary_change_case(PARROT_INTERP, const STRING *src)>
+
+Throws an exception because we cannot change case of a binary string.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+binary_change_case(PARROT_INTERP, SHIM(const STRING *src))
+{
+ ASSERT_ARGS(binary_change_case)
+ EXCEPTION(EXCEPTION_INVALID_CHARTYPE, "Can't change case of binary data");
+}
+
+
+static STR_VTABLE Parrot_binary_encoding = {
+ 0,
+ "binary",
+ NULL,
+ 1, /* Max bytes per codepoint */
+
+ binary_to_encoding,
+ binary_chr,
+
+ fixed8_equal,
+ fixed8_compare,
+ fixed8_index,
+ fixed8_rindex,
+ fixed8_hash,
+ binary_validate,
+
+ fixed8_scan,
+ fixed8_ord,
+ fixed8_substr,
+
+ binary_is_cclass,
+ binary_find_cclass,
+ binary_find_not_cclass,
+
+ encoding_get_graphemes,
+ fixed8_compose,
+ encoding_decompose,
+
+ binary_change_case,
+ binary_change_case,
+ binary_change_case,
+ binary_change_case,
+ binary_change_case,
+ binary_change_case,
+
+ fixed8_iter_get,
+ fixed8_iter_skip,
+ fixed8_iter_get_and_advance,
+ fixed8_iter_set_and_advance,
+ fixed8_iter_set_position
+};
+
+STR_VTABLE *Parrot_binary_encoding_ptr = &Parrot_binary_encoding;
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Copied and modified: branches/gc_massacre/src/string/encoding/binary.h (from r48799, branches/gc_massacre/src/string/charset/binary.h)
==============================================================================
--- branches/gc_massacre/src/string/charset/binary.h Sun Sep 5 13:20:27 2010 (r48799, copy source)
+++ branches/gc_massacre/src/string/encoding/binary.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -10,21 +10,17 @@
* References:
*/
-#ifndef PARROT_CHARSET_BINARY_H_GUARD
-#define PARROT_CHARSET_BINARY_H_GUARD
+#ifndef PARROT_ENCODING_BINARY_H_GUARD
+#define PARROT_ENCODING_BINARY_H_GUARD
-/* HEADERIZER BEGIN: src/string/charset/binary.c */
+/* HEADERIZER BEGIN: src/string/encoding/binary.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_charset_binary_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_charset_binary_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/charset/binary.c */
+/* HEADERIZER END: src/string/encoding/binary.c */
-#endif /* PARROT_CHARSET_BINARY_H_GUARD */
+#endif /* PARROT_ENCODING_BINARY_H_GUARD */
/*
* Local variables:
Deleted: branches/gc_massacre/src/string/encoding/fixed_8.c
==============================================================================
--- branches/gc_massacre/src/string/encoding/fixed_8.c Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,572 +0,0 @@
-/*
-Copyright (C) 2004-2010, Parrot Foundation.
-$Id$
-
-=head1 NAME
-
-src/string/encoding/fixed_8.c
-
-=head1 DESCRIPTION
-
-This file implements the encoding functions for fixed-width 8-bit codepoints
-
-=over 4
-
-=cut
-
-*/
-
-#include "parrot/parrot.h"
-#include "fixed_8.h"
-
-/* HEADERIZER HFILE: src/string/encoding/fixed_8.h */
-
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL find_cclass(SHIM_INTERP,
- ARGIN(const STRING *s),
- ARGIN(const INTVAL *typetable),
- INTVAL flags,
- UINTVAL pos,
- UINTVAL end)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static UINTVAL fixed8_iter_get(PARROT_INTERP,
- ARGIN(const STRING *str),
- ARGIN(const String_iter *iter),
- INTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static UINTVAL fixed8_iter_get_and_advance(PARROT_INTERP,
- ARGIN(const STRING *str),
- ARGMOD(String_iter *iter))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*iter);
-
-static void fixed8_iter_set_and_advance(PARROT_INTERP,
- ARGMOD(STRING *str),
- ARGMOD(String_iter *iter),
- UINTVAL c)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*str)
- FUNC_MODIFIES(*iter);
-
-static void fixed8_iter_set_position(SHIM_INTERP,
- ARGIN(const STRING *str),
- ARGMOD(String_iter *iter),
- UINTVAL pos)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*iter);
-
-static void fixed8_iter_skip(SHIM_INTERP,
- ARGIN(const STRING *str),
- ARGMOD(String_iter *iter),
- INTVAL skip)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*iter);
-
-static size_t fixed_8_hash(SHIM_INTERP,
- ARGIN(const STRING *s),
- size_t hashval)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL get_byte(SHIM_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_bytes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static void set_byte(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL byte)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_DOES_NOT_RETURN
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_encoding(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(s) \
- , PARROT_ASSERT_ARG(typetable))
-#define ASSERT_ARGS_fixed8_iter_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(str) \
- , PARROT_ASSERT_ARG(iter))
-#define ASSERT_ARGS_fixed8_iter_get_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(str) \
- , PARROT_ASSERT_ARG(iter))
-#define ASSERT_ARGS_fixed8_iter_set_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(str) \
- , PARROT_ASSERT_ARG(iter))
-#define ASSERT_ARGS_fixed8_iter_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(str) \
- , PARROT_ASSERT_ARG(iter))
-#define ASSERT_ARGS_fixed8_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(str) \
- , PARROT_ASSERT_ARG(iter))
-#define ASSERT_ARGS_fixed_8_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(s))
-#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
-#define UNIMPL Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, \
- "unimpl fixed_8")
-
-/*
-
-=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
-
-Converts the string C<src> to this particular encoding. If C<dest> is
-provided, it will contain the result. Otherwise this function operates in
-place.
-
-
-=cut
-
-*/
-
-PARROT_DOES_NOT_RETURN
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-to_encoding(PARROT_INTERP, SHIM(const STRING *src))
-{
- ASSERT_ARGS(to_encoding)
- UNIMPL;
-}
-
-
-/*
-
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
-
-codepoints are bytes, so delegate
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *src),
- UINTVAL offset)
-{
- ASSERT_ARGS(get_codepoint)
- return get_byte(interp, src, offset);
-}
-
-
-/*
-
-=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
-*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
-
-codepoints are bytes, so delegate
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-find_cclass(SHIM_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
-INTVAL flags, UINTVAL pos, UINTVAL end)
-{
- ASSERT_ARGS(find_cclass)
- const unsigned char *contents = (const unsigned char *)s->strstart;
- for (; pos < end; ++pos) {
- if ((typetable[contents[pos]] & flags) != 0) {
- return pos;
- }
- }
- return end;
-}
-
-/*
-
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
-
-Returns the byte in string C<src> at position C<offset>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-get_byte(SHIM_INTERP, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(get_byte)
- const unsigned char *contents = (const unsigned char *)src->strstart;
-
- if (offset >= src->bufused) {
-/* Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "get_byte past the end of the buffer (%i of %i)",
- offset, src->bufused); */
- return 0;
- }
-
- return contents[offset];
-}
-
-/*
-
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
-UINTVAL byte)>
-
-Sets, in string C<src> at position C<offset>, the byte C<byte>.
-
-=cut
-
-*/
-
-static void
-set_byte(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL byte)
-{
- ASSERT_ARGS(set_byte)
- unsigned char *contents;
-
- if (offset >= src->bufused)
- Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "set_byte past the end of the buffer");
-
- contents = (unsigned char *)src->strstart;
- contents[offset] = (unsigned char)byte;
-}
-
-/*
-
-=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the codepoints in string C<src> at position C<offset> and length
-C<count>. (Delegates to C<get_bytes>.)
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_codepoints)
- STRING * const return_string = get_bytes(interp, src, offset, count);
- return_string->charset = src->charset;
- return return_string;
-}
-
-/*
-
-=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the bytes in string C<src> at position C<offset> and length C<count>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_bytes)
- STRING * const return_string = Parrot_str_new_init(interp,
- src->strstart + offset, count,
- src->encoding, src->charset,
- 0);
-
- return return_string;
-}
-
-
-/*
-
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
-
-Returns the number of codepoints in string C<src>.
-
-=cut
-
-*/
-
-static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(codepoints)
- return bytes(interp, src);
-}
-
-/*
-
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
-
-Returns the number of bytes in string C<src>.
-
-=cut
-
-*/
-
-static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(bytes)
- return src->bufused;
-}
-
-/*
- * iterator functions
- */
-
-/*
-
-=item C<static UINTVAL fixed8_iter_get(PARROT_INTERP, const STRING *str, const
-String_iter *iter, INTVAL offset)>
-
-Get the character at C<iter> plus C<offset>.
-
-=cut
-
-*/
-
-static UINTVAL
-fixed8_iter_get(PARROT_INTERP,
- ARGIN(const STRING *str), ARGIN(const String_iter *iter), INTVAL offset)
-{
- ASSERT_ARGS(fixed8_iter_get)
- return get_byte(interp, str, iter->charpos + offset);
-}
-
-/*
-
-=item C<static void fixed8_iter_skip(PARROT_INTERP, const STRING *str,
-String_iter *iter, INTVAL skip)>
-
-Moves the string iterator C<i> by C<skip> characters.
-
-=cut
-
-*/
-
-static void
-fixed8_iter_skip(SHIM_INTERP,
- ARGIN(const STRING *str), ARGMOD(String_iter *iter), INTVAL skip)
-{
- ASSERT_ARGS(fixed8_iter_skip)
- iter->bytepos += skip;
- iter->charpos += skip;
- PARROT_ASSERT(iter->bytepos <= Buffer_buflen(str));
-}
-
-/*
-
-=item C<static UINTVAL fixed8_iter_get_and_advance(PARROT_INTERP, const STRING
-*str, String_iter *iter)>
-
-Moves the string iterator C<i> to the next codepoint.
-
-=cut
-
-*/
-
-static UINTVAL
-fixed8_iter_get_and_advance(PARROT_INTERP,
- ARGIN(const STRING *str), ARGMOD(String_iter *iter))
-{
- ASSERT_ARGS(fixed8_iter_get_and_advance)
- const UINTVAL c = get_byte(interp, str, iter->charpos++);
- iter->bytepos++;
- return c;
-}
-
-/*
-
-=item C<static void fixed8_iter_set_and_advance(PARROT_INTERP, STRING *str,
-String_iter *iter, UINTVAL c)>
-
-With the string iterator C<i>, appends the codepoint C<c> and advances to the
-next position in the string.
-
-=cut
-
-*/
-
-static void
-fixed8_iter_set_and_advance(PARROT_INTERP,
- ARGMOD(STRING *str), ARGMOD(String_iter *iter), UINTVAL c)
-{
- ASSERT_ARGS(fixed8_iter_set_and_advance)
- set_byte(interp, str, iter->charpos++, c);
- iter->bytepos++;
-}
-
-/*
-
-=item C<static void fixed8_iter_set_position(PARROT_INTERP, const STRING *str,
-String_iter *iter, UINTVAL pos)>
-
-Moves the string iterator C<i> to the position C<n> in the string.
-
-=cut
-
-*/
-
-static void
-fixed8_iter_set_position(SHIM_INTERP,
- ARGIN(const STRING *str), ARGMOD(String_iter *iter), UINTVAL pos)
-{
- ASSERT_ARGS(fixed8_iter_set_position)
- iter->bytepos = iter->charpos = pos;
- PARROT_ASSERT(pos <= Buffer_buflen(str));
-}
-
-/*
-
-=item C<static size_t fixed_8_hash(PARROT_INTERP, const STRING *s, size_t
-hashval)>
-
-Returns the hashed value of the string, given a seed in hashval.
-
-=cut
-
-*/
-
-static size_t
-fixed_8_hash(SHIM_INTERP, ARGIN(const STRING *s), size_t hashval)
-{
- ASSERT_ARGS(fixed_8_hash)
- const unsigned char *pos = (const unsigned char *)s->strstart;
- UINTVAL len = s->strlen;
-
- while (len--) {
- hashval += hashval << 5;
- hashval += *(pos++);
- }
-
- return hashval;
-}
-
-
-/*
-
-=item C<void Parrot_encoding_fixed_8_init(PARROT_INTERP)>
-
-Initializes the fixed-8 encoding.
-
-=cut
-
-*/
-
-void
-Parrot_encoding_fixed_8_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_encoding_fixed_8_init)
- ENCODING * const return_encoding = Parrot_new_encoding(interp);
-
- ENCODING base_encoding = {
- "fixed_8",
- 1, /* Max bytes per codepoint */
- to_encoding,
- get_codepoint,
- get_byte,
- set_byte,
- get_codepoints,
- get_bytes,
- codepoints,
- bytes,
- find_cclass,
- fixed_8_hash,
- fixed8_iter_get,
- fixed8_iter_skip,
- fixed8_iter_get_and_advance,
- fixed8_iter_set_and_advance,
- fixed8_iter_set_position
- };
-
- STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
- Parrot_register_encoding(interp, "fixed_8", return_encoding);
-
- return;
-}
-
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-
Deleted: branches/gc_massacre/src/string/encoding/fixed_8.h
==============================================================================
--- branches/gc_massacre/src/string/encoding/fixed_8.h Mon Sep 13 21:23:26 2010 (r48983)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,34 +0,0 @@
-/* fixed_8.h
- * Copyright (C) 2004-2007, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * This is the header for the 8-bit fixed-width encoding
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-
-#ifndef PARROT_ENCODING_FIXED_8_H_GUARD
-#define PARROT_ENCODING_FIXED_8_H_GUARD
-
-/* HEADERIZER BEGIN: src/string/encoding/fixed_8.c */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-void Parrot_encoding_fixed_8_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-#define ASSERT_ARGS_Parrot_encoding_fixed_8_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: src/string/encoding/fixed_8.c */
-
-#endif /* PARROT_ENCODING_FIXED_8_H_GUARD */
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
Added: branches/gc_massacre/src/string/encoding/latin1.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/latin1.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,581 @@
+/*
+Copyright (C) 2004-2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/string/encoding/latin1.c
+
+=head1 DESCRIPTION
+
+This file implements encoding functions for ISO-8859-1 strings.
+
+=over 4
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+#include "latin1.h"
+#include "shared.h"
+#include "tables.h"
+
+/* HEADERIZER HFILE: src/string/encoding/latin1.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_CANNOT_RETURN_NULL
+static STRING * latin1_chr(PARROT_INTERP, UINTVAL codepoint)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_downcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_downcase_first(PARROT_INTERP,
+ ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static INTVAL latin1_find_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+static INTVAL latin1_find_not_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+static INTVAL latin1_is_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_titlecase_first(PARROT_INTERP,
+ ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static STRING * latin1_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+static STRING* latin1_upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static UINTVAL latin1_validate(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_latin1_chr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_latin1_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_latin1_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
+
+/*
+
+=item C<static STRING * latin1_to_encoding(PARROT_INTERP, const STRING *src)>
+
+Converts the STRING C<src> to an ISO-8859-1 STRING C<dest>.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static STRING *
+latin1_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_to_encoding)
+ STRING *dest;
+
+ if (STRING_max_bytes_per_codepoint(src) == 1) {
+ dest = Parrot_str_clone(interp, src);
+ dest->encoding = Parrot_latin1_encoding_ptr;
+ }
+ else {
+ String_iter iter;
+ unsigned char *p;
+ const UINTVAL len = src->strlen;
+
+ dest = Parrot_str_new_init(interp, NULL, len,
+ Parrot_latin1_encoding_ptr, 0);
+ p = (unsigned char *)dest->strstart;
+ STRING_ITER_INIT(interp, &iter);
+
+ while (iter.charpos < len) {
+ const UINTVAL c = STRING_iter_get_and_advance(interp, src, &iter);
+ if (c >= 0x100)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION,
+ "lossy conversion to iso-8559-1");
+ *p++ = c;
+ }
+
+ dest->bufused = len;
+ dest->strlen = len;
+ }
+
+ return dest;
+}
+
+
+/*
+
+=item C<static STRING * latin1_chr(PARROT_INTERP, UINTVAL codepoint)>
+
+Creates a new STRING from the single codepoint C<codepoint>.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING *
+latin1_chr(PARROT_INTERP, UINTVAL codepoint)
+{
+ ASSERT_ARGS(latin1_chr)
+ char real_codepoint = (char)codepoint;
+ PARROT_ASSERT(codepoint < 0x100);
+ return Parrot_str_new_init(interp, &real_codepoint, 1,
+ Parrot_latin1_encoding_ptr, 0);
+}
+
+
+/*
+
+=item C<static UINTVAL latin1_validate(PARROT_INTERP, const STRING *src)>
+
+Returns 1 if the STRING C<src> is a valid ISO-8859-1 STRING. Returns 0 otherwise.
+
+=cut
+
+*/
+
+static UINTVAL
+latin1_validate(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_validate)
+ INTVAL offset;
+ const INTVAL length = Parrot_str_length(interp, src);
+
+ for (offset = 0; offset < length; ++offset) {
+ const UINTVAL codepoint = STRING_ord(interp, src, offset);
+ if (codepoint >= 0x100)
+ return 0;
+ }
+ return 1;
+}
+
+
+/*
+
+=item C<static INTVAL latin1_is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*src, UINTVAL offset)>
+
+Returns Boolean.
+
+=cut
+
+*/
+
+static INTVAL
+latin1_is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
+{
+ ASSERT_ARGS(latin1_is_cclass)
+ UINTVAL codepoint;
+
+ if (offset >= src->strlen) return 0;
+ codepoint = STRING_ord(interp, src, offset);
+
+ if (codepoint >= sizeof (Parrot_ascii_typetable) /
+ sizeof (Parrot_ascii_typetable[0])) {
+ return 0;
+ }
+ return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
+}
+
+
+/*
+
+=item C<static INTVAL latin1_find_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Find a character in the given character class. Delegates to the find_cclass
+method of the encoding plugin.
+
+=cut
+
+*/
+
+static INTVAL
+latin1_find_cclass(PARROT_INTERP, INTVAL flags,
+ ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(latin1_find_cclass)
+ const unsigned char *contents = (const unsigned char *)src->strstart;
+ UINTVAL pos = offset;
+ UINTVAL end = offset + count;
+
+ end = src->strlen < end ? src->strlen : end;
+ for (; pos < end; ++pos) {
+ if ((Parrot_iso_8859_1_typetable[contents[pos]] & flags) != 0) {
+ return pos;
+ }
+ }
+ return end;
+}
+
+
+/*
+
+=item C<static INTVAL latin1_find_not_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Returns C<INTVAL>.
+
+=cut
+
+*/
+
+static INTVAL
+latin1_find_not_cclass(PARROT_INTERP, INTVAL flags,
+ ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(latin1_find_not_cclass)
+ const unsigned char *contents = (const unsigned char *)src->strstart;
+ UINTVAL pos = offset;
+ UINTVAL end = offset + count;
+
+ end = src->strlen < end ? src->strlen : end;
+ for (; pos < end; ++pos) {
+ if ((Parrot_iso_8859_1_typetable[contents[pos]] & flags) == 0) {
+ return pos;
+ }
+ }
+ return end;
+}
+
+
+/*
+
+=item C<static STRING* latin1_upcase(PARROT_INTERP, const STRING *src)>
+
+Convert all graphemes in the STRING C<src> to upper case, for those
+graphemes that support cases.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_upcase)
+ unsigned char *buffer;
+ UINTVAL offset = 0;
+ STRING *result = Parrot_str_clone(interp, src);
+
+ if (!result->strlen)
+ return result;
+
+ buffer = (unsigned char *)result->strstart;
+ for (offset = 0; offset < result->strlen; ++offset) {
+ unsigned int c = buffer[offset]; /* XXX use encoding ? */
+ if (c >= 0xe0 && c != 0xf7)
+ c &= ~0x20;
+ else
+ c = toupper((unsigned char)c);
+ buffer[offset] = (unsigned char)c;
+ }
+
+ return result;
+}
+
+
+/*
+
+=item C<static STRING* latin1_downcase(PARROT_INTERP, const STRING *src)>
+
+Converts all graphemes in STRING C<src> to lower-case, for those graphemes
+that support cases.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_downcase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_downcase)
+ unsigned char *buffer;
+ UINTVAL offset = 0;
+ STRING *result = Parrot_str_clone(interp, src);
+
+ if (!result->strlen)
+ return result;
+
+ buffer = (unsigned char *)result->strstart;
+ for (offset = 0; offset < result->strlen; ++offset) {
+ unsigned int c = buffer[offset];
+ if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
+ c |= 0x20;
+ else
+ c = tolower((unsigned char)c);
+ buffer[offset] = (unsigned char)c;
+ }
+
+ return result;
+}
+
+
+/*
+
+=item C<static STRING* latin1_titlecase(PARROT_INTERP, const STRING *src)>
+
+Converts the graphemes in STRING C<src> to title case, for those graphemes
+that support cases.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_titlecase)
+ unsigned char *buffer;
+ unsigned int c;
+ UINTVAL offset;
+ STRING *result = Parrot_str_clone(interp, src);
+
+ if (!result->strlen)
+ return result;
+
+ buffer = (unsigned char *)result->strstart;
+ c = buffer[0];
+ if (c >= 0xe0 && c != 0xf7)
+ c &= ~0x20;
+ else
+ c = toupper((unsigned char)c);
+ buffer[0] = (unsigned char)c;
+
+ for (offset = 1; offset < result->strlen; ++offset) {
+ c = buffer[offset];
+ if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
+ c |= 0x20;
+ else
+ c = tolower((unsigned char)c);
+ buffer[offset] = (unsigned char)c;
+ }
+
+ return result;
+}
+
+
+/*
+
+=item C<static STRING* latin1_upcase_first(PARROT_INTERP, const STRING *src)>
+
+Converts the first grapheme in STRING C<src> to upper case, if it
+supports cases.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_upcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_upcase_first)
+ unsigned char *buffer;
+ unsigned int c;
+ STRING *result = Parrot_str_clone(interp, src);
+
+ if (!result->strlen)
+ return result;
+
+ buffer = (unsigned char *)result->strstart;
+ c = buffer[0];
+ if (c >= 0xe0 && c != 0xf7)
+ c &= ~0x20;
+ else
+ c = toupper((unsigned char)c);
+ buffer[0] = (unsigned char)c;
+
+ return result;
+}
+
+
+/*
+
+=item C<static STRING* latin1_downcase_first(PARROT_INTERP, const STRING *src)>
+
+Converts the first character of the STRING C<src> to lower case, if the
+grapheme supports lower case.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_downcase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_downcase_first)
+ unsigned char *buffer;
+ unsigned int c;
+ STRING *result = Parrot_str_clone(interp, src);
+
+ if (!result->strlen)
+ return result;
+
+ buffer = (unsigned char *)result->strstart;
+ c = buffer[0];
+ if (c >= 0xc0 && c != 0xd7 && c <= 0xde)
+ c &= ~0x20;
+ else
+ c = tolower((unsigned char)c);
+ buffer[0] = (unsigned char)c;
+
+ return result;
+}
+
+
+/*
+
+=item C<static STRING* latin1_titlecase_first(PARROT_INTERP, const STRING *src)>
+
+Converts the first grapheme in STRING C<src> to title case, if the grapheme
+supports case.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+static STRING*
+latin1_titlecase_first(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(latin1_titlecase_first)
+ return latin1_upcase_first(interp, src);
+}
+
+
+static STR_VTABLE Parrot_latin1_encoding = {
+ 0,
+ "iso-8859-1",
+ NULL,
+ 1, /* Max bytes per codepoint */
+
+ latin1_to_encoding,
+ latin1_chr,
+
+ fixed8_equal,
+ fixed8_compare,
+ fixed8_index,
+ fixed8_rindex,
+ fixed8_hash,
+ latin1_validate,
+
+ fixed8_scan,
+ fixed8_ord,
+ fixed8_substr,
+
+ latin1_is_cclass,
+ latin1_find_cclass,
+ latin1_find_not_cclass,
+
+ encoding_get_graphemes,
+ fixed8_compose,
+ encoding_decompose,
+
+ latin1_upcase,
+ latin1_downcase,
+ latin1_titlecase,
+ latin1_upcase_first,
+ latin1_downcase_first,
+ latin1_titlecase_first,
+
+ fixed8_iter_get,
+ fixed8_iter_skip,
+ fixed8_iter_get_and_advance,
+ fixed8_iter_set_and_advance,
+ fixed8_iter_set_position
+};
+
+STR_VTABLE *Parrot_latin1_encoding_ptr = &Parrot_latin1_encoding;
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Added: branches/gc_massacre/src/string/encoding/latin1.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/latin1.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,30 @@
+/* iso_8859_1.h
+ * Copyright (C) 2004-2007, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * This is the header for the iso_8859-1 charset functions
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+#ifndef PARROT_ENCODING_LATIN1_H_GUARD
+#define PARROT_ENCODING_LATIN1_H_GUARD
+
+/* HEADERIZER BEGIN: src/string/encoding/latin1.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/string/encoding/latin1.c */
+
+#endif /* PARROT_ENCODING_LATIN1_H_GUARD */
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Copied and modified: branches/gc_massacre/src/string/encoding/shared.c (from r48799, branches/gc_massacre/src/string/charset/unicode.c)
==============================================================================
--- branches/gc_massacre/src/string/charset/unicode.c Sun Sep 5 13:20:27 2010 (r48799, copy source)
+++ branches/gc_massacre/src/string/encoding/shared.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -1,14 +1,18 @@
/*
-Copyright (C) 2005-2010, Parrot Foundation.
+Copyright (C) 2004-2010, Parrot Foundation.
$Id$
=head1 NAME
-src/string/charset/unicode.c
+src/string/encoding/shared.c
=head1 DESCRIPTION
-This file implements the charset functions for unicode data
+This file implements general encoding functions for strings.
+
+Functions starting with encoding_ work with any type of string.
+Functions starting with fixed8_ work with fixed8 strings.
+Functions starting with unicode_ work with unicode strings.
=over 4
@@ -17,313 +21,173 @@
*/
#include "parrot/parrot.h"
-#include "unicode.h"
-#include "ascii.h"
#include "tables.h"
+#include "shared.h"
+
+#if PARROT_HAS_ICU
+# include <unicode/ucnv.h>
+# include <unicode/utypes.h>
+# include <unicode/uchar.h>
+# include <unicode/ustring.h>
+# include <unicode/unorm.h>
+#endif
-/* HEADERIZER HFILE: src/string/charset/unicode.h */
+/* HEADERIZER HFILE: src/string/encoding/shared.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static INTVAL compare(PARROT_INTERP,
- ARGIN(const STRING *lhs),
- ARGIN(const STRING *rhs))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* compose(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static size_t compute_hash(PARROT_INTERP,
- ARGIN(const STRING *src),
- size_t seed)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static INTVAL cs_rindex(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(const STRING *search_string),
- SHIM(UINTVAL offset))
- __attribute__nonnull__(1);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* decompose(PARROT_INTERP, SHIM(const STRING *src))
+static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
__attribute__nonnull__(1);
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING* downcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
+#define ASSERT_ARGS_u_iscclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
-static INTVAL find_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-static INTVAL find_not_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
+#define UNIMPL Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, \
+ "unimpl fixed_8")
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_graphemes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static INTVAL is_cclass(PARROT_INTERP,
- INTVAL flags,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-PARROT_CANNOT_RETURN_NULL
-static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
- __attribute__nonnull__(1);
+/*
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+=item C<INTVAL encoding_equal(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
-PARROT_CANNOT_RETURN_NULL
-static STRING* titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
+Compares two STRINGs, C<lhs> and C<rhs>. If STRING C<lhs> == C<rhs>,
+returns 1. If C<lhs> != C<rhs> returns 0.
-PARROT_CANNOT_RETURN_NULL
-static STRING* to_charset(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+=cut
-static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
- __attribute__nonnull__(1);
+*/
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_equal(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
+{
+ ASSERT_ARGS(encoding_equal)
+ String_iter l_iter, r_iter;
+ const UINTVAL len = STRING_length(lhs);
-PARROT_CANNOT_RETURN_NULL
-static STRING* upcase_first(PARROT_INTERP, SHIM(const STRING *src))
- __attribute__nonnull__(1);
+ if (len != STRING_length(rhs))
+ return 0;
+ if (len == 0)
+ return 1;
+ if (lhs == rhs)
+ return 1;
+ if (lhs->hashval && rhs->hashval && lhs->hashval != rhs->hashval)
+ return 0;
+ if (lhs->encoding == rhs->encoding)
+ return memcmp(lhs->strstart, rhs->strstart, STRING_byte_length(lhs)) == 0;
-static UINTVAL validate(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(lhs) \
- , PARROT_ASSERT_ARG(rhs))
-#define ASSERT_ARGS_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_compute_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_cs_rindex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_graphemes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_string_from_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_to_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_u_iscclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
+ STRING_ITER_INIT(interp, &l_iter);
+ STRING_ITER_INIT(interp, &r_iter);
-#ifdef EXCEPTION
-# undef EXCEPTION
-#endif
+ while (l_iter.charpos < len) {
+ const UINTVAL cl = STRING_iter_get_and_advance(interp, lhs, &l_iter);
+ const UINTVAL cr = STRING_iter_get_and_advance(interp, rhs, &r_iter);
-#if PARROT_HAS_ICU
-# include <unicode/ucnv.h>
-# include <unicode/utypes.h>
-# include <unicode/uchar.h>
-# include <unicode/ustring.h>
-# include <unicode/unorm.h>
-#endif
-#define EXCEPTION(err, str) \
- Parrot_ex_throw_from_c_args(interp, NULL, (err), (str))
+ if (cl != cr)
+ return 0;
+ }
-#define UNIMPL EXCEPTION(EXCEPTION_UNIMPLEMENTED, "unimplemented unicode")
+ return 1;
+}
/*
-=item C<static STRING * get_graphemes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
+=item C<INTVAL encoding_compare(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
-Gets the graphemes from STRING C<src> starting at C<offset>. Gets
-C<count> graphemes total.
+Compares two STRINGs, C<lhs> and C<rhs>. Returns -1 if C<lhs> < C<rhs>. Returns
+0 if C<lhs> = C<rhs>. Returns 1 if C<lhs> > C<rhs>.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_graphemes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
{
- ASSERT_ARGS(get_graphemes)
- return ENCODING_GET_CODEPOINTS(interp, src, offset, count);
-}
-
+ ASSERT_ARGS(encoding_compare)
+ String_iter l_iter, r_iter;
+ UINTVAL min_len, l_len, r_len;
-/*
+ STRING_ITER_INIT(interp, &l_iter);
+ STRING_ITER_INIT(interp, &r_iter);
-=item C<static STRING* to_charset(PARROT_INTERP, const STRING *src)>
+ l_len = lhs->strlen;
+ r_len = rhs->strlen;
-Converts input STRING C<src> to unicode STRING C<dest>.
+ min_len = l_len > r_len ? r_len : l_len;
-=cut
+ while (l_iter.charpos < min_len) {
+ const UINTVAL cl = STRING_iter_get_and_advance(interp, lhs, &l_iter);
+ const UINTVAL cr = STRING_iter_get_and_advance(interp, rhs, &r_iter);
-*/
+ if (cl != cr)
+ return cl < cr ? -1 : 1;
+ }
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-to_charset(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_charset)
- const charset_converter_t conversion_func =
- Parrot_find_charset_converter(interp, src->charset,
- Parrot_unicode_charset_ptr);
+ if (l_len < r_len)
+ return -1;
- if (conversion_func)
- return conversion_func(interp, src);
+ if (l_len > r_len)
+ return 1;
- return Parrot_utf8_encoding_ptr->to_encoding(interp, src);
+ return 0;
}
/*
-=item C<static STRING* compose(PARROT_INTERP, const STRING *src)>
-
-If Parrot is built with ICU, composes the STRING C<src>. Attempts to
-denormalize the STRING into the ICU default, NFC.
+=item C<INTVAL encoding_index(PARROT_INTERP, const STRING *src, const STRING
+*search, UINTVAL offs)>
-If Parrot does not have ICU included, throws an exception.
+Searches for the first instance of STRING C<search> in STRING C<src>.
+returns the position where the substring is found if it is indeed found.
+Returns -1 otherwise. Operates on different types of strings, not just
+ASCII.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-compose(PARROT_INTERP, ARGIN(const STRING *src))
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_index(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search),
+ UINTVAL offs)
{
- ASSERT_ARGS(compose)
-#if PARROT_HAS_ICU
- STRING *dest;
- int src_len, dest_len;
- UErrorCode err;
- /*
- U_STABLE int32_t U_EXPORT2
- unorm_normalize(const UChar *source, int32_t sourceLength,
- UNormalizationMode mode, int32_t options,
- UChar *result, int32_t resultLength,
- UErrorCode *status);
- */
- dest_len = src_len = src->strlen;
- dest = Parrot_str_new_init(interp, NULL, src_len * sizeof (UChar),
- src->encoding, src->charset, 0);
-
- err = U_ZERO_ERROR;
- dest_len = unorm_normalize((UChar *)src->strstart, src_len,
- UNORM_DEFAULT, /* default is NFC */
- 0, /* options 0 default - no specific icu
- * version */
- (UChar *)dest->strstart, dest_len, &err);
+ ASSERT_ARGS(encoding_index)
+ String_iter start, end;
- dest->bufused = dest_len * sizeof (UChar);
+ STRING_ITER_INIT(interp, &start);
+ STRING_iter_set_position(interp, src, &start, offs);
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, dest, dest->bufused);
- dest_len = unorm_normalize((UChar *)src->strstart, src_len,
- UNORM_DEFAULT, /* default is NFC */
- 0, /* options 0 default - no specific
- * icu version */
- (UChar *)dest->strstart, dest_len, &err);
- PARROT_ASSERT(U_SUCCESS(err));
- dest->bufused = dest_len * sizeof (UChar);
- }
- dest->strlen = dest_len;
- return dest;
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
+ return Parrot_str_iter_index(interp, src, &start, &end, search);
}
/*
-=item C<static STRING* decompose(PARROT_INTERP, const STRING *src)>
+=item C<INTVAL encoding_rindex(PARROT_INTERP, const STRING *src, const STRING
+*search_string, UINTVAL offset)>
-Decompose function for unicode charset. This function is not yet implemented.
+Finds the last index of substring C<search_string> in STRING C<src>,
+starting from C<offset>. Not implemented.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-decompose(PARROT_INTERP, SHIM(const STRING *src))
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_rindex(PARROT_INTERP, SHIM(const STRING *src),
+ SHIM(const STRING *search_string), SHIM(UINTVAL offset))
{
- ASSERT_ARGS(decompose)
+ ASSERT_ARGS(encoding_rindex)
/* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
UNIMPL;
}
@@ -331,380 +195,795 @@
/*
-=item C<static STRING* upcase(PARROT_INTERP, const STRING *src)>
-
-Converts the STRING C<src> to all upper-case graphemes, for those characters
-which support upper-case versions.
+=item C<size_t encoding_hash(PARROT_INTERP, const STRING *src, size_t seed)>
-Throws an exception if ICU is not installed.
+Computes the hash of the given STRING C<src> with starting seed value C<seed>.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase(PARROT_INTERP, ARGIN(const STRING *src))
+PARROT_WARN_UNUSED_RESULT
+size_t
+encoding_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed)
{
- ASSERT_ARGS(upcase)
-#if PARROT_HAS_ICU
- UErrorCode err;
- int dest_len, src_len, needed;
- STRING *res;
-#endif
-
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->upcase(interp, src);
- }
-
-#if PARROT_HAS_ICU
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- /*
- U_CAPI int32_t U_EXPORT2
- u_strToUpper(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- const char *locale,
- UErrorCode *pErrorCode);
- */
- err = U_ZERO_ERROR;
-
- /* use all available space - see below XXX */
- /* TODO downcase, titlecase too */
- dest_len = Buffer_buflen(res) / sizeof (UChar);
- src_len = res->bufused / sizeof (UChar);
-
- /*
- * XXX troubles:
- * t/op/string_cs_45 upcase unicode:"\u01f0"
- * this creates \u004a \u030c J+NON-SPACING HACEK
- * the string needs resizing, *if* the src buffer is
- * too short. *But* with icu 3.2/3.4 the src string is
- * overwritten with partial result, despite the icu docs sayeth:
- *
- * The source string and the destination buffer
- * are allowed to overlap.
- *
- * Workaround: 'preflighting' returns needed length
- * Alternative: forget about inplace operation - create new result
- *
- * TODO downcase, titlecase
- */
- needed = u_strToUpper(NULL, 0,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
-
- if (needed > dest_len) {
- Parrot_gc_reallocate_string_storage(interp, res, needed * sizeof (UChar));
- dest_len = needed;
- }
+ ASSERT_ARGS(encoding_hash)
+ String_iter iter;
+ size_t hashval = seed;
- err = U_ZERO_ERROR;
- dest_len = u_strToUpper((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
- res->bufused = dest_len * sizeof (UChar);
+ STRING_ITER_INIT(interp, &iter);
- /* downgrade if possible */
- if (dest_len == (int)src->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
- else {
- /* string is likely still ucs2 if it was earlier
- * but strlen changed due to combining char
- */
- res->strlen = dest_len;
+ while (iter.charpos < src->strlen) {
+ const UINTVAL c = STRING_iter_get_and_advance(interp, src, &iter);
+ hashval += hashval << 5;
+ hashval += c;
}
- return res;
-
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
+ return hashval;
}
/*
-=item C<static STRING* downcase(PARROT_INTERP, const STRING *src)>
-
-Converts all graphemes to lower-case, for those graphemes which have cases.
+=item C<static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)>
-Throws an exception if ICU is not installed.
+Returns Boolean.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase(PARROT_INTERP, ARGIN(const STRING *src))
+static int
+u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
{
- ASSERT_ARGS(downcase)
-#if PARROT_HAS_ICU
- UErrorCode err;
- int dest_len, src_len;
- STRING *res;
-#endif
-
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->downcase(interp, src);
- }
-
+ ASSERT_ARGS(u_iscclass)
#if PARROT_HAS_ICU
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- /*
-U_CAPI int32_t U_EXPORT2
-u_strToLower(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- const char *locale,
- UErrorCode *pErrorCode);
+ UNUSED(interp);
+ /* XXX which one
+ return u_charDigitValue(codepoint);
+ */
+ if ((flags & enum_cclass_uppercase) && u_isupper(codepoint)) return 1;
+ if ((flags & enum_cclass_lowercase) && u_islower(codepoint)) return 1;
+ if ((flags & enum_cclass_alphabetic) && u_isalpha(codepoint)) return 1;
+ if ((flags & enum_cclass_numeric) && u_isdigit(codepoint)) return 1;
+ if ((flags & enum_cclass_hexadecimal) && u_isxdigit(codepoint)) return 1;
+ if ((flags & enum_cclass_whitespace) && u_isspace(codepoint)) return 1;
+ if ((flags & enum_cclass_printing) && u_isprint(codepoint)) return 1;
+ if ((flags & enum_cclass_graphical) && u_isgraph(codepoint)) return 1;
+ if ((flags & enum_cclass_blank) && u_isblank(codepoint)) return 1;
+ if ((flags & enum_cclass_control) && u_iscntrl(codepoint)) return 1;
+ if ((flags & enum_cclass_alphanumeric) && u_isalnum(codepoint)) return 1;
+ if ((flags & enum_cclass_word) &&
+ (u_isalnum(codepoint) || codepoint == '_')) return 1;
+
+ return 0;
+#else
+ if (codepoint < 256)
+ return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
+
+ if (flags == enum_cclass_any)
+ return 1;
+
+ /* All codepoints from u+0100 to u+02af are alphabetic, so we
+ * cheat on the WORD and ALPHABETIC properties to include these
+ * (and incorrectly exclude all others). This is a stopgap until
+ * ICU is everywhere, or we have better non-ICU unicode support. */
+ if (flags == enum_cclass_word || flags == enum_cclass_alphabetic)
+ return (codepoint < 0x2b0);
+
+ if (flags & enum_cclass_whitespace) {
+ /* from http://www.unicode.org/Public/UNIDATA/PropList.txt */
+ switch (codepoint) {
+ case 0x1680: case 0x180e: case 0x2000: case 0x2001:
+ case 0x2002: case 0x2003: case 0x2004: case 0x2005:
+ case 0x2006: case 0x2007: case 0x2008: case 0x2009:
+ case 0x200a: case 0x2028: case 0x2029: case 0x202f:
+ case 0x205f: case 0x3000:
+ return 1;
+ default:
+ break;
+ }
+ }
+
+ if (flags & enum_cclass_numeric) {
+ /* from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */
+ if (codepoint >= 0x0660 && codepoint <= 0x0669) return 1;
+ if (codepoint >= 0x06f0 && codepoint <= 0x06f9) return 1;
+ if (codepoint >= 0x07c0 && codepoint <= 0x07c9) return 1;
+ if (codepoint >= 0x0966 && codepoint <= 0x096f) return 1;
+ if (codepoint >= 0x09e6 && codepoint <= 0x09ef) return 1;
+ if (codepoint >= 0x0a66 && codepoint <= 0x0a6f) return 1;
+ if (codepoint >= 0x0ae6 && codepoint <= 0x0aef) return 1;
+ if (codepoint >= 0x0b66 && codepoint <= 0x0b6f) return 1;
+ if (codepoint >= 0x0be6 && codepoint <= 0x0bef) return 1;
+ if (codepoint >= 0x0c66 && codepoint <= 0x0c6f) return 1;
+ if (codepoint >= 0x0ce6 && codepoint <= 0x0cef) return 1;
+ if (codepoint >= 0x0d66 && codepoint <= 0x0d6f) return 1;
+ if (codepoint >= 0x0e50 && codepoint <= 0x0e59) return 1;
+ if (codepoint >= 0x0ed0 && codepoint <= 0x0ed9) return 1;
+ if (codepoint >= 0x0f20 && codepoint <= 0x0f29) return 1;
+ if (codepoint >= 0x1040 && codepoint <= 0x1049) return 1;
+ if (codepoint >= 0x17e0 && codepoint <= 0x17e9) return 1;
+ if (codepoint >= 0x1810 && codepoint <= 0x1819) return 1;
+ if (codepoint >= 0x1946 && codepoint <= 0x194f) return 1;
+ if (codepoint >= 0x19d0 && codepoint <= 0x19d9) return 1;
+ if (codepoint >= 0x1b50 && codepoint <= 0x1b59) return 1;
+ if (codepoint >= 0xff10 && codepoint <= 0xff19) return 1;
+ }
+
+ if (flags & ~(enum_cclass_whitespace | enum_cclass_numeric | enum_cclass_newline))
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+
+ return 0;
+#endif
+}
+
+
+/*
+
+=item C<UINTVAL encoding_scan(PARROT_INTERP, const STRING *src)>
+
+Returns the number of codepoints in string C<src>.
+
+=cut
+
+*/
+
+UINTVAL
+encoding_scan(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(encoding_scan)
+ String_iter iter;
+ /*
+ * this is used to initially calculate src->strlen,
+ * therefore we must scan the whole string
*/
- err = U_ZERO_ERROR;
- src_len = res->bufused / sizeof (UChar);
- dest_len = u_strToLower((UChar *)res->strstart, src_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- res->bufused = dest_len * sizeof (UChar);
+ STRING_ITER_INIT(interp, &iter);
+ while (iter.bytepos < src->bufused)
+ STRING_iter_get_and_advance(interp, src, &iter);
+ return iter.charpos;
+}
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
- dest_len = u_strToLower((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, /* locale = default */
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
+
+/*
+
+=item C<STRING * encoding_substr(PARROT_INTERP, const STRING *src, UINTVAL
+offset, UINTVAL count)>
+
+Returns the codepoints in string C<src> at position C<offset> and length
+C<count>.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+STRING *
+encoding_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(encoding_substr)
+
+ STRING * const return_string = Parrot_str_copy(interp, src);
+ String_iter iter;
+ UINTVAL start;
+
+ STRING_ITER_INIT(interp, &iter);
+
+ if (offset)
+ STRING_iter_set_position(interp, src, &iter, offset);
+
+ start = iter.bytepos;
+ return_string->strstart = (char *)return_string->strstart + start;
+
+ if (count)
+ STRING_iter_set_position(interp, src, &iter, offset + count);
+
+ return_string->bufused = iter.bytepos - start;
+ return_string->strlen = count;
+ return_string->hashval = 0;
+
+ return return_string;
+}
+
+
+/*
+
+=item C<INTVAL encoding_is_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*src, UINTVAL offset)>
+
+Returns Boolean.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
+{
+ ASSERT_ARGS(encoding_is_cclass)
+ UINTVAL codepoint;
+
+ if (offset >= src->strlen)
+ return 0;
+
+ codepoint = STRING_ord(interp, src, offset);
+
+ if (codepoint >= 256)
+ return u_iscclass(interp, codepoint, flags) != 0;
+
+ return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
+}
+
+
+/*
+
+=item C<INTVAL encoding_find_cclass(PARROT_INTERP, INTVAL flags, const STRING
+*src, UINTVAL offset, UINTVAL count)>
+
+Find a character in the given character class.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_find_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src),
+ UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(encoding_find_cclass)
+ String_iter iter;
+ UINTVAL codepoint;
+ UINTVAL end = offset + count;
+
+ STRING_ITER_INIT(interp, &iter);
+ STRING_iter_set_position(interp, src, &iter, offset);
+
+ end = src->strlen < end ? src->strlen : end;
+
+ while (iter.charpos < end) {
+ codepoint = STRING_iter_get_and_advance(interp, src, &iter);
+ if (codepoint >= 256) {
+ if (u_iscclass(interp, codepoint, flags))
+ return iter.charpos - 1;
+ }
+ else {
+ if (Parrot_iso_8859_1_typetable[codepoint] & flags)
+ return iter.charpos - 1;
+ }
}
- /* downgrade if possible */
- if (dest_len == (int)res->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
+ return end;
+}
+
+
+/*
+
+=item C<INTVAL encoding_find_not_cclass(PARROT_INTERP, INTVAL flags, const
+STRING *src, UINTVAL offset, UINTVAL count)>
+
+Returns C<INTVAL>.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+encoding_find_not_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src),
+ UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(encoding_find_not_cclass)
+ String_iter iter;
+ UINTVAL codepoint;
+ UINTVAL end = offset + count;
+ int bit;
+
+ if (offset > src->strlen) {
+ /* XXX: Throw in this case? */
+ return offset + count;
+ }
+
+ STRING_ITER_INIT(interp, &iter);
+
+ if (offset)
+ STRING_iter_set_position(interp, src, &iter, offset);
+
+ end = src->strlen < end ? src->strlen : end;
+
+ if (flags == enum_cclass_any)
+ return end;
+
+ while (iter.charpos < end) {
+ codepoint = STRING_iter_get_and_advance(interp, src, &iter);
+ if (codepoint >= 256) {
+ for (bit = enum_cclass_uppercase;
+ bit <= enum_cclass_word ; bit <<= 1) {
+ if ((bit & flags) && !u_iscclass(interp, codepoint, bit))
+ return iter.charpos - 1;
+ }
+ }
+ else {
+ if (!(Parrot_iso_8859_1_typetable[codepoint] & flags))
+ return iter.charpos - 1;
+ }
+ }
+
+ return end;
+}
+
+
+/*
+
+=item C<STRING * encoding_get_graphemes(PARROT_INTERP, const STRING *src,
+UINTVAL offset, UINTVAL count)>
+
+Retrieves the graphemes for the STRING C<src>, starting at
+C<offset> and ending at C<offset + count>. Returns codepoints for now.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+STRING *
+encoding_get_graphemes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+{
+ ASSERT_ARGS(encoding_get_graphemes)
+ return STRING_substr(interp, src, offset, count);
+}
+
+
+/*
+
+=item C<STRING* encoding_decompose(PARROT_INTERP, const STRING *src)>
+
+Decompose function. This function is not yet implemented.
+
+=cut
+
+*/
+
+PARROT_CANNOT_RETURN_NULL
+STRING*
+encoding_decompose(PARROT_INTERP, SHIM(const STRING *src))
+{
+ ASSERT_ARGS(encoding_decompose)
+ /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
+ UNIMPL;
+}
+
+
+/*
+
+=item C<INTVAL fixed8_equal(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
+
+Compares a fixed8 string with another string. If STRING C<lhs> == C<rhs>,
+returns 1. If C<lhs> != C<rhs> returns 0.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+fixed8_equal(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
+{
+ ASSERT_ARGS(fixed8_equal)
+ const UINTVAL len = STRING_length(lhs);
+
+ if (len != STRING_length(rhs))
+ return 0;
+ if (len == 0)
+ return 1;
+ if (lhs == rhs)
+ return 1;
+ if (lhs->hashval && rhs->hashval && lhs->hashval != rhs->hashval)
+ return 0;
+
+ if (STRING_max_bytes_per_codepoint(rhs) == 1) {
+ return memcmp(lhs->strstart, rhs->strstart, len) == 0;
+ }
+ else {
+ const unsigned char * const buf = (unsigned char *)lhs->strstart;
+ String_iter iter;
+
+ STRING_ITER_INIT(interp, &iter);
+
+ while (iter.charpos < len) {
+ const UINTVAL cl = buf[iter.charpos];
+ const UINTVAL cr = STRING_iter_get_and_advance(interp, rhs, &iter);
+ if (cl != cr)
+ return 0;
+ }
+
+ return 1;
+ }
+}
+
+
+/*
+
+=item C<INTVAL fixed8_compare(PARROT_INTERP, const STRING *lhs, const STRING
+*rhs)>
+
+Compares a fixed8 string with another string. If STRING C<lhs> > C<rhs>, returns
+1. If C<lhs> == C<rhs> returns 0. If STRING C<lhs> < C<rhs>, returns -1.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+fixed8_compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
+{
+ ASSERT_ARGS(fixed8_compare)
+ const UINTVAL l_len = lhs->strlen;
+ const UINTVAL r_len = rhs->strlen;
+ const UINTVAL min_len = l_len > r_len ? r_len : l_len;
+
+ if (STRING_max_bytes_per_codepoint(rhs) == 1) {
+ const int ret_val = memcmp(lhs->strstart, rhs->strstart, min_len);
+ if (ret_val)
+ return ret_val < 0 ? -1 : 1;
+ }
+ else {
+ const unsigned char * const buf = (unsigned char *)lhs->strstart;
+ String_iter iter;
+
+ STRING_ITER_INIT(interp, &iter);
+
+ while (iter.charpos < min_len) {
+ const UINTVAL cl = buf[iter.charpos];
+ const UINTVAL cr = STRING_iter_get_and_advance(interp, rhs, &iter);
+ if (cl != cr)
+ return cl < cr ? -1 : 1;
+ }
+ }
+
+ if (l_len < r_len)
+ return -1;
+ if (l_len > r_len)
+ return 1;
+
+ return 0;
+}
+
+
+/*
+
+=item C<INTVAL fixed8_index(PARROT_INTERP, const STRING *src, const STRING
+*search_string, UINTVAL offset)>
+
+Searches for the first instance of STRING C<search> in STRING C<src>.
+returns the position where the substring is found if it is indeed found.
+Returns -1 otherwise.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+fixed8_index(PARROT_INTERP, ARGIN(const STRING *src),
+ ARGIN(const STRING *search_string), UINTVAL offset)
+{
+ ASSERT_ARGS(fixed8_index)
+ INTVAL retval;
+
+ if (STRING_max_bytes_per_codepoint(search_string) != 1) {
+ return encoding_index(interp, src, search_string, offset);
+ }
+
+ PARROT_ASSERT(STRING_max_bytes_per_codepoint(src) == 1);
+ retval = Parrot_byte_index(interp, src,
+ search_string, offset);
+ return retval;
+}
+
+
+/*
+
+=item C<INTVAL fixed8_rindex(PARROT_INTERP, const STRING *src, const STRING
+*search_string, UINTVAL offset)>
+
+Searches for the last instance of STRING C<search_string> in STRING
+C<src>. Starts searching at C<offset>.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL
+fixed8_rindex(PARROT_INTERP, ARGIN(const STRING *src),
+ ARGIN(const STRING *search_string), UINTVAL offset)
+{
+ ASSERT_ARGS(fixed8_rindex)
+ INTVAL retval;
+
+ if (STRING_max_bytes_per_codepoint(search_string) != 1)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
+ "Cross-charset rindex not supported");
+
+ PARROT_ASSERT(STRING_max_bytes_per_codepoint(src) == 1);
+ retval = Parrot_byte_rindex(interp, src, search_string, offset);
+ return retval;
+}
+
+
+/*
+
+=item C<size_t fixed8_hash(PARROT_INTERP, const STRING *s, size_t hashval)>
+
+Returns the hashed value of the string, given a seed in hashval.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+size_t
+fixed8_hash(SHIM_INTERP, ARGIN(const STRING *s), size_t hashval)
+{
+ ASSERT_ARGS(fixed8_hash)
+ const unsigned char *pos = (const unsigned char *)s->strstart;
+ UINTVAL len = s->strlen;
+
+ while (len--) {
+ hashval += hashval << 5;
+ hashval += *(pos++);
+ }
+
+ return hashval;
+}
+
+
+/*
+
+=item C<UINTVAL fixed8_scan(PARROT_INTERP, const STRING *src)>
+
+Returns the number of codepoints in string C<src>. No scanning needed
+for fixed encodings.
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+UINTVAL
+fixed8_scan(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(fixed8_scan)
+ return src->bufused;
+}
+
+
+/*
+
+=item C<UINTVAL fixed8_ord(PARROT_INTERP, const STRING *src, UINTVAL offset)>
+
+codepoints are bytes, so delegate
+
+=cut
+
+*/
+
+PARROT_WARN_UNUSED_RESULT
+UINTVAL
+fixed8_ord(PARROT_INTERP, ARGIN(const STRING *src),
+ UINTVAL offset)
+{
+ ASSERT_ARGS(fixed8_ord)
+ const unsigned char * const buf = (unsigned char *)src->strstart;
- return res;
+ if (offset >= src->bufused) {
+/* Parrot_ex_throw_from_c_args(interp, NULL, 0,
+ "fixed8_ord past the end of the buffer (%i of %i)",
+ offset, src->bufused); */
+ return 0;
+ }
-#else
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
+ return buf[offset];
}
/*
-=item C<static STRING* titlecase(PARROT_INTERP, const STRING *src)>
+=item C<STRING * fixed8_substr(PARROT_INTERP, const STRING *src, UINTVAL offset,
+UINTVAL count)>
-Converts the string to title case, for those characters which support cases.
-
-Throws an exception if ICU is not installed.
+Returns the codepoints in string C<src> at position C<offset> and length
+C<count>.
=cut
*/
+PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+STRING *
+fixed8_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
- ASSERT_ARGS(titlecase)
-#if PARROT_HAS_ICU
+ ASSERT_ARGS(fixed8_substr)
+ STRING * const return_string = Parrot_str_copy(interp, src);
- UErrorCode err;
- int dest_len, src_len;
- STRING *res;
+ return_string->encoding = src->encoding;
+ return_string->strstart = (char *)return_string->strstart + offset;
+ return_string->bufused = count;
+ return_string->strlen = count;
+ return_string->hashval = 0;
- if (src->bufused == src->strlen
- && src->encoding == Parrot_utf8_encoding_ptr) {
- return Parrot_ascii_charset_ptr->titlecase(interp, src);
- }
+ return return_string;
+}
- /* to_encoding will allocate new string */
- res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- /*
-U_CAPI int32_t U_EXPORT2
-u_strToTitle(UChar *dest, int32_t destCapacity,
- const UChar *src, int32_t srcLength,
- UBreakIterator *titleIter,
- const char *locale,
- UErrorCode *pErrorCode);
- */
+/*
- err = U_ZERO_ERROR;
- src_len = res->bufused / sizeof (UChar);
- dest_len = u_strToTitle((UChar *)res->strstart, src_len,
- (UChar *)res->strstart, src_len,
- NULL, /* default titleiter */
- NULL, /* locale = default */
- &err);
- res->bufused = dest_len * sizeof (UChar);
+=item C<STRING* fixed8_compose(PARROT_INTERP, const STRING *src)>
- if (!U_SUCCESS(err)) {
- err = U_ZERO_ERROR;
- Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
- dest_len = u_strToTitle((UChar *)res->strstart, dest_len,
- (UChar *)res->strstart, src_len,
- NULL, NULL,
- &err);
- PARROT_ASSERT(U_SUCCESS(err));
- }
+Can't compose ASCII strings, so performs a string copy on it and
+returns the new string.
- /* downgrade if possible */
- if (dest_len == (int)res->strlen)
- res->encoding = Parrot_ucs2_encoding_ptr;
+=cut
- return res;
+*/
-#else
- UNUSED(src);
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
+PARROT_CANNOT_RETURN_NULL
+STRING*
+fixed8_compose(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(fixed8_compose)
+
+ return Parrot_str_copy(interp, src);
}
/*
-=item C<static STRING* upcase_first(PARROT_INTERP, const STRING *src)>
+=item C<UINTVAL fixed8_iter_get(PARROT_INTERP, const STRING *str, const
+String_iter *iter, INTVAL offset)>
-Converts the first grapheme in the STRING C<src> to uppercase, if the
-grapheme supports it. Not implemented.
+Get the character at C<iter> plus C<offset>.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-upcase_first(PARROT_INTERP, SHIM(const STRING *src))
+UINTVAL
+fixed8_iter_get(PARROT_INTERP,
+ ARGIN(const STRING *str), ARGIN(const String_iter *iter), INTVAL offset)
{
- ASSERT_ARGS(upcase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
+ ASSERT_ARGS(fixed8_iter_get)
+ return fixed8_ord(interp, str, iter->charpos + offset);
}
/*
-=item C<static STRING* downcase_first(PARROT_INTERP, const STRING *src)>
+=item C<void fixed8_iter_skip(PARROT_INTERP, const STRING *str, String_iter
+*iter, INTVAL skip)>
-Converts the first grapheme in the STRING C<src> to lower-case, if
-the grapheme supports it. Not implemented
+Moves the string iterator C<i> by C<skip> characters.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-downcase_first(PARROT_INTERP, SHIM(const STRING *src))
+void
+fixed8_iter_skip(SHIM_INTERP,
+ ARGIN(const STRING *str), ARGMOD(String_iter *iter), INTVAL skip)
{
- ASSERT_ARGS(downcase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
+ ASSERT_ARGS(fixed8_iter_skip)
+ iter->bytepos += skip;
+ iter->charpos += skip;
+ PARROT_ASSERT(iter->bytepos <= Buffer_buflen(str));
}
/*
-=item C<static STRING* titlecase_first(PARROT_INTERP, const STRING *src)>
+=item C<UINTVAL fixed8_iter_get_and_advance(PARROT_INTERP, const STRING *str,
+String_iter *iter)>
-Converts the first grapheme in STRING C<src> to title case, if the
-string supports it. Not implemented.
+Moves the string iterator C<i> to the next codepoint.
=cut
*/
-PARROT_CANNOT_RETURN_NULL
-static STRING*
-titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
+UINTVAL
+fixed8_iter_get_and_advance(PARROT_INTERP,
+ ARGIN(const STRING *str), ARGMOD(String_iter *iter))
{
- ASSERT_ARGS(titlecase_first)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
+ ASSERT_ARGS(fixed8_iter_get_and_advance)
+ const UINTVAL c = fixed8_ord(interp, str, iter->charpos++);
+ iter->bytepos++;
+ return c;
}
/*
-=item C<static INTVAL compare(PARROT_INTERP, const STRING *lhs, const STRING
-*rhs)>
+=item C<void fixed8_iter_set_and_advance(PARROT_INTERP, STRING *str, String_iter
+*iter, UINTVAL c)>
-Compares two STRINGs, C<lhs> and C<rhs>. Returns -1 if C<lhs> < C<rhs>. Returns
-0 if C<lhs> = C<rhs>. Returns 1 if C<lhs> > C<rhs>.
+With the string iterator C<i>, appends the codepoint C<c> and advances to the
+next position in the string.
=cut
*/
-static INTVAL
-compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs))
+void
+fixed8_iter_set_and_advance(PARROT_INTERP,
+ ARGMOD(STRING *str), ARGMOD(String_iter *iter), UINTVAL c)
{
- ASSERT_ARGS(compare)
- String_iter l_iter, r_iter;
- UINTVAL min_len, l_len, r_len;
-
- /* TODO make optimized equal - strings are equal length then already */
- STRING_ITER_INIT(interp, &l_iter);
- STRING_ITER_INIT(interp, &r_iter);
+ ASSERT_ARGS(fixed8_iter_set_and_advance)
+ unsigned char *buf = (unsigned char *)str->strstart;
+ buf[iter->charpos++] = c;
+ iter->bytepos++;
+}
- l_len = lhs->strlen;
- r_len = rhs->strlen;
- min_len = l_len > r_len ? r_len : l_len;
+/*
- while (l_iter.charpos < min_len) {
- const UINTVAL cl = STRING_ITER_GET_AND_ADVANCE(interp, lhs, &l_iter);
- const UINTVAL cr = STRING_ITER_GET_AND_ADVANCE(interp, rhs, &r_iter);
+=item C<void fixed8_iter_set_position(PARROT_INTERP, const STRING *str,
+String_iter *iter, UINTVAL pos)>
- if (cl != cr)
- return cl < cr ? -1 : 1;
- }
+Moves the string iterator C<i> to the position C<n> in the string.
- if (l_len < r_len)
- return -1;
+=cut
- if (l_len > r_len)
- return 1;
+*/
- return 0;
+void
+fixed8_iter_set_position(SHIM_INTERP,
+ ARGIN(const STRING *str), ARGMOD(String_iter *iter), UINTVAL pos)
+{
+ ASSERT_ARGS(fixed8_iter_set_position)
+ iter->bytepos = iter->charpos = pos;
+ PARROT_ASSERT(pos <= Buffer_buflen(str));
}
/*
-=item C<static INTVAL cs_rindex(PARROT_INTERP, const STRING *src, const STRING
-*search_string, UINTVAL offset)>
+=item C<STRING * unicode_chr(PARROT_INTERP, UINTVAL codepoint)>
-Finds the last index of substring C<search_string> in STRING C<src>,
-starting from C<offset>. Not implemented.
+Returns a one-codepoint string for the given codepoint.
=cut
*/
-static INTVAL
-cs_rindex(PARROT_INTERP, SHIM(const STRING *src),
- SHIM(const STRING *search_string), SHIM(UINTVAL offset))
+PARROT_CANNOT_RETURN_NULL
+STRING *
+unicode_chr(PARROT_INTERP, UINTVAL codepoint)
{
- ASSERT_ARGS(cs_rindex)
- /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
- UNIMPL;
+ ASSERT_ARGS(unicode_chr)
+ String_iter iter;
+ STRING * const dest = Parrot_str_new_init(interp, NULL, 4,
+ Parrot_utf8_encoding_ptr, 0);
+
+ dest->strlen = 1;
+
+ STRING_ITER_INIT(interp, &iter);
+ STRING_iter_set_and_advance(interp, dest, &iter, codepoint);
+ dest->bufused = iter.bytepos;
+
+ return dest;
}
/*
-=item C<static UINTVAL validate(PARROT_INTERP, const STRING *src)>
+=item C<UINTVAL unicode_validate(PARROT_INTERP, const STRING *src)>
Returns 1 if the STRING C<src> is a valid unicode string, returns 0 otherwise.
@@ -712,16 +991,16 @@
*/
-static UINTVAL
-validate(PARROT_INTERP, ARGIN(const STRING *src))
+UINTVAL
+unicode_validate(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(validate)
+ ASSERT_ARGS(unicode_validate)
String_iter iter;
- const INTVAL length = Parrot_str_length(interp, src);
+ const UINTVAL length = Parrot_str_length(interp, src);
STRING_ITER_INIT(interp, &iter);
while (iter.charpos < length) {
- const UINTVAL codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
+ const UINTVAL codepoint = STRING_iter_get_and_advance(interp, src, &iter);
/* Check for Unicode non-characters */
if (codepoint >= 0xfdd0
&& (codepoint <= 0xfdef || (codepoint & 0xfffe) == 0xfffe)
@@ -735,335 +1014,369 @@
/*
-=item C<static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)>
+=item C<STRING* unicode_compose(PARROT_INTERP, const STRING *src)>
-Returns Boolean.
+If Parrot is built with ICU, composes the STRING C<src>. Attempts to
+denormalize the STRING into the ICU default, NFC.
+
+If Parrot does not have ICU included, throws an exception.
=cut
*/
-static int
-u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags)
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_compose(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(u_iscclass)
+ ASSERT_ARGS(unicode_compose)
#if PARROT_HAS_ICU
- UNUSED(interp);
- /* XXX which one
- return u_charDigitValue(codepoint);
- */
- if ((flags & enum_cclass_uppercase) && u_isupper(codepoint)) return 1;
- if ((flags & enum_cclass_lowercase) && u_islower(codepoint)) return 1;
- if ((flags & enum_cclass_alphabetic) && u_isalpha(codepoint)) return 1;
- if ((flags & enum_cclass_numeric) && u_isdigit(codepoint)) return 1;
- if ((flags & enum_cclass_hexadecimal) && u_isxdigit(codepoint)) return 1;
- if ((flags & enum_cclass_whitespace) && u_isspace(codepoint)) return 1;
- if ((flags & enum_cclass_printing) && u_isprint(codepoint)) return 1;
- if ((flags & enum_cclass_graphical) && u_isgraph(codepoint)) return 1;
- if ((flags & enum_cclass_blank) && u_isblank(codepoint)) return 1;
- if ((flags & enum_cclass_control) && u_iscntrl(codepoint)) return 1;
- if ((flags & enum_cclass_alphanumeric) && u_isalnum(codepoint)) return 1;
- if ((flags & enum_cclass_word) &&
- (u_isalnum(codepoint) || codepoint == '_')) return 1;
+ STRING *dest;
+ int src_len, dest_len;
+ UErrorCode err;
+ /*
+ U_STABLE int32_t U_EXPORT2
+ unorm_normalize(const UChar *source, int32_t sourceLength,
+ UNormalizationMode mode, int32_t options,
+ UChar *result, int32_t resultLength,
+ UErrorCode *status);
+ */
+ dest_len = src_len = src->strlen;
+ dest = Parrot_str_new_init(interp, NULL, src_len * sizeof (UChar),
+ src->encoding, 0);
- return 0;
+ err = U_ZERO_ERROR;
+ dest_len = unorm_normalize((UChar *)src->strstart, src_len,
+ UNORM_DEFAULT, /* default is NFC */
+ 0, /* options 0 default - no specific icu
+ * version */
+ (UChar *)dest->strstart, dest_len, &err);
+
+ dest->bufused = dest_len * sizeof (UChar);
+
+ if (!U_SUCCESS(err)) {
+ err = U_ZERO_ERROR;
+ Parrot_gc_reallocate_string_storage(interp, dest, dest->bufused);
+ dest_len = unorm_normalize((UChar *)src->strstart, src_len,
+ UNORM_DEFAULT, /* default is NFC */
+ 0, /* options 0 default - no specific
+ * icu version */
+ (UChar *)dest->strstart, dest_len, &err);
+ PARROT_ASSERT(U_SUCCESS(err));
+ dest->bufused = dest_len * sizeof (UChar);
+ }
+ dest->strlen = dest_len;
+ return dest;
#else
- if (codepoint < 256)
- return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
+ UNUSED(src);
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+#endif
+}
- if (flags == enum_cclass_any)
- return 1;
- /* All codepoints from u+0100 to u+02af are alphabetic, so we
- * cheat on the WORD and ALPHABETIC properties to include these
- * (and incorrectly exclude all others). This is a stopgap until
- * ICU is everywhere, or we have better non-ICU unicode support. */
- if (flags == enum_cclass_word || flags == enum_cclass_alphabetic)
- return (codepoint < 0x2b0);
+/*
- if (flags & enum_cclass_whitespace) {
- /* from http://www.unicode.org/Public/UNIDATA/PropList.txt */
- switch (codepoint) {
- case 0x1680: case 0x180e: case 0x2000: case 0x2001:
- case 0x2002: case 0x2003: case 0x2004: case 0x2005:
- case 0x2006: case 0x2007: case 0x2008: case 0x2009:
- case 0x200a: case 0x2028: case 0x2029: case 0x202f:
- case 0x205f: case 0x3000:
- return 1;
- default:
- break;
- }
- }
+=item C<STRING* unicode_upcase(PARROT_INTERP, const STRING *src)>
- if (flags & enum_cclass_numeric) {
- /* from http://www.unicode.org/Public/UNIDATA/UnicodeData.txt */
- if (codepoint >= 0x0660 && codepoint <= 0x0669) return 1;
- if (codepoint >= 0x06f0 && codepoint <= 0x06f9) return 1;
- if (codepoint >= 0x07c0 && codepoint <= 0x07c9) return 1;
- if (codepoint >= 0x0966 && codepoint <= 0x096f) return 1;
- if (codepoint >= 0x09e6 && codepoint <= 0x09ef) return 1;
- if (codepoint >= 0x0a66 && codepoint <= 0x0a6f) return 1;
- if (codepoint >= 0x0ae6 && codepoint <= 0x0aef) return 1;
- if (codepoint >= 0x0b66 && codepoint <= 0x0b6f) return 1;
- if (codepoint >= 0x0be6 && codepoint <= 0x0bef) return 1;
- if (codepoint >= 0x0c66 && codepoint <= 0x0c6f) return 1;
- if (codepoint >= 0x0ce6 && codepoint <= 0x0cef) return 1;
- if (codepoint >= 0x0d66 && codepoint <= 0x0d6f) return 1;
- if (codepoint >= 0x0e50 && codepoint <= 0x0e59) return 1;
- if (codepoint >= 0x0ed0 && codepoint <= 0x0ed9) return 1;
- if (codepoint >= 0x0f20 && codepoint <= 0x0f29) return 1;
- if (codepoint >= 0x1040 && codepoint <= 0x1049) return 1;
- if (codepoint >= 0x17e0 && codepoint <= 0x17e9) return 1;
- if (codepoint >= 0x1810 && codepoint <= 0x1819) return 1;
- if (codepoint >= 0x1946 && codepoint <= 0x194f) return 1;
- if (codepoint >= 0x19d0 && codepoint <= 0x19d9) return 1;
- if (codepoint >= 0x1b50 && codepoint <= 0x1b59) return 1;
- if (codepoint >= 0xff10 && codepoint <= 0xff19) return 1;
- }
+Converts the STRING C<src> to all upper-case graphemes, for those characters
+which support upper-case versions.
- if (flags & ~(enum_cclass_whitespace | enum_cclass_numeric | enum_cclass_newline))
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
+Throws an exception if ICU is not installed.
- return 0;
-#endif
-}
+=cut
+*/
-/*
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(unicode_upcase)
+#if PARROT_HAS_ICU
+ UErrorCode err;
+ int dest_len, src_len, needed;
+ STRING *res;
+#endif
-=item C<static INTVAL is_cclass(PARROT_INTERP, INTVAL flags, const STRING *src,
-UINTVAL offset)>
+ if (src->bufused == src->strlen
+ && src->encoding == Parrot_utf8_encoding_ptr) {
+ return Parrot_ascii_encoding_ptr->upcase(interp, src);
+ }
-Returns Boolean.
+#if PARROT_HAS_ICU
+ /* to_encoding will allocate new string */
+ res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
+ /*
+ U_CAPI int32_t U_EXPORT2
+ u_strToUpper(UChar *dest, int32_t destCapacity,
+ const UChar *src, int32_t srcLength,
+ const char *locale,
+ UErrorCode *pErrorCode);
+ */
+ err = U_ZERO_ERROR;
-=cut
+ /* use all available space - see below XXX */
+ /* TODO downcase, titlecase too */
+ dest_len = Buffer_buflen(res) / sizeof (UChar);
+ src_len = res->bufused / sizeof (UChar);
-*/
+ /*
+ * XXX troubles:
+ * t/op/string_cs_45 upcase unicode:"\u01f0"
+ * this creates \u004a \u030c J+NON-SPACING HACEK
+ * the string needs resizing, *if* the src buffer is
+ * too short. *But* with icu 3.2/3.4 the src string is
+ * overwritten with partial result, despite the icu docs sayeth:
+ *
+ * The source string and the destination buffer
+ * are allowed to overlap.
+ *
+ * Workaround: 'preflighting' returns needed length
+ * Alternative: forget about inplace operation - create new result
+ *
+ * TODO downcase, titlecase
+ */
+ needed = u_strToUpper(NULL, 0,
+ (UChar *)res->strstart, src_len,
+ NULL, /* locale = default */
+ &err);
-static INTVAL
-is_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(is_cclass)
- UINTVAL codepoint;
+ if (needed > dest_len) {
+ Parrot_gc_reallocate_string_storage(interp, res, needed * sizeof (UChar));
+ dest_len = needed;
+ }
- if (offset >= src->strlen)
- return 0;
+ err = U_ZERO_ERROR;
+ dest_len = u_strToUpper((UChar *)res->strstart, dest_len,
+ (UChar *)res->strstart, src_len,
+ NULL, /* locale = default */
+ &err);
+ PARROT_ASSERT(U_SUCCESS(err));
+ res->bufused = dest_len * sizeof (UChar);
- codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
+ /* downgrade if possible */
+ if (dest_len == (int)src->strlen)
+ res->encoding = Parrot_ucs2_encoding_ptr;
+ else {
+ /* string is likely still ucs2 if it was earlier
+ * but strlen changed due to combining char
+ */
+ res->strlen = dest_len;
+ }
- if (codepoint >= 256)
- return u_iscclass(interp, codepoint, flags) != 0;
+ return res;
- return (Parrot_iso_8859_1_typetable[codepoint] & flags) ? 1 : 0;
+#else
+ UNUSED(src);
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+#endif
}
/*
-=item C<static INTVAL find_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
+=item C<STRING* unicode_downcase(PARROT_INTERP, const STRING *src)>
-Find a character in the given character class.
+Converts all graphemes to lower-case, for those graphemes which have cases.
+
+Throws an exception if ICU is not installed.
=cut
*/
-static INTVAL
-find_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_downcase(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(find_cclass)
- String_iter iter;
- UINTVAL codepoint;
- UINTVAL end = offset + count;
+ ASSERT_ARGS(unicode_downcase)
+#if PARROT_HAS_ICU
+ UErrorCode err;
+ int dest_len, src_len;
+ STRING *res;
+#endif
- STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_POSITION(interp, src, &iter, offset);
+ if (src->bufused == src->strlen
+ && src->encoding == Parrot_utf8_encoding_ptr) {
+ return Parrot_ascii_encoding_ptr->downcase(interp, src);
+ }
- end = src->strlen < end ? src->strlen : end;
+#if PARROT_HAS_ICU
+ /* to_encoding will allocate new string */
+ res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
+ /*
+U_CAPI int32_t U_EXPORT2
+u_strToLower(UChar *dest, int32_t destCapacity,
+ const UChar *src, int32_t srcLength,
+ const char *locale,
+ UErrorCode *pErrorCode);
+ */
+ err = U_ZERO_ERROR;
+ src_len = res->bufused / sizeof (UChar);
+ dest_len = u_strToLower((UChar *)res->strstart, src_len,
+ (UChar *)res->strstart, src_len,
+ NULL, /* locale = default */
+ &err);
+ res->bufused = dest_len * sizeof (UChar);
- while (iter.charpos < end) {
- codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (codepoint >= 256) {
- if (u_iscclass(interp, codepoint, flags))
- return iter.charpos - 1;
- }
- else {
- if (Parrot_iso_8859_1_typetable[codepoint] & flags)
- return iter.charpos - 1;
- }
+ if (!U_SUCCESS(err)) {
+ err = U_ZERO_ERROR;
+ Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
+ dest_len = u_strToLower((UChar *)res->strstart, dest_len,
+ (UChar *)res->strstart, src_len,
+ NULL, /* locale = default */
+ &err);
+ PARROT_ASSERT(U_SUCCESS(err));
}
- return end;
+ /* downgrade if possible */
+ if (dest_len == (int)res->strlen)
+ res->encoding = Parrot_ucs2_encoding_ptr;
+
+ return res;
+
+#else
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+#endif
}
/*
-=item C<static INTVAL find_not_cclass(PARROT_INTERP, INTVAL flags, const STRING
-*src, UINTVAL offset, UINTVAL count)>
+=item C<STRING* unicode_titlecase(PARROT_INTERP, const STRING *src)>
-Returns C<INTVAL>.
+Converts the string to title case, for those characters which support cases.
+
+Throws an exception if ICU is not installed.
=cut
*/
-static INTVAL
-find_not_cclass(PARROT_INTERP, INTVAL flags, ARGIN(const STRING *src),
- UINTVAL offset, UINTVAL count)
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(find_not_cclass)
- String_iter iter;
- UINTVAL codepoint;
- UINTVAL end = offset + count;
- int bit;
+ ASSERT_ARGS(unicode_titlecase)
+#if PARROT_HAS_ICU
- if (offset > src->strlen) {
- /* XXX: Throw in this case? */
- return offset + count;
- }
+ UErrorCode err;
+ int dest_len, src_len;
+ STRING *res;
- STRING_ITER_INIT(interp, &iter);
+ if (src->bufused == src->strlen
+ && src->encoding == Parrot_utf8_encoding_ptr) {
+ return Parrot_ascii_encoding_ptr->titlecase(interp, src);
+ }
- if (offset)
- STRING_ITER_SET_POSITION(interp, src, &iter, offset);
+ /* to_encoding will allocate new string */
+ res = Parrot_utf16_encoding_ptr->to_encoding(interp, src);
- end = src->strlen < end ? src->strlen : end;
+ /*
+U_CAPI int32_t U_EXPORT2
+u_strToTitle(UChar *dest, int32_t destCapacity,
+ const UChar *src, int32_t srcLength,
+ UBreakIterator *titleIter,
+ const char *locale,
+ UErrorCode *pErrorCode);
+ */
- if (flags == enum_cclass_any)
- return end;
+ err = U_ZERO_ERROR;
+ src_len = res->bufused / sizeof (UChar);
+ dest_len = u_strToTitle((UChar *)res->strstart, src_len,
+ (UChar *)res->strstart, src_len,
+ NULL, /* default titleiter */
+ NULL, /* locale = default */
+ &err);
+ res->bufused = dest_len * sizeof (UChar);
- while (iter.charpos < end) {
- codepoint = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- if (codepoint >= 256) {
- for (bit = enum_cclass_uppercase;
- bit <= enum_cclass_word ; bit <<= 1) {
- if ((bit & flags) && !u_iscclass(interp, codepoint, bit))
- return iter.charpos - 1;
- }
- }
- else {
- if (!(Parrot_iso_8859_1_typetable[codepoint] & flags))
- return iter.charpos - 1;
- }
+ if (!U_SUCCESS(err)) {
+ err = U_ZERO_ERROR;
+ Parrot_gc_reallocate_string_storage(interp, res, res->bufused);
+ dest_len = u_strToTitle((UChar *)res->strstart, dest_len,
+ (UChar *)res->strstart, src_len,
+ NULL, NULL,
+ &err);
+ PARROT_ASSERT(U_SUCCESS(err));
}
- return end;
+ /* downgrade if possible */
+ if (dest_len == (int)res->strlen)
+ res->encoding = Parrot_ucs2_encoding_ptr;
+
+ return res;
+
+#else
+ UNUSED(src);
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+#endif
}
/*
-=item C<static STRING * string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)>
+=item C<STRING* unicode_upcase_first(PARROT_INTERP, const STRING *src)>
-Returns a one-codepoint string for the given codepoint.
+Converts the first grapheme in the STRING C<src> to uppercase, if the
+grapheme supports it. Not implemented.
=cut
*/
PARROT_CANNOT_RETURN_NULL
-static STRING *
-string_from_codepoint(PARROT_INTERP, UINTVAL codepoint)
+STRING*
+unicode_upcase_first(PARROT_INTERP, SHIM(const STRING *src))
{
- ASSERT_ARGS(string_from_codepoint)
- String_iter iter;
- STRING * const dest = string_make(interp, "", 1, "unicode", 0);
-
- dest->strlen = 1;
-
- STRING_ITER_INIT(interp, &iter);
- STRING_ITER_SET_AND_ADVANCE(interp, dest, &iter, codepoint);
- dest->bufused = iter.bytepos;
-
- return dest;
+ ASSERT_ARGS(unicode_upcase_first)
+ /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
+ UNIMPL;
}
/*
-=item C<static size_t compute_hash(PARROT_INTERP, const STRING *src, size_t
-seed)>
+=item C<STRING* unicode_downcase_first(PARROT_INTERP, const STRING *src)>
-Computes the hash of the given STRING C<src> with starting seed value C<seed>.
+Converts the first grapheme in the STRING C<src> to lower-case, if
+the grapheme supports it. Not implemented
=cut
*/
-static size_t
-compute_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed)
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_downcase_first(PARROT_INTERP, SHIM(const STRING *src))
{
- ASSERT_ARGS(compute_hash)
- String_iter iter;
- size_t hashval = seed;
-
- STRING_ITER_INIT(interp, &iter);
-
- while (iter.charpos < src->strlen) {
- const UINTVAL c = STRING_ITER_GET_AND_ADVANCE(interp, src, &iter);
- hashval += hashval << 5;
- hashval += c;
- }
-
- return hashval;
+ ASSERT_ARGS(unicode_downcase_first)
+ /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
+ UNIMPL;
}
/*
-=item C<void Parrot_charset_unicode_init(PARROT_INTERP)>
+=item C<STRING* unicode_titlecase_first(PARROT_INTERP, const STRING *src)>
-Initializes the Unicode charset by installing all the necessary function
-pointers.
+Converts the first grapheme in STRING C<src> to title case, if the
+string supports it. Not implemented.
=cut
*/
-void
-Parrot_charset_unicode_init(PARROT_INTERP)
+PARROT_CANNOT_RETURN_NULL
+STRING*
+unicode_titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
{
- ASSERT_ARGS(Parrot_charset_unicode_init)
- CHARSET * const return_set = Parrot_new_charset(interp);
- static const CHARSET base_set = {
- "unicode",
- get_graphemes,
- to_charset,
- compose,
- decompose,
- upcase,
- downcase,
- titlecase,
- upcase_first,
- downcase_first,
- titlecase_first,
- compare,
- mixed_cs_index,
- cs_rindex,
- validate,
- is_cclass,
- find_cclass,
- find_not_cclass,
- string_from_codepoint,
- compute_hash,
- NULL
- };
-
- STRUCT_COPY_FROM_STRUCT(return_set, base_set);
-
- /*
- * for now use utf8
- * TODO replace it with a fixed uint_16 or uint_32 encoding
- * XXX if this is changed, modify string_make so it
- * still takes "utf8" when fed "unicode" as charset!
- */
- return_set->preferred_encoding = Parrot_utf8_encoding_ptr;
- Parrot_register_charset(interp, "unicode", return_set);
-
- return;
+ ASSERT_ARGS(unicode_titlecase_first)
+ /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */
+ UNIMPL;
}
@@ -1073,3 +1386,4 @@
* End:
* vim: expandtab shiftwidth=4:
*/
+
Added: branches/gc_massacre/src/string/encoding/shared.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/gc_massacre/src/string/encoding/shared.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -0,0 +1,369 @@
+/* fixed_8.h
+ * Copyright (C) 2004-2007, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * This is the header for the 8-bit fixed-width encoding
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+#ifndef PARROT_ENCODING_SHARED_H_GUARD
+#define PARROT_ENCODING_SHARED_H_GUARD
+
+/* HEADERIZER BEGIN: src/string/encoding/shared.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_compare(PARROT_INTERP,
+ ARGIN(const STRING *lhs),
+ ARGIN(const STRING *rhs))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* encoding_decompose(PARROT_INTERP, SHIM(const STRING *src))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_equal(PARROT_INTERP,
+ ARGIN(const STRING *lhs),
+ ARGIN(const STRING *rhs))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_find_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_find_not_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+STRING * encoding_get_graphemes(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+size_t encoding_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_index(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ ARGIN(const STRING *search),
+ UINTVAL offs)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_is_cclass(PARROT_INTERP,
+ INTVAL flags,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL encoding_rindex(PARROT_INTERP,
+ SHIM(const STRING *src),
+ SHIM(const STRING *search_string),
+ NULLOK(UINTVAL offset))
+ __attribute__nonnull__(1);
+
+UINTVAL encoding_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING * encoding_substr(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL fixed8_compare(PARROT_INTERP,
+ ARGIN(const STRING *lhs),
+ ARGIN(const STRING *rhs))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* fixed8_compose(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL fixed8_equal(PARROT_INTERP,
+ ARGIN(const STRING *lhs),
+ ARGIN(const STRING *rhs))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+size_t fixed8_hash(SHIM_INTERP, ARGIN(const STRING *s), size_t hashval)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL fixed8_index(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ ARGIN(const STRING *search_string),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+UINTVAL fixed8_iter_get(PARROT_INTERP,
+ ARGIN(const STRING *str),
+ ARGIN(const String_iter *iter),
+ INTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+UINTVAL fixed8_iter_get_and_advance(PARROT_INTERP,
+ ARGIN(const STRING *str),
+ ARGMOD(String_iter *iter))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*iter);
+
+void fixed8_iter_set_and_advance(PARROT_INTERP,
+ ARGMOD(STRING *str),
+ ARGMOD(String_iter *iter),
+ UINTVAL c)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*str)
+ FUNC_MODIFIES(*iter);
+
+void fixed8_iter_set_position(SHIM_INTERP,
+ ARGIN(const STRING *str),
+ ARGMOD(String_iter *iter),
+ UINTVAL pos)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*iter);
+
+void fixed8_iter_skip(SHIM_INTERP,
+ ARGIN(const STRING *str),
+ ARGMOD(String_iter *iter),
+ INTVAL skip)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*iter);
+
+PARROT_WARN_UNUSED_RESULT
+UINTVAL fixed8_ord(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+INTVAL fixed8_rindex(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ ARGIN(const STRING *search_string),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+UINTVAL fixed8_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+STRING * fixed8_substr(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING * unicode_chr(PARROT_INTERP, UINTVAL codepoint)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_compose(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_downcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_downcase_first(PARROT_INTERP, SHIM(const STRING *src))
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_titlecase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_titlecase_first(PARROT_INTERP, SHIM(const STRING *src))
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_upcase(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+STRING* unicode_upcase_first(PARROT_INTERP, SHIM(const STRING *src))
+ __attribute__nonnull__(1);
+
+UINTVAL unicode_validate(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_encoding_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lhs) \
+ , PARROT_ASSERT_ARG(rhs))
+#define ASSERT_ARGS_encoding_decompose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_encoding_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lhs) \
+ , PARROT_ASSERT_ARG(rhs))
+#define ASSERT_ARGS_encoding_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_find_not_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_get_graphemes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src) \
+ , PARROT_ASSERT_ARG(search))
+#define ASSERT_ARGS_encoding_is_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_rindex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_encoding_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_encoding_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_fixed8_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lhs) \
+ , PARROT_ASSERT_ARG(rhs))
+#define ASSERT_ARGS_fixed8_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_fixed8_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lhs) \
+ , PARROT_ASSERT_ARG(rhs))
+#define ASSERT_ARGS_fixed8_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_fixed8_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src) \
+ , PARROT_ASSERT_ARG(search_string))
+#define ASSERT_ARGS_fixed8_iter_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(str) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_fixed8_iter_get_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(str) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_fixed8_iter_set_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(str) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_fixed8_iter_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(str) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_fixed8_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(str) \
+ , PARROT_ASSERT_ARG(iter))
+#define ASSERT_ARGS_fixed8_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_fixed8_rindex __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src) \
+ , PARROT_ASSERT_ARG(search_string))
+#define ASSERT_ARGS_fixed8_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_fixed8_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_unicode_chr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_unicode_compose __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_unicode_downcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_unicode_downcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_unicode_titlecase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_unicode_titlecase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_unicode_upcase __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_unicode_upcase_first __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_unicode_validate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: src/string/encoding/shared.c */
+
+#endif /* PARROT_ENCODING_SHARED_H_GUARD */
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Copied and modified: branches/gc_massacre/src/string/encoding/tables.c (from r48799, branches/gc_massacre/src/string/charset/tables.c)
==============================================================================
Copied and modified: branches/gc_massacre/src/string/encoding/tables.h (from r48799, branches/gc_massacre/src/string/charset/tables.h)
==============================================================================
Modified: branches/gc_massacre/src/string/encoding/ucs2.c
==============================================================================
--- branches/gc_massacre/src/string/encoding/ucs2.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/ucs2.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,6 +20,7 @@
#include "parrot/parrot.h"
#include "../unicode.h"
+#include "shared.h"
#if !PARROT_HAS_ICU
PARROT_DOES_NOT_RETURN
@@ -36,66 +37,6 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL find_cclass(PARROT_INTERP,
- ARGIN(const STRING *s),
- ARGIN(const INTVAL *typetable),
- INTVAL flags,
- UINTVAL pos,
- UINTVAL end)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static UINTVAL get_byte(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset))
- __attribute__nonnull__(1);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_bytes(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset),
- SHIM(UINTVAL count))
- __attribute__nonnull__(1);
-
-static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static void set_byte(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset),
- SHIM(UINTVAL byte))
- __attribute__nonnull__(1);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static size_t ucs2_hash(PARROT_INTERP,
ARGIN(const STRING *s),
size_t hashval)
@@ -146,30 +87,32 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*i);
-#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s) \
- , PARROT_ASSERT_ARG(typetable))
-#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
+static UINTVAL ucs2_ord(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL ucs2_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * ucs2_substr(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * ucs2_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_ucs2_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
@@ -193,6 +136,18 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_ucs2_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs2_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs2_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs2_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -207,7 +162,7 @@
/*
-=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
+=item C<static STRING * ucs2_to_encoding(PARROT_INTERP, const STRING *src)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -220,9 +175,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ucs2_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(to_encoding)
+ ASSERT_ARGS(ucs2_to_encoding)
STRING * const result =
Parrot_utf16_encoding_ptr->to_encoding(interp, src);
@@ -236,98 +191,57 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
+=item C<static UINTVAL ucs2_scan(PARROT_INTERP, const STRING *src)>
-Returns the codepoint in string C<src> at position C<offset>.
+Returns the number of codepoints in string C<src>.
=cut
*/
+PARROT_WARN_UNUSED_RESULT
static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+ucs2_scan(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(get_codepoint)
+ ASSERT_ARGS(ucs2_scan)
#if PARROT_HAS_ICU
- const UChar * const s = (const UChar*) src->strstart;
UNUSED(interp);
- return s[offset];
+ return src->bufused / sizeof (UChar);
#else
- UNUSED(offset);
UNUSED(src);
no_ICU_lib(interp);
#endif
}
-
-/*
-
-=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
-*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
-
-Stub, the charset level handles this for unicode strings.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
-INTVAL flags, UINTVAL pos, UINTVAL end)
-{
- UNUSED(s);
- UNUSED(typetable);
- UNUSED(flags);
- UNUSED(pos);
- UNUSED(end);
-
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No find_cclass support in unicode encoding plugins");
-}
-
/*
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static UINTVAL ucs2_ord(PARROT_INTERP, const STRING *src, UINTVAL
offset)>
-Returns the byte in string C<src> at position C<offset>.
+Returns the codepoint in string C<src> at position C<offset>.
=cut
*/
static UINTVAL
-get_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset))
-{
- ASSERT_ARGS(get_byte)
- UNIMPL;
-}
-
-/*
-
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
-UINTVAL byte)>
-
-Sets, in string C<src> at position C<offset>, the byte C<byte>.
-
-=cut
-
-*/
-
-static void
-set_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
- SHIM(UINTVAL byte))
+ucs2_ord(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
{
- ASSERT_ARGS(set_byte)
- UNIMPL;
+ ASSERT_ARGS(ucs2_ord)
+#if PARROT_HAS_ICU
+ const UChar * const s = (const UChar*) src->strstart;
+ UNUSED(interp);
+ return s[offset];
+#else
+ UNUSED(offset);
+ UNUSED(src);
+ no_ICU_lib(interp);
+#endif
}
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static STRING * ucs2_substr(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
@@ -340,98 +254,27 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+ucs2_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
- ASSERT_ARGS(get_codepoints)
+ ASSERT_ARGS(ucs2_substr)
STRING * const return_string = Parrot_str_copy(interp, src);
#if PARROT_HAS_ICU
return_string->strstart = (char*)src->strstart + offset * sizeof (UChar);
- return_string->bufused = count * sizeof (UChar);
-#else
- {
- String_iter iter;
- UINTVAL start;
-
- STRING_ITER_INIT(interp, &iter);
- ucs2_iter_set_position(interp, src, &iter, offset);
- start = iter.bytepos;
- return_string->strstart = (char *)return_string->strstart + start;
- ucs2_iter_set_position(interp, src, &iter, offset + count);
- return_string->bufused = iter.bytepos - start;
- }
-#endif
- return_string->strlen = count;
- return_string->hashval = 0;
+ return_string->bufused = count * sizeof (UChar);
+ return_string->strlen = count;
+ return_string->hashval = 0;
return return_string;
-}
-
-/*
-
-=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the bytes in string C<src> at position C<offset> and length C<count>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_bytes(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
- SHIM(UINTVAL count))
-{
- ASSERT_ARGS(get_bytes)
- UNIMPL;
-}
-
-
-/*
-
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
-
-Returns the number of codepoints in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(codepoints)
-#if PARROT_HAS_ICU
- UNUSED(interp);
- return src->bufused / sizeof (UChar);
#else
UNUSED(src);
+ UNUSED(offset);
+ UNUSED(count);
no_ICU_lib(interp);
#endif
}
/*
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
-
-Returns the number of bytes in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(bytes)
- return src->bufused;
-}
-
-/*
-
=item C<static UINTVAL ucs2_iter_get(PARROT_INTERP, const STRING *str, const
String_iter *i, INTVAL offset)>
@@ -446,7 +289,7 @@
ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset)
{
ASSERT_ARGS(ucs2_iter_get)
- return get_codepoint(interp, str, i->charpos + offset);
+ return ucs2_ord(interp, str, i->charpos + offset);
}
/*
@@ -607,46 +450,50 @@
#endif
}
-/*
-
-=item C<void Parrot_encoding_ucs2_init(PARROT_INTERP)>
+static STR_VTABLE Parrot_ucs2_encoding = {
+ 0,
+ "ucs2",
+ NULL,
+ 2, /* Max bytes per codepoint */
+
+ ucs2_to_encoding,
+ unicode_chr,
+
+ encoding_equal,
+ encoding_compare,
+ encoding_index,
+ encoding_rindex,
+ encoding_hash,
+ unicode_validate,
+
+ ucs2_scan,
+ ucs2_ord,
+ ucs2_substr,
+
+ encoding_is_cclass,
+ encoding_find_cclass,
+ encoding_find_not_cclass,
+
+ encoding_get_graphemes,
+ unicode_compose,
+ encoding_decompose,
+
+ unicode_upcase,
+ unicode_downcase,
+ unicode_titlecase,
+ unicode_upcase_first,
+ unicode_downcase_first,
+ unicode_titlecase_first,
+
+ ucs2_iter_get,
+ ucs2_iter_skip,
+ ucs2_iter_get_and_advance,
+ ucs2_iter_set_and_advance,
+ ucs2_iter_set_position
+};
-Initializes the UCS-2 encoding.
+STR_VTABLE *Parrot_ucs2_encoding_ptr = &Parrot_ucs2_encoding;
-=cut
-
-*/
-
-void
-Parrot_encoding_ucs2_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_encoding_ucs2_init)
- ENCODING * const return_encoding = Parrot_new_encoding(interp);
-
- static const ENCODING base_encoding = {
- "ucs2",
- 2, /* Max bytes per codepoint 0 .. 0x10ffff */
- to_encoding,
- get_codepoint,
- get_byte,
- set_byte,
- get_codepoints,
- get_bytes,
- codepoints,
- bytes,
- find_cclass,
- ucs2_hash,
- ucs2_iter_get,
- ucs2_iter_skip,
- ucs2_iter_get_and_advance,
- ucs2_iter_set_and_advance,
- ucs2_iter_set_position
- };
- STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
- Parrot_register_encoding(interp, "ucs2", return_encoding);
-
- return;
-}
/*
Modified: branches/gc_massacre/src/string/encoding/ucs2.h
==============================================================================
--- branches/gc_massacre/src/string/encoding/ucs2.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/ucs2.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,11 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/ucs2.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_encoding_ucs2_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_encoding_ucs2_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/string/encoding/ucs2.c */
Modified: branches/gc_massacre/src/string/encoding/ucs4.c
==============================================================================
--- branches/gc_massacre/src/string/encoding/ucs4.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/ucs4.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,6 +20,7 @@
#include "parrot/parrot.h"
#include "../unicode.h"
+#include "shared.h"
#if !PARROT_HAS_ICU
PARROT_DOES_NOT_RETURN
@@ -36,66 +37,6 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL find_cclass(PARROT_INTERP,
- ARGIN(const STRING *s),
- ARGIN(const INTVAL *typetable),
- INTVAL flags,
- UINTVAL pos,
- UINTVAL end)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static UINTVAL get_byte(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset))
- __attribute__nonnull__(1);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_bytes(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset),
- SHIM(UINTVAL count))
- __attribute__nonnull__(1);
-
-static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static void set_byte(PARROT_INTERP,
- SHIM(const STRING *src),
- SHIM(UINTVAL offset),
- SHIM(UINTVAL byte))
- __attribute__nonnull__(1);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static size_t ucs4_hash(PARROT_INTERP,
ARGIN(const STRING *s),
size_t hashval)
@@ -146,30 +87,32 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*i);
-#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s) \
- , PARROT_ASSERT_ARG(typetable))
-#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
+static UINTVAL ucs4_ord(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL ucs4_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * ucs4_substr(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * ucs4_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_ucs4_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
@@ -193,6 +136,18 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_ucs4_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs4_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs4_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_ucs4_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -202,9 +157,10 @@
# include <unicode/ustring.h>
#endif
+
/*
-=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
+=item C<static STRING * ucs4_to_encoding(PARROT_INTERP, const STRING *src)>
Converts the string C<src> to this particular encoding.
@@ -215,9 +171,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ucs4_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(to_encoding)
+ ASSERT_ARGS(ucs4_to_encoding)
#if PARROT_HAS_ICU
if (src->encoding == Parrot_ucs4_encoding_ptr) {
return Parrot_str_clone(interp, src);
@@ -225,11 +181,12 @@
else {
UINTVAL len = Parrot_str_length(interp, src);
STRING *res = Parrot_str_new_init(interp, NULL, len * sizeof (UChar32),
- Parrot_ucs4_encoding_ptr, Parrot_unicode_charset_ptr, 0);
+ Parrot_ucs4_encoding_ptr, 0);
UChar32 *buf = (UChar32 *) res->strstart;
UINTVAL offs;
+ /* TODO: use an iterator */
for (offs = 0; offs < len; offs++){
- buf[offs] = src->encoding->get_codepoint(interp, src, offs);
+ buf[offs] = STRING_ord(interp, src, offs);
};
res->strlen = len;
res->bufused = len * sizeof (UChar32);
@@ -243,27 +200,26 @@
}
+
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
+=item C<static UINTVAL ucs4_scan(PARROT_INTERP, const STRING *src)>
-Returns the codepoint in string C<src> at position C<offset>.
+Returns the number of codepoints in string C<src>.
=cut
*/
+PARROT_WARN_UNUSED_RESULT
static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+ucs4_scan(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(get_codepoint)
+ ASSERT_ARGS(ucs4_scan)
#if PARROT_HAS_ICU
- const UChar32 * const s = (const UChar32*) src->strstart;
UNUSED(interp);
- return s[offset];
+ return src->bufused / sizeof (UChar32);
#else
- UNUSED(offset);
UNUSED(src);
no_ICU_lib(interp);
#endif
@@ -272,77 +228,34 @@
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
-*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
-
-Stub, the charset level handles this for unicode strings.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
-INTVAL flags, UINTVAL pos, UINTVAL end)
-{
- ASSERT_ARGS(find_cclass)
-
- UNUSED(s);
- UNUSED(typetable);
- UNUSED(flags);
- UNUSED(pos);
- UNUSED(end);
-
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No find_cclass support in unicode encoding plugins");
-}
-
-/*
-
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static UINTVAL ucs4_ord(PARROT_INTERP, const STRING *src, UINTVAL
offset)>
-Returns the byte in string C<src> at position C<offset>.
+Returns the codepoint in string C<src> at position C<offset>.
=cut
*/
static UINTVAL
-get_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset))
+ucs4_ord(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
{
- ASSERT_ARGS(get_byte)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No get_byte for UCS-4");
+ ASSERT_ARGS(ucs4_ord)
+#if PARROT_HAS_ICU
+ const UChar32 * const s = (const UChar32*) src->strstart;
+ UNUSED(interp);
+ return s[offset];
+#else
+ UNUSED(offset);
+ UNUSED(src);
+ no_ICU_lib(interp);
+#endif
}
-/*
-
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
-UINTVAL byte)>
-
-Sets, in string C<src> at position C<offset>, the byte C<byte>.
-
-=cut
-
-*/
-
-static void
-set_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
- SHIM(UINTVAL byte))
-{
- ASSERT_ARGS(set_byte)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No set_byte for UCS-4");
-}
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static STRING * ucs4_substr(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the C<count> codepoints stored at position C<offset> in string
@@ -355,12 +268,12 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+ucs4_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
- ASSERT_ARGS(get_codepoints)
+ ASSERT_ARGS(ucs4_substr)
#if PARROT_HAS_ICU
return Parrot_str_new_init(interp, (char*)src->strstart + offset * sizeof (UChar32),
- count * sizeof (UChar32), src->encoding, src->charset, 0);
+ count * sizeof (UChar32), src->encoding, 0);
#else
UNUSED(src);
UNUSED(offset);
@@ -369,71 +282,6 @@
#endif
}
-/*
-
-=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the bytes in string C<src> at position C<offset> and length C<count>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_bytes(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset),
- SHIM(UINTVAL count))
-{
- ASSERT_ARGS(get_bytes)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No get_bytes for UCS-4");
-}
-
-
-/*
-
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
-
-Returns the number of codepoints in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(codepoints)
-#if PARROT_HAS_ICU
- UNUSED(interp);
- return src->bufused / sizeof (UChar32);
-#else
- UNUSED(src);
- no_ICU_lib(interp);
-#endif
-}
-
-/*
-
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
-
-Returns the number of bytes in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(bytes)
- return src->bufused;
-}
/*
@@ -451,9 +299,10 @@
ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset)
{
ASSERT_ARGS(ucs4_iter_get)
- return get_codepoint(interp, str, i->charpos + offset);
+ return ucs4_ord(interp, str, i->charpos + offset);
}
+
/*
=item C<static void ucs4_iter_skip(PARROT_INTERP, const STRING *str, String_iter
@@ -482,6 +331,7 @@
#endif
}
+
/*
=item C<static UINTVAL ucs4_iter_get_and_advance(PARROT_INTERP, const STRING
@@ -512,6 +362,7 @@
#endif
}
+
/*
=item C<static void ucs4_iter_set_and_advance(PARROT_INTERP, STRING *str,
@@ -542,6 +393,7 @@
#endif
}
+
/*
=item C<static void ucs4_iter_set_position(PARROT_INTERP, const STRING *str,
@@ -570,7 +422,7 @@
#endif
}
-#if PARROT_HAS_ICU
+
/*
=item C<static size_t ucs4_hash(PARROT_INTERP, const STRING *s, size_t hashval)>
@@ -585,7 +437,7 @@
ucs4_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval)
{
ASSERT_ARGS(ucs4_hash)
- const UChar32 *pos = (const UChar32*) s->strstart;
+ const Parrot_UInt4 *pos = (const Parrot_UInt4 *) s->strstart;
UINTVAL len = s->strlen;
UNUSED(interp);
@@ -596,52 +448,52 @@
return hashval;
}
-#endif
-/*
-
-=item C<void Parrot_encoding_ucs4_init(PARROT_INTERP)>
-
-Initializes the UCS-4 encoding.
-
-=cut
-
-*/
-void
-Parrot_encoding_ucs4_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_encoding_ucs4_init)
- ENCODING * const return_encoding = Parrot_new_encoding(interp);
+static STR_VTABLE Parrot_ucs4_encoding = {
+ 0,
+ "ucs4",
+ NULL,
+ 4, /* Max bytes per codepoint */
+
+ ucs4_to_encoding,
+ unicode_chr,
+
+ encoding_equal,
+ encoding_compare,
+ encoding_index,
+ encoding_rindex,
+ ucs4_hash,
+ unicode_validate,
+
+ ucs4_scan,
+ ucs4_ord,
+ ucs4_substr,
+
+ encoding_is_cclass,
+ encoding_find_cclass,
+ encoding_find_not_cclass,
+
+ encoding_get_graphemes,
+ unicode_compose,
+ encoding_decompose,
+
+ unicode_upcase,
+ unicode_downcase,
+ unicode_titlecase,
+ unicode_upcase_first,
+ unicode_downcase_first,
+ unicode_titlecase_first,
+
+ ucs4_iter_get,
+ ucs4_iter_skip,
+ ucs4_iter_get_and_advance,
+ ucs4_iter_set_and_advance,
+ ucs4_iter_set_position
+};
- static const ENCODING base_encoding = {
- "ucs4",
- 4, /* Max bytes per codepoint */
- to_encoding,
- get_codepoint,
- get_byte,
- set_byte,
- get_codepoints,
- get_bytes,
- codepoints,
- bytes,
- find_cclass,
-#if PARROT_HAS_ICU
- ucs4_hash,
-#else
- NULL,
-#endif
- ucs4_iter_get,
- ucs4_iter_skip,
- ucs4_iter_get_and_advance,
- ucs4_iter_set_and_advance,
- ucs4_iter_set_position
- };
- STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
- Parrot_register_encoding(interp, "ucs4", return_encoding);
+STR_VTABLE *Parrot_ucs4_encoding_ptr = &Parrot_ucs4_encoding;
- return;
-}
/*
Modified: branches/gc_massacre/src/string/encoding/ucs4.h
==============================================================================
--- branches/gc_massacre/src/string/encoding/ucs4.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/ucs4.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -9,11 +9,7 @@
/* HEADERIZER BEGIN: src/string/encoding/ucs4.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_encoding_ucs4_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_encoding_ucs4_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/string/encoding/ucs4.c */
Modified: branches/gc_massacre/src/string/encoding/utf16.c
==============================================================================
--- branches/gc_massacre/src/string/encoding/utf16.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/utf16.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,74 +20,13 @@
#include "parrot/parrot.h"
#include "../unicode.h"
+#include "shared.h"
/* HEADERIZER HFILE: src/string/encoding/utf16.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL find_cclass(PARROT_INTERP,
- ARGIN(const STRING *s),
- ARGIN(const INTVAL *typetable),
- INTVAL flags,
- UINTVAL pos,
- UINTVAL end)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3);
-
-static UINTVAL get_byte(SHIM_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_bytes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static void set_byte(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL byte)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static UINTVAL utf16_iter_get(PARROT_INTERP,
ARGIN(const STRING *str),
ARGIN(const String_iter *i),
@@ -133,32 +72,32 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*i);
-#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(s) \
- , PARROT_ASSERT_ARG(typetable))
-#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
+static UINTVAL utf16_ord(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+static UINTVAL utf16_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * utf16_substr(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset,
+ UINTVAL count)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static STRING * utf16_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_utf16_iter_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(str) \
@@ -179,6 +118,18 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_utf16_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_utf16_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_utf16_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_utf16_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -195,7 +146,7 @@
/*
-=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
+=item C<static STRING * utf16_to_encoding(PARROT_INTERP, const STRING *src)>
Converts the string C<src> to this particular encoding. If C<dest> is
provided, it will contain the result. Otherwise this function operates in
@@ -209,9 +160,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+utf16_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(to_encoding)
+ ASSERT_ARGS(utf16_to_encoding)
#if PARROT_HAS_ICU
UErrorCode err;
int dest_len;
@@ -220,8 +171,10 @@
int src_len;
STRING *result;
- if (src->encoding == Parrot_utf16_encoding_ptr ||
- src->encoding == Parrot_ucs2_encoding_ptr)
+ if (src->encoding == Parrot_utf16_encoding_ptr
+ || src->encoding == Parrot_ucs2_encoding_ptr)
+ /* we have to use clone instead of copy because the Unicode upcase
+ * and downcase functions assume to get an unshared buffer */
return Parrot_str_clone(interp, src);
result = Parrot_gc_new_string_header(interp, 0);
@@ -231,7 +184,6 @@
*/
src_len = src->strlen;
if (!src_len) {
- result->charset = Parrot_unicode_charset_ptr;
result->encoding = Parrot_ucs2_encoding_ptr;
result->strlen = result->bufused = 0;
return result;
@@ -240,8 +192,8 @@
Parrot_gc_allocate_string_storage(interp, result, sizeof (UChar) * src_len);
p = (UChar *)result->strstart;
- if (src->charset == Parrot_iso_8859_1_charset_ptr ||
- src->charset == Parrot_ascii_charset_ptr) {
+ if (src->encoding == Parrot_latin1_encoding_ptr ||
+ src->encoding == Parrot_ascii_encoding_ptr) {
for (dest_len = 0; dest_len < (int)src->strlen; ++dest_len) {
p[dest_len] = (UChar)((unsigned char*)src->strstart)[dest_len];
}
@@ -264,7 +216,6 @@
}
}
result->bufused = dest_len * sizeof (UChar);
- result->charset = Parrot_unicode_charset_ptr;
result->encoding = Parrot_utf16_encoding_ptr;
result->strlen = src_len;
@@ -280,118 +231,76 @@
/*
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
+=item C<static UINTVAL utf16_scan(PARROT_INTERP, const STRING *src)>
-Returns the codepoint in string C<src> at position C<offset>.
+Returns the number of codepoints in string C<src> by scanning the whole
+string.
=cut
*/
+PARROT_WARN_UNUSED_RESULT
static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+utf16_scan(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(get_codepoint)
+ ASSERT_ARGS(utf16_scan)
#if PARROT_HAS_ICU
const UChar * const s = (UChar*) src->strstart;
- UINTVAL c, pos;
- UNUSED(interp);
-
- pos = 0;
- U16_FWD_N_UNSAFE(s, pos, offset);
- U16_GET_UNSAFE(s, pos, c);
- return c;
+ UINTVAL pos = 0, charpos = 0;
+ /*
+ * this is used to initially calculate src->strlen,
+ * therefore we must scan the whole string
+ */
+ while (pos * sizeof (UChar) < src->bufused) {
+ U16_FWD_1_UNSAFE(s, pos);
+ ++charpos;
+ }
+ return charpos;
#else
UNUSED(src);
- UNUSED(offset);
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
"no ICU lib loaded");
#endif
}
-
/*
-=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
-*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
-
-Stub, the charset level handles this for unicode strings.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-find_cclass(PARROT_INTERP, ARGIN(const STRING *s), ARGIN(const INTVAL *typetable),
-INTVAL flags, UINTVAL pos, UINTVAL end)
-{
- UNUSED(s);
- UNUSED(typetable);
- UNUSED(flags);
- UNUSED(pos);
- UNUSED(end);
-
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No find_cclass support in unicode encoding plugins");
-}
-
-/*
-
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static UINTVAL utf16_ord(PARROT_INTERP, const STRING *src, UINTVAL
offset)>
-Returns the byte in string C<src> at position C<offset>.
+Returns the codepoint in string C<src> at position C<offset>.
=cut
*/
static UINTVAL
-get_byte(SHIM_INTERP, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(get_byte)
- const unsigned char * const contents = (unsigned char *)src->strstart;
- if (offset >= src->bufused) {
-/* Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "get_byte past the end of the buffer (%i of %i)",
- offset, src->bufused); */
- return 0;
- }
- return contents[offset];
-}
-
-/*
-
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
-UINTVAL byte)>
-
-Sets, in string C<src> at position C<offset>, the byte C<byte>.
-
-=cut
-
-*/
-
-static void
-set_byte(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL byte)
+utf16_ord(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
{
- ASSERT_ARGS(set_byte)
- unsigned char *contents;
+ ASSERT_ARGS(utf16_ord)
+#if PARROT_HAS_ICU
+ const UChar * const s = (UChar*) src->strstart;
+ UINTVAL c, pos;
+ UNUSED(interp);
- if (offset >= src->bufused)
- Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "set_byte past the end of the buffer");
+ pos = 0;
+ U16_FWD_N_UNSAFE(s, pos, offset);
+ U16_GET_UNSAFE(s, pos, c);
+ return c;
+#else
+ UNUSED(src);
+ UNUSED(offset);
- contents = (unsigned char *)src->strstart;
- contents[offset] = (unsigned char)byte;
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
+ "no ICU lib loaded");
+#endif
}
/*
-=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
+=item C<static STRING * utf16_substr(PARROT_INTERP, const STRING *src, UINTVAL
offset, UINTVAL count)>
Returns the codepoints in string C<src> at position C<offset> and length
@@ -404,9 +313,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
+utf16_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
{
- ASSERT_ARGS(get_codepoints)
+ ASSERT_ARGS(utf16_substr)
#if PARROT_HAS_ICU
UINTVAL pos = 0, start;
const UChar * const s = (UChar*) src->strstart;
@@ -430,84 +339,6 @@
#endif
}
-
-/*
-
-=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the bytes in string C<src> at position C<offset> and length C<count>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_bytes)
- UNUSED(interp);
- UNUSED(src);
- UNUSED(offset)
- UNUSED(count);
- UNIMPL;
-}
-
-/*
-
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
-
-Returns the number of codepoints in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(codepoints)
-#if PARROT_HAS_ICU
- const UChar * const s = (UChar*) src->strstart;
- UINTVAL pos = 0, charpos = 0;
- /*
- * this is used to initially calculate src->strlen,
- * therefore we must scan the whole string
- */
- while (pos * sizeof (UChar) < src->bufused) {
- U16_FWD_1_UNSAFE(s, pos);
- ++charpos;
- }
- return charpos;
-#else
- UNUSED(src);
-
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no ICU lib loaded");
-#endif
-}
-
-/*
-
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
-
-Returns the number of bytes in string C<src>.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(bytes)
- return src->bufused;
-}
-
/*
=item C<static UINTVAL utf16_iter_get(PARROT_INTERP, const STRING *str, const
@@ -691,46 +522,51 @@
#endif
}
-/*
-
-=item C<void Parrot_encoding_utf16_init(PARROT_INTERP)>
-Initializes the UTF-16 encoding.
+static STR_VTABLE Parrot_utf16_encoding = {
+ 0,
+ "utf16",
+ NULL,
+ 4, /* Max bytes per codepoint */
+
+ utf16_to_encoding,
+ unicode_chr,
+
+ encoding_equal,
+ encoding_compare,
+ encoding_index,
+ encoding_rindex,
+ encoding_hash,
+ unicode_validate,
+
+ utf16_scan,
+ utf16_ord,
+ utf16_substr,
+
+ encoding_is_cclass,
+ encoding_find_cclass,
+ encoding_find_not_cclass,
+
+ encoding_get_graphemes,
+ unicode_compose,
+ encoding_decompose,
+
+ unicode_upcase,
+ unicode_downcase,
+ unicode_titlecase,
+ unicode_upcase_first,
+ unicode_downcase_first,
+ unicode_titlecase_first,
+
+ utf16_iter_get,
+ utf16_iter_skip,
+ utf16_iter_get_and_advance,
+ utf16_iter_set_and_advance,
+ utf16_iter_set_position
+};
-=cut
-
-*/
+STR_VTABLE *Parrot_utf16_encoding_ptr = &Parrot_utf16_encoding;
-void
-Parrot_encoding_utf16_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_encoding_utf16_init)
- ENCODING * const return_encoding = Parrot_new_encoding(interp);
-
- static const ENCODING base_encoding = {
- "utf16",
- 4, /* Max bytes per codepoint 0 .. 0x10ffff */
- to_encoding,
- get_codepoint,
- get_byte,
- set_byte,
- get_codepoints,
- get_bytes,
- codepoints,
- bytes,
- find_cclass,
- NULL,
- utf16_iter_get,
- utf16_iter_skip,
- utf16_iter_get_and_advance,
- utf16_iter_set_and_advance,
- utf16_iter_set_position
- };
- STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
- Parrot_register_encoding(interp, "utf16", return_encoding);
-
- return;
-}
/*
Modified: branches/gc_massacre/src/string/encoding/utf16.h
==============================================================================
--- branches/gc_massacre/src/string/encoding/utf16.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/utf16.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,11 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/utf16.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_encoding_utf16_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_encoding_utf16_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/string/encoding/utf16.c */
Modified: branches/gc_massacre/src/string/encoding/utf8.c
==============================================================================
--- branches/gc_massacre/src/string/encoding/utf8.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/utf8.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -21,74 +21,13 @@
#include "parrot/parrot.h"
#include "../unicode.h"
#include "utf8.h"
+#include "shared.h"
/* HEADERIZER HFILE: src/string/encoding/utf8.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_PURE_FUNCTION
-static UINTVAL bytes(SHIM_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(2);
-
-static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL find_cclass(PARROT_INTERP,
- SHIM(const STRING *s),
- SHIM(const INTVAL *typetable),
- SHIM(INTVAL flags),
- SHIM(UINTVAL pos),
- SHIM(UINTVAL end))
- __attribute__nonnull__(1);
-
-static UINTVAL get_byte(SHIM_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_bytes(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static UINTVAL get_codepoint(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static STRING * get_codepoints(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL count)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static void set_byte(PARROT_INTERP,
- ARGIN(const STRING *src),
- UINTVAL offset,
- UINTVAL byte)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CAN_RETURN_NULL
-static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-static UINTVAL utf8_characters(PARROT_INTERP,
- ARGIN(const utf8_t *ptr),
- UINTVAL byte_len)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static UINTVAL utf8_decode(PARROT_INTERP, ARGIN(const utf8_t *ptr))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -140,6 +79,20 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*i);
+static UINTVAL utf8_ord(PARROT_INTERP,
+ ARGIN(const STRING *src),
+ UINTVAL offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static UINTVAL utf8_scan(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static UINTVAL utf8_scan2(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static const void * utf8_skip_backward(ARGIN(const void *ptr), UINTVAL n)
@@ -149,33 +102,11 @@
static const void * utf8_skip_forward(ARGIN(const void *ptr), UINTVAL n)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_find_cclass __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_get_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_bytes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(src))
-#define ASSERT_ARGS_utf8_characters __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ptr))
+PARROT_CAN_RETURN_NULL
+static STRING * utf8_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_utf8_decode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ptr))
@@ -200,10 +131,22 @@
#define ASSERT_ARGS_utf8_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(str) \
, PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_utf8_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_utf8_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
+#define ASSERT_ARGS_utf8_scan2 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_utf8_skip_backward __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ptr))
#define ASSERT_ARGS_utf8_skip_forward __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ptr))
+#define ASSERT_ARGS_utf8_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(src))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -229,25 +172,96 @@
4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 /* cjk etc. */
};
+
/*
-=item C<static UINTVAL utf8_characters(PARROT_INTERP, const utf8_t *ptr, UINTVAL
-byte_len)>
+=item C<static STRING * utf8_to_encoding(PARROT_INTERP, const STRING *src)>
-Returns the number of characters in the C<byte_len> bytes from C<*ptr>.
+Converts the string C<src> to this particular encoding. If C<dest> is
+provided, it will contain the result. Otherwise this function operates in
+place.
-XXX This function is unused.
+=cut
+
+*/
+
+PARROT_CAN_RETURN_NULL
+static STRING *
+utf8_to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(utf8_to_encoding)
+ STRING *result;
+ const STR_VTABLE *src_encoding = src->encoding;
+ UINTVAL dest_len, dest_pos, src_len;
+ unsigned char *p;
+
+ if (src_encoding == Parrot_utf8_encoding_ptr)
+ return Parrot_str_clone(interp, src);
+
+ src_len = src->strlen;
+ result = Parrot_gc_new_string_header(interp, 0);
+ result->encoding = Parrot_utf8_encoding_ptr;
+ result->strlen = src_len;
+
+ if (!src_len)
+ return result;
+
+ Parrot_gc_allocate_string_storage(interp, result, src_len);
+ p = (unsigned char *)result->strstart;
+
+ if (src_encoding == Parrot_ascii_encoding_ptr) {
+ for (dest_len = 0; dest_len < src_len; ++dest_len) {
+ p[dest_len] = ((unsigned char*)src->strstart)[dest_len];
+ }
+ result->bufused = dest_len;
+ }
+ else {
+ String_iter src_iter;
+ STRING_ITER_INIT(interp, &src_iter);
+ dest_len = src_len;
+ dest_pos = 0;
+ while (src_iter.charpos < src_len) {
+ const UINTVAL c = src_encoding->iter_get_and_advance(interp, src, &src_iter);
+ unsigned char *new_pos;
+ unsigned char *pos;
+
+ if (dest_len - dest_pos < 6) {
+ UINTVAL need = (UINTVAL)((src->strlen - src_iter.charpos + 1) * 1.5);
+ if (need < 16)
+ need = 16;
+ dest_len += need;
+ result->bufused = dest_pos;
+ Parrot_gc_reallocate_string_storage(interp, result, dest_len);
+ p = (unsigned char *)result->strstart;
+ }
+
+ pos = p + dest_pos;
+ new_pos = (unsigned char *)utf8_encode(interp, pos, c);
+ dest_pos += (new_pos - pos);
+ }
+ result->bufused = dest_pos;
+ }
+
+ return result;
+}
+
+
+/*
+
+=item C<static UINTVAL utf8_scan(PARROT_INTERP, const STRING *src)>
+
+Returns the number of characters in string C<str> by scanning the string.
=cut
*/
static UINTVAL
-utf8_characters(PARROT_INTERP, ARGIN(const utf8_t *ptr), UINTVAL byte_len)
+utf8_scan(PARROT_INTERP, ARGIN(const STRING *src))
{
- ASSERT_ARGS(utf8_characters)
- const utf8_t *u8ptr = ptr;
- const utf8_t *u8end = u8ptr + byte_len;
+ ASSERT_ARGS(utf8_scan)
+ const utf8_t *u8ptr = (const utf8_t *)src->strstart;
+ const utf8_t *u8end = (const utf8_t *)(src->strstart + src->bufused);
UINTVAL characters = 0;
while (u8ptr < u8end) {
@@ -262,6 +276,53 @@
return characters;
}
+
+/*
+
+=item C<static UINTVAL utf8_scan2(PARROT_INTERP, const STRING *src)>
+
+Returns the number of codepoints in string C<src>.
+
+=cut
+
+*/
+
+static UINTVAL
+utf8_scan2(PARROT_INTERP, ARGIN(const STRING *src))
+{
+ ASSERT_ARGS(utf8_scan2)
+ String_iter iter;
+ /*
+ * this is used to initially calculate src->strlen,
+ * therefore we must scan the whole string
+ */
+ STRING_ITER_INIT(interp, &iter);
+ while (iter.bytepos < src->bufused)
+ utf8_iter_get_and_advance(interp, src, &iter);
+ return iter.charpos;
+}
+
+
+/*
+
+=item C<static UINTVAL utf8_ord(PARROT_INTERP, const STRING *src, UINTVAL
+offset)>
+
+Returns the codepoint in string C<src> at position C<offset>.
+
+=cut
+
+*/
+
+static UINTVAL
+utf8_ord(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
+{
+ ASSERT_ARGS(utf8_ord)
+ const utf8_t * const start = (const utf8_t *)utf8_skip_forward(src->strstart, offset);
+ return utf8_decode(interp, start);
+}
+
+
/*
=item C<static UINTVAL utf8_decode(PARROT_INTERP, const utf8_t *ptr)>
@@ -306,6 +367,7 @@
return c;
}
+
/*
=item C<static void * utf8_encode(PARROT_INTERP, void *ptr, UINTVAL c)>
@@ -343,6 +405,7 @@
return (utf8_t *)ptr + len;
}
+
/*
=item C<static const void * utf8_skip_forward(const void *ptr, UINTVAL n)>
@@ -367,6 +430,7 @@
return u8ptr;
}
+
/*
=item C<static const void * utf8_skip_backward(const void *ptr, UINTVAL n)>
@@ -396,17 +460,6 @@
return u8ptr;
}
-/*
-
-=back
-
-=head2 Iterator Functions
-
-=over 4
-
-=cut
-
-*/
/*
@@ -436,6 +489,7 @@
return utf8_decode(interp, u8ptr);
}
+
/*
=item C<static void utf8_iter_skip(PARROT_INTERP, const STRING *str, String_iter
@@ -465,6 +519,7 @@
i->bytepos = (const char *)u8ptr - (const char *)str->strstart;
}
+
/*
=item C<static UINTVAL utf8_iter_get_and_advance(PARROT_INTERP, const STRING
@@ -515,6 +570,7 @@
return c;
}
+
/*
=item C<static void utf8_iter_set_and_advance(PARROT_INTERP, STRING *str,
@@ -541,6 +597,7 @@
i->charpos++;
}
+
/*
=item C<static void utf8_iter_set_position(PARROT_INTERP, const STRING *str,
@@ -597,326 +654,50 @@
}
-/*
-
-=item C<static STRING * to_encoding(PARROT_INTERP, const STRING *src)>
-
-Converts the string C<src> to this particular encoding. If C<dest> is
-provided, it will contain the result. Otherwise this function operates in
-place.
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-static STRING *
-to_encoding(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(to_encoding)
- STRING *result;
- const ENCODING *src_encoding;
- UINTVAL dest_len, dest_pos, src_len;
- unsigned char *p;
-
- if (src->encoding == Parrot_utf8_encoding_ptr)
- return Parrot_str_clone(interp, src);
-
- result = Parrot_gc_new_string_header(interp, 0);
- src_len = src->strlen;
-
- /* save source encoding before possibly changing it */
- src_encoding = src->encoding;
- result->charset = Parrot_unicode_charset_ptr;
- result->encoding = Parrot_utf8_encoding_ptr;
- result->strlen = src_len;
-
- if (!src->strlen)
- return result;
-
- Parrot_gc_allocate_string_storage(interp, result, src_len);
- p = (unsigned char *)result->strstart;
-
- if (src->charset == Parrot_ascii_charset_ptr) {
- for (dest_len = 0; dest_len < src_len; ++dest_len) {
- p[dest_len] = ((unsigned char*)src->strstart)[dest_len];
- }
- result->bufused = dest_len;
- }
- else {
- String_iter src_iter;
- STRING_ITER_INIT(interp, &src_iter);
- dest_len = src_len;
- dest_pos = 0;
- while (src_iter.charpos < src_len) {
- const UINTVAL c = src_encoding->iter_get_and_advance(interp, src, &src_iter);
- unsigned char *new_pos;
- unsigned char *pos;
-
- if (dest_len - dest_pos < 6) {
- UINTVAL need = (UINTVAL)((src->strlen - src_iter.charpos + 1) * 1.5);
- if (need < 16)
- need = 16;
- dest_len += need;
- result->bufused = dest_pos;
- Parrot_gc_reallocate_string_storage(interp, result, dest_len);
- p = (unsigned char *)result->strstart;
- }
-
- pos = p + dest_pos;
- new_pos = (unsigned char *)utf8_encode(interp, pos, c);
- dest_pos += (new_pos - pos);
- }
- result->bufused = dest_pos;
- }
-
- return result;
-}
-
-/*
-
-=item C<static UINTVAL get_codepoint(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
-
-Returns the codepoint in string C<src> at position C<offset>.
-
-=cut
-
-*/
-
-static UINTVAL
-get_codepoint(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(get_codepoint)
- const utf8_t * const start = (const utf8_t *)utf8_skip_forward(src->strstart, offset);
- return utf8_decode(interp, start);
-}
-
-
-/*
-
-=item C<static UINTVAL find_cclass(PARROT_INTERP, const STRING *s, const INTVAL
-*typetable, INTVAL flags, UINTVAL pos, UINTVAL end)>
-
-Stub, the charset level handles this for unicode strings.
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static UINTVAL
-find_cclass(PARROT_INTERP, SHIM(const STRING *s), SHIM(const INTVAL *typetable),
-SHIM(INTVAL flags), SHIM(UINTVAL pos), SHIM(UINTVAL end))
-{
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "No find_cclass support in unicode encoding plugins");
-}
-
-/*
-
-=item C<static UINTVAL get_byte(PARROT_INTERP, const STRING *src, UINTVAL
-offset)>
-
-Returns the byte in string C<src> at position C<offset>.
-
-=cut
-
-*/
-
-static UINTVAL
-get_byte(SHIM_INTERP, ARGIN(const STRING *src), UINTVAL offset)
-{
- ASSERT_ARGS(get_byte)
- unsigned char *contents = (unsigned char *)src->strstart;
- if (offset >= src->bufused) {
-/* Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "get_byte past the end of the buffer (%i of %i)",
- offset, src->bufused); */
- return 0;
- }
- return contents[offset];
-}
-
-/*
-
-=item C<static void set_byte(PARROT_INTERP, const STRING *src, UINTVAL offset,
-UINTVAL byte)>
-
-Sets, in string C<src> at position C<offset>, the byte C<byte>.
-
-=cut
-
-*/
-
-static void
-set_byte(PARROT_INTERP, ARGIN(const STRING *src),
- UINTVAL offset, UINTVAL byte)
-{
- ASSERT_ARGS(set_byte)
- unsigned char *contents;
-
- if (offset >= src->bufused)
- Parrot_ex_throw_from_c_args(interp, NULL, 0,
- "set_byte past the end of the buffer");
-
- contents = (unsigned char *)src->strstart;
- contents[offset] = (unsigned char)byte;
-}
-
-/*
-
-=item C<static STRING * get_codepoints(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the codepoints in string C<src> at position C<offset> and length
-C<count>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_codepoints(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_codepoints)
-
- STRING * const return_string = Parrot_str_copy(interp, src);
- String_iter iter;
- UINTVAL start;
-
- STRING_ITER_INIT(interp, &iter);
-
- if (offset)
- utf8_iter_set_position(interp, src, &iter, offset);
-
- start = iter.bytepos;
- return_string->strstart = (char *)return_string->strstart + start;
-
- if (count)
- utf8_iter_set_position(interp, src, &iter, offset + count);
-
- return_string->bufused = iter.bytepos - start;
- return_string->strlen = count;
- return_string->hashval = 0;
-
- return return_string;
-}
-
-/*
-
-=item C<static STRING * get_bytes(PARROT_INTERP, const STRING *src, UINTVAL
-offset, UINTVAL count)>
-
-Returns the bytes in string C<src> at position C<offset> and length C<count>.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static STRING *
-get_bytes(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count)
-{
- ASSERT_ARGS(get_bytes)
- STRING * const return_string = Parrot_str_copy(interp, src);
-
- return_string->strstart = (char *)return_string->strstart + offset ;
- return_string->bufused = count;
-
- return_string->strlen = count;
- return_string->hashval = 0;
-
- return return_string;
-}
-
-
-
-/*
-
-=item C<static UINTVAL codepoints(PARROT_INTERP, const STRING *src)>
-
-Returns the number of codepoints in string C<src>.
-
-=cut
-
-*/
-
-static UINTVAL
-codepoints(PARROT_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(codepoints)
- String_iter iter;
- /*
- * this is used to initially calculate src->strlen,
- * therefore we must scan the whole string
- */
- STRING_ITER_INIT(interp, &iter);
- while (iter.bytepos < src->bufused)
- utf8_iter_get_and_advance(interp, src, &iter);
- return iter.charpos;
-}
-
-/*
-
-=item C<static UINTVAL bytes(PARROT_INTERP, const STRING *src)>
-
-Returns the number of bytes in string C<src>.
-
-=cut
-
-*/
-
-PARROT_PURE_FUNCTION
-static UINTVAL
-bytes(SHIM_INTERP, ARGIN(const STRING *src))
-{
- ASSERT_ARGS(bytes)
- return src->bufused;
-}
-
-/*
-
-=item C<void Parrot_encoding_utf8_init(PARROT_INTERP)>
-
-Initializes the UTF-8 encoding.
-
-=cut
-
-*/
-
-void
-Parrot_encoding_utf8_init(PARROT_INTERP)
-{
- ASSERT_ARGS(Parrot_encoding_utf8_init)
- ENCODING * const return_encoding = Parrot_new_encoding(interp);
+static STR_VTABLE Parrot_utf8_encoding = {
+ 0,
+ "utf8",
+ NULL,
+ 4, /* Max bytes per codepoint */
+
+ utf8_to_encoding,
+ unicode_chr,
+
+ encoding_equal,
+ encoding_compare,
+ encoding_index,
+ encoding_rindex,
+ encoding_hash,
+ unicode_validate,
+
+ utf8_scan2,
+ utf8_ord,
+ encoding_substr,
+
+ encoding_is_cclass,
+ encoding_find_cclass,
+ encoding_find_not_cclass,
+
+ encoding_get_graphemes,
+ unicode_compose,
+ encoding_decompose,
+
+ unicode_upcase,
+ unicode_downcase,
+ unicode_titlecase,
+ unicode_upcase_first,
+ unicode_downcase_first,
+ unicode_titlecase_first,
+
+ utf8_iter_get,
+ utf8_iter_skip,
+ utf8_iter_get_and_advance,
+ utf8_iter_set_and_advance,
+ utf8_iter_set_position
+};
- static const ENCODING base_encoding = {
- "utf8",
- 4, /* Max bytes per codepoint 0 .. 0x10ffff */
- to_encoding,
- get_codepoint,
- get_byte,
- set_byte,
- get_codepoints,
- get_bytes,
- codepoints,
- bytes,
- find_cclass,
- NULL,
- utf8_iter_get,
- utf8_iter_skip,
- utf8_iter_get_and_advance,
- utf8_iter_set_and_advance,
- utf8_iter_set_position
- };
- STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding);
- Parrot_register_encoding(interp, "utf8", return_encoding);
+STR_VTABLE *Parrot_utf8_encoding_ptr = &Parrot_utf8_encoding;
- return;
-}
/*
Modified: branches/gc_massacre/src/string/encoding/utf8.h
==============================================================================
--- branches/gc_massacre/src/string/encoding/utf8.h Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/encoding/utf8.h Mon Sep 13 21:23:26 2010 (r48984)
@@ -16,11 +16,7 @@
/* HEADERIZER BEGIN: src/string/encoding/utf8.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void Parrot_encoding_utf8_init(PARROT_INTERP)
- __attribute__nonnull__(1);
-#define ASSERT_ARGS_Parrot_encoding_utf8_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/string/encoding/utf8.c */
Modified: branches/gc_massacre/src/string/primitives.c
==============================================================================
--- branches/gc_massacre/src/string/primitives.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/string/primitives.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -89,14 +89,15 @@
UINTVAL workchar = 0;
UINTVAL charcount = 0;
const UINTVAL len = Parrot_str_byte_length(interp, string);
+ const unsigned char * const buf = (unsigned char *)string->strstart;
/* Well, not right now */
- UINTVAL codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ UINTVAL codepoint = buf[*offset];
++*offset;
switch (codepoint) {
case 'x':
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '9') {
workchar = codepoint - '0';
}
@@ -111,7 +112,7 @@
++*offset;
workchar = 0;
for (i = 0; i < 8 && *offset < len; ++i, ++*offset) {
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint == '}') {
++*offset;
return workchar;
@@ -145,7 +146,7 @@
++*offset;
if (*offset < len) {
workchar *= 16;
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '9') {
workchar += codepoint - '0';
}
@@ -165,7 +166,7 @@
++*offset;
return workchar;
case 'c':
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= 'A' && codepoint <= 'Z') {
workchar = codepoint - 'A' + 1;
}
@@ -181,7 +182,7 @@
for (charcount = 0; charcount < 4; charcount++) {
if (*offset < len) {
workchar *= 16;
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '9') {
workchar += codepoint - '0';
}
@@ -211,7 +212,7 @@
for (charcount = 0; charcount < 8; charcount++) {
if (*offset < len) {
workchar *= 16;
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '9') {
workchar += codepoint - '0';
}
@@ -247,7 +248,7 @@
workchar = codepoint - '0';
if (*offset < len) {
workchar *= 8;
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '7') {
workchar += codepoint - '0';
}
@@ -261,7 +262,7 @@
++*offset;
if (*offset < len) {
workchar *= 8;
- codepoint = CHARSET_GET_BYTE(interp, string, *offset);
+ codepoint = buf[*offset];
if (codepoint >= '0' && codepoint <= '7') {
workchar += codepoint - '0';
}
Modified: branches/gc_massacre/src/sub.c
==============================================================================
--- branches/gc_massacre/src/sub.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/sub.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -23,6 +23,7 @@
#include "sub.str"
#include "pmc/pmc_sub.h"
#include "pmc/pmc_continuation.h"
+#include "parrot/oplib/core_ops.h"
/* HEADERIZER HFILE: include/parrot/sub.h */
Modified: branches/gc_massacre/src/thread.c
==============================================================================
--- branches/gc_massacre/src/thread.c Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/src/thread.c Mon Sep 13 21:23:26 2010 (r48984)
@@ -665,7 +665,6 @@
pt_thread_prepare_for_run(Parrot_Interp d, SHIM(Parrot_Interp s))
{
ASSERT_ARGS(pt_thread_prepare_for_run)
- Parrot_setup_event_func_ptrs(d);
}
/*
Modified: branches/gc_massacre/t/compilers/pct/pct_hllcompiler.t
==============================================================================
--- branches/gc_massacre/t/compilers/pct/pct_hllcompiler.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/compilers/pct/pct_hllcompiler.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -7,7 +7,7 @@
use warnings;
use lib qw(t . lib ../lib ../../lib ../../../lib);
use Test::More;
-use Parrot::Test tests => 5;
+use Parrot::Test tests => 6;
pir_output_is( <<'CODE', <<'OUT', 'some of the auxiliary methods' );
@@ -198,6 +198,72 @@
omgwtf!
OUT
+pir_output_is( <<'CODE', <<'OUT', 'lineof method' );
+.sub 'main' :main
+ load_bytecode 'PCT/HLLCompiler.pbc'
+ 'lineof_tests'()
+.end
+
+.sub 'is'
+ .param int a
+ .param int b
+ .param string message
+ if a == b goto ok
+ print "not "
+ ok:
+ print "ok\n"
+.end
+
+.sub 'lineof_tests'
+ .local pmc hll, target
+ hll = get_hll_global ['PCT'], 'HLLCompiler'
+ target = box "0123\n5678\r0123\r\n678\n"
+ $I0 = hll.'lineof'(target, 0, 'cache'=>1)
+ is($I0, 0, "lineof - beginning of string")
+ $I0 = hll.'lineof'(target, 1, 'cache'=>1)
+ is($I0, 0, "lineof - char on first line")
+ $I0 = hll.'lineof'(target, 4, 'cache'=>1)
+ is($I0, 0, "lineof - immediately before nl")
+ $I0 = hll.'lineof'(target, 5, 'cache'=>1)
+ is($I0, 1, "lineof - immediately after nl")
+ $I0 = hll.'lineof'(target, 8, 'cache'=>1)
+ is($I0, 1, "lineof - char before cr")
+ $I0 = hll.'lineof'(target, 9, 'cache'=>1)
+ is($I0, 1, "lineof - immediately before cr")
+ $I0 = hll.'lineof'(target, 10, 'cache'=>1)
+ is($I0, 2, "lineof - immediately after cr")
+ $I0 = hll.'lineof'(target, 11, 'cache'=>1)
+ is($I0, 2, "lineof - char after cr")
+ $I0 = hll.'lineof'(target, 13, 'cache'=>1)
+ is($I0, 2, "lineof - char before crnl")
+ $I0 = hll.'lineof'(target, 14, 'cache'=>1)
+ is($I0, 2, "lineof - immediately before crnl")
+ $I0 = hll.'lineof'(target, 15, 'cache'=>1)
+ is($I0, 3, "lineof - middle of crnl")
+ $I0 = hll.'lineof'(target, 16, 'cache'=>1)
+ is($I0, 3, "lineof - immediately after crnl")
+ $I0 = hll.'lineof'(target, 19, 'cache'=>1)
+ is($I0, 3, "lineof - immediately before final nl")
+ $I0 = hll.'lineof'(target, 20, 'cache'=>1)
+ is($I0, 4, "lineof - immediately after final nl")
+.end
+CODE
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+OUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Modified: branches/gc_massacre/t/dynpmc/gziphandle.t
==============================================================================
--- branches/gc_massacre/t/dynpmc/gziphandle.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/dynpmc/gziphandle.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -22,15 +22,13 @@
.include 'test_more.pir'
.include 'iglobals.pasm'
.local pmc config_hash, interp
- .local int num_tests
- num_tests = 10
- plan(num_tests)
interp = getinterp
config_hash = interp[.IGLOBALS_CONFIG_HASH]
$S0 = config_hash['has_zlib']
unless $S0 goto no_zlib
+ plan(10)
$P0 = loadlib 'gziphandle'
test_handle()
test_stream()
@@ -39,7 +37,7 @@
.return()
no_zlib:
- skip(num_tests, 'No zlib library available')
+ skip_all('No zlib library available')
.return()
.end
Modified: branches/gc_massacre/t/oo/objects.t
==============================================================================
--- branches/gc_massacre/t/oo/objects.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/oo/objects.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -21,7 +21,7 @@
.include "iglobals.pasm"
.include "interpinfo.pasm"
- plan(194)
+ plan(191)
get_classname_from_class()
test_get_class()
@@ -143,15 +143,6 @@
isa $I0, $P1, "calar"
is( $I0, 0, 'Boolean !isa calar' )
- isa $I0, $P1, "Integer"
- is( $I0, 1, 'Boolean isa Integer' )
-
- isa $I0, $P1, "Integ"
- is( $I0, 0, 'Boolean !isa Integ' )
-
- isa $I0, $P1, "eger"
- is( $I0, 0, 'Boolean !isa eger' )
-
isa $I0, $P1, " "
is( $I0, 0, 'Boolean !isa " "' )
Modified: branches/gc_massacre/t/op/calling.t
==============================================================================
--- branches/gc_massacre/t/op/calling.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/op/calling.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -1247,25 +1247,23 @@
/too few positional arguments: 3 passed, 4 \(or more\) expected/
OUTPUT
-pir_output_is( <<'CODE', <<'OUTPUT', "tailcall to NCI" );
+pir_output_is( <<'CODE', <<'OUTPUT', "faux tailcall to NCI" );
.sub main :main
.local pmc s
s = new 'String'
- s = "OK 1\n"
- $S0 = s."lower"()
- print $S0
- s = "OK 2\n"
- $S1 = foo(s)
- print $S1
+ $I0 = s."is_integer"(22)
+ say $I0
+ $I1 = foo(s)
+ say $I1
.end
.sub foo
.param pmc s
- $S0 = s."lower"()
- .return ($S0)
+ $I0 = s."is_integer"(22)
+ .return ($I0)
.end
CODE
-ok 1
-ok 2
+1
+1
OUTPUT
pir_output_is( <<'CODE', <<'OUTPUT', "tailcall to NCI - 2" );
Modified: branches/gc_massacre/t/op/exceptions.t
==============================================================================
--- branches/gc_massacre/t/op/exceptions.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/op/exceptions.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -423,19 +423,7 @@
No exception handler/
OUTPUT
-$ENV{TEST_PROG_ARGS} ||= '';
-my @todo = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/
- ? ( todo => '.tailcall and lexical maps not thawed from PBC, TT #1172' )
- : ();
-#
-# this test is hanging in testr since pcc_hackathon_6Mar10 branch merge at r45108
-# converting to skip at the moment
-#
-
-SKIP: {
- skip ".tailcall and lexical maps not thawed from PBC - hangs", 1 if @todo;
-
-pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception", @todo );
+pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception" );
.sub main :main
.local pmc a
.lex 'a', a
@@ -444,7 +432,9 @@
push_eh handler
exit 0
handler:
- .tailcall exit_handler()
+ .const 'Sub' $P0 = 'exit_handler'
+ capture_lex $P0
+ .tailcall $P0()
.end
.sub exit_handler :outer(main)
@@ -459,8 +449,6 @@
a = 42
OUTPUT
-}
-
## Regression test for r14697. This probably won't be needed when PDD23 is
## fully implemented.
pir_error_output_like( <<'CODE', <<'OUTPUT', "invoke handler in calling sub" );
Modified: branches/gc_massacre/t/op/string_cs.t
==============================================================================
--- branches/gc_massacre/t/op/string_cs.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/op/string_cs.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -337,7 +337,7 @@
end
CODE
abc_\xc3\xa4_
-unicode
+utf8
6
OUTPUT
Modified: branches/gc_massacre/t/pmc/bytebuffer.t
==============================================================================
--- branches/gc_massacre/t/pmc/bytebuffer.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/bytebuffer.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -22,7 +22,7 @@
.sub 'main' :main
.include 'test_more.pir'
- plan(37)
+ plan(38)
test_init()
test_set_string()
@@ -134,8 +134,12 @@
.local int big
bb = new ['ByteBuffer']
+ s = bb.'get_string'('ascii')
+ n = length s
+ is(s, 0, "getting from unitialized buffer gives empty string")
+
bb = binary:"abcd"
- s = bb.'get_string'('ascii', 'fixed_8')
+ s = bb.'get_string'('ascii')
n = length s
is(n, 4, "getting ascii from buffer gives correct length")
is(s, "abcd", "getting ascii from buffer gives correct content")
@@ -161,7 +165,7 @@
bb[0] = 0x00
bb[1] = 0xD1
doit:
- s = bb.'get_string'('unicode', 'utf16')
+ s = bb.'get_string'('utf16')
n = length s
is(n, 1, "getting utf16 from buffer gives correct length")
n = ord s
@@ -297,7 +301,7 @@
if i < 8192 goto loopset
.local string s
- s = bb.'get_string'('unicode', 'utf16')
+ s = bb.'get_string'('utf16')
# Check string size
i = length s
@@ -350,7 +354,7 @@
bb = new ['ByteBuffer']
bb = 'something'
push_eh catch_charset
- s = bb.'get_string'('***INVALID cHARsET%%%%', 'fixed_8')
+ s = bb.'get_string'('***INVALID cHARsET%%%%')
pop_eh
ok(0, "get_string with invalid charset should throw")
goto check_encoding
Modified: branches/gc_massacre/t/pmc/complex.t
==============================================================================
--- branches/gc_massacre/t/pmc/complex.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/complex.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -21,7 +21,7 @@
.include 'fp_equality.pasm'
.include "iglobals.pasm"
- plan(458)
+ plan(460)
string_parsing()
exception_malformed_string__real_part()
@@ -76,6 +76,7 @@
sech_of_complex_numbers()
csch_of_complex_numbers()
add_using_subclass_of_complex_bug_59630()
+ provides_complex()
# END_OF_TESTS
@@ -514,10 +515,10 @@
.local int bool1
does bool1, pmc1, "scalar"
- ok( bool1, 'Comples does scalar' )
+ ok( bool1, 'Complex does scalar' )
does bool1, pmc1, "no_interface"
- nok( bool1, 'Comples !does no_interface' )
+ nok( bool1, 'Complex !does no_interface' )
.end
.sub instantiate__pasm__i
@@ -1156,6 +1157,17 @@
todo( $I0, $S0 )
.end
+.sub provides_complex
+ $P0 = new 'Complex'
+ $I0 = does $P0, 'complex'
+ ok($I0)
+
+ # ...And test a subclass, for good measure
+ $P0 = new 'MyComplex'
+ $I0 = does $P0, 'complex'
+ ok($I0)
+.end
+
.namespace ['MyComplex']
.sub 'init' :vtable
Modified: branches/gc_massacre/t/pmc/exception-old.t
==============================================================================
--- branches/gc_massacre/t/pmc/exception-old.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/exception-old.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -360,19 +360,7 @@
caught
OUTPUT
-$ENV{TEST_PROG_ARGS} ||= '';
-my @todo = $ENV{TEST_PROG_ARGS} =~ /--run-pbc/
- ? ( todo => '.tailcall and lexical maps not thawed from PBC, TT #1172' )
- : ();
-#
-# this test is hanging in testr since pcc_hackathon_6Mar10 branch merge at r45108
-# converting to skip at the moment
-#
-
-SKIP: {
- skip ".tailcall and lexical maps not thawed from PBC - hangs", 1 if @todo;
-
-pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception", @todo );
+pir_output_is( <<'CODE', <<'OUTPUT', "exit_handler via exit exception" );
.sub main :main
.local pmc a
.lex 'a', a
@@ -381,7 +369,9 @@
push_eh handler
exit 0
handler:
- .tailcall exit_handler()
+ .const 'Sub' $P0 = 'exit_handler'
+ capture_lex $P0
+ .tailcall $P0()
.end
.sub exit_handler :outer(main)
@@ -396,8 +386,6 @@
a = 42
OUTPUT
-}
-
## Regression test for r14697. This probably won't be needed when PDD23 is
## fully implemented.
pir_error_output_like( <<'CODE', <<'OUTPUT', "invoke handler in calling sub", todo => "deprecate rethrow" );
Modified: branches/gc_massacre/t/pmc/filehandle.t
==============================================================================
--- branches/gc_massacre/t/pmc/filehandle.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/filehandle.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -541,7 +541,7 @@
\$I1 = charset line
\$S2 = charsetname \$I1
- if \$S2 == 'unicode' goto ok_3
+ if \$S2 == 'utf8' goto ok_3
print \$S2
print 'not '
ok_3:
Modified: branches/gc_massacre/t/pmc/hashiterator.t
==============================================================================
--- branches/gc_massacre/t/pmc/hashiterator.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/hashiterator.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -4,7 +4,7 @@
=head1 NAME
-t/pmc/hash.t - Test the Hash PMC
+t/pmc/hashiterator.t - Test the HashIterator PMC
=head1 SYNOPSIS
@@ -12,7 +12,7 @@
=head1 DESCRIPTION
-Tests the C<Hash> PMC. Checks key access with various types of
+Tests the C<HashIterator> PMC. Checks key access with various types of
normal and potentially hazardous keys. Does a bit of stress testing as
well.
@@ -23,12 +23,13 @@
.sub main :main
.include 'test_more.pir'
- plan(8)
+ plan(10)
iter_over_empty_hash()
iter_over_single_element()
iter_over_single_element_with_checks()
iter_invalid_type()
+ iter_clone()
.end
.sub 'iter_over_empty_hash'
@@ -37,6 +38,12 @@
it = new 'HashIterator', hash
$I0 = isfalse it
ok($I0, "Iterator for empty Hash is empty")
+
+ # shift_pmc throws on empty Hash but shift_string doesn't.
+
+ $S0 = shift it
+ is($S0, '', 'shift string for empty hash gives empty string')
+
.local pmc eh
.local int i
i = 1
@@ -51,7 +58,7 @@
finalize eh
report:
pop_eh
- ok(i, 'shift for empty hash throws')
+ ok(i, 'shift pmc for empty hash throws')
.end
.sub 'iter_over_single_element'
@@ -104,6 +111,18 @@
ok(i, 'setting invalid type throws')
.end
+.sub iter_clone
+ .local pmc oh, it, cl
+ .local int result
+ oh = new ['Hash']
+ it = iter oh
+
+ # This chekcs the de facto behavior for code coverage purposes.
+ cl = clone it
+ result = isnull cl
+ ok(result, 'clone of HashIterator gives null')
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gc_massacre/t/pmc/hashiteratorkey.t
==============================================================================
--- branches/gc_massacre/t/pmc/hashiteratorkey.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/hashiteratorkey.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,11 +20,22 @@
.sub 'main'
.include 'test_more.pir'
- plan(3)
+ plan(6)
+ 'test_new'()
+ 'test_key_value'()
+ 'test_empty'()
+
+.end
+
+
+.sub 'test_new'
$P0 = new ['HashIteratorKey']
ok(1, "Can create HashIteratorKey directly")
+.end
+
+.sub 'test_key_value'
$P0 = new ['Hash']
$P0['foo'] = 'bar'
$P1 = iter $P0
@@ -36,6 +47,27 @@
.end
+.sub 'test_empty'
+ .local pmc hik, p
+ .local int i
+ .local string s
+ hik = new ['HashIteratorKey']
+
+ # De facto behavior tested for code coverage
+
+ p = hik.'key'()
+ i = isnull p
+ is(i, 1, 'HIK.key gives null when unitialized')
+
+ s = hik
+ is(s, '', 'HIK gives empty string when unitialized')
+
+ # Magic value?
+ i = hik
+ is(i, -1, 'HIK get_integer gives -1')
+.end
+
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gc_massacre/t/pmc/io.t
==============================================================================
--- branches/gc_massacre/t/pmc/io.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/io.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -639,7 +639,7 @@
print $S1
.end
CODE
-unicode
+utf8
utf8
T\xf6tsch
OUTPUT
Modified: branches/gc_massacre/t/pmc/lexinfo.t
==============================================================================
--- branches/gc_massacre/t/pmc/lexinfo.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/lexinfo.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -17,11 +17,15 @@
=cut
+.include 'except_types.pasm'
+
.sub main :main
.include 'test_more.pir'
- plan(3)
+ plan(5)
inspect_test()
+ inspect_invalid_test()
+ declare_lex_preg_test()
.end
.sub inspect_test
@@ -58,6 +62,33 @@
is(have_b, 1, "$b symbol was in list")
.end
+.sub inspect_invalid_test
+ .local pmc li, in, ex
+ .local int r, type
+ li = new ['LexInfo']
+ r = 0
+ push_eh catch
+ in = inspect li, 'fubar'
+ goto done
+ catch:
+ .get_results(ex)
+ type = ex['type']
+ r = iseq type, .EXCEPTION_INVALID_OPERATION
+ done:
+ ok(r, 'invalid introspection key throws as expected')
+.end
+
+.sub declare_lex_preg_test
+ .const string preg_name = 'foo'
+ .const int preg_value = 42
+ .local pmc li
+ li = new ['LexInfo']
+ li.'declare_lex_preg'(preg_name, preg_value)
+ .local int r
+ r = li[preg_name]
+ is(r, preg_value, 'declare_lex_preg method')
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gc_massacre/t/pmc/orderedhashiterator.t
==============================================================================
--- branches/gc_massacre/t/pmc/orderedhashiterator.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/orderedhashiterator.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -23,12 +23,13 @@
.sub 'main'
.include 'test_more.pir'
- plan(6)
+ plan(7)
'test_init'()
'test_bad_type'()
'test_shift'()
'test_pop'()
+ 'test_clone'()
.end
.sub 'test_init'
@@ -113,6 +114,18 @@
ok(i, 'pop_pmc in empty OH throws')
.end
+.sub 'test_clone'
+ .local pmc oh, it, cl
+ .local int result
+ oh = new ['OrderedHash']
+ it = iter oh
+
+ # This chekcs the de facto behavior for code coverage purposes.
+ cl = clone it
+ result = isnull cl
+ ok(result, 'clone of OHI gives null')
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gc_massacre/t/pmc/packfile.t
==============================================================================
--- branches/gc_massacre/t/pmc/packfile.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/packfile.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -24,13 +24,13 @@
.sub main :main
.include 'test_more.pir'
- plan(42)
+ plan(47)
'test_new'()
'test_set_string_native'()
'test_get_string'()
'test_set_string'()
'test_get_integer_keyed_str'()
- 'test_set_integer'()
+ 'test_set_integer_keyed_str'()
'test_get_directory'()
'test_load'()
'test_pack_fresh_packfile'()
@@ -71,6 +71,7 @@
catch:
result = 1
end:
+ pop_eh
is(result, 1, 'set_string_native with invalid data throws')
.end
@@ -87,6 +88,7 @@
set_label eh, unknown_key
push_eh eh
$S0 = pf["foo"]
+ pop_eh
ok(0, "get_string_keyed_int return unknown key")
.return ()
@@ -114,6 +116,7 @@
# Requesting unknown key should throw exception
push_eh unknown_key
pf["foo"] = "fe9ab64082e0f6bbbd7b1e8264127908"
+ pop_eh
ok(0, "set_string_keyed_int set unknown key")
.return ()
@@ -132,6 +135,14 @@
msg = concat msg, ')'
.return(msg)
.end
+.sub 'set_keyed_str_msg'
+ .param string key
+ .local string msg
+ msg = 'set_integer_keyed_str('
+ msg = concat msg, key
+ msg = concat msg, ')'
+ .return(msg)
+.end
# Check the given key in the Packfile pf
.sub 'do_get_integer_keyed_str'
@@ -153,10 +164,9 @@
ok(result, msg)
.end
-.sub 'test_get_integer_keyed_str'
- .local pmc pf, keys
- .local int nkeys, i
-
+# Create a list of the keys for the integer attributes
+.sub 'integer_keys'
+ .local pmc keys
keys = new ['ResizableStringArray']
push keys, 'wordsize'
push keys, 'byteorder'
@@ -166,6 +176,28 @@
push keys, 'version_patch'
push keys, 'bytecode_major'
push keys, 'bytecode_minor'
+ push keys, 'uuid_type'
+ .return(keys)
+.end
+
+# Some keys are still not handled in set_integer_keyed_str
+# Use this list for its test
+.sub 'integer_keys_s'
+ .local pmc keys
+ keys = new ['ResizableStringArray']
+ push keys, 'version_major'
+ push keys, 'version_minor'
+ push keys, 'version_patch'
+ push keys, 'uuid_type'
+ .return(keys)
+.end
+
+
+.sub 'test_get_integer_keyed_str'
+ .local pmc pf, keys
+ .local int nkeys, i
+
+ keys = 'integer_keys'()
nkeys = elements keys
push_eh load_error
@@ -208,29 +240,52 @@
.end
-# Packfile.set_integer_keyed_str
-.sub 'test_set_integer'
- .local pmc pf
- push_eh load_error
- pf = _pbc()
- pop_eh
- $S1 = 'version_major'
- $I0 = pf[$S1]
- $I1 = $I0
- inc $I1
- pf[$S1] = $I1
- $I2 = pf[$S1]
- $I3 = cmp $I0, $I2
- $I3 = cmp $I3, 0
- ok($I3, 'set_integer_keyed_str version bumped')
- .return()
-load_error:
- .get_results($P0)
+.sub 'test_set_integer_keyed_str'
+ .local pmc pf, keys, saved
+ .local int nkeys, i, value, check
+ .local string skey, msg
+ keys = 'integer_keys_s'()
+ nkeys = elements keys
+ pf = new ['Packfile']
+ saved = new ['FixedIntegerArray'], nkeys
+
+ # For each key get its value, set it modified and save the new value
+ # The modified value may be invalid, but we are not going to pack it,
+ # so it shouldn't fail here.
+ i = 0
+ set_next:
+ skey = keys[i]
+ value = pf[skey]
+ inc value
+ pf[skey] = value
+ saved[i] = value
+ inc i
+ if i < nkeys goto set_next
+
+ # Read new values and compare with the saved ones
+ i = 0
+ get_next:
+ skey = keys[i]
+ value = pf[skey]
+ check = saved[i]
+ msg = 'set_keyed_str_msg'(skey)
+ is(value, check, msg)
+ inc i
+ if i < nkeys goto get_next
+
+ i = 0
+ push_eh unknown_key
+ pf["foo"] = value
+ goto done
+ unknown_key:
+ i = 1
+ done:
pop_eh
- report_load_error($P0, 'set_integer_keyed_str version bumped')
+ is(i, 1, "set_integer_keyed_str handle unknown key properly")
.return()
.end
+
# Packfile.get_directory
.sub 'test_get_directory'
.local pmc pf
Modified: branches/gc_massacre/t/pmc/parrotinterpreter.t
==============================================================================
--- branches/gc_massacre/t/pmc/parrotinterpreter.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/parrotinterpreter.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -17,13 +17,15 @@
=cut
+.include 'except_types.pasm'
.sub main :main
.include 'test_more.pir'
- plan(12)
+ plan(13)
test_new() # 1 test
test_hll_map() # 3 tests
+ test_hll_map_invalid() # 1 tests
# Need for testing
.annotate 'foo', 'bar'
@@ -65,6 +67,26 @@
# Switch back to root namespace
.HLL 'parrot'
+.sub test_hll_map_invalid
+ .local pmc eh
+ .local int result
+ $P0 = get_class 'Integer'
+ $P1 = subclass $P0, 'MyInt'
+ $P2 = getinterp
+ eh = new ['ExceptionHandler']
+ set_label eh, catch
+ eh.'handle_types'(.EXCEPTION_INVALID_OPERATION)
+ result = 0
+ push_eh eh
+ $P2.'hll_map'($P0, $P1)
+ goto done
+ catch:
+ finalize eh
+ result = 1
+ done:
+ is(result, 1, 'hll_map outside an HLL throws')
+.end
+
# Test accessors to various Interp fields
.sub 'test_inspect'
.local pmc interp
Modified: branches/gc_massacre/t/pmc/string.t
==============================================================================
--- branches/gc_massacre/t/pmc/string.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/string.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -19,7 +19,7 @@
.sub main :main
.include 'test_more.pir'
- plan(120)
+ plan(121)
set_or_get_strings()
setting_integers()
@@ -586,6 +586,11 @@
$I0 = $P0.'is_integer'('+1')
ok( $I0, '... +1' )
+
+ $S0 = 'abc123abc'
+ $S1 = substr $S0, 3, 3
+ $I0 = $P0.'is_integer'($S1)
+ ok( $I0, '... substr' )
.end
.sub instantiate_str
Modified: branches/gc_massacre/t/pmc/stringbuilder.t
==============================================================================
--- branches/gc_massacre/t/pmc/stringbuilder.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/stringbuilder.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -20,7 +20,7 @@
.sub 'main' :main
.include 'test_more.pir'
- test_create() # 2 tests
+ test_create() # 3 tests
test_init_pmc()
test_push_string()
test_push_pmc() # 4 tests
@@ -37,6 +37,7 @@
emit_with_pos_and_named_args()
test_unicode_conversion_tt1665()
+ test_encodings()
done_testing()
@@ -54,6 +55,12 @@
$S0 = sb
is( $S0, '', '... with empty content')
+ .local pmc ar
+ ar = new ['FixedStringArray']
+ sb = new ['StringBuilder'], ar
+ $I0 = isnull sb
+ not $I0
+ ok( $I0, 'StringBuilder created from empty array' )
.end
.sub 'test_push_string'
@@ -70,9 +77,6 @@
is( $S0, "foo", "... without clobbering first string")
- $I0 = sb
- is( $I0, 128, "... and capacity still 128" )
-
$I0 = sb.'get_string_length'()
is( $I0, 6, "... and string length is correct")
@@ -84,9 +88,6 @@
$S1 = sb
is( $S0, $S1, "Push 128 chars string works")
- $I0 = sb
- is( $I0, 256, "... and capacity increased" )
-
$S99 = repeat "x", 1000
push sb, $S99
@@ -94,9 +95,6 @@
$S1 = sb
is( $S0, $S1, "Push 1000 chars string works")
- $I0 = sb
- is( $I0, 2048, "... and capacity increased" )
-
$S99 = repeat "x", 12000
push sb, $S99
@@ -104,13 +102,11 @@
$S1 = sb
is( $S0, $S1, "Push 10000 chars string works")
- $I0 = sb
- is( $I0, 16384, "... and capacity increased" )
+ null $S99
+ push sb, $S99
- null $S0
- push sb, $S0
- $I0 = sb
- is( $I0, 16384, "push a null string does nothing" )
+ $S1 = sb
+ is( $S0, $S1, "push a null string does nothing" )
.end
.sub 'test_push_pmc'
@@ -333,6 +329,19 @@
is( $S0, $S1, 'init_pmc() should join all passed strings' )
.end
+.sub 'test_encodings'
+ .local pmc sb
+ sb = new ["StringBuilder"]
+
+ push sb, "foo"
+ push sb, iso-8859-1:"\x{E4}\x{F6}\x{FC}"
+ push sb, utf8:unicode:"БДЖ"
+ push sb, "bar"
+
+ $S0 = sb
+ is( $S0, utf8:unicode:"fooäöüБДЖbar", 'push strings with different encodings' )
+.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/gc_massacre/t/pmc/stringhandle.t
==============================================================================
--- branches/gc_massacre/t/pmc/stringhandle.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/pmc/stringhandle.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -665,15 +665,11 @@
.local int i
sh = new ['StringHandle']
- # See TT #1689
- i = sh.'is_tty'()
- say i
i = sh.'isatty'()
say i
.end
CODE
0
-0
OUTPUT
pir_output_is( <<"CODE", <<"OUTPUT", "readall() - utf8 on closed stringhandle" );
Modified: branches/gc_massacre/t/steps/auto/readline-01.t
==============================================================================
--- branches/gc_massacre/t/steps/auto/readline-01.t Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/t/steps/auto/readline-01.t Mon Sep 13 21:23:26 2010 (r48984)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 15;
use Carp;
use Cwd;
use File::Spec;
@@ -23,13 +23,14 @@
my ($args, $step_list_ref) = process_options(
{
- argv => [ ],
+ argv => [ '--without-readline' ],
mode => q{configure},
}
);
my $conf = Parrot::Configure::Step::Test->new;
$conf->include_config_results( $args );
+my $serialized = $conf->pcfreeze();
my $pkg = q{auto::readline};
@@ -37,6 +38,26 @@
$conf->options->set( %{$args} );
my $step = test_step_constructor_and_description($conf);
+my $ret = $step->runstep($conf);
+ok( $ret, "runstep() returned true value" );
+is($step->result(), q{not requested},
+ "Got expected result for 'without-readline'");
+is($conf->data->get('HAS_READLINE'), 0,
+ "Got expected value for HAS_READLINE");
+
+$conf->replenish($serialized);
+
+($args, $step_list_ref) = process_options(
+ {
+ argv => [ ],
+ mode => q{configure},
+ }
+);
+
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+
# Mock values for OS and C-compiler
my ($osname, $cc);
$osname = 'mswin32';
Modified: branches/gc_massacre/tools/build/parrot_config_c.pl
==============================================================================
--- branches/gc_massacre/tools/build/parrot_config_c.pl Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/build/parrot_config_c.pl Mon Sep 13 21:23:26 2010 (r48984)
@@ -5,9 +5,6 @@
use warnings;
use strict;
-my ($svnid) =
- '$Id$' =~ /^\$[iI][dD]:\s(.*)\$$/;
-
=head1 NAME
tools/build/parrot_config_c.pl - Create src/parrot_config.c and variants
@@ -30,8 +27,6 @@
=cut
-use strict;
-
my ( $mini_parrot, $install_parrot );
$mini_parrot = 1 if @ARGV && $ARGV[0] =~ /mini/;
Modified: branches/gc_massacre/tools/dev/fetch_languages.pl
==============================================================================
--- branches/gc_massacre/tools/dev/fetch_languages.pl Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/dev/fetch_languages.pl Mon Sep 13 21:23:26 2010 (r48984)
@@ -231,7 +231,7 @@
{
name => 'pir',
scm => 'GIT',
- repository => 'http://github.com/bacek/pir.git'
+ repository => 'http://github.com/parrot/pir.git'
},
{
Modified: branches/gc_massacre/tools/dev/gen_charset_tables.pl
==============================================================================
--- branches/gc_massacre/tools/dev/gen_charset_tables.pl Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/dev/gen_charset_tables.pl Mon Sep 13 21:23:26 2010 (r48984)
@@ -23,7 +23,7 @@
'$Id$' =~
/^\$[iI][dD]:\s(.*) \$$/;
my $fileid = '$' . 'Id $';
-my $charset_dir = File::Spec->catdir(qw/ src charset /);
+my $charset_dir = File::Spec->catdir(qw/ src string encoding /);
my $coda = <<'EOF';
/*
@@ -110,7 +110,7 @@
}
#
-# create 'src/charset/tables.c'
+# create 'src/encoding/tables.c'
#
###########################################################################
my $c_file = File::Spec->catfile( $charset_dir, 'tables.c' );
@@ -129,7 +129,7 @@
close STDOUT;
#
-# create 'src/charset/tables.h'
+# create 'src/encoding/tables.h'
#
###########################################################################
my $h_file = File::Spec->catfile( $charset_dir, 'tables.h' );
Modified: branches/gc_massacre/tools/dev/headerizer.pl
==============================================================================
--- branches/gc_massacre/tools/dev/headerizer.pl Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/dev/headerizer.pl Mon Sep 13 21:23:26 2010 (r48984)
@@ -329,7 +329,11 @@
# Walk the object files and find corresponding source (either .c or .pmc)
for my $ofile (@ofiles) {
- next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/;
+
+ # Skip files in the src/ops/ subdirectory.
+
+ next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/ || # if run by hand...
+ $ofile =~ m{^src/ops}; # ... or by makefile
$ofile =~ s/\\/\//g;
Modified: branches/gc_massacre/tools/dev/nci_thunk_gen.pir
==============================================================================
--- branches/gc_massacre/tools/dev/nci_thunk_gen.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/dev/nci_thunk_gen.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -313,7 +313,7 @@
str_file = concat str_file, '.str'
.local string head
- head = 'sprintf'(<<'HEAD', c_file, ext_defn, str_file)
+ head = 'sprintf'(<<'HEADSTART', c_file)
/* ex: set ro ft=c:
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
*
@@ -326,7 +326,13 @@
/* %s
* Copyright (C) 2010, Parrot Foundation.
* SVN Info
- * $Id$
+HEADSTART
+
+ # Avoid svn mangling here by hex encoding the dollar signs
+ head = concat head, " * \x{24}Id: \x{24}\n"
+
+ .local string headtail
+ headtail = 'sprintf'(<<'HEAD', ext_defn, str_file)
* Overview:
* Native Call Interface routines. The code needed to build a
* parrot to C call frame is in here
@@ -355,6 +361,7 @@
hackish, but that is just fine */
HEAD
+ head = concat head, headtail
.return (head)
.end
@@ -860,7 +867,7 @@
"temp_tmpl": "char *t_%i; STRING *ts_%i",
"fill_params_tmpl": ", &ts_%i",
"preamble_tmpl": "t_%i = STRING_IS_NULL(ts_%i) ? (char *)NULL : Parrot_str_to_cstring(interp, ts_%i);",
- "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
+ "postamble_tmpl": "if (!STRING_IS_NULL(ts_%i)) Parrot_str_free_cstring(t_%i);" },
"v": { "as_proto": "void",
"return_type": "void *",
"sig_char": "v",
@@ -889,7 +896,7 @@
"temp_tmpl": "char *t_%i; STRING *ts_%i",
"preamble_tmpl": "t_%i = STRING_IS_NULL(ts_%i) ? (char *) NULL : Parrot_str_to_cstring(interp, ts_%i);",
"call_param_tmpl": "&t_%i",
- "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
+ "postamble_tmpl": "if (!STRING_IS_NULL(ts_%i)) Parrot_str_free_cstring(t_%i);" },
"2": { "as_proto": "short *",
"sig_char": "P",
"return_type": "short",
Modified: branches/gc_massacre/tools/dev/pbc_to_exe.pir
==============================================================================
--- branches/gc_massacre/tools/dev/pbc_to_exe.pir Mon Sep 13 20:58:55 2010 (r48983)
+++ branches/gc_massacre/tools/dev/pbc_to_exe.pir Mon Sep 13 21:23:26 2010 (r48984)
@@ -578,10 +578,11 @@
.param int install
$P0 = '_config'()
- .local string cc, ccflags, cc_o_out, osname, build_dir, slash
+ .local string cc, ccflags, optimize, cc_o_out, osname, build_dir, slash
.local string installed, includepath, versiondir
cc = $P0['cc']
ccflags = $P0['ccflags']
+ optimize = $P0['optimize']
cc_o_out = $P0['cc_o_out']
osname = $P0['osname']
build_dir = $P0['build_dir']
@@ -615,6 +616,8 @@
compile .= pathquote
compile .= ' '
compile .= ccflags
+ compile .= ' '
+ compile .= optimize
compile .= ' -c '
compile .= cfile
More information about the parrot-commits
mailing list