diff -Nru parrot-2.7.0/ChangeLog parrot-2.8.0/ChangeLog --- parrot-2.7.0/ChangeLog 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/ChangeLog 2010-09-21 08:04:52.000000000 +0000 @@ -1,8 +1,12 @@ -#1 $Id: ChangeLog 48558 2010-08-18 00:35:41Z mikehh $ +#1 $Id: ChangeLog 49192 2010-09-21 08:04:49Z gerd $ + +2010.09.21 Gerd + * Released 2.8.0 + See NEWS for more. 2010.08.17 mikehh - * Released 2.7.0 - See NEWS for more. + * Released 2.7.0 + See NEWS for more. 2010.07.10 coke * Released 2.6.0 @@ -3865,9 +3869,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: ChangeLog 48558 2010-08-18 00:35:41Z mikehh $ + perlstring.pmc, perlundef.pmc: - genclass.pl attempts to put the Id mark into generated files - but the $Id: ChangeLog 48558 2010-08-18 00:35:41Z mikehh $ 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 diff -Nru parrot-2.7.0/compilers/imcc/cfg.c parrot-2.8.0/compilers/imcc/cfg.c --- parrot-2.7.0/compilers/imcc/cfg.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/cfg.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2009, Parrot Foundation. - * $Id: cfg.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: cfg.c 48923 2010-09-10 23:34:18Z plobsing $ */ /* @@ -29,6 +29,7 @@ #include #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); diff -Nru parrot-2.7.0/compilers/imcc/debug.c parrot-2.8.0/compilers/imcc/debug.c --- parrot-2.7.0/compilers/imcc/debug.c 2010-05-24 21:14:30.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/debug.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ /* - * Copyright (C) 2002-2009, Parrot Foundation. - * $Id: debug.c 46897 2010-05-22 20:50:13Z plobsing $ + * Copyright (C) 2002-2010, Parrot Foundation. + * $Id: debug.c 48923 2010-09-10 23:34:18Z plobsing $ */ /* @@ -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"); diff -Nru parrot-2.7.0/compilers/imcc/imcc.l parrot-2.8.0/compilers/imcc/imcc.l --- parrot-2.7.0/compilers/imcc/imcc.l 2010-05-24 21:14:30.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imcc.l 2010-09-21 07:48:54.000000000 +0000 @@ -30,7 +30,7 @@ * * The tokenizer. * - * $Id: imcc.l 46899 2010-05-22 21:18:30Z plobsing $ + * $Id: imcc.l 48765 2010-09-02 13:16:56Z nwellnhof $ * */ @@ -1457,7 +1457,7 @@ if (((r->pcc_sub->pragma & P_METHOD) || (IMCC_INFO(interp)->cur_unit->is_vtable_method)) && !strcmp(text, "self")) { - valp->sr = mk_ident(interp, "self", 'P'); + valp->sr = mk_ident(interp, "self", 'P', VTIDENTIFIER); IMCC_INFO(interp)->cur_unit->type |= IMC_HAS_SELF; return VAR; } diff -Nru parrot-2.7.0/compilers/imcc/imcc.y parrot-2.8.0/compilers/imcc/imcc.y --- parrot-2.7.0/compilers/imcc/imcc.y 2010-06-02 07:25:48.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imcc.y 2010-09-21 07:48:54.000000000 +0000 @@ -9,7 +9,7 @@ * * Grammar of the PIR language parser. * - * $Id: imcc.y 47282 2010-06-02 05:43:56Z plobsing $ + * $Id: imcc.y 48942 2010-09-11 22:53:19Z NotFound $ * */ @@ -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 - -=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 @@ -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); @@ -1447,7 +1355,7 @@ } if ($3 & VT_NAMED && !($3 & VT_FLAT) && !IMCC_INFO(interp)->adv_named_id) adv_named_set(interp, $2); - $$ = mk_ident(interp, $2, $1); + $$ = mk_ident(interp, $2, $1, VTIDENTIFIER); $$->type |= $3; mem_sys_free($2); } @@ -1730,7 +1638,7 @@ { IdList * const l = $4; SymReg *ignored; - ignored = mk_ident(interp, l->id, $3); + ignored = mk_ident(interp, l->id, $3, VTIDENTIFIER); UNUSED(ignored); IMCC_INFO(interp)->is_def = 0; $$ = 0; @@ -1959,7 +1867,7 @@ IdList *l = $4; while (l) { IdList *l1; - mk_ident(interp, l->id, $3); + mk_ident(interp, l->id, $3, VTIDENTIFIER); l1 = l; l = l->next; mem_sys_free(l1->id); @@ -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: diff -Nru parrot-2.7.0/compilers/imcc/imc.h parrot-2.8.0/compilers/imcc/imc.h --- parrot-2.7.0/compilers/imcc/imc.h 2010-06-11 08:06:09.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imc.h 2010-09-21 07:48:54.000000000 +0000 @@ -1,9 +1,9 @@ /* - * $Id: imc.h 47396 2010-06-05 22:31:52Z plobsing $ + * $Id: imc.h 48943 2010-09-11 23:04:26Z NotFound $ * Copyright (C) 2002-2009, Parrot Foundation. */ -/* $Id: imc.h 47396 2010-06-05 22:31:52Z plobsing $ */ +/* $Id: imc.h 48943 2010-09-11 23:04:26Z NotFound $ */ #ifndef PARROT_IMCC_IMC_H_GUARD #define PARROT_IMCC_IMC_H_GUARD @@ -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; diff -Nru parrot-2.7.0/compilers/imcc/imclexer.c parrot-2.8.0/compilers/imcc/imclexer.c --- parrot-2.7.0/compilers/imcc/imclexer.c 2010-05-24 21:14:30.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imclexer.c 2010-09-21 07:49:46.000000000 +0000 @@ -75,7 +75,6 @@ typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -106,6 +105,8 @@ #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -179,7 +180,15 @@ /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -2425,7 +2434,7 @@ * * The tokenizer. * - * $Id: imclexer.c 46899 2010-05-22 21:18:30Z plobsing $ + * $Id: imclexer.c 48765 2010-09-02 13:16:56Z nwellnhof $ * */ @@ -2514,7 +2523,7 @@ -#line 2518 "compilers/imcc/imclexer.c" +#line 2527 "compilers/imcc/imclexer.c" #define INITIAL 0 #define emit 1 @@ -2649,7 +2658,12 @@ /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -2657,7 +2671,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -2668,7 +2682,7 @@ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -2773,7 +2787,7 @@ return 0; } -#line 2777 "compilers/imcc/imclexer.c" +#line 2791 "compilers/imcc/imclexer.c" if ( !yyg->yy_init ) { @@ -3967,7 +3981,7 @@ #line 725 "compilers/imcc/imcc.l" ECHO; YY_BREAK -#line 3971 "compilers/imcc/imclexer.c" +#line 3985 "compilers/imcc/imclexer.c" case YY_STATE_EOF(pod): case YY_STATE_EOF(cmt1): case YY_STATE_EOF(cmt2): @@ -4756,8 +4770,8 @@ /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ @@ -5914,7 +5928,7 @@ if (((r->pcc_sub->pragma & P_METHOD) || (IMCC_INFO(interp)->cur_unit->is_vtable_method)) && !strcmp(text, "self")) { - valp->sr = mk_ident(interp, "self", 'P'); + valp->sr = mk_ident(interp, "self", 'P', VTIDENTIFIER); IMCC_INFO(interp)->cur_unit->type |= IMC_HAS_SELF; return VAR; } diff -Nru parrot-2.7.0/compilers/imcc/imcparser.c parrot-2.8.0/compilers/imcc/imcparser.c --- parrot-2.7.0/compilers/imcc/imcparser.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imcparser.c 2010-09-21 07:48:54.000000000 +0000 @@ -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 . */ + 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" /* @@ -91,7 +331,7 @@ * * Grammar of the PIR language parser. * - * $Id: imcparser.c 48435 2010-08-12 19:37:47Z chromatic $ + * $Id: imcparser.c 48942 2010-09-11 22:53:19Z NotFound $ * */ @@ -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 - -=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 @@ -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 - -=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 + +=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; @@ -3744,23 +3525,19 @@ } if ((yyvsp[(3) - (3)].t) & VT_NAMED && !((yyvsp[(3) - (3)].t) & VT_FLAT) && !IMCC_INFO(interp)->adv_named_id) adv_named_set(interp, (yyvsp[(2) - (3)].s)); - (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t)); + (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t), VTIDENTIFIER); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); mem_sys_free((yyvsp[(2) - (3)].s)); } 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,279 +3880,209 @@ } 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; - ignored = mk_ident(interp, l->id, (yyvsp[(3) - (4)].t)); + ignored = mk_ident(interp, l->id, (yyvsp[(3) - (4)].t), VTIDENTIFIER); UNUSED(ignored); IMCC_INFO(interp)->is_def = 0; (yyval.sr) = 0; } 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,22 +4215,18 @@ } 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) { IdList *l1; - mk_ident(interp, l->id, (yyvsp[(3) - (4)].t)); + mk_ident(interp, l->id, (yyvsp[(3) - (4)].t), VTIDENTIFIER); l1 = l; l = l->next; mem_sys_free(l1->id); @@ -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... */ diff -Nru parrot-2.7.0/compilers/imcc/imcparser.h parrot-2.8.0/compilers/imcc/imcparser.h --- parrot-2.7.0/compilers/imcc/imcparser.h 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/imcparser.h 2010-09-21 07:48:54.000000000 +0000 @@ -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 . */ + 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 - diff -Nru parrot-2.7.0/compilers/imcc/instructions.c parrot-2.8.0/compilers/imcc/instructions.c --- parrot-2.7.0/compilers/imcc/instructions.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/instructions.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: instructions.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: instructions.c 48923 2010-09-10 23:34:18Z plobsing $ * Copyright (C) 2002-2010, Parrot Foundation. */ @@ -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); diff -Nru parrot-2.7.0/compilers/imcc/instructions.h parrot-2.8.0/compilers/imcc/instructions.h --- parrot-2.7.0/compilers/imcc/instructions.h 2010-05-24 21:14:30.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/instructions.h 2010-09-21 07:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: instructions.h 46897 2010-05-22 20:50:13Z plobsing $ + * $Id: instructions.h 48923 2010-09-10 23:34:18Z plobsing $ * Copyright (C) 2002-2010, Parrot Foundation. */ @@ -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 */ diff -Nru parrot-2.7.0/compilers/imcc/optimizer.c parrot-2.8.0/compilers/imcc/optimizer.c --- parrot-2.7.0/compilers/imcc/optimizer.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/optimizer.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: optimizer.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: optimizer.c 48926 2010-09-11 05:49:57Z plobsing $ * Copyright (C) 2002-2010, Parrot Foundation. */ @@ -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 diff -Nru parrot-2.7.0/compilers/imcc/parser_util.c parrot-2.8.0/compilers/imcc/parser_util.c --- parrot-2.7.0/compilers/imcc/parser_util.c 2010-06-11 08:06:09.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/parser_util.c 2010-09-21 07:48:54.000000000 +0000 @@ -8,7 +8,7 @@ * * parser support functions * - * $Id: parser_util.c 47396 2010-06-05 22:31:52Z plobsing $ + * $Id: parser_util.c 49126 2010-09-18 03:03:26Z plobsing $ * */ @@ -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 +=item C 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]; @@ -247,16 +267,18 @@ IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "The opcode '%s' needs arguments", name); - r[0] = mk_const(interp, r[0]->name, 'P'); - r[0]->pmc_type = enum_class_FixedIntegerArray; + if (r[0]->set == 'S') { + r[0] = mk_const(interp, r[0]->name, 'P'); + 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 +331,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 +385,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 +450,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 +471,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 +481,7 @@ } } - if (op_info->jump) { + if (op->jump) { ins->type |= ITBRANCH; /* TODO use opnum constants */ if (STREQ(name, "branch") @@ -791,7 +819,7 @@ const char *ext; FILE *fp; STRING *fs; - PMC *ignored; + PMC *newcontext; /* need at least 3 regs for compilation of constant math e.g. * add_i_ic_ic - see also IMCC_subst_constants() */ @@ -805,7 +833,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, @@ -816,9 +845,6 @@ IMCC_fatal(interp, EXCEPTION_EXTERNAL_ERROR, "imcc_compile_file: couldn't open '%s'\n", fullname); - IMCC_INFO(interp)->cur_namespace = NULL; - interp->code = NULL; - IMCC_push_parser_state(interp); { /* Store a copy, in order to know how to free it later */ @@ -835,8 +861,13 @@ * which can destroy packfiles under construction */ Parrot_block_GC_mark(interp); - ignored = Parrot_push_context(interp, regs_used); - UNUSED(ignored); + + /* Activate a new context and reset it to initial values */ + newcontext = Parrot_push_context(interp, regs_used); + Parrot_pcc_set_HLL(interp, newcontext, 0); + Parrot_pcc_set_sub(interp, newcontext, 0); + IMCC_INFO(interp)->cur_namespace = NULL; + interp->code = NULL; if (ext && STREQ(ext, ".pasm")) { void *yyscanner; @@ -962,8 +993,8 @@ /* -=item C +=item C Try to find valid op doing the same operation e.g. @@ -978,7 +1009,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) { @@ -1014,11 +1046,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; } /* diff -Nru parrot-2.7.0/compilers/imcc/pbc.c parrot-2.8.0/compilers/imcc/pbc.c --- parrot-2.7.0/compilers/imcc/pbc.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/pbc.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2010, Parrot Foundation. - * $Id: pbc.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: pbc.c 49011 2010-09-15 03:00:51Z plobsing $ */ #include "imc.h" @@ -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)STRING_compare_distinct_cs_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; @@ -739,11 +738,11 @@ /* op not yet mapped */ bc->op_count++; bc->op_func_table = - mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count, + mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count - 1, op_func_t); bc->op_func_table[bc->op_count - 1] = op_func; bc->op_info_table = - mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count, + mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count - 1, op_info_t *); bc->op_info_table[bc->op_count - 1] = info; @@ -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; } @@ -1305,7 +1306,7 @@ } } - if (!lex_info && (unit->outer || need_lex)) { + if (!lex_info && need_lex) { lex_info = Parrot_pmc_new_noinit(interp, lex_info_id); VTABLE_init_pmc(interp, lex_info, sub_pmc); } @@ -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) { @@ -2376,7 +2379,7 @@ &interp->initial_pf->directory; interp->code->annotations = (PackFile_Annotations *) PackFile_Segment_new_seg(interp, dir, - PF_ANNOTATIONS_SEG, name, add); + PF_ANNOTATIONS_SEG, name, 1); interp->code->annotations->code = interp->code; /* Create initial group. */ @@ -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 */ diff -Nru parrot-2.7.0/compilers/imcc/pcc.c parrot-2.8.0/compilers/imcc/pcc.c --- parrot-2.7.0/compilers/imcc/pcc.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/pcc.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (C) 2003-2010, Parrot Foundation. - * $Id: pcc.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: pcc.c 49126 2010-09-18 03:03:26Z plobsing $ */ /* @@ -29,6 +29,7 @@ #include #include "imc.h" #include "parser.h" +#include "parrot/oplib/core_ops.h" /* HEADERIZER HFILE: compilers/imcc/imc.h */ @@ -353,7 +354,8 @@ bufpos--; memcpy(buf+bufpos, subf, lensubf); - regs[0] = mk_const(interp, buf, 'S'); + regs[0] = mk_const(interp, buf, 'P'); + regs[0]->pmc_type = enum_class_FixedIntegerArray; ins = insINS(interp, unit, ins, op_name, regs, n + 1); if (n >= PCC_GET_ARGS_LIMIT) { @@ -675,6 +677,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 +699,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 +752,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; } diff -Nru parrot-2.7.0/compilers/imcc/reg_alloc.c parrot-2.8.0/compilers/imcc/reg_alloc.c --- parrot-2.7.0/compilers/imcc/reg_alloc.c 2010-06-11 08:06:09.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/reg_alloc.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: reg_alloc.c 47418 2010-06-06 03:42:16Z plobsing $ + * $Id: reg_alloc.c 48822 2010-09-07 18:33:00Z plobsing $ * Copyright (C) 2003-2009, Parrot Foundation. */ @@ -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 diff -Nru parrot-2.7.0/compilers/imcc/Rules.in parrot-2.8.0/compilers/imcc/Rules.in --- parrot-2.7.0/compilers/imcc/Rules.in 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/Rules.in 2010-09-21 07:48:54.000000000 +0000 @@ -10,6 +10,8 @@ compilers/imcc/symreg.h \ compilers/imcc/unit.h \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ $(PARROT_H_HEADERS) compilers/imcc/instructions$(O) : \ @@ -24,6 +26,8 @@ compilers/imcc/symreg.h \ compilers/imcc/unit.h \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ $(PARROT_H_HEADERS) compilers/imcc/pbc$(O) : \ @@ -37,6 +41,8 @@ compilers/imcc/symreg.h \ compilers/imcc/unit.h \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ $(PARROT_H_HEADERS) \ include/pmc/pmc_sub.h @@ -83,6 +89,8 @@ compilers/imcc/symreg.h \ compilers/imcc/unit.h \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ $(PARROT_H_HEADERS) compilers/imcc/debug$(O) : \ @@ -163,6 +171,8 @@ compilers/imcc/symreg.h \ compilers/imcc/unit.h \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ $(PARROT_H_HEADERS) $(CC) $(CFLAGS) @optimize::compilers/imcc/optimizer.c@ @ccwarn::compilers/imcc/optimizer.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c compilers/imcc/optimizer.c diff -Nru parrot-2.7.0/compilers/imcc/symreg.c parrot-2.8.0/compilers/imcc/symreg.c --- parrot-2.7.0/compilers/imcc/symreg.c 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/symreg.c 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (C) 2002-2010, Parrot Foundation. - * $Id: symreg.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: symreg.c 48838 2010-09-07 23:52:26Z chromatic $ */ /* @@ -634,7 +634,7 @@ /* -=item C +=item C Makes a new identifier. @@ -645,18 +645,17 @@ PARROT_CANNOT_RETURN_NULL PARROT_IGNORABLE_RESULT SymReg * -mk_ident(PARROT_INTERP, ARGIN(const char *name), int t) +mk_ident(PARROT_INTERP, ARGIN(const char *name), int t, INTVAL type) { ASSERT_ARGS(mk_ident) char * const fullname = _mk_fullname(interp, IMCC_INFO(interp)->namespace_stack, name); SymReg *r = get_sym_by_name(&(IMCC_INFO(interp)->cur_unit->hash), name); - if (r && r->set != t) + if (r && (r->set != t || r->type != type)) IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "syntax error, duplicated IDENTIFIER '%s'\n", fullname); r = mk_symreg(interp, fullname, t); - r->type = VTIDENTIFIER; - + r->type = type; if (IMCC_INFO(interp)->namespace_stack) { Identifier * const ident = mem_gc_allocate_zeroed_typed(interp, Identifier); @@ -768,16 +767,17 @@ "global PMC constant not allowed"); r = _mk_symreg(interp, &IMCC_INFO(interp)->ghash, name, t); + + r->type = VT_CONSTP; } else { - r = mk_ident(interp, name, t); + r = mk_ident(interp, name, t, VT_CONSTP); if (t == 'P') return mk_pmc_const_2(interp, IMCC_INFO(interp)->cur_unit, r, val); } - r->type = VT_CONSTP; - r->reg = val; + r->reg = val; return r; } @@ -1256,6 +1256,30 @@ /* +=item C + +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 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; diff -Nru parrot-2.7.0/compilers/imcc/symreg.h parrot-2.8.0/compilers/imcc/symreg.h --- parrot-2.7.0/compilers/imcc/symreg.h 2010-05-12 11:58:46.000000000 +0000 +++ parrot-2.8.0/compilers/imcc/symreg.h 2010-09-21 07:48:54.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: symreg.h 46485 2010-05-11 03:47:50Z plobsing $ + * $Id: symreg.h 48838 2010-09-07 23:52:26Z chromatic $ * Copyright (C) 2002-2009, Parrot Foundation. */ @@ -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); @@ -239,7 +282,10 @@ PARROT_CANNOT_RETURN_NULL PARROT_IGNORABLE_RESULT -SymReg * mk_ident(PARROT_INTERP, ARGIN(const char *name), int t) +SymReg * mk_ident(PARROT_INTERP, + ARGIN(const char *name), + int t, + INTVAL type) __attribute__nonnull__(1) __attribute__nonnull__(2); @@ -362,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 = (\ @@ -419,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 */ /* diff -Nru parrot-2.7.0/compilers/opsc/ops2c.nqp parrot-2.8.0/compilers/opsc/ops2c.nqp --- parrot-2.7.0/compilers/opsc/ops2c.nqp 2010-06-11 08:06:09.000000000 +0000 +++ parrot-2.8.0/compilers/opsc/ops2c.nqp 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ #! ./parrot-nqp -# $Id: ops2c.nqp 47428 2010-06-06 08:32:34Z cotto $ +# $Id: ops2c.nqp 48736 2010-08-31 15:49:14Z cotto $ pir::load_bytecode("opsc.pbc"); pir::load_bytecode("Getopt/Obj.pbc"); @@ -75,7 +75,7 @@ -h --help print this usage information -n --no-lines do not print #line directives in generated C code (line numbers are not currently supported) -#debugging options: +debugging options: -g --debug perform all processing but do not write to any files "); pir::exit(0); diff -Nru parrot-2.7.0/compilers/opsc/src/Ops/Emitter.pm parrot-2.8.0/compilers/opsc/src/Ops/Emitter.pm --- parrot-2.7.0/compilers/opsc/src/Ops/Emitter.pm 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/compilers/opsc/src/Ops/Emitter.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,6 +1,6 @@ #! nqp # Copyright (C) 2010, Parrot Foundation. -# $Id: Emitter.pm 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: Emitter.pm 48926 2010-09-11 05:49:57Z plobsing $ class Ops::Emitter is Hash; @@ -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 ?? '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 ?? 'PARROT_EXPORT' !! '') ~ qq| +op_lib_t *{self.init_func}(PARROT_INTERP, long init); |); } diff -Nru parrot-2.7.0/compilers/opsc/src/Ops/File.pm parrot-2.8.0/compilers/opsc/src/Ops/File.pm --- parrot-2.7.0/compilers/opsc/src/Ops/File.pm 2010-05-28 05:23:33.000000000 +0000 +++ parrot-2.8.0/compilers/opsc/src/Ops/File.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,6 +1,6 @@ #! nqp # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: File.pm 47049 2010-05-27 06:24:01Z cotto $ +# $Id: File.pm 48736 2010-08-31 15:49:14Z cotto $ # XXX Better to put this into docs/ somewhere. @@ -296,13 +296,37 @@ method _set_version() { my $config := _config(); - my $version := $config; + my $version_filename; + if $config { + $version_filename := + $config ~ + $config ~ + $config ~ + 'VERSION'; + } + else { + $version_filename := + $config ~ + $config ~ + 'VERSION'; + } + + grammar VERSION { + rule TOP { } + rule version { $=(\d+) '.' $=(\d+) '.' $=(\d+) } + } + + my $version := slurp($version_filename); + my $version_match := VERSION.parse($version); #say("# $version"); - my @bits := split('.', $version); - self := @bits[0]; - self := @bits[1]; - self := @bits[2]; - self := @bits; + self := +$version_match; + self := +$version_match; + self := +$version_match; + self := [ + +self, + +self, + +self, + ]; } # Local Variables: diff -Nru parrot-2.7.0/compilers/pct/src/PAST/Compiler.pir parrot-2.8.0/compilers/pct/src/PAST/Compiler.pir --- parrot-2.7.0/compilers/pct/src/PAST/Compiler.pir 2010-08-06 11:23:32.000000000 +0000 +++ parrot-2.8.0/compilers/pct/src/PAST/Compiler.pir 2010-09-21 07:48:53.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Compiler.pir 48330 2010-08-05 13:41:24Z coke $ +# $Id: Compiler.pir 48865 2010-09-08 19:26:46Z pmichaud $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/compilers/pct/src/PCT/HLLCompiler.pir parrot-2.8.0/compilers/pct/src/PCT/HLLCompiler.pir --- parrot-2.7.0/compilers/pct/src/PCT/HLLCompiler.pir 2010-08-17 18:07:25.000000000 +0000 +++ parrot-2.8.0/compilers/pct/src/PCT/HLLCompiler.pir 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: HLLCompiler.pir 48547 2010-08-17 05:37:29Z pmichaud $ +# $Id: HLLCompiler.pir 48866 2010-09-08 19:26:52Z pmichaud $ =head1 NAME @@ -955,6 +955,70 @@ .return ($P0) .end +=item lineof(target, pos [, cache :named('cache')]) + +Return the line number of offset C within C. The return +value uses zero for the first line. If C is true, then +memoize the line offsets as a C property on C. + +=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 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. When we + # find one, mark the ending offset of the line in C. + 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, so now we search the array for the largest + # element that is not greater than C. 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 with C according to C. diff -Nru parrot-2.7.0/compilers/pct/src/POST/Compiler.pir parrot-2.8.0/compilers/pct/src/POST/Compiler.pir --- parrot-2.7.0/compilers/pct/src/POST/Compiler.pir 2010-06-11 08:06:09.000000000 +0000 +++ parrot-2.8.0/compilers/pct/src/POST/Compiler.pir 2010-09-21 07:48:53.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Compiler.pir 47412 2010-06-06 01:08:23Z pmichaud $ +# $Id: Compiler.pir 48866 2010-09-08 19:26:52Z pmichaud $ =head1 NAME @@ -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) diff -Nru parrot-2.7.0/config/auto/gcc.pm parrot-2.8.0/config/auto/gcc.pm --- parrot-2.7.0/config/auto/gcc.pm 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/config/auto/gcc.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2007, Parrot Foundation. -# $Id: gcc.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: gcc.pm 48890 2010-09-09 20:54:16Z nwellnhof $ =head1 NAME @@ -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; diff -Nru parrot-2.7.0/config/auto/llvm/hello.c parrot-2.8.0/config/auto/llvm/hello.c --- parrot-2.7.0/config/auto/llvm/hello.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/config/auto/llvm/hello.c 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,41 @@ +/* + * +Copyright (C) 2009, Parrot Foundation. +$Id: hello.c 48741 2010-09-01 01:57:31Z jkeenan $ + +=head1 + +Test file only. + +=over 4 + +=item C + +Test file only. + +=cut + +*/ + +#include + +int main() { + printf("hello world\n"); + return 0; +} + +/* + +=back + +=cut + +*/ + + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/config/auto/llvm.pm parrot-2.8.0/config/auto/llvm.pm --- parrot-2.7.0/config/auto/llvm.pm 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/config/auto/llvm.pm 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,247 @@ +# Copyright (C) 2009, Parrot Foundation. +# $Id: llvm.pm 48741 2010-09-01 01:57:31Z jkeenan $ + +=head1 NAME + +config/auto/llvm - Check whether the Low Level Virtual Machine is present + +=head1 DESCRIPTION + +Determines whether the Low Level Virtual Machine (LLVM) is installed and +functional on the system. It is OK when it +doesn't exist. + +=cut + +package auto::llvm; + +use strict; +use warnings; + +use base qw(Parrot::Configure::Step); + +use Parrot::Configure::Utils ':auto'; + +sub _init { + my $self = shift; + my %data; + $data{description} = q{Is LLVM installed}; + $data{result} = q{}; + $data{llvm_components} = [ + [ 'llvm-gcc' => 'llvm-gcc' ], + [ 'lli' => 'Low Level Virtual Machine' ], + [ 'llc' => 'Low Level Virtual Machine' ], + ]; + return \%data; +} + +sub runstep { + my ( $self, $conf ) = @_; + + my $verbose = $conf->options->get( 'verbose' ); + + # We start by seeing whether we can run three LLVM component executables, + # each with the '--version' option, and get the expected output. + + my $llvm_lacking = 0; + foreach my $prog ( @{ $self->{llvm_components} } ) { + my $output = capture_output( $prog->[0], '--version' ); + $llvm_lacking = _handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose + ); + } + my $output = q{}; + $output = capture_output( 'llvm-gcc', '--version' ); + + # Next, we make sure we have at least major version 4 of 'llvm-gcc' + $llvm_lacking = _examine_llvm_gcc_version( + $output, $llvm_lacking, $verbose + ); + + # Finally, we see whether our LLVM actually works. + if ( $llvm_lacking ) { + $self->_handle_result( $conf, 0 ); + } + else { + + # Here we will take a simple C file, compile it into an LLVM bitcode + # file, execute it as bitcode, then compile it to native assembly + # using the LLC code generator, then assemble the native assembly + # language file into a program and execute it. Cf.: + # http://llvm.org/releases/2.5/docs/GettingStarted.html#overview + + my $stem = q|hello|; + my $cfile = qq|$stem.c|; + my $fullcfile = qq|config/auto/llvm/$cfile|; + my $bcfile = qq|$stem.bc|; + my $sfile = qq|$stem.s|; + my $nativefile = qq|$stem.native|; + eval { + system(qq{llvm-gcc -O3 -emit-llvm $fullcfile -c -o $bcfile}); + }; + if ($@) { + $self->_handle_failure_to_compile_into_bitcode( $conf, $verbose ); + } + else { + my $output; + eval { + $output = capture_output( 'lli', $bcfile ); + }; + if ( $@ or $output !~ /hello world/ ) { + $self->_handle_failure_to_execute_bitcode( $conf, $verbose ); + } + else { + eval { + system(qq{llc $bcfile -o $sfile}); + }; + if ( $@ or (! -e $sfile) ) { + $self->_handle_failure_to_compile_to_assembly( + $conf, $verbose ); + } + else { + eval { + my $cc = $conf->data->get('cc'); + system(qq{$cc $sfile -o $nativefile}); + }; + if ( $@ or (! -e $nativefile) ) { + $self->_handle_failure_to_assemble_assembly( + $conf, $verbose ); + } + else { + eval { + $output = capture_output(qq{./$nativefile}); + }; + $self->_handle_native_assembly_output( + $conf, $output, $verbose + ); + } + } + } + } + my $count_unlinked = _cleanup_llvm_files( + $bcfile, $sfile, $nativefile + ); + $conf->cc_clean(); + } + + return 1; +} + +sub _handle_component_version_output { + my ($prog, $output, $llvm_lacking, $verbose) = @_; + my $exp = $prog->[1]; + unless ( defined($output) and $output =~ m/$exp/s ) { + $llvm_lacking++; + print "Could not get expected '--version' output for $prog->[0]\n" + if $verbose; + } + else { + print $output, "\n" if $verbose; + } + return $llvm_lacking; +} + +sub _examine_llvm_gcc_version { + my ( $output, $llvm_lacking, $verbose ) = @_; + if (! $output) { + $llvm_lacking++; + } + else { + my @line = split /\n+/, $output; + if ( $line[0] =~ m/\b(\d+)\.(\d+)\.(\d+)\b/ ) { + my @version = ($1, $2, $3); + if ($version[0] < 4) { + print "llvm-gcc must be at least major version 4\n" + if $verbose; + $llvm_lacking++; + } + } + else { + print "Unable to extract llvm-gcc major, minor and patch versions\n" + if $verbose; + $llvm_lacking++; + } + } + return $llvm_lacking; +} + +sub _handle_failure_to_compile_into_bitcode { + my ($self, $conf, $verbose ) = @_; + print "Unable to compile C file into LLVM bitcode file\n" + if $verbose; + $self->_handle_result( $conf, 0 ); +} + +sub _handle_failure_to_execute_bitcode { + my ($self, $conf, $verbose ) = @_; + print "Unable to run LLVM bitcode file with 'lli'\n" + if $verbose; + $self->_handle_result( $conf, 0 ); +} + +sub _handle_failure_to_compile_to_assembly { + my ($self, $conf, $verbose ) = @_; + print "Unable to compile program to native assembly using 'llc'\n" + if $verbose; + $self->_handle_result( $conf, 0 ); +} + +sub _handle_failure_to_assemble_assembly { + my ($self, $conf, $verbose ) = @_; + print "Unable to assemble native assembly into program\n" + if $verbose; + $self->_handle_result( $conf, 0 ); +} + +sub _handle_result { + my ($self, $conf, $result) = @_; + if ( $result ) { + $self->set_result('yes'); + $conf->data->set( has_llvm => 1 ); + } + else { + $self->set_result('no'); + $conf->data->set( has_llvm => '' ); + } + return 1; +} + +sub _handle_native_assembly_output { + my ($self, $conf, $output, $verbose) = @_; + if ( $@ or ( $output !~ /hello world/ ) ) { + print "Unable to execute native assembly program successfully\n" + if $verbose; + $self->_handle_result( $conf, 0 ); + } + else { + $self->_handle_result( $conf, 1 ); + } +} + +sub _cleanup_llvm_files { + my @llvm_files = @_; + my $count_unlinked = 0; + foreach my $f ( @llvm_files ) { + if ( defined($f) and ( -e $f ) ) { + unlink $f; + $count_unlinked++; + } + } + return $count_unlinked; +}; + +1; + +=head1 AUTHOR + +James E Keenan + +=cut + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: + diff -Nru parrot-2.7.0/config/auto/msvc.pm parrot-2.8.0/config/auto/msvc.pm --- parrot-2.7.0/config/auto/msvc.pm 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/config/auto/msvc.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2005-2007, Parrot Foundation. -# $Id: msvc.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: msvc.pm 48890 2010-09-09 20:54:16Z nwellnhof $ =head1 NAME @@ -89,6 +89,9 @@ # for details. $conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" ); } + + $conf->data->set( noinline => '__declspec(noinline)' ); + return 1; } diff -Nru parrot-2.7.0/config/auto/pcre.pm parrot-2.8.0/config/auto/pcre.pm --- parrot-2.7.0/config/auto/pcre.pm 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/config/auto/pcre.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2008, Parrot Foundation. -# $Id: pcre.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: pcre.pm 48972 2010-09-13 07:38:06Z mikehh $ =head1 NAME @@ -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; } diff -Nru parrot-2.7.0/config/auto/pmc.pm parrot-2.8.0/config/auto/pmc.pm --- parrot-2.7.0/config/auto/pmc.pm 2010-03-05 22:14:41.000000000 +0000 +++ parrot-2.8.0/config/auto/pmc.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: pmc.pm 44653 2010-03-05 17:07:35Z coke $ +# $Id: pmc.pm 48602 2010-08-23 00:32:02Z jkeenan $ =head1 NAME @@ -36,9 +36,12 @@ sub runstep { my ( $self, $conf ) = @_; - my @pmc = sort_pmcs( @{ $self->{srcpmc} } ); - - my $pmc_list = join( ' ', grep { defined $_ } @pmc ); + # $pmc_list is a string holding a space-delimited list of currently active + # PMCs, sorted (largely) on the basis of src/pmc/pmc.num. + # (By 'current', we take into account the fact that there are PMCs listed + # in src/pmc/pmc.num that no longer exist but whose index numbers are + # never deleted.) + my $pmc_list = get_sorted_pmc_str( @{ $self->{srcpmc} } ); # names of class files for src/pmc/Makefile ( my $TEMP_pmc_o = $pmc_list ) =~ s/\.pmc/\$(O)/g; @@ -216,23 +219,20 @@ return @parents; } +# Internal sub get_pmc_order parses src/pmc/pmc.num. The hash it builds +# includes both active and deactivated PMCs. sub get_pmc_order { open my $IN, '<', 'src/pmc/pmc.num' or die "Can't read src/pmc/pmc.num"; my %order; while (<$IN>) { - next if /^#/; - - if (/(\w+\.\w+)\s+(\d+)/) { - $order{$1} = $2; - } + next unless (/^(\w+\.\w+)\s+(\d+)$/); + $order{$1} = $2; } - close $IN; - return \%order; } -sub sort_pmcs { +sub get_sorted_pmc_str { my @pmcs = @_; my $pmc_order = get_pmc_order(); my $n = keys %$pmc_order; @@ -247,7 +247,41 @@ } } - return @sorted_pmcs; + # With the test for definedness below, we account for PMCs which have been + # deactivated but whose index numbers remain in src/pmc/pmc.num. + my $active_pmcs = [ grep { defined $_ } @sorted_pmcs ]; + + # At this point we check to see whether any active_pmcs are missing from + # the MANIFEST. We warn about any such missing PMCs but (for the time + # being at least) we proceed to compose $pmc_str. + my $seen_manifest = pmcs_in_manifest(); + check_pmcs_against_manifest( $active_pmcs, $seen_manifest ); + return join(' ' => @{ $active_pmcs }); +} + +sub pmcs_in_manifest { + my $manifest = shift || 'MANIFEST'; + my %seen_manifest = (); + open my $MAN, '<', $manifest + or die "Unable to open MANIFEST: $!"; + while (my $f = <$MAN>) { + chomp $f; + if ($f =~ m{^src/pmc/(.*\.pmc)}) { + my $pmc = $1; + $seen_manifest{$pmc}++; + } + } + close $MAN or die "Unable to close MANIFEST: $!"; + return \%seen_manifest; +} + +sub check_pmcs_against_manifest { + my ($active_pmcs, $seen_manifest) = @_; + my @missing_from_manifest = grep { ! exists $seen_manifest->{$_} } + @{ $active_pmcs }; + if (@missing_from_manifest) { + warn "PMCs found in /src/pmc not found in MANIFEST: @missing_from_manifest"; + } } sub contains_pccmethod { diff -Nru parrot-2.7.0/config/auto/readline.pm parrot-2.8.0/config/auto/readline.pm --- parrot-2.7.0/config/auto/readline.pm 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/config/auto/readline.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: readline.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: readline.pm 48925 2010-09-11 01:21:55Z jkeenan $ =head1 NAME @@ -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'); diff -Nru parrot-2.7.0/config/auto/sizes/intval_maxmin_c.in parrot-2.8.0/config/auto/sizes/intval_maxmin_c.in --- parrot-2.7.0/config/auto/sizes/intval_maxmin_c.in 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/config/auto/sizes/intval_maxmin_c.in 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2008-2009, Parrot Foundation. - $Id: intval_maxmin_c.in 48412 2010-08-11 05:38:18Z plobsing $ + $Id: intval_maxmin_c.in 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ */ #if @i_limits@ == "define" diff -Nru parrot-2.7.0/config/gen/config_h/config_h.in parrot-2.8.0/config/gen/config_h/config_h.in --- parrot-2.7.0/config/gen/config_h/config_h.in 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/config/gen/config_h/config_h.in 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ /* Copyright (C) 2001-2009, Parrot Foundation. - * $Id: config_h.in 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: config_h.in 48923 2010-09-10 23:34:18Z plobsing $ */ /* config.h @@ -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_@jitcpu@ 1 /* Oplib and dynamic ops related. */ -#define PARROT_CORE_OPLIB_NAME "core_ops" -#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_@MAJOR@_@MINOR@_@PATCH@ +#define PARROT_CORE_OPLIB_NAME "core_ops" +#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_@MAJOR@_@MINOR@_@PATCH@ + +#define PARROT_GET_CORE_OPLIB(i) PARROT_CORE_OPLIB_INIT((i), 1) /* ICU. */ #define PARROT_HAS_ICU @has_icu@ diff -Nru parrot-2.7.0/config/gen/makefiles/root.in parrot-2.8.0/config/gen/makefiles/root.in --- parrot-2.7.0/config/gen/makefiles/root.in 2010-08-17 18:07:26.000000000 +0000 +++ parrot-2.8.0/config/gen/makefiles/root.in 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: root.in 48548 2010-08-17 12:09:53Z petdance $ +# $Id: root.in 49088 2010-09-17 17:51:12Z nwellnhof $ ############################################################################### # @@ -47,8 +47,13 @@ # where we're building parrot from (needed for pbc_to_exe) BUILD_DIR = @build_dir@ -# directory for build tools +# directory for build tools: +# programs, templates, configuration files invoked by 'make all' +# (with or without command-line options) BUILD_TOOLS_DIR = tools/build +# directory for developers' tools +# programs, templates, configuration files NOT invoked by 'make all' +DEV_TOOLS_DIR = tools/dev # directory for header files INC_DIR = @inc@ @@ -116,7 +121,7 @@ NONGEN_HEADERS = @TEMP_nongen_headers@ # The headerizer -HEADERIZER = $(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl +HEADERIZER = $(PERL) $(DEV_TOOLS_DIR)/headerizer.pl include src/dynpmc/Defines.mak include src/dynoplibs/Defines.mak @@ -220,7 +225,8 @@ .parrot_current_rev \ #IF(has_opengl): runtime/parrot/include/opengl_defines.pasm \ #IF(has_opengl): runtime/parrot/library/OpenGL_funcs.pir \ - runtime/parrot/include/signal.pasm + runtime/parrot/include/signal.pasm \ + tools/dev/mk_language_shell.pl ############################################################################### @@ -362,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 \ @@ -411,11 +416,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) \ @@ -434,8 +448,6 @@ src/string/api$(O) \ src/ops/core_ops$(O) \ #IF(i386_has_gcc_cmpxchg): src/atomic/gcc_x86$(O) \ - src/byteorder$(O) \ - src/string/charset$(O) \ src/core_pmcs$(O) \ src/datatypes$(O) \ src/debug$(O) \ @@ -452,6 +464,7 @@ src/gc/gc_inf$(O) \ src/gc/mark_sweep$(O) \ src/gc/system$(O) \ + src/gc/string_gc$(O) \ src/global_setup$(O) \ src/hash$(O) \ src/hll$(O) \ @@ -678,6 +691,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 \ @@ -842,12 +856,12 @@ @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 -$(PBC_TO_EXE) : tools/dev/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) - $(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir +$(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) + $(PARROT) -o pbc_to_exe.pbc $(DEV_TOOLS_DIR)/pbc_to_exe.pir $(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc -parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT) - $(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir +parrot_nci_thunk_gen.pbc : $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT) + $(PARROT) -o parrot_nci_thunk_gen.pbc $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE) $(PBC_TO_EXE) parrot_nci_thunk_gen.pbc @@ -858,8 +872,8 @@ $(PROVE) : parrot-prove.pbc $(PARROT) $(PBC_TO_EXE) $(PBC_TO_EXE) parrot-prove.pbc -$(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE) - $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir +$(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE) + $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) pbc_to_exe.pbc parrot_config.pbc $(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \ @@ -908,11 +922,17 @@ src/oo$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_class.h src/oo.c \ include/pmc/pmc_object.h src/oo.str $(INC_DIR)/oo_private.h -src/scheduler$(O) : $(PARROT_H_HEADERS) src/scheduler.str src/scheduler.c \ - include/pmc/pmc_scheduler.h include/pmc/pmc_task.h \ - include/pmc/pmc_timer.h \ - $(INC_DIR)/scheduler_private.h \ - $(INC_DIR)/runcore_api.h +src/scheduler$(O) : \ + $(PARROT_H_HEADERS) \ + src/scheduler.str \ + src/scheduler.c \ + include/pmc/pmc_scheduler.h \ + include/pmc/pmc_task.h \ + include/pmc/pmc_timer.h \ + $(INC_DIR)/extend.h \ + $(INC_DIR)/extend_vtable.h \ + $(INC_DIR)/scheduler_private.h \ + $(INC_DIR)/runcore_api.h src/io/core$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/io/core.c @@ -929,17 +949,16 @@ O_FILES = \ $(INTERP_O_FILES) \ - $(CHARSET_O_FILES) \ $(IO_O_FILES) \ $(CLASS_O_FILES) \ $(ENCODING_O_FILES) \ $(IMCC_O_FILES) lib_deps_object : $(O_FILES) - $(PERL) tools/dev/lib_deps.pl object $(O_FILES) + $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl object $(O_FILES) lib_deps_source : $(GENERAL_H_FILES) - $(PERL) tools/dev/lib_deps.pl source all_source + $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl source all_source lib_deps : lib_deps_object lib_deps_source @@ -969,7 +988,7 @@ $(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE) - $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir + $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir $(PBC_TO_EXE) parrot_config.pbc --install $(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O) @@ -1035,8 +1054,13 @@ src/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) #IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1 -src/pbc_dump$(O) : $(INC_DIR)/embed.h $(INC_DIR)/oplib/ops.h \ - $(PARROT_H_HEADERS) src/pbc_dump.c +src/pbc_dump$(O) : \ + $(INC_DIR)/embed.h \ + $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(PARROT_H_HEADERS) \ + $(INC_DIR)/runcore_api.h \ + src/pbc_dump.c $(INSTALLABLEPDUMP) : src/pbc_dump$(O) src/packdump$(O) \ src/install_config$(O) $(LIBPARROT) @@ -1236,14 +1260,16 @@ # ############################################################################### -src/byteorder$(O) : $(PARROT_H_HEADERS) src/byteorder.c - src/datatypes$(O) : $(PARROT_H_HEADERS) src/datatypes.c src/extend_vtable$(O) : $(PARROT_H_HEADERS) \ $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h src/extend_vtable.c -src/global_setup$(O) : $(PARROT_H_HEADERS) src/global_setup.str src/global_setup.c +src/global_setup$(O) : $(PARROT_H_HEADERS) \ + src/global_setup.str \ + src/global_setup.c \ + $(INC_DIR)/runcore_api.h \ + $(INC_DIR)/oplib/core_ops.h src/namespace$(O) : $(PARROT_H_HEADERS) src/namespace.str src/namespace.c \ include/pmc/pmc_sub.h @@ -1253,7 +1279,7 @@ src/pmc_freeze$(O) : $(PARROT_H_HEADERS) src/pmc_freeze.str src/pmc_freeze.c -src/hash$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h src/hash.c +src/hash$(O) : $(PARROT_H_HEADERS) src/hash.c src/library$(O) : $(PARROT_H_HEADERS) src/library.str src/library.c\ $(INC_DIR)/dynext.h @@ -1275,6 +1301,9 @@ src/gc/alloc_resources$(O) : $(PARROT_H_HEADERS) \ src/gc/gc_private.h src/gc/alloc_resources.c +src/gc/string_gc$(O) : $(PARROT_H_HEADERS) \ + src/gc/gc_private.h src/gc/string_gc.c + src/hll$(O) : $(PARROT_H_HEADERS) src/hll.str $(INC_DIR)/dynext.h src/hll.c src/platform$(O) : $(PARROT_H_HEADERS) src/platform.c @@ -1290,14 +1319,21 @@ src/debug$(O) : $(INC_DIR)/embed.h $(INC_DIR)/extend.h \ $(PARROT_H_HEADERS) src/debug.c \ $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ $(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \ src/debug.str include/pmc/pmc_key.h \ include/pmc/pmc_continuation.h \ $(INC_DIR)/extend_vtable.h -src/sub$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \ - src/sub.str src/sub.c \ - include/pmc/pmc_sub.h include/pmc/pmc_continuation.h +src/sub$(O) : \ + $(PARROT_H_HEADERS) \ + $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ + src/sub.str \ + src/sub.c \ + include/pmc/pmc_sub.h \ + include/pmc/pmc_continuation.h src/string/api$(O) : $(PARROT_H_HEADERS) src/string/api.str \ src/string/private_cstring.h src/string/api.c @@ -1313,10 +1349,15 @@ src/exceptions.str src/exceptions.c \ include/pmc/pmc_continuation.h -src/thread$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic.h src/thread.c \ - include/pmc/pmc_sub.h \ - include/pmc/pmc_parrotinterpreter.h \ - $(INC_DIR)/runcore_api.h +src/thread$(O) : \ + $(PARROT_H_HEADERS) \ + $(INC_DIR)/atomic.h \ + $(INC_DIR)/extend.h \ + $(INC_DIR)/extend_vtable.h \ + src/thread.c \ + include/pmc/pmc_sub.h \ + include/pmc/pmc_parrotinterpreter.h \ + $(INC_DIR)/runcore_api.h ## SUFFIX OVERRIDE - dynloaded files need cc_shared src/extend$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \ @@ -1361,6 +1402,8 @@ src/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \ include/pmc/pmc_parrotinterpreter.h \ + $(INC_DIR)/extend.h \ + $(INC_DIR)/extend_vtable.h \ src/interp/inter_cb.str src/interp/inter_cb.c src/interp/inter_misc$(O) : $(PARROT_H_HEADERS) \ @@ -1422,26 +1465,41 @@ src/main.c src/multidispatch$(O) : \ - src/multidispatch.c \ - src/multidispatch.str \ - $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \ - include/pmc/pmc_nci.h include/pmc/pmc_sub.h - -src/packfile$(O) : src/packfile.str \ - src/packfile.c \ - include/pmc/pmc_sub.h include/pmc/pmc_key.h \ - compilers/imcc/imc.h \ - compilers/imcc/cfg.h \ - compilers/imcc/debug.h \ - compilers/imcc/instructions.h \ - compilers/imcc/sets.h \ - compilers/imcc/symreg.h \ - compilers/imcc/unit.h \ - $(INC_DIR)/oplib/ops.h \ - $(INC_DIR)/embed.h $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h \ - $(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h + src/multidispatch.c \ + src/multidispatch.str \ + $(INC_DIR)/oplib/ops.h \ + $(PARROT_H_HEADERS) \ + include/pmc/pmc_nativepccmethod.h \ + include/pmc/pmc_nci.h \ + include/pmc/pmc_sub.h -src/packfile/pf_items$(O) : $(PARROT_H_HEADERS) src/packfile/pf_items.c +src/packfile$(O) : \ + src/packfile.str \ + src/packfile.c \ + include/pmc/pmc_sub.h \ + include/pmc/pmc_key.h \ + include/pmc/pmc_parrotlibrary.h \ + compilers/imcc/imc.h \ + compilers/imcc/cfg.h \ + compilers/imcc/debug.h \ + compilers/imcc/instructions.h \ + compilers/imcc/sets.h \ + compilers/imcc/symreg.h \ + compilers/imcc/unit.h \ + $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/dynext.h \ + $(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/byteorder.h \ + src/packfile/pf_items.str \ + src/packfile/pf_items.c src/packout$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h src/packout.c @@ -1458,6 +1516,9 @@ src/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \ src/embed.c src/embed.str \ $(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_api.h \ + $(INC_DIR)/extend.h \ + $(INC_DIR)/extend_vtable.h \ + $(INC_DIR)/oplib/core_ops.h \ compilers/imcc/imc.h \ compilers/imcc/cfg.h \ compilers/imcc/debug.h \ @@ -1500,7 +1561,12 @@ src/misc$(O) : $(PARROT_H_HEADERS) src/misc.c -src/utils$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_nci.h src/utils.c +src/utils$(O) : \ + $(PARROT_H_HEADERS) \ + include/pmc/pmc_nci.h \ + src/utils.c \ + $(INC_DIR)/extend.h \ + $(INC_DIR)/extend_vtable.h ## SUFFIX OVERRIDE src/spf_render$(O) : $(PARROT_H_HEADERS) src/spf_render.str src/spf_render.c @@ -1508,21 +1574,39 @@ 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/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$(O) : $(PARROT_H_HEADERS) -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) +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/shared.h \ + src/string/encoding/tables.h +src/string/encoding/latin1$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h \ + src/string/encoding/tables.h +src/string/encoding/binary$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h +src/string/encoding/utf8$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h \ + src/string/unicode.h +src/string/encoding/utf16$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h +src/string/encoding/ucs2$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h +src/string/encoding/ucs4$(O) : $(PARROT_H_HEADERS) \ + src/string/encoding/shared.h + +src/pbc_merge$(O) : \ + $(INC_DIR)/embed.h \ + src/pbc_merge.c \ + include/pmc/pmc_sub.h \ + $(INC_DIR)/oplib/ops.h \ + $(INC_DIR)/oplib/core_ops.h \ + $(INC_DIR)/runcore_api.h \ + $(PARROT_H_HEADERS) src/io/filehandle$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_filehandle.h \ src/io/io_private.h src/io/filehandle.c @@ -1550,10 +1634,6 @@ @TEMP_pmc_build@ -@TEMP_charset_build@ - -@TEMP_encoding_build@ - # $(CONFIGURE_GENERATED_FILES) : Configure.pl # $(PERL) Configure.pl @@ -1667,10 +1747,26 @@ CONFIGURE_TEST_FILES = \ t/configure/*.t \ t/steps/*.t +PBC_TEST_FILES = \ +#IF(has_icu): t/op/testlib/test_strings.pbc \ + t/pmc/testlib/annotations.pbc \ + t/pmc/testlib/number.pbc + +# pbc files used for several tests +pbctestfiles: $(PARROT) $(PBC_TEST_FILES) + +t/pmc/testlib/number.pbc: t/pmc/testlib/number.pasm + $(PARROT) -o t/pmc/testlib/number.pbc t/pmc/testlib/number.pasm + +t/pmc/testlib/annotations.pbc: t/pmc/testlib/annotations.pir + $(PARROT) -o t/pmc/testlib/annotations.pbc t/pmc/testlib/annotations.pir + +t/op/testlib/test_strings.pbc: t/op/testlib/test_strings.pir + $(PARROT) -o t/op/testlib/test_strings.pbc t/op/testlib/test_strings.pir # Common prep for all test targets. # We probably need a complete build before running the tests. -test_prep : all +test_prep : all pbctestfiles # Run test cases with a single call of t/harness. Users have to look at only # one report. The default set of tests to run is contained in t/harness, @@ -1694,7 +1790,7 @@ smoke : smolder_test # "core tests" -- test basic functionality but not ancillaries -coretest : corevm +coretest : corevm pbctestfiles $(PERL) t/harness $(EXTRA_TEST_ARGS) --core-tests # automake compatibility @@ -1944,6 +2040,7 @@ $(RM_F) t/compilers/pge/*.pir $(RM_F) t/compilers/tge/*.pir $(RM_F) \ + $(PBC_TEST_FILES) \ "t/*/*$(O)" \ "t/*/*.out" \ "t/*/*.pasm" \ @@ -1986,19 +2083,19 @@ # Require .svn to exist first # Otherwise it'll remove every last file svnclobber : .svn - $(PERL) tools/dev/svnclobber.pl + $(PERL) $(DEV_TOOLS_DIR)/svnclobber.pl reconfig : realclean $(PERL) Configure.pl $(CONFIG_ARGS) manitest : - $(PERL) tools/dev/manicheck.pl + $(PERL) $(DEV_TOOLS_DIR)/manicheck.pl opsrenumber : - $(PERL) tools/dev/opsrenumber.pl $(OPS_FILES) + $(PERL) $(DEV_TOOLS_DIR)/opsrenumber.pl $(OPS_FILES) pmcrenumber : - $(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num + $(PERL) $(DEV_TOOLS_DIR)/pmcrenumber.pl src/pmc/pmc.num ############################################################################### # @@ -2260,7 +2357,6 @@ src/pmc \ src/runcore \ src/string \ - src/string/charset \ src/string/encoding \ $(BUILD_DIR) \ $(BUILD_DIR)/t/perl \ @@ -2350,7 +2446,7 @@ install-dev: install install-bin: installable - $(PERL) tools/dev/install_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --exec-prefix=$(EXEC_PREFIX) \ @@ -2364,7 +2460,7 @@ MANIFEST MANIFEST.generated install-dev-only: installable - $(PERL) tools/dev/install_dev_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_dev_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --exec-prefix=$(EXEC_PREFIX) \ @@ -2379,7 +2475,7 @@ MANIFEST MANIFEST.generated install-doc: - $(PERL) tools/dev/install_doc_files.pl \ + $(PERL) $(DEV_TOOLS_DIR)/install_doc_files.pl \ --buildprefix=$(BUILDPREFIX) \ --prefix=$(PREFIX) \ --docdir=$(DOC_DIR) \ @@ -2408,7 +2504,7 @@ rm parrot-$(VERSION) win32-inno-installer : world installable - $(PERL) tools/dev/mk_inno.pl + $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl $(INNO_SETUP) parrot.iss ############################################################################### @@ -2502,7 +2598,7 @@ --languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \ -I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \ . - $(PERL) $(BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES) + $(PERL) $(DEV_TOOLS_DIR)/addopstags.pl $(OPS_FILES) tags.vi.dummy: @@ -2514,12 +2610,12 @@ CRITIC_FILES = 'lib/Parrot' perlcritic: - perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES) + perlcritic --profile $(DEV_TOOLS_DIR)/perlcritic.conf $(CRITIC_FILES) # Andy's extra-cranky Perl::Critic checking for cage cleaners cagecritic: @perl -MPerl::Critic::Bangs -e'$$min=q{1.04};die qq{You need Bangs $$min} unless $$Perl::Critic::Bangs::VERSION ge $$min' - perlcritic -1 --profile tools/util/perlcritic-cage.conf $(CRITIC_FILES) + perlcritic -1 --profile $(DEV_TOOLS_DIR)/perlcritic-cage.conf $(CRITIC_FILES) # This target will eventually create all the headers automatically. If you # are having problems with linkage in Win32 (or elsewhere), because something diff -Nru parrot-2.7.0/config/gen/makefiles.pm parrot-2.8.0/config/gen/makefiles.pm --- parrot-2.7.0/config/gen/makefiles.pm 2010-04-30 14:50:47.000000000 +0000 +++ parrot-2.8.0/config/gen/makefiles.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ -# Copyright (C) 2001-2009, Parrot Foundation. -# $Id: makefiles.pm 46126 2010-04-29 00:43:09Z darbelo $ +# Copyright (C) 2001-2010, Parrot Foundation. +# $Id: makefiles.pm 48659 2010-08-25 23:16:08Z gerd $ =head1 NAME @@ -68,6 +68,9 @@ $self->makefiles($conf); + $conf->shebang_mod( 'tools/dev/mk_language_shell.in' + => 'tools/dev/mk_language_shell.pl', ); + return 1; } diff -Nru parrot-2.7.0/config/gen/platform/ansi/pid.c parrot-2.8.0/config/gen/platform/ansi/pid.c --- parrot-2.7.0/config/gen/platform/ansi/pid.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/config/gen/platform/ansi/pid.c 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,50 @@ +/* $Id: pid.c 48583 2010-08-20 13:08:12Z NotFound $ + * Copyright (C) 2010, Parrot Foundation. + */ + +/* + +=head1 NAME + +config/gen/platform/ansi/pid.c + +=head1 DESCRIPTION + +Parrot process id functions. + +=head2 Functions + +=over 4 + +=cut + +=item C + +Parrot wrapper around standard library C function, returning an UINTVAL. + +=cut + +*/ + +UINTVAL +Parrot_getpid(void) +{ + Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, "Parrot_getpid unuseful in this platform"); + return 0; +} + + +/* + +=back + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/config/gen/platform/generic/pid.c parrot-2.8.0/config/gen/platform/generic/pid.c --- parrot-2.7.0/config/gen/platform/generic/pid.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/config/gen/platform/generic/pid.c 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,56 @@ +/* $Id: pid.c 48583 2010-08-20 13:08:12Z NotFound $ + * Copyright (C) 2010, Parrot Foundation. + */ + +/* + +=head1 NAME + +config/gen/platform/generic/pid.c + +=head1 DESCRIPTION + +Parrot process id functions. + +=head2 Functions + +=over 4 + +=cut + +*/ + +#include +#include + +/* + +=item C + +Parrot wrapper around standard library C function, returning an UINTVAL. + +=cut + +*/ + +UINTVAL +Parrot_getpid(void) +{ + return getpid(); +} + + +/* + +=back + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/config/gen/platform/win32/pid.c parrot-2.8.0/config/gen/platform/win32/pid.c --- parrot-2.7.0/config/gen/platform/win32/pid.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/config/gen/platform/win32/pid.c 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,50 @@ +/* $Id: pid.c 48583 2010-08-20 13:08:12Z NotFound $ + * Copyright (C) 2010, Parrot Foundation. + */ + +/* + +=head1 NAME + +config/gen/platform/win32/pid.c + +=head1 DESCRIPTION + +Parrot process id functions. + +=head2 Functions + +=over 4 + +=cut + +=item C + +Parrot wrapper around standard library C function, returning an UINTVAL. + +=cut + +*/ + +UINTVAL +Parrot_getpid(void) +{ + Parrot_warn(NULL, PARROT_WARNINGS_PLATFORM_FLAG, "Parrot_getpid unuseful in this platform"); + return 0; +} + + +/* + +=back + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/config/gen/platform.pm parrot-2.8.0/config/gen/platform.pm --- parrot-2.7.0/config/gen/platform.pm 2010-07-05 02:47:13.000000000 +0000 +++ parrot-2.8.0/config/gen/platform.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: platform.pm 47917 2010-06-29 23:18:38Z jkeenan $ +# $Id: platform.pm 48580 2010-08-20 12:42:42Z NotFound $ =head1 NAME @@ -197,6 +197,7 @@ exec.c misc.c hires_timer.c + pid.c /; my $plat_c = q{src/platform.c}; diff -Nru parrot-2.7.0/config/init/hints/mswin32.pm parrot-2.8.0/config/init/hints/mswin32.pm --- parrot-2.7.0/config/init/hints/mswin32.pm 2010-03-05 22:14:41.000000000 +0000 +++ parrot-2.8.0/config/init/hints/mswin32.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2005-2007, Parrot Foundation. -# $Id: mswin32.pm 44649 2010-03-05 16:20:00Z tene $ +# $Id: mswin32.pm 48999 2010-09-14 16:35:42Z nwellnhof $ package init::hints::mswin32; @@ -98,6 +98,7 @@ libs => 'kernel32.lib ws2_32.lib msvcrt.lib oldnames.lib ', libparrot_static => 'libparrot' . $conf->data->get('a'), libparrot_shared => "libparrot$share_ext", + ar => 'lib', ar_flags => '', ar_out => '-out:', slash => '\\', diff -Nru parrot-2.7.0/config/inter/charset.pm parrot-2.8.0/config/inter/charset.pm --- parrot-2.7.0/config/inter/charset.pm 2010-03-05 22:14:41.000000000 +0000 +++ parrot-2.8.0/config/inter/charset.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -# Copyright (C) 2001-2003, Parrot Foundation. -# $Id: charset.pm 44649 2010-03-05 16:20:00Z tene $ - -=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 .= <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: diff -Nru parrot-2.7.0/config/inter/encoding.pm parrot-2.8.0/config/inter/encoding.pm --- parrot-2.7.0/config/inter/encoding.pm 2010-03-05 22:14:41.000000000 +0000 +++ parrot-2.8.0/config/inter/encoding.pm 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -# Copyright (C) 2001-2003, Parrot Foundation. -# $Id: encoding.pm 44649 2010-03-05 16:20:00Z tene $ - -=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 .= <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: diff -Nru parrot-2.7.0/config/inter/progs.pm parrot-2.8.0/config/inter/progs.pm --- parrot-2.7.0/config/inter/progs.pm 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/config/inter/progs.pm 2010-09-21 07:48:56.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: progs.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: progs.pm 48772 2010-09-03 12:22:08Z jkeenan $ =head1 NAME @@ -103,13 +103,16 @@ $conf->debug("\nccflags: $ccflags\n"); $linkflags = $conf->data->get('linkflags'); - $linkflags =~ s/-libpath:\S+//g; # TT #854: No idea why. + # Remove the path to the Perl library (from Win32 config). + # See TT #854. + $linkflags =~ s/-libpath:\S+//g; $linkflags = integrate( $linkflags, $conf->options->get('linkflags') ); $linkflags = prompt( "And flags for your linker?", $linkflags ) if $ask; $conf->data->set( linkflags => $linkflags ); $ldflags = $conf->data->get('ldflags'); - $ldflags =~ s/-libpath:\S+//g; # TT #854: No idea why. + # For substitution below, see comment for $linkflags above. + $ldflags =~ s/-libpath:\S+//g; $ldflags = integrate( $ldflags, $conf->options->get('ldflags') ); $ldflags = prompt( "And your $ld flags for building shared libraries?", $ldflags ) if $ask; diff -Nru parrot-2.7.0/Configure.pl parrot-2.8.0/Configure.pl --- parrot-2.7.0/Configure.pl 2010-05-19 09:28:46.000000000 +0000 +++ parrot-2.8.0/Configure.pl 2010-09-21 07:48:57.000000000 +0000 @@ -1,7 +1,7 @@ #! perl # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: Configure.pl 46620 2010-05-15 01:17:03Z plobsing $ +# $Id: Configure.pl 48833 2010-09-07 22:58:38Z nwellnhof $ use 5.008; use strict; @@ -604,8 +604,6 @@ init::optimize inter::shlibs inter::libparrot - inter::charset - inter::encoding inter::types auto::ops auto::alignptrs diff -Nru parrot-2.7.0/CREDITS parrot-2.8.0/CREDITS --- parrot-2.7.0/CREDITS 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/CREDITS 2010-09-21 08:04:52.000000000 +0000 @@ -1,6 +1,6 @@ =pod -# $Id: CREDITS 48493 2010-08-14 20:45:59Z cotto $ +# $Id: CREDITS 49192 2010-09-21 08:04:49Z gerd $ Following in the steps of other open source projects that eventually take over the world, here is the partial list @@ -402,7 +402,7 @@ N: Gerd Pokorra E: pokorra@uni-siegen.de -D: Release manager for 1.9.0, 2.3.0 and 2.5.0 +D: Release manager for 1.9.0, 2.3.0, 2.5.0 and 2.8.0 N: Goplat D: Win98 and other fixes. @@ -644,7 +644,7 @@ N: Luben Karavelov U: luben -E: luben@unixsol.org +E: karavelov@spnet.net N: Luca Barbato D: fix to make installable @@ -773,6 +773,11 @@ N: Nick Kostirya D: Win32, FreeBSD build fixes +N: Nick Wellnhofer +D: String iterator rewrite, GC fixes +E: wellnhofer@aevum.de +U: nwellnhof + N: Nikolay Ananiev D: Win32 build fix diff -Nru parrot-2.7.0/debian/changelog parrot-2.8.0/debian/changelog --- parrot-2.7.0/debian/changelog 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/changelog 2010-09-24 10:15:47.000000000 +0000 @@ -1,3 +1,12 @@ +parrot (2.8.0-0.1~ppa1maverick1) maverick; urgency=low + + * New upstream release. + * debian/watch: scan also devel directory. + * debian/*.in: removed. + * debian/control: Conflicts old rakudo. + + -- Piotr Roszatycki Wed, 22 Sep 2010 17:30:08 +0200 + parrot (2.7.0-0.1~ppa2maverick1) maverick; urgency=low * Package also missing files. diff -Nru parrot-2.7.0/debian/control parrot-2.8.0/debian/control --- parrot-2.7.0/debian/control 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/control 2010-09-24 10:15:47.000000000 +0000 @@ -19,14 +19,14 @@ Package: parrot-minimal Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: parrot ( << 1.0.0 ) +Conflicts: parrot ( << 1.0.0 ), rakudo ( << 0.1~2010.09 ) Replaces: parrot ( << 1.0.0 ) Description: A minimal install of the Parrot VM This package contains the core Parrot virtual machine. It's all that you need to get up and running in the average use case, and is sufficient to run most language implementations. -Package: libparrot2.7.0 +Package: libparrot2.8.0 Architecture: any Section: libs Depends: ${shlibs:Depends}, ${misc:Depends} @@ -37,7 +37,7 @@ Package: libparrot-dev Architecture: any Section: libdevel -Depends: ${misc:Depends}, libparrot2.7.0 (= ${binary:Version}), parrot +Depends: ${misc:Depends}, libparrot2.8.0 (= ${binary:Version}), parrot Description: Parrot shared library development files This package contains header files and a static library, needed to develop applications which embed Parrot. diff -Nru parrot-2.7.0/debian/control.in parrot-2.8.0/debian/control.in --- parrot-2.7.0/debian/control.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/control.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -Source: parrot -Section: interpreters -Priority: optional -Maintainer: Debian Parrot Maintainers -Uploaders: Allison Randal , Nuno Carvalho , Patrick Michaud -Build-Depends: debhelper (>= 5.0.0), perl, perl-doc, libreadline-dev, quilt -Standards-Version: 3.9.1 - -Package: parrot -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, parrot-minimal (= ${binary:Version}) -Suggests: parrot-doc -Provides: parrot-test, parrot-data-dumper -Description: A virtual machine for dynamic languages - Parrot is a bytecode-based virtual machine designed for dynamic languages. - Parrot hosts a variety of language implementations, including Tcl, Javascript, - Ruby, Lua, Scheme, PHP, Python, Perl 6, and a .NET bytecode translator. - -Package: parrot-minimal -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: parrot ( << 1.0.0 ) -Replaces: parrot ( << 1.0.0 ) -Description: A minimal install of the Parrot VM - This package contains the core Parrot virtual machine. It's all that you need - to get up and running in the average use case, and is sufficient to run most - language implementations. - -Package: libparrot@SOVERSION@ -Architecture: any -Section: libs -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Parrot shared library - This package contains the Parrot shared library, used by the Parrot virtual - machine and by programs that embed Parrot. - -Package: libparrot-dev -Architecture: any -Section: libdevel -Depends: ${misc:Depends}, libparrot@SOVERSION@ (= ${binary:Version}), parrot -Description: Parrot shared library development files - This package contains header files and a static library, needed to develop - applications which embed Parrot. - -Package: parrot-doc -Architecture: all -Section: doc -Suggests: perl-doc -Depends: ${misc:Depends} -Description: Parrot documentation - Parrot manual pages and raw Pod documentation. If you are developing a - compiler or extensions for Parrot, you will need this. If you're only using a - Parrot hosted language, the language-specific documentation is sufficient. - -Package: parrot-devel -Architecture: any -Section: devel -Depends: ${shlibs:Depends}, ${misc:Depends}, parrot, libparrot-dev, perl -Provides: parrot-pge, parrot-tge, parrot-pct, parrot-nqp -Conflicts: parrot ( << 1.0.0 ), libparrot-dev ( << 1.0.0 ) -Replaces: parrot ( << 1.0.0 ), libparrot-dev ( << 1.0.0 ) -Description: Parrot development tools - This package contains development tools for the Parrot virtual machine. It is - essential for developing language implementations to run on Parrot, but not - needed for running languages once they've been installed. diff -Nru parrot-2.7.0/debian/libparrot-dev.install parrot-2.8.0/debian/libparrot-dev.install --- parrot-2.7.0/debian/libparrot-dev.install 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/libparrot-dev.install 2010-09-24 10:15:47.000000000 +0000 @@ -1,3 +1,3 @@ -usr/include/parrot/2.7.0/parrot/* +usr/include/parrot/*.*.*/parrot/* usr/lib/libparrot.a -usr/lib/pkgconfig/parrot/2.7.0/parrot.pc +usr/lib/pkgconfig/parrot/*.*.*/parrot.pc diff -Nru parrot-2.7.0/debian/libparrot-dev.install.in parrot-2.8.0/debian/libparrot-dev.install.in --- parrot-2.7.0/debian/libparrot-dev.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/libparrot-dev.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/include/parrot/@VERSION@/parrot/* -usr/lib/libparrot.a -usr/lib/pkgconfig/parrot/@VERSION@/parrot.pc diff -Nru parrot-2.7.0/debian/libparrot.install parrot-2.8.0/debian/libparrot.install --- parrot-2.7.0/debian/libparrot.install 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/libparrot.install 2010-09-24 10:15:47.000000000 +0000 @@ -1 +1 @@ -usr/lib/libparrot.so.2.7.0 usr/lib +usr/lib/libparrot.so.*.*.* usr/lib diff -Nru parrot-2.7.0/debian/libparrot.install.in parrot-2.8.0/debian/libparrot.install.in --- parrot-2.7.0/debian/libparrot.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/libparrot.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libparrot.so.@SOVERSION@ usr/lib diff -Nru parrot-2.7.0/debian/parrot-devel.install parrot-2.8.0/debian/parrot-devel.install --- parrot-2.7.0/debian/parrot-devel.install 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot-devel.install 2010-09-24 10:15:47.000000000 +0000 @@ -6,26 +6,26 @@ usr/bin/pbc_to_exe usr/bin/parrot_config usr/bin/parrot-nqp -usr/lib/parrot/2.7.0/tools/* -usr/lib/parrot/2.7.0/languages/pct/* -usr/lib/parrot/2.7.0/library/HLL.pbc -usr/lib/parrot/2.7.0/library/Regex.pbc -usr/lib/parrot/2.7.0/library/P6Regex.pbc -usr/lib/parrot/2.7.0/library/PCT.pbc -usr/lib/parrot/2.7.0/library/PCT/* -usr/lib/parrot/2.7.0/library/P6object.pbc -usr/lib/parrot/2.7.0/library/Protoobject.pbc -usr/lib/parrot/2.7.0/library/Parrot/Exception.pbc -usr/lib/parrot/2.7.0/library/config.pir -usr/lib/parrot/2.7.0/library/config.pbc -usr/lib/parrot/2.7.0/library/nqp-setting.pbc -usr/lib/parrot/2.7.0/library/opsc.pbc -usr/lib/parrot/2.7.0/languages/pge/* -usr/lib/parrot/2.7.0/library/PGE.pbc -usr/lib/parrot/2.7.0/library/PGE/* -usr/lib/parrot/2.7.0/languages/tge/* -usr/lib/parrot/2.7.0/library/TGE.pbc -usr/lib/parrot/2.7.0/VERSION -usr/lib/parrot/2.7.0/parrot_config.o -usr/include/parrot/2.7.0/pmc/* -usr/src/parrot/2.7.0/* +usr/lib/parrot/*.*.*/tools/* +usr/lib/parrot/*.*.*/languages/pct/* +usr/lib/parrot/*.*.*/library/HLL.pbc +usr/lib/parrot/*.*.*/library/Regex.pbc +usr/lib/parrot/*.*.*/library/P6Regex.pbc +usr/lib/parrot/*.*.*/library/PCT.pbc +usr/lib/parrot/*.*.*/library/PCT/* +usr/lib/parrot/*.*.*/library/P6object.pbc +usr/lib/parrot/*.*.*/library/Protoobject.pbc +usr/lib/parrot/*.*.*/library/Parrot/Exception.pbc +usr/lib/parrot/*.*.*/library/config.pir +usr/lib/parrot/*.*.*/library/config.pbc +usr/lib/parrot/*.*.*/library/nqp-setting.pbc +usr/lib/parrot/*.*.*/library/opsc.pbc +usr/lib/parrot/*.*.*/languages/pge/* +usr/lib/parrot/*.*.*/library/PGE.pbc +usr/lib/parrot/*.*.*/library/PGE/* +usr/lib/parrot/*.*.*/languages/tge/* +usr/lib/parrot/*.*.*/library/TGE.pbc +usr/lib/parrot/*.*.*/VERSION +usr/lib/parrot/*.*.*/parrot_config.o +usr/include/parrot/*.*.*/pmc/* +usr/src/parrot/*.*.*/* diff -Nru parrot-2.7.0/debian/parrot-devel.install.in parrot-2.8.0/debian/parrot-devel.install.in --- parrot-2.7.0/debian/parrot-devel.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot-devel.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -usr/bin/ops2c -usr/bin/parrot_debugger -usr/bin/pbc_disassemble -usr/bin/pbc_dump -usr/bin/pbc_merge -usr/bin/pbc_to_exe -usr/bin/parrot_config -usr/bin/parrot-nqp -usr/lib/parrot/@VERSION@/tools/* -usr/lib/parrot/@VERSION@/languages/pct/* -usr/lib/parrot/@VERSION@/library/HLL.pbc -usr/lib/parrot/@VERSION@/library/Regex.pbc -usr/lib/parrot/@VERSION@/library/P6Regex.pbc -usr/lib/parrot/@VERSION@/library/PCT.pbc -usr/lib/parrot/@VERSION@/library/PCT/* -usr/lib/parrot/@VERSION@/library/P6object.pbc -usr/lib/parrot/@VERSION@/library/Protoobject.pbc -usr/lib/parrot/@VERSION@/library/Parrot/Exception.pbc -usr/lib/parrot/@VERSION@/library/config.pir -usr/lib/parrot/@VERSION@/library/config.pbc -usr/lib/parrot/@VERSION@/library/nqp-setting.pbc -usr/lib/parrot/@VERSION@/library/opsc.pbc -usr/lib/parrot/@VERSION@/languages/pge/* -usr/lib/parrot/@VERSION@/library/PGE.pbc -usr/lib/parrot/@VERSION@/library/PGE/* -usr/lib/parrot/@VERSION@/languages/tge/* -usr/lib/parrot/@VERSION@/library/TGE.pbc -usr/lib/parrot/@VERSION@/VERSION -usr/lib/parrot/@VERSION@/parrot_config.o -usr/include/parrot/@VERSION@/pmc/* -usr/src/parrot/@VERSION@/* diff -Nru parrot-2.7.0/debian/parrot-doc.install parrot-2.8.0/debian/parrot-doc.install --- parrot-2.7.0/debian/parrot-doc.install 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot-doc.install 2010-09-24 10:15:47.000000000 +0000 @@ -1 +1 @@ -usr/share/doc/parrot/2.7.0/pod/* +usr/share/doc/parrot/*.*.*/pod/* diff -Nru parrot-2.7.0/debian/parrot-doc.install.in parrot-2.8.0/debian/parrot-doc.install.in --- parrot-2.7.0/debian/parrot-doc.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot-doc.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/share/doc/parrot/@VERSION@/pod/* diff -Nru parrot-2.7.0/debian/parrot.install parrot-2.8.0/debian/parrot.install --- parrot-2.7.0/debian/parrot.install 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot.install 2010-09-24 10:15:47.000000000 +0000 @@ -1,7 +1,7 @@ -usr/lib/parrot/2.7.0/include/* -usr/lib/parrot/2.7.0/dynext/* -usr/lib/parrot/2.7.0/library/Test/* -usr/lib/parrot/2.7.0/library/Data/* -usr/lib/parrot/2.7.0/library/dumper.pir -usr/lib/parrot/2.7.0/library/dumper.pbc -usr/lib/parrot/2.7.0/library/Getopt/Obj.pbc +usr/lib/parrot/*.*.*/include/* +usr/lib/parrot/*.*.*/dynext/* +usr/lib/parrot/*.*.*/library/Test/* +usr/lib/parrot/*.*.*/library/Data/* +usr/lib/parrot/*.*.*/library/dumper.pir +usr/lib/parrot/*.*.*/library/dumper.pbc +usr/lib/parrot/*.*.*/library/Getopt/Obj.pbc diff -Nru parrot-2.7.0/debian/parrot.install.in parrot-2.8.0/debian/parrot.install.in --- parrot-2.7.0/debian/parrot.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,7 +0,0 @@ -usr/lib/parrot/@VERSION@/include/* -usr/lib/parrot/@VERSION@/dynext/* -usr/lib/parrot/@VERSION@/library/Test/* -usr/lib/parrot/@VERSION@/library/Data/* -usr/lib/parrot/@VERSION@/library/dumper.pir -usr/lib/parrot/@VERSION@/library/dumper.pbc -usr/lib/parrot/@VERSION@/library/Getopt/Obj.pbc diff -Nru parrot-2.7.0/debian/parrot-minimal.install.in parrot-2.8.0/debian/parrot-minimal.install.in --- parrot-2.7.0/debian/parrot-minimal.install.in 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/parrot-minimal.install.in 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/bin/parrot diff -Nru parrot-2.7.0/debian/rules parrot-2.8.0/debian/rules --- parrot-2.7.0/debian/rules 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/rules 2010-09-24 10:15:47.000000000 +0000 @@ -12,26 +12,8 @@ CFLAGS += -O2 endif -CONTROL_FILES = \ - debian/control.in \ - debian/parrot.install.in \ - debian/parrot-minimal.install.in \ - debian/parrot-doc.install.in \ - debian/parrot-devel.install.in \ - debian/libparrot.install.in \ - debian/libparrot-dev.install.in - -debian-control-stamp: $(CONTROL_FILES) VERSION - for infile in $(CONTROL_FILES); do \ - outfile=`echo $$infile | sed "s/\.in$$//"`; \ - sed -e "s/@VERSION@/$(VERSION)/g" \ - -e "s/@SOVERSION@/$(SOVERSION)/g" \ - <$$infile >$$outfile; \ - done - touch $@ - configure: configure-stamp -configure-stamp: debian-control-stamp $(QUILT_STAMPFN) +configure-stamp: $(QUILT_STAMPFN) dh_testdir perl Configure.pl --prefix=/usr --disable-rpath touch configure-stamp @@ -42,7 +24,7 @@ dh_testdir $(MAKE) installable LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}`pwd`/blib/lib pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" docs/running.pod debian/parrot.1 - pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/util/parrot-config.pir debian/parrot_config.1 + pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/dev/parrot-config.pir debian/parrot_config.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1 pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot_debugger.1 @@ -52,12 +34,12 @@ pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" compilers/opsc/README.pod debian/ops2c.1 touch build-stamp -clean: debian-control-stamp unpatch +clean: unpatch dh_testdir dh_testroot - rm -f build-stamp configure-stamp debian-control-stamp debian/parrot.1 debian/parrot_config.1 debian/pbc_dump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_merge.1 debian/libparrot$(SOVERSION).install src/main.o installable_pbc_to_exe ext/Parrot-Embed/Makefile.PL test.c test.ldo + rm -f build-stamp configure-stamp debian/parrot.1 debian/parrot_config.1 debian/pbc_dump.1 debian/pbc_disassemble.1 debian/parrot-debugger.1 debian/pbc_merge.1 debian/libparrot$(SOVERSION).install src/main.o installable_pbc_to_exe ext/Parrot-Embed/Makefile.PL test.c test.ldo [ ! -f Makefile ] || $(MAKE) distclean - dh_clean + dh_clean debian/libparrot$(SOVERSION).install: debian/libparrot.install VERSION cp $< $@ @@ -65,7 +47,7 @@ install: build debian/libparrot$(SOVERSION).install dh_testdir dh_testroot - dh_clean -k + dh_prep $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}`pwd`/blib/lib $(MAKE) install-doc DESTDIR=$(CURDIR)/debian/tmp dh_installdirs diff -Nru parrot-2.7.0/debian/watch parrot-2.8.0/debian/watch --- parrot-2.7.0/debian/watch 2010-09-24 10:15:46.000000000 +0000 +++ parrot-2.8.0/debian/watch 2010-09-24 10:15:47.000000000 +0000 @@ -1,3 +1,4 @@ version=3 -ftp://ftp.parrot.org/pub/parrot/releases/stable/(?:[\d\.]+)/parrot-([\d\.]+).tar.gz +ftp://ftp.parrot.org/pub/parrot/releases/devel/([\d\.]+)/parrot-([\d\.]+).tar.gz +ftp://ftp.parrot.org/pub/parrot/releases/stable/([\d\.]+)/parrot-([\d\.]+).tar.gz diff -Nru parrot-2.7.0/DEPRECATED.pod parrot-2.8.0/DEPRECATED.pod --- parrot-2.7.0/DEPRECATED.pod 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/DEPRECATED.pod 2010-09-21 07:48:57.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: DEPRECATED.pod 48453 2010-08-13 15:24:51Z bubaflub $ +# $Id: DEPRECATED.pod 49014 2010-09-15 06:30:07Z luben $ =head1 Purpose @@ -71,13 +71,6 @@ L -=item NCI without signature ("raw" pointers) [eligible in 2.4] - -No equivalent functionality is promised. You shouldn't be using this. Here be -segfaults. - -L - =item UnManagedStruct handling nested structure [eligible in 2.4] UnManagedStruct will be simplified to only support flat structures. This means @@ -139,13 +132,24 @@ These can be replaced by C and intval ops unless you're using them for things that aren't really logical ops (don't do that!). +Logical vtables are removed in r49012, and logical ops on PMCs are converted to +use C internally. Rakudo seems to depend on logical ops on PMCs. + L -=item Method is_tty in PMCs derived from Handle [eligible in 2.7] +=item Method getpid on ParrotInterpreter [experimental] + +Used to test the experimental function Parrot_getpid + +L + +=item Behavior of Parrot::Pmc2c::PMC::add_method() [eligible in 2.10] -Use isatty instead. +Duplicated vtable functions currently generate only a warning; after deadline, +they will cause a C and failure to build Parrot or any HLL +using this method. -L +L =back @@ -153,6 +157,21 @@ =over 4 +=item charset, charsetname, find_charset, trans_charset [eligible in 2.10] + +L + +These opcodes will be removed. The corresponding encoding opcodes should be +used instead. + +=item fixed_8 encoding [eligible in 2.10] + +L + +The 'fixed_8' encoding is going away. Use 'ascii' instead. If you want to test +for a fixed_8 encoding, you have to compare the encoding to 'ascii', +'iso-8859-1' and 'binary' separately. + =item open and close opcodes will be removed [eligible in 2.7] L @@ -377,11 +396,11 @@ L -=item Parrot_get_runtime_prefix [eligible in 2.7] +=item Parrot_getpid [experimental] -Use Parrot_get_runtime_path instead. +Get process id, experimental. -L +L =back diff -Nru parrot-2.7.0/docs/book/pct/ch04_pge.pod parrot-2.8.0/docs/book/pct/ch04_pge.pod --- parrot-2.7.0/docs/book/pct/ch04_pge.pod 2010-08-15 00:39:34.000000000 +0000 +++ parrot-2.8.0/docs/book/pct/ch04_pge.pod 2010-09-21 07:48:51.000000000 +0000 @@ -30,12 +30,12 @@ sub { } 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. 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. 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: diff -Nru parrot-2.7.0/docs/book/pir/ch04_variables.pod parrot-2.8.0/docs/book/pir/ch04_variables.pod --- parrot-2.7.0/docs/book/pir/ch04_variables.pod 2010-07-24 11:07:45.000000000 +0000 +++ parrot-2.8.0/docs/book/pir/ch04_variables.pod 2010-09-21 07:48:51.000000000 +0000 @@ -966,17 +966,17 @@ ways to represent various charsets in memory and on disk. Every string in Parrot has an associated encoding and character set. The default -charset is 8-bit ASCII, which is almost universally supported. Double-quoted -string constants can have an optional prefix specifying the string's encoding -and charset.N +format is 8-bit ASCII, which is almost universally supported. Double-quoted +string constants can have an optional prefix specifying the string's +format.N Parrot tracks information about encoding and charset internally, and automatically converts strings when necessary to preserve these -characteristics. Strings constants may have prefixes of the form C. +characteristics. Strings constants may have prefixes of the form C. =begin PIR_FRAGMENT - $S0 = utf8:unicode:"Hello UTF-8 Unicode World!" - $S1 = utf16:unicode:"Hello UTF-16 Unicode World!" + $S0 = utf8:"Hello UTF-8 Unicode World!" + $S1 = utf16:"Hello UTF-16 Unicode World!" $S2 = ascii:"This is 8-bit ASCII" $S3 = binary:"This is raw, unformatted binary data" @@ -987,11 +987,10 @@ X X X -Parrot supports the character sets C, C, C -(Latin 1), and C and the encodings C, C, -C, and C. +Parrot supports the formats C, C, C +(Latin 1), C, C, C, and C. -The C charset treats the string as a buffer of raw unformatted +The C format treats the string as a buffer of raw unformatted binary data. It isn't really a string per se, because binary data contains no readable characters. This exists to support libraries which manipulate binary data that doesn't easily fit into any other primitive diff -Nru parrot-2.7.0/docs/dev/c_functions.pod parrot-2.8.0/docs/dev/c_functions.pod --- parrot-2.7.0/docs/dev/c_functions.pod 2010-08-15 00:39:34.000000000 +0000 +++ parrot-2.8.0/docs/dev/c_functions.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2006, Parrot Foundation. -# $Id: c_functions.pod 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: c_functions.pod 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/docs/embed.pod parrot-2.8.0/docs/embed.pod --- parrot-2.7.0/docs/embed.pod 2010-06-19 12:34:10.000000000 +0000 +++ parrot-2.8.0/docs/embed.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: embed.pod 47678 2010-06-18 00:29:10Z whiteknight $ +# $Id: embed.pod 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -298,20 +298,10 @@ Search the namespace PMC C for an object with name C. Return the object, or NULL if not found. -=item C - -Find and return a global called C in the namespace C. Returns -C if not found. - =item C Store the PMC C into the namespace PMC C with name C. -=item C - -Sets the value of a global called C in the namespace C. Does -nothing if the global is not found. - =back =head3 Lexicals @@ -569,18 +559,6 @@ =item C -=item C - -=item C - -=item C - -=item C - -=item C - -=item C - =item C =item C @@ -653,8 +631,6 @@ =item C -=item C - =item C =item C @@ -701,14 +677,8 @@ =item C -=item C - -=item C - =item C -=item C - =item C =item C @@ -717,8 +687,6 @@ =item C -=item C - =item C =item C @@ -749,8 +717,6 @@ =item C -=item C - =item C =item C @@ -787,8 +753,6 @@ =item C -=item C - =item C =item C @@ -931,8 +895,6 @@ =item C -=item C - =item C =item C @@ -945,8 +907,6 @@ =item C -=item C - =item C =item C @@ -969,8 +929,6 @@ =item C -=item C - =item C =item C @@ -1183,8 +1141,6 @@ =item C -=item C - =item C =item C @@ -1241,14 +1197,6 @@ =item C -=item C - -=item C - -=item C - -=item C - =item C =item C @@ -1459,10 +1407,6 @@ =item C -=item C - -=item C - =item C =item C @@ -1529,22 +1473,16 @@ =item C -=item C - =item C =item C =item C -=item C - =item C =item C -=item C - =item C =item C @@ -1555,8 +1493,6 @@ =item C -=item C - =item C =item C @@ -1595,8 +1531,6 @@ =item C -=item C - =item C =item C @@ -1609,20 +1543,12 @@ =item C -=item C - -=item C - -=item C - =item C =item C =item C -=item C - =item C =item C @@ -1637,10 +1563,6 @@ =item C -=item C - -=item C - =item C =item C @@ -1681,20 +1603,14 @@ =item C -=item C - =item C =item C -=item C - =item C =item C -=item C - =item C =item C diff -Nru parrot-2.7.0/docs/parrothist.pod parrot-2.8.0/docs/parrothist.pod --- parrot-2.7.0/docs/parrothist.pod 2010-08-18 00:46:48.000000000 +0000 +++ parrot-2.8.0/docs/parrothist.pod 2010-09-21 07:50:26.000000000 +0000 @@ -113,5 +113,6 @@ coke 2.6.0 * 2010-Jul-20 "Red-rumped" mikehh 2.7.0 2010-Aug-17 "Australian King" + Gerd 2.8.0 2010-Sep-21 "Tui Parakeet" =cut diff -Nru parrot-2.7.0/docs/pdds/pdd17_pmc.pod parrot-2.8.0/docs/pdds/pdd17_pmc.pod --- parrot-2.7.0/docs/pdds/pdd17_pmc.pod 2010-05-05 09:58:35.000000000 +0000 +++ parrot-2.8.0/docs/pdds/pdd17_pmc.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: pdd17_pmc.pod 46291 2010-05-04 22:41:27Z darbelo $ +# $Id: pdd17_pmc.pod 49012 2010-09-15 05:33:20Z luben $ =head1 PDD 17: Polymorphic Containers @@ -10,7 +10,7 @@ =head2 Version -$Revision: 46291 $ +$Revision: 49012 $ =head2 Description @@ -1327,40 +1327,6 @@ greater). The C<_num> version performs a numeric comparison, while the C<_string> version performs a string comparison. -=item logical_or - - PMC* logical_or(INTERP, PMC *self, PMC *value, PMC *dest) - -Performs a logical OR, returning I if it is true, and I -otherwise. - -=item logical_and - - PMC* logical_and(INTERP, PMC *self, PMC *value, PMC *dest) - -Performs a logical AND, returning a true value if both I and -I are true, and a false value otherwise. (Currently implemented -as: If I is false, return it, since the entire expression is -false. If I is true, return value, since the truth or falsehood of -I will determine the truth or falsehood of the whole expression.) - -=item logical_xor - - PMC* logical_xor(INTERP, PMC *self, PMC *value, PMC *dest) - -Performs a logical XOR, returning I if it is true and I is -false, returning I if it is true and I is false, and -returning a false value (PMC of the same type as I, with the -boolean value 0) if both are true or neither are true. - -=item logical_not - - PMC* logical_not(INTERP, PMC *self, PMC *dest) - void i_logical_not(INTERP, PMC *self) - -Returns the logical negation of I. The C variant performs an -inplace negation, modifying the value of I. - =back =head4 String Vtable Functions diff -Nru parrot-2.7.0/docs/pdds/pdd19_pir.pod parrot-2.8.0/docs/pdds/pdd19_pir.pod --- parrot-2.7.0/docs/pdds/pdd19_pir.pod 2010-04-14 07:07:22.000000000 +0000 +++ parrot-2.8.0/docs/pdds/pdd19_pir.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2010, Parrot Foundation. -# $Id: pdd19_pir.pod 45652 2010-04-14 02:57:43Z coke $ +# $Id: pdd19_pir.pod 48980 2010-09-13 18:55:52Z nwellnhof $ =head1 PDD 19: Parrot Intermediate Representation (PIR) @@ -10,7 +10,7 @@ =head2 Version -$Revision: 45652 $ +$Revision: 48980 $ =head2 Description @@ -134,9 +134,9 @@ =item "double-quoted string constants" Are delimited by double-quotes (C<">). A C<"> inside a string must be escaped -by C<\>. The default encoding for a double-quoted string constant is 7-bit +by C<\>. The default format for a double-quoted string constant is 7-bit ASCII, other character sets and encodings must be marked explicitly using a -charset or encoding flag. +format flag. =item <<"heredoc", <<'heredoc' @@ -190,11 +190,18 @@ =end PIR_FRAGMENT_TODO -=item charset:"string constant" +=item format:"string constant" -Like above with a character set attached to the string. Valid character -sets are currently: C (the default), C, C -(with UTF-8 as the default encoding), and C. +Like above with a format attached to the string. Valid formats are +currently: C (the default), C, C, C, +C, C, and C. + +The format is attached to the string constant, and +adopted by any string container the constant is assigned to. + +The standard escape sequences are honored within strings with an +alternate format, so you can include a particular Unicode character +as either a literal sequence of bytes, or as an escape sequence. =back @@ -212,20 +219,6 @@ =over 4 -=item encoding:charset:"string constant" - -Like above with an extra encoding attached to the string. For example: - - set S0, utf8:unicode:"«" - -The encoding and charset are attached to the string constant, and -adopted by any string container the constant is assigned to. - -The standard escape sequences are honored within strings with an -alternate encoding, so in the example above, you can include a -particular Unicode character as either a literal sequence of bytes, or -as an escape sequence. - =item numeric constants Both integers (C<42>) and numbers (C<3.14159>) may appear as constants. diff -Nru parrot-2.7.0/docs/pdds/pdd23_exceptions.pod parrot-2.8.0/docs/pdds/pdd23_exceptions.pod --- parrot-2.7.0/docs/pdds/pdd23_exceptions.pod 2010-04-14 07:07:22.000000000 +0000 +++ parrot-2.8.0/docs/pdds/pdd23_exceptions.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: pdd23_exceptions.pod 45652 2010-04-14 02:57:43Z coke $ +# $Id: pdd23_exceptions.pod 48980 2010-09-13 18:55:52Z nwellnhof $ =head1 PDD 23: Exceptions @@ -10,7 +10,7 @@ =head2 Version -$Revision: 45652 $ +$Revision: 48980 $ =head2 Description @@ -310,16 +310,6 @@ argument or a string index that's outside the length of the string. Payload is an array, first element being the string 'ord'. -The C opcode throws C if the charset name it's -looking up doesn't exist. Payload is an array: [0] string 'find_charset', [1] -charset name that was not found. - -The C opcode throws C on "information loss" -(presumably, this means when one charset doesn't have a one-to-one -correspondence in the other charset). Payload is an array: [0] string -'trans_charset', [1] source charset name, [2] destination charset name, [3] -untranslatable code point. - The C opcode throws C if the encoding name it's looking up doesn't exist. Payload is an array: [0] string 'find_encoding', [1] encoding name that was not found. diff -Nru parrot-2.7.0/docs/pdds/pdd28_strings.pod parrot-2.8.0/docs/pdds/pdd28_strings.pod --- parrot-2.7.0/docs/pdds/pdd28_strings.pod 2010-06-15 13:26:59.000000000 +0000 +++ parrot-2.8.0/docs/pdds/pdd28_strings.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2008-2010, Parrot Foundation. -# $Id: pdd28_strings.pod 47637 2010-06-15 04:50:08Z plobsing $ +# $Id: pdd28_strings.pod 48980 2010-09-13 18:55:52Z nwellnhof $ =head1 PDD 28: Strings @@ -11,7 +11,7 @@ =head2 Version -$Revision: 47637 $ +$Revision: 48980 $ =head2 Definitions @@ -266,7 +266,6 @@ UINTVAL strlen; UINTVAL hashval; const struct _encoding *encoding; - const struct _charset *charset; }; The fields are: @@ -302,23 +301,14 @@ =item encoding -How the data is encoded (e.g. fixed 8-bit characters, UTF-8, or UTF-32). Note -that this specifies encoding only -- it's valid to encode EBCDIC characters -with the UTF-8 algorithm. Silly, but valid. +What sort of string data is in the buffer, for example ASCII, ISO-8859-1, +UTF-8 or UTF-16. The encoding structure specifies the encoding (by index number and by name, for ease of lookup), the maximum number of bytes that a single character will occupy in that encoding, as well as functions for manipulating strings with that encoding. -=item charset - -What sort of string data is in the buffer, for example ASCII, EBCDIC, or -Unicode. - -The charset structure specifies the character set (by index number and by -name) and provides functions for transcoding to and from that character set. - =back {{DEPRECATION NOTE: the enum C will be removed @@ -352,32 +342,9 @@ Parrot's external API will be renamed for the standard "Parrot_*" naming conventions. -=head4 Parrot_str_set (was string_set) - -Set one string to a copy of the value of another string. - -=head4 Parrot_str_new_COW (was Parrot_make_COW_reference) - -Create a new copy-on-write string. Creating a new string header, clone the -struct members of the original string, and point to the same string buffer as -the original string. - -=head4 Parrot_str_reuse_COW (was Parrot_reuse_COW_reference) - -Create a new copy-on-write string. Clone the struct members of the original -string into a passed in string header, and point the reused string header to -the same string buffer as the original string. - -=head4 Parrot_str_write_COW (was Parrot_unmake_COW) - -If the specified Parrot string is copy-on-write, copy the string's contents -to a new string buffer and clear the copy-on-write flag. - =head4 Parrot_str_concat (was string_concat) -Concatenate two strings. Takes three arguments: two strings, and one integer -value of flags. If both string arguments are null, return a new string created -according to the integer flags. +Concatenate two strings. Takes two strings as arguments. =head4 Parrot_str_new (was string_from_cstring) @@ -397,11 +364,10 @@ Returns a new string of the requested encoding, character set, and normalization form, initializing the string value to the value passed in. The -five arguments are a C string (C), an integer length of the string -argument in bytes, and struct pointers for encoding, character set, and -normalization form structs. If the C string (C) value is not passed, -returns an empty string. If the encoding, character set, or normalization form -are passed as null values, default values are used. +three arguments are a C string (C), an integer length of the string +argument in bytes, and a struct pointer for the encoding struct. If the C +string (C) value is not passed, returns an empty string. If the +encoding is passed as null value, a default value is used. {{ NOTE: the crippled version of this function, C, used to accept a string name for the character set. This behavior is no longer supported, but @@ -414,13 +380,6 @@ *>) as an argument, the value of the constant string. The length of the C string is calculated internally. -=head4 Parrot_str_resize (was string_grow) - -Resize the string buffer of the given string adding the number of bytes passed -in the integer argument. If the argument is negative, remove the given number -of bytes. Throws an exception if shrinking the string buffer size will -truncate the string (if C will be longer than C). - =head4 Parrot_str_length (was string_compute_strlen) Returns the number of characters in the string. Combining characters are each @@ -505,11 +464,6 @@ Chop the requested number of characters off the end of a string without modifying the original string. -=head4 Parrot_str_chopn_inplace (was string_chopn_inplace). - -Chop the requested number of characters off the end of a string, modifying the -original string. - =head4 Parrot_str_grapheme_chopn Chop the requested number of graphemes off the end of a string without @@ -545,6 +499,10 @@ Compare two strings using NFG normalization, return 1 if they are equal, 0 if they are not equal. +=head4 Parrot_str_split + +Splits the string C at the delimiter C. + =head3 Internal String Functions The following functions are used internally and are not part of the public @@ -560,6 +518,10 @@ Terminate and clean up Parrot's string subsystem, including string allocation and garbage collection. +=head3 Deprecated String Functions + +The following string functions are slated to be deprecated. + =head4 string_max_bytes Calculate the number of bytes needed to hold a given number of characters in a @@ -568,10 +530,6 @@ {{NOTE: pretty primitive and not very useful. May be deprecated.}} -=head3 Deprecated String Functions - -The following string functions are slated to be deprecated. - =head4 string_primary_encoding_for_representation Not useful, it only ever returned ASCII. @@ -618,10 +576,6 @@ Unsafe, and behavior handled by Parrot_str_to_cstring. -=head4 Parrot_str_split - -Splits the string C at the delimiter C. - =head4 Parrot_str_free (was string_free) Unsafe and unuseful, let the garbage collector take care. diff -Nru parrot-2.7.0/docs/pdds/pdd30_install.pod parrot-2.8.0/docs/pdds/pdd30_install.pod --- parrot-2.7.0/docs/pdds/pdd30_install.pod 2010-08-15 00:39:34.000000000 +0000 +++ parrot-2.8.0/docs/pdds/pdd30_install.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2008-2010, Parrot Foundation. -# $Id: pdd30_install.pod 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: pdd30_install.pod 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 PDD 30: Installation @@ -12,7 +12,7 @@ =head2 Version -$Revision: 48412 $ +$Revision: 48965 $ =head2 Synopsis diff -Nru parrot-2.7.0/docs/pmc/subs.pod parrot-2.8.0/docs/pmc/subs.pod --- parrot-2.7.0/docs/pmc/subs.pod 2010-01-13 09:38:34.000000000 +0000 +++ parrot-2.8.0/docs/pmc/subs.pod 2010-09-21 07:48:52.000000000 +0000 @@ -4,7 +4,7 @@ =head1 VERSION -$Revision: 43438 $ +$Revision: 48948 $ =head1 ABSTRACT @@ -27,7 +27,6 @@ Coroutine Eval Continuation - RetContinuation ExceptionHandler By "invokable" we mean that they can be supplied as the first argument to the diff -Nru parrot-2.7.0/docs/project/release_manager_guide.pod parrot-2.8.0/docs/project/release_manager_guide.pod --- parrot-2.7.0/docs/project/release_manager_guide.pod 2010-08-18 00:46:48.000000000 +0000 +++ parrot-2.8.0/docs/project/release_manager_guide.pod 2010-09-21 08:04:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2010, Parrot Foundation. -# $Id: release_manager_guide.pod 48558 2010-08-18 00:35:41Z mikehh $ +# $Id: release_manager_guide.pod 49192 2010-09-21 08:04:49Z gerd $ =head1 Release Instructions @@ -84,7 +84,7 @@ =item c -Update release-related information in F. This will be +Update release-related information in F. This will be used later when making release announcements. There are a few essential fields that must be updated at each release: @@ -118,16 +118,10 @@ =item f -In the two files F and F -is the function C, which has a name that includes -the version number. a_b_c is the version number. You have to update this -version number on two places in the file F. -In the file F you have to change this line: - - op_lib_t *Parrot_DynOp_core_a_b_c(PARROT_INTERP, long init); - -Ignore the warning to not edit this files. It is necessary to edit this files, -so that "make" builds with the increased version number. +To have parrot configured and have run C with the old version number is +condition for this step. Run C<./ops2c --core> (or C, +ignoring errors) followed by C and C to update the names +of version-specific internal functions. =item g @@ -251,11 +245,11 @@ =item 9. -Compose the release announcement. Use F to make +Compose the release announcement. Use F to make this part easier. You can specify the format of your announcements like so: - $ ./parrot tools/util/crow.pir --type=text - $ ./parrot tools/util/crow.pir --type=html + $ ./parrot tools/release/crow.pir --type=text + $ ./parrot tools/release/crow.pir --type=html Take the screen output and paste it into the application you need. HTML works well for use Perl and PerlMonks, and text for the rest. It is not a @@ -413,11 +407,16 @@ visible at L. - - 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* - ?? + - Nov 16, 2010 - 2.10 - tcurtis + - Dec 21, 2010 - 2.11 - whiteknight + - Jan 18, 2011 - 3.0* - cotto + - Feb 15, 2011 - 3.1 - mikehh + - 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 diff -Nru parrot-2.7.0/docs/tests.pod parrot-2.8.0/docs/tests.pod --- parrot-2.7.0/docs/tests.pod 2010-05-28 05:23:31.000000000 +0000 +++ parrot-2.8.0/docs/tests.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2007, Parrot Foundation. -# $Id: tests.pod 47060 2010-05-27 21:11:35Z bacek $ +# $Id: tests.pod 49138 2010-09-18 19:07:52Z dukeleto $ =head1 NAME @@ -24,7 +24,7 @@ =head2 Submitting smolder test results Parrot has a status page with smoke test results at -L. +L. You can supply new tests results by just running C. It will run the same tests as C would, but will upload the test results to the diff -Nru parrot-2.7.0/docs/vtables.pod parrot-2.8.0/docs/vtables.pod --- parrot-2.7.0/docs/vtables.pod 2009-09-03 23:30:26.000000000 +0000 +++ parrot-2.8.0/docs/vtables.pod 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2007, Parrot Foundation. -# $Id: vtables.pod 40936 2009-09-03 00:21:51Z chromatic $ +# $Id: vtables.pod 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -280,17 +280,6 @@ result in C. (Probably by calling its C method) This is a string multimethod. -=item C - -=item C - -Perform the given short-circuiting logical operations between your boolean -value and the value passed in, storing the result in C. - -=item C - -Set yourself to be a logical negation of the value passed in. - =item C Repeat your string representation C times and store the result in diff -Nru parrot-2.7.0/editor/pir-mode.el parrot-2.8.0/editor/pir-mode.el --- parrot-2.7.0/editor/pir-mode.el 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/editor/pir-mode.el 2010-09-21 07:48:53.000000000 +0000 @@ -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")) diff -Nru parrot-2.7.0/examples/benchmarks/boolean.pir parrot-2.8.0/examples/benchmarks/boolean.pir --- parrot-2.7.0/examples/benchmarks/boolean.pir 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/examples/benchmarks/boolean.pir 2010-09-21 07:48:57.000000000 +0000 @@ -0,0 +1,63 @@ +# Copyright (C) 2010, Parrot Foundation. +# $Id: boolean.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=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: diff -Nru parrot-2.7.0/examples/compilers/japhc.c parrot-2.8.0/examples/compilers/japhc.c --- parrot-2.7.0/examples/compilers/japhc.c 2010-07-05 02:47:13.000000000 +0000 +++ parrot-2.8.0/examples/compilers/japhc.c 2010-09-21 07:48:57.000000000 +0000 @@ -1,4 +1,4 @@ -/* $Id: japhc.c 47917 2010-06-29 23:18:38Z jkeenan $ */ +/* $Id: japhc.c 48837 2010-09-07 23:48:07Z nwellnhof $ */ /* * Copyright (C) 2004-2008, Parrot Foundation. @@ -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; } diff -Nru parrot-2.7.0/examples/config/file/configcompiler parrot-2.8.0/examples/config/file/configcompiler --- parrot-2.7.0/examples/config/file/configcompiler 2010-04-25 21:00:07.000000000 +0000 +++ parrot-2.8.0/examples/config/file/configcompiler 2010-09-21 07:48:57.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: configcompiler 45949 2010-04-24 01:14:23Z cotto $ +# $Id: configcompiler 48833 2010-09-07 22:58:38Z nwellnhof $ =variables @@ -34,8 +34,6 @@ init::optimize inter::shlibs inter::libparrot -inter::charset -inter::encoding inter::types auto::ops auto::pmc diff -Nru parrot-2.7.0/examples/config/file/configwithfatalstep parrot-2.8.0/examples/config/file/configwithfatalstep --- parrot-2.7.0/examples/config/file/configwithfatalstep 2010-04-25 21:00:07.000000000 +0000 +++ parrot-2.8.0/examples/config/file/configwithfatalstep 2010-09-21 07:48:57.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: configwithfatalstep 45949 2010-04-24 01:14:23Z cotto $ +# $Id: configwithfatalstep 48833 2010-09-07 22:58:38Z nwellnhof $ =variables @@ -26,8 +26,6 @@ init::optimize inter::shlibs inter::libparrot -inter::charset -inter::encoding inter::types auto::ops auto::pmc diff -Nru parrot-2.7.0/examples/embed/cotorra.c parrot-2.8.0/examples/embed/cotorra.c --- parrot-2.7.0/examples/embed/cotorra.c 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/examples/embed/cotorra.c 2010-09-21 07:48:57.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2009-2010, Parrot Foundation. -$Id: cotorra.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: cotorra.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/examples/io/httpd.pir parrot-2.8.0/examples/io/httpd.pir --- parrot-2.7.0/examples/io/httpd.pir 2010-06-14 02:14:23.000000000 +0000 +++ parrot-2.8.0/examples/io/httpd.pir 2010-09-21 07:48:57.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2006-2008, Parrot Foundation. -# $Id: httpd.pir 47583 2010-06-13 01:02:26Z coke $ +# $Id: httpd.pir 48979 2010-09-13 18:55:26Z nwellnhof $ =head1 NAME @@ -142,11 +142,11 @@ req = "" MORE: buf = work.'recv'() - # charset I0, buf - # charsetname S1, I0 + # encoding I0, buf + # encodingname S1, I0 # print "\nret: " # print ret - # print "\ncharset of buf: " + # print "\nencoding of buf: " # print S1 # print "\nbuf:" # print buf diff -Nru parrot-2.7.0/examples/io/post.pir parrot-2.8.0/examples/io/post.pir --- parrot-2.7.0/examples/io/post.pir 2010-05-24 21:14:31.000000000 +0000 +++ parrot-2.8.0/examples/io/post.pir 2010-09-21 07:48:57.000000000 +0000 @@ -1,6 +1,6 @@ #!parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: post.pir 46912 2010-05-23 08:29:20Z fperrad $ +# $Id: post.pir 49139 2010-09-18 19:45:45Z dukeleto $ .include 'iglobals.pasm' @@ -22,7 +22,7 @@ push contents, 'username' push contents, 'parrot-autobot' push contents, 'password' - push contents, 'squ@wk' + push contents, 'qa_rocks' push contents, 'comments' push contents, "EXPERIMENTAL LWP.pir" push contents, 'report_file' @@ -31,7 +31,7 @@ $P0[0] = 'parrot_test_run.tar.gz' push contents, $P0 load_bytecode 'LWP/UserAgent.pir' - .const string url = 'http://smolder.plusthree.com/app/projects/process_add_report/8' + .const string url = 'http://smolder.parrot.org/app/projects/process_add_report/1' .local pmc ua, response ua = new ['LWP';'UserAgent'] ua.'env_proxy'() diff -Nru parrot-2.7.0/examples/japh/japh1.pasm parrot-2.8.0/examples/japh/japh1.pasm --- parrot-2.7.0/examples/japh/japh1.pasm 2009-04-26 23:23:39.000000000 +0000 +++ parrot-2.8.0/examples/japh/japh1.pasm 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -# Copyright (C) 2004-2009, Parrot Foundation. -# $Id: japh1.pasm 38369 2009-04-26 12:57:09Z fperrad $ - - newclass P0, "Japh" - new P0, "Japh" - set I0, 0 - set S0, P0[I0] - print S0 - inc I0 - set S0, P0[I0] - print S0 - end -.namespace ["Japh"] -.pcc_sub :vtable get_string_keyed: - get_params "0,0", P1, I1 - unless I1, x - set S1, "Parrot Hacker\n" - set_returns "0", S1 - returncc -x: - set S1, "Just another " - set_returns "0", S1 - returncc - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/examples/japh/japh3.pasm parrot-2.8.0/examples/japh/japh3.pasm --- parrot-2.7.0/examples/japh/japh3.pasm 2010-04-30 14:50:47.000000000 +0000 +++ parrot-2.8.0/examples/japh/japh3.pasm 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# Copyright (C) 2004-2010, Parrot Foundation. -# $Id: japh3.pasm 46065 2010-04-27 16:28:46Z mikehh $ - -# the substr JaPH - set S0, "Hacker\n" - set S1, "Parrot " - set S2, "another " - set S3, "Just " - replace S3, S3, 5, 1, S2 - replace S3, S3, 13, 1, S1 - replace S3, S3, 20, 1, S0 - print S3 - end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/examples/japh/japh4.pasm parrot-2.8.0/examples/japh/japh4.pasm --- parrot-2.7.0/examples/japh/japh4.pasm 2009-04-26 23:23:39.000000000 +0000 +++ parrot-2.8.0/examples/japh/japh4.pasm 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -# Copyright (C) 2004-2009, Parrot Foundation. -# $Id: japh4.pasm 38369 2009-04-26 12:57:09Z fperrad $ - -newclass P1, "Japh" -new P2, "Japh" -print P2 -end - -.namespace ["Japh"] -.pcc_sub :vtable get_string: - set S3, "Just another Parrot Hacker\n" - set_returns "0", S3 - returncc - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/examples/japh/japh5.pasm parrot-2.8.0/examples/japh/japh5.pasm --- parrot-2.7.0/examples/japh/japh5.pasm 2009-04-26 23:23:39.000000000 +0000 +++ parrot-2.8.0/examples/japh/japh5.pasm 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -# Copyright (C) 2004-2009, Parrot Foundation. -# $Id: japh5.pasm 38369 2009-04-26 12:57:09Z fperrad $ - -# JaPH utilizing an object - newclass P0, "Japh" - new P0, "Japh" - set P0[1], "Just" - set P0[2], "another" - set P0[3], "Parrot" - set P0[0], "Hacker" - end -.namespace ["Japh"] -.pcc_sub :vtable set_string_keyed: - get_params "0,0,0", P5, I5, S5 - print S5 - if I5, sp - print "\n" - returncc -sp: - print " " - returncc - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/examples/japh/README parrot-2.8.0/examples/japh/README --- parrot-2.7.0/examples/japh/README 2009-03-12 09:10:28.000000000 +0000 +++ parrot-2.8.0/examples/japh/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -# Copyright (C) 2001-2005, Parrot Foundation. -$Id: README 37337 2009-03-12 02:02:54Z Util $ - -These programs show very different ways how to print a simple -string. Some are obfuscated, some are horribly platform dependent. - -To run them all (from the top level directory) - -$ make -$ for f in examples/japh/japh*.pasm; do ./parrot $f ; done - -These JAPHs are also tested by 'make test' in the Parrot root directory. -The test file is 't/examples/japh.t'. diff -Nru parrot-2.7.0/examples/json/postalcodes.pir parrot-2.8.0/examples/json/postalcodes.pir --- parrot-2.7.0/examples/json/postalcodes.pir 2010-05-28 05:23:45.000000000 +0000 +++ parrot-2.8.0/examples/json/postalcodes.pir 2010-09-21 07:48:57.000000000 +0000 @@ -1,6 +1,6 @@ #!../../parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: postalcodes.pir 47051 2010-05-27 08:45:23Z plobsing $ +# $Id: postalcodes.pir 48979 2010-09-13 18:55:26Z nwellnhof $ =head1 NAME @@ -64,8 +64,8 @@ END: close sock - $I1 = find_charset 'unicode' - json_result = trans_charset json_result, $I1 + $I1 = find_encoding 'utf8' + json_result = trans_encoding json_result, $I1 # Strip off http headers. $I0 = index json_result, "\r\n\r\n" diff -Nru parrot-2.7.0/examples/languages/squaak/doc/tutorial_episode_1.pod parrot-2.8.0/examples/languages/squaak/doc/tutorial_episode_1.pod --- parrot-2.7.0/examples/languages/squaak/doc/tutorial_episode_1.pod 2010-08-17 18:07:26.000000000 +0000 +++ parrot-2.8.0/examples/languages/squaak/doc/tutorial_episode_1.pod 2010-09-21 07:48:57.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2008, Parrot Foundation. -# $Id: tutorial_episode_1.pod 48511 2010-08-15 10:53:46Z barney $ +# $Id: tutorial_episode_1.pod 48601 2010-08-23 00:26:58Z jkeenan $ =head1 PCT Tutorial Episode 1: Introduction @@ -219,8 +219,9 @@ The exercises are provided at the end of each episode of this tutorial. In order to keep the length of this tutorial somewhat acceptable, not everything -can be discussed in full detail. The answers and/or solutions to these exercises -will be posted several days after the episode. +can be discussed in full detail. With episode 3 the answers and/or solutions +to these exercises are at the end of each episode. The answer of the exercise +from episode 1 is at the end of episode 2. =head3 Advanced interactive mode. diff -Nru parrot-2.7.0/examples/namespace/namespace_dump.pir parrot-2.8.0/examples/namespace/namespace_dump.pir --- parrot-2.7.0/examples/namespace/namespace_dump.pir 2009-05-20 23:06:24.000000000 +0000 +++ parrot-2.8.0/examples/namespace/namespace_dump.pir 2010-09-21 07:48:57.000000000 +0000 @@ -1,12 +1,13 @@ # Copyright (C) 2006-2009, Parrot Foundation. -# $Id: namespace_dump.pir 38952 2009-05-20 02:02:06Z allison $ +# $Id: namespace_dump.pir 48812 2010-09-06 19:06:37Z plobsing $ + +.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 diff -Nru parrot-2.7.0/examples/pge/demo.pir parrot-2.8.0/examples/pge/demo.pir --- parrot-2.7.0/examples/pge/demo.pir 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/examples/pge/demo.pir 2010-09-21 07:48:57.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2005-2010, Parrot Foundation. -# $Id: demo.pir 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: demo.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ .include "errors.pasm" .include 'stdio.pasm' diff -Nru parrot-2.7.0/examples/tools/pgegrep parrot-2.8.0/examples/tools/pgegrep --- parrot-2.7.0/examples/tools/pgegrep 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/examples/tools/pgegrep 2010-09-21 07:48:57.000000000 +0000 @@ -0,0 +1,308 @@ +#! parrot + +=head1 NAME + +pgegrep - A simple grep using PGE for matching + +=head1 SYNOPSIS + +B [I] B [I] + +=head1 DESCRIPTION + +pgegrep aims to be a small and easy to use program in replacement of the +standard grep utility. Regex support is whatever PGE will allow. It +searches through files line by line and tests if the given pattern matches. + +=head1 OPTIONS + +=over 4 + +=item -v + +=item --invert-match + +print lines not matching PATTERN + +=item -V + +=item --version + +print the version and exit + +=item --help + +show this help and exit + +=item -r + +=item --recursive + +recursively descend into directories + +=item -L + +=item --files-without-matches + +print a list of files that do not match PATTERN + +=item -l + +=item --files-with-matches + +print a list of files that do match PATTERN + +=item -a + +=item --text + +treat binary files as text. + +This uses a basic heuristic to discover if a file is binary or not. Files are +read line by line, and it keeps processing "normally" until a control character +is found, and then stops and goes onto the next file is that line matches. + +=item -n + +=item --line-number + +print the line number for each match + +=item -H + +=item --with-filename + +print the filename for each match + +=back + +=cut + +# Readability improved! +.include 'hllmacros.pir' + +# for getstdin and friends +.loadlib 'io_ops' + +.sub main :main + .param pmc argv # the script name, then our options. + .local string progname + progname = shift argv + load_bytecode 'Getopt/Obj.pbc' + load_bytecode 'PGE.pbc' + .local pmc getopts + getopts = new [ 'Getopt';'Obj' ] + getopts.'notOptStop'(1) + push getopts, 'with-filename|H' + push getopts, 'files-with-matches|l' + push getopts, 'files-without-matches|L' + push getopts, 'line-number|n' + push getopts, 'text|a' + push getopts, 'recursive|r' + push getopts, 'invert-match|v' + push getopts, 'version|V' + push getopts, 'help' + push_eh handler + .local pmc opts + opts = getopts.'get_options'(argv) + $I0 = defined opts['help'] + .If($I0, { + showhelp() + }) + $I0 = defined opts['version'] + .If($I0, { + showversion() + }) + + .local int argc + argc = elements argv + .Unless(argc>1, { showhelp() }) # need rule and at least one file + + .local string rule + .local pmc p6rule_compile, matchsub + rule = shift argv + p6rule_compile = compreg 'PGE::Perl6Regex' + matchsub = p6rule_compile(rule) + .If(null matchsub, { die 'Unable to compile regex' }) + + .local int i, filecount + .local string filename + .local pmc File, OS, files, handle + files = new 'ResizableStringArray' + files = argv + filecount = files + # define with-filename if there's more than one file + .If(filecount >= 2, { opts['with-filename'] = 1 }) + $P0 = loadlib 'file' + File = new 'File' + $P0 = loadlib 'os' + OS = new 'OS' + # This must be here, or else it'll get filled with junk data we use stdin... + i = 0 + + .Unless(filecount, { + # no args, use stdin + stdindashhack: + handle = getstdin + filename = '(standard input)' + goto stdinhack + }) + .For(, i < filecount, inc i, { + filename = files[i] + .If(filename == '-', { + goto stdindashhack + }) + $I1 = File.'is_file'(filename) + .IfElse($I1, { + # Is a file + handle = open filename, 'r' + },{ + # Not a file, hopefully a directory + $I1 = File.'is_dir'(filename) + $I0 = defined opts['recursive'] + $I1 &= $I0 + .Unless($I1, { + printerr "pgegrep: '" + printerr filename + printerr "': Operation not supported.\n" + goto nextfor_0 + }) + $P0 = OS.'readdir'(filename) + .Foreach($S0, $P0, { + .If($S0 != '.', { + .If($S0 != '..', { + $S1 = filename . '/' + $S0 = $S1 . $S0 + $P1 = new 'ResizableStringArray' + $P1[0] = $S0 + $I0 = i + 1 + splice files, $P1, $I0, 0 + }) }) + }) + filecount = files + goto nextfor_0 + }) + stdinhack: + checkfile(handle, filename, matchsub, opts) + close handle + nextfor_0: + }) + + end +handler: + .local pmc exception, pmcmsg + .local string message + .get_results (exception) + pmcmsg = getattribute exception, 'message' + pop_eh + message = pmcmsg + message = "pgegrep: " . message + die message +.end + +.sub checkfile + .param pmc handle + .param string filename + .param pmc matchsub + .param pmc opts + + .local pmc match + .local string line + .local int lineno, linelen, matched + lineno = 1 + matched = 0 # Only used for --files-without-matches + line = readline handle + linelen = length line + + .local pmc p6rule_compile, cntrlchar + $S0 = '<+cntrl-[\t\r\n]>' + p6rule_compile = compreg 'PGE::Perl6Regex' + cntrlchar = p6rule_compile($S0) + + .For(, linelen, { + line = readline handle + linelen = length line + inc lineno + }, { + match = matchsub(line) + $I1 = istrue match + match = cntrlchar(line) + + $I2 = istrue match + $I0 = defined opts['files-without-matches'] + .If($I0, { + .If($I1, { matched = 1 }) + goto next + }) + $I0 = defined opts['files-with-matches'] + $I0 = $I0 && $I1 + .If($I0, { + say filename + .return() + }) + + $I0 = defined opts['invert-match'] + not $I0 + $I1 = xor $I1, $I0 + .Unless($I1, { + $I0 = defined opts['text'] + $I0 = xor $I0, $I2 + .If($I0, { + print 'Binary file ' + print filename + say ' matches' + .return() + }) + $I0 = defined opts['with-filename'] + $I1 = defined opts['recursive'] + $I0 = $I0 || $I1 + .If($I0, { + print filename + print ':' + }) + $I0 = defined opts['line-number'] + .If($I0, { + print lineno + print ':' + }) + print line + }) + #--------- + next: + }) + $I0 = defined opts['files-without-matches'] + .If($I0, { say filename }) + .return() +.end + +.sub showhelp + print <<'HELP' +Usage: pgegrep [OPTIONS] PATTERN [FILE...] +Search for the Perl 6 Rule PATTERN in each file. + + -v --invert-match print lines not matching PATTERN + -V --version print the version and exit + --help show this help and exit + -r --recursive recursively descend into directories + -L --files-without-matches print a list of files that do not match PATTERN + -l --files-with-matches print a list of files that do match PATTERN + -a --text treat binary files as text + -n --line-number print the line number for each match + -H --with-filename print the filename for each match + +HELP + end +.end + +.sub showversion + print <<'VERSION' +pgegrep v0.0.1 +VERSION + end +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/ext/nqp-rx/src/stage0/HLL-s0.pir parrot-2.8.0/ext/nqp-rx/src/stage0/HLL-s0.pir --- parrot-2.7.0/ext/nqp-rx/src/stage0/HLL-s0.pir 2010-08-17 18:07:25.000000000 +0000 +++ parrot-2.8.0/ext/nqp-rx/src/stage0/HLL-s0.pir 2010-09-21 07:48:52.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: HLL-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: HLL-s0.pir 49091 2010-09-17 20:55:57Z mikehh $ =head1 NAME @@ -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,80 @@ .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 within C. The return +value uses zero for the first line. If C is true, then +memoize the line offsets as a C property on C. + +=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 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. When we + # find one, mark the ending offset of the line in C. + 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, so now we search the array for the largest + # element that is not greater than C. 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 +429,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 @@ -438,6 +514,16 @@ .sub 'quote_EXPR' :method .param pmc args :slurpy + .local pmc cur, debug + .local string target + .local int pos + + (cur, pos, target) = self.'!cursor_start'() + debug = getattribute cur, '$!debug' + if null debug goto debug_1 + cur.'!cursor_debug'('START', 'quote_EXPR') + debug_1: + .local pmc quotemod, true .lex '%*QUOTEMOD', quotemod quotemod = new ['Hash'] @@ -466,11 +552,6 @@ goto args_loop args_done: - .local pmc cur - .local string target - .local int pos - - (cur, pos, target) = self.'!cursor_start'() .local pmc start, stop (start, stop) = self.'peek_delimiters'(target, pos) @@ -484,7 +565,13 @@ $P10.'!cursor_names'('quote_delimited') pos = $P10.'pos'() cur.'!cursor_pass'(pos, 'quote_EXPR') + if null debug goto done + cur.'!cursor_debug'('PASS', 'quote_EXPR') + goto done fail: + if null debug goto done + cur.'!cursor_debug'('FAIL', 'quote_EXPR') + done: .return (cur) .end @@ -574,6 +661,13 @@ .param string preclim :optional .param int has_preclim :opt_flag + .local pmc here, pos, debug + (here, pos) = self.'!cursor_start'() + debug = getattribute here, '$!debug' + if null debug goto debug_1 + here.'!cursor_debug'('START', 'EXPR') + debug_1: + if has_preclim goto have_preclim preclim = '' have_preclim: @@ -588,9 +682,6 @@ termstack = new ['ResizablePMCArray'] .lex '@termstack', termstack - .local pmc here, from, pos - (here, pos) = self.'!cursor_start'() - term_loop: here = here.termishrx() unless here goto fail @@ -678,6 +769,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] @@ -718,7 +814,14 @@ setattribute here, '$!pos', pos setattribute here, '$!match', term here.'!reduce'('EXPR') + if null debug goto done + here.'!cursor_debug'('PASS', 'EXPR') + goto done + fail: + if null debug goto done + here.'!cursor_debug'('FAIL', 'EXPR') + done: .return (here) err_internal: @@ -809,7 +912,7 @@ .local pmc pos pos = self.'pos'() - self.'!cursor_debug'('START MARKER name=', markname, ', pos=', pos) + self.'!cursor_debug'('START', 'MARKER name=', markname, ', pos=', pos) .local pmc markhash markhash = get_global '%!MARKHASH' @@ -818,7 +921,7 @@ set_global '%!MARKHASH', markhash have_markhash: markhash[markname] = pos - self.'!cursor_debug'('PASS MARKER') + self.'!cursor_debug'('PASS', 'MARKER') .return (1) .end @@ -826,7 +929,7 @@ .sub 'MARKED' :method .param pmc markname - self.'!cursor_debug'('START MARKED name=', markname) + self.'!cursor_debug'('START','MARKED name=', markname) .local pmc markhash markhash = get_global '%!MARKHASH' @@ -835,10 +938,10 @@ if null $P0 goto fail $P1 = self.'pos'() unless $P0 == $P1 goto fail - self.'!cursor_debug'('PASS MARKED') + self.'!cursor_debug'('PASS','MARKED') .return (1) fail: - self.'!cursor_debug'('FAIL MARKED') + self.'!cursor_debug'('FAIL','MARKED') .return (0) .end @@ -902,7 +1005,7 @@ ### .include 'gen/hllgrammar-grammar.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016519.8364") +.sub "_block11" :anon :subid("10_1284728468.35267") .annotate 'line', 0 get_hll_global $P14, ["HLL";"Grammar"], "_block13" capture_lex $P14 @@ -919,15 +1022,15 @@ $P332 = $P14() .annotate 'line', 1 .return ($P332) - .const 'Sub' $P334 = "106_1282016519.8364" + .const 'Sub' $P334 = "106_1284728468.35267" .return ($P334) .end .namespace [] -.sub "" :load :init :subid("post107") :outer("10_1282016519.8364") +.sub "" :load :init :subid("post107") :outer("10_1284728468.35267") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016519.8364" + .const 'Sub' $P12 = "10_1284728468.35267" .local pmc block set block, $P12 $P337 = get_root_global ["parrot"], "P6metaclass" @@ -936,83 +1039,83 @@ .namespace ["HLL";"Grammar"] -.sub "_block13" :subid("11_1282016519.8364") :outer("10_1282016519.8364") +.sub "_block13" :subid("11_1284728468.35267") :outer("10_1284728468.35267") .annotate 'line', 5 - .const 'Sub' $P319 = "103_1282016519.8364" + .const 'Sub' $P319 = "103_1284728468.35267" capture_lex $P319 - .const 'Sub' $P313 = "101_1282016519.8364" + .const 'Sub' $P313 = "101_1284728468.35267" capture_lex $P313 - .const 'Sub' $P300 = "98_1282016519.8364" + .const 'Sub' $P300 = "98_1284728468.35267" capture_lex $P300 - .const 'Sub' $P268 = "93_1282016519.8364" + .const 'Sub' $P268 = "93_1284728468.35267" capture_lex $P268 - .const 'Sub' $P262 = "91_1282016519.8364" + .const 'Sub' $P262 = "91_1284728468.35267" capture_lex $P262 - .const 'Sub' $P257 = "89_1282016519.8364" + .const 'Sub' $P257 = "89_1284728468.35267" capture_lex $P257 - .const 'Sub' $P251 = "87_1282016519.8364" + .const 'Sub' $P251 = "87_1284728468.35267" capture_lex $P251 - .const 'Sub' $P245 = "85_1282016519.8364" + .const 'Sub' $P245 = "85_1284728468.35267" capture_lex $P245 - .const 'Sub' $P240 = "83_1282016519.8364" + .const 'Sub' $P240 = "83_1284728468.35267" capture_lex $P240 - .const 'Sub' $P235 = "81_1282016519.8364" + .const 'Sub' $P235 = "81_1284728468.35267" capture_lex $P235 - .const 'Sub' $P230 = "79_1282016519.8364" + .const 'Sub' $P230 = "79_1284728468.35267" capture_lex $P230 - .const 'Sub' $P225 = "77_1282016519.8364" + .const 'Sub' $P225 = "77_1284728468.35267" capture_lex $P225 - .const 'Sub' $P220 = "75_1282016519.8364" + .const 'Sub' $P220 = "75_1284728468.35267" capture_lex $P220 - .const 'Sub' $P215 = "73_1282016519.8364" + .const 'Sub' $P215 = "73_1284728468.35267" capture_lex $P215 - .const 'Sub' $P210 = "71_1282016519.8364" + .const 'Sub' $P210 = "71_1284728468.35267" capture_lex $P210 - .const 'Sub' $P205 = "69_1282016519.8364" + .const 'Sub' $P205 = "69_1284728468.35267" capture_lex $P205 - .const 'Sub' $P195 = "65_1282016519.8364" + .const 'Sub' $P195 = "65_1284728468.35267" capture_lex $P195 - .const 'Sub' $P182 = "63_1282016519.8364" + .const 'Sub' $P182 = "63_1284728468.35267" capture_lex $P182 - .const 'Sub' $P170 = "61_1282016519.8364" + .const 'Sub' $P170 = "61_1284728468.35267" capture_lex $P170 - .const 'Sub' $P164 = "59_1282016519.8364" + .const 'Sub' $P164 = "59_1284728468.35267" capture_lex $P164 - .const 'Sub' $P157 = "57_1282016519.8364" + .const 'Sub' $P157 = "57_1284728468.35267" capture_lex $P157 - .const 'Sub' $P151 = "55_1282016519.8364" + .const 'Sub' $P151 = "55_1284728468.35267" capture_lex $P151 - .const 'Sub' $P144 = "53_1282016519.8364" + .const 'Sub' $P144 = "53_1284728468.35267" capture_lex $P144 - .const 'Sub' $P138 = "51_1282016519.8364" + .const 'Sub' $P138 = "51_1284728468.35267" capture_lex $P138 - .const 'Sub' $P131 = "49_1282016519.8364" + .const 'Sub' $P131 = "49_1284728468.35267" capture_lex $P131 - .const 'Sub' $P125 = "47_1282016519.8364" + .const 'Sub' $P125 = "47_1284728468.35267" capture_lex $P125 - .const 'Sub' $P119 = "45_1282016519.8364" + .const 'Sub' $P119 = "45_1284728468.35267" capture_lex $P119 - .const 'Sub' $P110 = "43_1282016519.8364" + .const 'Sub' $P110 = "43_1284728468.35267" capture_lex $P110 - .const 'Sub' $P102 = "41_1282016519.8364" + .const 'Sub' $P102 = "41_1284728468.35267" capture_lex $P102 - .const 'Sub' $P92 = "40_1282016519.8364" + .const 'Sub' $P92 = "40_1284728468.35267" capture_lex $P92 - .const 'Sub' $P86 = "38_1282016519.8364" + .const 'Sub' $P86 = "38_1284728468.35267" capture_lex $P86 - .const 'Sub' $P81 = "36_1282016519.8364" + .const 'Sub' $P81 = "36_1284728468.35267" capture_lex $P81 - .const 'Sub' $P73 = "34_1282016519.8364" + .const 'Sub' $P73 = "34_1284728468.35267" capture_lex $P73 - .const 'Sub' $P67 = "32_1282016519.8364" + .const 'Sub' $P67 = "32_1284728468.35267" capture_lex $P67 - .const 'Sub' $P61 = "30_1282016519.8364" + .const 'Sub' $P61 = "30_1284728468.35267" capture_lex $P61 - .const 'Sub' $P55 = "28_1282016519.8364" + .const 'Sub' $P55 = "28_1284728468.35267" capture_lex $P55 - .const 'Sub' $P22 = "14_1282016519.8364" + .const 'Sub' $P22 = "14_1284728468.35267" capture_lex $P22 - .const 'Sub' $P15 = "12_1282016519.8364" + .const 'Sub' $P15 = "12_1284728468.35267" capture_lex $P15 $P0 = find_dynamic_lex "$*CTXSAVE" if null $P0 goto ctxsave_done @@ -1021,17 +1124,17 @@ $P0."ctxsave"() ctxsave_done: .annotate 'line', 33 - .const 'Sub' $P319 = "103_1282016519.8364" + .const 'Sub' $P319 = "103_1284728468.35267" capture_lex $P319 .annotate 'line', 5 .return ($P319) - .const 'Sub' $P329 = "105_1282016519.8364" + .const 'Sub' $P329 = "105_1284728468.35267" .return ($P329) .end .namespace ["HLL";"Grammar"] -.sub "ws" :subid("12_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "ws" :subid("12_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx16_tgt .local int rx16_pos @@ -1054,7 +1157,7 @@ rx16_start: eq $I10, 1, rx16_restart if_null rx16_debug, debug_108 - rx16_cur."!cursor_debug"("START ", "ws") + rx16_cur."!cursor_debug"("START", "ws") debug_108: $I10 = self.'from'() ne $I10, -1, rxscan19_done @@ -1108,12 +1211,12 @@ # rx pass rx16_cur."!cursor_pass"(rx16_pos, "ws") if_null rx16_debug, debug_109 - rx16_cur."!cursor_debug"("PASS ", "ws", " at pos=", rx16_pos) + rx16_cur."!cursor_debug"("PASS", "ws", " at pos=", rx16_pos) debug_109: .return (rx16_cur) rx16_restart: if_null rx16_debug, debug_110 - rx16_cur."!cursor_debug"("NEXT ", "ws") + rx16_cur."!cursor_debug"("NEXT", "ws") debug_110: rx16_fail: (rx16_rep, rx16_pos, $I10, $P10) = rx16_cur."!mark_fail"(0) @@ -1123,7 +1226,7 @@ rx16_done: rx16_cur."!cursor_fail"() if_null rx16_debug, debug_111 - rx16_cur."!cursor_debug"("FAIL ", "ws") + rx16_cur."!cursor_debug"("FAIL", "ws") debug_111: .return (rx16_cur) .return () @@ -1131,7 +1234,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__ws" :subid("13_1282016519.8364") :method +.sub "!PREFIX__ws" :subid("13_1284728468.35267") :method .annotate 'line', 5 new $P18, "ResizablePMCArray" push $P18, "" @@ -1140,7 +1243,7 @@ .namespace ["HLL";"Grammar"] -.sub "termish" :subid("14_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "termish" :subid("14_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx23_tgt .local int rx23_pos @@ -1164,7 +1267,7 @@ rx23_start: eq $I10, 1, rx23_restart if_null rx23_debug, debug_112 - rx23_cur."!cursor_debug"("START ", "termish") + rx23_cur."!cursor_debug"("START", "termish") debug_112: $I10 = self.'from'() ne $I10, -1, rxscan26_done @@ -1238,13 +1341,13 @@ # rx pass rx23_cur."!cursor_pass"(rx23_pos, "termish") if_null rx23_debug, debug_113 - rx23_cur."!cursor_debug"("PASS ", "termish", " at pos=", rx23_pos) + rx23_cur."!cursor_debug"("PASS", "termish", " at pos=", rx23_pos) debug_113: .return (rx23_cur) rx23_restart: .annotate 'line', 5 if_null rx23_debug, debug_114 - rx23_cur."!cursor_debug"("NEXT ", "termish") + rx23_cur."!cursor_debug"("NEXT", "termish") debug_114: rx23_fail: (rx23_rep, rx23_pos, $I10, $P10) = rx23_cur."!mark_fail"(0) @@ -1254,7 +1357,7 @@ rx23_done: rx23_cur."!cursor_fail"() if_null rx23_debug, debug_115 - rx23_cur."!cursor_debug"("FAIL ", "termish") + rx23_cur."!cursor_debug"("FAIL", "termish") debug_115: .return (rx23_cur) .return () @@ -1262,7 +1365,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__termish" :subid("15_1282016519.8364") :method +.sub "!PREFIX__termish" :subid("15_1284728468.35267") :method .annotate 'line', 5 new $P25, "ResizablePMCArray" push $P25, "" @@ -1271,7 +1374,7 @@ .namespace ["HLL";"Grammar"] -.sub "term" :subid("16_1282016519.8364") :method +.sub "term" :subid("16_1284728468.35267") :method .annotate 'line', 13 $P32 = self."!protoregex"("term") .return ($P32) @@ -1279,7 +1382,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__term" :subid("17_1282016519.8364") :method +.sub "!PREFIX__term" :subid("17_1284728468.35267") :method .annotate 'line', 13 $P34 = self."!PREFIX__!protoregex"("term") .return ($P34) @@ -1287,7 +1390,7 @@ .namespace ["HLL";"Grammar"] -.sub "infix" :subid("18_1282016519.8364") :method +.sub "infix" :subid("18_1284728468.35267") :method .annotate 'line', 14 $P36 = self."!protoregex"("infix") .return ($P36) @@ -1295,7 +1398,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__infix" :subid("19_1282016519.8364") :method +.sub "!PREFIX__infix" :subid("19_1284728468.35267") :method .annotate 'line', 14 $P38 = self."!PREFIX__!protoregex"("infix") .return ($P38) @@ -1303,7 +1406,7 @@ .namespace ["HLL";"Grammar"] -.sub "prefix" :subid("20_1282016519.8364") :method +.sub "prefix" :subid("20_1284728468.35267") :method .annotate 'line', 15 $P40 = self."!protoregex"("prefix") .return ($P40) @@ -1311,7 +1414,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__prefix" :subid("21_1282016519.8364") :method +.sub "!PREFIX__prefix" :subid("21_1284728468.35267") :method .annotate 'line', 15 $P42 = self."!PREFIX__!protoregex"("prefix") .return ($P42) @@ -1319,7 +1422,7 @@ .namespace ["HLL";"Grammar"] -.sub "postfix" :subid("22_1282016519.8364") :method +.sub "postfix" :subid("22_1284728468.35267") :method .annotate 'line', 16 $P44 = self."!protoregex"("postfix") .return ($P44) @@ -1327,7 +1430,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__postfix" :subid("23_1282016519.8364") :method +.sub "!PREFIX__postfix" :subid("23_1284728468.35267") :method .annotate 'line', 16 $P46 = self."!PREFIX__!protoregex"("postfix") .return ($P46) @@ -1335,7 +1438,7 @@ .namespace ["HLL";"Grammar"] -.sub "circumfix" :subid("24_1282016519.8364") :method +.sub "circumfix" :subid("24_1284728468.35267") :method .annotate 'line', 17 $P48 = self."!protoregex"("circumfix") .return ($P48) @@ -1343,7 +1446,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__circumfix" :subid("25_1282016519.8364") :method +.sub "!PREFIX__circumfix" :subid("25_1284728468.35267") :method .annotate 'line', 17 $P50 = self."!PREFIX__!protoregex"("circumfix") .return ($P50) @@ -1351,7 +1454,7 @@ .namespace ["HLL";"Grammar"] -.sub "postcircumfix" :subid("26_1282016519.8364") :method +.sub "postcircumfix" :subid("26_1284728468.35267") :method .annotate 'line', 18 $P52 = self."!protoregex"("postcircumfix") .return ($P52) @@ -1359,7 +1462,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__postcircumfix" :subid("27_1282016519.8364") :method +.sub "!PREFIX__postcircumfix" :subid("27_1284728468.35267") :method .annotate 'line', 18 $P54 = self."!PREFIX__!protoregex"("postcircumfix") .return ($P54) @@ -1367,7 +1470,7 @@ .namespace ["HLL";"Grammar"] -.sub "term:sym" :subid("28_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "term:sym" :subid("28_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx56_tgt .local int rx56_pos @@ -1390,7 +1493,7 @@ rx56_start: eq $I10, 1, rx56_restart if_null rx56_debug, debug_116 - rx56_cur."!cursor_debug"("START ", "term:sym") + rx56_cur."!cursor_debug"("START", "term:sym") debug_116: $I10 = self.'from'() ne $I10, -1, rxscan60_done @@ -1415,13 +1518,13 @@ # rx pass rx56_cur."!cursor_pass"(rx56_pos, "term:sym") if_null rx56_debug, debug_117 - rx56_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx56_pos) + rx56_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx56_pos) debug_117: .return (rx56_cur) rx56_restart: .annotate 'line', 5 if_null rx56_debug, debug_118 - rx56_cur."!cursor_debug"("NEXT ", "term:sym") + rx56_cur."!cursor_debug"("NEXT", "term:sym") debug_118: rx56_fail: (rx56_rep, rx56_pos, $I10, $P10) = rx56_cur."!mark_fail"(0) @@ -1431,7 +1534,7 @@ rx56_done: rx56_cur."!cursor_fail"() if_null rx56_debug, debug_119 - rx56_cur."!cursor_debug"("FAIL ", "term:sym") + rx56_cur."!cursor_debug"("FAIL", "term:sym") debug_119: .return (rx56_cur) .return () @@ -1439,7 +1542,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__term:sym" :subid("29_1282016519.8364") :method +.sub "!PREFIX__term:sym" :subid("29_1284728468.35267") :method .annotate 'line', 5 $P58 = self."!PREFIX__!subrule"("circumfix", "") new $P59, "ResizablePMCArray" @@ -1449,7 +1552,7 @@ .namespace ["HLL";"Grammar"] -.sub "infixish" :subid("30_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "infixish" :subid("30_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx62_tgt .local int rx62_pos @@ -1472,7 +1575,7 @@ rx62_start: eq $I10, 1, rx62_restart if_null rx62_debug, debug_120 - rx62_cur."!cursor_debug"("START ", "infixish") + rx62_cur."!cursor_debug"("START", "infixish") debug_120: $I10 = self.'from'() ne $I10, -1, rxscan66_done @@ -1497,13 +1600,13 @@ # rx pass rx62_cur."!cursor_pass"(rx62_pos, "infixish") if_null rx62_debug, debug_121 - rx62_cur."!cursor_debug"("PASS ", "infixish", " at pos=", rx62_pos) + rx62_cur."!cursor_debug"("PASS", "infixish", " at pos=", rx62_pos) debug_121: .return (rx62_cur) rx62_restart: .annotate 'line', 5 if_null rx62_debug, debug_122 - rx62_cur."!cursor_debug"("NEXT ", "infixish") + rx62_cur."!cursor_debug"("NEXT", "infixish") debug_122: rx62_fail: (rx62_rep, rx62_pos, $I10, $P10) = rx62_cur."!mark_fail"(0) @@ -1513,7 +1616,7 @@ rx62_done: rx62_cur."!cursor_fail"() if_null rx62_debug, debug_123 - rx62_cur."!cursor_debug"("FAIL ", "infixish") + rx62_cur."!cursor_debug"("FAIL", "infixish") debug_123: .return (rx62_cur) .return () @@ -1521,7 +1624,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__infixish" :subid("31_1282016519.8364") :method +.sub "!PREFIX__infixish" :subid("31_1284728468.35267") :method .annotate 'line', 5 $P64 = self."!PREFIX__!subrule"("infix", "") new $P65, "ResizablePMCArray" @@ -1531,7 +1634,7 @@ .namespace ["HLL";"Grammar"] -.sub "prefixish" :subid("32_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "prefixish" :subid("32_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx68_tgt .local int rx68_pos @@ -1554,7 +1657,7 @@ rx68_start: eq $I10, 1, rx68_restart if_null rx68_debug, debug_124 - rx68_cur."!cursor_debug"("START ", "prefixish") + rx68_cur."!cursor_debug"("START", "prefixish") debug_124: $I10 = self.'from'() ne $I10, -1, rxscan72_done @@ -1584,13 +1687,13 @@ # rx pass rx68_cur."!cursor_pass"(rx68_pos, "prefixish") if_null rx68_debug, debug_125 - rx68_cur."!cursor_debug"("PASS ", "prefixish", " at pos=", rx68_pos) + rx68_cur."!cursor_debug"("PASS", "prefixish", " at pos=", rx68_pos) debug_125: .return (rx68_cur) rx68_restart: .annotate 'line', 5 if_null rx68_debug, debug_126 - rx68_cur."!cursor_debug"("NEXT ", "prefixish") + rx68_cur."!cursor_debug"("NEXT", "prefixish") debug_126: rx68_fail: (rx68_rep, rx68_pos, $I10, $P10) = rx68_cur."!mark_fail"(0) @@ -1600,7 +1703,7 @@ rx68_done: rx68_cur."!cursor_fail"() if_null rx68_debug, debug_127 - rx68_cur."!cursor_debug"("FAIL ", "prefixish") + rx68_cur."!cursor_debug"("FAIL", "prefixish") debug_127: .return (rx68_cur) .return () @@ -1608,7 +1711,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__prefixish" :subid("33_1282016519.8364") :method +.sub "!PREFIX__prefixish" :subid("33_1284728468.35267") :method .annotate 'line', 5 $P70 = self."!PREFIX__!subrule"("prefix", "") new $P71, "ResizablePMCArray" @@ -1618,7 +1721,7 @@ .namespace ["HLL";"Grammar"] -.sub "postfixish" :subid("34_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "postfixish" :subid("34_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx74_tgt .local int rx74_pos @@ -1641,7 +1744,7 @@ rx74_start: eq $I10, 1, rx74_restart if_null rx74_debug, debug_128 - rx74_cur."!cursor_debug"("START ", "postfixish") + rx74_cur."!cursor_debug"("START", "postfixish") debug_128: $I10 = self.'from'() ne $I10, -1, rxscan79_done @@ -1682,13 +1785,13 @@ # rx pass rx74_cur."!cursor_pass"(rx74_pos, "postfixish") if_null rx74_debug, debug_129 - rx74_cur."!cursor_debug"("PASS ", "postfixish", " at pos=", rx74_pos) + rx74_cur."!cursor_debug"("PASS", "postfixish", " at pos=", rx74_pos) debug_129: .return (rx74_cur) rx74_restart: .annotate 'line', 5 if_null rx74_debug, debug_130 - rx74_cur."!cursor_debug"("NEXT ", "postfixish") + rx74_cur."!cursor_debug"("NEXT", "postfixish") debug_130: rx74_fail: (rx74_rep, rx74_pos, $I10, $P10) = rx74_cur."!mark_fail"(0) @@ -1698,7 +1801,7 @@ rx74_done: rx74_cur."!cursor_fail"() if_null rx74_debug, debug_131 - rx74_cur."!cursor_debug"("FAIL ", "postfixish") + rx74_cur."!cursor_debug"("FAIL", "postfixish") debug_131: .return (rx74_cur) .return () @@ -1706,7 +1809,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__postfixish" :subid("35_1282016519.8364") :method +.sub "!PREFIX__postfixish" :subid("35_1284728468.35267") :method .annotate 'line', 5 $P76 = self."!PREFIX__!subrule"("postcircumfix", "") $P77 = self."!PREFIX__!subrule"("postfix", "") @@ -1718,7 +1821,7 @@ .namespace ["HLL";"Grammar"] -.sub "nullterm" :subid("36_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "nullterm" :subid("36_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx82_tgt .local int rx82_pos @@ -1741,7 +1844,7 @@ rx82_start: eq $I10, 1, rx82_restart if_null rx82_debug, debug_132 - rx82_cur."!cursor_debug"("START ", "nullterm") + rx82_cur."!cursor_debug"("START", "nullterm") debug_132: $I10 = self.'from'() ne $I10, -1, rxscan85_done @@ -1759,13 +1862,13 @@ # rx pass rx82_cur."!cursor_pass"(rx82_pos, "nullterm") if_null rx82_debug, debug_133 - rx82_cur."!cursor_debug"("PASS ", "nullterm", " at pos=", rx82_pos) + rx82_cur."!cursor_debug"("PASS", "nullterm", " at pos=", rx82_pos) debug_133: .return (rx82_cur) rx82_restart: .annotate 'line', 5 if_null rx82_debug, debug_134 - rx82_cur."!cursor_debug"("NEXT ", "nullterm") + rx82_cur."!cursor_debug"("NEXT", "nullterm") debug_134: rx82_fail: (rx82_rep, rx82_pos, $I10, $P10) = rx82_cur."!mark_fail"(0) @@ -1775,7 +1878,7 @@ rx82_done: rx82_cur."!cursor_fail"() if_null rx82_debug, debug_135 - rx82_cur."!cursor_debug"("FAIL ", "nullterm") + rx82_cur."!cursor_debug"("FAIL", "nullterm") debug_135: .return (rx82_cur) .return () @@ -1783,7 +1886,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__nullterm" :subid("37_1282016519.8364") :method +.sub "!PREFIX__nullterm" :subid("37_1284728468.35267") :method .annotate 'line', 5 new $P84, "ResizablePMCArray" push $P84, "" @@ -1792,7 +1895,7 @@ .namespace ["HLL";"Grammar"] -.sub "nullterm_alt" :subid("38_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "nullterm_alt" :subid("38_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 5 .local string rx87_tgt .local int rx87_pos @@ -1815,7 +1918,7 @@ rx87_start: eq $I10, 1, rx87_restart if_null rx87_debug, debug_136 - rx87_cur."!cursor_debug"("START ", "nullterm_alt") + rx87_cur."!cursor_debug"("START", "nullterm_alt") debug_136: $I10 = self.'from'() ne $I10, -1, rxscan91_done @@ -1840,13 +1943,13 @@ # rx pass rx87_cur."!cursor_pass"(rx87_pos, "nullterm_alt") if_null rx87_debug, debug_137 - rx87_cur."!cursor_debug"("PASS ", "nullterm_alt", " at pos=", rx87_pos) + rx87_cur."!cursor_debug"("PASS", "nullterm_alt", " at pos=", rx87_pos) debug_137: .return (rx87_cur) rx87_restart: .annotate 'line', 5 if_null rx87_debug, debug_138 - rx87_cur."!cursor_debug"("NEXT ", "nullterm_alt") + rx87_cur."!cursor_debug"("NEXT", "nullterm_alt") debug_138: rx87_fail: (rx87_rep, rx87_pos, $I10, $P10) = rx87_cur."!mark_fail"(0) @@ -1856,7 +1959,7 @@ rx87_done: rx87_cur."!cursor_fail"() if_null rx87_debug, debug_139 - rx87_cur."!cursor_debug"("FAIL ", "nullterm_alt") + rx87_cur."!cursor_debug"("FAIL", "nullterm_alt") debug_139: .return (rx87_cur) .return () @@ -1864,7 +1967,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__nullterm_alt" :subid("39_1282016519.8364") :method +.sub "!PREFIX__nullterm_alt" :subid("39_1284728468.35267") :method .annotate 'line', 5 $P89 = self."!PREFIX__!subrule"("nullterm", "") new $P90, "ResizablePMCArray" @@ -1875,7 +1978,7 @@ .namespace ["HLL";"Grammar"] .include "except_types.pasm" -.sub "nulltermish" :subid("40_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "nulltermish" :subid("40_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 new $P94, 'ExceptionHandler' set_addr $P94, control_93 @@ -1902,7 +2005,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_delimited" :subid("41_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_delimited" :subid("41_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx103_tgt .local int rx103_pos @@ -1926,7 +2029,7 @@ rx103_start: eq $I10, 1, rx103_restart if_null rx103_debug, debug_140 - rx103_cur."!cursor_debug"("START ", "quote_delimited") + rx103_cur."!cursor_debug"("START", "quote_delimited") debug_140: $I10 = self.'from'() ne $I10, -1, rxscan107_done @@ -1982,13 +2085,13 @@ # rx pass rx103_cur."!cursor_pass"(rx103_pos, "quote_delimited") if_null rx103_debug, debug_141 - rx103_cur."!cursor_debug"("PASS ", "quote_delimited", " at pos=", rx103_pos) + rx103_cur."!cursor_debug"("PASS", "quote_delimited", " at pos=", rx103_pos) debug_141: .return (rx103_cur) rx103_restart: .annotate 'line', 33 if_null rx103_debug, debug_142 - rx103_cur."!cursor_debug"("NEXT ", "quote_delimited") + rx103_cur."!cursor_debug"("NEXT", "quote_delimited") debug_142: rx103_fail: (rx103_rep, rx103_pos, $I10, $P10) = rx103_cur."!mark_fail"(0) @@ -1998,7 +2101,7 @@ rx103_done: rx103_cur."!cursor_fail"() if_null rx103_debug, debug_143 - rx103_cur."!cursor_debug"("FAIL ", "quote_delimited") + rx103_cur."!cursor_debug"("FAIL", "quote_delimited") debug_143: .return (rx103_cur) .return () @@ -2006,7 +2109,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_delimited" :subid("42_1282016519.8364") :method +.sub "!PREFIX__quote_delimited" :subid("42_1284728468.35267") :method .annotate 'line', 33 $P105 = self."!PREFIX__!subrule"("starter", "") new $P106, "ResizablePMCArray" @@ -2016,7 +2119,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_atom" :subid("43_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_atom" :subid("43_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx111_tgt .local int rx111_pos @@ -2039,7 +2142,7 @@ rx111_start: eq $I10, 1, rx111_restart if_null rx111_debug, debug_144 - rx111_cur."!cursor_debug"("START ", "quote_atom") + rx111_cur."!cursor_debug"("START", "quote_atom") debug_144: $I10 = self.'from'() ne $I10, -1, rxscan114_done @@ -2099,13 +2202,13 @@ # rx pass rx111_cur."!cursor_pass"(rx111_pos, "quote_atom") if_null rx111_debug, debug_145 - rx111_cur."!cursor_debug"("PASS ", "quote_atom", " at pos=", rx111_pos) + rx111_cur."!cursor_debug"("PASS", "quote_atom", " at pos=", rx111_pos) debug_145: .return (rx111_cur) rx111_restart: .annotate 'line', 33 if_null rx111_debug, debug_146 - rx111_cur."!cursor_debug"("NEXT ", "quote_atom") + rx111_cur."!cursor_debug"("NEXT", "quote_atom") debug_146: rx111_fail: (rx111_rep, rx111_pos, $I10, $P10) = rx111_cur."!mark_fail"(0) @@ -2115,7 +2218,7 @@ rx111_done: rx111_cur."!cursor_fail"() if_null rx111_debug, debug_147 - rx111_cur."!cursor_debug"("FAIL ", "quote_atom") + rx111_cur."!cursor_debug"("FAIL", "quote_atom") debug_147: .return (rx111_cur) .return () @@ -2123,7 +2226,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_atom" :subid("44_1282016519.8364") :method +.sub "!PREFIX__quote_atom" :subid("44_1284728468.35267") :method .annotate 'line', 33 new $P113, "ResizablePMCArray" push $P113, "" @@ -2132,7 +2235,7 @@ .namespace ["HLL";"Grammar"] -.sub "decint" :subid("45_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "decint" :subid("45_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx120_tgt .local int rx120_pos @@ -2155,7 +2258,7 @@ rx120_start: eq $I10, 1, rx120_restart if_null rx120_debug, debug_148 - rx120_cur."!cursor_debug"("START ", "decint") + rx120_cur."!cursor_debug"("START", "decint") debug_148: $I10 = self.'from'() ne $I10, -1, rxscan123_done @@ -2196,13 +2299,13 @@ # rx pass rx120_cur."!cursor_pass"(rx120_pos, "decint") if_null rx120_debug, debug_149 - rx120_cur."!cursor_debug"("PASS ", "decint", " at pos=", rx120_pos) + rx120_cur."!cursor_debug"("PASS", "decint", " at pos=", rx120_pos) debug_149: .return (rx120_cur) rx120_restart: .annotate 'line', 33 if_null rx120_debug, debug_150 - rx120_cur."!cursor_debug"("NEXT ", "decint") + rx120_cur."!cursor_debug"("NEXT", "decint") debug_150: rx120_fail: (rx120_rep, rx120_pos, $I10, $P10) = rx120_cur."!mark_fail"(0) @@ -2212,7 +2315,7 @@ rx120_done: rx120_cur."!cursor_fail"() if_null rx120_debug, debug_151 - rx120_cur."!cursor_debug"("FAIL ", "decint") + rx120_cur."!cursor_debug"("FAIL", "decint") debug_151: .return (rx120_cur) .return () @@ -2220,7 +2323,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__decint" :subid("46_1282016519.8364") :method +.sub "!PREFIX__decint" :subid("46_1284728468.35267") :method .annotate 'line', 33 new $P122, "ResizablePMCArray" push $P122, "" @@ -2229,7 +2332,7 @@ .namespace ["HLL";"Grammar"] -.sub "decints" :subid("47_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "decints" :subid("47_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx126_tgt .local int rx126_pos @@ -2253,7 +2356,7 @@ rx126_start: eq $I10, 1, rx126_restart if_null rx126_debug, debug_152 - rx126_cur."!cursor_debug"("START ", "decints") + rx126_cur."!cursor_debug"("START", "decints") debug_152: $I10 = self.'from'() ne $I10, -1, rxscan129_done @@ -2305,13 +2408,13 @@ # rx pass rx126_cur."!cursor_pass"(rx126_pos, "decints") if_null rx126_debug, debug_153 - rx126_cur."!cursor_debug"("PASS ", "decints", " at pos=", rx126_pos) + rx126_cur."!cursor_debug"("PASS", "decints", " at pos=", rx126_pos) debug_153: .return (rx126_cur) rx126_restart: .annotate 'line', 33 if_null rx126_debug, debug_154 - rx126_cur."!cursor_debug"("NEXT ", "decints") + rx126_cur."!cursor_debug"("NEXT", "decints") debug_154: rx126_fail: (rx126_rep, rx126_pos, $I10, $P10) = rx126_cur."!mark_fail"(0) @@ -2321,7 +2424,7 @@ rx126_done: rx126_cur."!cursor_fail"() if_null rx126_debug, debug_155 - rx126_cur."!cursor_debug"("FAIL ", "decints") + rx126_cur."!cursor_debug"("FAIL", "decints") debug_155: .return (rx126_cur) .return () @@ -2329,7 +2432,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__decints" :subid("48_1282016519.8364") :method +.sub "!PREFIX__decints" :subid("48_1284728468.35267") :method .annotate 'line', 33 new $P128, "ResizablePMCArray" push $P128, "" @@ -2338,7 +2441,7 @@ .namespace ["HLL";"Grammar"] -.sub "hexint" :subid("49_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "hexint" :subid("49_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx132_tgt .local int rx132_pos @@ -2361,7 +2464,7 @@ rx132_start: eq $I10, 1, rx132_restart if_null rx132_debug, debug_156 - rx132_cur."!cursor_debug"("START ", "hexint") + rx132_cur."!cursor_debug"("START", "hexint") debug_156: $I10 = self.'from'() ne $I10, -1, rxscan135_done @@ -2380,23 +2483,22 @@ set_addr $I10, rxquantr136_done rx132_cur."!mark_push"(0, -1, $I10) rxquantr136_loop: - # rx rxquantr137 ** 1..* - set_addr $I10, rxquantr137_done - rx132_cur."!mark_push"(0, -1, $I10) - rxquantr137_loop: - # rx enumcharlist negate=0 - ge rx132_pos, rx132_eos, rx132_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx132_pos, rx132_off + set rx132_rep, 0 + sub $I12, rx132_eos, rx132_pos + rxenumcharlistq137_loop: + le $I12, 0, rxenumcharlistq137_done substr $S10, rx132_tgt, $I10, 1 index $I11, "0123456789abcdefABCDEF", $S10 - lt $I11, 0, rx132_fail - inc rx132_pos - set_addr $I10, rxquantr137_done - (rx132_rep) = rx132_cur."!mark_commit"($I10) - set_addr $I10, rxquantr137_done - rx132_cur."!mark_push"(rx132_rep, rx132_pos, $I10) - goto rxquantr137_loop - rxquantr137_done: + lt $I11, 0, rxenumcharlistq137_done + inc rx132_rep + inc $I10 + dec $I12 + goto rxenumcharlistq137_loop + rxenumcharlistq137_done: + lt rx132_rep, 1, rx132_fail + add rx132_pos, rx132_pos, rx132_rep set_addr $I10, rxquantr136_done (rx132_rep) = rx132_cur."!mark_commit"($I10) set_addr $I10, rxquantr136_done @@ -2413,13 +2515,13 @@ # rx pass rx132_cur."!cursor_pass"(rx132_pos, "hexint") if_null rx132_debug, debug_157 - rx132_cur."!cursor_debug"("PASS ", "hexint", " at pos=", rx132_pos) + rx132_cur."!cursor_debug"("PASS", "hexint", " at pos=", rx132_pos) debug_157: .return (rx132_cur) rx132_restart: .annotate 'line', 33 if_null rx132_debug, debug_158 - rx132_cur."!cursor_debug"("NEXT ", "hexint") + rx132_cur."!cursor_debug"("NEXT", "hexint") debug_158: rx132_fail: (rx132_rep, rx132_pos, $I10, $P10) = rx132_cur."!mark_fail"(0) @@ -2429,7 +2531,7 @@ rx132_done: rx132_cur."!cursor_fail"() if_null rx132_debug, debug_159 - rx132_cur."!cursor_debug"("FAIL ", "hexint") + rx132_cur."!cursor_debug"("FAIL", "hexint") debug_159: .return (rx132_cur) .return () @@ -2437,7 +2539,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__hexint" :subid("50_1282016519.8364") :method +.sub "!PREFIX__hexint" :subid("50_1284728468.35267") :method .annotate 'line', 33 new $P134, "ResizablePMCArray" push $P134, "" @@ -2446,7 +2548,7 @@ .namespace ["HLL";"Grammar"] -.sub "hexints" :subid("51_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "hexints" :subid("51_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx139_tgt .local int rx139_pos @@ -2470,7 +2572,7 @@ rx139_start: eq $I10, 1, rx139_restart if_null rx139_debug, debug_160 - rx139_cur."!cursor_debug"("START ", "hexints") + rx139_cur."!cursor_debug"("START", "hexints") debug_160: $I10 = self.'from'() ne $I10, -1, rxscan142_done @@ -2522,13 +2624,13 @@ # rx pass rx139_cur."!cursor_pass"(rx139_pos, "hexints") if_null rx139_debug, debug_161 - rx139_cur."!cursor_debug"("PASS ", "hexints", " at pos=", rx139_pos) + rx139_cur."!cursor_debug"("PASS", "hexints", " at pos=", rx139_pos) debug_161: .return (rx139_cur) rx139_restart: .annotate 'line', 33 if_null rx139_debug, debug_162 - rx139_cur."!cursor_debug"("NEXT ", "hexints") + rx139_cur."!cursor_debug"("NEXT", "hexints") debug_162: rx139_fail: (rx139_rep, rx139_pos, $I10, $P10) = rx139_cur."!mark_fail"(0) @@ -2538,7 +2640,7 @@ rx139_done: rx139_cur."!cursor_fail"() if_null rx139_debug, debug_163 - rx139_cur."!cursor_debug"("FAIL ", "hexints") + rx139_cur."!cursor_debug"("FAIL", "hexints") debug_163: .return (rx139_cur) .return () @@ -2546,7 +2648,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__hexints" :subid("52_1282016519.8364") :method +.sub "!PREFIX__hexints" :subid("52_1284728468.35267") :method .annotate 'line', 33 new $P141, "ResizablePMCArray" push $P141, "" @@ -2555,7 +2657,7 @@ .namespace ["HLL";"Grammar"] -.sub "octint" :subid("53_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "octint" :subid("53_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx145_tgt .local int rx145_pos @@ -2578,7 +2680,7 @@ rx145_start: eq $I10, 1, rx145_restart if_null rx145_debug, debug_164 - rx145_cur."!cursor_debug"("START ", "octint") + rx145_cur."!cursor_debug"("START", "octint") debug_164: $I10 = self.'from'() ne $I10, -1, rxscan148_done @@ -2597,23 +2699,22 @@ set_addr $I10, rxquantr149_done rx145_cur."!mark_push"(0, -1, $I10) rxquantr149_loop: - # rx rxquantr150 ** 1..* - set_addr $I10, rxquantr150_done - rx145_cur."!mark_push"(0, -1, $I10) - rxquantr150_loop: - # rx enumcharlist negate=0 - ge rx145_pos, rx145_eos, rx145_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx145_pos, rx145_off + set rx145_rep, 0 + sub $I12, rx145_eos, rx145_pos + rxenumcharlistq150_loop: + le $I12, 0, rxenumcharlistq150_done substr $S10, rx145_tgt, $I10, 1 index $I11, "01234567", $S10 - lt $I11, 0, rx145_fail - inc rx145_pos - set_addr $I10, rxquantr150_done - (rx145_rep) = rx145_cur."!mark_commit"($I10) - set_addr $I10, rxquantr150_done - rx145_cur."!mark_push"(rx145_rep, rx145_pos, $I10) - goto rxquantr150_loop - rxquantr150_done: + lt $I11, 0, rxenumcharlistq150_done + inc rx145_rep + inc $I10 + dec $I12 + goto rxenumcharlistq150_loop + rxenumcharlistq150_done: + lt rx145_rep, 1, rx145_fail + add rx145_pos, rx145_pos, rx145_rep set_addr $I10, rxquantr149_done (rx145_rep) = rx145_cur."!mark_commit"($I10) set_addr $I10, rxquantr149_done @@ -2630,13 +2731,13 @@ # rx pass rx145_cur."!cursor_pass"(rx145_pos, "octint") if_null rx145_debug, debug_165 - rx145_cur."!cursor_debug"("PASS ", "octint", " at pos=", rx145_pos) + rx145_cur."!cursor_debug"("PASS", "octint", " at pos=", rx145_pos) debug_165: .return (rx145_cur) rx145_restart: .annotate 'line', 33 if_null rx145_debug, debug_166 - rx145_cur."!cursor_debug"("NEXT ", "octint") + rx145_cur."!cursor_debug"("NEXT", "octint") debug_166: rx145_fail: (rx145_rep, rx145_pos, $I10, $P10) = rx145_cur."!mark_fail"(0) @@ -2646,7 +2747,7 @@ rx145_done: rx145_cur."!cursor_fail"() if_null rx145_debug, debug_167 - rx145_cur."!cursor_debug"("FAIL ", "octint") + rx145_cur."!cursor_debug"("FAIL", "octint") debug_167: .return (rx145_cur) .return () @@ -2654,7 +2755,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__octint" :subid("54_1282016519.8364") :method +.sub "!PREFIX__octint" :subid("54_1284728468.35267") :method .annotate 'line', 33 new $P147, "ResizablePMCArray" push $P147, "" @@ -2663,7 +2764,7 @@ .namespace ["HLL";"Grammar"] -.sub "octints" :subid("55_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "octints" :subid("55_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx152_tgt .local int rx152_pos @@ -2687,7 +2788,7 @@ rx152_start: eq $I10, 1, rx152_restart if_null rx152_debug, debug_168 - rx152_cur."!cursor_debug"("START ", "octints") + rx152_cur."!cursor_debug"("START", "octints") debug_168: $I10 = self.'from'() ne $I10, -1, rxscan155_done @@ -2739,13 +2840,13 @@ # rx pass rx152_cur."!cursor_pass"(rx152_pos, "octints") if_null rx152_debug, debug_169 - rx152_cur."!cursor_debug"("PASS ", "octints", " at pos=", rx152_pos) + rx152_cur."!cursor_debug"("PASS", "octints", " at pos=", rx152_pos) debug_169: .return (rx152_cur) rx152_restart: .annotate 'line', 33 if_null rx152_debug, debug_170 - rx152_cur."!cursor_debug"("NEXT ", "octints") + rx152_cur."!cursor_debug"("NEXT", "octints") debug_170: rx152_fail: (rx152_rep, rx152_pos, $I10, $P10) = rx152_cur."!mark_fail"(0) @@ -2755,7 +2856,7 @@ rx152_done: rx152_cur."!cursor_fail"() if_null rx152_debug, debug_171 - rx152_cur."!cursor_debug"("FAIL ", "octints") + rx152_cur."!cursor_debug"("FAIL", "octints") debug_171: .return (rx152_cur) .return () @@ -2763,7 +2864,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__octints" :subid("56_1282016519.8364") :method +.sub "!PREFIX__octints" :subid("56_1284728468.35267") :method .annotate 'line', 33 new $P154, "ResizablePMCArray" push $P154, "" @@ -2772,7 +2873,7 @@ .namespace ["HLL";"Grammar"] -.sub "binint" :subid("57_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "binint" :subid("57_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx158_tgt .local int rx158_pos @@ -2795,7 +2896,7 @@ rx158_start: eq $I10, 1, rx158_restart if_null rx158_debug, debug_172 - rx158_cur."!cursor_debug"("START ", "binint") + rx158_cur."!cursor_debug"("START", "binint") debug_172: $I10 = self.'from'() ne $I10, -1, rxscan161_done @@ -2814,23 +2915,22 @@ set_addr $I10, rxquantr162_done rx158_cur."!mark_push"(0, -1, $I10) rxquantr162_loop: - # rx rxquantr163 ** 1..* - set_addr $I10, rxquantr163_done - rx158_cur."!mark_push"(0, -1, $I10) - rxquantr163_loop: - # rx enumcharlist negate=0 - ge rx158_pos, rx158_eos, rx158_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx158_pos, rx158_off + set rx158_rep, 0 + sub $I12, rx158_eos, rx158_pos + rxenumcharlistq163_loop: + le $I12, 0, rxenumcharlistq163_done substr $S10, rx158_tgt, $I10, 1 index $I11, "01", $S10 - lt $I11, 0, rx158_fail - inc rx158_pos - set_addr $I10, rxquantr163_done - (rx158_rep) = rx158_cur."!mark_commit"($I10) - set_addr $I10, rxquantr163_done - rx158_cur."!mark_push"(rx158_rep, rx158_pos, $I10) - goto rxquantr163_loop - rxquantr163_done: + lt $I11, 0, rxenumcharlistq163_done + inc rx158_rep + inc $I10 + dec $I12 + goto rxenumcharlistq163_loop + rxenumcharlistq163_done: + lt rx158_rep, 1, rx158_fail + add rx158_pos, rx158_pos, rx158_rep set_addr $I10, rxquantr162_done (rx158_rep) = rx158_cur."!mark_commit"($I10) set_addr $I10, rxquantr162_done @@ -2847,13 +2947,13 @@ # rx pass rx158_cur."!cursor_pass"(rx158_pos, "binint") if_null rx158_debug, debug_173 - rx158_cur."!cursor_debug"("PASS ", "binint", " at pos=", rx158_pos) + rx158_cur."!cursor_debug"("PASS", "binint", " at pos=", rx158_pos) debug_173: .return (rx158_cur) rx158_restart: .annotate 'line', 33 if_null rx158_debug, debug_174 - rx158_cur."!cursor_debug"("NEXT ", "binint") + rx158_cur."!cursor_debug"("NEXT", "binint") debug_174: rx158_fail: (rx158_rep, rx158_pos, $I10, $P10) = rx158_cur."!mark_fail"(0) @@ -2863,7 +2963,7 @@ rx158_done: rx158_cur."!cursor_fail"() if_null rx158_debug, debug_175 - rx158_cur."!cursor_debug"("FAIL ", "binint") + rx158_cur."!cursor_debug"("FAIL", "binint") debug_175: .return (rx158_cur) .return () @@ -2871,7 +2971,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__binint" :subid("58_1282016519.8364") :method +.sub "!PREFIX__binint" :subid("58_1284728468.35267") :method .annotate 'line', 33 new $P160, "ResizablePMCArray" push $P160, "" @@ -2880,7 +2980,7 @@ .namespace ["HLL";"Grammar"] -.sub "binints" :subid("59_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "binints" :subid("59_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx165_tgt .local int rx165_pos @@ -2904,7 +3004,7 @@ rx165_start: eq $I10, 1, rx165_restart if_null rx165_debug, debug_176 - rx165_cur."!cursor_debug"("START ", "binints") + rx165_cur."!cursor_debug"("START", "binints") debug_176: $I10 = self.'from'() ne $I10, -1, rxscan168_done @@ -2956,13 +3056,13 @@ # rx pass rx165_cur."!cursor_pass"(rx165_pos, "binints") if_null rx165_debug, debug_177 - rx165_cur."!cursor_debug"("PASS ", "binints", " at pos=", rx165_pos) + rx165_cur."!cursor_debug"("PASS", "binints", " at pos=", rx165_pos) debug_177: .return (rx165_cur) rx165_restart: .annotate 'line', 33 if_null rx165_debug, debug_178 - rx165_cur."!cursor_debug"("NEXT ", "binints") + rx165_cur."!cursor_debug"("NEXT", "binints") debug_178: rx165_fail: (rx165_rep, rx165_pos, $I10, $P10) = rx165_cur."!mark_fail"(0) @@ -2972,7 +3072,7 @@ rx165_done: rx165_cur."!cursor_fail"() if_null rx165_debug, debug_179 - rx165_cur."!cursor_debug"("FAIL ", "binints") + rx165_cur."!cursor_debug"("FAIL", "binints") debug_179: .return (rx165_cur) .return () @@ -2980,7 +3080,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__binints" :subid("60_1282016519.8364") :method +.sub "!PREFIX__binints" :subid("60_1284728468.35267") :method .annotate 'line', 33 new $P167, "ResizablePMCArray" push $P167, "" @@ -2989,7 +3089,7 @@ .namespace ["HLL";"Grammar"] -.sub "integer" :subid("61_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "integer" :subid("61_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx171_tgt .local int rx171_pos @@ -3012,7 +3112,7 @@ rx171_start: eq $I10, 1, rx171_restart if_null rx171_debug, debug_180 - rx171_cur."!cursor_debug"("START ", "integer") + rx171_cur."!cursor_debug"("START", "integer") debug_180: $I10 = self.'from'() ne $I10, -1, rxscan179_done @@ -3127,13 +3227,13 @@ # rx pass rx171_cur."!cursor_pass"(rx171_pos, "integer") if_null rx171_debug, debug_181 - rx171_cur."!cursor_debug"("PASS ", "integer", " at pos=", rx171_pos) + rx171_cur."!cursor_debug"("PASS", "integer", " at pos=", rx171_pos) debug_181: .return (rx171_cur) rx171_restart: .annotate 'line', 33 if_null rx171_debug, debug_182 - rx171_cur."!cursor_debug"("NEXT ", "integer") + rx171_cur."!cursor_debug"("NEXT", "integer") debug_182: rx171_fail: (rx171_rep, rx171_pos, $I10, $P10) = rx171_cur."!mark_fail"(0) @@ -3143,7 +3243,7 @@ rx171_done: rx171_cur."!cursor_fail"() if_null rx171_debug, debug_183 - rx171_cur."!cursor_debug"("FAIL ", "integer") + rx171_cur."!cursor_debug"("FAIL", "integer") debug_183: .return (rx171_cur) .return () @@ -3151,7 +3251,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__integer" :subid("62_1282016519.8364") :method +.sub "!PREFIX__integer" :subid("62_1284728468.35267") :method .annotate 'line', 33 $P173 = self."!PREFIX__!subrule"("decint", "") $P174 = self."!PREFIX__!subrule"("decint", "0d") @@ -3169,7 +3269,7 @@ .namespace ["HLL";"Grammar"] -.sub "dec_number" :subid("63_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "dec_number" :subid("63_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx183_tgt .local int rx183_pos @@ -3193,7 +3293,7 @@ rx183_start: eq $I10, 1, rx183_restart if_null rx183_debug, debug_184 - rx183_cur."!cursor_debug"("START ", "dec_number") + rx183_cur."!cursor_debug"("START", "dec_number") debug_184: $I10 = self.'from'() ne $I10, -1, rxscan186_done @@ -3352,13 +3452,13 @@ # rx pass rx183_cur."!cursor_pass"(rx183_pos, "dec_number") if_null rx183_debug, debug_185 - rx183_cur."!cursor_debug"("PASS ", "dec_number", " at pos=", rx183_pos) + rx183_cur."!cursor_debug"("PASS", "dec_number", " at pos=", rx183_pos) debug_185: .return (rx183_cur) rx183_restart: .annotate 'line', 33 if_null rx183_debug, debug_186 - rx183_cur."!cursor_debug"("NEXT ", "dec_number") + rx183_cur."!cursor_debug"("NEXT", "dec_number") debug_186: rx183_fail: (rx183_rep, rx183_pos, $I10, $P10) = rx183_cur."!mark_fail"(0) @@ -3368,7 +3468,7 @@ rx183_done: rx183_cur."!cursor_fail"() if_null rx183_debug, debug_187 - rx183_cur."!cursor_debug"("FAIL ", "dec_number") + rx183_cur."!cursor_debug"("FAIL", "dec_number") debug_187: .return (rx183_cur) .return () @@ -3376,7 +3476,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__dec_number" :subid("64_1282016519.8364") :method +.sub "!PREFIX__dec_number" :subid("64_1284728468.35267") :method .annotate 'line', 33 new $P185, "ResizablePMCArray" push $P185, "" @@ -3387,7 +3487,7 @@ .namespace ["HLL";"Grammar"] -.sub "escale" :subid("65_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "escale" :subid("65_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx196_tgt .local int rx196_pos @@ -3410,7 +3510,7 @@ rx196_start: eq $I10, 1, rx196_restart if_null rx196_debug, debug_188 - rx196_cur."!cursor_debug"("START ", "escale") + rx196_cur."!cursor_debug"("START", "escale") debug_188: $I10 = self.'from'() ne $I10, -1, rxscan199_done @@ -3432,20 +3532,20 @@ index $I11, "Ee", $S10 lt $I11, 0, rx196_fail inc rx196_pos - # rx rxquantr200 ** 0..1 - set_addr $I10, rxquantr200_done - rx196_cur."!mark_push"(0, rx196_pos, $I10) - rxquantr200_loop: - # rx enumcharlist negate=0 - ge rx196_pos, rx196_eos, rx196_fail + # rx enumcharlist_q negate=0 r 0..1 sub $I10, rx196_pos, rx196_off + set rx196_rep, 0 + sub $I12, rx196_eos, rx196_pos + le $I12, 1, rxenumcharlistq200_loop + set $I12, 1 + rxenumcharlistq200_loop: + le $I12, 0, rxenumcharlistq200_done substr $S10, rx196_tgt, $I10, 1 index $I11, "+-", $S10 - lt $I11, 0, rx196_fail - inc rx196_pos - set_addr $I10, rxquantr200_done - (rx196_rep) = rx196_cur."!mark_commit"($I10) - rxquantr200_done: + lt $I11, 0, rxenumcharlistq200_done + inc rx196_rep + rxenumcharlistq200_done: + add rx196_pos, rx196_pos, rx196_rep # rx charclass_q d r 1..-1 sub $I10, rx196_pos, rx196_off find_not_cclass $I11, 8, rx196_tgt, $I10, rx196_eos @@ -3455,13 +3555,13 @@ # rx pass rx196_cur."!cursor_pass"(rx196_pos, "escale") if_null rx196_debug, debug_189 - rx196_cur."!cursor_debug"("PASS ", "escale", " at pos=", rx196_pos) + rx196_cur."!cursor_debug"("PASS", "escale", " at pos=", rx196_pos) debug_189: .return (rx196_cur) rx196_restart: .annotate 'line', 33 if_null rx196_debug, debug_190 - rx196_cur."!cursor_debug"("NEXT ", "escale") + rx196_cur."!cursor_debug"("NEXT", "escale") debug_190: rx196_fail: (rx196_rep, rx196_pos, $I10, $P10) = rx196_cur."!mark_fail"(0) @@ -3471,7 +3571,7 @@ rx196_done: rx196_cur."!cursor_fail"() if_null rx196_debug, debug_191 - rx196_cur."!cursor_debug"("FAIL ", "escale") + rx196_cur."!cursor_debug"("FAIL", "escale") debug_191: .return (rx196_cur) .return () @@ -3479,7 +3579,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__escale" :subid("66_1282016519.8364") :method +.sub "!PREFIX__escale" :subid("66_1284728468.35267") :method .annotate 'line', 33 new $P198, "ResizablePMCArray" push $P198, "e" @@ -3489,7 +3589,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape" :subid("67_1282016519.8364") :method +.sub "quote_escape" :subid("67_1284728468.35267") :method .annotate 'line', 79 $P202 = self."!protoregex"("quote_escape") .return ($P202) @@ -3497,7 +3597,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape" :subid("68_1282016519.8364") :method +.sub "!PREFIX__quote_escape" :subid("68_1284728468.35267") :method .annotate 'line', 79 $P204 = self."!PREFIX__!protoregex"("quote_escape") .return ($P204) @@ -3505,7 +3605,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("69_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("69_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx206_tgt .local int rx206_pos @@ -3528,7 +3628,7 @@ rx206_start: eq $I10, 1, rx206_restart if_null rx206_debug, debug_192 - rx206_cur."!cursor_debug"("START ", "quote_escape:sym") + rx206_cur."!cursor_debug"("START", "quote_escape:sym") debug_192: $I10 = self.'from'() ne $I10, -1, rxscan209_done @@ -3557,13 +3657,13 @@ # rx pass rx206_cur."!cursor_pass"(rx206_pos, "quote_escape:sym") if_null rx206_debug, debug_193 - rx206_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx206_pos) + rx206_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx206_pos) debug_193: .return (rx206_cur) rx206_restart: .annotate 'line', 33 if_null rx206_debug, debug_194 - rx206_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx206_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_194: rx206_fail: (rx206_rep, rx206_pos, $I10, $P10) = rx206_cur."!mark_fail"(0) @@ -3573,7 +3673,7 @@ rx206_done: rx206_cur."!cursor_fail"() if_null rx206_debug, debug_195 - rx206_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx206_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_195: .return (rx206_cur) .return () @@ -3581,7 +3681,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("70_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("70_1284728468.35267") :method .annotate 'line', 33 new $P208, "ResizablePMCArray" push $P208, "\\\\" @@ -3590,7 +3690,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("71_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("71_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx211_tgt .local int rx211_pos @@ -3613,7 +3713,7 @@ rx211_start: eq $I10, 1, rx211_restart if_null rx211_debug, debug_196 - rx211_cur."!cursor_debug"("START ", "quote_escape:sym") + rx211_cur."!cursor_debug"("START", "quote_escape:sym") debug_196: $I10 = self.'from'() ne $I10, -1, rxscan214_done @@ -3649,13 +3749,13 @@ # rx pass rx211_cur."!cursor_pass"(rx211_pos, "quote_escape:sym") if_null rx211_debug, debug_197 - rx211_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx211_pos) + rx211_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx211_pos) debug_197: .return (rx211_cur) rx211_restart: .annotate 'line', 33 if_null rx211_debug, debug_198 - rx211_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx211_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_198: rx211_fail: (rx211_rep, rx211_pos, $I10, $P10) = rx211_cur."!mark_fail"(0) @@ -3665,7 +3765,7 @@ rx211_done: rx211_cur."!cursor_fail"() if_null rx211_debug, debug_199 - rx211_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx211_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_199: .return (rx211_cur) .return () @@ -3673,7 +3773,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("72_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("72_1284728468.35267") :method .annotate 'line', 33 new $P213, "ResizablePMCArray" push $P213, "\\" @@ -3682,7 +3782,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("73_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("73_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx216_tgt .local int rx216_pos @@ -3705,7 +3805,7 @@ rx216_start: eq $I10, 1, rx216_restart if_null rx216_debug, debug_200 - rx216_cur."!cursor_debug"("START ", "quote_escape:sym") + rx216_cur."!cursor_debug"("START", "quote_escape:sym") debug_200: $I10 = self.'from'() ne $I10, -1, rxscan219_done @@ -3734,13 +3834,13 @@ # rx pass rx216_cur."!cursor_pass"(rx216_pos, "quote_escape:sym") if_null rx216_debug, debug_201 - rx216_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx216_pos) + rx216_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx216_pos) debug_201: .return (rx216_cur) rx216_restart: .annotate 'line', 33 if_null rx216_debug, debug_202 - rx216_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx216_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_202: rx216_fail: (rx216_rep, rx216_pos, $I10, $P10) = rx216_cur."!mark_fail"(0) @@ -3750,7 +3850,7 @@ rx216_done: rx216_cur."!cursor_fail"() if_null rx216_debug, debug_203 - rx216_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx216_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_203: .return (rx216_cur) .return () @@ -3758,7 +3858,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("74_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("74_1284728468.35267") :method .annotate 'line', 33 new $P218, "ResizablePMCArray" push $P218, "\\b" @@ -3767,7 +3867,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("75_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("75_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx221_tgt .local int rx221_pos @@ -3790,7 +3890,7 @@ rx221_start: eq $I10, 1, rx221_restart if_null rx221_debug, debug_204 - rx221_cur."!cursor_debug"("START ", "quote_escape:sym") + rx221_cur."!cursor_debug"("START", "quote_escape:sym") debug_204: $I10 = self.'from'() ne $I10, -1, rxscan224_done @@ -3819,13 +3919,13 @@ # rx pass rx221_cur."!cursor_pass"(rx221_pos, "quote_escape:sym") if_null rx221_debug, debug_205 - rx221_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx221_pos) + rx221_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx221_pos) debug_205: .return (rx221_cur) rx221_restart: .annotate 'line', 33 if_null rx221_debug, debug_206 - rx221_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx221_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_206: rx221_fail: (rx221_rep, rx221_pos, $I10, $P10) = rx221_cur."!mark_fail"(0) @@ -3835,7 +3935,7 @@ rx221_done: rx221_cur."!cursor_fail"() if_null rx221_debug, debug_207 - rx221_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx221_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_207: .return (rx221_cur) .return () @@ -3843,7 +3943,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("76_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("76_1284728468.35267") :method .annotate 'line', 33 new $P223, "ResizablePMCArray" push $P223, "\\n" @@ -3852,7 +3952,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("77_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("77_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx226_tgt .local int rx226_pos @@ -3875,7 +3975,7 @@ rx226_start: eq $I10, 1, rx226_restart if_null rx226_debug, debug_208 - rx226_cur."!cursor_debug"("START ", "quote_escape:sym") + rx226_cur."!cursor_debug"("START", "quote_escape:sym") debug_208: $I10 = self.'from'() ne $I10, -1, rxscan229_done @@ -3904,13 +4004,13 @@ # rx pass rx226_cur."!cursor_pass"(rx226_pos, "quote_escape:sym") if_null rx226_debug, debug_209 - rx226_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx226_pos) + rx226_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx226_pos) debug_209: .return (rx226_cur) rx226_restart: .annotate 'line', 33 if_null rx226_debug, debug_210 - rx226_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx226_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_210: rx226_fail: (rx226_rep, rx226_pos, $I10, $P10) = rx226_cur."!mark_fail"(0) @@ -3920,7 +4020,7 @@ rx226_done: rx226_cur."!cursor_fail"() if_null rx226_debug, debug_211 - rx226_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx226_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_211: .return (rx226_cur) .return () @@ -3928,7 +4028,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("78_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("78_1284728468.35267") :method .annotate 'line', 33 new $P228, "ResizablePMCArray" push $P228, "\\r" @@ -3937,7 +4037,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("79_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("79_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx231_tgt .local int rx231_pos @@ -3960,7 +4060,7 @@ rx231_start: eq $I10, 1, rx231_restart if_null rx231_debug, debug_212 - rx231_cur."!cursor_debug"("START ", "quote_escape:sym") + rx231_cur."!cursor_debug"("START", "quote_escape:sym") debug_212: $I10 = self.'from'() ne $I10, -1, rxscan234_done @@ -3989,13 +4089,13 @@ # rx pass rx231_cur."!cursor_pass"(rx231_pos, "quote_escape:sym") if_null rx231_debug, debug_213 - rx231_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx231_pos) + rx231_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx231_pos) debug_213: .return (rx231_cur) rx231_restart: .annotate 'line', 33 if_null rx231_debug, debug_214 - rx231_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx231_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_214: rx231_fail: (rx231_rep, rx231_pos, $I10, $P10) = rx231_cur."!mark_fail"(0) @@ -4005,7 +4105,7 @@ rx231_done: rx231_cur."!cursor_fail"() if_null rx231_debug, debug_215 - rx231_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx231_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_215: .return (rx231_cur) .return () @@ -4013,7 +4113,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("80_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("80_1284728468.35267") :method .annotate 'line', 33 new $P233, "ResizablePMCArray" push $P233, "\\t" @@ -4022,7 +4122,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("81_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("81_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx236_tgt .local int rx236_pos @@ -4045,7 +4145,7 @@ rx236_start: eq $I10, 1, rx236_restart if_null rx236_debug, debug_216 - rx236_cur."!cursor_debug"("START ", "quote_escape:sym") + rx236_cur."!cursor_debug"("START", "quote_escape:sym") debug_216: $I10 = self.'from'() ne $I10, -1, rxscan239_done @@ -4074,13 +4174,13 @@ # rx pass rx236_cur."!cursor_pass"(rx236_pos, "quote_escape:sym") if_null rx236_debug, debug_217 - rx236_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx236_pos) + rx236_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx236_pos) debug_217: .return (rx236_cur) rx236_restart: .annotate 'line', 33 if_null rx236_debug, debug_218 - rx236_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx236_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_218: rx236_fail: (rx236_rep, rx236_pos, $I10, $P10) = rx236_cur."!mark_fail"(0) @@ -4090,7 +4190,7 @@ rx236_done: rx236_cur."!cursor_fail"() if_null rx236_debug, debug_219 - rx236_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx236_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_219: .return (rx236_cur) .return () @@ -4098,7 +4198,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("82_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("82_1284728468.35267") :method .annotate 'line', 33 new $P238, "ResizablePMCArray" push $P238, "\\f" @@ -4107,7 +4207,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("83_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("83_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx241_tgt .local int rx241_pos @@ -4130,7 +4230,7 @@ rx241_start: eq $I10, 1, rx241_restart if_null rx241_debug, debug_220 - rx241_cur."!cursor_debug"("START ", "quote_escape:sym") + rx241_cur."!cursor_debug"("START", "quote_escape:sym") debug_220: $I10 = self.'from'() ne $I10, -1, rxscan244_done @@ -4159,13 +4259,13 @@ # rx pass rx241_cur."!cursor_pass"(rx241_pos, "quote_escape:sym") if_null rx241_debug, debug_221 - rx241_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx241_pos) + rx241_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx241_pos) debug_221: .return (rx241_cur) rx241_restart: .annotate 'line', 33 if_null rx241_debug, debug_222 - rx241_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx241_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_222: rx241_fail: (rx241_rep, rx241_pos, $I10, $P10) = rx241_cur."!mark_fail"(0) @@ -4175,7 +4275,7 @@ rx241_done: rx241_cur."!cursor_fail"() if_null rx241_debug, debug_223 - rx241_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx241_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_223: .return (rx241_cur) .return () @@ -4183,7 +4283,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("84_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("84_1284728468.35267") :method .annotate 'line', 33 new $P243, "ResizablePMCArray" push $P243, "\\e" @@ -4192,7 +4292,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("85_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("85_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx246_tgt .local int rx246_pos @@ -4215,7 +4315,7 @@ rx246_start: eq $I10, 1, rx246_restart if_null rx246_debug, debug_224 - rx246_cur."!cursor_debug"("START ", "quote_escape:sym") + rx246_cur."!cursor_debug"("START", "quote_escape:sym") debug_224: $I10 = self.'from'() ne $I10, -1, rxscan249_done @@ -4280,13 +4380,13 @@ # rx pass rx246_cur."!cursor_pass"(rx246_pos, "quote_escape:sym") if_null rx246_debug, debug_225 - rx246_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx246_pos) + rx246_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx246_pos) debug_225: .return (rx246_cur) rx246_restart: .annotate 'line', 33 if_null rx246_debug, debug_226 - rx246_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx246_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_226: rx246_fail: (rx246_rep, rx246_pos, $I10, $P10) = rx246_cur."!mark_fail"(0) @@ -4296,7 +4396,7 @@ rx246_done: rx246_cur."!cursor_fail"() if_null rx246_debug, debug_227 - rx246_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx246_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_227: .return (rx246_cur) .return () @@ -4304,7 +4404,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("86_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("86_1284728468.35267") :method .annotate 'line', 33 new $P248, "ResizablePMCArray" push $P248, unicode:"\\x" @@ -4313,7 +4413,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("87_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("87_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx252_tgt .local int rx252_pos @@ -4336,7 +4436,7 @@ rx252_start: eq $I10, 1, rx252_restart if_null rx252_debug, debug_228 - rx252_cur."!cursor_debug"("START ", "quote_escape:sym") + rx252_cur."!cursor_debug"("START", "quote_escape:sym") debug_228: $I10 = self.'from'() ne $I10, -1, rxscan255_done @@ -4401,13 +4501,13 @@ # rx pass rx252_cur."!cursor_pass"(rx252_pos, "quote_escape:sym") if_null rx252_debug, debug_229 - rx252_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx252_pos) + rx252_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx252_pos) debug_229: .return (rx252_cur) rx252_restart: .annotate 'line', 33 if_null rx252_debug, debug_230 - rx252_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx252_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_230: rx252_fail: (rx252_rep, rx252_pos, $I10, $P10) = rx252_cur."!mark_fail"(0) @@ -4417,7 +4517,7 @@ rx252_done: rx252_cur."!cursor_fail"() if_null rx252_debug, debug_231 - rx252_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx252_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_231: .return (rx252_cur) .return () @@ -4425,7 +4525,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("88_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("88_1284728468.35267") :method .annotate 'line', 33 new $P254, "ResizablePMCArray" push $P254, "\\o" @@ -4434,7 +4534,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("89_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("89_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx258_tgt .local int rx258_pos @@ -4457,7 +4557,7 @@ rx258_start: eq $I10, 1, rx258_restart if_null rx258_debug, debug_232 - rx258_cur."!cursor_debug"("START ", "quote_escape:sym") + rx258_cur."!cursor_debug"("START", "quote_escape:sym") debug_232: $I10 = self.'from'() ne $I10, -1, rxscan261_done @@ -4493,13 +4593,13 @@ # rx pass rx258_cur."!cursor_pass"(rx258_pos, "quote_escape:sym") if_null rx258_debug, debug_233 - rx258_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx258_pos) + rx258_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx258_pos) debug_233: .return (rx258_cur) rx258_restart: .annotate 'line', 33 if_null rx258_debug, debug_234 - rx258_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx258_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_234: rx258_fail: (rx258_rep, rx258_pos, $I10, $P10) = rx258_cur."!mark_fail"(0) @@ -4509,7 +4609,7 @@ rx258_done: rx258_cur."!cursor_fail"() if_null rx258_debug, debug_235 - rx258_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx258_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_235: .return (rx258_cur) .return () @@ -4517,7 +4617,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("90_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("90_1284728468.35267") :method .annotate 'line', 33 new $P260, "ResizablePMCArray" push $P260, "\\c" @@ -4526,7 +4626,7 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym<0>" :subid("91_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym<0>" :subid("91_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx263_tgt .local int rx263_pos @@ -4549,7 +4649,7 @@ rx263_start: eq $I10, 1, rx263_restart if_null rx263_debug, debug_236 - rx263_cur."!cursor_debug"("START ", "quote_escape:sym<0>") + rx263_cur."!cursor_debug"("START", "quote_escape:sym<0>") debug_236: $I10 = self.'from'() ne $I10, -1, rxscan266_done @@ -4599,13 +4699,13 @@ # rx pass rx263_cur."!cursor_pass"(rx263_pos, "quote_escape:sym<0>") if_null rx263_debug, debug_237 - rx263_cur."!cursor_debug"("PASS ", "quote_escape:sym<0>", " at pos=", rx263_pos) + rx263_cur."!cursor_debug"("PASS", "quote_escape:sym<0>", " at pos=", rx263_pos) 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>") + rx263_cur."!cursor_debug"("NEXT", "quote_escape:sym<0>") debug_238: rx263_fail: (rx263_rep, rx263_pos, $I10, $P10) = rx263_cur."!mark_fail"(0) @@ -4615,7 +4715,7 @@ rx263_done: rx263_cur."!cursor_fail"() if_null rx263_debug, debug_239 - rx263_cur."!cursor_debug"("FAIL ", "quote_escape:sym<0>") + rx263_cur."!cursor_debug"("FAIL", "quote_escape:sym<0>") debug_239: .return (rx263_cur) .return () @@ -4623,7 +4723,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym<0>" :subid("92_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym<0>" :subid("92_1284728468.35267") :method .annotate 'line', 33 new $P265, "ResizablePMCArray" push $P265, "\\0" @@ -4632,13 +4732,13 @@ .namespace ["HLL";"Grammar"] -.sub "quote_escape:sym" :subid("93_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "quote_escape:sym" :subid("93_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 - .const 'Sub' $P288 = "97_1282016519.8364" + .const 'Sub' $P288 = "97_1284728468.35267" capture_lex $P288 - .const 'Sub' $P281 = "96_1282016519.8364" + .const 'Sub' $P281 = "96_1284728468.35267" capture_lex $P281 - .const 'Sub' $P276 = "95_1282016519.8364" + .const 'Sub' $P276 = "95_1284728468.35267" capture_lex $P276 .local string rx269_tgt .local int rx269_pos @@ -4661,7 +4761,7 @@ rx269_start: eq $I10, 1, rx269_restart if_null rx269_debug, debug_240 - rx269_cur."!cursor_debug"("START ", "quote_escape:sym") + rx269_cur."!cursor_debug"("START", "quote_escape:sym") debug_240: $I10 = self.'from'() ne $I10, -1, rxscan272_done @@ -4680,7 +4780,7 @@ find_lex $P273, unicode:"$\x{a2}" $P274 = $P273."MATCH"() store_lex "$/", $P274 - .const 'Sub' $P276 = "95_1282016519.8364" + .const 'Sub' $P276 = "95_1284728468.35267" capture_lex $P276 $P277 = $P276() # rx literal "\\" @@ -4706,7 +4806,7 @@ .annotate 'line', 104 # rx subrule $P281 subtype=capture negate= rx269_cur."!cursor_pos"(rx269_pos) - .const 'Sub' $P281 = "96_1282016519.8364" + .const 'Sub' $P281 = "96_1284728468.35267" capture_lex $P281 $P10 = rx269_cur.$P281() unless $P10, rx269_fail @@ -4740,7 +4840,7 @@ find_lex $P285, unicode:"$\x{a2}" $P286 = $P285."MATCH"() store_lex "$/", $P286 - .const 'Sub' $P288 = "97_1282016519.8364" + .const 'Sub' $P288 = "97_1284728468.35267" capture_lex $P288 $P298 = $P288() alt279_end: @@ -4770,13 +4870,13 @@ # rx pass rx269_cur."!cursor_pass"(rx269_pos, "quote_escape:sym") if_null rx269_debug, debug_247 - rx269_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx269_pos) + rx269_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx269_pos) debug_247: .return (rx269_cur) rx269_restart: .annotate 'line', 33 if_null rx269_debug, debug_248 - rx269_cur."!cursor_debug"("NEXT ", "quote_escape:sym") + rx269_cur."!cursor_debug"("NEXT", "quote_escape:sym") debug_248: rx269_fail: (rx269_rep, rx269_pos, $I10, $P10) = rx269_cur."!mark_fail"(0) @@ -4786,7 +4886,7 @@ rx269_done: rx269_cur."!cursor_fail"() if_null rx269_debug, debug_249 - rx269_cur."!cursor_debug"("FAIL ", "quote_escape:sym") + rx269_cur."!cursor_debug"("FAIL", "quote_escape:sym") debug_249: .return (rx269_cur) .return () @@ -4794,7 +4894,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("94_1282016519.8364") :method +.sub "!PREFIX__quote_escape:sym" :subid("94_1284728468.35267") :method .annotate 'line', 33 new $P271, "ResizablePMCArray" push $P271, "" @@ -4803,14 +4903,14 @@ .namespace ["HLL";"Grammar"] -.sub "_block275" :anon :subid("95_1282016519.8364") :outer("93_1282016519.8364") +.sub "_block275" :anon :subid("95_1284728468.35267") :outer("93_1284728468.35267") .annotate 'line', 100 .return () .end .namespace ["HLL";"Grammar"] -.sub "_block280" :anon :subid("96_1282016519.8364") :method :outer("93_1282016519.8364") +.sub "_block280" :anon :subid("96_1284728468.35267") :method :outer("93_1284728468.35267") .annotate 'line', 104 .local string rx282_tgt .local int rx282_pos @@ -4833,7 +4933,7 @@ rx282_start: eq $I10, 1, rx282_restart if_null rx282_debug, debug_241 - rx282_cur."!cursor_debug"("START ", "") + rx282_cur."!cursor_debug"("START", "") debug_241: $I10 = self.'from'() ne $I10, -1, rxscan283_done @@ -4856,12 +4956,12 @@ # rx pass rx282_cur."!cursor_pass"(rx282_pos, "") if_null rx282_debug, debug_242 - rx282_cur."!cursor_debug"("PASS ", "", " at pos=", rx282_pos) + rx282_cur."!cursor_debug"("PASS", "", " at pos=", rx282_pos) debug_242: .return (rx282_cur) rx282_restart: if_null rx282_debug, debug_243 - rx282_cur."!cursor_debug"("NEXT ", "") + rx282_cur."!cursor_debug"("NEXT", "") debug_243: rx282_fail: (rx282_rep, rx282_pos, $I10, $P10) = rx282_cur."!mark_fail"(0) @@ -4871,7 +4971,7 @@ rx282_done: rx282_cur."!cursor_fail"() if_null rx282_debug, debug_244 - rx282_cur."!cursor_debug"("FAIL ", "") + rx282_cur."!cursor_debug"("FAIL", "") debug_244: .return (rx282_cur) .return () @@ -4879,7 +4979,7 @@ .namespace ["HLL";"Grammar"] -.sub "_block287" :anon :subid("97_1282016519.8364") :outer("93_1282016519.8364") +.sub "_block287" :anon :subid("97_1284728468.35267") :outer("93_1284728468.35267") .annotate 'line', 105 find_lex $P289, "$/" $P290 = $P289."CURSOR"() @@ -4902,9 +5002,9 @@ .namespace ["HLL";"Grammar"] -.sub "charname" :subid("98_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "charname" :subid("98_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 - .const 'Sub' $P310 = "100_1282016519.8364" + .const 'Sub' $P310 = "100_1284728468.35267" capture_lex $P310 .local string rx301_tgt .local int rx301_pos @@ -4927,7 +5027,7 @@ rx301_start: eq $I10, 1, rx301_restart if_null rx301_debug, debug_250 - rx301_cur."!cursor_debug"("START ", "charname") + rx301_cur."!cursor_debug"("START", "charname") debug_250: $I10 = self.'from'() ne $I10, -1, rxscan305_done @@ -4988,7 +5088,7 @@ .annotate 'line', 114 # rx subrule "before" subtype=zerowidth negate= rx301_cur."!cursor_pos"(rx301_pos) - .const 'Sub' $P310 = "100_1282016519.8364" + .const 'Sub' $P310 = "100_1284728468.35267" capture_lex $P310 $P10 = rx301_cur."before"($P310) unless $P10, rx301_fail @@ -4997,13 +5097,13 @@ # rx pass rx301_cur."!cursor_pass"(rx301_pos, "charname") if_null rx301_debug, debug_255 - rx301_cur."!cursor_debug"("PASS ", "charname", " at pos=", rx301_pos) + rx301_cur."!cursor_debug"("PASS", "charname", " at pos=", rx301_pos) debug_255: .return (rx301_cur) rx301_restart: .annotate 'line', 33 if_null rx301_debug, debug_256 - rx301_cur."!cursor_debug"("NEXT ", "charname") + rx301_cur."!cursor_debug"("NEXT", "charname") debug_256: rx301_fail: (rx301_rep, rx301_pos, $I10, $P10) = rx301_cur."!mark_fail"(0) @@ -5013,7 +5113,7 @@ rx301_done: rx301_cur."!cursor_fail"() if_null rx301_debug, debug_257 - rx301_cur."!cursor_debug"("FAIL ", "charname") + rx301_cur."!cursor_debug"("FAIL", "charname") debug_257: .return (rx301_cur) .return () @@ -5021,7 +5121,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__charname" :subid("99_1282016519.8364") :method +.sub "!PREFIX__charname" :subid("99_1284728468.35267") :method .annotate 'line', 33 $P303 = self."!PREFIX__!subrule"("integer", "") new $P304, "ResizablePMCArray" @@ -5083,7 +5183,7 @@ .namespace ["HLL";"Grammar"] -.sub "_block309" :anon :subid("100_1282016519.8364") :method :outer("98_1282016519.8364") +.sub "_block309" :anon :subid("100_1284728468.35267") :method :outer("98_1284728468.35267") .annotate 'line', 114 .local string rx311_tgt .local int rx311_pos @@ -5106,7 +5206,7 @@ rx311_start: eq $I10, 1, rx311_restart if_null rx311_debug, debug_251 - rx311_cur."!cursor_debug"("START ", "") + rx311_cur."!cursor_debug"("START", "") debug_251: $I10 = self.'from'() ne $I10, -1, rxscan312_done @@ -5134,12 +5234,12 @@ # rx pass rx311_cur."!cursor_pass"(rx311_pos, "") if_null rx311_debug, debug_252 - rx311_cur."!cursor_debug"("PASS ", "", " at pos=", rx311_pos) + rx311_cur."!cursor_debug"("PASS", "", " at pos=", rx311_pos) debug_252: .return (rx311_cur) rx311_restart: if_null rx311_debug, debug_253 - rx311_cur."!cursor_debug"("NEXT ", "") + rx311_cur."!cursor_debug"("NEXT", "") debug_253: rx311_fail: (rx311_rep, rx311_pos, $I10, $P10) = rx311_cur."!mark_fail"(0) @@ -5149,7 +5249,7 @@ rx311_done: rx311_cur."!cursor_fail"() if_null rx311_debug, debug_254 - rx311_cur."!cursor_debug"("FAIL ", "") + rx311_cur."!cursor_debug"("FAIL", "") debug_254: .return (rx311_cur) .return () @@ -5157,7 +5257,7 @@ .namespace ["HLL";"Grammar"] -.sub "charnames" :subid("101_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "charnames" :subid("101_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx314_tgt .local int rx314_pos @@ -5181,7 +5281,7 @@ rx314_start: eq $I10, 1, rx314_restart if_null rx314_debug, debug_258 - rx314_cur."!cursor_debug"("START ", "charnames") + rx314_cur."!cursor_debug"("START", "charnames") debug_258: $I10 = self.'from'() ne $I10, -1, rxscan317_done @@ -5233,13 +5333,13 @@ # rx pass rx314_cur."!cursor_pass"(rx314_pos, "charnames") if_null rx314_debug, debug_259 - rx314_cur."!cursor_debug"("PASS ", "charnames", " at pos=", rx314_pos) + rx314_cur."!cursor_debug"("PASS", "charnames", " at pos=", rx314_pos) debug_259: .return (rx314_cur) rx314_restart: .annotate 'line', 33 if_null rx314_debug, debug_260 - rx314_cur."!cursor_debug"("NEXT ", "charnames") + rx314_cur."!cursor_debug"("NEXT", "charnames") debug_260: rx314_fail: (rx314_rep, rx314_pos, $I10, $P10) = rx314_cur."!mark_fail"(0) @@ -5249,7 +5349,7 @@ rx314_done: rx314_cur."!cursor_fail"() if_null rx314_debug, debug_261 - rx314_cur."!cursor_debug"("FAIL ", "charnames") + rx314_cur."!cursor_debug"("FAIL", "charnames") debug_261: .return (rx314_cur) .return () @@ -5257,7 +5357,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__charnames" :subid("102_1282016519.8364") :method +.sub "!PREFIX__charnames" :subid("102_1284728468.35267") :method .annotate 'line', 33 new $P316, "ResizablePMCArray" push $P316, "" @@ -5266,7 +5366,7 @@ .namespace ["HLL";"Grammar"] -.sub "charspec" :subid("103_1282016519.8364") :method :outer("11_1282016519.8364") +.sub "charspec" :subid("103_1284728468.35267") :method :outer("11_1284728468.35267") .annotate 'line', 33 .local string rx320_tgt .local int rx320_pos @@ -5289,7 +5389,7 @@ rx320_start: eq $I10, 1, rx320_restart if_null rx320_debug, debug_262 - rx320_cur."!cursor_debug"("START ", "charspec") + rx320_cur."!cursor_debug"("START", "charspec") debug_262: $I10 = self.'from'() ne $I10, -1, rxscan325_done @@ -5388,13 +5488,13 @@ # rx pass rx320_cur."!cursor_pass"(rx320_pos, "charspec") if_null rx320_debug, debug_263 - rx320_cur."!cursor_debug"("PASS ", "charspec", " at pos=", rx320_pos) + rx320_cur."!cursor_debug"("PASS", "charspec", " at pos=", rx320_pos) debug_263: .return (rx320_cur) rx320_restart: .annotate 'line', 33 if_null rx320_debug, debug_264 - rx320_cur."!cursor_debug"("NEXT ", "charspec") + rx320_cur."!cursor_debug"("NEXT", "charspec") debug_264: rx320_fail: (rx320_rep, rx320_pos, $I10, $P10) = rx320_cur."!mark_fail"(0) @@ -5404,7 +5504,7 @@ rx320_done: rx320_cur."!cursor_fail"() if_null rx320_debug, debug_265 - rx320_cur."!cursor_debug"("FAIL ", "charspec") + rx320_cur."!cursor_debug"("FAIL", "charspec") debug_265: .return (rx320_cur) .return () @@ -5412,7 +5512,7 @@ .namespace ["HLL";"Grammar"] -.sub "!PREFIX__charspec" :subid("104_1282016519.8364") :method +.sub "!PREFIX__charspec" :subid("104_1284728468.35267") :method .annotate 'line', 33 $P322 = self."!PREFIX__!subrule"("panic", "") $P323 = self."!PREFIX__!subrule"("charnames", "[") @@ -5453,18 +5553,18 @@ .namespace ["HLL";"Grammar"] -.sub "_block328" :load :anon :subid("105_1282016519.8364") +.sub "_block328" :load :anon :subid("105_1284728468.35267") .annotate 'line', 5 - .const 'Sub' $P330 = "11_1282016519.8364" + .const 'Sub' $P330 = "11_1284728468.35267" $P331 = $P330() .return ($P331) .end .namespace [] -.sub "_block333" :load :anon :subid("106_1282016519.8364") +.sub "_block333" :load :anon :subid("106_1284728468.35267") .annotate 'line', 1 - .const 'Sub' $P335 = "10_1282016519.8364" + .const 'Sub' $P335 = "10_1284728468.35267" $P336 = $P335() .return ($P336) .end @@ -5472,7 +5572,7 @@ ### .include 'gen/hllgrammar-actions.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016521.02645") +.sub "_block11" :anon :subid("10_1284728469.44803") .annotate 'line', 0 get_hll_global $P14, ["HLL";"Actions"], "_block13" capture_lex $P14 @@ -5489,15 +5589,15 @@ $P627 = $P14() .annotate 'line', 1 .return ($P627) - .const 'Sub' $P629 = "55_1282016521.02645" + .const 'Sub' $P629 = "55_1284728469.44803" .return ($P629) .end .namespace [] -.sub "" :load :init :subid("post56") :outer("10_1282016521.02645") +.sub "" :load :init :subid("post56") :outer("10_1284728469.44803") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016521.02645" + .const 'Sub' $P12 = "10_1284728469.44803" .local pmc block set block, $P12 $P632 = get_root_global ["parrot"], "P6metaclass" @@ -5506,75 +5606,75 @@ .namespace ["HLL";"Actions"] -.sub "_block13" :subid("11_1282016521.02645") :outer("10_1282016521.02645") +.sub "_block13" :subid("11_1284728469.44803") :outer("10_1284728469.44803") .annotate 'line', 3 - .const 'Sub' $P605 = "53_1282016521.02645" + .const 'Sub' $P605 = "53_1284728469.44803" capture_lex $P605 - .const 'Sub' $P580 = "51_1282016521.02645" + .const 'Sub' $P580 = "51_1284728469.44803" capture_lex $P580 - .const 'Sub' $P550 = "50_1282016521.02645" + .const 'Sub' $P550 = "50_1284728469.44803" capture_lex $P550 - .const 'Sub' $P531 = "49_1282016521.02645" + .const 'Sub' $P531 = "49_1284728469.44803" capture_lex $P531 - .const 'Sub' $P524 = "48_1282016521.02645" + .const 'Sub' $P524 = "48_1284728469.44803" capture_lex $P524 - .const 'Sub' $P514 = "47_1282016521.02645" + .const 'Sub' $P514 = "47_1284728469.44803" capture_lex $P514 - .const 'Sub' $P497 = "46_1282016521.02645" + .const 'Sub' $P497 = "46_1284728469.44803" capture_lex $P497 - .const 'Sub' $P480 = "45_1282016521.02645" + .const 'Sub' $P480 = "45_1284728469.44803" capture_lex $P480 - .const 'Sub' $P473 = "44_1282016521.02645" + .const 'Sub' $P473 = "44_1284728469.44803" capture_lex $P473 - .const 'Sub' $P466 = "43_1282016521.02645" + .const 'Sub' $P466 = "43_1284728469.44803" capture_lex $P466 - .const 'Sub' $P459 = "42_1282016521.02645" + .const 'Sub' $P459 = "42_1284728469.44803" capture_lex $P459 - .const 'Sub' $P452 = "41_1282016521.02645" + .const 'Sub' $P452 = "41_1284728469.44803" capture_lex $P452 - .const 'Sub' $P445 = "40_1282016521.02645" + .const 'Sub' $P445 = "40_1284728469.44803" capture_lex $P445 - .const 'Sub' $P438 = "39_1282016521.02645" + .const 'Sub' $P438 = "39_1284728469.44803" capture_lex $P438 - .const 'Sub' $P428 = "38_1282016521.02645" + .const 'Sub' $P428 = "38_1284728469.44803" capture_lex $P428 - .const 'Sub' $P421 = "37_1282016521.02645" + .const 'Sub' $P421 = "37_1284728469.44803" capture_lex $P421 - .const 'Sub' $P405 = "36_1282016521.02645" + .const 'Sub' $P405 = "36_1284728469.44803" capture_lex $P405 - .const 'Sub' $P330 = "34_1282016521.02645" + .const 'Sub' $P330 = "34_1284728469.44803" capture_lex $P330 - .const 'Sub' $P267 = "31_1282016521.02645" + .const 'Sub' $P267 = "31_1284728469.44803" capture_lex $P267 - .const 'Sub' $P258 = "30_1282016521.02645" + .const 'Sub' $P258 = "30_1284728469.44803" capture_lex $P258 - .const 'Sub' $P249 = "29_1282016521.02645" + .const 'Sub' $P249 = "29_1284728469.44803" capture_lex $P249 - .const 'Sub' $P240 = "28_1282016521.02645" + .const 'Sub' $P240 = "28_1284728469.44803" capture_lex $P240 - .const 'Sub' $P231 = "27_1282016521.02645" + .const 'Sub' $P231 = "27_1284728469.44803" capture_lex $P231 - .const 'Sub' $P222 = "26_1282016521.02645" + .const 'Sub' $P222 = "26_1284728469.44803" capture_lex $P222 - .const 'Sub' $P212 = "25_1282016521.02645" + .const 'Sub' $P212 = "25_1284728469.44803" capture_lex $P212 - .const 'Sub' $P202 = "24_1282016521.02645" + .const 'Sub' $P202 = "24_1284728469.44803" capture_lex $P202 - .const 'Sub' $P194 = "23_1282016521.02645" + .const 'Sub' $P194 = "23_1284728469.44803" capture_lex $P194 - .const 'Sub' $P184 = "22_1282016521.02645" + .const 'Sub' $P184 = "22_1284728469.44803" capture_lex $P184 - .const 'Sub' $P174 = "21_1282016521.02645" + .const 'Sub' $P174 = "21_1284728469.44803" capture_lex $P174 - .const 'Sub' $P73 = "18_1282016521.02645" + .const 'Sub' $P73 = "18_1284728469.44803" capture_lex $P73 - .const 'Sub' $P35 = "15_1282016521.02645" + .const 'Sub' $P35 = "15_1284728469.44803" capture_lex $P35 - .const 'Sub' $P28 = "14_1282016521.02645" + .const 'Sub' $P28 = "14_1284728469.44803" capture_lex $P28 - .const 'Sub' $P22 = "13_1282016521.02645" + .const 'Sub' $P22 = "13_1284728469.44803" capture_lex $P22 - .const 'Sub' $P15 = "12_1282016521.02645" + .const 'Sub' $P15 = "12_1284728469.44803" capture_lex $P15 $P0 = find_dynamic_lex "$*CTXSAVE" if null $P0 goto ctxsave_done @@ -5583,18 +5683,18 @@ $P0."ctxsave"() ctxsave_done: .annotate 'line', 225 - .const 'Sub' $P605 = "53_1282016521.02645" + .const 'Sub' $P605 = "53_1284728469.44803" newclosure $P622, $P605 .annotate 'line', 3 .return ($P622) - .const 'Sub' $P624 = "54_1282016521.02645" + .const 'Sub' $P624 = "54_1284728469.44803" .return ($P624) .end .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "string_to_int" :subid("12_1282016521.02645") :outer("11_1282016521.02645") +.sub "string_to_int" :subid("12_1284728469.44803") :outer("11_1284728469.44803") .param pmc param_18 .param pmc param_19 .annotate 'line', 3 @@ -5648,7 +5748,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "ints_to_string" :subid("13_1282016521.02645") :outer("11_1282016521.02645") +.sub "ints_to_string" :subid("13_1284728469.44803") :outer("11_1284728469.44803") .param pmc param_25 .annotate 'line', 37 new $P24, 'ExceptionHandler' @@ -5690,7 +5790,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "CTXSAVE" :subid("14_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "CTXSAVE" :subid("14_1284728469.44803") :method :outer("11_1284728469.44803") .annotate 'line', 62 new $P30, 'ExceptionHandler' set_addr $P30, control_29 @@ -5720,10 +5820,10 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "SET_BLOCK_OUTER_CTX" :subid("15_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "SET_BLOCK_OUTER_CTX" :subid("15_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_38 .annotate 'line', 76 - .const 'Sub' $P48 = "16_1282016521.02645" + .const 'Sub' $P48 = "16_1284728469.44803" capture_lex $P48 new $P37, 'ExceptionHandler' set_addr $P37, control_36 @@ -5758,7 +5858,7 @@ set $P43, $I46 goto if_44_end if_44: - .const 'Sub' $P48 = "16_1282016521.02645" + .const 'Sub' $P48 = "16_1284728469.44803" capture_lex $P48 $P71 = $P48() set $P43, $P71 @@ -5775,9 +5875,9 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "_block47" :anon :subid("16_1282016521.02645") :outer("15_1282016521.02645") +.sub "_block47" :anon :subid("16_1284728469.44803") :outer("15_1284728469.44803") .annotate 'line', 78 - .const 'Sub' $P62 = "17_1282016521.02645" + .const 'Sub' $P62 = "17_1284728469.44803" capture_lex $P62 .annotate 'line', 79 $P49 = root_new ['parrot';'ResizablePMCArray'] @@ -5807,7 +5907,7 @@ unless $P56, loop68_done shift $P60, $P56 loop68_redo: - .const 'Sub' $P62 = "17_1282016521.02645" + .const 'Sub' $P62 = "17_1284728469.44803" capture_lex $P62 $P62($P60) loop68_next: @@ -5827,7 +5927,7 @@ .namespace ["HLL";"Actions"] -.sub "_block61" :anon :subid("17_1282016521.02645") :outer("16_1282016521.02645") +.sub "_block61" :anon :subid("17_1284728469.44803") :outer("16_1284728469.44803") .param pmc param_63 .annotate 'line', 82 .lex "$_", param_63 @@ -5843,14 +5943,14 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "EXPR" :subid("18_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "EXPR" :subid("18_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_76 .param pmc param_77 :optional .param int has_param_77 :opt_flag .annotate 'line', 89 - .const 'Sub' $P156 = "20_1282016521.02645" + .const 'Sub' $P156 = "20_1284728469.44803" capture_lex $P156 - .const 'Sub' $P123 = "19_1282016521.02645" + .const 'Sub' $P123 = "19_1284728469.44803" capture_lex $P123 new $P75, 'ExceptionHandler' set_addr $P75, control_74 @@ -5985,7 +6085,7 @@ find_lex $P120, "$past" $P121 = $P120."name"() if $P121, unless_119_end - .const 'Sub' $P123 = "19_1282016521.02645" + .const 'Sub' $P123 = "19_1284728469.44803" capture_lex $P123 $P123() unless_119_end: @@ -6009,7 +6109,7 @@ unless $P150, loop167_done shift $P154, $P150 loop167_redo: - .const 'Sub' $P156 = "20_1282016521.02645" + .const 'Sub' $P156 = "20_1284728469.44803" capture_lex $P156 $P156($P154) loop167_next: @@ -6054,7 +6154,7 @@ .namespace ["HLL";"Actions"] -.sub "_block122" :anon :subid("19_1282016521.02645") :outer("18_1282016521.02645") +.sub "_block122" :anon :subid("19_1284728469.44803") :outer("18_1284728469.44803") .annotate 'line', 98 new $P124, "Undef" .lex "$name", $P124 @@ -6104,7 +6204,7 @@ .namespace ["HLL";"Actions"] -.sub "_block155" :anon :subid("20_1282016521.02645") :outer("18_1282016521.02645") +.sub "_block155" :anon :subid("20_1284728469.44803") :outer("18_1284728469.44803") .param pmc param_157 .annotate 'line', 109 .lex "$_", param_157 @@ -6128,7 +6228,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("21_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "term:sym" :subid("21_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_177 .annotate 'line', 114 new $P176, 'ExceptionHandler' @@ -6159,7 +6259,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "termish" :subid("22_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "termish" :subid("22_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_187 .annotate 'line', 116 new $P186, 'ExceptionHandler' @@ -6190,7 +6290,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "nullterm" :subid("23_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "nullterm" :subid("23_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_197 .annotate 'line', 117 new $P196, 'ExceptionHandler' @@ -6213,7 +6313,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "nullterm_alt" :subid("24_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "nullterm_alt" :subid("24_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_205 .annotate 'line', 118 new $P204, 'ExceptionHandler' @@ -6244,7 +6344,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "integer" :subid("25_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "integer" :subid("25_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_215 .annotate 'line', 120 new $P214, 'ExceptionHandler' @@ -6275,7 +6375,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "dec_number" :subid("26_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "dec_number" :subid("26_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_225 .annotate 'line', 122 new $P224, 'ExceptionHandler' @@ -6299,7 +6399,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "decint" :subid("27_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "decint" :subid("27_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_234 .annotate 'line', 124 new $P233, 'ExceptionHandler' @@ -6323,7 +6423,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "hexint" :subid("28_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "hexint" :subid("28_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_243 .annotate 'line', 125 new $P242, 'ExceptionHandler' @@ -6347,7 +6447,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "octint" :subid("29_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "octint" :subid("29_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_252 .annotate 'line', 126 new $P251, 'ExceptionHandler' @@ -6371,7 +6471,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "binint" :subid("30_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "binint" :subid("30_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_261 .annotate 'line', 127 new $P260, 'ExceptionHandler' @@ -6395,10 +6495,10 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_EXPR" :subid("31_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_EXPR" :subid("31_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_270 .annotate 'line', 129 - .const 'Sub' $P286 = "32_1282016521.02645" + .const 'Sub' $P286 = "32_1284728469.44803" capture_lex $P286 new $P269, 'ExceptionHandler' set_addr $P269, control_268 @@ -6430,7 +6530,7 @@ $P282 = $P280."ACCEPTS"($P281) if $P282, if_279 .annotate 'line', 135 - .const 'Sub' $P286 = "32_1282016521.02645" + .const 'Sub' $P286 = "32_1284728469.44803" capture_lex $P286 $P286() goto if_279_end @@ -6470,9 +6570,9 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "_block285" :anon :subid("32_1282016521.02645") :outer("31_1282016521.02645") +.sub "_block285" :anon :subid("32_1284728469.44803") :outer("31_1284728469.44803") .annotate 'line', 135 - .const 'Sub' $P305 = "33_1282016521.02645" + .const 'Sub' $P305 = "33_1284728469.44803" capture_lex $P305 .annotate 'line', 136 $P287 = root_new ['parrot';'ResizablePMCArray'] @@ -6523,7 +6623,7 @@ unless $P300, loop310_done shift $P303, $P300 loop310_redo: - .const 'Sub' $P305 = "33_1282016521.02645" + .const 'Sub' $P305 = "33_1284728469.44803" capture_lex $P305 $P305($P303) loop310_next: @@ -6546,7 +6646,7 @@ .namespace ["HLL";"Actions"] -.sub "_block304" :anon :subid("33_1282016521.02645") :outer("32_1282016521.02645") +.sub "_block304" :anon :subid("33_1284728469.44803") :outer("32_1284728469.44803") .param pmc param_306 .annotate 'line', 139 .lex "$_", param_306 @@ -6559,10 +6659,10 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_delimited" :subid("34_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_delimited" :subid("34_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_333 .annotate 'line', 152 - .const 'Sub' $P345 = "35_1282016521.02645" + .const 'Sub' $P345 = "35_1284728469.44803" capture_lex $P345 new $P332, 'ExceptionHandler' set_addr $P332, control_331 @@ -6605,7 +6705,7 @@ unless $P339, loop377_done shift $P343, $P339 loop377_redo: - .const 'Sub' $P345 = "35_1282016521.02645" + .const 'Sub' $P345 = "35_1284728469.44803" capture_lex $P345 $P345($P343) loop377_next: @@ -6683,7 +6783,7 @@ .namespace ["HLL";"Actions"] -.sub "_block344" :anon :subid("35_1282016521.02645") :outer("34_1282016521.02645") +.sub "_block344" :anon :subid("35_1284728469.44803") :outer("34_1284728469.44803") .param pmc param_347 .annotate 'line', 156 new $P346, "Undef" @@ -6753,7 +6853,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_atom" :subid("36_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_atom" :subid("36_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_408 .annotate 'line', 177 new $P407, 'ExceptionHandler' @@ -6803,7 +6903,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("37_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("37_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_424 .annotate 'line', 181 new $P423, 'ExceptionHandler' @@ -6825,7 +6925,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("38_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("38_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_431 .annotate 'line', 182 new $P430, 'ExceptionHandler' @@ -6856,7 +6956,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("39_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("39_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_441 .annotate 'line', 184 new $P440, 'ExceptionHandler' @@ -6878,7 +6978,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("40_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("40_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_448 .annotate 'line', 185 new $P447, 'ExceptionHandler' @@ -6900,7 +7000,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("41_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("41_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_455 .annotate 'line', 186 new $P454, 'ExceptionHandler' @@ -6922,7 +7022,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("42_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("42_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_462 .annotate 'line', 187 new $P461, 'ExceptionHandler' @@ -6944,7 +7044,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("43_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("43_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_469 .annotate 'line', 188 new $P468, 'ExceptionHandler' @@ -6966,7 +7066,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("44_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("44_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_476 .annotate 'line', 189 new $P475, 'ExceptionHandler' @@ -6988,7 +7088,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("45_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("45_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_483 .annotate 'line', 191 new $P482, 'ExceptionHandler' @@ -7047,7 +7147,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("46_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("46_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_500 .annotate 'line', 195 new $P499, 'ExceptionHandler' @@ -7106,7 +7206,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("47_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("47_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_517 .annotate 'line', 199 new $P516, 'ExceptionHandler' @@ -7139,7 +7239,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym<0>" :subid("48_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym<0>" :subid("48_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_527 .annotate 'line', 203 new $P526, 'ExceptionHandler' @@ -7163,7 +7263,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("49_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "quote_escape:sym" :subid("49_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_534 .annotate 'line', 207 new $P533, 'ExceptionHandler' @@ -7222,7 +7322,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "charname" :subid("50_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "charname" :subid("50_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_553 .annotate 'line', 211 new $P552, 'ExceptionHandler' @@ -7296,10 +7396,10 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "charnames" :subid("51_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "charnames" :subid("51_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_583 .annotate 'line', 219 - .const 'Sub' $P592 = "52_1282016521.02645" + .const 'Sub' $P592 = "52_1284728469.44803" capture_lex $P592 new $P582, 'ExceptionHandler' set_addr $P582, control_581 @@ -7333,7 +7433,7 @@ unless $P586, loop598_done shift $P590, $P586 loop598_redo: - .const 'Sub' $P592 = "52_1282016521.02645" + .const 'Sub' $P592 = "52_1284728469.44803" capture_lex $P592 $P592($P590) loop598_next: @@ -7362,7 +7462,7 @@ .namespace ["HLL";"Actions"] -.sub "_block591" :anon :subid("52_1282016521.02645") :outer("51_1282016521.02645") +.sub "_block591" :anon :subid("52_1284728469.44803") :outer("51_1284728469.44803") .param pmc param_593 .annotate 'line', 221 .lex "$_", param_593 @@ -7377,7 +7477,7 @@ .namespace ["HLL";"Actions"] .include "except_types.pasm" -.sub "charspec" :subid("53_1282016521.02645") :method :outer("11_1282016521.02645") +.sub "charspec" :subid("53_1284728469.44803") :method :outer("11_1284728469.44803") .param pmc param_608 .annotate 'line', 225 new $P607, 'ExceptionHandler' @@ -7427,18 +7527,18 @@ .namespace ["HLL";"Actions"] -.sub "_block623" :load :anon :subid("54_1282016521.02645") +.sub "_block623" :load :anon :subid("54_1284728469.44803") .annotate 'line', 3 - .const 'Sub' $P625 = "11_1282016521.02645" + .const 'Sub' $P625 = "11_1284728469.44803" $P626 = $P625() .return ($P626) .end .namespace [] -.sub "_block628" :load :anon :subid("55_1282016521.02645") +.sub "_block628" :load :anon :subid("55_1284728469.44803") .annotate 'line', 1 - .const 'Sub' $P630 = "10_1282016521.02645" + .const 'Sub' $P630 = "10_1284728469.44803" $P631 = $P630() .return ($P631) .end @@ -7446,7 +7546,7 @@ ### .include 'gen/hllcompiler.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016521.80094") +.sub "_block11" :anon :subid("10_1284728470.10282") .annotate 'line', 0 get_hll_global $P14, ["HLL";"Compiler"], "_block13" capture_lex $P14 @@ -7463,15 +7563,15 @@ $P497 = $P14() .annotate 'line', 1 .return ($P497) - .const 'Sub' $P499 = "36_1282016521.80094" + .const 'Sub' $P499 = "36_1284728470.10282" .return ($P499) .end .namespace [] -.sub "" :load :init :subid("post37") :outer("10_1282016521.80094") +.sub "" :load :init :subid("post37") :outer("10_1284728470.10282") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016521.80094" + .const 'Sub' $P12 = "10_1284728470.10282" .local pmc block set block, $P12 .annotate 'line', 2 @@ -7485,36 +7585,36 @@ .namespace ["HLL";"Compiler"] -.sub "_block13" :subid("11_1282016521.80094") :outer("10_1282016521.80094") +.sub "_block13" :subid("11_1284728470.10282") :outer("10_1284728470.10282") .annotate 'line', 6 - .const 'Sub' $P489 = "35_1282016521.80094" + .const 'Sub' $P489 = "35_1284728470.10282" capture_lex $P489 - .const 'Sub' $P447 = "33_1282016521.80094" + .const 'Sub' $P447 = "33_1284728470.10282" capture_lex $P447 - .const 'Sub' $P298 = "26_1282016521.80094" + .const 'Sub' $P298 = "26_1284728470.10282" capture_lex $P298 - .const 'Sub' $P283 = "25_1282016521.80094" + .const 'Sub' $P283 = "25_1284728470.10282" capture_lex $P283 - .const 'Sub' $P188 = "20_1282016521.80094" + .const 'Sub' $P188 = "20_1284728470.10282" capture_lex $P188 - .const 'Sub' $P153 = "18_1282016521.80094" + .const 'Sub' $P153 = "18_1284728470.10282" capture_lex $P153 - .const 'Sub' $P138 = "17_1282016521.80094" + .const 'Sub' $P138 = "17_1284728470.10282" capture_lex $P138 - .const 'Sub' $P122 = "16_1282016521.80094" + .const 'Sub' $P122 = "16_1284728470.10282" capture_lex $P122 - .const 'Sub' $P33 = "13_1282016521.80094" + .const 'Sub' $P33 = "13_1284728470.10282" capture_lex $P33 - .const 'Sub' $P15 = "12_1282016521.80094" + .const 'Sub' $P15 = "12_1284728470.10282" capture_lex $P15 .annotate 'line', 14 - .const 'Sub' $P15 = "12_1282016521.80094" + .const 'Sub' $P15 = "12_1284728470.10282" newclosure $P31, $P15 .lex "value_type", $P31 .annotate 'line', 10 find_lex $P32, "value_type" .annotate 'line', 165 - .const 'Sub' $P489 = "35_1282016521.80094" + .const 'Sub' $P489 = "35_1284728470.10282" newclosure $P495, $P489 .annotate 'line', 6 .return ($P495) @@ -7522,7 +7622,7 @@ .namespace ["HLL";"Compiler"] -.sub "" :load :init :subid("post38") :outer("11_1282016521.80094") +.sub "" :load :init :subid("post38") :outer("11_1284728470.10282") .annotate 'line', 6 get_hll_global $P14, ["HLL";"Compiler"], "_block13" .local pmc block @@ -7535,7 +7635,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "value_type" :subid("12_1282016521.80094") :outer("11_1282016521.80094") +.sub "value_type" :subid("12_1284728470.10282") :outer("11_1284728470.10282") .param pmc param_18 .annotate 'line', 14 new $P17, 'ExceptionHandler' @@ -7580,15 +7680,15 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "get_exports" :subid("13_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "get_exports" :subid("13_1284728470.10282") :method :outer("11_1284728470.10282") .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_1282016521.80094" + .const 'Sub' $P105 = "15_1284728470.10282" capture_lex $P105 - .const 'Sub' $P84 = "14_1282016521.80094" + .const 'Sub' $P84 = "14_1284728470.10282" capture_lex $P84 new $P35, 'ExceptionHandler' set_addr $P35, control_34 @@ -7694,7 +7794,7 @@ unless $P100, loop117_done shift $P103, $P100 loop117_redo: - .const 'Sub' $P105 = "15_1282016521.80094" + .const 'Sub' $P105 = "15_1284728470.10282" capture_lex $P105 $P105($P103) loop117_next: @@ -7724,7 +7824,7 @@ unless $P79, loop97_done shift $P82, $P79 loop97_redo: - .const 'Sub' $P84 = "14_1282016521.80094" + .const 'Sub' $P84 = "14_1284728470.10282" capture_lex $P84 $P84($P82) loop97_next: @@ -7752,7 +7852,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block104" :anon :subid("15_1282016521.80094") :outer("13_1282016521.80094") +.sub "_block104" :anon :subid("15_1284728470.10282") :outer("13_1284728470.10282") .param pmc param_107 .annotate 'line', 40 new $P106, "Undef" @@ -7784,7 +7884,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block83" :anon :subid("14_1282016521.80094") :outer("13_1282016521.80094") +.sub "_block83" :anon :subid("14_1284728470.10282") :outer("13_1284728470.10282") .param pmc param_86 .annotate 'line', 34 new $P85, "Undef" @@ -7824,7 +7924,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "get_module" :subid("16_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "get_module" :subid("16_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_125 .annotate 'line', 47 new $P124, 'ExceptionHandler' @@ -7865,7 +7965,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "language" :subid("17_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "language" :subid("17_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_141 :optional .param int has_param_141 :opt_flag .annotate 'line', 53 @@ -7910,10 +8010,10 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "load_module" :subid("18_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "load_module" :subid("18_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_156 .annotate 'line', 61 - .const 'Sub' $P166 = "19_1282016521.80094" + .const 'Sub' $P166 = "19_1284728470.10282" capture_lex $P166 new $P155, 'ExceptionHandler' set_addr $P155, control_154 @@ -7940,7 +8040,7 @@ assign $P164, 0 store_lex "$loaded", $P164 .annotate 'line', 64 - .const 'Sub' $P166 = "19_1282016521.80094" + .const 'Sub' $P166 = "19_1284728470.10282" capture_lex $P166 $P166() .annotate 'line', 65 @@ -7970,7 +8070,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block165" :anon :subid("19_1282016521.80094") :outer("18_1282016521.80094") +.sub "_block165" :anon :subid("19_1284728470.10282") :outer("18_1284728470.10282") .annotate 'line', 64 new $P173, 'ExceptionHandler' set_addr $P173, control_172 @@ -8004,11 +8104,11 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "import" :subid("20_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "import" :subid("20_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_191 .param pmc param_192 .annotate 'line', 69 - .const 'Sub' $P198 = "21_1282016521.80094" + .const 'Sub' $P198 = "21_1284728470.10282" capture_lex $P198 new $P190, 'ExceptionHandler' set_addr $P190, control_189 @@ -8030,7 +8130,7 @@ unless $P193, loop279_done shift $P196, $P193 loop279_redo: - .const 'Sub' $P198 = "21_1282016521.80094" + .const 'Sub' $P198 = "21_1284728470.10282" capture_lex $P198 $P198($P196) loop279_next: @@ -8056,14 +8156,14 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block197" :anon :subid("21_1282016521.80094") :outer("20_1282016521.80094") +.sub "_block197" :anon :subid("21_1284728470.10282") :outer("20_1284728470.10282") .param pmc param_201 .annotate 'line', 70 - .const 'Sub' $P268 = "24_1282016521.80094" + .const 'Sub' $P268 = "24_1284728470.10282" capture_lex $P268 - .const 'Sub' $P248 = "23_1282016521.80094" + .const 'Sub' $P248 = "23_1284728470.10282" capture_lex $P248 - .const 'Sub' $P219 = "22_1282016521.80094" + .const 'Sub' $P219 = "22_1284728470.10282" capture_lex $P219 .annotate 'line', 71 new $P199, "Undef" @@ -8111,7 +8211,7 @@ unless $P263, loop276_done shift $P266, $P263 loop276_redo: - .const 'Sub' $P268 = "24_1282016521.80094" + .const 'Sub' $P268 = "24_1284728470.10282" capture_lex $P268 $P268($P266) loop276_next: @@ -8143,7 +8243,7 @@ unless $P243, loop260_done shift $P246, $P243 loop260_redo: - .const 'Sub' $P248 = "23_1282016521.80094" + .const 'Sub' $P248 = "23_1284728470.10282" capture_lex $P248 $P248($P246) loop260_next: @@ -8177,7 +8277,7 @@ unless $P214, loop232_done shift $P217, $P214 loop232_redo: - .const 'Sub' $P219 = "22_1282016521.80094" + .const 'Sub' $P219 = "22_1284728470.10282" capture_lex $P219 $P219($P217) loop232_next: @@ -8200,7 +8300,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block267" :anon :subid("24_1282016521.80094") :outer("21_1282016521.80094") +.sub "_block267" :anon :subid("24_1284728470.10282") :outer("21_1284728470.10282") .param pmc param_269 .annotate 'line', 80 .lex "$_", param_269 @@ -8220,7 +8320,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block247" :anon :subid("23_1282016521.80094") :outer("21_1282016521.80094") +.sub "_block247" :anon :subid("23_1284728470.10282") :outer("21_1284728470.10282") .param pmc param_249 .annotate 'line', 77 .lex "$_", param_249 @@ -8240,7 +8340,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block218" :anon :subid("22_1282016521.80094") :outer("21_1282016521.80094") +.sub "_block218" :anon :subid("22_1284728470.10282") :outer("21_1284728470.10282") .param pmc param_220 .annotate 'line', 74 .lex "$_", param_220 @@ -8262,7 +8362,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "autoprint" :subid("25_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "autoprint" :subid("25_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_286 .annotate 'line', 85 new $P285, 'ExceptionHandler' @@ -8306,10 +8406,10 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "interactive" :subid("26_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "interactive" :subid("26_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_301 :slurpy :named .annotate 'line', 90 - .const 'Sub' $P333 = "27_1282016521.80094" + .const 'Sub' $P333 = "27_1284728470.10282" capture_lex $P333 new $P300, 'ExceptionHandler' set_addr $P300, control_299 @@ -8396,7 +8496,7 @@ assign $P331, 1 unless $P331, loop443_done loop443_redo: - .const 'Sub' $P333 = "27_1282016521.80094" + .const 'Sub' $P333 = "27_1284728470.10282" capture_lex $P333 $P333() loop443_next: @@ -8421,9 +8521,9 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block332" :anon :subid("27_1282016521.80094") :outer("26_1282016521.80094") +.sub "_block332" :anon :subid("27_1284728470.10282") :outer("26_1284728470.10282") .annotate 'line', 102 - .const 'Sub' $P365 = "28_1282016521.80094" + .const 'Sub' $P365 = "28_1284728470.10282" capture_lex $P365 .annotate 'line', 105 new $P334, "Undef" @@ -8491,7 +8591,7 @@ set $P361, $P363 goto if_362_end if_362: - .const 'Sub' $P365 = "28_1282016521.80094" + .const 'Sub' $P365 = "28_1284728470.10282" capture_lex $P365 $P442 = $P365() set $P361, $P442 @@ -8503,11 +8603,11 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block364" :anon :subid("28_1282016521.80094") :outer("27_1282016521.80094") +.sub "_block364" :anon :subid("28_1284728470.10282") :outer("27_1284728470.10282") .annotate 'line', 115 - .const 'Sub' $P398 = "31_1282016521.80094" + .const 'Sub' $P398 = "31_1284728470.10282" capture_lex $P398 - .const 'Sub' $P371 = "29_1282016521.80094" + .const 'Sub' $P371 = "29_1284728470.10282" capture_lex $P371 .annotate 'line', 117 new $P366, "Undef" @@ -8518,7 +8618,7 @@ store_lex "$code", $P368 find_lex $P369, "$output" .annotate 'line', 118 - .const 'Sub' $P371 = "29_1282016521.80094" + .const 'Sub' $P371 = "29_1284728470.10282" capture_lex $P371 $P371() .annotate 'line', 125 @@ -8531,7 +8631,7 @@ vivify_67: defined $I396, $P395 unless $I396, if_394_end - .const 'Sub' $P398 = "31_1282016521.80094" + .const 'Sub' $P398 = "31_1284728470.10282" capture_lex $P398 $P398() if_394_end: @@ -8585,9 +8685,9 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block370" :anon :subid("29_1282016521.80094") :outer("28_1282016521.80094") +.sub "_block370" :anon :subid("29_1284728470.10282") :outer("28_1284728470.10282") .annotate 'line', 118 - .const 'Sub' $P383 = "30_1282016521.80094" + .const 'Sub' $P383 = "30_1284728470.10282" capture_lex $P383 new $P379, 'ExceptionHandler' set_addr $P379, control_378 @@ -8607,7 +8707,7 @@ .annotate 'line', 120 .local pmc exception .get_results (exception) - .const 'Sub' $P383 = "30_1282016521.80094" + .const 'Sub' $P383 = "30_1284728470.10282" newclosure $P391, $P383 $P391(exception) new $P392, 'Integer' @@ -8627,7 +8727,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block382" :anon :subid("30_1282016521.80094") :outer("29_1282016521.80094") +.sub "_block382" :anon :subid("30_1284728470.10282") :outer("29_1284728470.10282") .param pmc param_384 .annotate 'line', 120 .lex "$_", param_384 @@ -8650,9 +8750,9 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "_block397" :anon :subid("31_1282016521.80094") :outer("28_1282016521.80094") +.sub "_block397" :anon :subid("31_1284728470.10282") :outer("28_1284728470.10282") .annotate 'line', 125 - .const 'Sub' $P409 = "32_1282016521.80094" + .const 'Sub' $P409 = "32_1284728470.10282" capture_lex $P409 .annotate 'line', 126 get_global $P399, "$interactive_ctx" @@ -8689,7 +8789,7 @@ unless $P403, loop416_done shift $P407, $P403 loop416_redo: - .const 'Sub' $P409 = "32_1282016521.80094" + .const 'Sub' $P409 = "32_1284728470.10282" capture_lex $P409 $P409($P407) loop416_next: @@ -8712,7 +8812,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block408" :anon :subid("32_1282016521.80094") :outer("31_1282016521.80094") +.sub "_block408" :anon :subid("32_1284728470.10282") :outer("31_1284728470.10282") .param pmc param_410 .annotate 'line', 128 .lex "$_", param_410 @@ -8734,12 +8834,12 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "eval" :subid("33_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "eval" :subid("33_1284728470.10282") :method :outer("11_1284728470.10282") .param pmc param_450 .param pmc param_451 :slurpy .param pmc param_452 :slurpy :named .annotate 'line', 146 - .const 'Sub' $P471 = "34_1282016521.80094" + .const 'Sub' $P471 = "34_1284728470.10282" capture_lex $P471 new $P449, 'ExceptionHandler' set_addr $P449, control_448 @@ -8786,7 +8886,7 @@ set $P460, $I469 if_461_end: unless $P460, if_459_end - .const 'Sub' $P471 = "34_1282016521.80094" + .const 'Sub' $P471 = "34_1284728470.10282" capture_lex $P471 $P471() if_459_end: @@ -8803,7 +8903,7 @@ .namespace ["HLL";"Compiler"] -.sub "_block470" :anon :subid("34_1282016521.80094") :outer("33_1282016521.80094") +.sub "_block470" :anon :subid("34_1284728470.10282") :outer("33_1284728470.10282") .annotate 'line', 152 new $P472, "Undef" .lex "$outer_ctx", $P472 @@ -8857,7 +8957,7 @@ .namespace ["HLL";"Compiler"] .include "except_types.pasm" -.sub "ctxsave" :subid("35_1282016521.80094") :method :outer("11_1282016521.80094") +.sub "ctxsave" :subid("35_1284728470.10282") :method :outer("11_1284728470.10282") .annotate 'line', 165 new $P491, 'ExceptionHandler' set_addr $P491, control_490 @@ -8885,9 +8985,9 @@ .namespace [] -.sub "_block498" :load :anon :subid("36_1282016521.80094") +.sub "_block498" :load :anon :subid("36_1284728470.10282") .annotate 'line', 1 - .const 'Sub' $P500 = "10_1282016521.80094" + .const 'Sub' $P500 = "10_1284728470.10282" $P501 = $P500() .return ($P501) .end diff -Nru parrot-2.7.0/ext/nqp-rx/src/stage0/NQP-s0.pir parrot-2.8.0/ext/nqp-rx/src/stage0/NQP-s0.pir --- parrot-2.7.0/ext/nqp-rx/src/stage0/NQP-s0.pir 2010-08-17 18:07:24.000000000 +0000 +++ parrot-2.8.0/ext/nqp-rx/src/stage0/NQP-s0.pir 2010-09-21 07:48:52.000000000 +0000 @@ -15,7 +15,7 @@ ### .include 'gen/nqp-grammar.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016529.10767") +.sub "_block11" :anon :subid("10_1284728478.15265") .annotate 'line', 0 get_hll_global $P14, ["NQP";"Grammar"], "_block13" capture_lex $P14 @@ -29,341 +29,345 @@ .annotate 'line', 4 get_hll_global $P14, ["NQP";"Grammar"], "_block13" capture_lex $P14 - $P1423 = $P14() + $P1452 = $P14() .annotate 'line', 1 - .return ($P1423) - .const 'Sub' $P1425 = "371_1282016529.10767" - .return ($P1425) + .return ($P1452) + .const 'Sub' $P1454 = "377_1284728478.15265" + .return ($P1454) .end .namespace [] -.sub "" :load :init :subid("post372") :outer("10_1282016529.10767") +.sub "" :load :init :subid("post378") :outer("10_1284728478.15265") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016529.10767" + .const 'Sub' $P12 = "10_1284728478.15265" .local pmc block set block, $P12 - $P1428 = get_root_global ["parrot"], "P6metaclass" - $P1428."new_class"("NQP::Grammar", "HLL::Grammar" :named("parent")) + $P1457 = get_root_global ["parrot"], "P6metaclass" + $P1457."new_class"("NQP::Grammar", "HLL::Grammar" :named("parent")) .end .namespace ["NQP";"Grammar"] -.sub "_block13" :subid("11_1282016529.10767") :outer("10_1282016529.10767") +.sub "_block13" :subid("11_1284728478.15265") :outer("10_1284728478.15265") .annotate 'line', 4 - get_hll_global $P1340, ["NQP";"Regex"], "_block1339" - capture_lex $P1340 - .const 'Sub' $P1326 = "348_1282016529.10767" - capture_lex $P1326 - .const 'Sub' $P1320 = "346_1282016529.10767" - capture_lex $P1320 - .const 'Sub' $P1314 = "344_1282016529.10767" - capture_lex $P1314 - .const 'Sub' $P1308 = "342_1282016529.10767" - capture_lex $P1308 - .const 'Sub' $P1302 = "340_1282016529.10767" - capture_lex $P1302 - .const 'Sub' $P1296 = "338_1282016529.10767" - capture_lex $P1296 - .const 'Sub' $P1289 = "336_1282016529.10767" - capture_lex $P1289 - .const 'Sub' $P1282 = "334_1282016529.10767" - capture_lex $P1282 - .const 'Sub' $P1275 = "332_1282016529.10767" - capture_lex $P1275 - .const 'Sub' $P1268 = "330_1282016529.10767" - capture_lex $P1268 - .const 'Sub' $P1262 = "328_1282016529.10767" - capture_lex $P1262 - .const 'Sub' $P1255 = "326_1282016529.10767" - capture_lex $P1255 - .const 'Sub' $P1248 = "324_1282016529.10767" - capture_lex $P1248 - .const 'Sub' $P1241 = "322_1282016529.10767" - capture_lex $P1241 - .const 'Sub' $P1234 = "320_1282016529.10767" - capture_lex $P1234 - .const 'Sub' $P1227 = "318_1282016529.10767" - capture_lex $P1227 - .const 'Sub' $P1220 = "316_1282016529.10767" - capture_lex $P1220 - .const 'Sub' $P1213 = "314_1282016529.10767" - capture_lex $P1213 - .const 'Sub' $P1206 = "312_1282016529.10767" - capture_lex $P1206 - .const 'Sub' $P1199 = "310_1282016529.10767" - capture_lex $P1199 - .const 'Sub' $P1192 = "308_1282016529.10767" - capture_lex $P1192 - .const 'Sub' $P1185 = "306_1282016529.10767" - capture_lex $P1185 - .const 'Sub' $P1178 = "304_1282016529.10767" - capture_lex $P1178 - .const 'Sub' $P1171 = "302_1282016529.10767" - capture_lex $P1171 - .const 'Sub' $P1164 = "300_1282016529.10767" - capture_lex $P1164 - .const 'Sub' $P1157 = "298_1282016529.10767" - capture_lex $P1157 - .const 'Sub' $P1150 = "296_1282016529.10767" - capture_lex $P1150 - .const 'Sub' $P1143 = "294_1282016529.10767" - capture_lex $P1143 - .const 'Sub' $P1136 = "292_1282016529.10767" - capture_lex $P1136 - .const 'Sub' $P1129 = "290_1282016529.10767" - capture_lex $P1129 - .const 'Sub' $P1122 = "288_1282016529.10767" - capture_lex $P1122 - .const 'Sub' $P1115 = "286_1282016529.10767" - capture_lex $P1115 - .const 'Sub' $P1108 = "284_1282016529.10767" - capture_lex $P1108 - .const 'Sub' $P1101 = "282_1282016529.10767" - capture_lex $P1101 - .const 'Sub' $P1094 = "280_1282016529.10767" - capture_lex $P1094 - .const 'Sub' $P1087 = "278_1282016529.10767" - capture_lex $P1087 - .const 'Sub' $P1080 = "276_1282016529.10767" - capture_lex $P1080 - .const 'Sub' $P1073 = "274_1282016529.10767" - capture_lex $P1073 - .const 'Sub' $P1066 = "272_1282016529.10767" - capture_lex $P1066 - .const 'Sub' $P1059 = "270_1282016529.10767" - capture_lex $P1059 - .const 'Sub' $P1053 = "268_1282016529.10767" - capture_lex $P1053 - .const 'Sub' $P1046 = "266_1282016529.10767" - capture_lex $P1046 - .const 'Sub' $P1039 = "264_1282016529.10767" - capture_lex $P1039 - .const 'Sub' $P1032 = "262_1282016529.10767" - capture_lex $P1032 - .const 'Sub' $P1025 = "260_1282016529.10767" - capture_lex $P1025 - .const 'Sub' $P1018 = "258_1282016529.10767" - capture_lex $P1018 - .const 'Sub' $P1011 = "256_1282016529.10767" - capture_lex $P1011 - .const 'Sub' $P1004 = "254_1282016529.10767" + get_hll_global $P1369, ["NQP";"Regex"], "_block1368" + capture_lex $P1369 + .const 'Sub' $P1355 = "354_1284728478.15265" + capture_lex $P1355 + .const 'Sub' $P1349 = "352_1284728478.15265" + capture_lex $P1349 + .const 'Sub' $P1343 = "350_1284728478.15265" + capture_lex $P1343 + .const 'Sub' $P1337 = "348_1284728478.15265" + capture_lex $P1337 + .const 'Sub' $P1331 = "346_1284728478.15265" + capture_lex $P1331 + .const 'Sub' $P1325 = "344_1284728478.15265" + capture_lex $P1325 + .const 'Sub' $P1318 = "342_1284728478.15265" + capture_lex $P1318 + .const 'Sub' $P1311 = "340_1284728478.15265" + capture_lex $P1311 + .const 'Sub' $P1304 = "338_1284728478.15265" + capture_lex $P1304 + .const 'Sub' $P1297 = "336_1284728478.15265" + capture_lex $P1297 + .const 'Sub' $P1291 = "334_1284728478.15265" + capture_lex $P1291 + .const 'Sub' $P1284 = "332_1284728478.15265" + capture_lex $P1284 + .const 'Sub' $P1277 = "330_1284728478.15265" + capture_lex $P1277 + .const 'Sub' $P1270 = "328_1284728478.15265" + capture_lex $P1270 + .const 'Sub' $P1263 = "326_1284728478.15265" + capture_lex $P1263 + .const 'Sub' $P1256 = "324_1284728478.15265" + capture_lex $P1256 + .const 'Sub' $P1249 = "322_1284728478.15265" + capture_lex $P1249 + .const 'Sub' $P1242 = "320_1284728478.15265" + capture_lex $P1242 + .const 'Sub' $P1235 = "318_1284728478.15265" + capture_lex $P1235 + .const 'Sub' $P1228 = "316_1284728478.15265" + capture_lex $P1228 + .const 'Sub' $P1221 = "314_1284728478.15265" + capture_lex $P1221 + .const 'Sub' $P1214 = "312_1284728478.15265" + capture_lex $P1214 + .const 'Sub' $P1207 = "310_1284728478.15265" + capture_lex $P1207 + .const 'Sub' $P1200 = "308_1284728478.15265" + capture_lex $P1200 + .const 'Sub' $P1193 = "306_1284728478.15265" + capture_lex $P1193 + .const 'Sub' $P1186 = "304_1284728478.15265" + capture_lex $P1186 + .const 'Sub' $P1179 = "302_1284728478.15265" + capture_lex $P1179 + .const 'Sub' $P1172 = "300_1284728478.15265" + capture_lex $P1172 + .const 'Sub' $P1165 = "298_1284728478.15265" + capture_lex $P1165 + .const 'Sub' $P1158 = "296_1284728478.15265" + capture_lex $P1158 + .const 'Sub' $P1151 = "294_1284728478.15265" + capture_lex $P1151 + .const 'Sub' $P1144 = "292_1284728478.15265" + capture_lex $P1144 + .const 'Sub' $P1137 = "290_1284728478.15265" + capture_lex $P1137 + .const 'Sub' $P1130 = "288_1284728478.15265" + capture_lex $P1130 + .const 'Sub' $P1123 = "286_1284728478.15265" + capture_lex $P1123 + .const 'Sub' $P1116 = "284_1284728478.15265" + capture_lex $P1116 + .const 'Sub' $P1109 = "282_1284728478.15265" + capture_lex $P1109 + .const 'Sub' $P1102 = "280_1284728478.15265" + capture_lex $P1102 + .const 'Sub' $P1095 = "278_1284728478.15265" + capture_lex $P1095 + .const 'Sub' $P1088 = "276_1284728478.15265" + capture_lex $P1088 + .const 'Sub' $P1082 = "274_1284728478.15265" + capture_lex $P1082 + .const 'Sub' $P1075 = "272_1284728478.15265" + capture_lex $P1075 + .const 'Sub' $P1068 = "270_1284728478.15265" + capture_lex $P1068 + .const 'Sub' $P1061 = "268_1284728478.15265" + capture_lex $P1061 + .const 'Sub' $P1054 = "266_1284728478.15265" + capture_lex $P1054 + .const 'Sub' $P1047 = "264_1284728478.15265" + capture_lex $P1047 + .const 'Sub' $P1040 = "262_1284728478.15265" + capture_lex $P1040 + .const 'Sub' $P1033 = "260_1284728478.15265" + capture_lex $P1033 + .const 'Sub' $P1027 = "258_1284728478.15265" + capture_lex $P1027 + .const 'Sub' $P1021 = "256_1284728478.15265" + capture_lex $P1021 + .const 'Sub' $P1016 = "254_1284728478.15265" + capture_lex $P1016 + .const 'Sub' $P1010 = "252_1284728478.15265" + capture_lex $P1010 + .const 'Sub' $P1004 = "250_1284728478.15265" capture_lex $P1004 - .const 'Sub' $P998 = "252_1282016529.10767" - capture_lex $P998 - .const 'Sub' $P992 = "250_1282016529.10767" - capture_lex $P992 - .const 'Sub' $P987 = "248_1282016529.10767" - capture_lex $P987 - .const 'Sub' $P981 = "246_1282016529.10767" - capture_lex $P981 - .const 'Sub' $P975 = "244_1282016529.10767" - capture_lex $P975 - .const 'Sub' $P970 = "242_1282016529.10767" - capture_lex $P970 - .const 'Sub' $P965 = "240_1282016529.10767" - capture_lex $P965 - .const 'Sub' $P957 = "238_1282016529.10767" - capture_lex $P957 - .const 'Sub' $P948 = "236_1282016529.10767" - capture_lex $P948 - .const 'Sub' $P943 = "234_1282016529.10767" - capture_lex $P943 - .const 'Sub' $P938 = "232_1282016529.10767" - capture_lex $P938 - .const 'Sub' $P933 = "230_1282016529.10767" - capture_lex $P933 - .const 'Sub' $P925 = "228_1282016529.10767" + .const 'Sub' $P999 = "248_1284728478.15265" + capture_lex $P999 + .const 'Sub' $P994 = "246_1284728478.15265" + capture_lex $P994 + .const 'Sub' $P986 = "244_1284728478.15265" + capture_lex $P986 + .const 'Sub' $P977 = "242_1284728478.15265" + capture_lex $P977 + .const 'Sub' $P972 = "240_1284728478.15265" + capture_lex $P972 + .const 'Sub' $P967 = "238_1284728478.15265" + capture_lex $P967 + .const 'Sub' $P962 = "236_1284728478.15265" + capture_lex $P962 + .const 'Sub' $P954 = "234_1284728478.15265" + capture_lex $P954 + .const 'Sub' $P946 = "232_1284728478.15265" + capture_lex $P946 + .const 'Sub' $P941 = "230_1284728478.15265" + capture_lex $P941 + .const 'Sub' $P936 = "228_1284728478.15265" + capture_lex $P936 + .const 'Sub' $P931 = "226_1284728478.15265" + capture_lex $P931 + .const 'Sub' $P925 = "224_1284728478.15265" capture_lex $P925 - .const 'Sub' $P917 = "226_1282016529.10767" - capture_lex $P917 - .const 'Sub' $P912 = "224_1282016529.10767" - capture_lex $P912 - .const 'Sub' $P907 = "222_1282016529.10767" + .const 'Sub' $P919 = "222_1284728478.15265" + capture_lex $P919 + .const 'Sub' $P913 = "220_1284728478.15265" + capture_lex $P913 + .const 'Sub' $P907 = "218_1284728478.15265" capture_lex $P907 - .const 'Sub' $P902 = "220_1282016529.10767" - capture_lex $P902 - .const 'Sub' $P896 = "218_1282016529.10767" + .const 'Sub' $P901 = "216_1284728478.15265" + capture_lex $P901 + .const 'Sub' $P896 = "214_1284728478.15265" capture_lex $P896 - .const 'Sub' $P890 = "216_1282016529.10767" - capture_lex $P890 - .const 'Sub' $P884 = "214_1282016529.10767" - capture_lex $P884 - .const 'Sub' $P878 = "212_1282016529.10767" - capture_lex $P878 - .const 'Sub' $P872 = "210_1282016529.10767" - capture_lex $P872 - .const 'Sub' $P867 = "208_1282016529.10767" - capture_lex $P867 - .const 'Sub' $P862 = "206_1282016529.10767" - capture_lex $P862 - .const 'Sub' $P850 = "202_1282016529.10767" - capture_lex $P850 - .const 'Sub' $P842 = "200_1282016529.10767" - capture_lex $P842 - .const 'Sub' $P836 = "198_1282016529.10767" + .const 'Sub' $P891 = "212_1284728478.15265" + capture_lex $P891 + .const 'Sub' $P879 = "208_1284728478.15265" + capture_lex $P879 + .const 'Sub' $P871 = "206_1284728478.15265" + capture_lex $P871 + .const 'Sub' $P865 = "204_1284728478.15265" + capture_lex $P865 + .const 'Sub' $P858 = "202_1284728478.15265" + capture_lex $P858 + .const 'Sub' $P852 = "200_1284728478.15265" + capture_lex $P852 + .const 'Sub' $P844 = "198_1284728478.15265" + capture_lex $P844 + .const 'Sub' $P836 = "196_1284728478.15265" capture_lex $P836 - .const 'Sub' $P829 = "196_1282016529.10767" - capture_lex $P829 - .const 'Sub' $P823 = "194_1282016529.10767" - capture_lex $P823 - .const 'Sub' $P815 = "192_1282016529.10767" - capture_lex $P815 - .const 'Sub' $P807 = "190_1282016529.10767" - capture_lex $P807 - .const 'Sub' $P801 = "188_1282016529.10767" - capture_lex $P801 - .const 'Sub' $P795 = "186_1282016529.10767" - capture_lex $P795 - .const 'Sub' $P781 = "182_1282016529.10767" - capture_lex $P781 - .const 'Sub' $P744 = "180_1282016529.10767" - capture_lex $P744 - .const 'Sub' $P735 = "178_1282016529.10767" + .const 'Sub' $P830 = "194_1284728478.15265" + capture_lex $P830 + .const 'Sub' $P824 = "192_1284728478.15265" + capture_lex $P824 + .const 'Sub' $P810 = "188_1284728478.15265" + capture_lex $P810 + .const 'Sub' $P773 = "186_1284728478.15265" + capture_lex $P773 + .const 'Sub' $P762 = "184_1284728478.15265" + capture_lex $P762 + .const 'Sub' $P750 = "180_1284728478.15265" + capture_lex $P750 + .const 'Sub' $P741 = "178_1284728478.15265" + capture_lex $P741 + .const 'Sub' $P735 = "176_1284728478.15265" capture_lex $P735 - .const 'Sub' $P729 = "176_1282016529.10767" - capture_lex $P729 - .const 'Sub' $P719 = "174_1282016529.10767" - capture_lex $P719 - .const 'Sub' $P706 = "172_1282016529.10767" - capture_lex $P706 - .const 'Sub' $P699 = "170_1282016529.10767" - capture_lex $P699 - .const 'Sub' $P691 = "168_1282016529.10767" - capture_lex $P691 - .const 'Sub' $P681 = "166_1282016529.10767" - capture_lex $P681 - .const 'Sub' $P657 = "162_1282016529.10767" - capture_lex $P657 - .const 'Sub' $P634 = "160_1282016529.10767" + .const 'Sub' $P725 = "174_1284728478.15265" + capture_lex $P725 + .const 'Sub' $P712 = "172_1284728478.15265" + capture_lex $P712 + .const 'Sub' $P705 = "170_1284728478.15265" + capture_lex $P705 + .const 'Sub' $P697 = "168_1284728478.15265" + capture_lex $P697 + .const 'Sub' $P687 = "166_1284728478.15265" + capture_lex $P687 + .const 'Sub' $P660 = "162_1284728478.15265" + capture_lex $P660 + .const 'Sub' $P634 = "160_1284728478.15265" capture_lex $P634 - .const 'Sub' $P627 = "158_1282016529.10767" + .const 'Sub' $P627 = "158_1284728478.15265" capture_lex $P627 - .const 'Sub' $P620 = "156_1282016529.10767" + .const 'Sub' $P620 = "156_1284728478.15265" capture_lex $P620 - .const 'Sub' $P610 = "152_1282016529.10767" + .const 'Sub' $P610 = "152_1284728478.15265" capture_lex $P610 - .const 'Sub' $P602 = "150_1282016529.10767" + .const 'Sub' $P602 = "150_1284728478.15265" capture_lex $P602 - .const 'Sub' $P596 = "148_1282016529.10767" + .const 'Sub' $P596 = "148_1284728478.15265" capture_lex $P596 - .const 'Sub' $P583 = "146_1282016529.10767" + .const 'Sub' $P583 = "146_1284728478.15265" capture_lex $P583 - .const 'Sub' $P576 = "144_1282016529.10767" + .const 'Sub' $P576 = "144_1284728478.15265" capture_lex $P576 - .const 'Sub' $P569 = "142_1282016529.10767" + .const 'Sub' $P569 = "142_1284728478.15265" capture_lex $P569 - .const 'Sub' $P562 = "140_1282016529.10767" + .const 'Sub' $P562 = "140_1284728478.15265" capture_lex $P562 - .const 'Sub' $P535 = "136_1282016529.10767" + .const 'Sub' $P535 = "136_1284728478.15265" capture_lex $P535 - .const 'Sub' $P526 = "134_1282016529.10767" + .const 'Sub' $P526 = "134_1284728478.15265" capture_lex $P526 - .const 'Sub' $P519 = "132_1282016529.10767" + .const 'Sub' $P519 = "132_1284728478.15265" capture_lex $P519 - .const 'Sub' $P510 = "128_1282016529.10767" + .const 'Sub' $P510 = "128_1284728478.15265" capture_lex $P510 - .const 'Sub' $P505 = "126_1282016529.10767" + .const 'Sub' $P505 = "126_1284728478.15265" capture_lex $P505 - .const 'Sub' $P493 = "124_1282016529.10767" + .const 'Sub' $P493 = "124_1284728478.15265" capture_lex $P493 - .const 'Sub' $P481 = "122_1282016529.10767" + .const 'Sub' $P481 = "122_1284728478.15265" capture_lex $P481 - .const 'Sub' $P474 = "120_1282016529.10767" + .const 'Sub' $P474 = "120_1284728478.15265" capture_lex $P474 - .const 'Sub' $P469 = "118_1282016529.10767" + .const 'Sub' $P469 = "118_1284728478.15265" capture_lex $P469 - .const 'Sub' $P463 = "116_1282016529.10767" + .const 'Sub' $P463 = "116_1284728478.15265" capture_lex $P463 - .const 'Sub' $P457 = "114_1282016529.10767" + .const 'Sub' $P457 = "114_1284728478.15265" capture_lex $P457 - .const 'Sub' $P447 = "111_1282016529.10767" + .const 'Sub' $P447 = "111_1284728478.15265" capture_lex $P447 - .const 'Sub' $P441 = "109_1282016529.10767" + .const 'Sub' $P441 = "109_1284728478.15265" capture_lex $P441 - .const 'Sub' $P435 = "107_1282016529.10767" + .const 'Sub' $P435 = "107_1284728478.15265" capture_lex $P435 - .const 'Sub' $P429 = "105_1282016529.10767" + .const 'Sub' $P429 = "105_1284728478.15265" capture_lex $P429 - .const 'Sub' $P423 = "103_1282016529.10767" + .const 'Sub' $P423 = "103_1284728478.15265" capture_lex $P423 - .const 'Sub' $P417 = "101_1282016529.10767" + .const 'Sub' $P417 = "101_1284728478.15265" capture_lex $P417 - .const 'Sub' $P411 = "99_1282016529.10767" + .const 'Sub' $P411 = "99_1284728478.15265" capture_lex $P411 - .const 'Sub' $P402 = "97_1282016529.10767" + .const 'Sub' $P402 = "97_1284728478.15265" capture_lex $P402 - .const 'Sub' $P393 = "95_1282016529.10767" + .const 'Sub' $P393 = "95_1284728478.15265" capture_lex $P393 - .const 'Sub' $P384 = "93_1282016529.10767" + .const 'Sub' $P384 = "93_1284728478.15265" capture_lex $P384 - .const 'Sub' $P371 = "89_1282016529.10767" + .const 'Sub' $P371 = "89_1284728478.15265" capture_lex $P371 - .const 'Sub' $P362 = "87_1282016529.10767" + .const 'Sub' $P362 = "87_1284728478.15265" capture_lex $P362 - .const 'Sub' $P352 = "83_1282016529.10767" + .const 'Sub' $P352 = "83_1284728478.15265" capture_lex $P352 - .const 'Sub' $P345 = "81_1282016529.10767" + .const 'Sub' $P345 = "81_1284728478.15265" capture_lex $P345 - .const 'Sub' $P338 = "79_1282016529.10767" + .const 'Sub' $P338 = "79_1284728478.15265" capture_lex $P338 - .const 'Sub' $P326 = "75_1282016529.10767" + .const 'Sub' $P326 = "75_1284728478.15265" capture_lex $P326 - .const 'Sub' $P318 = "73_1282016529.10767" + .const 'Sub' $P318 = "73_1284728478.15265" capture_lex $P318 - .const 'Sub' $P310 = "71_1282016529.10767" + .const 'Sub' $P310 = "71_1284728478.15265" capture_lex $P310 - .const 'Sub' $P290 = "69_1282016529.10767" + .const 'Sub' $P290 = "69_1284728478.15265" capture_lex $P290 - .const 'Sub' $P281 = "67_1282016529.10767" + .const 'Sub' $P281 = "67_1284728478.15265" capture_lex $P281 - .const 'Sub' $P263 = "64_1282016529.10767" + .const 'Sub' $P263 = "64_1284728478.15265" capture_lex $P263 - .const 'Sub' $P245 = "62_1282016529.10767" + .const 'Sub' $P245 = "62_1284728478.15265" capture_lex $P245 - .const 'Sub' $P236 = "58_1282016529.10767" + .const 'Sub' $P236 = "58_1284728478.15265" capture_lex $P236 - .const 'Sub' $P231 = "56_1282016529.10767" + .const 'Sub' $P231 = "56_1284728478.15265" capture_lex $P231 - .const 'Sub' $P222 = "52_1282016529.10767" + .const 'Sub' $P222 = "52_1284728478.15265" capture_lex $P222 - .const 'Sub' $P217 = "50_1282016529.10767" + .const 'Sub' $P217 = "50_1284728478.15265" capture_lex $P217 - .const 'Sub' $P212 = "48_1282016529.10767" + .const 'Sub' $P212 = "48_1284728478.15265" capture_lex $P212 - .const 'Sub' $P203 = "46_1282016529.10767" + .const 'Sub' $P203 = "46_1284728478.15265" capture_lex $P203 - .const 'Sub' $P196 = "44_1282016529.10767" + .const 'Sub' $P196 = "44_1284728478.15265" capture_lex $P196 - .const 'Sub' $P190 = "42_1282016529.10767" + .const 'Sub' $P190 = "42_1284728478.15265" capture_lex $P190 - .const 'Sub' $P182 = "40_1282016529.10767" + .const 'Sub' $P182 = "40_1284728478.15265" capture_lex $P182 - .const 'Sub' $P176 = "38_1282016529.10767" + .const 'Sub' $P176 = "38_1284728478.15265" capture_lex $P176 - .const 'Sub' $P170 = "36_1282016529.10767" + .const 'Sub' $P170 = "36_1284728478.15265" capture_lex $P170 - .const 'Sub' $P155 = "33_1282016529.10767" + .const 'Sub' $P155 = "33_1284728478.15265" capture_lex $P155 - .const 'Sub' $P141 = "31_1282016529.10767" + .const 'Sub' $P141 = "31_1284728478.15265" capture_lex $P141 - .const 'Sub' $P134 = "29_1282016529.10767" + .const 'Sub' $P134 = "29_1284728478.15265" capture_lex $P134 - .const 'Sub' $P95 = "26_1282016529.10767" + .const 'Sub' $P95 = "26_1284728478.15265" capture_lex $P95 - .const 'Sub' $P80 = "23_1282016529.10767" + .const 'Sub' $P80 = "23_1284728478.15265" capture_lex $P80 - .const 'Sub' $P69 = "21_1282016529.10767" + .const 'Sub' $P69 = "21_1284728478.15265" capture_lex $P69 - .const 'Sub' $P57 = "19_1282016529.10767" + .const 'Sub' $P57 = "19_1284728478.15265" capture_lex $P57 - .const 'Sub' $P49 = "17_1282016529.10767" + .const 'Sub' $P49 = "17_1284728478.15265" capture_lex $P49 - .const 'Sub' $P42 = "15_1282016529.10767" + .const 'Sub' $P42 = "15_1284728478.15265" capture_lex $P42 - .const 'Sub' $P35 = "13_1282016529.10767" + .const 'Sub' $P35 = "13_1284728478.15265" capture_lex $P35 - .const 'Sub' $P15 = "12_1282016529.10767" + .const 'Sub' $P15 = "12_1284728478.15265" capture_lex $P15 $P0 = find_dynamic_lex "$*CTXSAVE" if null $P0 goto ctxsave_done @@ -371,77 +375,77 @@ 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', 574 + get_hll_global $P1369, ["NQP";"Regex"], "_block1368" + capture_lex $P1369 + $P1431 = $P1369() .annotate 'line', 4 - .return ($P1402) - .const 'Sub' $P1404 = "370_1282016529.10767" - .return ($P1404) + .return ($P1431) + .const 'Sub' $P1433 = "376_1284728478.15265" + .return ($P1433) .end .namespace ["NQP";"Grammar"] -.sub "" :load :init :subid("post373") :outer("11_1282016529.10767") +.sub "" :load :init :subid("post379") :outer("11_1284728478.15265") .annotate 'line', 4 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, :assoc", "%methodop") -.annotate 'line', 449 - get_hll_global $P1408, ["NQP"], "Grammar" - $P1408."O"(":prec, :assoc", "%autoincrement") -.annotate 'line', 450 - get_hll_global $P1409, ["NQP"], "Grammar" - $P1409."O"(":prec, :assoc", "%exponentiation") -.annotate 'line', 451 - get_hll_global $P1410, ["NQP"], "Grammar" - $P1410."O"(":prec, :assoc", "%symbolic_unary") -.annotate 'line', 452 - get_hll_global $P1411, ["NQP"], "Grammar" - $P1411."O"(":prec, :assoc", "%multiplicative") -.annotate 'line', 453 - get_hll_global $P1412, ["NQP"], "Grammar" - $P1412."O"(":prec, :assoc", "%additive") -.annotate 'line', 454 - get_hll_global $P1413, ["NQP"], "Grammar" - $P1413."O"(":prec, :assoc", "%concatenation") .annotate 'line', 455 - get_hll_global $P1414, ["NQP"], "Grammar" - $P1414."O"(":prec, :assoc", "%relational") + get_hll_global $P1436, ["NQP"], "Grammar" + $P1436."O"(":prec, :assoc", "%methodop") .annotate 'line', 456 - get_hll_global $P1415, ["NQP"], "Grammar" - $P1415."O"(":prec, :assoc", "%tight_and") + get_hll_global $P1437, ["NQP"], "Grammar" + $P1437."O"(":prec, :assoc", "%autoincrement") .annotate 'line', 457 - get_hll_global $P1416, ["NQP"], "Grammar" - $P1416."O"(":prec, :assoc", "%tight_or") + get_hll_global $P1438, ["NQP"], "Grammar" + $P1438."O"(":prec, :assoc", "%exponentiation") .annotate 'line', 458 - get_hll_global $P1417, ["NQP"], "Grammar" - $P1417."O"(":prec, :assoc", "%conditional") + get_hll_global $P1439, ["NQP"], "Grammar" + $P1439."O"(":prec, :assoc", "%symbolic_unary") .annotate 'line', 459 - get_hll_global $P1418, ["NQP"], "Grammar" - $P1418."O"(":prec, :assoc", "%assignment") + get_hll_global $P1440, ["NQP"], "Grammar" + $P1440."O"(":prec, :assoc", "%multiplicative") .annotate 'line', 460 - get_hll_global $P1419, ["NQP"], "Grammar" - $P1419."O"(":prec, :assoc, :nextterm", "%comma") + get_hll_global $P1441, ["NQP"], "Grammar" + $P1441."O"(":prec, :assoc", "%additive") .annotate 'line', 461 - get_hll_global $P1420, ["NQP"], "Grammar" - $P1420."O"(":prec, :assoc", "%list_infix") + get_hll_global $P1442, ["NQP"], "Grammar" + $P1442."O"(":prec, :assoc", "%concatenation") .annotate 'line', 462 - get_hll_global $P1421, ["NQP"], "Grammar" - $P1421."O"(":prec, :assoc", "%list_prefix") -.annotate 'line', 447 - $P1422 = get_root_global ["parrot"], "P6metaclass" - $P1422."new_class"("NQP::Regex", "Regex::P6Regex::Grammar" :named("parent")) + get_hll_global $P1443, ["NQP"], "Grammar" + $P1443."O"(":prec, :assoc", "%relational") +.annotate 'line', 463 + get_hll_global $P1444, ["NQP"], "Grammar" + $P1444."O"(":prec, :assoc", "%tight_and") +.annotate 'line', 464 + get_hll_global $P1445, ["NQP"], "Grammar" + $P1445."O"(":prec, :assoc", "%tight_or") +.annotate 'line', 465 + get_hll_global $P1446, ["NQP"], "Grammar" + $P1446."O"(":prec, :assoc", "%conditional") +.annotate 'line', 466 + get_hll_global $P1447, ["NQP"], "Grammar" + $P1447."O"(":prec, :assoc", "%assignment") +.annotate 'line', 467 + get_hll_global $P1448, ["NQP"], "Grammar" + $P1448."O"(":prec, :assoc, :nextterm", "%comma") +.annotate 'line', 468 + get_hll_global $P1449, ["NQP"], "Grammar" + $P1449."O"(":prec, :assoc", "%list_infix") +.annotate 'line', 469 + get_hll_global $P1450, ["NQP"], "Grammar" + $P1450."O"(":prec, :assoc", "%list_prefix") +.annotate 'line', 454 + $P1451 = get_root_global ["parrot"], "P6metaclass" + $P1451."new_class"("NQP::Regex", "Regex::P6Regex::Grammar" :named("parent")) .end .namespace ["NQP";"Grammar"] .include "except_types.pasm" -.sub "TOP" :subid("12_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "TOP" :subid("12_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 new $P17, 'ExceptionHandler' set_addr $P17, control_16 @@ -459,55 +463,55 @@ .lex "$*MULTINESS", $P20 .annotate 'line', 4 find_lex $P21, "%*LANG" - unless_null $P21, vivify_374 + unless_null $P21, vivify_380 get_hll_global $P21, "%LANG" - unless_null $P21, vivify_375 + unless_null $P21, vivify_381 die "Contextual %*LANG not found" - vivify_375: - vivify_374: + vivify_381: + vivify_380: .annotate 'line', 6 get_hll_global $P22, ["NQP"], "Regex" find_lex $P23, "%*LANG" - unless_null $P23, vivify_376 + unless_null $P23, vivify_382 get_hll_global $P23, "%LANG" - unless_null $P23, vivify_377 + unless_null $P23, vivify_383 die "Contextual %*LANG not found" - vivify_377: + vivify_383: store_lex "%*LANG", $P23 - vivify_376: + vivify_382: set $P23["Regex"], $P22 .annotate 'line', 7 get_hll_global $P24, ["NQP"], "RegexActions" find_lex $P25, "%*LANG" - unless_null $P25, vivify_378 + unless_null $P25, vivify_384 get_hll_global $P25, "%LANG" - unless_null $P25, vivify_379 + unless_null $P25, vivify_385 die "Contextual %*LANG not found" - vivify_379: + vivify_385: store_lex "%*LANG", $P25 - vivify_378: + vivify_384: set $P25["Regex-actions"], $P24 .annotate 'line', 8 get_hll_global $P26, ["NQP"], "Grammar" find_lex $P27, "%*LANG" - unless_null $P27, vivify_380 + unless_null $P27, vivify_386 get_hll_global $P27, "%LANG" - unless_null $P27, vivify_381 + unless_null $P27, vivify_387 die "Contextual %*LANG not found" - vivify_381: + vivify_387: store_lex "%*LANG", $P27 - vivify_380: + vivify_386: set $P27["MAIN"], $P26 .annotate 'line', 9 get_hll_global $P28, ["NQP"], "Actions" find_lex $P29, "%*LANG" - unless_null $P29, vivify_382 + unless_null $P29, vivify_388 get_hll_global $P29, "%LANG" - unless_null $P29, vivify_383 + unless_null $P29, vivify_389 die "Contextual %*LANG not found" - vivify_383: + vivify_389: store_lex "%*LANG", $P29 - vivify_382: + vivify_388: set $P29["MAIN-actions"], $P28 .annotate 'line', 10 new $P30, "String" @@ -531,7 +535,7 @@ .namespace ["NQP";"Grammar"] -.sub "identifier" :subid("13_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "identifier" :subid("13_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx36_tgt .local int rx36_pos @@ -553,9 +557,9 @@ substr rx36_tgt, rx36_tgt, rx36_off rx36_start: eq $I10, 1, rx36_restart - if_null rx36_debug, debug_384 - rx36_cur."!cursor_debug"("START ", "identifier") - debug_384: + if_null rx36_debug, debug_390 + rx36_cur."!cursor_debug"("START", "identifier") + debug_390: $I10 = self.'from'() ne $I10, -1, rxscan40_done goto rxscan40_scan @@ -598,15 +602,15 @@ rxquantr41_done: # rx pass rx36_cur."!cursor_pass"(rx36_pos, "identifier") - if_null rx36_debug, debug_385 - rx36_cur."!cursor_debug"("PASS ", "identifier", " at pos=", rx36_pos) - debug_385: + if_null rx36_debug, debug_391 + rx36_cur."!cursor_debug"("PASS", "identifier", " at pos=", rx36_pos) + debug_391: .return (rx36_cur) rx36_restart: .annotate 'line', 4 - if_null rx36_debug, debug_386 - rx36_cur."!cursor_debug"("NEXT ", "identifier") - debug_386: + if_null rx36_debug, debug_392 + rx36_cur."!cursor_debug"("NEXT", "identifier") + debug_392: rx36_fail: (rx36_rep, rx36_pos, $I10, $P10) = rx36_cur."!mark_fail"(0) lt rx36_pos, -1, rx36_done @@ -614,16 +618,16 @@ jump $I10 rx36_done: rx36_cur."!cursor_fail"() - if_null rx36_debug, debug_387 - rx36_cur."!cursor_debug"("FAIL ", "identifier") - debug_387: + if_null rx36_debug, debug_393 + rx36_cur."!cursor_debug"("FAIL", "identifier") + debug_393: .return (rx36_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__identifier" :subid("14_1282016529.10767") :method +.sub "!PREFIX__identifier" :subid("14_1284728478.15265") :method .annotate 'line', 4 $P38 = self."!PREFIX__!subrule"("ident", "") new $P39, "ResizablePMCArray" @@ -633,7 +637,7 @@ .namespace ["NQP";"Grammar"] -.sub "name" :subid("15_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "name" :subid("15_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx43_tgt .local int rx43_pos @@ -656,9 +660,9 @@ substr rx43_tgt, rx43_tgt, rx43_off rx43_start: eq $I10, 1, rx43_restart - if_null rx43_debug, debug_388 - rx43_cur."!cursor_debug"("START ", "name") - debug_388: + if_null rx43_debug, debug_394 + rx43_cur."!cursor_debug"("START", "name") + debug_394: $I10 = self.'from'() ne $I10, -1, rxscan46_done goto rxscan46_scan @@ -704,15 +708,15 @@ rxquantr47_done: # rx pass rx43_cur."!cursor_pass"(rx43_pos, "name") - if_null rx43_debug, debug_389 - rx43_cur."!cursor_debug"("PASS ", "name", " at pos=", rx43_pos) - debug_389: + if_null rx43_debug, debug_395 + rx43_cur."!cursor_debug"("PASS", "name", " at pos=", rx43_pos) + debug_395: .return (rx43_cur) rx43_restart: .annotate 'line', 4 - if_null rx43_debug, debug_390 - rx43_cur."!cursor_debug"("NEXT ", "name") - debug_390: + if_null rx43_debug, debug_396 + rx43_cur."!cursor_debug"("NEXT", "name") + debug_396: rx43_fail: (rx43_rep, rx43_pos, $I10, $P10) = rx43_cur."!mark_fail"(0) lt rx43_pos, -1, rx43_done @@ -720,16 +724,16 @@ jump $I10 rx43_done: rx43_cur."!cursor_fail"() - if_null rx43_debug, debug_391 - rx43_cur."!cursor_debug"("FAIL ", "name") - debug_391: + if_null rx43_debug, debug_397 + rx43_cur."!cursor_debug"("FAIL", "name") + debug_397: .return (rx43_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__name" :subid("16_1282016529.10767") :method +.sub "!PREFIX__name" :subid("16_1284728478.15265") :method .annotate 'line', 4 new $P45, "ResizablePMCArray" push $P45, "" @@ -738,7 +742,7 @@ .namespace ["NQP";"Grammar"] -.sub "deflongname" :subid("17_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "deflongname" :subid("17_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx50_tgt .local int rx50_pos @@ -761,9 +765,9 @@ substr rx50_tgt, rx50_tgt, rx50_off rx50_start: eq $I10, 1, rx50_restart - if_null rx50_debug, debug_392 - rx50_cur."!cursor_debug"("START ", "deflongname") - debug_392: + if_null rx50_debug, debug_398 + rx50_cur."!cursor_debug"("START", "deflongname") + debug_398: $I10 = self.'from'() ne $I10, -1, rxscan54_done goto rxscan54_scan @@ -807,15 +811,15 @@ .annotate 'line', 21 # rx pass rx50_cur."!cursor_pass"(rx50_pos, "deflongname") - if_null rx50_debug, debug_393 - rx50_cur."!cursor_debug"("PASS ", "deflongname", " at pos=", rx50_pos) - debug_393: + if_null rx50_debug, debug_399 + rx50_cur."!cursor_debug"("PASS", "deflongname", " at pos=", rx50_pos) + debug_399: .return (rx50_cur) rx50_restart: .annotate 'line', 4 - if_null rx50_debug, debug_394 - rx50_cur."!cursor_debug"("NEXT ", "deflongname") - debug_394: + if_null rx50_debug, debug_400 + rx50_cur."!cursor_debug"("NEXT", "deflongname") + debug_400: rx50_fail: (rx50_rep, rx50_pos, $I10, $P10) = rx50_cur."!mark_fail"(0) lt rx50_pos, -1, rx50_done @@ -823,16 +827,16 @@ jump $I10 rx50_done: rx50_cur."!cursor_fail"() - if_null rx50_debug, debug_395 - rx50_cur."!cursor_debug"("FAIL ", "deflongname") - debug_395: + if_null rx50_debug, debug_401 + rx50_cur."!cursor_debug"("FAIL", "deflongname") + debug_401: .return (rx50_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__deflongname" :subid("18_1282016529.10767") :method +.sub "!PREFIX__deflongname" :subid("18_1284728478.15265") :method .annotate 'line', 4 $P52 = self."!PREFIX__!subrule"("identifier", "") new $P53, "ResizablePMCArray" @@ -842,7 +846,7 @@ .namespace ["NQP";"Grammar"] -.sub "ENDSTMT" :subid("19_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "ENDSTMT" :subid("19_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx58_tgt .local int rx58_pos @@ -864,9 +868,9 @@ substr rx58_tgt, rx58_tgt, rx58_off rx58_start: eq $I10, 1, rx58_restart - if_null rx58_debug, debug_396 - rx58_cur."!cursor_debug"("START ", "ENDSTMT") - debug_396: + if_null rx58_debug, debug_402 + rx58_cur."!cursor_debug"("START", "ENDSTMT") + debug_402: $I10 = self.'from'() ne $I10, -1, rxscan61_done goto rxscan61_scan @@ -889,23 +893,21 @@ set_addr $I10, alt63_1 rx58_cur."!mark_push"(0, rx58_pos, $I10) .annotate 'line', 27 - # rx rxquantr64 ** 0..* - set_addr $I10, rxquantr64_done - rx58_cur."!mark_push"(0, rx58_pos, $I10) - rxquantr64_loop: - # rx enumcharlist negate=0 - ge rx58_pos, rx58_eos, rx58_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx58_pos, rx58_off + set rx58_rep, 0 + sub $I12, rx58_eos, rx58_pos + rxenumcharlistq64_loop: + le $I12, 0, rxenumcharlistq64_done substr $S10, rx58_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, rx58_fail - inc rx58_pos - set_addr $I10, rxquantr64_done - (rx58_rep) = rx58_cur."!mark_commit"($I10) - set_addr $I10, rxquantr64_done - rx58_cur."!mark_push"(rx58_rep, rx58_pos, $I10) - goto rxquantr64_loop - rxquantr64_done: + lt $I11, 0, rxenumcharlistq64_done + inc rx58_rep + inc $I10 + dec $I12 + goto rxenumcharlistq64_loop + rxenumcharlistq64_done: + add rx58_pos, rx58_pos, rx58_rep # rxanchor eol sub $I10, rx58_pos, rx58_off is_cclass $I11, 4096, rx58_tgt, $I10 @@ -974,15 +976,15 @@ .annotate 'line', 25 # rx pass rx58_cur."!cursor_pass"(rx58_pos, "ENDSTMT") - if_null rx58_debug, debug_397 - rx58_cur."!cursor_debug"("PASS ", "ENDSTMT", " at pos=", rx58_pos) - debug_397: + if_null rx58_debug, debug_403 + rx58_cur."!cursor_debug"("PASS", "ENDSTMT", " at pos=", rx58_pos) + debug_403: .return (rx58_cur) rx58_restart: .annotate 'line', 4 - if_null rx58_debug, debug_398 - rx58_cur."!cursor_debug"("NEXT ", "ENDSTMT") - debug_398: + if_null rx58_debug, debug_404 + rx58_cur."!cursor_debug"("NEXT", "ENDSTMT") + debug_404: rx58_fail: (rx58_rep, rx58_pos, $I10, $P10) = rx58_cur."!mark_fail"(0) lt rx58_pos, -1, rx58_done @@ -990,16 +992,16 @@ jump $I10 rx58_done: rx58_cur."!cursor_fail"() - if_null rx58_debug, debug_399 - rx58_cur."!cursor_debug"("FAIL ", "ENDSTMT") - debug_399: + if_null rx58_debug, debug_405 + rx58_cur."!cursor_debug"("FAIL", "ENDSTMT") + debug_405: .return (rx58_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__ENDSTMT" :subid("20_1282016529.10767") :method +.sub "!PREFIX__ENDSTMT" :subid("20_1284728478.15265") :method .annotate 'line', 4 new $P60, "ResizablePMCArray" push $P60, "" @@ -1008,7 +1010,7 @@ .namespace ["NQP";"Grammar"] -.sub "ws" :subid("21_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "ws" :subid("21_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx70_tgt .local int rx70_pos @@ -1030,9 +1032,9 @@ substr rx70_tgt, rx70_tgt, rx70_off rx70_start: eq $I10, 1, rx70_restart - if_null rx70_debug, debug_400 - rx70_cur."!cursor_debug"("START ", "ws") - debug_400: + if_null rx70_debug, debug_406 + rx70_cur."!cursor_debug"("START", "ws") + debug_406: $I10 = self.'from'() ne $I10, -1, rxscan73_done goto rxscan73_scan @@ -1070,23 +1072,22 @@ .annotate 'line', 35 set_addr $I10, alt76_1 rx70_cur."!mark_push"(0, rx70_pos, $I10) - # rx rxquantr77 ** 1..* - set_addr $I10, rxquantr77_done - rx70_cur."!mark_push"(0, -1, $I10) - rxquantr77_loop: - # rx enumcharlist negate=0 - ge rx70_pos, rx70_eos, rx70_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx70_pos, rx70_off + set rx70_rep, 0 + sub $I12, rx70_eos, rx70_pos + rxenumcharlistq77_loop: + le $I12, 0, rxenumcharlistq77_done substr $S10, rx70_tgt, $I10, 1 index $I11, unicode:"\n\x{b}\f\r\x{85}\u2028\u2029", $S10 - lt $I11, 0, rx70_fail - inc rx70_pos - set_addr $I10, rxquantr77_done - (rx70_rep) = rx70_cur."!mark_commit"($I10) - set_addr $I10, rxquantr77_done - rx70_cur."!mark_push"(rx70_rep, rx70_pos, $I10) - goto rxquantr77_loop - rxquantr77_done: + lt $I11, 0, rxenumcharlistq77_done + inc rx70_rep + inc $I10 + dec $I12 + goto rxenumcharlistq77_loop + rxenumcharlistq77_done: + lt rx70_rep, 1, rx70_fail + add rx70_pos, rx70_pos, rx70_rep goto alt76_end alt76_1: set_addr $I10, alt76_2 @@ -1124,23 +1125,22 @@ goto alt76_end alt76_3: .annotate 'line', 38 - # rx rxquantr79 ** 1..* - set_addr $I10, rxquantr79_done - rx70_cur."!mark_push"(0, -1, $I10) - rxquantr79_loop: - # rx enumcharlist negate=0 - ge rx70_pos, rx70_eos, rx70_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx70_pos, rx70_off + set rx70_rep, 0 + sub $I12, rx70_eos, rx70_pos + rxenumcharlistq79_loop: + le $I12, 0, rxenumcharlistq79_done substr $S10, rx70_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, rx70_fail - inc rx70_pos - set_addr $I10, rxquantr79_done - (rx70_rep) = rx70_cur."!mark_commit"($I10) - set_addr $I10, rxquantr79_done - rx70_cur."!mark_push"(rx70_rep, rx70_pos, $I10) - goto rxquantr79_loop - rxquantr79_done: + lt $I11, 0, rxenumcharlistq79_done + inc rx70_rep + inc $I10 + dec $I12 + goto rxenumcharlistq79_loop + rxenumcharlistq79_done: + lt rx70_rep, 1, rx70_fail + add rx70_pos, rx70_pos, rx70_rep alt76_end: .annotate 'line', 39 set_addr $I10, rxquantr75_done @@ -1158,15 +1158,15 @@ .annotate 'line', 32 # rx pass rx70_cur."!cursor_pass"(rx70_pos, "ws") - if_null rx70_debug, debug_401 - rx70_cur."!cursor_debug"("PASS ", "ws", " at pos=", rx70_pos) - debug_401: + if_null rx70_debug, debug_407 + rx70_cur."!cursor_debug"("PASS", "ws", " at pos=", rx70_pos) + debug_407: .return (rx70_cur) rx70_restart: .annotate 'line', 4 - if_null rx70_debug, debug_402 - rx70_cur."!cursor_debug"("NEXT ", "ws") - debug_402: + if_null rx70_debug, debug_408 + rx70_cur."!cursor_debug"("NEXT", "ws") + debug_408: rx70_fail: (rx70_rep, rx70_pos, $I10, $P10) = rx70_cur."!mark_fail"(0) lt rx70_pos, -1, rx70_done @@ -1174,16 +1174,16 @@ jump $I10 rx70_done: rx70_cur."!cursor_fail"() - if_null rx70_debug, debug_403 - rx70_cur."!cursor_debug"("FAIL ", "ws") - debug_403: + if_null rx70_debug, debug_409 + rx70_cur."!cursor_debug"("FAIL", "ws") + debug_409: .return (rx70_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__ws" :subid("22_1282016529.10767") :method +.sub "!PREFIX__ws" :subid("22_1284728478.15265") :method .annotate 'line', 4 new $P72, "ResizablePMCArray" push $P72, "" @@ -1193,9 +1193,9 @@ .namespace ["NQP";"Grammar"] -.sub "unv" :subid("23_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "unv" :subid("23_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P88 = "25_1282016529.10767" + .const 'Sub' $P88 = "25_1284728478.15265" capture_lex $P88 .local string rx81_tgt .local int rx81_pos @@ -1217,9 +1217,9 @@ substr rx81_tgt, rx81_tgt, rx81_off rx81_start: eq $I10, 1, rx81_restart - if_null rx81_debug, debug_404 - rx81_cur."!cursor_debug"("START ", "unv") - debug_404: + if_null rx81_debug, debug_410 + rx81_cur."!cursor_debug"("START", "unv") + debug_410: $I10 = self.'from'() ne $I10, -1, rxscan84_done goto rxscan84_scan @@ -1247,7 +1247,7 @@ rxanchor86_done: # rx subrule "before" subtype=zerowidth negate= rx81_cur."!cursor_pos"(rx81_pos) - .const 'Sub' $P88 = "25_1282016529.10767" + .const 'Sub' $P88 = "25_1284728478.15265" capture_lex $P88 $P10 = rx81_cur."before"($P88) unless $P10, rx81_fail @@ -1261,23 +1261,21 @@ set_addr $I10, alt85_2 rx81_cur."!mark_push"(0, rx81_pos, $I10) .annotate 'line', 47 - # rx rxquantr93 ** 0..* - set_addr $I10, rxquantr93_done - rx81_cur."!mark_push"(0, rx81_pos, $I10) - rxquantr93_loop: - # rx enumcharlist negate=0 - ge rx81_pos, rx81_eos, rx81_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx81_pos, rx81_off + set rx81_rep, 0 + sub $I12, rx81_eos, rx81_pos + rxenumcharlistq93_loop: + le $I12, 0, rxenumcharlistq93_done substr $S10, rx81_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, rx81_fail - inc rx81_pos - set_addr $I10, rxquantr93_done - (rx81_rep) = rx81_cur."!mark_commit"($I10) - set_addr $I10, rxquantr93_done - rx81_cur."!mark_push"(rx81_rep, rx81_pos, $I10) - goto rxquantr93_loop - rxquantr93_done: + lt $I11, 0, rxenumcharlistq93_done + inc rx81_rep + inc $I10 + dec $I12 + goto rxenumcharlistq93_loop + rxenumcharlistq93_done: + add rx81_pos, rx81_pos, rx81_rep # rx literal "#" add $I11, rx81_pos, 1 gt $I11, rx81_eos, rx81_fail @@ -1292,36 +1290,35 @@ goto alt85_end alt85_2: .annotate 'line', 48 - # rx rxquantr94 ** 1..* - set_addr $I10, rxquantr94_done - rx81_cur."!mark_push"(0, -1, $I10) - rxquantr94_loop: - # rx enumcharlist negate=0 - ge rx81_pos, rx81_eos, rx81_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx81_pos, rx81_off + set rx81_rep, 0 + sub $I12, rx81_eos, rx81_pos + rxenumcharlistq94_loop: + le $I12, 0, rxenumcharlistq94_done substr $S10, rx81_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, rx81_fail - inc rx81_pos - set_addr $I10, rxquantr94_done - (rx81_rep) = rx81_cur."!mark_commit"($I10) - set_addr $I10, rxquantr94_done - rx81_cur."!mark_push"(rx81_rep, rx81_pos, $I10) - goto rxquantr94_loop - rxquantr94_done: + lt $I11, 0, rxenumcharlistq94_done + inc rx81_rep + inc $I10 + dec $I12 + goto rxenumcharlistq94_loop + rxenumcharlistq94_done: + 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 - rx81_cur."!cursor_debug"("PASS ", "unv", " at pos=", rx81_pos) - debug_409: + if_null rx81_debug, debug_415 + rx81_cur."!cursor_debug"("PASS", "unv", " at pos=", rx81_pos) + debug_415: .return (rx81_cur) rx81_restart: .annotate 'line', 4 - if_null rx81_debug, debug_410 - rx81_cur."!cursor_debug"("NEXT ", "unv") - debug_410: + if_null rx81_debug, debug_416 + rx81_cur."!cursor_debug"("NEXT", "unv") + debug_416: rx81_fail: (rx81_rep, rx81_pos, $I10, $P10) = rx81_cur."!mark_fail"(0) lt rx81_pos, -1, rx81_done @@ -1329,16 +1326,16 @@ jump $I10 rx81_done: rx81_cur."!cursor_fail"() - if_null rx81_debug, debug_411 - rx81_cur."!cursor_debug"("FAIL ", "unv") - debug_411: + if_null rx81_debug, debug_417 + rx81_cur."!cursor_debug"("FAIL", "unv") + debug_417: .return (rx81_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__unv" :subid("24_1282016529.10767") :method +.sub "!PREFIX__unv" :subid("24_1284728478.15265") :method .annotate 'line', 4 new $P83, "ResizablePMCArray" push $P83, "" @@ -1349,7 +1346,7 @@ .namespace ["NQP";"Grammar"] -.sub "_block87" :anon :subid("25_1282016529.10767") :method :outer("23_1282016529.10767") +.sub "_block87" :anon :subid("25_1284728478.15265") :method :outer("23_1284728478.15265") .annotate 'line', 46 .local string rx89_tgt .local int rx89_pos @@ -1371,9 +1368,9 @@ substr rx89_tgt, rx89_tgt, rx89_off rx89_start: eq $I10, 1, rx89_restart - if_null rx89_debug, debug_405 - rx89_cur."!cursor_debug"("START ", "") - debug_405: + if_null rx89_debug, debug_411 + rx89_cur."!cursor_debug"("START", "") + debug_411: $I10 = self.'from'() ne $I10, -1, rxscan90_done goto rxscan90_scan @@ -1386,23 +1383,21 @@ set_addr $I10, rxscan90_loop rx89_cur."!mark_push"(0, rx89_pos, $I10) rxscan90_done: - # rx rxquantr91 ** 0..* - set_addr $I10, rxquantr91_done - rx89_cur."!mark_push"(0, rx89_pos, $I10) - rxquantr91_loop: - # rx enumcharlist negate=0 - ge rx89_pos, rx89_eos, rx89_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx89_pos, rx89_off + set rx89_rep, 0 + sub $I12, rx89_eos, rx89_pos + rxenumcharlistq91_loop: + le $I12, 0, rxenumcharlistq91_done substr $S10, rx89_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, rx89_fail - inc rx89_pos - set_addr $I10, rxquantr91_done - (rx89_rep) = rx89_cur."!mark_commit"($I10) - set_addr $I10, rxquantr91_done - rx89_cur."!mark_push"(rx89_rep, rx89_pos, $I10) - goto rxquantr91_loop - rxquantr91_done: + lt $I11, 0, rxenumcharlistq91_done + inc rx89_rep + inc $I10 + dec $I12 + goto rxenumcharlistq91_loop + rxenumcharlistq91_done: + add rx89_pos, rx89_pos, rx89_rep # rx literal "=" add $I11, rx89_pos, 1 gt $I11, rx89_eos, rx89_fail @@ -1431,14 +1426,14 @@ alt92_end: # rx pass rx89_cur."!cursor_pass"(rx89_pos, "") - if_null rx89_debug, debug_406 - rx89_cur."!cursor_debug"("PASS ", "", " at pos=", rx89_pos) - debug_406: + if_null rx89_debug, debug_412 + rx89_cur."!cursor_debug"("PASS", "", " at pos=", rx89_pos) + debug_412: .return (rx89_cur) rx89_restart: - if_null rx89_debug, debug_407 - rx89_cur."!cursor_debug"("NEXT ", "") - debug_407: + if_null rx89_debug, debug_413 + rx89_cur."!cursor_debug"("NEXT", "") + debug_413: rx89_fail: (rx89_rep, rx89_pos, $I10, $P10) = rx89_cur."!mark_fail"(0) lt rx89_pos, -1, rx89_done @@ -1446,18 +1441,18 @@ jump $I10 rx89_done: rx89_cur."!cursor_fail"() - if_null rx89_debug, debug_408 - rx89_cur."!cursor_debug"("FAIL ", "") - debug_408: + if_null rx89_debug, debug_414 + rx89_cur."!cursor_debug"("FAIL", "") + debug_414: .return (rx89_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "pod_comment" :subid("26_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "pod_comment" :subid("26_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P127 = "28_1282016529.10767" + .const 'Sub' $P127 = "28_1284728478.15265" capture_lex $P127 .local string rx96_tgt .local int rx96_pos @@ -1479,9 +1474,9 @@ substr rx96_tgt, rx96_tgt, rx96_off rx96_start: eq $I10, 1, rx96_restart - if_null rx96_debug, debug_412 - rx96_cur."!cursor_debug"("START ", "pod_comment") - debug_412: + if_null rx96_debug, debug_418 + rx96_cur."!cursor_debug"("START", "pod_comment") + debug_418: $I10 = self.'from'() ne $I10, -1, rxscan99_done goto rxscan99_scan @@ -1503,23 +1498,21 @@ is_cclass $I11, 4096, rx96_tgt, $I10 unless $I11, rx96_fail rxanchor100_done: - # rx rxquantr101 ** 0..* - set_addr $I10, rxquantr101_done - rx96_cur."!mark_push"(0, rx96_pos, $I10) - rxquantr101_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq101_loop: + le $I12, 0, rxenumcharlistq101_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr101_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr101_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr101_loop - rxquantr101_done: + lt $I11, 0, rxenumcharlistq101_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq101_loop + rxenumcharlistq101_done: + add rx96_pos, rx96_pos, rx96_rep # rx literal "=" add $I11, rx96_pos, 1 gt $I11, rx96_eos, rx96_fail @@ -1539,23 +1532,22 @@ substr $S10, rx96_tgt, $I11, 5 ne $S10, "begin", rx96_fail add rx96_pos, 5 - # rx rxquantr103 ** 1..* - set_addr $I10, rxquantr103_done - rx96_cur."!mark_push"(0, -1, $I10) - rxquantr103_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq103_loop: + le $I12, 0, rxenumcharlistq103_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr103_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr103_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr103_loop - rxquantr103_done: + lt $I11, 0, rxenumcharlistq103_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq103_loop + rxenumcharlistq103_done: + lt rx96_rep, 1, rx96_fail + add rx96_pos, rx96_pos, rx96_rep # rx literal "END" add $I11, rx96_pos, 3 gt $I11, rx96_eos, rx96_fail @@ -1595,23 +1587,21 @@ iseq $I11, $S10, "\r\n" add rx96_pos, $I11 inc rx96_pos - # rx rxquantr107 ** 0..* - set_addr $I10, rxquantr107_done - rx96_cur."!mark_push"(0, rx96_pos, $I10) - rxquantr107_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq107_loop: + le $I12, 0, rxenumcharlistq107_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr107_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr107_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr107_loop - rxquantr107_done: + lt $I11, 0, rxenumcharlistq107_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq107_loop + rxenumcharlistq107_done: + add rx96_pos, rx96_pos, rx96_rep # rx literal "=end" add $I11, rx96_pos, 4 gt $I11, rx96_eos, rx96_fail @@ -1619,23 +1609,22 @@ substr $S10, rx96_tgt, $I11, 4 ne $S10, "=end", rx96_fail add rx96_pos, 4 - # rx rxquantr108 ** 1..* - set_addr $I10, rxquantr108_done - rx96_cur."!mark_push"(0, -1, $I10) - rxquantr108_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq108_loop: + le $I12, 0, rxenumcharlistq108_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr108_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr108_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr108_loop - rxquantr108_done: + lt $I11, 0, rxenumcharlistq108_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq108_loop + rxenumcharlistq108_done: + lt rx96_rep, 1, rx96_fail + add rx96_pos, rx96_pos, rx96_rep # rx literal "END" add $I11, rx96_pos, 3 gt $I11, rx96_eos, rx96_fail @@ -1675,23 +1664,22 @@ substr $S10, rx96_tgt, $I11, 5 ne $S10, "begin", rx96_fail add rx96_pos, 5 - # rx rxquantr109 ** 1..* - set_addr $I10, rxquantr109_done - rx96_cur."!mark_push"(0, -1, $I10) - rxquantr109_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq109_loop: + le $I12, 0, rxenumcharlistq109_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr109_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr109_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr109_loop - rxquantr109_done: + lt $I11, 0, rxenumcharlistq109_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq109_loop + rxenumcharlistq109_done: + lt rx96_rep, 1, rx96_fail + add rx96_pos, rx96_pos, rx96_rep # rx subrule "identifier" subtype=capture negate= rx96_cur."!cursor_pos"(rx96_pos) $P10 = rx96_cur."identifier"() @@ -1724,23 +1712,21 @@ iseq $I11, $S10, "\r\n" add rx96_pos, $I11 inc rx96_pos - # rx rxquantr113 ** 0..* - set_addr $I10, rxquantr113_done - rx96_cur."!mark_push"(0, rx96_pos, $I10) - rxquantr113_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq113_loop: + le $I12, 0, rxenumcharlistq113_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr113_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr113_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr113_loop - rxquantr113_done: + lt $I11, 0, rxenumcharlistq113_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq113_loop + rxenumcharlistq113_done: + add rx96_pos, rx96_pos, rx96_rep # rx literal "=end" add $I11, rx96_pos, 4 gt $I11, rx96_eos, rx96_fail @@ -1748,23 +1734,22 @@ substr $S10, rx96_tgt, $I11, 4 ne $S10, "=end", rx96_fail add rx96_pos, 4 - # rx rxquantr114 ** 1..* - set_addr $I10, rxquantr114_done - rx96_cur."!mark_push"(0, -1, $I10) - rxquantr114_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 1..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq114_loop: + le $I12, 0, rxenumcharlistq114_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr114_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr114_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr114_loop - rxquantr114_done: + lt $I11, 0, rxenumcharlistq114_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq114_loop + rxenumcharlistq114_done: + lt rx96_rep, 1, rx96_fail + add rx96_pos, rx96_pos, rx96_rep # rx subrule "!BACKREF" subtype=method negate= rx96_cur."!cursor_pos"(rx96_pos) $P10 = rx96_cur."!BACKREF"("identifier") @@ -1812,23 +1797,21 @@ dec $I10 is_cclass $I11, 8192, rx96_tgt, $I10 unless $I11, rx96_fail - # rx rxquantr116 ** 0..* - set_addr $I10, rxquantr116_done - rx96_cur."!mark_push"(0, rx96_pos, $I10) - rxquantr116_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq116_loop: + le $I12, 0, rxenumcharlistq116_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr116_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr116_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr116_loop - rxquantr116_done: + lt $I11, 0, rxenumcharlistq116_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq116_loop + rxenumcharlistq116_done: + add rx96_pos, rx96_pos, rx96_rep alt117_0: .annotate 'line', 63 set_addr $I10, alt117_1 @@ -1887,23 +1870,21 @@ iseq $I11, $S10, "\r\n" add rx96_pos, $I11 inc rx96_pos - # rx rxquantr122 ** 0..* - set_addr $I10, rxquantr122_done - rx96_cur."!mark_push"(0, rx96_pos, $I10) - rxquantr122_loop: - # rx enumcharlist negate=0 - ge rx96_pos, rx96_eos, rx96_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx96_pos, rx96_off + set rx96_rep, 0 + sub $I12, rx96_eos, rx96_pos + rxenumcharlistq122_loop: + le $I12, 0, rxenumcharlistq122_done substr $S10, rx96_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, rx96_fail - inc rx96_pos - set_addr $I10, rxquantr122_done - (rx96_rep) = rx96_cur."!mark_commit"($I10) - set_addr $I10, rxquantr122_done - rx96_cur."!mark_push"(rx96_rep, rx96_pos, $I10) - goto rxquantr122_loop - rxquantr122_done: + lt $I11, 0, rxenumcharlistq122_done + inc rx96_rep + inc $I10 + dec $I12 + goto rxenumcharlistq122_loop + rxenumcharlistq122_done: + add rx96_pos, rx96_pos, rx96_rep # rx literal "=end" add $I11, rx96_pos, 4 gt $I11, rx96_eos, rx96_fail @@ -1967,7 +1948,7 @@ rxanchor125_done: # rx subrule "before" subtype=zerowidth negate= rx96_cur."!cursor_pos"(rx96_pos) - .const 'Sub' $P127 = "28_1282016529.10767" + .const 'Sub' $P127 = "28_1284728478.15265" capture_lex $P127 $P10 = rx96_cur."before"($P127) unless $P10, rx96_fail @@ -2001,15 +1982,15 @@ .annotate 'line', 52 # rx pass rx96_cur."!cursor_pass"(rx96_pos, "pod_comment") - if_null rx96_debug, debug_417 - rx96_cur."!cursor_debug"("PASS ", "pod_comment", " at pos=", rx96_pos) - debug_417: + if_null rx96_debug, debug_423 + rx96_cur."!cursor_debug"("PASS", "pod_comment", " at pos=", rx96_pos) + debug_423: .return (rx96_cur) rx96_restart: .annotate 'line', 4 - if_null rx96_debug, debug_418 - rx96_cur."!cursor_debug"("NEXT ", "pod_comment") - debug_418: + if_null rx96_debug, debug_424 + rx96_cur."!cursor_debug"("NEXT", "pod_comment") + debug_424: rx96_fail: (rx96_rep, rx96_pos, $I10, $P10) = rx96_cur."!mark_fail"(0) lt rx96_pos, -1, rx96_done @@ -2017,16 +1998,16 @@ jump $I10 rx96_done: rx96_cur."!cursor_fail"() - if_null rx96_debug, debug_419 - rx96_cur."!cursor_debug"("FAIL ", "pod_comment") - debug_419: + if_null rx96_debug, debug_425 + rx96_cur."!cursor_debug"("FAIL", "pod_comment") + debug_425: .return (rx96_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__pod_comment" :subid("27_1282016529.10767") :method +.sub "!PREFIX__pod_comment" :subid("27_1284728478.15265") :method .annotate 'line', 4 new $P98, "ResizablePMCArray" push $P98, "" @@ -2035,7 +2016,7 @@ .namespace ["NQP";"Grammar"] -.sub "_block126" :anon :subid("28_1282016529.10767") :method :outer("26_1282016529.10767") +.sub "_block126" :anon :subid("28_1284728478.15265") :method :outer("26_1284728478.15265") .annotate 'line', 69 .local string rx128_tgt .local int rx128_pos @@ -2057,9 +2038,9 @@ substr rx128_tgt, rx128_tgt, rx128_off rx128_start: eq $I10, 1, rx128_restart - if_null rx128_debug, debug_413 - rx128_cur."!cursor_debug"("START ", "") - debug_413: + if_null rx128_debug, debug_419 + rx128_cur."!cursor_debug"("START", "") + debug_419: $I10 = self.'from'() ne $I10, -1, rxscan129_done goto rxscan129_scan @@ -2072,23 +2053,21 @@ set_addr $I10, rxscan129_loop rx128_cur."!mark_push"(0, rx128_pos, $I10) rxscan129_done: - # rx rxquantr130 ** 0..* - set_addr $I10, rxquantr130_done - rx128_cur."!mark_push"(0, rx128_pos, $I10) - rxquantr130_loop: - # rx enumcharlist negate=0 - ge rx128_pos, rx128_eos, rx128_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx128_pos, rx128_off + set rx128_rep, 0 + sub $I12, rx128_eos, rx128_pos + rxenumcharlistq130_loop: + le $I12, 0, rxenumcharlistq130_done substr $S10, rx128_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, rx128_fail - inc rx128_pos - set_addr $I10, rxquantr130_done - (rx128_rep) = rx128_cur."!mark_commit"($I10) - set_addr $I10, rxquantr130_done - rx128_cur."!mark_push"(rx128_rep, rx128_pos, $I10) - goto rxquantr130_loop - rxquantr130_done: + lt $I11, 0, rxenumcharlistq130_done + inc rx128_rep + inc $I10 + dec $I12 + goto rxenumcharlistq130_loop + rxenumcharlistq130_done: + add rx128_pos, rx128_pos, rx128_rep alt131_0: set_addr $I10, alt131_1 rx128_cur."!mark_push"(0, rx128_pos, $I10) @@ -2147,14 +2126,14 @@ .annotate 'line', 69 # rx pass rx128_cur."!cursor_pass"(rx128_pos, "") - if_null rx128_debug, debug_414 - rx128_cur."!cursor_debug"("PASS ", "", " at pos=", rx128_pos) - debug_414: + if_null rx128_debug, debug_420 + rx128_cur."!cursor_debug"("PASS", "", " at pos=", rx128_pos) + debug_420: .return (rx128_cur) rx128_restart: - if_null rx128_debug, debug_415 - rx128_cur."!cursor_debug"("NEXT ", "") - debug_415: + if_null rx128_debug, debug_421 + rx128_cur."!cursor_debug"("NEXT", "") + debug_421: rx128_fail: (rx128_rep, rx128_pos, $I10, $P10) = rx128_cur."!mark_fail"(0) lt rx128_pos, -1, rx128_done @@ -2162,16 +2141,16 @@ jump $I10 rx128_done: rx128_cur."!cursor_fail"() - if_null rx128_debug, debug_416 - rx128_cur."!cursor_debug"("FAIL ", "") - debug_416: + if_null rx128_debug, debug_422 + rx128_cur."!cursor_debug"("FAIL", "") + debug_422: .return (rx128_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "comp_unit" :subid("29_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "comp_unit" :subid("29_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx135_tgt .local int rx135_pos @@ -2193,9 +2172,9 @@ substr rx135_tgt, rx135_tgt, rx135_off rx135_start: eq $I10, 1, rx135_restart - if_null rx135_debug, debug_420 - rx135_cur."!cursor_debug"("START ", "comp_unit") - debug_420: + if_null rx135_debug, debug_426 + rx135_cur."!cursor_debug"("START", "comp_unit") + debug_426: $I10 = self.'from'() ne $I10, -1, rxscan139_done goto rxscan139_scan @@ -2245,15 +2224,15 @@ .annotate 'line', 83 # rx pass rx135_cur."!cursor_pass"(rx135_pos, "comp_unit") - if_null rx135_debug, debug_421 - rx135_cur."!cursor_debug"("PASS ", "comp_unit", " at pos=", rx135_pos) - debug_421: + if_null rx135_debug, debug_427 + rx135_cur."!cursor_debug"("PASS", "comp_unit", " at pos=", rx135_pos) + debug_427: .return (rx135_cur) rx135_restart: .annotate 'line', 4 - if_null rx135_debug, debug_422 - rx135_cur."!cursor_debug"("NEXT ", "comp_unit") - debug_422: + if_null rx135_debug, debug_428 + rx135_cur."!cursor_debug"("NEXT", "comp_unit") + debug_428: rx135_fail: (rx135_rep, rx135_pos, $I10, $P10) = rx135_cur."!mark_fail"(0) lt rx135_pos, -1, rx135_done @@ -2261,16 +2240,16 @@ jump $I10 rx135_done: rx135_cur."!cursor_fail"() - if_null rx135_debug, debug_423 - rx135_cur."!cursor_debug"("FAIL ", "comp_unit") - debug_423: + if_null rx135_debug, debug_429 + rx135_cur."!cursor_debug"("FAIL", "comp_unit") + debug_429: .return (rx135_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__comp_unit" :subid("30_1282016529.10767") :method +.sub "!PREFIX__comp_unit" :subid("30_1284728478.15265") :method .annotate 'line', 4 $P137 = self."!PREFIX__!subrule"("newpad", "") new $P138, "ResizablePMCArray" @@ -2280,7 +2259,7 @@ .namespace ["NQP";"Grammar"] -.sub "statementlist" :subid("31_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statementlist" :subid("31_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx142_tgt .local int rx142_pos @@ -2303,9 +2282,9 @@ substr rx142_tgt, rx142_tgt, rx142_off rx142_start: eq $I10, 1, rx142_restart - if_null rx142_debug, debug_424 - rx142_cur."!cursor_debug"("START ", "statementlist") - debug_424: + if_null rx142_debug, debug_430 + rx142_cur."!cursor_debug"("START", "statementlist") + debug_430: $I10 = self.'from'() ne $I10, -1, rxscan147_done goto rxscan147_scan @@ -2379,15 +2358,15 @@ .annotate 'line', 90 # rx pass rx142_cur."!cursor_pass"(rx142_pos, "statementlist") - if_null rx142_debug, debug_425 - rx142_cur."!cursor_debug"("PASS ", "statementlist", " at pos=", rx142_pos) - debug_425: + if_null rx142_debug, debug_431 + rx142_cur."!cursor_debug"("PASS", "statementlist", " at pos=", rx142_pos) + debug_431: .return (rx142_cur) rx142_restart: .annotate 'line', 4 - if_null rx142_debug, debug_426 - rx142_cur."!cursor_debug"("NEXT ", "statementlist") - debug_426: + if_null rx142_debug, debug_432 + rx142_cur."!cursor_debug"("NEXT", "statementlist") + debug_432: rx142_fail: (rx142_rep, rx142_pos, $I10, $P10) = rx142_cur."!mark_fail"(0) lt rx142_pos, -1, rx142_done @@ -2395,16 +2374,16 @@ jump $I10 rx142_done: rx142_cur."!cursor_fail"() - if_null rx142_debug, debug_427 - rx142_cur."!cursor_debug"("FAIL ", "statementlist") - debug_427: + if_null rx142_debug, debug_433 + rx142_cur."!cursor_debug"("FAIL", "statementlist") + debug_433: .return (rx142_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statementlist" :subid("32_1282016529.10767") :method +.sub "!PREFIX__statementlist" :subid("32_1284728478.15265") :method .annotate 'line', 4 $P144 = self."!PREFIX__!subrule"("ws", "") $P145 = self."!PREFIX__!subrule"("ws", "") @@ -2416,9 +2395,9 @@ .namespace ["NQP";"Grammar"] -.sub "statement" :subid("33_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement" :subid("33_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P161 = "35_1282016529.10767" + .const 'Sub' $P161 = "35_1284728478.15265" capture_lex $P161 .local string rx156_tgt .local int rx156_pos @@ -2428,7 +2407,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_cond", "statement_mod_loop") + rx156_cur."!cursor_caparray"("statement_mod_loop", "statement_mod_cond") getattribute rx156_debug, rx156_cur, "$!debug" .lex unicode:"$\x{a2}", rx156_cur .local pmc match @@ -2441,9 +2420,9 @@ substr rx156_tgt, rx156_tgt, rx156_off rx156_start: eq $I10, 1, rx156_restart - if_null rx156_debug, debug_428 - rx156_cur."!cursor_debug"("START ", "statement") - debug_428: + if_null rx156_debug, debug_434 + rx156_cur."!cursor_debug"("START", "statement") + debug_434: $I10 = self.'from'() ne $I10, -1, rxscan159_done goto rxscan159_scan @@ -2459,7 +2438,7 @@ .annotate 'line', 96 # rx subrule "before" subtype=zerowidth negate=1 rx156_cur."!cursor_pos"(rx156_pos) - .const 'Sub' $P161 = "35_1282016529.10767" + .const 'Sub' $P161 = "35_1284728478.15265" capture_lex $P161 $P10 = rx156_cur."before"($P161) if $P10, rx156_fail @@ -2555,15 +2534,15 @@ .annotate 'line', 95 # rx pass rx156_cur."!cursor_pass"(rx156_pos, "statement") - if_null rx156_debug, debug_433 - rx156_cur."!cursor_debug"("PASS ", "statement", " at pos=", rx156_pos) - debug_433: + if_null rx156_debug, debug_439 + rx156_cur."!cursor_debug"("PASS", "statement", " at pos=", rx156_pos) + debug_439: .return (rx156_cur) rx156_restart: .annotate 'line', 4 - if_null rx156_debug, debug_434 - rx156_cur."!cursor_debug"("NEXT ", "statement") - debug_434: + if_null rx156_debug, debug_440 + rx156_cur."!cursor_debug"("NEXT", "statement") + debug_440: rx156_fail: (rx156_rep, rx156_pos, $I10, $P10) = rx156_cur."!mark_fail"(0) lt rx156_pos, -1, rx156_done @@ -2571,16 +2550,16 @@ jump $I10 rx156_done: rx156_cur."!cursor_fail"() - if_null rx156_debug, debug_435 - rx156_cur."!cursor_debug"("FAIL ", "statement") - debug_435: + if_null rx156_debug, debug_441 + rx156_cur."!cursor_debug"("FAIL", "statement") + debug_441: .return (rx156_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement" :subid("34_1282016529.10767") :method +.sub "!PREFIX__statement" :subid("34_1284728478.15265") :method .annotate 'line', 4 new $P158, "ResizablePMCArray" push $P158, "" @@ -2589,7 +2568,7 @@ .namespace ["NQP";"Grammar"] -.sub "_block160" :anon :subid("35_1282016529.10767") :method :outer("33_1282016529.10767") +.sub "_block160" :anon :subid("35_1284728478.15265") :method :outer("33_1284728478.15265") .annotate 'line', 96 .local string rx162_tgt .local int rx162_pos @@ -2611,9 +2590,9 @@ substr rx162_tgt, rx162_tgt, rx162_off rx162_start: eq $I10, 1, rx162_restart - if_null rx162_debug, debug_429 - rx162_cur."!cursor_debug"("START ", "") - debug_429: + if_null rx162_debug, debug_435 + rx162_cur."!cursor_debug"("START", "") + debug_435: $I10 = self.'from'() ne $I10, -1, rxscan163_done goto rxscan163_scan @@ -2643,14 +2622,14 @@ alt164_end: # rx pass rx162_cur."!cursor_pass"(rx162_pos, "") - if_null rx162_debug, debug_430 - rx162_cur."!cursor_debug"("PASS ", "", " at pos=", rx162_pos) - debug_430: + if_null rx162_debug, debug_436 + rx162_cur."!cursor_debug"("PASS", "", " at pos=", rx162_pos) + debug_436: .return (rx162_cur) rx162_restart: - if_null rx162_debug, debug_431 - rx162_cur."!cursor_debug"("NEXT ", "") - debug_431: + if_null rx162_debug, debug_437 + rx162_cur."!cursor_debug"("NEXT", "") + debug_437: rx162_fail: (rx162_rep, rx162_pos, $I10, $P10) = rx162_cur."!mark_fail"(0) lt rx162_pos, -1, rx162_done @@ -2658,16 +2637,16 @@ jump $I10 rx162_done: rx162_cur."!cursor_fail"() - if_null rx162_debug, debug_432 - rx162_cur."!cursor_debug"("FAIL ", "") - debug_432: + if_null rx162_debug, debug_438 + rx162_cur."!cursor_debug"("FAIL", "") + debug_438: .return (rx162_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "eat_terminator" :subid("36_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "eat_terminator" :subid("36_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx171_tgt .local int rx171_pos @@ -2689,9 +2668,9 @@ substr rx171_tgt, rx171_tgt, rx171_off rx171_start: eq $I10, 1, rx171_restart - if_null rx171_debug, debug_436 - rx171_cur."!cursor_debug"("START ", "eat_terminator") - debug_436: + if_null rx171_debug, debug_442 + rx171_cur."!cursor_debug"("START", "eat_terminator") + debug_442: $I10 = self.'from'() ne $I10, -1, rxscan174_done goto rxscan174_scan @@ -2743,15 +2722,15 @@ .annotate 'line', 108 # rx pass rx171_cur."!cursor_pass"(rx171_pos, "eat_terminator") - if_null rx171_debug, debug_437 - rx171_cur."!cursor_debug"("PASS ", "eat_terminator", " at pos=", rx171_pos) - debug_437: + if_null rx171_debug, debug_443 + rx171_cur."!cursor_debug"("PASS", "eat_terminator", " at pos=", rx171_pos) + debug_443: .return (rx171_cur) rx171_restart: .annotate 'line', 4 - if_null rx171_debug, debug_438 - rx171_cur."!cursor_debug"("NEXT ", "eat_terminator") - debug_438: + if_null rx171_debug, debug_444 + rx171_cur."!cursor_debug"("NEXT", "eat_terminator") + debug_444: rx171_fail: (rx171_rep, rx171_pos, $I10, $P10) = rx171_cur."!mark_fail"(0) lt rx171_pos, -1, rx171_done @@ -2759,16 +2738,16 @@ jump $I10 rx171_done: rx171_cur."!cursor_fail"() - if_null rx171_debug, debug_439 - rx171_cur."!cursor_debug"("FAIL ", "eat_terminator") - debug_439: + if_null rx171_debug, debug_445 + rx171_cur."!cursor_debug"("FAIL", "eat_terminator") + debug_445: .return (rx171_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__eat_terminator" :subid("37_1282016529.10767") :method +.sub "!PREFIX__eat_terminator" :subid("37_1284728478.15265") :method .annotate 'line', 4 new $P173, "ResizablePMCArray" push $P173, "" @@ -2780,7 +2759,7 @@ .namespace ["NQP";"Grammar"] -.sub "xblock" :subid("38_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "xblock" :subid("38_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx177_tgt .local int rx177_pos @@ -2802,9 +2781,9 @@ substr rx177_tgt, rx177_tgt, rx177_off rx177_start: eq $I10, 1, rx177_restart - if_null rx177_debug, debug_440 - rx177_cur."!cursor_debug"("START ", "xblock") - debug_440: + if_null rx177_debug, debug_446 + rx177_cur."!cursor_debug"("START", "xblock") + debug_446: $I10 = self.'from'() ne $I10, -1, rxscan181_done goto rxscan181_scan @@ -2840,15 +2819,15 @@ .annotate 'line', 115 # rx pass rx177_cur."!cursor_pass"(rx177_pos, "xblock") - if_null rx177_debug, debug_441 - rx177_cur."!cursor_debug"("PASS ", "xblock", " at pos=", rx177_pos) - debug_441: + if_null rx177_debug, debug_447 + rx177_cur."!cursor_debug"("PASS", "xblock", " at pos=", rx177_pos) + debug_447: .return (rx177_cur) rx177_restart: .annotate 'line', 4 - if_null rx177_debug, debug_442 - rx177_cur."!cursor_debug"("NEXT ", "xblock") - debug_442: + if_null rx177_debug, debug_448 + rx177_cur."!cursor_debug"("NEXT", "xblock") + debug_448: rx177_fail: (rx177_rep, rx177_pos, $I10, $P10) = rx177_cur."!mark_fail"(0) lt rx177_pos, -1, rx177_done @@ -2856,16 +2835,16 @@ jump $I10 rx177_done: rx177_cur."!cursor_fail"() - if_null rx177_debug, debug_443 - rx177_cur."!cursor_debug"("FAIL ", "xblock") - debug_443: + if_null rx177_debug, debug_449 + rx177_cur."!cursor_debug"("FAIL", "xblock") + debug_449: .return (rx177_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__xblock" :subid("39_1282016529.10767") :method +.sub "!PREFIX__xblock" :subid("39_1284728478.15265") :method .annotate 'line', 4 $P179 = self."!PREFIX__!subrule"("EXPR", "") new $P180, "ResizablePMCArray" @@ -2875,7 +2854,7 @@ .namespace ["NQP";"Grammar"] -.sub "pblock" :subid("40_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "pblock" :subid("40_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx183_tgt .local int rx183_pos @@ -2897,9 +2876,9 @@ substr rx183_tgt, rx183_tgt, rx183_off rx183_start: eq $I10, 1, rx183_restart - if_null rx183_debug, debug_444 - rx183_cur."!cursor_debug"("START ", "pblock") - debug_444: + if_null rx183_debug, debug_450 + rx183_cur."!cursor_debug"("START", "pblock") + debug_450: $I10 = self.'from'() ne $I10, -1, rxscan188_done goto rxscan188_scan @@ -2951,7 +2930,6 @@ 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 @@ -2983,15 +2961,15 @@ .annotate 'line', 119 # rx pass rx183_cur."!cursor_pass"(rx183_pos, "pblock") - if_null rx183_debug, debug_445 - rx183_cur."!cursor_debug"("PASS ", "pblock", " at pos=", rx183_pos) - debug_445: + if_null rx183_debug, debug_451 + rx183_cur."!cursor_debug"("PASS", "pblock", " at pos=", rx183_pos) + debug_451: .return (rx183_cur) rx183_restart: .annotate 'line', 4 - if_null rx183_debug, debug_446 - rx183_cur."!cursor_debug"("NEXT ", "pblock") - debug_446: + if_null rx183_debug, debug_452 + rx183_cur."!cursor_debug"("NEXT", "pblock") + debug_452: rx183_fail: (rx183_rep, rx183_pos, $I10, $P10) = rx183_cur."!mark_fail"(0) lt rx183_pos, -1, rx183_done @@ -2999,16 +2977,16 @@ jump $I10 rx183_done: rx183_cur."!cursor_fail"() - if_null rx183_debug, debug_447 - rx183_cur."!cursor_debug"("FAIL ", "pblock") - debug_447: + if_null rx183_debug, debug_453 + rx183_cur."!cursor_debug"("FAIL", "pblock") + debug_453: .return (rx183_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__pblock" :subid("41_1282016529.10767") :method +.sub "!PREFIX__pblock" :subid("41_1284728478.15265") :method .annotate 'line', 4 $P185 = self."!PREFIX__!subrule"("panic", "") $P186 = self."!PREFIX__!subrule"("lambda", "") @@ -3021,7 +2999,7 @@ .namespace ["NQP";"Grammar"] -.sub "lambda" :subid("42_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "lambda" :subid("42_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx191_tgt .local int rx191_pos @@ -3043,9 +3021,9 @@ substr rx191_tgt, rx191_tgt, rx191_off rx191_start: eq $I10, 1, rx191_restart - if_null rx191_debug, debug_448 - rx191_cur."!cursor_debug"("START ", "lambda") - debug_448: + if_null rx191_debug, debug_454 + rx191_cur."!cursor_debug"("START", "lambda") + debug_454: $I10 = self.'from'() ne $I10, -1, rxscan194_done goto rxscan194_scan @@ -3081,15 +3059,15 @@ alt195_end: # rx pass rx191_cur."!cursor_pass"(rx191_pos, "lambda") - if_null rx191_debug, debug_449 - rx191_cur."!cursor_debug"("PASS ", "lambda", " at pos=", rx191_pos) - debug_449: + if_null rx191_debug, debug_455 + rx191_cur."!cursor_debug"("PASS", "lambda", " at pos=", rx191_pos) + debug_455: .return (rx191_cur) rx191_restart: .annotate 'line', 4 - if_null rx191_debug, debug_450 - rx191_cur."!cursor_debug"("NEXT ", "lambda") - debug_450: + if_null rx191_debug, debug_456 + rx191_cur."!cursor_debug"("NEXT", "lambda") + debug_456: rx191_fail: (rx191_rep, rx191_pos, $I10, $P10) = rx191_cur."!mark_fail"(0) lt rx191_pos, -1, rx191_done @@ -3097,16 +3075,16 @@ jump $I10 rx191_done: rx191_cur."!cursor_fail"() - if_null rx191_debug, debug_451 - rx191_cur."!cursor_debug"("FAIL ", "lambda") - debug_451: + if_null rx191_debug, debug_457 + rx191_cur."!cursor_debug"("FAIL", "lambda") + debug_457: .return (rx191_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__lambda" :subid("43_1282016529.10767") :method +.sub "!PREFIX__lambda" :subid("43_1284728478.15265") :method .annotate 'line', 4 new $P193, "ResizablePMCArray" push $P193, "<->" @@ -3116,7 +3094,7 @@ .namespace ["NQP";"Grammar"] -.sub "block" :subid("44_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "block" :subid("44_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx197_tgt .local int rx197_pos @@ -3138,9 +3116,9 @@ substr rx197_tgt, rx197_tgt, rx197_off rx197_start: eq $I10, 1, rx197_restart - if_null rx197_debug, debug_452 - rx197_cur."!cursor_debug"("START ", "block") - debug_452: + if_null rx197_debug, debug_458 + rx197_cur."!cursor_debug"("START", "block") + debug_458: $I10 = self.'from'() ne $I10, -1, rxscan201_done goto rxscan201_scan @@ -3158,7 +3136,6 @@ set_addr $I10, alt202_1 rx197_cur."!mark_push"(0, rx197_pos, $I10) # rx enumcharlist negate=0 zerowidth - ge rx197_pos, rx197_eos, rx197_fail sub $I10, rx197_pos, rx197_off substr $S10, rx197_tgt, $I10, 1 index $I11, "{", $S10 @@ -3188,15 +3165,15 @@ .annotate 'line', 132 # rx pass rx197_cur."!cursor_pass"(rx197_pos, "block") - if_null rx197_debug, debug_453 - rx197_cur."!cursor_debug"("PASS ", "block", " at pos=", rx197_pos) - debug_453: + if_null rx197_debug, debug_459 + rx197_cur."!cursor_debug"("PASS", "block", " at pos=", rx197_pos) + debug_459: .return (rx197_cur) rx197_restart: .annotate 'line', 4 - if_null rx197_debug, debug_454 - rx197_cur."!cursor_debug"("NEXT ", "block") - debug_454: + if_null rx197_debug, debug_460 + rx197_cur."!cursor_debug"("NEXT", "block") + debug_460: rx197_fail: (rx197_rep, rx197_pos, $I10, $P10) = rx197_cur."!mark_fail"(0) lt rx197_pos, -1, rx197_done @@ -3204,16 +3181,16 @@ jump $I10 rx197_done: rx197_cur."!cursor_fail"() - if_null rx197_debug, debug_455 - rx197_cur."!cursor_debug"("FAIL ", "block") - debug_455: + if_null rx197_debug, debug_461 + rx197_cur."!cursor_debug"("FAIL", "block") + debug_461: .return (rx197_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__block" :subid("45_1282016529.10767") :method +.sub "!PREFIX__block" :subid("45_1284728478.15265") :method .annotate 'line', 4 $P199 = self."!PREFIX__!subrule"("panic", "") new $P200, "ResizablePMCArray" @@ -3224,7 +3201,7 @@ .namespace ["NQP";"Grammar"] -.sub "blockoid" :subid("46_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "blockoid" :subid("46_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx204_tgt .local int rx204_pos @@ -3246,9 +3223,9 @@ substr rx204_tgt, rx204_tgt, rx204_off rx204_start: eq $I10, 1, rx204_restart - if_null rx204_debug, debug_456 - rx204_cur."!cursor_debug"("START ", "blockoid") - debug_456: + if_null rx204_debug, debug_462 + rx204_cur."!cursor_debug"("START", "blockoid") + debug_462: $I10 = self.'from'() ne $I10, -1, rxscan208_done goto rxscan208_scan @@ -3315,15 +3292,15 @@ .annotate 'line', 138 # rx pass rx204_cur."!cursor_pass"(rx204_pos, "blockoid") - if_null rx204_debug, debug_457 - rx204_cur."!cursor_debug"("PASS ", "blockoid", " at pos=", rx204_pos) - debug_457: + if_null rx204_debug, debug_463 + rx204_cur."!cursor_debug"("PASS", "blockoid", " at pos=", rx204_pos) + debug_463: .return (rx204_cur) rx204_restart: .annotate 'line', 4 - if_null rx204_debug, debug_458 - rx204_cur."!cursor_debug"("NEXT ", "blockoid") - debug_458: + if_null rx204_debug, debug_464 + rx204_cur."!cursor_debug"("NEXT", "blockoid") + debug_464: rx204_fail: (rx204_rep, rx204_pos, $I10, $P10) = rx204_cur."!mark_fail"(0) lt rx204_pos, -1, rx204_done @@ -3331,16 +3308,16 @@ jump $I10 rx204_done: rx204_cur."!cursor_fail"() - if_null rx204_debug, debug_459 - rx204_cur."!cursor_debug"("FAIL ", "blockoid") - debug_459: + if_null rx204_debug, debug_465 + rx204_cur."!cursor_debug"("FAIL", "blockoid") + debug_465: .return (rx204_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__blockoid" :subid("47_1282016529.10767") :method +.sub "!PREFIX__blockoid" :subid("47_1284728478.15265") :method .annotate 'line', 4 $P206 = self."!PREFIX__!subrule"("finishpad", "") new $P207, "ResizablePMCArray" @@ -3350,7 +3327,7 @@ .namespace ["NQP";"Grammar"] -.sub "newpad" :subid("48_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "newpad" :subid("48_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx213_tgt .local int rx213_pos @@ -3372,9 +3349,9 @@ substr rx213_tgt, rx213_tgt, rx213_off rx213_start: eq $I10, 1, rx213_restart - if_null rx213_debug, debug_460 - rx213_cur."!cursor_debug"("START ", "newpad") - debug_460: + if_null rx213_debug, debug_466 + rx213_cur."!cursor_debug"("START", "newpad") + debug_466: $I10 = self.'from'() ne $I10, -1, rxscan216_done goto rxscan216_scan @@ -3390,15 +3367,15 @@ .annotate 'line', 144 # rx pass rx213_cur."!cursor_pass"(rx213_pos, "newpad") - if_null rx213_debug, debug_461 - rx213_cur."!cursor_debug"("PASS ", "newpad", " at pos=", rx213_pos) - debug_461: + if_null rx213_debug, debug_467 + rx213_cur."!cursor_debug"("PASS", "newpad", " at pos=", rx213_pos) + debug_467: .return (rx213_cur) rx213_restart: .annotate 'line', 4 - if_null rx213_debug, debug_462 - rx213_cur."!cursor_debug"("NEXT ", "newpad") - debug_462: + if_null rx213_debug, debug_468 + rx213_cur."!cursor_debug"("NEXT", "newpad") + debug_468: rx213_fail: (rx213_rep, rx213_pos, $I10, $P10) = rx213_cur."!mark_fail"(0) lt rx213_pos, -1, rx213_done @@ -3406,16 +3383,16 @@ jump $I10 rx213_done: rx213_cur."!cursor_fail"() - if_null rx213_debug, debug_463 - rx213_cur."!cursor_debug"("FAIL ", "newpad") - debug_463: + if_null rx213_debug, debug_469 + rx213_cur."!cursor_debug"("FAIL", "newpad") + debug_469: .return (rx213_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__newpad" :subid("49_1282016529.10767") :method +.sub "!PREFIX__newpad" :subid("49_1284728478.15265") :method .annotate 'line', 4 new $P215, "ResizablePMCArray" push $P215, "" @@ -3424,7 +3401,7 @@ .namespace ["NQP";"Grammar"] -.sub "outerctx" :subid("50_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "outerctx" :subid("50_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx218_tgt .local int rx218_pos @@ -3446,9 +3423,9 @@ substr rx218_tgt, rx218_tgt, rx218_off rx218_start: eq $I10, 1, rx218_restart - if_null rx218_debug, debug_464 - rx218_cur."!cursor_debug"("START ", "outerctx") - debug_464: + if_null rx218_debug, debug_470 + rx218_cur."!cursor_debug"("START", "outerctx") + debug_470: $I10 = self.'from'() ne $I10, -1, rxscan221_done goto rxscan221_scan @@ -3464,15 +3441,15 @@ .annotate 'line', 145 # rx pass rx218_cur."!cursor_pass"(rx218_pos, "outerctx") - if_null rx218_debug, debug_465 - rx218_cur."!cursor_debug"("PASS ", "outerctx", " at pos=", rx218_pos) - debug_465: + if_null rx218_debug, debug_471 + rx218_cur."!cursor_debug"("PASS", "outerctx", " at pos=", rx218_pos) + debug_471: .return (rx218_cur) rx218_restart: .annotate 'line', 4 - if_null rx218_debug, debug_466 - rx218_cur."!cursor_debug"("NEXT ", "outerctx") - debug_466: + if_null rx218_debug, debug_472 + rx218_cur."!cursor_debug"("NEXT", "outerctx") + debug_472: rx218_fail: (rx218_rep, rx218_pos, $I10, $P10) = rx218_cur."!mark_fail"(0) lt rx218_pos, -1, rx218_done @@ -3480,16 +3457,16 @@ jump $I10 rx218_done: rx218_cur."!cursor_fail"() - if_null rx218_debug, debug_467 - rx218_cur."!cursor_debug"("FAIL ", "outerctx") - debug_467: + if_null rx218_debug, debug_473 + rx218_cur."!cursor_debug"("FAIL", "outerctx") + debug_473: .return (rx218_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__outerctx" :subid("51_1282016529.10767") :method +.sub "!PREFIX__outerctx" :subid("51_1284728478.15265") :method .annotate 'line', 4 new $P220, "ResizablePMCArray" push $P220, "" @@ -3498,7 +3475,7 @@ .namespace ["NQP";"Grammar"] -.sub "finishpad" :subid("52_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "finishpad" :subid("52_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx223_tgt .local int rx223_pos @@ -3520,9 +3497,9 @@ substr rx223_tgt, rx223_tgt, rx223_off rx223_start: eq $I10, 1, rx223_restart - if_null rx223_debug, debug_468 - rx223_cur."!cursor_debug"("START ", "finishpad") - debug_468: + if_null rx223_debug, debug_474 + rx223_cur."!cursor_debug"("START", "finishpad") + debug_474: $I10 = self.'from'() ne $I10, -1, rxscan226_done goto rxscan226_scan @@ -3538,15 +3515,15 @@ .annotate 'line', 146 # rx pass rx223_cur."!cursor_pass"(rx223_pos, "finishpad") - if_null rx223_debug, debug_469 - rx223_cur."!cursor_debug"("PASS ", "finishpad", " at pos=", rx223_pos) - debug_469: + if_null rx223_debug, debug_475 + rx223_cur."!cursor_debug"("PASS", "finishpad", " at pos=", rx223_pos) + debug_475: .return (rx223_cur) rx223_restart: .annotate 'line', 4 - if_null rx223_debug, debug_470 - rx223_cur."!cursor_debug"("NEXT ", "finishpad") - debug_470: + if_null rx223_debug, debug_476 + rx223_cur."!cursor_debug"("NEXT", "finishpad") + debug_476: rx223_fail: (rx223_rep, rx223_pos, $I10, $P10) = rx223_cur."!mark_fail"(0) lt rx223_pos, -1, rx223_done @@ -3554,16 +3531,16 @@ jump $I10 rx223_done: rx223_cur."!cursor_fail"() - if_null rx223_debug, debug_471 - rx223_cur."!cursor_debug"("FAIL ", "finishpad") - debug_471: + if_null rx223_debug, debug_477 + rx223_cur."!cursor_debug"("FAIL", "finishpad") + debug_477: .return (rx223_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__finishpad" :subid("53_1282016529.10767") :method +.sub "!PREFIX__finishpad" :subid("53_1284728478.15265") :method .annotate 'line', 4 new $P225, "ResizablePMCArray" push $P225, "" @@ -3572,7 +3549,7 @@ .namespace ["NQP";"Grammar"] -.sub "terminator" :subid("54_1282016529.10767") :method +.sub "terminator" :subid("54_1284728478.15265") :method .annotate 'line', 148 $P228 = self."!protoregex"("terminator") .return ($P228) @@ -3580,7 +3557,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__terminator" :subid("55_1282016529.10767") :method +.sub "!PREFIX__terminator" :subid("55_1284728478.15265") :method .annotate 'line', 148 $P230 = self."!PREFIX__!protoregex"("terminator") .return ($P230) @@ -3588,7 +3565,7 @@ .namespace ["NQP";"Grammar"] -.sub "terminator:sym<;>" :subid("56_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "terminator:sym<;>" :subid("56_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx232_tgt .local int rx232_pos @@ -3610,9 +3587,9 @@ substr rx232_tgt, rx232_tgt, rx232_off rx232_start: eq $I10, 1, rx232_restart - if_null rx232_debug, debug_472 - rx232_cur."!cursor_debug"("START ", "terminator:sym<;>") - debug_472: + if_null rx232_debug, debug_478 + rx232_cur."!cursor_debug"("START", "terminator:sym<;>") + debug_478: $I10 = self.'from'() ne $I10, -1, rxscan235_done goto rxscan235_scan @@ -3627,22 +3604,21 @@ rxscan235_done: .annotate 'line', 150 # rx enumcharlist negate=0 zerowidth - ge rx232_pos, rx232_eos, rx232_fail sub $I10, rx232_pos, rx232_off substr $S10, rx232_tgt, $I10, 1 index $I11, ";", $S10 lt $I11, 0, rx232_fail # rx pass rx232_cur."!cursor_pass"(rx232_pos, "terminator:sym<;>") - if_null rx232_debug, debug_473 - rx232_cur."!cursor_debug"("PASS ", "terminator:sym<;>", " at pos=", rx232_pos) - debug_473: + if_null rx232_debug, debug_479 + rx232_cur."!cursor_debug"("PASS", "terminator:sym<;>", " at pos=", rx232_pos) + debug_479: .return (rx232_cur) rx232_restart: .annotate 'line', 4 - if_null rx232_debug, debug_474 - rx232_cur."!cursor_debug"("NEXT ", "terminator:sym<;>") - debug_474: + if_null rx232_debug, debug_480 + rx232_cur."!cursor_debug"("NEXT", "terminator:sym<;>") + debug_480: rx232_fail: (rx232_rep, rx232_pos, $I10, $P10) = rx232_cur."!mark_fail"(0) lt rx232_pos, -1, rx232_done @@ -3650,16 +3626,16 @@ jump $I10 rx232_done: rx232_cur."!cursor_fail"() - if_null rx232_debug, debug_475 - rx232_cur."!cursor_debug"("FAIL ", "terminator:sym<;>") - debug_475: + if_null rx232_debug, debug_481 + rx232_cur."!cursor_debug"("FAIL", "terminator:sym<;>") + debug_481: .return (rx232_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__terminator:sym<;>" :subid("57_1282016529.10767") :method +.sub "!PREFIX__terminator:sym<;>" :subid("57_1284728478.15265") :method .annotate 'line', 4 new $P234, "ResizablePMCArray" push $P234, ";" @@ -3668,7 +3644,7 @@ .namespace ["NQP";"Grammar"] -.sub "terminator:sym<}>" :subid("58_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "terminator:sym<}>" :subid("58_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx237_tgt .local int rx237_pos @@ -3690,9 +3666,9 @@ substr rx237_tgt, rx237_tgt, rx237_off rx237_start: eq $I10, 1, rx237_restart - if_null rx237_debug, debug_476 - rx237_cur."!cursor_debug"("START ", "terminator:sym<}>") - debug_476: + if_null rx237_debug, debug_482 + rx237_cur."!cursor_debug"("START", "terminator:sym<}>") + debug_482: $I10 = self.'from'() ne $I10, -1, rxscan240_done goto rxscan240_scan @@ -3707,22 +3683,21 @@ rxscan240_done: .annotate 'line', 151 # rx enumcharlist negate=0 zerowidth - ge rx237_pos, rx237_eos, rx237_fail sub $I10, rx237_pos, rx237_off substr $S10, rx237_tgt, $I10, 1 index $I11, "}", $S10 lt $I11, 0, rx237_fail # rx pass rx237_cur."!cursor_pass"(rx237_pos, "terminator:sym<}>") - if_null rx237_debug, debug_477 - rx237_cur."!cursor_debug"("PASS ", "terminator:sym<}>", " at pos=", rx237_pos) - debug_477: + if_null rx237_debug, debug_483 + rx237_cur."!cursor_debug"("PASS", "terminator:sym<}>", " at pos=", rx237_pos) + debug_483: .return (rx237_cur) rx237_restart: .annotate 'line', 4 - if_null rx237_debug, debug_478 - rx237_cur."!cursor_debug"("NEXT ", "terminator:sym<}>") - debug_478: + if_null rx237_debug, debug_484 + rx237_cur."!cursor_debug"("NEXT", "terminator:sym<}>") + debug_484: rx237_fail: (rx237_rep, rx237_pos, $I10, $P10) = rx237_cur."!mark_fail"(0) lt rx237_pos, -1, rx237_done @@ -3730,16 +3705,16 @@ jump $I10 rx237_done: rx237_cur."!cursor_fail"() - if_null rx237_debug, debug_479 - rx237_cur."!cursor_debug"("FAIL ", "terminator:sym<}>") - debug_479: + if_null rx237_debug, debug_485 + rx237_cur."!cursor_debug"("FAIL", "terminator:sym<}>") + debug_485: .return (rx237_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__terminator:sym<}>" :subid("59_1282016529.10767") :method +.sub "!PREFIX__terminator:sym<}>" :subid("59_1284728478.15265") :method .annotate 'line', 4 new $P239, "ResizablePMCArray" push $P239, "}" @@ -3748,7 +3723,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control" :subid("60_1282016529.10767") :method +.sub "statement_control" :subid("60_1284728478.15265") :method .annotate 'line', 155 $P242 = self."!protoregex"("statement_control") .return ($P242) @@ -3756,7 +3731,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control" :subid("61_1282016529.10767") :method +.sub "!PREFIX__statement_control" :subid("61_1284728478.15265") :method .annotate 'line', 155 $P244 = self."!PREFIX__!protoregex"("statement_control") .return ($P244) @@ -3764,7 +3739,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("62_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("62_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx246_tgt .local int rx246_pos @@ -3787,9 +3762,9 @@ substr rx246_tgt, rx246_tgt, rx246_off rx246_start: eq $I10, 1, rx246_restart - if_null rx246_debug, debug_480 - rx246_cur."!cursor_debug"("START ", "statement_control:sym") - debug_480: + if_null rx246_debug, debug_486 + rx246_cur."!cursor_debug"("START", "statement_control:sym") + debug_486: $I10 = self.'from'() ne $I10, -1, rxscan249_done goto rxscan249_scan @@ -3950,15 +3925,15 @@ .annotate 'line', 157 # rx pass rx246_cur."!cursor_pass"(rx246_pos, "statement_control:sym") - if_null rx246_debug, debug_481 - rx246_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx246_pos) - debug_481: + if_null rx246_debug, debug_487 + rx246_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx246_pos) + debug_487: .return (rx246_cur) rx246_restart: .annotate 'line', 4 - if_null rx246_debug, debug_482 - rx246_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_482: + if_null rx246_debug, debug_488 + rx246_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_488: rx246_fail: (rx246_rep, rx246_pos, $I10, $P10) = rx246_cur."!mark_fail"(0) lt rx246_pos, -1, rx246_done @@ -3966,16 +3941,16 @@ jump $I10 rx246_done: rx246_cur."!cursor_fail"() - if_null rx246_debug, debug_483 - rx246_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_483: + if_null rx246_debug, debug_489 + rx246_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_489: .return (rx246_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("63_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("63_1284728478.15265") :method .annotate 'line', 4 new $P248, "ResizablePMCArray" push $P248, "if" @@ -3984,9 +3959,9 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("64_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("64_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P274 = "66_1282016529.10767" + .const 'Sub' $P274 = "66_1284728478.15265" capture_lex $P274 .local string rx264_tgt .local int rx264_pos @@ -4008,9 +3983,9 @@ substr rx264_tgt, rx264_tgt, rx264_off rx264_start: eq $I10, 1, rx264_restart - if_null rx264_debug, debug_484 - rx264_cur."!cursor_debug"("START ", "statement_control:sym") - debug_484: + if_null rx264_debug, debug_490 + rx264_cur."!cursor_debug"("START", "statement_control:sym") + debug_490: $I10 = self.'from'() ne $I10, -1, rxscan267_done goto rxscan267_scan @@ -4080,7 +4055,7 @@ rx264_pos = $P10."pos"() # rx subrule "before" subtype=zerowidth negate=1 rx264_cur."!cursor_pos"(rx264_pos) - .const 'Sub' $P274 = "66_1282016529.10767" + .const 'Sub' $P274 = "66_1284728478.15265" capture_lex $P274 $P10 = rx264_cur."before"($P274) if $P10, rx264_fail @@ -4115,15 +4090,15 @@ .annotate 'line', 164 # rx pass rx264_cur."!cursor_pass"(rx264_pos, "statement_control:sym") - if_null rx264_debug, debug_489 - rx264_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx264_pos) - debug_489: + if_null rx264_debug, debug_495 + rx264_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx264_pos) + debug_495: .return (rx264_cur) rx264_restart: .annotate 'line', 4 - if_null rx264_debug, debug_490 - rx264_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_490: + if_null rx264_debug, debug_496 + rx264_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_496: rx264_fail: (rx264_rep, rx264_pos, $I10, $P10) = rx264_cur."!mark_fail"(0) lt rx264_pos, -1, rx264_done @@ -4131,16 +4106,16 @@ jump $I10 rx264_done: rx264_cur."!cursor_fail"() - if_null rx264_debug, debug_491 - rx264_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_491: + if_null rx264_debug, debug_497 + rx264_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_497: .return (rx264_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("65_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("65_1284728478.15265") :method .annotate 'line', 4 new $P266, "ResizablePMCArray" push $P266, "unless" @@ -4149,7 +4124,7 @@ .namespace ["NQP";"Grammar"] -.sub "_block273" :anon :subid("66_1282016529.10767") :method :outer("64_1282016529.10767") +.sub "_block273" :anon :subid("66_1284728478.15265") :method :outer("64_1284728478.15265") .annotate 'line', 167 .local string rx275_tgt .local int rx275_pos @@ -4171,9 +4146,9 @@ substr rx275_tgt, rx275_tgt, rx275_off rx275_start: eq $I10, 1, rx275_restart - if_null rx275_debug, debug_485 - rx275_cur."!cursor_debug"("START ", "") - debug_485: + if_null rx275_debug, debug_491 + rx275_cur."!cursor_debug"("START", "") + debug_491: $I10 = self.'from'() ne $I10, -1, rxscan276_done goto rxscan276_scan @@ -4195,14 +4170,14 @@ add rx275_pos, 4 # rx pass rx275_cur."!cursor_pass"(rx275_pos, "") - if_null rx275_debug, debug_486 - rx275_cur."!cursor_debug"("PASS ", "", " at pos=", rx275_pos) - debug_486: + if_null rx275_debug, debug_492 + rx275_cur."!cursor_debug"("PASS", "", " at pos=", rx275_pos) + debug_492: .return (rx275_cur) rx275_restart: - if_null rx275_debug, debug_487 - rx275_cur."!cursor_debug"("NEXT ", "") - debug_487: + if_null rx275_debug, debug_493 + rx275_cur."!cursor_debug"("NEXT", "") + debug_493: rx275_fail: (rx275_rep, rx275_pos, $I10, $P10) = rx275_cur."!mark_fail"(0) lt rx275_pos, -1, rx275_done @@ -4210,16 +4185,16 @@ jump $I10 rx275_done: rx275_cur."!cursor_fail"() - if_null rx275_debug, debug_488 - rx275_cur."!cursor_debug"("FAIL ", "") - debug_488: + if_null rx275_debug, debug_494 + rx275_cur."!cursor_debug"("FAIL", "") + debug_494: .return (rx275_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("67_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("67_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx282_tgt .local int rx282_pos @@ -4241,9 +4216,9 @@ substr rx282_tgt, rx282_tgt, rx282_off rx282_start: eq $I10, 1, rx282_restart - if_null rx282_debug, debug_492 - rx282_cur."!cursor_debug"("START ", "statement_control:sym") - debug_492: + if_null rx282_debug, debug_498 + rx282_cur."!cursor_debug"("START", "statement_control:sym") + debug_498: $I10 = self.'from'() ne $I10, -1, rxscan285_done goto rxscan285_scan @@ -4318,15 +4293,15 @@ .annotate 'line', 170 # rx pass rx282_cur."!cursor_pass"(rx282_pos, "statement_control:sym") - if_null rx282_debug, debug_493 - rx282_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx282_pos) - debug_493: + if_null rx282_debug, debug_499 + rx282_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx282_pos) + debug_499: .return (rx282_cur) rx282_restart: .annotate 'line', 4 - if_null rx282_debug, debug_494 - rx282_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_494: + if_null rx282_debug, debug_500 + rx282_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_500: rx282_fail: (rx282_rep, rx282_pos, $I10, $P10) = rx282_cur."!mark_fail"(0) lt rx282_pos, -1, rx282_done @@ -4334,16 +4309,16 @@ jump $I10 rx282_done: rx282_cur."!cursor_fail"() - if_null rx282_debug, debug_495 - rx282_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_495: + if_null rx282_debug, debug_501 + rx282_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_501: .return (rx282_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("68_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("68_1284728478.15265") :method .annotate 'line', 4 new $P284, "ResizablePMCArray" push $P284, "until" @@ -4353,7 +4328,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("69_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("69_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx291_tgt .local int rx291_pos @@ -4375,9 +4350,9 @@ substr rx291_tgt, rx291_tgt, rx291_off rx291_start: eq $I10, 1, rx291_restart - if_null rx291_debug, debug_496 - rx291_cur."!cursor_debug"("START ", "statement_control:sym") - debug_496: + if_null rx291_debug, debug_502 + rx291_cur."!cursor_debug"("START", "statement_control:sym") + debug_502: $I10 = self.'from'() ne $I10, -1, rxscan294_done goto rxscan294_scan @@ -4577,15 +4552,15 @@ .annotate 'line', 175 # rx pass rx291_cur."!cursor_pass"(rx291_pos, "statement_control:sym") - if_null rx291_debug, debug_497 - rx291_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx291_pos) - debug_497: + if_null rx291_debug, debug_503 + rx291_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx291_pos) + debug_503: .return (rx291_cur) rx291_restart: .annotate 'line', 4 - if_null rx291_debug, debug_498 - rx291_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_498: + if_null rx291_debug, debug_504 + rx291_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_504: rx291_fail: (rx291_rep, rx291_pos, $I10, $P10) = rx291_cur."!mark_fail"(0) lt rx291_pos, -1, rx291_done @@ -4593,16 +4568,16 @@ jump $I10 rx291_done: rx291_cur."!cursor_fail"() - if_null rx291_debug, debug_499 - rx291_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_499: + if_null rx291_debug, debug_505 + rx291_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_505: .return (rx291_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("70_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("70_1284728478.15265") :method .annotate 'line', 4 new $P293, "ResizablePMCArray" push $P293, "repeat" @@ -4611,7 +4586,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("71_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("71_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx311_tgt .local int rx311_pos @@ -4633,9 +4608,9 @@ substr rx311_tgt, rx311_tgt, rx311_off rx311_start: eq $I10, 1, rx311_restart - if_null rx311_debug, debug_500 - rx311_cur."!cursor_debug"("START ", "statement_control:sym") - debug_500: + if_null rx311_debug, debug_506 + rx311_cur."!cursor_debug"("START", "statement_control:sym") + debug_506: $I10 = self.'from'() ne $I10, -1, rxscan314_done goto rxscan314_scan @@ -4697,15 +4672,15 @@ .annotate 'line', 183 # rx pass rx311_cur."!cursor_pass"(rx311_pos, "statement_control:sym") - if_null rx311_debug, debug_501 - rx311_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx311_pos) - debug_501: + if_null rx311_debug, debug_507 + rx311_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx311_pos) + debug_507: .return (rx311_cur) rx311_restart: .annotate 'line', 4 - if_null rx311_debug, debug_502 - rx311_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_502: + if_null rx311_debug, debug_508 + rx311_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_508: rx311_fail: (rx311_rep, rx311_pos, $I10, $P10) = rx311_cur."!mark_fail"(0) lt rx311_pos, -1, rx311_done @@ -4713,16 +4688,16 @@ jump $I10 rx311_done: rx311_cur."!cursor_fail"() - if_null rx311_debug, debug_503 - rx311_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_503: + if_null rx311_debug, debug_509 + rx311_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_509: .return (rx311_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("72_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("72_1284728478.15265") :method .annotate 'line', 4 new $P313, "ResizablePMCArray" push $P313, "for" @@ -4731,7 +4706,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("73_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("73_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx319_tgt .local int rx319_pos @@ -4753,9 +4728,9 @@ substr rx319_tgt, rx319_tgt, rx319_off rx319_start: eq $I10, 1, rx319_restart - if_null rx319_debug, debug_504 - rx319_cur."!cursor_debug"("START ", "statement_control:sym") - debug_504: + if_null rx319_debug, debug_510 + rx319_cur."!cursor_debug"("START", "statement_control:sym") + debug_510: $I10 = self.'from'() ne $I10, -1, rxscan322_done goto rxscan322_scan @@ -4817,15 +4792,15 @@ .annotate 'line', 188 # rx pass rx319_cur."!cursor_pass"(rx319_pos, "statement_control:sym") - if_null rx319_debug, debug_505 - rx319_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx319_pos) - debug_505: + if_null rx319_debug, debug_511 + rx319_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx319_pos) + debug_511: .return (rx319_cur) rx319_restart: .annotate 'line', 4 - if_null rx319_debug, debug_506 - rx319_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_506: + if_null rx319_debug, debug_512 + rx319_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_512: rx319_fail: (rx319_rep, rx319_pos, $I10, $P10) = rx319_cur."!mark_fail"(0) lt rx319_pos, -1, rx319_done @@ -4833,16 +4808,16 @@ jump $I10 rx319_done: rx319_cur."!cursor_fail"() - if_null rx319_debug, debug_507 - rx319_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_507: + if_null rx319_debug, debug_513 + rx319_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_513: .return (rx319_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("74_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("74_1284728478.15265") :method .annotate 'line', 4 new $P321, "ResizablePMCArray" push $P321, "CATCH" @@ -4851,7 +4826,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_control:sym" :subid("75_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_control:sym" :subid("75_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx327_tgt .local int rx327_pos @@ -4873,9 +4848,9 @@ substr rx327_tgt, rx327_tgt, rx327_off rx327_start: eq $I10, 1, rx327_restart - if_null rx327_debug, debug_508 - rx327_cur."!cursor_debug"("START ", "statement_control:sym") - debug_508: + if_null rx327_debug, debug_514 + rx327_cur."!cursor_debug"("START", "statement_control:sym") + debug_514: $I10 = self.'from'() ne $I10, -1, rxscan330_done goto rxscan330_scan @@ -4937,15 +4912,15 @@ .annotate 'line', 193 # rx pass rx327_cur."!cursor_pass"(rx327_pos, "statement_control:sym") - if_null rx327_debug, debug_509 - rx327_cur."!cursor_debug"("PASS ", "statement_control:sym", " at pos=", rx327_pos) - debug_509: + if_null rx327_debug, debug_515 + rx327_cur."!cursor_debug"("PASS", "statement_control:sym", " at pos=", rx327_pos) + debug_515: .return (rx327_cur) rx327_restart: .annotate 'line', 4 - if_null rx327_debug, debug_510 - rx327_cur."!cursor_debug"("NEXT ", "statement_control:sym") - debug_510: + if_null rx327_debug, debug_516 + rx327_cur."!cursor_debug"("NEXT", "statement_control:sym") + debug_516: rx327_fail: (rx327_rep, rx327_pos, $I10, $P10) = rx327_cur."!mark_fail"(0) lt rx327_pos, -1, rx327_done @@ -4953,16 +4928,16 @@ jump $I10 rx327_done: rx327_cur."!cursor_fail"() - if_null rx327_debug, debug_511 - rx327_cur."!cursor_debug"("FAIL ", "statement_control:sym") - debug_511: + if_null rx327_debug, debug_517 + rx327_cur."!cursor_debug"("FAIL", "statement_control:sym") + debug_517: .return (rx327_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_control:sym" :subid("76_1282016529.10767") :method +.sub "!PREFIX__statement_control:sym" :subid("76_1284728478.15265") :method .annotate 'line', 4 new $P329, "ResizablePMCArray" push $P329, "CONTROL" @@ -4971,7 +4946,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_prefix" :subid("77_1282016529.10767") :method +.sub "statement_prefix" :subid("77_1284728478.15265") :method .annotate 'line', 198 $P335 = self."!protoregex"("statement_prefix") .return ($P335) @@ -4979,7 +4954,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_prefix" :subid("78_1282016529.10767") :method +.sub "!PREFIX__statement_prefix" :subid("78_1284728478.15265") :method .annotate 'line', 198 $P337 = self."!PREFIX__!protoregex"("statement_prefix") .return ($P337) @@ -4987,7 +4962,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_prefix:sym" :subid("79_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_prefix:sym" :subid("79_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx339_tgt .local int rx339_pos @@ -5009,9 +4984,9 @@ substr rx339_tgt, rx339_tgt, rx339_off rx339_start: eq $I10, 1, rx339_restart - if_null rx339_debug, debug_512 - rx339_cur."!cursor_debug"("START ", "statement_prefix:sym") - debug_512: + if_null rx339_debug, debug_518 + rx339_cur."!cursor_debug"("START", "statement_prefix:sym") + debug_518: $I10 = self.'from'() ne $I10, -1, rxscan343_done goto rxscan343_scan @@ -5055,15 +5030,15 @@ rx339_pos = $P10."pos"() # rx pass rx339_cur."!cursor_pass"(rx339_pos, "statement_prefix:sym") - if_null rx339_debug, debug_513 - rx339_cur."!cursor_debug"("PASS ", "statement_prefix:sym", " at pos=", rx339_pos) - debug_513: + if_null rx339_debug, debug_519 + rx339_cur."!cursor_debug"("PASS", "statement_prefix:sym", " at pos=", rx339_pos) + debug_519: .return (rx339_cur) rx339_restart: .annotate 'line', 4 - if_null rx339_debug, debug_514 - rx339_cur."!cursor_debug"("NEXT ", "statement_prefix:sym") - debug_514: + if_null rx339_debug, debug_520 + rx339_cur."!cursor_debug"("NEXT", "statement_prefix:sym") + debug_520: rx339_fail: (rx339_rep, rx339_pos, $I10, $P10) = rx339_cur."!mark_fail"(0) lt rx339_pos, -1, rx339_done @@ -5071,16 +5046,16 @@ jump $I10 rx339_done: rx339_cur."!cursor_fail"() - if_null rx339_debug, debug_515 - rx339_cur."!cursor_debug"("FAIL ", "statement_prefix:sym") - debug_515: + if_null rx339_debug, debug_521 + rx339_cur."!cursor_debug"("FAIL", "statement_prefix:sym") + debug_521: .return (rx339_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_prefix:sym" :subid("80_1282016529.10767") :method +.sub "!PREFIX__statement_prefix:sym" :subid("80_1284728478.15265") :method .annotate 'line', 4 $P341 = self."!PREFIX__!subrule"("blorst", "INIT") new $P342, "ResizablePMCArray" @@ -5090,7 +5065,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_prefix:sym" :subid("81_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_prefix:sym" :subid("81_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx346_tgt .local int rx346_pos @@ -5112,9 +5087,9 @@ substr rx346_tgt, rx346_tgt, rx346_off rx346_start: eq $I10, 1, rx346_restart - if_null rx346_debug, debug_516 - rx346_cur."!cursor_debug"("START ", "statement_prefix:sym") - debug_516: + if_null rx346_debug, debug_522 + rx346_cur."!cursor_debug"("START", "statement_prefix:sym") + debug_522: $I10 = self.'from'() ne $I10, -1, rxscan350_done goto rxscan350_scan @@ -5160,15 +5135,15 @@ .annotate 'line', 201 # rx pass rx346_cur."!cursor_pass"(rx346_pos, "statement_prefix:sym") - if_null rx346_debug, debug_517 - rx346_cur."!cursor_debug"("PASS ", "statement_prefix:sym", " at pos=", rx346_pos) - debug_517: + if_null rx346_debug, debug_523 + rx346_cur."!cursor_debug"("PASS", "statement_prefix:sym", " at pos=", rx346_pos) + debug_523: .return (rx346_cur) rx346_restart: .annotate 'line', 4 - if_null rx346_debug, debug_518 - rx346_cur."!cursor_debug"("NEXT ", "statement_prefix:sym") - debug_518: + if_null rx346_debug, debug_524 + rx346_cur."!cursor_debug"("NEXT", "statement_prefix:sym") + debug_524: rx346_fail: (rx346_rep, rx346_pos, $I10, $P10) = rx346_cur."!mark_fail"(0) lt rx346_pos, -1, rx346_done @@ -5176,16 +5151,16 @@ jump $I10 rx346_done: rx346_cur."!cursor_fail"() - if_null rx346_debug, debug_519 - rx346_cur."!cursor_debug"("FAIL ", "statement_prefix:sym") - debug_519: + if_null rx346_debug, debug_525 + rx346_cur."!cursor_debug"("FAIL", "statement_prefix:sym") + debug_525: .return (rx346_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_prefix:sym" :subid("82_1282016529.10767") :method +.sub "!PREFIX__statement_prefix:sym" :subid("82_1284728478.15265") :method .annotate 'line', 4 $P348 = self."!PREFIX__!subrule"("blorst", "try") new $P349, "ResizablePMCArray" @@ -5195,7 +5170,7 @@ .namespace ["NQP";"Grammar"] -.sub "blorst" :subid("83_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "blorst" :subid("83_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx353_tgt .local int rx353_pos @@ -5217,9 +5192,9 @@ substr rx353_tgt, rx353_tgt, rx353_off rx353_start: eq $I10, 1, rx353_restart - if_null rx353_debug, debug_520 - rx353_cur."!cursor_debug"("START ", "blorst") - debug_520: + if_null rx353_debug, debug_526 + rx353_cur."!cursor_debug"("START", "blorst") + debug_526: $I10 = self.'from'() ne $I10, -1, rxscan356_done goto rxscan356_scan @@ -5248,7 +5223,6 @@ set_addr $I10, alt357_1 rx353_cur."!mark_push"(0, rx353_pos, $I10) # rx enumcharlist negate=0 zerowidth - ge rx353_pos, rx353_eos, rx353_fail sub $I10, rx353_pos, rx353_off substr $S10, rx353_tgt, $I10, 1 index $I11, "{", $S10 @@ -5273,15 +5247,15 @@ .annotate 'line', 206 # rx pass rx353_cur."!cursor_pass"(rx353_pos, "blorst") - if_null rx353_debug, debug_521 - rx353_cur."!cursor_debug"("PASS ", "blorst", " at pos=", rx353_pos) - debug_521: + if_null rx353_debug, debug_527 + rx353_cur."!cursor_debug"("PASS", "blorst", " at pos=", rx353_pos) + debug_527: .return (rx353_cur) rx353_restart: .annotate 'line', 4 - if_null rx353_debug, debug_522 - rx353_cur."!cursor_debug"("NEXT ", "blorst") - debug_522: + if_null rx353_debug, debug_528 + rx353_cur."!cursor_debug"("NEXT", "blorst") + debug_528: rx353_fail: (rx353_rep, rx353_pos, $I10, $P10) = rx353_cur."!mark_fail"(0) lt rx353_pos, -1, rx353_done @@ -5289,16 +5263,16 @@ jump $I10 rx353_done: rx353_cur."!cursor_fail"() - if_null rx353_debug, debug_523 - rx353_cur."!cursor_debug"("FAIL ", "blorst") - debug_523: + if_null rx353_debug, debug_529 + rx353_cur."!cursor_debug"("FAIL", "blorst") + debug_529: .return (rx353_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__blorst" :subid("84_1282016529.10767") :method +.sub "!PREFIX__blorst" :subid("84_1284728478.15265") :method .annotate 'line', 4 new $P355, "ResizablePMCArray" push $P355, "" @@ -5307,7 +5281,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_cond" :subid("85_1282016529.10767") :method +.sub "statement_mod_cond" :subid("85_1284728478.15265") :method .annotate 'line', 212 $P359 = self."!protoregex"("statement_mod_cond") .return ($P359) @@ -5315,7 +5289,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_cond" :subid("86_1282016529.10767") :method +.sub "!PREFIX__statement_mod_cond" :subid("86_1284728478.15265") :method .annotate 'line', 212 $P361 = self."!PREFIX__!protoregex"("statement_mod_cond") .return ($P361) @@ -5323,7 +5297,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_cond:sym" :subid("87_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_mod_cond:sym" :subid("87_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx363_tgt .local int rx363_pos @@ -5345,9 +5319,9 @@ substr rx363_tgt, rx363_tgt, rx363_off rx363_start: eq $I10, 1, rx363_restart - if_null rx363_debug, debug_524 - rx363_cur."!cursor_debug"("START ", "statement_mod_cond:sym") - debug_524: + if_null rx363_debug, debug_530 + rx363_cur."!cursor_debug"("START", "statement_mod_cond:sym") + debug_530: $I10 = self.'from'() ne $I10, -1, rxscan367_done goto rxscan367_scan @@ -5401,15 +5375,15 @@ rx363_pos = $P10."pos"() # rx pass rx363_cur."!cursor_pass"(rx363_pos, "statement_mod_cond:sym") - if_null rx363_debug, debug_525 - rx363_cur."!cursor_debug"("PASS ", "statement_mod_cond:sym", " at pos=", rx363_pos) - debug_525: + if_null rx363_debug, debug_531 + rx363_cur."!cursor_debug"("PASS", "statement_mod_cond:sym", " at pos=", rx363_pos) + debug_531: .return (rx363_cur) rx363_restart: .annotate 'line', 4 - if_null rx363_debug, debug_526 - rx363_cur."!cursor_debug"("NEXT ", "statement_mod_cond:sym") - debug_526: + if_null rx363_debug, debug_532 + rx363_cur."!cursor_debug"("NEXT", "statement_mod_cond:sym") + debug_532: rx363_fail: (rx363_rep, rx363_pos, $I10, $P10) = rx363_cur."!mark_fail"(0) lt rx363_pos, -1, rx363_done @@ -5417,16 +5391,16 @@ jump $I10 rx363_done: rx363_cur."!cursor_fail"() - if_null rx363_debug, debug_527 - rx363_cur."!cursor_debug"("FAIL ", "statement_mod_cond:sym") - debug_527: + if_null rx363_debug, debug_533 + rx363_cur."!cursor_debug"("FAIL", "statement_mod_cond:sym") + debug_533: .return (rx363_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_cond:sym" :subid("88_1282016529.10767") :method +.sub "!PREFIX__statement_mod_cond:sym" :subid("88_1284728478.15265") :method .annotate 'line', 4 $P365 = self."!PREFIX__!subrule"("ws", "if") new $P366, "ResizablePMCArray" @@ -5436,7 +5410,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_cond:sym" :subid("89_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_mod_cond:sym" :subid("89_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx372_tgt .local int rx372_pos @@ -5458,9 +5432,9 @@ substr rx372_tgt, rx372_tgt, rx372_off rx372_start: eq $I10, 1, rx372_restart - if_null rx372_debug, debug_528 - rx372_cur."!cursor_debug"("START ", "statement_mod_cond:sym") - debug_528: + if_null rx372_debug, debug_534 + rx372_cur."!cursor_debug"("START", "statement_mod_cond:sym") + debug_534: $I10 = self.'from'() ne $I10, -1, rxscan376_done goto rxscan376_scan @@ -5514,15 +5488,15 @@ rx372_pos = $P10."pos"() # rx pass rx372_cur."!cursor_pass"(rx372_pos, "statement_mod_cond:sym") - if_null rx372_debug, debug_529 - rx372_cur."!cursor_debug"("PASS ", "statement_mod_cond:sym", " at pos=", rx372_pos) - debug_529: + if_null rx372_debug, debug_535 + rx372_cur."!cursor_debug"("PASS", "statement_mod_cond:sym", " at pos=", rx372_pos) + debug_535: .return (rx372_cur) rx372_restart: .annotate 'line', 4 - if_null rx372_debug, debug_530 - rx372_cur."!cursor_debug"("NEXT ", "statement_mod_cond:sym") - debug_530: + if_null rx372_debug, debug_536 + rx372_cur."!cursor_debug"("NEXT", "statement_mod_cond:sym") + debug_536: rx372_fail: (rx372_rep, rx372_pos, $I10, $P10) = rx372_cur."!mark_fail"(0) lt rx372_pos, -1, rx372_done @@ -5530,16 +5504,16 @@ jump $I10 rx372_done: rx372_cur."!cursor_fail"() - if_null rx372_debug, debug_531 - rx372_cur."!cursor_debug"("FAIL ", "statement_mod_cond:sym") - debug_531: + if_null rx372_debug, debug_537 + rx372_cur."!cursor_debug"("FAIL", "statement_mod_cond:sym") + debug_537: .return (rx372_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_cond:sym" :subid("90_1282016529.10767") :method +.sub "!PREFIX__statement_mod_cond:sym" :subid("90_1284728478.15265") :method .annotate 'line', 4 $P374 = self."!PREFIX__!subrule"("ws", "unless") new $P375, "ResizablePMCArray" @@ -5549,7 +5523,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_loop" :subid("91_1282016529.10767") :method +.sub "statement_mod_loop" :subid("91_1284728478.15265") :method .annotate 'line', 217 $P381 = self."!protoregex"("statement_mod_loop") .return ($P381) @@ -5557,7 +5531,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_loop" :subid("92_1282016529.10767") :method +.sub "!PREFIX__statement_mod_loop" :subid("92_1284728478.15265") :method .annotate 'line', 217 $P383 = self."!PREFIX__!protoregex"("statement_mod_loop") .return ($P383) @@ -5565,7 +5539,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_loop:sym" :subid("93_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_mod_loop:sym" :subid("93_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx385_tgt .local int rx385_pos @@ -5587,9 +5561,9 @@ substr rx385_tgt, rx385_tgt, rx385_off rx385_start: eq $I10, 1, rx385_restart - if_null rx385_debug, debug_532 - rx385_cur."!cursor_debug"("START ", "statement_mod_loop:sym") - debug_532: + if_null rx385_debug, debug_538 + rx385_cur."!cursor_debug"("START", "statement_mod_loop:sym") + debug_538: $I10 = self.'from'() ne $I10, -1, rxscan389_done goto rxscan389_scan @@ -5643,15 +5617,15 @@ rx385_pos = $P10."pos"() # rx pass rx385_cur."!cursor_pass"(rx385_pos, "statement_mod_loop:sym") - if_null rx385_debug, debug_533 - rx385_cur."!cursor_debug"("PASS ", "statement_mod_loop:sym", " at pos=", rx385_pos) - debug_533: + if_null rx385_debug, debug_539 + rx385_cur."!cursor_debug"("PASS", "statement_mod_loop:sym", " at pos=", rx385_pos) + debug_539: .return (rx385_cur) rx385_restart: .annotate 'line', 4 - if_null rx385_debug, debug_534 - rx385_cur."!cursor_debug"("NEXT ", "statement_mod_loop:sym") - debug_534: + if_null rx385_debug, debug_540 + rx385_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym") + debug_540: rx385_fail: (rx385_rep, rx385_pos, $I10, $P10) = rx385_cur."!mark_fail"(0) lt rx385_pos, -1, rx385_done @@ -5659,16 +5633,16 @@ jump $I10 rx385_done: rx385_cur."!cursor_fail"() - if_null rx385_debug, debug_535 - rx385_cur."!cursor_debug"("FAIL ", "statement_mod_loop:sym") - debug_535: + if_null rx385_debug, debug_541 + rx385_cur."!cursor_debug"("FAIL", "statement_mod_loop:sym") + debug_541: .return (rx385_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_loop:sym" :subid("94_1282016529.10767") :method +.sub "!PREFIX__statement_mod_loop:sym" :subid("94_1284728478.15265") :method .annotate 'line', 4 $P387 = self."!PREFIX__!subrule"("ws", "while") new $P388, "ResizablePMCArray" @@ -5678,7 +5652,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_loop:sym" :subid("95_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_mod_loop:sym" :subid("95_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx394_tgt .local int rx394_pos @@ -5700,9 +5674,9 @@ substr rx394_tgt, rx394_tgt, rx394_off rx394_start: eq $I10, 1, rx394_restart - if_null rx394_debug, debug_536 - rx394_cur."!cursor_debug"("START ", "statement_mod_loop:sym") - debug_536: + if_null rx394_debug, debug_542 + rx394_cur."!cursor_debug"("START", "statement_mod_loop:sym") + debug_542: $I10 = self.'from'() ne $I10, -1, rxscan398_done goto rxscan398_scan @@ -5756,15 +5730,15 @@ rx394_pos = $P10."pos"() # rx pass rx394_cur."!cursor_pass"(rx394_pos, "statement_mod_loop:sym") - if_null rx394_debug, debug_537 - rx394_cur."!cursor_debug"("PASS ", "statement_mod_loop:sym", " at pos=", rx394_pos) - debug_537: + if_null rx394_debug, debug_543 + rx394_cur."!cursor_debug"("PASS", "statement_mod_loop:sym", " at pos=", rx394_pos) + debug_543: .return (rx394_cur) rx394_restart: .annotate 'line', 4 - if_null rx394_debug, debug_538 - rx394_cur."!cursor_debug"("NEXT ", "statement_mod_loop:sym") - debug_538: + if_null rx394_debug, debug_544 + rx394_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym") + debug_544: rx394_fail: (rx394_rep, rx394_pos, $I10, $P10) = rx394_cur."!mark_fail"(0) lt rx394_pos, -1, rx394_done @@ -5772,16 +5746,16 @@ jump $I10 rx394_done: rx394_cur."!cursor_fail"() - if_null rx394_debug, debug_539 - rx394_cur."!cursor_debug"("FAIL ", "statement_mod_loop:sym") - debug_539: + if_null rx394_debug, debug_545 + rx394_cur."!cursor_debug"("FAIL", "statement_mod_loop:sym") + debug_545: .return (rx394_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_loop:sym" :subid("96_1282016529.10767") :method +.sub "!PREFIX__statement_mod_loop:sym" :subid("96_1284728478.15265") :method .annotate 'line', 4 $P396 = self."!PREFIX__!subrule"("ws", "until") new $P397, "ResizablePMCArray" @@ -5791,7 +5765,7 @@ .namespace ["NQP";"Grammar"] -.sub "statement_mod_loop:sym" :subid("97_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "statement_mod_loop:sym" :subid("97_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx403_tgt .local int rx403_pos @@ -5813,9 +5787,9 @@ substr rx403_tgt, rx403_tgt, rx403_off rx403_start: eq $I10, 1, rx403_restart - if_null rx403_debug, debug_540 - rx403_cur."!cursor_debug"("START ", "statement_mod_loop:sym") - debug_540: + if_null rx403_debug, debug_546 + rx403_cur."!cursor_debug"("START", "statement_mod_loop:sym") + debug_546: $I10 = self.'from'() ne $I10, -1, rxscan407_done goto rxscan407_scan @@ -5869,15 +5843,15 @@ rx403_pos = $P10."pos"() # rx pass rx403_cur."!cursor_pass"(rx403_pos, "statement_mod_loop:sym") - if_null rx403_debug, debug_541 - rx403_cur."!cursor_debug"("PASS ", "statement_mod_loop:sym", " at pos=", rx403_pos) - debug_541: + if_null rx403_debug, debug_547 + rx403_cur."!cursor_debug"("PASS", "statement_mod_loop:sym", " at pos=", rx403_pos) + debug_547: .return (rx403_cur) rx403_restart: .annotate 'line', 4 - if_null rx403_debug, debug_542 - rx403_cur."!cursor_debug"("NEXT ", "statement_mod_loop:sym") - debug_542: + if_null rx403_debug, debug_548 + rx403_cur."!cursor_debug"("NEXT", "statement_mod_loop:sym") + debug_548: rx403_fail: (rx403_rep, rx403_pos, $I10, $P10) = rx403_cur."!mark_fail"(0) lt rx403_pos, -1, rx403_done @@ -5885,16 +5859,16 @@ jump $I10 rx403_done: rx403_cur."!cursor_fail"() - if_null rx403_debug, debug_543 - rx403_cur."!cursor_debug"("FAIL ", "statement_mod_loop:sym") - debug_543: + if_null rx403_debug, debug_549 + rx403_cur."!cursor_debug"("FAIL", "statement_mod_loop:sym") + debug_549: .return (rx403_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__statement_mod_loop:sym" :subid("98_1282016529.10767") :method +.sub "!PREFIX__statement_mod_loop:sym" :subid("98_1284728478.15265") :method .annotate 'line', 4 $P405 = self."!PREFIX__!subrule"("ws", "for") new $P406, "ResizablePMCArray" @@ -5904,7 +5878,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("99_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("99_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx412_tgt .local int rx412_pos @@ -5926,9 +5900,9 @@ substr rx412_tgt, rx412_tgt, rx412_off rx412_start: eq $I10, 1, rx412_restart - if_null rx412_debug, debug_544 - rx412_cur."!cursor_debug"("START ", "term:sym") - debug_544: + if_null rx412_debug, debug_550 + rx412_cur."!cursor_debug"("START", "term:sym") + debug_550: $I10 = self.'from'() ne $I10, -1, rxscan416_done goto rxscan416_scan @@ -5951,15 +5925,15 @@ rx412_pos = $P10."pos"() # rx pass rx412_cur."!cursor_pass"(rx412_pos, "term:sym") - if_null rx412_debug, debug_545 - rx412_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx412_pos) - debug_545: + if_null rx412_debug, debug_551 + rx412_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx412_pos) + debug_551: .return (rx412_cur) rx412_restart: .annotate 'line', 4 - if_null rx412_debug, debug_546 - rx412_cur."!cursor_debug"("NEXT ", "term:sym") - debug_546: + if_null rx412_debug, debug_552 + rx412_cur."!cursor_debug"("NEXT", "term:sym") + debug_552: rx412_fail: (rx412_rep, rx412_pos, $I10, $P10) = rx412_cur."!mark_fail"(0) lt rx412_pos, -1, rx412_done @@ -5967,16 +5941,16 @@ jump $I10 rx412_done: rx412_cur."!cursor_fail"() - if_null rx412_debug, debug_547 - rx412_cur."!cursor_debug"("FAIL ", "term:sym") - debug_547: + if_null rx412_debug, debug_553 + rx412_cur."!cursor_debug"("FAIL", "term:sym") + debug_553: .return (rx412_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("100_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("100_1284728478.15265") :method .annotate 'line', 4 $P414 = self."!PREFIX__!subrule"("fatarrow", "") new $P415, "ResizablePMCArray" @@ -5986,7 +5960,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("101_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("101_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx418_tgt .local int rx418_pos @@ -6008,9 +5982,9 @@ substr rx418_tgt, rx418_tgt, rx418_off rx418_start: eq $I10, 1, rx418_restart - if_null rx418_debug, debug_548 - rx418_cur."!cursor_debug"("START ", "term:sym") - debug_548: + if_null rx418_debug, debug_554 + rx418_cur."!cursor_debug"("START", "term:sym") + debug_554: $I10 = self.'from'() ne $I10, -1, rxscan422_done goto rxscan422_scan @@ -6033,15 +6007,15 @@ rx418_pos = $P10."pos"() # rx pass rx418_cur."!cursor_pass"(rx418_pos, "term:sym") - if_null rx418_debug, debug_549 - rx418_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx418_pos) - debug_549: + if_null rx418_debug, debug_555 + rx418_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx418_pos) + debug_555: .return (rx418_cur) rx418_restart: .annotate 'line', 4 - if_null rx418_debug, debug_550 - rx418_cur."!cursor_debug"("NEXT ", "term:sym") - debug_550: + if_null rx418_debug, debug_556 + rx418_cur."!cursor_debug"("NEXT", "term:sym") + debug_556: rx418_fail: (rx418_rep, rx418_pos, $I10, $P10) = rx418_cur."!mark_fail"(0) lt rx418_pos, -1, rx418_done @@ -6049,16 +6023,16 @@ jump $I10 rx418_done: rx418_cur."!cursor_fail"() - if_null rx418_debug, debug_551 - rx418_cur."!cursor_debug"("FAIL ", "term:sym") - debug_551: + if_null rx418_debug, debug_557 + rx418_cur."!cursor_debug"("FAIL", "term:sym") + debug_557: .return (rx418_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("102_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("102_1284728478.15265") :method .annotate 'line', 4 $P420 = self."!PREFIX__!subrule"("colonpair", "") new $P421, "ResizablePMCArray" @@ -6068,7 +6042,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("103_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("103_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx424_tgt .local int rx424_pos @@ -6090,9 +6064,9 @@ substr rx424_tgt, rx424_tgt, rx424_off rx424_start: eq $I10, 1, rx424_restart - if_null rx424_debug, debug_552 - rx424_cur."!cursor_debug"("START ", "term:sym") - debug_552: + if_null rx424_debug, debug_558 + rx424_cur."!cursor_debug"("START", "term:sym") + debug_558: $I10 = self.'from'() ne $I10, -1, rxscan428_done goto rxscan428_scan @@ -6115,15 +6089,15 @@ rx424_pos = $P10."pos"() # rx pass rx424_cur."!cursor_pass"(rx424_pos, "term:sym") - if_null rx424_debug, debug_553 - rx424_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx424_pos) - debug_553: + if_null rx424_debug, debug_559 + rx424_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx424_pos) + debug_559: .return (rx424_cur) rx424_restart: .annotate 'line', 4 - if_null rx424_debug, debug_554 - rx424_cur."!cursor_debug"("NEXT ", "term:sym") - debug_554: + if_null rx424_debug, debug_560 + rx424_cur."!cursor_debug"("NEXT", "term:sym") + debug_560: rx424_fail: (rx424_rep, rx424_pos, $I10, $P10) = rx424_cur."!mark_fail"(0) lt rx424_pos, -1, rx424_done @@ -6131,16 +6105,16 @@ jump $I10 rx424_done: rx424_cur."!cursor_fail"() - if_null rx424_debug, debug_555 - rx424_cur."!cursor_debug"("FAIL ", "term:sym") - debug_555: + if_null rx424_debug, debug_561 + rx424_cur."!cursor_debug"("FAIL", "term:sym") + debug_561: .return (rx424_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("104_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("104_1284728478.15265") :method .annotate 'line', 4 $P426 = self."!PREFIX__!subrule"("variable", "") new $P427, "ResizablePMCArray" @@ -6150,7 +6124,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("105_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("105_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx430_tgt .local int rx430_pos @@ -6172,9 +6146,9 @@ substr rx430_tgt, rx430_tgt, rx430_off rx430_start: eq $I10, 1, rx430_restart - if_null rx430_debug, debug_556 - rx430_cur."!cursor_debug"("START ", "term:sym") - debug_556: + if_null rx430_debug, debug_562 + rx430_cur."!cursor_debug"("START", "term:sym") + debug_562: $I10 = self.'from'() ne $I10, -1, rxscan434_done goto rxscan434_scan @@ -6197,15 +6171,15 @@ rx430_pos = $P10."pos"() # rx pass rx430_cur."!cursor_pass"(rx430_pos, "term:sym") - if_null rx430_debug, debug_557 - rx430_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx430_pos) - debug_557: + if_null rx430_debug, debug_563 + rx430_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx430_pos) + debug_563: .return (rx430_cur) rx430_restart: .annotate 'line', 4 - if_null rx430_debug, debug_558 - rx430_cur."!cursor_debug"("NEXT ", "term:sym") - debug_558: + if_null rx430_debug, debug_564 + rx430_cur."!cursor_debug"("NEXT", "term:sym") + debug_564: rx430_fail: (rx430_rep, rx430_pos, $I10, $P10) = rx430_cur."!mark_fail"(0) lt rx430_pos, -1, rx430_done @@ -6213,16 +6187,16 @@ jump $I10 rx430_done: rx430_cur."!cursor_fail"() - if_null rx430_debug, debug_559 - rx430_cur."!cursor_debug"("FAIL ", "term:sym") - debug_559: + if_null rx430_debug, debug_565 + rx430_cur."!cursor_debug"("FAIL", "term:sym") + debug_565: .return (rx430_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("106_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("106_1284728478.15265") :method .annotate 'line', 4 $P432 = self."!PREFIX__!subrule"("package_declarator", "") new $P433, "ResizablePMCArray" @@ -6232,7 +6206,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("107_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("107_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx436_tgt .local int rx436_pos @@ -6254,9 +6228,9 @@ substr rx436_tgt, rx436_tgt, rx436_off rx436_start: eq $I10, 1, rx436_restart - if_null rx436_debug, debug_560 - rx436_cur."!cursor_debug"("START ", "term:sym") - debug_560: + if_null rx436_debug, debug_566 + rx436_cur."!cursor_debug"("START", "term:sym") + debug_566: $I10 = self.'from'() ne $I10, -1, rxscan440_done goto rxscan440_scan @@ -6279,15 +6253,15 @@ rx436_pos = $P10."pos"() # rx pass rx436_cur."!cursor_pass"(rx436_pos, "term:sym") - if_null rx436_debug, debug_561 - rx436_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx436_pos) - debug_561: + if_null rx436_debug, debug_567 + rx436_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx436_pos) + debug_567: .return (rx436_cur) rx436_restart: .annotate 'line', 4 - if_null rx436_debug, debug_562 - rx436_cur."!cursor_debug"("NEXT ", "term:sym") - debug_562: + if_null rx436_debug, debug_568 + rx436_cur."!cursor_debug"("NEXT", "term:sym") + debug_568: rx436_fail: (rx436_rep, rx436_pos, $I10, $P10) = rx436_cur."!mark_fail"(0) lt rx436_pos, -1, rx436_done @@ -6295,16 +6269,16 @@ jump $I10 rx436_done: rx436_cur."!cursor_fail"() - if_null rx436_debug, debug_563 - rx436_cur."!cursor_debug"("FAIL ", "term:sym") - debug_563: + if_null rx436_debug, debug_569 + rx436_cur."!cursor_debug"("FAIL", "term:sym") + debug_569: .return (rx436_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("108_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("108_1284728478.15265") :method .annotate 'line', 4 $P438 = self."!PREFIX__!subrule"("scope_declarator", "") new $P439, "ResizablePMCArray" @@ -6314,7 +6288,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("109_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("109_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx442_tgt .local int rx442_pos @@ -6336,9 +6310,9 @@ substr rx442_tgt, rx442_tgt, rx442_off rx442_start: eq $I10, 1, rx442_restart - if_null rx442_debug, debug_564 - rx442_cur."!cursor_debug"("START ", "term:sym") - debug_564: + if_null rx442_debug, debug_570 + rx442_cur."!cursor_debug"("START", "term:sym") + debug_570: $I10 = self.'from'() ne $I10, -1, rxscan446_done goto rxscan446_scan @@ -6361,15 +6335,15 @@ rx442_pos = $P10."pos"() # rx pass rx442_cur."!cursor_pass"(rx442_pos, "term:sym") - if_null rx442_debug, debug_565 - rx442_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx442_pos) - debug_565: + if_null rx442_debug, debug_571 + rx442_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx442_pos) + debug_571: .return (rx442_cur) rx442_restart: .annotate 'line', 4 - if_null rx442_debug, debug_566 - rx442_cur."!cursor_debug"("NEXT ", "term:sym") - debug_566: + if_null rx442_debug, debug_572 + rx442_cur."!cursor_debug"("NEXT", "term:sym") + debug_572: rx442_fail: (rx442_rep, rx442_pos, $I10, $P10) = rx442_cur."!mark_fail"(0) lt rx442_pos, -1, rx442_done @@ -6377,16 +6351,16 @@ jump $I10 rx442_done: rx442_cur."!cursor_fail"() - if_null rx442_debug, debug_567 - rx442_cur."!cursor_debug"("FAIL ", "term:sym") - debug_567: + if_null rx442_debug, debug_573 + rx442_cur."!cursor_debug"("FAIL", "term:sym") + debug_573: .return (rx442_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("110_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("110_1284728478.15265") :method .annotate 'line', 4 $P444 = self."!PREFIX__!subrule"("routine_declarator", "") new $P445, "ResizablePMCArray" @@ -6396,9 +6370,9 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("111_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("111_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P453 = "113_1282016529.10767" + .const 'Sub' $P453 = "113_1284728478.15265" capture_lex $P453 .local string rx448_tgt .local int rx448_pos @@ -6420,9 +6394,9 @@ substr rx448_tgt, rx448_tgt, rx448_off rx448_start: eq $I10, 1, rx448_restart - if_null rx448_debug, debug_568 - rx448_cur."!cursor_debug"("START ", "term:sym") - debug_568: + if_null rx448_debug, debug_574 + rx448_cur."!cursor_debug"("START", "term:sym") + debug_574: $I10 = self.'from'() ne $I10, -1, rxscan451_done goto rxscan451_scan @@ -6438,7 +6412,7 @@ .annotate 'line', 231 # rx subrule "before" subtype=zerowidth negate= rx448_cur."!cursor_pos"(rx448_pos) - .const 'Sub' $P453 = "113_1282016529.10767" + .const 'Sub' $P453 = "113_1284728478.15265" capture_lex $P453 $P10 = rx448_cur."before"($P453) unless $P10, rx448_fail @@ -6451,15 +6425,15 @@ rx448_pos = $P10."pos"() # rx pass rx448_cur."!cursor_pass"(rx448_pos, "term:sym") - if_null rx448_debug, debug_573 - rx448_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx448_pos) - debug_573: + if_null rx448_debug, debug_579 + rx448_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx448_pos) + debug_579: .return (rx448_cur) rx448_restart: .annotate 'line', 4 - if_null rx448_debug, debug_574 - rx448_cur."!cursor_debug"("NEXT ", "term:sym") - debug_574: + if_null rx448_debug, debug_580 + rx448_cur."!cursor_debug"("NEXT", "term:sym") + debug_580: rx448_fail: (rx448_rep, rx448_pos, $I10, $P10) = rx448_cur."!mark_fail"(0) lt rx448_pos, -1, rx448_done @@ -6467,16 +6441,16 @@ jump $I10 rx448_done: rx448_cur."!cursor_fail"() - if_null rx448_debug, debug_575 - rx448_cur."!cursor_debug"("FAIL ", "term:sym") - debug_575: + if_null rx448_debug, debug_581 + rx448_cur."!cursor_debug"("FAIL", "term:sym") + debug_581: .return (rx448_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("112_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("112_1284728478.15265") :method .annotate 'line', 4 new $P450, "ResizablePMCArray" push $P450, "" @@ -6485,7 +6459,7 @@ .namespace ["NQP";"Grammar"] -.sub "_block452" :anon :subid("113_1282016529.10767") :method :outer("111_1282016529.10767") +.sub "_block452" :anon :subid("113_1284728478.15265") :method :outer("111_1284728478.15265") .annotate 'line', 231 .local string rx454_tgt .local int rx454_pos @@ -6507,9 +6481,9 @@ substr rx454_tgt, rx454_tgt, rx454_off rx454_start: eq $I10, 1, rx454_restart - if_null rx454_debug, debug_569 - rx454_cur."!cursor_debug"("START ", "") - debug_569: + if_null rx454_debug, debug_575 + rx454_cur."!cursor_debug"("START", "") + debug_575: $I10 = self.'from'() ne $I10, -1, rxscan455_done goto rxscan455_scan @@ -6555,14 +6529,14 @@ alt456_end: # rx pass rx454_cur."!cursor_pass"(rx454_pos, "") - if_null rx454_debug, debug_570 - rx454_cur."!cursor_debug"("PASS ", "", " at pos=", rx454_pos) - debug_570: + if_null rx454_debug, debug_576 + rx454_cur."!cursor_debug"("PASS", "", " at pos=", rx454_pos) + debug_576: .return (rx454_cur) rx454_restart: - if_null rx454_debug, debug_571 - rx454_cur."!cursor_debug"("NEXT ", "") - debug_571: + if_null rx454_debug, debug_577 + rx454_cur."!cursor_debug"("NEXT", "") + debug_577: rx454_fail: (rx454_rep, rx454_pos, $I10, $P10) = rx454_cur."!mark_fail"(0) lt rx454_pos, -1, rx454_done @@ -6570,16 +6544,16 @@ jump $I10 rx454_done: rx454_cur."!cursor_fail"() - if_null rx454_debug, debug_572 - rx454_cur."!cursor_debug"("FAIL ", "") - debug_572: + if_null rx454_debug, debug_578 + rx454_cur."!cursor_debug"("FAIL", "") + debug_578: .return (rx454_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("114_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("114_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx458_tgt .local int rx458_pos @@ -6601,9 +6575,9 @@ substr rx458_tgt, rx458_tgt, rx458_off rx458_start: eq $I10, 1, rx458_restart - if_null rx458_debug, debug_576 - rx458_cur."!cursor_debug"("START ", "term:sym") - debug_576: + if_null rx458_debug, debug_582 + rx458_cur."!cursor_debug"("START", "term:sym") + debug_582: $I10 = self.'from'() ne $I10, -1, rxscan462_done goto rxscan462_scan @@ -6626,15 +6600,15 @@ rx458_pos = $P10."pos"() # rx pass rx458_cur."!cursor_pass"(rx458_pos, "term:sym") - if_null rx458_debug, debug_577 - rx458_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx458_pos) - debug_577: + if_null rx458_debug, debug_583 + rx458_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx458_pos) + debug_583: .return (rx458_cur) rx458_restart: .annotate 'line', 4 - if_null rx458_debug, debug_578 - rx458_cur."!cursor_debug"("NEXT ", "term:sym") - debug_578: + if_null rx458_debug, debug_584 + rx458_cur."!cursor_debug"("NEXT", "term:sym") + debug_584: rx458_fail: (rx458_rep, rx458_pos, $I10, $P10) = rx458_cur."!mark_fail"(0) lt rx458_pos, -1, rx458_done @@ -6642,16 +6616,16 @@ jump $I10 rx458_done: rx458_cur."!cursor_fail"() - if_null rx458_debug, debug_579 - rx458_cur."!cursor_debug"("FAIL ", "term:sym") - debug_579: + if_null rx458_debug, debug_585 + rx458_cur."!cursor_debug"("FAIL", "term:sym") + debug_585: .return (rx458_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("115_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("115_1284728478.15265") :method .annotate 'line', 4 $P460 = self."!PREFIX__!subrule"("regex_declarator", "") new $P461, "ResizablePMCArray" @@ -6661,7 +6635,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("116_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("116_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx464_tgt .local int rx464_pos @@ -6683,9 +6657,9 @@ substr rx464_tgt, rx464_tgt, rx464_off rx464_start: eq $I10, 1, rx464_restart - if_null rx464_debug, debug_580 - rx464_cur."!cursor_debug"("START ", "term:sym") - debug_580: + if_null rx464_debug, debug_586 + rx464_cur."!cursor_debug"("START", "term:sym") + debug_586: $I10 = self.'from'() ne $I10, -1, rxscan468_done goto rxscan468_scan @@ -6708,15 +6682,15 @@ rx464_pos = $P10."pos"() # rx pass rx464_cur."!cursor_pass"(rx464_pos, "term:sym") - if_null rx464_debug, debug_581 - rx464_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx464_pos) - debug_581: + if_null rx464_debug, debug_587 + rx464_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx464_pos) + debug_587: .return (rx464_cur) rx464_restart: .annotate 'line', 4 - if_null rx464_debug, debug_582 - rx464_cur."!cursor_debug"("NEXT ", "term:sym") - debug_582: + if_null rx464_debug, debug_588 + rx464_cur."!cursor_debug"("NEXT", "term:sym") + debug_588: rx464_fail: (rx464_rep, rx464_pos, $I10, $P10) = rx464_cur."!mark_fail"(0) lt rx464_pos, -1, rx464_done @@ -6724,16 +6698,16 @@ jump $I10 rx464_done: rx464_cur."!cursor_fail"() - if_null rx464_debug, debug_583 - rx464_cur."!cursor_debug"("FAIL ", "term:sym") - debug_583: + if_null rx464_debug, debug_589 + rx464_cur."!cursor_debug"("FAIL", "term:sym") + debug_589: .return (rx464_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("117_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("117_1284728478.15265") :method .annotate 'line', 4 $P466 = self."!PREFIX__!subrule"("statement_prefix", "") new $P467, "ResizablePMCArray" @@ -6743,7 +6717,7 @@ .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("118_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("118_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx470_tgt .local int rx470_pos @@ -6765,9 +6739,9 @@ substr rx470_tgt, rx470_tgt, rx470_off rx470_start: eq $I10, 1, rx470_restart - if_null rx470_debug, debug_584 - rx470_cur."!cursor_debug"("START ", "term:sym") - debug_584: + if_null rx470_debug, debug_590 + rx470_cur."!cursor_debug"("START", "term:sym") + debug_590: $I10 = self.'from'() ne $I10, -1, rxscan473_done goto rxscan473_scan @@ -6794,15 +6768,15 @@ rx470_pos = $P10."pos"() # rx pass rx470_cur."!cursor_pass"(rx470_pos, "term:sym") - if_null rx470_debug, debug_585 - rx470_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx470_pos) - debug_585: + if_null rx470_debug, debug_591 + rx470_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx470_pos) + debug_591: .return (rx470_cur) rx470_restart: .annotate 'line', 4 - if_null rx470_debug, debug_586 - rx470_cur."!cursor_debug"("NEXT ", "term:sym") - debug_586: + if_null rx470_debug, debug_592 + rx470_cur."!cursor_debug"("NEXT", "term:sym") + debug_592: rx470_fail: (rx470_rep, rx470_pos, $I10, $P10) = rx470_cur."!mark_fail"(0) lt rx470_pos, -1, rx470_done @@ -6810,16 +6784,16 @@ jump $I10 rx470_done: rx470_cur."!cursor_fail"() - if_null rx470_debug, debug_587 - rx470_cur."!cursor_debug"("FAIL ", "term:sym") - debug_587: + if_null rx470_debug, debug_593 + rx470_cur."!cursor_debug"("FAIL", "term:sym") + debug_593: .return (rx470_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("119_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("119_1284728478.15265") :method .annotate 'line', 4 new $P472, "ResizablePMCArray" push $P472, "" @@ -6828,7 +6802,7 @@ .namespace ["NQP";"Grammar"] -.sub "fatarrow" :subid("120_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "fatarrow" :subid("120_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx475_tgt .local int rx475_pos @@ -6850,9 +6824,9 @@ substr rx475_tgt, rx475_tgt, rx475_off rx475_start: eq $I10, 1, rx475_restart - if_null rx475_debug, debug_588 - rx475_cur."!cursor_debug"("START ", "fatarrow") - debug_588: + if_null rx475_debug, debug_594 + rx475_cur."!cursor_debug"("START", "fatarrow") + debug_594: $I10 = self.'from'() ne $I10, -1, rxscan479_done goto rxscan479_scan @@ -6873,23 +6847,21 @@ rx475_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("key") rx475_pos = $P10."pos"() - # rx rxquantr480 ** 0..* - set_addr $I10, rxquantr480_done - rx475_cur."!mark_push"(0, rx475_pos, $I10) - rxquantr480_loop: - # rx enumcharlist negate=0 - ge rx475_pos, rx475_eos, rx475_fail + # rx enumcharlist_q negate=0 r 0..-1 sub $I10, rx475_pos, rx475_off + set rx475_rep, 0 + sub $I12, rx475_eos, rx475_pos + rxenumcharlistq480_loop: + le $I12, 0, rxenumcharlistq480_done substr $S10, rx475_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, rx475_fail - inc rx475_pos - set_addr $I10, rxquantr480_done - (rx475_rep) = rx475_cur."!mark_commit"($I10) - set_addr $I10, rxquantr480_done - rx475_cur."!mark_push"(rx475_rep, rx475_pos, $I10) - goto rxquantr480_loop - rxquantr480_done: + lt $I11, 0, rxenumcharlistq480_done + inc rx475_rep + inc $I10 + dec $I12 + goto rxenumcharlistq480_loop + rxenumcharlistq480_done: + add rx475_pos, rx475_pos, rx475_rep # rx literal "=>" add $I11, rx475_pos, 2 gt $I11, rx475_eos, rx475_fail @@ -6912,15 +6884,15 @@ .annotate 'line', 236 # rx pass rx475_cur."!cursor_pass"(rx475_pos, "fatarrow") - if_null rx475_debug, debug_589 - rx475_cur."!cursor_debug"("PASS ", "fatarrow", " at pos=", rx475_pos) - debug_589: + if_null rx475_debug, debug_595 + rx475_cur."!cursor_debug"("PASS", "fatarrow", " at pos=", rx475_pos) + debug_595: .return (rx475_cur) rx475_restart: .annotate 'line', 4 - if_null rx475_debug, debug_590 - rx475_cur."!cursor_debug"("NEXT ", "fatarrow") - debug_590: + if_null rx475_debug, debug_596 + rx475_cur."!cursor_debug"("NEXT", "fatarrow") + debug_596: rx475_fail: (rx475_rep, rx475_pos, $I10, $P10) = rx475_cur."!mark_fail"(0) lt rx475_pos, -1, rx475_done @@ -6928,16 +6900,16 @@ jump $I10 rx475_done: rx475_cur."!cursor_fail"() - if_null rx475_debug, debug_591 - rx475_cur."!cursor_debug"("FAIL ", "fatarrow") - debug_591: + if_null rx475_debug, debug_597 + rx475_cur."!cursor_debug"("FAIL", "fatarrow") + debug_597: .return (rx475_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__fatarrow" :subid("121_1282016529.10767") :method +.sub "!PREFIX__fatarrow" :subid("121_1284728478.15265") :method .annotate 'line', 4 $P477 = self."!PREFIX__!subrule"("identifier", "") new $P478, "ResizablePMCArray" @@ -6947,7 +6919,7 @@ .namespace ["NQP";"Grammar"] -.sub "colonpair" :subid("122_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "colonpair" :subid("122_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx482_tgt .local int rx482_pos @@ -6970,9 +6942,9 @@ substr rx482_tgt, rx482_tgt, rx482_off rx482_start: eq $I10, 1, rx482_restart - if_null rx482_debug, debug_592 - rx482_cur."!cursor_debug"("START ", "colonpair") - debug_592: + if_null rx482_debug, debug_598 + rx482_cur."!cursor_debug"("START", "colonpair") + debug_598: $I10 = self.'from'() ne $I10, -1, rxscan488_done goto rxscan488_scan @@ -7072,15 +7044,15 @@ .annotate 'line', 240 # rx pass rx482_cur."!cursor_pass"(rx482_pos, "colonpair") - if_null rx482_debug, debug_593 - rx482_cur."!cursor_debug"("PASS ", "colonpair", " at pos=", rx482_pos) - debug_593: + if_null rx482_debug, debug_599 + rx482_cur."!cursor_debug"("PASS", "colonpair", " at pos=", rx482_pos) + debug_599: .return (rx482_cur) rx482_restart: .annotate 'line', 4 - if_null rx482_debug, debug_594 - rx482_cur."!cursor_debug"("NEXT ", "colonpair") - debug_594: + if_null rx482_debug, debug_600 + rx482_cur."!cursor_debug"("NEXT", "colonpair") + debug_600: rx482_fail: (rx482_rep, rx482_pos, $I10, $P10) = rx482_cur."!mark_fail"(0) lt rx482_pos, -1, rx482_done @@ -7088,16 +7060,16 @@ jump $I10 rx482_done: rx482_cur."!cursor_fail"() - if_null rx482_debug, debug_595 - rx482_cur."!cursor_debug"("FAIL ", "colonpair") - debug_595: + if_null rx482_debug, debug_601 + rx482_cur."!cursor_debug"("FAIL", "colonpair") + debug_601: .return (rx482_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__colonpair" :subid("123_1282016529.10767") :method +.sub "!PREFIX__colonpair" :subid("123_1284728478.15265") :method .annotate 'line', 4 $P484 = self."!PREFIX__!subrule"("circumfix", ":") $P485 = self."!PREFIX__!subrule"("identifier", ":") @@ -7111,7 +7083,7 @@ .namespace ["NQP";"Grammar"] -.sub "variable" :subid("124_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "variable" :subid("124_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx494_tgt .local int rx494_pos @@ -7134,9 +7106,9 @@ substr rx494_tgt, rx494_tgt, rx494_off rx494_start: eq $I10, 1, rx494_restart - if_null rx494_debug, debug_596 - rx494_cur."!cursor_debug"("START ", "variable") - debug_596: + if_null rx494_debug, debug_602 + rx494_cur."!cursor_debug"("START", "variable") + debug_602: $I10 = self.'from'() ne $I10, -1, rxscan499_done goto rxscan499_scan @@ -7201,7 +7173,6 @@ $P10."!cursor_names"("sigil") rx494_pos = $P10."pos"() # rx enumcharlist negate=0 zerowidth - ge rx494_pos, rx494_eos, rx494_fail sub $I10, rx494_pos, rx494_off substr $S10, rx494_tgt, $I10, 1 index $I11, "<[", $S10 @@ -7262,15 +7233,15 @@ .annotate 'line', 249 # rx pass rx494_cur."!cursor_pass"(rx494_pos, "variable") - if_null rx494_debug, debug_597 - rx494_cur."!cursor_debug"("PASS ", "variable", " at pos=", rx494_pos) - debug_597: + if_null rx494_debug, debug_603 + rx494_cur."!cursor_debug"("PASS", "variable", " at pos=", rx494_pos) + debug_603: .return (rx494_cur) rx494_restart: .annotate 'line', 4 - if_null rx494_debug, debug_598 - rx494_cur."!cursor_debug"("NEXT ", "variable") - debug_598: + if_null rx494_debug, debug_604 + rx494_cur."!cursor_debug"("NEXT", "variable") + debug_604: rx494_fail: (rx494_rep, rx494_pos, $I10, $P10) = rx494_cur."!mark_fail"(0) lt rx494_pos, -1, rx494_done @@ -7278,16 +7249,16 @@ jump $I10 rx494_done: rx494_cur."!cursor_fail"() - if_null rx494_debug, debug_599 - rx494_cur."!cursor_debug"("FAIL ", "variable") - debug_599: + if_null rx494_debug, debug_605 + rx494_cur."!cursor_debug"("FAIL", "variable") + debug_605: .return (rx494_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__variable" :subid("125_1282016529.10767") :method +.sub "!PREFIX__variable" :subid("125_1284728478.15265") :method .annotate 'line', 4 $P496 = self."!PREFIX__!subrule"("sigil", "") $P497 = self."!PREFIX__!subrule"("sigil", "") @@ -7302,7 +7273,7 @@ .namespace ["NQP";"Grammar"] -.sub "sigil" :subid("126_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "sigil" :subid("126_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx506_tgt .local int rx506_pos @@ -7324,9 +7295,9 @@ substr rx506_tgt, rx506_tgt, rx506_off rx506_start: eq $I10, 1, rx506_restart - if_null rx506_debug, debug_600 - rx506_cur."!cursor_debug"("START ", "sigil") - debug_600: + if_null rx506_debug, debug_606 + rx506_cur."!cursor_debug"("START", "sigil") + debug_606: $I10 = self.'from'() ne $I10, -1, rxscan509_done goto rxscan509_scan @@ -7349,15 +7320,15 @@ inc rx506_pos # rx pass rx506_cur."!cursor_pass"(rx506_pos, "sigil") - if_null rx506_debug, debug_601 - rx506_cur."!cursor_debug"("PASS ", "sigil", " at pos=", rx506_pos) - debug_601: + if_null rx506_debug, debug_607 + rx506_cur."!cursor_debug"("PASS", "sigil", " at pos=", rx506_pos) + debug_607: .return (rx506_cur) rx506_restart: .annotate 'line', 4 - if_null rx506_debug, debug_602 - rx506_cur."!cursor_debug"("NEXT ", "sigil") - debug_602: + if_null rx506_debug, debug_608 + rx506_cur."!cursor_debug"("NEXT", "sigil") + debug_608: rx506_fail: (rx506_rep, rx506_pos, $I10, $P10) = rx506_cur."!mark_fail"(0) lt rx506_pos, -1, rx506_done @@ -7365,16 +7336,16 @@ jump $I10 rx506_done: rx506_cur."!cursor_fail"() - if_null rx506_debug, debug_603 - rx506_cur."!cursor_debug"("FAIL ", "sigil") - debug_603: + if_null rx506_debug, debug_609 + rx506_cur."!cursor_debug"("FAIL", "sigil") + debug_609: .return (rx506_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__sigil" :subid("127_1282016529.10767") :method +.sub "!PREFIX__sigil" :subid("127_1284728478.15265") :method .annotate 'line', 4 new $P508, "ResizablePMCArray" push $P508, "&" @@ -7386,7 +7357,7 @@ .namespace ["NQP";"Grammar"] -.sub "twigil" :subid("128_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "twigil" :subid("128_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx511_tgt .local int rx511_pos @@ -7408,9 +7379,9 @@ substr rx511_tgt, rx511_tgt, rx511_off rx511_start: eq $I10, 1, rx511_restart - if_null rx511_debug, debug_604 - rx511_cur."!cursor_debug"("START ", "twigil") - debug_604: + if_null rx511_debug, debug_610 + rx511_cur."!cursor_debug"("START", "twigil") + debug_610: $I10 = self.'from'() ne $I10, -1, rxscan514_done goto rxscan514_scan @@ -7433,15 +7404,15 @@ inc rx511_pos # rx pass rx511_cur."!cursor_pass"(rx511_pos, "twigil") - if_null rx511_debug, debug_605 - rx511_cur."!cursor_debug"("PASS ", "twigil", " at pos=", rx511_pos) - debug_605: + if_null rx511_debug, debug_611 + rx511_cur."!cursor_debug"("PASS", "twigil", " at pos=", rx511_pos) + debug_611: .return (rx511_cur) rx511_restart: .annotate 'line', 4 - if_null rx511_debug, debug_606 - rx511_cur."!cursor_debug"("NEXT ", "twigil") - debug_606: + if_null rx511_debug, debug_612 + rx511_cur."!cursor_debug"("NEXT", "twigil") + debug_612: rx511_fail: (rx511_rep, rx511_pos, $I10, $P10) = rx511_cur."!mark_fail"(0) lt rx511_pos, -1, rx511_done @@ -7449,16 +7420,16 @@ jump $I10 rx511_done: rx511_cur."!cursor_fail"() - if_null rx511_debug, debug_607 - rx511_cur."!cursor_debug"("FAIL ", "twigil") - debug_607: + if_null rx511_debug, debug_613 + rx511_cur."!cursor_debug"("FAIL", "twigil") + debug_613: .return (rx511_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__twigil" :subid("129_1282016529.10767") :method +.sub "!PREFIX__twigil" :subid("129_1284728478.15265") :method .annotate 'line', 4 new $P513, "ResizablePMCArray" push $P513, "?" @@ -7469,7 +7440,7 @@ .namespace ["NQP";"Grammar"] -.sub "package_declarator" :subid("130_1282016529.10767") :method +.sub "package_declarator" :subid("130_1284728478.15265") :method .annotate 'line', 259 $P516 = self."!protoregex"("package_declarator") .return ($P516) @@ -7477,7 +7448,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__package_declarator" :subid("131_1282016529.10767") :method +.sub "!PREFIX__package_declarator" :subid("131_1284728478.15265") :method .annotate 'line', 259 $P518 = self."!PREFIX__!protoregex"("package_declarator") .return ($P518) @@ -7485,7 +7456,7 @@ .namespace ["NQP";"Grammar"] -.sub "package_declarator:sym" :subid("132_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "package_declarator:sym" :subid("132_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx520_tgt .local int rx520_pos @@ -7507,9 +7478,9 @@ substr rx520_tgt, rx520_tgt, rx520_off rx520_start: eq $I10, 1, rx520_restart - if_null rx520_debug, debug_608 - rx520_cur."!cursor_debug"("START ", "package_declarator:sym") - debug_608: + if_null rx520_debug, debug_614 + rx520_cur."!cursor_debug"("START", "package_declarator:sym") + debug_614: $I10 = self.'from'() ne $I10, -1, rxscan524_done goto rxscan524_scan @@ -7553,15 +7524,15 @@ rx520_pos = $P10."pos"() # rx pass rx520_cur."!cursor_pass"(rx520_pos, "package_declarator:sym") - if_null rx520_debug, debug_609 - rx520_cur."!cursor_debug"("PASS ", "package_declarator:sym", " at pos=", rx520_pos) - debug_609: + if_null rx520_debug, debug_615 + rx520_cur."!cursor_debug"("PASS", "package_declarator:sym", " at pos=", rx520_pos) + debug_615: .return (rx520_cur) rx520_restart: .annotate 'line', 4 - if_null rx520_debug, debug_610 - rx520_cur."!cursor_debug"("NEXT ", "package_declarator:sym") - debug_610: + if_null rx520_debug, debug_616 + rx520_cur."!cursor_debug"("NEXT", "package_declarator:sym") + debug_616: rx520_fail: (rx520_rep, rx520_pos, $I10, $P10) = rx520_cur."!mark_fail"(0) lt rx520_pos, -1, rx520_done @@ -7569,16 +7540,16 @@ jump $I10 rx520_done: rx520_cur."!cursor_fail"() - if_null rx520_debug, debug_611 - rx520_cur."!cursor_debug"("FAIL ", "package_declarator:sym") - debug_611: + if_null rx520_debug, debug_617 + rx520_cur."!cursor_debug"("FAIL", "package_declarator:sym") + debug_617: .return (rx520_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__package_declarator:sym" :subid("133_1282016529.10767") :method +.sub "!PREFIX__package_declarator:sym" :subid("133_1284728478.15265") :method .annotate 'line', 4 $P522 = self."!PREFIX__!subrule"("package_def", "module") new $P523, "ResizablePMCArray" @@ -7588,7 +7559,7 @@ .namespace ["NQP";"Grammar"] -.sub "package_declarator:sym" :subid("134_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "package_declarator:sym" :subid("134_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx527_tgt .local int rx527_pos @@ -7610,9 +7581,9 @@ substr rx527_tgt, rx527_tgt, rx527_off rx527_start: eq $I10, 1, rx527_restart - if_null rx527_debug, debug_612 - rx527_cur."!cursor_debug"("START ", "package_declarator:sym") - debug_612: + if_null rx527_debug, debug_618 + rx527_cur."!cursor_debug"("START", "package_declarator:sym") + debug_618: $I10 = self.'from'() ne $I10, -1, rxscan532_done goto rxscan532_scan @@ -7669,15 +7640,15 @@ rx527_pos = $P10."pos"() # rx pass rx527_cur."!cursor_pass"(rx527_pos, "package_declarator:sym") - if_null rx527_debug, debug_613 - rx527_cur."!cursor_debug"("PASS ", "package_declarator:sym", " at pos=", rx527_pos) - debug_613: + if_null rx527_debug, debug_619 + rx527_cur."!cursor_debug"("PASS", "package_declarator:sym", " at pos=", rx527_pos) + debug_619: .return (rx527_cur) rx527_restart: .annotate 'line', 4 - if_null rx527_debug, debug_614 - rx527_cur."!cursor_debug"("NEXT ", "package_declarator:sym") - debug_614: + if_null rx527_debug, debug_620 + rx527_cur."!cursor_debug"("NEXT", "package_declarator:sym") + debug_620: rx527_fail: (rx527_rep, rx527_pos, $I10, $P10) = rx527_cur."!mark_fail"(0) lt rx527_pos, -1, rx527_done @@ -7685,16 +7656,16 @@ jump $I10 rx527_done: rx527_cur."!cursor_fail"() - if_null rx527_debug, debug_615 - rx527_cur."!cursor_debug"("FAIL ", "package_declarator:sym") - debug_615: + if_null rx527_debug, debug_621 + rx527_cur."!cursor_debug"("FAIL", "package_declarator:sym") + debug_621: .return (rx527_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__package_declarator:sym" :subid("135_1282016529.10767") :method +.sub "!PREFIX__package_declarator:sym" :subid("135_1284728478.15265") :method .annotate 'line', 4 $P529 = self."!PREFIX__!subrule"("package_def", "grammar") $P530 = self."!PREFIX__!subrule"("package_def", "class") @@ -7706,7 +7677,7 @@ .namespace ["NQP";"Grammar"] -.sub "package_def" :subid("136_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "package_def" :subid("136_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx536_tgt .local int rx536_pos @@ -7729,9 +7700,9 @@ substr rx536_tgt, rx536_tgt, rx536_off rx536_start: eq $I10, 1, rx536_restart - if_null rx536_debug, debug_616 - rx536_cur."!cursor_debug"("START ", "package_def") - debug_616: + if_null rx536_debug, debug_622 + rx536_cur."!cursor_debug"("START", "package_def") + debug_622: $I10 = self.'from'() ne $I10, -1, rxscan540_done goto rxscan540_scan @@ -7850,7 +7821,6 @@ unless $P10, rx536_fail rx536_pos = $P10."pos"() # rx enumcharlist negate=0 zerowidth - ge rx536_pos, rx536_eos, rx536_fail sub $I10, rx536_pos, rx536_off substr $S10, rx536_tgt, $I10, 1 index $I11, "{", $S10 @@ -7900,15 +7870,15 @@ .annotate 'line', 263 # rx pass rx536_cur."!cursor_pass"(rx536_pos, "package_def") - if_null rx536_debug, debug_617 - rx536_cur."!cursor_debug"("PASS ", "package_def", " at pos=", rx536_pos) - debug_617: + if_null rx536_debug, debug_623 + rx536_cur."!cursor_debug"("PASS", "package_def", " at pos=", rx536_pos) + debug_623: .return (rx536_cur) rx536_restart: .annotate 'line', 4 - if_null rx536_debug, debug_618 - rx536_cur."!cursor_debug"("NEXT ", "package_def") - debug_618: + if_null rx536_debug, debug_624 + rx536_cur."!cursor_debug"("NEXT", "package_def") + debug_624: rx536_fail: (rx536_rep, rx536_pos, $I10, $P10) = rx536_cur."!mark_fail"(0) lt rx536_pos, -1, rx536_done @@ -7916,16 +7886,16 @@ jump $I10 rx536_done: rx536_cur."!cursor_fail"() - if_null rx536_debug, debug_619 - rx536_cur."!cursor_debug"("FAIL ", "package_def") - debug_619: + if_null rx536_debug, debug_625 + rx536_cur."!cursor_debug"("FAIL", "package_def") + debug_625: .return (rx536_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__package_def" :subid("137_1282016529.10767") :method +.sub "!PREFIX__package_def" :subid("137_1284728478.15265") :method .annotate 'line', 4 $P538 = self."!PREFIX__!subrule"("ws", "") new $P539, "ResizablePMCArray" @@ -7935,7 +7905,7 @@ .namespace ["NQP";"Grammar"] -.sub "scope_declarator" :subid("138_1282016529.10767") :method +.sub "scope_declarator" :subid("138_1284728478.15265") :method .annotate 'line', 273 $P559 = self."!protoregex"("scope_declarator") .return ($P559) @@ -7943,7 +7913,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__scope_declarator" :subid("139_1282016529.10767") :method +.sub "!PREFIX__scope_declarator" :subid("139_1284728478.15265") :method .annotate 'line', 273 $P561 = self."!PREFIX__!protoregex"("scope_declarator") .return ($P561) @@ -7951,7 +7921,7 @@ .namespace ["NQP";"Grammar"] -.sub "scope_declarator:sym" :subid("140_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "scope_declarator:sym" :subid("140_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx563_tgt .local int rx563_pos @@ -7973,9 +7943,9 @@ substr rx563_tgt, rx563_tgt, rx563_off rx563_start: eq $I10, 1, rx563_restart - if_null rx563_debug, debug_620 - rx563_cur."!cursor_debug"("START ", "scope_declarator:sym") - debug_620: + if_null rx563_debug, debug_626 + rx563_cur."!cursor_debug"("START", "scope_declarator:sym") + debug_626: $I10 = self.'from'() ne $I10, -1, rxscan567_done goto rxscan567_scan @@ -8019,15 +7989,15 @@ rx563_pos = $P10."pos"() # rx pass rx563_cur."!cursor_pass"(rx563_pos, "scope_declarator:sym") - if_null rx563_debug, debug_621 - rx563_cur."!cursor_debug"("PASS ", "scope_declarator:sym", " at pos=", rx563_pos) - debug_621: + if_null rx563_debug, debug_627 + rx563_cur."!cursor_debug"("PASS", "scope_declarator:sym", " at pos=", rx563_pos) + debug_627: .return (rx563_cur) rx563_restart: .annotate 'line', 4 - if_null rx563_debug, debug_622 - rx563_cur."!cursor_debug"("NEXT ", "scope_declarator:sym") - debug_622: + if_null rx563_debug, debug_628 + rx563_cur."!cursor_debug"("NEXT", "scope_declarator:sym") + debug_628: rx563_fail: (rx563_rep, rx563_pos, $I10, $P10) = rx563_cur."!mark_fail"(0) lt rx563_pos, -1, rx563_done @@ -8035,16 +8005,16 @@ jump $I10 rx563_done: rx563_cur."!cursor_fail"() - if_null rx563_debug, debug_623 - rx563_cur."!cursor_debug"("FAIL ", "scope_declarator:sym") - debug_623: + if_null rx563_debug, debug_629 + rx563_cur."!cursor_debug"("FAIL", "scope_declarator:sym") + debug_629: .return (rx563_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__scope_declarator:sym" :subid("141_1282016529.10767") :method +.sub "!PREFIX__scope_declarator:sym" :subid("141_1284728478.15265") :method .annotate 'line', 4 $P565 = self."!PREFIX__!subrule"("scoped", "my") new $P566, "ResizablePMCArray" @@ -8054,7 +8024,7 @@ .namespace ["NQP";"Grammar"] -.sub "scope_declarator:sym" :subid("142_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "scope_declarator:sym" :subid("142_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx570_tgt .local int rx570_pos @@ -8076,9 +8046,9 @@ substr rx570_tgt, rx570_tgt, rx570_off rx570_start: eq $I10, 1, rx570_restart - if_null rx570_debug, debug_624 - rx570_cur."!cursor_debug"("START ", "scope_declarator:sym") - debug_624: + if_null rx570_debug, debug_630 + rx570_cur."!cursor_debug"("START", "scope_declarator:sym") + debug_630: $I10 = self.'from'() ne $I10, -1, rxscan574_done goto rxscan574_scan @@ -8122,15 +8092,15 @@ rx570_pos = $P10."pos"() # rx pass rx570_cur."!cursor_pass"(rx570_pos, "scope_declarator:sym") - if_null rx570_debug, debug_625 - rx570_cur."!cursor_debug"("PASS ", "scope_declarator:sym", " at pos=", rx570_pos) - debug_625: + if_null rx570_debug, debug_631 + rx570_cur."!cursor_debug"("PASS", "scope_declarator:sym", " at pos=", rx570_pos) + debug_631: .return (rx570_cur) rx570_restart: .annotate 'line', 4 - if_null rx570_debug, debug_626 - rx570_cur."!cursor_debug"("NEXT ", "scope_declarator:sym") - debug_626: + if_null rx570_debug, debug_632 + rx570_cur."!cursor_debug"("NEXT", "scope_declarator:sym") + debug_632: rx570_fail: (rx570_rep, rx570_pos, $I10, $P10) = rx570_cur."!mark_fail"(0) lt rx570_pos, -1, rx570_done @@ -8138,16 +8108,16 @@ jump $I10 rx570_done: rx570_cur."!cursor_fail"() - if_null rx570_debug, debug_627 - rx570_cur."!cursor_debug"("FAIL ", "scope_declarator:sym") - debug_627: + if_null rx570_debug, debug_633 + rx570_cur."!cursor_debug"("FAIL", "scope_declarator:sym") + debug_633: .return (rx570_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__scope_declarator:sym" :subid("143_1282016529.10767") :method +.sub "!PREFIX__scope_declarator:sym" :subid("143_1284728478.15265") :method .annotate 'line', 4 $P572 = self."!PREFIX__!subrule"("scoped", "our") new $P573, "ResizablePMCArray" @@ -8157,7 +8127,7 @@ .namespace ["NQP";"Grammar"] -.sub "scope_declarator:sym" :subid("144_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "scope_declarator:sym" :subid("144_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx577_tgt .local int rx577_pos @@ -8179,9 +8149,9 @@ substr rx577_tgt, rx577_tgt, rx577_off rx577_start: eq $I10, 1, rx577_restart - if_null rx577_debug, debug_628 - rx577_cur."!cursor_debug"("START ", "scope_declarator:sym") - debug_628: + if_null rx577_debug, debug_634 + rx577_cur."!cursor_debug"("START", "scope_declarator:sym") + debug_634: $I10 = self.'from'() ne $I10, -1, rxscan581_done goto rxscan581_scan @@ -8225,15 +8195,15 @@ rx577_pos = $P10."pos"() # rx pass rx577_cur."!cursor_pass"(rx577_pos, "scope_declarator:sym") - if_null rx577_debug, debug_629 - rx577_cur."!cursor_debug"("PASS ", "scope_declarator:sym", " at pos=", rx577_pos) - debug_629: + if_null rx577_debug, debug_635 + rx577_cur."!cursor_debug"("PASS", "scope_declarator:sym", " at pos=", rx577_pos) + debug_635: .return (rx577_cur) rx577_restart: .annotate 'line', 4 - if_null rx577_debug, debug_630 - rx577_cur."!cursor_debug"("NEXT ", "scope_declarator:sym") - debug_630: + if_null rx577_debug, debug_636 + rx577_cur."!cursor_debug"("NEXT", "scope_declarator:sym") + debug_636: rx577_fail: (rx577_rep, rx577_pos, $I10, $P10) = rx577_cur."!mark_fail"(0) lt rx577_pos, -1, rx577_done @@ -8241,16 +8211,16 @@ jump $I10 rx577_done: rx577_cur."!cursor_fail"() - if_null rx577_debug, debug_631 - rx577_cur."!cursor_debug"("FAIL ", "scope_declarator:sym") - debug_631: + if_null rx577_debug, debug_637 + rx577_cur."!cursor_debug"("FAIL", "scope_declarator:sym") + debug_637: .return (rx577_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__scope_declarator:sym" :subid("145_1282016529.10767") :method +.sub "!PREFIX__scope_declarator:sym" :subid("145_1284728478.15265") :method .annotate 'line', 4 $P579 = self."!PREFIX__!subrule"("scoped", "has") new $P580, "ResizablePMCArray" @@ -8260,7 +8230,7 @@ .namespace ["NQP";"Grammar"] -.sub "scoped" :subid("146_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "scoped" :subid("146_1284728478.15265") :method :outer("11_1284728478.15265") .param pmc param_584 .annotate 'line', 278 .lex "$*SCOPE", param_584 @@ -8285,9 +8255,9 @@ substr rx585_tgt, rx585_tgt, rx585_off rx585_start: eq $I10, 1, rx585_restart - if_null rx585_debug, debug_632 - rx585_cur."!cursor_debug"("START ", "scoped") - debug_632: + if_null rx585_debug, debug_638 + rx585_cur."!cursor_debug"("START", "scoped") + debug_638: $I10 = self.'from'() ne $I10, -1, rxscan590_done goto rxscan590_scan @@ -8346,15 +8316,15 @@ .annotate 'line', 278 # rx pass rx585_cur."!cursor_pass"(rx585_pos, "scoped") - if_null rx585_debug, debug_633 - rx585_cur."!cursor_debug"("PASS ", "scoped", " at pos=", rx585_pos) - debug_633: + if_null rx585_debug, debug_639 + rx585_cur."!cursor_debug"("PASS", "scoped", " at pos=", rx585_pos) + debug_639: .return (rx585_cur) rx585_restart: .annotate 'line', 4 - if_null rx585_debug, debug_634 - rx585_cur."!cursor_debug"("NEXT ", "scoped") - debug_634: + if_null rx585_debug, debug_640 + rx585_cur."!cursor_debug"("NEXT", "scoped") + debug_640: rx585_fail: (rx585_rep, rx585_pos, $I10, $P10) = rx585_cur."!mark_fail"(0) lt rx585_pos, -1, rx585_done @@ -8362,16 +8332,16 @@ jump $I10 rx585_done: rx585_cur."!cursor_fail"() - if_null rx585_debug, debug_635 - rx585_cur."!cursor_debug"("FAIL ", "scoped") - debug_635: + if_null rx585_debug, debug_641 + rx585_cur."!cursor_debug"("FAIL", "scoped") + debug_641: .return (rx585_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__scoped" :subid("147_1282016529.10767") :method +.sub "!PREFIX__scoped" :subid("147_1284728478.15265") :method .annotate 'line', 4 $P587 = self."!PREFIX__!subrule"("ws", "") $P588 = self."!PREFIX__!subrule"("ws", "") @@ -8383,7 +8353,7 @@ .namespace ["NQP";"Grammar"] -.sub "typename" :subid("148_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "typename" :subid("148_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx597_tgt .local int rx597_pos @@ -8405,9 +8375,9 @@ substr rx597_tgt, rx597_tgt, rx597_off rx597_start: eq $I10, 1, rx597_restart - if_null rx597_debug, debug_636 - rx597_cur."!cursor_debug"("START ", "typename") - debug_636: + if_null rx597_debug, debug_642 + rx597_cur."!cursor_debug"("START", "typename") + debug_642: $I10 = self.'from'() ne $I10, -1, rxscan601_done goto rxscan601_scan @@ -8430,15 +8400,15 @@ rx597_pos = $P10."pos"() # rx pass rx597_cur."!cursor_pass"(rx597_pos, "typename") - if_null rx597_debug, debug_637 - rx597_cur."!cursor_debug"("PASS ", "typename", " at pos=", rx597_pos) - debug_637: + if_null rx597_debug, debug_643 + rx597_cur."!cursor_debug"("PASS", "typename", " at pos=", rx597_pos) + debug_643: .return (rx597_cur) rx597_restart: .annotate 'line', 4 - if_null rx597_debug, debug_638 - rx597_cur."!cursor_debug"("NEXT ", "typename") - debug_638: + if_null rx597_debug, debug_644 + rx597_cur."!cursor_debug"("NEXT", "typename") + debug_644: rx597_fail: (rx597_rep, rx597_pos, $I10, $P10) = rx597_cur."!mark_fail"(0) lt rx597_pos, -1, rx597_done @@ -8446,16 +8416,16 @@ jump $I10 rx597_done: rx597_cur."!cursor_fail"() - if_null rx597_debug, debug_639 - rx597_cur."!cursor_debug"("FAIL ", "typename") - debug_639: + if_null rx597_debug, debug_645 + rx597_cur."!cursor_debug"("FAIL", "typename") + debug_645: .return (rx597_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__typename" :subid("149_1282016529.10767") :method +.sub "!PREFIX__typename" :subid("149_1284728478.15265") :method .annotate 'line', 4 $P599 = self."!PREFIX__!subrule"("name", "") new $P600, "ResizablePMCArray" @@ -8465,7 +8435,7 @@ .namespace ["NQP";"Grammar"] -.sub "declarator" :subid("150_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "declarator" :subid("150_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx603_tgt .local int rx603_pos @@ -8487,9 +8457,9 @@ substr rx603_tgt, rx603_tgt, rx603_off rx603_start: eq $I10, 1, rx603_restart - if_null rx603_debug, debug_640 - rx603_cur."!cursor_debug"("START ", "declarator") - debug_640: + if_null rx603_debug, debug_646 + rx603_cur."!cursor_debug"("START", "declarator") + debug_646: $I10 = self.'from'() ne $I10, -1, rxscan608_done goto rxscan608_scan @@ -8528,15 +8498,15 @@ .annotate 'line', 285 # rx pass rx603_cur."!cursor_pass"(rx603_pos, "declarator") - if_null rx603_debug, debug_641 - rx603_cur."!cursor_debug"("PASS ", "declarator", " at pos=", rx603_pos) - debug_641: + if_null rx603_debug, debug_647 + rx603_cur."!cursor_debug"("PASS", "declarator", " at pos=", rx603_pos) + debug_647: .return (rx603_cur) rx603_restart: .annotate 'line', 4 - if_null rx603_debug, debug_642 - rx603_cur."!cursor_debug"("NEXT ", "declarator") - debug_642: + if_null rx603_debug, debug_648 + rx603_cur."!cursor_debug"("NEXT", "declarator") + debug_648: rx603_fail: (rx603_rep, rx603_pos, $I10, $P10) = rx603_cur."!mark_fail"(0) lt rx603_pos, -1, rx603_done @@ -8544,16 +8514,16 @@ jump $I10 rx603_done: rx603_cur."!cursor_fail"() - if_null rx603_debug, debug_643 - rx603_cur."!cursor_debug"("FAIL ", "declarator") - debug_643: + if_null rx603_debug, debug_649 + rx603_cur."!cursor_debug"("FAIL", "declarator") + debug_649: .return (rx603_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__declarator" :subid("151_1282016529.10767") :method +.sub "!PREFIX__declarator" :subid("151_1284728478.15265") :method .annotate 'line', 4 $P605 = self."!PREFIX__!subrule"("routine_declarator", "") $P606 = self."!PREFIX__!subrule"("variable_declarator", "") @@ -8565,7 +8535,7 @@ .namespace ["NQP";"Grammar"] -.sub "variable_declarator" :subid("152_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "variable_declarator" :subid("152_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx611_tgt .local int rx611_pos @@ -8587,9 +8557,9 @@ substr rx611_tgt, rx611_tgt, rx611_off rx611_start: eq $I10, 1, rx611_restart - if_null rx611_debug, debug_644 - rx611_cur."!cursor_debug"("START ", "variable_declarator") - debug_644: + if_null rx611_debug, debug_650 + rx611_cur."!cursor_debug"("START", "variable_declarator") + debug_650: $I10 = self.'from'() ne $I10, -1, rxscan615_done goto rxscan615_scan @@ -8612,15 +8582,15 @@ rx611_pos = $P10."pos"() # rx pass rx611_cur."!cursor_pass"(rx611_pos, "variable_declarator") - if_null rx611_debug, debug_645 - rx611_cur."!cursor_debug"("PASS ", "variable_declarator", " at pos=", rx611_pos) - debug_645: + if_null rx611_debug, debug_651 + rx611_cur."!cursor_debug"("PASS", "variable_declarator", " at pos=", rx611_pos) + debug_651: .return (rx611_cur) rx611_restart: .annotate 'line', 4 - if_null rx611_debug, debug_646 - rx611_cur."!cursor_debug"("NEXT ", "variable_declarator") - debug_646: + if_null rx611_debug, debug_652 + rx611_cur."!cursor_debug"("NEXT", "variable_declarator") + debug_652: rx611_fail: (rx611_rep, rx611_pos, $I10, $P10) = rx611_cur."!mark_fail"(0) lt rx611_pos, -1, rx611_done @@ -8628,16 +8598,16 @@ jump $I10 rx611_done: rx611_cur."!cursor_fail"() - if_null rx611_debug, debug_647 - rx611_cur."!cursor_debug"("FAIL ", "variable_declarator") - debug_647: + if_null rx611_debug, debug_653 + rx611_cur."!cursor_debug"("FAIL", "variable_declarator") + debug_653: .return (rx611_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__variable_declarator" :subid("153_1282016529.10767") :method +.sub "!PREFIX__variable_declarator" :subid("153_1284728478.15265") :method .annotate 'line', 4 $P613 = self."!PREFIX__!subrule"("variable", "") new $P614, "ResizablePMCArray" @@ -8647,7 +8617,7 @@ .namespace ["NQP";"Grammar"] -.sub "routine_declarator" :subid("154_1282016529.10767") :method +.sub "routine_declarator" :subid("154_1284728478.15265") :method .annotate 'line', 292 $P617 = self."!protoregex"("routine_declarator") .return ($P617) @@ -8655,7 +8625,7 @@ .namespace ["NQP";"Grammar"] -.sub "!PREFIX__routine_declarator" :subid("155_1282016529.10767") :method +.sub "!PREFIX__routine_declarator" :subid("155_1284728478.15265") :method .annotate 'line', 292 $P619 = self."!PREFIX__!protoregex"("routine_declarator") .return ($P619) @@ -8663,7 +8633,7 @@ .namespace ["NQP";"Grammar"] -.sub "routine_declarator:sym" :subid("156_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "routine_declarator:sym" :subid("156_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx621_tgt .local int rx621_pos @@ -8685,9 +8655,9 @@ substr rx621_tgt, rx621_tgt, rx621_off rx621_start: eq $I10, 1, rx621_restart - if_null rx621_debug, debug_648 - rx621_cur."!cursor_debug"("START ", "routine_declarator:sym") - debug_648: + if_null rx621_debug, debug_654 + rx621_cur."!cursor_debug"("START", "routine_declarator:sym") + debug_654: $I10 = self.'from'() ne $I10, -1, rxscan625_done goto rxscan625_scan @@ -8731,15 +8701,15 @@ rx621_pos = $P10."pos"() # rx pass rx621_cur."!cursor_pass"(rx621_pos, "routine_declarator:sym") - if_null rx621_debug, debug_649 - rx621_cur."!cursor_debug"("PASS ", "routine_declarator:sym", " at pos=", rx621_pos) - debug_649: + if_null rx621_debug, debug_655 + rx621_cur."!cursor_debug"("PASS", "routine_declarator:sym", " at pos=", rx621_pos) + debug_655: .return (rx621_cur) rx621_restart: .annotate 'line', 4 - if_null rx621_debug, debug_650 - rx621_cur."!cursor_debug"("NEXT ", "routine_declarator:sym") - debug_650: + if_null rx621_debug, debug_656 + rx621_cur."!cursor_debug"("NEXT", "routine_declarator:sym") + debug_656: rx621_fail: (rx621_rep, rx621_pos, $I10, $P10) = rx621_cur."!mark_fail"(0) lt rx621_pos, -1, rx621_done @@ -8747,16 +8717,16 @@ jump $I10 rx621_done: rx621_cur."!cursor_fail"() - if_null rx621_debug, debug_651 - rx621_cur."!cursor_debug"("FAIL ", "routine_declarator:sym") - debug_651: + if_null rx621_debug, debug_657 + rx621_cur."!cursor_debug"("FAIL", "routine_declarator:sym") + debug_657: .return (rx621_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__routine_declarator:sym" :subid("157_1282016529.10767") :method +.sub "!PREFIX__routine_declarator:sym" :subid("157_1284728478.15265") :method .annotate 'line', 4 $P623 = self."!PREFIX__!subrule"("routine_def", "sub") new $P624, "ResizablePMCArray" @@ -8766,7 +8736,7 @@ .namespace ["NQP";"Grammar"] -.sub "routine_declarator:sym" :subid("158_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "routine_declarator:sym" :subid("158_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx628_tgt .local int rx628_pos @@ -8788,9 +8758,9 @@ substr rx628_tgt, rx628_tgt, rx628_off rx628_start: eq $I10, 1, rx628_restart - if_null rx628_debug, debug_652 - rx628_cur."!cursor_debug"("START ", "routine_declarator:sym") - debug_652: + if_null rx628_debug, debug_658 + rx628_cur."!cursor_debug"("START", "routine_declarator:sym") + debug_658: $I10 = self.'from'() ne $I10, -1, rxscan632_done goto rxscan632_scan @@ -8834,15 +8804,15 @@ rx628_pos = $P10."pos"() # rx pass rx628_cur."!cursor_pass"(rx628_pos, "routine_declarator:sym") - if_null rx628_debug, debug_653 - rx628_cur."!cursor_debug"("PASS ", "routine_declarator:sym", " at pos=", rx628_pos) - debug_653: + if_null rx628_debug, debug_659 + rx628_cur."!cursor_debug"("PASS", "routine_declarator:sym", " at pos=", rx628_pos) + debug_659: .return (rx628_cur) rx628_restart: .annotate 'line', 4 - if_null rx628_debug, debug_654 - rx628_cur."!cursor_debug"("NEXT ", "routine_declarator:sym") - debug_654: + if_null rx628_debug, debug_660 + rx628_cur."!cursor_debug"("NEXT", "routine_declarator:sym") + debug_660: rx628_fail: (rx628_rep, rx628_pos, $I10, $P10) = rx628_cur."!mark_fail"(0) lt rx628_pos, -1, rx628_done @@ -8850,16 +8820,16 @@ jump $I10 rx628_done: rx628_cur."!cursor_fail"() - if_null rx628_debug, debug_655 - rx628_cur."!cursor_debug"("FAIL ", "routine_declarator:sym") - debug_655: + if_null rx628_debug, debug_661 + rx628_cur."!cursor_debug"("FAIL", "routine_declarator:sym") + debug_661: .return (rx628_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__routine_declarator:sym" :subid("159_1282016529.10767") :method +.sub "!PREFIX__routine_declarator:sym" :subid("159_1284728478.15265") :method .annotate 'line', 4 $P630 = self."!PREFIX__!subrule"("method_def", "method") new $P631, "ResizablePMCArray" @@ -8869,7 +8839,7 @@ .namespace ["NQP";"Grammar"] -.sub "routine_def" :subid("160_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "routine_def" :subid("160_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx635_tgt .local int rx635_pos @@ -8879,7 +8849,7 @@ .local pmc rx635_cur .local pmc rx635_debug (rx635_cur, rx635_pos, rx635_tgt, $I10) = self."!cursor_start"() - rx635_cur."!cursor_caparray"("deflongname", "sigil") + rx635_cur."!cursor_caparray"("deflongname", "sigil", "trait") getattribute rx635_debug, rx635_cur, "$!debug" .lex unicode:"$\x{a2}", rx635_cur .local pmc match @@ -8892,9 +8862,9 @@ substr rx635_tgt, rx635_tgt, rx635_off rx635_start: eq $I10, 1, rx635_restart - if_null rx635_debug, debug_656 - rx635_cur."!cursor_debug"("START ", "routine_def") - debug_656: + if_null rx635_debug, debug_662 + rx635_cur."!cursor_debug"("START", "routine_def") + debug_662: $I10 = self.'from'() ne $I10, -1, rxscan639_done goto rxscan639_scan @@ -9052,6 +9022,35 @@ unless $P10, rx635_fail rx635_pos = $P10."pos"() .annotate 'line', 301 + # rx rxquantr656 ** 0..* + set_addr $I10, rxquantr656_done + rx635_cur."!mark_push"(0, rx635_pos, $I10) + rxquantr656_loop: + # rx subrule "trait" subtype=capture negate= + rx635_cur."!cursor_pos"(rx635_pos) + $P10 = rx635_cur."trait"() + unless $P10, rx635_fail + goto rxsubrule657_pass + rxsubrule657_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx635_fail + rxsubrule657_pass: + set_addr $I10, rxsubrule657_back + rx635_cur."!mark_push"(0, rx635_pos, $I10, $P10) + $P10."!cursor_names"("trait") + rx635_pos = $P10."pos"() + set_addr $I10, rxquantr656_done + (rx635_rep) = rx635_cur."!mark_commit"($I10) + set_addr $I10, rxquantr656_done + rx635_cur."!mark_push"(rx635_rep, rx635_pos, $I10) + goto rxquantr656_loop + rxquantr656_done: + # 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', 302 # rx subrule "blockoid" subtype=capture negate= rx635_cur."!cursor_pos"(rx635_pos) $P10 = rx635_cur."blockoid"() @@ -9067,15 +9066,15 @@ .annotate 'line', 296 # rx pass rx635_cur."!cursor_pass"(rx635_pos, "routine_def") - if_null rx635_debug, debug_657 - rx635_cur."!cursor_debug"("PASS ", "routine_def", " at pos=", rx635_pos) - debug_657: + if_null rx635_debug, debug_663 + rx635_cur."!cursor_debug"("PASS", "routine_def", " at pos=", rx635_pos) + debug_663: .return (rx635_cur) rx635_restart: .annotate 'line', 4 - if_null rx635_debug, debug_658 - rx635_cur."!cursor_debug"("NEXT ", "routine_def") - debug_658: + if_null rx635_debug, debug_664 + rx635_cur."!cursor_debug"("NEXT", "routine_def") + debug_664: rx635_fail: (rx635_rep, rx635_pos, $I10, $P10) = rx635_cur."!mark_fail"(0) lt rx635_pos, -1, rx635_done @@ -9083,16 +9082,16 @@ jump $I10 rx635_done: rx635_cur."!cursor_fail"() - if_null rx635_debug, debug_659 - rx635_cur."!cursor_debug"("FAIL ", "routine_def") - debug_659: + if_null rx635_debug, debug_665 + rx635_cur."!cursor_debug"("FAIL", "routine_def") + debug_665: .return (rx635_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__routine_def" :subid("161_1282016529.10767") :method +.sub "!PREFIX__routine_def" :subid("161_1284728478.15265") :method .annotate 'line', 4 $P637 = self."!PREFIX__!subrule"("ws", "") new $P638, "ResizablePMCArray" @@ -9102,1014 +9101,953 @@ .namespace ["NQP";"Grammar"] -.sub "method_def" :subid("162_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "method_def" :subid("162_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx658_tgt - .local int rx658_pos - .local int rx658_off - .local int rx658_eos - .local int rx658_rep - .local pmc rx658_cur - .local pmc rx658_debug - (rx658_cur, rx658_pos, rx658_tgt, $I10) = self."!cursor_start"() - rx658_cur."!cursor_caparray"("deflongname") - getattribute rx658_debug, rx658_cur, "$!debug" - .lex unicode:"$\x{a2}", rx658_cur - .local pmc match - .lex "$/", match - length rx658_eos, rx658_tgt - gt rx658_pos, rx658_eos, rx658_done - set rx658_off, 0 - lt rx658_pos, 2, rx658_start - sub rx658_off, rx658_pos, 1 - substr rx658_tgt, rx658_tgt, rx658_off - rx658_start: - eq $I10, 1, rx658_restart - if_null rx658_debug, debug_660 - rx658_cur."!cursor_debug"("START ", "method_def") - debug_660: + .local string rx661_tgt + .local int rx661_pos + .local int rx661_off + .local int rx661_eos + .local int rx661_rep + .local pmc rx661_cur + .local pmc rx661_debug + (rx661_cur, rx661_pos, rx661_tgt, $I10) = self."!cursor_start"() + rx661_cur."!cursor_caparray"("deflongname", "trait") + getattribute rx661_debug, rx661_cur, "$!debug" + .lex unicode:"$\x{a2}", rx661_cur + .local pmc match + .lex "$/", match + length rx661_eos, rx661_tgt + gt rx661_pos, rx661_eos, rx661_done + set rx661_off, 0 + lt rx661_pos, 2, rx661_start + sub rx661_off, rx661_pos, 1 + substr rx661_tgt, rx661_tgt, rx661_off + rx661_start: + eq $I10, 1, rx661_restart + if_null rx661_debug, debug_666 + rx661_cur."!cursor_debug"("START", "method_def") + debug_666: $I10 = self.'from'() - ne $I10, -1, rxscan662_done - goto rxscan662_scan - rxscan662_loop: - ($P10) = rx658_cur."from"() - inc $P10 - set rx658_pos, $P10 - ge rx658_pos, rx658_eos, rxscan662_done - rxscan662_scan: - 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"() + ne $I10, -1, rxscan665_done + goto rxscan665_scan + rxscan665_loop: + ($P10) = rx661_cur."from"() + inc $P10 + set rx661_pos, $P10 + ge rx661_pos, rx661_eos, rxscan665_done + rxscan665_scan: + set_addr $I10, rxscan665_loop + rx661_cur."!mark_push"(0, rx661_pos, $I10) + rxscan665_done: .annotate 'line', 305 - # rx rxquantr664 ** 0..1 - set_addr $I10, rxquantr664_done - rx658_cur."!mark_push"(0, rx658_pos, $I10) - rxquantr664_loop: + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() +.annotate 'line', 306 + # rx rxquantr667 ** 0..1 + set_addr $I10, rxquantr667_done + rx661_cur."!mark_push"(0, rx661_pos, $I10) + rxquantr667_loop: # rx subrule "deflongname" subtype=capture negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."deflongname"() - unless $P10, rx658_fail - goto rxsubrule665_pass - rxsubrule665_back: + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."deflongname"() + unless $P10, rx661_fail + goto rxsubrule668_pass + rxsubrule668_back: $P10 = $P10."!cursor_next"() - unless $P10, rx658_fail - rxsubrule665_pass: - set_addr $I10, rxsubrule665_back - rx658_cur."!mark_push"(0, rx658_pos, $I10, $P10) + unless $P10, rx661_fail + rxsubrule668_pass: + set_addr $I10, rxsubrule668_back + rx661_cur."!mark_push"(0, rx661_pos, $I10, $P10) $P10."!cursor_names"("deflongname") - rx658_pos = $P10."pos"() - set_addr $I10, rxquantr664_done - (rx658_rep) = rx658_cur."!mark_commit"($I10) - rxquantr664_done: - # 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', 306 - # rx subrule "newpad" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."newpad"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() - alt668_0: + rx661_pos = $P10."pos"() + set_addr $I10, rxquantr667_done + (rx661_rep) = rx661_cur."!mark_commit"($I10) + rxquantr667_done: + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() .annotate 'line', 307 - set_addr $I10, alt668_1 - rx658_cur."!mark_push"(0, rx658_pos, $I10) + # rx subrule "newpad" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."newpad"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() + alt671_0: +.annotate 'line', 308 + set_addr $I10, alt671_1 + rx661_cur."!mark_push"(0, rx661_pos, $I10) # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() # rx literal "(" - add $I11, rx658_pos, 1 - gt $I11, rx658_eos, rx658_fail - sub $I11, rx658_pos, rx658_off - ord $I11, rx658_tgt, $I11 - ne $I11, 40, rx658_fail - add rx658_pos, 1 - # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() + add $I11, rx661_pos, 1 + gt $I11, rx661_eos, rx661_fail + sub $I11, rx661_pos, rx661_off + ord $I11, rx661_tgt, $I11 + ne $I11, 40, rx661_fail + add rx661_pos, 1 + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() # rx subrule "signature" subtype=capture negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."signature"() - unless $P10, rx658_fail - rx658_cur."!mark_push"(0, -1, 0, $P10) + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."signature"() + unless $P10, rx661_fail + rx661_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("signature") - rx658_pos = $P10."pos"() + rx661_pos = $P10."pos"() # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() # rx literal ")" - add $I11, rx658_pos, 1 - gt $I11, rx658_eos, rx658_fail - sub $I11, rx658_pos, rx658_off - ord $I11, rx658_tgt, $I11 - ne $I11, 41, rx658_fail - add rx658_pos, 1 - # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() - goto alt668_end - alt668_1: -.annotate 'line', 308 + add $I11, rx661_pos, 1 + gt $I11, rx661_eos, rx661_fail + sub $I11, rx661_pos, rx661_off + ord $I11, rx661_tgt, $I11 + ne $I11, 41, rx661_fail + add rx661_pos, 1 + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() + goto alt671_end + alt671_1: +.annotate 'line', 309 # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() # rx subrule "panic" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."panic"("Routine declaration requires a signature") - unless $P10, rx658_fail - rx658_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."ws"() - unless $P10, rx658_fail - rx658_pos = $P10."pos"() - alt668_end: - # 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', 309 + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."panic"("Routine declaration requires a signature") + unless $P10, rx661_fail + rx661_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() + alt671_end: + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() +.annotate 'line', 310 + # rx rxquantr679 ** 0..* + set_addr $I10, rxquantr679_done + rx661_cur."!mark_push"(0, rx661_pos, $I10) + rxquantr679_loop: + # rx subrule "trait" subtype=capture negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."trait"() + unless $P10, rx661_fail + goto rxsubrule680_pass + rxsubrule680_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx661_fail + rxsubrule680_pass: + set_addr $I10, rxsubrule680_back + rx661_cur."!mark_push"(0, rx661_pos, $I10, $P10) + $P10."!cursor_names"("trait") + rx661_pos = $P10."pos"() + set_addr $I10, rxquantr679_done + (rx661_rep) = rx661_cur."!mark_commit"($I10) + set_addr $I10, rxquantr679_done + rx661_cur."!mark_push"(rx661_rep, rx661_pos, $I10) + goto rxquantr679_loop + rxquantr679_done: + # rx subrule "ws" subtype=method negate= + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() +.annotate 'line', 311 # rx subrule "blockoid" subtype=capture negate= - rx658_cur."!cursor_pos"(rx658_pos) - $P10 = rx658_cur."blockoid"() - unless $P10, rx658_fail - rx658_cur."!mark_push"(0, -1, 0, $P10) + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."blockoid"() + unless $P10, rx661_fail + rx661_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("blockoid") - rx658_pos = $P10."pos"() + rx661_pos = $P10."pos"() # 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', 304 + rx661_cur."!cursor_pos"(rx661_pos) + $P10 = rx661_cur."ws"() + unless $P10, rx661_fail + rx661_pos = $P10."pos"() +.annotate 'line', 305 # rx pass - rx658_cur."!cursor_pass"(rx658_pos, "method_def") - if_null rx658_debug, debug_661 - rx658_cur."!cursor_debug"("PASS ", "method_def", " at pos=", rx658_pos) - debug_661: - .return (rx658_cur) - rx658_restart: + rx661_cur."!cursor_pass"(rx661_pos, "method_def") + if_null rx661_debug, debug_667 + rx661_cur."!cursor_debug"("PASS", "method_def", " at pos=", rx661_pos) + debug_667: + .return (rx661_cur) + rx661_restart: .annotate 'line', 4 - if_null rx658_debug, debug_662 - rx658_cur."!cursor_debug"("NEXT ", "method_def") - debug_662: - rx658_fail: - (rx658_rep, rx658_pos, $I10, $P10) = rx658_cur."!mark_fail"(0) - lt rx658_pos, -1, rx658_done - eq rx658_pos, -1, rx658_fail - jump $I10 - rx658_done: - rx658_cur."!cursor_fail"() - if_null rx658_debug, debug_663 - rx658_cur."!cursor_debug"("FAIL ", "method_def") - debug_663: - .return (rx658_cur) + if_null rx661_debug, debug_668 + rx661_cur."!cursor_debug"("NEXT", "method_def") + debug_668: + rx661_fail: + (rx661_rep, rx661_pos, $I10, $P10) = rx661_cur."!mark_fail"(0) + lt rx661_pos, -1, rx661_done + eq rx661_pos, -1, rx661_fail + jump $I10 + rx661_done: + rx661_cur."!cursor_fail"() + if_null rx661_debug, debug_669 + rx661_cur."!cursor_debug"("FAIL", "method_def") + debug_669: + .return (rx661_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__method_def" :subid("163_1282016529.10767") :method +.sub "!PREFIX__method_def" :subid("163_1284728478.15265") :method .annotate 'line', 4 - $P660 = self."!PREFIX__!subrule"("ws", "") - new $P661, "ResizablePMCArray" - push $P661, $P660 - .return ($P661) + $P663 = self."!PREFIX__!subrule"("ws", "") + new $P664, "ResizablePMCArray" + push $P664, $P663 + .return ($P664) .end .namespace ["NQP";"Grammar"] -.sub "multi_declarator" :subid("164_1282016529.10767") :method -.annotate 'line', 312 - $P678 = self."!protoregex"("multi_declarator") - .return ($P678) +.sub "multi_declarator" :subid("164_1284728478.15265") :method +.annotate 'line', 314 + $P684 = self."!protoregex"("multi_declarator") + .return ($P684) .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__multi_declarator" :subid("165_1282016529.10767") :method -.annotate 'line', 312 - $P680 = self."!PREFIX__!protoregex"("multi_declarator") - .return ($P680) +.sub "!PREFIX__multi_declarator" :subid("165_1284728478.15265") :method +.annotate 'line', 314 + $P686 = self."!PREFIX__!protoregex"("multi_declarator") + .return ($P686) .end .namespace ["NQP";"Grammar"] -.sub "multi_declarator:sym" :subid("166_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 314 - new $P682, "Undef" - .lex "$*MULTINESS", $P682 +.sub "multi_declarator:sym" :subid("166_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 316 + new $P688, "Undef" + .lex "$*MULTINESS", $P688 .annotate 'line', 4 - .local string rx683_tgt - .local int rx683_pos - .local int rx683_off - .local int rx683_eos - .local int rx683_rep - .local pmc rx683_cur - .local pmc rx683_debug - (rx683_cur, rx683_pos, rx683_tgt, $I10) = self."!cursor_start"() - getattribute rx683_debug, rx683_cur, "$!debug" - .lex unicode:"$\x{a2}", rx683_cur - .local pmc match - .lex "$/", match - length rx683_eos, rx683_tgt - gt rx683_pos, rx683_eos, rx683_done - set rx683_off, 0 - lt rx683_pos, 2, rx683_start - sub rx683_off, rx683_pos, 1 - substr rx683_tgt, rx683_tgt, rx683_off - rx683_start: - eq $I10, 1, rx683_restart - if_null rx683_debug, debug_664 - rx683_cur."!cursor_debug"("START ", "multi_declarator:sym") - debug_664: + .local string rx689_tgt + .local int rx689_pos + .local int rx689_off + .local int rx689_eos + .local int rx689_rep + .local pmc rx689_cur + .local pmc rx689_debug + (rx689_cur, rx689_pos, rx689_tgt, $I10) = self."!cursor_start"() + getattribute rx689_debug, rx689_cur, "$!debug" + .lex unicode:"$\x{a2}", rx689_cur + .local pmc match + .lex "$/", match + length rx689_eos, rx689_tgt + gt rx689_pos, rx689_eos, rx689_done + set rx689_off, 0 + lt rx689_pos, 2, rx689_start + sub rx689_off, rx689_pos, 1 + substr rx689_tgt, rx689_tgt, rx689_off + rx689_start: + eq $I10, 1, rx689_restart + if_null rx689_debug, debug_670 + rx689_cur."!cursor_debug"("START", "multi_declarator:sym") + debug_670: $I10 = self.'from'() - ne $I10, -1, rxscan687_done - goto rxscan687_scan - rxscan687_loop: - ($P10) = rx683_cur."from"() - inc $P10 - set rx683_pos, $P10 - ge rx683_pos, rx683_eos, rxscan687_done - rxscan687_scan: - 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 + ne $I10, -1, rxscan693_done + goto rxscan693_scan + rxscan693_loop: + ($P10) = rx689_cur."from"() + inc $P10 + set rx689_pos, $P10 + ge rx689_pos, rx689_eos, rxscan693_done + rxscan693_scan: + set_addr $I10, rxscan693_loop + rx689_cur."!mark_push"(0, rx689_pos, $I10) + rxscan693_done: +.annotate 'line', 316 + rx689_cur."!cursor_pos"(rx689_pos) + new $P694, "String" + assign $P694, "multi" + store_lex "$*MULTINESS", $P694 +.annotate 'line', 317 # rx subcapture "sym" - set_addr $I10, rxcap_689_fail - rx683_cur."!mark_push"(0, rx683_pos, $I10) + set_addr $I10, rxcap_695_fail + rx689_cur."!mark_push"(0, rx689_pos, $I10) # rx literal "multi" - add $I11, rx683_pos, 5 - gt $I11, rx683_eos, rx683_fail - sub $I11, rx683_pos, rx683_off - substr $S10, rx683_tgt, $I11, 5 - ne $S10, "multi", rx683_fail - add rx683_pos, 5 - set_addr $I10, rxcap_689_fail - ($I12, $I11) = rx683_cur."!mark_peek"($I10) - rx683_cur."!cursor_pos"($I11) - ($P10) = rx683_cur."!cursor_start"() - $P10."!cursor_pass"(rx683_pos, "") - rx683_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx689_pos, 5 + gt $I11, rx689_eos, rx689_fail + sub $I11, rx689_pos, rx689_off + substr $S10, rx689_tgt, $I11, 5 + ne $S10, "multi", rx689_fail + add rx689_pos, 5 + set_addr $I10, rxcap_695_fail + ($I12, $I11) = rx689_cur."!mark_peek"($I10) + rx689_cur."!cursor_pos"($I11) + ($P10) = rx689_cur."!cursor_start"() + $P10."!cursor_pass"(rx689_pos, "") + rx689_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_689_done - rxcap_689_fail: - goto rx683_fail - rxcap_689_done: -.annotate 'line', 316 + goto rxcap_695_done + rxcap_695_fail: + goto rx689_fail + rxcap_695_done: +.annotate 'line', 318 # rx subrule "ws" subtype=method negate= - rx683_cur."!cursor_pos"(rx683_pos) - $P10 = rx683_cur."ws"() - unless $P10, rx683_fail - rx683_pos = $P10."pos"() - alt690_0: - set_addr $I10, alt690_1 - rx683_cur."!mark_push"(0, rx683_pos, $I10) + rx689_cur."!cursor_pos"(rx689_pos) + $P10 = rx689_cur."ws"() + unless $P10, rx689_fail + rx689_pos = $P10."pos"() + alt696_0: + set_addr $I10, alt696_1 + rx689_cur."!mark_push"(0, rx689_pos, $I10) # rx subrule "declarator" subtype=capture negate= - rx683_cur."!cursor_pos"(rx683_pos) - $P10 = rx683_cur."declarator"() - unless $P10, rx683_fail - rx683_cur."!mark_push"(0, -1, 0, $P10) + rx689_cur."!cursor_pos"(rx689_pos) + $P10 = rx689_cur."declarator"() + unless $P10, rx689_fail + rx689_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("declarator") - rx683_pos = $P10."pos"() - goto alt690_end - alt690_1: - set_addr $I10, alt690_2 - rx683_cur."!mark_push"(0, rx683_pos, $I10) + rx689_pos = $P10."pos"() + goto alt696_end + alt696_1: + set_addr $I10, alt696_2 + rx689_cur."!mark_push"(0, rx689_pos, $I10) # rx subrule "routine_def" subtype=capture negate= - rx683_cur."!cursor_pos"(rx683_pos) - $P10 = rx683_cur."routine_def"() - unless $P10, rx683_fail - rx683_cur."!mark_push"(0, -1, 0, $P10) + rx689_cur."!cursor_pos"(rx689_pos) + $P10 = rx689_cur."routine_def"() + unless $P10, rx689_fail + rx689_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("routine_def") - rx683_pos = $P10."pos"() - goto alt690_end - alt690_2: + rx689_pos = $P10."pos"() + goto alt696_end + alt696_2: # rx subrule "panic" subtype=method negate= - rx683_cur."!cursor_pos"(rx683_pos) - $P10 = rx683_cur."panic"("Malformed multi") - unless $P10, rx683_fail - rx683_pos = $P10."pos"() - alt690_end: -.annotate 'line', 313 - # rx pass - rx683_cur."!cursor_pass"(rx683_pos, "multi_declarator:sym") - if_null rx683_debug, debug_665 - rx683_cur."!cursor_debug"("PASS ", "multi_declarator:sym", " at pos=", rx683_pos) - debug_665: - .return (rx683_cur) - rx683_restart: + rx689_cur."!cursor_pos"(rx689_pos) + $P10 = rx689_cur."panic"("Malformed multi") + unless $P10, rx689_fail + rx689_pos = $P10."pos"() + alt696_end: +.annotate 'line', 315 + # rx pass + rx689_cur."!cursor_pass"(rx689_pos, "multi_declarator:sym") + if_null rx689_debug, debug_671 + rx689_cur."!cursor_debug"("PASS", "multi_declarator:sym", " at pos=", rx689_pos) + debug_671: + .return (rx689_cur) + rx689_restart: .annotate 'line', 4 - if_null rx683_debug, debug_666 - rx683_cur."!cursor_debug"("NEXT ", "multi_declarator:sym") - debug_666: - rx683_fail: - (rx683_rep, rx683_pos, $I10, $P10) = rx683_cur."!mark_fail"(0) - lt rx683_pos, -1, rx683_done - eq rx683_pos, -1, rx683_fail - jump $I10 - rx683_done: - rx683_cur."!cursor_fail"() - if_null rx683_debug, debug_667 - rx683_cur."!cursor_debug"("FAIL ", "multi_declarator:sym") - debug_667: - .return (rx683_cur) + if_null rx689_debug, debug_672 + rx689_cur."!cursor_debug"("NEXT", "multi_declarator:sym") + debug_672: + rx689_fail: + (rx689_rep, rx689_pos, $I10, $P10) = rx689_cur."!mark_fail"(0) + lt rx689_pos, -1, rx689_done + eq rx689_pos, -1, rx689_fail + jump $I10 + rx689_done: + rx689_cur."!cursor_fail"() + if_null rx689_debug, debug_673 + rx689_cur."!cursor_debug"("FAIL", "multi_declarator:sym") + debug_673: + .return (rx689_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__multi_declarator:sym" :subid("167_1282016529.10767") :method +.sub "!PREFIX__multi_declarator:sym" :subid("167_1284728478.15265") :method .annotate 'line', 4 - $P685 = self."!PREFIX__!subrule"("ws", "multi") - new $P686, "ResizablePMCArray" - push $P686, $P685 - .return ($P686) + $P691 = self."!PREFIX__!subrule"("ws", "multi") + new $P692, "ResizablePMCArray" + push $P692, $P691 + .return ($P692) .end .namespace ["NQP";"Grammar"] -.sub "multi_declarator:sym" :subid("168_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 319 - new $P692, "Undef" - .lex "$*MULTINESS", $P692 -.annotate 'line', 4 - .local string rx693_tgt - .local int rx693_pos - .local int rx693_off - .local int rx693_eos - .local int rx693_rep - .local pmc rx693_cur - .local pmc rx693_debug - (rx693_cur, rx693_pos, rx693_tgt, $I10) = self."!cursor_start"() - getattribute rx693_debug, rx693_cur, "$!debug" - .lex unicode:"$\x{a2}", rx693_cur - .local pmc match - .lex "$/", match - length rx693_eos, rx693_tgt - gt rx693_pos, rx693_eos, rx693_done - set rx693_off, 0 - lt rx693_pos, 2, rx693_start - sub rx693_off, rx693_pos, 1 - substr rx693_tgt, rx693_tgt, rx693_off - rx693_start: - eq $I10, 1, rx693_restart - if_null rx693_debug, debug_668 - rx693_cur."!cursor_debug"("START ", "multi_declarator:sym") - debug_668: +.sub "multi_declarator:sym" :subid("168_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 321 + new $P698, "Undef" + .lex "$*MULTINESS", $P698 +.annotate 'line', 4 + .local string rx699_tgt + .local int rx699_pos + .local int rx699_off + .local int rx699_eos + .local int rx699_rep + .local pmc rx699_cur + .local pmc rx699_debug + (rx699_cur, rx699_pos, rx699_tgt, $I10) = self."!cursor_start"() + getattribute rx699_debug, rx699_cur, "$!debug" + .lex unicode:"$\x{a2}", rx699_cur + .local pmc match + .lex "$/", match + length rx699_eos, rx699_tgt + gt rx699_pos, rx699_eos, rx699_done + set rx699_off, 0 + lt rx699_pos, 2, rx699_start + sub rx699_off, rx699_pos, 1 + substr rx699_tgt, rx699_tgt, rx699_off + rx699_start: + eq $I10, 1, rx699_restart + if_null rx699_debug, debug_674 + rx699_cur."!cursor_debug"("START", "multi_declarator:sym") + debug_674: $I10 = self.'from'() - ne $I10, -1, rxscan697_done - goto rxscan697_scan - rxscan697_loop: - ($P10) = rx693_cur."from"() - inc $P10 - set rx693_pos, $P10 - ge rx693_pos, rx693_eos, rxscan697_done - rxscan697_scan: - 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 + ne $I10, -1, rxscan703_done + goto rxscan703_scan + rxscan703_loop: + ($P10) = rx699_cur."from"() + inc $P10 + set rx699_pos, $P10 + ge rx699_pos, rx699_eos, rxscan703_done + rxscan703_scan: + set_addr $I10, rxscan703_loop + rx699_cur."!mark_push"(0, rx699_pos, $I10) + rxscan703_done: +.annotate 'line', 321 + rx699_cur."!cursor_pos"(rx699_pos) + new $P704, "String" + assign $P704, "" + store_lex "$*MULTINESS", $P704 +.annotate 'line', 322 # rx subrule "declarator" subtype=capture negate= - rx693_cur."!cursor_pos"(rx693_pos) - $P10 = rx693_cur."declarator"() - unless $P10, rx693_fail - rx693_cur."!mark_push"(0, -1, 0, $P10) + rx699_cur."!cursor_pos"(rx699_pos) + $P10 = rx699_cur."declarator"() + unless $P10, rx699_fail + rx699_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("declarator") - rx693_pos = $P10."pos"() -.annotate 'line', 318 + rx699_pos = $P10."pos"() +.annotate 'line', 320 # rx pass - rx693_cur."!cursor_pass"(rx693_pos, "multi_declarator:sym") - if_null rx693_debug, debug_669 - rx693_cur."!cursor_debug"("PASS ", "multi_declarator:sym", " at pos=", rx693_pos) - debug_669: - .return (rx693_cur) - rx693_restart: + rx699_cur."!cursor_pass"(rx699_pos, "multi_declarator:sym") + if_null rx699_debug, debug_675 + rx699_cur."!cursor_debug"("PASS", "multi_declarator:sym", " at pos=", rx699_pos) + debug_675: + .return (rx699_cur) + rx699_restart: .annotate 'line', 4 - if_null rx693_debug, debug_670 - rx693_cur."!cursor_debug"("NEXT ", "multi_declarator:sym") - debug_670: - rx693_fail: - (rx693_rep, rx693_pos, $I10, $P10) = rx693_cur."!mark_fail"(0) - lt rx693_pos, -1, rx693_done - eq rx693_pos, -1, rx693_fail - jump $I10 - rx693_done: - rx693_cur."!cursor_fail"() - if_null rx693_debug, debug_671 - rx693_cur."!cursor_debug"("FAIL ", "multi_declarator:sym") - debug_671: - .return (rx693_cur) + if_null rx699_debug, debug_676 + rx699_cur."!cursor_debug"("NEXT", "multi_declarator:sym") + debug_676: + rx699_fail: + (rx699_rep, rx699_pos, $I10, $P10) = rx699_cur."!mark_fail"(0) + lt rx699_pos, -1, rx699_done + eq rx699_pos, -1, rx699_fail + jump $I10 + rx699_done: + rx699_cur."!cursor_fail"() + if_null rx699_debug, debug_677 + rx699_cur."!cursor_debug"("FAIL", "multi_declarator:sym") + debug_677: + .return (rx699_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__multi_declarator:sym" :subid("169_1282016529.10767") :method +.sub "!PREFIX__multi_declarator:sym" :subid("169_1284728478.15265") :method .annotate 'line', 4 - $P695 = self."!PREFIX__!subrule"("declarator", "") - new $P696, "ResizablePMCArray" - push $P696, $P695 - .return ($P696) + $P701 = self."!PREFIX__!subrule"("declarator", "") + new $P702, "ResizablePMCArray" + push $P702, $P701 + .return ($P702) .end .namespace ["NQP";"Grammar"] -.sub "signature" :subid("170_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "signature" :subid("170_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx700_tgt - .local int rx700_pos - .local int rx700_off - .local int rx700_eos - .local int rx700_rep - .local pmc rx700_cur - .local pmc rx700_debug - (rx700_cur, rx700_pos, rx700_tgt, $I10) = self."!cursor_start"() - rx700_cur."!cursor_caparray"("parameter") - getattribute rx700_debug, rx700_cur, "$!debug" - .lex unicode:"$\x{a2}", rx700_cur - .local pmc match - .lex "$/", match - length rx700_eos, rx700_tgt - gt rx700_pos, rx700_eos, rx700_done - set rx700_off, 0 - lt rx700_pos, 2, rx700_start - sub rx700_off, rx700_pos, 1 - substr rx700_tgt, rx700_tgt, rx700_off - rx700_start: - eq $I10, 1, rx700_restart - if_null rx700_debug, debug_672 - rx700_cur."!cursor_debug"("START ", "signature") - debug_672: + .local string rx706_tgt + .local int rx706_pos + .local int rx706_off + .local int rx706_eos + .local int rx706_rep + .local pmc rx706_cur + .local pmc rx706_debug + (rx706_cur, rx706_pos, rx706_tgt, $I10) = self."!cursor_start"() + rx706_cur."!cursor_caparray"("parameter") + getattribute rx706_debug, rx706_cur, "$!debug" + .lex unicode:"$\x{a2}", rx706_cur + .local pmc match + .lex "$/", match + length rx706_eos, rx706_tgt + gt rx706_pos, rx706_eos, rx706_done + set rx706_off, 0 + lt rx706_pos, 2, rx706_start + sub rx706_off, rx706_pos, 1 + substr rx706_tgt, rx706_tgt, rx706_off + rx706_start: + eq $I10, 1, rx706_restart + if_null rx706_debug, debug_678 + rx706_cur."!cursor_debug"("START", "signature") + debug_678: $I10 = self.'from'() - ne $I10, -1, rxscan703_done - goto rxscan703_scan - rxscan703_loop: - ($P10) = rx700_cur."from"() - inc $P10 - set rx700_pos, $P10 - ge rx700_pos, rx700_eos, rxscan703_done - rxscan703_scan: - 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) - rxquantr704_loop: - # rx rxquantr705 ** 1..* - set_addr $I10, rxquantr705_done - rx700_cur."!mark_push"(0, -1, $I10) - rxquantr705_loop: - # rx subrule "ws" subtype=method negate= - rx700_cur."!cursor_pos"(rx700_pos) - $P10 = rx700_cur."ws"() - unless $P10, rx700_fail - rx700_pos = $P10."pos"() + ne $I10, -1, rxscan709_done + goto rxscan709_scan + rxscan709_loop: + ($P10) = rx706_cur."from"() + inc $P10 + set rx706_pos, $P10 + ge rx706_pos, rx706_eos, rxscan709_done + rxscan709_scan: + set_addr $I10, rxscan709_loop + rx706_cur."!mark_push"(0, rx706_pos, $I10) + rxscan709_done: +.annotate 'line', 325 + # rx rxquantr710 ** 0..1 + set_addr $I10, rxquantr710_done + rx706_cur."!mark_push"(0, rx706_pos, $I10) + rxquantr710_loop: + # rx rxquantr711 ** 1..* + set_addr $I10, rxquantr711_done + rx706_cur."!mark_push"(0, -1, $I10) + rxquantr711_loop: + # rx subrule "ws" subtype=method negate= + rx706_cur."!cursor_pos"(rx706_pos) + $P10 = rx706_cur."ws"() + unless $P10, rx706_fail + rx706_pos = $P10."pos"() # rx subrule "parameter" subtype=capture negate= - rx700_cur."!cursor_pos"(rx700_pos) - $P10 = rx700_cur."parameter"() - unless $P10, rx700_fail - rx700_cur."!mark_push"(0, -1, 0, $P10) + rx706_cur."!cursor_pos"(rx706_pos) + $P10 = rx706_cur."parameter"() + unless $P10, rx706_fail + rx706_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("parameter") - rx700_pos = $P10."pos"() + rx706_pos = $P10."pos"() # rx subrule "ws" subtype=method negate= - rx700_cur."!cursor_pos"(rx700_pos) - $P10 = rx700_cur."ws"() - unless $P10, rx700_fail - rx700_pos = $P10."pos"() - set_addr $I10, rxquantr705_done - (rx700_rep) = rx700_cur."!mark_commit"($I10) - set_addr $I10, rxquantr705_done - rx700_cur."!mark_push"(rx700_rep, rx700_pos, $I10) + rx706_cur."!cursor_pos"(rx706_pos) + $P10 = rx706_cur."ws"() + unless $P10, rx706_fail + rx706_pos = $P10."pos"() + set_addr $I10, rxquantr711_done + (rx706_rep) = rx706_cur."!mark_commit"($I10) + set_addr $I10, rxquantr711_done + rx706_cur."!mark_push"(rx706_rep, rx706_pos, $I10) # rx literal "," - add $I11, rx700_pos, 1 - gt $I11, rx700_eos, rx700_fail - sub $I11, rx700_pos, rx700_off - ord $I11, rx700_tgt, $I11 - ne $I11, 44, rx700_fail - add rx700_pos, 1 - goto rxquantr705_loop - rxquantr705_done: - set_addr $I10, rxquantr704_done - (rx700_rep) = rx700_cur."!mark_commit"($I10) - rxquantr704_done: - # rx pass - rx700_cur."!cursor_pass"(rx700_pos, "signature") - if_null rx700_debug, debug_673 - rx700_cur."!cursor_debug"("PASS ", "signature", " at pos=", rx700_pos) - debug_673: - .return (rx700_cur) - rx700_restart: + add $I11, rx706_pos, 1 + gt $I11, rx706_eos, rx706_fail + sub $I11, rx706_pos, rx706_off + ord $I11, rx706_tgt, $I11 + ne $I11, 44, rx706_fail + add rx706_pos, 1 + goto rxquantr711_loop + rxquantr711_done: + set_addr $I10, rxquantr710_done + (rx706_rep) = rx706_cur."!mark_commit"($I10) + rxquantr710_done: + # rx pass + rx706_cur."!cursor_pass"(rx706_pos, "signature") + if_null rx706_debug, debug_679 + rx706_cur."!cursor_debug"("PASS", "signature", " at pos=", rx706_pos) + debug_679: + .return (rx706_cur) + rx706_restart: .annotate 'line', 4 - if_null rx700_debug, debug_674 - rx700_cur."!cursor_debug"("NEXT ", "signature") - debug_674: - rx700_fail: - (rx700_rep, rx700_pos, $I10, $P10) = rx700_cur."!mark_fail"(0) - lt rx700_pos, -1, rx700_done - eq rx700_pos, -1, rx700_fail - jump $I10 - rx700_done: - rx700_cur."!cursor_fail"() - if_null rx700_debug, debug_675 - rx700_cur."!cursor_debug"("FAIL ", "signature") - debug_675: - .return (rx700_cur) + if_null rx706_debug, debug_680 + rx706_cur."!cursor_debug"("NEXT", "signature") + debug_680: + rx706_fail: + (rx706_rep, rx706_pos, $I10, $P10) = rx706_cur."!mark_fail"(0) + lt rx706_pos, -1, rx706_done + eq rx706_pos, -1, rx706_fail + jump $I10 + rx706_done: + rx706_cur."!cursor_fail"() + if_null rx706_debug, debug_681 + rx706_cur."!cursor_debug"("FAIL", "signature") + debug_681: + .return (rx706_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__signature" :subid("171_1282016529.10767") :method +.sub "!PREFIX__signature" :subid("171_1284728478.15265") :method .annotate 'line', 4 - new $P702, "ResizablePMCArray" - push $P702, "" - .return ($P702) + new $P708, "ResizablePMCArray" + push $P708, "" + .return ($P708) .end .namespace ["NQP";"Grammar"] -.sub "parameter" :subid("172_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "parameter" :subid("172_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx707_tgt - .local int rx707_pos - .local int rx707_off - .local int rx707_eos - .local int rx707_rep - .local pmc rx707_cur - .local pmc rx707_debug - (rx707_cur, rx707_pos, rx707_tgt, $I10) = self."!cursor_start"() - rx707_cur."!cursor_caparray"("default_value", "typename") - getattribute rx707_debug, rx707_cur, "$!debug" - .lex unicode:"$\x{a2}", rx707_cur - .local pmc match - .lex "$/", match - length rx707_eos, rx707_tgt - gt rx707_pos, rx707_eos, rx707_done - set rx707_off, 0 - lt rx707_pos, 2, rx707_start - sub rx707_off, rx707_pos, 1 - substr rx707_tgt, rx707_tgt, rx707_off - rx707_start: - eq $I10, 1, rx707_restart - if_null rx707_debug, debug_676 - rx707_cur."!cursor_debug"("START ", "parameter") - debug_676: + .local string rx713_tgt + .local int rx713_pos + .local int rx713_off + .local int rx713_eos + .local int rx713_rep + .local pmc rx713_cur + .local pmc rx713_debug + (rx713_cur, rx713_pos, rx713_tgt, $I10) = self."!cursor_start"() + rx713_cur."!cursor_caparray"("default_value", "typename") + getattribute rx713_debug, rx713_cur, "$!debug" + .lex unicode:"$\x{a2}", rx713_cur + .local pmc match + .lex "$/", match + length rx713_eos, rx713_tgt + gt rx713_pos, rx713_eos, rx713_done + set rx713_off, 0 + lt rx713_pos, 2, rx713_start + sub rx713_off, rx713_pos, 1 + substr rx713_tgt, rx713_tgt, rx713_off + rx713_start: + eq $I10, 1, rx713_restart + if_null rx713_debug, debug_682 + rx713_cur."!cursor_debug"("START", "parameter") + debug_682: $I10 = self.'from'() - ne $I10, -1, rxscan710_done - goto rxscan710_scan - rxscan710_loop: - ($P10) = rx707_cur."from"() - inc $P10 - set rx707_pos, $P10 - ge rx707_pos, rx707_eos, rxscan710_done - rxscan710_scan: - 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) - rxquantr711_loop: + ne $I10, -1, rxscan716_done + goto rxscan716_scan + rxscan716_loop: + ($P10) = rx713_cur."from"() + inc $P10 + set rx713_pos, $P10 + ge rx713_pos, rx713_eos, rxscan716_done + rxscan716_scan: + set_addr $I10, rxscan716_loop + rx713_cur."!mark_push"(0, rx713_pos, $I10) + rxscan716_done: +.annotate 'line', 328 + # rx rxquantr717 ** 0..* + set_addr $I10, rxquantr717_done + rx713_cur."!mark_push"(0, rx713_pos, $I10) + rxquantr717_loop: # rx subrule "typename" subtype=capture negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."typename"() - unless $P10, rx707_fail - rx707_cur."!mark_push"(0, -1, 0, $P10) + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."typename"() + unless $P10, rx713_fail + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("typename") - rx707_pos = $P10."pos"() + rx713_pos = $P10."pos"() # rx subrule "ws" subtype=method negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."ws"() - unless $P10, rx707_fail - rx707_pos = $P10."pos"() - set_addr $I10, rxquantr711_done - (rx707_rep) = rx707_cur."!mark_commit"($I10) - set_addr $I10, rxquantr711_done - rx707_cur."!mark_push"(rx707_rep, rx707_pos, $I10) - 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 + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."ws"() + unless $P10, rx713_fail + rx713_pos = $P10."pos"() + set_addr $I10, rxquantr717_done + (rx713_rep) = rx713_cur."!mark_commit"($I10) + set_addr $I10, rxquantr717_done + rx713_cur."!mark_push"(rx713_rep, rx713_pos, $I10) + goto rxquantr717_loop + rxquantr717_done: + alt718_0: +.annotate 'line', 329 + set_addr $I10, alt718_1 + rx713_cur."!mark_push"(0, rx713_pos, $I10) +.annotate 'line', 330 # rx subcapture "quant" - set_addr $I10, rxcap_713_fail - rx707_cur."!mark_push"(0, rx707_pos, $I10) + set_addr $I10, rxcap_719_fail + rx713_cur."!mark_push"(0, rx713_pos, $I10) # rx literal "*" - add $I11, rx707_pos, 1 - gt $I11, rx707_eos, rx707_fail - sub $I11, rx707_pos, rx707_off - ord $I11, rx707_tgt, $I11 - ne $I11, 42, rx707_fail - add rx707_pos, 1 - set_addr $I10, rxcap_713_fail - ($I12, $I11) = rx707_cur."!mark_peek"($I10) - rx707_cur."!cursor_pos"($I11) - ($P10) = rx707_cur."!cursor_start"() - $P10."!cursor_pass"(rx707_pos, "") - rx707_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx713_pos, 1 + gt $I11, rx713_eos, rx713_fail + sub $I11, rx713_pos, rx713_off + ord $I11, rx713_tgt, $I11 + ne $I11, 42, rx713_fail + add rx713_pos, 1 + set_addr $I10, rxcap_719_fail + ($I12, $I11) = rx713_cur."!mark_peek"($I10) + rx713_cur."!cursor_pos"($I11) + ($P10) = rx713_cur."!cursor_start"() + $P10."!cursor_pass"(rx713_pos, "") + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quant") - goto rxcap_713_done - rxcap_713_fail: - goto rx707_fail - rxcap_713_done: + goto rxcap_719_done + rxcap_719_fail: + goto rx713_fail + rxcap_719_done: # rx subrule "param_var" subtype=capture negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."param_var"() - unless $P10, rx707_fail - rx707_cur."!mark_push"(0, -1, 0, $P10) + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."param_var"() + unless $P10, rx713_fail + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("param_var") - rx707_pos = $P10."pos"() - goto alt712_end - alt712_1: - alt714_0: -.annotate 'line', 329 - set_addr $I10, alt714_1 - rx707_cur."!mark_push"(0, rx707_pos, $I10) + rx713_pos = $P10."pos"() + goto alt718_end + alt718_1: + alt720_0: +.annotate 'line', 331 + set_addr $I10, alt720_1 + rx713_cur."!mark_push"(0, rx713_pos, $I10) # rx subrule "param_var" subtype=capture negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."param_var"() - unless $P10, rx707_fail - rx707_cur."!mark_push"(0, -1, 0, $P10) + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."param_var"() + unless $P10, rx713_fail + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("param_var") - rx707_pos = $P10."pos"() - goto alt714_end - alt714_1: + rx713_pos = $P10."pos"() + goto alt720_end + alt720_1: # rx subrule "named_param" subtype=capture negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."named_param"() - unless $P10, rx707_fail - rx707_cur."!mark_push"(0, -1, 0, $P10) + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."named_param"() + unless $P10, rx713_fail + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("named_param") - rx707_pos = $P10."pos"() - alt714_end: + rx713_pos = $P10."pos"() + alt720_end: # rx subcapture "quant" - set_addr $I10, rxcap_716_fail - rx707_cur."!mark_push"(0, rx707_pos, $I10) - alt715_0: - set_addr $I10, alt715_1 - rx707_cur."!mark_push"(0, rx707_pos, $I10) + set_addr $I10, rxcap_722_fail + rx713_cur."!mark_push"(0, rx713_pos, $I10) + alt721_0: + set_addr $I10, alt721_1 + rx713_cur."!mark_push"(0, rx713_pos, $I10) # rx literal "?" - add $I11, rx707_pos, 1 - gt $I11, rx707_eos, rx707_fail - sub $I11, rx707_pos, rx707_off - ord $I11, rx707_tgt, $I11 - ne $I11, 63, rx707_fail - add rx707_pos, 1 - goto alt715_end - alt715_1: - set_addr $I10, alt715_2 - rx707_cur."!mark_push"(0, rx707_pos, $I10) + add $I11, rx713_pos, 1 + gt $I11, rx713_eos, rx713_fail + sub $I11, rx713_pos, rx713_off + ord $I11, rx713_tgt, $I11 + ne $I11, 63, rx713_fail + add rx713_pos, 1 + goto alt721_end + alt721_1: + set_addr $I10, alt721_2 + rx713_cur."!mark_push"(0, rx713_pos, $I10) # rx literal "!" - add $I11, rx707_pos, 1 - gt $I11, rx707_eos, rx707_fail - sub $I11, rx707_pos, rx707_off - ord $I11, rx707_tgt, $I11 - ne $I11, 33, rx707_fail - add rx707_pos, 1 - goto alt715_end - alt715_2: - alt715_end: - set_addr $I10, rxcap_716_fail - ($I12, $I11) = rx707_cur."!mark_peek"($I10) - rx707_cur."!cursor_pos"($I11) - ($P10) = rx707_cur."!cursor_start"() - $P10."!cursor_pass"(rx707_pos, "") - rx707_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx713_pos, 1 + gt $I11, rx713_eos, rx713_fail + sub $I11, rx713_pos, rx713_off + ord $I11, rx713_tgt, $I11 + ne $I11, 33, rx713_fail + add rx713_pos, 1 + goto alt721_end + alt721_2: + alt721_end: + set_addr $I10, rxcap_722_fail + ($I12, $I11) = rx713_cur."!mark_peek"($I10) + rx713_cur."!cursor_pos"($I11) + ($P10) = rx713_cur."!cursor_start"() + $P10."!cursor_pass"(rx713_pos, "") + rx713_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quant") - goto rxcap_716_done - rxcap_716_fail: - 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) - rxquantr717_loop: + goto rxcap_722_done + rxcap_722_fail: + goto rx713_fail + rxcap_722_done: + alt718_end: +.annotate 'line', 333 + # rx rxquantr723 ** 0..1 + set_addr $I10, rxquantr723_done + rx713_cur."!mark_push"(0, rx713_pos, $I10) + rxquantr723_loop: # rx subrule "default_value" subtype=capture negate= - rx707_cur."!cursor_pos"(rx707_pos) - $P10 = rx707_cur."default_value"() - unless $P10, rx707_fail - goto rxsubrule718_pass - rxsubrule718_back: + rx713_cur."!cursor_pos"(rx713_pos) + $P10 = rx713_cur."default_value"() + unless $P10, rx713_fail + goto rxsubrule724_pass + rxsubrule724_back: $P10 = $P10."!cursor_next"() - unless $P10, rx707_fail - rxsubrule718_pass: - set_addr $I10, rxsubrule718_back - rx707_cur."!mark_push"(0, rx707_pos, $I10, $P10) + unless $P10, rx713_fail + rxsubrule724_pass: + set_addr $I10, rxsubrule724_back + rx713_cur."!mark_push"(0, rx713_pos, $I10, $P10) $P10."!cursor_names"("default_value") - rx707_pos = $P10."pos"() - set_addr $I10, rxquantr717_done - (rx707_rep) = rx707_cur."!mark_commit"($I10) - rxquantr717_done: -.annotate 'line', 325 + rx713_pos = $P10."pos"() + set_addr $I10, rxquantr723_done + (rx713_rep) = rx713_cur."!mark_commit"($I10) + rxquantr723_done: +.annotate 'line', 327 # rx pass - rx707_cur."!cursor_pass"(rx707_pos, "parameter") - if_null rx707_debug, debug_677 - rx707_cur."!cursor_debug"("PASS ", "parameter", " at pos=", rx707_pos) - debug_677: - .return (rx707_cur) - rx707_restart: + rx713_cur."!cursor_pass"(rx713_pos, "parameter") + if_null rx713_debug, debug_683 + rx713_cur."!cursor_debug"("PASS", "parameter", " at pos=", rx713_pos) + debug_683: + .return (rx713_cur) + rx713_restart: .annotate 'line', 4 - if_null rx707_debug, debug_678 - rx707_cur."!cursor_debug"("NEXT ", "parameter") - debug_678: - rx707_fail: - (rx707_rep, rx707_pos, $I10, $P10) = rx707_cur."!mark_fail"(0) - lt rx707_pos, -1, rx707_done - eq rx707_pos, -1, rx707_fail - jump $I10 - rx707_done: - rx707_cur."!cursor_fail"() - if_null rx707_debug, debug_679 - rx707_cur."!cursor_debug"("FAIL ", "parameter") - debug_679: - .return (rx707_cur) + if_null rx713_debug, debug_684 + rx713_cur."!cursor_debug"("NEXT", "parameter") + debug_684: + rx713_fail: + (rx713_rep, rx713_pos, $I10, $P10) = rx713_cur."!mark_fail"(0) + lt rx713_pos, -1, rx713_done + eq rx713_pos, -1, rx713_fail + jump $I10 + rx713_done: + rx713_cur."!cursor_fail"() + if_null rx713_debug, debug_685 + rx713_cur."!cursor_debug"("FAIL", "parameter") + debug_685: + .return (rx713_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__parameter" :subid("173_1282016529.10767") :method +.sub "!PREFIX__parameter" :subid("173_1284728478.15265") :method .annotate 'line', 4 - new $P709, "ResizablePMCArray" - push $P709, "" - .return ($P709) + new $P715, "ResizablePMCArray" + push $P715, "" + .return ($P715) .end .namespace ["NQP";"Grammar"] -.sub "param_var" :subid("174_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "param_var" :subid("174_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx720_tgt - .local int rx720_pos - .local int rx720_off - .local int rx720_eos - .local int rx720_rep - .local pmc rx720_cur - .local pmc rx720_debug - (rx720_cur, rx720_pos, rx720_tgt, $I10) = self."!cursor_start"() - rx720_cur."!cursor_caparray"("twigil") - getattribute rx720_debug, rx720_cur, "$!debug" - .lex unicode:"$\x{a2}", rx720_cur + .local string rx726_tgt + .local int rx726_pos + .local int rx726_off + .local int rx726_eos + .local int rx726_rep + .local pmc rx726_cur + .local pmc rx726_debug + (rx726_cur, rx726_pos, rx726_tgt, $I10) = self."!cursor_start"() + rx726_cur."!cursor_caparray"("twigil") + getattribute rx726_debug, rx726_cur, "$!debug" + .lex unicode:"$\x{a2}", rx726_cur .local pmc match .lex "$/", match - length rx720_eos, rx720_tgt - gt rx720_pos, rx720_eos, rx720_done - set rx720_off, 0 - lt rx720_pos, 2, rx720_start - sub rx720_off, rx720_pos, 1 - substr rx720_tgt, rx720_tgt, rx720_off - rx720_start: - eq $I10, 1, rx720_restart - if_null rx720_debug, debug_680 - rx720_cur."!cursor_debug"("START ", "param_var") - debug_680: + length rx726_eos, rx726_tgt + gt rx726_pos, rx726_eos, rx726_done + set rx726_off, 0 + lt rx726_pos, 2, rx726_start + sub rx726_off, rx726_pos, 1 + substr rx726_tgt, rx726_tgt, rx726_off + rx726_start: + eq $I10, 1, rx726_restart + if_null rx726_debug, debug_686 + rx726_cur."!cursor_debug"("START", "param_var") + debug_686: $I10 = self.'from'() - ne $I10, -1, rxscan724_done - goto rxscan724_scan - rxscan724_loop: - ($P10) = rx720_cur."from"() - inc $P10 - set rx720_pos, $P10 - ge rx720_pos, rx720_eos, rxscan724_done - rxscan724_scan: - set_addr $I10, rxscan724_loop - rx720_cur."!mark_push"(0, rx720_pos, $I10) - rxscan724_done: -.annotate 'line', 335 + ne $I10, -1, rxscan730_done + goto rxscan730_scan + rxscan730_loop: + ($P10) = rx726_cur."from"() + inc $P10 + set rx726_pos, $P10 + ge rx726_pos, rx726_eos, rxscan730_done + rxscan730_scan: + set_addr $I10, rxscan730_loop + rx726_cur."!mark_push"(0, rx726_pos, $I10) + rxscan730_done: +.annotate 'line', 337 # rx subrule "sigil" subtype=capture negate= - rx720_cur."!cursor_pos"(rx720_pos) - $P10 = rx720_cur."sigil"() - unless $P10, rx720_fail - rx720_cur."!mark_push"(0, -1, 0, $P10) + rx726_cur."!cursor_pos"(rx726_pos) + $P10 = rx726_cur."sigil"() + unless $P10, rx726_fail + rx726_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sigil") - rx720_pos = $P10."pos"() - # rx rxquantr725 ** 0..1 - set_addr $I10, rxquantr725_done - rx720_cur."!mark_push"(0, rx720_pos, $I10) - rxquantr725_loop: + rx726_pos = $P10."pos"() + # rx rxquantr731 ** 0..1 + set_addr $I10, rxquantr731_done + rx726_cur."!mark_push"(0, rx726_pos, $I10) + rxquantr731_loop: # rx subrule "twigil" subtype=capture negate= - rx720_cur."!cursor_pos"(rx720_pos) - $P10 = rx720_cur."twigil"() - unless $P10, rx720_fail - goto rxsubrule726_pass - rxsubrule726_back: + rx726_cur."!cursor_pos"(rx726_pos) + $P10 = rx726_cur."twigil"() + unless $P10, rx726_fail + goto rxsubrule732_pass + rxsubrule732_back: $P10 = $P10."!cursor_next"() - unless $P10, rx720_fail - rxsubrule726_pass: - set_addr $I10, rxsubrule726_back - rx720_cur."!mark_push"(0, rx720_pos, $I10, $P10) + unless $P10, rx726_fail + rxsubrule732_pass: + set_addr $I10, rxsubrule732_back + rx726_cur."!mark_push"(0, rx726_pos, $I10, $P10) $P10."!cursor_names"("twigil") - rx720_pos = $P10."pos"() - set_addr $I10, rxquantr725_done - (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) + rx726_pos = $P10."pos"() + set_addr $I10, rxquantr731_done + (rx726_rep) = rx726_cur."!mark_commit"($I10) + rxquantr731_done: + alt733_0: +.annotate 'line', 338 + set_addr $I10, alt733_1 + rx726_cur."!mark_push"(0, rx726_pos, $I10) # rx subrule "ident" subtype=capture negate= - rx720_cur."!cursor_pos"(rx720_pos) - $P10 = rx720_cur."ident"() - unless $P10, rx720_fail - rx720_cur."!mark_push"(0, -1, 0, $P10) + rx726_cur."!cursor_pos"(rx726_pos) + $P10 = rx726_cur."ident"() + unless $P10, rx726_fail + rx726_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("name") - rx720_pos = $P10."pos"() - goto alt727_end - alt727_1: + rx726_pos = $P10."pos"() + goto alt733_end + alt733_1: # rx subcapture "name" - set_addr $I10, rxcap_728_fail - rx720_cur."!mark_push"(0, rx720_pos, $I10) + set_addr $I10, rxcap_734_fail + rx726_cur."!mark_push"(0, rx726_pos, $I10) # rx enumcharlist negate=0 - ge rx720_pos, rx720_eos, rx720_fail - sub $I10, rx720_pos, rx720_off - substr $S10, rx720_tgt, $I10, 1 + ge rx726_pos, rx726_eos, rx726_fail + sub $I10, rx726_pos, rx726_off + substr $S10, rx726_tgt, $I10, 1 index $I11, "/!", $S10 - lt $I11, 0, rx720_fail - inc rx720_pos - set_addr $I10, rxcap_728_fail - ($I12, $I11) = rx720_cur."!mark_peek"($I10) - rx720_cur."!cursor_pos"($I11) - ($P10) = rx720_cur."!cursor_start"() - $P10."!cursor_pass"(rx720_pos, "") - rx720_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx726_fail + inc rx726_pos + set_addr $I10, rxcap_734_fail + ($I12, $I11) = rx726_cur."!mark_peek"($I10) + rx726_cur."!cursor_pos"($I11) + ($P10) = rx726_cur."!cursor_start"() + $P10."!cursor_pass"(rx726_pos, "") + rx726_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("name") - goto rxcap_728_done - rxcap_728_fail: - 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 - rx720_cur."!cursor_debug"("PASS ", "param_var", " at pos=", rx720_pos) - 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: - rx720_fail: - (rx720_rep, rx720_pos, $I10, $P10) = rx720_cur."!mark_fail"(0) - lt rx720_pos, -1, rx720_done - eq rx720_pos, -1, rx720_fail - jump $I10 - rx720_done: - rx720_cur."!cursor_fail"() - if_null rx720_debug, debug_683 - rx720_cur."!cursor_debug"("FAIL ", "param_var") - debug_683: - .return (rx720_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__param_var" :subid("175_1282016529.10767") :method -.annotate 'line', 4 - $P722 = self."!PREFIX__!subrule"("sigil", "") - new $P723, "ResizablePMCArray" - push $P723, $P722 - .return ($P723) -.end - - -.namespace ["NQP";"Grammar"] -.sub "named_param" :subid("176_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx730_tgt - .local int rx730_pos - .local int rx730_off - .local int rx730_eos - .local int rx730_rep - .local pmc rx730_cur - .local pmc rx730_debug - (rx730_cur, rx730_pos, rx730_tgt, $I10) = self."!cursor_start"() - getattribute rx730_debug, rx730_cur, "$!debug" - .lex unicode:"$\x{a2}", rx730_cur - .local pmc match - .lex "$/", match - length rx730_eos, rx730_tgt - gt rx730_pos, rx730_eos, rx730_done - set rx730_off, 0 - lt rx730_pos, 2, rx730_start - sub rx730_off, rx730_pos, 1 - substr rx730_tgt, rx730_tgt, rx730_off - rx730_start: - eq $I10, 1, rx730_restart - if_null rx730_debug, debug_684 - rx730_cur."!cursor_debug"("START ", "named_param") - debug_684: - $I10 = self.'from'() - ne $I10, -1, rxscan734_done - goto rxscan734_scan - rxscan734_loop: - ($P10) = rx730_cur."from"() - inc $P10 - set rx730_pos, $P10 - ge rx730_pos, rx730_eos, rxscan734_done - rxscan734_scan: - 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 - sub $I11, rx730_pos, rx730_off - ord $I11, rx730_tgt, $I11 - ne $I11, 58, rx730_fail - add rx730_pos, 1 - # rx subrule "param_var" subtype=capture negate= - rx730_cur."!cursor_pos"(rx730_pos) - $P10 = rx730_cur."param_var"() - unless $P10, rx730_fail - rx730_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("param_var") - rx730_pos = $P10."pos"() -.annotate 'line', 339 + goto rxcap_734_done + rxcap_734_fail: + goto rx726_fail + rxcap_734_done: + alt733_end: +.annotate 'line', 336 # rx pass - rx730_cur."!cursor_pass"(rx730_pos, "named_param") - if_null rx730_debug, debug_685 - rx730_cur."!cursor_debug"("PASS ", "named_param", " at pos=", rx730_pos) - 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: - rx730_fail: - (rx730_rep, rx730_pos, $I10, $P10) = rx730_cur."!mark_fail"(0) - lt rx730_pos, -1, rx730_done - eq rx730_pos, -1, rx730_fail - jump $I10 - rx730_done: - rx730_cur."!cursor_fail"() - if_null rx730_debug, debug_687 - rx730_cur."!cursor_debug"("FAIL ", "named_param") + rx726_cur."!cursor_pass"(rx726_pos, "param_var") + if_null rx726_debug, debug_687 + rx726_cur."!cursor_debug"("PASS", "param_var", " at pos=", rx726_pos) debug_687: - .return (rx730_cur) + .return (rx726_cur) + rx726_restart: +.annotate 'line', 4 + if_null rx726_debug, debug_688 + rx726_cur."!cursor_debug"("NEXT", "param_var") + debug_688: + rx726_fail: + (rx726_rep, rx726_pos, $I10, $P10) = rx726_cur."!mark_fail"(0) + lt rx726_pos, -1, rx726_done + eq rx726_pos, -1, rx726_fail + jump $I10 + rx726_done: + rx726_cur."!cursor_fail"() + if_null rx726_debug, debug_689 + rx726_cur."!cursor_debug"("FAIL", "param_var") + debug_689: + .return (rx726_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__named_param" :subid("177_1282016529.10767") :method +.sub "!PREFIX__param_var" :subid("175_1284728478.15265") :method .annotate 'line', 4 - $P732 = self."!PREFIX__!subrule"("param_var", ":") - new $P733, "ResizablePMCArray" - push $P733, $P732 - .return ($P733) + $P728 = self."!PREFIX__!subrule"("sigil", "") + new $P729, "ResizablePMCArray" + push $P729, $P728 + .return ($P729) .end .namespace ["NQP";"Grammar"] -.sub "default_value" :subid("178_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "named_param" :subid("176_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx736_tgt .local int rx736_pos @@ -10131,9 +10069,9 @@ substr rx736_tgt, rx736_tgt, rx736_off rx736_start: eq $I10, 1, rx736_restart - if_null rx736_debug, debug_688 - rx736_cur."!cursor_debug"("START ", "default_value") - debug_688: + if_null rx736_debug, debug_690 + rx736_cur."!cursor_debug"("START", "named_param") + debug_690: $I10 = self.'from'() ne $I10, -1, rxscan740_done goto rxscan740_scan @@ -10146,47 +10084,33 @@ 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"() - unless $P10, rx736_fail - rx736_pos = $P10."pos"() - # rx literal "=" +.annotate 'line', 342 + # rx literal ":" add $I11, rx736_pos, 1 gt $I11, rx736_eos, rx736_fail sub $I11, rx736_pos, rx736_off ord $I11, rx736_tgt, $I11 - ne $I11, 61, rx736_fail + ne $I11, 58, rx736_fail add rx736_pos, 1 - # rx subrule "ws" subtype=method negate= - rx736_cur."!cursor_pos"(rx736_pos) - $P10 = rx736_cur."ws"() - unless $P10, rx736_fail - rx736_pos = $P10."pos"() - # rx subrule "EXPR" subtype=capture negate= + # rx subrule "param_var" subtype=capture negate= rx736_cur."!cursor_pos"(rx736_pos) - $P10 = rx736_cur."EXPR"("i=") + $P10 = rx736_cur."param_var"() unless $P10, rx736_fail rx736_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("EXPR") - rx736_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx736_cur."!cursor_pos"(rx736_pos) - $P10 = rx736_cur."ws"() - unless $P10, rx736_fail + $P10."!cursor_names"("param_var") rx736_pos = $P10."pos"() +.annotate 'line', 341 # rx pass - rx736_cur."!cursor_pass"(rx736_pos, "default_value") - if_null rx736_debug, debug_689 - rx736_cur."!cursor_debug"("PASS ", "default_value", " at pos=", rx736_pos) - debug_689: + rx736_cur."!cursor_pass"(rx736_pos, "named_param") + if_null rx736_debug, debug_691 + rx736_cur."!cursor_debug"("PASS", "named_param", " at pos=", rx736_pos) + debug_691: .return (rx736_cur) rx736_restart: .annotate 'line', 4 - if_null rx736_debug, debug_690 - rx736_cur."!cursor_debug"("NEXT ", "default_value") - debug_690: + if_null rx736_debug, debug_692 + rx736_cur."!cursor_debug"("NEXT", "named_param") + debug_692: rx736_fail: (rx736_rep, rx736_pos, $I10, $P10) = rx736_cur."!mark_fail"(0) lt rx736_pos, -1, rx736_done @@ -10194,18 +10118,18 @@ jump $I10 rx736_done: rx736_cur."!cursor_fail"() - if_null rx736_debug, debug_691 - rx736_cur."!cursor_debug"("FAIL ", "default_value") - debug_691: + if_null rx736_debug, debug_693 + rx736_cur."!cursor_debug"("FAIL", "named_param") + debug_693: .return (rx736_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__default_value" :subid("179_1282016529.10767") :method +.sub "!PREFIX__named_param" :subid("177_1284728478.15265") :method .annotate 'line', 4 - $P738 = self."!PREFIX__!subrule"("ws", "") + $P738 = self."!PREFIX__!subrule"("param_var", ":") new $P739, "ResizablePMCArray" push $P739, $P738 .return ($P739) @@ -10213,2164 +10137,2000 @@ .namespace ["NQP";"Grammar"] -.sub "regex_declarator" :subid("180_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "default_value" :subid("178_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx745_tgt - .local int rx745_pos - .local int rx745_off - .local int rx745_eos - .local int rx745_rep - .local pmc rx745_cur - .local pmc rx745_debug - (rx745_cur, rx745_pos, rx745_tgt, $I10) = self."!cursor_start"() - rx745_cur."!cursor_caparray"("signature") - getattribute rx745_debug, rx745_cur, "$!debug" - .lex unicode:"$\x{a2}", rx745_cur - .local pmc match - .lex "$/", match - length rx745_eos, rx745_tgt - gt rx745_pos, rx745_eos, rx745_done - set rx745_off, 0 - lt rx745_pos, 2, rx745_start - sub rx745_off, rx745_pos, 1 - substr rx745_tgt, rx745_tgt, rx745_off - rx745_start: - eq $I10, 1, rx745_restart - if_null rx745_debug, debug_692 - rx745_cur."!cursor_debug"("START ", "regex_declarator") - debug_692: + .local string rx742_tgt + .local int rx742_pos + .local int rx742_off + .local int rx742_eos + .local int rx742_rep + .local pmc rx742_cur + .local pmc rx742_debug + (rx742_cur, rx742_pos, rx742_tgt, $I10) = self."!cursor_start"() + getattribute rx742_debug, rx742_cur, "$!debug" + .lex unicode:"$\x{a2}", rx742_cur + .local pmc match + .lex "$/", match + length rx742_eos, rx742_tgt + gt rx742_pos, rx742_eos, rx742_done + set rx742_off, 0 + lt rx742_pos, 2, rx742_start + sub rx742_off, rx742_pos, 1 + substr rx742_tgt, rx742_tgt, rx742_off + rx742_start: + eq $I10, 1, rx742_restart + if_null rx742_debug, debug_694 + rx742_cur."!cursor_debug"("START", "default_value") + debug_694: $I10 = self.'from'() - ne $I10, -1, rxscan749_done - goto rxscan749_scan - rxscan749_loop: - ($P10) = rx745_cur."from"() - inc $P10 - set rx745_pos, $P10 - ge rx745_pos, rx745_eos, rxscan749_done - rxscan749_scan: - set_addr $I10, rxscan749_loop - rx745_cur."!mark_push"(0, rx745_pos, $I10) - rxscan749_done: + ne $I10, -1, rxscan746_done + goto rxscan746_scan + rxscan746_loop: + ($P10) = rx742_cur."from"() + inc $P10 + set rx742_pos, $P10 + ge rx742_pos, rx742_eos, rxscan746_done + rxscan746_scan: + set_addr $I10, rxscan746_loop + rx742_cur."!mark_push"(0, rx742_pos, $I10) + rxscan746_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) + rx742_cur."!cursor_pos"(rx742_pos) + $P10 = rx742_cur."ws"() + unless $P10, rx742_fail + rx742_pos = $P10."pos"() + # rx literal "=" + add $I11, rx742_pos, 1 + gt $I11, rx742_eos, rx742_fail + sub $I11, rx742_pos, rx742_off + ord $I11, rx742_tgt, $I11 + ne $I11, 61, rx742_fail + add rx742_pos, 1 + # rx subrule "ws" subtype=method negate= + rx742_cur."!cursor_pos"(rx742_pos) + $P10 = rx742_cur."ws"() + unless $P10, rx742_fail + rx742_pos = $P10."pos"() + # rx subrule "EXPR" subtype=capture negate= + rx742_cur."!cursor_pos"(rx742_pos) + $P10 = rx742_cur."EXPR"("i=") + unless $P10, rx742_fail + rx742_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("EXPR") + rx742_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx742_cur."!cursor_pos"(rx742_pos) + $P10 = rx742_cur."ws"() + unless $P10, rx742_fail + rx742_pos = $P10."pos"() + # rx pass + rx742_cur."!cursor_pass"(rx742_pos, "default_value") + if_null rx742_debug, debug_695 + rx742_cur."!cursor_debug"("PASS", "default_value", " at pos=", rx742_pos) + debug_695: + .return (rx742_cur) + rx742_restart: +.annotate 'line', 4 + if_null rx742_debug, debug_696 + rx742_cur."!cursor_debug"("NEXT", "default_value") + debug_696: + rx742_fail: + (rx742_rep, rx742_pos, $I10, $P10) = rx742_cur."!mark_fail"(0) + lt rx742_pos, -1, rx742_done + eq rx742_pos, -1, rx742_fail + jump $I10 + rx742_done: + rx742_cur."!cursor_fail"() + if_null rx742_debug, debug_697 + rx742_cur."!cursor_debug"("FAIL", "default_value") + debug_697: + .return (rx742_cur) + .return () +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__default_value" :subid("179_1284728478.15265") :method +.annotate 'line', 4 + $P744 = self."!PREFIX__!subrule"("ws", "") + new $P745, "ResizablePMCArray" + push $P745, $P744 + .return ($P745) +.end + + +.namespace ["NQP";"Grammar"] +.sub "trait" :subid("180_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx751_tgt + .local int rx751_pos + .local int rx751_off + .local int rx751_eos + .local int rx751_rep + .local pmc rx751_cur + .local pmc rx751_debug + (rx751_cur, rx751_pos, rx751_tgt, $I10) = self."!cursor_start"() + getattribute rx751_debug, rx751_cur, "$!debug" + .lex unicode:"$\x{a2}", rx751_cur + .local pmc match + .lex "$/", match + length rx751_eos, rx751_tgt + gt rx751_pos, rx751_eos, rx751_done + set rx751_off, 0 + lt rx751_pos, 2, rx751_start + sub rx751_off, rx751_pos, 1 + substr rx751_tgt, rx751_tgt, rx751_off + rx751_start: + eq $I10, 1, rx751_restart + if_null rx751_debug, debug_698 + rx751_cur."!cursor_debug"("START", "trait") + debug_698: + $I10 = self.'from'() + ne $I10, -1, rxscan755_done + goto rxscan755_scan + rxscan755_loop: + ($P10) = rx751_cur."from"() + inc $P10 + set rx751_pos, $P10 + ge rx751_pos, rx751_eos, rxscan755_done + rxscan755_scan: + set_addr $I10, rxscan755_loop + rx751_cur."!mark_push"(0, rx751_pos, $I10) + rxscan755_done: .annotate 'line', 347 # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx751_cur."!cursor_pos"(rx751_pos) + $P10 = rx751_cur."ws"() + unless $P10, rx751_fail + rx751_pos = $P10."pos"() + # rx subrule "trait_mod" subtype=capture negate= + rx751_cur."!cursor_pos"(rx751_pos) + $P10 = rx751_cur."trait_mod"() + unless $P10, rx751_fail + rx751_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("trait_mod") + rx751_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx751_cur."!cursor_pos"(rx751_pos) + $P10 = rx751_cur."ws"() + unless $P10, rx751_fail + rx751_pos = $P10."pos"() + # rx pass + rx751_cur."!cursor_pass"(rx751_pos, "trait") + if_null rx751_debug, debug_699 + rx751_cur."!cursor_debug"("PASS", "trait", " at pos=", rx751_pos) + debug_699: + .return (rx751_cur) + rx751_restart: +.annotate 'line', 4 + if_null rx751_debug, debug_700 + rx751_cur."!cursor_debug"("NEXT", "trait") + debug_700: + rx751_fail: + (rx751_rep, rx751_pos, $I10, $P10) = rx751_cur."!mark_fail"(0) + lt rx751_pos, -1, rx751_done + eq rx751_pos, -1, rx751_fail + jump $I10 + rx751_done: + rx751_cur."!cursor_fail"() + if_null rx751_debug, debug_701 + rx751_cur."!cursor_debug"("FAIL", "trait") + debug_701: + .return (rx751_cur) + .return () +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__trait" :subid("181_1284728478.15265") :method +.annotate 'line', 4 + $P753 = self."!PREFIX__!subrule"("ws", "") + new $P754, "ResizablePMCArray" + push $P754, $P753 + .return ($P754) +.end + + +.namespace ["NQP";"Grammar"] +.sub "trait_mod" :subid("182_1284728478.15265") :method +.annotate 'line', 349 + $P759 = self."!protoregex"("trait_mod") + .return ($P759) +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__trait_mod" :subid("183_1284728478.15265") :method +.annotate 'line', 349 + $P761 = self."!PREFIX__!protoregex"("trait_mod") + .return ($P761) +.end + + +.namespace ["NQP";"Grammar"] +.sub "trait_mod:sym" :subid("184_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx763_tgt + .local int rx763_pos + .local int rx763_off + .local int rx763_eos + .local int rx763_rep + .local pmc rx763_cur + .local pmc rx763_debug + (rx763_cur, rx763_pos, rx763_tgt, $I10) = self."!cursor_start"() + rx763_cur."!cursor_caparray"("circumfix") + getattribute rx763_debug, rx763_cur, "$!debug" + .lex unicode:"$\x{a2}", rx763_cur + .local pmc match + .lex "$/", match + length rx763_eos, rx763_tgt + gt rx763_pos, rx763_eos, rx763_done + set rx763_off, 0 + lt rx763_pos, 2, rx763_start + sub rx763_off, rx763_pos, 1 + substr rx763_tgt, rx763_tgt, rx763_off + rx763_start: + eq $I10, 1, rx763_restart + if_null rx763_debug, debug_702 + rx763_cur."!cursor_debug"("START", "trait_mod:sym") + debug_702: + $I10 = self.'from'() + ne $I10, -1, rxscan767_done + goto rxscan767_scan + rxscan767_loop: + ($P10) = rx763_cur."from"() + inc $P10 + set rx763_pos, $P10 + ge rx763_pos, rx763_eos, rxscan767_done + rxscan767_scan: + set_addr $I10, rxscan767_loop + rx763_cur."!mark_push"(0, rx763_pos, $I10) + rxscan767_done: +.annotate 'line', 350 + # rx subcapture "sym" + set_addr $I10, rxcap_768_fail + rx763_cur."!mark_push"(0, rx763_pos, $I10) + # rx literal "is" + add $I11, rx763_pos, 2 + gt $I11, rx763_eos, rx763_fail + sub $I11, rx763_pos, rx763_off + substr $S10, rx763_tgt, $I11, 2 + ne $S10, "is", rx763_fail + add rx763_pos, 2 + set_addr $I10, rxcap_768_fail + ($I12, $I11) = rx763_cur."!mark_peek"($I10) + rx763_cur."!cursor_pos"($I11) + ($P10) = rx763_cur."!cursor_start"() + $P10."!cursor_pass"(rx763_pos, "") + rx763_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_768_done + rxcap_768_fail: + goto rx763_fail + rxcap_768_done: + # rx subrule "ws" subtype=method negate= + rx763_cur."!cursor_pos"(rx763_pos) + $P10 = rx763_cur."ws"() + unless $P10, rx763_fail + rx763_pos = $P10."pos"() + # rx subrule "deflongname" subtype=capture negate= + rx763_cur."!cursor_pos"(rx763_pos) + $P10 = rx763_cur."deflongname"() + unless $P10, rx763_fail + rx763_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("longname") + rx763_pos = $P10."pos"() + # rx rxquantr770 ** 0..1 + set_addr $I10, rxquantr770_done + rx763_cur."!mark_push"(0, rx763_pos, $I10) + rxquantr770_loop: + # rx subrule "circumfix" subtype=capture negate= + rx763_cur."!cursor_pos"(rx763_pos) + $P10 = rx763_cur."circumfix"() + unless $P10, rx763_fail + goto rxsubrule771_pass + rxsubrule771_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx763_fail + rxsubrule771_pass: + set_addr $I10, rxsubrule771_back + rx763_cur."!mark_push"(0, rx763_pos, $I10, $P10) + $P10."!cursor_names"("circumfix") + rx763_pos = $P10."pos"() + set_addr $I10, rxquantr770_done + (rx763_rep) = rx763_cur."!mark_commit"($I10) + rxquantr770_done: + # rx subrule "ws" subtype=method negate= + rx763_cur."!cursor_pos"(rx763_pos) + $P10 = rx763_cur."ws"() + unless $P10, rx763_fail + rx763_pos = $P10."pos"() + # rx pass + rx763_cur."!cursor_pass"(rx763_pos, "trait_mod:sym") + if_null rx763_debug, debug_703 + rx763_cur."!cursor_debug"("PASS", "trait_mod:sym", " at pos=", rx763_pos) + debug_703: + .return (rx763_cur) + rx763_restart: +.annotate 'line', 4 + if_null rx763_debug, debug_704 + rx763_cur."!cursor_debug"("NEXT", "trait_mod:sym") + debug_704: + rx763_fail: + (rx763_rep, rx763_pos, $I10, $P10) = rx763_cur."!mark_fail"(0) + lt rx763_pos, -1, rx763_done + eq rx763_pos, -1, rx763_fail + jump $I10 + rx763_done: + rx763_cur."!cursor_fail"() + if_null rx763_debug, debug_705 + rx763_cur."!cursor_debug"("FAIL", "trait_mod:sym") + debug_705: + .return (rx763_cur) + .return () +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__trait_mod:sym" :subid("185_1284728478.15265") :method +.annotate 'line', 4 + $P765 = self."!PREFIX__!subrule"("ws", "is") + new $P766, "ResizablePMCArray" + push $P766, $P765 + .return ($P766) +.end + + +.namespace ["NQP";"Grammar"] +.sub "regex_declarator" :subid("186_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx774_tgt + .local int rx774_pos + .local int rx774_off + .local int rx774_eos + .local int rx774_rep + .local pmc rx774_cur + .local pmc rx774_debug + (rx774_cur, rx774_pos, rx774_tgt, $I10) = self."!cursor_start"() + rx774_cur."!cursor_caparray"("signature") + getattribute rx774_debug, rx774_cur, "$!debug" + .lex unicode:"$\x{a2}", rx774_cur + .local pmc match + .lex "$/", match + length rx774_eos, rx774_tgt + gt rx774_pos, rx774_eos, rx774_done + set rx774_off, 0 + lt rx774_pos, 2, rx774_start + sub rx774_off, rx774_pos, 1 + substr rx774_tgt, rx774_tgt, rx774_off + rx774_start: + eq $I10, 1, rx774_restart + if_null rx774_debug, debug_706 + rx774_cur."!cursor_debug"("START", "regex_declarator") + debug_706: + $I10 = self.'from'() + ne $I10, -1, rxscan778_done + goto rxscan778_scan + rxscan778_loop: + ($P10) = rx774_cur."from"() + inc $P10 + set rx774_pos, $P10 + ge rx774_pos, rx774_eos, rxscan778_done + rxscan778_scan: + set_addr $I10, rxscan778_loop + rx774_cur."!mark_push"(0, rx774_pos, $I10) + rxscan778_done: +.annotate 'line', 352 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + alt780_0: +.annotate 'line', 353 + set_addr $I10, alt780_1 + rx774_cur."!mark_push"(0, rx774_pos, $I10) +.annotate 'line', 354 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx subcapture "proto" - set_addr $I10, rxcap_753_fail - rx745_cur."!mark_push"(0, rx745_pos, $I10) + set_addr $I10, rxcap_782_fail + rx774_cur."!mark_push"(0, rx774_pos, $I10) # rx literal "proto" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "proto", rx745_fail - add rx745_pos, 5 - set_addr $I10, rxcap_753_fail - ($I12, $I11) = rx745_cur."!mark_peek"($I10) - rx745_cur."!cursor_pos"($I11) - ($P10) = rx745_cur."!cursor_start"() - $P10."!cursor_pass"(rx745_pos, "") - rx745_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "proto", rx774_fail + add rx774_pos, 5 + set_addr $I10, rxcap_782_fail + ($I12, $I11) = rx774_cur."!mark_peek"($I10) + rx774_cur."!cursor_pos"($I11) + ($P10) = rx774_cur."!cursor_start"() + $P10."!cursor_pass"(rx774_pos, "") + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("proto") - goto rxcap_753_done - rxcap_753_fail: - goto rx745_fail - rxcap_753_done: - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - alt755_0: - set_addr $I10, alt755_1 - rx745_cur."!mark_push"(0, rx745_pos, $I10) + goto rxcap_782_done + rxcap_782_fail: + goto rx774_fail + rxcap_782_done: + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + alt784_0: + set_addr $I10, alt784_1 + rx774_cur."!mark_push"(0, rx774_pos, $I10) # rx literal "regex" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "regex", rx745_fail - add rx745_pos, 5 - goto alt755_end - alt755_1: - set_addr $I10, alt755_2 - rx745_cur."!mark_push"(0, rx745_pos, $I10) + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "regex", rx774_fail + add rx774_pos, 5 + goto alt784_end + alt784_1: + set_addr $I10, alt784_2 + rx774_cur."!mark_push"(0, rx774_pos, $I10) # rx literal "token" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "token", rx745_fail - add rx745_pos, 5 - goto alt755_end - alt755_2: + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "token", rx774_fail + add rx774_pos, 5 + goto alt784_end + alt784_2: # rx literal "rule" - add $I11, rx745_pos, 4 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 4 - ne $S10, "rule", rx745_fail - add rx745_pos, 4 - alt755_end: - # 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', 348 + add $I11, rx774_pos, 4 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 4 + ne $S10, "rule", rx774_fail + add rx774_pos, 4 + alt784_end: + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 355 # rx subrule "deflongname" subtype=capture negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."deflongname"() - unless $P10, rx745_fail - rx745_cur."!mark_push"(0, -1, 0, $P10) + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."deflongname"() + unless $P10, rx774_fail + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("deflongname") - rx745_pos = $P10."pos"() + rx774_pos = $P10."pos"() # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - 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 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + alt787_0: +.annotate 'line', 356 + set_addr $I10, alt787_1 + rx774_cur."!mark_push"(0, rx774_pos, $I10) +.annotate 'line', 357 # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx literal "{" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 123, rx745_fail - add rx745_pos, 1 - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 123, rx774_fail + add rx774_pos, 1 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx literal "<...>" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "<...>", rx745_fail - add rx745_pos, 5 - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "<...>", rx774_fail + add rx774_pos, 5 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx literal "}" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 125, rx745_fail - add rx745_pos, 1 + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 125, rx774_fail + add rx774_pos, 1 # rx subrule "ENDSTMT" subtype=zerowidth negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ENDSTMT"() - unless $P10, rx745_fail - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - goto alt758_end - alt758_1: -.annotate 'line', 351 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ENDSTMT"() + unless $P10, rx774_fail + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + goto alt787_end + alt787_1: +.annotate 'line', 358 # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx subrule "panic" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."panic"("Proto regex body must be <...>") - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - alt758_end: -.annotate 'line', 352 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."panic"("Proto regex body must be <...>") + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + alt787_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', 347 - goto alt751_end - alt751_1: -.annotate 'line', 353 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 354 + goto alt780_end + alt780_1: +.annotate 'line', 360 # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx subcapture "sym" - set_addr $I10, rxcap_768_fail - rx745_cur."!mark_push"(0, rx745_pos, $I10) - alt767_0: - set_addr $I10, alt767_1 - rx745_cur."!mark_push"(0, rx745_pos, $I10) + set_addr $I10, rxcap_797_fail + rx774_cur."!mark_push"(0, rx774_pos, $I10) + alt796_0: + set_addr $I10, alt796_1 + rx774_cur."!mark_push"(0, rx774_pos, $I10) # rx literal "regex" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "regex", rx745_fail - add rx745_pos, 5 - goto alt767_end - alt767_1: - set_addr $I10, alt767_2 - rx745_cur."!mark_push"(0, rx745_pos, $I10) + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "regex", rx774_fail + add rx774_pos, 5 + goto alt796_end + alt796_1: + set_addr $I10, alt796_2 + rx774_cur."!mark_push"(0, rx774_pos, $I10) # rx literal "token" - add $I11, rx745_pos, 5 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 5 - ne $S10, "token", rx745_fail - add rx745_pos, 5 - goto alt767_end - alt767_2: + add $I11, rx774_pos, 5 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 5 + ne $S10, "token", rx774_fail + add rx774_pos, 5 + goto alt796_end + alt796_2: # rx literal "rule" - add $I11, rx745_pos, 4 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - substr $S10, rx745_tgt, $I11, 4 - ne $S10, "rule", rx745_fail - add rx745_pos, 4 - alt767_end: - set_addr $I10, rxcap_768_fail - ($I12, $I11) = rx745_cur."!mark_peek"($I10) - rx745_cur."!cursor_pos"($I11) - ($P10) = rx745_cur."!cursor_start"() - $P10."!cursor_pass"(rx745_pos, "") - rx745_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx774_pos, 4 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + substr $S10, rx774_tgt, $I11, 4 + ne $S10, "rule", rx774_fail + add rx774_pos, 4 + alt796_end: + set_addr $I10, rxcap_797_fail + ($I12, $I11) = rx774_cur."!mark_peek"($I10) + rx774_cur."!cursor_pos"($I11) + ($P10) = rx774_cur."!cursor_start"() + $P10."!cursor_pass"(rx774_pos, "") + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_768_done - rxcap_768_fail: - goto rx745_fail - rxcap_768_done: - # 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', 354 + goto rxcap_797_done + rxcap_797_fail: + goto rx774_fail + rxcap_797_done: + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 361 # rx subrule "deflongname" subtype=capture negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."deflongname"() - unless $P10, rx745_fail - rx745_cur."!mark_push"(0, -1, 0, $P10) + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."deflongname"() + unless $P10, rx774_fail + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("deflongname") - rx745_pos = $P10."pos"() + rx774_pos = $P10."pos"() # 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', 355 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 362 # rx subrule "newpad" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."newpad"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - # 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', 356 - # rx rxquantr772 ** 0..1 - set_addr $I10, rxquantr772_done - rx745_cur."!mark_push"(0, rx745_pos, $I10) - rxquantr772_loop: - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."newpad"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 363 + # rx rxquantr801 ** 0..1 + set_addr $I10, rxquantr801_done + rx774_cur."!mark_push"(0, rx774_pos, $I10) + rxquantr801_loop: + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx literal "(" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 40, rx745_fail - add rx745_pos, 1 - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 40, rx774_fail + add rx774_pos, 1 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx subrule "signature" subtype=capture negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."signature"() - unless $P10, rx745_fail - rx745_cur."!mark_push"(0, -1, 0, $P10) + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."signature"() + unless $P10, rx774_fail + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("signature") - rx745_pos = $P10."pos"() + rx774_pos = $P10."pos"() # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() # rx literal ")" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 41, rx745_fail - add rx745_pos, 1 - # rx subrule "ws" subtype=method negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ws"() - unless $P10, rx745_fail - rx745_pos = $P10."pos"() - set_addr $I10, rxquantr772_done - (rx745_rep) = rx745_cur."!mark_commit"($I10) - rxquantr772_done: - # 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', 357 + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 41, rx774_fail + add rx774_pos, 1 + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + set_addr $I10, rxquantr801_done + (rx774_rep) = rx774_cur."!mark_commit"($I10) + rxquantr801_done: + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 364 # rx reduce name="regex_declarator" key="open" - rx745_cur."!cursor_pos"(rx745_pos) - rx745_cur."!reduce"("regex_declarator", "open") + rx774_cur."!cursor_pos"(rx774_pos) + rx774_cur."!reduce"("regex_declarator", "open") # 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', 358 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 365 # rx literal "{" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 123, rx745_fail - add rx745_pos, 1 + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 123, rx774_fail + add rx774_pos, 1 # rx subrule "LANG" subtype=capture negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."LANG"("Regex", "nibbler") - unless $P10, rx745_fail - rx745_cur."!mark_push"(0, -1, 0, $P10) + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."LANG"("Regex", "nibbler") + unless $P10, rx774_fail + rx774_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("p6regex") - rx745_pos = $P10."pos"() + rx774_pos = $P10."pos"() # rx literal "}" - add $I11, rx745_pos, 1 - gt $I11, rx745_eos, rx745_fail - sub $I11, rx745_pos, rx745_off - ord $I11, rx745_tgt, $I11 - ne $I11, 125, rx745_fail - add rx745_pos, 1 + add $I11, rx774_pos, 1 + gt $I11, rx774_eos, rx774_fail + sub $I11, rx774_pos, rx774_off + ord $I11, rx774_tgt, $I11 + ne $I11, 125, rx774_fail + add rx774_pos, 1 # rx subrule "ENDSTMT" subtype=zerowidth negate= - rx745_cur."!cursor_pos"(rx745_pos) - $P10 = rx745_cur."ENDSTMT"() - unless $P10, rx745_fail - # 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_end: -.annotate 'line', 359 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ENDSTMT"() + unless $P10, rx774_fail + # rx subrule "ws" subtype=method negate= + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() + alt780_end: +.annotate 'line', 366 # 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 + rx774_cur."!cursor_pos"(rx774_pos) + $P10 = rx774_cur."ws"() + unless $P10, rx774_fail + rx774_pos = $P10."pos"() +.annotate 'line', 352 # rx pass - rx745_cur."!cursor_pass"(rx745_pos, "regex_declarator") - if_null rx745_debug, debug_693 - rx745_cur."!cursor_debug"("PASS ", "regex_declarator", " at pos=", rx745_pos) - debug_693: - .return (rx745_cur) - rx745_restart: + rx774_cur."!cursor_pass"(rx774_pos, "regex_declarator") + if_null rx774_debug, debug_707 + rx774_cur."!cursor_debug"("PASS", "regex_declarator", " at pos=", rx774_pos) + debug_707: + .return (rx774_cur) + rx774_restart: .annotate 'line', 4 - if_null rx745_debug, debug_694 - rx745_cur."!cursor_debug"("NEXT ", "regex_declarator") - debug_694: - rx745_fail: - (rx745_rep, rx745_pos, $I10, $P10) = rx745_cur."!mark_fail"(0) - lt rx745_pos, -1, rx745_done - eq rx745_pos, -1, rx745_fail - jump $I10 - rx745_done: - rx745_cur."!cursor_fail"() - if_null rx745_debug, debug_695 - rx745_cur."!cursor_debug"("FAIL ", "regex_declarator") - debug_695: - .return (rx745_cur) + if_null rx774_debug, debug_708 + rx774_cur."!cursor_debug"("NEXT", "regex_declarator") + debug_708: + rx774_fail: + (rx774_rep, rx774_pos, $I10, $P10) = rx774_cur."!mark_fail"(0) + lt rx774_pos, -1, rx774_done + eq rx774_pos, -1, rx774_fail + jump $I10 + rx774_done: + rx774_cur."!cursor_fail"() + if_null rx774_debug, debug_709 + rx774_cur."!cursor_debug"("FAIL", "regex_declarator") + debug_709: + .return (rx774_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__regex_declarator" :subid("181_1282016529.10767") :method +.sub "!PREFIX__regex_declarator" :subid("187_1284728478.15265") :method .annotate 'line', 4 - $P747 = self."!PREFIX__!subrule"("ws", "") - new $P748, "ResizablePMCArray" - push $P748, $P747 - .return ($P748) + $P776 = self."!PREFIX__!subrule"("ws", "") + new $P777, "ResizablePMCArray" + push $P777, $P776 + .return ($P777) .end .namespace ["NQP";"Grammar"] -.sub "dotty" :subid("182_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "dotty" :subid("188_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx782_tgt - .local int rx782_pos - .local int rx782_off - .local int rx782_eos - .local int rx782_rep - .local pmc rx782_cur - .local pmc rx782_debug - (rx782_cur, rx782_pos, rx782_tgt, $I10) = self."!cursor_start"() - rx782_cur."!cursor_caparray"("args") - getattribute rx782_debug, rx782_cur, "$!debug" - .lex unicode:"$\x{a2}", rx782_cur - .local pmc match - .lex "$/", match - length rx782_eos, rx782_tgt - gt rx782_pos, rx782_eos, rx782_done - set rx782_off, 0 - lt rx782_pos, 2, rx782_start - sub rx782_off, rx782_pos, 1 - substr rx782_tgt, rx782_tgt, rx782_off - rx782_start: - eq $I10, 1, rx782_restart - if_null rx782_debug, debug_696 - rx782_cur."!cursor_debug"("START ", "dotty") - debug_696: + .local string rx811_tgt + .local int rx811_pos + .local int rx811_off + .local int rx811_eos + .local int rx811_rep + .local pmc rx811_cur + .local pmc rx811_debug + (rx811_cur, rx811_pos, rx811_tgt, $I10) = self."!cursor_start"() + rx811_cur."!cursor_caparray"("args") + getattribute rx811_debug, rx811_cur, "$!debug" + .lex unicode:"$\x{a2}", rx811_cur + .local pmc match + .lex "$/", match + length rx811_eos, rx811_tgt + gt rx811_pos, rx811_eos, rx811_done + set rx811_off, 0 + lt rx811_pos, 2, rx811_start + sub rx811_off, rx811_pos, 1 + substr rx811_tgt, rx811_tgt, rx811_off + rx811_start: + eq $I10, 1, rx811_restart + if_null rx811_debug, debug_710 + rx811_cur."!cursor_debug"("START", "dotty") + debug_710: $I10 = self.'from'() - ne $I10, -1, rxscan786_done - goto rxscan786_scan - rxscan786_loop: - ($P10) = rx782_cur."from"() - inc $P10 - set rx782_pos, $P10 - ge rx782_pos, rx782_eos, rxscan786_done - rxscan786_scan: - set_addr $I10, rxscan786_loop - rx782_cur."!mark_push"(0, rx782_pos, $I10) - rxscan786_done: -.annotate 'line', 363 + ne $I10, -1, rxscan815_done + goto rxscan815_scan + rxscan815_loop: + ($P10) = rx811_cur."from"() + inc $P10 + set rx811_pos, $P10 + ge rx811_pos, rx811_eos, rxscan815_done + rxscan815_scan: + set_addr $I10, rxscan815_loop + rx811_cur."!mark_push"(0, rx811_pos, $I10) + rxscan815_done: +.annotate 'line', 370 # rx literal "." - add $I11, rx782_pos, 1 - gt $I11, rx782_eos, rx782_fail - sub $I11, rx782_pos, rx782_off - ord $I11, rx782_tgt, $I11 - 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) + add $I11, rx811_pos, 1 + gt $I11, rx811_eos, rx811_fail + sub $I11, rx811_pos, rx811_off + ord $I11, rx811_tgt, $I11 + ne $I11, 46, rx811_fail + add rx811_pos, 1 + alt816_0: +.annotate 'line', 371 + set_addr $I10, alt816_1 + rx811_cur."!mark_push"(0, rx811_pos, $I10) # rx subrule "deflongname" subtype=capture negate= - rx782_cur."!cursor_pos"(rx782_pos) - $P10 = rx782_cur."deflongname"() - unless $P10, rx782_fail - rx782_cur."!mark_push"(0, -1, 0, $P10) + rx811_cur."!cursor_pos"(rx811_pos) + $P10 = rx811_cur."deflongname"() + unless $P10, rx811_fail + rx811_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("longname=deflongname") - rx782_pos = $P10."pos"() - goto alt787_end - alt787_1: -.annotate 'line', 365 + rx811_pos = $P10."pos"() + goto alt816_end + alt816_1: +.annotate 'line', 372 # rx enumcharlist negate=0 zerowidth - ge rx782_pos, rx782_eos, rx782_fail - sub $I10, rx782_pos, rx782_off - substr $S10, rx782_tgt, $I10, 1 + sub $I10, rx811_pos, rx811_off + substr $S10, rx811_tgt, $I10, 1 index $I11, "'\"", $S10 - lt $I11, 0, rx782_fail + lt $I11, 0, rx811_fail # rx subrule "quote" subtype=capture negate= - rx782_cur."!cursor_pos"(rx782_pos) - $P10 = rx782_cur."quote"() - unless $P10, rx782_fail - rx782_cur."!mark_push"(0, -1, 0, $P10) + rx811_cur."!cursor_pos"(rx811_pos) + $P10 = rx811_cur."quote"() + unless $P10, rx811_fail + rx811_cur."!mark_push"(0, -1, 0, $P10) $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) + rx811_pos = $P10."pos"() + alt817_0: +.annotate 'line', 373 + set_addr $I10, alt817_1 + rx811_cur."!mark_push"(0, rx811_pos, $I10) # rx enumcharlist negate=0 zerowidth - ge rx782_pos, rx782_eos, rx782_fail - sub $I10, rx782_pos, rx782_off - substr $S10, rx782_tgt, $I10, 1 + sub $I10, rx811_pos, rx811_off + substr $S10, rx811_tgt, $I10, 1 index $I11, "(", $S10 - lt $I11, 0, rx782_fail - goto alt788_end - alt788_1: + lt $I11, 0, rx811_fail + goto alt817_end + alt817_1: # rx subrule "panic" subtype=method negate= - rx782_cur."!cursor_pos"(rx782_pos) - $P10 = rx782_cur."panic"("Quoted method name requires parenthesized arguments") - unless $P10, rx782_fail - 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 + rx811_cur."!cursor_pos"(rx811_pos) + $P10 = rx811_cur."panic"("Quoted method name requires parenthesized arguments") + unless $P10, rx811_fail + rx811_pos = $P10."pos"() + alt817_end: + alt816_end: +.annotate 'line', 379 + # rx rxquantr818 ** 0..1 + set_addr $I10, rxquantr818_done + rx811_cur."!mark_push"(0, rx811_pos, $I10) + rxquantr818_loop: + alt819_0: +.annotate 'line', 376 + set_addr $I10, alt819_1 + rx811_cur."!mark_push"(0, rx811_pos, $I10) +.annotate 'line', 377 # rx enumcharlist negate=0 zerowidth - ge rx782_pos, rx782_eos, rx782_fail - sub $I10, rx782_pos, rx782_off - substr $S10, rx782_tgt, $I10, 1 + sub $I10, rx811_pos, rx811_off + substr $S10, rx811_tgt, $I10, 1 index $I11, "(", $S10 - lt $I11, 0, rx782_fail + lt $I11, 0, rx811_fail # rx subrule "args" subtype=capture negate= - rx782_cur."!cursor_pos"(rx782_pos) - $P10 = rx782_cur."args"() - unless $P10, rx782_fail - rx782_cur."!mark_push"(0, -1, 0, $P10) + rx811_cur."!cursor_pos"(rx811_pos) + $P10 = rx811_cur."args"() + unless $P10, rx811_fail + rx811_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("args") - rx782_pos = $P10."pos"() - goto alt790_end - alt790_1: -.annotate 'line', 371 + rx811_pos = $P10."pos"() + goto alt819_end + alt819_1: +.annotate 'line', 378 # rx literal ":" - add $I11, rx782_pos, 1 - gt $I11, rx782_eos, rx782_fail - sub $I11, rx782_pos, rx782_off - ord $I11, rx782_tgt, $I11 - ne $I11, 58, rx782_fail - add rx782_pos, 1 + add $I11, rx811_pos, 1 + gt $I11, rx811_eos, rx811_fail + sub $I11, rx811_pos, rx811_off + ord $I11, rx811_tgt, $I11 + ne $I11, 58, rx811_fail + add rx811_pos, 1 # rx charclass s - ge rx782_pos, rx782_eos, rx782_fail - sub $I10, rx782_pos, rx782_off - is_cclass $I11, 32, rx782_tgt, $I10 - unless $I11, rx782_fail - inc rx782_pos + ge rx811_pos, rx811_eos, rx811_fail + sub $I10, rx811_pos, rx811_off + is_cclass $I11, 32, rx811_tgt, $I10 + unless $I11, rx811_fail + inc rx811_pos # rx subrule "arglist" subtype=capture negate= - rx782_cur."!cursor_pos"(rx782_pos) - $P10 = rx782_cur."arglist"() - unless $P10, rx782_fail - rx782_cur."!mark_push"(0, -1, 0, $P10) + rx811_cur."!cursor_pos"(rx811_pos) + $P10 = rx811_cur."arglist"() + unless $P10, rx811_fail + rx811_cur."!mark_push"(0, -1, 0, $P10) $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 + rx811_pos = $P10."pos"() + alt819_end: +.annotate 'line', 379 + set_addr $I10, rxquantr818_done + (rx811_rep) = rx811_cur."!mark_commit"($I10) + rxquantr818_done: +.annotate 'line', 369 # rx pass - rx782_cur."!cursor_pass"(rx782_pos, "dotty") - if_null rx782_debug, debug_697 - rx782_cur."!cursor_debug"("PASS ", "dotty", " at pos=", rx782_pos) - debug_697: - .return (rx782_cur) - rx782_restart: + rx811_cur."!cursor_pass"(rx811_pos, "dotty") + if_null rx811_debug, debug_711 + rx811_cur."!cursor_debug"("PASS", "dotty", " at pos=", rx811_pos) + debug_711: + .return (rx811_cur) + rx811_restart: .annotate 'line', 4 - if_null rx782_debug, debug_698 - rx782_cur."!cursor_debug"("NEXT ", "dotty") - debug_698: - rx782_fail: - (rx782_rep, rx782_pos, $I10, $P10) = rx782_cur."!mark_fail"(0) - lt rx782_pos, -1, rx782_done - eq rx782_pos, -1, rx782_fail - jump $I10 - rx782_done: - rx782_cur."!cursor_fail"() - if_null rx782_debug, debug_699 - rx782_cur."!cursor_debug"("FAIL ", "dotty") - debug_699: - .return (rx782_cur) + if_null rx811_debug, debug_712 + rx811_cur."!cursor_debug"("NEXT", "dotty") + debug_712: + rx811_fail: + (rx811_rep, rx811_pos, $I10, $P10) = rx811_cur."!mark_fail"(0) + lt rx811_pos, -1, rx811_done + eq rx811_pos, -1, rx811_fail + jump $I10 + rx811_done: + rx811_cur."!cursor_fail"() + if_null rx811_debug, debug_713 + rx811_cur."!cursor_debug"("FAIL", "dotty") + debug_713: + .return (rx811_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__dotty" :subid("183_1282016529.10767") :method +.sub "!PREFIX__dotty" :subid("189_1284728478.15265") :method .annotate 'line', 4 - $P784 = self."!PREFIX__!subrule"("deflongname", ".") - new $P785, "ResizablePMCArray" - push $P785, "'" - push $P785, "\"" - push $P785, $P784 - .return ($P785) + $P813 = self."!PREFIX__!subrule"("deflongname", ".") + new $P814, "ResizablePMCArray" + push $P814, "'" + push $P814, "\"" + push $P814, $P813 + .return ($P814) .end .namespace ["NQP";"Grammar"] -.sub "term" :subid("184_1282016529.10767") :method -.annotate 'line', 376 - $P792 = self."!protoregex"("term") - .return ($P792) +.sub "term" :subid("190_1284728478.15265") :method +.annotate 'line', 383 + $P821 = self."!protoregex"("term") + .return ($P821) .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term" :subid("185_1282016529.10767") :method -.annotate 'line', 376 - $P794 = self."!PREFIX__!protoregex"("term") - .return ($P794) +.sub "!PREFIX__term" :subid("191_1284728478.15265") :method +.annotate 'line', 383 + $P823 = self."!PREFIX__!protoregex"("term") + .return ($P823) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("186_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("192_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx796_tgt - .local int rx796_pos - .local int rx796_off - .local int rx796_eos - .local int rx796_rep - .local pmc rx796_cur - .local pmc rx796_debug - (rx796_cur, rx796_pos, rx796_tgt, $I10) = self."!cursor_start"() - getattribute rx796_debug, rx796_cur, "$!debug" - .lex unicode:"$\x{a2}", rx796_cur - .local pmc match - .lex "$/", match - length rx796_eos, rx796_tgt - gt rx796_pos, rx796_eos, rx796_done - set rx796_off, 0 - lt rx796_pos, 2, rx796_start - sub rx796_off, rx796_pos, 1 - substr rx796_tgt, rx796_tgt, rx796_off - rx796_start: - eq $I10, 1, rx796_restart - if_null rx796_debug, debug_700 - rx796_cur."!cursor_debug"("START ", "term:sym") - debug_700: + .local string rx825_tgt + .local int rx825_pos + .local int rx825_off + .local int rx825_eos + .local int rx825_rep + .local pmc rx825_cur + .local pmc rx825_debug + (rx825_cur, rx825_pos, rx825_tgt, $I10) = self."!cursor_start"() + getattribute rx825_debug, rx825_cur, "$!debug" + .lex unicode:"$\x{a2}", rx825_cur + .local pmc match + .lex "$/", match + length rx825_eos, rx825_tgt + gt rx825_pos, rx825_eos, rx825_done + set rx825_off, 0 + lt rx825_pos, 2, rx825_start + sub rx825_off, rx825_pos, 1 + substr rx825_tgt, rx825_tgt, rx825_off + rx825_start: + eq $I10, 1, rx825_restart + if_null rx825_debug, debug_714 + rx825_cur."!cursor_debug"("START", "term:sym") + debug_714: $I10 = self.'from'() - ne $I10, -1, rxscan799_done - goto rxscan799_scan - rxscan799_loop: - ($P10) = rx796_cur."from"() - inc $P10 - set rx796_pos, $P10 - ge rx796_pos, rx796_eos, rxscan799_done - rxscan799_scan: - set_addr $I10, rxscan799_loop - rx796_cur."!mark_push"(0, rx796_pos, $I10) - rxscan799_done: -.annotate 'line', 378 + ne $I10, -1, rxscan828_done + goto rxscan828_scan + rxscan828_loop: + ($P10) = rx825_cur."from"() + inc $P10 + set rx825_pos, $P10 + ge rx825_pos, rx825_eos, rxscan828_done + rxscan828_scan: + set_addr $I10, rxscan828_loop + rx825_cur."!mark_push"(0, rx825_pos, $I10) + rxscan828_done: +.annotate 'line', 385 # rx subcapture "sym" - set_addr $I10, rxcap_800_fail - rx796_cur."!mark_push"(0, rx796_pos, $I10) + set_addr $I10, rxcap_829_fail + rx825_cur."!mark_push"(0, rx825_pos, $I10) # rx literal "self" - add $I11, rx796_pos, 4 - gt $I11, rx796_eos, rx796_fail - sub $I11, rx796_pos, rx796_off - substr $S10, rx796_tgt, $I11, 4 - ne $S10, "self", rx796_fail - add rx796_pos, 4 - set_addr $I10, rxcap_800_fail - ($I12, $I11) = rx796_cur."!mark_peek"($I10) - rx796_cur."!cursor_pos"($I11) - ($P10) = rx796_cur."!cursor_start"() - $P10."!cursor_pass"(rx796_pos, "") - rx796_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx825_pos, 4 + gt $I11, rx825_eos, rx825_fail + sub $I11, rx825_pos, rx825_off + substr $S10, rx825_tgt, $I11, 4 + ne $S10, "self", rx825_fail + add rx825_pos, 4 + set_addr $I10, rxcap_829_fail + ($I12, $I11) = rx825_cur."!mark_peek"($I10) + rx825_cur."!cursor_pos"($I11) + ($P10) = rx825_cur."!cursor_start"() + $P10."!cursor_pass"(rx825_pos, "") + rx825_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_800_done - rxcap_800_fail: - goto rx796_fail - rxcap_800_done: + goto rxcap_829_done + rxcap_829_fail: + goto rx825_fail + rxcap_829_done: # rxanchor rwb - le rx796_pos, 0, rx796_fail - sub $I10, rx796_pos, rx796_off - is_cclass $I11, 8192, rx796_tgt, $I10 - if $I11, rx796_fail + le rx825_pos, 0, rx825_fail + sub $I10, rx825_pos, rx825_off + is_cclass $I11, 8192, rx825_tgt, $I10 + if $I11, rx825_fail dec $I10 - is_cclass $I11, 8192, rx796_tgt, $I10 - unless $I11, rx796_fail + is_cclass $I11, 8192, rx825_tgt, $I10 + unless $I11, rx825_fail # rx pass - rx796_cur."!cursor_pass"(rx796_pos, "term:sym") - if_null rx796_debug, debug_701 - rx796_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx796_pos) - debug_701: - .return (rx796_cur) - rx796_restart: + rx825_cur."!cursor_pass"(rx825_pos, "term:sym") + if_null rx825_debug, debug_715 + rx825_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx825_pos) + debug_715: + .return (rx825_cur) + rx825_restart: .annotate 'line', 4 - if_null rx796_debug, debug_702 - rx796_cur."!cursor_debug"("NEXT ", "term:sym") - debug_702: - rx796_fail: - (rx796_rep, rx796_pos, $I10, $P10) = rx796_cur."!mark_fail"(0) - lt rx796_pos, -1, rx796_done - eq rx796_pos, -1, rx796_fail - jump $I10 - rx796_done: - rx796_cur."!cursor_fail"() - if_null rx796_debug, debug_703 - rx796_cur."!cursor_debug"("FAIL ", "term:sym") - debug_703: - .return (rx796_cur) + if_null rx825_debug, debug_716 + rx825_cur."!cursor_debug"("NEXT", "term:sym") + debug_716: + rx825_fail: + (rx825_rep, rx825_pos, $I10, $P10) = rx825_cur."!mark_fail"(0) + lt rx825_pos, -1, rx825_done + eq rx825_pos, -1, rx825_fail + jump $I10 + rx825_done: + rx825_cur."!cursor_fail"() + if_null rx825_debug, debug_717 + rx825_cur."!cursor_debug"("FAIL", "term:sym") + debug_717: + .return (rx825_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("187_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("193_1284728478.15265") :method .annotate 'line', 4 - new $P798, "ResizablePMCArray" - push $P798, "self" - .return ($P798) + new $P827, "ResizablePMCArray" + push $P827, "self" + .return ($P827) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("188_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("194_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx802_tgt - .local int rx802_pos - .local int rx802_off - .local int rx802_eos - .local int rx802_rep - .local pmc rx802_cur - .local pmc rx802_debug - (rx802_cur, rx802_pos, rx802_tgt, $I10) = self."!cursor_start"() - getattribute rx802_debug, rx802_cur, "$!debug" - .lex unicode:"$\x{a2}", rx802_cur - .local pmc match - .lex "$/", match - length rx802_eos, rx802_tgt - gt rx802_pos, rx802_eos, rx802_done - set rx802_off, 0 - lt rx802_pos, 2, rx802_start - sub rx802_off, rx802_pos, 1 - substr rx802_tgt, rx802_tgt, rx802_off - rx802_start: - eq $I10, 1, rx802_restart - if_null rx802_debug, debug_704 - rx802_cur."!cursor_debug"("START ", "term:sym") - debug_704: + .local string rx831_tgt + .local int rx831_pos + .local int rx831_off + .local int rx831_eos + .local int rx831_rep + .local pmc rx831_cur + .local pmc rx831_debug + (rx831_cur, rx831_pos, rx831_tgt, $I10) = self."!cursor_start"() + getattribute rx831_debug, rx831_cur, "$!debug" + .lex unicode:"$\x{a2}", rx831_cur + .local pmc match + .lex "$/", match + length rx831_eos, rx831_tgt + gt rx831_pos, rx831_eos, rx831_done + set rx831_off, 0 + lt rx831_pos, 2, rx831_start + sub rx831_off, rx831_pos, 1 + substr rx831_tgt, rx831_tgt, rx831_off + rx831_start: + eq $I10, 1, rx831_restart + if_null rx831_debug, debug_718 + rx831_cur."!cursor_debug"("START", "term:sym") + debug_718: $I10 = self.'from'() - ne $I10, -1, rxscan806_done - goto rxscan806_scan - rxscan806_loop: - ($P10) = rx802_cur."from"() - inc $P10 - set rx802_pos, $P10 - ge rx802_pos, rx802_eos, rxscan806_done - rxscan806_scan: - set_addr $I10, rxscan806_loop - rx802_cur."!mark_push"(0, rx802_pos, $I10) - rxscan806_done: -.annotate 'line', 381 + ne $I10, -1, rxscan835_done + goto rxscan835_scan + rxscan835_loop: + ($P10) = rx831_cur."from"() + inc $P10 + set rx831_pos, $P10 + ge rx831_pos, rx831_eos, rxscan835_done + rxscan835_scan: + set_addr $I10, rxscan835_loop + rx831_cur."!mark_push"(0, rx831_pos, $I10) + rxscan835_done: +.annotate 'line', 388 # rx subrule "deflongname" subtype=capture negate= - rx802_cur."!cursor_pos"(rx802_pos) - $P10 = rx802_cur."deflongname"() - unless $P10, rx802_fail - rx802_cur."!mark_push"(0, -1, 0, $P10) + rx831_cur."!cursor_pos"(rx831_pos) + $P10 = rx831_cur."deflongname"() + unless $P10, rx831_fail + rx831_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("deflongname") - rx802_pos = $P10."pos"() + rx831_pos = $P10."pos"() # rx enumcharlist negate=0 zerowidth - ge rx802_pos, rx802_eos, rx802_fail - sub $I10, rx802_pos, rx802_off - substr $S10, rx802_tgt, $I10, 1 + sub $I10, rx831_pos, rx831_off + substr $S10, rx831_tgt, $I10, 1 index $I11, "(", $S10 - lt $I11, 0, rx802_fail + lt $I11, 0, rx831_fail # rx subrule "args" subtype=capture negate= - rx802_cur."!cursor_pos"(rx802_pos) - $P10 = rx802_cur."args"() - unless $P10, rx802_fail - rx802_cur."!mark_push"(0, -1, 0, $P10) + rx831_cur."!cursor_pos"(rx831_pos) + $P10 = rx831_cur."args"() + unless $P10, rx831_fail + rx831_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("args") - rx802_pos = $P10."pos"() -.annotate 'line', 380 + rx831_pos = $P10."pos"() +.annotate 'line', 387 # rx pass - rx802_cur."!cursor_pass"(rx802_pos, "term:sym") - if_null rx802_debug, debug_705 - rx802_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx802_pos) - debug_705: - .return (rx802_cur) - rx802_restart: + rx831_cur."!cursor_pass"(rx831_pos, "term:sym") + if_null rx831_debug, debug_719 + rx831_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx831_pos) + debug_719: + .return (rx831_cur) + rx831_restart: .annotate 'line', 4 - if_null rx802_debug, debug_706 - rx802_cur."!cursor_debug"("NEXT ", "term:sym") - debug_706: - rx802_fail: - (rx802_rep, rx802_pos, $I10, $P10) = rx802_cur."!mark_fail"(0) - lt rx802_pos, -1, rx802_done - eq rx802_pos, -1, rx802_fail - jump $I10 - rx802_done: - rx802_cur."!cursor_fail"() - if_null rx802_debug, debug_707 - rx802_cur."!cursor_debug"("FAIL ", "term:sym") - debug_707: - .return (rx802_cur) + if_null rx831_debug, debug_720 + rx831_cur."!cursor_debug"("NEXT", "term:sym") + debug_720: + rx831_fail: + (rx831_rep, rx831_pos, $I10, $P10) = rx831_cur."!mark_fail"(0) + lt rx831_pos, -1, rx831_done + eq rx831_pos, -1, rx831_fail + jump $I10 + rx831_done: + rx831_cur."!cursor_fail"() + if_null rx831_debug, debug_721 + rx831_cur."!cursor_debug"("FAIL", "term:sym") + debug_721: + .return (rx831_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("189_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("195_1284728478.15265") :method .annotate 'line', 4 - $P804 = self."!PREFIX__!subrule"("deflongname", "") - new $P805, "ResizablePMCArray" - push $P805, $P804 - .return ($P805) + $P833 = self."!PREFIX__!subrule"("deflongname", "") + new $P834, "ResizablePMCArray" + push $P834, $P833 + .return ($P834) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("190_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("196_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx808_tgt - .local int rx808_pos - .local int rx808_off - .local int rx808_eos - .local int rx808_rep - .local pmc rx808_cur - .local pmc rx808_debug - (rx808_cur, rx808_pos, rx808_tgt, $I10) = self."!cursor_start"() - rx808_cur."!cursor_caparray"("args") - getattribute rx808_debug, rx808_cur, "$!debug" - .lex unicode:"$\x{a2}", rx808_cur + .local string rx837_tgt + .local int rx837_pos + .local int rx837_off + .local int rx837_eos + .local int rx837_rep + .local pmc rx837_cur + .local pmc rx837_debug + (rx837_cur, rx837_pos, rx837_tgt, $I10) = self."!cursor_start"() + rx837_cur."!cursor_caparray"("args") + getattribute rx837_debug, rx837_cur, "$!debug" + .lex unicode:"$\x{a2}", rx837_cur .local pmc match .lex "$/", match - length rx808_eos, rx808_tgt - gt rx808_pos, rx808_eos, rx808_done - set rx808_off, 0 - lt rx808_pos, 2, rx808_start - sub rx808_off, rx808_pos, 1 - substr rx808_tgt, rx808_tgt, rx808_off - rx808_start: - eq $I10, 1, rx808_restart - if_null rx808_debug, debug_708 - rx808_cur."!cursor_debug"("START ", "term:sym") - debug_708: + length rx837_eos, rx837_tgt + gt rx837_pos, rx837_eos, rx837_done + set rx837_off, 0 + lt rx837_pos, 2, rx837_start + sub rx837_off, rx837_pos, 1 + substr rx837_tgt, rx837_tgt, rx837_off + rx837_start: + eq $I10, 1, rx837_restart + if_null rx837_debug, debug_722 + rx837_cur."!cursor_debug"("START", "term:sym") + debug_722: $I10 = self.'from'() - ne $I10, -1, rxscan812_done - goto rxscan812_scan - rxscan812_loop: - ($P10) = rx808_cur."from"() - inc $P10 - set rx808_pos, $P10 - ge rx808_pos, rx808_eos, rxscan812_done - rxscan812_scan: - set_addr $I10, rxscan812_loop - rx808_cur."!mark_push"(0, rx808_pos, $I10) - rxscan812_done: -.annotate 'line', 385 + ne $I10, -1, rxscan841_done + goto rxscan841_scan + rxscan841_loop: + ($P10) = rx837_cur."from"() + inc $P10 + set rx837_pos, $P10 + ge rx837_pos, rx837_eos, rxscan841_done + rxscan841_scan: + set_addr $I10, rxscan841_loop + rx837_cur."!mark_push"(0, rx837_pos, $I10) + rxscan841_done: +.annotate 'line', 392 # rx subrule "name" subtype=capture negate= - rx808_cur."!cursor_pos"(rx808_pos) - $P10 = rx808_cur."name"() - unless $P10, rx808_fail - rx808_cur."!mark_push"(0, -1, 0, $P10) + rx837_cur."!cursor_pos"(rx837_pos) + $P10 = rx837_cur."name"() + unless $P10, rx837_fail + rx837_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("name") - rx808_pos = $P10."pos"() - # rx rxquantr813 ** 0..1 - set_addr $I10, rxquantr813_done - rx808_cur."!mark_push"(0, rx808_pos, $I10) - rxquantr813_loop: + rx837_pos = $P10."pos"() + # rx rxquantr842 ** 0..1 + set_addr $I10, rxquantr842_done + rx837_cur."!mark_push"(0, rx837_pos, $I10) + rxquantr842_loop: # rx subrule "args" subtype=capture negate= - rx808_cur."!cursor_pos"(rx808_pos) - $P10 = rx808_cur."args"() - unless $P10, rx808_fail - goto rxsubrule814_pass - rxsubrule814_back: + rx837_cur."!cursor_pos"(rx837_pos) + $P10 = rx837_cur."args"() + unless $P10, rx837_fail + goto rxsubrule843_pass + rxsubrule843_back: $P10 = $P10."!cursor_next"() - unless $P10, rx808_fail - rxsubrule814_pass: - set_addr $I10, rxsubrule814_back - rx808_cur."!mark_push"(0, rx808_pos, $I10, $P10) + unless $P10, rx837_fail + rxsubrule843_pass: + set_addr $I10, rxsubrule843_back + rx837_cur."!mark_push"(0, rx837_pos, $I10, $P10) $P10."!cursor_names"("args") - rx808_pos = $P10."pos"() - set_addr $I10, rxquantr813_done - (rx808_rep) = rx808_cur."!mark_commit"($I10) - rxquantr813_done: -.annotate 'line', 384 + rx837_pos = $P10."pos"() + set_addr $I10, rxquantr842_done + (rx837_rep) = rx837_cur."!mark_commit"($I10) + rxquantr842_done: +.annotate 'line', 391 # rx pass - rx808_cur."!cursor_pass"(rx808_pos, "term:sym") - if_null rx808_debug, debug_709 - rx808_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx808_pos) - debug_709: - .return (rx808_cur) - rx808_restart: + rx837_cur."!cursor_pass"(rx837_pos, "term:sym") + if_null rx837_debug, debug_723 + rx837_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx837_pos) + debug_723: + .return (rx837_cur) + rx837_restart: .annotate 'line', 4 - if_null rx808_debug, debug_710 - rx808_cur."!cursor_debug"("NEXT ", "term:sym") - debug_710: - rx808_fail: - (rx808_rep, rx808_pos, $I10, $P10) = rx808_cur."!mark_fail"(0) - lt rx808_pos, -1, rx808_done - eq rx808_pos, -1, rx808_fail - jump $I10 - rx808_done: - rx808_cur."!cursor_fail"() - if_null rx808_debug, debug_711 - rx808_cur."!cursor_debug"("FAIL ", "term:sym") - debug_711: - .return (rx808_cur) + if_null rx837_debug, debug_724 + rx837_cur."!cursor_debug"("NEXT", "term:sym") + debug_724: + rx837_fail: + (rx837_rep, rx837_pos, $I10, $P10) = rx837_cur."!mark_fail"(0) + lt rx837_pos, -1, rx837_done + eq rx837_pos, -1, rx837_fail + jump $I10 + rx837_done: + rx837_cur."!cursor_fail"() + if_null rx837_debug, debug_725 + rx837_cur."!cursor_debug"("FAIL", "term:sym") + debug_725: + .return (rx837_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("191_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("197_1284728478.15265") :method .annotate 'line', 4 - $P810 = self."!PREFIX__!subrule"("name", "") - new $P811, "ResizablePMCArray" - push $P811, $P810 - .return ($P811) + $P839 = self."!PREFIX__!subrule"("name", "") + new $P840, "ResizablePMCArray" + push $P840, $P839 + .return ($P840) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("192_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("198_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx816_tgt - .local int rx816_pos - .local int rx816_off - .local int rx816_eos - .local int rx816_rep - .local pmc rx816_cur - .local pmc rx816_debug - (rx816_cur, rx816_pos, rx816_tgt, $I10) = self."!cursor_start"() - rx816_cur."!cursor_caparray"("args") - getattribute rx816_debug, rx816_cur, "$!debug" - .lex unicode:"$\x{a2}", rx816_cur - .local pmc match - .lex "$/", match - length rx816_eos, rx816_tgt - gt rx816_pos, rx816_eos, rx816_done - set rx816_off, 0 - lt rx816_pos, 2, rx816_start - sub rx816_off, rx816_pos, 1 - substr rx816_tgt, rx816_tgt, rx816_off - rx816_start: - eq $I10, 1, rx816_restart - if_null rx816_debug, debug_712 - rx816_cur."!cursor_debug"("START ", "term:sym") - debug_712: + .local string rx845_tgt + .local int rx845_pos + .local int rx845_off + .local int rx845_eos + .local int rx845_rep + .local pmc rx845_cur + .local pmc rx845_debug + (rx845_cur, rx845_pos, rx845_tgt, $I10) = self."!cursor_start"() + rx845_cur."!cursor_caparray"("args") + getattribute rx845_debug, rx845_cur, "$!debug" + .lex unicode:"$\x{a2}", rx845_cur + .local pmc match + .lex "$/", match + length rx845_eos, rx845_tgt + gt rx845_pos, rx845_eos, rx845_done + set rx845_off, 0 + lt rx845_pos, 2, rx845_start + sub rx845_off, rx845_pos, 1 + substr rx845_tgt, rx845_tgt, rx845_off + rx845_start: + eq $I10, 1, rx845_restart + if_null rx845_debug, debug_726 + rx845_cur."!cursor_debug"("START", "term:sym") + debug_726: $I10 = self.'from'() - ne $I10, -1, rxscan819_done - goto rxscan819_scan - rxscan819_loop: - ($P10) = rx816_cur."from"() - inc $P10 - set rx816_pos, $P10 - ge rx816_pos, rx816_eos, rxscan819_done - rxscan819_scan: - set_addr $I10, rxscan819_loop - rx816_cur."!mark_push"(0, rx816_pos, $I10) - rxscan819_done: -.annotate 'line', 389 + ne $I10, -1, rxscan848_done + goto rxscan848_scan + rxscan848_loop: + ($P10) = rx845_cur."from"() + inc $P10 + set rx845_pos, $P10 + ge rx845_pos, rx845_eos, rxscan848_done + rxscan848_scan: + set_addr $I10, rxscan848_loop + rx845_cur."!mark_push"(0, rx845_pos, $I10) + rxscan848_done: +.annotate 'line', 396 # rx literal "pir::" - add $I11, rx816_pos, 5 - gt $I11, rx816_eos, rx816_fail - sub $I11, rx816_pos, rx816_off - substr $S10, rx816_tgt, $I11, 5 - ne $S10, "pir::", rx816_fail - add rx816_pos, 5 + add $I11, rx845_pos, 5 + gt $I11, rx845_eos, rx845_fail + sub $I11, rx845_pos, rx845_off + substr $S10, rx845_tgt, $I11, 5 + ne $S10, "pir::", rx845_fail + add rx845_pos, 5 # rx subcapture "op" - set_addr $I10, rxcap_820_fail - rx816_cur."!mark_push"(0, rx816_pos, $I10) + set_addr $I10, rxcap_849_fail + rx845_cur."!mark_push"(0, rx845_pos, $I10) # rx charclass_q w r 1..-1 - sub $I10, rx816_pos, rx816_off - find_not_cclass $I11, 8192, rx816_tgt, $I10, rx816_eos + sub $I10, rx845_pos, rx845_off + find_not_cclass $I11, 8192, rx845_tgt, $I10, rx845_eos add $I12, $I10, 1 - lt $I11, $I12, rx816_fail - add rx816_pos, rx816_off, $I11 - set_addr $I10, rxcap_820_fail - ($I12, $I11) = rx816_cur."!mark_peek"($I10) - rx816_cur."!cursor_pos"($I11) - ($P10) = rx816_cur."!cursor_start"() - $P10."!cursor_pass"(rx816_pos, "") - rx816_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, $I12, rx845_fail + add rx845_pos, rx845_off, $I11 + set_addr $I10, rxcap_849_fail + ($I12, $I11) = rx845_cur."!mark_peek"($I10) + rx845_cur."!cursor_pos"($I11) + ($P10) = rx845_cur."!cursor_start"() + $P10."!cursor_pass"(rx845_pos, "") + rx845_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("op") - goto rxcap_820_done - rxcap_820_fail: - goto rx816_fail - rxcap_820_done: - # rx rxquantr821 ** 0..1 - set_addr $I10, rxquantr821_done - rx816_cur."!mark_push"(0, rx816_pos, $I10) - rxquantr821_loop: + goto rxcap_849_done + rxcap_849_fail: + goto rx845_fail + rxcap_849_done: + # rx rxquantr850 ** 0..1 + set_addr $I10, rxquantr850_done + rx845_cur."!mark_push"(0, rx845_pos, $I10) + rxquantr850_loop: # rx subrule "args" subtype=capture negate= - rx816_cur."!cursor_pos"(rx816_pos) - $P10 = rx816_cur."args"() - unless $P10, rx816_fail - goto rxsubrule822_pass - rxsubrule822_back: + rx845_cur."!cursor_pos"(rx845_pos) + $P10 = rx845_cur."args"() + unless $P10, rx845_fail + goto rxsubrule851_pass + rxsubrule851_back: $P10 = $P10."!cursor_next"() - unless $P10, rx816_fail - rxsubrule822_pass: - set_addr $I10, rxsubrule822_back - rx816_cur."!mark_push"(0, rx816_pos, $I10, $P10) + unless $P10, rx845_fail + rxsubrule851_pass: + set_addr $I10, rxsubrule851_back + rx845_cur."!mark_push"(0, rx845_pos, $I10, $P10) $P10."!cursor_names"("args") - rx816_pos = $P10."pos"() - 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") - if_null rx816_debug, debug_713 - rx816_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx816_pos) - debug_713: - .return (rx816_cur) - rx816_restart: + rx845_pos = $P10."pos"() + set_addr $I10, rxquantr850_done + (rx845_rep) = rx845_cur."!mark_commit"($I10) + rxquantr850_done: +.annotate 'line', 395 + # rx pass + rx845_cur."!cursor_pass"(rx845_pos, "term:sym") + if_null rx845_debug, debug_727 + rx845_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx845_pos) + debug_727: + .return (rx845_cur) + rx845_restart: .annotate 'line', 4 - if_null rx816_debug, debug_714 - rx816_cur."!cursor_debug"("NEXT ", "term:sym") - debug_714: - rx816_fail: - (rx816_rep, rx816_pos, $I10, $P10) = rx816_cur."!mark_fail"(0) - lt rx816_pos, -1, rx816_done - eq rx816_pos, -1, rx816_fail - jump $I10 - rx816_done: - rx816_cur."!cursor_fail"() - if_null rx816_debug, debug_715 - rx816_cur."!cursor_debug"("FAIL ", "term:sym") - debug_715: - .return (rx816_cur) + if_null rx845_debug, debug_728 + rx845_cur."!cursor_debug"("NEXT", "term:sym") + debug_728: + rx845_fail: + (rx845_rep, rx845_pos, $I10, $P10) = rx845_cur."!mark_fail"(0) + lt rx845_pos, -1, rx845_done + eq rx845_pos, -1, rx845_fail + jump $I10 + rx845_done: + rx845_cur."!cursor_fail"() + if_null rx845_debug, debug_729 + rx845_cur."!cursor_debug"("FAIL", "term:sym") + debug_729: + .return (rx845_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("193_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("199_1284728478.15265") :method .annotate 'line', 4 - new $P818, "ResizablePMCArray" - push $P818, "pir::" - .return ($P818) + new $P847, "ResizablePMCArray" + push $P847, "pir::" + .return ($P847) .end .namespace ["NQP";"Grammar"] -.sub "args" :subid("194_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "args" :subid("200_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx824_tgt - .local int rx824_pos - .local int rx824_off - .local int rx824_eos - .local int rx824_rep - .local pmc rx824_cur - .local pmc rx824_debug - (rx824_cur, rx824_pos, rx824_tgt, $I10) = self."!cursor_start"() - getattribute rx824_debug, rx824_cur, "$!debug" - .lex unicode:"$\x{a2}", rx824_cur - .local pmc match - .lex "$/", match - length rx824_eos, rx824_tgt - gt rx824_pos, rx824_eos, rx824_done - set rx824_off, 0 - lt rx824_pos, 2, rx824_start - sub rx824_off, rx824_pos, 1 - substr rx824_tgt, rx824_tgt, rx824_off - rx824_start: - eq $I10, 1, rx824_restart - if_null rx824_debug, debug_716 - rx824_cur."!cursor_debug"("START ", "args") - debug_716: + .local string rx853_tgt + .local int rx853_pos + .local int rx853_off + .local int rx853_eos + .local int rx853_rep + .local pmc rx853_cur + .local pmc rx853_debug + (rx853_cur, rx853_pos, rx853_tgt, $I10) = self."!cursor_start"() + getattribute rx853_debug, rx853_cur, "$!debug" + .lex unicode:"$\x{a2}", rx853_cur + .local pmc match + .lex "$/", match + length rx853_eos, rx853_tgt + gt rx853_pos, rx853_eos, rx853_done + set rx853_off, 0 + lt rx853_pos, 2, rx853_start + sub rx853_off, rx853_pos, 1 + substr rx853_tgt, rx853_tgt, rx853_off + rx853_start: + eq $I10, 1, rx853_restart + if_null rx853_debug, debug_730 + rx853_cur."!cursor_debug"("START", "args") + debug_730: $I10 = self.'from'() - ne $I10, -1, rxscan828_done - goto rxscan828_scan - rxscan828_loop: - ($P10) = rx824_cur."from"() - inc $P10 - set rx824_pos, $P10 - ge rx824_pos, rx824_eos, rxscan828_done - rxscan828_scan: - set_addr $I10, rxscan828_loop - rx824_cur."!mark_push"(0, rx824_pos, $I10) - rxscan828_done: -.annotate 'line', 393 + ne $I10, -1, rxscan857_done + goto rxscan857_scan + rxscan857_loop: + ($P10) = rx853_cur."from"() + inc $P10 + set rx853_pos, $P10 + ge rx853_pos, rx853_eos, rxscan857_done + rxscan857_scan: + set_addr $I10, rxscan857_loop + rx853_cur."!mark_push"(0, rx853_pos, $I10) + rxscan857_done: +.annotate 'line', 400 # rx literal "(" - add $I11, rx824_pos, 1 - gt $I11, rx824_eos, rx824_fail - sub $I11, rx824_pos, rx824_off - ord $I11, rx824_tgt, $I11 - ne $I11, 40, rx824_fail - add rx824_pos, 1 + add $I11, rx853_pos, 1 + gt $I11, rx853_eos, rx853_fail + sub $I11, rx853_pos, rx853_off + ord $I11, rx853_tgt, $I11 + ne $I11, 40, rx853_fail + add rx853_pos, 1 # rx subrule "arglist" subtype=capture negate= - rx824_cur."!cursor_pos"(rx824_pos) - $P10 = rx824_cur."arglist"() - unless $P10, rx824_fail - rx824_cur."!mark_push"(0, -1, 0, $P10) + rx853_cur."!cursor_pos"(rx853_pos) + $P10 = rx853_cur."arglist"() + unless $P10, rx853_fail + rx853_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("arglist") - rx824_pos = $P10."pos"() + rx853_pos = $P10."pos"() # rx literal ")" - add $I11, rx824_pos, 1 - gt $I11, rx824_eos, rx824_fail - sub $I11, rx824_pos, rx824_off - ord $I11, rx824_tgt, $I11 - ne $I11, 41, rx824_fail - add rx824_pos, 1 - # rx pass - rx824_cur."!cursor_pass"(rx824_pos, "args") - if_null rx824_debug, debug_717 - rx824_cur."!cursor_debug"("PASS ", "args", " at pos=", rx824_pos) - debug_717: - .return (rx824_cur) - rx824_restart: + add $I11, rx853_pos, 1 + gt $I11, rx853_eos, rx853_fail + sub $I11, rx853_pos, rx853_off + ord $I11, rx853_tgt, $I11 + ne $I11, 41, rx853_fail + add rx853_pos, 1 + # rx pass + rx853_cur."!cursor_pass"(rx853_pos, "args") + if_null rx853_debug, debug_731 + rx853_cur."!cursor_debug"("PASS", "args", " at pos=", rx853_pos) + debug_731: + .return (rx853_cur) + rx853_restart: .annotate 'line', 4 - if_null rx824_debug, debug_718 - rx824_cur."!cursor_debug"("NEXT ", "args") - debug_718: - rx824_fail: - (rx824_rep, rx824_pos, $I10, $P10) = rx824_cur."!mark_fail"(0) - lt rx824_pos, -1, rx824_done - eq rx824_pos, -1, rx824_fail - jump $I10 - rx824_done: - rx824_cur."!cursor_fail"() - if_null rx824_debug, debug_719 - rx824_cur."!cursor_debug"("FAIL ", "args") - debug_719: - .return (rx824_cur) + if_null rx853_debug, debug_732 + rx853_cur."!cursor_debug"("NEXT", "args") + debug_732: + rx853_fail: + (rx853_rep, rx853_pos, $I10, $P10) = rx853_cur."!mark_fail"(0) + lt rx853_pos, -1, rx853_done + eq rx853_pos, -1, rx853_fail + jump $I10 + rx853_done: + rx853_cur."!cursor_fail"() + if_null rx853_debug, debug_733 + rx853_cur."!cursor_debug"("FAIL", "args") + debug_733: + .return (rx853_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__args" :subid("195_1282016529.10767") :method +.sub "!PREFIX__args" :subid("201_1284728478.15265") :method .annotate 'line', 4 - $P826 = self."!PREFIX__!subrule"("arglist", "(") - new $P827, "ResizablePMCArray" - push $P827, $P826 - .return ($P827) + $P855 = self."!PREFIX__!subrule"("arglist", "(") + new $P856, "ResizablePMCArray" + push $P856, $P855 + .return ($P856) .end .namespace ["NQP";"Grammar"] -.sub "arglist" :subid("196_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "arglist" :subid("202_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx830_tgt - .local int rx830_pos - .local int rx830_off - .local int rx830_eos - .local int rx830_rep - .local pmc rx830_cur - .local pmc rx830_debug - (rx830_cur, rx830_pos, rx830_tgt, $I10) = self."!cursor_start"() - getattribute rx830_debug, rx830_cur, "$!debug" - .lex unicode:"$\x{a2}", rx830_cur - .local pmc match - .lex "$/", match - length rx830_eos, rx830_tgt - gt rx830_pos, rx830_eos, rx830_done - set rx830_off, 0 - lt rx830_pos, 2, rx830_start - sub rx830_off, rx830_pos, 1 - substr rx830_tgt, rx830_tgt, rx830_off - rx830_start: - eq $I10, 1, rx830_restart - if_null rx830_debug, debug_720 - rx830_cur."!cursor_debug"("START ", "arglist") - debug_720: + .local string rx859_tgt + .local int rx859_pos + .local int rx859_off + .local int rx859_eos + .local int rx859_rep + .local pmc rx859_cur + .local pmc rx859_debug + (rx859_cur, rx859_pos, rx859_tgt, $I10) = self."!cursor_start"() + getattribute rx859_debug, rx859_cur, "$!debug" + .lex unicode:"$\x{a2}", rx859_cur + .local pmc match + .lex "$/", match + length rx859_eos, rx859_tgt + gt rx859_pos, rx859_eos, rx859_done + set rx859_off, 0 + lt rx859_pos, 2, rx859_start + sub rx859_off, rx859_pos, 1 + substr rx859_tgt, rx859_tgt, rx859_off + rx859_start: + eq $I10, 1, rx859_restart + if_null rx859_debug, debug_734 + rx859_cur."!cursor_debug"("START", "arglist") + debug_734: $I10 = self.'from'() - ne $I10, -1, rxscan834_done - goto rxscan834_scan - rxscan834_loop: - ($P10) = rx830_cur."from"() - inc $P10 - set rx830_pos, $P10 - ge rx830_pos, rx830_eos, rxscan834_done - rxscan834_scan: - set_addr $I10, rxscan834_loop - rx830_cur."!mark_push"(0, rx830_pos, $I10) - rxscan834_done: -.annotate 'line', 397 + ne $I10, -1, rxscan863_done + goto rxscan863_scan + rxscan863_loop: + ($P10) = rx859_cur."from"() + inc $P10 + set rx859_pos, $P10 + ge rx859_pos, rx859_eos, rxscan863_done + rxscan863_scan: + set_addr $I10, rxscan863_loop + rx859_cur."!mark_push"(0, rx859_pos, $I10) + rxscan863_done: +.annotate 'line', 404 # 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 + rx859_cur."!cursor_pos"(rx859_pos) + $P10 = rx859_cur."ws"() + unless $P10, rx859_fail + rx859_pos = $P10."pos"() + alt864_0: +.annotate 'line', 405 + set_addr $I10, alt864_1 + rx859_cur."!mark_push"(0, rx859_pos, $I10) +.annotate 'line', 406 # rx subrule "EXPR" subtype=capture negate= - rx830_cur."!cursor_pos"(rx830_pos) - $P10 = rx830_cur."EXPR"("f=") - unless $P10, rx830_fail - rx830_cur."!mark_push"(0, -1, 0, $P10) + rx859_cur."!cursor_pos"(rx859_pos) + $P10 = rx859_cur."EXPR"("f=") + unless $P10, rx859_fail + rx859_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("EXPR") - rx830_pos = $P10."pos"() - goto alt835_end - alt835_1: - alt835_end: -.annotate 'line', 396 + rx859_pos = $P10."pos"() + goto alt864_end + alt864_1: + alt864_end: +.annotate 'line', 403 # rx pass - rx830_cur."!cursor_pass"(rx830_pos, "arglist") - if_null rx830_debug, debug_721 - rx830_cur."!cursor_debug"("PASS ", "arglist", " at pos=", rx830_pos) - debug_721: - .return (rx830_cur) - rx830_restart: + rx859_cur."!cursor_pass"(rx859_pos, "arglist") + if_null rx859_debug, debug_735 + rx859_cur."!cursor_debug"("PASS", "arglist", " at pos=", rx859_pos) + debug_735: + .return (rx859_cur) + rx859_restart: .annotate 'line', 4 - if_null rx830_debug, debug_722 - rx830_cur."!cursor_debug"("NEXT ", "arglist") - debug_722: - rx830_fail: - (rx830_rep, rx830_pos, $I10, $P10) = rx830_cur."!mark_fail"(0) - lt rx830_pos, -1, rx830_done - eq rx830_pos, -1, rx830_fail - jump $I10 - rx830_done: - rx830_cur."!cursor_fail"() - if_null rx830_debug, debug_723 - rx830_cur."!cursor_debug"("FAIL ", "arglist") - debug_723: - .return (rx830_cur) + if_null rx859_debug, debug_736 + rx859_cur."!cursor_debug"("NEXT", "arglist") + debug_736: + rx859_fail: + (rx859_rep, rx859_pos, $I10, $P10) = rx859_cur."!mark_fail"(0) + lt rx859_pos, -1, rx859_done + eq rx859_pos, -1, rx859_fail + jump $I10 + rx859_done: + rx859_cur."!cursor_fail"() + if_null rx859_debug, debug_737 + rx859_cur."!cursor_debug"("FAIL", "arglist") + debug_737: + .return (rx859_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__arglist" :subid("197_1282016529.10767") :method +.sub "!PREFIX__arglist" :subid("203_1284728478.15265") :method .annotate 'line', 4 - $P832 = self."!PREFIX__!subrule"("ws", "") - new $P833, "ResizablePMCArray" - push $P833, $P832 - .return ($P833) + $P861 = self."!PREFIX__!subrule"("ws", "") + new $P862, "ResizablePMCArray" + push $P862, $P861 + .return ($P862) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("198_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "term:sym" :subid("204_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx837_tgt - .local int rx837_pos - .local int rx837_off - .local int rx837_eos - .local int rx837_rep - .local pmc rx837_cur - .local pmc rx837_debug - (rx837_cur, rx837_pos, rx837_tgt, $I10) = self."!cursor_start"() - getattribute rx837_debug, rx837_cur, "$!debug" - .lex unicode:"$\x{a2}", rx837_cur + .local string rx866_tgt + .local int rx866_pos + .local int rx866_off + .local int rx866_eos + .local int rx866_rep + .local pmc rx866_cur + .local pmc rx866_debug + (rx866_cur, rx866_pos, rx866_tgt, $I10) = self."!cursor_start"() + getattribute rx866_debug, rx866_cur, "$!debug" + .lex unicode:"$\x{a2}", rx866_cur .local pmc match .lex "$/", match - length rx837_eos, rx837_tgt - gt rx837_pos, rx837_eos, rx837_done - set rx837_off, 0 - lt rx837_pos, 2, rx837_start - sub rx837_off, rx837_pos, 1 - substr rx837_tgt, rx837_tgt, rx837_off - rx837_start: - eq $I10, 1, rx837_restart - if_null rx837_debug, debug_724 - rx837_cur."!cursor_debug"("START ", "term:sym") - debug_724: + length rx866_eos, rx866_tgt + gt rx866_pos, rx866_eos, rx866_done + set rx866_off, 0 + lt rx866_pos, 2, rx866_start + sub rx866_off, rx866_pos, 1 + substr rx866_tgt, rx866_tgt, rx866_off + rx866_start: + eq $I10, 1, rx866_restart + if_null rx866_debug, debug_738 + rx866_cur."!cursor_debug"("START", "term:sym") + debug_738: $I10 = self.'from'() - ne $I10, -1, rxscan841_done - goto rxscan841_scan - rxscan841_loop: - ($P10) = rx837_cur."from"() - inc $P10 - set rx837_pos, $P10 - ge rx837_pos, rx837_eos, rxscan841_done - rxscan841_scan: - set_addr $I10, rxscan841_loop - rx837_cur."!mark_push"(0, rx837_pos, $I10) - rxscan841_done: -.annotate 'line', 405 + ne $I10, -1, rxscan870_done + goto rxscan870_scan + rxscan870_loop: + ($P10) = rx866_cur."from"() + inc $P10 + set rx866_pos, $P10 + ge rx866_pos, rx866_eos, rxscan870_done + rxscan870_scan: + set_addr $I10, rxscan870_loop + rx866_cur."!mark_push"(0, rx866_pos, $I10) + rxscan870_done: +.annotate 'line', 412 # rx subrule "value" subtype=capture negate= - rx837_cur."!cursor_pos"(rx837_pos) - $P10 = rx837_cur."value"() - unless $P10, rx837_fail - rx837_cur."!mark_push"(0, -1, 0, $P10) + rx866_cur."!cursor_pos"(rx866_pos) + $P10 = rx866_cur."value"() + unless $P10, rx866_fail + rx866_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("value") - rx837_pos = $P10."pos"() + rx866_pos = $P10."pos"() # rx pass - rx837_cur."!cursor_pass"(rx837_pos, "term:sym") - if_null rx837_debug, debug_725 - rx837_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx837_pos) - debug_725: - .return (rx837_cur) - rx837_restart: + rx866_cur."!cursor_pass"(rx866_pos, "term:sym") + if_null rx866_debug, debug_739 + rx866_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx866_pos) + debug_739: + .return (rx866_cur) + rx866_restart: .annotate 'line', 4 - if_null rx837_debug, debug_726 - rx837_cur."!cursor_debug"("NEXT ", "term:sym") - debug_726: - rx837_fail: - (rx837_rep, rx837_pos, $I10, $P10) = rx837_cur."!mark_fail"(0) - lt rx837_pos, -1, rx837_done - eq rx837_pos, -1, rx837_fail - jump $I10 - rx837_done: - rx837_cur."!cursor_fail"() - if_null rx837_debug, debug_727 - rx837_cur."!cursor_debug"("FAIL ", "term:sym") - debug_727: - .return (rx837_cur) + if_null rx866_debug, debug_740 + rx866_cur."!cursor_debug"("NEXT", "term:sym") + debug_740: + rx866_fail: + (rx866_rep, rx866_pos, $I10, $P10) = rx866_cur."!mark_fail"(0) + lt rx866_pos, -1, rx866_done + eq rx866_pos, -1, rx866_fail + jump $I10 + rx866_done: + rx866_cur."!cursor_fail"() + if_null rx866_debug, debug_741 + rx866_cur."!cursor_debug"("FAIL", "term:sym") + debug_741: + .return (rx866_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("199_1282016529.10767") :method +.sub "!PREFIX__term:sym" :subid("205_1284728478.15265") :method .annotate 'line', 4 - $P839 = self."!PREFIX__!subrule"("value", "") - new $P840, "ResizablePMCArray" - push $P840, $P839 - .return ($P840) + $P868 = self."!PREFIX__!subrule"("value", "") + new $P869, "ResizablePMCArray" + push $P869, $P868 + .return ($P869) .end .namespace ["NQP";"Grammar"] -.sub "value" :subid("200_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "value" :subid("206_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx843_tgt - .local int rx843_pos - .local int rx843_off - .local int rx843_eos - .local int rx843_rep - .local pmc rx843_cur - .local pmc rx843_debug - (rx843_cur, rx843_pos, rx843_tgt, $I10) = self."!cursor_start"() - getattribute rx843_debug, rx843_cur, "$!debug" - .lex unicode:"$\x{a2}", rx843_cur - .local pmc match - .lex "$/", match - length rx843_eos, rx843_tgt - gt rx843_pos, rx843_eos, rx843_done - set rx843_off, 0 - lt rx843_pos, 2, rx843_start - sub rx843_off, rx843_pos, 1 - substr rx843_tgt, rx843_tgt, rx843_off - rx843_start: - eq $I10, 1, rx843_restart - if_null rx843_debug, debug_728 - rx843_cur."!cursor_debug"("START ", "value") - debug_728: - $I10 = self.'from'() - ne $I10, -1, rxscan848_done - goto rxscan848_scan - rxscan848_loop: - ($P10) = rx843_cur."from"() - inc $P10 - set rx843_pos, $P10 - ge rx843_pos, rx843_eos, rxscan848_done - rxscan848_scan: - set_addr $I10, rxscan848_loop - 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"() - unless $P10, rx843_fail - rx843_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote") - 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"() - unless $P10, rx843_fail - rx843_cur."!mark_push"(0, -1, 0, $P10) - $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 - rx843_cur."!cursor_debug"("PASS ", "value", " at pos=", rx843_pos) - debug_729: - .return (rx843_cur) - rx843_restart: -.annotate 'line', 4 - if_null rx843_debug, debug_730 - rx843_cur."!cursor_debug"("NEXT ", "value") - debug_730: - rx843_fail: - (rx843_rep, rx843_pos, $I10, $P10) = rx843_cur."!mark_fail"(0) - lt rx843_pos, -1, rx843_done - eq rx843_pos, -1, rx843_fail - jump $I10 - rx843_done: - rx843_cur."!cursor_fail"() - if_null rx843_debug, debug_731 - rx843_cur."!cursor_debug"("FAIL ", "value") - debug_731: - .return (rx843_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__value" :subid("201_1282016529.10767") :method -.annotate 'line', 4 - $P845 = self."!PREFIX__!subrule"("number", "") - $P846 = self."!PREFIX__!subrule"("quote", "") - new $P847, "ResizablePMCArray" - push $P847, $P845 - push $P847, $P846 - .return ($P847) -.end - - -.namespace ["NQP";"Grammar"] -.sub "number" :subid("202_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx851_tgt - .local int rx851_pos - .local int rx851_off - .local int rx851_eos - .local int rx851_rep - .local pmc rx851_cur - .local pmc rx851_debug - (rx851_cur, rx851_pos, rx851_tgt, $I10) = self."!cursor_start"() - getattribute rx851_debug, rx851_cur, "$!debug" - .lex unicode:"$\x{a2}", rx851_cur - .local pmc match - .lex "$/", match - length rx851_eos, rx851_tgt - gt rx851_pos, rx851_eos, rx851_done - set rx851_off, 0 - lt rx851_pos, 2, rx851_start - sub rx851_off, rx851_pos, 1 - substr rx851_tgt, rx851_tgt, rx851_off - rx851_start: - eq $I10, 1, rx851_restart - if_null rx851_debug, debug_732 - rx851_cur."!cursor_debug"("START ", "number") - debug_732: - $I10 = self.'from'() - ne $I10, -1, rxscan854_done - goto rxscan854_scan - rxscan854_loop: - ($P10) = rx851_cur."from"() - inc $P10 - set rx851_pos, $P10 - ge rx851_pos, rx851_eos, rxscan854_done - rxscan854_scan: - 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) - # rx rxquantr855 ** 0..1 - set_addr $I10, rxquantr855_done - rx851_cur."!mark_push"(0, rx851_pos, $I10) - rxquantr855_loop: - # rx enumcharlist negate=0 - ge rx851_pos, rx851_eos, rx851_fail - sub $I10, rx851_pos, rx851_off - substr $S10, rx851_tgt, $I10, 1 - index $I11, "+-", $S10 - lt $I11, 0, rx851_fail - inc rx851_pos - set_addr $I10, rxquantr855_done - (rx851_rep) = rx851_cur."!mark_commit"($I10) - rxquantr855_done: - set_addr $I10, rxcap_856_fail - ($I12, $I11) = rx851_cur."!mark_peek"($I10) - rx851_cur."!cursor_pos"($I11) - ($P10) = rx851_cur."!cursor_start"() - $P10."!cursor_pass"(rx851_pos, "") - rx851_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sign") - goto rxcap_856_done - rxcap_856_fail: - 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= - rx851_cur."!cursor_pos"(rx851_pos) - $P10 = rx851_cur."dec_number"() - unless $P10, rx851_fail - rx851_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("dec_number") - rx851_pos = $P10."pos"() - goto alt857_end - alt857_1: - # rx subrule "integer" subtype=capture negate= - rx851_cur."!cursor_pos"(rx851_pos) - $P10 = rx851_cur."integer"() - unless $P10, rx851_fail - rx851_cur."!mark_push"(0, -1, 0, $P10) - $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 - rx851_cur."!cursor_debug"("PASS ", "number", " at pos=", rx851_pos) - debug_733: - .return (rx851_cur) - rx851_restart: -.annotate 'line', 4 - if_null rx851_debug, debug_734 - rx851_cur."!cursor_debug"("NEXT ", "number") - debug_734: - rx851_fail: - (rx851_rep, rx851_pos, $I10, $P10) = rx851_cur."!mark_fail"(0) - lt rx851_pos, -1, rx851_done - eq rx851_pos, -1, rx851_fail - jump $I10 - rx851_done: - rx851_cur."!cursor_fail"() - if_null rx851_debug, debug_735 - rx851_cur."!cursor_debug"("FAIL ", "number") - debug_735: - .return (rx851_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__number" :subid("203_1282016529.10767") :method -.annotate 'line', 4 - new $P853, "ResizablePMCArray" - push $P853, "" - .return ($P853) -.end - - -.namespace ["NQP";"Grammar"] -.sub "quote" :subid("204_1282016529.10767") :method -.annotate 'line', 417 - $P859 = self."!protoregex"("quote") - .return ($P859) -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote" :subid("205_1282016529.10767") :method -.annotate 'line', 417 - $P861 = self."!PREFIX__!protoregex"("quote") - .return ($P861) -.end - - -.namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("206_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx863_tgt - .local int rx863_pos - .local int rx863_off - .local int rx863_eos - .local int rx863_rep - .local pmc rx863_cur - .local pmc rx863_debug - (rx863_cur, rx863_pos, rx863_tgt, $I10) = self."!cursor_start"() - getattribute rx863_debug, rx863_cur, "$!debug" - .lex unicode:"$\x{a2}", rx863_cur - .local pmc match - .lex "$/", match - length rx863_eos, rx863_tgt - gt rx863_pos, rx863_eos, rx863_done - set rx863_off, 0 - lt rx863_pos, 2, rx863_start - sub rx863_off, rx863_pos, 1 - substr rx863_tgt, rx863_tgt, rx863_off - rx863_start: - eq $I10, 1, rx863_restart - if_null rx863_debug, debug_736 - rx863_cur."!cursor_debug"("START ", "quote:sym") - debug_736: - $I10 = self.'from'() - ne $I10, -1, rxscan866_done - goto rxscan866_scan - rxscan866_loop: - ($P10) = rx863_cur."from"() - inc $P10 - set rx863_pos, $P10 - ge rx863_pos, rx863_eos, rxscan866_done - rxscan866_scan: - 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 - substr $S10, rx863_tgt, $I10, 1 - index $I11, "'", $S10 - lt $I11, 0, rx863_fail - # rx subrule "quote_EXPR" subtype=capture negate= - rx863_cur."!cursor_pos"(rx863_pos) - $P10 = rx863_cur."quote_EXPR"(":q") - unless $P10, rx863_fail - rx863_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx863_pos = $P10."pos"() - # rx pass - rx863_cur."!cursor_pass"(rx863_pos, "quote:sym") - if_null rx863_debug, debug_737 - rx863_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx863_pos) - debug_737: - .return (rx863_cur) - rx863_restart: -.annotate 'line', 4 - if_null rx863_debug, debug_738 - rx863_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_738: - rx863_fail: - (rx863_rep, rx863_pos, $I10, $P10) = rx863_cur."!mark_fail"(0) - lt rx863_pos, -1, rx863_done - eq rx863_pos, -1, rx863_fail - jump $I10 - rx863_done: - rx863_cur."!cursor_fail"() - if_null rx863_debug, debug_739 - rx863_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_739: - .return (rx863_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("207_1282016529.10767") :method -.annotate 'line', 4 - new $P865, "ResizablePMCArray" - push $P865, "'" - .return ($P865) -.end - - -.namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("208_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx868_tgt - .local int rx868_pos - .local int rx868_off - .local int rx868_eos - .local int rx868_rep - .local pmc rx868_cur - .local pmc rx868_debug - (rx868_cur, rx868_pos, rx868_tgt, $I10) = self."!cursor_start"() - getattribute rx868_debug, rx868_cur, "$!debug" - .lex unicode:"$\x{a2}", rx868_cur - .local pmc match - .lex "$/", match - length rx868_eos, rx868_tgt - gt rx868_pos, rx868_eos, rx868_done - set rx868_off, 0 - lt rx868_pos, 2, rx868_start - sub rx868_off, rx868_pos, 1 - substr rx868_tgt, rx868_tgt, rx868_off - rx868_start: - eq $I10, 1, rx868_restart - if_null rx868_debug, debug_740 - rx868_cur."!cursor_debug"("START ", "quote:sym") - debug_740: - $I10 = self.'from'() - ne $I10, -1, rxscan871_done - goto rxscan871_scan - rxscan871_loop: - ($P10) = rx868_cur."from"() - inc $P10 - set rx868_pos, $P10 - ge rx868_pos, rx868_eos, rxscan871_done - rxscan871_scan: - 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 - substr $S10, rx868_tgt, $I10, 1 - index $I11, "\"", $S10 - lt $I11, 0, rx868_fail - # rx subrule "quote_EXPR" subtype=capture negate= - rx868_cur."!cursor_pos"(rx868_pos) - $P10 = rx868_cur."quote_EXPR"(":qq") - unless $P10, rx868_fail - rx868_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx868_pos = $P10."pos"() - # rx pass - rx868_cur."!cursor_pass"(rx868_pos, "quote:sym") - if_null rx868_debug, debug_741 - rx868_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx868_pos) - debug_741: - .return (rx868_cur) - rx868_restart: -.annotate 'line', 4 - if_null rx868_debug, debug_742 - rx868_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_742: - rx868_fail: - (rx868_rep, rx868_pos, $I10, $P10) = rx868_cur."!mark_fail"(0) - lt rx868_pos, -1, rx868_done - eq rx868_pos, -1, rx868_fail - jump $I10 - rx868_done: - rx868_cur."!cursor_fail"() - if_null rx868_debug, debug_743 - rx868_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_743: - .return (rx868_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("209_1282016529.10767") :method -.annotate 'line', 4 - new $P870, "ResizablePMCArray" - push $P870, "\"" - .return ($P870) -.end - - -.namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("210_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx873_tgt - .local int rx873_pos - .local int rx873_off - .local int rx873_eos - .local int rx873_rep - .local pmc rx873_cur - .local pmc rx873_debug - (rx873_cur, rx873_pos, rx873_tgt, $I10) = self."!cursor_start"() - getattribute rx873_debug, rx873_cur, "$!debug" - .lex unicode:"$\x{a2}", rx873_cur + .local string rx872_tgt + .local int rx872_pos + .local int rx872_off + .local int rx872_eos + .local int rx872_rep + .local pmc rx872_cur + .local pmc rx872_debug + (rx872_cur, rx872_pos, rx872_tgt, $I10) = self."!cursor_start"() + getattribute rx872_debug, rx872_cur, "$!debug" + .lex unicode:"$\x{a2}", rx872_cur .local pmc match .lex "$/", match - length rx873_eos, rx873_tgt - gt rx873_pos, rx873_eos, rx873_done - set rx873_off, 0 - lt rx873_pos, 2, rx873_start - sub rx873_off, rx873_pos, 1 - substr rx873_tgt, rx873_tgt, rx873_off - rx873_start: - eq $I10, 1, rx873_restart - if_null rx873_debug, debug_744 - rx873_cur."!cursor_debug"("START ", "quote:sym") - debug_744: + length rx872_eos, rx872_tgt + gt rx872_pos, rx872_eos, rx872_done + set rx872_off, 0 + lt rx872_pos, 2, rx872_start + sub rx872_off, rx872_pos, 1 + substr rx872_tgt, rx872_tgt, rx872_off + rx872_start: + eq $I10, 1, rx872_restart + if_null rx872_debug, debug_742 + rx872_cur."!cursor_debug"("START", "value") + debug_742: $I10 = self.'from'() ne $I10, -1, rxscan877_done goto rxscan877_scan rxscan877_loop: - ($P10) = rx873_cur."from"() + ($P10) = rx872_cur."from"() inc $P10 - set rx873_pos, $P10 - ge rx873_pos, rx873_eos, rxscan877_done + set rx872_pos, $P10 + ge rx872_pos, rx872_eos, rxscan877_done rxscan877_scan: set_addr $I10, rxscan877_loop - rx873_cur."!mark_push"(0, rx873_pos, $I10) + rx872_cur."!mark_push"(0, rx872_pos, $I10) rxscan877_done: -.annotate 'line', 420 - # rx literal "q" - add $I11, rx873_pos, 1 - gt $I11, rx873_eos, rx873_fail - sub $I11, rx873_pos, rx873_off - ord $I11, rx873_tgt, $I11 - ne $I11, 113, rx873_fail - add rx873_pos, 1 - # rxanchor rwb - le rx873_pos, 0, rx873_fail - sub $I10, rx873_pos, rx873_off - is_cclass $I11, 8192, rx873_tgt, $I10 - if $I11, rx873_fail - dec $I10 - is_cclass $I11, 8192, rx873_tgt, $I10 - unless $I11, rx873_fail - # rx enumcharlist negate=1 zerowidth - ge rx873_pos, rx873_eos, rx873_fail - sub $I10, rx873_pos, rx873_off - substr $S10, rx873_tgt, $I10, 1 - index $I11, "(", $S10 - ge $I11, 0, rx873_fail - # rx subrule "ws" subtype=method negate= - rx873_cur."!cursor_pos"(rx873_pos) - $P10 = rx873_cur."ws"() - unless $P10, rx873_fail - rx873_pos = $P10."pos"() - # rx subrule "quote_EXPR" subtype=capture negate= - rx873_cur."!cursor_pos"(rx873_pos) - $P10 = rx873_cur."quote_EXPR"(":q") - unless $P10, rx873_fail - rx873_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx873_pos = $P10."pos"() + alt878_0: +.annotate 'line', 414 + set_addr $I10, alt878_1 + rx872_cur."!mark_push"(0, rx872_pos, $I10) +.annotate 'line', 415 + # rx subrule "quote" subtype=capture negate= + rx872_cur."!cursor_pos"(rx872_pos) + $P10 = rx872_cur."quote"() + unless $P10, rx872_fail + rx872_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote") + rx872_pos = $P10."pos"() + goto alt878_end + alt878_1: +.annotate 'line', 416 + # rx subrule "number" subtype=capture negate= + rx872_cur."!cursor_pos"(rx872_pos) + $P10 = rx872_cur."number"() + unless $P10, rx872_fail + rx872_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("number") + rx872_pos = $P10."pos"() + alt878_end: +.annotate 'line', 414 # rx pass - rx873_cur."!cursor_pass"(rx873_pos, "quote:sym") - if_null rx873_debug, debug_745 - rx873_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx873_pos) - debug_745: - .return (rx873_cur) - rx873_restart: + rx872_cur."!cursor_pass"(rx872_pos, "value") + if_null rx872_debug, debug_743 + rx872_cur."!cursor_debug"("PASS", "value", " at pos=", rx872_pos) + debug_743: + .return (rx872_cur) + rx872_restart: .annotate 'line', 4 - if_null rx873_debug, debug_746 - rx873_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_746: - rx873_fail: - (rx873_rep, rx873_pos, $I10, $P10) = rx873_cur."!mark_fail"(0) - lt rx873_pos, -1, rx873_done - eq rx873_pos, -1, rx873_fail - jump $I10 - rx873_done: - rx873_cur."!cursor_fail"() - if_null rx873_debug, debug_747 - rx873_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_747: - .return (rx873_cur) + if_null rx872_debug, debug_744 + rx872_cur."!cursor_debug"("NEXT", "value") + debug_744: + rx872_fail: + (rx872_rep, rx872_pos, $I10, $P10) = rx872_cur."!mark_fail"(0) + lt rx872_pos, -1, rx872_done + eq rx872_pos, -1, rx872_fail + jump $I10 + rx872_done: + rx872_cur."!cursor_fail"() + if_null rx872_debug, debug_745 + rx872_cur."!cursor_debug"("FAIL", "value") + debug_745: + .return (rx872_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("211_1282016529.10767") :method +.sub "!PREFIX__value" :subid("207_1284728478.15265") :method .annotate 'line', 4 - $P875 = self."!PREFIX__!subrule"("ws", "q") + $P874 = self."!PREFIX__!subrule"("number", "") + $P875 = self."!PREFIX__!subrule"("quote", "") new $P876, "ResizablePMCArray" + push $P876, $P874 push $P876, $P875 .return ($P876) .end .namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("212_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "number" :subid("208_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx879_tgt - .local int rx879_pos - .local int rx879_off - .local int rx879_eos - .local int rx879_rep - .local pmc rx879_cur - .local pmc rx879_debug - (rx879_cur, rx879_pos, rx879_tgt, $I10) = self."!cursor_start"() - getattribute rx879_debug, rx879_cur, "$!debug" - .lex unicode:"$\x{a2}", rx879_cur - .local pmc match - .lex "$/", match - length rx879_eos, rx879_tgt - gt rx879_pos, rx879_eos, rx879_done - set rx879_off, 0 - lt rx879_pos, 2, rx879_start - sub rx879_off, rx879_pos, 1 - substr rx879_tgt, rx879_tgt, rx879_off - rx879_start: - eq $I10, 1, rx879_restart - if_null rx879_debug, debug_748 - rx879_cur."!cursor_debug"("START ", "quote:sym") - debug_748: + .local string rx880_tgt + .local int rx880_pos + .local int rx880_off + .local int rx880_eos + .local int rx880_rep + .local pmc rx880_cur + .local pmc rx880_debug + (rx880_cur, rx880_pos, rx880_tgt, $I10) = self."!cursor_start"() + getattribute rx880_debug, rx880_cur, "$!debug" + .lex unicode:"$\x{a2}", rx880_cur + .local pmc match + .lex "$/", match + length rx880_eos, rx880_tgt + gt rx880_pos, rx880_eos, rx880_done + set rx880_off, 0 + lt rx880_pos, 2, rx880_start + sub rx880_off, rx880_pos, 1 + substr rx880_tgt, rx880_tgt, rx880_off + rx880_start: + eq $I10, 1, rx880_restart + if_null rx880_debug, debug_746 + rx880_cur."!cursor_debug"("START", "number") + debug_746: $I10 = self.'from'() ne $I10, -1, rxscan883_done goto rxscan883_scan rxscan883_loop: - ($P10) = rx879_cur."from"() + ($P10) = rx880_cur."from"() inc $P10 - set rx879_pos, $P10 - ge rx879_pos, rx879_eos, rxscan883_done + set rx880_pos, $P10 + ge rx880_pos, rx880_eos, rxscan883_done rxscan883_scan: set_addr $I10, rxscan883_loop - rx879_cur."!mark_push"(0, rx879_pos, $I10) + rx880_cur."!mark_push"(0, rx880_pos, $I10) rxscan883_done: +.annotate 'line', 420 + # rx subcapture "sign" + set_addr $I10, rxcap_885_fail + rx880_cur."!mark_push"(0, rx880_pos, $I10) + # rx enumcharlist_q negate=0 r 0..1 + sub $I10, rx880_pos, rx880_off + set rx880_rep, 0 + sub $I12, rx880_eos, rx880_pos + le $I12, 1, rxenumcharlistq884_loop + set $I12, 1 + rxenumcharlistq884_loop: + le $I12, 0, rxenumcharlistq884_done + substr $S10, rx880_tgt, $I10, 1 + index $I11, "+-", $S10 + lt $I11, 0, rxenumcharlistq884_done + inc rx880_rep + rxenumcharlistq884_done: + add rx880_pos, rx880_pos, rx880_rep + set_addr $I10, rxcap_885_fail + ($I12, $I11) = rx880_cur."!mark_peek"($I10) + rx880_cur."!cursor_pos"($I11) + ($P10) = rx880_cur."!cursor_start"() + $P10."!cursor_pass"(rx880_pos, "") + rx880_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sign") + goto rxcap_885_done + rxcap_885_fail: + goto rx880_fail + rxcap_885_done: + alt886_0: .annotate 'line', 421 - # rx literal "qq" - add $I11, rx879_pos, 2 - gt $I11, rx879_eos, rx879_fail - sub $I11, rx879_pos, rx879_off - substr $S10, rx879_tgt, $I11, 2 - ne $S10, "qq", rx879_fail - add rx879_pos, 2 - # rxanchor rwb - le rx879_pos, 0, rx879_fail - sub $I10, rx879_pos, rx879_off - is_cclass $I11, 8192, rx879_tgt, $I10 - if $I11, rx879_fail - dec $I10 - is_cclass $I11, 8192, rx879_tgt, $I10 - unless $I11, rx879_fail - # rx enumcharlist negate=1 zerowidth - ge rx879_pos, rx879_eos, rx879_fail - sub $I10, rx879_pos, rx879_off - substr $S10, rx879_tgt, $I10, 1 - index $I11, "(", $S10 - ge $I11, 0, rx879_fail - # rx subrule "ws" subtype=method negate= - rx879_cur."!cursor_pos"(rx879_pos) - $P10 = rx879_cur."ws"() - unless $P10, rx879_fail - rx879_pos = $P10."pos"() - # rx subrule "quote_EXPR" subtype=capture negate= - rx879_cur."!cursor_pos"(rx879_pos) - $P10 = rx879_cur."quote_EXPR"(":qq") - unless $P10, rx879_fail - rx879_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx879_pos = $P10."pos"() + set_addr $I10, alt886_1 + rx880_cur."!mark_push"(0, rx880_pos, $I10) + # rx subrule "dec_number" subtype=capture negate= + rx880_cur."!cursor_pos"(rx880_pos) + $P10 = rx880_cur."dec_number"() + unless $P10, rx880_fail + rx880_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("dec_number") + rx880_pos = $P10."pos"() + goto alt886_end + alt886_1: + # rx subrule "integer" subtype=capture negate= + rx880_cur."!cursor_pos"(rx880_pos) + $P10 = rx880_cur."integer"() + unless $P10, rx880_fail + rx880_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("integer") + rx880_pos = $P10."pos"() + alt886_end: +.annotate 'line', 419 # rx pass - rx879_cur."!cursor_pass"(rx879_pos, "quote:sym") - if_null rx879_debug, debug_749 - rx879_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx879_pos) - debug_749: - .return (rx879_cur) - rx879_restart: + rx880_cur."!cursor_pass"(rx880_pos, "number") + if_null rx880_debug, debug_747 + rx880_cur."!cursor_debug"("PASS", "number", " at pos=", rx880_pos) + debug_747: + .return (rx880_cur) + rx880_restart: .annotate 'line', 4 - if_null rx879_debug, debug_750 - rx879_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_750: - rx879_fail: - (rx879_rep, rx879_pos, $I10, $P10) = rx879_cur."!mark_fail"(0) - lt rx879_pos, -1, rx879_done - eq rx879_pos, -1, rx879_fail - jump $I10 - rx879_done: - rx879_cur."!cursor_fail"() - if_null rx879_debug, debug_751 - rx879_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_751: - .return (rx879_cur) + if_null rx880_debug, debug_748 + rx880_cur."!cursor_debug"("NEXT", "number") + debug_748: + rx880_fail: + (rx880_rep, rx880_pos, $I10, $P10) = rx880_cur."!mark_fail"(0) + lt rx880_pos, -1, rx880_done + eq rx880_pos, -1, rx880_fail + jump $I10 + rx880_done: + rx880_cur."!cursor_fail"() + if_null rx880_debug, debug_749 + rx880_cur."!cursor_debug"("FAIL", "number") + debug_749: + .return (rx880_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("213_1282016529.10767") :method +.sub "!PREFIX__number" :subid("209_1284728478.15265") :method .annotate 'line', 4 - $P881 = self."!PREFIX__!subrule"("ws", "qq") new $P882, "ResizablePMCArray" - push $P882, $P881 + push $P882, "" .return ($P882) .end .namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("214_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx885_tgt - .local int rx885_pos - .local int rx885_off - .local int rx885_eos - .local int rx885_rep - .local pmc rx885_cur - .local pmc rx885_debug - (rx885_cur, rx885_pos, rx885_tgt, $I10) = self."!cursor_start"() - getattribute rx885_debug, rx885_cur, "$!debug" - .lex unicode:"$\x{a2}", rx885_cur - .local pmc match - .lex "$/", match - length rx885_eos, rx885_tgt - gt rx885_pos, rx885_eos, rx885_done - set rx885_off, 0 - lt rx885_pos, 2, rx885_start - sub rx885_off, rx885_pos, 1 - substr rx885_tgt, rx885_tgt, rx885_off - rx885_start: - eq $I10, 1, rx885_restart - if_null rx885_debug, debug_752 - rx885_cur."!cursor_debug"("START ", "quote:sym") - debug_752: - $I10 = self.'from'() - ne $I10, -1, rxscan889_done - goto rxscan889_scan - rxscan889_loop: - ($P10) = rx885_cur."from"() - inc $P10 - set rx885_pos, $P10 - ge rx885_pos, rx885_eos, rxscan889_done - rxscan889_scan: - 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 - sub $I11, rx885_pos, rx885_off - ord $I11, rx885_tgt, $I11 - ne $I11, 81, rx885_fail - add rx885_pos, 1 - # rxanchor rwb - le rx885_pos, 0, rx885_fail - sub $I10, rx885_pos, rx885_off - is_cclass $I11, 8192, rx885_tgt, $I10 - if $I11, rx885_fail - dec $I10 - is_cclass $I11, 8192, rx885_tgt, $I10 - unless $I11, rx885_fail - # rx enumcharlist negate=1 zerowidth - ge rx885_pos, rx885_eos, rx885_fail - sub $I10, rx885_pos, rx885_off - substr $S10, rx885_tgt, $I10, 1 - index $I11, "(", $S10 - ge $I11, 0, rx885_fail - # rx subrule "ws" subtype=method negate= - rx885_cur."!cursor_pos"(rx885_pos) - $P10 = rx885_cur."ws"() - unless $P10, rx885_fail - rx885_pos = $P10."pos"() - # rx subrule "quote_EXPR" subtype=capture negate= - rx885_cur."!cursor_pos"(rx885_pos) - $P10 = rx885_cur."quote_EXPR"() - unless $P10, rx885_fail - rx885_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx885_pos = $P10."pos"() - # rx pass - rx885_cur."!cursor_pass"(rx885_pos, "quote:sym") - if_null rx885_debug, debug_753 - rx885_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx885_pos) - debug_753: - .return (rx885_cur) - rx885_restart: -.annotate 'line', 4 - if_null rx885_debug, debug_754 - rx885_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_754: - rx885_fail: - (rx885_rep, rx885_pos, $I10, $P10) = rx885_cur."!mark_fail"(0) - lt rx885_pos, -1, rx885_done - eq rx885_pos, -1, rx885_fail - jump $I10 - rx885_done: - rx885_cur."!cursor_fail"() - if_null rx885_debug, debug_755 - rx885_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_755: - .return (rx885_cur) - .return () +.sub "quote" :subid("210_1284728478.15265") :method +.annotate 'line', 424 + $P888 = self."!protoregex"("quote") + .return ($P888) .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("215_1282016529.10767") :method -.annotate 'line', 4 - $P887 = self."!PREFIX__!subrule"("ws", "Q") - new $P888, "ResizablePMCArray" - push $P888, $P887 - .return ($P888) +.sub "!PREFIX__quote" :subid("211_1284728478.15265") :method +.annotate 'line', 424 + $P890 = self."!PREFIX__!protoregex"("quote") + .return ($P890) .end .namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("216_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote:sym" :subid("212_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx891_tgt - .local int rx891_pos - .local int rx891_off - .local int rx891_eos - .local int rx891_rep - .local pmc rx891_cur - .local pmc rx891_debug - (rx891_cur, rx891_pos, rx891_tgt, $I10) = self."!cursor_start"() - getattribute rx891_debug, rx891_cur, "$!debug" - .lex unicode:"$\x{a2}", rx891_cur - .local pmc match - .lex "$/", match - length rx891_eos, rx891_tgt - gt rx891_pos, rx891_eos, rx891_done - set rx891_off, 0 - lt rx891_pos, 2, rx891_start - sub rx891_off, rx891_pos, 1 - substr rx891_tgt, rx891_tgt, rx891_off - rx891_start: - eq $I10, 1, rx891_restart - if_null rx891_debug, debug_756 - rx891_cur."!cursor_debug"("START ", "quote:sym") - debug_756: + .local string rx892_tgt + .local int rx892_pos + .local int rx892_off + .local int rx892_eos + .local int rx892_rep + .local pmc rx892_cur + .local pmc rx892_debug + (rx892_cur, rx892_pos, rx892_tgt, $I10) = self."!cursor_start"() + getattribute rx892_debug, rx892_cur, "$!debug" + .lex unicode:"$\x{a2}", rx892_cur + .local pmc match + .lex "$/", match + length rx892_eos, rx892_tgt + gt rx892_pos, rx892_eos, rx892_done + set rx892_off, 0 + lt rx892_pos, 2, rx892_start + sub rx892_off, rx892_pos, 1 + substr rx892_tgt, rx892_tgt, rx892_off + rx892_start: + eq $I10, 1, rx892_restart + if_null rx892_debug, debug_750 + rx892_cur."!cursor_debug"("START", "quote:sym") + debug_750: $I10 = self.'from'() ne $I10, -1, rxscan895_done goto rxscan895_scan rxscan895_loop: - ($P10) = rx891_cur."from"() + ($P10) = rx892_cur."from"() inc $P10 - set rx891_pos, $P10 - ge rx891_pos, rx891_eos, rxscan895_done + set rx892_pos, $P10 + ge rx892_pos, rx892_eos, rxscan895_done rxscan895_scan: set_addr $I10, rxscan895_loop - rx891_cur."!mark_push"(0, rx891_pos, $I10) + rx892_cur."!mark_push"(0, rx892_pos, $I10) rxscan895_done: -.annotate 'line', 423 - # rx literal "Q:PIR" - add $I11, rx891_pos, 5 - gt $I11, rx891_eos, rx891_fail - sub $I11, rx891_pos, rx891_off - substr $S10, rx891_tgt, $I11, 5 - ne $S10, "Q:PIR", rx891_fail - add rx891_pos, 5 - # rx subrule "ws" subtype=method negate= - rx891_cur."!cursor_pos"(rx891_pos) - $P10 = rx891_cur."ws"() - unless $P10, rx891_fail - rx891_pos = $P10."pos"() +.annotate 'line', 425 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx892_pos, rx892_off + substr $S10, rx892_tgt, $I10, 1 + index $I11, "'", $S10 + lt $I11, 0, rx892_fail # rx subrule "quote_EXPR" subtype=capture negate= - rx891_cur."!cursor_pos"(rx891_pos) - $P10 = rx891_cur."quote_EXPR"() - unless $P10, rx891_fail - rx891_cur."!mark_push"(0, -1, 0, $P10) + rx892_cur."!cursor_pos"(rx892_pos) + $P10 = rx892_cur."quote_EXPR"(":q") + unless $P10, rx892_fail + rx892_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quote_EXPR") - rx891_pos = $P10."pos"() + rx892_pos = $P10."pos"() # rx pass - rx891_cur."!cursor_pass"(rx891_pos, "quote:sym") - if_null rx891_debug, debug_757 - rx891_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx891_pos) - debug_757: - .return (rx891_cur) - rx891_restart: + rx892_cur."!cursor_pass"(rx892_pos, "quote:sym") + if_null rx892_debug, debug_751 + rx892_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx892_pos) + debug_751: + .return (rx892_cur) + rx892_restart: .annotate 'line', 4 - if_null rx891_debug, debug_758 - rx891_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_758: - rx891_fail: - (rx891_rep, rx891_pos, $I10, $P10) = rx891_cur."!mark_fail"(0) - lt rx891_pos, -1, rx891_done - eq rx891_pos, -1, rx891_fail - jump $I10 - rx891_done: - rx891_cur."!cursor_fail"() - if_null rx891_debug, debug_759 - rx891_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_759: - .return (rx891_cur) + if_null rx892_debug, debug_752 + rx892_cur."!cursor_debug"("NEXT", "quote:sym") + debug_752: + rx892_fail: + (rx892_rep, rx892_pos, $I10, $P10) = rx892_cur."!mark_fail"(0) + lt rx892_pos, -1, rx892_done + eq rx892_pos, -1, rx892_fail + jump $I10 + rx892_done: + rx892_cur."!cursor_fail"() + if_null rx892_debug, debug_753 + rx892_cur."!cursor_debug"("FAIL", "quote:sym") + debug_753: + .return (rx892_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("217_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("213_1284728478.15265") :method .annotate 'line', 4 - $P893 = self."!PREFIX__!subrule"("ws", "Q:PIR") new $P894, "ResizablePMCArray" - push $P894, $P893 + push $P894, "'" .return ($P894) .end .namespace ["NQP";"Grammar"] -.sub "quote:sym" :subid("218_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote:sym" :subid("214_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx897_tgt .local int rx897_pos @@ -12392,67 +12152,45 @@ substr rx897_tgt, rx897_tgt, rx897_off rx897_start: eq $I10, 1, rx897_restart - if_null rx897_debug, debug_760 - rx897_cur."!cursor_debug"("START ", "quote:sym") - debug_760: + if_null rx897_debug, debug_754 + rx897_cur."!cursor_debug"("START", "quote:sym") + debug_754: $I10 = self.'from'() - ne $I10, -1, rxscan901_done - goto rxscan901_scan - rxscan901_loop: + ne $I10, -1, rxscan900_done + goto rxscan900_scan + rxscan900_loop: ($P10) = rx897_cur."from"() inc $P10 set rx897_pos, $P10 - ge rx897_pos, rx897_eos, rxscan901_done - rxscan901_scan: - set_addr $I10, rxscan901_loop + ge rx897_pos, rx897_eos, rxscan900_done + rxscan900_scan: + set_addr $I10, rxscan900_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 - sub $I11, rx897_pos, rx897_off - ord $I11, rx897_tgt, $I11 - ne $I11, 47, rx897_fail - add rx897_pos, 1 + rxscan900_done: .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= + # rx enumcharlist negate=0 zerowidth + sub $I10, rx897_pos, rx897_off + substr $S10, rx897_tgt, $I10, 1 + index $I11, "\"", $S10 + lt $I11, 0, rx897_fail + # rx subrule "quote_EXPR" subtype=capture negate= rx897_cur."!cursor_pos"(rx897_pos) - $P10 = rx897_cur."LANG"("Regex", "nibbler") + $P10 = rx897_cur."quote_EXPR"(":qq") unless $P10, rx897_fail rx897_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("p6regex") + $P10."!cursor_names"("quote_EXPR") rx897_pos = $P10."pos"() -.annotate 'line', 429 - # rx literal "/" - add $I11, rx897_pos, 1 - gt $I11, rx897_eos, rx897_fail - sub $I11, rx897_pos, rx897_off - 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 - rx897_cur."!cursor_debug"("PASS ", "quote:sym", " at pos=", rx897_pos) - debug_761: + rx897_cur."!cursor_pass"(rx897_pos, "quote:sym") + if_null rx897_debug, debug_755 + rx897_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx897_pos) + debug_755: .return (rx897_cur) rx897_restart: .annotate 'line', 4 - if_null rx897_debug, debug_762 - rx897_cur."!cursor_debug"("NEXT ", "quote:sym") - debug_762: + if_null rx897_debug, debug_756 + rx897_cur."!cursor_debug"("NEXT", "quote:sym") + debug_756: rx897_fail: (rx897_rep, rx897_pos, $I10, $P10) = rx897_cur."!mark_fail"(0) lt rx897_pos, -1, rx897_done @@ -12460,117 +12198,132 @@ jump $I10 rx897_done: rx897_cur."!cursor_fail"() - if_null rx897_debug, debug_763 - rx897_cur."!cursor_debug"("FAIL ", "quote:sym") - debug_763: + if_null rx897_debug, debug_757 + rx897_cur."!cursor_debug"("FAIL", "quote:sym") + debug_757: .return (rx897_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote:sym" :subid("219_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("215_1284728478.15265") :method .annotate 'line', 4 - $P899 = self."!PREFIX__!subrule"("newpad", "/") - new $P900, "ResizablePMCArray" - push $P900, $P899 - .return ($P900) + new $P899, "ResizablePMCArray" + push $P899, "\"" + .return ($P899) .end .namespace ["NQP";"Grammar"] -.sub "quote_escape:sym<$>" :subid("220_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx903_tgt - .local int rx903_pos - .local int rx903_off - .local int rx903_eos - .local int rx903_rep - .local pmc rx903_cur - .local pmc rx903_debug - (rx903_cur, rx903_pos, rx903_tgt, $I10) = self."!cursor_start"() - getattribute rx903_debug, rx903_cur, "$!debug" - .lex unicode:"$\x{a2}", rx903_cur - .local pmc match - .lex "$/", match - length rx903_eos, rx903_tgt - gt rx903_pos, rx903_eos, rx903_done - set rx903_off, 0 - lt rx903_pos, 2, rx903_start - sub rx903_off, rx903_pos, 1 - substr rx903_tgt, rx903_tgt, rx903_off - rx903_start: - eq $I10, 1, rx903_restart - if_null rx903_debug, debug_764 - rx903_cur."!cursor_debug"("START ", "quote_escape:sym<$>") - debug_764: +.sub "quote:sym" :subid("216_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx902_tgt + .local int rx902_pos + .local int rx902_off + .local int rx902_eos + .local int rx902_rep + .local pmc rx902_cur + .local pmc rx902_debug + (rx902_cur, rx902_pos, rx902_tgt, $I10) = self."!cursor_start"() + getattribute rx902_debug, rx902_cur, "$!debug" + .lex unicode:"$\x{a2}", rx902_cur + .local pmc match + .lex "$/", match + length rx902_eos, rx902_tgt + gt rx902_pos, rx902_eos, rx902_done + set rx902_off, 0 + lt rx902_pos, 2, rx902_start + sub rx902_off, rx902_pos, 1 + substr rx902_tgt, rx902_tgt, rx902_off + rx902_start: + eq $I10, 1, rx902_restart + if_null rx902_debug, debug_758 + rx902_cur."!cursor_debug"("START", "quote:sym") + debug_758: $I10 = self.'from'() ne $I10, -1, rxscan906_done goto rxscan906_scan rxscan906_loop: - ($P10) = rx903_cur."from"() + ($P10) = rx902_cur."from"() inc $P10 - set rx903_pos, $P10 - ge rx903_pos, rx903_eos, rxscan906_done + set rx902_pos, $P10 + ge rx902_pos, rx902_eos, rxscan906_done rxscan906_scan: set_addr $I10, rxscan906_loop - rx903_cur."!mark_push"(0, rx903_pos, $I10) + rx902_cur."!mark_push"(0, rx902_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 - substr $S10, rx903_tgt, $I10, 1 - index $I11, "$", $S10 - lt $I11, 0, rx903_fail - # rx subrule "quotemod_check" subtype=zerowidth negate= - rx903_cur."!cursor_pos"(rx903_pos) - $P10 = rx903_cur."quotemod_check"("s") - unless $P10, rx903_fail - # rx subrule "variable" subtype=capture negate= - rx903_cur."!cursor_pos"(rx903_pos) - $P10 = rx903_cur."variable"() - unless $P10, rx903_fail - rx903_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("variable") - rx903_pos = $P10."pos"() +.annotate 'line', 427 + # rx literal "q" + add $I11, rx902_pos, 1 + gt $I11, rx902_eos, rx902_fail + sub $I11, rx902_pos, rx902_off + ord $I11, rx902_tgt, $I11 + ne $I11, 113, rx902_fail + add rx902_pos, 1 + # rxanchor rwb + le rx902_pos, 0, rx902_fail + sub $I10, rx902_pos, rx902_off + is_cclass $I11, 8192, rx902_tgt, $I10 + if $I11, rx902_fail + dec $I10 + is_cclass $I11, 8192, rx902_tgt, $I10 + unless $I11, rx902_fail + # rx enumcharlist negate=1 zerowidth + sub $I10, rx902_pos, rx902_off + substr $S10, rx902_tgt, $I10, 1 + index $I11, "(", $S10 + ge $I11, 0, rx902_fail + # rx subrule "ws" subtype=method negate= + rx902_cur."!cursor_pos"(rx902_pos) + $P10 = rx902_cur."ws"() + unless $P10, rx902_fail + rx902_pos = $P10."pos"() + # rx subrule "quote_EXPR" subtype=capture negate= + rx902_cur."!cursor_pos"(rx902_pos) + $P10 = rx902_cur."quote_EXPR"(":q") + unless $P10, rx902_fail + rx902_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx902_pos = $P10."pos"() # rx pass - rx903_cur."!cursor_pass"(rx903_pos, "quote_escape:sym<$>") - if_null rx903_debug, debug_765 - rx903_cur."!cursor_debug"("PASS ", "quote_escape:sym<$>", " at pos=", rx903_pos) - debug_765: - .return (rx903_cur) - rx903_restart: + rx902_cur."!cursor_pass"(rx902_pos, "quote:sym") + if_null rx902_debug, debug_759 + rx902_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx902_pos) + debug_759: + .return (rx902_cur) + rx902_restart: .annotate 'line', 4 - if_null rx903_debug, debug_766 - rx903_cur."!cursor_debug"("NEXT ", "quote_escape:sym<$>") - debug_766: - rx903_fail: - (rx903_rep, rx903_pos, $I10, $P10) = rx903_cur."!mark_fail"(0) - lt rx903_pos, -1, rx903_done - eq rx903_pos, -1, rx903_fail - jump $I10 - rx903_done: - rx903_cur."!cursor_fail"() - if_null rx903_debug, debug_767 - rx903_cur."!cursor_debug"("FAIL ", "quote_escape:sym<$>") - debug_767: - .return (rx903_cur) + if_null rx902_debug, debug_760 + rx902_cur."!cursor_debug"("NEXT", "quote:sym") + debug_760: + rx902_fail: + (rx902_rep, rx902_pos, $I10, $P10) = rx902_cur."!mark_fail"(0) + lt rx902_pos, -1, rx902_done + eq rx902_pos, -1, rx902_fail + jump $I10 + rx902_done: + rx902_cur."!cursor_fail"() + if_null rx902_debug, debug_761 + rx902_cur."!cursor_debug"("FAIL", "quote:sym") + debug_761: + .return (rx902_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote_escape:sym<$>" :subid("221_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("217_1284728478.15265") :method .annotate 'line', 4 + $P904 = self."!PREFIX__!subrule"("ws", "q") new $P905, "ResizablePMCArray" - push $P905, "$" + push $P905, $P904 .return ($P905) .end .namespace ["NQP";"Grammar"] -.sub "quote_escape:sym<{ }>" :subid("222_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote:sym" :subid("218_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx908_tgt .local int rx908_pos @@ -12592,50 +12345,65 @@ substr rx908_tgt, rx908_tgt, rx908_off rx908_start: eq $I10, 1, rx908_restart - if_null rx908_debug, debug_768 - rx908_cur."!cursor_debug"("START ", "quote_escape:sym<{ }>") - debug_768: + if_null rx908_debug, debug_762 + rx908_cur."!cursor_debug"("START", "quote:sym") + debug_762: $I10 = self.'from'() - ne $I10, -1, rxscan911_done - goto rxscan911_scan - rxscan911_loop: + ne $I10, -1, rxscan912_done + goto rxscan912_scan + rxscan912_loop: ($P10) = rx908_cur."from"() inc $P10 set rx908_pos, $P10 - ge rx908_pos, rx908_eos, rxscan911_done - rxscan911_scan: - set_addr $I10, rxscan911_loop + ge rx908_pos, rx908_eos, rxscan912_done + rxscan912_scan: + set_addr $I10, rxscan912_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 + rxscan912_done: +.annotate 'line', 428 + # rx literal "qq" + add $I11, rx908_pos, 2 + gt $I11, rx908_eos, rx908_fail + sub $I11, rx908_pos, rx908_off + substr $S10, rx908_tgt, $I11, 2 + ne $S10, "qq", rx908_fail + add rx908_pos, 2 + # rxanchor rwb + le rx908_pos, 0, rx908_fail + sub $I10, rx908_pos, rx908_off + is_cclass $I11, 8192, rx908_tgt, $I10 + if $I11, rx908_fail + dec $I10 + is_cclass $I11, 8192, rx908_tgt, $I10 + unless $I11, rx908_fail + # rx enumcharlist negate=1 zerowidth sub $I10, rx908_pos, rx908_off substr $S10, rx908_tgt, $I10, 1 - index $I11, "{", $S10 - lt $I11, 0, rx908_fail - # rx subrule "quotemod_check" subtype=zerowidth negate= + index $I11, "(", $S10 + ge $I11, 0, rx908_fail + # rx subrule "ws" subtype=method negate= rx908_cur."!cursor_pos"(rx908_pos) - $P10 = rx908_cur."quotemod_check"("c") + $P10 = rx908_cur."ws"() unless $P10, rx908_fail - # rx subrule "block" subtype=capture negate= + rx908_pos = $P10."pos"() + # rx subrule "quote_EXPR" subtype=capture negate= rx908_cur."!cursor_pos"(rx908_pos) - $P10 = rx908_cur."block"() + $P10 = rx908_cur."quote_EXPR"(":qq") unless $P10, rx908_fail rx908_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("block") + $P10."!cursor_names"("quote_EXPR") rx908_pos = $P10."pos"() # rx pass - rx908_cur."!cursor_pass"(rx908_pos, "quote_escape:sym<{ }>") - if_null rx908_debug, debug_769 - rx908_cur."!cursor_debug"("PASS ", "quote_escape:sym<{ }>", " at pos=", rx908_pos) - debug_769: + rx908_cur."!cursor_pass"(rx908_pos, "quote:sym") + if_null rx908_debug, debug_763 + rx908_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx908_pos) + debug_763: .return (rx908_cur) rx908_restart: .annotate 'line', 4 - if_null rx908_debug, debug_770 - rx908_cur."!cursor_debug"("NEXT ", "quote_escape:sym<{ }>") - debug_770: + if_null rx908_debug, debug_764 + rx908_cur."!cursor_debug"("NEXT", "quote:sym") + debug_764: rx908_fail: (rx908_rep, rx908_pos, $I10, $P10) = rx908_cur."!mark_fail"(0) lt rx908_pos, -1, rx908_done @@ -12643,225 +12411,227 @@ jump $I10 rx908_done: rx908_cur."!cursor_fail"() - if_null rx908_debug, debug_771 - rx908_cur."!cursor_debug"("FAIL ", "quote_escape:sym<{ }>") - debug_771: + if_null rx908_debug, debug_765 + rx908_cur."!cursor_debug"("FAIL", "quote:sym") + debug_765: .return (rx908_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote_escape:sym<{ }>" :subid("223_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("219_1284728478.15265") :method .annotate 'line', 4 - new $P910, "ResizablePMCArray" - push $P910, "{" - .return ($P910) + $P910 = self."!PREFIX__!subrule"("ws", "qq") + new $P911, "ResizablePMCArray" + push $P911, $P910 + .return ($P911) .end .namespace ["NQP";"Grammar"] -.sub "quote_escape:sym" :subid("224_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 4 - .local string rx913_tgt - .local int rx913_pos - .local int rx913_off - .local int rx913_eos - .local int rx913_rep - .local pmc rx913_cur - .local pmc rx913_debug - (rx913_cur, rx913_pos, rx913_tgt, $I10) = self."!cursor_start"() - getattribute rx913_debug, rx913_cur, "$!debug" - .lex unicode:"$\x{a2}", rx913_cur - .local pmc match - .lex "$/", match - length rx913_eos, rx913_tgt - gt rx913_pos, rx913_eos, rx913_done - set rx913_off, 0 - lt rx913_pos, 2, rx913_start - sub rx913_off, rx913_pos, 1 - substr rx913_tgt, rx913_tgt, rx913_off - rx913_start: - eq $I10, 1, rx913_restart - if_null rx913_debug, debug_772 - rx913_cur."!cursor_debug"("START ", "quote_escape:sym") - debug_772: +.sub "quote:sym" :subid("220_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx914_tgt + .local int rx914_pos + .local int rx914_off + .local int rx914_eos + .local int rx914_rep + .local pmc rx914_cur + .local pmc rx914_debug + (rx914_cur, rx914_pos, rx914_tgt, $I10) = self."!cursor_start"() + getattribute rx914_debug, rx914_cur, "$!debug" + .lex unicode:"$\x{a2}", rx914_cur + .local pmc match + .lex "$/", match + length rx914_eos, rx914_tgt + gt rx914_pos, rx914_eos, rx914_done + set rx914_off, 0 + lt rx914_pos, 2, rx914_start + sub rx914_off, rx914_pos, 1 + substr rx914_tgt, rx914_tgt, rx914_off + rx914_start: + eq $I10, 1, rx914_restart + if_null rx914_debug, debug_766 + rx914_cur."!cursor_debug"("START", "quote:sym") + debug_766: $I10 = self.'from'() - ne $I10, -1, rxscan916_done - goto rxscan916_scan - rxscan916_loop: - ($P10) = rx913_cur."from"() - inc $P10 - set rx913_pos, $P10 - ge rx913_pos, rx913_eos, rxscan916_done - rxscan916_scan: - 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 - sub $I11, rx913_pos, rx913_off - substr $S10, rx913_tgt, $I11, 2 - ne $S10, "\\e", rx913_fail - add rx913_pos, 2 - # rx subrule "quotemod_check" subtype=zerowidth negate= - rx913_cur."!cursor_pos"(rx913_pos) - $P10 = rx913_cur."quotemod_check"("b") - unless $P10, rx913_fail - # rx pass - rx913_cur."!cursor_pass"(rx913_pos, "quote_escape:sym") - if_null rx913_debug, debug_773 - rx913_cur."!cursor_debug"("PASS ", "quote_escape:sym", " at pos=", rx913_pos) - debug_773: - .return (rx913_cur) - rx913_restart: + ne $I10, -1, rxscan918_done + goto rxscan918_scan + rxscan918_loop: + ($P10) = rx914_cur."from"() + inc $P10 + set rx914_pos, $P10 + ge rx914_pos, rx914_eos, rxscan918_done + rxscan918_scan: + set_addr $I10, rxscan918_loop + rx914_cur."!mark_push"(0, rx914_pos, $I10) + rxscan918_done: +.annotate 'line', 429 + # rx literal "Q" + add $I11, rx914_pos, 1 + gt $I11, rx914_eos, rx914_fail + sub $I11, rx914_pos, rx914_off + ord $I11, rx914_tgt, $I11 + ne $I11, 81, rx914_fail + add rx914_pos, 1 + # rxanchor rwb + le rx914_pos, 0, rx914_fail + sub $I10, rx914_pos, rx914_off + is_cclass $I11, 8192, rx914_tgt, $I10 + if $I11, rx914_fail + dec $I10 + is_cclass $I11, 8192, rx914_tgt, $I10 + unless $I11, rx914_fail + # rx enumcharlist negate=1 zerowidth + sub $I10, rx914_pos, rx914_off + substr $S10, rx914_tgt, $I10, 1 + index $I11, "(", $S10 + ge $I11, 0, rx914_fail + # rx subrule "ws" subtype=method negate= + rx914_cur."!cursor_pos"(rx914_pos) + $P10 = rx914_cur."ws"() + unless $P10, rx914_fail + rx914_pos = $P10."pos"() + # rx subrule "quote_EXPR" subtype=capture negate= + rx914_cur."!cursor_pos"(rx914_pos) + $P10 = rx914_cur."quote_EXPR"() + unless $P10, rx914_fail + rx914_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx914_pos = $P10."pos"() + # rx pass + rx914_cur."!cursor_pass"(rx914_pos, "quote:sym") + if_null rx914_debug, debug_767 + rx914_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx914_pos) + debug_767: + .return (rx914_cur) + rx914_restart: .annotate 'line', 4 - if_null rx913_debug, debug_774 - rx913_cur."!cursor_debug"("NEXT ", "quote_escape:sym") - debug_774: - rx913_fail: - (rx913_rep, rx913_pos, $I10, $P10) = rx913_cur."!mark_fail"(0) - lt rx913_pos, -1, rx913_done - eq rx913_pos, -1, rx913_fail - jump $I10 - rx913_done: - rx913_cur."!cursor_fail"() - if_null rx913_debug, debug_775 - rx913_cur."!cursor_debug"("FAIL ", "quote_escape:sym") - debug_775: - .return (rx913_cur) + if_null rx914_debug, debug_768 + rx914_cur."!cursor_debug"("NEXT", "quote:sym") + debug_768: + rx914_fail: + (rx914_rep, rx914_pos, $I10, $P10) = rx914_cur."!mark_fail"(0) + lt rx914_pos, -1, rx914_done + eq rx914_pos, -1, rx914_fail + jump $I10 + rx914_done: + rx914_cur."!cursor_fail"() + if_null rx914_debug, debug_769 + rx914_cur."!cursor_debug"("FAIL", "quote:sym") + debug_769: + .return (rx914_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__quote_escape:sym" :subid("225_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("221_1284728478.15265") :method .annotate 'line', 4 - new $P915, "ResizablePMCArray" - push $P915, "\\e" - .return ($P915) + $P916 = self."!PREFIX__!subrule"("ws", "Q") + new $P917, "ResizablePMCArray" + push $P917, $P916 + .return ($P917) .end .namespace ["NQP";"Grammar"] -.sub "circumfix:sym<( )>" :subid("226_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote:sym" :subid("222_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx918_tgt - .local int rx918_pos - .local int rx918_off - .local int rx918_eos - .local int rx918_rep - .local pmc rx918_cur - .local pmc rx918_debug - (rx918_cur, rx918_pos, rx918_tgt, $I10) = self."!cursor_start"() - rx918_cur."!cursor_caparray"("EXPR") - getattribute rx918_debug, rx918_cur, "$!debug" - .lex unicode:"$\x{a2}", rx918_cur + .local string rx920_tgt + .local int rx920_pos + .local int rx920_off + .local int rx920_eos + .local int rx920_rep + .local pmc rx920_cur + .local pmc rx920_debug + (rx920_cur, rx920_pos, rx920_tgt, $I10) = self."!cursor_start"() + getattribute rx920_debug, rx920_cur, "$!debug" + .lex unicode:"$\x{a2}", rx920_cur .local pmc match .lex "$/", match - length rx918_eos, rx918_tgt - gt rx918_pos, rx918_eos, rx918_done - set rx918_off, 0 - lt rx918_pos, 2, rx918_start - sub rx918_off, rx918_pos, 1 - substr rx918_tgt, rx918_tgt, rx918_off - rx918_start: - eq $I10, 1, rx918_restart - if_null rx918_debug, debug_776 - rx918_cur."!cursor_debug"("START ", "circumfix:sym<( )>") - debug_776: + length rx920_eos, rx920_tgt + gt rx920_pos, rx920_eos, rx920_done + set rx920_off, 0 + lt rx920_pos, 2, rx920_start + sub rx920_off, rx920_pos, 1 + substr rx920_tgt, rx920_tgt, rx920_off + rx920_start: + eq $I10, 1, rx920_restart + if_null rx920_debug, debug_770 + rx920_cur."!cursor_debug"("START", "quote:sym") + debug_770: $I10 = self.'from'() - ne $I10, -1, rxscan922_done - goto rxscan922_scan - rxscan922_loop: - ($P10) = rx918_cur."from"() - inc $P10 - set rx918_pos, $P10 - ge rx918_pos, rx918_eos, rxscan922_done - rxscan922_scan: - 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 - sub $I11, rx918_pos, rx918_off - ord $I11, rx918_tgt, $I11 - ne $I11, 40, rx918_fail - add rx918_pos, 1 - # rx subrule "ws" subtype=method negate= - rx918_cur."!cursor_pos"(rx918_pos) - $P10 = rx918_cur."ws"() - unless $P10, rx918_fail - rx918_pos = $P10."pos"() - # rx rxquantr923 ** 0..1 - set_addr $I10, rxquantr923_done - rx918_cur."!mark_push"(0, rx918_pos, $I10) - rxquantr923_loop: - # rx subrule "EXPR" subtype=capture negate= - rx918_cur."!cursor_pos"(rx918_pos) - $P10 = rx918_cur."EXPR"() - unless $P10, rx918_fail - goto rxsubrule924_pass - rxsubrule924_back: - $P10 = $P10."!cursor_next"() - unless $P10, rx918_fail - rxsubrule924_pass: - set_addr $I10, rxsubrule924_back - rx918_cur."!mark_push"(0, rx918_pos, $I10, $P10) - $P10."!cursor_names"("EXPR") - rx918_pos = $P10."pos"() - set_addr $I10, rxquantr923_done - (rx918_rep) = rx918_cur."!mark_commit"($I10) - rxquantr923_done: - # rx literal ")" - add $I11, rx918_pos, 1 - gt $I11, rx918_eos, rx918_fail - sub $I11, rx918_pos, rx918_off - ord $I11, rx918_tgt, $I11 - ne $I11, 41, rx918_fail - add rx918_pos, 1 - # rx pass - rx918_cur."!cursor_pass"(rx918_pos, "circumfix:sym<( )>") - if_null rx918_debug, debug_777 - rx918_cur."!cursor_debug"("PASS ", "circumfix:sym<( )>", " at pos=", rx918_pos) - debug_777: - .return (rx918_cur) - rx918_restart: + ne $I10, -1, rxscan924_done + goto rxscan924_scan + rxscan924_loop: + ($P10) = rx920_cur."from"() + inc $P10 + set rx920_pos, $P10 + ge rx920_pos, rx920_eos, rxscan924_done + rxscan924_scan: + set_addr $I10, rxscan924_loop + rx920_cur."!mark_push"(0, rx920_pos, $I10) + rxscan924_done: +.annotate 'line', 430 + # rx literal "Q:PIR" + add $I11, rx920_pos, 5 + gt $I11, rx920_eos, rx920_fail + sub $I11, rx920_pos, rx920_off + substr $S10, rx920_tgt, $I11, 5 + ne $S10, "Q:PIR", rx920_fail + add rx920_pos, 5 + # rx subrule "ws" subtype=method negate= + rx920_cur."!cursor_pos"(rx920_pos) + $P10 = rx920_cur."ws"() + unless $P10, rx920_fail + rx920_pos = $P10."pos"() + # rx subrule "quote_EXPR" subtype=capture negate= + rx920_cur."!cursor_pos"(rx920_pos) + $P10 = rx920_cur."quote_EXPR"() + unless $P10, rx920_fail + rx920_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx920_pos = $P10."pos"() + # rx pass + rx920_cur."!cursor_pass"(rx920_pos, "quote:sym") + if_null rx920_debug, debug_771 + rx920_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx920_pos) + debug_771: + .return (rx920_cur) + rx920_restart: .annotate 'line', 4 - if_null rx918_debug, debug_778 - rx918_cur."!cursor_debug"("NEXT ", "circumfix:sym<( )>") - debug_778: - rx918_fail: - (rx918_rep, rx918_pos, $I10, $P10) = rx918_cur."!mark_fail"(0) - lt rx918_pos, -1, rx918_done - eq rx918_pos, -1, rx918_fail - jump $I10 - rx918_done: - rx918_cur."!cursor_fail"() - if_null rx918_debug, debug_779 - rx918_cur."!cursor_debug"("FAIL ", "circumfix:sym<( )>") - debug_779: - .return (rx918_cur) + if_null rx920_debug, debug_772 + rx920_cur."!cursor_debug"("NEXT", "quote:sym") + debug_772: + rx920_fail: + (rx920_rep, rx920_pos, $I10, $P10) = rx920_cur."!mark_fail"(0) + lt rx920_pos, -1, rx920_done + eq rx920_pos, -1, rx920_fail + jump $I10 + rx920_done: + rx920_cur."!cursor_fail"() + if_null rx920_debug, debug_773 + rx920_cur."!cursor_debug"("FAIL", "quote:sym") + debug_773: + .return (rx920_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__circumfix:sym<( )>" :subid("227_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("223_1284728478.15265") :method .annotate 'line', 4 - $P920 = self."!PREFIX__!subrule"("ws", "(") - new $P921, "ResizablePMCArray" - push $P921, $P920 - .return ($P921) + $P922 = self."!PREFIX__!subrule"("ws", "Q:PIR") + new $P923, "ResizablePMCArray" + push $P923, $P922 + .return ($P923) .end .namespace ["NQP";"Grammar"] -.sub "circumfix:sym<[ ]>" :subid("228_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote:sym" :subid("224_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 .local string rx926_tgt .local int rx926_pos @@ -12871,7 +12641,6 @@ .local pmc rx926_cur .local pmc rx926_debug (rx926_cur, rx926_pos, rx926_tgt, $I10) = self."!cursor_start"() - rx926_cur."!cursor_caparray"("EXPR") getattribute rx926_debug, rx926_cur, "$!debug" .lex unicode:"$\x{a2}", rx926_cur .local pmc match @@ -12884,9 +12653,9 @@ substr rx926_tgt, rx926_tgt, rx926_off rx926_start: eq $I10, 1, rx926_restart - if_null rx926_debug, debug_780 - rx926_cur."!cursor_debug"("START ", "circumfix:sym<[ ]>") - debug_780: + if_null rx926_debug, debug_774 + rx926_cur."!cursor_debug"("START", "quote:sym") + debug_774: $I10 = self.'from'() ne $I10, -1, rxscan930_done goto rxscan930_scan @@ -12899,57 +12668,52 @@ set_addr $I10, rxscan930_loop rx926_cur."!mark_push"(0, rx926_pos, $I10) rxscan930_done: -.annotate 'line', 437 - # rx literal "[" +.annotate 'line', 432 + # rx literal "/" add $I11, rx926_pos, 1 gt $I11, rx926_eos, rx926_fail sub $I11, rx926_pos, rx926_off ord $I11, rx926_tgt, $I11 - ne $I11, 91, rx926_fail + ne $I11, 47, rx926_fail add rx926_pos, 1 - # rx subrule "ws" subtype=method negate= +.annotate 'line', 433 + # rx subrule "newpad" subtype=method negate= rx926_cur."!cursor_pos"(rx926_pos) - $P10 = rx926_cur."ws"() + $P10 = rx926_cur."newpad"() unless $P10, rx926_fail rx926_pos = $P10."pos"() - # rx rxquantr931 ** 0..1 - set_addr $I10, rxquantr931_done - rx926_cur."!mark_push"(0, rx926_pos, $I10) - rxquantr931_loop: - # rx subrule "EXPR" subtype=capture negate= +.annotate 'line', 434 + # rx reduce name="quote:sym" key="open" rx926_cur."!cursor_pos"(rx926_pos) - $P10 = rx926_cur."EXPR"() - unless $P10, rx926_fail - goto rxsubrule932_pass - rxsubrule932_back: - $P10 = $P10."!cursor_next"() + rx926_cur."!reduce"("quote:sym", "open") +.annotate 'line', 435 + # rx subrule "LANG" subtype=capture negate= + rx926_cur."!cursor_pos"(rx926_pos) + $P10 = rx926_cur."LANG"("Regex", "nibbler") unless $P10, rx926_fail - rxsubrule932_pass: - set_addr $I10, rxsubrule932_back - rx926_cur."!mark_push"(0, rx926_pos, $I10, $P10) - $P10."!cursor_names"("EXPR") + rx926_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("p6regex") rx926_pos = $P10."pos"() - set_addr $I10, rxquantr931_done - (rx926_rep) = rx926_cur."!mark_commit"($I10) - rxquantr931_done: - # rx literal "]" +.annotate 'line', 436 + # rx literal "/" add $I11, rx926_pos, 1 gt $I11, rx926_eos, rx926_fail sub $I11, rx926_pos, rx926_off ord $I11, rx926_tgt, $I11 - ne $I11, 93, rx926_fail + ne $I11, 47, rx926_fail add rx926_pos, 1 +.annotate 'line', 431 # rx pass - rx926_cur."!cursor_pass"(rx926_pos, "circumfix:sym<[ ]>") - if_null rx926_debug, debug_781 - rx926_cur."!cursor_debug"("PASS ", "circumfix:sym<[ ]>", " at pos=", rx926_pos) - debug_781: + rx926_cur."!cursor_pass"(rx926_pos, "quote:sym") + if_null rx926_debug, debug_775 + rx926_cur."!cursor_debug"("PASS", "quote:sym", " at pos=", rx926_pos) + debug_775: .return (rx926_cur) rx926_restart: .annotate 'line', 4 - if_null rx926_debug, debug_782 - rx926_cur."!cursor_debug"("NEXT ", "circumfix:sym<[ ]>") - debug_782: + if_null rx926_debug, debug_776 + rx926_cur."!cursor_debug"("NEXT", "quote:sym") + debug_776: rx926_fail: (rx926_rep, rx926_pos, $I10, $P10) = rx926_cur."!mark_fail"(0) lt rx926_pos, -1, rx926_done @@ -12957,18 +12721,18 @@ jump $I10 rx926_done: rx926_cur."!cursor_fail"() - if_null rx926_debug, debug_783 - rx926_cur."!cursor_debug"("FAIL ", "circumfix:sym<[ ]>") - debug_783: + if_null rx926_debug, debug_777 + rx926_cur."!cursor_debug"("FAIL", "quote:sym") + debug_777: .return (rx926_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__circumfix:sym<[ ]>" :subid("229_1282016529.10767") :method +.sub "!PREFIX__quote:sym" :subid("225_1284728478.15265") :method .annotate 'line', 4 - $P928 = self."!PREFIX__!subrule"("ws", "[") + $P928 = self."!PREFIX__!subrule"("newpad", "/") new $P929, "ResizablePMCArray" push $P929, $P928 .return ($P929) @@ -12976,1160 +12740,1137 @@ .namespace ["NQP";"Grammar"] -.sub "circumfix:sym" :subid("230_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote_escape:sym<$>" :subid("226_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx934_tgt - .local int rx934_pos - .local int rx934_off - .local int rx934_eos - .local int rx934_rep - .local pmc rx934_cur - .local pmc rx934_debug - (rx934_cur, rx934_pos, rx934_tgt, $I10) = self."!cursor_start"() - getattribute rx934_debug, rx934_cur, "$!debug" - .lex unicode:"$\x{a2}", rx934_cur - .local pmc match - .lex "$/", match - length rx934_eos, rx934_tgt - gt rx934_pos, rx934_eos, rx934_done - set rx934_off, 0 - lt rx934_pos, 2, rx934_start - sub rx934_off, rx934_pos, 1 - substr rx934_tgt, rx934_tgt, rx934_off - rx934_start: - eq $I10, 1, rx934_restart - if_null rx934_debug, debug_784 - rx934_cur."!cursor_debug"("START ", "circumfix:sym") - debug_784: + .local string rx932_tgt + .local int rx932_pos + .local int rx932_off + .local int rx932_eos + .local int rx932_rep + .local pmc rx932_cur + .local pmc rx932_debug + (rx932_cur, rx932_pos, rx932_tgt, $I10) = self."!cursor_start"() + getattribute rx932_debug, rx932_cur, "$!debug" + .lex unicode:"$\x{a2}", rx932_cur + .local pmc match + .lex "$/", match + length rx932_eos, rx932_tgt + gt rx932_pos, rx932_eos, rx932_done + set rx932_off, 0 + lt rx932_pos, 2, rx932_start + sub rx932_off, rx932_pos, 1 + substr rx932_tgt, rx932_tgt, rx932_off + rx932_start: + eq $I10, 1, rx932_restart + if_null rx932_debug, debug_778 + rx932_cur."!cursor_debug"("START", "quote_escape:sym<$>") + debug_778: $I10 = self.'from'() - ne $I10, -1, rxscan937_done - goto rxscan937_scan - rxscan937_loop: - ($P10) = rx934_cur."from"() - inc $P10 - set rx934_pos, $P10 - ge rx934_pos, rx934_eos, rxscan937_done - rxscan937_scan: - set_addr $I10, rxscan937_loop - rx934_cur."!mark_push"(0, rx934_pos, $I10) - rxscan937_done: -.annotate 'line', 438 + ne $I10, -1, rxscan935_done + goto rxscan935_scan + rxscan935_loop: + ($P10) = rx932_cur."from"() + inc $P10 + set rx932_pos, $P10 + ge rx932_pos, rx932_eos, rxscan935_done + rxscan935_scan: + set_addr $I10, rxscan935_loop + rx932_cur."!mark_push"(0, rx932_pos, $I10) + rxscan935_done: +.annotate 'line', 439 # rx enumcharlist negate=0 zerowidth - ge rx934_pos, rx934_eos, rx934_fail - sub $I10, rx934_pos, rx934_off - substr $S10, rx934_tgt, $I10, 1 - index $I11, "<", $S10 - lt $I11, 0, rx934_fail - # rx subrule "quote_EXPR" subtype=capture negate= - rx934_cur."!cursor_pos"(rx934_pos) - $P10 = rx934_cur."quote_EXPR"(":q", ":w") - unless $P10, rx934_fail - rx934_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx934_pos = $P10."pos"() + sub $I10, rx932_pos, rx932_off + substr $S10, rx932_tgt, $I10, 1 + index $I11, "$", $S10 + lt $I11, 0, rx932_fail + # rx subrule "quotemod_check" subtype=zerowidth negate= + rx932_cur."!cursor_pos"(rx932_pos) + $P10 = rx932_cur."quotemod_check"("s") + unless $P10, rx932_fail + # rx subrule "variable" subtype=capture negate= + rx932_cur."!cursor_pos"(rx932_pos) + $P10 = rx932_cur."variable"() + unless $P10, rx932_fail + rx932_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("variable") + rx932_pos = $P10."pos"() # rx pass - rx934_cur."!cursor_pass"(rx934_pos, "circumfix:sym") - if_null rx934_debug, debug_785 - rx934_cur."!cursor_debug"("PASS ", "circumfix:sym", " at pos=", rx934_pos) - debug_785: - .return (rx934_cur) - rx934_restart: + rx932_cur."!cursor_pass"(rx932_pos, "quote_escape:sym<$>") + if_null rx932_debug, debug_779 + rx932_cur."!cursor_debug"("PASS", "quote_escape:sym<$>", " at pos=", rx932_pos) + debug_779: + .return (rx932_cur) + rx932_restart: .annotate 'line', 4 - if_null rx934_debug, debug_786 - rx934_cur."!cursor_debug"("NEXT ", "circumfix:sym") - debug_786: - rx934_fail: - (rx934_rep, rx934_pos, $I10, $P10) = rx934_cur."!mark_fail"(0) - lt rx934_pos, -1, rx934_done - eq rx934_pos, -1, rx934_fail - jump $I10 - rx934_done: - rx934_cur."!cursor_fail"() - if_null rx934_debug, debug_787 - rx934_cur."!cursor_debug"("FAIL ", "circumfix:sym") - debug_787: - .return (rx934_cur) + if_null rx932_debug, debug_780 + rx932_cur."!cursor_debug"("NEXT", "quote_escape:sym<$>") + debug_780: + rx932_fail: + (rx932_rep, rx932_pos, $I10, $P10) = rx932_cur."!mark_fail"(0) + lt rx932_pos, -1, rx932_done + eq rx932_pos, -1, rx932_fail + jump $I10 + rx932_done: + rx932_cur."!cursor_fail"() + if_null rx932_debug, debug_781 + rx932_cur."!cursor_debug"("FAIL", "quote_escape:sym<$>") + debug_781: + .return (rx932_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__circumfix:sym" :subid("231_1282016529.10767") :method +.sub "!PREFIX__quote_escape:sym<$>" :subid("227_1284728478.15265") :method .annotate 'line', 4 - new $P936, "ResizablePMCArray" - push $P936, "<" - .return ($P936) + new $P934, "ResizablePMCArray" + push $P934, "$" + .return ($P934) .end .namespace ["NQP";"Grammar"] -.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("232_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote_escape:sym<{ }>" :subid("228_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx939_tgt - .local int rx939_pos - .local int rx939_off - .local int rx939_eos - .local int rx939_rep - .local pmc rx939_cur - .local pmc rx939_debug - (rx939_cur, rx939_pos, rx939_tgt, $I10) = self."!cursor_start"() - getattribute rx939_debug, rx939_cur, "$!debug" - .lex unicode:"$\x{a2}", rx939_cur + .local string rx937_tgt + .local int rx937_pos + .local int rx937_off + .local int rx937_eos + .local int rx937_rep + .local pmc rx937_cur + .local pmc rx937_debug + (rx937_cur, rx937_pos, rx937_tgt, $I10) = self."!cursor_start"() + getattribute rx937_debug, rx937_cur, "$!debug" + .lex unicode:"$\x{a2}", rx937_cur .local pmc match .lex "$/", match - length rx939_eos, rx939_tgt - gt rx939_pos, rx939_eos, rx939_done - set rx939_off, 0 - lt rx939_pos, 2, rx939_start - sub rx939_off, rx939_pos, 1 - substr rx939_tgt, rx939_tgt, rx939_off - rx939_start: - eq $I10, 1, rx939_restart - if_null rx939_debug, debug_788 - rx939_cur."!cursor_debug"("START ", unicode:"circumfix:sym<\x{ab} \x{bb}>") - debug_788: + length rx937_eos, rx937_tgt + gt rx937_pos, rx937_eos, rx937_done + set rx937_off, 0 + lt rx937_pos, 2, rx937_start + sub rx937_off, rx937_pos, 1 + substr rx937_tgt, rx937_tgt, rx937_off + rx937_start: + eq $I10, 1, rx937_restart + if_null rx937_debug, debug_782 + rx937_cur."!cursor_debug"("START", "quote_escape:sym<{ }>") + debug_782: $I10 = self.'from'() - ne $I10, -1, rxscan942_done - goto rxscan942_scan - rxscan942_loop: - ($P10) = rx939_cur."from"() - inc $P10 - set rx939_pos, $P10 - ge rx939_pos, rx939_eos, rxscan942_done - rxscan942_scan: - set_addr $I10, rxscan942_loop - rx939_cur."!mark_push"(0, rx939_pos, $I10) - rxscan942_done: -.annotate 'line', 439 + ne $I10, -1, rxscan940_done + goto rxscan940_scan + rxscan940_loop: + ($P10) = rx937_cur."from"() + inc $P10 + set rx937_pos, $P10 + ge rx937_pos, rx937_eos, rxscan940_done + rxscan940_scan: + set_addr $I10, rxscan940_loop + rx937_cur."!mark_push"(0, rx937_pos, $I10) + rxscan940_done: +.annotate 'line', 440 # rx enumcharlist negate=0 zerowidth - ge rx939_pos, rx939_eos, rx939_fail - sub $I10, rx939_pos, rx939_off - substr $S10, rx939_tgt, $I10, 1 - index $I11, unicode:"\x{ab}", $S10 - lt $I11, 0, rx939_fail - # rx subrule "quote_EXPR" subtype=capture negate= - rx939_cur."!cursor_pos"(rx939_pos) - $P10 = rx939_cur."quote_EXPR"(":qq", ":w") - unless $P10, rx939_fail - rx939_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quote_EXPR") - rx939_pos = $P10."pos"() + sub $I10, rx937_pos, rx937_off + substr $S10, rx937_tgt, $I10, 1 + index $I11, "{", $S10 + lt $I11, 0, rx937_fail + # rx subrule "quotemod_check" subtype=zerowidth negate= + rx937_cur."!cursor_pos"(rx937_pos) + $P10 = rx937_cur."quotemod_check"("c") + unless $P10, rx937_fail + # rx subrule "block" subtype=capture negate= + rx937_cur."!cursor_pos"(rx937_pos) + $P10 = rx937_cur."block"() + unless $P10, rx937_fail + rx937_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("block") + rx937_pos = $P10."pos"() # rx pass - rx939_cur."!cursor_pass"(rx939_pos, unicode:"circumfix:sym<\x{ab} \x{bb}>") - if_null rx939_debug, debug_789 - rx939_cur."!cursor_debug"("PASS ", unicode:"circumfix:sym<\x{ab} \x{bb}>", " at pos=", rx939_pos) - debug_789: - .return (rx939_cur) - rx939_restart: + rx937_cur."!cursor_pass"(rx937_pos, "quote_escape:sym<{ }>") + if_null rx937_debug, debug_783 + rx937_cur."!cursor_debug"("PASS", "quote_escape:sym<{ }>", " at pos=", rx937_pos) + debug_783: + .return (rx937_cur) + rx937_restart: .annotate 'line', 4 - if_null rx939_debug, debug_790 - rx939_cur."!cursor_debug"("NEXT ", unicode:"circumfix:sym<\x{ab} \x{bb}>") - debug_790: - rx939_fail: - (rx939_rep, rx939_pos, $I10, $P10) = rx939_cur."!mark_fail"(0) - lt rx939_pos, -1, rx939_done - eq rx939_pos, -1, rx939_fail - jump $I10 - rx939_done: - rx939_cur."!cursor_fail"() - if_null rx939_debug, debug_791 - rx939_cur."!cursor_debug"("FAIL ", unicode:"circumfix:sym<\x{ab} \x{bb}>") - debug_791: - .return (rx939_cur) + if_null rx937_debug, debug_784 + rx937_cur."!cursor_debug"("NEXT", "quote_escape:sym<{ }>") + debug_784: + rx937_fail: + (rx937_rep, rx937_pos, $I10, $P10) = rx937_cur."!mark_fail"(0) + lt rx937_pos, -1, rx937_done + eq rx937_pos, -1, rx937_fail + jump $I10 + rx937_done: + rx937_cur."!cursor_fail"() + if_null rx937_debug, debug_785 + rx937_cur."!cursor_debug"("FAIL", "quote_escape:sym<{ }>") + debug_785: + .return (rx937_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("233_1282016529.10767") :method +.sub "!PREFIX__quote_escape:sym<{ }>" :subid("229_1284728478.15265") :method .annotate 'line', 4 - new $P941, "ResizablePMCArray" - push $P941, unicode:"\x{ab}" - .return ($P941) + new $P939, "ResizablePMCArray" + push $P939, "{" + .return ($P939) .end .namespace ["NQP";"Grammar"] -.sub "circumfix:sym<{ }>" :subid("234_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "quote_escape:sym" :subid("230_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx944_tgt - .local int rx944_pos - .local int rx944_off - .local int rx944_eos - .local int rx944_rep - .local pmc rx944_cur - .local pmc rx944_debug - (rx944_cur, rx944_pos, rx944_tgt, $I10) = self."!cursor_start"() - getattribute rx944_debug, rx944_cur, "$!debug" - .lex unicode:"$\x{a2}", rx944_cur + .local string rx942_tgt + .local int rx942_pos + .local int rx942_off + .local int rx942_eos + .local int rx942_rep + .local pmc rx942_cur + .local pmc rx942_debug + (rx942_cur, rx942_pos, rx942_tgt, $I10) = self."!cursor_start"() + getattribute rx942_debug, rx942_cur, "$!debug" + .lex unicode:"$\x{a2}", rx942_cur .local pmc match .lex "$/", match - length rx944_eos, rx944_tgt - gt rx944_pos, rx944_eos, rx944_done - set rx944_off, 0 - lt rx944_pos, 2, rx944_start - sub rx944_off, rx944_pos, 1 - substr rx944_tgt, rx944_tgt, rx944_off - rx944_start: - eq $I10, 1, rx944_restart - if_null rx944_debug, debug_792 - rx944_cur."!cursor_debug"("START ", "circumfix:sym<{ }>") - debug_792: + length rx942_eos, rx942_tgt + gt rx942_pos, rx942_eos, rx942_done + set rx942_off, 0 + lt rx942_pos, 2, rx942_start + sub rx942_off, rx942_pos, 1 + substr rx942_tgt, rx942_tgt, rx942_off + rx942_start: + eq $I10, 1, rx942_restart + if_null rx942_debug, debug_786 + rx942_cur."!cursor_debug"("START", "quote_escape:sym") + debug_786: $I10 = self.'from'() - ne $I10, -1, rxscan947_done - goto rxscan947_scan - rxscan947_loop: - ($P10) = rx944_cur."from"() - inc $P10 - set rx944_pos, $P10 - ge rx944_pos, rx944_eos, rxscan947_done - rxscan947_scan: - 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 - substr $S10, rx944_tgt, $I10, 1 - index $I11, "{", $S10 - lt $I11, 0, rx944_fail - # rx subrule "pblock" subtype=capture negate= - rx944_cur."!cursor_pos"(rx944_pos) - $P10 = rx944_cur."pblock"() - unless $P10, rx944_fail - rx944_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("pblock") - rx944_pos = $P10."pos"() - # rx pass - rx944_cur."!cursor_pass"(rx944_pos, "circumfix:sym<{ }>") - if_null rx944_debug, debug_793 - rx944_cur."!cursor_debug"("PASS ", "circumfix:sym<{ }>", " at pos=", rx944_pos) - debug_793: - .return (rx944_cur) - rx944_restart: + ne $I10, -1, rxscan945_done + goto rxscan945_scan + rxscan945_loop: + ($P10) = rx942_cur."from"() + inc $P10 + set rx942_pos, $P10 + ge rx942_pos, rx942_eos, rxscan945_done + rxscan945_scan: + set_addr $I10, rxscan945_loop + rx942_cur."!mark_push"(0, rx942_pos, $I10) + rxscan945_done: +.annotate 'line', 441 + # rx literal "\\e" + add $I11, rx942_pos, 2 + gt $I11, rx942_eos, rx942_fail + sub $I11, rx942_pos, rx942_off + substr $S10, rx942_tgt, $I11, 2 + ne $S10, "\\e", rx942_fail + add rx942_pos, 2 + # rx subrule "quotemod_check" subtype=zerowidth negate= + rx942_cur."!cursor_pos"(rx942_pos) + $P10 = rx942_cur."quotemod_check"("b") + unless $P10, rx942_fail + # rx pass + rx942_cur."!cursor_pass"(rx942_pos, "quote_escape:sym") + if_null rx942_debug, debug_787 + rx942_cur."!cursor_debug"("PASS", "quote_escape:sym", " at pos=", rx942_pos) + debug_787: + .return (rx942_cur) + rx942_restart: .annotate 'line', 4 - if_null rx944_debug, debug_794 - rx944_cur."!cursor_debug"("NEXT ", "circumfix:sym<{ }>") - debug_794: - rx944_fail: - (rx944_rep, rx944_pos, $I10, $P10) = rx944_cur."!mark_fail"(0) - lt rx944_pos, -1, rx944_done - eq rx944_pos, -1, rx944_fail - jump $I10 - rx944_done: - rx944_cur."!cursor_fail"() - if_null rx944_debug, debug_795 - rx944_cur."!cursor_debug"("FAIL ", "circumfix:sym<{ }>") - debug_795: - .return (rx944_cur) + if_null rx942_debug, debug_788 + rx942_cur."!cursor_debug"("NEXT", "quote_escape:sym") + debug_788: + rx942_fail: + (rx942_rep, rx942_pos, $I10, $P10) = rx942_cur."!mark_fail"(0) + lt rx942_pos, -1, rx942_done + eq rx942_pos, -1, rx942_fail + jump $I10 + rx942_done: + rx942_cur."!cursor_fail"() + if_null rx942_debug, debug_789 + rx942_cur."!cursor_debug"("FAIL", "quote_escape:sym") + debug_789: + .return (rx942_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__circumfix:sym<{ }>" :subid("235_1282016529.10767") :method +.sub "!PREFIX__quote_escape:sym" :subid("231_1284728478.15265") :method .annotate 'line', 4 - new $P946, "ResizablePMCArray" - push $P946, "{" - .return ($P946) + new $P944, "ResizablePMCArray" + push $P944, "\\e" + .return ($P944) .end .namespace ["NQP";"Grammar"] -.sub "circumfix:sym" :subid("236_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "circumfix:sym<( )>" :subid("232_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx949_tgt - .local int rx949_pos - .local int rx949_off - .local int rx949_eos - .local int rx949_rep - .local pmc rx949_cur - .local pmc rx949_debug - (rx949_cur, rx949_pos, rx949_tgt, $I10) = self."!cursor_start"() - getattribute rx949_debug, rx949_cur, "$!debug" - .lex unicode:"$\x{a2}", rx949_cur + .local string rx947_tgt + .local int rx947_pos + .local int rx947_off + .local int rx947_eos + .local int rx947_rep + .local pmc rx947_cur + .local pmc rx947_debug + (rx947_cur, rx947_pos, rx947_tgt, $I10) = self."!cursor_start"() + rx947_cur."!cursor_caparray"("EXPR") + getattribute rx947_debug, rx947_cur, "$!debug" + .lex unicode:"$\x{a2}", rx947_cur .local pmc match .lex "$/", match - length rx949_eos, rx949_tgt - gt rx949_pos, rx949_eos, rx949_done - set rx949_off, 0 - lt rx949_pos, 2, rx949_start - sub rx949_off, rx949_pos, 1 - substr rx949_tgt, rx949_tgt, rx949_off - rx949_start: - eq $I10, 1, rx949_restart - if_null rx949_debug, debug_796 - rx949_cur."!cursor_debug"("START ", "circumfix:sym") - debug_796: + length rx947_eos, rx947_tgt + gt rx947_pos, rx947_eos, rx947_done + set rx947_off, 0 + lt rx947_pos, 2, rx947_start + sub rx947_off, rx947_pos, 1 + substr rx947_tgt, rx947_tgt, rx947_off + rx947_start: + eq $I10, 1, rx947_restart + if_null rx947_debug, debug_790 + rx947_cur."!cursor_debug"("START", "circumfix:sym<( )>") + debug_790: $I10 = self.'from'() - ne $I10, -1, rxscan953_done - goto rxscan953_scan - rxscan953_loop: - ($P10) = rx949_cur."from"() - inc $P10 - set rx949_pos, $P10 - ge rx949_pos, rx949_eos, rxscan953_done - rxscan953_scan: - 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"() - unless $P10, rx949_fail - rx949_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sigil") - rx949_pos = $P10."pos"() + ne $I10, -1, rxscan951_done + goto rxscan951_scan + rxscan951_loop: + ($P10) = rx947_cur."from"() + inc $P10 + set rx947_pos, $P10 + ge rx947_pos, rx947_eos, rxscan951_done + rxscan951_scan: + set_addr $I10, rxscan951_loop + rx947_cur."!mark_push"(0, rx947_pos, $I10) + rxscan951_done: +.annotate 'line', 443 # rx literal "(" - add $I11, rx949_pos, 1 - gt $I11, rx949_eos, rx949_fail - sub $I11, rx949_pos, rx949_off - ord $I11, rx949_tgt, $I11 - ne $I11, 40, rx949_fail - add rx949_pos, 1 - # rx subrule "semilist" subtype=capture negate= - rx949_cur."!cursor_pos"(rx949_pos) - $P10 = rx949_cur."semilist"() - unless $P10, rx949_fail - rx949_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("semilist") - rx949_pos = $P10."pos"() - alt954_0: - set_addr $I10, alt954_1 - rx949_cur."!mark_push"(0, rx949_pos, $I10) + add $I11, rx947_pos, 1 + gt $I11, rx947_eos, rx947_fail + sub $I11, rx947_pos, rx947_off + ord $I11, rx947_tgt, $I11 + ne $I11, 40, rx947_fail + add rx947_pos, 1 + # rx subrule "ws" subtype=method negate= + rx947_cur."!cursor_pos"(rx947_pos) + $P10 = rx947_cur."ws"() + unless $P10, rx947_fail + rx947_pos = $P10."pos"() + # rx rxquantr952 ** 0..1 + set_addr $I10, rxquantr952_done + rx947_cur."!mark_push"(0, rx947_pos, $I10) + rxquantr952_loop: + # rx subrule "EXPR" subtype=capture negate= + rx947_cur."!cursor_pos"(rx947_pos) + $P10 = rx947_cur."EXPR"() + unless $P10, rx947_fail + goto rxsubrule953_pass + rxsubrule953_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx947_fail + rxsubrule953_pass: + set_addr $I10, rxsubrule953_back + rx947_cur."!mark_push"(0, rx947_pos, $I10, $P10) + $P10."!cursor_names"("EXPR") + rx947_pos = $P10."pos"() + set_addr $I10, rxquantr952_done + (rx947_rep) = rx947_cur."!mark_commit"($I10) + rxquantr952_done: # rx literal ")" - add $I11, rx949_pos, 1 - gt $I11, rx949_eos, rx949_fail - sub $I11, rx949_pos, rx949_off - ord $I11, rx949_tgt, $I11 - ne $I11, 41, rx949_fail - add rx949_pos, 1 - goto alt954_end - alt954_1: - # rx subrule "FAILGOAL" subtype=method negate= - rx949_cur."!cursor_pos"(rx949_pos) - $P10 = rx949_cur."FAILGOAL"("')'") - unless $P10, rx949_fail - goto rxsubrule956_pass - rxsubrule956_back: + add $I11, rx947_pos, 1 + gt $I11, rx947_eos, rx947_fail + sub $I11, rx947_pos, rx947_off + ord $I11, rx947_tgt, $I11 + ne $I11, 41, rx947_fail + add rx947_pos, 1 + # rx pass + rx947_cur."!cursor_pass"(rx947_pos, "circumfix:sym<( )>") + if_null rx947_debug, debug_791 + rx947_cur."!cursor_debug"("PASS", "circumfix:sym<( )>", " at pos=", rx947_pos) + debug_791: + .return (rx947_cur) + rx947_restart: +.annotate 'line', 4 + if_null rx947_debug, debug_792 + rx947_cur."!cursor_debug"("NEXT", "circumfix:sym<( )>") + debug_792: + rx947_fail: + (rx947_rep, rx947_pos, $I10, $P10) = rx947_cur."!mark_fail"(0) + lt rx947_pos, -1, rx947_done + eq rx947_pos, -1, rx947_fail + jump $I10 + rx947_done: + rx947_cur."!cursor_fail"() + if_null rx947_debug, debug_793 + rx947_cur."!cursor_debug"("FAIL", "circumfix:sym<( )>") + debug_793: + .return (rx947_cur) + .return () +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__circumfix:sym<( )>" :subid("233_1284728478.15265") :method +.annotate 'line', 4 + $P949 = self."!PREFIX__!subrule"("ws", "(") + new $P950, "ResizablePMCArray" + push $P950, $P949 + .return ($P950) +.end + + +.namespace ["NQP";"Grammar"] +.sub "circumfix:sym<[ ]>" :subid("234_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx955_tgt + .local int rx955_pos + .local int rx955_off + .local int rx955_eos + .local int rx955_rep + .local pmc rx955_cur + .local pmc rx955_debug + (rx955_cur, rx955_pos, rx955_tgt, $I10) = self."!cursor_start"() + rx955_cur."!cursor_caparray"("EXPR") + getattribute rx955_debug, rx955_cur, "$!debug" + .lex unicode:"$\x{a2}", rx955_cur + .local pmc match + .lex "$/", match + length rx955_eos, rx955_tgt + gt rx955_pos, rx955_eos, rx955_done + set rx955_off, 0 + lt rx955_pos, 2, rx955_start + sub rx955_off, rx955_pos, 1 + substr rx955_tgt, rx955_tgt, rx955_off + rx955_start: + eq $I10, 1, rx955_restart + if_null rx955_debug, debug_794 + rx955_cur."!cursor_debug"("START", "circumfix:sym<[ ]>") + debug_794: + $I10 = self.'from'() + ne $I10, -1, rxscan959_done + goto rxscan959_scan + rxscan959_loop: + ($P10) = rx955_cur."from"() + inc $P10 + set rx955_pos, $P10 + ge rx955_pos, rx955_eos, rxscan959_done + rxscan959_scan: + set_addr $I10, rxscan959_loop + rx955_cur."!mark_push"(0, rx955_pos, $I10) + rxscan959_done: +.annotate 'line', 444 + # rx literal "[" + add $I11, rx955_pos, 1 + gt $I11, rx955_eos, rx955_fail + sub $I11, rx955_pos, rx955_off + ord $I11, rx955_tgt, $I11 + ne $I11, 91, rx955_fail + add rx955_pos, 1 + # rx subrule "ws" subtype=method negate= + rx955_cur."!cursor_pos"(rx955_pos) + $P10 = rx955_cur."ws"() + unless $P10, rx955_fail + rx955_pos = $P10."pos"() + # rx rxquantr960 ** 0..1 + set_addr $I10, rxquantr960_done + rx955_cur."!mark_push"(0, rx955_pos, $I10) + rxquantr960_loop: + # rx subrule "EXPR" subtype=capture negate= + rx955_cur."!cursor_pos"(rx955_pos) + $P10 = rx955_cur."EXPR"() + unless $P10, rx955_fail + goto rxsubrule961_pass + rxsubrule961_back: $P10 = $P10."!cursor_next"() - unless $P10, rx949_fail - rxsubrule956_pass: - set_addr $I10, rxsubrule956_back - rx949_cur."!mark_push"(0, rx949_pos, $I10, $P10) - rx949_pos = $P10."pos"() - alt954_end: - # rx pass - rx949_cur."!cursor_pass"(rx949_pos, "circumfix:sym") - if_null rx949_debug, debug_797 - rx949_cur."!cursor_debug"("PASS ", "circumfix:sym", " at pos=", rx949_pos) - debug_797: - .return (rx949_cur) - rx949_restart: + unless $P10, rx955_fail + rxsubrule961_pass: + set_addr $I10, rxsubrule961_back + rx955_cur."!mark_push"(0, rx955_pos, $I10, $P10) + $P10."!cursor_names"("EXPR") + rx955_pos = $P10."pos"() + set_addr $I10, rxquantr960_done + (rx955_rep) = rx955_cur."!mark_commit"($I10) + rxquantr960_done: + # rx literal "]" + add $I11, rx955_pos, 1 + gt $I11, rx955_eos, rx955_fail + sub $I11, rx955_pos, rx955_off + ord $I11, rx955_tgt, $I11 + ne $I11, 93, rx955_fail + add rx955_pos, 1 + # rx pass + rx955_cur."!cursor_pass"(rx955_pos, "circumfix:sym<[ ]>") + if_null rx955_debug, debug_795 + rx955_cur."!cursor_debug"("PASS", "circumfix:sym<[ ]>", " at pos=", rx955_pos) + debug_795: + .return (rx955_cur) + rx955_restart: .annotate 'line', 4 - if_null rx949_debug, debug_798 - rx949_cur."!cursor_debug"("NEXT ", "circumfix:sym") - debug_798: - rx949_fail: - (rx949_rep, rx949_pos, $I10, $P10) = rx949_cur."!mark_fail"(0) - lt rx949_pos, -1, rx949_done - eq rx949_pos, -1, rx949_fail - jump $I10 - rx949_done: - rx949_cur."!cursor_fail"() - if_null rx949_debug, debug_799 - rx949_cur."!cursor_debug"("FAIL ", "circumfix:sym") - debug_799: - .return (rx949_cur) + if_null rx955_debug, debug_796 + rx955_cur."!cursor_debug"("NEXT", "circumfix:sym<[ ]>") + debug_796: + rx955_fail: + (rx955_rep, rx955_pos, $I10, $P10) = rx955_cur."!mark_fail"(0) + lt rx955_pos, -1, rx955_done + eq rx955_pos, -1, rx955_fail + jump $I10 + rx955_done: + rx955_cur."!cursor_fail"() + if_null rx955_debug, debug_797 + rx955_cur."!cursor_debug"("FAIL", "circumfix:sym<[ ]>") + debug_797: + .return (rx955_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__circumfix:sym" :subid("237_1282016529.10767") :method +.sub "!PREFIX__circumfix:sym<[ ]>" :subid("235_1284728478.15265") :method .annotate 'line', 4 - $P951 = self."!PREFIX__!subrule"("sigil", "") - new $P952, "ResizablePMCArray" - push $P952, $P951 - .return ($P952) + $P957 = self."!PREFIX__!subrule"("ws", "[") + new $P958, "ResizablePMCArray" + push $P958, $P957 + .return ($P958) .end .namespace ["NQP";"Grammar"] -.sub "semilist" :subid("238_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "circumfix:sym" :subid("236_1284728478.15265") :method :outer("11_1284728478.15265") .annotate 'line', 4 - .local string rx958_tgt - .local int rx958_pos - .local int rx958_off - .local int rx958_eos - .local int rx958_rep - .local pmc rx958_cur - .local pmc rx958_debug - (rx958_cur, rx958_pos, rx958_tgt, $I10) = self."!cursor_start"() - getattribute rx958_debug, rx958_cur, "$!debug" - .lex unicode:"$\x{a2}", rx958_cur + .local string rx963_tgt + .local int rx963_pos + .local int rx963_off + .local int rx963_eos + .local int rx963_rep + .local pmc rx963_cur + .local pmc rx963_debug + (rx963_cur, rx963_pos, rx963_tgt, $I10) = self."!cursor_start"() + getattribute rx963_debug, rx963_cur, "$!debug" + .lex unicode:"$\x{a2}", rx963_cur .local pmc match .lex "$/", match - length rx958_eos, rx958_tgt - gt rx958_pos, rx958_eos, rx958_done - set rx958_off, 0 - lt rx958_pos, 2, rx958_start - sub rx958_off, rx958_pos, 1 - substr rx958_tgt, rx958_tgt, rx958_off - rx958_start: - eq $I10, 1, rx958_restart - if_null rx958_debug, debug_800 - rx958_cur."!cursor_debug"("START ", "semilist") - debug_800: + length rx963_eos, rx963_tgt + gt rx963_pos, rx963_eos, rx963_done + set rx963_off, 0 + lt rx963_pos, 2, rx963_start + sub rx963_off, rx963_pos, 1 + substr rx963_tgt, rx963_tgt, rx963_off + rx963_start: + eq $I10, 1, rx963_restart + if_null rx963_debug, debug_798 + rx963_cur."!cursor_debug"("START", "circumfix:sym") + debug_798: $I10 = self.'from'() - ne $I10, -1, rxscan962_done - goto rxscan962_scan - rxscan962_loop: - ($P10) = rx958_cur."from"() - inc $P10 - set rx958_pos, $P10 - ge rx958_pos, rx958_eos, rxscan962_done - rxscan962_scan: - 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"() - unless $P10, rx958_fail - rx958_pos = $P10."pos"() - # rx subrule "statement" subtype=capture negate= - rx958_cur."!cursor_pos"(rx958_pos) - $P10 = rx958_cur."statement"() - unless $P10, rx958_fail - rx958_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("statement") - rx958_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx958_cur."!cursor_pos"(rx958_pos) - $P10 = rx958_cur."ws"() - unless $P10, rx958_fail - rx958_pos = $P10."pos"() - # rx pass - rx958_cur."!cursor_pass"(rx958_pos, "semilist") - if_null rx958_debug, debug_801 - rx958_cur."!cursor_debug"("PASS ", "semilist", " at pos=", rx958_pos) - debug_801: - .return (rx958_cur) - rx958_restart: + ne $I10, -1, rxscan966_done + goto rxscan966_scan + rxscan966_loop: + ($P10) = rx963_cur."from"() + inc $P10 + set rx963_pos, $P10 + ge rx963_pos, rx963_eos, rxscan966_done + rxscan966_scan: + set_addr $I10, rxscan966_loop + rx963_cur."!mark_push"(0, rx963_pos, $I10) + rxscan966_done: +.annotate 'line', 445 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx963_pos, rx963_off + substr $S10, rx963_tgt, $I10, 1 + index $I11, "<", $S10 + lt $I11, 0, rx963_fail + # rx subrule "quote_EXPR" subtype=capture negate= + rx963_cur."!cursor_pos"(rx963_pos) + $P10 = rx963_cur."quote_EXPR"(":q", ":w") + unless $P10, rx963_fail + rx963_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx963_pos = $P10."pos"() + # rx pass + rx963_cur."!cursor_pass"(rx963_pos, "circumfix:sym") + if_null rx963_debug, debug_799 + rx963_cur."!cursor_debug"("PASS", "circumfix:sym", " at pos=", rx963_pos) + debug_799: + .return (rx963_cur) + rx963_restart: .annotate 'line', 4 - if_null rx958_debug, debug_802 - rx958_cur."!cursor_debug"("NEXT ", "semilist") - debug_802: - rx958_fail: - (rx958_rep, rx958_pos, $I10, $P10) = rx958_cur."!mark_fail"(0) - lt rx958_pos, -1, rx958_done - eq rx958_pos, -1, rx958_fail - jump $I10 - rx958_done: - rx958_cur."!cursor_fail"() - if_null rx958_debug, debug_803 - rx958_cur."!cursor_debug"("FAIL ", "semilist") - debug_803: - .return (rx958_cur) + if_null rx963_debug, debug_800 + rx963_cur."!cursor_debug"("NEXT", "circumfix:sym") + debug_800: + rx963_fail: + (rx963_rep, rx963_pos, $I10, $P10) = rx963_cur."!mark_fail"(0) + lt rx963_pos, -1, rx963_done + eq rx963_pos, -1, rx963_fail + jump $I10 + rx963_done: + rx963_cur."!cursor_fail"() + if_null rx963_debug, debug_801 + rx963_cur."!cursor_debug"("FAIL", "circumfix:sym") + debug_801: + .return (rx963_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__semilist" :subid("239_1282016529.10767") :method +.sub "!PREFIX__circumfix:sym" :subid("237_1284728478.15265") :method .annotate 'line', 4 - $P960 = self."!PREFIX__!subrule"("ws", "") - new $P961, "ResizablePMCArray" - push $P961, $P960 - .return ($P961) + new $P965, "ResizablePMCArray" + push $P965, "<" + .return ($P965) .end .namespace ["NQP";"Grammar"] -.sub "infixish" :subid("240_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx966_tgt - .local int rx966_pos - .local int rx966_off - .local int rx966_eos - .local int rx966_rep - .local pmc rx966_cur - .local pmc rx966_debug - (rx966_cur, rx966_pos, rx966_tgt, $I10) = self."!cursor_start"() - getattribute rx966_debug, rx966_cur, "$!debug" - .lex unicode:"$\x{a2}", rx966_cur - .local pmc match - .lex "$/", match - length rx966_eos, rx966_tgt - gt rx966_pos, rx966_eos, rx966_done - set rx966_off, 0 - lt rx966_pos, 2, rx966_start - sub rx966_off, rx966_pos, 1 - substr rx966_tgt, rx966_tgt, rx966_off - rx966_start: - eq $I10, 1, rx966_restart - if_null rx966_debug, debug_804 - rx966_cur."!cursor_debug"("START ", "infixish") - debug_804: +.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("238_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx968_tgt + .local int rx968_pos + .local int rx968_off + .local int rx968_eos + .local int rx968_rep + .local pmc rx968_cur + .local pmc rx968_debug + (rx968_cur, rx968_pos, rx968_tgt, $I10) = self."!cursor_start"() + getattribute rx968_debug, rx968_cur, "$!debug" + .lex unicode:"$\x{a2}", rx968_cur + .local pmc match + .lex "$/", match + length rx968_eos, rx968_tgt + gt rx968_pos, rx968_eos, rx968_done + set rx968_off, 0 + lt rx968_pos, 2, rx968_start + sub rx968_off, rx968_pos, 1 + substr rx968_tgt, rx968_tgt, rx968_off + rx968_start: + eq $I10, 1, rx968_restart + if_null rx968_debug, debug_802 + rx968_cur."!cursor_debug"("START", unicode:"circumfix:sym<\x{ab} \x{bb}>") + debug_802: $I10 = self.'from'() - ne $I10, -1, rxscan969_done - goto rxscan969_scan - rxscan969_loop: - ($P10) = rx966_cur."from"() - inc $P10 - set rx966_pos, $P10 - ge rx966_pos, rx966_eos, rxscan969_done - rxscan969_scan: - 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"() - if $P10, rx966_fail - # rx subrule "infix" subtype=capture negate= - rx966_cur."!cursor_pos"(rx966_pos) - $P10 = rx966_cur."infix"() - unless $P10, rx966_fail - rx966_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("OPER=infix") - rx966_pos = $P10."pos"() + ne $I10, -1, rxscan971_done + goto rxscan971_scan + rxscan971_loop: + ($P10) = rx968_cur."from"() + inc $P10 + set rx968_pos, $P10 + ge rx968_pos, rx968_eos, rxscan971_done + rxscan971_scan: + set_addr $I10, rxscan971_loop + rx968_cur."!mark_push"(0, rx968_pos, $I10) + rxscan971_done: +.annotate 'line', 446 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx968_pos, rx968_off + substr $S10, rx968_tgt, $I10, 1 + index $I11, unicode:"\x{ab}", $S10 + lt $I11, 0, rx968_fail + # rx subrule "quote_EXPR" subtype=capture negate= + rx968_cur."!cursor_pos"(rx968_pos) + $P10 = rx968_cur."quote_EXPR"(":qq", ":w") + unless $P10, rx968_fail + rx968_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx968_pos = $P10."pos"() # rx pass - rx966_cur."!cursor_pass"(rx966_pos, "infixish") - if_null rx966_debug, debug_805 - rx966_cur."!cursor_debug"("PASS ", "infixish", " at pos=", rx966_pos) + rx968_cur."!cursor_pass"(rx968_pos, unicode:"circumfix:sym<\x{ab} \x{bb}>") + if_null rx968_debug, debug_803 + rx968_cur."!cursor_debug"("PASS", unicode:"circumfix:sym<\x{ab} \x{bb}>", " at pos=", rx968_pos) + debug_803: + .return (rx968_cur) + rx968_restart: +.annotate 'line', 4 + if_null rx968_debug, debug_804 + rx968_cur."!cursor_debug"("NEXT", unicode:"circumfix:sym<\x{ab} \x{bb}>") + debug_804: + rx968_fail: + (rx968_rep, rx968_pos, $I10, $P10) = rx968_cur."!mark_fail"(0) + lt rx968_pos, -1, rx968_done + eq rx968_pos, -1, rx968_fail + jump $I10 + rx968_done: + rx968_cur."!cursor_fail"() + if_null rx968_debug, debug_805 + rx968_cur."!cursor_debug"("FAIL", unicode:"circumfix:sym<\x{ab} \x{bb}>") debug_805: - .return (rx966_cur) - rx966_restart: -.annotate 'line', 447 - if_null rx966_debug, debug_806 - rx966_cur."!cursor_debug"("NEXT ", "infixish") - debug_806: - rx966_fail: - (rx966_rep, rx966_pos, $I10, $P10) = rx966_cur."!mark_fail"(0) - lt rx966_pos, -1, rx966_done - eq rx966_pos, -1, rx966_fail - jump $I10 - rx966_done: - rx966_cur."!cursor_fail"() - if_null rx966_debug, debug_807 - rx966_cur."!cursor_debug"("FAIL ", "infixish") - debug_807: - .return (rx966_cur) + .return (rx968_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infixish" :subid("241_1282016529.10767") :method -.annotate 'line', 447 - new $P968, "ResizablePMCArray" - push $P968, "" - .return ($P968) +.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("239_1284728478.15265") :method +.annotate 'line', 4 + new $P970, "ResizablePMCArray" + push $P970, unicode:"\x{ab}" + .return ($P970) .end .namespace ["NQP";"Grammar"] -.sub "infixstopper" :subid("242_1282016529.10767") :method :outer("11_1282016529.10767") +.sub "circumfix:sym<{ }>" :subid("240_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx973_tgt + .local int rx973_pos + .local int rx973_off + .local int rx973_eos + .local int rx973_rep + .local pmc rx973_cur + .local pmc rx973_debug + (rx973_cur, rx973_pos, rx973_tgt, $I10) = self."!cursor_start"() + getattribute rx973_debug, rx973_cur, "$!debug" + .lex unicode:"$\x{a2}", rx973_cur + .local pmc match + .lex "$/", match + length rx973_eos, rx973_tgt + gt rx973_pos, rx973_eos, rx973_done + set rx973_off, 0 + lt rx973_pos, 2, rx973_start + sub rx973_off, rx973_pos, 1 + substr rx973_tgt, rx973_tgt, rx973_off + rx973_start: + eq $I10, 1, rx973_restart + if_null rx973_debug, debug_806 + rx973_cur."!cursor_debug"("START", "circumfix:sym<{ }>") + debug_806: + $I10 = self.'from'() + ne $I10, -1, rxscan976_done + goto rxscan976_scan + rxscan976_loop: + ($P10) = rx973_cur."from"() + inc $P10 + set rx973_pos, $P10 + ge rx973_pos, rx973_eos, rxscan976_done + rxscan976_scan: + set_addr $I10, rxscan976_loop + rx973_cur."!mark_push"(0, rx973_pos, $I10) + rxscan976_done: .annotate 'line', 447 - .local string rx971_tgt - .local int rx971_pos - .local int rx971_off - .local int rx971_eos - .local int rx971_rep - .local pmc rx971_cur - .local pmc rx971_debug - (rx971_cur, rx971_pos, rx971_tgt, $I10) = self."!cursor_start"() - getattribute rx971_debug, rx971_cur, "$!debug" - .lex unicode:"$\x{a2}", rx971_cur - .local pmc match - .lex "$/", match - length rx971_eos, rx971_tgt - gt rx971_pos, rx971_eos, rx971_done - set rx971_off, 0 - lt rx971_pos, 2, rx971_start - sub rx971_off, rx971_pos, 1 - substr rx971_tgt, rx971_tgt, rx971_off - rx971_start: - eq $I10, 1, rx971_restart - if_null rx971_debug, debug_808 - rx971_cur."!cursor_debug"("START ", "infixstopper") + # rx enumcharlist negate=0 zerowidth + sub $I10, rx973_pos, rx973_off + substr $S10, rx973_tgt, $I10, 1 + index $I11, "{", $S10 + lt $I11, 0, rx973_fail + # rx subrule "pblock" subtype=capture negate= + rx973_cur."!cursor_pos"(rx973_pos) + $P10 = rx973_cur."pblock"() + unless $P10, rx973_fail + rx973_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("pblock") + rx973_pos = $P10."pos"() + # rx pass + rx973_cur."!cursor_pass"(rx973_pos, "circumfix:sym<{ }>") + if_null rx973_debug, debug_807 + rx973_cur."!cursor_debug"("PASS", "circumfix:sym<{ }>", " at pos=", rx973_pos) + debug_807: + .return (rx973_cur) + rx973_restart: +.annotate 'line', 4 + if_null rx973_debug, debug_808 + rx973_cur."!cursor_debug"("NEXT", "circumfix:sym<{ }>") debug_808: - $I10 = self.'from'() - ne $I10, -1, rxscan974_done - goto rxscan974_scan - rxscan974_loop: - ($P10) = rx971_cur."from"() - inc $P10 - set rx971_pos, $P10 - ge rx971_pos, rx971_eos, rxscan974_done - rxscan974_scan: - 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"() - unless $P10, rx971_fail - # rx pass - rx971_cur."!cursor_pass"(rx971_pos, "infixstopper") - if_null rx971_debug, debug_809 - rx971_cur."!cursor_debug"("PASS ", "infixstopper", " at pos=", rx971_pos) + rx973_fail: + (rx973_rep, rx973_pos, $I10, $P10) = rx973_cur."!mark_fail"(0) + lt rx973_pos, -1, rx973_done + eq rx973_pos, -1, rx973_fail + jump $I10 + rx973_done: + rx973_cur."!cursor_fail"() + if_null rx973_debug, debug_809 + rx973_cur."!cursor_debug"("FAIL", "circumfix:sym<{ }>") debug_809: - .return (rx971_cur) - rx971_restart: -.annotate 'line', 447 - if_null rx971_debug, debug_810 - rx971_cur."!cursor_debug"("NEXT ", "infixstopper") - debug_810: - rx971_fail: - (rx971_rep, rx971_pos, $I10, $P10) = rx971_cur."!mark_fail"(0) - lt rx971_pos, -1, rx971_done - eq rx971_pos, -1, rx971_fail - jump $I10 - rx971_done: - rx971_cur."!cursor_fail"() - if_null rx971_debug, debug_811 - rx971_cur."!cursor_debug"("FAIL ", "infixstopper") - debug_811: - .return (rx971_cur) + .return (rx973_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infixstopper" :subid("243_1282016529.10767") :method -.annotate 'line', 447 - new $P973, "ResizablePMCArray" - push $P973, "" - .return ($P973) +.sub "!PREFIX__circumfix:sym<{ }>" :subid("241_1284728478.15265") :method +.annotate 'line', 4 + new $P975, "ResizablePMCArray" + push $P975, "{" + .return ($P975) .end .namespace ["NQP";"Grammar"] -.sub "postcircumfix:sym<[ ]>" :subid("244_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx976_tgt - .local int rx976_pos - .local int rx976_off - .local int rx976_eos - .local int rx976_rep - .local pmc rx976_cur - .local pmc rx976_debug - (rx976_cur, rx976_pos, rx976_tgt, $I10) = self."!cursor_start"() - getattribute rx976_debug, rx976_cur, "$!debug" - .lex unicode:"$\x{a2}", rx976_cur - .local pmc match - .lex "$/", match - length rx976_eos, rx976_tgt - gt rx976_pos, rx976_eos, rx976_done - set rx976_off, 0 - lt rx976_pos, 2, rx976_start - sub rx976_off, rx976_pos, 1 - substr rx976_tgt, rx976_tgt, rx976_off - rx976_start: - eq $I10, 1, rx976_restart - if_null rx976_debug, debug_812 - rx976_cur."!cursor_debug"("START ", "postcircumfix:sym<[ ]>") - debug_812: +.sub "circumfix:sym" :subid("242_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx978_tgt + .local int rx978_pos + .local int rx978_off + .local int rx978_eos + .local int rx978_rep + .local pmc rx978_cur + .local pmc rx978_debug + (rx978_cur, rx978_pos, rx978_tgt, $I10) = self."!cursor_start"() + getattribute rx978_debug, rx978_cur, "$!debug" + .lex unicode:"$\x{a2}", rx978_cur + .local pmc match + .lex "$/", match + length rx978_eos, rx978_tgt + gt rx978_pos, rx978_eos, rx978_done + set rx978_off, 0 + lt rx978_pos, 2, rx978_start + sub rx978_off, rx978_pos, 1 + substr rx978_tgt, rx978_tgt, rx978_off + rx978_start: + eq $I10, 1, rx978_restart + if_null rx978_debug, debug_810 + rx978_cur."!cursor_debug"("START", "circumfix:sym") + debug_810: $I10 = self.'from'() - ne $I10, -1, rxscan980_done - goto rxscan980_scan - rxscan980_loop: - ($P10) = rx976_cur."from"() - inc $P10 - set rx976_pos, $P10 - ge rx976_pos, rx976_eos, rxscan980_done - rxscan980_scan: - 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 - sub $I11, rx976_pos, rx976_off - ord $I11, rx976_tgt, $I11 - ne $I11, 91, rx976_fail - add rx976_pos, 1 - # rx subrule "ws" subtype=method negate= - rx976_cur."!cursor_pos"(rx976_pos) - $P10 = rx976_cur."ws"() - unless $P10, rx976_fail - rx976_pos = $P10."pos"() - # rx subrule "EXPR" subtype=capture negate= - rx976_cur."!cursor_pos"(rx976_pos) - $P10 = rx976_cur."EXPR"() - unless $P10, rx976_fail - rx976_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("EXPR") - rx976_pos = $P10."pos"() - # rx literal "]" - add $I11, rx976_pos, 1 - gt $I11, rx976_eos, rx976_fail - sub $I11, rx976_pos, rx976_off - 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") - unless $P10, rx976_fail - 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 - rx976_cur."!cursor_debug"("PASS ", "postcircumfix:sym<[ ]>", " at pos=", rx976_pos) + ne $I10, -1, rxscan982_done + goto rxscan982_scan + rxscan982_loop: + ($P10) = rx978_cur."from"() + inc $P10 + set rx978_pos, $P10 + ge rx978_pos, rx978_eos, rxscan982_done + rxscan982_scan: + set_addr $I10, rxscan982_loop + rx978_cur."!mark_push"(0, rx978_pos, $I10) + rxscan982_done: +.annotate 'line', 448 + # rx subrule "sigil" subtype=capture negate= + rx978_cur."!cursor_pos"(rx978_pos) + $P10 = rx978_cur."sigil"() + unless $P10, rx978_fail + rx978_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sigil") + rx978_pos = $P10."pos"() + # rx literal "(" + add $I11, rx978_pos, 1 + gt $I11, rx978_eos, rx978_fail + sub $I11, rx978_pos, rx978_off + ord $I11, rx978_tgt, $I11 + ne $I11, 40, rx978_fail + add rx978_pos, 1 + # rx subrule "semilist" subtype=capture negate= + rx978_cur."!cursor_pos"(rx978_pos) + $P10 = rx978_cur."semilist"() + unless $P10, rx978_fail + rx978_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("semilist") + rx978_pos = $P10."pos"() + alt983_0: + set_addr $I10, alt983_1 + rx978_cur."!mark_push"(0, rx978_pos, $I10) + # rx literal ")" + add $I11, rx978_pos, 1 + gt $I11, rx978_eos, rx978_fail + sub $I11, rx978_pos, rx978_off + ord $I11, rx978_tgt, $I11 + ne $I11, 41, rx978_fail + add rx978_pos, 1 + goto alt983_end + alt983_1: + # rx subrule "FAILGOAL" subtype=method negate= + rx978_cur."!cursor_pos"(rx978_pos) + $P10 = rx978_cur."FAILGOAL"("')'") + unless $P10, rx978_fail + goto rxsubrule985_pass + rxsubrule985_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx978_fail + rxsubrule985_pass: + set_addr $I10, rxsubrule985_back + rx978_cur."!mark_push"(0, rx978_pos, $I10, $P10) + rx978_pos = $P10."pos"() + alt983_end: + # rx pass + rx978_cur."!cursor_pass"(rx978_pos, "circumfix:sym") + if_null rx978_debug, debug_811 + rx978_cur."!cursor_debug"("PASS", "circumfix:sym", " at pos=", rx978_pos) + debug_811: + .return (rx978_cur) + rx978_restart: +.annotate 'line', 4 + if_null rx978_debug, debug_812 + rx978_cur."!cursor_debug"("NEXT", "circumfix:sym") + debug_812: + rx978_fail: + (rx978_rep, rx978_pos, $I10, $P10) = rx978_cur."!mark_fail"(0) + lt rx978_pos, -1, rx978_done + eq rx978_pos, -1, rx978_fail + jump $I10 + rx978_done: + rx978_cur."!cursor_fail"() + if_null rx978_debug, debug_813 + rx978_cur."!cursor_debug"("FAIL", "circumfix:sym") 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: - rx976_fail: - (rx976_rep, rx976_pos, $I10, $P10) = rx976_cur."!mark_fail"(0) - lt rx976_pos, -1, rx976_done - eq rx976_pos, -1, rx976_fail - jump $I10 - rx976_done: - rx976_cur."!cursor_fail"() - if_null rx976_debug, debug_815 - rx976_cur."!cursor_debug"("FAIL ", "postcircumfix:sym<[ ]>") - debug_815: - .return (rx976_cur) - .return () -.end - - -.namespace ["NQP";"Grammar"] -.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("245_1282016529.10767") :method -.annotate 'line', 447 - $P978 = self."!PREFIX__!subrule"("ws", "[") - new $P979, "ResizablePMCArray" - push $P979, $P978 - .return ($P979) -.end - - -.namespace ["NQP";"Grammar"] -.sub "postcircumfix:sym<{ }>" :subid("246_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx982_tgt - .local int rx982_pos - .local int rx982_off - .local int rx982_eos - .local int rx982_rep - .local pmc rx982_cur - .local pmc rx982_debug - (rx982_cur, rx982_pos, rx982_tgt, $I10) = self."!cursor_start"() - getattribute rx982_debug, rx982_cur, "$!debug" - .lex unicode:"$\x{a2}", rx982_cur - .local pmc match - .lex "$/", match - length rx982_eos, rx982_tgt - gt rx982_pos, rx982_eos, rx982_done - set rx982_off, 0 - lt rx982_pos, 2, rx982_start - sub rx982_off, rx982_pos, 1 - substr rx982_tgt, rx982_tgt, rx982_off - rx982_start: - eq $I10, 1, rx982_restart - if_null rx982_debug, debug_816 - rx982_cur."!cursor_debug"("START ", "postcircumfix:sym<{ }>") - debug_816: - $I10 = self.'from'() - ne $I10, -1, rxscan986_done - goto rxscan986_scan - rxscan986_loop: - ($P10) = rx982_cur."from"() - inc $P10 - set rx982_pos, $P10 - ge rx982_pos, rx982_eos, rxscan986_done - rxscan986_scan: - 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 - sub $I11, rx982_pos, rx982_off - ord $I11, rx982_tgt, $I11 - ne $I11, 123, rx982_fail - add rx982_pos, 1 - # rx subrule "ws" subtype=method negate= - rx982_cur."!cursor_pos"(rx982_pos) - $P10 = rx982_cur."ws"() - unless $P10, rx982_fail - rx982_pos = $P10."pos"() - # rx subrule "EXPR" subtype=capture negate= - rx982_cur."!cursor_pos"(rx982_pos) - $P10 = rx982_cur."EXPR"() - unless $P10, rx982_fail - rx982_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("EXPR") - rx982_pos = $P10."pos"() - # rx literal "}" - add $I11, rx982_pos, 1 - gt $I11, rx982_eos, rx982_fail - sub $I11, rx982_pos, rx982_off - 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") - unless $P10, rx982_fail - 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 - rx982_cur."!cursor_debug"("PASS ", "postcircumfix:sym<{ }>", " at pos=", rx982_pos) - 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: - rx982_fail: - (rx982_rep, rx982_pos, $I10, $P10) = rx982_cur."!mark_fail"(0) - lt rx982_pos, -1, rx982_done - eq rx982_pos, -1, rx982_fail - jump $I10 - rx982_done: - rx982_cur."!cursor_fail"() - if_null rx982_debug, debug_819 - rx982_cur."!cursor_debug"("FAIL ", "postcircumfix:sym<{ }>") - debug_819: - .return (rx982_cur) + .return (rx978_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("247_1282016529.10767") :method -.annotate 'line', 447 - $P984 = self."!PREFIX__!subrule"("ws", "{") - new $P985, "ResizablePMCArray" - push $P985, $P984 - .return ($P985) +.sub "!PREFIX__circumfix:sym" :subid("243_1284728478.15265") :method +.annotate 'line', 4 + $P980 = self."!PREFIX__!subrule"("sigil", "") + new $P981, "ResizablePMCArray" + push $P981, $P980 + .return ($P981) .end .namespace ["NQP";"Grammar"] -.sub "postcircumfix:sym" :subid("248_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx988_tgt - .local int rx988_pos - .local int rx988_off - .local int rx988_eos - .local int rx988_rep - .local pmc rx988_cur - .local pmc rx988_debug - (rx988_cur, rx988_pos, rx988_tgt, $I10) = self."!cursor_start"() - getattribute rx988_debug, rx988_cur, "$!debug" - .lex unicode:"$\x{a2}", rx988_cur - .local pmc match - .lex "$/", match - length rx988_eos, rx988_tgt - gt rx988_pos, rx988_eos, rx988_done - set rx988_off, 0 - lt rx988_pos, 2, rx988_start - sub rx988_off, rx988_pos, 1 - substr rx988_tgt, rx988_tgt, rx988_off - rx988_start: - eq $I10, 1, rx988_restart - if_null rx988_debug, debug_820 - rx988_cur."!cursor_debug"("START ", "postcircumfix:sym") - debug_820: +.sub "semilist" :subid("244_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 4 + .local string rx987_tgt + .local int rx987_pos + .local int rx987_off + .local int rx987_eos + .local int rx987_rep + .local pmc rx987_cur + .local pmc rx987_debug + (rx987_cur, rx987_pos, rx987_tgt, $I10) = self."!cursor_start"() + getattribute rx987_debug, rx987_cur, "$!debug" + .lex unicode:"$\x{a2}", rx987_cur + .local pmc match + .lex "$/", match + length rx987_eos, rx987_tgt + gt rx987_pos, rx987_eos, rx987_done + set rx987_off, 0 + lt rx987_pos, 2, rx987_start + sub rx987_off, rx987_pos, 1 + substr rx987_tgt, rx987_tgt, rx987_off + rx987_start: + eq $I10, 1, rx987_restart + if_null rx987_debug, debug_814 + rx987_cur."!cursor_debug"("START", "semilist") + debug_814: $I10 = self.'from'() ne $I10, -1, rxscan991_done goto rxscan991_scan rxscan991_loop: - ($P10) = rx988_cur."from"() + ($P10) = rx987_cur."from"() inc $P10 - set rx988_pos, $P10 - ge rx988_pos, rx988_eos, rxscan991_done + set rx987_pos, $P10 + ge rx987_pos, rx987_eos, rxscan991_done rxscan991_scan: set_addr $I10, rxscan991_loop - rx988_cur."!mark_push"(0, rx988_pos, $I10) + rx987_cur."!mark_push"(0, rx987_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 - substr $S10, rx988_tgt, $I10, 1 - index $I11, "<", $S10 - lt $I11, 0, rx988_fail - # rx subrule "quote_EXPR" subtype=capture negate= - rx988_cur."!cursor_pos"(rx988_pos) - $P10 = rx988_cur."quote_EXPR"(":q") - unless $P10, rx988_fail - 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") - unless $P10, rx988_fail - 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") - if_null rx988_debug, debug_821 - rx988_cur."!cursor_debug"("PASS ", "postcircumfix:sym", " at pos=", rx988_pos) - debug_821: - .return (rx988_cur) - rx988_restart: -.annotate 'line', 447 - if_null rx988_debug, debug_822 - rx988_cur."!cursor_debug"("NEXT ", "postcircumfix:sym") - debug_822: - rx988_fail: - (rx988_rep, rx988_pos, $I10, $P10) = rx988_cur."!mark_fail"(0) - lt rx988_pos, -1, rx988_done - eq rx988_pos, -1, rx988_fail - jump $I10 - rx988_done: - rx988_cur."!cursor_fail"() - if_null rx988_debug, debug_823 - rx988_cur."!cursor_debug"("FAIL ", "postcircumfix:sym") - debug_823: - .return (rx988_cur) +.annotate 'line', 450 + # rx subrule "ws" subtype=method negate= + rx987_cur."!cursor_pos"(rx987_pos) + $P10 = rx987_cur."ws"() + unless $P10, rx987_fail + rx987_pos = $P10."pos"() + # rx subrule "statement" subtype=capture negate= + rx987_cur."!cursor_pos"(rx987_pos) + $P10 = rx987_cur."statement"() + unless $P10, rx987_fail + rx987_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("statement") + rx987_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx987_cur."!cursor_pos"(rx987_pos) + $P10 = rx987_cur."ws"() + unless $P10, rx987_fail + rx987_pos = $P10."pos"() + # rx pass + rx987_cur."!cursor_pass"(rx987_pos, "semilist") + if_null rx987_debug, debug_815 + rx987_cur."!cursor_debug"("PASS", "semilist", " at pos=", rx987_pos) + debug_815: + .return (rx987_cur) + rx987_restart: +.annotate 'line', 4 + if_null rx987_debug, debug_816 + rx987_cur."!cursor_debug"("NEXT", "semilist") + debug_816: + rx987_fail: + (rx987_rep, rx987_pos, $I10, $P10) = rx987_cur."!mark_fail"(0) + lt rx987_pos, -1, rx987_done + eq rx987_pos, -1, rx987_fail + jump $I10 + rx987_done: + rx987_cur."!cursor_fail"() + if_null rx987_debug, debug_817 + rx987_cur."!cursor_debug"("FAIL", "semilist") + debug_817: + .return (rx987_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postcircumfix:sym" :subid("249_1282016529.10767") :method -.annotate 'line', 447 +.sub "!PREFIX__semilist" :subid("245_1284728478.15265") :method +.annotate 'line', 4 + $P989 = self."!PREFIX__!subrule"("ws", "") new $P990, "ResizablePMCArray" - push $P990, "<" + push $P990, $P989 .return ($P990) .end .namespace ["NQP";"Grammar"] -.sub "postcircumfix:sym<( )>" :subid("250_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx993_tgt - .local int rx993_pos - .local int rx993_off - .local int rx993_eos - .local int rx993_rep - .local pmc rx993_cur - .local pmc rx993_debug - (rx993_cur, rx993_pos, rx993_tgt, $I10) = self."!cursor_start"() - getattribute rx993_debug, rx993_cur, "$!debug" - .lex unicode:"$\x{a2}", rx993_cur - .local pmc match - .lex "$/", match - length rx993_eos, rx993_tgt - gt rx993_pos, rx993_eos, rx993_done - set rx993_off, 0 - lt rx993_pos, 2, rx993_start - sub rx993_off, rx993_pos, 1 - substr rx993_tgt, rx993_tgt, rx993_off - rx993_start: - eq $I10, 1, rx993_restart - if_null rx993_debug, debug_824 - rx993_cur."!cursor_debug"("START ", "postcircumfix:sym<( )>") - debug_824: +.sub "infixish" :subid("246_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx995_tgt + .local int rx995_pos + .local int rx995_off + .local int rx995_eos + .local int rx995_rep + .local pmc rx995_cur + .local pmc rx995_debug + (rx995_cur, rx995_pos, rx995_tgt, $I10) = self."!cursor_start"() + getattribute rx995_debug, rx995_cur, "$!debug" + .lex unicode:"$\x{a2}", rx995_cur + .local pmc match + .lex "$/", match + length rx995_eos, rx995_tgt + gt rx995_pos, rx995_eos, rx995_done + set rx995_off, 0 + lt rx995_pos, 2, rx995_start + sub rx995_off, rx995_pos, 1 + substr rx995_tgt, rx995_tgt, rx995_off + rx995_start: + eq $I10, 1, rx995_restart + if_null rx995_debug, debug_818 + rx995_cur."!cursor_debug"("START", "infixish") + debug_818: $I10 = self.'from'() - ne $I10, -1, rxscan997_done - goto rxscan997_scan - rxscan997_loop: - ($P10) = rx993_cur."from"() - inc $P10 - set rx993_pos, $P10 - ge rx993_pos, rx993_eos, rxscan997_done - rxscan997_scan: - 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 - sub $I11, rx993_pos, rx993_off - ord $I11, rx993_tgt, $I11 - ne $I11, 40, rx993_fail - add rx993_pos, 1 - # rx subrule "ws" subtype=method negate= - rx993_cur."!cursor_pos"(rx993_pos) - $P10 = rx993_cur."ws"() - unless $P10, rx993_fail - rx993_pos = $P10."pos"() - # rx subrule "arglist" subtype=capture negate= - rx993_cur."!cursor_pos"(rx993_pos) - $P10 = rx993_cur."arglist"() - unless $P10, rx993_fail - rx993_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("arglist") - rx993_pos = $P10."pos"() - # rx literal ")" - add $I11, rx993_pos, 1 - gt $I11, rx993_eos, rx993_fail - sub $I11, rx993_pos, rx993_off - 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") - unless $P10, rx993_fail - rx993_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("O") - rx993_pos = $P10."pos"() -.annotate 'line', 484 + ne $I10, -1, rxscan998_done + goto rxscan998_scan + rxscan998_loop: + ($P10) = rx995_cur."from"() + inc $P10 + set rx995_pos, $P10 + ge rx995_pos, rx995_eos, rxscan998_done + rxscan998_scan: + set_addr $I10, rxscan998_loop + rx995_cur."!mark_push"(0, rx995_pos, $I10) + rxscan998_done: +.annotate 'line', 473 + # rx subrule "infixstopper" subtype=zerowidth negate=1 + rx995_cur."!cursor_pos"(rx995_pos) + $P10 = rx995_cur."infixstopper"() + if $P10, rx995_fail + # rx subrule "infix" subtype=capture negate= + rx995_cur."!cursor_pos"(rx995_pos) + $P10 = rx995_cur."infix"() + unless $P10, rx995_fail + rx995_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("OPER=infix") + rx995_pos = $P10."pos"() # rx pass - rx993_cur."!cursor_pass"(rx993_pos, "postcircumfix:sym<( )>") - if_null rx993_debug, debug_825 - rx993_cur."!cursor_debug"("PASS ", "postcircumfix:sym<( )>", " at pos=", rx993_pos) - 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: - rx993_fail: - (rx993_rep, rx993_pos, $I10, $P10) = rx993_cur."!mark_fail"(0) - lt rx993_pos, -1, rx993_done - eq rx993_pos, -1, rx993_fail - jump $I10 - rx993_done: - rx993_cur."!cursor_fail"() - if_null rx993_debug, debug_827 - rx993_cur."!cursor_debug"("FAIL ", "postcircumfix:sym<( )>") - debug_827: - .return (rx993_cur) + rx995_cur."!cursor_pass"(rx995_pos, "infixish") + if_null rx995_debug, debug_819 + rx995_cur."!cursor_debug"("PASS", "infixish", " at pos=", rx995_pos) + debug_819: + .return (rx995_cur) + rx995_restart: +.annotate 'line', 454 + if_null rx995_debug, debug_820 + rx995_cur."!cursor_debug"("NEXT", "infixish") + debug_820: + rx995_fail: + (rx995_rep, rx995_pos, $I10, $P10) = rx995_cur."!mark_fail"(0) + lt rx995_pos, -1, rx995_done + eq rx995_pos, -1, rx995_fail + jump $I10 + rx995_done: + rx995_cur."!cursor_fail"() + if_null rx995_debug, debug_821 + rx995_cur."!cursor_debug"("FAIL", "infixish") + debug_821: + .return (rx995_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postcircumfix:sym<( )>" :subid("251_1282016529.10767") :method -.annotate 'line', 447 - $P995 = self."!PREFIX__!subrule"("ws", "(") - new $P996, "ResizablePMCArray" - push $P996, $P995 - .return ($P996) +.sub "!PREFIX__infixish" :subid("247_1284728478.15265") :method +.annotate 'line', 454 + new $P997, "ResizablePMCArray" + push $P997, "" + .return ($P997) .end .namespace ["NQP";"Grammar"] -.sub "postfix:sym<.>" :subid("252_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx999_tgt - .local int rx999_pos - .local int rx999_off - .local int rx999_eos - .local int rx999_rep - .local pmc rx999_cur - .local pmc rx999_debug - (rx999_cur, rx999_pos, rx999_tgt, $I10) = self."!cursor_start"() - getattribute rx999_debug, rx999_cur, "$!debug" - .lex unicode:"$\x{a2}", rx999_cur - .local pmc match - .lex "$/", match - length rx999_eos, rx999_tgt - gt rx999_pos, rx999_eos, rx999_done - set rx999_off, 0 - lt rx999_pos, 2, rx999_start - sub rx999_off, rx999_pos, 1 - substr rx999_tgt, rx999_tgt, rx999_off - rx999_start: - eq $I10, 1, rx999_restart - if_null rx999_debug, debug_828 - rx999_cur."!cursor_debug"("START ", "postfix:sym<.>") - debug_828: +.sub "infixstopper" :subid("248_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1000_tgt + .local int rx1000_pos + .local int rx1000_off + .local int rx1000_eos + .local int rx1000_rep + .local pmc rx1000_cur + .local pmc rx1000_debug + (rx1000_cur, rx1000_pos, rx1000_tgt, $I10) = self."!cursor_start"() + getattribute rx1000_debug, rx1000_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1000_cur + .local pmc match + .lex "$/", match + length rx1000_eos, rx1000_tgt + gt rx1000_pos, rx1000_eos, rx1000_done + set rx1000_off, 0 + lt rx1000_pos, 2, rx1000_start + sub rx1000_off, rx1000_pos, 1 + substr rx1000_tgt, rx1000_tgt, rx1000_off + rx1000_start: + eq $I10, 1, rx1000_restart + if_null rx1000_debug, debug_822 + rx1000_cur."!cursor_debug"("START", "infixstopper") + debug_822: $I10 = self.'from'() ne $I10, -1, rxscan1003_done goto rxscan1003_scan rxscan1003_loop: - ($P10) = rx999_cur."from"() + ($P10) = rx1000_cur."from"() inc $P10 - set rx999_pos, $P10 - ge rx999_pos, rx999_eos, rxscan1003_done + set rx1000_pos, $P10 + ge rx1000_pos, rx1000_eos, rxscan1003_done rxscan1003_scan: set_addr $I10, rxscan1003_loop - rx999_cur."!mark_push"(0, rx999_pos, $I10) + rx1000_cur."!mark_push"(0, rx1000_pos, $I10) rxscan1003_done: -.annotate 'line', 489 - # rx subrule "dotty" subtype=capture negate= - rx999_cur."!cursor_pos"(rx999_pos) - $P10 = rx999_cur."dotty"() - unless $P10, rx999_fail - rx999_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("dotty") - rx999_pos = $P10."pos"() - # rx subrule "O" subtype=capture negate= - rx999_cur."!cursor_pos"(rx999_pos) - $P10 = rx999_cur."O"("%methodop") - unless $P10, rx999_fail - rx999_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("O") - rx999_pos = $P10."pos"() - # rx pass - rx999_cur."!cursor_pass"(rx999_pos, "postfix:sym<.>") - if_null rx999_debug, debug_829 - rx999_cur."!cursor_debug"("PASS ", "postfix:sym<.>", " at pos=", rx999_pos) - 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: - rx999_fail: - (rx999_rep, rx999_pos, $I10, $P10) = rx999_cur."!mark_fail"(0) - lt rx999_pos, -1, rx999_done - eq rx999_pos, -1, rx999_fail - jump $I10 - rx999_done: - rx999_cur."!cursor_fail"() - if_null rx999_debug, debug_831 - rx999_cur."!cursor_debug"("FAIL ", "postfix:sym<.>") - debug_831: - .return (rx999_cur) +.annotate 'line', 474 + # rx subrule "lambda" subtype=zerowidth negate= + rx1000_cur."!cursor_pos"(rx1000_pos) + $P10 = rx1000_cur."lambda"() + unless $P10, rx1000_fail + # rx pass + rx1000_cur."!cursor_pass"(rx1000_pos, "infixstopper") + if_null rx1000_debug, debug_823 + rx1000_cur."!cursor_debug"("PASS", "infixstopper", " at pos=", rx1000_pos) + debug_823: + .return (rx1000_cur) + rx1000_restart: +.annotate 'line', 454 + if_null rx1000_debug, debug_824 + rx1000_cur."!cursor_debug"("NEXT", "infixstopper") + debug_824: + rx1000_fail: + (rx1000_rep, rx1000_pos, $I10, $P10) = rx1000_cur."!mark_fail"(0) + lt rx1000_pos, -1, rx1000_done + eq rx1000_pos, -1, rx1000_fail + jump $I10 + rx1000_done: + rx1000_cur."!cursor_fail"() + if_null rx1000_debug, debug_825 + rx1000_cur."!cursor_debug"("FAIL", "infixstopper") + debug_825: + .return (rx1000_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postfix:sym<.>" :subid("253_1282016529.10767") :method -.annotate 'line', 447 - $P1001 = self."!PREFIX__!subrule"("dotty", "") +.sub "!PREFIX__infixstopper" :subid("249_1284728478.15265") :method +.annotate 'line', 454 new $P1002, "ResizablePMCArray" - push $P1002, $P1001 + push $P1002, "" .return ($P1002) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym<++>" :subid("254_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 +.sub "postcircumfix:sym<[ ]>" :subid("250_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 .local string rx1005_tgt .local int rx1005_pos .local int rx1005_off @@ -14150,9 +13891,9 @@ substr rx1005_tgt, rx1005_tgt, rx1005_off rx1005_start: eq $I10, 1, rx1005_restart - if_null rx1005_debug, debug_832 - rx1005_cur."!cursor_debug"("START ", "prefix:sym<++>") - debug_832: + if_null rx1005_debug, debug_826 + rx1005_cur."!cursor_debug"("START", "postcircumfix:sym<[ ]>") + debug_826: $I10 = self.'from'() ne $I10, -1, rxscan1009_done goto rxscan1009_scan @@ -14165,46 +13906,53 @@ 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) - # rx literal "++" - add $I11, rx1005_pos, 2 +.annotate 'line', 477 + # rx literal "[" + add $I11, rx1005_pos, 1 gt $I11, rx1005_eos, rx1005_fail sub $I11, rx1005_pos, rx1005_off - substr $S10, rx1005_tgt, $I11, 2 - ne $S10, "++", rx1005_fail - add rx1005_pos, 2 - set_addr $I10, rxcap_1010_fail - ($I12, $I11) = rx1005_cur."!mark_peek"($I10) - rx1005_cur."!cursor_pos"($I11) - ($P10) = rx1005_cur."!cursor_start"() - $P10."!cursor_pass"(rx1005_pos, "") + ord $I11, rx1005_tgt, $I11 + ne $I11, 91, rx1005_fail + add rx1005_pos, 1 + # rx subrule "ws" subtype=method negate= + rx1005_cur."!cursor_pos"(rx1005_pos) + $P10 = rx1005_cur."ws"() + unless $P10, rx1005_fail + rx1005_pos = $P10."pos"() + # rx subrule "EXPR" subtype=capture negate= + rx1005_cur."!cursor_pos"(rx1005_pos) + $P10 = rx1005_cur."EXPR"() + unless $P10, rx1005_fail rx1005_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1010_done - rxcap_1010_fail: - goto rx1005_fail - rxcap_1010_done: + $P10."!cursor_names"("EXPR") + rx1005_pos = $P10."pos"() + # rx literal "]" + add $I11, rx1005_pos, 1 + gt $I11, rx1005_eos, rx1005_fail + sub $I11, rx1005_pos, rx1005_off + ord $I11, rx1005_tgt, $I11 + ne $I11, 93, rx1005_fail + add rx1005_pos, 1 +.annotate 'line', 478 # rx subrule "O" subtype=capture negate= rx1005_cur."!cursor_pos"(rx1005_pos) - $P10 = rx1005_cur."O"("%autoincrement, :pirop") + $P10 = rx1005_cur."O"("%methodop") unless $P10, rx1005_fail rx1005_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") rx1005_pos = $P10."pos"() +.annotate 'line', 476 # rx pass - rx1005_cur."!cursor_pass"(rx1005_pos, "prefix:sym<++>") - if_null rx1005_debug, debug_833 - rx1005_cur."!cursor_debug"("PASS ", "prefix:sym<++>", " at pos=", rx1005_pos) - debug_833: + rx1005_cur."!cursor_pass"(rx1005_pos, "postcircumfix:sym<[ ]>") + if_null rx1005_debug, debug_827 + rx1005_cur."!cursor_debug"("PASS", "postcircumfix:sym<[ ]>", " at pos=", rx1005_pos) + debug_827: .return (rx1005_cur) rx1005_restart: -.annotate 'line', 447 - if_null rx1005_debug, debug_834 - rx1005_cur."!cursor_debug"("NEXT ", "prefix:sym<++>") - debug_834: +.annotate 'line', 454 + if_null rx1005_debug, debug_828 + rx1005_cur."!cursor_debug"("NEXT", "postcircumfix:sym<[ ]>") + debug_828: rx1005_fail: (rx1005_rep, rx1005_pos, $I10, $P10) = rx1005_cur."!mark_fail"(0) lt rx1005_pos, -1, rx1005_done @@ -14212,18 +13960,18 @@ jump $I10 rx1005_done: rx1005_cur."!cursor_fail"() - if_null rx1005_debug, debug_835 - rx1005_cur."!cursor_debug"("FAIL ", "prefix:sym<++>") - debug_835: + if_null rx1005_debug, debug_829 + rx1005_cur."!cursor_debug"("FAIL", "postcircumfix:sym<[ ]>") + debug_829: .return (rx1005_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<++>" :subid("255_1282016529.10767") :method -.annotate 'line', 447 - $P1007 = self."!PREFIX__!subrule"("O", "++") +.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("251_1284728478.15265") :method +.annotate 'line', 454 + $P1007 = self."!PREFIX__!subrule"("ws", "[") new $P1008, "ResizablePMCArray" push $P1008, $P1007 .return ($P1008) @@ -14231,5537 +13979,5514 @@ .namespace ["NQP";"Grammar"] -.sub "prefix:sym<-->" :subid("256_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1012_tgt - .local int rx1012_pos - .local int rx1012_off - .local int rx1012_eos - .local int rx1012_rep - .local pmc rx1012_cur - .local pmc rx1012_debug - (rx1012_cur, rx1012_pos, rx1012_tgt, $I10) = self."!cursor_start"() - getattribute rx1012_debug, rx1012_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1012_cur - .local pmc match - .lex "$/", match - length rx1012_eos, rx1012_tgt - gt rx1012_pos, rx1012_eos, rx1012_done - set rx1012_off, 0 - lt rx1012_pos, 2, rx1012_start - sub rx1012_off, rx1012_pos, 1 - substr rx1012_tgt, rx1012_tgt, rx1012_off - rx1012_start: - eq $I10, 1, rx1012_restart - if_null rx1012_debug, debug_836 - rx1012_cur."!cursor_debug"("START ", "prefix:sym<-->") - debug_836: +.sub "postcircumfix:sym<{ }>" :subid("252_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1011_tgt + .local int rx1011_pos + .local int rx1011_off + .local int rx1011_eos + .local int rx1011_rep + .local pmc rx1011_cur + .local pmc rx1011_debug + (rx1011_cur, rx1011_pos, rx1011_tgt, $I10) = self."!cursor_start"() + getattribute rx1011_debug, rx1011_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1011_cur + .local pmc match + .lex "$/", match + length rx1011_eos, rx1011_tgt + gt rx1011_pos, rx1011_eos, rx1011_done + set rx1011_off, 0 + lt rx1011_pos, 2, rx1011_start + sub rx1011_off, rx1011_pos, 1 + substr rx1011_tgt, rx1011_tgt, rx1011_off + rx1011_start: + eq $I10, 1, rx1011_restart + if_null rx1011_debug, debug_830 + rx1011_cur."!cursor_debug"("START", "postcircumfix:sym<{ }>") + debug_830: $I10 = self.'from'() - ne $I10, -1, rxscan1016_done - goto rxscan1016_scan - rxscan1016_loop: - ($P10) = rx1012_cur."from"() - inc $P10 - set rx1012_pos, $P10 - ge rx1012_pos, rx1012_eos, rxscan1016_done - rxscan1016_scan: - 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) - # rx literal "--" - add $I11, rx1012_pos, 2 - gt $I11, rx1012_eos, rx1012_fail - sub $I11, rx1012_pos, rx1012_off - substr $S10, rx1012_tgt, $I11, 2 - ne $S10, "--", rx1012_fail - add rx1012_pos, 2 - set_addr $I10, rxcap_1017_fail - ($I12, $I11) = rx1012_cur."!mark_peek"($I10) - rx1012_cur."!cursor_pos"($I11) - ($P10) = rx1012_cur."!cursor_start"() - $P10."!cursor_pass"(rx1012_pos, "") - rx1012_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1017_done - rxcap_1017_fail: - goto rx1012_fail - rxcap_1017_done: + ne $I10, -1, rxscan1015_done + goto rxscan1015_scan + rxscan1015_loop: + ($P10) = rx1011_cur."from"() + inc $P10 + set rx1011_pos, $P10 + ge rx1011_pos, rx1011_eos, rxscan1015_done + rxscan1015_scan: + set_addr $I10, rxscan1015_loop + rx1011_cur."!mark_push"(0, rx1011_pos, $I10) + rxscan1015_done: +.annotate 'line', 482 + # rx literal "{" + add $I11, rx1011_pos, 1 + gt $I11, rx1011_eos, rx1011_fail + sub $I11, rx1011_pos, rx1011_off + ord $I11, rx1011_tgt, $I11 + ne $I11, 123, rx1011_fail + add rx1011_pos, 1 + # rx subrule "ws" subtype=method negate= + rx1011_cur."!cursor_pos"(rx1011_pos) + $P10 = rx1011_cur."ws"() + unless $P10, rx1011_fail + rx1011_pos = $P10."pos"() + # rx subrule "EXPR" subtype=capture negate= + rx1011_cur."!cursor_pos"(rx1011_pos) + $P10 = rx1011_cur."EXPR"() + unless $P10, rx1011_fail + rx1011_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("EXPR") + rx1011_pos = $P10."pos"() + # rx literal "}" + add $I11, rx1011_pos, 1 + gt $I11, rx1011_eos, rx1011_fail + sub $I11, rx1011_pos, rx1011_off + ord $I11, rx1011_tgt, $I11 + ne $I11, 125, rx1011_fail + add rx1011_pos, 1 +.annotate 'line', 483 # rx subrule "O" subtype=capture negate= - rx1012_cur."!cursor_pos"(rx1012_pos) - $P10 = rx1012_cur."O"("%autoincrement, :pirop") - unless $P10, rx1012_fail - rx1012_cur."!mark_push"(0, -1, 0, $P10) + rx1011_cur."!cursor_pos"(rx1011_pos) + $P10 = rx1011_cur."O"("%methodop") + unless $P10, rx1011_fail + rx1011_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1012_pos = $P10."pos"() + rx1011_pos = $P10."pos"() +.annotate 'line', 481 # rx pass - rx1012_cur."!cursor_pass"(rx1012_pos, "prefix:sym<-->") - if_null rx1012_debug, debug_837 - rx1012_cur."!cursor_debug"("PASS ", "prefix:sym<-->", " at pos=", rx1012_pos) - 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: - rx1012_fail: - (rx1012_rep, rx1012_pos, $I10, $P10) = rx1012_cur."!mark_fail"(0) - lt rx1012_pos, -1, rx1012_done - eq rx1012_pos, -1, rx1012_fail - jump $I10 - rx1012_done: - rx1012_cur."!cursor_fail"() - if_null rx1012_debug, debug_839 - rx1012_cur."!cursor_debug"("FAIL ", "prefix:sym<-->") - debug_839: - .return (rx1012_cur) + rx1011_cur."!cursor_pass"(rx1011_pos, "postcircumfix:sym<{ }>") + if_null rx1011_debug, debug_831 + rx1011_cur."!cursor_debug"("PASS", "postcircumfix:sym<{ }>", " at pos=", rx1011_pos) + debug_831: + .return (rx1011_cur) + rx1011_restart: +.annotate 'line', 454 + if_null rx1011_debug, debug_832 + rx1011_cur."!cursor_debug"("NEXT", "postcircumfix:sym<{ }>") + debug_832: + rx1011_fail: + (rx1011_rep, rx1011_pos, $I10, $P10) = rx1011_cur."!mark_fail"(0) + lt rx1011_pos, -1, rx1011_done + eq rx1011_pos, -1, rx1011_fail + jump $I10 + rx1011_done: + rx1011_cur."!cursor_fail"() + if_null rx1011_debug, debug_833 + rx1011_cur."!cursor_debug"("FAIL", "postcircumfix:sym<{ }>") + debug_833: + .return (rx1011_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<-->" :subid("257_1282016529.10767") :method -.annotate 'line', 447 - $P1014 = self."!PREFIX__!subrule"("O", "--") - new $P1015, "ResizablePMCArray" - push $P1015, $P1014 - .return ($P1015) +.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("253_1284728478.15265") :method +.annotate 'line', 454 + $P1013 = self."!PREFIX__!subrule"("ws", "{") + new $P1014, "ResizablePMCArray" + push $P1014, $P1013 + .return ($P1014) .end .namespace ["NQP";"Grammar"] -.sub "postfix:sym<++>" :subid("258_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1019_tgt - .local int rx1019_pos - .local int rx1019_off - .local int rx1019_eos - .local int rx1019_rep - .local pmc rx1019_cur - .local pmc rx1019_debug - (rx1019_cur, rx1019_pos, rx1019_tgt, $I10) = self."!cursor_start"() - getattribute rx1019_debug, rx1019_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1019_cur - .local pmc match - .lex "$/", match - length rx1019_eos, rx1019_tgt - gt rx1019_pos, rx1019_eos, rx1019_done - set rx1019_off, 0 - lt rx1019_pos, 2, rx1019_start - sub rx1019_off, rx1019_pos, 1 - substr rx1019_tgt, rx1019_tgt, rx1019_off - rx1019_start: - eq $I10, 1, rx1019_restart - if_null rx1019_debug, debug_840 - rx1019_cur."!cursor_debug"("START ", "postfix:sym<++>") - debug_840: +.sub "postcircumfix:sym" :subid("254_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1017_tgt + .local int rx1017_pos + .local int rx1017_off + .local int rx1017_eos + .local int rx1017_rep + .local pmc rx1017_cur + .local pmc rx1017_debug + (rx1017_cur, rx1017_pos, rx1017_tgt, $I10) = self."!cursor_start"() + getattribute rx1017_debug, rx1017_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1017_cur + .local pmc match + .lex "$/", match + length rx1017_eos, rx1017_tgt + gt rx1017_pos, rx1017_eos, rx1017_done + set rx1017_off, 0 + lt rx1017_pos, 2, rx1017_start + sub rx1017_off, rx1017_pos, 1 + substr rx1017_tgt, rx1017_tgt, rx1017_off + rx1017_start: + eq $I10, 1, rx1017_restart + if_null rx1017_debug, debug_834 + rx1017_cur."!cursor_debug"("START", "postcircumfix:sym") + debug_834: $I10 = self.'from'() - ne $I10, -1, rxscan1023_done - goto rxscan1023_scan - rxscan1023_loop: - ($P10) = rx1019_cur."from"() - inc $P10 - set rx1019_pos, $P10 - ge rx1019_pos, rx1019_eos, rxscan1023_done - rxscan1023_scan: - 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) - # rx literal "++" - add $I11, rx1019_pos, 2 - gt $I11, rx1019_eos, rx1019_fail - sub $I11, rx1019_pos, rx1019_off - substr $S10, rx1019_tgt, $I11, 2 - ne $S10, "++", rx1019_fail - add rx1019_pos, 2 - set_addr $I10, rxcap_1024_fail - ($I12, $I11) = rx1019_cur."!mark_peek"($I10) - rx1019_cur."!cursor_pos"($I11) - ($P10) = rx1019_cur."!cursor_start"() - $P10."!cursor_pass"(rx1019_pos, "") - rx1019_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1024_done - rxcap_1024_fail: - goto rx1019_fail - rxcap_1024_done: + ne $I10, -1, rxscan1020_done + goto rxscan1020_scan + rxscan1020_loop: + ($P10) = rx1017_cur."from"() + inc $P10 + set rx1017_pos, $P10 + ge rx1017_pos, rx1017_eos, rxscan1020_done + rxscan1020_scan: + set_addr $I10, rxscan1020_loop + rx1017_cur."!mark_push"(0, rx1017_pos, $I10) + rxscan1020_done: +.annotate 'line', 487 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx1017_pos, rx1017_off + substr $S10, rx1017_tgt, $I10, 1 + index $I11, "<", $S10 + lt $I11, 0, rx1017_fail + # rx subrule "quote_EXPR" subtype=capture negate= + rx1017_cur."!cursor_pos"(rx1017_pos) + $P10 = rx1017_cur."quote_EXPR"(":q") + unless $P10, rx1017_fail + rx1017_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quote_EXPR") + rx1017_pos = $P10."pos"() +.annotate 'line', 488 # rx subrule "O" subtype=capture negate= - rx1019_cur."!cursor_pos"(rx1019_pos) - $P10 = rx1019_cur."O"("%autoincrement") - unless $P10, rx1019_fail - rx1019_cur."!mark_push"(0, -1, 0, $P10) + rx1017_cur."!cursor_pos"(rx1017_pos) + $P10 = rx1017_cur."O"("%methodop") + unless $P10, rx1017_fail + rx1017_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1019_pos = $P10."pos"() + rx1017_pos = $P10."pos"() +.annotate 'line', 486 # rx pass - rx1019_cur."!cursor_pass"(rx1019_pos, "postfix:sym<++>") - if_null rx1019_debug, debug_841 - rx1019_cur."!cursor_debug"("PASS ", "postfix:sym<++>", " at pos=", rx1019_pos) - 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: - rx1019_fail: - (rx1019_rep, rx1019_pos, $I10, $P10) = rx1019_cur."!mark_fail"(0) - lt rx1019_pos, -1, rx1019_done - eq rx1019_pos, -1, rx1019_fail - jump $I10 - rx1019_done: - rx1019_cur."!cursor_fail"() - if_null rx1019_debug, debug_843 - rx1019_cur."!cursor_debug"("FAIL ", "postfix:sym<++>") - debug_843: - .return (rx1019_cur) + rx1017_cur."!cursor_pass"(rx1017_pos, "postcircumfix:sym") + if_null rx1017_debug, debug_835 + rx1017_cur."!cursor_debug"("PASS", "postcircumfix:sym", " at pos=", rx1017_pos) + debug_835: + .return (rx1017_cur) + rx1017_restart: +.annotate 'line', 454 + if_null rx1017_debug, debug_836 + rx1017_cur."!cursor_debug"("NEXT", "postcircumfix:sym") + debug_836: + rx1017_fail: + (rx1017_rep, rx1017_pos, $I10, $P10) = rx1017_cur."!mark_fail"(0) + lt rx1017_pos, -1, rx1017_done + eq rx1017_pos, -1, rx1017_fail + jump $I10 + rx1017_done: + rx1017_cur."!cursor_fail"() + if_null rx1017_debug, debug_837 + rx1017_cur."!cursor_debug"("FAIL", "postcircumfix:sym") + debug_837: + .return (rx1017_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postfix:sym<++>" :subid("259_1282016529.10767") :method -.annotate 'line', 447 - $P1021 = self."!PREFIX__!subrule"("O", "++") - new $P1022, "ResizablePMCArray" - push $P1022, $P1021 - .return ($P1022) +.sub "!PREFIX__postcircumfix:sym" :subid("255_1284728478.15265") :method +.annotate 'line', 454 + new $P1019, "ResizablePMCArray" + push $P1019, "<" + .return ($P1019) .end .namespace ["NQP";"Grammar"] -.sub "postfix:sym<-->" :subid("260_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1026_tgt - .local int rx1026_pos - .local int rx1026_off - .local int rx1026_eos - .local int rx1026_rep - .local pmc rx1026_cur - .local pmc rx1026_debug - (rx1026_cur, rx1026_pos, rx1026_tgt, $I10) = self."!cursor_start"() - getattribute rx1026_debug, rx1026_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1026_cur - .local pmc match - .lex "$/", match - length rx1026_eos, rx1026_tgt - gt rx1026_pos, rx1026_eos, rx1026_done - set rx1026_off, 0 - lt rx1026_pos, 2, rx1026_start - sub rx1026_off, rx1026_pos, 1 - substr rx1026_tgt, rx1026_tgt, rx1026_off - rx1026_start: - eq $I10, 1, rx1026_restart - if_null rx1026_debug, debug_844 - rx1026_cur."!cursor_debug"("START ", "postfix:sym<-->") - debug_844: +.sub "postcircumfix:sym<( )>" :subid("256_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1022_tgt + .local int rx1022_pos + .local int rx1022_off + .local int rx1022_eos + .local int rx1022_rep + .local pmc rx1022_cur + .local pmc rx1022_debug + (rx1022_cur, rx1022_pos, rx1022_tgt, $I10) = self."!cursor_start"() + getattribute rx1022_debug, rx1022_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1022_cur + .local pmc match + .lex "$/", match + length rx1022_eos, rx1022_tgt + gt rx1022_pos, rx1022_eos, rx1022_done + set rx1022_off, 0 + lt rx1022_pos, 2, rx1022_start + sub rx1022_off, rx1022_pos, 1 + substr rx1022_tgt, rx1022_tgt, rx1022_off + rx1022_start: + eq $I10, 1, rx1022_restart + if_null rx1022_debug, debug_838 + rx1022_cur."!cursor_debug"("START", "postcircumfix:sym<( )>") + debug_838: $I10 = self.'from'() - ne $I10, -1, rxscan1030_done - goto rxscan1030_scan - rxscan1030_loop: - ($P10) = rx1026_cur."from"() - inc $P10 - set rx1026_pos, $P10 - ge rx1026_pos, rx1026_eos, rxscan1030_done - rxscan1030_scan: - 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) - # rx literal "--" - add $I11, rx1026_pos, 2 - gt $I11, rx1026_eos, rx1026_fail - sub $I11, rx1026_pos, rx1026_off - substr $S10, rx1026_tgt, $I11, 2 - ne $S10, "--", rx1026_fail - add rx1026_pos, 2 - set_addr $I10, rxcap_1031_fail - ($I12, $I11) = rx1026_cur."!mark_peek"($I10) - rx1026_cur."!cursor_pos"($I11) - ($P10) = rx1026_cur."!cursor_start"() - $P10."!cursor_pass"(rx1026_pos, "") - rx1026_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1031_done - rxcap_1031_fail: - goto rx1026_fail - rxcap_1031_done: + ne $I10, -1, rxscan1026_done + goto rxscan1026_scan + rxscan1026_loop: + ($P10) = rx1022_cur."from"() + inc $P10 + set rx1022_pos, $P10 + ge rx1022_pos, rx1022_eos, rxscan1026_done + rxscan1026_scan: + set_addr $I10, rxscan1026_loop + rx1022_cur."!mark_push"(0, rx1022_pos, $I10) + rxscan1026_done: +.annotate 'line', 492 + # rx literal "(" + add $I11, rx1022_pos, 1 + gt $I11, rx1022_eos, rx1022_fail + sub $I11, rx1022_pos, rx1022_off + ord $I11, rx1022_tgt, $I11 + ne $I11, 40, rx1022_fail + add rx1022_pos, 1 + # rx subrule "ws" subtype=method negate= + rx1022_cur."!cursor_pos"(rx1022_pos) + $P10 = rx1022_cur."ws"() + unless $P10, rx1022_fail + rx1022_pos = $P10."pos"() + # rx subrule "arglist" subtype=capture negate= + rx1022_cur."!cursor_pos"(rx1022_pos) + $P10 = rx1022_cur."arglist"() + unless $P10, rx1022_fail + rx1022_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("arglist") + rx1022_pos = $P10."pos"() + # rx literal ")" + add $I11, rx1022_pos, 1 + gt $I11, rx1022_eos, rx1022_fail + sub $I11, rx1022_pos, rx1022_off + ord $I11, rx1022_tgt, $I11 + ne $I11, 41, rx1022_fail + add rx1022_pos, 1 +.annotate 'line', 493 # rx subrule "O" subtype=capture negate= - rx1026_cur."!cursor_pos"(rx1026_pos) - $P10 = rx1026_cur."O"("%autoincrement") - unless $P10, rx1026_fail - rx1026_cur."!mark_push"(0, -1, 0, $P10) + rx1022_cur."!cursor_pos"(rx1022_pos) + $P10 = rx1022_cur."O"("%methodop") + unless $P10, rx1022_fail + rx1022_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1026_pos = $P10."pos"() + rx1022_pos = $P10."pos"() +.annotate 'line', 491 # rx pass - rx1026_cur."!cursor_pass"(rx1026_pos, "postfix:sym<-->") - if_null rx1026_debug, debug_845 - rx1026_cur."!cursor_debug"("PASS ", "postfix:sym<-->", " at pos=", rx1026_pos) - 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: - rx1026_fail: - (rx1026_rep, rx1026_pos, $I10, $P10) = rx1026_cur."!mark_fail"(0) - lt rx1026_pos, -1, rx1026_done - eq rx1026_pos, -1, rx1026_fail - jump $I10 - rx1026_done: - rx1026_cur."!cursor_fail"() - if_null rx1026_debug, debug_847 - rx1026_cur."!cursor_debug"("FAIL ", "postfix:sym<-->") - debug_847: - .return (rx1026_cur) + rx1022_cur."!cursor_pass"(rx1022_pos, "postcircumfix:sym<( )>") + if_null rx1022_debug, debug_839 + rx1022_cur."!cursor_debug"("PASS", "postcircumfix:sym<( )>", " at pos=", rx1022_pos) + debug_839: + .return (rx1022_cur) + rx1022_restart: +.annotate 'line', 454 + if_null rx1022_debug, debug_840 + rx1022_cur."!cursor_debug"("NEXT", "postcircumfix:sym<( )>") + debug_840: + rx1022_fail: + (rx1022_rep, rx1022_pos, $I10, $P10) = rx1022_cur."!mark_fail"(0) + lt rx1022_pos, -1, rx1022_done + eq rx1022_pos, -1, rx1022_fail + jump $I10 + rx1022_done: + rx1022_cur."!cursor_fail"() + if_null rx1022_debug, debug_841 + rx1022_cur."!cursor_debug"("FAIL", "postcircumfix:sym<( )>") + debug_841: + .return (rx1022_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__postfix:sym<-->" :subid("261_1282016529.10767") :method -.annotate 'line', 447 - $P1028 = self."!PREFIX__!subrule"("O", "--") - new $P1029, "ResizablePMCArray" - push $P1029, $P1028 - .return ($P1029) +.sub "!PREFIX__postcircumfix:sym<( )>" :subid("257_1284728478.15265") :method +.annotate 'line', 454 + $P1024 = self."!PREFIX__!subrule"("ws", "(") + new $P1025, "ResizablePMCArray" + push $P1025, $P1024 + .return ($P1025) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<**>" :subid("262_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1033_tgt - .local int rx1033_pos - .local int rx1033_off - .local int rx1033_eos - .local int rx1033_rep - .local pmc rx1033_cur - .local pmc rx1033_debug - (rx1033_cur, rx1033_pos, rx1033_tgt, $I10) = self."!cursor_start"() - getattribute rx1033_debug, rx1033_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1033_cur - .local pmc match - .lex "$/", match - length rx1033_eos, rx1033_tgt - gt rx1033_pos, rx1033_eos, rx1033_done - set rx1033_off, 0 - lt rx1033_pos, 2, rx1033_start - sub rx1033_off, rx1033_pos, 1 - substr rx1033_tgt, rx1033_tgt, rx1033_off - rx1033_start: - eq $I10, 1, rx1033_restart - if_null rx1033_debug, debug_848 - rx1033_cur."!cursor_debug"("START ", "infix:sym<**>") - debug_848: +.sub "postfix:sym<.>" :subid("258_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1028_tgt + .local int rx1028_pos + .local int rx1028_off + .local int rx1028_eos + .local int rx1028_rep + .local pmc rx1028_cur + .local pmc rx1028_debug + (rx1028_cur, rx1028_pos, rx1028_tgt, $I10) = self."!cursor_start"() + getattribute rx1028_debug, rx1028_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1028_cur + .local pmc match + .lex "$/", match + length rx1028_eos, rx1028_tgt + gt rx1028_pos, rx1028_eos, rx1028_done + set rx1028_off, 0 + lt rx1028_pos, 2, rx1028_start + sub rx1028_off, rx1028_pos, 1 + substr rx1028_tgt, rx1028_tgt, rx1028_off + rx1028_start: + eq $I10, 1, rx1028_restart + if_null rx1028_debug, debug_842 + rx1028_cur."!cursor_debug"("START", "postfix:sym<.>") + debug_842: $I10 = self.'from'() - ne $I10, -1, rxscan1037_done - goto rxscan1037_scan - rxscan1037_loop: - ($P10) = rx1033_cur."from"() - inc $P10 - set rx1033_pos, $P10 - ge rx1033_pos, rx1033_eos, rxscan1037_done - rxscan1037_scan: - 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) - # rx literal "**" - add $I11, rx1033_pos, 2 - gt $I11, rx1033_eos, rx1033_fail - sub $I11, rx1033_pos, rx1033_off - substr $S10, rx1033_tgt, $I11, 2 - ne $S10, "**", rx1033_fail - add rx1033_pos, 2 - set_addr $I10, rxcap_1038_fail - ($I12, $I11) = rx1033_cur."!mark_peek"($I10) - rx1033_cur."!cursor_pos"($I11) - ($P10) = rx1033_cur."!cursor_start"() - $P10."!cursor_pass"(rx1033_pos, "") - rx1033_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1038_done - rxcap_1038_fail: - goto rx1033_fail - rxcap_1038_done: + ne $I10, -1, rxscan1032_done + goto rxscan1032_scan + rxscan1032_loop: + ($P10) = rx1028_cur."from"() + inc $P10 + set rx1028_pos, $P10 + ge rx1028_pos, rx1028_eos, rxscan1032_done + rxscan1032_scan: + set_addr $I10, rxscan1032_loop + rx1028_cur."!mark_push"(0, rx1028_pos, $I10) + rxscan1032_done: +.annotate 'line', 496 + # rx subrule "dotty" subtype=capture negate= + rx1028_cur."!cursor_pos"(rx1028_pos) + $P10 = rx1028_cur."dotty"() + unless $P10, rx1028_fail + rx1028_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("dotty") + rx1028_pos = $P10."pos"() # rx subrule "O" subtype=capture negate= - rx1033_cur."!cursor_pos"(rx1033_pos) - $P10 = rx1033_cur."O"("%exponentiation, :pirop") - unless $P10, rx1033_fail - rx1033_cur."!mark_push"(0, -1, 0, $P10) + rx1028_cur."!cursor_pos"(rx1028_pos) + $P10 = rx1028_cur."O"("%methodop") + unless $P10, rx1028_fail + rx1028_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1033_pos = $P10."pos"() + rx1028_pos = $P10."pos"() # rx pass - rx1033_cur."!cursor_pass"(rx1033_pos, "infix:sym<**>") - if_null rx1033_debug, debug_849 - rx1033_cur."!cursor_debug"("PASS ", "infix:sym<**>", " at pos=", rx1033_pos) - 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: - rx1033_fail: - (rx1033_rep, rx1033_pos, $I10, $P10) = rx1033_cur."!mark_fail"(0) - lt rx1033_pos, -1, rx1033_done - eq rx1033_pos, -1, rx1033_fail - jump $I10 - rx1033_done: - rx1033_cur."!cursor_fail"() - if_null rx1033_debug, debug_851 - rx1033_cur."!cursor_debug"("FAIL ", "infix:sym<**>") - debug_851: - .return (rx1033_cur) + rx1028_cur."!cursor_pass"(rx1028_pos, "postfix:sym<.>") + if_null rx1028_debug, debug_843 + rx1028_cur."!cursor_debug"("PASS", "postfix:sym<.>", " at pos=", rx1028_pos) + debug_843: + .return (rx1028_cur) + rx1028_restart: +.annotate 'line', 454 + if_null rx1028_debug, debug_844 + rx1028_cur."!cursor_debug"("NEXT", "postfix:sym<.>") + debug_844: + rx1028_fail: + (rx1028_rep, rx1028_pos, $I10, $P10) = rx1028_cur."!mark_fail"(0) + lt rx1028_pos, -1, rx1028_done + eq rx1028_pos, -1, rx1028_fail + jump $I10 + rx1028_done: + rx1028_cur."!cursor_fail"() + if_null rx1028_debug, debug_845 + rx1028_cur."!cursor_debug"("FAIL", "postfix:sym<.>") + debug_845: + .return (rx1028_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<**>" :subid("263_1282016529.10767") :method -.annotate 'line', 447 - $P1035 = self."!PREFIX__!subrule"("O", "**") - new $P1036, "ResizablePMCArray" - push $P1036, $P1035 - .return ($P1036) +.sub "!PREFIX__postfix:sym<.>" :subid("259_1284728478.15265") :method +.annotate 'line', 454 + $P1030 = self."!PREFIX__!subrule"("dotty", "") + new $P1031, "ResizablePMCArray" + push $P1031, $P1030 + .return ($P1031) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym<+>" :subid("264_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1040_tgt - .local int rx1040_pos - .local int rx1040_off - .local int rx1040_eos - .local int rx1040_rep - .local pmc rx1040_cur - .local pmc rx1040_debug - (rx1040_cur, rx1040_pos, rx1040_tgt, $I10) = self."!cursor_start"() - getattribute rx1040_debug, rx1040_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1040_cur - .local pmc match - .lex "$/", match - length rx1040_eos, rx1040_tgt - gt rx1040_pos, rx1040_eos, rx1040_done - set rx1040_off, 0 - lt rx1040_pos, 2, rx1040_start - sub rx1040_off, rx1040_pos, 1 - substr rx1040_tgt, rx1040_tgt, rx1040_off - rx1040_start: - eq $I10, 1, rx1040_restart - if_null rx1040_debug, debug_852 - rx1040_cur."!cursor_debug"("START ", "prefix:sym<+>") - debug_852: +.sub "prefix:sym<++>" :subid("260_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1034_tgt + .local int rx1034_pos + .local int rx1034_off + .local int rx1034_eos + .local int rx1034_rep + .local pmc rx1034_cur + .local pmc rx1034_debug + (rx1034_cur, rx1034_pos, rx1034_tgt, $I10) = self."!cursor_start"() + getattribute rx1034_debug, rx1034_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1034_cur + .local pmc match + .lex "$/", match + length rx1034_eos, rx1034_tgt + gt rx1034_pos, rx1034_eos, rx1034_done + set rx1034_off, 0 + lt rx1034_pos, 2, rx1034_start + sub rx1034_off, rx1034_pos, 1 + substr rx1034_tgt, rx1034_tgt, rx1034_off + rx1034_start: + eq $I10, 1, rx1034_restart + if_null rx1034_debug, debug_846 + rx1034_cur."!cursor_debug"("START", "prefix:sym<++>") + debug_846: $I10 = self.'from'() - ne $I10, -1, rxscan1044_done - goto rxscan1044_scan - rxscan1044_loop: - ($P10) = rx1040_cur."from"() - inc $P10 - set rx1040_pos, $P10 - ge rx1040_pos, rx1040_eos, rxscan1044_done - rxscan1044_scan: - set_addr $I10, rxscan1044_loop - rx1040_cur."!mark_push"(0, rx1040_pos, $I10) - rxscan1044_done: -.annotate 'line', 500 + ne $I10, -1, rxscan1038_done + goto rxscan1038_scan + rxscan1038_loop: + ($P10) = rx1034_cur."from"() + inc $P10 + set rx1034_pos, $P10 + ge rx1034_pos, rx1034_eos, rxscan1038_done + rxscan1038_scan: + set_addr $I10, rxscan1038_loop + rx1034_cur."!mark_push"(0, rx1034_pos, $I10) + rxscan1038_done: +.annotate 'line', 498 # rx subcapture "sym" - set_addr $I10, rxcap_1045_fail - rx1040_cur."!mark_push"(0, rx1040_pos, $I10) - # rx literal "+" - add $I11, rx1040_pos, 1 - gt $I11, rx1040_eos, rx1040_fail - sub $I11, rx1040_pos, rx1040_off - ord $I11, rx1040_tgt, $I11 - ne $I11, 43, rx1040_fail - add rx1040_pos, 1 - set_addr $I10, rxcap_1045_fail - ($I12, $I11) = rx1040_cur."!mark_peek"($I10) - rx1040_cur."!cursor_pos"($I11) - ($P10) = rx1040_cur."!cursor_start"() - $P10."!cursor_pass"(rx1040_pos, "") - rx1040_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1039_fail + rx1034_cur."!mark_push"(0, rx1034_pos, $I10) + # rx literal "++" + add $I11, rx1034_pos, 2 + gt $I11, rx1034_eos, rx1034_fail + sub $I11, rx1034_pos, rx1034_off + substr $S10, rx1034_tgt, $I11, 2 + ne $S10, "++", rx1034_fail + add rx1034_pos, 2 + set_addr $I10, rxcap_1039_fail + ($I12, $I11) = rx1034_cur."!mark_peek"($I10) + rx1034_cur."!cursor_pos"($I11) + ($P10) = rx1034_cur."!cursor_start"() + $P10."!cursor_pass"(rx1034_pos, "") + rx1034_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1039_done + rxcap_1039_fail: + goto rx1034_fail + rxcap_1039_done: + # rx subrule "O" subtype=capture negate= + rx1034_cur."!cursor_pos"(rx1034_pos) + $P10 = rx1034_cur."O"("%autoincrement, :pirop") + unless $P10, rx1034_fail + rx1034_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1034_pos = $P10."pos"() + # rx pass + rx1034_cur."!cursor_pass"(rx1034_pos, "prefix:sym<++>") + if_null rx1034_debug, debug_847 + rx1034_cur."!cursor_debug"("PASS", "prefix:sym<++>", " at pos=", rx1034_pos) + debug_847: + .return (rx1034_cur) + rx1034_restart: +.annotate 'line', 454 + if_null rx1034_debug, debug_848 + rx1034_cur."!cursor_debug"("NEXT", "prefix:sym<++>") + debug_848: + rx1034_fail: + (rx1034_rep, rx1034_pos, $I10, $P10) = rx1034_cur."!mark_fail"(0) + lt rx1034_pos, -1, rx1034_done + eq rx1034_pos, -1, rx1034_fail + jump $I10 + rx1034_done: + rx1034_cur."!cursor_fail"() + if_null rx1034_debug, debug_849 + rx1034_cur."!cursor_debug"("FAIL", "prefix:sym<++>") + debug_849: + .return (rx1034_cur) + .return () +.end + + +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__prefix:sym<++>" :subid("261_1284728478.15265") :method +.annotate 'line', 454 + $P1036 = self."!PREFIX__!subrule"("O", "++") + new $P1037, "ResizablePMCArray" + push $P1037, $P1036 + .return ($P1037) +.end + + +.namespace ["NQP";"Grammar"] +.sub "prefix:sym<-->" :subid("262_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1041_tgt + .local int rx1041_pos + .local int rx1041_off + .local int rx1041_eos + .local int rx1041_rep + .local pmc rx1041_cur + .local pmc rx1041_debug + (rx1041_cur, rx1041_pos, rx1041_tgt, $I10) = self."!cursor_start"() + getattribute rx1041_debug, rx1041_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1041_cur + .local pmc match + .lex "$/", match + length rx1041_eos, rx1041_tgt + gt rx1041_pos, rx1041_eos, rx1041_done + set rx1041_off, 0 + lt rx1041_pos, 2, rx1041_start + sub rx1041_off, rx1041_pos, 1 + substr rx1041_tgt, rx1041_tgt, rx1041_off + rx1041_start: + eq $I10, 1, rx1041_restart + if_null rx1041_debug, debug_850 + rx1041_cur."!cursor_debug"("START", "prefix:sym<-->") + debug_850: + $I10 = self.'from'() + ne $I10, -1, rxscan1045_done + goto rxscan1045_scan + rxscan1045_loop: + ($P10) = rx1041_cur."from"() + inc $P10 + set rx1041_pos, $P10 + ge rx1041_pos, rx1041_eos, rxscan1045_done + rxscan1045_scan: + set_addr $I10, rxscan1045_loop + rx1041_cur."!mark_push"(0, rx1041_pos, $I10) + rxscan1045_done: +.annotate 'line', 499 + # rx subcapture "sym" + set_addr $I10, rxcap_1046_fail + rx1041_cur."!mark_push"(0, rx1041_pos, $I10) + # rx literal "--" + add $I11, rx1041_pos, 2 + gt $I11, rx1041_eos, rx1041_fail + sub $I11, rx1041_pos, rx1041_off + substr $S10, rx1041_tgt, $I11, 2 + ne $S10, "--", rx1041_fail + add rx1041_pos, 2 + set_addr $I10, rxcap_1046_fail + ($I12, $I11) = rx1041_cur."!mark_peek"($I10) + rx1041_cur."!cursor_pos"($I11) + ($P10) = rx1041_cur."!cursor_start"() + $P10."!cursor_pass"(rx1041_pos, "") + rx1041_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1045_done - rxcap_1045_fail: - goto rx1040_fail - rxcap_1045_done: + goto rxcap_1046_done + rxcap_1046_fail: + goto rx1041_fail + rxcap_1046_done: # rx subrule "O" subtype=capture negate= - rx1040_cur."!cursor_pos"(rx1040_pos) - $P10 = rx1040_cur."O"("%symbolic_unary, :pirop") - unless $P10, rx1040_fail - rx1040_cur."!mark_push"(0, -1, 0, $P10) + rx1041_cur."!cursor_pos"(rx1041_pos) + $P10 = rx1041_cur."O"("%autoincrement, :pirop") + unless $P10, rx1041_fail + rx1041_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1040_pos = $P10."pos"() + rx1041_pos = $P10."pos"() # rx pass - rx1040_cur."!cursor_pass"(rx1040_pos, "prefix:sym<+>") - if_null rx1040_debug, debug_853 - rx1040_cur."!cursor_debug"("PASS ", "prefix:sym<+>", " at pos=", rx1040_pos) + rx1041_cur."!cursor_pass"(rx1041_pos, "prefix:sym<-->") + if_null rx1041_debug, debug_851 + rx1041_cur."!cursor_debug"("PASS", "prefix:sym<-->", " at pos=", rx1041_pos) + debug_851: + .return (rx1041_cur) + rx1041_restart: +.annotate 'line', 454 + if_null rx1041_debug, debug_852 + rx1041_cur."!cursor_debug"("NEXT", "prefix:sym<-->") + debug_852: + rx1041_fail: + (rx1041_rep, rx1041_pos, $I10, $P10) = rx1041_cur."!mark_fail"(0) + lt rx1041_pos, -1, rx1041_done + eq rx1041_pos, -1, rx1041_fail + jump $I10 + rx1041_done: + rx1041_cur."!cursor_fail"() + if_null rx1041_debug, debug_853 + rx1041_cur."!cursor_debug"("FAIL", "prefix:sym<-->") 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: - rx1040_fail: - (rx1040_rep, rx1040_pos, $I10, $P10) = rx1040_cur."!mark_fail"(0) - lt rx1040_pos, -1, rx1040_done - eq rx1040_pos, -1, rx1040_fail - jump $I10 - rx1040_done: - rx1040_cur."!cursor_fail"() - if_null rx1040_debug, debug_855 - rx1040_cur."!cursor_debug"("FAIL ", "prefix:sym<+>") - debug_855: - .return (rx1040_cur) + .return (rx1041_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<+>" :subid("265_1282016529.10767") :method -.annotate 'line', 447 - $P1042 = self."!PREFIX__!subrule"("O", "+") - new $P1043, "ResizablePMCArray" - push $P1043, $P1042 - .return ($P1043) +.sub "!PREFIX__prefix:sym<-->" :subid("263_1284728478.15265") :method +.annotate 'line', 454 + $P1043 = self."!PREFIX__!subrule"("O", "--") + new $P1044, "ResizablePMCArray" + push $P1044, $P1043 + .return ($P1044) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym<~>" :subid("266_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1047_tgt - .local int rx1047_pos - .local int rx1047_off - .local int rx1047_eos - .local int rx1047_rep - .local pmc rx1047_cur - .local pmc rx1047_debug - (rx1047_cur, rx1047_pos, rx1047_tgt, $I10) = self."!cursor_start"() - getattribute rx1047_debug, rx1047_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1047_cur - .local pmc match - .lex "$/", match - length rx1047_eos, rx1047_tgt - gt rx1047_pos, rx1047_eos, rx1047_done - set rx1047_off, 0 - lt rx1047_pos, 2, rx1047_start - sub rx1047_off, rx1047_pos, 1 - substr rx1047_tgt, rx1047_tgt, rx1047_off - rx1047_start: - eq $I10, 1, rx1047_restart - if_null rx1047_debug, debug_856 - rx1047_cur."!cursor_debug"("START ", "prefix:sym<~>") - debug_856: +.sub "postfix:sym<++>" :subid("264_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1048_tgt + .local int rx1048_pos + .local int rx1048_off + .local int rx1048_eos + .local int rx1048_rep + .local pmc rx1048_cur + .local pmc rx1048_debug + (rx1048_cur, rx1048_pos, rx1048_tgt, $I10) = self."!cursor_start"() + getattribute rx1048_debug, rx1048_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1048_cur + .local pmc match + .lex "$/", match + length rx1048_eos, rx1048_tgt + gt rx1048_pos, rx1048_eos, rx1048_done + set rx1048_off, 0 + lt rx1048_pos, 2, rx1048_start + sub rx1048_off, rx1048_pos, 1 + substr rx1048_tgt, rx1048_tgt, rx1048_off + rx1048_start: + eq $I10, 1, rx1048_restart + if_null rx1048_debug, debug_854 + rx1048_cur."!cursor_debug"("START", "postfix:sym<++>") + debug_854: $I10 = self.'from'() - ne $I10, -1, rxscan1051_done - goto rxscan1051_scan - rxscan1051_loop: - ($P10) = rx1047_cur."from"() - inc $P10 - set rx1047_pos, $P10 - ge rx1047_pos, rx1047_eos, rxscan1051_done - rxscan1051_scan: - set_addr $I10, rxscan1051_loop - rx1047_cur."!mark_push"(0, rx1047_pos, $I10) - rxscan1051_done: -.annotate 'line', 501 + ne $I10, -1, rxscan1052_done + goto rxscan1052_scan + rxscan1052_loop: + ($P10) = rx1048_cur."from"() + inc $P10 + set rx1048_pos, $P10 + ge rx1048_pos, rx1048_eos, rxscan1052_done + rxscan1052_scan: + set_addr $I10, rxscan1052_loop + rx1048_cur."!mark_push"(0, rx1048_pos, $I10) + rxscan1052_done: +.annotate 'line', 502 # rx subcapture "sym" - set_addr $I10, rxcap_1052_fail - rx1047_cur."!mark_push"(0, rx1047_pos, $I10) - # rx literal "~" - add $I11, rx1047_pos, 1 - gt $I11, rx1047_eos, rx1047_fail - sub $I11, rx1047_pos, rx1047_off - ord $I11, rx1047_tgt, $I11 - ne $I11, 126, rx1047_fail - add rx1047_pos, 1 - set_addr $I10, rxcap_1052_fail - ($I12, $I11) = rx1047_cur."!mark_peek"($I10) - rx1047_cur."!cursor_pos"($I11) - ($P10) = rx1047_cur."!cursor_start"() - $P10."!cursor_pass"(rx1047_pos, "") - rx1047_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1053_fail + rx1048_cur."!mark_push"(0, rx1048_pos, $I10) + # rx literal "++" + add $I11, rx1048_pos, 2 + gt $I11, rx1048_eos, rx1048_fail + sub $I11, rx1048_pos, rx1048_off + substr $S10, rx1048_tgt, $I11, 2 + ne $S10, "++", rx1048_fail + add rx1048_pos, 2 + set_addr $I10, rxcap_1053_fail + ($I12, $I11) = rx1048_cur."!mark_peek"($I10) + rx1048_cur."!cursor_pos"($I11) + ($P10) = rx1048_cur."!cursor_start"() + $P10."!cursor_pass"(rx1048_pos, "") + rx1048_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1052_done - rxcap_1052_fail: - goto rx1047_fail - rxcap_1052_done: + goto rxcap_1053_done + rxcap_1053_fail: + goto rx1048_fail + rxcap_1053_done: # rx subrule "O" subtype=capture negate= - rx1047_cur."!cursor_pos"(rx1047_pos) - $P10 = rx1047_cur."O"("%symbolic_unary, :pirop") - unless $P10, rx1047_fail - rx1047_cur."!mark_push"(0, -1, 0, $P10) + rx1048_cur."!cursor_pos"(rx1048_pos) + $P10 = rx1048_cur."O"("%autoincrement") + unless $P10, rx1048_fail + rx1048_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1047_pos = $P10."pos"() + rx1048_pos = $P10."pos"() # rx pass - rx1047_cur."!cursor_pass"(rx1047_pos, "prefix:sym<~>") - if_null rx1047_debug, debug_857 - rx1047_cur."!cursor_debug"("PASS ", "prefix:sym<~>", " at pos=", rx1047_pos) + rx1048_cur."!cursor_pass"(rx1048_pos, "postfix:sym<++>") + if_null rx1048_debug, debug_855 + rx1048_cur."!cursor_debug"("PASS", "postfix:sym<++>", " at pos=", rx1048_pos) + debug_855: + .return (rx1048_cur) + rx1048_restart: +.annotate 'line', 454 + if_null rx1048_debug, debug_856 + rx1048_cur."!cursor_debug"("NEXT", "postfix:sym<++>") + debug_856: + rx1048_fail: + (rx1048_rep, rx1048_pos, $I10, $P10) = rx1048_cur."!mark_fail"(0) + lt rx1048_pos, -1, rx1048_done + eq rx1048_pos, -1, rx1048_fail + jump $I10 + rx1048_done: + rx1048_cur."!cursor_fail"() + if_null rx1048_debug, debug_857 + rx1048_cur."!cursor_debug"("FAIL", "postfix:sym<++>") 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: - rx1047_fail: - (rx1047_rep, rx1047_pos, $I10, $P10) = rx1047_cur."!mark_fail"(0) - lt rx1047_pos, -1, rx1047_done - eq rx1047_pos, -1, rx1047_fail - jump $I10 - rx1047_done: - rx1047_cur."!cursor_fail"() - if_null rx1047_debug, debug_859 - rx1047_cur."!cursor_debug"("FAIL ", "prefix:sym<~>") - debug_859: - .return (rx1047_cur) + .return (rx1048_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<~>" :subid("267_1282016529.10767") :method -.annotate 'line', 447 - $P1049 = self."!PREFIX__!subrule"("O", "~") - new $P1050, "ResizablePMCArray" - push $P1050, $P1049 - .return ($P1050) +.sub "!PREFIX__postfix:sym<++>" :subid("265_1284728478.15265") :method +.annotate 'line', 454 + $P1050 = self."!PREFIX__!subrule"("O", "++") + new $P1051, "ResizablePMCArray" + push $P1051, $P1050 + .return ($P1051) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym<->" :subid("268_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1054_tgt - .local int rx1054_pos - .local int rx1054_off - .local int rx1054_eos - .local int rx1054_rep - .local pmc rx1054_cur - .local pmc rx1054_debug - (rx1054_cur, rx1054_pos, rx1054_tgt, $I10) = self."!cursor_start"() - getattribute rx1054_debug, rx1054_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1054_cur - .local pmc match - .lex "$/", match - length rx1054_eos, rx1054_tgt - gt rx1054_pos, rx1054_eos, rx1054_done - set rx1054_off, 0 - lt rx1054_pos, 2, rx1054_start - sub rx1054_off, rx1054_pos, 1 - substr rx1054_tgt, rx1054_tgt, rx1054_off - rx1054_start: - eq $I10, 1, rx1054_restart - if_null rx1054_debug, debug_860 - rx1054_cur."!cursor_debug"("START ", "prefix:sym<->") - debug_860: +.sub "postfix:sym<-->" :subid("266_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1055_tgt + .local int rx1055_pos + .local int rx1055_off + .local int rx1055_eos + .local int rx1055_rep + .local pmc rx1055_cur + .local pmc rx1055_debug + (rx1055_cur, rx1055_pos, rx1055_tgt, $I10) = self."!cursor_start"() + getattribute rx1055_debug, rx1055_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1055_cur + .local pmc match + .lex "$/", match + length rx1055_eos, rx1055_tgt + gt rx1055_pos, rx1055_eos, rx1055_done + set rx1055_off, 0 + lt rx1055_pos, 2, rx1055_start + sub rx1055_off, rx1055_pos, 1 + substr rx1055_tgt, rx1055_tgt, rx1055_off + rx1055_start: + eq $I10, 1, rx1055_restart + if_null rx1055_debug, debug_858 + rx1055_cur."!cursor_debug"("START", "postfix:sym<-->") + debug_858: $I10 = self.'from'() - ne $I10, -1, rxscan1057_done - goto rxscan1057_scan - rxscan1057_loop: - ($P10) = rx1054_cur."from"() - inc $P10 - set rx1054_pos, $P10 - ge rx1054_pos, rx1054_eos, rxscan1057_done - rxscan1057_scan: - set_addr $I10, rxscan1057_loop - rx1054_cur."!mark_push"(0, rx1054_pos, $I10) - rxscan1057_done: -.annotate 'line', 502 + ne $I10, -1, rxscan1059_done + goto rxscan1059_scan + rxscan1059_loop: + ($P10) = rx1055_cur."from"() + inc $P10 + set rx1055_pos, $P10 + ge rx1055_pos, rx1055_eos, rxscan1059_done + rxscan1059_scan: + set_addr $I10, rxscan1059_loop + rx1055_cur."!mark_push"(0, rx1055_pos, $I10) + rxscan1059_done: +.annotate 'line', 503 # rx subcapture "sym" - set_addr $I10, rxcap_1058_fail - rx1054_cur."!mark_push"(0, rx1054_pos, $I10) - # rx literal "-" - add $I11, rx1054_pos, 1 - gt $I11, rx1054_eos, rx1054_fail - sub $I11, rx1054_pos, rx1054_off - ord $I11, rx1054_tgt, $I11 - ne $I11, 45, rx1054_fail - add rx1054_pos, 1 - set_addr $I10, rxcap_1058_fail - ($I12, $I11) = rx1054_cur."!mark_peek"($I10) - rx1054_cur."!cursor_pos"($I11) - ($P10) = rx1054_cur."!cursor_start"() - $P10."!cursor_pass"(rx1054_pos, "") - rx1054_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1060_fail + rx1055_cur."!mark_push"(0, rx1055_pos, $I10) + # rx literal "--" + add $I11, rx1055_pos, 2 + gt $I11, rx1055_eos, rx1055_fail + sub $I11, rx1055_pos, rx1055_off + substr $S10, rx1055_tgt, $I11, 2 + ne $S10, "--", rx1055_fail + add rx1055_pos, 2 + set_addr $I10, rxcap_1060_fail + ($I12, $I11) = rx1055_cur."!mark_peek"($I10) + rx1055_cur."!cursor_pos"($I11) + ($P10) = rx1055_cur."!cursor_start"() + $P10."!cursor_pass"(rx1055_pos, "") + rx1055_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1058_done - rxcap_1058_fail: - goto rx1054_fail - rxcap_1058_done: - # rx enumcharlist negate=1 zerowidth - ge rx1054_pos, rx1054_eos, rx1054_fail - sub $I10, rx1054_pos, rx1054_off - substr $S10, rx1054_tgt, $I10, 1 - index $I11, ">", $S10 - ge $I11, 0, rx1054_fail - # rx subrule "number" subtype=zerowidth negate=1 - rx1054_cur."!cursor_pos"(rx1054_pos) - $P10 = rx1054_cur."number"() - if $P10, rx1054_fail + goto rxcap_1060_done + rxcap_1060_fail: + goto rx1055_fail + rxcap_1060_done: # rx subrule "O" subtype=capture negate= - rx1054_cur."!cursor_pos"(rx1054_pos) - $P10 = rx1054_cur."O"("%symbolic_unary, :pirop") - unless $P10, rx1054_fail - rx1054_cur."!mark_push"(0, -1, 0, $P10) + rx1055_cur."!cursor_pos"(rx1055_pos) + $P10 = rx1055_cur."O"("%autoincrement") + unless $P10, rx1055_fail + rx1055_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1054_pos = $P10."pos"() + rx1055_pos = $P10."pos"() # rx pass - rx1054_cur."!cursor_pass"(rx1054_pos, "prefix:sym<->") - if_null rx1054_debug, debug_861 - rx1054_cur."!cursor_debug"("PASS ", "prefix:sym<->", " at pos=", rx1054_pos) + rx1055_cur."!cursor_pass"(rx1055_pos, "postfix:sym<-->") + if_null rx1055_debug, debug_859 + rx1055_cur."!cursor_debug"("PASS", "postfix:sym<-->", " at pos=", rx1055_pos) + debug_859: + .return (rx1055_cur) + rx1055_restart: +.annotate 'line', 454 + if_null rx1055_debug, debug_860 + rx1055_cur."!cursor_debug"("NEXT", "postfix:sym<-->") + debug_860: + rx1055_fail: + (rx1055_rep, rx1055_pos, $I10, $P10) = rx1055_cur."!mark_fail"(0) + lt rx1055_pos, -1, rx1055_done + eq rx1055_pos, -1, rx1055_fail + jump $I10 + rx1055_done: + rx1055_cur."!cursor_fail"() + if_null rx1055_debug, debug_861 + rx1055_cur."!cursor_debug"("FAIL", "postfix:sym<-->") 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: - rx1054_fail: - (rx1054_rep, rx1054_pos, $I10, $P10) = rx1054_cur."!mark_fail"(0) - lt rx1054_pos, -1, rx1054_done - eq rx1054_pos, -1, rx1054_fail - jump $I10 - rx1054_done: - rx1054_cur."!cursor_fail"() - if_null rx1054_debug, debug_863 - rx1054_cur."!cursor_debug"("FAIL ", "prefix:sym<->") - debug_863: - .return (rx1054_cur) + .return (rx1055_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<->" :subid("269_1282016529.10767") :method -.annotate 'line', 447 - new $P1056, "ResizablePMCArray" - push $P1056, "-" - .return ($P1056) +.sub "!PREFIX__postfix:sym<-->" :subid("267_1284728478.15265") :method +.annotate 'line', 454 + $P1057 = self."!PREFIX__!subrule"("O", "--") + new $P1058, "ResizablePMCArray" + push $P1058, $P1057 + .return ($P1058) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym" :subid("270_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1060_tgt - .local int rx1060_pos - .local int rx1060_off - .local int rx1060_eos - .local int rx1060_rep - .local pmc rx1060_cur - .local pmc rx1060_debug - (rx1060_cur, rx1060_pos, rx1060_tgt, $I10) = self."!cursor_start"() - getattribute rx1060_debug, rx1060_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1060_cur - .local pmc match - .lex "$/", match - length rx1060_eos, rx1060_tgt - gt rx1060_pos, rx1060_eos, rx1060_done - set rx1060_off, 0 - lt rx1060_pos, 2, rx1060_start - sub rx1060_off, rx1060_pos, 1 - substr rx1060_tgt, rx1060_tgt, rx1060_off - rx1060_start: - eq $I10, 1, rx1060_restart - if_null rx1060_debug, debug_864 - rx1060_cur."!cursor_debug"("START ", "prefix:sym") - debug_864: +.sub "infix:sym<**>" :subid("268_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1062_tgt + .local int rx1062_pos + .local int rx1062_off + .local int rx1062_eos + .local int rx1062_rep + .local pmc rx1062_cur + .local pmc rx1062_debug + (rx1062_cur, rx1062_pos, rx1062_tgt, $I10) = self."!cursor_start"() + getattribute rx1062_debug, rx1062_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1062_cur + .local pmc match + .lex "$/", match + length rx1062_eos, rx1062_tgt + gt rx1062_pos, rx1062_eos, rx1062_done + set rx1062_off, 0 + lt rx1062_pos, 2, rx1062_start + sub rx1062_off, rx1062_pos, 1 + substr rx1062_tgt, rx1062_tgt, rx1062_off + rx1062_start: + eq $I10, 1, rx1062_restart + if_null rx1062_debug, debug_862 + rx1062_cur."!cursor_debug"("START", "infix:sym<**>") + debug_862: $I10 = self.'from'() - ne $I10, -1, rxscan1064_done - goto rxscan1064_scan - rxscan1064_loop: - ($P10) = rx1060_cur."from"() - inc $P10 - set rx1060_pos, $P10 - ge rx1060_pos, rx1060_eos, rxscan1064_done - rxscan1064_scan: - set_addr $I10, rxscan1064_loop - rx1060_cur."!mark_push"(0, rx1060_pos, $I10) - rxscan1064_done: -.annotate 'line', 503 + ne $I10, -1, rxscan1066_done + goto rxscan1066_scan + rxscan1066_loop: + ($P10) = rx1062_cur."from"() + inc $P10 + set rx1062_pos, $P10 + ge rx1062_pos, rx1062_eos, rxscan1066_done + rxscan1066_scan: + set_addr $I10, rxscan1066_loop + rx1062_cur."!mark_push"(0, rx1062_pos, $I10) + rxscan1066_done: +.annotate 'line', 505 # rx subcapture "sym" - set_addr $I10, rxcap_1065_fail - rx1060_cur."!mark_push"(0, rx1060_pos, $I10) - # rx literal "?" - add $I11, rx1060_pos, 1 - gt $I11, rx1060_eos, rx1060_fail - sub $I11, rx1060_pos, rx1060_off - ord $I11, rx1060_tgt, $I11 - ne $I11, 63, rx1060_fail - add rx1060_pos, 1 - set_addr $I10, rxcap_1065_fail - ($I12, $I11) = rx1060_cur."!mark_peek"($I10) - rx1060_cur."!cursor_pos"($I11) - ($P10) = rx1060_cur."!cursor_start"() - $P10."!cursor_pass"(rx1060_pos, "") - rx1060_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1067_fail + rx1062_cur."!mark_push"(0, rx1062_pos, $I10) + # rx literal "**" + add $I11, rx1062_pos, 2 + gt $I11, rx1062_eos, rx1062_fail + sub $I11, rx1062_pos, rx1062_off + substr $S10, rx1062_tgt, $I11, 2 + ne $S10, "**", rx1062_fail + add rx1062_pos, 2 + set_addr $I10, rxcap_1067_fail + ($I12, $I11) = rx1062_cur."!mark_peek"($I10) + rx1062_cur."!cursor_pos"($I11) + ($P10) = rx1062_cur."!cursor_start"() + $P10."!cursor_pass"(rx1062_pos, "") + rx1062_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1065_done - rxcap_1065_fail: - goto rx1060_fail - rxcap_1065_done: + goto rxcap_1067_done + rxcap_1067_fail: + goto rx1062_fail + rxcap_1067_done: # rx subrule "O" subtype=capture negate= - rx1060_cur."!cursor_pos"(rx1060_pos) - $P10 = rx1060_cur."O"("%symbolic_unary, :pirop") - unless $P10, rx1060_fail - rx1060_cur."!mark_push"(0, -1, 0, $P10) + rx1062_cur."!cursor_pos"(rx1062_pos) + $P10 = rx1062_cur."O"("%exponentiation, :pirop") + unless $P10, rx1062_fail + rx1062_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1060_pos = $P10."pos"() + rx1062_pos = $P10."pos"() # rx pass - rx1060_cur."!cursor_pass"(rx1060_pos, "prefix:sym") - if_null rx1060_debug, debug_865 - rx1060_cur."!cursor_debug"("PASS ", "prefix:sym", " at pos=", rx1060_pos) + rx1062_cur."!cursor_pass"(rx1062_pos, "infix:sym<**>") + if_null rx1062_debug, debug_863 + rx1062_cur."!cursor_debug"("PASS", "infix:sym<**>", " at pos=", rx1062_pos) + debug_863: + .return (rx1062_cur) + rx1062_restart: +.annotate 'line', 454 + if_null rx1062_debug, debug_864 + rx1062_cur."!cursor_debug"("NEXT", "infix:sym<**>") + debug_864: + rx1062_fail: + (rx1062_rep, rx1062_pos, $I10, $P10) = rx1062_cur."!mark_fail"(0) + lt rx1062_pos, -1, rx1062_done + eq rx1062_pos, -1, rx1062_fail + jump $I10 + rx1062_done: + rx1062_cur."!cursor_fail"() + if_null rx1062_debug, debug_865 + rx1062_cur."!cursor_debug"("FAIL", "infix:sym<**>") 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: - rx1060_fail: - (rx1060_rep, rx1060_pos, $I10, $P10) = rx1060_cur."!mark_fail"(0) - lt rx1060_pos, -1, rx1060_done - eq rx1060_pos, -1, rx1060_fail - jump $I10 - rx1060_done: - rx1060_cur."!cursor_fail"() - if_null rx1060_debug, debug_867 - rx1060_cur."!cursor_debug"("FAIL ", "prefix:sym") - debug_867: - .return (rx1060_cur) + .return (rx1062_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym" :subid("271_1282016529.10767") :method -.annotate 'line', 447 - $P1062 = self."!PREFIX__!subrule"("O", "?") - new $P1063, "ResizablePMCArray" - push $P1063, $P1062 - .return ($P1063) +.sub "!PREFIX__infix:sym<**>" :subid("269_1284728478.15265") :method +.annotate 'line', 454 + $P1064 = self."!PREFIX__!subrule"("O", "**") + new $P1065, "ResizablePMCArray" + push $P1065, $P1064 + .return ($P1065) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym" :subid("272_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1067_tgt - .local int rx1067_pos - .local int rx1067_off - .local int rx1067_eos - .local int rx1067_rep - .local pmc rx1067_cur - .local pmc rx1067_debug - (rx1067_cur, rx1067_pos, rx1067_tgt, $I10) = self."!cursor_start"() - getattribute rx1067_debug, rx1067_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1067_cur - .local pmc match - .lex "$/", match - length rx1067_eos, rx1067_tgt - gt rx1067_pos, rx1067_eos, rx1067_done - set rx1067_off, 0 - lt rx1067_pos, 2, rx1067_start - sub rx1067_off, rx1067_pos, 1 - substr rx1067_tgt, rx1067_tgt, rx1067_off - rx1067_start: - eq $I10, 1, rx1067_restart - if_null rx1067_debug, debug_868 - rx1067_cur."!cursor_debug"("START ", "prefix:sym") - debug_868: +.sub "prefix:sym<+>" :subid("270_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1069_tgt + .local int rx1069_pos + .local int rx1069_off + .local int rx1069_eos + .local int rx1069_rep + .local pmc rx1069_cur + .local pmc rx1069_debug + (rx1069_cur, rx1069_pos, rx1069_tgt, $I10) = self."!cursor_start"() + getattribute rx1069_debug, rx1069_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1069_cur + .local pmc match + .lex "$/", match + length rx1069_eos, rx1069_tgt + gt rx1069_pos, rx1069_eos, rx1069_done + set rx1069_off, 0 + lt rx1069_pos, 2, rx1069_start + sub rx1069_off, rx1069_pos, 1 + substr rx1069_tgt, rx1069_tgt, rx1069_off + rx1069_start: + eq $I10, 1, rx1069_restart + if_null rx1069_debug, debug_866 + rx1069_cur."!cursor_debug"("START", "prefix:sym<+>") + debug_866: $I10 = self.'from'() - ne $I10, -1, rxscan1071_done - goto rxscan1071_scan - rxscan1071_loop: - ($P10) = rx1067_cur."from"() - inc $P10 - set rx1067_pos, $P10 - ge rx1067_pos, rx1067_eos, rxscan1071_done - rxscan1071_scan: - set_addr $I10, rxscan1071_loop - rx1067_cur."!mark_push"(0, rx1067_pos, $I10) - rxscan1071_done: -.annotate 'line', 504 + ne $I10, -1, rxscan1073_done + goto rxscan1073_scan + rxscan1073_loop: + ($P10) = rx1069_cur."from"() + inc $P10 + set rx1069_pos, $P10 + ge rx1069_pos, rx1069_eos, rxscan1073_done + rxscan1073_scan: + set_addr $I10, rxscan1073_loop + rx1069_cur."!mark_push"(0, rx1069_pos, $I10) + rxscan1073_done: +.annotate 'line', 507 # rx subcapture "sym" - set_addr $I10, rxcap_1072_fail - rx1067_cur."!mark_push"(0, rx1067_pos, $I10) - # rx literal "!" - add $I11, rx1067_pos, 1 - gt $I11, rx1067_eos, rx1067_fail - sub $I11, rx1067_pos, rx1067_off - ord $I11, rx1067_tgt, $I11 - ne $I11, 33, rx1067_fail - add rx1067_pos, 1 - set_addr $I10, rxcap_1072_fail - ($I12, $I11) = rx1067_cur."!mark_peek"($I10) - rx1067_cur."!cursor_pos"($I11) - ($P10) = rx1067_cur."!cursor_start"() - $P10."!cursor_pass"(rx1067_pos, "") - rx1067_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1074_fail + rx1069_cur."!mark_push"(0, rx1069_pos, $I10) + # rx literal "+" + add $I11, rx1069_pos, 1 + gt $I11, rx1069_eos, rx1069_fail + sub $I11, rx1069_pos, rx1069_off + ord $I11, rx1069_tgt, $I11 + ne $I11, 43, rx1069_fail + add rx1069_pos, 1 + set_addr $I10, rxcap_1074_fail + ($I12, $I11) = rx1069_cur."!mark_peek"($I10) + rx1069_cur."!cursor_pos"($I11) + ($P10) = rx1069_cur."!cursor_start"() + $P10."!cursor_pass"(rx1069_pos, "") + rx1069_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1072_done - rxcap_1072_fail: - goto rx1067_fail - rxcap_1072_done: + goto rxcap_1074_done + rxcap_1074_fail: + goto rx1069_fail + rxcap_1074_done: # rx subrule "O" subtype=capture negate= - rx1067_cur."!cursor_pos"(rx1067_pos) - $P10 = rx1067_cur."O"("%symbolic_unary, :pirop") - unless $P10, rx1067_fail - rx1067_cur."!mark_push"(0, -1, 0, $P10) + rx1069_cur."!cursor_pos"(rx1069_pos) + $P10 = rx1069_cur."O"("%symbolic_unary, :pirop") + unless $P10, rx1069_fail + rx1069_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1067_pos = $P10."pos"() + rx1069_pos = $P10."pos"() # rx pass - rx1067_cur."!cursor_pass"(rx1067_pos, "prefix:sym") - if_null rx1067_debug, debug_869 - rx1067_cur."!cursor_debug"("PASS ", "prefix:sym", " at pos=", rx1067_pos) + rx1069_cur."!cursor_pass"(rx1069_pos, "prefix:sym<+>") + if_null rx1069_debug, debug_867 + rx1069_cur."!cursor_debug"("PASS", "prefix:sym<+>", " at pos=", rx1069_pos) + debug_867: + .return (rx1069_cur) + rx1069_restart: +.annotate 'line', 454 + if_null rx1069_debug, debug_868 + rx1069_cur."!cursor_debug"("NEXT", "prefix:sym<+>") + debug_868: + rx1069_fail: + (rx1069_rep, rx1069_pos, $I10, $P10) = rx1069_cur."!mark_fail"(0) + lt rx1069_pos, -1, rx1069_done + eq rx1069_pos, -1, rx1069_fail + jump $I10 + rx1069_done: + rx1069_cur."!cursor_fail"() + if_null rx1069_debug, debug_869 + rx1069_cur."!cursor_debug"("FAIL", "prefix:sym<+>") 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: - rx1067_fail: - (rx1067_rep, rx1067_pos, $I10, $P10) = rx1067_cur."!mark_fail"(0) - lt rx1067_pos, -1, rx1067_done - eq rx1067_pos, -1, rx1067_fail - jump $I10 - rx1067_done: - rx1067_cur."!cursor_fail"() - if_null rx1067_debug, debug_871 - rx1067_cur."!cursor_debug"("FAIL ", "prefix:sym") - debug_871: - .return (rx1067_cur) + .return (rx1069_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym" :subid("273_1282016529.10767") :method -.annotate 'line', 447 - $P1069 = self."!PREFIX__!subrule"("O", "!") - new $P1070, "ResizablePMCArray" - push $P1070, $P1069 - .return ($P1070) +.sub "!PREFIX__prefix:sym<+>" :subid("271_1284728478.15265") :method +.annotate 'line', 454 + $P1071 = self."!PREFIX__!subrule"("O", "+") + new $P1072, "ResizablePMCArray" + push $P1072, $P1071 + .return ($P1072) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym<|>" :subid("274_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1074_tgt - .local int rx1074_pos - .local int rx1074_off - .local int rx1074_eos - .local int rx1074_rep - .local pmc rx1074_cur - .local pmc rx1074_debug - (rx1074_cur, rx1074_pos, rx1074_tgt, $I10) = self."!cursor_start"() - getattribute rx1074_debug, rx1074_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1074_cur - .local pmc match - .lex "$/", match - length rx1074_eos, rx1074_tgt - gt rx1074_pos, rx1074_eos, rx1074_done - set rx1074_off, 0 - lt rx1074_pos, 2, rx1074_start - sub rx1074_off, rx1074_pos, 1 - substr rx1074_tgt, rx1074_tgt, rx1074_off - rx1074_start: - eq $I10, 1, rx1074_restart - if_null rx1074_debug, debug_872 - rx1074_cur."!cursor_debug"("START ", "prefix:sym<|>") - debug_872: +.sub "prefix:sym<~>" :subid("272_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1076_tgt + .local int rx1076_pos + .local int rx1076_off + .local int rx1076_eos + .local int rx1076_rep + .local pmc rx1076_cur + .local pmc rx1076_debug + (rx1076_cur, rx1076_pos, rx1076_tgt, $I10) = self."!cursor_start"() + getattribute rx1076_debug, rx1076_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1076_cur + .local pmc match + .lex "$/", match + length rx1076_eos, rx1076_tgt + gt rx1076_pos, rx1076_eos, rx1076_done + set rx1076_off, 0 + lt rx1076_pos, 2, rx1076_start + sub rx1076_off, rx1076_pos, 1 + substr rx1076_tgt, rx1076_tgt, rx1076_off + rx1076_start: + eq $I10, 1, rx1076_restart + if_null rx1076_debug, debug_870 + rx1076_cur."!cursor_debug"("START", "prefix:sym<~>") + debug_870: $I10 = self.'from'() - ne $I10, -1, rxscan1078_done - goto rxscan1078_scan - rxscan1078_loop: - ($P10) = rx1074_cur."from"() - inc $P10 - set rx1074_pos, $P10 - ge rx1074_pos, rx1074_eos, rxscan1078_done - rxscan1078_scan: - set_addr $I10, rxscan1078_loop - rx1074_cur."!mark_push"(0, rx1074_pos, $I10) - rxscan1078_done: -.annotate 'line', 505 + ne $I10, -1, rxscan1080_done + goto rxscan1080_scan + rxscan1080_loop: + ($P10) = rx1076_cur."from"() + inc $P10 + set rx1076_pos, $P10 + ge rx1076_pos, rx1076_eos, rxscan1080_done + rxscan1080_scan: + set_addr $I10, rxscan1080_loop + rx1076_cur."!mark_push"(0, rx1076_pos, $I10) + rxscan1080_done: +.annotate 'line', 508 # rx subcapture "sym" - set_addr $I10, rxcap_1079_fail - rx1074_cur."!mark_push"(0, rx1074_pos, $I10) - # rx literal "|" - add $I11, rx1074_pos, 1 - gt $I11, rx1074_eos, rx1074_fail - sub $I11, rx1074_pos, rx1074_off - ord $I11, rx1074_tgt, $I11 - ne $I11, 124, rx1074_fail - add rx1074_pos, 1 - set_addr $I10, rxcap_1079_fail - ($I12, $I11) = rx1074_cur."!mark_peek"($I10) - rx1074_cur."!cursor_pos"($I11) - ($P10) = rx1074_cur."!cursor_start"() - $P10."!cursor_pass"(rx1074_pos, "") - rx1074_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1081_fail + rx1076_cur."!mark_push"(0, rx1076_pos, $I10) + # rx literal "~" + add $I11, rx1076_pos, 1 + gt $I11, rx1076_eos, rx1076_fail + sub $I11, rx1076_pos, rx1076_off + ord $I11, rx1076_tgt, $I11 + ne $I11, 126, rx1076_fail + add rx1076_pos, 1 + set_addr $I10, rxcap_1081_fail + ($I12, $I11) = rx1076_cur."!mark_peek"($I10) + rx1076_cur."!cursor_pos"($I11) + ($P10) = rx1076_cur."!cursor_start"() + $P10."!cursor_pass"(rx1076_pos, "") + rx1076_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1079_done - rxcap_1079_fail: - goto rx1074_fail - rxcap_1079_done: + goto rxcap_1081_done + rxcap_1081_fail: + goto rx1076_fail + rxcap_1081_done: # rx subrule "O" subtype=capture negate= - rx1074_cur."!cursor_pos"(rx1074_pos) - $P10 = rx1074_cur."O"("%symbolic_unary") - unless $P10, rx1074_fail - rx1074_cur."!mark_push"(0, -1, 0, $P10) + rx1076_cur."!cursor_pos"(rx1076_pos) + $P10 = rx1076_cur."O"("%symbolic_unary, :pirop") + unless $P10, rx1076_fail + rx1076_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1074_pos = $P10."pos"() + rx1076_pos = $P10."pos"() # rx pass - rx1074_cur."!cursor_pass"(rx1074_pos, "prefix:sym<|>") - if_null rx1074_debug, debug_873 - rx1074_cur."!cursor_debug"("PASS ", "prefix:sym<|>", " at pos=", rx1074_pos) + rx1076_cur."!cursor_pass"(rx1076_pos, "prefix:sym<~>") + if_null rx1076_debug, debug_871 + rx1076_cur."!cursor_debug"("PASS", "prefix:sym<~>", " at pos=", rx1076_pos) + debug_871: + .return (rx1076_cur) + rx1076_restart: +.annotate 'line', 454 + if_null rx1076_debug, debug_872 + rx1076_cur."!cursor_debug"("NEXT", "prefix:sym<~>") + debug_872: + rx1076_fail: + (rx1076_rep, rx1076_pos, $I10, $P10) = rx1076_cur."!mark_fail"(0) + lt rx1076_pos, -1, rx1076_done + eq rx1076_pos, -1, rx1076_fail + jump $I10 + rx1076_done: + rx1076_cur."!cursor_fail"() + if_null rx1076_debug, debug_873 + rx1076_cur."!cursor_debug"("FAIL", "prefix:sym<~>") 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: - rx1074_fail: - (rx1074_rep, rx1074_pos, $I10, $P10) = rx1074_cur."!mark_fail"(0) - lt rx1074_pos, -1, rx1074_done - eq rx1074_pos, -1, rx1074_fail - jump $I10 - rx1074_done: - rx1074_cur."!cursor_fail"() - if_null rx1074_debug, debug_875 - rx1074_cur."!cursor_debug"("FAIL ", "prefix:sym<|>") - debug_875: - .return (rx1074_cur) + .return (rx1076_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym<|>" :subid("275_1282016529.10767") :method -.annotate 'line', 447 - $P1076 = self."!PREFIX__!subrule"("O", "|") - new $P1077, "ResizablePMCArray" - push $P1077, $P1076 - .return ($P1077) +.sub "!PREFIX__prefix:sym<~>" :subid("273_1284728478.15265") :method +.annotate 'line', 454 + $P1078 = self."!PREFIX__!subrule"("O", "~") + new $P1079, "ResizablePMCArray" + push $P1079, $P1078 + .return ($P1079) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<*>" :subid("276_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1081_tgt - .local int rx1081_pos - .local int rx1081_off - .local int rx1081_eos - .local int rx1081_rep - .local pmc rx1081_cur - .local pmc rx1081_debug - (rx1081_cur, rx1081_pos, rx1081_tgt, $I10) = self."!cursor_start"() - getattribute rx1081_debug, rx1081_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1081_cur - .local pmc match - .lex "$/", match - length rx1081_eos, rx1081_tgt - gt rx1081_pos, rx1081_eos, rx1081_done - set rx1081_off, 0 - lt rx1081_pos, 2, rx1081_start - sub rx1081_off, rx1081_pos, 1 - substr rx1081_tgt, rx1081_tgt, rx1081_off - rx1081_start: - eq $I10, 1, rx1081_restart - if_null rx1081_debug, debug_876 - rx1081_cur."!cursor_debug"("START ", "infix:sym<*>") - debug_876: +.sub "prefix:sym<->" :subid("274_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1083_tgt + .local int rx1083_pos + .local int rx1083_off + .local int rx1083_eos + .local int rx1083_rep + .local pmc rx1083_cur + .local pmc rx1083_debug + (rx1083_cur, rx1083_pos, rx1083_tgt, $I10) = self."!cursor_start"() + getattribute rx1083_debug, rx1083_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1083_cur + .local pmc match + .lex "$/", match + length rx1083_eos, rx1083_tgt + gt rx1083_pos, rx1083_eos, rx1083_done + set rx1083_off, 0 + lt rx1083_pos, 2, rx1083_start + sub rx1083_off, rx1083_pos, 1 + substr rx1083_tgt, rx1083_tgt, rx1083_off + rx1083_start: + eq $I10, 1, rx1083_restart + if_null rx1083_debug, debug_874 + rx1083_cur."!cursor_debug"("START", "prefix:sym<->") + debug_874: $I10 = self.'from'() - ne $I10, -1, rxscan1085_done - goto rxscan1085_scan - rxscan1085_loop: - ($P10) = rx1081_cur."from"() - inc $P10 - set rx1081_pos, $P10 - ge rx1081_pos, rx1081_eos, rxscan1085_done - rxscan1085_scan: - set_addr $I10, rxscan1085_loop - rx1081_cur."!mark_push"(0, rx1081_pos, $I10) - rxscan1085_done: -.annotate 'line', 507 + ne $I10, -1, rxscan1086_done + goto rxscan1086_scan + rxscan1086_loop: + ($P10) = rx1083_cur."from"() + inc $P10 + set rx1083_pos, $P10 + ge rx1083_pos, rx1083_eos, rxscan1086_done + rxscan1086_scan: + set_addr $I10, rxscan1086_loop + rx1083_cur."!mark_push"(0, rx1083_pos, $I10) + rxscan1086_done: +.annotate 'line', 509 # rx subcapture "sym" - set_addr $I10, rxcap_1086_fail - rx1081_cur."!mark_push"(0, rx1081_pos, $I10) - # rx literal "*" - add $I11, rx1081_pos, 1 - gt $I11, rx1081_eos, rx1081_fail - sub $I11, rx1081_pos, rx1081_off - ord $I11, rx1081_tgt, $I11 - ne $I11, 42, rx1081_fail - add rx1081_pos, 1 - set_addr $I10, rxcap_1086_fail - ($I12, $I11) = rx1081_cur."!mark_peek"($I10) - rx1081_cur."!cursor_pos"($I11) - ($P10) = rx1081_cur."!cursor_start"() - $P10."!cursor_pass"(rx1081_pos, "") - rx1081_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1087_fail + rx1083_cur."!mark_push"(0, rx1083_pos, $I10) + # rx literal "-" + add $I11, rx1083_pos, 1 + gt $I11, rx1083_eos, rx1083_fail + sub $I11, rx1083_pos, rx1083_off + ord $I11, rx1083_tgt, $I11 + ne $I11, 45, rx1083_fail + add rx1083_pos, 1 + set_addr $I10, rxcap_1087_fail + ($I12, $I11) = rx1083_cur."!mark_peek"($I10) + rx1083_cur."!cursor_pos"($I11) + ($P10) = rx1083_cur."!cursor_start"() + $P10."!cursor_pass"(rx1083_pos, "") + rx1083_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1086_done - rxcap_1086_fail: - goto rx1081_fail - rxcap_1086_done: + goto rxcap_1087_done + rxcap_1087_fail: + goto rx1083_fail + rxcap_1087_done: + # rx enumcharlist negate=1 zerowidth + sub $I10, rx1083_pos, rx1083_off + substr $S10, rx1083_tgt, $I10, 1 + index $I11, ">", $S10 + ge $I11, 0, rx1083_fail + # rx subrule "number" subtype=zerowidth negate=1 + rx1083_cur."!cursor_pos"(rx1083_pos) + $P10 = rx1083_cur."number"() + if $P10, rx1083_fail # rx subrule "O" subtype=capture negate= - rx1081_cur."!cursor_pos"(rx1081_pos) - $P10 = rx1081_cur."O"("%multiplicative, :pirop") - unless $P10, rx1081_fail - rx1081_cur."!mark_push"(0, -1, 0, $P10) + rx1083_cur."!cursor_pos"(rx1083_pos) + $P10 = rx1083_cur."O"("%symbolic_unary, :pirop") + unless $P10, rx1083_fail + rx1083_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1081_pos = $P10."pos"() + rx1083_pos = $P10."pos"() # rx pass - rx1081_cur."!cursor_pass"(rx1081_pos, "infix:sym<*>") - if_null rx1081_debug, debug_877 - rx1081_cur."!cursor_debug"("PASS ", "infix:sym<*>", " at pos=", rx1081_pos) + rx1083_cur."!cursor_pass"(rx1083_pos, "prefix:sym<->") + if_null rx1083_debug, debug_875 + rx1083_cur."!cursor_debug"("PASS", "prefix:sym<->", " at pos=", rx1083_pos) + debug_875: + .return (rx1083_cur) + rx1083_restart: +.annotate 'line', 454 + if_null rx1083_debug, debug_876 + rx1083_cur."!cursor_debug"("NEXT", "prefix:sym<->") + debug_876: + rx1083_fail: + (rx1083_rep, rx1083_pos, $I10, $P10) = rx1083_cur."!mark_fail"(0) + lt rx1083_pos, -1, rx1083_done + eq rx1083_pos, -1, rx1083_fail + jump $I10 + rx1083_done: + rx1083_cur."!cursor_fail"() + if_null rx1083_debug, debug_877 + rx1083_cur."!cursor_debug"("FAIL", "prefix:sym<->") 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: - rx1081_fail: - (rx1081_rep, rx1081_pos, $I10, $P10) = rx1081_cur."!mark_fail"(0) - lt rx1081_pos, -1, rx1081_done - eq rx1081_pos, -1, rx1081_fail - jump $I10 - rx1081_done: - rx1081_cur."!cursor_fail"() - if_null rx1081_debug, debug_879 - rx1081_cur."!cursor_debug"("FAIL ", "infix:sym<*>") - debug_879: - .return (rx1081_cur) + .return (rx1083_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<*>" :subid("277_1282016529.10767") :method -.annotate 'line', 447 - $P1083 = self."!PREFIX__!subrule"("O", "*") - new $P1084, "ResizablePMCArray" - push $P1084, $P1083 - .return ($P1084) +.sub "!PREFIX__prefix:sym<->" :subid("275_1284728478.15265") :method +.annotate 'line', 454 + new $P1085, "ResizablePMCArray" + push $P1085, "-" + .return ($P1085) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("278_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1088_tgt - .local int rx1088_pos - .local int rx1088_off - .local int rx1088_eos - .local int rx1088_rep - .local pmc rx1088_cur - .local pmc rx1088_debug - (rx1088_cur, rx1088_pos, rx1088_tgt, $I10) = self."!cursor_start"() - getattribute rx1088_debug, rx1088_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1088_cur - .local pmc match - .lex "$/", match - length rx1088_eos, rx1088_tgt - gt rx1088_pos, rx1088_eos, rx1088_done - set rx1088_off, 0 - lt rx1088_pos, 2, rx1088_start - sub rx1088_off, rx1088_pos, 1 - substr rx1088_tgt, rx1088_tgt, rx1088_off - rx1088_start: - eq $I10, 1, rx1088_restart - if_null rx1088_debug, debug_880 - rx1088_cur."!cursor_debug"("START ", "infix:sym") - debug_880: +.sub "prefix:sym" :subid("276_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1089_tgt + .local int rx1089_pos + .local int rx1089_off + .local int rx1089_eos + .local int rx1089_rep + .local pmc rx1089_cur + .local pmc rx1089_debug + (rx1089_cur, rx1089_pos, rx1089_tgt, $I10) = self."!cursor_start"() + getattribute rx1089_debug, rx1089_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1089_cur + .local pmc match + .lex "$/", match + length rx1089_eos, rx1089_tgt + gt rx1089_pos, rx1089_eos, rx1089_done + set rx1089_off, 0 + lt rx1089_pos, 2, rx1089_start + sub rx1089_off, rx1089_pos, 1 + substr rx1089_tgt, rx1089_tgt, rx1089_off + rx1089_start: + eq $I10, 1, rx1089_restart + if_null rx1089_debug, debug_878 + rx1089_cur."!cursor_debug"("START", "prefix:sym") + debug_878: $I10 = self.'from'() - ne $I10, -1, rxscan1092_done - goto rxscan1092_scan - rxscan1092_loop: - ($P10) = rx1088_cur."from"() - inc $P10 - set rx1088_pos, $P10 - ge rx1088_pos, rx1088_eos, rxscan1092_done - rxscan1092_scan: - set_addr $I10, rxscan1092_loop - rx1088_cur."!mark_push"(0, rx1088_pos, $I10) - rxscan1092_done: -.annotate 'line', 508 + ne $I10, -1, rxscan1093_done + goto rxscan1093_scan + rxscan1093_loop: + ($P10) = rx1089_cur."from"() + inc $P10 + set rx1089_pos, $P10 + ge rx1089_pos, rx1089_eos, rxscan1093_done + rxscan1093_scan: + set_addr $I10, rxscan1093_loop + rx1089_cur."!mark_push"(0, rx1089_pos, $I10) + rxscan1093_done: +.annotate 'line', 510 # rx subcapture "sym" - set_addr $I10, rxcap_1093_fail - rx1088_cur."!mark_push"(0, rx1088_pos, $I10) - # rx literal "/" - add $I11, rx1088_pos, 1 - gt $I11, rx1088_eos, rx1088_fail - sub $I11, rx1088_pos, rx1088_off - ord $I11, rx1088_tgt, $I11 - ne $I11, 47, rx1088_fail - add rx1088_pos, 1 - set_addr $I10, rxcap_1093_fail - ($I12, $I11) = rx1088_cur."!mark_peek"($I10) - rx1088_cur."!cursor_pos"($I11) - ($P10) = rx1088_cur."!cursor_start"() - $P10."!cursor_pass"(rx1088_pos, "") - rx1088_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1094_fail + rx1089_cur."!mark_push"(0, rx1089_pos, $I10) + # rx literal "?" + add $I11, rx1089_pos, 1 + gt $I11, rx1089_eos, rx1089_fail + sub $I11, rx1089_pos, rx1089_off + ord $I11, rx1089_tgt, $I11 + ne $I11, 63, rx1089_fail + add rx1089_pos, 1 + set_addr $I10, rxcap_1094_fail + ($I12, $I11) = rx1089_cur."!mark_peek"($I10) + rx1089_cur."!cursor_pos"($I11) + ($P10) = rx1089_cur."!cursor_start"() + $P10."!cursor_pass"(rx1089_pos, "") + rx1089_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1093_done - rxcap_1093_fail: - goto rx1088_fail - rxcap_1093_done: + goto rxcap_1094_done + rxcap_1094_fail: + goto rx1089_fail + rxcap_1094_done: # rx subrule "O" subtype=capture negate= - rx1088_cur."!cursor_pos"(rx1088_pos) - $P10 = rx1088_cur."O"("%multiplicative, :pirop
") - unless $P10, rx1088_fail - rx1088_cur."!mark_push"(0, -1, 0, $P10) + rx1089_cur."!cursor_pos"(rx1089_pos) + $P10 = rx1089_cur."O"("%symbolic_unary, :pirop") + unless $P10, rx1089_fail + rx1089_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1088_pos = $P10."pos"() + rx1089_pos = $P10."pos"() # rx pass - rx1088_cur."!cursor_pass"(rx1088_pos, "infix:sym") - if_null rx1088_debug, debug_881 - rx1088_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1088_pos) + rx1089_cur."!cursor_pass"(rx1089_pos, "prefix:sym") + if_null rx1089_debug, debug_879 + rx1089_cur."!cursor_debug"("PASS", "prefix:sym", " at pos=", rx1089_pos) + debug_879: + .return (rx1089_cur) + rx1089_restart: +.annotate 'line', 454 + if_null rx1089_debug, debug_880 + rx1089_cur."!cursor_debug"("NEXT", "prefix:sym") + debug_880: + rx1089_fail: + (rx1089_rep, rx1089_pos, $I10, $P10) = rx1089_cur."!mark_fail"(0) + lt rx1089_pos, -1, rx1089_done + eq rx1089_pos, -1, rx1089_fail + jump $I10 + rx1089_done: + rx1089_cur."!cursor_fail"() + if_null rx1089_debug, debug_881 + rx1089_cur."!cursor_debug"("FAIL", "prefix:sym") 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: - rx1088_fail: - (rx1088_rep, rx1088_pos, $I10, $P10) = rx1088_cur."!mark_fail"(0) - lt rx1088_pos, -1, rx1088_done - eq rx1088_pos, -1, rx1088_fail - jump $I10 - rx1088_done: - rx1088_cur."!cursor_fail"() - if_null rx1088_debug, debug_883 - rx1088_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_883: - .return (rx1088_cur) + .return (rx1089_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("279_1282016529.10767") :method -.annotate 'line', 447 - $P1090 = self."!PREFIX__!subrule"("O", "/") - new $P1091, "ResizablePMCArray" - push $P1091, $P1090 - .return ($P1091) +.sub "!PREFIX__prefix:sym" :subid("277_1284728478.15265") :method +.annotate 'line', 454 + $P1091 = self."!PREFIX__!subrule"("O", "?") + new $P1092, "ResizablePMCArray" + push $P1092, $P1091 + .return ($P1092) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<%>" :subid("280_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1095_tgt - .local int rx1095_pos - .local int rx1095_off - .local int rx1095_eos - .local int rx1095_rep - .local pmc rx1095_cur - .local pmc rx1095_debug - (rx1095_cur, rx1095_pos, rx1095_tgt, $I10) = self."!cursor_start"() - getattribute rx1095_debug, rx1095_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1095_cur - .local pmc match - .lex "$/", match - length rx1095_eos, rx1095_tgt - gt rx1095_pos, rx1095_eos, rx1095_done - set rx1095_off, 0 - lt rx1095_pos, 2, rx1095_start - sub rx1095_off, rx1095_pos, 1 - substr rx1095_tgt, rx1095_tgt, rx1095_off - rx1095_start: - eq $I10, 1, rx1095_restart - if_null rx1095_debug, debug_884 - rx1095_cur."!cursor_debug"("START ", "infix:sym<%>") - debug_884: +.sub "prefix:sym" :subid("278_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1096_tgt + .local int rx1096_pos + .local int rx1096_off + .local int rx1096_eos + .local int rx1096_rep + .local pmc rx1096_cur + .local pmc rx1096_debug + (rx1096_cur, rx1096_pos, rx1096_tgt, $I10) = self."!cursor_start"() + getattribute rx1096_debug, rx1096_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1096_cur + .local pmc match + .lex "$/", match + length rx1096_eos, rx1096_tgt + gt rx1096_pos, rx1096_eos, rx1096_done + set rx1096_off, 0 + lt rx1096_pos, 2, rx1096_start + sub rx1096_off, rx1096_pos, 1 + substr rx1096_tgt, rx1096_tgt, rx1096_off + rx1096_start: + eq $I10, 1, rx1096_restart + if_null rx1096_debug, debug_882 + rx1096_cur."!cursor_debug"("START", "prefix:sym") + debug_882: $I10 = self.'from'() - ne $I10, -1, rxscan1099_done - goto rxscan1099_scan - rxscan1099_loop: - ($P10) = rx1095_cur."from"() - inc $P10 - set rx1095_pos, $P10 - ge rx1095_pos, rx1095_eos, rxscan1099_done - rxscan1099_scan: - set_addr $I10, rxscan1099_loop - rx1095_cur."!mark_push"(0, rx1095_pos, $I10) - rxscan1099_done: -.annotate 'line', 509 + ne $I10, -1, rxscan1100_done + goto rxscan1100_scan + rxscan1100_loop: + ($P10) = rx1096_cur."from"() + inc $P10 + set rx1096_pos, $P10 + ge rx1096_pos, rx1096_eos, rxscan1100_done + rxscan1100_scan: + set_addr $I10, rxscan1100_loop + rx1096_cur."!mark_push"(0, rx1096_pos, $I10) + rxscan1100_done: +.annotate 'line', 511 # rx subcapture "sym" - set_addr $I10, rxcap_1100_fail - rx1095_cur."!mark_push"(0, rx1095_pos, $I10) - # rx literal "%" - add $I11, rx1095_pos, 1 - gt $I11, rx1095_eos, rx1095_fail - sub $I11, rx1095_pos, rx1095_off - ord $I11, rx1095_tgt, $I11 - ne $I11, 37, rx1095_fail - add rx1095_pos, 1 - set_addr $I10, rxcap_1100_fail - ($I12, $I11) = rx1095_cur."!mark_peek"($I10) - rx1095_cur."!cursor_pos"($I11) - ($P10) = rx1095_cur."!cursor_start"() - $P10."!cursor_pass"(rx1095_pos, "") - rx1095_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1101_fail + rx1096_cur."!mark_push"(0, rx1096_pos, $I10) + # rx literal "!" + add $I11, rx1096_pos, 1 + gt $I11, rx1096_eos, rx1096_fail + sub $I11, rx1096_pos, rx1096_off + ord $I11, rx1096_tgt, $I11 + ne $I11, 33, rx1096_fail + add rx1096_pos, 1 + set_addr $I10, rxcap_1101_fail + ($I12, $I11) = rx1096_cur."!mark_peek"($I10) + rx1096_cur."!cursor_pos"($I11) + ($P10) = rx1096_cur."!cursor_start"() + $P10."!cursor_pass"(rx1096_pos, "") + rx1096_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1100_done - rxcap_1100_fail: - goto rx1095_fail - rxcap_1100_done: + goto rxcap_1101_done + rxcap_1101_fail: + goto rx1096_fail + rxcap_1101_done: # rx subrule "O" subtype=capture negate= - rx1095_cur."!cursor_pos"(rx1095_pos) - $P10 = rx1095_cur."O"("%multiplicative, :pirop") - unless $P10, rx1095_fail - rx1095_cur."!mark_push"(0, -1, 0, $P10) + rx1096_cur."!cursor_pos"(rx1096_pos) + $P10 = rx1096_cur."O"("%symbolic_unary, :pirop") + unless $P10, rx1096_fail + rx1096_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1095_pos = $P10."pos"() + rx1096_pos = $P10."pos"() # rx pass - rx1095_cur."!cursor_pass"(rx1095_pos, "infix:sym<%>") - if_null rx1095_debug, debug_885 - rx1095_cur."!cursor_debug"("PASS ", "infix:sym<%>", " at pos=", rx1095_pos) + rx1096_cur."!cursor_pass"(rx1096_pos, "prefix:sym") + if_null rx1096_debug, debug_883 + rx1096_cur."!cursor_debug"("PASS", "prefix:sym", " at pos=", rx1096_pos) + debug_883: + .return (rx1096_cur) + rx1096_restart: +.annotate 'line', 454 + if_null rx1096_debug, debug_884 + rx1096_cur."!cursor_debug"("NEXT", "prefix:sym") + debug_884: + rx1096_fail: + (rx1096_rep, rx1096_pos, $I10, $P10) = rx1096_cur."!mark_fail"(0) + lt rx1096_pos, -1, rx1096_done + eq rx1096_pos, -1, rx1096_fail + jump $I10 + rx1096_done: + rx1096_cur."!cursor_fail"() + if_null rx1096_debug, debug_885 + rx1096_cur."!cursor_debug"("FAIL", "prefix:sym") 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: - rx1095_fail: - (rx1095_rep, rx1095_pos, $I10, $P10) = rx1095_cur."!mark_fail"(0) - lt rx1095_pos, -1, rx1095_done - eq rx1095_pos, -1, rx1095_fail - jump $I10 - rx1095_done: - rx1095_cur."!cursor_fail"() - if_null rx1095_debug, debug_887 - rx1095_cur."!cursor_debug"("FAIL ", "infix:sym<%>") - debug_887: - .return (rx1095_cur) + .return (rx1096_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<%>" :subid("281_1282016529.10767") :method -.annotate 'line', 447 - $P1097 = self."!PREFIX__!subrule"("O", "%") - new $P1098, "ResizablePMCArray" - push $P1098, $P1097 - .return ($P1098) +.sub "!PREFIX__prefix:sym" :subid("279_1284728478.15265") :method +.annotate 'line', 454 + $P1098 = self."!PREFIX__!subrule"("O", "!") + new $P1099, "ResizablePMCArray" + push $P1099, $P1098 + .return ($P1099) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<+&>" :subid("282_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1102_tgt - .local int rx1102_pos - .local int rx1102_off - .local int rx1102_eos - .local int rx1102_rep - .local pmc rx1102_cur - .local pmc rx1102_debug - (rx1102_cur, rx1102_pos, rx1102_tgt, $I10) = self."!cursor_start"() - getattribute rx1102_debug, rx1102_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1102_cur - .local pmc match - .lex "$/", match - length rx1102_eos, rx1102_tgt - gt rx1102_pos, rx1102_eos, rx1102_done - set rx1102_off, 0 - lt rx1102_pos, 2, rx1102_start - sub rx1102_off, rx1102_pos, 1 - substr rx1102_tgt, rx1102_tgt, rx1102_off - rx1102_start: - eq $I10, 1, rx1102_restart - if_null rx1102_debug, debug_888 - rx1102_cur."!cursor_debug"("START ", "infix:sym<+&>") - debug_888: +.sub "prefix:sym<|>" :subid("280_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1103_tgt + .local int rx1103_pos + .local int rx1103_off + .local int rx1103_eos + .local int rx1103_rep + .local pmc rx1103_cur + .local pmc rx1103_debug + (rx1103_cur, rx1103_pos, rx1103_tgt, $I10) = self."!cursor_start"() + getattribute rx1103_debug, rx1103_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1103_cur + .local pmc match + .lex "$/", match + length rx1103_eos, rx1103_tgt + gt rx1103_pos, rx1103_eos, rx1103_done + set rx1103_off, 0 + lt rx1103_pos, 2, rx1103_start + sub rx1103_off, rx1103_pos, 1 + substr rx1103_tgt, rx1103_tgt, rx1103_off + rx1103_start: + eq $I10, 1, rx1103_restart + if_null rx1103_debug, debug_886 + rx1103_cur."!cursor_debug"("START", "prefix:sym<|>") + debug_886: $I10 = self.'from'() - ne $I10, -1, rxscan1106_done - goto rxscan1106_scan - rxscan1106_loop: - ($P10) = rx1102_cur."from"() - inc $P10 - set rx1102_pos, $P10 - ge rx1102_pos, rx1102_eos, rxscan1106_done - rxscan1106_scan: - set_addr $I10, rxscan1106_loop - rx1102_cur."!mark_push"(0, rx1102_pos, $I10) - rxscan1106_done: -.annotate 'line', 510 + ne $I10, -1, rxscan1107_done + goto rxscan1107_scan + rxscan1107_loop: + ($P10) = rx1103_cur."from"() + inc $P10 + set rx1103_pos, $P10 + ge rx1103_pos, rx1103_eos, rxscan1107_done + rxscan1107_scan: + set_addr $I10, rxscan1107_loop + rx1103_cur."!mark_push"(0, rx1103_pos, $I10) + rxscan1107_done: +.annotate 'line', 512 # rx subcapture "sym" - set_addr $I10, rxcap_1107_fail - rx1102_cur."!mark_push"(0, rx1102_pos, $I10) - # rx literal "+&" - add $I11, rx1102_pos, 2 - gt $I11, rx1102_eos, rx1102_fail - sub $I11, rx1102_pos, rx1102_off - substr $S10, rx1102_tgt, $I11, 2 - ne $S10, "+&", rx1102_fail - add rx1102_pos, 2 - set_addr $I10, rxcap_1107_fail - ($I12, $I11) = rx1102_cur."!mark_peek"($I10) - rx1102_cur."!cursor_pos"($I11) - ($P10) = rx1102_cur."!cursor_start"() - $P10."!cursor_pass"(rx1102_pos, "") - rx1102_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1108_fail + rx1103_cur."!mark_push"(0, rx1103_pos, $I10) + # rx literal "|" + add $I11, rx1103_pos, 1 + gt $I11, rx1103_eos, rx1103_fail + sub $I11, rx1103_pos, rx1103_off + ord $I11, rx1103_tgt, $I11 + ne $I11, 124, rx1103_fail + add rx1103_pos, 1 + set_addr $I10, rxcap_1108_fail + ($I12, $I11) = rx1103_cur."!mark_peek"($I10) + rx1103_cur."!cursor_pos"($I11) + ($P10) = rx1103_cur."!cursor_start"() + $P10."!cursor_pass"(rx1103_pos, "") + rx1103_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1107_done - rxcap_1107_fail: - goto rx1102_fail - rxcap_1107_done: + goto rxcap_1108_done + rxcap_1108_fail: + goto rx1103_fail + rxcap_1108_done: # rx subrule "O" subtype=capture negate= - rx1102_cur."!cursor_pos"(rx1102_pos) - $P10 = rx1102_cur."O"("%multiplicative, :pirop") - unless $P10, rx1102_fail - rx1102_cur."!mark_push"(0, -1, 0, $P10) + rx1103_cur."!cursor_pos"(rx1103_pos) + $P10 = rx1103_cur."O"("%symbolic_unary") + unless $P10, rx1103_fail + rx1103_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1102_pos = $P10."pos"() + rx1103_pos = $P10."pos"() # rx pass - rx1102_cur."!cursor_pass"(rx1102_pos, "infix:sym<+&>") - if_null rx1102_debug, debug_889 - rx1102_cur."!cursor_debug"("PASS ", "infix:sym<+&>", " at pos=", rx1102_pos) + rx1103_cur."!cursor_pass"(rx1103_pos, "prefix:sym<|>") + if_null rx1103_debug, debug_887 + rx1103_cur."!cursor_debug"("PASS", "prefix:sym<|>", " at pos=", rx1103_pos) + debug_887: + .return (rx1103_cur) + rx1103_restart: +.annotate 'line', 454 + if_null rx1103_debug, debug_888 + rx1103_cur."!cursor_debug"("NEXT", "prefix:sym<|>") + debug_888: + rx1103_fail: + (rx1103_rep, rx1103_pos, $I10, $P10) = rx1103_cur."!mark_fail"(0) + lt rx1103_pos, -1, rx1103_done + eq rx1103_pos, -1, rx1103_fail + jump $I10 + rx1103_done: + rx1103_cur."!cursor_fail"() + if_null rx1103_debug, debug_889 + rx1103_cur."!cursor_debug"("FAIL", "prefix:sym<|>") 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: - rx1102_fail: - (rx1102_rep, rx1102_pos, $I10, $P10) = rx1102_cur."!mark_fail"(0) - lt rx1102_pos, -1, rx1102_done - eq rx1102_pos, -1, rx1102_fail - jump $I10 - rx1102_done: - rx1102_cur."!cursor_fail"() - if_null rx1102_debug, debug_891 - rx1102_cur."!cursor_debug"("FAIL ", "infix:sym<+&>") - debug_891: - .return (rx1102_cur) + .return (rx1103_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<+&>" :subid("283_1282016529.10767") :method -.annotate 'line', 447 - $P1104 = self."!PREFIX__!subrule"("O", "+&") - new $P1105, "ResizablePMCArray" - push $P1105, $P1104 - .return ($P1105) +.sub "!PREFIX__prefix:sym<|>" :subid("281_1284728478.15265") :method +.annotate 'line', 454 + $P1105 = self."!PREFIX__!subrule"("O", "|") + new $P1106, "ResizablePMCArray" + push $P1106, $P1105 + .return ($P1106) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<+>" :subid("284_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1109_tgt - .local int rx1109_pos - .local int rx1109_off - .local int rx1109_eos - .local int rx1109_rep - .local pmc rx1109_cur - .local pmc rx1109_debug - (rx1109_cur, rx1109_pos, rx1109_tgt, $I10) = self."!cursor_start"() - getattribute rx1109_debug, rx1109_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1109_cur - .local pmc match - .lex "$/", match - length rx1109_eos, rx1109_tgt - gt rx1109_pos, rx1109_eos, rx1109_done - set rx1109_off, 0 - lt rx1109_pos, 2, rx1109_start - sub rx1109_off, rx1109_pos, 1 - substr rx1109_tgt, rx1109_tgt, rx1109_off - rx1109_start: - eq $I10, 1, rx1109_restart - if_null rx1109_debug, debug_892 - rx1109_cur."!cursor_debug"("START ", "infix:sym<+>") - debug_892: +.sub "infix:sym<*>" :subid("282_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1110_tgt + .local int rx1110_pos + .local int rx1110_off + .local int rx1110_eos + .local int rx1110_rep + .local pmc rx1110_cur + .local pmc rx1110_debug + (rx1110_cur, rx1110_pos, rx1110_tgt, $I10) = self."!cursor_start"() + getattribute rx1110_debug, rx1110_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1110_cur + .local pmc match + .lex "$/", match + length rx1110_eos, rx1110_tgt + gt rx1110_pos, rx1110_eos, rx1110_done + set rx1110_off, 0 + lt rx1110_pos, 2, rx1110_start + sub rx1110_off, rx1110_pos, 1 + substr rx1110_tgt, rx1110_tgt, rx1110_off + rx1110_start: + eq $I10, 1, rx1110_restart + if_null rx1110_debug, debug_890 + rx1110_cur."!cursor_debug"("START", "infix:sym<*>") + debug_890: $I10 = self.'from'() - ne $I10, -1, rxscan1113_done - goto rxscan1113_scan - rxscan1113_loop: - ($P10) = rx1109_cur."from"() - inc $P10 - set rx1109_pos, $P10 - ge rx1109_pos, rx1109_eos, rxscan1113_done - rxscan1113_scan: - set_addr $I10, rxscan1113_loop - rx1109_cur."!mark_push"(0, rx1109_pos, $I10) - rxscan1113_done: -.annotate 'line', 512 + ne $I10, -1, rxscan1114_done + goto rxscan1114_scan + rxscan1114_loop: + ($P10) = rx1110_cur."from"() + inc $P10 + set rx1110_pos, $P10 + ge rx1110_pos, rx1110_eos, rxscan1114_done + rxscan1114_scan: + set_addr $I10, rxscan1114_loop + rx1110_cur."!mark_push"(0, rx1110_pos, $I10) + rxscan1114_done: +.annotate 'line', 514 # rx subcapture "sym" - set_addr $I10, rxcap_1114_fail - rx1109_cur."!mark_push"(0, rx1109_pos, $I10) - # rx literal "+" - add $I11, rx1109_pos, 1 - gt $I11, rx1109_eos, rx1109_fail - sub $I11, rx1109_pos, rx1109_off - ord $I11, rx1109_tgt, $I11 - ne $I11, 43, rx1109_fail - add rx1109_pos, 1 - set_addr $I10, rxcap_1114_fail - ($I12, $I11) = rx1109_cur."!mark_peek"($I10) - rx1109_cur."!cursor_pos"($I11) - ($P10) = rx1109_cur."!cursor_start"() - $P10."!cursor_pass"(rx1109_pos, "") - rx1109_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1115_fail + rx1110_cur."!mark_push"(0, rx1110_pos, $I10) + # rx literal "*" + add $I11, rx1110_pos, 1 + gt $I11, rx1110_eos, rx1110_fail + sub $I11, rx1110_pos, rx1110_off + ord $I11, rx1110_tgt, $I11 + ne $I11, 42, rx1110_fail + add rx1110_pos, 1 + set_addr $I10, rxcap_1115_fail + ($I12, $I11) = rx1110_cur."!mark_peek"($I10) + rx1110_cur."!cursor_pos"($I11) + ($P10) = rx1110_cur."!cursor_start"() + $P10."!cursor_pass"(rx1110_pos, "") + rx1110_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1114_done - rxcap_1114_fail: - goto rx1109_fail - rxcap_1114_done: + goto rxcap_1115_done + rxcap_1115_fail: + goto rx1110_fail + rxcap_1115_done: # rx subrule "O" subtype=capture negate= - rx1109_cur."!cursor_pos"(rx1109_pos) - $P10 = rx1109_cur."O"("%additive, :pirop") - unless $P10, rx1109_fail - rx1109_cur."!mark_push"(0, -1, 0, $P10) + rx1110_cur."!cursor_pos"(rx1110_pos) + $P10 = rx1110_cur."O"("%multiplicative, :pirop") + unless $P10, rx1110_fail + rx1110_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1109_pos = $P10."pos"() + rx1110_pos = $P10."pos"() # rx pass - rx1109_cur."!cursor_pass"(rx1109_pos, "infix:sym<+>") - if_null rx1109_debug, debug_893 - rx1109_cur."!cursor_debug"("PASS ", "infix:sym<+>", " at pos=", rx1109_pos) + rx1110_cur."!cursor_pass"(rx1110_pos, "infix:sym<*>") + if_null rx1110_debug, debug_891 + rx1110_cur."!cursor_debug"("PASS", "infix:sym<*>", " at pos=", rx1110_pos) + debug_891: + .return (rx1110_cur) + rx1110_restart: +.annotate 'line', 454 + if_null rx1110_debug, debug_892 + rx1110_cur."!cursor_debug"("NEXT", "infix:sym<*>") + debug_892: + rx1110_fail: + (rx1110_rep, rx1110_pos, $I10, $P10) = rx1110_cur."!mark_fail"(0) + lt rx1110_pos, -1, rx1110_done + eq rx1110_pos, -1, rx1110_fail + jump $I10 + rx1110_done: + rx1110_cur."!cursor_fail"() + if_null rx1110_debug, debug_893 + rx1110_cur."!cursor_debug"("FAIL", "infix:sym<*>") 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: - rx1109_fail: - (rx1109_rep, rx1109_pos, $I10, $P10) = rx1109_cur."!mark_fail"(0) - lt rx1109_pos, -1, rx1109_done - eq rx1109_pos, -1, rx1109_fail - jump $I10 - rx1109_done: - rx1109_cur."!cursor_fail"() - if_null rx1109_debug, debug_895 - rx1109_cur."!cursor_debug"("FAIL ", "infix:sym<+>") - debug_895: - .return (rx1109_cur) + .return (rx1110_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<+>" :subid("285_1282016529.10767") :method -.annotate 'line', 447 - $P1111 = self."!PREFIX__!subrule"("O", "+") - new $P1112, "ResizablePMCArray" - push $P1112, $P1111 - .return ($P1112) +.sub "!PREFIX__infix:sym<*>" :subid("283_1284728478.15265") :method +.annotate 'line', 454 + $P1112 = self."!PREFIX__!subrule"("O", "*") + new $P1113, "ResizablePMCArray" + push $P1113, $P1112 + .return ($P1113) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<->" :subid("286_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1116_tgt - .local int rx1116_pos - .local int rx1116_off - .local int rx1116_eos - .local int rx1116_rep - .local pmc rx1116_cur - .local pmc rx1116_debug - (rx1116_cur, rx1116_pos, rx1116_tgt, $I10) = self."!cursor_start"() - getattribute rx1116_debug, rx1116_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1116_cur - .local pmc match - .lex "$/", match - length rx1116_eos, rx1116_tgt - gt rx1116_pos, rx1116_eos, rx1116_done - set rx1116_off, 0 - lt rx1116_pos, 2, rx1116_start - sub rx1116_off, rx1116_pos, 1 - substr rx1116_tgt, rx1116_tgt, rx1116_off - rx1116_start: - eq $I10, 1, rx1116_restart - if_null rx1116_debug, debug_896 - rx1116_cur."!cursor_debug"("START ", "infix:sym<->") - debug_896: +.sub "infix:sym" :subid("284_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1117_tgt + .local int rx1117_pos + .local int rx1117_off + .local int rx1117_eos + .local int rx1117_rep + .local pmc rx1117_cur + .local pmc rx1117_debug + (rx1117_cur, rx1117_pos, rx1117_tgt, $I10) = self."!cursor_start"() + getattribute rx1117_debug, rx1117_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1117_cur + .local pmc match + .lex "$/", match + length rx1117_eos, rx1117_tgt + gt rx1117_pos, rx1117_eos, rx1117_done + set rx1117_off, 0 + lt rx1117_pos, 2, rx1117_start + sub rx1117_off, rx1117_pos, 1 + substr rx1117_tgt, rx1117_tgt, rx1117_off + rx1117_start: + eq $I10, 1, rx1117_restart + if_null rx1117_debug, debug_894 + rx1117_cur."!cursor_debug"("START", "infix:sym") + debug_894: $I10 = self.'from'() - ne $I10, -1, rxscan1120_done - goto rxscan1120_scan - rxscan1120_loop: - ($P10) = rx1116_cur."from"() - inc $P10 - set rx1116_pos, $P10 - ge rx1116_pos, rx1116_eos, rxscan1120_done - rxscan1120_scan: - set_addr $I10, rxscan1120_loop - rx1116_cur."!mark_push"(0, rx1116_pos, $I10) - rxscan1120_done: -.annotate 'line', 513 + ne $I10, -1, rxscan1121_done + goto rxscan1121_scan + rxscan1121_loop: + ($P10) = rx1117_cur."from"() + inc $P10 + set rx1117_pos, $P10 + ge rx1117_pos, rx1117_eos, rxscan1121_done + rxscan1121_scan: + set_addr $I10, rxscan1121_loop + rx1117_cur."!mark_push"(0, rx1117_pos, $I10) + rxscan1121_done: +.annotate 'line', 515 # rx subcapture "sym" - set_addr $I10, rxcap_1121_fail - rx1116_cur."!mark_push"(0, rx1116_pos, $I10) - # rx literal "-" - add $I11, rx1116_pos, 1 - gt $I11, rx1116_eos, rx1116_fail - sub $I11, rx1116_pos, rx1116_off - ord $I11, rx1116_tgt, $I11 - ne $I11, 45, rx1116_fail - add rx1116_pos, 1 - set_addr $I10, rxcap_1121_fail - ($I12, $I11) = rx1116_cur."!mark_peek"($I10) - rx1116_cur."!cursor_pos"($I11) - ($P10) = rx1116_cur."!cursor_start"() - $P10."!cursor_pass"(rx1116_pos, "") - rx1116_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1122_fail + rx1117_cur."!mark_push"(0, rx1117_pos, $I10) + # rx literal "/" + add $I11, rx1117_pos, 1 + gt $I11, rx1117_eos, rx1117_fail + sub $I11, rx1117_pos, rx1117_off + ord $I11, rx1117_tgt, $I11 + ne $I11, 47, rx1117_fail + add rx1117_pos, 1 + set_addr $I10, rxcap_1122_fail + ($I12, $I11) = rx1117_cur."!mark_peek"($I10) + rx1117_cur."!cursor_pos"($I11) + ($P10) = rx1117_cur."!cursor_start"() + $P10."!cursor_pass"(rx1117_pos, "") + rx1117_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1121_done - rxcap_1121_fail: - goto rx1116_fail - rxcap_1121_done: + goto rxcap_1122_done + rxcap_1122_fail: + goto rx1117_fail + rxcap_1122_done: # rx subrule "O" subtype=capture negate= - rx1116_cur."!cursor_pos"(rx1116_pos) - $P10 = rx1116_cur."O"("%additive, :pirop") - unless $P10, rx1116_fail - rx1116_cur."!mark_push"(0, -1, 0, $P10) + rx1117_cur."!cursor_pos"(rx1117_pos) + $P10 = rx1117_cur."O"("%multiplicative, :pirop
") + unless $P10, rx1117_fail + rx1117_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1116_pos = $P10."pos"() + rx1117_pos = $P10."pos"() # rx pass - rx1116_cur."!cursor_pass"(rx1116_pos, "infix:sym<->") - if_null rx1116_debug, debug_897 - rx1116_cur."!cursor_debug"("PASS ", "infix:sym<->", " at pos=", rx1116_pos) + rx1117_cur."!cursor_pass"(rx1117_pos, "infix:sym") + if_null rx1117_debug, debug_895 + rx1117_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1117_pos) + debug_895: + .return (rx1117_cur) + rx1117_restart: +.annotate 'line', 454 + if_null rx1117_debug, debug_896 + rx1117_cur."!cursor_debug"("NEXT", "infix:sym") + debug_896: + rx1117_fail: + (rx1117_rep, rx1117_pos, $I10, $P10) = rx1117_cur."!mark_fail"(0) + lt rx1117_pos, -1, rx1117_done + eq rx1117_pos, -1, rx1117_fail + jump $I10 + rx1117_done: + rx1117_cur."!cursor_fail"() + if_null rx1117_debug, debug_897 + rx1117_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1116_fail: - (rx1116_rep, rx1116_pos, $I10, $P10) = rx1116_cur."!mark_fail"(0) - lt rx1116_pos, -1, rx1116_done - eq rx1116_pos, -1, rx1116_fail - jump $I10 - rx1116_done: - rx1116_cur."!cursor_fail"() - if_null rx1116_debug, debug_899 - rx1116_cur."!cursor_debug"("FAIL ", "infix:sym<->") - debug_899: - .return (rx1116_cur) + .return (rx1117_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<->" :subid("287_1282016529.10767") :method -.annotate 'line', 447 - $P1118 = self."!PREFIX__!subrule"("O", "-") - new $P1119, "ResizablePMCArray" - push $P1119, $P1118 - .return ($P1119) +.sub "!PREFIX__infix:sym" :subid("285_1284728478.15265") :method +.annotate 'line', 454 + $P1119 = self."!PREFIX__!subrule"("O", "/") + new $P1120, "ResizablePMCArray" + push $P1120, $P1119 + .return ($P1120) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<+|>" :subid("288_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1123_tgt - .local int rx1123_pos - .local int rx1123_off - .local int rx1123_eos - .local int rx1123_rep - .local pmc rx1123_cur - .local pmc rx1123_debug - (rx1123_cur, rx1123_pos, rx1123_tgt, $I10) = self."!cursor_start"() - getattribute rx1123_debug, rx1123_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1123_cur - .local pmc match - .lex "$/", match - length rx1123_eos, rx1123_tgt - gt rx1123_pos, rx1123_eos, rx1123_done - set rx1123_off, 0 - lt rx1123_pos, 2, rx1123_start - sub rx1123_off, rx1123_pos, 1 - substr rx1123_tgt, rx1123_tgt, rx1123_off - rx1123_start: - eq $I10, 1, rx1123_restart - if_null rx1123_debug, debug_900 - rx1123_cur."!cursor_debug"("START ", "infix:sym<+|>") - debug_900: +.sub "infix:sym<%>" :subid("286_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1124_tgt + .local int rx1124_pos + .local int rx1124_off + .local int rx1124_eos + .local int rx1124_rep + .local pmc rx1124_cur + .local pmc rx1124_debug + (rx1124_cur, rx1124_pos, rx1124_tgt, $I10) = self."!cursor_start"() + getattribute rx1124_debug, rx1124_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1124_cur + .local pmc match + .lex "$/", match + length rx1124_eos, rx1124_tgt + gt rx1124_pos, rx1124_eos, rx1124_done + set rx1124_off, 0 + lt rx1124_pos, 2, rx1124_start + sub rx1124_off, rx1124_pos, 1 + substr rx1124_tgt, rx1124_tgt, rx1124_off + rx1124_start: + eq $I10, 1, rx1124_restart + if_null rx1124_debug, debug_898 + rx1124_cur."!cursor_debug"("START", "infix:sym<%>") + debug_898: $I10 = self.'from'() - ne $I10, -1, rxscan1127_done - goto rxscan1127_scan - rxscan1127_loop: - ($P10) = rx1123_cur."from"() - inc $P10 - set rx1123_pos, $P10 - ge rx1123_pos, rx1123_eos, rxscan1127_done - rxscan1127_scan: - set_addr $I10, rxscan1127_loop - rx1123_cur."!mark_push"(0, rx1123_pos, $I10) - rxscan1127_done: -.annotate 'line', 514 + ne $I10, -1, rxscan1128_done + goto rxscan1128_scan + rxscan1128_loop: + ($P10) = rx1124_cur."from"() + inc $P10 + set rx1124_pos, $P10 + ge rx1124_pos, rx1124_eos, rxscan1128_done + rxscan1128_scan: + set_addr $I10, rxscan1128_loop + rx1124_cur."!mark_push"(0, rx1124_pos, $I10) + rxscan1128_done: +.annotate 'line', 516 # rx subcapture "sym" - set_addr $I10, rxcap_1128_fail - rx1123_cur."!mark_push"(0, rx1123_pos, $I10) - # rx literal "+|" - add $I11, rx1123_pos, 2 - gt $I11, rx1123_eos, rx1123_fail - sub $I11, rx1123_pos, rx1123_off - substr $S10, rx1123_tgt, $I11, 2 - ne $S10, "+|", rx1123_fail - add rx1123_pos, 2 - set_addr $I10, rxcap_1128_fail - ($I12, $I11) = rx1123_cur."!mark_peek"($I10) - rx1123_cur."!cursor_pos"($I11) - ($P10) = rx1123_cur."!cursor_start"() - $P10."!cursor_pass"(rx1123_pos, "") - rx1123_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1129_fail + rx1124_cur."!mark_push"(0, rx1124_pos, $I10) + # rx literal "%" + add $I11, rx1124_pos, 1 + gt $I11, rx1124_eos, rx1124_fail + sub $I11, rx1124_pos, rx1124_off + ord $I11, rx1124_tgt, $I11 + ne $I11, 37, rx1124_fail + add rx1124_pos, 1 + set_addr $I10, rxcap_1129_fail + ($I12, $I11) = rx1124_cur."!mark_peek"($I10) + rx1124_cur."!cursor_pos"($I11) + ($P10) = rx1124_cur."!cursor_start"() + $P10."!cursor_pass"(rx1124_pos, "") + rx1124_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1128_done - rxcap_1128_fail: - goto rx1123_fail - rxcap_1128_done: + goto rxcap_1129_done + rxcap_1129_fail: + goto rx1124_fail + rxcap_1129_done: # rx subrule "O" subtype=capture negate= - rx1123_cur."!cursor_pos"(rx1123_pos) - $P10 = rx1123_cur."O"("%additive, :pirop") - unless $P10, rx1123_fail - rx1123_cur."!mark_push"(0, -1, 0, $P10) + rx1124_cur."!cursor_pos"(rx1124_pos) + $P10 = rx1124_cur."O"("%multiplicative, :pirop") + unless $P10, rx1124_fail + rx1124_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1123_pos = $P10."pos"() + rx1124_pos = $P10."pos"() # rx pass - rx1123_cur."!cursor_pass"(rx1123_pos, "infix:sym<+|>") - if_null rx1123_debug, debug_901 - rx1123_cur."!cursor_debug"("PASS ", "infix:sym<+|>", " at pos=", rx1123_pos) + rx1124_cur."!cursor_pass"(rx1124_pos, "infix:sym<%>") + if_null rx1124_debug, debug_899 + rx1124_cur."!cursor_debug"("PASS", "infix:sym<%>", " at pos=", rx1124_pos) + debug_899: + .return (rx1124_cur) + rx1124_restart: +.annotate 'line', 454 + if_null rx1124_debug, debug_900 + rx1124_cur."!cursor_debug"("NEXT", "infix:sym<%>") + debug_900: + rx1124_fail: + (rx1124_rep, rx1124_pos, $I10, $P10) = rx1124_cur."!mark_fail"(0) + lt rx1124_pos, -1, rx1124_done + eq rx1124_pos, -1, rx1124_fail + jump $I10 + rx1124_done: + rx1124_cur."!cursor_fail"() + if_null rx1124_debug, debug_901 + rx1124_cur."!cursor_debug"("FAIL", "infix:sym<%>") 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: - rx1123_fail: - (rx1123_rep, rx1123_pos, $I10, $P10) = rx1123_cur."!mark_fail"(0) - lt rx1123_pos, -1, rx1123_done - eq rx1123_pos, -1, rx1123_fail - jump $I10 - rx1123_done: - rx1123_cur."!cursor_fail"() - if_null rx1123_debug, debug_903 - rx1123_cur."!cursor_debug"("FAIL ", "infix:sym<+|>") - debug_903: - .return (rx1123_cur) + .return (rx1124_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<+|>" :subid("289_1282016529.10767") :method -.annotate 'line', 447 - $P1125 = self."!PREFIX__!subrule"("O", "+|") - new $P1126, "ResizablePMCArray" - push $P1126, $P1125 - .return ($P1126) +.sub "!PREFIX__infix:sym<%>" :subid("287_1284728478.15265") :method +.annotate 'line', 454 + $P1126 = self."!PREFIX__!subrule"("O", "%") + new $P1127, "ResizablePMCArray" + push $P1127, $P1126 + .return ($P1127) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<+^>" :subid("290_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1130_tgt - .local int rx1130_pos - .local int rx1130_off - .local int rx1130_eos - .local int rx1130_rep - .local pmc rx1130_cur - .local pmc rx1130_debug - (rx1130_cur, rx1130_pos, rx1130_tgt, $I10) = self."!cursor_start"() - getattribute rx1130_debug, rx1130_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1130_cur - .local pmc match - .lex "$/", match - length rx1130_eos, rx1130_tgt - gt rx1130_pos, rx1130_eos, rx1130_done - set rx1130_off, 0 - lt rx1130_pos, 2, rx1130_start - sub rx1130_off, rx1130_pos, 1 - substr rx1130_tgt, rx1130_tgt, rx1130_off - rx1130_start: - eq $I10, 1, rx1130_restart - if_null rx1130_debug, debug_904 - rx1130_cur."!cursor_debug"("START ", "infix:sym<+^>") - debug_904: +.sub "infix:sym<+&>" :subid("288_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1131_tgt + .local int rx1131_pos + .local int rx1131_off + .local int rx1131_eos + .local int rx1131_rep + .local pmc rx1131_cur + .local pmc rx1131_debug + (rx1131_cur, rx1131_pos, rx1131_tgt, $I10) = self."!cursor_start"() + getattribute rx1131_debug, rx1131_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1131_cur + .local pmc match + .lex "$/", match + length rx1131_eos, rx1131_tgt + gt rx1131_pos, rx1131_eos, rx1131_done + set rx1131_off, 0 + lt rx1131_pos, 2, rx1131_start + sub rx1131_off, rx1131_pos, 1 + substr rx1131_tgt, rx1131_tgt, rx1131_off + rx1131_start: + eq $I10, 1, rx1131_restart + if_null rx1131_debug, debug_902 + rx1131_cur."!cursor_debug"("START", "infix:sym<+&>") + debug_902: $I10 = self.'from'() - ne $I10, -1, rxscan1134_done - goto rxscan1134_scan - rxscan1134_loop: - ($P10) = rx1130_cur."from"() - inc $P10 - set rx1130_pos, $P10 - ge rx1130_pos, rx1130_eos, rxscan1134_done - rxscan1134_scan: - set_addr $I10, rxscan1134_loop - rx1130_cur."!mark_push"(0, rx1130_pos, $I10) - rxscan1134_done: -.annotate 'line', 515 + ne $I10, -1, rxscan1135_done + goto rxscan1135_scan + rxscan1135_loop: + ($P10) = rx1131_cur."from"() + inc $P10 + set rx1131_pos, $P10 + ge rx1131_pos, rx1131_eos, rxscan1135_done + rxscan1135_scan: + set_addr $I10, rxscan1135_loop + rx1131_cur."!mark_push"(0, rx1131_pos, $I10) + rxscan1135_done: +.annotate 'line', 517 # rx subcapture "sym" - set_addr $I10, rxcap_1135_fail - rx1130_cur."!mark_push"(0, rx1130_pos, $I10) - # rx literal "+^" - add $I11, rx1130_pos, 2 - gt $I11, rx1130_eos, rx1130_fail - sub $I11, rx1130_pos, rx1130_off - substr $S10, rx1130_tgt, $I11, 2 - ne $S10, "+^", rx1130_fail - add rx1130_pos, 2 - set_addr $I10, rxcap_1135_fail - ($I12, $I11) = rx1130_cur."!mark_peek"($I10) - rx1130_cur."!cursor_pos"($I11) - ($P10) = rx1130_cur."!cursor_start"() - $P10."!cursor_pass"(rx1130_pos, "") - rx1130_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1136_fail + rx1131_cur."!mark_push"(0, rx1131_pos, $I10) + # rx literal "+&" + add $I11, rx1131_pos, 2 + gt $I11, rx1131_eos, rx1131_fail + sub $I11, rx1131_pos, rx1131_off + substr $S10, rx1131_tgt, $I11, 2 + ne $S10, "+&", rx1131_fail + add rx1131_pos, 2 + set_addr $I10, rxcap_1136_fail + ($I12, $I11) = rx1131_cur."!mark_peek"($I10) + rx1131_cur."!cursor_pos"($I11) + ($P10) = rx1131_cur."!cursor_start"() + $P10."!cursor_pass"(rx1131_pos, "") + rx1131_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1135_done - rxcap_1135_fail: - goto rx1130_fail - rxcap_1135_done: + goto rxcap_1136_done + rxcap_1136_fail: + goto rx1131_fail + rxcap_1136_done: # rx subrule "O" subtype=capture negate= - rx1130_cur."!cursor_pos"(rx1130_pos) - $P10 = rx1130_cur."O"("%additive, :pirop") - unless $P10, rx1130_fail - rx1130_cur."!mark_push"(0, -1, 0, $P10) + rx1131_cur."!cursor_pos"(rx1131_pos) + $P10 = rx1131_cur."O"("%multiplicative, :pirop") + unless $P10, rx1131_fail + rx1131_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1130_pos = $P10."pos"() + rx1131_pos = $P10."pos"() # rx pass - rx1130_cur."!cursor_pass"(rx1130_pos, "infix:sym<+^>") - if_null rx1130_debug, debug_905 - rx1130_cur."!cursor_debug"("PASS ", "infix:sym<+^>", " at pos=", rx1130_pos) + rx1131_cur."!cursor_pass"(rx1131_pos, "infix:sym<+&>") + if_null rx1131_debug, debug_903 + rx1131_cur."!cursor_debug"("PASS", "infix:sym<+&>", " at pos=", rx1131_pos) + debug_903: + .return (rx1131_cur) + rx1131_restart: +.annotate 'line', 454 + if_null rx1131_debug, debug_904 + rx1131_cur."!cursor_debug"("NEXT", "infix:sym<+&>") + debug_904: + rx1131_fail: + (rx1131_rep, rx1131_pos, $I10, $P10) = rx1131_cur."!mark_fail"(0) + lt rx1131_pos, -1, rx1131_done + eq rx1131_pos, -1, rx1131_fail + jump $I10 + rx1131_done: + rx1131_cur."!cursor_fail"() + if_null rx1131_debug, debug_905 + rx1131_cur."!cursor_debug"("FAIL", "infix:sym<+&>") 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: - rx1130_fail: - (rx1130_rep, rx1130_pos, $I10, $P10) = rx1130_cur."!mark_fail"(0) - lt rx1130_pos, -1, rx1130_done - eq rx1130_pos, -1, rx1130_fail - jump $I10 - rx1130_done: - rx1130_cur."!cursor_fail"() - if_null rx1130_debug, debug_907 - rx1130_cur."!cursor_debug"("FAIL ", "infix:sym<+^>") - debug_907: - .return (rx1130_cur) + .return (rx1131_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<+^>" :subid("291_1282016529.10767") :method -.annotate 'line', 447 - $P1132 = self."!PREFIX__!subrule"("O", "+^") - new $P1133, "ResizablePMCArray" - push $P1133, $P1132 - .return ($P1133) +.sub "!PREFIX__infix:sym<+&>" :subid("289_1284728478.15265") :method +.annotate 'line', 454 + $P1133 = self."!PREFIX__!subrule"("O", "+&") + new $P1134, "ResizablePMCArray" + push $P1134, $P1133 + .return ($P1134) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<~>" :subid("292_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1137_tgt - .local int rx1137_pos - .local int rx1137_off - .local int rx1137_eos - .local int rx1137_rep - .local pmc rx1137_cur - .local pmc rx1137_debug - (rx1137_cur, rx1137_pos, rx1137_tgt, $I10) = self."!cursor_start"() - getattribute rx1137_debug, rx1137_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1137_cur - .local pmc match - .lex "$/", match - length rx1137_eos, rx1137_tgt - gt rx1137_pos, rx1137_eos, rx1137_done - set rx1137_off, 0 - lt rx1137_pos, 2, rx1137_start - sub rx1137_off, rx1137_pos, 1 - substr rx1137_tgt, rx1137_tgt, rx1137_off - rx1137_start: - eq $I10, 1, rx1137_restart - if_null rx1137_debug, debug_908 - rx1137_cur."!cursor_debug"("START ", "infix:sym<~>") - debug_908: +.sub "infix:sym<+>" :subid("290_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1138_tgt + .local int rx1138_pos + .local int rx1138_off + .local int rx1138_eos + .local int rx1138_rep + .local pmc rx1138_cur + .local pmc rx1138_debug + (rx1138_cur, rx1138_pos, rx1138_tgt, $I10) = self."!cursor_start"() + getattribute rx1138_debug, rx1138_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1138_cur + .local pmc match + .lex "$/", match + length rx1138_eos, rx1138_tgt + gt rx1138_pos, rx1138_eos, rx1138_done + set rx1138_off, 0 + lt rx1138_pos, 2, rx1138_start + sub rx1138_off, rx1138_pos, 1 + substr rx1138_tgt, rx1138_tgt, rx1138_off + rx1138_start: + eq $I10, 1, rx1138_restart + if_null rx1138_debug, debug_906 + rx1138_cur."!cursor_debug"("START", "infix:sym<+>") + debug_906: $I10 = self.'from'() - ne $I10, -1, rxscan1141_done - goto rxscan1141_scan - rxscan1141_loop: - ($P10) = rx1137_cur."from"() - inc $P10 - set rx1137_pos, $P10 - ge rx1137_pos, rx1137_eos, rxscan1141_done - rxscan1141_scan: - set_addr $I10, rxscan1141_loop - rx1137_cur."!mark_push"(0, rx1137_pos, $I10) - rxscan1141_done: -.annotate 'line', 517 + ne $I10, -1, rxscan1142_done + goto rxscan1142_scan + rxscan1142_loop: + ($P10) = rx1138_cur."from"() + inc $P10 + set rx1138_pos, $P10 + ge rx1138_pos, rx1138_eos, rxscan1142_done + rxscan1142_scan: + set_addr $I10, rxscan1142_loop + rx1138_cur."!mark_push"(0, rx1138_pos, $I10) + rxscan1142_done: +.annotate 'line', 519 # rx subcapture "sym" - set_addr $I10, rxcap_1142_fail - rx1137_cur."!mark_push"(0, rx1137_pos, $I10) - # rx literal "~" - add $I11, rx1137_pos, 1 - gt $I11, rx1137_eos, rx1137_fail - sub $I11, rx1137_pos, rx1137_off - ord $I11, rx1137_tgt, $I11 - ne $I11, 126, rx1137_fail - add rx1137_pos, 1 - set_addr $I10, rxcap_1142_fail - ($I12, $I11) = rx1137_cur."!mark_peek"($I10) - rx1137_cur."!cursor_pos"($I11) - ($P10) = rx1137_cur."!cursor_start"() - $P10."!cursor_pass"(rx1137_pos, "") - rx1137_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1143_fail + rx1138_cur."!mark_push"(0, rx1138_pos, $I10) + # rx literal "+" + add $I11, rx1138_pos, 1 + gt $I11, rx1138_eos, rx1138_fail + sub $I11, rx1138_pos, rx1138_off + ord $I11, rx1138_tgt, $I11 + ne $I11, 43, rx1138_fail + add rx1138_pos, 1 + set_addr $I10, rxcap_1143_fail + ($I12, $I11) = rx1138_cur."!mark_peek"($I10) + rx1138_cur."!cursor_pos"($I11) + ($P10) = rx1138_cur."!cursor_start"() + $P10."!cursor_pass"(rx1138_pos, "") + rx1138_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1142_done - rxcap_1142_fail: - goto rx1137_fail - rxcap_1142_done: + goto rxcap_1143_done + rxcap_1143_fail: + goto rx1138_fail + rxcap_1143_done: # rx subrule "O" subtype=capture negate= - rx1137_cur."!cursor_pos"(rx1137_pos) - $P10 = rx1137_cur."O"("%concatenation , :pirop") - unless $P10, rx1137_fail - rx1137_cur."!mark_push"(0, -1, 0, $P10) + rx1138_cur."!cursor_pos"(rx1138_pos) + $P10 = rx1138_cur."O"("%additive, :pirop") + unless $P10, rx1138_fail + rx1138_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1137_pos = $P10."pos"() + rx1138_pos = $P10."pos"() # rx pass - rx1137_cur."!cursor_pass"(rx1137_pos, "infix:sym<~>") - if_null rx1137_debug, debug_909 - rx1137_cur."!cursor_debug"("PASS ", "infix:sym<~>", " at pos=", rx1137_pos) + rx1138_cur."!cursor_pass"(rx1138_pos, "infix:sym<+>") + if_null rx1138_debug, debug_907 + rx1138_cur."!cursor_debug"("PASS", "infix:sym<+>", " at pos=", rx1138_pos) + debug_907: + .return (rx1138_cur) + rx1138_restart: +.annotate 'line', 454 + if_null rx1138_debug, debug_908 + rx1138_cur."!cursor_debug"("NEXT", "infix:sym<+>") + debug_908: + rx1138_fail: + (rx1138_rep, rx1138_pos, $I10, $P10) = rx1138_cur."!mark_fail"(0) + lt rx1138_pos, -1, rx1138_done + eq rx1138_pos, -1, rx1138_fail + jump $I10 + rx1138_done: + rx1138_cur."!cursor_fail"() + if_null rx1138_debug, debug_909 + rx1138_cur."!cursor_debug"("FAIL", "infix:sym<+>") 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: - rx1137_fail: - (rx1137_rep, rx1137_pos, $I10, $P10) = rx1137_cur."!mark_fail"(0) - lt rx1137_pos, -1, rx1137_done - eq rx1137_pos, -1, rx1137_fail - jump $I10 - rx1137_done: - rx1137_cur."!cursor_fail"() - if_null rx1137_debug, debug_911 - rx1137_cur."!cursor_debug"("FAIL ", "infix:sym<~>") - debug_911: - .return (rx1137_cur) + .return (rx1138_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<~>" :subid("293_1282016529.10767") :method -.annotate 'line', 447 - $P1139 = self."!PREFIX__!subrule"("O", "~") - new $P1140, "ResizablePMCArray" - push $P1140, $P1139 - .return ($P1140) +.sub "!PREFIX__infix:sym<+>" :subid("291_1284728478.15265") :method +.annotate 'line', 454 + $P1140 = self."!PREFIX__!subrule"("O", "+") + new $P1141, "ResizablePMCArray" + push $P1141, $P1140 + .return ($P1141) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<==>" :subid("294_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1144_tgt - .local int rx1144_pos - .local int rx1144_off - .local int rx1144_eos - .local int rx1144_rep - .local pmc rx1144_cur - .local pmc rx1144_debug - (rx1144_cur, rx1144_pos, rx1144_tgt, $I10) = self."!cursor_start"() - getattribute rx1144_debug, rx1144_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1144_cur - .local pmc match - .lex "$/", match - length rx1144_eos, rx1144_tgt - gt rx1144_pos, rx1144_eos, rx1144_done - set rx1144_off, 0 - lt rx1144_pos, 2, rx1144_start - sub rx1144_off, rx1144_pos, 1 - substr rx1144_tgt, rx1144_tgt, rx1144_off - rx1144_start: - eq $I10, 1, rx1144_restart - if_null rx1144_debug, debug_912 - rx1144_cur."!cursor_debug"("START ", "infix:sym<==>") - debug_912: +.sub "infix:sym<->" :subid("292_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1145_tgt + .local int rx1145_pos + .local int rx1145_off + .local int rx1145_eos + .local int rx1145_rep + .local pmc rx1145_cur + .local pmc rx1145_debug + (rx1145_cur, rx1145_pos, rx1145_tgt, $I10) = self."!cursor_start"() + getattribute rx1145_debug, rx1145_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1145_cur + .local pmc match + .lex "$/", match + length rx1145_eos, rx1145_tgt + gt rx1145_pos, rx1145_eos, rx1145_done + set rx1145_off, 0 + lt rx1145_pos, 2, rx1145_start + sub rx1145_off, rx1145_pos, 1 + substr rx1145_tgt, rx1145_tgt, rx1145_off + rx1145_start: + eq $I10, 1, rx1145_restart + if_null rx1145_debug, debug_910 + rx1145_cur."!cursor_debug"("START", "infix:sym<->") + debug_910: $I10 = self.'from'() - ne $I10, -1, rxscan1148_done - goto rxscan1148_scan - rxscan1148_loop: - ($P10) = rx1144_cur."from"() - inc $P10 - set rx1144_pos, $P10 - ge rx1144_pos, rx1144_eos, rxscan1148_done - rxscan1148_scan: - set_addr $I10, rxscan1148_loop - rx1144_cur."!mark_push"(0, rx1144_pos, $I10) - rxscan1148_done: -.annotate 'line', 519 + ne $I10, -1, rxscan1149_done + goto rxscan1149_scan + rxscan1149_loop: + ($P10) = rx1145_cur."from"() + inc $P10 + set rx1145_pos, $P10 + ge rx1145_pos, rx1145_eos, rxscan1149_done + rxscan1149_scan: + set_addr $I10, rxscan1149_loop + rx1145_cur."!mark_push"(0, rx1145_pos, $I10) + rxscan1149_done: +.annotate 'line', 520 # rx subcapture "sym" - set_addr $I10, rxcap_1149_fail - rx1144_cur."!mark_push"(0, rx1144_pos, $I10) - # rx literal "==" - add $I11, rx1144_pos, 2 - gt $I11, rx1144_eos, rx1144_fail - sub $I11, rx1144_pos, rx1144_off - substr $S10, rx1144_tgt, $I11, 2 - ne $S10, "==", rx1144_fail - add rx1144_pos, 2 - set_addr $I10, rxcap_1149_fail - ($I12, $I11) = rx1144_cur."!mark_peek"($I10) - rx1144_cur."!cursor_pos"($I11) - ($P10) = rx1144_cur."!cursor_start"() - $P10."!cursor_pass"(rx1144_pos, "") - rx1144_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1150_fail + rx1145_cur."!mark_push"(0, rx1145_pos, $I10) + # rx literal "-" + add $I11, rx1145_pos, 1 + gt $I11, rx1145_eos, rx1145_fail + sub $I11, rx1145_pos, rx1145_off + ord $I11, rx1145_tgt, $I11 + ne $I11, 45, rx1145_fail + add rx1145_pos, 1 + set_addr $I10, rxcap_1150_fail + ($I12, $I11) = rx1145_cur."!mark_peek"($I10) + rx1145_cur."!cursor_pos"($I11) + ($P10) = rx1145_cur."!cursor_start"() + $P10."!cursor_pass"(rx1145_pos, "") + rx1145_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1149_done - rxcap_1149_fail: - goto rx1144_fail - rxcap_1149_done: + goto rxcap_1150_done + rxcap_1150_fail: + goto rx1145_fail + rxcap_1150_done: # rx subrule "O" subtype=capture negate= - rx1144_cur."!cursor_pos"(rx1144_pos) - $P10 = rx1144_cur."O"("%relational, :pirop") - unless $P10, rx1144_fail - rx1144_cur."!mark_push"(0, -1, 0, $P10) + rx1145_cur."!cursor_pos"(rx1145_pos) + $P10 = rx1145_cur."O"("%additive, :pirop") + unless $P10, rx1145_fail + rx1145_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1144_pos = $P10."pos"() + rx1145_pos = $P10."pos"() # rx pass - rx1144_cur."!cursor_pass"(rx1144_pos, "infix:sym<==>") - if_null rx1144_debug, debug_913 - rx1144_cur."!cursor_debug"("PASS ", "infix:sym<==>", " at pos=", rx1144_pos) + rx1145_cur."!cursor_pass"(rx1145_pos, "infix:sym<->") + if_null rx1145_debug, debug_911 + rx1145_cur."!cursor_debug"("PASS", "infix:sym<->", " at pos=", rx1145_pos) + debug_911: + .return (rx1145_cur) + rx1145_restart: +.annotate 'line', 454 + if_null rx1145_debug, debug_912 + rx1145_cur."!cursor_debug"("NEXT", "infix:sym<->") + debug_912: + rx1145_fail: + (rx1145_rep, rx1145_pos, $I10, $P10) = rx1145_cur."!mark_fail"(0) + lt rx1145_pos, -1, rx1145_done + eq rx1145_pos, -1, rx1145_fail + jump $I10 + rx1145_done: + rx1145_cur."!cursor_fail"() + if_null rx1145_debug, debug_913 + rx1145_cur."!cursor_debug"("FAIL", "infix:sym<->") 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: - rx1144_fail: - (rx1144_rep, rx1144_pos, $I10, $P10) = rx1144_cur."!mark_fail"(0) - lt rx1144_pos, -1, rx1144_done - eq rx1144_pos, -1, rx1144_fail - jump $I10 - rx1144_done: - rx1144_cur."!cursor_fail"() - if_null rx1144_debug, debug_915 - rx1144_cur."!cursor_debug"("FAIL ", "infix:sym<==>") - debug_915: - .return (rx1144_cur) + .return (rx1145_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<==>" :subid("295_1282016529.10767") :method -.annotate 'line', 447 - $P1146 = self."!PREFIX__!subrule"("O", "==") - new $P1147, "ResizablePMCArray" - push $P1147, $P1146 - .return ($P1147) +.sub "!PREFIX__infix:sym<->" :subid("293_1284728478.15265") :method +.annotate 'line', 454 + $P1147 = self."!PREFIX__!subrule"("O", "-") + new $P1148, "ResizablePMCArray" + push $P1148, $P1147 + .return ($P1148) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("296_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1151_tgt - .local int rx1151_pos - .local int rx1151_off - .local int rx1151_eos - .local int rx1151_rep - .local pmc rx1151_cur - .local pmc rx1151_debug - (rx1151_cur, rx1151_pos, rx1151_tgt, $I10) = self."!cursor_start"() - getattribute rx1151_debug, rx1151_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1151_cur - .local pmc match - .lex "$/", match - length rx1151_eos, rx1151_tgt - gt rx1151_pos, rx1151_eos, rx1151_done - set rx1151_off, 0 - lt rx1151_pos, 2, rx1151_start - sub rx1151_off, rx1151_pos, 1 - substr rx1151_tgt, rx1151_tgt, rx1151_off - rx1151_start: - eq $I10, 1, rx1151_restart - if_null rx1151_debug, debug_916 - rx1151_cur."!cursor_debug"("START ", "infix:sym") - debug_916: +.sub "infix:sym<+|>" :subid("294_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1152_tgt + .local int rx1152_pos + .local int rx1152_off + .local int rx1152_eos + .local int rx1152_rep + .local pmc rx1152_cur + .local pmc rx1152_debug + (rx1152_cur, rx1152_pos, rx1152_tgt, $I10) = self."!cursor_start"() + getattribute rx1152_debug, rx1152_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1152_cur + .local pmc match + .lex "$/", match + length rx1152_eos, rx1152_tgt + gt rx1152_pos, rx1152_eos, rx1152_done + set rx1152_off, 0 + lt rx1152_pos, 2, rx1152_start + sub rx1152_off, rx1152_pos, 1 + substr rx1152_tgt, rx1152_tgt, rx1152_off + rx1152_start: + eq $I10, 1, rx1152_restart + if_null rx1152_debug, debug_914 + rx1152_cur."!cursor_debug"("START", "infix:sym<+|>") + debug_914: $I10 = self.'from'() - ne $I10, -1, rxscan1155_done - goto rxscan1155_scan - rxscan1155_loop: - ($P10) = rx1151_cur."from"() - inc $P10 - set rx1151_pos, $P10 - ge rx1151_pos, rx1151_eos, rxscan1155_done - rxscan1155_scan: - set_addr $I10, rxscan1155_loop - rx1151_cur."!mark_push"(0, rx1151_pos, $I10) - rxscan1155_done: -.annotate 'line', 520 + ne $I10, -1, rxscan1156_done + goto rxscan1156_scan + rxscan1156_loop: + ($P10) = rx1152_cur."from"() + inc $P10 + set rx1152_pos, $P10 + ge rx1152_pos, rx1152_eos, rxscan1156_done + rxscan1156_scan: + set_addr $I10, rxscan1156_loop + rx1152_cur."!mark_push"(0, rx1152_pos, $I10) + rxscan1156_done: +.annotate 'line', 521 # rx subcapture "sym" - set_addr $I10, rxcap_1156_fail - rx1151_cur."!mark_push"(0, rx1151_pos, $I10) - # rx literal "!=" - add $I11, rx1151_pos, 2 - gt $I11, rx1151_eos, rx1151_fail - sub $I11, rx1151_pos, rx1151_off - substr $S10, rx1151_tgt, $I11, 2 - ne $S10, "!=", rx1151_fail - add rx1151_pos, 2 - set_addr $I10, rxcap_1156_fail - ($I12, $I11) = rx1151_cur."!mark_peek"($I10) - rx1151_cur."!cursor_pos"($I11) - ($P10) = rx1151_cur."!cursor_start"() - $P10."!cursor_pass"(rx1151_pos, "") - rx1151_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1157_fail + rx1152_cur."!mark_push"(0, rx1152_pos, $I10) + # rx literal "+|" + add $I11, rx1152_pos, 2 + gt $I11, rx1152_eos, rx1152_fail + sub $I11, rx1152_pos, rx1152_off + substr $S10, rx1152_tgt, $I11, 2 + ne $S10, "+|", rx1152_fail + add rx1152_pos, 2 + set_addr $I10, rxcap_1157_fail + ($I12, $I11) = rx1152_cur."!mark_peek"($I10) + rx1152_cur."!cursor_pos"($I11) + ($P10) = rx1152_cur."!cursor_start"() + $P10."!cursor_pass"(rx1152_pos, "") + rx1152_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1156_done - rxcap_1156_fail: - goto rx1151_fail - rxcap_1156_done: + goto rxcap_1157_done + rxcap_1157_fail: + goto rx1152_fail + rxcap_1157_done: # rx subrule "O" subtype=capture negate= - rx1151_cur."!cursor_pos"(rx1151_pos) - $P10 = rx1151_cur."O"("%relational, :pirop") - unless $P10, rx1151_fail - rx1151_cur."!mark_push"(0, -1, 0, $P10) + rx1152_cur."!cursor_pos"(rx1152_pos) + $P10 = rx1152_cur."O"("%additive, :pirop") + unless $P10, rx1152_fail + rx1152_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1151_pos = $P10."pos"() + rx1152_pos = $P10."pos"() # rx pass - rx1151_cur."!cursor_pass"(rx1151_pos, "infix:sym") - if_null rx1151_debug, debug_917 - rx1151_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1151_pos) + rx1152_cur."!cursor_pass"(rx1152_pos, "infix:sym<+|>") + if_null rx1152_debug, debug_915 + rx1152_cur."!cursor_debug"("PASS", "infix:sym<+|>", " at pos=", rx1152_pos) + debug_915: + .return (rx1152_cur) + rx1152_restart: +.annotate 'line', 454 + if_null rx1152_debug, debug_916 + rx1152_cur."!cursor_debug"("NEXT", "infix:sym<+|>") + debug_916: + rx1152_fail: + (rx1152_rep, rx1152_pos, $I10, $P10) = rx1152_cur."!mark_fail"(0) + lt rx1152_pos, -1, rx1152_done + eq rx1152_pos, -1, rx1152_fail + jump $I10 + rx1152_done: + rx1152_cur."!cursor_fail"() + if_null rx1152_debug, debug_917 + rx1152_cur."!cursor_debug"("FAIL", "infix:sym<+|>") 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: - rx1151_fail: - (rx1151_rep, rx1151_pos, $I10, $P10) = rx1151_cur."!mark_fail"(0) - lt rx1151_pos, -1, rx1151_done - eq rx1151_pos, -1, rx1151_fail - jump $I10 - rx1151_done: - rx1151_cur."!cursor_fail"() - if_null rx1151_debug, debug_919 - rx1151_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_919: - .return (rx1151_cur) + .return (rx1152_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("297_1282016529.10767") :method -.annotate 'line', 447 - $P1153 = self."!PREFIX__!subrule"("O", "!=") - new $P1154, "ResizablePMCArray" - push $P1154, $P1153 - .return ($P1154) +.sub "!PREFIX__infix:sym<+|>" :subid("295_1284728478.15265") :method +.annotate 'line', 454 + $P1154 = self."!PREFIX__!subrule"("O", "+|") + new $P1155, "ResizablePMCArray" + push $P1155, $P1154 + .return ($P1155) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<<=>" :subid("298_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1158_tgt - .local int rx1158_pos - .local int rx1158_off - .local int rx1158_eos - .local int rx1158_rep - .local pmc rx1158_cur - .local pmc rx1158_debug - (rx1158_cur, rx1158_pos, rx1158_tgt, $I10) = self."!cursor_start"() - getattribute rx1158_debug, rx1158_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1158_cur - .local pmc match - .lex "$/", match - length rx1158_eos, rx1158_tgt - gt rx1158_pos, rx1158_eos, rx1158_done - set rx1158_off, 0 - lt rx1158_pos, 2, rx1158_start - sub rx1158_off, rx1158_pos, 1 - substr rx1158_tgt, rx1158_tgt, rx1158_off - rx1158_start: - eq $I10, 1, rx1158_restart - if_null rx1158_debug, debug_920 - rx1158_cur."!cursor_debug"("START ", "infix:sym<<=>") - debug_920: +.sub "infix:sym<+^>" :subid("296_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1159_tgt + .local int rx1159_pos + .local int rx1159_off + .local int rx1159_eos + .local int rx1159_rep + .local pmc rx1159_cur + .local pmc rx1159_debug + (rx1159_cur, rx1159_pos, rx1159_tgt, $I10) = self."!cursor_start"() + getattribute rx1159_debug, rx1159_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1159_cur + .local pmc match + .lex "$/", match + length rx1159_eos, rx1159_tgt + gt rx1159_pos, rx1159_eos, rx1159_done + set rx1159_off, 0 + lt rx1159_pos, 2, rx1159_start + sub rx1159_off, rx1159_pos, 1 + substr rx1159_tgt, rx1159_tgt, rx1159_off + rx1159_start: + eq $I10, 1, rx1159_restart + if_null rx1159_debug, debug_918 + rx1159_cur."!cursor_debug"("START", "infix:sym<+^>") + debug_918: $I10 = self.'from'() - ne $I10, -1, rxscan1162_done - goto rxscan1162_scan - rxscan1162_loop: - ($P10) = rx1158_cur."from"() - inc $P10 - set rx1158_pos, $P10 - ge rx1158_pos, rx1158_eos, rxscan1162_done - rxscan1162_scan: - set_addr $I10, rxscan1162_loop - rx1158_cur."!mark_push"(0, rx1158_pos, $I10) - rxscan1162_done: -.annotate 'line', 521 + ne $I10, -1, rxscan1163_done + goto rxscan1163_scan + rxscan1163_loop: + ($P10) = rx1159_cur."from"() + inc $P10 + set rx1159_pos, $P10 + ge rx1159_pos, rx1159_eos, rxscan1163_done + rxscan1163_scan: + set_addr $I10, rxscan1163_loop + rx1159_cur."!mark_push"(0, rx1159_pos, $I10) + rxscan1163_done: +.annotate 'line', 522 # rx subcapture "sym" - set_addr $I10, rxcap_1163_fail - rx1158_cur."!mark_push"(0, rx1158_pos, $I10) - # rx literal "<=" - add $I11, rx1158_pos, 2 - gt $I11, rx1158_eos, rx1158_fail - sub $I11, rx1158_pos, rx1158_off - substr $S10, rx1158_tgt, $I11, 2 - ne $S10, "<=", rx1158_fail - add rx1158_pos, 2 - set_addr $I10, rxcap_1163_fail - ($I12, $I11) = rx1158_cur."!mark_peek"($I10) - rx1158_cur."!cursor_pos"($I11) - ($P10) = rx1158_cur."!cursor_start"() - $P10."!cursor_pass"(rx1158_pos, "") - rx1158_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1164_fail + rx1159_cur."!mark_push"(0, rx1159_pos, $I10) + # rx literal "+^" + add $I11, rx1159_pos, 2 + gt $I11, rx1159_eos, rx1159_fail + sub $I11, rx1159_pos, rx1159_off + substr $S10, rx1159_tgt, $I11, 2 + ne $S10, "+^", rx1159_fail + add rx1159_pos, 2 + set_addr $I10, rxcap_1164_fail + ($I12, $I11) = rx1159_cur."!mark_peek"($I10) + rx1159_cur."!cursor_pos"($I11) + ($P10) = rx1159_cur."!cursor_start"() + $P10."!cursor_pass"(rx1159_pos, "") + rx1159_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1163_done - rxcap_1163_fail: - goto rx1158_fail - rxcap_1163_done: + goto rxcap_1164_done + rxcap_1164_fail: + goto rx1159_fail + rxcap_1164_done: # rx subrule "O" subtype=capture negate= - rx1158_cur."!cursor_pos"(rx1158_pos) - $P10 = rx1158_cur."O"("%relational, :pirop") - unless $P10, rx1158_fail - rx1158_cur."!mark_push"(0, -1, 0, $P10) + rx1159_cur."!cursor_pos"(rx1159_pos) + $P10 = rx1159_cur."O"("%additive, :pirop") + unless $P10, rx1159_fail + rx1159_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1158_pos = $P10."pos"() + rx1159_pos = $P10."pos"() # rx pass - rx1158_cur."!cursor_pass"(rx1158_pos, "infix:sym<<=>") - if_null rx1158_debug, debug_921 - rx1158_cur."!cursor_debug"("PASS ", "infix:sym<<=>", " at pos=", rx1158_pos) + rx1159_cur."!cursor_pass"(rx1159_pos, "infix:sym<+^>") + if_null rx1159_debug, debug_919 + rx1159_cur."!cursor_debug"("PASS", "infix:sym<+^>", " at pos=", rx1159_pos) + debug_919: + .return (rx1159_cur) + rx1159_restart: +.annotate 'line', 454 + if_null rx1159_debug, debug_920 + rx1159_cur."!cursor_debug"("NEXT", "infix:sym<+^>") + debug_920: + rx1159_fail: + (rx1159_rep, rx1159_pos, $I10, $P10) = rx1159_cur."!mark_fail"(0) + lt rx1159_pos, -1, rx1159_done + eq rx1159_pos, -1, rx1159_fail + jump $I10 + rx1159_done: + rx1159_cur."!cursor_fail"() + if_null rx1159_debug, debug_921 + rx1159_cur."!cursor_debug"("FAIL", "infix:sym<+^>") 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: - rx1158_fail: - (rx1158_rep, rx1158_pos, $I10, $P10) = rx1158_cur."!mark_fail"(0) - lt rx1158_pos, -1, rx1158_done - eq rx1158_pos, -1, rx1158_fail - jump $I10 - rx1158_done: - rx1158_cur."!cursor_fail"() - if_null rx1158_debug, debug_923 - rx1158_cur."!cursor_debug"("FAIL ", "infix:sym<<=>") - debug_923: - .return (rx1158_cur) + .return (rx1159_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<<=>" :subid("299_1282016529.10767") :method -.annotate 'line', 447 - $P1160 = self."!PREFIX__!subrule"("O", "<=") - new $P1161, "ResizablePMCArray" - push $P1161, $P1160 - .return ($P1161) +.sub "!PREFIX__infix:sym<+^>" :subid("297_1284728478.15265") :method +.annotate 'line', 454 + $P1161 = self."!PREFIX__!subrule"("O", "+^") + new $P1162, "ResizablePMCArray" + push $P1162, $P1161 + .return ($P1162) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<>=>" :subid("300_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1165_tgt - .local int rx1165_pos - .local int rx1165_off - .local int rx1165_eos - .local int rx1165_rep - .local pmc rx1165_cur - .local pmc rx1165_debug - (rx1165_cur, rx1165_pos, rx1165_tgt, $I10) = self."!cursor_start"() - getattribute rx1165_debug, rx1165_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1165_cur - .local pmc match - .lex "$/", match - length rx1165_eos, rx1165_tgt - gt rx1165_pos, rx1165_eos, rx1165_done - set rx1165_off, 0 - lt rx1165_pos, 2, rx1165_start - sub rx1165_off, rx1165_pos, 1 - substr rx1165_tgt, rx1165_tgt, rx1165_off - rx1165_start: - eq $I10, 1, rx1165_restart - if_null rx1165_debug, debug_924 - rx1165_cur."!cursor_debug"("START ", "infix:sym<>=>") - debug_924: +.sub "infix:sym<~>" :subid("298_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1166_tgt + .local int rx1166_pos + .local int rx1166_off + .local int rx1166_eos + .local int rx1166_rep + .local pmc rx1166_cur + .local pmc rx1166_debug + (rx1166_cur, rx1166_pos, rx1166_tgt, $I10) = self."!cursor_start"() + getattribute rx1166_debug, rx1166_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1166_cur + .local pmc match + .lex "$/", match + length rx1166_eos, rx1166_tgt + gt rx1166_pos, rx1166_eos, rx1166_done + set rx1166_off, 0 + lt rx1166_pos, 2, rx1166_start + sub rx1166_off, rx1166_pos, 1 + substr rx1166_tgt, rx1166_tgt, rx1166_off + rx1166_start: + eq $I10, 1, rx1166_restart + if_null rx1166_debug, debug_922 + rx1166_cur."!cursor_debug"("START", "infix:sym<~>") + debug_922: $I10 = self.'from'() - ne $I10, -1, rxscan1169_done - goto rxscan1169_scan - rxscan1169_loop: - ($P10) = rx1165_cur."from"() - inc $P10 - set rx1165_pos, $P10 - ge rx1165_pos, rx1165_eos, rxscan1169_done - rxscan1169_scan: - set_addr $I10, rxscan1169_loop - rx1165_cur."!mark_push"(0, rx1165_pos, $I10) - rxscan1169_done: -.annotate 'line', 522 + ne $I10, -1, rxscan1170_done + goto rxscan1170_scan + rxscan1170_loop: + ($P10) = rx1166_cur."from"() + inc $P10 + set rx1166_pos, $P10 + ge rx1166_pos, rx1166_eos, rxscan1170_done + rxscan1170_scan: + set_addr $I10, rxscan1170_loop + rx1166_cur."!mark_push"(0, rx1166_pos, $I10) + rxscan1170_done: +.annotate 'line', 524 # rx subcapture "sym" - set_addr $I10, rxcap_1170_fail - rx1165_cur."!mark_push"(0, rx1165_pos, $I10) - # rx literal ">=" - add $I11, rx1165_pos, 2 - gt $I11, rx1165_eos, rx1165_fail - sub $I11, rx1165_pos, rx1165_off - substr $S10, rx1165_tgt, $I11, 2 - ne $S10, ">=", rx1165_fail - add rx1165_pos, 2 - set_addr $I10, rxcap_1170_fail - ($I12, $I11) = rx1165_cur."!mark_peek"($I10) - rx1165_cur."!cursor_pos"($I11) - ($P10) = rx1165_cur."!cursor_start"() - $P10."!cursor_pass"(rx1165_pos, "") - rx1165_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1171_fail + rx1166_cur."!mark_push"(0, rx1166_pos, $I10) + # rx literal "~" + add $I11, rx1166_pos, 1 + gt $I11, rx1166_eos, rx1166_fail + sub $I11, rx1166_pos, rx1166_off + ord $I11, rx1166_tgt, $I11 + ne $I11, 126, rx1166_fail + add rx1166_pos, 1 + set_addr $I10, rxcap_1171_fail + ($I12, $I11) = rx1166_cur."!mark_peek"($I10) + rx1166_cur."!cursor_pos"($I11) + ($P10) = rx1166_cur."!cursor_start"() + $P10."!cursor_pass"(rx1166_pos, "") + rx1166_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1170_done - rxcap_1170_fail: - goto rx1165_fail - rxcap_1170_done: + goto rxcap_1171_done + rxcap_1171_fail: + goto rx1166_fail + rxcap_1171_done: # rx subrule "O" subtype=capture negate= - rx1165_cur."!cursor_pos"(rx1165_pos) - $P10 = rx1165_cur."O"("%relational, :pirop") - unless $P10, rx1165_fail - rx1165_cur."!mark_push"(0, -1, 0, $P10) + rx1166_cur."!cursor_pos"(rx1166_pos) + $P10 = rx1166_cur."O"("%concatenation , :pirop") + unless $P10, rx1166_fail + rx1166_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1165_pos = $P10."pos"() + rx1166_pos = $P10."pos"() # rx pass - rx1165_cur."!cursor_pass"(rx1165_pos, "infix:sym<>=>") - if_null rx1165_debug, debug_925 - rx1165_cur."!cursor_debug"("PASS ", "infix:sym<>=>", " at pos=", rx1165_pos) + rx1166_cur."!cursor_pass"(rx1166_pos, "infix:sym<~>") + if_null rx1166_debug, debug_923 + rx1166_cur."!cursor_debug"("PASS", "infix:sym<~>", " at pos=", rx1166_pos) + debug_923: + .return (rx1166_cur) + rx1166_restart: +.annotate 'line', 454 + if_null rx1166_debug, debug_924 + rx1166_cur."!cursor_debug"("NEXT", "infix:sym<~>") + debug_924: + rx1166_fail: + (rx1166_rep, rx1166_pos, $I10, $P10) = rx1166_cur."!mark_fail"(0) + lt rx1166_pos, -1, rx1166_done + eq rx1166_pos, -1, rx1166_fail + jump $I10 + rx1166_done: + rx1166_cur."!cursor_fail"() + if_null rx1166_debug, debug_925 + rx1166_cur."!cursor_debug"("FAIL", "infix:sym<~>") 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: - rx1165_fail: - (rx1165_rep, rx1165_pos, $I10, $P10) = rx1165_cur."!mark_fail"(0) - lt rx1165_pos, -1, rx1165_done - eq rx1165_pos, -1, rx1165_fail - jump $I10 - rx1165_done: - rx1165_cur."!cursor_fail"() - if_null rx1165_debug, debug_927 - rx1165_cur."!cursor_debug"("FAIL ", "infix:sym<>=>") - debug_927: - .return (rx1165_cur) + .return (rx1166_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<>=>" :subid("301_1282016529.10767") :method -.annotate 'line', 447 - $P1167 = self."!PREFIX__!subrule"("O", ">=") - new $P1168, "ResizablePMCArray" - push $P1168, $P1167 - .return ($P1168) +.sub "!PREFIX__infix:sym<~>" :subid("299_1284728478.15265") :method +.annotate 'line', 454 + $P1168 = self."!PREFIX__!subrule"("O", "~") + new $P1169, "ResizablePMCArray" + push $P1169, $P1168 + .return ($P1169) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<<>" :subid("302_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1172_tgt - .local int rx1172_pos - .local int rx1172_off - .local int rx1172_eos - .local int rx1172_rep - .local pmc rx1172_cur - .local pmc rx1172_debug - (rx1172_cur, rx1172_pos, rx1172_tgt, $I10) = self."!cursor_start"() - getattribute rx1172_debug, rx1172_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1172_cur - .local pmc match - .lex "$/", match - length rx1172_eos, rx1172_tgt - gt rx1172_pos, rx1172_eos, rx1172_done - set rx1172_off, 0 - lt rx1172_pos, 2, rx1172_start - sub rx1172_off, rx1172_pos, 1 - substr rx1172_tgt, rx1172_tgt, rx1172_off - rx1172_start: - eq $I10, 1, rx1172_restart - if_null rx1172_debug, debug_928 - rx1172_cur."!cursor_debug"("START ", "infix:sym<<>") - debug_928: +.sub "infix:sym<==>" :subid("300_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1173_tgt + .local int rx1173_pos + .local int rx1173_off + .local int rx1173_eos + .local int rx1173_rep + .local pmc rx1173_cur + .local pmc rx1173_debug + (rx1173_cur, rx1173_pos, rx1173_tgt, $I10) = self."!cursor_start"() + getattribute rx1173_debug, rx1173_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1173_cur + .local pmc match + .lex "$/", match + length rx1173_eos, rx1173_tgt + gt rx1173_pos, rx1173_eos, rx1173_done + set rx1173_off, 0 + lt rx1173_pos, 2, rx1173_start + sub rx1173_off, rx1173_pos, 1 + substr rx1173_tgt, rx1173_tgt, rx1173_off + rx1173_start: + eq $I10, 1, rx1173_restart + if_null rx1173_debug, debug_926 + rx1173_cur."!cursor_debug"("START", "infix:sym<==>") + debug_926: $I10 = self.'from'() - ne $I10, -1, rxscan1176_done - goto rxscan1176_scan - rxscan1176_loop: - ($P10) = rx1172_cur."from"() - inc $P10 - set rx1172_pos, $P10 - ge rx1172_pos, rx1172_eos, rxscan1176_done - rxscan1176_scan: - set_addr $I10, rxscan1176_loop - rx1172_cur."!mark_push"(0, rx1172_pos, $I10) - rxscan1176_done: -.annotate 'line', 523 + ne $I10, -1, rxscan1177_done + goto rxscan1177_scan + rxscan1177_loop: + ($P10) = rx1173_cur."from"() + inc $P10 + set rx1173_pos, $P10 + ge rx1173_pos, rx1173_eos, rxscan1177_done + rxscan1177_scan: + set_addr $I10, rxscan1177_loop + rx1173_cur."!mark_push"(0, rx1173_pos, $I10) + rxscan1177_done: +.annotate 'line', 526 # rx subcapture "sym" - set_addr $I10, rxcap_1177_fail - rx1172_cur."!mark_push"(0, rx1172_pos, $I10) - # rx literal "<" - add $I11, rx1172_pos, 1 - gt $I11, rx1172_eos, rx1172_fail - sub $I11, rx1172_pos, rx1172_off - ord $I11, rx1172_tgt, $I11 - ne $I11, 60, rx1172_fail - add rx1172_pos, 1 - set_addr $I10, rxcap_1177_fail - ($I12, $I11) = rx1172_cur."!mark_peek"($I10) - rx1172_cur."!cursor_pos"($I11) - ($P10) = rx1172_cur."!cursor_start"() - $P10."!cursor_pass"(rx1172_pos, "") - rx1172_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1178_fail + rx1173_cur."!mark_push"(0, rx1173_pos, $I10) + # rx literal "==" + add $I11, rx1173_pos, 2 + gt $I11, rx1173_eos, rx1173_fail + sub $I11, rx1173_pos, rx1173_off + substr $S10, rx1173_tgt, $I11, 2 + ne $S10, "==", rx1173_fail + add rx1173_pos, 2 + set_addr $I10, rxcap_1178_fail + ($I12, $I11) = rx1173_cur."!mark_peek"($I10) + rx1173_cur."!cursor_pos"($I11) + ($P10) = rx1173_cur."!cursor_start"() + $P10."!cursor_pass"(rx1173_pos, "") + rx1173_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1177_done - rxcap_1177_fail: - goto rx1172_fail - rxcap_1177_done: + goto rxcap_1178_done + rxcap_1178_fail: + goto rx1173_fail + rxcap_1178_done: # rx subrule "O" subtype=capture negate= - rx1172_cur."!cursor_pos"(rx1172_pos) - $P10 = rx1172_cur."O"("%relational, :pirop") - unless $P10, rx1172_fail - rx1172_cur."!mark_push"(0, -1, 0, $P10) + rx1173_cur."!cursor_pos"(rx1173_pos) + $P10 = rx1173_cur."O"("%relational, :pirop") + unless $P10, rx1173_fail + rx1173_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1172_pos = $P10."pos"() + rx1173_pos = $P10."pos"() # rx pass - rx1172_cur."!cursor_pass"(rx1172_pos, "infix:sym<<>") - if_null rx1172_debug, debug_929 - rx1172_cur."!cursor_debug"("PASS ", "infix:sym<<>", " at pos=", rx1172_pos) + rx1173_cur."!cursor_pass"(rx1173_pos, "infix:sym<==>") + if_null rx1173_debug, debug_927 + rx1173_cur."!cursor_debug"("PASS", "infix:sym<==>", " at pos=", rx1173_pos) + debug_927: + .return (rx1173_cur) + rx1173_restart: +.annotate 'line', 454 + if_null rx1173_debug, debug_928 + rx1173_cur."!cursor_debug"("NEXT", "infix:sym<==>") + debug_928: + rx1173_fail: + (rx1173_rep, rx1173_pos, $I10, $P10) = rx1173_cur."!mark_fail"(0) + lt rx1173_pos, -1, rx1173_done + eq rx1173_pos, -1, rx1173_fail + jump $I10 + rx1173_done: + rx1173_cur."!cursor_fail"() + if_null rx1173_debug, debug_929 + rx1173_cur."!cursor_debug"("FAIL", "infix:sym<==>") 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: - rx1172_fail: - (rx1172_rep, rx1172_pos, $I10, $P10) = rx1172_cur."!mark_fail"(0) - lt rx1172_pos, -1, rx1172_done - eq rx1172_pos, -1, rx1172_fail - jump $I10 - rx1172_done: - rx1172_cur."!cursor_fail"() - if_null rx1172_debug, debug_931 - rx1172_cur."!cursor_debug"("FAIL ", "infix:sym<<>") - debug_931: - .return (rx1172_cur) + .return (rx1173_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<<>" :subid("303_1282016529.10767") :method -.annotate 'line', 447 - $P1174 = self."!PREFIX__!subrule"("O", "<") - new $P1175, "ResizablePMCArray" - push $P1175, $P1174 - .return ($P1175) +.sub "!PREFIX__infix:sym<==>" :subid("301_1284728478.15265") :method +.annotate 'line', 454 + $P1175 = self."!PREFIX__!subrule"("O", "==") + new $P1176, "ResizablePMCArray" + push $P1176, $P1175 + .return ($P1176) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<>>" :subid("304_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1179_tgt - .local int rx1179_pos - .local int rx1179_off - .local int rx1179_eos - .local int rx1179_rep - .local pmc rx1179_cur - .local pmc rx1179_debug - (rx1179_cur, rx1179_pos, rx1179_tgt, $I10) = self."!cursor_start"() - getattribute rx1179_debug, rx1179_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1179_cur - .local pmc match - .lex "$/", match - length rx1179_eos, rx1179_tgt - gt rx1179_pos, rx1179_eos, rx1179_done - set rx1179_off, 0 - lt rx1179_pos, 2, rx1179_start - sub rx1179_off, rx1179_pos, 1 - substr rx1179_tgt, rx1179_tgt, rx1179_off - rx1179_start: - eq $I10, 1, rx1179_restart - if_null rx1179_debug, debug_932 - rx1179_cur."!cursor_debug"("START ", "infix:sym<>>") - debug_932: +.sub "infix:sym" :subid("302_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1180_tgt + .local int rx1180_pos + .local int rx1180_off + .local int rx1180_eos + .local int rx1180_rep + .local pmc rx1180_cur + .local pmc rx1180_debug + (rx1180_cur, rx1180_pos, rx1180_tgt, $I10) = self."!cursor_start"() + getattribute rx1180_debug, rx1180_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1180_cur + .local pmc match + .lex "$/", match + length rx1180_eos, rx1180_tgt + gt rx1180_pos, rx1180_eos, rx1180_done + set rx1180_off, 0 + lt rx1180_pos, 2, rx1180_start + sub rx1180_off, rx1180_pos, 1 + substr rx1180_tgt, rx1180_tgt, rx1180_off + rx1180_start: + eq $I10, 1, rx1180_restart + if_null rx1180_debug, debug_930 + rx1180_cur."!cursor_debug"("START", "infix:sym") + debug_930: $I10 = self.'from'() - ne $I10, -1, rxscan1183_done - goto rxscan1183_scan - rxscan1183_loop: - ($P10) = rx1179_cur."from"() - inc $P10 - set rx1179_pos, $P10 - ge rx1179_pos, rx1179_eos, rxscan1183_done - rxscan1183_scan: - set_addr $I10, rxscan1183_loop - rx1179_cur."!mark_push"(0, rx1179_pos, $I10) - rxscan1183_done: -.annotate 'line', 524 + ne $I10, -1, rxscan1184_done + goto rxscan1184_scan + rxscan1184_loop: + ($P10) = rx1180_cur."from"() + inc $P10 + set rx1180_pos, $P10 + ge rx1180_pos, rx1180_eos, rxscan1184_done + rxscan1184_scan: + set_addr $I10, rxscan1184_loop + rx1180_cur."!mark_push"(0, rx1180_pos, $I10) + rxscan1184_done: +.annotate 'line', 527 # rx subcapture "sym" - set_addr $I10, rxcap_1184_fail - rx1179_cur."!mark_push"(0, rx1179_pos, $I10) - # rx literal ">" - add $I11, rx1179_pos, 1 - gt $I11, rx1179_eos, rx1179_fail - sub $I11, rx1179_pos, rx1179_off - ord $I11, rx1179_tgt, $I11 - ne $I11, 62, rx1179_fail - add rx1179_pos, 1 - set_addr $I10, rxcap_1184_fail - ($I12, $I11) = rx1179_cur."!mark_peek"($I10) - rx1179_cur."!cursor_pos"($I11) - ($P10) = rx1179_cur."!cursor_start"() - $P10."!cursor_pass"(rx1179_pos, "") - rx1179_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1185_fail + rx1180_cur."!mark_push"(0, rx1180_pos, $I10) + # rx literal "!=" + add $I11, rx1180_pos, 2 + gt $I11, rx1180_eos, rx1180_fail + sub $I11, rx1180_pos, rx1180_off + substr $S10, rx1180_tgt, $I11, 2 + ne $S10, "!=", rx1180_fail + add rx1180_pos, 2 + set_addr $I10, rxcap_1185_fail + ($I12, $I11) = rx1180_cur."!mark_peek"($I10) + rx1180_cur."!cursor_pos"($I11) + ($P10) = rx1180_cur."!cursor_start"() + $P10."!cursor_pass"(rx1180_pos, "") + rx1180_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1184_done - rxcap_1184_fail: - goto rx1179_fail - rxcap_1184_done: + goto rxcap_1185_done + rxcap_1185_fail: + goto rx1180_fail + rxcap_1185_done: # rx subrule "O" subtype=capture negate= - rx1179_cur."!cursor_pos"(rx1179_pos) - $P10 = rx1179_cur."O"("%relational, :pirop") - unless $P10, rx1179_fail - rx1179_cur."!mark_push"(0, -1, 0, $P10) + rx1180_cur."!cursor_pos"(rx1180_pos) + $P10 = rx1180_cur."O"("%relational, :pirop") + unless $P10, rx1180_fail + rx1180_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1179_pos = $P10."pos"() + rx1180_pos = $P10."pos"() # rx pass - rx1179_cur."!cursor_pass"(rx1179_pos, "infix:sym<>>") - if_null rx1179_debug, debug_933 - rx1179_cur."!cursor_debug"("PASS ", "infix:sym<>>", " at pos=", rx1179_pos) + rx1180_cur."!cursor_pass"(rx1180_pos, "infix:sym") + if_null rx1180_debug, debug_931 + rx1180_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1180_pos) + debug_931: + .return (rx1180_cur) + rx1180_restart: +.annotate 'line', 454 + if_null rx1180_debug, debug_932 + rx1180_cur."!cursor_debug"("NEXT", "infix:sym") + debug_932: + rx1180_fail: + (rx1180_rep, rx1180_pos, $I10, $P10) = rx1180_cur."!mark_fail"(0) + lt rx1180_pos, -1, rx1180_done + eq rx1180_pos, -1, rx1180_fail + jump $I10 + rx1180_done: + rx1180_cur."!cursor_fail"() + if_null rx1180_debug, debug_933 + rx1180_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1179_fail: - (rx1179_rep, rx1179_pos, $I10, $P10) = rx1179_cur."!mark_fail"(0) - lt rx1179_pos, -1, rx1179_done - eq rx1179_pos, -1, rx1179_fail - jump $I10 - rx1179_done: - rx1179_cur."!cursor_fail"() - if_null rx1179_debug, debug_935 - rx1179_cur."!cursor_debug"("FAIL ", "infix:sym<>>") - debug_935: - .return (rx1179_cur) + .return (rx1180_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<>>" :subid("305_1282016529.10767") :method -.annotate 'line', 447 - $P1181 = self."!PREFIX__!subrule"("O", ">") - new $P1182, "ResizablePMCArray" - push $P1182, $P1181 - .return ($P1182) +.sub "!PREFIX__infix:sym" :subid("303_1284728478.15265") :method +.annotate 'line', 454 + $P1182 = self."!PREFIX__!subrule"("O", "!=") + new $P1183, "ResizablePMCArray" + push $P1183, $P1182 + .return ($P1183) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("306_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1186_tgt - .local int rx1186_pos - .local int rx1186_off - .local int rx1186_eos - .local int rx1186_rep - .local pmc rx1186_cur - .local pmc rx1186_debug - (rx1186_cur, rx1186_pos, rx1186_tgt, $I10) = self."!cursor_start"() - getattribute rx1186_debug, rx1186_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1186_cur - .local pmc match - .lex "$/", match - length rx1186_eos, rx1186_tgt - gt rx1186_pos, rx1186_eos, rx1186_done - set rx1186_off, 0 - lt rx1186_pos, 2, rx1186_start - sub rx1186_off, rx1186_pos, 1 - substr rx1186_tgt, rx1186_tgt, rx1186_off - rx1186_start: - eq $I10, 1, rx1186_restart - if_null rx1186_debug, debug_936 - rx1186_cur."!cursor_debug"("START ", "infix:sym") - debug_936: +.sub "infix:sym<<=>" :subid("304_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1187_tgt + .local int rx1187_pos + .local int rx1187_off + .local int rx1187_eos + .local int rx1187_rep + .local pmc rx1187_cur + .local pmc rx1187_debug + (rx1187_cur, rx1187_pos, rx1187_tgt, $I10) = self."!cursor_start"() + getattribute rx1187_debug, rx1187_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1187_cur + .local pmc match + .lex "$/", match + length rx1187_eos, rx1187_tgt + gt rx1187_pos, rx1187_eos, rx1187_done + set rx1187_off, 0 + lt rx1187_pos, 2, rx1187_start + sub rx1187_off, rx1187_pos, 1 + substr rx1187_tgt, rx1187_tgt, rx1187_off + rx1187_start: + eq $I10, 1, rx1187_restart + if_null rx1187_debug, debug_934 + rx1187_cur."!cursor_debug"("START", "infix:sym<<=>") + debug_934: $I10 = self.'from'() - ne $I10, -1, rxscan1190_done - goto rxscan1190_scan - rxscan1190_loop: - ($P10) = rx1186_cur."from"() - inc $P10 - set rx1186_pos, $P10 - ge rx1186_pos, rx1186_eos, rxscan1190_done - rxscan1190_scan: - set_addr $I10, rxscan1190_loop - rx1186_cur."!mark_push"(0, rx1186_pos, $I10) - rxscan1190_done: -.annotate 'line', 525 + ne $I10, -1, rxscan1191_done + goto rxscan1191_scan + rxscan1191_loop: + ($P10) = rx1187_cur."from"() + inc $P10 + set rx1187_pos, $P10 + ge rx1187_pos, rx1187_eos, rxscan1191_done + rxscan1191_scan: + set_addr $I10, rxscan1191_loop + rx1187_cur."!mark_push"(0, rx1187_pos, $I10) + rxscan1191_done: +.annotate 'line', 528 # rx subcapture "sym" - set_addr $I10, rxcap_1191_fail - rx1186_cur."!mark_push"(0, rx1186_pos, $I10) - # rx literal "eq" - add $I11, rx1186_pos, 2 - gt $I11, rx1186_eos, rx1186_fail - sub $I11, rx1186_pos, rx1186_off - substr $S10, rx1186_tgt, $I11, 2 - ne $S10, "eq", rx1186_fail - add rx1186_pos, 2 - set_addr $I10, rxcap_1191_fail - ($I12, $I11) = rx1186_cur."!mark_peek"($I10) - rx1186_cur."!cursor_pos"($I11) - ($P10) = rx1186_cur."!cursor_start"() - $P10."!cursor_pass"(rx1186_pos, "") - rx1186_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1192_fail + rx1187_cur."!mark_push"(0, rx1187_pos, $I10) + # rx literal "<=" + add $I11, rx1187_pos, 2 + gt $I11, rx1187_eos, rx1187_fail + sub $I11, rx1187_pos, rx1187_off + substr $S10, rx1187_tgt, $I11, 2 + ne $S10, "<=", rx1187_fail + add rx1187_pos, 2 + set_addr $I10, rxcap_1192_fail + ($I12, $I11) = rx1187_cur."!mark_peek"($I10) + rx1187_cur."!cursor_pos"($I11) + ($P10) = rx1187_cur."!cursor_start"() + $P10."!cursor_pass"(rx1187_pos, "") + rx1187_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1191_done - rxcap_1191_fail: - goto rx1186_fail - rxcap_1191_done: + goto rxcap_1192_done + rxcap_1192_fail: + goto rx1187_fail + rxcap_1192_done: # rx subrule "O" subtype=capture negate= - rx1186_cur."!cursor_pos"(rx1186_pos) - $P10 = rx1186_cur."O"("%relational, :pirop") - unless $P10, rx1186_fail - rx1186_cur."!mark_push"(0, -1, 0, $P10) + rx1187_cur."!cursor_pos"(rx1187_pos) + $P10 = rx1187_cur."O"("%relational, :pirop") + unless $P10, rx1187_fail + rx1187_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1186_pos = $P10."pos"() + rx1187_pos = $P10."pos"() # rx pass - rx1186_cur."!cursor_pass"(rx1186_pos, "infix:sym") - if_null rx1186_debug, debug_937 - rx1186_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1186_pos) + rx1187_cur."!cursor_pass"(rx1187_pos, "infix:sym<<=>") + if_null rx1187_debug, debug_935 + rx1187_cur."!cursor_debug"("PASS", "infix:sym<<=>", " at pos=", rx1187_pos) + debug_935: + .return (rx1187_cur) + rx1187_restart: +.annotate 'line', 454 + if_null rx1187_debug, debug_936 + rx1187_cur."!cursor_debug"("NEXT", "infix:sym<<=>") + debug_936: + rx1187_fail: + (rx1187_rep, rx1187_pos, $I10, $P10) = rx1187_cur."!mark_fail"(0) + lt rx1187_pos, -1, rx1187_done + eq rx1187_pos, -1, rx1187_fail + jump $I10 + rx1187_done: + rx1187_cur."!cursor_fail"() + if_null rx1187_debug, debug_937 + rx1187_cur."!cursor_debug"("FAIL", "infix:sym<<=>") debug_937: - .return (rx1186_cur) - rx1186_restart: -.annotate 'line', 447 - if_null rx1186_debug, debug_938 - rx1186_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_938: - rx1186_fail: - (rx1186_rep, rx1186_pos, $I10, $P10) = rx1186_cur."!mark_fail"(0) - lt rx1186_pos, -1, rx1186_done - eq rx1186_pos, -1, rx1186_fail - jump $I10 - rx1186_done: - rx1186_cur."!cursor_fail"() - if_null rx1186_debug, debug_939 - rx1186_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_939: - .return (rx1186_cur) + .return (rx1187_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("307_1282016529.10767") :method -.annotate 'line', 447 - $P1188 = self."!PREFIX__!subrule"("O", "eq") - new $P1189, "ResizablePMCArray" - push $P1189, $P1188 - .return ($P1189) +.sub "!PREFIX__infix:sym<<=>" :subid("305_1284728478.15265") :method +.annotate 'line', 454 + $P1189 = self."!PREFIX__!subrule"("O", "<=") + new $P1190, "ResizablePMCArray" + push $P1190, $P1189 + .return ($P1190) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("308_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1193_tgt - .local int rx1193_pos - .local int rx1193_off - .local int rx1193_eos - .local int rx1193_rep - .local pmc rx1193_cur - .local pmc rx1193_debug - (rx1193_cur, rx1193_pos, rx1193_tgt, $I10) = self."!cursor_start"() - getattribute rx1193_debug, rx1193_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1193_cur - .local pmc match - .lex "$/", match - length rx1193_eos, rx1193_tgt - gt rx1193_pos, rx1193_eos, rx1193_done - set rx1193_off, 0 - lt rx1193_pos, 2, rx1193_start - sub rx1193_off, rx1193_pos, 1 - substr rx1193_tgt, rx1193_tgt, rx1193_off - rx1193_start: - eq $I10, 1, rx1193_restart - if_null rx1193_debug, debug_940 - rx1193_cur."!cursor_debug"("START ", "infix:sym") - debug_940: +.sub "infix:sym<>=>" :subid("306_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1194_tgt + .local int rx1194_pos + .local int rx1194_off + .local int rx1194_eos + .local int rx1194_rep + .local pmc rx1194_cur + .local pmc rx1194_debug + (rx1194_cur, rx1194_pos, rx1194_tgt, $I10) = self."!cursor_start"() + getattribute rx1194_debug, rx1194_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1194_cur + .local pmc match + .lex "$/", match + length rx1194_eos, rx1194_tgt + gt rx1194_pos, rx1194_eos, rx1194_done + set rx1194_off, 0 + lt rx1194_pos, 2, rx1194_start + sub rx1194_off, rx1194_pos, 1 + substr rx1194_tgt, rx1194_tgt, rx1194_off + rx1194_start: + eq $I10, 1, rx1194_restart + if_null rx1194_debug, debug_938 + rx1194_cur."!cursor_debug"("START", "infix:sym<>=>") + debug_938: $I10 = self.'from'() - ne $I10, -1, rxscan1197_done - goto rxscan1197_scan - rxscan1197_loop: - ($P10) = rx1193_cur."from"() - inc $P10 - set rx1193_pos, $P10 - ge rx1193_pos, rx1193_eos, rxscan1197_done - rxscan1197_scan: - set_addr $I10, rxscan1197_loop - rx1193_cur."!mark_push"(0, rx1193_pos, $I10) - rxscan1197_done: -.annotate 'line', 526 + ne $I10, -1, rxscan1198_done + goto rxscan1198_scan + rxscan1198_loop: + ($P10) = rx1194_cur."from"() + inc $P10 + set rx1194_pos, $P10 + ge rx1194_pos, rx1194_eos, rxscan1198_done + rxscan1198_scan: + set_addr $I10, rxscan1198_loop + rx1194_cur."!mark_push"(0, rx1194_pos, $I10) + rxscan1198_done: +.annotate 'line', 529 # rx subcapture "sym" - set_addr $I10, rxcap_1198_fail - rx1193_cur."!mark_push"(0, rx1193_pos, $I10) - # rx literal "ne" - add $I11, rx1193_pos, 2 - gt $I11, rx1193_eos, rx1193_fail - sub $I11, rx1193_pos, rx1193_off - substr $S10, rx1193_tgt, $I11, 2 - ne $S10, "ne", rx1193_fail - add rx1193_pos, 2 - set_addr $I10, rxcap_1198_fail - ($I12, $I11) = rx1193_cur."!mark_peek"($I10) - rx1193_cur."!cursor_pos"($I11) - ($P10) = rx1193_cur."!cursor_start"() - $P10."!cursor_pass"(rx1193_pos, "") - rx1193_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1199_fail + rx1194_cur."!mark_push"(0, rx1194_pos, $I10) + # rx literal ">=" + add $I11, rx1194_pos, 2 + gt $I11, rx1194_eos, rx1194_fail + sub $I11, rx1194_pos, rx1194_off + substr $S10, rx1194_tgt, $I11, 2 + ne $S10, ">=", rx1194_fail + add rx1194_pos, 2 + set_addr $I10, rxcap_1199_fail + ($I12, $I11) = rx1194_cur."!mark_peek"($I10) + rx1194_cur."!cursor_pos"($I11) + ($P10) = rx1194_cur."!cursor_start"() + $P10."!cursor_pass"(rx1194_pos, "") + rx1194_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1198_done - rxcap_1198_fail: - goto rx1193_fail - rxcap_1198_done: + goto rxcap_1199_done + rxcap_1199_fail: + goto rx1194_fail + rxcap_1199_done: # rx subrule "O" subtype=capture negate= - rx1193_cur."!cursor_pos"(rx1193_pos) - $P10 = rx1193_cur."O"("%relational, :pirop") - unless $P10, rx1193_fail - rx1193_cur."!mark_push"(0, -1, 0, $P10) + rx1194_cur."!cursor_pos"(rx1194_pos) + $P10 = rx1194_cur."O"("%relational, :pirop") + unless $P10, rx1194_fail + rx1194_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1193_pos = $P10."pos"() + rx1194_pos = $P10."pos"() # rx pass - rx1193_cur."!cursor_pass"(rx1193_pos, "infix:sym") - if_null rx1193_debug, debug_941 - rx1193_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1193_pos) + rx1194_cur."!cursor_pass"(rx1194_pos, "infix:sym<>=>") + if_null rx1194_debug, debug_939 + rx1194_cur."!cursor_debug"("PASS", "infix:sym<>=>", " at pos=", rx1194_pos) + debug_939: + .return (rx1194_cur) + rx1194_restart: +.annotate 'line', 454 + if_null rx1194_debug, debug_940 + rx1194_cur."!cursor_debug"("NEXT", "infix:sym<>=>") + debug_940: + rx1194_fail: + (rx1194_rep, rx1194_pos, $I10, $P10) = rx1194_cur."!mark_fail"(0) + lt rx1194_pos, -1, rx1194_done + eq rx1194_pos, -1, rx1194_fail + jump $I10 + rx1194_done: + rx1194_cur."!cursor_fail"() + if_null rx1194_debug, debug_941 + rx1194_cur."!cursor_debug"("FAIL", "infix:sym<>=>") debug_941: - .return (rx1193_cur) - rx1193_restart: -.annotate 'line', 447 - if_null rx1193_debug, debug_942 - rx1193_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_942: - rx1193_fail: - (rx1193_rep, rx1193_pos, $I10, $P10) = rx1193_cur."!mark_fail"(0) - lt rx1193_pos, -1, rx1193_done - eq rx1193_pos, -1, rx1193_fail - jump $I10 - rx1193_done: - rx1193_cur."!cursor_fail"() - if_null rx1193_debug, debug_943 - rx1193_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_943: - .return (rx1193_cur) + .return (rx1194_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("309_1282016529.10767") :method -.annotate 'line', 447 - $P1195 = self."!PREFIX__!subrule"("O", "ne") - new $P1196, "ResizablePMCArray" - push $P1196, $P1195 - .return ($P1196) +.sub "!PREFIX__infix:sym<>=>" :subid("307_1284728478.15265") :method +.annotate 'line', 454 + $P1196 = self."!PREFIX__!subrule"("O", ">=") + new $P1197, "ResizablePMCArray" + push $P1197, $P1196 + .return ($P1197) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("310_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1200_tgt - .local int rx1200_pos - .local int rx1200_off - .local int rx1200_eos - .local int rx1200_rep - .local pmc rx1200_cur - .local pmc rx1200_debug - (rx1200_cur, rx1200_pos, rx1200_tgt, $I10) = self."!cursor_start"() - getattribute rx1200_debug, rx1200_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1200_cur - .local pmc match - .lex "$/", match - length rx1200_eos, rx1200_tgt - gt rx1200_pos, rx1200_eos, rx1200_done - set rx1200_off, 0 - lt rx1200_pos, 2, rx1200_start - sub rx1200_off, rx1200_pos, 1 - substr rx1200_tgt, rx1200_tgt, rx1200_off - rx1200_start: - eq $I10, 1, rx1200_restart - if_null rx1200_debug, debug_944 - rx1200_cur."!cursor_debug"("START ", "infix:sym") - debug_944: +.sub "infix:sym<<>" :subid("308_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1201_tgt + .local int rx1201_pos + .local int rx1201_off + .local int rx1201_eos + .local int rx1201_rep + .local pmc rx1201_cur + .local pmc rx1201_debug + (rx1201_cur, rx1201_pos, rx1201_tgt, $I10) = self."!cursor_start"() + getattribute rx1201_debug, rx1201_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1201_cur + .local pmc match + .lex "$/", match + length rx1201_eos, rx1201_tgt + gt rx1201_pos, rx1201_eos, rx1201_done + set rx1201_off, 0 + lt rx1201_pos, 2, rx1201_start + sub rx1201_off, rx1201_pos, 1 + substr rx1201_tgt, rx1201_tgt, rx1201_off + rx1201_start: + eq $I10, 1, rx1201_restart + if_null rx1201_debug, debug_942 + rx1201_cur."!cursor_debug"("START", "infix:sym<<>") + debug_942: $I10 = self.'from'() - ne $I10, -1, rxscan1204_done - goto rxscan1204_scan - rxscan1204_loop: - ($P10) = rx1200_cur."from"() - inc $P10 - set rx1200_pos, $P10 - ge rx1200_pos, rx1200_eos, rxscan1204_done - rxscan1204_scan: - set_addr $I10, rxscan1204_loop - rx1200_cur."!mark_push"(0, rx1200_pos, $I10) - rxscan1204_done: -.annotate 'line', 527 + ne $I10, -1, rxscan1205_done + goto rxscan1205_scan + rxscan1205_loop: + ($P10) = rx1201_cur."from"() + inc $P10 + set rx1201_pos, $P10 + ge rx1201_pos, rx1201_eos, rxscan1205_done + rxscan1205_scan: + set_addr $I10, rxscan1205_loop + rx1201_cur."!mark_push"(0, rx1201_pos, $I10) + rxscan1205_done: +.annotate 'line', 530 # rx subcapture "sym" - set_addr $I10, rxcap_1205_fail - rx1200_cur."!mark_push"(0, rx1200_pos, $I10) - # rx literal "le" - add $I11, rx1200_pos, 2 - gt $I11, rx1200_eos, rx1200_fail - sub $I11, rx1200_pos, rx1200_off - substr $S10, rx1200_tgt, $I11, 2 - ne $S10, "le", rx1200_fail - add rx1200_pos, 2 - set_addr $I10, rxcap_1205_fail - ($I12, $I11) = rx1200_cur."!mark_peek"($I10) - rx1200_cur."!cursor_pos"($I11) - ($P10) = rx1200_cur."!cursor_start"() - $P10."!cursor_pass"(rx1200_pos, "") - rx1200_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1206_fail + rx1201_cur."!mark_push"(0, rx1201_pos, $I10) + # rx literal "<" + add $I11, rx1201_pos, 1 + gt $I11, rx1201_eos, rx1201_fail + sub $I11, rx1201_pos, rx1201_off + ord $I11, rx1201_tgt, $I11 + ne $I11, 60, rx1201_fail + add rx1201_pos, 1 + set_addr $I10, rxcap_1206_fail + ($I12, $I11) = rx1201_cur."!mark_peek"($I10) + rx1201_cur."!cursor_pos"($I11) + ($P10) = rx1201_cur."!cursor_start"() + $P10."!cursor_pass"(rx1201_pos, "") + rx1201_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1205_done - rxcap_1205_fail: - goto rx1200_fail - rxcap_1205_done: + goto rxcap_1206_done + rxcap_1206_fail: + goto rx1201_fail + rxcap_1206_done: # rx subrule "O" subtype=capture negate= - rx1200_cur."!cursor_pos"(rx1200_pos) - $P10 = rx1200_cur."O"("%relational, :pirop") - unless $P10, rx1200_fail - rx1200_cur."!mark_push"(0, -1, 0, $P10) + rx1201_cur."!cursor_pos"(rx1201_pos) + $P10 = rx1201_cur."O"("%relational, :pirop") + unless $P10, rx1201_fail + rx1201_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1200_pos = $P10."pos"() + rx1201_pos = $P10."pos"() # rx pass - rx1200_cur."!cursor_pass"(rx1200_pos, "infix:sym") - if_null rx1200_debug, debug_945 - rx1200_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1200_pos) + rx1201_cur."!cursor_pass"(rx1201_pos, "infix:sym<<>") + if_null rx1201_debug, debug_943 + rx1201_cur."!cursor_debug"("PASS", "infix:sym<<>", " at pos=", rx1201_pos) + debug_943: + .return (rx1201_cur) + rx1201_restart: +.annotate 'line', 454 + if_null rx1201_debug, debug_944 + rx1201_cur."!cursor_debug"("NEXT", "infix:sym<<>") + debug_944: + rx1201_fail: + (rx1201_rep, rx1201_pos, $I10, $P10) = rx1201_cur."!mark_fail"(0) + lt rx1201_pos, -1, rx1201_done + eq rx1201_pos, -1, rx1201_fail + jump $I10 + rx1201_done: + rx1201_cur."!cursor_fail"() + if_null rx1201_debug, debug_945 + rx1201_cur."!cursor_debug"("FAIL", "infix:sym<<>") debug_945: - .return (rx1200_cur) - rx1200_restart: -.annotate 'line', 447 - if_null rx1200_debug, debug_946 - rx1200_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_946: - rx1200_fail: - (rx1200_rep, rx1200_pos, $I10, $P10) = rx1200_cur."!mark_fail"(0) - lt rx1200_pos, -1, rx1200_done - eq rx1200_pos, -1, rx1200_fail - jump $I10 - rx1200_done: - rx1200_cur."!cursor_fail"() - if_null rx1200_debug, debug_947 - rx1200_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_947: - .return (rx1200_cur) + .return (rx1201_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("311_1282016529.10767") :method -.annotate 'line', 447 - $P1202 = self."!PREFIX__!subrule"("O", "le") - new $P1203, "ResizablePMCArray" - push $P1203, $P1202 - .return ($P1203) +.sub "!PREFIX__infix:sym<<>" :subid("309_1284728478.15265") :method +.annotate 'line', 454 + $P1203 = self."!PREFIX__!subrule"("O", "<") + new $P1204, "ResizablePMCArray" + push $P1204, $P1203 + .return ($P1204) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("312_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1207_tgt - .local int rx1207_pos - .local int rx1207_off - .local int rx1207_eos - .local int rx1207_rep - .local pmc rx1207_cur - .local pmc rx1207_debug - (rx1207_cur, rx1207_pos, rx1207_tgt, $I10) = self."!cursor_start"() - getattribute rx1207_debug, rx1207_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1207_cur - .local pmc match - .lex "$/", match - length rx1207_eos, rx1207_tgt - gt rx1207_pos, rx1207_eos, rx1207_done - set rx1207_off, 0 - lt rx1207_pos, 2, rx1207_start - sub rx1207_off, rx1207_pos, 1 - substr rx1207_tgt, rx1207_tgt, rx1207_off - rx1207_start: - eq $I10, 1, rx1207_restart - if_null rx1207_debug, debug_948 - rx1207_cur."!cursor_debug"("START ", "infix:sym") - debug_948: +.sub "infix:sym<>>" :subid("310_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1208_tgt + .local int rx1208_pos + .local int rx1208_off + .local int rx1208_eos + .local int rx1208_rep + .local pmc rx1208_cur + .local pmc rx1208_debug + (rx1208_cur, rx1208_pos, rx1208_tgt, $I10) = self."!cursor_start"() + getattribute rx1208_debug, rx1208_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1208_cur + .local pmc match + .lex "$/", match + length rx1208_eos, rx1208_tgt + gt rx1208_pos, rx1208_eos, rx1208_done + set rx1208_off, 0 + lt rx1208_pos, 2, rx1208_start + sub rx1208_off, rx1208_pos, 1 + substr rx1208_tgt, rx1208_tgt, rx1208_off + rx1208_start: + eq $I10, 1, rx1208_restart + if_null rx1208_debug, debug_946 + rx1208_cur."!cursor_debug"("START", "infix:sym<>>") + debug_946: $I10 = self.'from'() - ne $I10, -1, rxscan1211_done - goto rxscan1211_scan - rxscan1211_loop: - ($P10) = rx1207_cur."from"() - inc $P10 - set rx1207_pos, $P10 - ge rx1207_pos, rx1207_eos, rxscan1211_done - rxscan1211_scan: - set_addr $I10, rxscan1211_loop - rx1207_cur."!mark_push"(0, rx1207_pos, $I10) - rxscan1211_done: -.annotate 'line', 528 + ne $I10, -1, rxscan1212_done + goto rxscan1212_scan + rxscan1212_loop: + ($P10) = rx1208_cur."from"() + inc $P10 + set rx1208_pos, $P10 + ge rx1208_pos, rx1208_eos, rxscan1212_done + rxscan1212_scan: + set_addr $I10, rxscan1212_loop + rx1208_cur."!mark_push"(0, rx1208_pos, $I10) + rxscan1212_done: +.annotate 'line', 531 # rx subcapture "sym" - set_addr $I10, rxcap_1212_fail - rx1207_cur."!mark_push"(0, rx1207_pos, $I10) - # rx literal "ge" - add $I11, rx1207_pos, 2 - gt $I11, rx1207_eos, rx1207_fail - sub $I11, rx1207_pos, rx1207_off - substr $S10, rx1207_tgt, $I11, 2 - ne $S10, "ge", rx1207_fail - add rx1207_pos, 2 - set_addr $I10, rxcap_1212_fail - ($I12, $I11) = rx1207_cur."!mark_peek"($I10) - rx1207_cur."!cursor_pos"($I11) - ($P10) = rx1207_cur."!cursor_start"() - $P10."!cursor_pass"(rx1207_pos, "") - rx1207_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1213_fail + rx1208_cur."!mark_push"(0, rx1208_pos, $I10) + # rx literal ">" + add $I11, rx1208_pos, 1 + gt $I11, rx1208_eos, rx1208_fail + sub $I11, rx1208_pos, rx1208_off + ord $I11, rx1208_tgt, $I11 + ne $I11, 62, rx1208_fail + add rx1208_pos, 1 + set_addr $I10, rxcap_1213_fail + ($I12, $I11) = rx1208_cur."!mark_peek"($I10) + rx1208_cur."!cursor_pos"($I11) + ($P10) = rx1208_cur."!cursor_start"() + $P10."!cursor_pass"(rx1208_pos, "") + rx1208_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1212_done - rxcap_1212_fail: - goto rx1207_fail - rxcap_1212_done: + goto rxcap_1213_done + rxcap_1213_fail: + goto rx1208_fail + rxcap_1213_done: # rx subrule "O" subtype=capture negate= - rx1207_cur."!cursor_pos"(rx1207_pos) - $P10 = rx1207_cur."O"("%relational, :pirop") - unless $P10, rx1207_fail - rx1207_cur."!mark_push"(0, -1, 0, $P10) + rx1208_cur."!cursor_pos"(rx1208_pos) + $P10 = rx1208_cur."O"("%relational, :pirop") + unless $P10, rx1208_fail + rx1208_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1207_pos = $P10."pos"() + rx1208_pos = $P10."pos"() # rx pass - rx1207_cur."!cursor_pass"(rx1207_pos, "infix:sym") - if_null rx1207_debug, debug_949 - rx1207_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1207_pos) + rx1208_cur."!cursor_pass"(rx1208_pos, "infix:sym<>>") + if_null rx1208_debug, debug_947 + rx1208_cur."!cursor_debug"("PASS", "infix:sym<>>", " at pos=", rx1208_pos) + debug_947: + .return (rx1208_cur) + rx1208_restart: +.annotate 'line', 454 + if_null rx1208_debug, debug_948 + rx1208_cur."!cursor_debug"("NEXT", "infix:sym<>>") + debug_948: + rx1208_fail: + (rx1208_rep, rx1208_pos, $I10, $P10) = rx1208_cur."!mark_fail"(0) + lt rx1208_pos, -1, rx1208_done + eq rx1208_pos, -1, rx1208_fail + jump $I10 + rx1208_done: + rx1208_cur."!cursor_fail"() + if_null rx1208_debug, debug_949 + rx1208_cur."!cursor_debug"("FAIL", "infix:sym<>>") debug_949: - .return (rx1207_cur) - rx1207_restart: -.annotate 'line', 447 - if_null rx1207_debug, debug_950 - rx1207_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_950: - rx1207_fail: - (rx1207_rep, rx1207_pos, $I10, $P10) = rx1207_cur."!mark_fail"(0) - lt rx1207_pos, -1, rx1207_done - eq rx1207_pos, -1, rx1207_fail - jump $I10 - rx1207_done: - rx1207_cur."!cursor_fail"() - if_null rx1207_debug, debug_951 - rx1207_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_951: - .return (rx1207_cur) + .return (rx1208_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("313_1282016529.10767") :method -.annotate 'line', 447 - $P1209 = self."!PREFIX__!subrule"("O", "ge") - new $P1210, "ResizablePMCArray" - push $P1210, $P1209 - .return ($P1210) +.sub "!PREFIX__infix:sym<>>" :subid("311_1284728478.15265") :method +.annotate 'line', 454 + $P1210 = self."!PREFIX__!subrule"("O", ">") + new $P1211, "ResizablePMCArray" + push $P1211, $P1210 + .return ($P1211) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("314_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1214_tgt - .local int rx1214_pos - .local int rx1214_off - .local int rx1214_eos - .local int rx1214_rep - .local pmc rx1214_cur - .local pmc rx1214_debug - (rx1214_cur, rx1214_pos, rx1214_tgt, $I10) = self."!cursor_start"() - getattribute rx1214_debug, rx1214_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1214_cur - .local pmc match - .lex "$/", match - length rx1214_eos, rx1214_tgt - gt rx1214_pos, rx1214_eos, rx1214_done - set rx1214_off, 0 - lt rx1214_pos, 2, rx1214_start - sub rx1214_off, rx1214_pos, 1 - substr rx1214_tgt, rx1214_tgt, rx1214_off - rx1214_start: - eq $I10, 1, rx1214_restart - if_null rx1214_debug, debug_952 - rx1214_cur."!cursor_debug"("START ", "infix:sym") - debug_952: +.sub "infix:sym" :subid("312_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1215_tgt + .local int rx1215_pos + .local int rx1215_off + .local int rx1215_eos + .local int rx1215_rep + .local pmc rx1215_cur + .local pmc rx1215_debug + (rx1215_cur, rx1215_pos, rx1215_tgt, $I10) = self."!cursor_start"() + getattribute rx1215_debug, rx1215_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1215_cur + .local pmc match + .lex "$/", match + length rx1215_eos, rx1215_tgt + gt rx1215_pos, rx1215_eos, rx1215_done + set rx1215_off, 0 + lt rx1215_pos, 2, rx1215_start + sub rx1215_off, rx1215_pos, 1 + substr rx1215_tgt, rx1215_tgt, rx1215_off + rx1215_start: + eq $I10, 1, rx1215_restart + if_null rx1215_debug, debug_950 + rx1215_cur."!cursor_debug"("START", "infix:sym") + debug_950: $I10 = self.'from'() - ne $I10, -1, rxscan1218_done - goto rxscan1218_scan - rxscan1218_loop: - ($P10) = rx1214_cur."from"() - inc $P10 - set rx1214_pos, $P10 - ge rx1214_pos, rx1214_eos, rxscan1218_done - rxscan1218_scan: - set_addr $I10, rxscan1218_loop - rx1214_cur."!mark_push"(0, rx1214_pos, $I10) - rxscan1218_done: -.annotate 'line', 529 + ne $I10, -1, rxscan1219_done + goto rxscan1219_scan + rxscan1219_loop: + ($P10) = rx1215_cur."from"() + inc $P10 + set rx1215_pos, $P10 + ge rx1215_pos, rx1215_eos, rxscan1219_done + rxscan1219_scan: + set_addr $I10, rxscan1219_loop + rx1215_cur."!mark_push"(0, rx1215_pos, $I10) + rxscan1219_done: +.annotate 'line', 532 # rx subcapture "sym" - set_addr $I10, rxcap_1219_fail - rx1214_cur."!mark_push"(0, rx1214_pos, $I10) - # rx literal "lt" - add $I11, rx1214_pos, 2 - gt $I11, rx1214_eos, rx1214_fail - sub $I11, rx1214_pos, rx1214_off - substr $S10, rx1214_tgt, $I11, 2 - ne $S10, "lt", rx1214_fail - add rx1214_pos, 2 - set_addr $I10, rxcap_1219_fail - ($I12, $I11) = rx1214_cur."!mark_peek"($I10) - rx1214_cur."!cursor_pos"($I11) - ($P10) = rx1214_cur."!cursor_start"() - $P10."!cursor_pass"(rx1214_pos, "") - rx1214_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1220_fail + rx1215_cur."!mark_push"(0, rx1215_pos, $I10) + # rx literal "eq" + add $I11, rx1215_pos, 2 + gt $I11, rx1215_eos, rx1215_fail + sub $I11, rx1215_pos, rx1215_off + substr $S10, rx1215_tgt, $I11, 2 + ne $S10, "eq", rx1215_fail + add rx1215_pos, 2 + set_addr $I10, rxcap_1220_fail + ($I12, $I11) = rx1215_cur."!mark_peek"($I10) + rx1215_cur."!cursor_pos"($I11) + ($P10) = rx1215_cur."!cursor_start"() + $P10."!cursor_pass"(rx1215_pos, "") + rx1215_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1219_done - rxcap_1219_fail: - goto rx1214_fail - rxcap_1219_done: + goto rxcap_1220_done + rxcap_1220_fail: + goto rx1215_fail + rxcap_1220_done: # rx subrule "O" subtype=capture negate= - rx1214_cur."!cursor_pos"(rx1214_pos) - $P10 = rx1214_cur."O"("%relational, :pirop") - unless $P10, rx1214_fail - rx1214_cur."!mark_push"(0, -1, 0, $P10) + rx1215_cur."!cursor_pos"(rx1215_pos) + $P10 = rx1215_cur."O"("%relational, :pirop") + unless $P10, rx1215_fail + rx1215_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1214_pos = $P10."pos"() + rx1215_pos = $P10."pos"() # rx pass - rx1214_cur."!cursor_pass"(rx1214_pos, "infix:sym") - if_null rx1214_debug, debug_953 - rx1214_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1214_pos) + rx1215_cur."!cursor_pass"(rx1215_pos, "infix:sym") + if_null rx1215_debug, debug_951 + rx1215_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1215_pos) + debug_951: + .return (rx1215_cur) + rx1215_restart: +.annotate 'line', 454 + if_null rx1215_debug, debug_952 + rx1215_cur."!cursor_debug"("NEXT", "infix:sym") + debug_952: + rx1215_fail: + (rx1215_rep, rx1215_pos, $I10, $P10) = rx1215_cur."!mark_fail"(0) + lt rx1215_pos, -1, rx1215_done + eq rx1215_pos, -1, rx1215_fail + jump $I10 + rx1215_done: + rx1215_cur."!cursor_fail"() + if_null rx1215_debug, debug_953 + rx1215_cur."!cursor_debug"("FAIL", "infix:sym") debug_953: - .return (rx1214_cur) - rx1214_restart: -.annotate 'line', 447 - if_null rx1214_debug, debug_954 - rx1214_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_954: - rx1214_fail: - (rx1214_rep, rx1214_pos, $I10, $P10) = rx1214_cur."!mark_fail"(0) - lt rx1214_pos, -1, rx1214_done - eq rx1214_pos, -1, rx1214_fail - jump $I10 - rx1214_done: - rx1214_cur."!cursor_fail"() - if_null rx1214_debug, debug_955 - rx1214_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_955: - .return (rx1214_cur) + .return (rx1215_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("315_1282016529.10767") :method -.annotate 'line', 447 - $P1216 = self."!PREFIX__!subrule"("O", "lt") - new $P1217, "ResizablePMCArray" - push $P1217, $P1216 - .return ($P1217) +.sub "!PREFIX__infix:sym" :subid("313_1284728478.15265") :method +.annotate 'line', 454 + $P1217 = self."!PREFIX__!subrule"("O", "eq") + new $P1218, "ResizablePMCArray" + push $P1218, $P1217 + .return ($P1218) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("316_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1221_tgt - .local int rx1221_pos - .local int rx1221_off - .local int rx1221_eos - .local int rx1221_rep - .local pmc rx1221_cur - .local pmc rx1221_debug - (rx1221_cur, rx1221_pos, rx1221_tgt, $I10) = self."!cursor_start"() - getattribute rx1221_debug, rx1221_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1221_cur - .local pmc match - .lex "$/", match - length rx1221_eos, rx1221_tgt - gt rx1221_pos, rx1221_eos, rx1221_done - set rx1221_off, 0 - lt rx1221_pos, 2, rx1221_start - sub rx1221_off, rx1221_pos, 1 - substr rx1221_tgt, rx1221_tgt, rx1221_off - rx1221_start: - eq $I10, 1, rx1221_restart - if_null rx1221_debug, debug_956 - rx1221_cur."!cursor_debug"("START ", "infix:sym") - debug_956: +.sub "infix:sym" :subid("314_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1222_tgt + .local int rx1222_pos + .local int rx1222_off + .local int rx1222_eos + .local int rx1222_rep + .local pmc rx1222_cur + .local pmc rx1222_debug + (rx1222_cur, rx1222_pos, rx1222_tgt, $I10) = self."!cursor_start"() + getattribute rx1222_debug, rx1222_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1222_cur + .local pmc match + .lex "$/", match + length rx1222_eos, rx1222_tgt + gt rx1222_pos, rx1222_eos, rx1222_done + set rx1222_off, 0 + lt rx1222_pos, 2, rx1222_start + sub rx1222_off, rx1222_pos, 1 + substr rx1222_tgt, rx1222_tgt, rx1222_off + rx1222_start: + eq $I10, 1, rx1222_restart + if_null rx1222_debug, debug_954 + rx1222_cur."!cursor_debug"("START", "infix:sym") + debug_954: $I10 = self.'from'() - ne $I10, -1, rxscan1225_done - goto rxscan1225_scan - rxscan1225_loop: - ($P10) = rx1221_cur."from"() - inc $P10 - set rx1221_pos, $P10 - ge rx1221_pos, rx1221_eos, rxscan1225_done - rxscan1225_scan: - set_addr $I10, rxscan1225_loop - rx1221_cur."!mark_push"(0, rx1221_pos, $I10) - rxscan1225_done: -.annotate 'line', 530 + ne $I10, -1, rxscan1226_done + goto rxscan1226_scan + rxscan1226_loop: + ($P10) = rx1222_cur."from"() + inc $P10 + set rx1222_pos, $P10 + ge rx1222_pos, rx1222_eos, rxscan1226_done + rxscan1226_scan: + set_addr $I10, rxscan1226_loop + rx1222_cur."!mark_push"(0, rx1222_pos, $I10) + rxscan1226_done: +.annotate 'line', 533 # rx subcapture "sym" - set_addr $I10, rxcap_1226_fail - rx1221_cur."!mark_push"(0, rx1221_pos, $I10) - # rx literal "gt" - add $I11, rx1221_pos, 2 - gt $I11, rx1221_eos, rx1221_fail - sub $I11, rx1221_pos, rx1221_off - substr $S10, rx1221_tgt, $I11, 2 - ne $S10, "gt", rx1221_fail - add rx1221_pos, 2 - set_addr $I10, rxcap_1226_fail - ($I12, $I11) = rx1221_cur."!mark_peek"($I10) - rx1221_cur."!cursor_pos"($I11) - ($P10) = rx1221_cur."!cursor_start"() - $P10."!cursor_pass"(rx1221_pos, "") - rx1221_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1227_fail + rx1222_cur."!mark_push"(0, rx1222_pos, $I10) + # rx literal "ne" + add $I11, rx1222_pos, 2 + gt $I11, rx1222_eos, rx1222_fail + sub $I11, rx1222_pos, rx1222_off + substr $S10, rx1222_tgt, $I11, 2 + ne $S10, "ne", rx1222_fail + add rx1222_pos, 2 + set_addr $I10, rxcap_1227_fail + ($I12, $I11) = rx1222_cur."!mark_peek"($I10) + rx1222_cur."!cursor_pos"($I11) + ($P10) = rx1222_cur."!cursor_start"() + $P10."!cursor_pass"(rx1222_pos, "") + rx1222_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1226_done - rxcap_1226_fail: - goto rx1221_fail - rxcap_1226_done: + goto rxcap_1227_done + rxcap_1227_fail: + goto rx1222_fail + rxcap_1227_done: # rx subrule "O" subtype=capture negate= - rx1221_cur."!cursor_pos"(rx1221_pos) - $P10 = rx1221_cur."O"("%relational, :pirop") - unless $P10, rx1221_fail - rx1221_cur."!mark_push"(0, -1, 0, $P10) + rx1222_cur."!cursor_pos"(rx1222_pos) + $P10 = rx1222_cur."O"("%relational, :pirop") + unless $P10, rx1222_fail + rx1222_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1221_pos = $P10."pos"() + rx1222_pos = $P10."pos"() # rx pass - rx1221_cur."!cursor_pass"(rx1221_pos, "infix:sym") - if_null rx1221_debug, debug_957 - rx1221_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1221_pos) + rx1222_cur."!cursor_pass"(rx1222_pos, "infix:sym") + if_null rx1222_debug, debug_955 + rx1222_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1222_pos) + debug_955: + .return (rx1222_cur) + rx1222_restart: +.annotate 'line', 454 + if_null rx1222_debug, debug_956 + rx1222_cur."!cursor_debug"("NEXT", "infix:sym") + debug_956: + rx1222_fail: + (rx1222_rep, rx1222_pos, $I10, $P10) = rx1222_cur."!mark_fail"(0) + lt rx1222_pos, -1, rx1222_done + eq rx1222_pos, -1, rx1222_fail + jump $I10 + rx1222_done: + rx1222_cur."!cursor_fail"() + if_null rx1222_debug, debug_957 + rx1222_cur."!cursor_debug"("FAIL", "infix:sym") debug_957: - .return (rx1221_cur) - rx1221_restart: -.annotate 'line', 447 - if_null rx1221_debug, debug_958 - rx1221_cur."!cursor_debug"("NEXT ", "infix:sym") - debug_958: - rx1221_fail: - (rx1221_rep, rx1221_pos, $I10, $P10) = rx1221_cur."!mark_fail"(0) - lt rx1221_pos, -1, rx1221_done - eq rx1221_pos, -1, rx1221_fail - jump $I10 - rx1221_done: - rx1221_cur."!cursor_fail"() - if_null rx1221_debug, debug_959 - rx1221_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_959: - .return (rx1221_cur) + .return (rx1222_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("317_1282016529.10767") :method -.annotate 'line', 447 - $P1223 = self."!PREFIX__!subrule"("O", "gt") - new $P1224, "ResizablePMCArray" - push $P1224, $P1223 - .return ($P1224) +.sub "!PREFIX__infix:sym" :subid("315_1284728478.15265") :method +.annotate 'line', 454 + $P1224 = self."!PREFIX__!subrule"("O", "ne") + new $P1225, "ResizablePMCArray" + push $P1225, $P1224 + .return ($P1225) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<=:=>" :subid("318_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1228_tgt - .local int rx1228_pos - .local int rx1228_off - .local int rx1228_eos - .local int rx1228_rep - .local pmc rx1228_cur - .local pmc rx1228_debug - (rx1228_cur, rx1228_pos, rx1228_tgt, $I10) = self."!cursor_start"() - getattribute rx1228_debug, rx1228_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1228_cur - .local pmc match - .lex "$/", match - length rx1228_eos, rx1228_tgt - gt rx1228_pos, rx1228_eos, rx1228_done - set rx1228_off, 0 - lt rx1228_pos, 2, rx1228_start - sub rx1228_off, rx1228_pos, 1 - substr rx1228_tgt, rx1228_tgt, rx1228_off - rx1228_start: - eq $I10, 1, rx1228_restart - if_null rx1228_debug, debug_960 - rx1228_cur."!cursor_debug"("START ", "infix:sym<=:=>") - debug_960: +.sub "infix:sym" :subid("316_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1229_tgt + .local int rx1229_pos + .local int rx1229_off + .local int rx1229_eos + .local int rx1229_rep + .local pmc rx1229_cur + .local pmc rx1229_debug + (rx1229_cur, rx1229_pos, rx1229_tgt, $I10) = self."!cursor_start"() + getattribute rx1229_debug, rx1229_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1229_cur + .local pmc match + .lex "$/", match + length rx1229_eos, rx1229_tgt + gt rx1229_pos, rx1229_eos, rx1229_done + set rx1229_off, 0 + lt rx1229_pos, 2, rx1229_start + sub rx1229_off, rx1229_pos, 1 + substr rx1229_tgt, rx1229_tgt, rx1229_off + rx1229_start: + eq $I10, 1, rx1229_restart + if_null rx1229_debug, debug_958 + rx1229_cur."!cursor_debug"("START", "infix:sym") + debug_958: $I10 = self.'from'() - ne $I10, -1, rxscan1232_done - goto rxscan1232_scan - rxscan1232_loop: - ($P10) = rx1228_cur."from"() - inc $P10 - set rx1228_pos, $P10 - ge rx1228_pos, rx1228_eos, rxscan1232_done - rxscan1232_scan: - set_addr $I10, rxscan1232_loop - rx1228_cur."!mark_push"(0, rx1228_pos, $I10) - rxscan1232_done: -.annotate 'line', 531 + ne $I10, -1, rxscan1233_done + goto rxscan1233_scan + rxscan1233_loop: + ($P10) = rx1229_cur."from"() + inc $P10 + set rx1229_pos, $P10 + ge rx1229_pos, rx1229_eos, rxscan1233_done + rxscan1233_scan: + set_addr $I10, rxscan1233_loop + rx1229_cur."!mark_push"(0, rx1229_pos, $I10) + rxscan1233_done: +.annotate 'line', 534 # rx subcapture "sym" - set_addr $I10, rxcap_1233_fail - rx1228_cur."!mark_push"(0, rx1228_pos, $I10) - # rx literal "=:=" - add $I11, rx1228_pos, 3 - gt $I11, rx1228_eos, rx1228_fail - sub $I11, rx1228_pos, rx1228_off - substr $S10, rx1228_tgt, $I11, 3 - ne $S10, "=:=", rx1228_fail - add rx1228_pos, 3 - set_addr $I10, rxcap_1233_fail - ($I12, $I11) = rx1228_cur."!mark_peek"($I10) - rx1228_cur."!cursor_pos"($I11) - ($P10) = rx1228_cur."!cursor_start"() - $P10."!cursor_pass"(rx1228_pos, "") - rx1228_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1234_fail + rx1229_cur."!mark_push"(0, rx1229_pos, $I10) + # rx literal "le" + add $I11, rx1229_pos, 2 + gt $I11, rx1229_eos, rx1229_fail + sub $I11, rx1229_pos, rx1229_off + substr $S10, rx1229_tgt, $I11, 2 + ne $S10, "le", rx1229_fail + add rx1229_pos, 2 + set_addr $I10, rxcap_1234_fail + ($I12, $I11) = rx1229_cur."!mark_peek"($I10) + rx1229_cur."!cursor_pos"($I11) + ($P10) = rx1229_cur."!cursor_start"() + $P10."!cursor_pass"(rx1229_pos, "") + rx1229_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1233_done - rxcap_1233_fail: - goto rx1228_fail - rxcap_1233_done: + goto rxcap_1234_done + rxcap_1234_fail: + goto rx1229_fail + rxcap_1234_done: # rx subrule "O" subtype=capture negate= - rx1228_cur."!cursor_pos"(rx1228_pos) - $P10 = rx1228_cur."O"("%relational, :pirop") - unless $P10, rx1228_fail - rx1228_cur."!mark_push"(0, -1, 0, $P10) + rx1229_cur."!cursor_pos"(rx1229_pos) + $P10 = rx1229_cur."O"("%relational, :pirop") + unless $P10, rx1229_fail + rx1229_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1228_pos = $P10."pos"() + rx1229_pos = $P10."pos"() # rx pass - rx1228_cur."!cursor_pass"(rx1228_pos, "infix:sym<=:=>") - if_null rx1228_debug, debug_961 - rx1228_cur."!cursor_debug"("PASS ", "infix:sym<=:=>", " at pos=", rx1228_pos) + rx1229_cur."!cursor_pass"(rx1229_pos, "infix:sym") + if_null rx1229_debug, debug_959 + rx1229_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1229_pos) + debug_959: + .return (rx1229_cur) + rx1229_restart: +.annotate 'line', 454 + if_null rx1229_debug, debug_960 + rx1229_cur."!cursor_debug"("NEXT", "infix:sym") + debug_960: + rx1229_fail: + (rx1229_rep, rx1229_pos, $I10, $P10) = rx1229_cur."!mark_fail"(0) + lt rx1229_pos, -1, rx1229_done + eq rx1229_pos, -1, rx1229_fail + jump $I10 + rx1229_done: + rx1229_cur."!cursor_fail"() + if_null rx1229_debug, debug_961 + rx1229_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1228_fail: - (rx1228_rep, rx1228_pos, $I10, $P10) = rx1228_cur."!mark_fail"(0) - lt rx1228_pos, -1, rx1228_done - eq rx1228_pos, -1, rx1228_fail - jump $I10 - rx1228_done: - rx1228_cur."!cursor_fail"() - if_null rx1228_debug, debug_963 - rx1228_cur."!cursor_debug"("FAIL ", "infix:sym<=:=>") - debug_963: - .return (rx1228_cur) + .return (rx1229_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<=:=>" :subid("319_1282016529.10767") :method -.annotate 'line', 447 - $P1230 = self."!PREFIX__!subrule"("O", "=:=") - new $P1231, "ResizablePMCArray" - push $P1231, $P1230 - .return ($P1231) +.sub "!PREFIX__infix:sym" :subid("317_1284728478.15265") :method +.annotate 'line', 454 + $P1231 = self."!PREFIX__!subrule"("O", "le") + new $P1232, "ResizablePMCArray" + push $P1232, $P1231 + .return ($P1232) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<~~>" :subid("320_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1235_tgt - .local int rx1235_pos - .local int rx1235_off - .local int rx1235_eos - .local int rx1235_rep - .local pmc rx1235_cur - .local pmc rx1235_debug - (rx1235_cur, rx1235_pos, rx1235_tgt, $I10) = self."!cursor_start"() - getattribute rx1235_debug, rx1235_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1235_cur - .local pmc match - .lex "$/", match - length rx1235_eos, rx1235_tgt - gt rx1235_pos, rx1235_eos, rx1235_done - set rx1235_off, 0 - lt rx1235_pos, 2, rx1235_start - sub rx1235_off, rx1235_pos, 1 - substr rx1235_tgt, rx1235_tgt, rx1235_off - rx1235_start: - eq $I10, 1, rx1235_restart - if_null rx1235_debug, debug_964 - rx1235_cur."!cursor_debug"("START ", "infix:sym<~~>") - debug_964: +.sub "infix:sym" :subid("318_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1236_tgt + .local int rx1236_pos + .local int rx1236_off + .local int rx1236_eos + .local int rx1236_rep + .local pmc rx1236_cur + .local pmc rx1236_debug + (rx1236_cur, rx1236_pos, rx1236_tgt, $I10) = self."!cursor_start"() + getattribute rx1236_debug, rx1236_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1236_cur + .local pmc match + .lex "$/", match + length rx1236_eos, rx1236_tgt + gt rx1236_pos, rx1236_eos, rx1236_done + set rx1236_off, 0 + lt rx1236_pos, 2, rx1236_start + sub rx1236_off, rx1236_pos, 1 + substr rx1236_tgt, rx1236_tgt, rx1236_off + rx1236_start: + eq $I10, 1, rx1236_restart + if_null rx1236_debug, debug_962 + rx1236_cur."!cursor_debug"("START", "infix:sym") + debug_962: $I10 = self.'from'() - ne $I10, -1, rxscan1239_done - goto rxscan1239_scan - rxscan1239_loop: - ($P10) = rx1235_cur."from"() - inc $P10 - set rx1235_pos, $P10 - ge rx1235_pos, rx1235_eos, rxscan1239_done - rxscan1239_scan: - set_addr $I10, rxscan1239_loop - rx1235_cur."!mark_push"(0, rx1235_pos, $I10) - rxscan1239_done: -.annotate 'line', 532 + ne $I10, -1, rxscan1240_done + goto rxscan1240_scan + rxscan1240_loop: + ($P10) = rx1236_cur."from"() + inc $P10 + set rx1236_pos, $P10 + ge rx1236_pos, rx1236_eos, rxscan1240_done + rxscan1240_scan: + set_addr $I10, rxscan1240_loop + rx1236_cur."!mark_push"(0, rx1236_pos, $I10) + rxscan1240_done: +.annotate 'line', 535 # rx subcapture "sym" - set_addr $I10, rxcap_1240_fail - rx1235_cur."!mark_push"(0, rx1235_pos, $I10) - # rx literal "~~" - add $I11, rx1235_pos, 2 - gt $I11, rx1235_eos, rx1235_fail - sub $I11, rx1235_pos, rx1235_off - substr $S10, rx1235_tgt, $I11, 2 - ne $S10, "~~", rx1235_fail - add rx1235_pos, 2 - set_addr $I10, rxcap_1240_fail - ($I12, $I11) = rx1235_cur."!mark_peek"($I10) - rx1235_cur."!cursor_pos"($I11) - ($P10) = rx1235_cur."!cursor_start"() - $P10."!cursor_pass"(rx1235_pos, "") - rx1235_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1241_fail + rx1236_cur."!mark_push"(0, rx1236_pos, $I10) + # rx literal "ge" + add $I11, rx1236_pos, 2 + gt $I11, rx1236_eos, rx1236_fail + sub $I11, rx1236_pos, rx1236_off + substr $S10, rx1236_tgt, $I11, 2 + ne $S10, "ge", rx1236_fail + add rx1236_pos, 2 + set_addr $I10, rxcap_1241_fail + ($I12, $I11) = rx1236_cur."!mark_peek"($I10) + rx1236_cur."!cursor_pos"($I11) + ($P10) = rx1236_cur."!cursor_start"() + $P10."!cursor_pass"(rx1236_pos, "") + rx1236_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1240_done - rxcap_1240_fail: - goto rx1235_fail - rxcap_1240_done: + goto rxcap_1241_done + rxcap_1241_fail: + goto rx1236_fail + rxcap_1241_done: # rx subrule "O" subtype=capture negate= - rx1235_cur."!cursor_pos"(rx1235_pos) - $P10 = rx1235_cur."O"("%relational, :reducecheck") - unless $P10, rx1235_fail - rx1235_cur."!mark_push"(0, -1, 0, $P10) + rx1236_cur."!cursor_pos"(rx1236_pos) + $P10 = rx1236_cur."O"("%relational, :pirop") + unless $P10, rx1236_fail + rx1236_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1235_pos = $P10."pos"() + rx1236_pos = $P10."pos"() # rx pass - rx1235_cur."!cursor_pass"(rx1235_pos, "infix:sym<~~>") - if_null rx1235_debug, debug_965 - rx1235_cur."!cursor_debug"("PASS ", "infix:sym<~~>", " at pos=", rx1235_pos) + rx1236_cur."!cursor_pass"(rx1236_pos, "infix:sym") + if_null rx1236_debug, debug_963 + rx1236_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1236_pos) + debug_963: + .return (rx1236_cur) + rx1236_restart: +.annotate 'line', 454 + if_null rx1236_debug, debug_964 + rx1236_cur."!cursor_debug"("NEXT", "infix:sym") + debug_964: + rx1236_fail: + (rx1236_rep, rx1236_pos, $I10, $P10) = rx1236_cur."!mark_fail"(0) + lt rx1236_pos, -1, rx1236_done + eq rx1236_pos, -1, rx1236_fail + jump $I10 + rx1236_done: + rx1236_cur."!cursor_fail"() + if_null rx1236_debug, debug_965 + rx1236_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1235_fail: - (rx1235_rep, rx1235_pos, $I10, $P10) = rx1235_cur."!mark_fail"(0) - lt rx1235_pos, -1, rx1235_done - eq rx1235_pos, -1, rx1235_fail - jump $I10 - rx1235_done: - rx1235_cur."!cursor_fail"() - if_null rx1235_debug, debug_967 - rx1235_cur."!cursor_debug"("FAIL ", "infix:sym<~~>") - debug_967: - .return (rx1235_cur) + .return (rx1236_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<~~>" :subid("321_1282016529.10767") :method -.annotate 'line', 447 - $P1237 = self."!PREFIX__!subrule"("O", "~~") - new $P1238, "ResizablePMCArray" - push $P1238, $P1237 - .return ($P1238) +.sub "!PREFIX__infix:sym" :subid("319_1284728478.15265") :method +.annotate 'line', 454 + $P1238 = self."!PREFIX__!subrule"("O", "ge") + new $P1239, "ResizablePMCArray" + push $P1239, $P1238 + .return ($P1239) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<&&>" :subid("322_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1242_tgt - .local int rx1242_pos - .local int rx1242_off - .local int rx1242_eos - .local int rx1242_rep - .local pmc rx1242_cur - .local pmc rx1242_debug - (rx1242_cur, rx1242_pos, rx1242_tgt, $I10) = self."!cursor_start"() - getattribute rx1242_debug, rx1242_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1242_cur - .local pmc match - .lex "$/", match - length rx1242_eos, rx1242_tgt - gt rx1242_pos, rx1242_eos, rx1242_done - set rx1242_off, 0 - lt rx1242_pos, 2, rx1242_start - sub rx1242_off, rx1242_pos, 1 - substr rx1242_tgt, rx1242_tgt, rx1242_off - rx1242_start: - eq $I10, 1, rx1242_restart - if_null rx1242_debug, debug_968 - rx1242_cur."!cursor_debug"("START ", "infix:sym<&&>") - debug_968: +.sub "infix:sym" :subid("320_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1243_tgt + .local int rx1243_pos + .local int rx1243_off + .local int rx1243_eos + .local int rx1243_rep + .local pmc rx1243_cur + .local pmc rx1243_debug + (rx1243_cur, rx1243_pos, rx1243_tgt, $I10) = self."!cursor_start"() + getattribute rx1243_debug, rx1243_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1243_cur + .local pmc match + .lex "$/", match + length rx1243_eos, rx1243_tgt + gt rx1243_pos, rx1243_eos, rx1243_done + set rx1243_off, 0 + lt rx1243_pos, 2, rx1243_start + sub rx1243_off, rx1243_pos, 1 + substr rx1243_tgt, rx1243_tgt, rx1243_off + rx1243_start: + eq $I10, 1, rx1243_restart + if_null rx1243_debug, debug_966 + rx1243_cur."!cursor_debug"("START", "infix:sym") + debug_966: $I10 = self.'from'() - ne $I10, -1, rxscan1246_done - goto rxscan1246_scan - rxscan1246_loop: - ($P10) = rx1242_cur."from"() - inc $P10 - set rx1242_pos, $P10 - ge rx1242_pos, rx1242_eos, rxscan1246_done - rxscan1246_scan: - set_addr $I10, rxscan1246_loop - rx1242_cur."!mark_push"(0, rx1242_pos, $I10) - rxscan1246_done: -.annotate 'line', 534 + ne $I10, -1, rxscan1247_done + goto rxscan1247_scan + rxscan1247_loop: + ($P10) = rx1243_cur."from"() + inc $P10 + set rx1243_pos, $P10 + ge rx1243_pos, rx1243_eos, rxscan1247_done + rxscan1247_scan: + set_addr $I10, rxscan1247_loop + rx1243_cur."!mark_push"(0, rx1243_pos, $I10) + rxscan1247_done: +.annotate 'line', 536 # rx subcapture "sym" - set_addr $I10, rxcap_1247_fail - rx1242_cur."!mark_push"(0, rx1242_pos, $I10) - # rx literal "&&" - add $I11, rx1242_pos, 2 - gt $I11, rx1242_eos, rx1242_fail - sub $I11, rx1242_pos, rx1242_off - substr $S10, rx1242_tgt, $I11, 2 - ne $S10, "&&", rx1242_fail - add rx1242_pos, 2 - set_addr $I10, rxcap_1247_fail - ($I12, $I11) = rx1242_cur."!mark_peek"($I10) - rx1242_cur."!cursor_pos"($I11) - ($P10) = rx1242_cur."!cursor_start"() - $P10."!cursor_pass"(rx1242_pos, "") - rx1242_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1248_fail + rx1243_cur."!mark_push"(0, rx1243_pos, $I10) + # rx literal "lt" + add $I11, rx1243_pos, 2 + gt $I11, rx1243_eos, rx1243_fail + sub $I11, rx1243_pos, rx1243_off + substr $S10, rx1243_tgt, $I11, 2 + ne $S10, "lt", rx1243_fail + add rx1243_pos, 2 + set_addr $I10, rxcap_1248_fail + ($I12, $I11) = rx1243_cur."!mark_peek"($I10) + rx1243_cur."!cursor_pos"($I11) + ($P10) = rx1243_cur."!cursor_start"() + $P10."!cursor_pass"(rx1243_pos, "") + rx1243_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1247_done - rxcap_1247_fail: - goto rx1242_fail - rxcap_1247_done: + goto rxcap_1248_done + rxcap_1248_fail: + goto rx1243_fail + rxcap_1248_done: # rx subrule "O" subtype=capture negate= - rx1242_cur."!cursor_pos"(rx1242_pos) - $P10 = rx1242_cur."O"("%tight_and, :pasttype") - unless $P10, rx1242_fail - rx1242_cur."!mark_push"(0, -1, 0, $P10) + rx1243_cur."!cursor_pos"(rx1243_pos) + $P10 = rx1243_cur."O"("%relational, :pirop") + unless $P10, rx1243_fail + rx1243_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1242_pos = $P10."pos"() + rx1243_pos = $P10."pos"() # rx pass - rx1242_cur."!cursor_pass"(rx1242_pos, "infix:sym<&&>") - if_null rx1242_debug, debug_969 - rx1242_cur."!cursor_debug"("PASS ", "infix:sym<&&>", " at pos=", rx1242_pos) + rx1243_cur."!cursor_pass"(rx1243_pos, "infix:sym") + if_null rx1243_debug, debug_967 + rx1243_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1243_pos) + debug_967: + .return (rx1243_cur) + rx1243_restart: +.annotate 'line', 454 + if_null rx1243_debug, debug_968 + rx1243_cur."!cursor_debug"("NEXT", "infix:sym") + debug_968: + rx1243_fail: + (rx1243_rep, rx1243_pos, $I10, $P10) = rx1243_cur."!mark_fail"(0) + lt rx1243_pos, -1, rx1243_done + eq rx1243_pos, -1, rx1243_fail + jump $I10 + rx1243_done: + rx1243_cur."!cursor_fail"() + if_null rx1243_debug, debug_969 + rx1243_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1242_fail: - (rx1242_rep, rx1242_pos, $I10, $P10) = rx1242_cur."!mark_fail"(0) - lt rx1242_pos, -1, rx1242_done - eq rx1242_pos, -1, rx1242_fail - jump $I10 - rx1242_done: - rx1242_cur."!cursor_fail"() - if_null rx1242_debug, debug_971 - rx1242_cur."!cursor_debug"("FAIL ", "infix:sym<&&>") - debug_971: - .return (rx1242_cur) + .return (rx1243_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<&&>" :subid("323_1282016529.10767") :method -.annotate 'line', 447 - $P1244 = self."!PREFIX__!subrule"("O", "&&") - new $P1245, "ResizablePMCArray" - push $P1245, $P1244 - .return ($P1245) +.sub "!PREFIX__infix:sym" :subid("321_1284728478.15265") :method +.annotate 'line', 454 + $P1245 = self."!PREFIX__!subrule"("O", "lt") + new $P1246, "ResizablePMCArray" + push $P1246, $P1245 + .return ($P1246) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<||>" :subid("324_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1249_tgt - .local int rx1249_pos - .local int rx1249_off - .local int rx1249_eos - .local int rx1249_rep - .local pmc rx1249_cur - .local pmc rx1249_debug - (rx1249_cur, rx1249_pos, rx1249_tgt, $I10) = self."!cursor_start"() - getattribute rx1249_debug, rx1249_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1249_cur - .local pmc match - .lex "$/", match - length rx1249_eos, rx1249_tgt - gt rx1249_pos, rx1249_eos, rx1249_done - set rx1249_off, 0 - lt rx1249_pos, 2, rx1249_start - sub rx1249_off, rx1249_pos, 1 - substr rx1249_tgt, rx1249_tgt, rx1249_off - rx1249_start: - eq $I10, 1, rx1249_restart - if_null rx1249_debug, debug_972 - rx1249_cur."!cursor_debug"("START ", "infix:sym<||>") - debug_972: +.sub "infix:sym" :subid("322_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1250_tgt + .local int rx1250_pos + .local int rx1250_off + .local int rx1250_eos + .local int rx1250_rep + .local pmc rx1250_cur + .local pmc rx1250_debug + (rx1250_cur, rx1250_pos, rx1250_tgt, $I10) = self."!cursor_start"() + getattribute rx1250_debug, rx1250_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1250_cur + .local pmc match + .lex "$/", match + length rx1250_eos, rx1250_tgt + gt rx1250_pos, rx1250_eos, rx1250_done + set rx1250_off, 0 + lt rx1250_pos, 2, rx1250_start + sub rx1250_off, rx1250_pos, 1 + substr rx1250_tgt, rx1250_tgt, rx1250_off + rx1250_start: + eq $I10, 1, rx1250_restart + if_null rx1250_debug, debug_970 + rx1250_cur."!cursor_debug"("START", "infix:sym") + debug_970: $I10 = self.'from'() - ne $I10, -1, rxscan1253_done - goto rxscan1253_scan - rxscan1253_loop: - ($P10) = rx1249_cur."from"() - inc $P10 - set rx1249_pos, $P10 - ge rx1249_pos, rx1249_eos, rxscan1253_done - rxscan1253_scan: - set_addr $I10, rxscan1253_loop - rx1249_cur."!mark_push"(0, rx1249_pos, $I10) - rxscan1253_done: -.annotate 'line', 536 + ne $I10, -1, rxscan1254_done + goto rxscan1254_scan + rxscan1254_loop: + ($P10) = rx1250_cur."from"() + inc $P10 + set rx1250_pos, $P10 + ge rx1250_pos, rx1250_eos, rxscan1254_done + rxscan1254_scan: + set_addr $I10, rxscan1254_loop + rx1250_cur."!mark_push"(0, rx1250_pos, $I10) + rxscan1254_done: +.annotate 'line', 537 # rx subcapture "sym" - set_addr $I10, rxcap_1254_fail - rx1249_cur."!mark_push"(0, rx1249_pos, $I10) - # rx literal "||" - add $I11, rx1249_pos, 2 - gt $I11, rx1249_eos, rx1249_fail - sub $I11, rx1249_pos, rx1249_off - substr $S10, rx1249_tgt, $I11, 2 - ne $S10, "||", rx1249_fail - add rx1249_pos, 2 - set_addr $I10, rxcap_1254_fail - ($I12, $I11) = rx1249_cur."!mark_peek"($I10) - rx1249_cur."!cursor_pos"($I11) - ($P10) = rx1249_cur."!cursor_start"() - $P10."!cursor_pass"(rx1249_pos, "") - rx1249_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1255_fail + rx1250_cur."!mark_push"(0, rx1250_pos, $I10) + # rx literal "gt" + add $I11, rx1250_pos, 2 + gt $I11, rx1250_eos, rx1250_fail + sub $I11, rx1250_pos, rx1250_off + substr $S10, rx1250_tgt, $I11, 2 + ne $S10, "gt", rx1250_fail + add rx1250_pos, 2 + set_addr $I10, rxcap_1255_fail + ($I12, $I11) = rx1250_cur."!mark_peek"($I10) + rx1250_cur."!cursor_pos"($I11) + ($P10) = rx1250_cur."!cursor_start"() + $P10."!cursor_pass"(rx1250_pos, "") + rx1250_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1254_done - rxcap_1254_fail: - goto rx1249_fail - rxcap_1254_done: + goto rxcap_1255_done + rxcap_1255_fail: + goto rx1250_fail + rxcap_1255_done: # rx subrule "O" subtype=capture negate= - rx1249_cur."!cursor_pos"(rx1249_pos) - $P10 = rx1249_cur."O"("%tight_or, :pasttype") - unless $P10, rx1249_fail - rx1249_cur."!mark_push"(0, -1, 0, $P10) + rx1250_cur."!cursor_pos"(rx1250_pos) + $P10 = rx1250_cur."O"("%relational, :pirop") + unless $P10, rx1250_fail + rx1250_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1249_pos = $P10."pos"() + rx1250_pos = $P10."pos"() # rx pass - rx1249_cur."!cursor_pass"(rx1249_pos, "infix:sym<||>") - if_null rx1249_debug, debug_973 - rx1249_cur."!cursor_debug"("PASS ", "infix:sym<||>", " at pos=", rx1249_pos) + rx1250_cur."!cursor_pass"(rx1250_pos, "infix:sym") + if_null rx1250_debug, debug_971 + rx1250_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1250_pos) + debug_971: + .return (rx1250_cur) + rx1250_restart: +.annotate 'line', 454 + if_null rx1250_debug, debug_972 + rx1250_cur."!cursor_debug"("NEXT", "infix:sym") + debug_972: + rx1250_fail: + (rx1250_rep, rx1250_pos, $I10, $P10) = rx1250_cur."!mark_fail"(0) + lt rx1250_pos, -1, rx1250_done + eq rx1250_pos, -1, rx1250_fail + jump $I10 + rx1250_done: + rx1250_cur."!cursor_fail"() + if_null rx1250_debug, debug_973 + rx1250_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1249_fail: - (rx1249_rep, rx1249_pos, $I10, $P10) = rx1249_cur."!mark_fail"(0) - lt rx1249_pos, -1, rx1249_done - eq rx1249_pos, -1, rx1249_fail - jump $I10 - rx1249_done: - rx1249_cur."!cursor_fail"() - if_null rx1249_debug, debug_975 - rx1249_cur."!cursor_debug"("FAIL ", "infix:sym<||>") - debug_975: - .return (rx1249_cur) + .return (rx1250_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<||>" :subid("325_1282016529.10767") :method -.annotate 'line', 447 - $P1251 = self."!PREFIX__!subrule"("O", "||") - new $P1252, "ResizablePMCArray" - push $P1252, $P1251 - .return ($P1252) +.sub "!PREFIX__infix:sym" :subid("323_1284728478.15265") :method +.annotate 'line', 454 + $P1252 = self."!PREFIX__!subrule"("O", "gt") + new $P1253, "ResizablePMCArray" + push $P1253, $P1252 + .return ($P1253) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("326_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1256_tgt - .local int rx1256_pos - .local int rx1256_off - .local int rx1256_eos - .local int rx1256_rep - .local pmc rx1256_cur - .local pmc rx1256_debug - (rx1256_cur, rx1256_pos, rx1256_tgt, $I10) = self."!cursor_start"() - getattribute rx1256_debug, rx1256_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1256_cur - .local pmc match - .lex "$/", match - length rx1256_eos, rx1256_tgt - gt rx1256_pos, rx1256_eos, rx1256_done - set rx1256_off, 0 - lt rx1256_pos, 2, rx1256_start - sub rx1256_off, rx1256_pos, 1 - substr rx1256_tgt, rx1256_tgt, rx1256_off - rx1256_start: - eq $I10, 1, rx1256_restart - if_null rx1256_debug, debug_976 - rx1256_cur."!cursor_debug"("START ", "infix:sym") - debug_976: +.sub "infix:sym<=:=>" :subid("324_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1257_tgt + .local int rx1257_pos + .local int rx1257_off + .local int rx1257_eos + .local int rx1257_rep + .local pmc rx1257_cur + .local pmc rx1257_debug + (rx1257_cur, rx1257_pos, rx1257_tgt, $I10) = self."!cursor_start"() + getattribute rx1257_debug, rx1257_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1257_cur + .local pmc match + .lex "$/", match + length rx1257_eos, rx1257_tgt + gt rx1257_pos, rx1257_eos, rx1257_done + set rx1257_off, 0 + lt rx1257_pos, 2, rx1257_start + sub rx1257_off, rx1257_pos, 1 + substr rx1257_tgt, rx1257_tgt, rx1257_off + rx1257_start: + eq $I10, 1, rx1257_restart + if_null rx1257_debug, debug_974 + rx1257_cur."!cursor_debug"("START", "infix:sym<=:=>") + debug_974: $I10 = self.'from'() - ne $I10, -1, rxscan1260_done - goto rxscan1260_scan - rxscan1260_loop: - ($P10) = rx1256_cur."from"() - inc $P10 - set rx1256_pos, $P10 - ge rx1256_pos, rx1256_eos, rxscan1260_done - rxscan1260_scan: - set_addr $I10, rxscan1260_loop - rx1256_cur."!mark_push"(0, rx1256_pos, $I10) - rxscan1260_done: -.annotate 'line', 537 + ne $I10, -1, rxscan1261_done + goto rxscan1261_scan + rxscan1261_loop: + ($P10) = rx1257_cur."from"() + inc $P10 + set rx1257_pos, $P10 + ge rx1257_pos, rx1257_eos, rxscan1261_done + rxscan1261_scan: + set_addr $I10, rxscan1261_loop + rx1257_cur."!mark_push"(0, rx1257_pos, $I10) + rxscan1261_done: +.annotate 'line', 538 # rx subcapture "sym" - set_addr $I10, rxcap_1261_fail - rx1256_cur."!mark_push"(0, rx1256_pos, $I10) - # rx literal "//" - add $I11, rx1256_pos, 2 - gt $I11, rx1256_eos, rx1256_fail - sub $I11, rx1256_pos, rx1256_off - substr $S10, rx1256_tgt, $I11, 2 - ne $S10, "//", rx1256_fail - add rx1256_pos, 2 - set_addr $I10, rxcap_1261_fail - ($I12, $I11) = rx1256_cur."!mark_peek"($I10) - rx1256_cur."!cursor_pos"($I11) - ($P10) = rx1256_cur."!cursor_start"() - $P10."!cursor_pass"(rx1256_pos, "") - rx1256_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1262_fail + rx1257_cur."!mark_push"(0, rx1257_pos, $I10) + # rx literal "=:=" + add $I11, rx1257_pos, 3 + gt $I11, rx1257_eos, rx1257_fail + sub $I11, rx1257_pos, rx1257_off + substr $S10, rx1257_tgt, $I11, 3 + ne $S10, "=:=", rx1257_fail + add rx1257_pos, 3 + set_addr $I10, rxcap_1262_fail + ($I12, $I11) = rx1257_cur."!mark_peek"($I10) + rx1257_cur."!cursor_pos"($I11) + ($P10) = rx1257_cur."!cursor_start"() + $P10."!cursor_pass"(rx1257_pos, "") + rx1257_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1261_done - rxcap_1261_fail: - goto rx1256_fail - rxcap_1261_done: + goto rxcap_1262_done + rxcap_1262_fail: + goto rx1257_fail + rxcap_1262_done: # rx subrule "O" subtype=capture negate= - rx1256_cur."!cursor_pos"(rx1256_pos) - $P10 = rx1256_cur."O"("%tight_or, :pasttype") - unless $P10, rx1256_fail - rx1256_cur."!mark_push"(0, -1, 0, $P10) + rx1257_cur."!cursor_pos"(rx1257_pos) + $P10 = rx1257_cur."O"("%relational, :pirop") + unless $P10, rx1257_fail + rx1257_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1256_pos = $P10."pos"() + rx1257_pos = $P10."pos"() # rx pass - rx1256_cur."!cursor_pass"(rx1256_pos, "infix:sym") - if_null rx1256_debug, debug_977 - rx1256_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1256_pos) + rx1257_cur."!cursor_pass"(rx1257_pos, "infix:sym<=:=>") + if_null rx1257_debug, debug_975 + rx1257_cur."!cursor_debug"("PASS", "infix:sym<=:=>", " at pos=", rx1257_pos) + debug_975: + .return (rx1257_cur) + rx1257_restart: +.annotate 'line', 454 + if_null rx1257_debug, debug_976 + rx1257_cur."!cursor_debug"("NEXT", "infix:sym<=:=>") + debug_976: + rx1257_fail: + (rx1257_rep, rx1257_pos, $I10, $P10) = rx1257_cur."!mark_fail"(0) + lt rx1257_pos, -1, rx1257_done + eq rx1257_pos, -1, rx1257_fail + jump $I10 + rx1257_done: + rx1257_cur."!cursor_fail"() + if_null rx1257_debug, debug_977 + rx1257_cur."!cursor_debug"("FAIL", "infix:sym<=:=>") 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: - rx1256_fail: - (rx1256_rep, rx1256_pos, $I10, $P10) = rx1256_cur."!mark_fail"(0) - lt rx1256_pos, -1, rx1256_done - eq rx1256_pos, -1, rx1256_fail - jump $I10 - rx1256_done: - rx1256_cur."!cursor_fail"() - if_null rx1256_debug, debug_979 - rx1256_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_979: - .return (rx1256_cur) + .return (rx1257_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("327_1282016529.10767") :method -.annotate 'line', 447 - $P1258 = self."!PREFIX__!subrule"("O", "//") - new $P1259, "ResizablePMCArray" - push $P1259, $P1258 - .return ($P1259) +.sub "!PREFIX__infix:sym<=:=>" :subid("325_1284728478.15265") :method +.annotate 'line', 454 + $P1259 = self."!PREFIX__!subrule"("O", "=:=") + new $P1260, "ResizablePMCArray" + push $P1260, $P1259 + .return ($P1260) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym" :subid("328_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1263_tgt - .local int rx1263_pos - .local int rx1263_off - .local int rx1263_eos - .local int rx1263_rep - .local pmc rx1263_cur - .local pmc rx1263_debug - (rx1263_cur, rx1263_pos, rx1263_tgt, $I10) = self."!cursor_start"() - getattribute rx1263_debug, rx1263_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1263_cur - .local pmc match - .lex "$/", match - length rx1263_eos, rx1263_tgt - gt rx1263_pos, rx1263_eos, rx1263_done - set rx1263_off, 0 - lt rx1263_pos, 2, rx1263_start - sub rx1263_off, rx1263_pos, 1 - substr rx1263_tgt, rx1263_tgt, rx1263_off - rx1263_start: - eq $I10, 1, rx1263_restart - if_null rx1263_debug, debug_980 - rx1263_cur."!cursor_debug"("START ", "infix:sym") - debug_980: +.sub "infix:sym<~~>" :subid("326_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1264_tgt + .local int rx1264_pos + .local int rx1264_off + .local int rx1264_eos + .local int rx1264_rep + .local pmc rx1264_cur + .local pmc rx1264_debug + (rx1264_cur, rx1264_pos, rx1264_tgt, $I10) = self."!cursor_start"() + getattribute rx1264_debug, rx1264_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1264_cur + .local pmc match + .lex "$/", match + length rx1264_eos, rx1264_tgt + gt rx1264_pos, rx1264_eos, rx1264_done + set rx1264_off, 0 + lt rx1264_pos, 2, rx1264_start + sub rx1264_off, rx1264_pos, 1 + substr rx1264_tgt, rx1264_tgt, rx1264_off + rx1264_start: + eq $I10, 1, rx1264_restart + if_null rx1264_debug, debug_978 + rx1264_cur."!cursor_debug"("START", "infix:sym<~~>") + debug_978: $I10 = self.'from'() - ne $I10, -1, rxscan1267_done - goto rxscan1267_scan - rxscan1267_loop: - ($P10) = rx1263_cur."from"() - inc $P10 - set rx1263_pos, $P10 - ge rx1263_pos, rx1263_eos, rxscan1267_done - rxscan1267_scan: - 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 - sub $I11, rx1263_pos, rx1263_off - 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=") - unless $P10, rx1263_fail - 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 - sub $I11, rx1263_pos, rx1263_off - substr $S10, rx1263_tgt, $I11, 2 - ne $S10, "!!", rx1263_fail - add rx1263_pos, 2 -.annotate 'line', 544 + ne $I10, -1, rxscan1268_done + goto rxscan1268_scan + rxscan1268_loop: + ($P10) = rx1264_cur."from"() + inc $P10 + set rx1264_pos, $P10 + ge rx1264_pos, rx1264_eos, rxscan1268_done + rxscan1268_scan: + set_addr $I10, rxscan1268_loop + rx1264_cur."!mark_push"(0, rx1264_pos, $I10) + rxscan1268_done: +.annotate 'line', 539 + # rx subcapture "sym" + set_addr $I10, rxcap_1269_fail + rx1264_cur."!mark_push"(0, rx1264_pos, $I10) + # rx literal "~~" + add $I11, rx1264_pos, 2 + gt $I11, rx1264_eos, rx1264_fail + sub $I11, rx1264_pos, rx1264_off + substr $S10, rx1264_tgt, $I11, 2 + ne $S10, "~~", rx1264_fail + add rx1264_pos, 2 + set_addr $I10, rxcap_1269_fail + ($I12, $I11) = rx1264_cur."!mark_peek"($I10) + rx1264_cur."!cursor_pos"($I11) + ($P10) = rx1264_cur."!cursor_start"() + $P10."!cursor_pass"(rx1264_pos, "") + rx1264_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1269_done + rxcap_1269_fail: + goto rx1264_fail + rxcap_1269_done: # rx subrule "O" subtype=capture negate= - rx1263_cur."!cursor_pos"(rx1263_pos) - $P10 = rx1263_cur."O"("%conditional, :reducecheck, :pasttype") - unless $P10, rx1263_fail - rx1263_cur."!mark_push"(0, -1, 0, $P10) + rx1264_cur."!cursor_pos"(rx1264_pos) + $P10 = rx1264_cur."O"("%relational, :reducecheck") + unless $P10, rx1264_fail + rx1264_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1263_pos = $P10."pos"() -.annotate 'line', 539 + rx1264_pos = $P10."pos"() # rx pass - rx1263_cur."!cursor_pass"(rx1263_pos, "infix:sym") - if_null rx1263_debug, debug_981 - rx1263_cur."!cursor_debug"("PASS ", "infix:sym", " at pos=", rx1263_pos) + rx1264_cur."!cursor_pass"(rx1264_pos, "infix:sym<~~>") + if_null rx1264_debug, debug_979 + rx1264_cur."!cursor_debug"("PASS", "infix:sym<~~>", " at pos=", rx1264_pos) + debug_979: + .return (rx1264_cur) + rx1264_restart: +.annotate 'line', 454 + if_null rx1264_debug, debug_980 + rx1264_cur."!cursor_debug"("NEXT", "infix:sym<~~>") + debug_980: + rx1264_fail: + (rx1264_rep, rx1264_pos, $I10, $P10) = rx1264_cur."!mark_fail"(0) + lt rx1264_pos, -1, rx1264_done + eq rx1264_pos, -1, rx1264_fail + jump $I10 + rx1264_done: + rx1264_cur."!cursor_fail"() + if_null rx1264_debug, debug_981 + rx1264_cur."!cursor_debug"("FAIL", "infix:sym<~~>") 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: - rx1263_fail: - (rx1263_rep, rx1263_pos, $I10, $P10) = rx1263_cur."!mark_fail"(0) - lt rx1263_pos, -1, rx1263_done - eq rx1263_pos, -1, rx1263_fail - jump $I10 - rx1263_done: - rx1263_cur."!cursor_fail"() - if_null rx1263_debug, debug_983 - rx1263_cur."!cursor_debug"("FAIL ", "infix:sym") - debug_983: - .return (rx1263_cur) + .return (rx1264_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym" :subid("329_1282016529.10767") :method -.annotate 'line', 447 - $P1265 = self."!PREFIX__!subrule"("ws", "??") - new $P1266, "ResizablePMCArray" - push $P1266, $P1265 - .return ($P1266) +.sub "!PREFIX__infix:sym<~~>" :subid("327_1284728478.15265") :method +.annotate 'line', 454 + $P1266 = self."!PREFIX__!subrule"("O", "~~") + new $P1267, "ResizablePMCArray" + push $P1267, $P1266 + .return ($P1267) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<=>" :subid("330_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1269_tgt - .local int rx1269_pos - .local int rx1269_off - .local int rx1269_eos - .local int rx1269_rep - .local pmc rx1269_cur - .local pmc rx1269_debug - (rx1269_cur, rx1269_pos, rx1269_tgt, $I10) = self."!cursor_start"() - getattribute rx1269_debug, rx1269_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1269_cur - .local pmc match - .lex "$/", match - length rx1269_eos, rx1269_tgt - gt rx1269_pos, rx1269_eos, rx1269_done - set rx1269_off, 0 - lt rx1269_pos, 2, rx1269_start - sub rx1269_off, rx1269_pos, 1 - substr rx1269_tgt, rx1269_tgt, rx1269_off - rx1269_start: - eq $I10, 1, rx1269_restart - if_null rx1269_debug, debug_984 - rx1269_cur."!cursor_debug"("START ", "infix:sym<=>") - debug_984: +.sub "infix:sym<&&>" :subid("328_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1271_tgt + .local int rx1271_pos + .local int rx1271_off + .local int rx1271_eos + .local int rx1271_rep + .local pmc rx1271_cur + .local pmc rx1271_debug + (rx1271_cur, rx1271_pos, rx1271_tgt, $I10) = self."!cursor_start"() + getattribute rx1271_debug, rx1271_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1271_cur + .local pmc match + .lex "$/", match + length rx1271_eos, rx1271_tgt + gt rx1271_pos, rx1271_eos, rx1271_done + set rx1271_off, 0 + lt rx1271_pos, 2, rx1271_start + sub rx1271_off, rx1271_pos, 1 + substr rx1271_tgt, rx1271_tgt, rx1271_off + rx1271_start: + eq $I10, 1, rx1271_restart + if_null rx1271_debug, debug_982 + rx1271_cur."!cursor_debug"("START", "infix:sym<&&>") + debug_982: $I10 = self.'from'() - ne $I10, -1, rxscan1273_done - goto rxscan1273_scan - rxscan1273_loop: - ($P10) = rx1269_cur."from"() - inc $P10 - set rx1269_pos, $P10 - ge rx1269_pos, rx1269_eos, rxscan1273_done - rxscan1273_scan: - set_addr $I10, rxscan1273_loop - rx1269_cur."!mark_push"(0, rx1269_pos, $I10) - rxscan1273_done: -.annotate 'line', 548 + ne $I10, -1, rxscan1275_done + goto rxscan1275_scan + rxscan1275_loop: + ($P10) = rx1271_cur."from"() + inc $P10 + set rx1271_pos, $P10 + ge rx1271_pos, rx1271_eos, rxscan1275_done + rxscan1275_scan: + set_addr $I10, rxscan1275_loop + rx1271_cur."!mark_push"(0, rx1271_pos, $I10) + rxscan1275_done: +.annotate 'line', 541 # rx subcapture "sym" - set_addr $I10, rxcap_1274_fail - rx1269_cur."!mark_push"(0, rx1269_pos, $I10) - # rx literal "=" - add $I11, rx1269_pos, 1 - gt $I11, rx1269_eos, rx1269_fail - sub $I11, rx1269_pos, rx1269_off - ord $I11, rx1269_tgt, $I11 - ne $I11, 61, rx1269_fail - add rx1269_pos, 1 - set_addr $I10, rxcap_1274_fail - ($I12, $I11) = rx1269_cur."!mark_peek"($I10) - rx1269_cur."!cursor_pos"($I11) - ($P10) = rx1269_cur."!cursor_start"() - $P10."!cursor_pass"(rx1269_pos, "") - rx1269_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1276_fail + rx1271_cur."!mark_push"(0, rx1271_pos, $I10) + # rx literal "&&" + add $I11, rx1271_pos, 2 + gt $I11, rx1271_eos, rx1271_fail + sub $I11, rx1271_pos, rx1271_off + substr $S10, rx1271_tgt, $I11, 2 + ne $S10, "&&", rx1271_fail + add rx1271_pos, 2 + set_addr $I10, rxcap_1276_fail + ($I12, $I11) = rx1271_cur."!mark_peek"($I10) + rx1271_cur."!cursor_pos"($I11) + ($P10) = rx1271_cur."!cursor_start"() + $P10."!cursor_pass"(rx1271_pos, "") + rx1271_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1274_done - rxcap_1274_fail: - goto rx1269_fail - rxcap_1274_done: - # rx subrule "panic" subtype=method negate= - rx1269_cur."!cursor_pos"(rx1269_pos) - $P10 = rx1269_cur."panic"("Assignment (\"=\") not supported in NQP, use \":=\" instead") - unless $P10, rx1269_fail - rx1269_pos = $P10."pos"() -.annotate 'line', 547 + goto rxcap_1276_done + rxcap_1276_fail: + goto rx1271_fail + rxcap_1276_done: + # rx subrule "O" subtype=capture negate= + rx1271_cur."!cursor_pos"(rx1271_pos) + $P10 = rx1271_cur."O"("%tight_and, :pasttype") + unless $P10, rx1271_fail + rx1271_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1271_pos = $P10."pos"() # rx pass - rx1269_cur."!cursor_pass"(rx1269_pos, "infix:sym<=>") - if_null rx1269_debug, debug_985 - rx1269_cur."!cursor_debug"("PASS ", "infix:sym<=>", " at pos=", rx1269_pos) + rx1271_cur."!cursor_pass"(rx1271_pos, "infix:sym<&&>") + if_null rx1271_debug, debug_983 + rx1271_cur."!cursor_debug"("PASS", "infix:sym<&&>", " at pos=", rx1271_pos) + debug_983: + .return (rx1271_cur) + rx1271_restart: +.annotate 'line', 454 + if_null rx1271_debug, debug_984 + rx1271_cur."!cursor_debug"("NEXT", "infix:sym<&&>") + debug_984: + rx1271_fail: + (rx1271_rep, rx1271_pos, $I10, $P10) = rx1271_cur."!mark_fail"(0) + lt rx1271_pos, -1, rx1271_done + eq rx1271_pos, -1, rx1271_fail + jump $I10 + rx1271_done: + rx1271_cur."!cursor_fail"() + if_null rx1271_debug, debug_985 + rx1271_cur."!cursor_debug"("FAIL", "infix:sym<&&>") 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: - rx1269_fail: - (rx1269_rep, rx1269_pos, $I10, $P10) = rx1269_cur."!mark_fail"(0) - lt rx1269_pos, -1, rx1269_done - eq rx1269_pos, -1, rx1269_fail - jump $I10 - rx1269_done: - rx1269_cur."!cursor_fail"() - if_null rx1269_debug, debug_987 - rx1269_cur."!cursor_debug"("FAIL ", "infix:sym<=>") - debug_987: - .return (rx1269_cur) + .return (rx1271_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<=>" :subid("331_1282016529.10767") :method -.annotate 'line', 447 - $P1271 = self."!PREFIX__!subrule"("panic", "=") - new $P1272, "ResizablePMCArray" - push $P1272, $P1271 - .return ($P1272) +.sub "!PREFIX__infix:sym<&&>" :subid("329_1284728478.15265") :method +.annotate 'line', 454 + $P1273 = self."!PREFIX__!subrule"("O", "&&") + new $P1274, "ResizablePMCArray" + push $P1274, $P1273 + .return ($P1274) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<:=>" :subid("332_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1276_tgt - .local int rx1276_pos - .local int rx1276_off - .local int rx1276_eos - .local int rx1276_rep - .local pmc rx1276_cur - .local pmc rx1276_debug - (rx1276_cur, rx1276_pos, rx1276_tgt, $I10) = self."!cursor_start"() - getattribute rx1276_debug, rx1276_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1276_cur - .local pmc match - .lex "$/", match - length rx1276_eos, rx1276_tgt - gt rx1276_pos, rx1276_eos, rx1276_done - set rx1276_off, 0 - lt rx1276_pos, 2, rx1276_start - sub rx1276_off, rx1276_pos, 1 - substr rx1276_tgt, rx1276_tgt, rx1276_off - rx1276_start: - eq $I10, 1, rx1276_restart - if_null rx1276_debug, debug_988 - rx1276_cur."!cursor_debug"("START ", "infix:sym<:=>") - debug_988: +.sub "infix:sym<||>" :subid("330_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1278_tgt + .local int rx1278_pos + .local int rx1278_off + .local int rx1278_eos + .local int rx1278_rep + .local pmc rx1278_cur + .local pmc rx1278_debug + (rx1278_cur, rx1278_pos, rx1278_tgt, $I10) = self."!cursor_start"() + getattribute rx1278_debug, rx1278_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1278_cur + .local pmc match + .lex "$/", match + length rx1278_eos, rx1278_tgt + gt rx1278_pos, rx1278_eos, rx1278_done + set rx1278_off, 0 + lt rx1278_pos, 2, rx1278_start + sub rx1278_off, rx1278_pos, 1 + substr rx1278_tgt, rx1278_tgt, rx1278_off + rx1278_start: + eq $I10, 1, rx1278_restart + if_null rx1278_debug, debug_986 + rx1278_cur."!cursor_debug"("START", "infix:sym<||>") + debug_986: $I10 = self.'from'() - ne $I10, -1, rxscan1280_done - goto rxscan1280_scan - rxscan1280_loop: - ($P10) = rx1276_cur."from"() - inc $P10 - set rx1276_pos, $P10 - ge rx1276_pos, rx1276_eos, rxscan1280_done - rxscan1280_scan: - set_addr $I10, rxscan1280_loop - rx1276_cur."!mark_push"(0, rx1276_pos, $I10) - rxscan1280_done: -.annotate 'line', 550 + ne $I10, -1, rxscan1282_done + goto rxscan1282_scan + rxscan1282_loop: + ($P10) = rx1278_cur."from"() + inc $P10 + set rx1278_pos, $P10 + ge rx1278_pos, rx1278_eos, rxscan1282_done + rxscan1282_scan: + set_addr $I10, rxscan1282_loop + rx1278_cur."!mark_push"(0, rx1278_pos, $I10) + rxscan1282_done: +.annotate 'line', 543 # rx subcapture "sym" - set_addr $I10, rxcap_1281_fail - rx1276_cur."!mark_push"(0, rx1276_pos, $I10) - # rx literal ":=" - add $I11, rx1276_pos, 2 - gt $I11, rx1276_eos, rx1276_fail - sub $I11, rx1276_pos, rx1276_off - substr $S10, rx1276_tgt, $I11, 2 - ne $S10, ":=", rx1276_fail - add rx1276_pos, 2 - set_addr $I10, rxcap_1281_fail - ($I12, $I11) = rx1276_cur."!mark_peek"($I10) - rx1276_cur."!cursor_pos"($I11) - ($P10) = rx1276_cur."!cursor_start"() - $P10."!cursor_pass"(rx1276_pos, "") - rx1276_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1283_fail + rx1278_cur."!mark_push"(0, rx1278_pos, $I10) + # rx literal "||" + add $I11, rx1278_pos, 2 + gt $I11, rx1278_eos, rx1278_fail + sub $I11, rx1278_pos, rx1278_off + substr $S10, rx1278_tgt, $I11, 2 + ne $S10, "||", rx1278_fail + add rx1278_pos, 2 + set_addr $I10, rxcap_1283_fail + ($I12, $I11) = rx1278_cur."!mark_peek"($I10) + rx1278_cur."!cursor_pos"($I11) + ($P10) = rx1278_cur."!cursor_start"() + $P10."!cursor_pass"(rx1278_pos, "") + rx1278_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1281_done - rxcap_1281_fail: - goto rx1276_fail - rxcap_1281_done: + goto rxcap_1283_done + rxcap_1283_fail: + goto rx1278_fail + rxcap_1283_done: # rx subrule "O" subtype=capture negate= - rx1276_cur."!cursor_pos"(rx1276_pos) - $P10 = rx1276_cur."O"("%assignment, :pasttype") - unless $P10, rx1276_fail - rx1276_cur."!mark_push"(0, -1, 0, $P10) + rx1278_cur."!cursor_pos"(rx1278_pos) + $P10 = rx1278_cur."O"("%tight_or, :pasttype") + unless $P10, rx1278_fail + rx1278_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1276_pos = $P10."pos"() + rx1278_pos = $P10."pos"() # rx pass - rx1276_cur."!cursor_pass"(rx1276_pos, "infix:sym<:=>") - if_null rx1276_debug, debug_989 - rx1276_cur."!cursor_debug"("PASS ", "infix:sym<:=>", " at pos=", rx1276_pos) + rx1278_cur."!cursor_pass"(rx1278_pos, "infix:sym<||>") + if_null rx1278_debug, debug_987 + rx1278_cur."!cursor_debug"("PASS", "infix:sym<||>", " at pos=", rx1278_pos) + debug_987: + .return (rx1278_cur) + rx1278_restart: +.annotate 'line', 454 + if_null rx1278_debug, debug_988 + rx1278_cur."!cursor_debug"("NEXT", "infix:sym<||>") + debug_988: + rx1278_fail: + (rx1278_rep, rx1278_pos, $I10, $P10) = rx1278_cur."!mark_fail"(0) + lt rx1278_pos, -1, rx1278_done + eq rx1278_pos, -1, rx1278_fail + jump $I10 + rx1278_done: + rx1278_cur."!cursor_fail"() + if_null rx1278_debug, debug_989 + rx1278_cur."!cursor_debug"("FAIL", "infix:sym<||>") 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: - rx1276_fail: - (rx1276_rep, rx1276_pos, $I10, $P10) = rx1276_cur."!mark_fail"(0) - lt rx1276_pos, -1, rx1276_done - eq rx1276_pos, -1, rx1276_fail - jump $I10 - rx1276_done: - rx1276_cur."!cursor_fail"() - if_null rx1276_debug, debug_991 - rx1276_cur."!cursor_debug"("FAIL ", "infix:sym<:=>") - debug_991: - .return (rx1276_cur) + .return (rx1278_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<:=>" :subid("333_1282016529.10767") :method -.annotate 'line', 447 - $P1278 = self."!PREFIX__!subrule"("O", ":=") - new $P1279, "ResizablePMCArray" - push $P1279, $P1278 - .return ($P1279) +.sub "!PREFIX__infix:sym<||>" :subid("331_1284728478.15265") :method +.annotate 'line', 454 + $P1280 = self."!PREFIX__!subrule"("O", "||") + new $P1281, "ResizablePMCArray" + push $P1281, $P1280 + .return ($P1281) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<::=>" :subid("334_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1283_tgt - .local int rx1283_pos - .local int rx1283_off - .local int rx1283_eos - .local int rx1283_rep - .local pmc rx1283_cur - .local pmc rx1283_debug - (rx1283_cur, rx1283_pos, rx1283_tgt, $I10) = self."!cursor_start"() - getattribute rx1283_debug, rx1283_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1283_cur - .local pmc match - .lex "$/", match - length rx1283_eos, rx1283_tgt - gt rx1283_pos, rx1283_eos, rx1283_done - set rx1283_off, 0 - lt rx1283_pos, 2, rx1283_start - sub rx1283_off, rx1283_pos, 1 - substr rx1283_tgt, rx1283_tgt, rx1283_off - rx1283_start: - eq $I10, 1, rx1283_restart - if_null rx1283_debug, debug_992 - rx1283_cur."!cursor_debug"("START ", "infix:sym<::=>") - debug_992: +.sub "infix:sym" :subid("332_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1285_tgt + .local int rx1285_pos + .local int rx1285_off + .local int rx1285_eos + .local int rx1285_rep + .local pmc rx1285_cur + .local pmc rx1285_debug + (rx1285_cur, rx1285_pos, rx1285_tgt, $I10) = self."!cursor_start"() + getattribute rx1285_debug, rx1285_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1285_cur + .local pmc match + .lex "$/", match + length rx1285_eos, rx1285_tgt + gt rx1285_pos, rx1285_eos, rx1285_done + set rx1285_off, 0 + lt rx1285_pos, 2, rx1285_start + sub rx1285_off, rx1285_pos, 1 + substr rx1285_tgt, rx1285_tgt, rx1285_off + rx1285_start: + eq $I10, 1, rx1285_restart + if_null rx1285_debug, debug_990 + rx1285_cur."!cursor_debug"("START", "infix:sym") + debug_990: $I10 = self.'from'() - ne $I10, -1, rxscan1287_done - goto rxscan1287_scan - rxscan1287_loop: - ($P10) = rx1283_cur."from"() - inc $P10 - set rx1283_pos, $P10 - ge rx1283_pos, rx1283_eos, rxscan1287_done - rxscan1287_scan: - set_addr $I10, rxscan1287_loop - rx1283_cur."!mark_push"(0, rx1283_pos, $I10) - rxscan1287_done: -.annotate 'line', 551 + ne $I10, -1, rxscan1289_done + goto rxscan1289_scan + rxscan1289_loop: + ($P10) = rx1285_cur."from"() + inc $P10 + set rx1285_pos, $P10 + ge rx1285_pos, rx1285_eos, rxscan1289_done + rxscan1289_scan: + set_addr $I10, rxscan1289_loop + rx1285_cur."!mark_push"(0, rx1285_pos, $I10) + rxscan1289_done: +.annotate 'line', 544 # rx subcapture "sym" - set_addr $I10, rxcap_1288_fail - rx1283_cur."!mark_push"(0, rx1283_pos, $I10) - # rx literal "::=" - add $I11, rx1283_pos, 3 - gt $I11, rx1283_eos, rx1283_fail - sub $I11, rx1283_pos, rx1283_off - substr $S10, rx1283_tgt, $I11, 3 - ne $S10, "::=", rx1283_fail - add rx1283_pos, 3 - set_addr $I10, rxcap_1288_fail - ($I12, $I11) = rx1283_cur."!mark_peek"($I10) - rx1283_cur."!cursor_pos"($I11) - ($P10) = rx1283_cur."!cursor_start"() - $P10."!cursor_pass"(rx1283_pos, "") - rx1283_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1290_fail + rx1285_cur."!mark_push"(0, rx1285_pos, $I10) + # rx literal "//" + add $I11, rx1285_pos, 2 + gt $I11, rx1285_eos, rx1285_fail + sub $I11, rx1285_pos, rx1285_off + substr $S10, rx1285_tgt, $I11, 2 + ne $S10, "//", rx1285_fail + add rx1285_pos, 2 + set_addr $I10, rxcap_1290_fail + ($I12, $I11) = rx1285_cur."!mark_peek"($I10) + rx1285_cur."!cursor_pos"($I11) + ($P10) = rx1285_cur."!cursor_start"() + $P10."!cursor_pass"(rx1285_pos, "") + rx1285_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1288_done - rxcap_1288_fail: - goto rx1283_fail - rxcap_1288_done: + goto rxcap_1290_done + rxcap_1290_fail: + goto rx1285_fail + rxcap_1290_done: # rx subrule "O" subtype=capture negate= - rx1283_cur."!cursor_pos"(rx1283_pos) - $P10 = rx1283_cur."O"("%assignment, :pasttype") - unless $P10, rx1283_fail - rx1283_cur."!mark_push"(0, -1, 0, $P10) + rx1285_cur."!cursor_pos"(rx1285_pos) + $P10 = rx1285_cur."O"("%tight_or, :pasttype") + unless $P10, rx1285_fail + rx1285_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1283_pos = $P10."pos"() + rx1285_pos = $P10."pos"() # rx pass - rx1283_cur."!cursor_pass"(rx1283_pos, "infix:sym<::=>") - if_null rx1283_debug, debug_993 - rx1283_cur."!cursor_debug"("PASS ", "infix:sym<::=>", " at pos=", rx1283_pos) + rx1285_cur."!cursor_pass"(rx1285_pos, "infix:sym") + if_null rx1285_debug, debug_991 + rx1285_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1285_pos) + debug_991: + .return (rx1285_cur) + rx1285_restart: +.annotate 'line', 454 + if_null rx1285_debug, debug_992 + rx1285_cur."!cursor_debug"("NEXT", "infix:sym") + debug_992: + rx1285_fail: + (rx1285_rep, rx1285_pos, $I10, $P10) = rx1285_cur."!mark_fail"(0) + lt rx1285_pos, -1, rx1285_done + eq rx1285_pos, -1, rx1285_fail + jump $I10 + rx1285_done: + rx1285_cur."!cursor_fail"() + if_null rx1285_debug, debug_993 + rx1285_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1283_fail: - (rx1283_rep, rx1283_pos, $I10, $P10) = rx1283_cur."!mark_fail"(0) - lt rx1283_pos, -1, rx1283_done - eq rx1283_pos, -1, rx1283_fail - jump $I10 - rx1283_done: - rx1283_cur."!cursor_fail"() - if_null rx1283_debug, debug_995 - rx1283_cur."!cursor_debug"("FAIL ", "infix:sym<::=>") - debug_995: - .return (rx1283_cur) + .return (rx1285_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<::=>" :subid("335_1282016529.10767") :method -.annotate 'line', 447 - $P1285 = self."!PREFIX__!subrule"("O", "::=") - new $P1286, "ResizablePMCArray" - push $P1286, $P1285 - .return ($P1286) +.sub "!PREFIX__infix:sym" :subid("333_1284728478.15265") :method +.annotate 'line', 454 + $P1287 = self."!PREFIX__!subrule"("O", "//") + new $P1288, "ResizablePMCArray" + push $P1288, $P1287 + .return ($P1288) .end .namespace ["NQP";"Grammar"] -.sub "infix:sym<,>" :subid("336_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1290_tgt - .local int rx1290_pos - .local int rx1290_off - .local int rx1290_eos - .local int rx1290_rep - .local pmc rx1290_cur - .local pmc rx1290_debug - (rx1290_cur, rx1290_pos, rx1290_tgt, $I10) = self."!cursor_start"() - getattribute rx1290_debug, rx1290_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1290_cur - .local pmc match - .lex "$/", match - length rx1290_eos, rx1290_tgt - gt rx1290_pos, rx1290_eos, rx1290_done - set rx1290_off, 0 - lt rx1290_pos, 2, rx1290_start - sub rx1290_off, rx1290_pos, 1 - substr rx1290_tgt, rx1290_tgt, rx1290_off - rx1290_start: - eq $I10, 1, rx1290_restart - if_null rx1290_debug, debug_996 - rx1290_cur."!cursor_debug"("START ", "infix:sym<,>") - debug_996: +.sub "infix:sym" :subid("334_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1292_tgt + .local int rx1292_pos + .local int rx1292_off + .local int rx1292_eos + .local int rx1292_rep + .local pmc rx1292_cur + .local pmc rx1292_debug + (rx1292_cur, rx1292_pos, rx1292_tgt, $I10) = self."!cursor_start"() + getattribute rx1292_debug, rx1292_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1292_cur + .local pmc match + .lex "$/", match + length rx1292_eos, rx1292_tgt + gt rx1292_pos, rx1292_eos, rx1292_done + set rx1292_off, 0 + lt rx1292_pos, 2, rx1292_start + sub rx1292_off, rx1292_pos, 1 + substr rx1292_tgt, rx1292_tgt, rx1292_off + rx1292_start: + eq $I10, 1, rx1292_restart + if_null rx1292_debug, debug_994 + rx1292_cur."!cursor_debug"("START", "infix:sym") + debug_994: $I10 = self.'from'() - ne $I10, -1, rxscan1294_done - goto rxscan1294_scan - rxscan1294_loop: - ($P10) = rx1290_cur."from"() - inc $P10 - set rx1290_pos, $P10 - ge rx1290_pos, rx1290_eos, rxscan1294_done - rxscan1294_scan: - 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) - # rx literal "," - add $I11, rx1290_pos, 1 - gt $I11, rx1290_eos, rx1290_fail - sub $I11, rx1290_pos, rx1290_off - ord $I11, rx1290_tgt, $I11 - ne $I11, 44, rx1290_fail - add rx1290_pos, 1 - set_addr $I10, rxcap_1295_fail - ($I12, $I11) = rx1290_cur."!mark_peek"($I10) - rx1290_cur."!cursor_pos"($I11) - ($P10) = rx1290_cur."!cursor_start"() - $P10."!cursor_pass"(rx1290_pos, "") - rx1290_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_1295_done - rxcap_1295_fail: - goto rx1290_fail - rxcap_1295_done: + ne $I10, -1, rxscan1296_done + goto rxscan1296_scan + rxscan1296_loop: + ($P10) = rx1292_cur."from"() + inc $P10 + set rx1292_pos, $P10 + ge rx1292_pos, rx1292_eos, rxscan1296_done + rxscan1296_scan: + set_addr $I10, rxscan1296_loop + rx1292_cur."!mark_push"(0, rx1292_pos, $I10) + rxscan1296_done: +.annotate 'line', 547 + # rx literal "??" + add $I11, rx1292_pos, 2 + gt $I11, rx1292_eos, rx1292_fail + sub $I11, rx1292_pos, rx1292_off + substr $S10, rx1292_tgt, $I11, 2 + ne $S10, "??", rx1292_fail + add rx1292_pos, 2 +.annotate 'line', 548 + # rx subrule "ws" subtype=method negate= + rx1292_cur."!cursor_pos"(rx1292_pos) + $P10 = rx1292_cur."ws"() + unless $P10, rx1292_fail + rx1292_pos = $P10."pos"() +.annotate 'line', 549 + # rx subrule "EXPR" subtype=capture negate= + rx1292_cur."!cursor_pos"(rx1292_pos) + $P10 = rx1292_cur."EXPR"("i=") + unless $P10, rx1292_fail + rx1292_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("EXPR") + rx1292_pos = $P10."pos"() +.annotate 'line', 550 + # rx literal "!!" + add $I11, rx1292_pos, 2 + gt $I11, rx1292_eos, rx1292_fail + sub $I11, rx1292_pos, rx1292_off + substr $S10, rx1292_tgt, $I11, 2 + ne $S10, "!!", rx1292_fail + add rx1292_pos, 2 +.annotate 'line', 551 # rx subrule "O" subtype=capture negate= - rx1290_cur."!cursor_pos"(rx1290_pos) - $P10 = rx1290_cur."O"("%comma, :pasttype") - unless $P10, rx1290_fail - rx1290_cur."!mark_push"(0, -1, 0, $P10) + rx1292_cur."!cursor_pos"(rx1292_pos) + $P10 = rx1292_cur."O"("%conditional, :reducecheck, :pasttype") + unless $P10, rx1292_fail + rx1292_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1290_pos = $P10."pos"() + rx1292_pos = $P10."pos"() +.annotate 'line', 546 # rx pass - rx1290_cur."!cursor_pass"(rx1290_pos, "infix:sym<,>") - if_null rx1290_debug, debug_997 - rx1290_cur."!cursor_debug"("PASS ", "infix:sym<,>", " at pos=", rx1290_pos) + rx1292_cur."!cursor_pass"(rx1292_pos, "infix:sym") + if_null rx1292_debug, debug_995 + rx1292_cur."!cursor_debug"("PASS", "infix:sym", " at pos=", rx1292_pos) + debug_995: + .return (rx1292_cur) + rx1292_restart: +.annotate 'line', 454 + if_null rx1292_debug, debug_996 + rx1292_cur."!cursor_debug"("NEXT", "infix:sym") + debug_996: + rx1292_fail: + (rx1292_rep, rx1292_pos, $I10, $P10) = rx1292_cur."!mark_fail"(0) + lt rx1292_pos, -1, rx1292_done + eq rx1292_pos, -1, rx1292_fail + jump $I10 + rx1292_done: + rx1292_cur."!cursor_fail"() + if_null rx1292_debug, debug_997 + rx1292_cur."!cursor_debug"("FAIL", "infix:sym") 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: - rx1290_fail: - (rx1290_rep, rx1290_pos, $I10, $P10) = rx1290_cur."!mark_fail"(0) - lt rx1290_pos, -1, rx1290_done - eq rx1290_pos, -1, rx1290_fail - jump $I10 - rx1290_done: - rx1290_cur."!cursor_fail"() - if_null rx1290_debug, debug_999 - rx1290_cur."!cursor_debug"("FAIL ", "infix:sym<,>") - debug_999: - .return (rx1290_cur) + .return (rx1292_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__infix:sym<,>" :subid("337_1282016529.10767") :method -.annotate 'line', 447 - $P1292 = self."!PREFIX__!subrule"("O", ",") - new $P1293, "ResizablePMCArray" - push $P1293, $P1292 - .return ($P1293) +.sub "!PREFIX__infix:sym" :subid("335_1284728478.15265") :method +.annotate 'line', 454 + $P1294 = self."!PREFIX__!subrule"("ws", "??") + new $P1295, "ResizablePMCArray" + push $P1295, $P1294 + .return ($P1295) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym" :subid("338_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1297_tgt - .local int rx1297_pos - .local int rx1297_off - .local int rx1297_eos - .local int rx1297_rep - .local pmc rx1297_cur - .local pmc rx1297_debug - (rx1297_cur, rx1297_pos, rx1297_tgt, $I10) = self."!cursor_start"() - getattribute rx1297_debug, rx1297_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1297_cur - .local pmc match - .lex "$/", match - length rx1297_eos, rx1297_tgt - gt rx1297_pos, rx1297_eos, rx1297_done - set rx1297_off, 0 - lt rx1297_pos, 2, rx1297_start - sub rx1297_off, rx1297_pos, 1 - substr rx1297_tgt, rx1297_tgt, rx1297_off - rx1297_start: - eq $I10, 1, rx1297_restart - if_null rx1297_debug, debug_1000 - rx1297_cur."!cursor_debug"("START ", "prefix:sym") - debug_1000: +.sub "infix:sym<=>" :subid("336_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1298_tgt + .local int rx1298_pos + .local int rx1298_off + .local int rx1298_eos + .local int rx1298_rep + .local pmc rx1298_cur + .local pmc rx1298_debug + (rx1298_cur, rx1298_pos, rx1298_tgt, $I10) = self."!cursor_start"() + getattribute rx1298_debug, rx1298_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1298_cur + .local pmc match + .lex "$/", match + length rx1298_eos, rx1298_tgt + gt rx1298_pos, rx1298_eos, rx1298_done + set rx1298_off, 0 + lt rx1298_pos, 2, rx1298_start + sub rx1298_off, rx1298_pos, 1 + substr rx1298_tgt, rx1298_tgt, rx1298_off + rx1298_start: + eq $I10, 1, rx1298_restart + if_null rx1298_debug, debug_998 + rx1298_cur."!cursor_debug"("START", "infix:sym<=>") + debug_998: $I10 = self.'from'() - ne $I10, -1, rxscan1300_done - goto rxscan1300_scan - rxscan1300_loop: - ($P10) = rx1297_cur."from"() - inc $P10 - set rx1297_pos, $P10 - ge rx1297_pos, rx1297_eos, rxscan1300_done - rxscan1300_scan: - set_addr $I10, rxscan1300_loop - rx1297_cur."!mark_push"(0, rx1297_pos, $I10) - rxscan1300_done: + ne $I10, -1, rxscan1302_done + goto rxscan1302_scan + rxscan1302_loop: + ($P10) = rx1298_cur."from"() + inc $P10 + set rx1298_pos, $P10 + ge rx1298_pos, rx1298_eos, rxscan1302_done + rxscan1302_scan: + set_addr $I10, rxscan1302_loop + rx1298_cur."!mark_push"(0, rx1298_pos, $I10) + rxscan1302_done: .annotate 'line', 555 # rx subcapture "sym" - set_addr $I10, rxcap_1301_fail - rx1297_cur."!mark_push"(0, rx1297_pos, $I10) - # rx literal "return" - add $I11, rx1297_pos, 6 - gt $I11, rx1297_eos, rx1297_fail - sub $I11, rx1297_pos, rx1297_off - substr $S10, rx1297_tgt, $I11, 6 - ne $S10, "return", rx1297_fail - add rx1297_pos, 6 - set_addr $I10, rxcap_1301_fail - ($I12, $I11) = rx1297_cur."!mark_peek"($I10) - rx1297_cur."!cursor_pos"($I11) - ($P10) = rx1297_cur."!cursor_start"() - $P10."!cursor_pass"(rx1297_pos, "") - rx1297_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1303_fail + rx1298_cur."!mark_push"(0, rx1298_pos, $I10) + # rx literal "=" + add $I11, rx1298_pos, 1 + gt $I11, rx1298_eos, rx1298_fail + sub $I11, rx1298_pos, rx1298_off + ord $I11, rx1298_tgt, $I11 + ne $I11, 61, rx1298_fail + add rx1298_pos, 1 + set_addr $I10, rxcap_1303_fail + ($I12, $I11) = rx1298_cur."!mark_peek"($I10) + rx1298_cur."!cursor_pos"($I11) + ($P10) = rx1298_cur."!cursor_start"() + $P10."!cursor_pass"(rx1298_pos, "") + rx1298_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1301_done - rxcap_1301_fail: - goto rx1297_fail - rxcap_1301_done: - # rx charclass s - ge rx1297_pos, rx1297_eos, rx1297_fail - sub $I10, rx1297_pos, rx1297_off - is_cclass $I11, 32, rx1297_tgt, $I10 - unless $I11, rx1297_fail - inc rx1297_pos - # rx subrule "O" subtype=capture negate= - rx1297_cur."!cursor_pos"(rx1297_pos) - $P10 = rx1297_cur."O"("%list_prefix, :pasttype") - unless $P10, rx1297_fail - rx1297_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("O") - rx1297_pos = $P10."pos"() + goto rxcap_1303_done + rxcap_1303_fail: + goto rx1298_fail + rxcap_1303_done: + # rx subrule "panic" subtype=method negate= + rx1298_cur."!cursor_pos"(rx1298_pos) + $P10 = rx1298_cur."panic"("Assignment (\"=\") not supported in NQP, use \":=\" instead") + unless $P10, rx1298_fail + rx1298_pos = $P10."pos"() +.annotate 'line', 554 # rx pass - rx1297_cur."!cursor_pass"(rx1297_pos, "prefix:sym") - if_null rx1297_debug, debug_1001 - rx1297_cur."!cursor_debug"("PASS ", "prefix:sym", " at pos=", rx1297_pos) + rx1298_cur."!cursor_pass"(rx1298_pos, "infix:sym<=>") + if_null rx1298_debug, debug_999 + rx1298_cur."!cursor_debug"("PASS", "infix:sym<=>", " at pos=", rx1298_pos) + debug_999: + .return (rx1298_cur) + rx1298_restart: +.annotate 'line', 454 + if_null rx1298_debug, debug_1000 + rx1298_cur."!cursor_debug"("NEXT", "infix:sym<=>") + debug_1000: + rx1298_fail: + (rx1298_rep, rx1298_pos, $I10, $P10) = rx1298_cur."!mark_fail"(0) + lt rx1298_pos, -1, rx1298_done + eq rx1298_pos, -1, rx1298_fail + jump $I10 + rx1298_done: + rx1298_cur."!cursor_fail"() + if_null rx1298_debug, debug_1001 + rx1298_cur."!cursor_debug"("FAIL", "infix:sym<=>") debug_1001: - .return (rx1297_cur) - rx1297_restart: -.annotate 'line', 447 - if_null rx1297_debug, debug_1002 - rx1297_cur."!cursor_debug"("NEXT ", "prefix:sym") - debug_1002: - rx1297_fail: - (rx1297_rep, rx1297_pos, $I10, $P10) = rx1297_cur."!mark_fail"(0) - lt rx1297_pos, -1, rx1297_done - eq rx1297_pos, -1, rx1297_fail - jump $I10 - rx1297_done: - rx1297_cur."!cursor_fail"() - if_null rx1297_debug, debug_1003 - rx1297_cur."!cursor_debug"("FAIL ", "prefix:sym") - debug_1003: - .return (rx1297_cur) + .return (rx1298_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym" :subid("339_1282016529.10767") :method -.annotate 'line', 447 - new $P1299, "ResizablePMCArray" - push $P1299, "return" - .return ($P1299) +.sub "!PREFIX__infix:sym<=>" :subid("337_1284728478.15265") :method +.annotate 'line', 454 + $P1300 = self."!PREFIX__!subrule"("panic", "=") + new $P1301, "ResizablePMCArray" + push $P1301, $P1300 + .return ($P1301) .end .namespace ["NQP";"Grammar"] -.sub "prefix:sym" :subid("340_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1303_tgt - .local int rx1303_pos - .local int rx1303_off - .local int rx1303_eos - .local int rx1303_rep - .local pmc rx1303_cur - .local pmc rx1303_debug - (rx1303_cur, rx1303_pos, rx1303_tgt, $I10) = self."!cursor_start"() - getattribute rx1303_debug, rx1303_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1303_cur - .local pmc match - .lex "$/", match - length rx1303_eos, rx1303_tgt - gt rx1303_pos, rx1303_eos, rx1303_done - set rx1303_off, 0 - lt rx1303_pos, 2, rx1303_start - sub rx1303_off, rx1303_pos, 1 - substr rx1303_tgt, rx1303_tgt, rx1303_off - rx1303_start: - eq $I10, 1, rx1303_restart - if_null rx1303_debug, debug_1004 - rx1303_cur."!cursor_debug"("START ", "prefix:sym") - debug_1004: +.sub "infix:sym<:=>" :subid("338_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1305_tgt + .local int rx1305_pos + .local int rx1305_off + .local int rx1305_eos + .local int rx1305_rep + .local pmc rx1305_cur + .local pmc rx1305_debug + (rx1305_cur, rx1305_pos, rx1305_tgt, $I10) = self."!cursor_start"() + getattribute rx1305_debug, rx1305_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1305_cur + .local pmc match + .lex "$/", match + length rx1305_eos, rx1305_tgt + gt rx1305_pos, rx1305_eos, rx1305_done + set rx1305_off, 0 + lt rx1305_pos, 2, rx1305_start + sub rx1305_off, rx1305_pos, 1 + substr rx1305_tgt, rx1305_tgt, rx1305_off + rx1305_start: + eq $I10, 1, rx1305_restart + if_null rx1305_debug, debug_1002 + rx1305_cur."!cursor_debug"("START", "infix:sym<:=>") + debug_1002: $I10 = self.'from'() - ne $I10, -1, rxscan1306_done - goto rxscan1306_scan - rxscan1306_loop: - ($P10) = rx1303_cur."from"() - inc $P10 - set rx1303_pos, $P10 - ge rx1303_pos, rx1303_eos, rxscan1306_done - rxscan1306_scan: - set_addr $I10, rxscan1306_loop - rx1303_cur."!mark_push"(0, rx1303_pos, $I10) - rxscan1306_done: -.annotate 'line', 556 + ne $I10, -1, rxscan1309_done + goto rxscan1309_scan + rxscan1309_loop: + ($P10) = rx1305_cur."from"() + inc $P10 + set rx1305_pos, $P10 + ge rx1305_pos, rx1305_eos, rxscan1309_done + rxscan1309_scan: + set_addr $I10, rxscan1309_loop + rx1305_cur."!mark_push"(0, rx1305_pos, $I10) + rxscan1309_done: +.annotate 'line', 557 # rx subcapture "sym" - set_addr $I10, rxcap_1307_fail - rx1303_cur."!mark_push"(0, rx1303_pos, $I10) - # rx literal "make" - add $I11, rx1303_pos, 4 - gt $I11, rx1303_eos, rx1303_fail - sub $I11, rx1303_pos, rx1303_off - substr $S10, rx1303_tgt, $I11, 4 - ne $S10, "make", rx1303_fail - add rx1303_pos, 4 - set_addr $I10, rxcap_1307_fail - ($I12, $I11) = rx1303_cur."!mark_peek"($I10) - rx1303_cur."!cursor_pos"($I11) - ($P10) = rx1303_cur."!cursor_start"() - $P10."!cursor_pass"(rx1303_pos, "") - rx1303_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1310_fail + rx1305_cur."!mark_push"(0, rx1305_pos, $I10) + # rx literal ":=" + add $I11, rx1305_pos, 2 + gt $I11, rx1305_eos, rx1305_fail + sub $I11, rx1305_pos, rx1305_off + substr $S10, rx1305_tgt, $I11, 2 + ne $S10, ":=", rx1305_fail + add rx1305_pos, 2 + set_addr $I10, rxcap_1310_fail + ($I12, $I11) = rx1305_cur."!mark_peek"($I10) + rx1305_cur."!cursor_pos"($I11) + ($P10) = rx1305_cur."!cursor_start"() + $P10."!cursor_pass"(rx1305_pos, "") + rx1305_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1307_done - rxcap_1307_fail: - goto rx1303_fail - rxcap_1307_done: - # rx charclass s - ge rx1303_pos, rx1303_eos, rx1303_fail - sub $I10, rx1303_pos, rx1303_off - is_cclass $I11, 32, rx1303_tgt, $I10 - unless $I11, rx1303_fail - inc rx1303_pos + goto rxcap_1310_done + rxcap_1310_fail: + goto rx1305_fail + rxcap_1310_done: # rx subrule "O" subtype=capture negate= - rx1303_cur."!cursor_pos"(rx1303_pos) - $P10 = rx1303_cur."O"("%list_prefix") - unless $P10, rx1303_fail - rx1303_cur."!mark_push"(0, -1, 0, $P10) + rx1305_cur."!cursor_pos"(rx1305_pos) + $P10 = rx1305_cur."O"("%assignment, :pasttype") + unless $P10, rx1305_fail + rx1305_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("O") - rx1303_pos = $P10."pos"() + rx1305_pos = $P10."pos"() # rx pass - rx1303_cur."!cursor_pass"(rx1303_pos, "prefix:sym") - if_null rx1303_debug, debug_1005 - rx1303_cur."!cursor_debug"("PASS ", "prefix:sym", " at pos=", rx1303_pos) + rx1305_cur."!cursor_pass"(rx1305_pos, "infix:sym<:=>") + if_null rx1305_debug, debug_1003 + rx1305_cur."!cursor_debug"("PASS", "infix:sym<:=>", " at pos=", rx1305_pos) + debug_1003: + .return (rx1305_cur) + rx1305_restart: +.annotate 'line', 454 + if_null rx1305_debug, debug_1004 + rx1305_cur."!cursor_debug"("NEXT", "infix:sym<:=>") + debug_1004: + rx1305_fail: + (rx1305_rep, rx1305_pos, $I10, $P10) = rx1305_cur."!mark_fail"(0) + lt rx1305_pos, -1, rx1305_done + eq rx1305_pos, -1, rx1305_fail + jump $I10 + rx1305_done: + rx1305_cur."!cursor_fail"() + if_null rx1305_debug, debug_1005 + rx1305_cur."!cursor_debug"("FAIL", "infix:sym<:=>") debug_1005: - .return (rx1303_cur) - rx1303_restart: -.annotate 'line', 447 - if_null rx1303_debug, debug_1006 - rx1303_cur."!cursor_debug"("NEXT ", "prefix:sym") - debug_1006: - rx1303_fail: - (rx1303_rep, rx1303_pos, $I10, $P10) = rx1303_cur."!mark_fail"(0) - lt rx1303_pos, -1, rx1303_done - eq rx1303_pos, -1, rx1303_fail - jump $I10 - rx1303_done: - rx1303_cur."!cursor_fail"() - if_null rx1303_debug, debug_1007 - rx1303_cur."!cursor_debug"("FAIL ", "prefix:sym") - debug_1007: - .return (rx1303_cur) + .return (rx1305_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__prefix:sym" :subid("341_1282016529.10767") :method -.annotate 'line', 447 - new $P1305, "ResizablePMCArray" - push $P1305, "make" - .return ($P1305) +.sub "!PREFIX__infix:sym<:=>" :subid("339_1284728478.15265") :method +.annotate 'line', 454 + $P1307 = self."!PREFIX__!subrule"("O", ":=") + new $P1308, "ResizablePMCArray" + push $P1308, $P1307 + .return ($P1308) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("342_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1309_tgt - .local int rx1309_pos - .local int rx1309_off - .local int rx1309_eos - .local int rx1309_rep - .local pmc rx1309_cur - .local pmc rx1309_debug - (rx1309_cur, rx1309_pos, rx1309_tgt, $I10) = self."!cursor_start"() - getattribute rx1309_debug, rx1309_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1309_cur - .local pmc match - .lex "$/", match - length rx1309_eos, rx1309_tgt - gt rx1309_pos, rx1309_eos, rx1309_done - set rx1309_off, 0 - lt rx1309_pos, 2, rx1309_start - sub rx1309_off, rx1309_pos, 1 - substr rx1309_tgt, rx1309_tgt, rx1309_off - rx1309_start: - eq $I10, 1, rx1309_restart - if_null rx1309_debug, debug_1008 - rx1309_cur."!cursor_debug"("START ", "term:sym") - debug_1008: +.sub "infix:sym<::=>" :subid("340_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1312_tgt + .local int rx1312_pos + .local int rx1312_off + .local int rx1312_eos + .local int rx1312_rep + .local pmc rx1312_cur + .local pmc rx1312_debug + (rx1312_cur, rx1312_pos, rx1312_tgt, $I10) = self."!cursor_start"() + getattribute rx1312_debug, rx1312_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1312_cur + .local pmc match + .lex "$/", match + length rx1312_eos, rx1312_tgt + gt rx1312_pos, rx1312_eos, rx1312_done + set rx1312_off, 0 + lt rx1312_pos, 2, rx1312_start + sub rx1312_off, rx1312_pos, 1 + substr rx1312_tgt, rx1312_tgt, rx1312_off + rx1312_start: + eq $I10, 1, rx1312_restart + if_null rx1312_debug, debug_1006 + rx1312_cur."!cursor_debug"("START", "infix:sym<::=>") + debug_1006: $I10 = self.'from'() - ne $I10, -1, rxscan1312_done - goto rxscan1312_scan - rxscan1312_loop: - ($P10) = rx1309_cur."from"() - inc $P10 - set rx1309_pos, $P10 - ge rx1309_pos, rx1309_eos, rxscan1312_done - rxscan1312_scan: - set_addr $I10, rxscan1312_loop - rx1309_cur."!mark_push"(0, rx1309_pos, $I10) - rxscan1312_done: -.annotate 'line', 557 + ne $I10, -1, rxscan1316_done + goto rxscan1316_scan + rxscan1316_loop: + ($P10) = rx1312_cur."from"() + inc $P10 + set rx1312_pos, $P10 + ge rx1312_pos, rx1312_eos, rxscan1316_done + rxscan1316_scan: + set_addr $I10, rxscan1316_loop + rx1312_cur."!mark_push"(0, rx1312_pos, $I10) + rxscan1316_done: +.annotate 'line', 558 # rx subcapture "sym" - set_addr $I10, rxcap_1313_fail - rx1309_cur."!mark_push"(0, rx1309_pos, $I10) - # rx literal "last" - add $I11, rx1309_pos, 4 - gt $I11, rx1309_eos, rx1309_fail - sub $I11, rx1309_pos, rx1309_off - substr $S10, rx1309_tgt, $I11, 4 - ne $S10, "last", rx1309_fail - add rx1309_pos, 4 - set_addr $I10, rxcap_1313_fail - ($I12, $I11) = rx1309_cur."!mark_peek"($I10) - rx1309_cur."!cursor_pos"($I11) - ($P10) = rx1309_cur."!cursor_start"() - $P10."!cursor_pass"(rx1309_pos, "") - rx1309_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1317_fail + rx1312_cur."!mark_push"(0, rx1312_pos, $I10) + # rx literal "::=" + add $I11, rx1312_pos, 3 + gt $I11, rx1312_eos, rx1312_fail + sub $I11, rx1312_pos, rx1312_off + substr $S10, rx1312_tgt, $I11, 3 + ne $S10, "::=", rx1312_fail + add rx1312_pos, 3 + set_addr $I10, rxcap_1317_fail + ($I12, $I11) = rx1312_cur."!mark_peek"($I10) + rx1312_cur."!cursor_pos"($I11) + ($P10) = rx1312_cur."!cursor_start"() + $P10."!cursor_pass"(rx1312_pos, "") + rx1312_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1313_done - rxcap_1313_fail: - goto rx1309_fail - rxcap_1313_done: - # rx pass - rx1309_cur."!cursor_pass"(rx1309_pos, "term:sym") - if_null rx1309_debug, debug_1009 - rx1309_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx1309_pos) + goto rxcap_1317_done + rxcap_1317_fail: + goto rx1312_fail + rxcap_1317_done: + # rx subrule "O" subtype=capture negate= + rx1312_cur."!cursor_pos"(rx1312_pos) + $P10 = rx1312_cur."O"("%assignment, :pasttype") + unless $P10, rx1312_fail + rx1312_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1312_pos = $P10."pos"() + # rx pass + rx1312_cur."!cursor_pass"(rx1312_pos, "infix:sym<::=>") + if_null rx1312_debug, debug_1007 + rx1312_cur."!cursor_debug"("PASS", "infix:sym<::=>", " at pos=", rx1312_pos) + debug_1007: + .return (rx1312_cur) + rx1312_restart: +.annotate 'line', 454 + if_null rx1312_debug, debug_1008 + rx1312_cur."!cursor_debug"("NEXT", "infix:sym<::=>") + debug_1008: + rx1312_fail: + (rx1312_rep, rx1312_pos, $I10, $P10) = rx1312_cur."!mark_fail"(0) + lt rx1312_pos, -1, rx1312_done + eq rx1312_pos, -1, rx1312_fail + jump $I10 + rx1312_done: + rx1312_cur."!cursor_fail"() + if_null rx1312_debug, debug_1009 + rx1312_cur."!cursor_debug"("FAIL", "infix:sym<::=>") debug_1009: - .return (rx1309_cur) - rx1309_restart: -.annotate 'line', 447 - if_null rx1309_debug, debug_1010 - rx1309_cur."!cursor_debug"("NEXT ", "term:sym") - debug_1010: - rx1309_fail: - (rx1309_rep, rx1309_pos, $I10, $P10) = rx1309_cur."!mark_fail"(0) - lt rx1309_pos, -1, rx1309_done - eq rx1309_pos, -1, rx1309_fail - jump $I10 - rx1309_done: - rx1309_cur."!cursor_fail"() - if_null rx1309_debug, debug_1011 - rx1309_cur."!cursor_debug"("FAIL ", "term:sym") - debug_1011: - .return (rx1309_cur) + .return (rx1312_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("343_1282016529.10767") :method -.annotate 'line', 447 - new $P1311, "ResizablePMCArray" - push $P1311, "last" - .return ($P1311) +.sub "!PREFIX__infix:sym<::=>" :subid("341_1284728478.15265") :method +.annotate 'line', 454 + $P1314 = self."!PREFIX__!subrule"("O", "::=") + new $P1315, "ResizablePMCArray" + push $P1315, $P1314 + .return ($P1315) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("344_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1315_tgt - .local int rx1315_pos - .local int rx1315_off - .local int rx1315_eos - .local int rx1315_rep - .local pmc rx1315_cur - .local pmc rx1315_debug - (rx1315_cur, rx1315_pos, rx1315_tgt, $I10) = self."!cursor_start"() - getattribute rx1315_debug, rx1315_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1315_cur - .local pmc match - .lex "$/", match - length rx1315_eos, rx1315_tgt - gt rx1315_pos, rx1315_eos, rx1315_done - set rx1315_off, 0 - lt rx1315_pos, 2, rx1315_start - sub rx1315_off, rx1315_pos, 1 - substr rx1315_tgt, rx1315_tgt, rx1315_off - rx1315_start: - eq $I10, 1, rx1315_restart - if_null rx1315_debug, debug_1012 - rx1315_cur."!cursor_debug"("START ", "term:sym") - debug_1012: +.sub "infix:sym<,>" :subid("342_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1319_tgt + .local int rx1319_pos + .local int rx1319_off + .local int rx1319_eos + .local int rx1319_rep + .local pmc rx1319_cur + .local pmc rx1319_debug + (rx1319_cur, rx1319_pos, rx1319_tgt, $I10) = self."!cursor_start"() + getattribute rx1319_debug, rx1319_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1319_cur + .local pmc match + .lex "$/", match + length rx1319_eos, rx1319_tgt + gt rx1319_pos, rx1319_eos, rx1319_done + set rx1319_off, 0 + lt rx1319_pos, 2, rx1319_start + sub rx1319_off, rx1319_pos, 1 + substr rx1319_tgt, rx1319_tgt, rx1319_off + rx1319_start: + eq $I10, 1, rx1319_restart + if_null rx1319_debug, debug_1010 + rx1319_cur."!cursor_debug"("START", "infix:sym<,>") + debug_1010: $I10 = self.'from'() - ne $I10, -1, rxscan1318_done - goto rxscan1318_scan - rxscan1318_loop: - ($P10) = rx1315_cur."from"() - inc $P10 - set rx1315_pos, $P10 - ge rx1315_pos, rx1315_eos, rxscan1318_done - rxscan1318_scan: - set_addr $I10, rxscan1318_loop - rx1315_cur."!mark_push"(0, rx1315_pos, $I10) - rxscan1318_done: -.annotate 'line', 558 + ne $I10, -1, rxscan1323_done + goto rxscan1323_scan + rxscan1323_loop: + ($P10) = rx1319_cur."from"() + inc $P10 + set rx1319_pos, $P10 + ge rx1319_pos, rx1319_eos, rxscan1323_done + rxscan1323_scan: + set_addr $I10, rxscan1323_loop + rx1319_cur."!mark_push"(0, rx1319_pos, $I10) + rxscan1323_done: +.annotate 'line', 560 # rx subcapture "sym" - set_addr $I10, rxcap_1319_fail - rx1315_cur."!mark_push"(0, rx1315_pos, $I10) - # rx literal "next" - add $I11, rx1315_pos, 4 - gt $I11, rx1315_eos, rx1315_fail - sub $I11, rx1315_pos, rx1315_off - substr $S10, rx1315_tgt, $I11, 4 - ne $S10, "next", rx1315_fail - add rx1315_pos, 4 - set_addr $I10, rxcap_1319_fail - ($I12, $I11) = rx1315_cur."!mark_peek"($I10) - rx1315_cur."!cursor_pos"($I11) - ($P10) = rx1315_cur."!cursor_start"() - $P10."!cursor_pass"(rx1315_pos, "") - rx1315_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1324_fail + rx1319_cur."!mark_push"(0, rx1319_pos, $I10) + # rx literal "," + add $I11, rx1319_pos, 1 + gt $I11, rx1319_eos, rx1319_fail + sub $I11, rx1319_pos, rx1319_off + ord $I11, rx1319_tgt, $I11 + ne $I11, 44, rx1319_fail + add rx1319_pos, 1 + set_addr $I10, rxcap_1324_fail + ($I12, $I11) = rx1319_cur."!mark_peek"($I10) + rx1319_cur."!cursor_pos"($I11) + ($P10) = rx1319_cur."!cursor_start"() + $P10."!cursor_pass"(rx1319_pos, "") + rx1319_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1319_done - rxcap_1319_fail: - goto rx1315_fail - rxcap_1319_done: - # rx pass - rx1315_cur."!cursor_pass"(rx1315_pos, "term:sym") - if_null rx1315_debug, debug_1013 - rx1315_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx1315_pos) + goto rxcap_1324_done + rxcap_1324_fail: + goto rx1319_fail + rxcap_1324_done: + # rx subrule "O" subtype=capture negate= + rx1319_cur."!cursor_pos"(rx1319_pos) + $P10 = rx1319_cur."O"("%comma, :pasttype") + unless $P10, rx1319_fail + rx1319_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1319_pos = $P10."pos"() + # rx pass + rx1319_cur."!cursor_pass"(rx1319_pos, "infix:sym<,>") + if_null rx1319_debug, debug_1011 + rx1319_cur."!cursor_debug"("PASS", "infix:sym<,>", " at pos=", rx1319_pos) + debug_1011: + .return (rx1319_cur) + rx1319_restart: +.annotate 'line', 454 + if_null rx1319_debug, debug_1012 + rx1319_cur."!cursor_debug"("NEXT", "infix:sym<,>") + debug_1012: + rx1319_fail: + (rx1319_rep, rx1319_pos, $I10, $P10) = rx1319_cur."!mark_fail"(0) + lt rx1319_pos, -1, rx1319_done + eq rx1319_pos, -1, rx1319_fail + jump $I10 + rx1319_done: + rx1319_cur."!cursor_fail"() + if_null rx1319_debug, debug_1013 + rx1319_cur."!cursor_debug"("FAIL", "infix:sym<,>") debug_1013: - .return (rx1315_cur) - rx1315_restart: -.annotate 'line', 447 - if_null rx1315_debug, debug_1014 - rx1315_cur."!cursor_debug"("NEXT ", "term:sym") - debug_1014: - rx1315_fail: - (rx1315_rep, rx1315_pos, $I10, $P10) = rx1315_cur."!mark_fail"(0) - lt rx1315_pos, -1, rx1315_done - eq rx1315_pos, -1, rx1315_fail - jump $I10 - rx1315_done: - rx1315_cur."!cursor_fail"() - if_null rx1315_debug, debug_1015 - rx1315_cur."!cursor_debug"("FAIL ", "term:sym") - debug_1015: - .return (rx1315_cur) + .return (rx1319_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("345_1282016529.10767") :method -.annotate 'line', 447 - new $P1317, "ResizablePMCArray" - push $P1317, "next" - .return ($P1317) +.sub "!PREFIX__infix:sym<,>" :subid("343_1284728478.15265") :method +.annotate 'line', 454 + $P1321 = self."!PREFIX__!subrule"("O", ",") + new $P1322, "ResizablePMCArray" + push $P1322, $P1321 + .return ($P1322) .end .namespace ["NQP";"Grammar"] -.sub "term:sym" :subid("346_1282016529.10767") :method :outer("11_1282016529.10767") -.annotate 'line', 447 - .local string rx1321_tgt - .local int rx1321_pos - .local int rx1321_off - .local int rx1321_eos - .local int rx1321_rep - .local pmc rx1321_cur - .local pmc rx1321_debug - (rx1321_cur, rx1321_pos, rx1321_tgt, $I10) = self."!cursor_start"() - getattribute rx1321_debug, rx1321_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1321_cur - .local pmc match - .lex "$/", match - length rx1321_eos, rx1321_tgt - gt rx1321_pos, rx1321_eos, rx1321_done - set rx1321_off, 0 - lt rx1321_pos, 2, rx1321_start - sub rx1321_off, rx1321_pos, 1 - substr rx1321_tgt, rx1321_tgt, rx1321_off - rx1321_start: - eq $I10, 1, rx1321_restart - if_null rx1321_debug, debug_1016 - rx1321_cur."!cursor_debug"("START ", "term:sym") - debug_1016: +.sub "prefix:sym" :subid("344_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1326_tgt + .local int rx1326_pos + .local int rx1326_off + .local int rx1326_eos + .local int rx1326_rep + .local pmc rx1326_cur + .local pmc rx1326_debug + (rx1326_cur, rx1326_pos, rx1326_tgt, $I10) = self."!cursor_start"() + getattribute rx1326_debug, rx1326_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1326_cur + .local pmc match + .lex "$/", match + length rx1326_eos, rx1326_tgt + gt rx1326_pos, rx1326_eos, rx1326_done + set rx1326_off, 0 + lt rx1326_pos, 2, rx1326_start + sub rx1326_off, rx1326_pos, 1 + substr rx1326_tgt, rx1326_tgt, rx1326_off + rx1326_start: + eq $I10, 1, rx1326_restart + if_null rx1326_debug, debug_1014 + rx1326_cur."!cursor_debug"("START", "prefix:sym") + debug_1014: $I10 = self.'from'() - ne $I10, -1, rxscan1324_done - goto rxscan1324_scan - rxscan1324_loop: - ($P10) = rx1321_cur."from"() - inc $P10 - set rx1321_pos, $P10 - ge rx1321_pos, rx1321_eos, rxscan1324_done - rxscan1324_scan: - set_addr $I10, rxscan1324_loop - rx1321_cur."!mark_push"(0, rx1321_pos, $I10) - rxscan1324_done: -.annotate 'line', 559 + ne $I10, -1, rxscan1329_done + goto rxscan1329_scan + rxscan1329_loop: + ($P10) = rx1326_cur."from"() + inc $P10 + set rx1326_pos, $P10 + ge rx1326_pos, rx1326_eos, rxscan1329_done + rxscan1329_scan: + set_addr $I10, rxscan1329_loop + rx1326_cur."!mark_push"(0, rx1326_pos, $I10) + rxscan1329_done: +.annotate 'line', 562 # rx subcapture "sym" - set_addr $I10, rxcap_1325_fail - rx1321_cur."!mark_push"(0, rx1321_pos, $I10) - # rx literal "redo" - add $I11, rx1321_pos, 4 - gt $I11, rx1321_eos, rx1321_fail - sub $I11, rx1321_pos, rx1321_off - substr $S10, rx1321_tgt, $I11, 4 - ne $S10, "redo", rx1321_fail - add rx1321_pos, 4 - set_addr $I10, rxcap_1325_fail - ($I12, $I11) = rx1321_cur."!mark_peek"($I10) - rx1321_cur."!cursor_pos"($I11) - ($P10) = rx1321_cur."!cursor_start"() - $P10."!cursor_pass"(rx1321_pos, "") - rx1321_cur."!mark_push"(0, -1, 0, $P10) + set_addr $I10, rxcap_1330_fail + rx1326_cur."!mark_push"(0, rx1326_pos, $I10) + # rx literal "return" + add $I11, rx1326_pos, 6 + gt $I11, rx1326_eos, rx1326_fail + sub $I11, rx1326_pos, rx1326_off + substr $S10, rx1326_tgt, $I11, 6 + ne $S10, "return", rx1326_fail + add rx1326_pos, 6 + set_addr $I10, rxcap_1330_fail + ($I12, $I11) = rx1326_cur."!mark_peek"($I10) + rx1326_cur."!cursor_pos"($I11) + ($P10) = rx1326_cur."!cursor_start"() + $P10."!cursor_pass"(rx1326_pos, "") + rx1326_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_1325_done - rxcap_1325_fail: - goto rx1321_fail - rxcap_1325_done: - # rx pass - rx1321_cur."!cursor_pass"(rx1321_pos, "term:sym") - if_null rx1321_debug, debug_1017 - rx1321_cur."!cursor_debug"("PASS ", "term:sym", " at pos=", rx1321_pos) + goto rxcap_1330_done + rxcap_1330_fail: + goto rx1326_fail + rxcap_1330_done: + # rx charclass s + ge rx1326_pos, rx1326_eos, rx1326_fail + sub $I10, rx1326_pos, rx1326_off + is_cclass $I11, 32, rx1326_tgt, $I10 + unless $I11, rx1326_fail + inc rx1326_pos + # rx subrule "O" subtype=capture negate= + rx1326_cur."!cursor_pos"(rx1326_pos) + $P10 = rx1326_cur."O"("%list_prefix, :pasttype") + unless $P10, rx1326_fail + rx1326_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1326_pos = $P10."pos"() + # rx pass + rx1326_cur."!cursor_pass"(rx1326_pos, "prefix:sym") + if_null rx1326_debug, debug_1015 + rx1326_cur."!cursor_debug"("PASS", "prefix:sym", " at pos=", rx1326_pos) + debug_1015: + .return (rx1326_cur) + rx1326_restart: +.annotate 'line', 454 + if_null rx1326_debug, debug_1016 + rx1326_cur."!cursor_debug"("NEXT", "prefix:sym") + debug_1016: + rx1326_fail: + (rx1326_rep, rx1326_pos, $I10, $P10) = rx1326_cur."!mark_fail"(0) + lt rx1326_pos, -1, rx1326_done + eq rx1326_pos, -1, rx1326_fail + jump $I10 + rx1326_done: + rx1326_cur."!cursor_fail"() + if_null rx1326_debug, debug_1017 + rx1326_cur."!cursor_debug"("FAIL", "prefix:sym") debug_1017: - .return (rx1321_cur) - rx1321_restart: -.annotate 'line', 447 - if_null rx1321_debug, debug_1018 - rx1321_cur."!cursor_debug"("NEXT ", "term:sym") - debug_1018: - rx1321_fail: - (rx1321_rep, rx1321_pos, $I10, $P10) = rx1321_cur."!mark_fail"(0) - lt rx1321_pos, -1, rx1321_done - eq rx1321_pos, -1, rx1321_fail - jump $I10 - rx1321_done: - rx1321_cur."!cursor_fail"() - if_null rx1321_debug, debug_1019 - rx1321_cur."!cursor_debug"("FAIL ", "term:sym") - debug_1019: - .return (rx1321_cur) + .return (rx1326_cur) .return () .end .namespace ["NQP";"Grammar"] -.sub "!PREFIX__term:sym" :subid("347_1282016529.10767") :method -.annotate 'line', 447 - new $P1323, "ResizablePMCArray" - push $P1323, "redo" - .return ($P1323) +.sub "!PREFIX__prefix:sym" :subid("345_1284728478.15265") :method +.annotate 'line', 454 + new $P1328, "ResizablePMCArray" + push $P1328, "return" + .return ($P1328) .end .namespace ["NQP";"Grammar"] -.include "except_types.pasm" -.sub "smartmatch" :subid("348_1282016529.10767") :method :outer("11_1282016529.10767") - .param pmc param_1329 -.annotate 'line', 561 - new $P1328, 'ExceptionHandler' - set_addr $P1328, control_1327 - $P1328."handle_types"(.CONTROL_RETURN) - push_eh $P1328 - .lex "self", self - .lex "$/", param_1329 +.sub "prefix:sym" :subid("346_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1332_tgt + .local int rx1332_pos + .local int rx1332_off + .local int rx1332_eos + .local int rx1332_rep + .local pmc rx1332_cur + .local pmc rx1332_debug + (rx1332_cur, rx1332_pos, rx1332_tgt, $I10) = self."!cursor_start"() + getattribute rx1332_debug, rx1332_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1332_cur + .local pmc match + .lex "$/", match + length rx1332_eos, rx1332_tgt + gt rx1332_pos, rx1332_eos, rx1332_done + set rx1332_off, 0 + lt rx1332_pos, 2, rx1332_start + sub rx1332_off, rx1332_pos, 1 + substr rx1332_tgt, rx1332_tgt, rx1332_off + rx1332_start: + eq $I10, 1, rx1332_restart + if_null rx1332_debug, debug_1018 + rx1332_cur."!cursor_debug"("START", "prefix:sym") + debug_1018: + $I10 = self.'from'() + ne $I10, -1, rxscan1335_done + goto rxscan1335_scan + rxscan1335_loop: + ($P10) = rx1332_cur."from"() + inc $P10 + set rx1332_pos, $P10 + ge rx1332_pos, rx1332_eos, rxscan1335_done + rxscan1335_scan: + set_addr $I10, rxscan1335_loop + rx1332_cur."!mark_push"(0, rx1332_pos, $I10) + rxscan1335_done: .annotate 'line', 563 - new $P1330, "Undef" - .lex "$t", $P1330 - find_lex $P1331, "$/" - unless_null $P1331, vivify_1020 - $P1331 = root_new ['parrot';'ResizablePMCArray'] - vivify_1020: - set $P1332, $P1331[0] - unless_null $P1332, vivify_1021 - new $P1332, "Undef" - vivify_1021: - store_lex "$t", $P1332 - find_lex $P1333, "$/" - unless_null $P1333, vivify_1022 - $P1333 = root_new ['parrot';'ResizablePMCArray'] - vivify_1022: - set $P1334, $P1333[1] - unless_null $P1334, vivify_1023 - new $P1334, "Undef" - vivify_1023: - find_lex $P1335, "$/" - unless_null $P1335, vivify_1024 - $P1335 = root_new ['parrot';'ResizablePMCArray'] - store_lex "$/", $P1335 - vivify_1024: - set $P1335[0], $P1334 - find_lex $P1336, "$t" - find_lex $P1337, "$/" - unless_null $P1337, vivify_1025 - $P1337 = root_new ['parrot';'ResizablePMCArray'] - store_lex "$/", $P1337 - vivify_1025: - set $P1337[1], $P1336 -.annotate 'line', 561 - .return ($P1336) - control_1327: - .local pmc exception - .get_results (exception) - getattribute $P1338, exception, "payload" - .return ($P1338) + # rx subcapture "sym" + set_addr $I10, rxcap_1336_fail + rx1332_cur."!mark_push"(0, rx1332_pos, $I10) + # rx literal "make" + add $I11, rx1332_pos, 4 + gt $I11, rx1332_eos, rx1332_fail + sub $I11, rx1332_pos, rx1332_off + substr $S10, rx1332_tgt, $I11, 4 + ne $S10, "make", rx1332_fail + add rx1332_pos, 4 + set_addr $I10, rxcap_1336_fail + ($I12, $I11) = rx1332_cur."!mark_peek"($I10) + rx1332_cur."!cursor_pos"($I11) + ($P10) = rx1332_cur."!cursor_start"() + $P10."!cursor_pass"(rx1332_pos, "") + rx1332_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1336_done + rxcap_1336_fail: + goto rx1332_fail + rxcap_1336_done: + # rx charclass s + ge rx1332_pos, rx1332_eos, rx1332_fail + sub $I10, rx1332_pos, rx1332_off + is_cclass $I11, 32, rx1332_tgt, $I10 + unless $I11, rx1332_fail + inc rx1332_pos + # rx subrule "O" subtype=capture negate= + rx1332_cur."!cursor_pos"(rx1332_pos) + $P10 = rx1332_cur."O"("%list_prefix") + unless $P10, rx1332_fail + rx1332_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("O") + rx1332_pos = $P10."pos"() + # rx pass + rx1332_cur."!cursor_pass"(rx1332_pos, "prefix:sym") + if_null rx1332_debug, debug_1019 + rx1332_cur."!cursor_debug"("PASS", "prefix:sym", " at pos=", rx1332_pos) + debug_1019: + .return (rx1332_cur) + rx1332_restart: +.annotate 'line', 454 + if_null rx1332_debug, debug_1020 + rx1332_cur."!cursor_debug"("NEXT", "prefix:sym") + debug_1020: + rx1332_fail: + (rx1332_rep, rx1332_pos, $I10, $P10) = rx1332_cur."!mark_fail"(0) + lt rx1332_pos, -1, rx1332_done + eq rx1332_pos, -1, rx1332_fail + jump $I10 + rx1332_done: + rx1332_cur."!cursor_fail"() + if_null rx1332_debug, debug_1021 + rx1332_cur."!cursor_debug"("FAIL", "prefix:sym") + debug_1021: + .return (rx1332_cur) + .return () .end -.namespace ["NQP";"Regex"] -.sub "_block1339" :subid("349_1282016529.10767") :outer("11_1282016529.10767") -.annotate 'line', 567 - .const 'Sub' $P1396 = "368_1282016529.10767" - capture_lex $P1396 - .const 'Sub' $P1391 = "366_1282016529.10767" - capture_lex $P1391 - .const 'Sub' $P1379 = "363_1282016529.10767" - capture_lex $P1379 - .const 'Sub' $P1369 = "360_1282016529.10767" - capture_lex $P1369 - .const 'Sub' $P1364 = "358_1282016529.10767" - capture_lex $P1364 - .const 'Sub' $P1355 = "355_1282016529.10767" - capture_lex $P1355 - .const 'Sub' $P1350 = "353_1282016529.10767" - capture_lex $P1350 - .const 'Sub' $P1341 = "350_1282016529.10767" - capture_lex $P1341 - .const 'Sub' $P1396 = "368_1282016529.10767" - capture_lex $P1396 - .return ($P1396) +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__prefix:sym" :subid("347_1284728478.15265") :method +.annotate 'line', 454 + new $P1334, "ResizablePMCArray" + push $P1334, "make" + .return ($P1334) .end -.namespace ["NQP";"Regex"] -.sub "metachar:sym<:my>" :subid("350_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .const 'Sub' $P1347 = "352_1282016529.10767" - capture_lex $P1347 - .local string rx1342_tgt - .local int rx1342_pos - .local int rx1342_off - .local int rx1342_eos - .local int rx1342_rep - .local pmc rx1342_cur - .local pmc rx1342_debug - (rx1342_cur, rx1342_pos, rx1342_tgt, $I10) = self."!cursor_start"() - getattribute rx1342_debug, rx1342_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1342_cur - .local pmc match - .lex "$/", match - length rx1342_eos, rx1342_tgt - gt rx1342_pos, rx1342_eos, rx1342_done - set rx1342_off, 0 - lt rx1342_pos, 2, rx1342_start - sub rx1342_off, rx1342_pos, 1 - substr rx1342_tgt, rx1342_tgt, rx1342_off - rx1342_start: - eq $I10, 1, rx1342_restart - if_null rx1342_debug, debug_1026 - rx1342_cur."!cursor_debug"("START ", "metachar:sym<:my>") - debug_1026: - $I10 = self.'from'() - ne $I10, -1, rxscan1345_done - goto rxscan1345_scan - rxscan1345_loop: - ($P10) = rx1342_cur."from"() - inc $P10 - set rx1342_pos, $P10 - ge rx1342_pos, rx1342_eos, rxscan1345_done - rxscan1345_scan: - 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 - sub $I11, rx1342_pos, rx1342_off - ord $I11, rx1342_tgt, $I11 - ne $I11, 58, rx1342_fail - add rx1342_pos, 1 - # rx subrule "before" subtype=zerowidth negate= - rx1342_cur."!cursor_pos"(rx1342_pos) - .const 'Sub' $P1347 = "352_1282016529.10767" - capture_lex $P1347 - $P10 = rx1342_cur."before"($P1347) - unless $P10, rx1342_fail - # rx subrule "LANG" subtype=capture negate= - rx1342_cur."!cursor_pos"(rx1342_pos) - $P10 = rx1342_cur."LANG"("MAIN", "statement") - unless $P10, rx1342_fail - rx1342_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("statement") - rx1342_pos = $P10."pos"() - # rx subrule "ws" subtype=method negate= - rx1342_cur."!cursor_pos"(rx1342_pos) - $P10 = rx1342_cur."ws"() - unless $P10, rx1342_fail - rx1342_pos = $P10."pos"() - # rx literal ";" - add $I11, rx1342_pos, 1 - gt $I11, rx1342_eos, rx1342_fail - sub $I11, rx1342_pos, rx1342_off - 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 - rx1342_cur."!cursor_debug"("PASS ", "metachar:sym<:my>", " at pos=", rx1342_pos) - 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: - rx1342_fail: - (rx1342_rep, rx1342_pos, $I10, $P10) = rx1342_cur."!mark_fail"(0) - lt rx1342_pos, -1, rx1342_done - eq rx1342_pos, -1, rx1342_fail - jump $I10 - rx1342_done: - rx1342_cur."!cursor_fail"() - if_null rx1342_debug, debug_1033 - rx1342_cur."!cursor_debug"("FAIL ", "metachar:sym<:my>") - debug_1033: - .return (rx1342_cur) +.namespace ["NQP";"Grammar"] +.sub "term:sym" :subid("348_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1338_tgt + .local int rx1338_pos + .local int rx1338_off + .local int rx1338_eos + .local int rx1338_rep + .local pmc rx1338_cur + .local pmc rx1338_debug + (rx1338_cur, rx1338_pos, rx1338_tgt, $I10) = self."!cursor_start"() + getattribute rx1338_debug, rx1338_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1338_cur + .local pmc match + .lex "$/", match + length rx1338_eos, rx1338_tgt + gt rx1338_pos, rx1338_eos, rx1338_done + set rx1338_off, 0 + lt rx1338_pos, 2, rx1338_start + sub rx1338_off, rx1338_pos, 1 + substr rx1338_tgt, rx1338_tgt, rx1338_off + rx1338_start: + eq $I10, 1, rx1338_restart + if_null rx1338_debug, debug_1022 + rx1338_cur."!cursor_debug"("START", "term:sym") + debug_1022: + $I10 = self.'from'() + ne $I10, -1, rxscan1341_done + goto rxscan1341_scan + rxscan1341_loop: + ($P10) = rx1338_cur."from"() + inc $P10 + set rx1338_pos, $P10 + ge rx1338_pos, rx1338_eos, rxscan1341_done + rxscan1341_scan: + set_addr $I10, rxscan1341_loop + rx1338_cur."!mark_push"(0, rx1338_pos, $I10) + rxscan1341_done: +.annotate 'line', 564 + # rx subcapture "sym" + set_addr $I10, rxcap_1342_fail + rx1338_cur."!mark_push"(0, rx1338_pos, $I10) + # rx literal "last" + add $I11, rx1338_pos, 4 + gt $I11, rx1338_eos, rx1338_fail + sub $I11, rx1338_pos, rx1338_off + substr $S10, rx1338_tgt, $I11, 4 + ne $S10, "last", rx1338_fail + add rx1338_pos, 4 + set_addr $I10, rxcap_1342_fail + ($I12, $I11) = rx1338_cur."!mark_peek"($I10) + rx1338_cur."!cursor_pos"($I11) + ($P10) = rx1338_cur."!cursor_start"() + $P10."!cursor_pass"(rx1338_pos, "") + rx1338_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1342_done + rxcap_1342_fail: + goto rx1338_fail + rxcap_1342_done: + # rx pass + rx1338_cur."!cursor_pass"(rx1338_pos, "term:sym") + if_null rx1338_debug, debug_1023 + rx1338_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx1338_pos) + debug_1023: + .return (rx1338_cur) + rx1338_restart: +.annotate 'line', 454 + if_null rx1338_debug, debug_1024 + rx1338_cur."!cursor_debug"("NEXT", "term:sym") + debug_1024: + rx1338_fail: + (rx1338_rep, rx1338_pos, $I10, $P10) = rx1338_cur."!mark_fail"(0) + lt rx1338_pos, -1, rx1338_done + eq rx1338_pos, -1, rx1338_fail + jump $I10 + rx1338_done: + rx1338_cur."!cursor_fail"() + if_null rx1338_debug, debug_1025 + rx1338_cur."!cursor_debug"("FAIL", "term:sym") + debug_1025: + .return (rx1338_cur) .return () .end -.namespace ["NQP";"Regex"] -.sub "!PREFIX__metachar:sym<:my>" :subid("351_1282016529.10767") :method -.annotate 'line', 567 - new $P1344, "ResizablePMCArray" - push $P1344, ":" - .return ($P1344) +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__term:sym" :subid("349_1284728478.15265") :method +.annotate 'line', 454 + new $P1340, "ResizablePMCArray" + push $P1340, "last" + .return ($P1340) .end -.namespace ["NQP";"Regex"] -.sub "_block1346" :anon :subid("352_1282016529.10767") :method :outer("350_1282016529.10767") -.annotate 'line', 569 - .local string rx1348_tgt - .local int rx1348_pos - .local int rx1348_off - .local int rx1348_eos - .local int rx1348_rep - .local pmc rx1348_cur - .local pmc rx1348_debug - (rx1348_cur, rx1348_pos, rx1348_tgt, $I10) = self."!cursor_start"() - getattribute rx1348_debug, rx1348_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1348_cur - .local pmc match - .lex "$/", match - length rx1348_eos, rx1348_tgt - gt rx1348_pos, rx1348_eos, rx1348_done - set rx1348_off, 0 - lt rx1348_pos, 2, rx1348_start - sub rx1348_off, rx1348_pos, 1 - substr rx1348_tgt, rx1348_tgt, rx1348_off - rx1348_start: - eq $I10, 1, rx1348_restart - if_null rx1348_debug, debug_1027 - rx1348_cur."!cursor_debug"("START ", "") - debug_1027: +.namespace ["NQP";"Grammar"] +.sub "term:sym" :subid("350_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1344_tgt + .local int rx1344_pos + .local int rx1344_off + .local int rx1344_eos + .local int rx1344_rep + .local pmc rx1344_cur + .local pmc rx1344_debug + (rx1344_cur, rx1344_pos, rx1344_tgt, $I10) = self."!cursor_start"() + getattribute rx1344_debug, rx1344_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1344_cur + .local pmc match + .lex "$/", match + length rx1344_eos, rx1344_tgt + gt rx1344_pos, rx1344_eos, rx1344_done + set rx1344_off, 0 + lt rx1344_pos, 2, rx1344_start + sub rx1344_off, rx1344_pos, 1 + substr rx1344_tgt, rx1344_tgt, rx1344_off + rx1344_start: + eq $I10, 1, rx1344_restart + if_null rx1344_debug, debug_1026 + rx1344_cur."!cursor_debug"("START", "term:sym") + debug_1026: $I10 = self.'from'() - ne $I10, -1, rxscan1349_done - goto rxscan1349_scan - rxscan1349_loop: - ($P10) = rx1348_cur."from"() - inc $P10 - set rx1348_pos, $P10 - ge rx1348_pos, rx1348_eos, rxscan1349_done - rxscan1349_scan: - set_addr $I10, rxscan1349_loop - rx1348_cur."!mark_push"(0, rx1348_pos, $I10) - rxscan1349_done: - # rx literal "my" - add $I11, rx1348_pos, 2 - gt $I11, rx1348_eos, rx1348_fail - sub $I11, rx1348_pos, rx1348_off - substr $S10, rx1348_tgt, $I11, 2 - ne $S10, "my", rx1348_fail - add rx1348_pos, 2 - # rx pass - rx1348_cur."!cursor_pass"(rx1348_pos, "") - if_null rx1348_debug, debug_1028 - rx1348_cur."!cursor_debug"("PASS ", "", " at pos=", rx1348_pos) + ne $I10, -1, rxscan1347_done + goto rxscan1347_scan + rxscan1347_loop: + ($P10) = rx1344_cur."from"() + inc $P10 + set rx1344_pos, $P10 + ge rx1344_pos, rx1344_eos, rxscan1347_done + rxscan1347_scan: + set_addr $I10, rxscan1347_loop + rx1344_cur."!mark_push"(0, rx1344_pos, $I10) + rxscan1347_done: +.annotate 'line', 565 + # rx subcapture "sym" + set_addr $I10, rxcap_1348_fail + rx1344_cur."!mark_push"(0, rx1344_pos, $I10) + # rx literal "next" + add $I11, rx1344_pos, 4 + gt $I11, rx1344_eos, rx1344_fail + sub $I11, rx1344_pos, rx1344_off + substr $S10, rx1344_tgt, $I11, 4 + ne $S10, "next", rx1344_fail + add rx1344_pos, 4 + set_addr $I10, rxcap_1348_fail + ($I12, $I11) = rx1344_cur."!mark_peek"($I10) + rx1344_cur."!cursor_pos"($I11) + ($P10) = rx1344_cur."!cursor_start"() + $P10."!cursor_pass"(rx1344_pos, "") + rx1344_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1348_done + rxcap_1348_fail: + goto rx1344_fail + rxcap_1348_done: + # rx pass + rx1344_cur."!cursor_pass"(rx1344_pos, "term:sym") + if_null rx1344_debug, debug_1027 + rx1344_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx1344_pos) + debug_1027: + .return (rx1344_cur) + rx1344_restart: +.annotate 'line', 454 + if_null rx1344_debug, debug_1028 + rx1344_cur."!cursor_debug"("NEXT", "term:sym") debug_1028: - .return (rx1348_cur) - rx1348_restart: - if_null rx1348_debug, debug_1029 - rx1348_cur."!cursor_debug"("NEXT ", "") + rx1344_fail: + (rx1344_rep, rx1344_pos, $I10, $P10) = rx1344_cur."!mark_fail"(0) + lt rx1344_pos, -1, rx1344_done + eq rx1344_pos, -1, rx1344_fail + jump $I10 + rx1344_done: + rx1344_cur."!cursor_fail"() + if_null rx1344_debug, debug_1029 + rx1344_cur."!cursor_debug"("FAIL", "term:sym") debug_1029: - rx1348_fail: - (rx1348_rep, rx1348_pos, $I10, $P10) = rx1348_cur."!mark_fail"(0) - lt rx1348_pos, -1, rx1348_done - eq rx1348_pos, -1, rx1348_fail - jump $I10 - rx1348_done: - rx1348_cur."!cursor_fail"() - if_null rx1348_debug, debug_1030 - rx1348_cur."!cursor_debug"("FAIL ", "") - debug_1030: - .return (rx1348_cur) - .return () -.end - - -.namespace ["NQP";"Regex"] -.sub "metachar:sym<{ }>" :subid("353_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .local string rx1351_tgt - .local int rx1351_pos - .local int rx1351_off - .local int rx1351_eos - .local int rx1351_rep - .local pmc rx1351_cur - .local pmc rx1351_debug - (rx1351_cur, rx1351_pos, rx1351_tgt, $I10) = self."!cursor_start"() - getattribute rx1351_debug, rx1351_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1351_cur - .local pmc match - .lex "$/", match - length rx1351_eos, rx1351_tgt - gt rx1351_pos, rx1351_eos, rx1351_done - set rx1351_off, 0 - lt rx1351_pos, 2, rx1351_start - sub rx1351_off, rx1351_pos, 1 - substr rx1351_tgt, rx1351_tgt, rx1351_off - rx1351_start: - eq $I10, 1, rx1351_restart - if_null rx1351_debug, debug_1034 - rx1351_cur."!cursor_debug"("START ", "metachar:sym<{ }>") - debug_1034: - $I10 = self.'from'() - ne $I10, -1, rxscan1354_done - goto rxscan1354_scan - rxscan1354_loop: - ($P10) = rx1351_cur."from"() - inc $P10 - set rx1351_pos, $P10 - ge rx1351_pos, rx1351_eos, rxscan1354_done - rxscan1354_scan: - 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 - substr $S10, rx1351_tgt, $I10, 1 - index $I11, "{", $S10 - lt $I11, 0, rx1351_fail - # rx subrule "codeblock" subtype=capture negate= - rx1351_cur."!cursor_pos"(rx1351_pos) - $P10 = rx1351_cur."codeblock"() - unless $P10, rx1351_fail - 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 - rx1351_cur."!cursor_debug"("PASS ", "metachar:sym<{ }>", " at pos=", rx1351_pos) - 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: - rx1351_fail: - (rx1351_rep, rx1351_pos, $I10, $P10) = rx1351_cur."!mark_fail"(0) - lt rx1351_pos, -1, rx1351_done - eq rx1351_pos, -1, rx1351_fail - jump $I10 - rx1351_done: - rx1351_cur."!cursor_fail"() - if_null rx1351_debug, debug_1037 - rx1351_cur."!cursor_debug"("FAIL ", "metachar:sym<{ }>") - debug_1037: - .return (rx1351_cur) + .return (rx1344_cur) .return () .end -.namespace ["NQP";"Regex"] -.sub "!PREFIX__metachar:sym<{ }>" :subid("354_1282016529.10767") :method -.annotate 'line', 567 - new $P1353, "ResizablePMCArray" - push $P1353, "{" - .return ($P1353) +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__term:sym" :subid("351_1284728478.15265") :method +.annotate 'line', 454 + new $P1346, "ResizablePMCArray" + push $P1346, "next" + .return ($P1346) .end -.namespace ["NQP";"Regex"] -.sub "metachar:sym" :subid("355_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .const 'Sub' $P1361 = "357_1282016529.10767" - capture_lex $P1361 - .local string rx1356_tgt - .local int rx1356_pos - .local int rx1356_off - .local int rx1356_eos - .local int rx1356_rep - .local pmc rx1356_cur - .local pmc rx1356_debug - (rx1356_cur, rx1356_pos, rx1356_tgt, $I10) = self."!cursor_start"() - getattribute rx1356_debug, rx1356_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1356_cur - .local pmc match - .lex "$/", match - length rx1356_eos, rx1356_tgt - gt rx1356_pos, rx1356_eos, rx1356_done - set rx1356_off, 0 - lt rx1356_pos, 2, rx1356_start - sub rx1356_off, rx1356_pos, 1 - substr rx1356_tgt, rx1356_tgt, rx1356_off - rx1356_start: - eq $I10, 1, rx1356_restart - if_null rx1356_debug, debug_1038 - rx1356_cur."!cursor_debug"("START ", "metachar:sym") - debug_1038: - $I10 = self.'from'() - ne $I10, -1, rxscan1359_done - goto rxscan1359_scan - rxscan1359_loop: - ($P10) = rx1356_cur."from"() - inc $P10 - set rx1356_pos, $P10 - ge rx1356_pos, rx1356_eos, rxscan1359_done - rxscan1359_scan: - 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 - substr $S10, rx1356_tgt, $I10, 1 - index $I11, "$@", $S10 - lt $I11, 0, rx1356_fail - # rx subrule "before" subtype=zerowidth negate= - rx1356_cur."!cursor_pos"(rx1356_pos) - .const 'Sub' $P1361 = "357_1282016529.10767" - capture_lex $P1361 - $P10 = rx1356_cur."before"($P1361) - unless $P10, rx1356_fail - # rx subrule "LANG" subtype=capture negate= - rx1356_cur."!cursor_pos"(rx1356_pos) - $P10 = rx1356_cur."LANG"("MAIN", "variable") - unless $P10, rx1356_fail - 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") - if_null rx1356_debug, debug_1043 - rx1356_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx1356_pos) - debug_1043: - .return (rx1356_cur) - rx1356_restart: -.annotate 'line', 567 - if_null rx1356_debug, debug_1044 - rx1356_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_1044: - rx1356_fail: - (rx1356_rep, rx1356_pos, $I10, $P10) = rx1356_cur."!mark_fail"(0) - lt rx1356_pos, -1, rx1356_done - eq rx1356_pos, -1, rx1356_fail - jump $I10 - rx1356_done: - rx1356_cur."!cursor_fail"() - if_null rx1356_debug, debug_1045 - rx1356_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_1045: - .return (rx1356_cur) +.namespace ["NQP";"Grammar"] +.sub "term:sym" :subid("352_1284728478.15265") :method :outer("11_1284728478.15265") +.annotate 'line', 454 + .local string rx1350_tgt + .local int rx1350_pos + .local int rx1350_off + .local int rx1350_eos + .local int rx1350_rep + .local pmc rx1350_cur + .local pmc rx1350_debug + (rx1350_cur, rx1350_pos, rx1350_tgt, $I10) = self."!cursor_start"() + getattribute rx1350_debug, rx1350_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1350_cur + .local pmc match + .lex "$/", match + length rx1350_eos, rx1350_tgt + gt rx1350_pos, rx1350_eos, rx1350_done + set rx1350_off, 0 + lt rx1350_pos, 2, rx1350_start + sub rx1350_off, rx1350_pos, 1 + substr rx1350_tgt, rx1350_tgt, rx1350_off + rx1350_start: + eq $I10, 1, rx1350_restart + if_null rx1350_debug, debug_1030 + rx1350_cur."!cursor_debug"("START", "term:sym") + debug_1030: + $I10 = self.'from'() + ne $I10, -1, rxscan1353_done + goto rxscan1353_scan + rxscan1353_loop: + ($P10) = rx1350_cur."from"() + inc $P10 + set rx1350_pos, $P10 + ge rx1350_pos, rx1350_eos, rxscan1353_done + rxscan1353_scan: + set_addr $I10, rxscan1353_loop + rx1350_cur."!mark_push"(0, rx1350_pos, $I10) + rxscan1353_done: +.annotate 'line', 566 + # rx subcapture "sym" + set_addr $I10, rxcap_1354_fail + rx1350_cur."!mark_push"(0, rx1350_pos, $I10) + # rx literal "redo" + add $I11, rx1350_pos, 4 + gt $I11, rx1350_eos, rx1350_fail + sub $I11, rx1350_pos, rx1350_off + substr $S10, rx1350_tgt, $I11, 4 + ne $S10, "redo", rx1350_fail + add rx1350_pos, 4 + set_addr $I10, rxcap_1354_fail + ($I12, $I11) = rx1350_cur."!mark_peek"($I10) + rx1350_cur."!cursor_pos"($I11) + ($P10) = rx1350_cur."!cursor_start"() + $P10."!cursor_pass"(rx1350_pos, "") + rx1350_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_1354_done + rxcap_1354_fail: + goto rx1350_fail + rxcap_1354_done: + # rx pass + rx1350_cur."!cursor_pass"(rx1350_pos, "term:sym") + if_null rx1350_debug, debug_1031 + rx1350_cur."!cursor_debug"("PASS", "term:sym", " at pos=", rx1350_pos) + debug_1031: + .return (rx1350_cur) + rx1350_restart: +.annotate 'line', 454 + if_null rx1350_debug, debug_1032 + rx1350_cur."!cursor_debug"("NEXT", "term:sym") + debug_1032: + rx1350_fail: + (rx1350_rep, rx1350_pos, $I10, $P10) = rx1350_cur."!mark_fail"(0) + lt rx1350_pos, -1, rx1350_done + eq rx1350_pos, -1, rx1350_fail + jump $I10 + rx1350_done: + rx1350_cur."!cursor_fail"() + if_null rx1350_debug, debug_1033 + rx1350_cur."!cursor_debug"("FAIL", "term:sym") + debug_1033: + .return (rx1350_cur) .return () .end -.namespace ["NQP";"Regex"] -.sub "!PREFIX__metachar:sym" :subid("356_1282016529.10767") :method -.annotate 'line', 567 - new $P1358, "ResizablePMCArray" - push $P1358, "$" - push $P1358, "@" - .return ($P1358) -.end - - -.namespace ["NQP";"Regex"] -.sub "_block1360" :anon :subid("357_1282016529.10767") :method :outer("355_1282016529.10767") -.annotate 'line', 577 - .local string rx1362_tgt - .local int rx1362_pos - .local int rx1362_off - .local int rx1362_eos - .local int rx1362_rep - .local pmc rx1362_cur - .local pmc rx1362_debug - (rx1362_cur, rx1362_pos, rx1362_tgt, $I10) = self."!cursor_start"() - getattribute rx1362_debug, rx1362_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1362_cur - .local pmc match - .lex "$/", match - length rx1362_eos, rx1362_tgt - gt rx1362_pos, rx1362_eos, rx1362_done - set rx1362_off, 0 - lt rx1362_pos, 2, rx1362_start - sub rx1362_off, rx1362_pos, 1 - substr rx1362_tgt, rx1362_tgt, rx1362_off - rx1362_start: - eq $I10, 1, rx1362_restart - if_null rx1362_debug, debug_1039 - rx1362_cur."!cursor_debug"("START ", "") - debug_1039: - $I10 = self.'from'() - ne $I10, -1, rxscan1363_done - goto rxscan1363_scan - rxscan1363_loop: - ($P10) = rx1362_cur."from"() - inc $P10 - set rx1362_pos, $P10 - ge rx1362_pos, rx1362_eos, rxscan1363_done - rxscan1363_scan: - set_addr $I10, rxscan1363_loop - rx1362_cur."!mark_push"(0, rx1362_pos, $I10) - rxscan1363_done: - # rx charclass . - ge rx1362_pos, rx1362_eos, rx1362_fail - inc rx1362_pos - # rx charclass w - ge rx1362_pos, rx1362_eos, rx1362_fail - sub $I10, rx1362_pos, rx1362_off - is_cclass $I11, 8192, rx1362_tgt, $I10 - unless $I11, rx1362_fail - inc rx1362_pos - # rx pass - rx1362_cur."!cursor_pass"(rx1362_pos, "") - if_null rx1362_debug, debug_1040 - rx1362_cur."!cursor_debug"("PASS ", "", " at pos=", rx1362_pos) - debug_1040: - .return (rx1362_cur) - rx1362_restart: - if_null rx1362_debug, debug_1041 - rx1362_cur."!cursor_debug"("NEXT ", "") - debug_1041: - rx1362_fail: - (rx1362_rep, rx1362_pos, $I10, $P10) = rx1362_cur."!mark_fail"(0) - lt rx1362_pos, -1, rx1362_done - eq rx1362_pos, -1, rx1362_fail - jump $I10 - rx1362_done: - rx1362_cur."!cursor_fail"() - if_null rx1362_debug, debug_1042 - rx1362_cur."!cursor_debug"("FAIL ", "") - debug_1042: - .return (rx1362_cur) - .return () +.namespace ["NQP";"Grammar"] +.sub "!PREFIX__term:sym" :subid("353_1284728478.15265") :method +.annotate 'line', 454 + new $P1352, "ResizablePMCArray" + push $P1352, "redo" + .return ($P1352) .end -.namespace ["NQP";"Regex"] -.sub "assertion:sym<{ }>" :subid("358_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .local string rx1365_tgt - .local int rx1365_pos - .local int rx1365_off - .local int rx1365_eos - .local int rx1365_rep - .local pmc rx1365_cur - .local pmc rx1365_debug - (rx1365_cur, rx1365_pos, rx1365_tgt, $I10) = self."!cursor_start"() - getattribute rx1365_debug, rx1365_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1365_cur - .local pmc match - .lex "$/", match - length rx1365_eos, rx1365_tgt - gt rx1365_pos, rx1365_eos, rx1365_done - set rx1365_off, 0 - lt rx1365_pos, 2, rx1365_start - sub rx1365_off, rx1365_pos, 1 - substr rx1365_tgt, rx1365_tgt, rx1365_off - rx1365_start: - eq $I10, 1, rx1365_restart - if_null rx1365_debug, debug_1046 - rx1365_cur."!cursor_debug"("START ", "assertion:sym<{ }>") - debug_1046: - $I10 = self.'from'() - ne $I10, -1, rxscan1368_done - goto rxscan1368_scan - rxscan1368_loop: - ($P10) = rx1365_cur."from"() - inc $P10 - set rx1365_pos, $P10 - ge rx1365_pos, rx1365_eos, rxscan1368_done - rxscan1368_scan: - 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 - substr $S10, rx1365_tgt, $I10, 1 - index $I11, "{", $S10 - lt $I11, 0, rx1365_fail - # rx subrule "codeblock" subtype=capture negate= - rx1365_cur."!cursor_pos"(rx1365_pos) - $P10 = rx1365_cur."codeblock"() - unless $P10, rx1365_fail - 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 - rx1365_cur."!cursor_debug"("PASS ", "assertion:sym<{ }>", " at pos=", rx1365_pos) - 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: - rx1365_fail: - (rx1365_rep, rx1365_pos, $I10, $P10) = rx1365_cur."!mark_fail"(0) - lt rx1365_pos, -1, rx1365_done - eq rx1365_pos, -1, rx1365_fail - jump $I10 - rx1365_done: - rx1365_cur."!cursor_fail"() - if_null rx1365_debug, debug_1049 - rx1365_cur."!cursor_debug"("FAIL ", "assertion:sym<{ }>") - debug_1049: - .return (rx1365_cur) - .return () +.namespace ["NQP";"Grammar"] +.include "except_types.pasm" +.sub "smartmatch" :subid("354_1284728478.15265") :method :outer("11_1284728478.15265") + .param pmc param_1358 +.annotate 'line', 568 + new $P1357, 'ExceptionHandler' + set_addr $P1357, control_1356 + $P1357."handle_types"(.CONTROL_RETURN) + push_eh $P1357 + .lex "self", self + .lex "$/", param_1358 +.annotate 'line', 570 + new $P1359, "Undef" + .lex "$t", $P1359 + find_lex $P1360, "$/" + unless_null $P1360, vivify_1034 + $P1360 = root_new ['parrot';'ResizablePMCArray'] + vivify_1034: + set $P1361, $P1360[0] + unless_null $P1361, vivify_1035 + new $P1361, "Undef" + vivify_1035: + store_lex "$t", $P1361 + find_lex $P1362, "$/" + unless_null $P1362, vivify_1036 + $P1362 = root_new ['parrot';'ResizablePMCArray'] + vivify_1036: + set $P1363, $P1362[1] + unless_null $P1363, vivify_1037 + new $P1363, "Undef" + vivify_1037: + find_lex $P1364, "$/" + unless_null $P1364, vivify_1038 + $P1364 = root_new ['parrot';'ResizablePMCArray'] + store_lex "$/", $P1364 + vivify_1038: + set $P1364[0], $P1363 + find_lex $P1365, "$t" + find_lex $P1366, "$/" + unless_null $P1366, vivify_1039 + $P1366 = root_new ['parrot';'ResizablePMCArray'] + store_lex "$/", $P1366 + vivify_1039: + set $P1366[1], $P1365 +.annotate 'line', 568 + .return ($P1365) + control_1356: + .local pmc exception + .get_results (exception) + getattribute $P1367, exception, "payload" + .return ($P1367) .end .namespace ["NQP";"Regex"] -.sub "!PREFIX__assertion:sym<{ }>" :subid("359_1282016529.10767") :method -.annotate 'line', 567 - new $P1367, "ResizablePMCArray" - push $P1367, "{" - .return ($P1367) +.sub "_block1368" :subid("355_1284728478.15265") :outer("11_1284728478.15265") +.annotate 'line', 574 + .const 'Sub' $P1425 = "374_1284728478.15265" + capture_lex $P1425 + .const 'Sub' $P1420 = "372_1284728478.15265" + capture_lex $P1420 + .const 'Sub' $P1408 = "369_1284728478.15265" + capture_lex $P1408 + .const 'Sub' $P1398 = "366_1284728478.15265" + capture_lex $P1398 + .const 'Sub' $P1393 = "364_1284728478.15265" + capture_lex $P1393 + .const 'Sub' $P1384 = "361_1284728478.15265" + capture_lex $P1384 + .const 'Sub' $P1379 = "359_1284728478.15265" + capture_lex $P1379 + .const 'Sub' $P1370 = "356_1284728478.15265" + capture_lex $P1370 + .const 'Sub' $P1425 = "374_1284728478.15265" + capture_lex $P1425 + .return ($P1425) .end .namespace ["NQP";"Regex"] -.sub "assertion:sym" :subid("360_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .const 'Sub' $P1375 = "362_1282016529.10767" - capture_lex $P1375 - .local string rx1370_tgt - .local int rx1370_pos - .local int rx1370_off - .local int rx1370_eos - .local int rx1370_rep - .local pmc rx1370_cur - .local pmc rx1370_debug - (rx1370_cur, rx1370_pos, rx1370_tgt, $I10) = self."!cursor_start"() - getattribute rx1370_debug, rx1370_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1370_cur - .local pmc match - .lex "$/", match - length rx1370_eos, rx1370_tgt - gt rx1370_pos, rx1370_eos, rx1370_done - set rx1370_off, 0 - lt rx1370_pos, 2, rx1370_start - sub rx1370_off, rx1370_pos, 1 - substr rx1370_tgt, rx1370_tgt, rx1370_off - rx1370_start: - eq $I10, 1, rx1370_restart - if_null rx1370_debug, debug_1050 - rx1370_cur."!cursor_debug"("START ", "assertion:sym") - debug_1050: +.sub "metachar:sym<:my>" :subid("356_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .const 'Sub' $P1376 = "358_1284728478.15265" + capture_lex $P1376 + .local string rx1371_tgt + .local int rx1371_pos + .local int rx1371_off + .local int rx1371_eos + .local int rx1371_rep + .local pmc rx1371_cur + .local pmc rx1371_debug + (rx1371_cur, rx1371_pos, rx1371_tgt, $I10) = self."!cursor_start"() + getattribute rx1371_debug, rx1371_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1371_cur + .local pmc match + .lex "$/", match + length rx1371_eos, rx1371_tgt + gt rx1371_pos, rx1371_eos, rx1371_done + set rx1371_off, 0 + lt rx1371_pos, 2, rx1371_start + sub rx1371_off, rx1371_pos, 1 + substr rx1371_tgt, rx1371_tgt, rx1371_off + rx1371_start: + eq $I10, 1, rx1371_restart + if_null rx1371_debug, debug_1040 + rx1371_cur."!cursor_debug"("START", "metachar:sym<:my>") + debug_1040: $I10 = self.'from'() - ne $I10, -1, rxscan1373_done - goto rxscan1373_scan - rxscan1373_loop: - ($P10) = rx1370_cur."from"() - inc $P10 - set rx1370_pos, $P10 - ge rx1370_pos, rx1370_eos, rxscan1373_done - rxscan1373_scan: - 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) - # rx enumcharlist negate=0 - ge rx1370_pos, rx1370_eos, rx1370_fail - sub $I10, rx1370_pos, rx1370_off - substr $S10, rx1370_tgt, $I10, 1 - index $I11, "?!", $S10 - lt $I11, 0, rx1370_fail - inc rx1370_pos + ne $I10, -1, rxscan1374_done + goto rxscan1374_scan + rxscan1374_loop: + ($P10) = rx1371_cur."from"() + inc $P10 + set rx1371_pos, $P10 + ge rx1371_pos, rx1371_eos, rxscan1374_done + rxscan1374_scan: + set_addr $I10, rxscan1374_loop + rx1371_cur."!mark_push"(0, rx1371_pos, $I10) + rxscan1374_done: +.annotate 'line', 576 + # rx literal ":" + add $I11, rx1371_pos, 1 + gt $I11, rx1371_eos, rx1371_fail + sub $I11, rx1371_pos, rx1371_off + ord $I11, rx1371_tgt, $I11 + ne $I11, 58, rx1371_fail + add rx1371_pos, 1 # rx subrule "before" subtype=zerowidth negate= - rx1370_cur."!cursor_pos"(rx1370_pos) - .const 'Sub' $P1375 = "362_1282016529.10767" - capture_lex $P1375 - $P10 = rx1370_cur."before"($P1375) - unless $P10, rx1370_fail - set_addr $I10, rxcap_1378_fail - ($I12, $I11) = rx1370_cur."!mark_peek"($I10) - rx1370_cur."!cursor_pos"($I11) - ($P10) = rx1370_cur."!cursor_start"() - $P10."!cursor_pass"(rx1370_pos, "") - rx1370_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("zw") - goto rxcap_1378_done - rxcap_1378_fail: - goto rx1370_fail - rxcap_1378_done: - # rx subrule "codeblock" subtype=capture negate= - rx1370_cur."!cursor_pos"(rx1370_pos) - $P10 = rx1370_cur."codeblock"() - unless $P10, rx1370_fail - rx1370_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("codeblock") - rx1370_pos = $P10."pos"() -.annotate 'line', 584 + rx1371_cur."!cursor_pos"(rx1371_pos) + .const 'Sub' $P1376 = "358_1284728478.15265" + capture_lex $P1376 + $P10 = rx1371_cur."before"($P1376) + unless $P10, rx1371_fail + # rx subrule "LANG" subtype=capture negate= + rx1371_cur."!cursor_pos"(rx1371_pos) + $P10 = rx1371_cur."LANG"("MAIN", "statement") + unless $P10, rx1371_fail + rx1371_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("statement") + rx1371_pos = $P10."pos"() + # rx subrule "ws" subtype=method negate= + rx1371_cur."!cursor_pos"(rx1371_pos) + $P10 = rx1371_cur."ws"() + unless $P10, rx1371_fail + rx1371_pos = $P10."pos"() + # rx literal ";" + add $I11, rx1371_pos, 1 + gt $I11, rx1371_eos, rx1371_fail + sub $I11, rx1371_pos, rx1371_off + ord $I11, rx1371_tgt, $I11 + ne $I11, 59, rx1371_fail + add rx1371_pos, 1 +.annotate 'line', 575 # rx pass - rx1370_cur."!cursor_pass"(rx1370_pos, "assertion:sym") - if_null rx1370_debug, debug_1055 - rx1370_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx1370_pos) - 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: - rx1370_fail: - (rx1370_rep, rx1370_pos, $I10, $P10) = rx1370_cur."!mark_fail"(0) - lt rx1370_pos, -1, rx1370_done - eq rx1370_pos, -1, rx1370_fail - jump $I10 - rx1370_done: - rx1370_cur."!cursor_fail"() - if_null rx1370_debug, debug_1057 - rx1370_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_1057: - .return (rx1370_cur) + rx1371_cur."!cursor_pass"(rx1371_pos, "metachar:sym<:my>") + if_null rx1371_debug, debug_1045 + rx1371_cur."!cursor_debug"("PASS", "metachar:sym<:my>", " at pos=", rx1371_pos) + debug_1045: + .return (rx1371_cur) + rx1371_restart: +.annotate 'line', 574 + if_null rx1371_debug, debug_1046 + rx1371_cur."!cursor_debug"("NEXT", "metachar:sym<:my>") + debug_1046: + rx1371_fail: + (rx1371_rep, rx1371_pos, $I10, $P10) = rx1371_cur."!mark_fail"(0) + lt rx1371_pos, -1, rx1371_done + eq rx1371_pos, -1, rx1371_fail + jump $I10 + rx1371_done: + rx1371_cur."!cursor_fail"() + if_null rx1371_debug, debug_1047 + rx1371_cur."!cursor_debug"("FAIL", "metachar:sym<:my>") + debug_1047: + .return (rx1371_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "!PREFIX__assertion:sym" :subid("361_1282016529.10767") :method -.annotate 'line', 567 - new $P1372, "ResizablePMCArray" - push $P1372, "!" - push $P1372, "?" - .return ($P1372) +.sub "!PREFIX__metachar:sym<:my>" :subid("357_1284728478.15265") :method +.annotate 'line', 574 + new $P1373, "ResizablePMCArray" + push $P1373, ":" + .return ($P1373) .end .namespace ["NQP";"Regex"] -.sub "_block1374" :anon :subid("362_1282016529.10767") :method :outer("360_1282016529.10767") -.annotate 'line', 585 - .local string rx1376_tgt - .local int rx1376_pos - .local int rx1376_off - .local int rx1376_eos - .local int rx1376_rep - .local pmc rx1376_cur - .local pmc rx1376_debug - (rx1376_cur, rx1376_pos, rx1376_tgt, $I10) = self."!cursor_start"() - getattribute rx1376_debug, rx1376_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1376_cur - .local pmc match - .lex "$/", match - length rx1376_eos, rx1376_tgt - gt rx1376_pos, rx1376_eos, rx1376_done - set rx1376_off, 0 - lt rx1376_pos, 2, rx1376_start - sub rx1376_off, rx1376_pos, 1 - substr rx1376_tgt, rx1376_tgt, rx1376_off - rx1376_start: - eq $I10, 1, rx1376_restart - if_null rx1376_debug, debug_1051 - rx1376_cur."!cursor_debug"("START ", "") - debug_1051: +.sub "_block1375" :anon :subid("358_1284728478.15265") :method :outer("356_1284728478.15265") +.annotate 'line', 576 + .local string rx1377_tgt + .local int rx1377_pos + .local int rx1377_off + .local int rx1377_eos + .local int rx1377_rep + .local pmc rx1377_cur + .local pmc rx1377_debug + (rx1377_cur, rx1377_pos, rx1377_tgt, $I10) = self."!cursor_start"() + getattribute rx1377_debug, rx1377_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1377_cur + .local pmc match + .lex "$/", match + length rx1377_eos, rx1377_tgt + gt rx1377_pos, rx1377_eos, rx1377_done + set rx1377_off, 0 + lt rx1377_pos, 2, rx1377_start + sub rx1377_off, rx1377_pos, 1 + substr rx1377_tgt, rx1377_tgt, rx1377_off + rx1377_start: + eq $I10, 1, rx1377_restart + if_null rx1377_debug, debug_1041 + rx1377_cur."!cursor_debug"("START", "") + debug_1041: $I10 = self.'from'() - ne $I10, -1, rxscan1377_done - goto rxscan1377_scan - rxscan1377_loop: - ($P10) = rx1376_cur."from"() - inc $P10 - set rx1376_pos, $P10 - ge rx1376_pos, rx1376_eos, rxscan1377_done - rxscan1377_scan: - set_addr $I10, rxscan1377_loop - rx1376_cur."!mark_push"(0, rx1376_pos, $I10) - rxscan1377_done: - # rx literal "{" - add $I11, rx1376_pos, 1 - gt $I11, rx1376_eos, rx1376_fail - sub $I11, rx1376_pos, rx1376_off - ord $I11, rx1376_tgt, $I11 - ne $I11, 123, rx1376_fail - add rx1376_pos, 1 - # rx pass - rx1376_cur."!cursor_pass"(rx1376_pos, "") - if_null rx1376_debug, debug_1052 - rx1376_cur."!cursor_debug"("PASS ", "", " at pos=", rx1376_pos) - debug_1052: - .return (rx1376_cur) - rx1376_restart: - if_null rx1376_debug, debug_1053 - rx1376_cur."!cursor_debug"("NEXT ", "") - debug_1053: - rx1376_fail: - (rx1376_rep, rx1376_pos, $I10, $P10) = rx1376_cur."!mark_fail"(0) - lt rx1376_pos, -1, rx1376_done - eq rx1376_pos, -1, rx1376_fail - jump $I10 - rx1376_done: - rx1376_cur."!cursor_fail"() - if_null rx1376_debug, debug_1054 - rx1376_cur."!cursor_debug"("FAIL ", "") - debug_1054: - .return (rx1376_cur) + ne $I10, -1, rxscan1378_done + goto rxscan1378_scan + rxscan1378_loop: + ($P10) = rx1377_cur."from"() + inc $P10 + set rx1377_pos, $P10 + ge rx1377_pos, rx1377_eos, rxscan1378_done + rxscan1378_scan: + set_addr $I10, rxscan1378_loop + rx1377_cur."!mark_push"(0, rx1377_pos, $I10) + rxscan1378_done: + # rx literal "my" + add $I11, rx1377_pos, 2 + gt $I11, rx1377_eos, rx1377_fail + sub $I11, rx1377_pos, rx1377_off + substr $S10, rx1377_tgt, $I11, 2 + ne $S10, "my", rx1377_fail + add rx1377_pos, 2 + # rx pass + rx1377_cur."!cursor_pass"(rx1377_pos, "") + if_null rx1377_debug, debug_1042 + rx1377_cur."!cursor_debug"("PASS", "", " at pos=", rx1377_pos) + debug_1042: + .return (rx1377_cur) + rx1377_restart: + if_null rx1377_debug, debug_1043 + rx1377_cur."!cursor_debug"("NEXT", "") + debug_1043: + rx1377_fail: + (rx1377_rep, rx1377_pos, $I10, $P10) = rx1377_cur."!mark_fail"(0) + lt rx1377_pos, -1, rx1377_done + eq rx1377_pos, -1, rx1377_fail + jump $I10 + rx1377_done: + rx1377_cur."!cursor_fail"() + if_null rx1377_debug, debug_1044 + rx1377_cur."!cursor_debug"("FAIL", "") + debug_1044: + .return (rx1377_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "assertion:sym" :subid("363_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .const 'Sub' $P1388 = "365_1282016529.10767" - capture_lex $P1388 +.sub "metachar:sym<{ }>" :subid("359_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 .local string rx1380_tgt .local int rx1380_pos .local int rx1380_off @@ -19770,7 +19495,6 @@ .local pmc rx1380_cur .local pmc rx1380_debug (rx1380_cur, rx1380_pos, rx1380_tgt, $I10) = self."!cursor_start"() - rx1380_cur."!cursor_caparray"("nibbler", "arglist", "assertion") getattribute rx1380_debug, rx1380_cur, "$!debug" .lex unicode:"$\x{a2}", rx1380_cur .local pmc match @@ -19783,141 +19507,46 @@ substr rx1380_tgt, rx1380_tgt, rx1380_off rx1380_start: eq $I10, 1, rx1380_restart - if_null rx1380_debug, debug_1058 - rx1380_cur."!cursor_debug"("START ", "assertion:sym") - debug_1058: + if_null rx1380_debug, debug_1048 + rx1380_cur."!cursor_debug"("START", "metachar:sym<{ }>") + debug_1048: $I10 = self.'from'() - ne $I10, -1, rxscan1384_done - goto rxscan1384_scan - rxscan1384_loop: + ne $I10, -1, rxscan1383_done + goto rxscan1383_scan + rxscan1383_loop: ($P10) = rx1380_cur."from"() inc $P10 set rx1380_pos, $P10 - ge rx1380_pos, rx1380_eos, rxscan1384_done - rxscan1384_scan: - 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"() - unless $P10, rx1380_fail - 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_1282016529.10767" - capture_lex $P1388 - $P10 = rx1380_cur."before"($P1388) - unless $P10, rx1380_fail - goto alt1386_end - 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 - sub $I11, rx1380_pos, rx1380_off - ord $I11, rx1380_tgt, $I11 - ne $I11, 61, rx1380_fail - add rx1380_pos, 1 - # rx subrule "assertion" subtype=capture negate= - rx1380_cur."!cursor_pos"(rx1380_pos) - $P10 = rx1380_cur."assertion"() - unless $P10, rx1380_fail - rx1380_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("assertion") - rx1380_pos = $P10."pos"() - goto alt1386_end - 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 - sub $I11, rx1380_pos, rx1380_off - ord $I11, rx1380_tgt, $I11 - ne $I11, 58, rx1380_fail - add rx1380_pos, 1 - # rx subrule "arglist" subtype=capture negate= - rx1380_cur."!cursor_pos"(rx1380_pos) - $P10 = rx1380_cur."arglist"() - unless $P10, rx1380_fail - rx1380_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("arglist") - rx1380_pos = $P10."pos"() - goto alt1386_end - alt1386_3: - set_addr $I10, alt1386_4 + ge rx1380_pos, rx1380_eos, rxscan1383_done + rxscan1383_scan: + set_addr $I10, rxscan1383_loop rx1380_cur."!mark_push"(0, rx1380_pos, $I10) -.annotate 'line', 594 - # rx literal "(" - add $I11, rx1380_pos, 1 - gt $I11, rx1380_eos, rx1380_fail - sub $I11, rx1380_pos, rx1380_off - ord $I11, rx1380_tgt, $I11 - ne $I11, 40, rx1380_fail - add rx1380_pos, 1 - # rx subrule "LANG" subtype=capture negate= - rx1380_cur."!cursor_pos"(rx1380_pos) - $P10 = rx1380_cur."LANG"("MAIN", "arglist") - unless $P10, rx1380_fail - rx1380_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("arglist") - rx1380_pos = $P10."pos"() - # rx literal ")" - add $I11, rx1380_pos, 1 - gt $I11, rx1380_eos, rx1380_fail - sub $I11, rx1380_pos, rx1380_off - ord $I11, rx1380_tgt, $I11 - ne $I11, 41, rx1380_fail - 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"() - unless $P10, rx1380_fail - rx1380_pos = $P10."pos"() - # rx subrule "nibbler" subtype=capture negate= + rxscan1383_done: +.annotate 'line', 580 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx1380_pos, rx1380_off + substr $S10, rx1380_tgt, $I10, 1 + index $I11, "{", $S10 + lt $I11, 0, rx1380_fail + # rx subrule "codeblock" subtype=capture negate= rx1380_cur."!cursor_pos"(rx1380_pos) - $P10 = rx1380_cur."nibbler"() + $P10 = rx1380_cur."codeblock"() unless $P10, rx1380_fail rx1380_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("nibbler") + $P10."!cursor_names"("codeblock") 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 +.annotate 'line', 579 # rx pass - rx1380_cur."!cursor_pass"(rx1380_pos, "assertion:sym") - if_null rx1380_debug, debug_1063 - rx1380_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx1380_pos) - debug_1063: + rx1380_cur."!cursor_pass"(rx1380_pos, "metachar:sym<{ }>") + if_null rx1380_debug, debug_1049 + rx1380_cur."!cursor_debug"("PASS", "metachar:sym<{ }>", " at pos=", rx1380_pos) + debug_1049: .return (rx1380_cur) rx1380_restart: -.annotate 'line', 567 - if_null rx1380_debug, debug_1064 - rx1380_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_1064: +.annotate 'line', 574 + if_null rx1380_debug, debug_1050 + rx1380_cur."!cursor_debug"("NEXT", "metachar:sym<{ }>") + debug_1050: rx1380_fail: (rx1380_rep, rx1380_pos, $I10, $P10) = rx1380_cur."!mark_fail"(0) lt rx1380_pos, -1, rx1380_done @@ -19925,287 +19554,908 @@ jump $I10 rx1380_done: rx1380_cur."!cursor_fail"() - if_null rx1380_debug, debug_1065 - rx1380_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_1065: + if_null rx1380_debug, debug_1051 + rx1380_cur."!cursor_debug"("FAIL", "metachar:sym<{ }>") + debug_1051: .return (rx1380_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "!PREFIX__assertion:sym" :subid("364_1282016529.10767") :method -.annotate 'line', 567 - $P1382 = self."!PREFIX__!subrule"("identifier", "") - new $P1383, "ResizablePMCArray" - push $P1383, $P1382 - .return ($P1383) +.sub "!PREFIX__metachar:sym<{ }>" :subid("360_1284728478.15265") :method +.annotate 'line', 574 + new $P1382, "ResizablePMCArray" + push $P1382, "{" + .return ($P1382) .end .namespace ["NQP";"Regex"] -.sub "_block1387" :anon :subid("365_1282016529.10767") :method :outer("363_1282016529.10767") -.annotate 'line', 591 - .local string rx1389_tgt - .local int rx1389_pos - .local int rx1389_off - .local int rx1389_eos - .local int rx1389_rep - .local pmc rx1389_cur - .local pmc rx1389_debug - (rx1389_cur, rx1389_pos, rx1389_tgt, $I10) = self."!cursor_start"() - getattribute rx1389_debug, rx1389_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1389_cur - .local pmc match - .lex "$/", match - length rx1389_eos, rx1389_tgt - gt rx1389_pos, rx1389_eos, rx1389_done - set rx1389_off, 0 - lt rx1389_pos, 2, rx1389_start - sub rx1389_off, rx1389_pos, 1 - substr rx1389_tgt, rx1389_tgt, rx1389_off - rx1389_start: - eq $I10, 1, rx1389_restart - if_null rx1389_debug, debug_1059 - rx1389_cur."!cursor_debug"("START ", "") - debug_1059: +.sub "metachar:sym" :subid("361_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .const 'Sub' $P1390 = "363_1284728478.15265" + capture_lex $P1390 + .local string rx1385_tgt + .local int rx1385_pos + .local int rx1385_off + .local int rx1385_eos + .local int rx1385_rep + .local pmc rx1385_cur + .local pmc rx1385_debug + (rx1385_cur, rx1385_pos, rx1385_tgt, $I10) = self."!cursor_start"() + getattribute rx1385_debug, rx1385_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1385_cur + .local pmc match + .lex "$/", match + length rx1385_eos, rx1385_tgt + gt rx1385_pos, rx1385_eos, rx1385_done + set rx1385_off, 0 + lt rx1385_pos, 2, rx1385_start + sub rx1385_off, rx1385_pos, 1 + substr rx1385_tgt, rx1385_tgt, rx1385_off + rx1385_start: + eq $I10, 1, rx1385_restart + if_null rx1385_debug, debug_1052 + rx1385_cur."!cursor_debug"("START", "metachar:sym") + debug_1052: $I10 = self.'from'() - ne $I10, -1, rxscan1390_done - goto rxscan1390_scan - rxscan1390_loop: - ($P10) = rx1389_cur."from"() - inc $P10 - set rx1389_pos, $P10 - ge rx1389_pos, rx1389_eos, rxscan1390_done - rxscan1390_scan: - set_addr $I10, rxscan1390_loop - rx1389_cur."!mark_push"(0, rx1389_pos, $I10) - rxscan1390_done: - # rx literal ">" - add $I11, rx1389_pos, 1 - gt $I11, rx1389_eos, rx1389_fail - sub $I11, rx1389_pos, rx1389_off - ord $I11, rx1389_tgt, $I11 - ne $I11, 62, rx1389_fail - add rx1389_pos, 1 - # rx pass - rx1389_cur."!cursor_pass"(rx1389_pos, "") - if_null rx1389_debug, debug_1060 - rx1389_cur."!cursor_debug"("PASS ", "", " at pos=", rx1389_pos) - debug_1060: - .return (rx1389_cur) - rx1389_restart: - if_null rx1389_debug, debug_1061 - rx1389_cur."!cursor_debug"("NEXT ", "") - debug_1061: - rx1389_fail: - (rx1389_rep, rx1389_pos, $I10, $P10) = rx1389_cur."!mark_fail"(0) - lt rx1389_pos, -1, rx1389_done - eq rx1389_pos, -1, rx1389_fail - jump $I10 - rx1389_done: - rx1389_cur."!cursor_fail"() - if_null rx1389_debug, debug_1062 - rx1389_cur."!cursor_debug"("FAIL ", "") - debug_1062: - .return (rx1389_cur) + ne $I10, -1, rxscan1388_done + goto rxscan1388_scan + rxscan1388_loop: + ($P10) = rx1385_cur."from"() + inc $P10 + set rx1385_pos, $P10 + ge rx1385_pos, rx1385_eos, rxscan1388_done + rxscan1388_scan: + set_addr $I10, rxscan1388_loop + rx1385_cur."!mark_push"(0, rx1385_pos, $I10) + rxscan1388_done: +.annotate 'line', 584 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx1385_pos, rx1385_off + substr $S10, rx1385_tgt, $I10, 1 + index $I11, "$@", $S10 + lt $I11, 0, rx1385_fail + # rx subrule "before" subtype=zerowidth negate= + rx1385_cur."!cursor_pos"(rx1385_pos) + .const 'Sub' $P1390 = "363_1284728478.15265" + capture_lex $P1390 + $P10 = rx1385_cur."before"($P1390) + unless $P10, rx1385_fail + # rx subrule "LANG" subtype=capture negate= + rx1385_cur."!cursor_pos"(rx1385_pos) + $P10 = rx1385_cur."LANG"("MAIN", "variable") + unless $P10, rx1385_fail + rx1385_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("var") + rx1385_pos = $P10."pos"() +.annotate 'line', 583 + # rx pass + rx1385_cur."!cursor_pass"(rx1385_pos, "metachar:sym") + if_null rx1385_debug, debug_1057 + rx1385_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx1385_pos) + debug_1057: + .return (rx1385_cur) + rx1385_restart: +.annotate 'line', 574 + if_null rx1385_debug, debug_1058 + rx1385_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_1058: + rx1385_fail: + (rx1385_rep, rx1385_pos, $I10, $P10) = rx1385_cur."!mark_fail"(0) + lt rx1385_pos, -1, rx1385_done + eq rx1385_pos, -1, rx1385_fail + jump $I10 + rx1385_done: + rx1385_cur."!cursor_fail"() + if_null rx1385_debug, debug_1059 + rx1385_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_1059: + .return (rx1385_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "assertion:sym" :subid("366_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .local string rx1392_tgt - .local int rx1392_pos - .local int rx1392_off - .local int rx1392_eos - .local int rx1392_rep - .local pmc rx1392_cur - .local pmc rx1392_debug - (rx1392_cur, rx1392_pos, rx1392_tgt, $I10) = self."!cursor_start"() - getattribute rx1392_debug, rx1392_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1392_cur - .local pmc match - .lex "$/", match - length rx1392_eos, rx1392_tgt - gt rx1392_pos, rx1392_eos, rx1392_done - set rx1392_off, 0 - lt rx1392_pos, 2, rx1392_start - sub rx1392_off, rx1392_pos, 1 - substr rx1392_tgt, rx1392_tgt, rx1392_off - rx1392_start: - eq $I10, 1, rx1392_restart - if_null rx1392_debug, debug_1066 - rx1392_cur."!cursor_debug"("START ", "assertion:sym") +.sub "!PREFIX__metachar:sym" :subid("362_1284728478.15265") :method +.annotate 'line', 574 + new $P1387, "ResizablePMCArray" + push $P1387, "$" + push $P1387, "@" + .return ($P1387) +.end + + +.namespace ["NQP";"Regex"] +.sub "_block1389" :anon :subid("363_1284728478.15265") :method :outer("361_1284728478.15265") +.annotate 'line', 584 + .local string rx1391_tgt + .local int rx1391_pos + .local int rx1391_off + .local int rx1391_eos + .local int rx1391_rep + .local pmc rx1391_cur + .local pmc rx1391_debug + (rx1391_cur, rx1391_pos, rx1391_tgt, $I10) = self."!cursor_start"() + getattribute rx1391_debug, rx1391_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1391_cur + .local pmc match + .lex "$/", match + length rx1391_eos, rx1391_tgt + gt rx1391_pos, rx1391_eos, rx1391_done + set rx1391_off, 0 + lt rx1391_pos, 2, rx1391_start + sub rx1391_off, rx1391_pos, 1 + substr rx1391_tgt, rx1391_tgt, rx1391_off + rx1391_start: + eq $I10, 1, rx1391_restart + if_null rx1391_debug, debug_1053 + rx1391_cur."!cursor_debug"("START", "") + debug_1053: + $I10 = self.'from'() + ne $I10, -1, rxscan1392_done + goto rxscan1392_scan + rxscan1392_loop: + ($P10) = rx1391_cur."from"() + inc $P10 + set rx1391_pos, $P10 + ge rx1391_pos, rx1391_eos, rxscan1392_done + rxscan1392_scan: + set_addr $I10, rxscan1392_loop + rx1391_cur."!mark_push"(0, rx1391_pos, $I10) + rxscan1392_done: + # rx charclass . + ge rx1391_pos, rx1391_eos, rx1391_fail + inc rx1391_pos + # rx charclass w + ge rx1391_pos, rx1391_eos, rx1391_fail + sub $I10, rx1391_pos, rx1391_off + is_cclass $I11, 8192, rx1391_tgt, $I10 + unless $I11, rx1391_fail + inc rx1391_pos + # rx pass + rx1391_cur."!cursor_pass"(rx1391_pos, "") + if_null rx1391_debug, debug_1054 + rx1391_cur."!cursor_debug"("PASS", "", " at pos=", rx1391_pos) + debug_1054: + .return (rx1391_cur) + rx1391_restart: + if_null rx1391_debug, debug_1055 + rx1391_cur."!cursor_debug"("NEXT", "") + debug_1055: + rx1391_fail: + (rx1391_rep, rx1391_pos, $I10, $P10) = rx1391_cur."!mark_fail"(0) + lt rx1391_pos, -1, rx1391_done + eq rx1391_pos, -1, rx1391_fail + jump $I10 + rx1391_done: + rx1391_cur."!cursor_fail"() + if_null rx1391_debug, debug_1056 + rx1391_cur."!cursor_debug"("FAIL", "") + debug_1056: + .return (rx1391_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "assertion:sym<{ }>" :subid("364_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .local string rx1394_tgt + .local int rx1394_pos + .local int rx1394_off + .local int rx1394_eos + .local int rx1394_rep + .local pmc rx1394_cur + .local pmc rx1394_debug + (rx1394_cur, rx1394_pos, rx1394_tgt, $I10) = self."!cursor_start"() + getattribute rx1394_debug, rx1394_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1394_cur + .local pmc match + .lex "$/", match + length rx1394_eos, rx1394_tgt + gt rx1394_pos, rx1394_eos, rx1394_done + set rx1394_off, 0 + lt rx1394_pos, 2, rx1394_start + sub rx1394_off, rx1394_pos, 1 + substr rx1394_tgt, rx1394_tgt, rx1394_off + rx1394_start: + eq $I10, 1, rx1394_restart + if_null rx1394_debug, debug_1060 + rx1394_cur."!cursor_debug"("START", "assertion:sym<{ }>") + debug_1060: + $I10 = self.'from'() + ne $I10, -1, rxscan1397_done + goto rxscan1397_scan + rxscan1397_loop: + ($P10) = rx1394_cur."from"() + inc $P10 + set rx1394_pos, $P10 + ge rx1394_pos, rx1394_eos, rxscan1397_done + rxscan1397_scan: + set_addr $I10, rxscan1397_loop + rx1394_cur."!mark_push"(0, rx1394_pos, $I10) + rxscan1397_done: +.annotate 'line', 588 + # rx enumcharlist negate=0 zerowidth + sub $I10, rx1394_pos, rx1394_off + substr $S10, rx1394_tgt, $I10, 1 + index $I11, "{", $S10 + lt $I11, 0, rx1394_fail + # rx subrule "codeblock" subtype=capture negate= + rx1394_cur."!cursor_pos"(rx1394_pos) + $P10 = rx1394_cur."codeblock"() + unless $P10, rx1394_fail + rx1394_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("codeblock") + rx1394_pos = $P10."pos"() +.annotate 'line', 587 + # rx pass + rx1394_cur."!cursor_pass"(rx1394_pos, "assertion:sym<{ }>") + if_null rx1394_debug, debug_1061 + rx1394_cur."!cursor_debug"("PASS", "assertion:sym<{ }>", " at pos=", rx1394_pos) + debug_1061: + .return (rx1394_cur) + rx1394_restart: +.annotate 'line', 574 + if_null rx1394_debug, debug_1062 + rx1394_cur."!cursor_debug"("NEXT", "assertion:sym<{ }>") + debug_1062: + rx1394_fail: + (rx1394_rep, rx1394_pos, $I10, $P10) = rx1394_cur."!mark_fail"(0) + lt rx1394_pos, -1, rx1394_done + eq rx1394_pos, -1, rx1394_fail + jump $I10 + rx1394_done: + rx1394_cur."!cursor_fail"() + if_null rx1394_debug, debug_1063 + rx1394_cur."!cursor_debug"("FAIL", "assertion:sym<{ }>") + debug_1063: + .return (rx1394_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "!PREFIX__assertion:sym<{ }>" :subid("365_1284728478.15265") :method +.annotate 'line', 574 + new $P1396, "ResizablePMCArray" + push $P1396, "{" + .return ($P1396) +.end + + +.namespace ["NQP";"Regex"] +.sub "assertion:sym" :subid("366_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .const 'Sub' $P1404 = "368_1284728478.15265" + capture_lex $P1404 + .local string rx1399_tgt + .local int rx1399_pos + .local int rx1399_off + .local int rx1399_eos + .local int rx1399_rep + .local pmc rx1399_cur + .local pmc rx1399_debug + (rx1399_cur, rx1399_pos, rx1399_tgt, $I10) = self."!cursor_start"() + getattribute rx1399_debug, rx1399_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1399_cur + .local pmc match + .lex "$/", match + length rx1399_eos, rx1399_tgt + gt rx1399_pos, rx1399_eos, rx1399_done + set rx1399_off, 0 + lt rx1399_pos, 2, rx1399_start + sub rx1399_off, rx1399_pos, 1 + substr rx1399_tgt, rx1399_tgt, rx1399_off + rx1399_start: + eq $I10, 1, rx1399_restart + if_null rx1399_debug, debug_1064 + rx1399_cur."!cursor_debug"("START", "assertion:sym") + debug_1064: + $I10 = self.'from'() + ne $I10, -1, rxscan1402_done + goto rxscan1402_scan + rxscan1402_loop: + ($P10) = rx1399_cur."from"() + inc $P10 + set rx1399_pos, $P10 + ge rx1399_pos, rx1399_eos, rxscan1402_done + rxscan1402_scan: + set_addr $I10, rxscan1402_loop + rx1399_cur."!mark_push"(0, rx1399_pos, $I10) + rxscan1402_done: +.annotate 'line', 592 + # rx subcapture "zw" + set_addr $I10, rxcap_1407_fail + rx1399_cur."!mark_push"(0, rx1399_pos, $I10) + # rx enumcharlist negate=0 + ge rx1399_pos, rx1399_eos, rx1399_fail + sub $I10, rx1399_pos, rx1399_off + substr $S10, rx1399_tgt, $I10, 1 + index $I11, "?!", $S10 + lt $I11, 0, rx1399_fail + inc rx1399_pos + # rx subrule "before" subtype=zerowidth negate= + rx1399_cur."!cursor_pos"(rx1399_pos) + .const 'Sub' $P1404 = "368_1284728478.15265" + capture_lex $P1404 + $P10 = rx1399_cur."before"($P1404) + unless $P10, rx1399_fail + set_addr $I10, rxcap_1407_fail + ($I12, $I11) = rx1399_cur."!mark_peek"($I10) + rx1399_cur."!cursor_pos"($I11) + ($P10) = rx1399_cur."!cursor_start"() + $P10."!cursor_pass"(rx1399_pos, "") + rx1399_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("zw") + goto rxcap_1407_done + rxcap_1407_fail: + goto rx1399_fail + rxcap_1407_done: + # rx subrule "codeblock" subtype=capture negate= + rx1399_cur."!cursor_pos"(rx1399_pos) + $P10 = rx1399_cur."codeblock"() + unless $P10, rx1399_fail + rx1399_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("codeblock") + rx1399_pos = $P10."pos"() +.annotate 'line', 591 + # rx pass + rx1399_cur."!cursor_pass"(rx1399_pos, "assertion:sym") + if_null rx1399_debug, debug_1069 + rx1399_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx1399_pos) + debug_1069: + .return (rx1399_cur) + rx1399_restart: +.annotate 'line', 574 + if_null rx1399_debug, debug_1070 + rx1399_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_1070: + rx1399_fail: + (rx1399_rep, rx1399_pos, $I10, $P10) = rx1399_cur."!mark_fail"(0) + lt rx1399_pos, -1, rx1399_done + eq rx1399_pos, -1, rx1399_fail + jump $I10 + rx1399_done: + rx1399_cur."!cursor_fail"() + if_null rx1399_debug, debug_1071 + rx1399_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_1071: + .return (rx1399_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "!PREFIX__assertion:sym" :subid("367_1284728478.15265") :method +.annotate 'line', 574 + new $P1401, "ResizablePMCArray" + push $P1401, "!" + push $P1401, "?" + .return ($P1401) +.end + + +.namespace ["NQP";"Regex"] +.sub "_block1403" :anon :subid("368_1284728478.15265") :method :outer("366_1284728478.15265") +.annotate 'line', 592 + .local string rx1405_tgt + .local int rx1405_pos + .local int rx1405_off + .local int rx1405_eos + .local int rx1405_rep + .local pmc rx1405_cur + .local pmc rx1405_debug + (rx1405_cur, rx1405_pos, rx1405_tgt, $I10) = self."!cursor_start"() + getattribute rx1405_debug, rx1405_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1405_cur + .local pmc match + .lex "$/", match + length rx1405_eos, rx1405_tgt + gt rx1405_pos, rx1405_eos, rx1405_done + set rx1405_off, 0 + lt rx1405_pos, 2, rx1405_start + sub rx1405_off, rx1405_pos, 1 + substr rx1405_tgt, rx1405_tgt, rx1405_off + rx1405_start: + eq $I10, 1, rx1405_restart + if_null rx1405_debug, debug_1065 + rx1405_cur."!cursor_debug"("START", "") + debug_1065: + $I10 = self.'from'() + ne $I10, -1, rxscan1406_done + goto rxscan1406_scan + rxscan1406_loop: + ($P10) = rx1405_cur."from"() + inc $P10 + set rx1405_pos, $P10 + ge rx1405_pos, rx1405_eos, rxscan1406_done + rxscan1406_scan: + set_addr $I10, rxscan1406_loop + rx1405_cur."!mark_push"(0, rx1405_pos, $I10) + rxscan1406_done: + # rx literal "{" + add $I11, rx1405_pos, 1 + gt $I11, rx1405_eos, rx1405_fail + sub $I11, rx1405_pos, rx1405_off + ord $I11, rx1405_tgt, $I11 + ne $I11, 123, rx1405_fail + add rx1405_pos, 1 + # rx pass + rx1405_cur."!cursor_pass"(rx1405_pos, "") + if_null rx1405_debug, debug_1066 + rx1405_cur."!cursor_debug"("PASS", "", " at pos=", rx1405_pos) debug_1066: + .return (rx1405_cur) + rx1405_restart: + if_null rx1405_debug, debug_1067 + rx1405_cur."!cursor_debug"("NEXT", "") + debug_1067: + rx1405_fail: + (rx1405_rep, rx1405_pos, $I10, $P10) = rx1405_cur."!mark_fail"(0) + lt rx1405_pos, -1, rx1405_done + eq rx1405_pos, -1, rx1405_fail + jump $I10 + rx1405_done: + rx1405_cur."!cursor_fail"() + if_null rx1405_debug, debug_1068 + rx1405_cur."!cursor_debug"("FAIL", "") + debug_1068: + .return (rx1405_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "assertion:sym" :subid("369_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .const 'Sub' $P1417 = "371_1284728478.15265" + capture_lex $P1417 + .local string rx1409_tgt + .local int rx1409_pos + .local int rx1409_off + .local int rx1409_eos + .local int rx1409_rep + .local pmc rx1409_cur + .local pmc rx1409_debug + (rx1409_cur, rx1409_pos, rx1409_tgt, $I10) = self."!cursor_start"() + rx1409_cur."!cursor_caparray"("nibbler", "arglist", "assertion") + getattribute rx1409_debug, rx1409_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1409_cur + .local pmc match + .lex "$/", match + length rx1409_eos, rx1409_tgt + gt rx1409_pos, rx1409_eos, rx1409_done + set rx1409_off, 0 + lt rx1409_pos, 2, rx1409_start + sub rx1409_off, rx1409_pos, 1 + substr rx1409_tgt, rx1409_tgt, rx1409_off + rx1409_start: + eq $I10, 1, rx1409_restart + if_null rx1409_debug, debug_1072 + rx1409_cur."!cursor_debug"("START", "assertion:sym") + debug_1072: $I10 = self.'from'() - ne $I10, -1, rxscan1395_done - goto rxscan1395_scan - rxscan1395_loop: - ($P10) = rx1392_cur."from"() - inc $P10 - set rx1392_pos, $P10 - ge rx1392_pos, rx1392_eos, rxscan1395_done - rxscan1395_scan: - set_addr $I10, rxscan1395_loop - rx1392_cur."!mark_push"(0, rx1392_pos, $I10) - rxscan1395_done: + ne $I10, -1, rxscan1413_done + goto rxscan1413_scan + rxscan1413_loop: + ($P10) = rx1409_cur."from"() + inc $P10 + set rx1409_pos, $P10 + ge rx1409_pos, rx1409_eos, rxscan1413_done + rxscan1413_scan: + set_addr $I10, rxscan1413_loop + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) + rxscan1413_done: +.annotate 'line', 596 + # rx subrule "identifier" subtype=capture negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."identifier"() + unless $P10, rx1409_fail + rx1409_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("longname") + rx1409_pos = $P10."pos"() +.annotate 'line', 603 + # rx rxquantr1414 ** 0..1 + set_addr $I10, rxquantr1414_done + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) + rxquantr1414_loop: + alt1415_0: +.annotate 'line', 597 + set_addr $I10, alt1415_1 + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) +.annotate 'line', 598 + # rx subrule "before" subtype=zerowidth negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + .const 'Sub' $P1417 = "371_1284728478.15265" + capture_lex $P1417 + $P10 = rx1409_cur."before"($P1417) + unless $P10, rx1409_fail + goto alt1415_end + alt1415_1: + set_addr $I10, alt1415_2 + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) +.annotate 'line', 599 + # rx literal "=" + add $I11, rx1409_pos, 1 + gt $I11, rx1409_eos, rx1409_fail + sub $I11, rx1409_pos, rx1409_off + ord $I11, rx1409_tgt, $I11 + ne $I11, 61, rx1409_fail + add rx1409_pos, 1 + # rx subrule "assertion" subtype=capture negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."assertion"() + unless $P10, rx1409_fail + rx1409_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("assertion") + rx1409_pos = $P10."pos"() + goto alt1415_end + alt1415_2: + set_addr $I10, alt1415_3 + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) .annotate 'line', 600 + # rx literal ":" + add $I11, rx1409_pos, 1 + gt $I11, rx1409_eos, rx1409_fail + sub $I11, rx1409_pos, rx1409_off + ord $I11, rx1409_tgt, $I11 + ne $I11, 58, rx1409_fail + add rx1409_pos, 1 + # rx subrule "arglist" subtype=capture negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."arglist"() + unless $P10, rx1409_fail + rx1409_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("arglist") + rx1409_pos = $P10."pos"() + goto alt1415_end + alt1415_3: + set_addr $I10, alt1415_4 + rx1409_cur."!mark_push"(0, rx1409_pos, $I10) +.annotate 'line', 601 + # rx literal "(" + add $I11, rx1409_pos, 1 + gt $I11, rx1409_eos, rx1409_fail + sub $I11, rx1409_pos, rx1409_off + ord $I11, rx1409_tgt, $I11 + ne $I11, 40, rx1409_fail + add rx1409_pos, 1 + # rx subrule "LANG" subtype=capture negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."LANG"("MAIN", "arglist") + unless $P10, rx1409_fail + rx1409_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("arglist") + rx1409_pos = $P10."pos"() + # rx literal ")" + add $I11, rx1409_pos, 1 + gt $I11, rx1409_eos, rx1409_fail + sub $I11, rx1409_pos, rx1409_off + ord $I11, rx1409_tgt, $I11 + ne $I11, 41, rx1409_fail + add rx1409_pos, 1 + goto alt1415_end + alt1415_4: +.annotate 'line', 602 + # rx subrule "normspace" subtype=method negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."normspace"() + unless $P10, rx1409_fail + rx1409_pos = $P10."pos"() + # rx subrule "nibbler" subtype=capture negate= + rx1409_cur."!cursor_pos"(rx1409_pos) + $P10 = rx1409_cur."nibbler"() + unless $P10, rx1409_fail + rx1409_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("nibbler") + rx1409_pos = $P10."pos"() + alt1415_end: +.annotate 'line', 603 + set_addr $I10, rxquantr1414_done + (rx1409_rep) = rx1409_cur."!mark_commit"($I10) + rxquantr1414_done: +.annotate 'line', 595 + # rx pass + rx1409_cur."!cursor_pass"(rx1409_pos, "assertion:sym") + if_null rx1409_debug, debug_1077 + rx1409_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx1409_pos) + debug_1077: + .return (rx1409_cur) + rx1409_restart: +.annotate 'line', 574 + if_null rx1409_debug, debug_1078 + rx1409_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_1078: + rx1409_fail: + (rx1409_rep, rx1409_pos, $I10, $P10) = rx1409_cur."!mark_fail"(0) + lt rx1409_pos, -1, rx1409_done + eq rx1409_pos, -1, rx1409_fail + jump $I10 + rx1409_done: + rx1409_cur."!cursor_fail"() + if_null rx1409_debug, debug_1079 + rx1409_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_1079: + .return (rx1409_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "!PREFIX__assertion:sym" :subid("370_1284728478.15265") :method +.annotate 'line', 574 + $P1411 = self."!PREFIX__!subrule"("identifier", "") + new $P1412, "ResizablePMCArray" + push $P1412, $P1411 + .return ($P1412) +.end + + +.namespace ["NQP";"Regex"] +.sub "_block1416" :anon :subid("371_1284728478.15265") :method :outer("369_1284728478.15265") +.annotate 'line', 598 + .local string rx1418_tgt + .local int rx1418_pos + .local int rx1418_off + .local int rx1418_eos + .local int rx1418_rep + .local pmc rx1418_cur + .local pmc rx1418_debug + (rx1418_cur, rx1418_pos, rx1418_tgt, $I10) = self."!cursor_start"() + getattribute rx1418_debug, rx1418_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1418_cur + .local pmc match + .lex "$/", match + length rx1418_eos, rx1418_tgt + gt rx1418_pos, rx1418_eos, rx1418_done + set rx1418_off, 0 + lt rx1418_pos, 2, rx1418_start + sub rx1418_off, rx1418_pos, 1 + substr rx1418_tgt, rx1418_tgt, rx1418_off + rx1418_start: + eq $I10, 1, rx1418_restart + if_null rx1418_debug, debug_1073 + rx1418_cur."!cursor_debug"("START", "") + debug_1073: + $I10 = self.'from'() + ne $I10, -1, rxscan1419_done + goto rxscan1419_scan + rxscan1419_loop: + ($P10) = rx1418_cur."from"() + inc $P10 + set rx1418_pos, $P10 + ge rx1418_pos, rx1418_eos, rxscan1419_done + rxscan1419_scan: + set_addr $I10, rxscan1419_loop + rx1418_cur."!mark_push"(0, rx1418_pos, $I10) + rxscan1419_done: + # rx literal ">" + add $I11, rx1418_pos, 1 + gt $I11, rx1418_eos, rx1418_fail + sub $I11, rx1418_pos, rx1418_off + ord $I11, rx1418_tgt, $I11 + ne $I11, 62, rx1418_fail + add rx1418_pos, 1 + # rx pass + rx1418_cur."!cursor_pass"(rx1418_pos, "") + if_null rx1418_debug, debug_1074 + rx1418_cur."!cursor_debug"("PASS", "", " at pos=", rx1418_pos) + debug_1074: + .return (rx1418_cur) + rx1418_restart: + if_null rx1418_debug, debug_1075 + rx1418_cur."!cursor_debug"("NEXT", "") + debug_1075: + rx1418_fail: + (rx1418_rep, rx1418_pos, $I10, $P10) = rx1418_cur."!mark_fail"(0) + lt rx1418_pos, -1, rx1418_done + eq rx1418_pos, -1, rx1418_fail + jump $I10 + rx1418_done: + rx1418_cur."!cursor_fail"() + if_null rx1418_debug, debug_1076 + rx1418_cur."!cursor_debug"("FAIL", "") + debug_1076: + .return (rx1418_cur) + .return () +.end + + +.namespace ["NQP";"Regex"] +.sub "assertion:sym" :subid("372_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .local string rx1421_tgt + .local int rx1421_pos + .local int rx1421_off + .local int rx1421_eos + .local int rx1421_rep + .local pmc rx1421_cur + .local pmc rx1421_debug + (rx1421_cur, rx1421_pos, rx1421_tgt, $I10) = self."!cursor_start"() + getattribute rx1421_debug, rx1421_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1421_cur + .local pmc match + .lex "$/", match + length rx1421_eos, rx1421_tgt + gt rx1421_pos, rx1421_eos, rx1421_done + set rx1421_off, 0 + lt rx1421_pos, 2, rx1421_start + sub rx1421_off, rx1421_pos, 1 + substr rx1421_tgt, rx1421_tgt, rx1421_off + rx1421_start: + eq $I10, 1, rx1421_restart + if_null rx1421_debug, debug_1080 + rx1421_cur."!cursor_debug"("START", "assertion:sym") + debug_1080: + $I10 = self.'from'() + ne $I10, -1, rxscan1424_done + goto rxscan1424_scan + rxscan1424_loop: + ($P10) = rx1421_cur."from"() + inc $P10 + set rx1421_pos, $P10 + ge rx1421_pos, rx1421_eos, rxscan1424_done + rxscan1424_scan: + set_addr $I10, rxscan1424_loop + rx1421_cur."!mark_push"(0, rx1421_pos, $I10) + rxscan1424_done: +.annotate 'line', 607 # rx enumcharlist negate=0 zerowidth - ge rx1392_pos, rx1392_eos, rx1392_fail - sub $I10, rx1392_pos, rx1392_off - substr $S10, rx1392_tgt, $I10, 1 + sub $I10, rx1421_pos, rx1421_off + substr $S10, rx1421_tgt, $I10, 1 index $I11, "$@", $S10 - lt $I11, 0, rx1392_fail + lt $I11, 0, rx1421_fail # rx subrule "LANG" subtype=capture negate= - rx1392_cur."!cursor_pos"(rx1392_pos) - $P10 = rx1392_cur."LANG"("MAIN", "variable") - unless $P10, rx1392_fail - rx1392_cur."!mark_push"(0, -1, 0, $P10) + rx1421_cur."!cursor_pos"(rx1421_pos) + $P10 = rx1421_cur."LANG"("MAIN", "variable") + unless $P10, rx1421_fail + rx1421_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("var") - rx1392_pos = $P10."pos"() -.annotate 'line', 599 + rx1421_pos = $P10."pos"() +.annotate 'line', 606 # rx pass - rx1392_cur."!cursor_pass"(rx1392_pos, "assertion:sym") - if_null rx1392_debug, debug_1067 - rx1392_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx1392_pos) - debug_1067: - .return (rx1392_cur) - rx1392_restart: -.annotate 'line', 567 - if_null rx1392_debug, debug_1068 - rx1392_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_1068: - rx1392_fail: - (rx1392_rep, rx1392_pos, $I10, $P10) = rx1392_cur."!mark_fail"(0) - lt rx1392_pos, -1, rx1392_done - eq rx1392_pos, -1, rx1392_fail - jump $I10 - rx1392_done: - rx1392_cur."!cursor_fail"() - if_null rx1392_debug, debug_1069 - rx1392_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_1069: - .return (rx1392_cur) + rx1421_cur."!cursor_pass"(rx1421_pos, "assertion:sym") + if_null rx1421_debug, debug_1081 + rx1421_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx1421_pos) + debug_1081: + .return (rx1421_cur) + rx1421_restart: +.annotate 'line', 574 + if_null rx1421_debug, debug_1082 + rx1421_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_1082: + rx1421_fail: + (rx1421_rep, rx1421_pos, $I10, $P10) = rx1421_cur."!mark_fail"(0) + lt rx1421_pos, -1, rx1421_done + eq rx1421_pos, -1, rx1421_fail + jump $I10 + rx1421_done: + rx1421_cur."!cursor_fail"() + if_null rx1421_debug, debug_1083 + rx1421_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_1083: + .return (rx1421_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "!PREFIX__assertion:sym" :subid("367_1282016529.10767") :method -.annotate 'line', 567 - new $P1394, "ResizablePMCArray" - push $P1394, "$" - push $P1394, "@" - .return ($P1394) +.sub "!PREFIX__assertion:sym" :subid("373_1284728478.15265") :method +.annotate 'line', 574 + new $P1423, "ResizablePMCArray" + push $P1423, "$" + push $P1423, "@" + .return ($P1423) .end .namespace ["NQP";"Regex"] -.sub "codeblock" :subid("368_1282016529.10767") :method :outer("349_1282016529.10767") -.annotate 'line', 567 - .local string rx1397_tgt - .local int rx1397_pos - .local int rx1397_off - .local int rx1397_eos - .local int rx1397_rep - .local pmc rx1397_cur - .local pmc rx1397_debug - (rx1397_cur, rx1397_pos, rx1397_tgt, $I10) = self."!cursor_start"() - getattribute rx1397_debug, rx1397_cur, "$!debug" - .lex unicode:"$\x{a2}", rx1397_cur - .local pmc match - .lex "$/", match - length rx1397_eos, rx1397_tgt - gt rx1397_pos, rx1397_eos, rx1397_done - set rx1397_off, 0 - lt rx1397_pos, 2, rx1397_start - sub rx1397_off, rx1397_pos, 1 - substr rx1397_tgt, rx1397_tgt, rx1397_off - rx1397_start: - eq $I10, 1, rx1397_restart - if_null rx1397_debug, debug_1070 - rx1397_cur."!cursor_debug"("START ", "codeblock") - debug_1070: - $I10 = self.'from'() - ne $I10, -1, rxscan1401_done - goto rxscan1401_scan - rxscan1401_loop: - ($P10) = rx1397_cur."from"() - inc $P10 - set rx1397_pos, $P10 - ge rx1397_pos, rx1397_eos, rxscan1401_done - rxscan1401_scan: - set_addr $I10, rxscan1401_loop - rx1397_cur."!mark_push"(0, rx1397_pos, $I10) - rxscan1401_done: -.annotate 'line', 604 +.sub "codeblock" :subid("374_1284728478.15265") :method :outer("355_1284728478.15265") +.annotate 'line', 574 + .local string rx1426_tgt + .local int rx1426_pos + .local int rx1426_off + .local int rx1426_eos + .local int rx1426_rep + .local pmc rx1426_cur + .local pmc rx1426_debug + (rx1426_cur, rx1426_pos, rx1426_tgt, $I10) = self."!cursor_start"() + getattribute rx1426_debug, rx1426_cur, "$!debug" + .lex unicode:"$\x{a2}", rx1426_cur + .local pmc match + .lex "$/", match + length rx1426_eos, rx1426_tgt + gt rx1426_pos, rx1426_eos, rx1426_done + set rx1426_off, 0 + lt rx1426_pos, 2, rx1426_start + sub rx1426_off, rx1426_pos, 1 + substr rx1426_tgt, rx1426_tgt, rx1426_off + rx1426_start: + eq $I10, 1, rx1426_restart + if_null rx1426_debug, debug_1084 + rx1426_cur."!cursor_debug"("START", "codeblock") + debug_1084: + $I10 = self.'from'() + ne $I10, -1, rxscan1430_done + goto rxscan1430_scan + rxscan1430_loop: + ($P10) = rx1426_cur."from"() + inc $P10 + set rx1426_pos, $P10 + ge rx1426_pos, rx1426_eos, rxscan1430_done + rxscan1430_scan: + set_addr $I10, rxscan1430_loop + rx1426_cur."!mark_push"(0, rx1426_pos, $I10) + rxscan1430_done: +.annotate 'line', 611 # rx subrule "LANG" subtype=capture negate= - rx1397_cur."!cursor_pos"(rx1397_pos) - $P10 = rx1397_cur."LANG"("MAIN", "pblock") - unless $P10, rx1397_fail - rx1397_cur."!mark_push"(0, -1, 0, $P10) + rx1426_cur."!cursor_pos"(rx1426_pos) + $P10 = rx1426_cur."LANG"("MAIN", "pblock") + unless $P10, rx1426_fail + rx1426_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("block") - rx1397_pos = $P10."pos"() -.annotate 'line', 603 + rx1426_pos = $P10."pos"() +.annotate 'line', 610 # rx pass - rx1397_cur."!cursor_pass"(rx1397_pos, "codeblock") - if_null rx1397_debug, debug_1071 - rx1397_cur."!cursor_debug"("PASS ", "codeblock", " at pos=", rx1397_pos) - debug_1071: - .return (rx1397_cur) - rx1397_restart: -.annotate 'line', 567 - if_null rx1397_debug, debug_1072 - rx1397_cur."!cursor_debug"("NEXT ", "codeblock") - debug_1072: - rx1397_fail: - (rx1397_rep, rx1397_pos, $I10, $P10) = rx1397_cur."!mark_fail"(0) - lt rx1397_pos, -1, rx1397_done - eq rx1397_pos, -1, rx1397_fail - jump $I10 - rx1397_done: - rx1397_cur."!cursor_fail"() - if_null rx1397_debug, debug_1073 - rx1397_cur."!cursor_debug"("FAIL ", "codeblock") - debug_1073: - .return (rx1397_cur) + rx1426_cur."!cursor_pass"(rx1426_pos, "codeblock") + if_null rx1426_debug, debug_1085 + rx1426_cur."!cursor_debug"("PASS", "codeblock", " at pos=", rx1426_pos) + debug_1085: + .return (rx1426_cur) + rx1426_restart: +.annotate 'line', 574 + if_null rx1426_debug, debug_1086 + rx1426_cur."!cursor_debug"("NEXT", "codeblock") + debug_1086: + rx1426_fail: + (rx1426_rep, rx1426_pos, $I10, $P10) = rx1426_cur."!mark_fail"(0) + lt rx1426_pos, -1, rx1426_done + eq rx1426_pos, -1, rx1426_fail + jump $I10 + rx1426_done: + rx1426_cur."!cursor_fail"() + if_null rx1426_debug, debug_1087 + rx1426_cur."!cursor_debug"("FAIL", "codeblock") + debug_1087: + .return (rx1426_cur) .return () .end .namespace ["NQP";"Regex"] -.sub "!PREFIX__codeblock" :subid("369_1282016529.10767") :method -.annotate 'line', 567 - $P1399 = self."!PREFIX__!subrule"("LANG", "") - new $P1400, "ResizablePMCArray" - push $P1400, $P1399 - .return ($P1400) +.sub "!PREFIX__codeblock" :subid("375_1284728478.15265") :method +.annotate 'line', 574 + $P1428 = self."!PREFIX__!subrule"("LANG", "") + new $P1429, "ResizablePMCArray" + push $P1429, $P1428 + .return ($P1429) .end .namespace ["NQP";"Grammar"] -.sub "_block1403" :load :anon :subid("370_1282016529.10767") +.sub "_block1432" :load :anon :subid("376_1284728478.15265") .annotate 'line', 4 - .const 'Sub' $P1405 = "11_1282016529.10767" - $P1406 = $P1405() - .return ($P1406) + .const 'Sub' $P1434 = "11_1284728478.15265" + $P1435 = $P1434() + .return ($P1435) .end .namespace [] -.sub "_block1424" :load :anon :subid("371_1282016529.10767") +.sub "_block1453" :load :anon :subid("377_1284728478.15265") .annotate 'line', 1 - .const 'Sub' $P1426 = "10_1282016529.10767" - $P1427 = $P1426() - .return ($P1427) + .const 'Sub' $P1455 = "10_1284728478.15265" + $P1456 = $P1455() + .return ($P1456) .end ### .include 'gen/nqp-actions.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016534.58916") +.sub "_block11" :anon :subid("10_1284728484.24945") .annotate 'line', 0 get_hll_global $P14, ["NQP";"Actions"], "_block13" capture_lex $P14 @@ -20219,265 +20469,269 @@ .annotate 'line', 3 get_hll_global $P14, ["NQP";"Actions"], "_block13" capture_lex $P14 - $P2452 = $P14() + $P2558 = $P14() .annotate 'line', 1 - .return ($P2452) - .const 'Sub' $P2454 = "143_1282016534.58916" - .return ($P2454) + .return ($P2558) + .const 'Sub' $P2560 = "148_1284728484.24945" + .return ($P2560) .end .namespace [] -.sub "" :load :init :subid("post144") :outer("10_1282016534.58916") +.sub "" :load :init :subid("post149") :outer("10_1284728484.24945") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016534.58916" + .const 'Sub' $P12 = "10_1284728484.24945" .local pmc block set block, $P12 - $P2457 = get_root_global ["parrot"], "P6metaclass" - $P2457."new_class"("NQP::Actions", "HLL::Actions" :named("parent")) + $P2563 = get_root_global ["parrot"], "P6metaclass" + $P2563."new_class"("NQP::Actions", "HLL::Actions" :named("parent")) .end .namespace ["NQP";"Actions"] -.sub "_block13" :subid("11_1282016534.58916") :outer("10_1282016534.58916") +.sub "_block13" :subid("11_1284728484.24945") :outer("10_1284728484.24945") .annotate 'line', 3 - .const 'Sub' $P2448 = "142_1282016534.58916" - capture_lex $P2448 - get_hll_global $P2331, ["NQP";"RegexActions"], "_block2330" + .const 'Sub' $P2554 = "147_1284728484.24945" + capture_lex $P2554 + get_hll_global $P2437, ["NQP";"RegexActions"], "_block2436" + capture_lex $P2437 + .const 'Sub' $P2426 = "137_1284728484.24945" + capture_lex $P2426 + .const 'Sub' $P2419 = "136_1284728484.24945" + capture_lex $P2419 + .const 'Sub' $P2412 = "135_1284728484.24945" + capture_lex $P2412 + .const 'Sub' $P2405 = "134_1284728484.24945" + capture_lex $P2405 + .const 'Sub' $P2392 = "133_1284728484.24945" + capture_lex $P2392 + .const 'Sub' $P2382 = "132_1284728484.24945" + capture_lex $P2382 + .const 'Sub' $P2372 = "131_1284728484.24945" + capture_lex $P2372 + .const 'Sub' $P2362 = "130_1284728484.24945" + capture_lex $P2362 + .const 'Sub' $P2355 = "129_1284728484.24945" + capture_lex $P2355 + .const 'Sub' $P2341 = "128_1284728484.24945" + capture_lex $P2341 + .const 'Sub' $P2331 = "127_1284728484.24945" capture_lex $P2331 - .const 'Sub' $P2320 = "132_1282016534.58916" - capture_lex $P2320 - .const 'Sub' $P2313 = "131_1282016534.58916" - capture_lex $P2313 - .const 'Sub' $P2306 = "130_1282016534.58916" - capture_lex $P2306 - .const 'Sub' $P2299 = "129_1282016534.58916" - capture_lex $P2299 - .const 'Sub' $P2286 = "128_1282016534.58916" - capture_lex $P2286 - .const 'Sub' $P2276 = "127_1282016534.58916" - capture_lex $P2276 - .const 'Sub' $P2266 = "126_1282016534.58916" - capture_lex $P2266 - .const 'Sub' $P2256 = "125_1282016534.58916" - capture_lex $P2256 - .const 'Sub' $P2249 = "124_1282016534.58916" - capture_lex $P2249 - .const 'Sub' $P2235 = "123_1282016534.58916" - capture_lex $P2235 - .const 'Sub' $P2225 = "122_1282016534.58916" - capture_lex $P2225 - .const 'Sub' $P2188 = "121_1282016534.58916" - capture_lex $P2188 - .const 'Sub' $P2174 = "120_1282016534.58916" - capture_lex $P2174 - .const 'Sub' $P2164 = "119_1282016534.58916" - capture_lex $P2164 - .const 'Sub' $P2154 = "118_1282016534.58916" - capture_lex $P2154 - .const 'Sub' $P2144 = "117_1282016534.58916" - capture_lex $P2144 - .const 'Sub' $P2134 = "116_1282016534.58916" - capture_lex $P2134 - .const 'Sub' $P2124 = "115_1282016534.58916" - capture_lex $P2124 - .const 'Sub' $P2096 = "114_1282016534.58916" - capture_lex $P2096 - .const 'Sub' $P2079 = "113_1282016534.58916" - capture_lex $P2079 - .const 'Sub' $P2069 = "112_1282016534.58916" - capture_lex $P2069 - .const 'Sub' $P2056 = "111_1282016534.58916" - capture_lex $P2056 - .const 'Sub' $P2043 = "110_1282016534.58916" - capture_lex $P2043 - .const 'Sub' $P2030 = "109_1282016534.58916" - capture_lex $P2030 - .const 'Sub' $P2020 = "108_1282016534.58916" - capture_lex $P2020 - .const 'Sub' $P1991 = "107_1282016534.58916" - capture_lex $P1991 - .const 'Sub' $P1967 = "106_1282016534.58916" - capture_lex $P1967 - .const 'Sub' $P1957 = "105_1282016534.58916" - capture_lex $P1957 - .const 'Sub' $P1947 = "104_1282016534.58916" - capture_lex $P1947 - .const 'Sub' $P1920 = "103_1282016534.58916" - capture_lex $P1920 - .const 'Sub' $P1902 = "102_1282016534.58916" - capture_lex $P1902 - .const 'Sub' $P1892 = "101_1282016534.58916" - capture_lex $P1892 - .const 'Sub' $P1788 = "98_1282016534.58916" + .const 'Sub' $P2294 = "126_1284728484.24945" + capture_lex $P2294 + .const 'Sub' $P2280 = "125_1284728484.24945" + capture_lex $P2280 + .const 'Sub' $P2270 = "124_1284728484.24945" + capture_lex $P2270 + .const 'Sub' $P2260 = "123_1284728484.24945" + capture_lex $P2260 + .const 'Sub' $P2250 = "122_1284728484.24945" + capture_lex $P2250 + .const 'Sub' $P2240 = "121_1284728484.24945" + capture_lex $P2240 + .const 'Sub' $P2230 = "120_1284728484.24945" + capture_lex $P2230 + .const 'Sub' $P2202 = "119_1284728484.24945" + capture_lex $P2202 + .const 'Sub' $P2185 = "118_1284728484.24945" + capture_lex $P2185 + .const 'Sub' $P2175 = "117_1284728484.24945" + capture_lex $P2175 + .const 'Sub' $P2162 = "116_1284728484.24945" + capture_lex $P2162 + .const 'Sub' $P2149 = "115_1284728484.24945" + capture_lex $P2149 + .const 'Sub' $P2136 = "114_1284728484.24945" + capture_lex $P2136 + .const 'Sub' $P2126 = "113_1284728484.24945" + capture_lex $P2126 + .const 'Sub' $P2097 = "112_1284728484.24945" + capture_lex $P2097 + .const 'Sub' $P2073 = "111_1284728484.24945" + capture_lex $P2073 + .const 'Sub' $P2063 = "110_1284728484.24945" + capture_lex $P2063 + .const 'Sub' $P2053 = "109_1284728484.24945" + capture_lex $P2053 + .const 'Sub' $P2026 = "108_1284728484.24945" + capture_lex $P2026 + .const 'Sub' $P2008 = "107_1284728484.24945" + capture_lex $P2008 + .const 'Sub' $P1998 = "106_1284728484.24945" + capture_lex $P1998 + .const 'Sub' $P1894 = "103_1284728484.24945" + capture_lex $P1894 + .const 'Sub' $P1884 = "102_1284728484.24945" + capture_lex $P1884 + .const 'Sub' $P1855 = "101_1284728484.24945" + capture_lex $P1855 + .const 'Sub' $P1813 = "100_1284728484.24945" + capture_lex $P1813 + .const 'Sub' $P1797 = "99_1284728484.24945" + capture_lex $P1797 + .const 'Sub' $P1788 = "98_1284728484.24945" capture_lex $P1788 - .const 'Sub' $P1778 = "97_1282016534.58916" - capture_lex $P1778 - .const 'Sub' $P1749 = "96_1282016534.58916" - capture_lex $P1749 - .const 'Sub' $P1707 = "95_1282016534.58916" - capture_lex $P1707 - .const 'Sub' $P1691 = "94_1282016534.58916" - capture_lex $P1691 - .const 'Sub' $P1682 = "93_1282016534.58916" - capture_lex $P1682 - .const 'Sub' $P1650 = "92_1282016534.58916" - capture_lex $P1650 - .const 'Sub' $P1551 = "89_1282016534.58916" - capture_lex $P1551 - .const 'Sub' $P1534 = "88_1282016534.58916" - capture_lex $P1534 - .const 'Sub' $P1514 = "87_1282016534.58916" - capture_lex $P1514 - .const 'Sub' $P1402 = "84_1282016534.58916" - capture_lex $P1402 - .const 'Sub' $P1345 = "80_1282016534.58916" - capture_lex $P1345 - .const 'Sub' $P1300 = "78_1282016534.58916" - capture_lex $P1300 - .const 'Sub' $P1250 = "76_1282016534.58916" + .const 'Sub' $P1756 = "97_1284728484.24945" + capture_lex $P1756 + .const 'Sub' $P1657 = "94_1284728484.24945" + capture_lex $P1657 + .const 'Sub' $P1615 = "92_1284728484.24945" + capture_lex $P1615 + .const 'Sub' $P1605 = "91_1284728484.24945" + capture_lex $P1605 + .const 'Sub' $P1588 = "90_1284728484.24945" + capture_lex $P1588 + .const 'Sub' $P1568 = "89_1284728484.24945" + capture_lex $P1568 + .const 'Sub' $P1456 = "86_1284728484.24945" + capture_lex $P1456 + .const 'Sub' $P1387 = "82_1284728484.24945" + capture_lex $P1387 + .const 'Sub' $P1322 = "79_1284728484.24945" + capture_lex $P1322 + .const 'Sub' $P1250 = "76_1284728484.24945" capture_lex $P1250 - .const 'Sub' $P1240 = "75_1282016534.58916" + .const 'Sub' $P1240 = "75_1284728484.24945" capture_lex $P1240 - .const 'Sub' $P1230 = "74_1282016534.58916" + .const 'Sub' $P1230 = "74_1284728484.24945" capture_lex $P1230 - .const 'Sub' $P1159 = "72_1282016534.58916" + .const 'Sub' $P1159 = "72_1284728484.24945" capture_lex $P1159 - .const 'Sub' $P1149 = "71_1282016534.58916" + .const 'Sub' $P1149 = "71_1284728484.24945" capture_lex $P1149 - .const 'Sub' $P1132 = "70_1282016534.58916" + .const 'Sub' $P1132 = "70_1284728484.24945" capture_lex $P1132 - .const 'Sub' $P1115 = "69_1282016534.58916" + .const 'Sub' $P1115 = "69_1284728484.24945" capture_lex $P1115 - .const 'Sub' $P1098 = "68_1282016534.58916" + .const 'Sub' $P1098 = "68_1284728484.24945" capture_lex $P1098 - .const 'Sub' $P1088 = "67_1282016534.58916" + .const 'Sub' $P1088 = "67_1284728484.24945" capture_lex $P1088 - .const 'Sub' $P1078 = "66_1282016534.58916" + .const 'Sub' $P1078 = "66_1284728484.24945" capture_lex $P1078 - .const 'Sub' $P1068 = "65_1282016534.58916" + .const 'Sub' $P1068 = "65_1284728484.24945" capture_lex $P1068 - .const 'Sub' $P1044 = "64_1282016534.58916" + .const 'Sub' $P1044 = "64_1284728484.24945" capture_lex $P1044 - .const 'Sub' $P991 = "63_1282016534.58916" + .const 'Sub' $P991 = "63_1284728484.24945" capture_lex $P991 - .const 'Sub' $P981 = "62_1282016534.58916" + .const 'Sub' $P981 = "62_1284728484.24945" capture_lex $P981 - .const 'Sub' $P892 = "60_1282016534.58916" + .const 'Sub' $P892 = "60_1284728484.24945" capture_lex $P892 - .const 'Sub' $P866 = "59_1282016534.58916" + .const 'Sub' $P866 = "59_1284728484.24945" capture_lex $P866 - .const 'Sub' $P850 = "58_1282016534.58916" + .const 'Sub' $P850 = "58_1284728484.24945" capture_lex $P850 - .const 'Sub' $P840 = "57_1282016534.58916" + .const 'Sub' $P840 = "57_1284728484.24945" capture_lex $P840 - .const 'Sub' $P830 = "56_1282016534.58916" + .const 'Sub' $P830 = "56_1284728484.24945" capture_lex $P830 - .const 'Sub' $P820 = "55_1282016534.58916" + .const 'Sub' $P820 = "55_1284728484.24945" capture_lex $P820 - .const 'Sub' $P810 = "54_1282016534.58916" + .const 'Sub' $P810 = "54_1284728484.24945" capture_lex $P810 - .const 'Sub' $P800 = "53_1282016534.58916" + .const 'Sub' $P800 = "53_1284728484.24945" capture_lex $P800 - .const 'Sub' $P790 = "52_1282016534.58916" + .const 'Sub' $P790 = "52_1284728484.24945" capture_lex $P790 - .const 'Sub' $P780 = "51_1282016534.58916" + .const 'Sub' $P780 = "51_1284728484.24945" capture_lex $P780 - .const 'Sub' $P770 = "50_1282016534.58916" + .const 'Sub' $P770 = "50_1284728484.24945" capture_lex $P770 - .const 'Sub' $P760 = "49_1282016534.58916" + .const 'Sub' $P760 = "49_1284728484.24945" capture_lex $P760 - .const 'Sub' $P750 = "48_1282016534.58916" + .const 'Sub' $P750 = "48_1284728484.24945" capture_lex $P750 - .const 'Sub' $P740 = "47_1282016534.58916" + .const 'Sub' $P740 = "47_1284728484.24945" capture_lex $P740 - .const 'Sub' $P730 = "46_1282016534.58916" + .const 'Sub' $P730 = "46_1284728484.24945" capture_lex $P730 - .const 'Sub' $P720 = "45_1282016534.58916" + .const 'Sub' $P720 = "45_1284728484.24945" capture_lex $P720 - .const 'Sub' $P702 = "44_1282016534.58916" + .const 'Sub' $P702 = "44_1284728484.24945" capture_lex $P702 - .const 'Sub' $P667 = "43_1282016534.58916" + .const 'Sub' $P667 = "43_1284728484.24945" capture_lex $P667 - .const 'Sub' $P651 = "42_1282016534.58916" + .const 'Sub' $P651 = "42_1284728484.24945" capture_lex $P651 - .const 'Sub' $P630 = "41_1282016534.58916" + .const 'Sub' $P630 = "41_1284728484.24945" capture_lex $P630 - .const 'Sub' $P610 = "40_1282016534.58916" + .const 'Sub' $P610 = "40_1284728484.24945" capture_lex $P610 - .const 'Sub' $P597 = "39_1282016534.58916" + .const 'Sub' $P597 = "39_1284728484.24945" capture_lex $P597 - .const 'Sub' $P571 = "38_1282016534.58916" + .const 'Sub' $P571 = "38_1284728484.24945" capture_lex $P571 - .const 'Sub' $P535 = "37_1282016534.58916" + .const 'Sub' $P535 = "37_1284728484.24945" capture_lex $P535 - .const 'Sub' $P518 = "36_1282016534.58916" + .const 'Sub' $P518 = "36_1284728484.24945" capture_lex $P518 - .const 'Sub' $P504 = "35_1282016534.58916" + .const 'Sub' $P504 = "35_1284728484.24945" capture_lex $P504 - .const 'Sub' $P451 = "33_1282016534.58916" + .const 'Sub' $P451 = "33_1284728484.24945" capture_lex $P451 - .const 'Sub' $P440 = "32_1282016534.58916" + .const 'Sub' $P440 = "32_1284728484.24945" capture_lex $P440 - .const 'Sub' $P427 = "31_1282016534.58916" + .const 'Sub' $P427 = "31_1284728484.24945" capture_lex $P427 - .const 'Sub' $P407 = "30_1282016534.58916" + .const 'Sub' $P407 = "30_1284728484.24945" capture_lex $P407 - .const 'Sub' $P397 = "29_1282016534.58916" + .const 'Sub' $P397 = "29_1284728484.24945" capture_lex $P397 - .const 'Sub' $P387 = "28_1282016534.58916" + .const 'Sub' $P387 = "28_1284728484.24945" capture_lex $P387 - .const 'Sub' $P371 = "27_1282016534.58916" + .const 'Sub' $P371 = "27_1284728484.24945" capture_lex $P371 - .const 'Sub' $P288 = "25_1282016534.58916" + .const 'Sub' $P288 = "25_1284728484.24945" capture_lex $P288 - .const 'Sub' $P245 = "23_1282016534.58916" + .const 'Sub' $P245 = "23_1284728484.24945" capture_lex $P245 - .const 'Sub' $P213 = "22_1282016534.58916" + .const 'Sub' $P213 = "22_1284728484.24945" capture_lex $P213 - .const 'Sub' $P180 = "21_1282016534.58916" + .const 'Sub' $P180 = "21_1284728484.24945" capture_lex $P180 - .const 'Sub' $P170 = "20_1282016534.58916" + .const 'Sub' $P170 = "20_1284728484.24945" capture_lex $P170 - .const 'Sub' $P151 = "19_1282016534.58916" + .const 'Sub' $P151 = "19_1284728484.24945" capture_lex $P151 - .const 'Sub' $P100 = "18_1282016534.58916" + .const 'Sub' $P100 = "18_1284728484.24945" capture_lex $P100 - .const 'Sub' $P84 = "17_1282016534.58916" + .const 'Sub' $P84 = "17_1284728484.24945" capture_lex $P84 - .const 'Sub' $P63 = "16_1282016534.58916" + .const 'Sub' $P63 = "16_1284728484.24945" capture_lex $P63 - .const 'Sub' $P27 = "13_1282016534.58916" + .const 'Sub' $P27 = "13_1284728484.24945" capture_lex $P27 - .const 'Sub' $P16 = "12_1282016534.58916" + .const 'Sub' $P16 = "12_1284728484.24945" capture_lex $P16 get_global $P15, "@BLOCK" - unless_null $P15, vivify_147 + unless_null $P15, vivify_152 $P15 = root_new ['parrot';'ResizablePMCArray'] set_global "@BLOCK", $P15 - vivify_147: + vivify_152: .annotate 'line', 9 - .const 'Sub' $P16 = "12_1282016534.58916" + .const 'Sub' $P16 = "12_1284728484.24945" newclosure $P26, $P16 .lex "xblock_immediate", $P26 .annotate 'line', 14 - .const 'Sub' $P27 = "13_1282016534.58916" + .const 'Sub' $P27 = "13_1284728484.24945" newclosure $P62, $P27 .lex "block_immediate", $P62 .annotate 'line', 24 - .const 'Sub' $P63 = "16_1282016534.58916" + .const 'Sub' $P63 = "16_1284728484.24945" newclosure $P83, $P63 .lex "vivitype", $P83 .annotate 'line', 43 - .const 'Sub' $P84 = "17_1282016534.58916" + .const 'Sub' $P84 = "17_1284728484.24945" newclosure $P99, $P84 .lex "colonpair_str", $P99 .annotate 'line', 223 - .const 'Sub' $P100 = "18_1282016534.58916" + .const 'Sub' $P100 = "18_1284728484.24945" newclosure $P150, $P100 .lex "push_block_handler", $P150 -.annotate 'line', 835 - .const 'Sub' $P151 = "19_1282016534.58916" +.annotate 'line', 861 + .const 'Sub' $P151 = "19_1284728484.24945" newclosure $P165, $P151 .lex "control", $P165 .annotate 'line', 3 @@ -20496,52 +20750,52 @@ find_lex $P212, "colonpair_str" .annotate 'line', 216 find_lex $P650, "push_block_handler" -.annotate 'line', 826 - find_lex $P2298, "control" -.annotate 'line', 853 - get_hll_global $P2331, ["NQP";"RegexActions"], "_block2330" - capture_lex $P2331 - $P2442 = $P2331() +.annotate 'line', 852 + find_lex $P2404, "control" +.annotate 'line', 879 + get_hll_global $P2437, ["NQP";"RegexActions"], "_block2436" + capture_lex $P2437 + $P2548 = $P2437() .annotate 'line', 3 - .return ($P2442) - .const 'Sub' $P2444 = "141_1282016534.58916" - .return ($P2444) + .return ($P2548) + .const 'Sub' $P2550 = "146_1284728484.24945" + .return ($P2550) .end .namespace ["NQP";"Actions"] -.sub "" :load :init :subid("post145") :outer("11_1282016534.58916") +.sub "" :load :init :subid("post150") :outer("11_1284728484.24945") .annotate 'line', 3 get_hll_global $P14, ["NQP";"Actions"], "_block13" .local pmc block set block, $P14 .annotate 'line', 5 - .const 'Sub' $P2448 = "142_1282016534.58916" - capture_lex $P2448 - $P2448() - $P2451 = get_root_global ["parrot"], "P6metaclass" - $P2451."new_class"("NQP::RegexActions", "Regex::P6Regex::Actions" :named("parent")) + .const 'Sub' $P2554 = "147_1284728484.24945" + capture_lex $P2554 + $P2554() + $P2557 = get_root_global ["parrot"], "P6metaclass" + $P2557."new_class"("NQP::RegexActions", "Regex::P6Regex::Actions" :named("parent")) .end .namespace ["NQP";"Actions"] -.sub "_block2447" :anon :subid("142_1282016534.58916") :outer("11_1282016534.58916") +.sub "_block2553" :anon :subid("147_1284728484.24945") :outer("11_1284728484.24945") .annotate 'line', 6 - get_global $P2449, "@BLOCK" - unless_null $P2449, vivify_146 - $P2449 = root_new ['parrot';'ResizablePMCArray'] - set_global "@BLOCK", $P2449 - vivify_146: - $P2450 = new ['ResizablePMCArray'] - set_global "@BLOCK", $P2450 + get_global $P2555, "@BLOCK" + unless_null $P2555, vivify_151 + $P2555 = root_new ['parrot';'ResizablePMCArray'] + set_global "@BLOCK", $P2555 + vivify_151: + $P2556 = new ['ResizablePMCArray'] + set_global "@BLOCK", $P2556 .annotate 'line', 5 - .return ($P2450) + .return ($P2556) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "xblock_immediate" :subid("12_1282016534.58916") :outer("11_1282016534.58916") +.sub "xblock_immediate" :subid("12_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_19 .annotate 'line', 9 new $P18, 'ExceptionHandler' @@ -20551,19 +20805,19 @@ .lex "$xblock", param_19 .annotate 'line', 10 find_lex $P20, "$xblock" - unless_null $P20, vivify_148 + unless_null $P20, vivify_153 $P20 = root_new ['parrot';'ResizablePMCArray'] - vivify_148: + vivify_153: set $P21, $P20[1] - unless_null $P21, vivify_149 + unless_null $P21, vivify_154 new $P21, "Undef" - vivify_149: + vivify_154: $P22 = "block_immediate"($P21) find_lex $P23, "$xblock" - unless_null $P23, vivify_150 + unless_null $P23, vivify_155 $P23 = root_new ['parrot';'ResizablePMCArray'] store_lex "$xblock", $P23 - vivify_150: + vivify_155: set $P23[1], $P22 find_lex $P24, "$xblock" .annotate 'line', 9 @@ -20578,10 +20832,10 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "block_immediate" :subid("13_1282016534.58916") :outer("11_1282016534.58916") +.sub "block_immediate" :subid("13_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_30 .annotate 'line', 14 - .const 'Sub' $P40 = "14_1282016534.58916" + .const 'Sub' $P40 = "14_1284728484.24945" capture_lex $P40 new $P29, 'ExceptionHandler' set_addr $P29, control_28 @@ -20603,7 +20857,7 @@ set $P33, $P38 unless_34_end: if $P33, unless_32_end - .const 'Sub' $P40 = "14_1282016534.58916" + .const 'Sub' $P40 = "14_1284728484.24945" capture_lex $P40 $P40() unless_32_end: @@ -20620,9 +20874,9 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "_block39" :anon :subid("14_1282016534.58916") :outer("13_1282016534.58916") +.sub "_block39" :anon :subid("14_1284728484.24945") :outer("13_1284728484.24945") .annotate 'line', 16 - .const 'Sub' $P51 = "15_1282016534.58916" + .const 'Sub' $P51 = "15_1284728484.24945" capture_lex $P51 .annotate 'line', 17 new $P41, "Undef" @@ -20635,7 +20889,7 @@ find_lex $P46, "$block" $P47 = $P46."list"() defined $I48, $P47 - unless $I48, for_undef_151 + unless $I48, for_undef_156 iter $P45, $P47 new $P57, 'ExceptionHandler' set_addr $P57, loop56_handler @@ -20645,7 +20899,7 @@ unless $P45, loop56_done shift $P49, $P45 loop56_redo: - .const 'Sub' $P51 = "15_1282016534.58916" + .const 'Sub' $P51 = "15_1284728484.24945" capture_lex $P51 $P51($P49) loop56_next: @@ -20658,7 +20912,7 @@ eq $P58, .CONTROL_LOOP_REDO, loop56_redo loop56_done: pop_eh - for_undef_151: + for_undef_156: .annotate 'line', 19 find_lex $P59, "$stmts" store_lex "$block", $P59 @@ -20668,7 +20922,7 @@ .namespace ["NQP";"Actions"] -.sub "_block50" :anon :subid("15_1282016534.58916") :outer("14_1282016534.58916") +.sub "_block50" :anon :subid("15_1284728484.24945") :outer("14_1284728484.24945") .param pmc param_52 .annotate 'line', 18 .lex "$_", param_52 @@ -20681,7 +20935,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "vivitype" :subid("16_1282016534.58916") :outer("11_1282016534.58916") +.sub "vivitype" :subid("16_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_66 .annotate 'line', 24 new $P65, 'ExceptionHandler' @@ -20730,7 +20984,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "colonpair_str" :subid("17_1282016534.58916") :outer("11_1282016534.58916") +.sub "colonpair_str" :subid("17_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_87 .annotate 'line', 43 new $P86, 'ExceptionHandler' @@ -20769,7 +21023,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "push_block_handler" :subid("18_1282016534.58916") :outer("11_1282016534.58916") +.sub "push_block_handler" :subid("18_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_103 .param pmc param_104 .annotate 'line', 223 @@ -20781,24 +21035,24 @@ .lex "$block", param_104 .annotate 'line', 224 get_global $P106, "@BLOCK" - unless_null $P106, vivify_152 + unless_null $P106, vivify_157 $P106 = root_new ['parrot';'ResizablePMCArray'] - vivify_152: + vivify_157: set $P107, $P106[0] - unless_null $P107, vivify_153 + unless_null $P107, vivify_158 new $P107, "Undef" - vivify_153: + vivify_158: $P108 = $P107."handlers"() if $P108, unless_105_end .annotate 'line', 225 get_global $P109, "@BLOCK" - unless_null $P109, vivify_154 + unless_null $P109, vivify_159 $P109 = root_new ['parrot';'ResizablePMCArray'] - vivify_154: + vivify_159: set $P110, $P109[0] - unless_null $P110, vivify_155 + unless_null $P110, vivify_160 new $P110, "Undef" - vivify_155: + vivify_160: new $P111, "ResizablePMCArray" $P110."handlers"($P111) unless_105_end: @@ -20839,13 +21093,13 @@ $P128."blocktype"("declaration") .annotate 'line', 240 get_global $P129, "@BLOCK" - unless_null $P129, vivify_156 + unless_null $P129, vivify_161 $P129 = root_new ['parrot';'ResizablePMCArray'] - vivify_156: + vivify_161: set $P130, $P129[0] - unless_null $P130, vivify_157 + unless_null $P130, vivify_162 new $P130, "Undef" - vivify_157: + vivify_162: $P131 = $P130."handlers"() .annotate 'line', 241 get_hll_global $P132, ["PAST"], "Control" @@ -20887,28 +21141,28 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "control" :subid("19_1282016534.58916") :outer("11_1282016534.58916") +.sub "control" :subid("19_1284728484.24945") :outer("11_1284728484.24945") .param pmc param_154 .param pmc param_155 -.annotate 'line', 835 +.annotate 'line', 861 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', 836 +.annotate 'line', 862 find_lex $P156, "$/" get_hll_global $P157, ["PAST"], "Op" find_lex $P158, "$/" -.annotate 'line', 840 +.annotate 'line', 866 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', 836 +.annotate 'line', 862 $P163 = $P156."!make"($P162) -.annotate 'line', 835 +.annotate 'line', 861 .return ($P163) control_152: .local pmc exception @@ -20920,7 +21174,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "TOP" :subid("20_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "TOP" :subid("20_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_173 .annotate 'line', 33 new $P172, 'ExceptionHandler' @@ -20931,13 +21185,13 @@ .lex "$/", param_173 find_lex $P174, "$/" find_lex $P175, "$/" - unless_null $P175, vivify_158 + unless_null $P175, vivify_163 $P175 = root_new ['parrot';'Hash'] - vivify_158: + vivify_163: set $P176, $P175["comp_unit"] - unless_null $P176, vivify_159 + unless_null $P176, vivify_164 new $P176, "Undef" - vivify_159: + vivify_164: $P177 = $P176."ast"() $P178 = $P174."!make"($P177) .return ($P178) @@ -20951,7 +21205,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "deflongname" :subid("21_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "deflongname" :subid("21_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_183 .annotate 'line', 35 new $P182, 'ExceptionHandler' @@ -20964,13 +21218,13 @@ find_lex $P184, "$/" .annotate 'line', 37 find_lex $P187, "$/" - unless_null $P187, vivify_160 + unless_null $P187, vivify_165 $P187 = root_new ['parrot';'Hash'] - vivify_160: + vivify_165: set $P188, $P187["colonpair"] - unless_null $P188, vivify_161 + unless_null $P188, vivify_166 new $P188, "Undef" - vivify_161: + vivify_166: if $P188, if_186 .annotate 'line', 39 find_lex $P208, "$/" @@ -20981,46 +21235,46 @@ goto if_186_end if_186: find_lex $P189, "$/" - unless_null $P189, vivify_162 + unless_null $P189, vivify_167 $P189 = root_new ['parrot';'Hash'] - vivify_162: + vivify_167: set $P190, $P189["identifier"] - unless_null $P190, vivify_163 + unless_null $P190, vivify_168 new $P190, "Undef" - vivify_163: + vivify_168: set $S191, $P190 new $P192, 'String' set $P192, $S191 concat $P193, $P192, ":" find_lex $P194, "$/" - unless_null $P194, vivify_164 + unless_null $P194, vivify_169 $P194 = root_new ['parrot';'Hash'] - vivify_164: + vivify_169: set $P195, $P194["colonpair"] - unless_null $P195, vivify_165 + unless_null $P195, vivify_170 $P195 = root_new ['parrot';'ResizablePMCArray'] - vivify_165: + vivify_170: set $P196, $P195[0] - unless_null $P196, vivify_166 + unless_null $P196, vivify_171 new $P196, "Undef" - vivify_166: + vivify_171: $P197 = $P196."ast"() $S198 = $P197."named"() concat $P199, $P193, $S198 concat $P200, $P199, "<" .annotate 'line', 38 find_lex $P201, "$/" - unless_null $P201, vivify_167 + unless_null $P201, vivify_172 $P201 = root_new ['parrot';'Hash'] - vivify_167: + vivify_172: set $P202, $P201["colonpair"] - unless_null $P202, vivify_168 + unless_null $P202, vivify_173 $P202 = root_new ['parrot';'ResizablePMCArray'] - vivify_168: + vivify_173: set $P203, $P202[0] - unless_null $P203, vivify_169 + unless_null $P203, vivify_174 new $P203, "Undef" - vivify_169: + vivify_174: $P204 = $P203."ast"() $S205 = "colonpair_str"($P204) concat $P206, $P200, $S205 @@ -21041,7 +21295,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "comp_unit" :subid("22_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "comp_unit" :subid("22_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_216 .annotate 'line', 49 new $P215, 'ExceptionHandler' @@ -21058,13 +21312,13 @@ .lex "$unit", $P218 .annotate 'line', 50 find_lex $P219, "$/" - unless_null $P219, vivify_170 + unless_null $P219, vivify_175 $P219 = root_new ['parrot';'Hash'] - vivify_170: + vivify_175: set $P220, $P219["statementlist"] - unless_null $P220, vivify_171 + unless_null $P220, vivify_176 new $P220, "Undef" - vivify_171: + vivify_176: $P221 = $P220."ast"() store_lex "$mainline", $P221 .annotate 'line', 51 @@ -21116,10 +21370,10 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statementlist" :subid("23_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statementlist" :subid("23_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_248 .annotate 'line', 76 - .const 'Sub' $P262 = "24_1282016534.58916" + .const 'Sub' $P262 = "24_1284728484.24945" capture_lex $P262 new $P247, 'ExceptionHandler' set_addr $P247, control_246 @@ -21136,25 +21390,25 @@ store_lex "$past", $P252 .annotate 'line', 78 find_lex $P254, "$/" - unless_null $P254, vivify_172 + unless_null $P254, vivify_177 $P254 = root_new ['parrot';'Hash'] - vivify_172: + vivify_177: set $P255, $P254["statement"] - unless_null $P255, vivify_173 + unless_null $P255, vivify_178 new $P255, "Undef" - vivify_173: + vivify_178: unless $P255, if_253_end .annotate 'line', 79 find_lex $P257, "$/" - unless_null $P257, vivify_174 + unless_null $P257, vivify_179 $P257 = root_new ['parrot';'Hash'] - vivify_174: + vivify_179: set $P258, $P257["statement"] - unless_null $P258, vivify_175 + unless_null $P258, vivify_180 new $P258, "Undef" - vivify_175: + vivify_180: defined $I259, $P258 - unless $I259, for_undef_176 + unless $I259, for_undef_181 iter $P256, $P258 new $P282, 'ExceptionHandler' set_addr $P282, loop281_handler @@ -21164,7 +21418,7 @@ unless $P256, loop281_done shift $P260, $P256 loop281_redo: - .const 'Sub' $P262 = "24_1282016534.58916" + .const 'Sub' $P262 = "24_1284728484.24945" capture_lex $P262 $P262($P260) loop281_next: @@ -21177,7 +21431,7 @@ eq $P283, .CONTROL_LOOP_REDO, loop281_redo loop281_done: pop_eh - for_undef_176: + for_undef_181: if_253_end: .annotate 'line', 86 find_lex $P284, "$/" @@ -21194,7 +21448,7 @@ .namespace ["NQP";"Actions"] -.sub "_block261" :anon :subid("24_1282016534.58916") :outer("23_1282016534.58916") +.sub "_block261" :anon :subid("24_1284728484.24945") :outer("23_1284728484.24945") .param pmc param_264 .annotate 'line', 80 new $P263, "Undef" @@ -21205,34 +21459,34 @@ store_lex "$ast", $P266 .annotate 'line', 81 find_lex $P268, "$ast" - unless_null $P268, vivify_177 + unless_null $P268, vivify_182 $P268 = root_new ['parrot';'Hash'] - vivify_177: + vivify_182: set $P269, $P268["sink"] - unless_null $P269, vivify_178 + unless_null $P269, vivify_183 new $P269, "Undef" - vivify_178: + vivify_183: defined $I270, $P269 unless $I270, if_267_end find_lex $P271, "$ast" - unless_null $P271, vivify_179 + unless_null $P271, vivify_184 $P271 = root_new ['parrot';'Hash'] - vivify_179: + vivify_184: set $P272, $P271["sink"] - unless_null $P272, vivify_180 + unless_null $P272, vivify_185 new $P272, "Undef" - vivify_180: + vivify_185: store_lex "$ast", $P272 if_267_end: .annotate 'line', 82 find_lex $P274, "$ast" - unless_null $P274, vivify_181 + unless_null $P274, vivify_186 $P274 = root_new ['parrot';'Hash'] - vivify_181: + vivify_186: set $P275, $P274["bareblock"] - unless_null $P275, vivify_182 + unless_null $P275, vivify_187 new $P275, "Undef" - vivify_182: + vivify_187: unless $P275, if_273_end find_lex $P276, "$ast" $P277 = "block_immediate"($P276) @@ -21249,12 +21503,12 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement" :subid("25_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement" :subid("25_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_291 .param pmc param_292 :optional .param int has_param_292 :opt_flag .annotate 'line', 89 - .const 'Sub' $P300 = "26_1282016534.58916" + .const 'Sub' $P300 = "26_1284728484.24945" capture_lex $P300 new $P290, 'ExceptionHandler' set_addr $P290, control_289 @@ -21262,10 +21516,10 @@ push_eh $P290 .lex "self", self .lex "$/", param_291 - if has_param_292, optparam_183 + if has_param_292, optparam_188 new $P293, "Undef" set param_292, $P293 - optparam_183: + optparam_188: .lex "$key", param_292 .annotate 'line', 90 new $P294, "Undef" @@ -21274,23 +21528,23 @@ find_lex $P295, "$past" .annotate 'line', 91 find_lex $P297, "$/" - unless_null $P297, vivify_184 + unless_null $P297, vivify_189 $P297 = root_new ['parrot';'Hash'] - vivify_184: + vivify_189: set $P298, $P297["EXPR"] - unless_null $P298, vivify_185 + unless_null $P298, vivify_190 new $P298, "Undef" - vivify_185: + vivify_190: if $P298, if_296 .annotate 'line', 112 find_lex $P361, "$/" - unless_null $P361, vivify_186 + unless_null $P361, vivify_191 $P361 = root_new ['parrot';'Hash'] - vivify_186: + vivify_191: set $P362, $P361["statement_control"] - unless_null $P362, vivify_187 + unless_null $P362, vivify_192 new $P362, "Undef" - vivify_187: + vivify_192: if $P362, if_360 .annotate 'line', 113 new $P366, "Integer" @@ -21300,20 +21554,20 @@ if_360: .annotate 'line', 112 find_lex $P363, "$/" - unless_null $P363, vivify_188 + unless_null $P363, vivify_193 $P363 = root_new ['parrot';'Hash'] - vivify_188: + vivify_193: set $P364, $P363["statement_control"] - unless_null $P364, vivify_189 + unless_null $P364, vivify_194 new $P364, "Undef" - vivify_189: + vivify_194: $P365 = $P364."ast"() store_lex "$past", $P365 if_360_end: goto if_296_end if_296: .annotate 'line', 91 - .const 'Sub' $P300 = "26_1282016534.58916" + .const 'Sub' $P300 = "26_1284728484.24945" capture_lex $P300 $P300() if_296_end: @@ -21332,7 +21586,7 @@ .namespace ["NQP";"Actions"] -.sub "_block299" :anon :subid("26_1282016534.58916") :outer("25_1282016534.58916") +.sub "_block299" :anon :subid("26_1284728484.24945") :outer("25_1284728484.24945") .annotate 'line', 92 new $P301, "Undef" .lex "$mc", $P301 @@ -21341,41 +21595,41 @@ .lex "$ml", $P302 .annotate 'line', 92 find_lex $P303, "$/" - unless_null $P303, vivify_190 + unless_null $P303, vivify_195 $P303 = root_new ['parrot';'Hash'] - vivify_190: + vivify_195: set $P304, $P303["statement_mod_cond"] - unless_null $P304, vivify_191 + unless_null $P304, vivify_196 $P304 = root_new ['parrot';'ResizablePMCArray'] - vivify_191: + vivify_196: set $P305, $P304[0] - unless_null $P305, vivify_192 + unless_null $P305, vivify_197 new $P305, "Undef" - vivify_192: + vivify_197: store_lex "$mc", $P305 .annotate 'line', 93 find_lex $P306, "$/" - unless_null $P306, vivify_193 + unless_null $P306, vivify_198 $P306 = root_new ['parrot';'Hash'] - vivify_193: + vivify_198: set $P307, $P306["statement_mod_loop"] - unless_null $P307, vivify_194 + unless_null $P307, vivify_199 $P307 = root_new ['parrot';'ResizablePMCArray'] - vivify_194: + vivify_199: set $P308, $P307[0] - unless_null $P308, vivify_195 + unless_null $P308, vivify_200 new $P308, "Undef" - vivify_195: + vivify_200: store_lex "$ml", $P308 .annotate 'line', 94 find_lex $P309, "$/" - unless_null $P309, vivify_196 + unless_null $P309, vivify_201 $P309 = root_new ['parrot';'Hash'] - vivify_196: + vivify_201: set $P310, $P309["EXPR"] - unless_null $P310, vivify_197 + unless_null $P310, vivify_202 new $P310, "Undef" - vivify_197: + vivify_202: $P311 = $P310."ast"() store_lex "$past", $P311 .annotate 'line', 95 @@ -21384,23 +21638,23 @@ .annotate 'line', 96 get_hll_global $P314, ["PAST"], "Op" find_lex $P315, "$mc" - unless_null $P315, vivify_198 + unless_null $P315, vivify_203 $P315 = root_new ['parrot';'Hash'] - vivify_198: + vivify_203: set $P316, $P315["cond"] - unless_null $P316, vivify_199 + unless_null $P316, vivify_204 new $P316, "Undef" - vivify_199: + vivify_204: $P317 = $P316."ast"() find_lex $P318, "$past" find_lex $P319, "$mc" - unless_null $P319, vivify_200 + unless_null $P319, vivify_205 $P319 = root_new ['parrot';'Hash'] - vivify_200: + vivify_205: set $P320, $P319["sym"] - unless_null $P320, vivify_201 + unless_null $P320, vivify_206 new $P320, "Undef" - vivify_201: + vivify_206: set $S321, $P320 find_lex $P322, "$/" $P323 = $P314."new"($P317, $P318, $S321 :named("pasttype"), $P322 :named("node")) @@ -21414,36 +21668,36 @@ if_325: .annotate 'line', 99 find_lex $P329, "$ml" - unless_null $P329, vivify_202 + unless_null $P329, vivify_207 $P329 = root_new ['parrot';'Hash'] - vivify_202: + vivify_207: set $P330, $P329["sym"] - unless_null $P330, vivify_203 + unless_null $P330, vivify_208 new $P330, "Undef" - vivify_203: + vivify_208: 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 + unless_null $P351, vivify_209 $P351 = root_new ['parrot';'Hash'] - vivify_204: + vivify_209: set $P352, $P351["cond"] - unless_null $P352, vivify_205 + unless_null $P352, vivify_210 new $P352, "Undef" - vivify_205: + vivify_210: $P353 = $P352."ast"() find_lex $P354, "$past" find_lex $P355, "$ml" - unless_null $P355, vivify_206 + unless_null $P355, vivify_211 $P355 = root_new ['parrot';'Hash'] - vivify_206: + vivify_211: set $P356, $P355["sym"] - unless_null $P356, vivify_207 + unless_null $P356, vivify_212 new $P356, "Undef" - vivify_207: + vivify_212: set $S357, $P356 find_lex $P358, "$/" $P359 = $P350."new"($P353, $P354, $S357 :named("pasttype"), $P358 :named("node")) @@ -21471,23 +21725,23 @@ .annotate 'line', 105 get_hll_global $P340, ["PAST"], "Op" find_lex $P341, "$ml" - unless_null $P341, vivify_208 + unless_null $P341, vivify_213 $P341 = root_new ['parrot';'Hash'] - vivify_208: + vivify_213: set $P342, $P341["cond"] - unless_null $P342, vivify_209 + unless_null $P342, vivify_214 new $P342, "Undef" - vivify_209: + vivify_214: $P343 = $P342."ast"() find_lex $P344, "$past" find_lex $P345, "$ml" - unless_null $P345, vivify_210 + unless_null $P345, vivify_215 $P345 = root_new ['parrot';'Hash'] - vivify_210: + vivify_215: set $P346, $P345["sym"] - unless_null $P346, vivify_211 + unless_null $P346, vivify_216 new $P346, "Undef" - vivify_211: + vivify_216: set $S347, $P346 find_lex $P348, "$/" $P349 = $P340."new"($P343, $P344, $S347 :named("pasttype"), $P348 :named("node")) @@ -21505,7 +21759,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "xblock" :subid("27_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "xblock" :subid("27_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_374 .annotate 'line', 117 new $P373, 'ExceptionHandler' @@ -21518,22 +21772,22 @@ find_lex $P375, "$/" get_hll_global $P376, ["PAST"], "Op" find_lex $P377, "$/" - unless_null $P377, vivify_212 + unless_null $P377, vivify_217 $P377 = root_new ['parrot';'Hash'] - vivify_212: + vivify_217: set $P378, $P377["EXPR"] - unless_null $P378, vivify_213 + unless_null $P378, vivify_218 new $P378, "Undef" - vivify_213: + vivify_218: $P379 = $P378."ast"() find_lex $P380, "$/" - unless_null $P380, vivify_214 + unless_null $P380, vivify_219 $P380 = root_new ['parrot';'Hash'] - vivify_214: + vivify_219: set $P381, $P380["pblock"] - unless_null $P381, vivify_215 + unless_null $P381, vivify_220 new $P381, "Undef" - vivify_215: + vivify_220: $P382 = $P381."ast"() find_lex $P383, "$/" $P384 = $P376."new"($P379, $P382, "if" :named("pasttype"), $P383 :named("node")) @@ -21550,7 +21804,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "pblock" :subid("28_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "pblock" :subid("28_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_390 .annotate 'line', 121 new $P389, 'ExceptionHandler' @@ -21562,13 +21816,13 @@ .annotate 'line', 122 find_lex $P391, "$/" find_lex $P392, "$/" - unless_null $P392, vivify_216 + unless_null $P392, vivify_221 $P392 = root_new ['parrot';'Hash'] - vivify_216: + vivify_221: set $P393, $P392["blockoid"] - unless_null $P393, vivify_217 + unless_null $P393, vivify_222 new $P393, "Undef" - vivify_217: + vivify_222: $P394 = $P393."ast"() $P395 = $P391."!make"($P394) .annotate 'line', 121 @@ -21583,7 +21837,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "block" :subid("29_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "block" :subid("29_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_400 .annotate 'line', 125 new $P399, 'ExceptionHandler' @@ -21595,13 +21849,13 @@ .annotate 'line', 126 find_lex $P401, "$/" find_lex $P402, "$/" - unless_null $P402, vivify_218 + unless_null $P402, vivify_223 $P402 = root_new ['parrot';'Hash'] - vivify_218: + vivify_223: set $P403, $P402["blockoid"] - unless_null $P403, vivify_219 + unless_null $P403, vivify_224 new $P403, "Undef" - vivify_219: + vivify_224: $P404 = $P403."ast"() $P405 = $P401."!make"($P404) .annotate 'line', 125 @@ -21616,7 +21870,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "blockoid" :subid("30_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "blockoid" :subid("30_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_410 .annotate 'line', 129 new $P409, 'ExceptionHandler' @@ -21633,13 +21887,13 @@ .lex "$BLOCK", $P412 .annotate 'line', 130 find_lex $P413, "$/" - unless_null $P413, vivify_220 + unless_null $P413, vivify_225 $P413 = root_new ['parrot';'Hash'] - vivify_220: + vivify_225: set $P414, $P413["statementlist"] - unless_null $P414, vivify_221 + unless_null $P414, vivify_226 new $P414, "Undef" - vivify_221: + vivify_226: $P415 = $P414."ast"() store_lex "$past", $P415 .annotate 'line', 131 @@ -21673,7 +21927,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "newpad" :subid("31_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "newpad" :subid("31_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_430 .annotate 'line', 138 new $P429, 'ExceptionHandler' @@ -21684,10 +21938,10 @@ .lex "$/", param_430 .annotate 'line', 139 get_global $P431, "@BLOCK" - unless_null $P431, vivify_222 + unless_null $P431, vivify_227 $P431 = root_new ['parrot';'ResizablePMCArray'] set_global "@BLOCK", $P431 - vivify_222: + vivify_227: .annotate 'line', 138 get_global $P432, "@BLOCK" .annotate 'line', 140 @@ -21709,7 +21963,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "outerctx" :subid("32_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "outerctx" :subid("32_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_443 .annotate 'line', 143 new $P442, 'ExceptionHandler' @@ -21720,22 +21974,22 @@ .lex "$/", param_443 .annotate 'line', 144 get_global $P444, "@BLOCK" - unless_null $P444, vivify_223 + unless_null $P444, vivify_228 $P444 = root_new ['parrot';'ResizablePMCArray'] set_global "@BLOCK", $P444 - vivify_223: + vivify_228: .annotate 'line', 143 get_global $P445, "@BLOCK" .annotate 'line', 145 find_lex $P446, "self" get_global $P447, "@BLOCK" - unless_null $P447, vivify_224 + unless_null $P447, vivify_229 $P447 = root_new ['parrot';'ResizablePMCArray'] - vivify_224: + vivify_229: set $P448, $P447[0] - unless_null $P448, vivify_225 + unless_null $P448, vivify_230 new $P448, "Undef" - vivify_225: + vivify_230: $P449 = $P446."SET_BLOCK_OUTER_CTX"($P448) .annotate 'line', 143 .return ($P449) @@ -21749,10 +22003,10 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("33_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("33_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_454 .annotate 'line', 150 - .const 'Sub' $P482 = "34_1282016534.58916" + .const 'Sub' $P482 = "34_1284728484.24945" capture_lex $P482 new $P453, 'ExceptionHandler' set_addr $P453, control_452 @@ -21768,13 +22022,13 @@ .lex "$past", $P456 .annotate 'line', 151 find_lex $P457, "$/" - unless_null $P457, vivify_226 + unless_null $P457, vivify_231 $P457 = root_new ['parrot';'Hash'] - vivify_226: + vivify_231: set $P458, $P457["xblock"] - unless_null $P458, vivify_227 + unless_null $P458, vivify_232 new $P458, "Undef" - vivify_227: + vivify_232: set $N459, $P458 new $P460, 'Float' set $P460, $N459 @@ -21784,44 +22038,44 @@ find_lex $P462, "$count" set $I463, $P462 find_lex $P464, "$/" - unless_null $P464, vivify_228 + unless_null $P464, vivify_233 $P464 = root_new ['parrot';'Hash'] - vivify_228: + vivify_233: set $P465, $P464["xblock"] - unless_null $P465, vivify_229 + unless_null $P465, vivify_234 $P465 = root_new ['parrot';'ResizablePMCArray'] - vivify_229: + vivify_234: set $P466, $P465[$I463] - unless_null $P466, vivify_230 + unless_null $P466, vivify_235 new $P466, "Undef" - vivify_230: + vivify_235: $P467 = $P466."ast"() $P468 = "xblock_immediate"($P467) store_lex "$past", $P468 .annotate 'line', 153 find_lex $P470, "$/" - unless_null $P470, vivify_231 + unless_null $P470, vivify_236 $P470 = root_new ['parrot';'Hash'] - vivify_231: + vivify_236: set $P471, $P470["else"] - unless_null $P471, vivify_232 + unless_null $P471, vivify_237 new $P471, "Undef" - vivify_232: + vivify_237: unless $P471, if_469_end .annotate 'line', 154 find_lex $P472, "$past" find_lex $P473, "$/" - unless_null $P473, vivify_233 + unless_null $P473, vivify_238 $P473 = root_new ['parrot';'Hash'] - vivify_233: + vivify_238: set $P474, $P473["else"] - unless_null $P474, vivify_234 + unless_null $P474, vivify_239 $P474 = root_new ['parrot';'ResizablePMCArray'] - vivify_234: + vivify_239: set $P475, $P474[0] - unless_null $P475, vivify_235 + unless_null $P475, vivify_240 new $P475, "Undef" - vivify_235: + vivify_240: $P476 = $P475."ast"() $P477 = "block_immediate"($P476) $P472."push"($P477) @@ -21837,7 +22091,7 @@ isgt $I480, $N479, 0.0 unless $I480, loop497_done loop497_redo: - .const 'Sub' $P482 = "34_1282016534.58916" + .const 'Sub' $P482 = "34_1284728484.24945" capture_lex $P482 $P482() loop497_next: @@ -21865,7 +22119,7 @@ .namespace ["NQP";"Actions"] -.sub "_block481" :anon :subid("34_1282016534.58916") :outer("33_1282016534.58916") +.sub "_block481" :anon :subid("34_1284728484.24945") :outer("33_1284728484.24945") .annotate 'line', 159 new $P483, "Undef" .lex "$else", $P483 @@ -21880,17 +22134,17 @@ find_lex $P487, "$count" set $I488, $P487 find_lex $P489, "$/" - unless_null $P489, vivify_236 + unless_null $P489, vivify_241 $P489 = root_new ['parrot';'Hash'] - vivify_236: + vivify_241: set $P490, $P489["xblock"] - unless_null $P490, vivify_237 + unless_null $P490, vivify_242 $P490 = root_new ['parrot';'ResizablePMCArray'] - vivify_237: + vivify_242: set $P491, $P490[$I488] - unless_null $P491, vivify_238 + unless_null $P491, vivify_243 new $P491, "Undef" - vivify_238: + vivify_243: $P492 = $P491."ast"() $P493 = "xblock_immediate"($P492) store_lex "$past", $P493 @@ -21905,7 +22159,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("35_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("35_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_507 .annotate 'line', 166 new $P506, 'ExceptionHandler' @@ -21918,13 +22172,13 @@ new $P508, "Undef" .lex "$past", $P508 find_lex $P509, "$/" - unless_null $P509, vivify_239 + unless_null $P509, vivify_244 $P509 = root_new ['parrot';'Hash'] - vivify_239: + vivify_244: set $P510, $P509["xblock"] - unless_null $P510, vivify_240 + unless_null $P510, vivify_245 new $P510, "Undef" - vivify_240: + vivify_245: $P511 = $P510."ast"() $P512 = "xblock_immediate"($P511) store_lex "$past", $P512 @@ -21947,7 +22201,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("36_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("36_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_521 .annotate 'line', 172 new $P520, 'ExceptionHandler' @@ -21960,26 +22214,26 @@ new $P522, "Undef" .lex "$past", $P522 find_lex $P523, "$/" - unless_null $P523, vivify_241 + unless_null $P523, vivify_246 $P523 = root_new ['parrot';'Hash'] - vivify_241: + vivify_246: set $P524, $P523["xblock"] - unless_null $P524, vivify_242 + unless_null $P524, vivify_247 new $P524, "Undef" - vivify_242: + vivify_247: $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 + unless_null $P528, vivify_248 $P528 = root_new ['parrot';'Hash'] - vivify_243: + vivify_248: set $P529, $P528["sym"] - unless_null $P529, vivify_244 + unless_null $P529, vivify_249 new $P529, "Undef" - vivify_244: + vivify_249: set $S530, $P529 $P527."pasttype"($S530) .annotate 'line', 175 @@ -21998,7 +22252,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("37_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("37_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_538 .annotate 'line', 178 new $P537, 'ExceptionHandler' @@ -22017,46 +22271,46 @@ new $P541, "String" assign $P541, "repeat_" find_lex $P542, "$/" - unless_null $P542, vivify_245 + unless_null $P542, vivify_250 $P542 = root_new ['parrot';'Hash'] - vivify_245: + vivify_250: set $P543, $P542["wu"] - unless_null $P543, vivify_246 + unless_null $P543, vivify_251 new $P543, "Undef" - vivify_246: + vivify_251: set $S544, $P543 concat $P545, $P541, $S544 store_lex "$pasttype", $P545 find_lex $P546, "$past" .annotate 'line', 181 find_lex $P548, "$/" - unless_null $P548, vivify_247 + unless_null $P548, vivify_252 $P548 = root_new ['parrot';'Hash'] - vivify_247: + vivify_252: set $P549, $P548["xblock"] - unless_null $P549, vivify_248 + unless_null $P549, vivify_253 new $P549, "Undef" - vivify_248: + vivify_253: if $P549, if_547 .annotate 'line', 186 get_hll_global $P556, ["PAST"], "Op" find_lex $P557, "$/" - unless_null $P557, vivify_249 + unless_null $P557, vivify_254 $P557 = root_new ['parrot';'Hash'] - vivify_249: + vivify_254: set $P558, $P557["EXPR"] - unless_null $P558, vivify_250 + unless_null $P558, vivify_255 new $P558, "Undef" - vivify_250: + vivify_255: $P559 = $P558."ast"() find_lex $P560, "$/" - unless_null $P560, vivify_251 + unless_null $P560, vivify_256 $P560 = root_new ['parrot';'Hash'] - vivify_251: + vivify_256: set $P561, $P560["pblock"] - unless_null $P561, vivify_252 + unless_null $P561, vivify_257 new $P561, "Undef" - vivify_252: + vivify_257: $P562 = $P561."ast"() $P563 = "block_immediate"($P562) find_lex $P564, "$pasttype" @@ -22068,13 +22322,13 @@ if_547: .annotate 'line', 182 find_lex $P550, "$/" - unless_null $P550, vivify_253 + unless_null $P550, vivify_258 $P550 = root_new ['parrot';'Hash'] - vivify_253: + vivify_258: set $P551, $P550["xblock"] - unless_null $P551, vivify_254 + unless_null $P551, vivify_259 new $P551, "Undef" - vivify_254: + vivify_259: $P552 = $P551."ast"() $P553 = "xblock_immediate"($P552) store_lex "$past", $P553 @@ -22099,7 +22353,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("38_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("38_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_574 .annotate 'line', 192 new $P573, 'ExceptionHandler' @@ -22116,13 +22370,13 @@ .lex "$block", $P576 .annotate 'line', 193 find_lex $P577, "$/" - unless_null $P577, vivify_255 + unless_null $P577, vivify_260 $P577 = root_new ['parrot';'Hash'] - vivify_255: + vivify_260: set $P578, $P577["xblock"] - unless_null $P578, vivify_256 + unless_null $P578, vivify_261 new $P578, "Undef" - vivify_256: + vivify_261: $P579 = $P578."ast"() store_lex "$past", $P579 .annotate 'line', 194 @@ -22130,13 +22384,13 @@ $P580."pasttype"("for") .annotate 'line', 195 find_lex $P581, "$past" - unless_null $P581, vivify_257 + unless_null $P581, vivify_262 $P581 = root_new ['parrot';'ResizablePMCArray'] - vivify_257: + vivify_262: set $P582, $P581[1] - unless_null $P582, vivify_258 + unless_null $P582, vivify_263 new $P582, "Undef" - vivify_258: + vivify_263: store_lex "$block", $P582 .annotate 'line', 196 find_lex $P584, "$block" @@ -22144,13 +22398,13 @@ if $P585, unless_583_end .annotate 'line', 197 find_lex $P586, "$block" - unless_null $P586, vivify_259 + unless_null $P586, vivify_264 $P586 = root_new ['parrot';'ResizablePMCArray'] - vivify_259: + vivify_264: set $P587, $P586[0] - unless_null $P587, vivify_260 + unless_null $P587, vivify_265 new $P587, "Undef" - vivify_260: + vivify_265: get_hll_global $P588, ["PAST"], "Var" $P589 = $P588."new"("$_" :named("name"), "parameter" :named("scope")) $P587."push"($P589) @@ -22180,7 +22434,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("39_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("39_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_600 .annotate 'line', 205 new $P599, 'ExceptionHandler' @@ -22193,13 +22447,13 @@ find_lex $P601, "$/" get_hll_global $P602, ["PAST"], "Op" find_lex $P603, "$/" - unless_null $P603, vivify_261 + unless_null $P603, vivify_266 $P603 = root_new ['parrot';'Hash'] - vivify_261: + vivify_266: set $P604, $P603["EXPR"] - unless_null $P604, vivify_262 + unless_null $P604, vivify_267 new $P604, "Undef" - vivify_262: + vivify_267: $P605 = $P604."ast"() find_lex $P606, "$/" $P607 = $P602."new"($P605, "return" :named("pasttype"), $P606 :named("node")) @@ -22216,7 +22470,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("40_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("40_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_613 .annotate 'line', 209 new $P612, 'ExceptionHandler' @@ -22229,13 +22483,13 @@ new $P614, "Undef" .lex "$block", $P614 find_lex $P615, "$/" - unless_null $P615, vivify_263 + unless_null $P615, vivify_268 $P615 = root_new ['parrot';'Hash'] - vivify_263: + vivify_268: set $P616, $P615["block"] - unless_null $P616, vivify_264 + unless_null $P616, vivify_269 new $P616, "Undef" - vivify_264: + vivify_269: $P617 = $P616."ast"() store_lex "$block", $P617 .annotate 'line', 211 @@ -22244,18 +22498,18 @@ "push_block_handler"($P618, $P619) .annotate 'line', 212 get_global $P620, "@BLOCK" - unless_null $P620, vivify_265 + unless_null $P620, vivify_270 $P620 = root_new ['parrot';'ResizablePMCArray'] - vivify_265: + vivify_270: set $P621, $P620[0] - unless_null $P621, vivify_266 + unless_null $P621, vivify_271 new $P621, "Undef" - vivify_266: + vivify_271: $P622 = $P621."handlers"() set $P623, $P622[0] - unless_null $P623, vivify_267 + unless_null $P623, vivify_272 new $P623, "Undef" - vivify_267: + vivify_272: $P623."handle_types_except"("CONTROL") .annotate 'line', 213 find_lex $P624, "$/" @@ -22275,7 +22529,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_control:sym" :subid("41_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_control:sym" :subid("41_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_633 .annotate 'line', 216 new $P632, 'ExceptionHandler' @@ -22288,13 +22542,13 @@ new $P634, "Undef" .lex "$block", $P634 find_lex $P635, "$/" - unless_null $P635, vivify_268 + unless_null $P635, vivify_273 $P635 = root_new ['parrot';'Hash'] - vivify_268: + vivify_273: set $P636, $P635["block"] - unless_null $P636, vivify_269 + unless_null $P636, vivify_274 new $P636, "Undef" - vivify_269: + vivify_274: $P637 = $P636."ast"() store_lex "$block", $P637 .annotate 'line', 218 @@ -22303,18 +22557,18 @@ "push_block_handler"($P638, $P639) .annotate 'line', 219 get_global $P640, "@BLOCK" - unless_null $P640, vivify_270 + unless_null $P640, vivify_275 $P640 = root_new ['parrot';'ResizablePMCArray'] - vivify_270: + vivify_275: set $P641, $P640[0] - unless_null $P641, vivify_271 + unless_null $P641, vivify_276 new $P641, "Undef" - vivify_271: + vivify_276: $P642 = $P641."handlers"() set $P643, $P642[0] - unless_null $P643, vivify_272 + unless_null $P643, vivify_277 new $P643, "Undef" - vivify_272: + vivify_277: $P643."handle_types"("CONTROL") .annotate 'line', 220 find_lex $P644, "$/" @@ -22334,7 +22588,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_prefix:sym" :subid("42_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_prefix:sym" :subid("42_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_654 .annotate 'line', 260 new $P653, 'ExceptionHandler' @@ -22345,22 +22599,22 @@ .lex "$/", param_654 .annotate 'line', 261 get_global $P655, "@BLOCK" - unless_null $P655, vivify_273 + unless_null $P655, vivify_278 $P655 = root_new ['parrot';'ResizablePMCArray'] - vivify_273: + vivify_278: set $P656, $P655[0] - unless_null $P656, vivify_274 + unless_null $P656, vivify_279 new $P656, "Undef" - vivify_274: + vivify_279: $P657 = $P656."loadinit"() find_lex $P658, "$/" - unless_null $P658, vivify_275 + unless_null $P658, vivify_280 $P658 = root_new ['parrot';'Hash'] - vivify_275: + vivify_280: set $P659, $P658["blorst"] - unless_null $P659, vivify_276 + unless_null $P659, vivify_281 new $P659, "Undef" - vivify_276: + vivify_281: $P660 = $P659."ast"() $P657."push"($P660) .annotate 'line', 262 @@ -22381,7 +22635,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_prefix:sym" :subid("43_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_prefix:sym" :subid("43_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_670 .annotate 'line', 265 new $P669, 'ExceptionHandler' @@ -22394,13 +22648,13 @@ new $P671, "Undef" .lex "$past", $P671 find_lex $P672, "$/" - unless_null $P672, vivify_277 + unless_null $P672, vivify_282 $P672 = root_new ['parrot';'Hash'] - vivify_277: + vivify_282: set $P673, $P672["blorst"] - unless_null $P673, vivify_278 + unless_null $P673, vivify_283 new $P673, "Undef" - vivify_278: + vivify_283: $P674 = $P673."ast"() store_lex "$past", $P674 .annotate 'line', 267 @@ -22459,7 +22713,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "blorst" :subid("44_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "blorst" :subid("44_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_705 .annotate 'line', 288 new $P704, 'ExceptionHandler' @@ -22472,36 +22726,36 @@ find_lex $P706, "$/" .annotate 'line', 290 find_lex $P709, "$/" - unless_null $P709, vivify_279 + unless_null $P709, vivify_284 $P709 = root_new ['parrot';'Hash'] - vivify_279: + vivify_284: set $P710, $P709["block"] - unless_null $P710, vivify_280 + unless_null $P710, vivify_285 new $P710, "Undef" - vivify_280: + vivify_285: if $P710, if_708 .annotate 'line', 291 find_lex $P715, "$/" - unless_null $P715, vivify_281 + unless_null $P715, vivify_286 $P715 = root_new ['parrot';'Hash'] - vivify_281: + vivify_286: set $P716, $P715["statement"] - unless_null $P716, vivify_282 + unless_null $P716, vivify_287 new $P716, "Undef" - vivify_282: + vivify_287: $P717 = $P716."ast"() set $P707, $P717 .annotate 'line', 290 goto if_708_end if_708: find_lex $P711, "$/" - unless_null $P711, vivify_283 + unless_null $P711, vivify_288 $P711 = root_new ['parrot';'Hash'] - vivify_283: + vivify_288: set $P712, $P711["block"] - unless_null $P712, vivify_284 + unless_null $P712, vivify_289 new $P712, "Undef" - vivify_284: + vivify_289: $P713 = $P712."ast"() $P714 = "block_immediate"($P713) set $P707, $P714 @@ -22519,7 +22773,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_mod_cond:sym" :subid("45_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_mod_cond:sym" :subid("45_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_723 .annotate 'line', 296 new $P722, 'ExceptionHandler' @@ -22530,13 +22784,13 @@ .lex "$/", param_723 find_lex $P724, "$/" find_lex $P725, "$/" - unless_null $P725, vivify_285 + unless_null $P725, vivify_290 $P725 = root_new ['parrot';'Hash'] - vivify_285: + vivify_290: set $P726, $P725["cond"] - unless_null $P726, vivify_286 + unless_null $P726, vivify_291 new $P726, "Undef" - vivify_286: + vivify_291: $P727 = $P726."ast"() $P728 = $P724."!make"($P727) .return ($P728) @@ -22550,7 +22804,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_mod_cond:sym" :subid("46_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_mod_cond:sym" :subid("46_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_733 .annotate 'line', 297 new $P732, 'ExceptionHandler' @@ -22561,13 +22815,13 @@ .lex "$/", param_733 find_lex $P734, "$/" find_lex $P735, "$/" - unless_null $P735, vivify_287 + unless_null $P735, vivify_292 $P735 = root_new ['parrot';'Hash'] - vivify_287: + vivify_292: set $P736, $P735["cond"] - unless_null $P736, vivify_288 + unless_null $P736, vivify_293 new $P736, "Undef" - vivify_288: + vivify_293: $P737 = $P736."ast"() $P738 = $P734."!make"($P737) .return ($P738) @@ -22581,7 +22835,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_mod_loop:sym" :subid("47_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_mod_loop:sym" :subid("47_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_743 .annotate 'line', 299 new $P742, 'ExceptionHandler' @@ -22592,13 +22846,13 @@ .lex "$/", param_743 find_lex $P744, "$/" find_lex $P745, "$/" - unless_null $P745, vivify_289 + unless_null $P745, vivify_294 $P745 = root_new ['parrot';'Hash'] - vivify_289: + vivify_294: set $P746, $P745["cond"] - unless_null $P746, vivify_290 + unless_null $P746, vivify_295 new $P746, "Undef" - vivify_290: + vivify_295: $P747 = $P746."ast"() $P748 = $P744."!make"($P747) .return ($P748) @@ -22612,7 +22866,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "statement_mod_loop:sym" :subid("48_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "statement_mod_loop:sym" :subid("48_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_753 .annotate 'line', 300 new $P752, 'ExceptionHandler' @@ -22623,13 +22877,13 @@ .lex "$/", param_753 find_lex $P754, "$/" find_lex $P755, "$/" - unless_null $P755, vivify_291 + unless_null $P755, vivify_296 $P755 = root_new ['parrot';'Hash'] - vivify_291: + vivify_296: set $P756, $P755["cond"] - unless_null $P756, vivify_292 + unless_null $P756, vivify_297 new $P756, "Undef" - vivify_292: + vivify_297: $P757 = $P756."ast"() $P758 = $P754."!make"($P757) .return ($P758) @@ -22643,7 +22897,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("49_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("49_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_763 .annotate 'line', 304 new $P762, 'ExceptionHandler' @@ -22654,13 +22908,13 @@ .lex "$/", param_763 find_lex $P764, "$/" find_lex $P765, "$/" - unless_null $P765, vivify_293 + unless_null $P765, vivify_298 $P765 = root_new ['parrot';'Hash'] - vivify_293: + vivify_298: set $P766, $P765["fatarrow"] - unless_null $P766, vivify_294 + unless_null $P766, vivify_299 new $P766, "Undef" - vivify_294: + vivify_299: $P767 = $P766."ast"() $P768 = $P764."!make"($P767) .return ($P768) @@ -22674,7 +22928,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("50_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("50_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_773 .annotate 'line', 305 new $P772, 'ExceptionHandler' @@ -22685,13 +22939,13 @@ .lex "$/", param_773 find_lex $P774, "$/" find_lex $P775, "$/" - unless_null $P775, vivify_295 + unless_null $P775, vivify_300 $P775 = root_new ['parrot';'Hash'] - vivify_295: + vivify_300: set $P776, $P775["colonpair"] - unless_null $P776, vivify_296 + unless_null $P776, vivify_301 new $P776, "Undef" - vivify_296: + vivify_301: $P777 = $P776."ast"() $P778 = $P774."!make"($P777) .return ($P778) @@ -22705,7 +22959,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("51_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("51_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_783 .annotate 'line', 306 new $P782, 'ExceptionHandler' @@ -22716,13 +22970,13 @@ .lex "$/", param_783 find_lex $P784, "$/" find_lex $P785, "$/" - unless_null $P785, vivify_297 + unless_null $P785, vivify_302 $P785 = root_new ['parrot';'Hash'] - vivify_297: + vivify_302: set $P786, $P785["variable"] - unless_null $P786, vivify_298 + unless_null $P786, vivify_303 new $P786, "Undef" - vivify_298: + vivify_303: $P787 = $P786."ast"() $P788 = $P784."!make"($P787) .return ($P788) @@ -22736,7 +22990,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("52_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("52_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_793 .annotate 'line', 307 new $P792, 'ExceptionHandler' @@ -22747,13 +23001,13 @@ .lex "$/", param_793 find_lex $P794, "$/" find_lex $P795, "$/" - unless_null $P795, vivify_299 + unless_null $P795, vivify_304 $P795 = root_new ['parrot';'Hash'] - vivify_299: + vivify_304: set $P796, $P795["package_declarator"] - unless_null $P796, vivify_300 + unless_null $P796, vivify_305 new $P796, "Undef" - vivify_300: + vivify_305: $P797 = $P796."ast"() $P798 = $P794."!make"($P797) .return ($P798) @@ -22767,7 +23021,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("53_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("53_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_803 .annotate 'line', 308 new $P802, 'ExceptionHandler' @@ -22778,13 +23032,13 @@ .lex "$/", param_803 find_lex $P804, "$/" find_lex $P805, "$/" - unless_null $P805, vivify_301 + unless_null $P805, vivify_306 $P805 = root_new ['parrot';'Hash'] - vivify_301: + vivify_306: set $P806, $P805["scope_declarator"] - unless_null $P806, vivify_302 + unless_null $P806, vivify_307 new $P806, "Undef" - vivify_302: + vivify_307: $P807 = $P806."ast"() $P808 = $P804."!make"($P807) .return ($P808) @@ -22798,7 +23052,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("54_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("54_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_813 .annotate 'line', 309 new $P812, 'ExceptionHandler' @@ -22809,13 +23063,13 @@ .lex "$/", param_813 find_lex $P814, "$/" find_lex $P815, "$/" - unless_null $P815, vivify_303 + unless_null $P815, vivify_308 $P815 = root_new ['parrot';'Hash'] - vivify_303: + vivify_308: set $P816, $P815["routine_declarator"] - unless_null $P816, vivify_304 + unless_null $P816, vivify_309 new $P816, "Undef" - vivify_304: + vivify_309: $P817 = $P816."ast"() $P818 = $P814."!make"($P817) .return ($P818) @@ -22829,7 +23083,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("55_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("55_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_823 .annotate 'line', 310 new $P822, 'ExceptionHandler' @@ -22840,13 +23094,13 @@ .lex "$/", param_823 find_lex $P824, "$/" find_lex $P825, "$/" - unless_null $P825, vivify_305 + unless_null $P825, vivify_310 $P825 = root_new ['parrot';'Hash'] - vivify_305: + vivify_310: set $P826, $P825["regex_declarator"] - unless_null $P826, vivify_306 + unless_null $P826, vivify_311 new $P826, "Undef" - vivify_306: + vivify_311: $P827 = $P826."ast"() $P828 = $P824."!make"($P827) .return ($P828) @@ -22860,7 +23114,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("56_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("56_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_833 .annotate 'line', 311 new $P832, 'ExceptionHandler' @@ -22871,13 +23125,13 @@ .lex "$/", param_833 find_lex $P834, "$/" find_lex $P835, "$/" - unless_null $P835, vivify_307 + unless_null $P835, vivify_312 $P835 = root_new ['parrot';'Hash'] - vivify_307: + vivify_312: set $P836, $P835["statement_prefix"] - unless_null $P836, vivify_308 + unless_null $P836, vivify_313 new $P836, "Undef" - vivify_308: + vivify_313: $P837 = $P836."ast"() $P838 = $P834."!make"($P837) .return ($P838) @@ -22891,7 +23145,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("57_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "term:sym" :subid("57_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_843 .annotate 'line', 312 new $P842, 'ExceptionHandler' @@ -22902,13 +23156,13 @@ .lex "$/", param_843 find_lex $P844, "$/" find_lex $P845, "$/" - unless_null $P845, vivify_309 + unless_null $P845, vivify_314 $P845 = root_new ['parrot';'Hash'] - vivify_309: + vivify_314: set $P846, $P845["pblock"] - unless_null $P846, vivify_310 + unless_null $P846, vivify_315 new $P846, "Undef" - vivify_310: + vivify_315: $P847 = $P846."ast"() $P848 = $P844."!make"($P847) .return ($P848) @@ -22922,7 +23176,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "fatarrow" :subid("58_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "fatarrow" :subid("58_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_853 .annotate 'line', 314 new $P852, 'ExceptionHandler' @@ -22935,25 +23189,25 @@ new $P854, "Undef" .lex "$past", $P854 find_lex $P855, "$/" - unless_null $P855, vivify_311 + unless_null $P855, vivify_316 $P855 = root_new ['parrot';'Hash'] - vivify_311: + vivify_316: set $P856, $P855["val"] - unless_null $P856, vivify_312 + unless_null $P856, vivify_317 new $P856, "Undef" - vivify_312: + vivify_317: $P857 = $P856."ast"() store_lex "$past", $P857 .annotate 'line', 316 find_lex $P858, "$past" find_lex $P859, "$/" - unless_null $P859, vivify_313 + unless_null $P859, vivify_318 $P859 = root_new ['parrot';'Hash'] - vivify_313: + vivify_318: set $P860, $P859["key"] - unless_null $P860, vivify_314 + unless_null $P860, vivify_319 new $P860, "Undef" - vivify_314: + vivify_319: $P861 = $P860."Str"() $P858."named"($P861) .annotate 'line', 317 @@ -22972,7 +23226,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "colonpair" :subid("59_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "colonpair" :subid("59_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_869 .annotate 'line', 320 new $P868, 'ExceptionHandler' @@ -22986,24 +23240,24 @@ .lex "$past", $P870 .annotate 'line', 322 find_lex $P873, "$/" - unless_null $P873, vivify_315 + unless_null $P873, vivify_320 $P873 = root_new ['parrot';'Hash'] - vivify_315: + vivify_320: set $P874, $P873["circumfix"] - unless_null $P874, vivify_316 + unless_null $P874, vivify_321 new $P874, "Undef" - vivify_316: + vivify_321: if $P874, if_872 .annotate 'line', 323 get_hll_global $P879, ["PAST"], "Val" find_lex $P880, "$/" - unless_null $P880, vivify_317 + unless_null $P880, vivify_322 $P880 = root_new ['parrot';'Hash'] - vivify_317: + vivify_322: set $P881, $P880["not"] - unless_null $P881, vivify_318 + unless_null $P881, vivify_323 new $P881, "Undef" - vivify_318: + vivify_323: isfalse $I882, $P881 $P883 = $P879."new"($I882 :named("value")) set $P871, $P883 @@ -23011,17 +23265,17 @@ goto if_872_end if_872: find_lex $P875, "$/" - unless_null $P875, vivify_319 + unless_null $P875, vivify_324 $P875 = root_new ['parrot';'Hash'] - vivify_319: + vivify_324: set $P876, $P875["circumfix"] - unless_null $P876, vivify_320 + unless_null $P876, vivify_325 $P876 = root_new ['parrot';'ResizablePMCArray'] - vivify_320: + vivify_325: set $P877, $P876[0] - unless_null $P877, vivify_321 + unless_null $P877, vivify_326 new $P877, "Undef" - vivify_321: + vivify_326: $P878 = $P877."ast"() set $P871, $P878 if_872_end: @@ -23029,13 +23283,13 @@ .annotate 'line', 324 find_lex $P884, "$past" find_lex $P885, "$/" - unless_null $P885, vivify_322 + unless_null $P885, vivify_327 $P885 = root_new ['parrot';'Hash'] - vivify_322: + vivify_327: set $P886, $P885["identifier"] - unless_null $P886, vivify_323 + unless_null $P886, vivify_328 new $P886, "Undef" - vivify_323: + vivify_328: set $S887, $P886 $P884."named"($S887) .annotate 'line', 325 @@ -23054,10 +23308,10 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "variable" :subid("60_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "variable" :subid("60_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_895 .annotate 'line', 328 - .const 'Sub' $P908 = "61_1282016534.58916" + .const 'Sub' $P908 = "61_1284728484.24945" capture_lex $P908 new $P894, 'ExceptionHandler' set_addr $P894, control_893 @@ -23072,29 +23326,29 @@ find_lex $P897, "$past" .annotate 'line', 330 find_lex $P899, "$/" - unless_null $P899, vivify_324 + unless_null $P899, vivify_329 $P899 = root_new ['parrot';'Hash'] - vivify_324: + vivify_329: set $P900, $P899["postcircumfix"] - unless_null $P900, vivify_325 + unless_null $P900, vivify_330 new $P900, "Undef" - vivify_325: + vivify_330: if $P900, if_898 .annotate 'line', 334 - .const 'Sub' $P908 = "61_1282016534.58916" + .const 'Sub' $P908 = "61_1284728484.24945" capture_lex $P908 $P908() goto if_898_end if_898: .annotate 'line', 331 find_lex $P901, "$/" - unless_null $P901, vivify_342 + unless_null $P901, vivify_347 $P901 = root_new ['parrot';'Hash'] - vivify_342: + vivify_347: set $P902, $P901["postcircumfix"] - unless_null $P902, vivify_343 + unless_null $P902, vivify_348 new $P902, "Undef" - vivify_343: + vivify_348: $P903 = $P902."ast"() store_lex "$past", $P903 .annotate 'line', 332 @@ -23118,7 +23372,7 @@ .namespace ["NQP";"Actions"] -.sub "_block907" :anon :subid("61_1282016534.58916") :outer("60_1282016534.58916") +.sub "_block907" :anon :subid("61_1284728484.24945") :outer("60_1284728484.24945") .annotate 'line', 335 $P909 = root_new ['parrot';'ResizablePMCArray'] .lex "@name", $P909 @@ -23139,13 +23393,13 @@ unless $P920, if_919_end .annotate 'line', 338 find_lex $P922, "@name" - unless_null $P922, vivify_326 + unless_null $P922, vivify_331 $P922 = root_new ['parrot';'ResizablePMCArray'] - vivify_326: + vivify_331: set $P923, $P922[0] - unless_null $P923, vivify_327 + unless_null $P923, vivify_332 new $P923, "Undef" - vivify_327: + vivify_332: set $S924, $P923 iseq $I925, $S924, "GLOBAL" unless $I925, if_921_end @@ -23162,13 +23416,13 @@ .annotate 'line', 341 find_lex $P930, "$past" find_lex $P931, "$/" - unless_null $P931, vivify_328 + unless_null $P931, vivify_333 $P931 = root_new ['parrot';'Hash'] - vivify_328: + vivify_333: set $P932, $P931["sigil"] - unless_null $P932, vivify_329 + unless_null $P932, vivify_334 new $P932, "Undef" - vivify_329: + vivify_334: $P933 = "vivitype"($P932) $P930."viviself"($P933) .annotate 'line', 342 @@ -23177,33 +23431,33 @@ if_919_end: .annotate 'line', 344 find_lex $P937, "$/" - unless_null $P937, vivify_330 + unless_null $P937, vivify_335 $P937 = root_new ['parrot';'Hash'] - vivify_330: + vivify_335: set $P938, $P937["twigil"] - unless_null $P938, vivify_331 + unless_null $P938, vivify_336 $P938 = root_new ['parrot';'ResizablePMCArray'] - vivify_331: + vivify_336: set $P939, $P938[0] - unless_null $P939, vivify_332 + unless_null $P939, vivify_337 new $P939, "Undef" - vivify_332: + vivify_337: set $S940, $P939 iseq $I941, $S940, "*" if $I941, if_936 .annotate 'line', 357 find_lex $P963, "$/" - unless_null $P963, vivify_333 + unless_null $P963, vivify_338 $P963 = root_new ['parrot';'Hash'] - vivify_333: + vivify_338: set $P964, $P963["twigil"] - unless_null $P964, vivify_334 + unless_null $P964, vivify_339 $P964 = root_new ['parrot';'ResizablePMCArray'] - vivify_334: + vivify_339: set $P965, $P964[0] - unless_null $P965, vivify_335 + unless_null $P965, vivify_340 new $P965, "Undef" - vivify_335: + vivify_340: set $S966, $P965 iseq $I967, $S966, "!" if $I967, if_962 @@ -23222,13 +23476,13 @@ .annotate 'line', 360 find_lex $P972, "$past" find_lex $P973, "$/" - unless_null $P973, vivify_336 + unless_null $P973, vivify_341 $P973 = root_new ['parrot';'Hash'] - vivify_336: + vivify_341: set $P974, $P973["sigil"] - unless_null $P974, vivify_337 + unless_null $P974, vivify_342 new $P974, "Undef" - vivify_337: + vivify_342: $P975 = "vivitype"($P974) $P976 = $P972."viviself"($P975) .annotate 'line', 357 @@ -23247,24 +23501,24 @@ get_hll_global $P944, ["PAST"], "Var" .annotate 'line', 349 find_lex $P945, "$/" - unless_null $P945, vivify_338 + unless_null $P945, vivify_343 $P945 = root_new ['parrot';'Hash'] - vivify_338: + vivify_343: set $P946, $P945["sigil"] - unless_null $P946, vivify_339 + unless_null $P946, vivify_344 new $P946, "Undef" - vivify_339: + vivify_344: set $S947, $P946 new $P948, 'String' set $P948, $S947 find_lex $P949, "$/" - unless_null $P949, vivify_340 + unless_null $P949, vivify_345 $P949 = root_new ['parrot';'Hash'] - vivify_340: + vivify_345: set $P950, $P949["desigilname"] - unless_null $P950, vivify_341 + unless_null $P950, vivify_346 new $P950, "Undef" - vivify_341: + vivify_346: concat $P951, $P948, $P950 .annotate 'line', 351 get_hll_global $P952, ["PAST"], "Op" @@ -23288,7 +23542,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "package_declarator:sym" :subid("62_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "package_declarator:sym" :subid("62_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_984 .annotate 'line', 366 new $P983, 'ExceptionHandler' @@ -23299,13 +23553,13 @@ .lex "$/", param_984 find_lex $P985, "$/" find_lex $P986, "$/" - unless_null $P986, vivify_344 + unless_null $P986, vivify_349 $P986 = root_new ['parrot';'Hash'] - vivify_344: + vivify_349: set $P987, $P986["package_def"] - unless_null $P987, vivify_345 + unless_null $P987, vivify_350 new $P987, "Undef" - vivify_345: + vivify_350: $P988 = $P987."ast"() $P989 = $P985."!make"($P988) .return ($P989) @@ -23319,7 +23573,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "package_declarator:sym" :subid("63_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "package_declarator:sym" :subid("63_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_994 .annotate 'line', 367 new $P993, 'ExceptionHandler' @@ -23339,13 +23593,13 @@ .lex "$parent", $P997 .annotate 'line', 368 find_lex $P998, "$/" - unless_null $P998, vivify_346 + unless_null $P998, vivify_351 $P998 = root_new ['parrot';'Hash'] - vivify_346: + vivify_351: set $P999, $P998["package_def"] - unless_null $P999, vivify_347 + unless_null $P999, vivify_352 new $P999, "Undef" - vivify_347: + vivify_352: $P1000 = $P999."ast"() store_lex "$past", $P1000 .annotate 'line', 370 @@ -23355,38 +23609,38 @@ $P1003 = $P1002."new"(" %r = get_root_global [\"parrot\"], \"P6metaclass\"" :named("inline")) .annotate 'line', 374 find_lex $P1004, "$/" - unless_null $P1004, vivify_348 + unless_null $P1004, vivify_353 $P1004 = root_new ['parrot';'Hash'] - vivify_348: + vivify_353: set $P1005, $P1004["package_def"] - unless_null $P1005, vivify_349 + unless_null $P1005, vivify_354 $P1005 = root_new ['parrot';'Hash'] - vivify_349: + vivify_354: set $P1006, $P1005["name"] - unless_null $P1006, vivify_350 + unless_null $P1006, vivify_355 new $P1006, "Undef" - vivify_350: + vivify_355: 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 + unless_null $P1011, vivify_356 $P1011 = root_new ['parrot';'Hash'] - vivify_351: + vivify_356: set $P1012, $P1011["package_def"] - unless_null $P1012, vivify_352 + unless_null $P1012, vivify_357 $P1012 = root_new ['parrot';'Hash'] - vivify_352: + vivify_357: set $P1013, $P1012["parent"] - unless_null $P1013, vivify_353 + unless_null $P1013, vivify_358 $P1013 = root_new ['parrot';'ResizablePMCArray'] - vivify_353: + vivify_358: set $P1014, $P1013[0] - unless_null $P1014, vivify_354 + unless_null $P1014, vivify_359 new $P1014, "Undef" - vivify_354: + vivify_359: set $S1015, $P1014 unless $S1015, unless_1010 new $P1009, 'String' @@ -23395,13 +23649,13 @@ unless_1010: .annotate 'line', 379 find_lex $P1018, "$/" - unless_null $P1018, vivify_355 + unless_null $P1018, vivify_360 $P1018 = root_new ['parrot';'Hash'] - vivify_355: + vivify_360: set $P1019, $P1018["sym"] - unless_null $P1019, vivify_356 + unless_null $P1019, vivify_361 new $P1019, "Undef" - vivify_356: + vivify_361: set $S1020, $P1019 iseq $I1021, $S1020, "grammar" if $I1021, if_1017 @@ -23429,35 +23683,35 @@ if_1024_end: .annotate 'line', 383 find_lex $P1031, "$past" - unless_null $P1031, vivify_357 + unless_null $P1031, vivify_362 $P1031 = root_new ['parrot';'Hash'] - vivify_357: + vivify_362: set $P1032, $P1031["attributes"] - unless_null $P1032, vivify_358 + unless_null $P1032, vivify_363 new $P1032, "Undef" - vivify_358: + vivify_363: unless $P1032, if_1030_end .annotate 'line', 384 find_lex $P1033, "$classinit" find_lex $P1034, "$past" - unless_null $P1034, vivify_359 + unless_null $P1034, vivify_364 $P1034 = root_new ['parrot';'Hash'] - vivify_359: + vivify_364: set $P1035, $P1034["attributes"] - unless_null $P1035, vivify_360 + unless_null $P1035, vivify_365 new $P1035, "Undef" - vivify_360: + vivify_365: $P1033."push"($P1035) if_1030_end: .annotate 'line', 386 get_global $P1036, "@BLOCK" - unless_null $P1036, vivify_361 + unless_null $P1036, vivify_366 $P1036 = root_new ['parrot';'ResizablePMCArray'] - vivify_361: + vivify_366: set $P1037, $P1036[0] - unless_null $P1037, vivify_362 + unless_null $P1037, vivify_367 new $P1037, "Undef" - vivify_362: + vivify_367: $P1038 = $P1037."loadinit"() find_lex $P1039, "$classinit" $P1038."push"($P1039) @@ -23477,7 +23731,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "package_def" :subid("64_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "package_def" :subid("64_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1047 .annotate 'line', 390 new $P1046, 'ExceptionHandler' @@ -23490,34 +23744,34 @@ new $P1048, "Undef" .lex "$past", $P1048 find_lex $P1051, "$/" - unless_null $P1051, vivify_363 + unless_null $P1051, vivify_368 $P1051 = root_new ['parrot';'Hash'] - vivify_363: + vivify_368: set $P1052, $P1051["block"] - unless_null $P1052, vivify_364 + unless_null $P1052, vivify_369 new $P1052, "Undef" - vivify_364: + vivify_369: if $P1052, if_1050 find_lex $P1056, "$/" - unless_null $P1056, vivify_365 + unless_null $P1056, vivify_370 $P1056 = root_new ['parrot';'Hash'] - vivify_365: + vivify_370: set $P1057, $P1056["comp_unit"] - unless_null $P1057, vivify_366 + unless_null $P1057, vivify_371 new $P1057, "Undef" - vivify_366: + vivify_371: $P1058 = $P1057."ast"() set $P1049, $P1058 goto if_1050_end if_1050: find_lex $P1053, "$/" - unless_null $P1053, vivify_367 + unless_null $P1053, vivify_372 $P1053 = root_new ['parrot';'Hash'] - vivify_367: + vivify_372: set $P1054, $P1053["block"] - unless_null $P1054, vivify_368 + unless_null $P1054, vivify_373 new $P1054, "Undef" - vivify_368: + vivify_373: $P1055 = $P1054."ast"() set $P1049, $P1055 if_1050_end: @@ -23525,17 +23779,17 @@ .annotate 'line', 392 find_lex $P1059, "$past" find_lex $P1060, "$/" - unless_null $P1060, vivify_369 + unless_null $P1060, vivify_374 $P1060 = root_new ['parrot';'Hash'] - vivify_369: + vivify_374: set $P1061, $P1060["name"] - unless_null $P1061, vivify_370 + unless_null $P1061, vivify_375 $P1061 = root_new ['parrot';'Hash'] - vivify_370: + vivify_375: set $P1062, $P1061["identifier"] - unless_null $P1062, vivify_371 + unless_null $P1062, vivify_376 new $P1062, "Undef" - vivify_371: + vivify_376: $P1059."namespace"($P1062) .annotate 'line', 393 find_lex $P1063, "$past" @@ -23556,7 +23810,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "scope_declarator:sym" :subid("65_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "scope_declarator:sym" :subid("65_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1071 .annotate 'line', 397 new $P1070, 'ExceptionHandler' @@ -23567,13 +23821,13 @@ .lex "$/", param_1071 find_lex $P1072, "$/" find_lex $P1073, "$/" - unless_null $P1073, vivify_372 + unless_null $P1073, vivify_377 $P1073 = root_new ['parrot';'Hash'] - vivify_372: + vivify_377: set $P1074, $P1073["scoped"] - unless_null $P1074, vivify_373 + unless_null $P1074, vivify_378 new $P1074, "Undef" - vivify_373: + vivify_378: $P1075 = $P1074."ast"() $P1076 = $P1072."!make"($P1075) .return ($P1076) @@ -23587,7 +23841,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "scope_declarator:sym" :subid("66_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "scope_declarator:sym" :subid("66_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1081 .annotate 'line', 398 new $P1080, 'ExceptionHandler' @@ -23598,13 +23852,13 @@ .lex "$/", param_1081 find_lex $P1082, "$/" find_lex $P1083, "$/" - unless_null $P1083, vivify_374 + unless_null $P1083, vivify_379 $P1083 = root_new ['parrot';'Hash'] - vivify_374: + vivify_379: set $P1084, $P1083["scoped"] - unless_null $P1084, vivify_375 + unless_null $P1084, vivify_380 new $P1084, "Undef" - vivify_375: + vivify_380: $P1085 = $P1084."ast"() $P1086 = $P1082."!make"($P1085) .return ($P1086) @@ -23618,7 +23872,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "scope_declarator:sym" :subid("67_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "scope_declarator:sym" :subid("67_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1091 .annotate 'line', 399 new $P1090, 'ExceptionHandler' @@ -23629,13 +23883,13 @@ .lex "$/", param_1091 find_lex $P1092, "$/" find_lex $P1093, "$/" - unless_null $P1093, vivify_376 + unless_null $P1093, vivify_381 $P1093 = root_new ['parrot';'Hash'] - vivify_376: + vivify_381: set $P1094, $P1093["scoped"] - unless_null $P1094, vivify_377 + unless_null $P1094, vivify_382 new $P1094, "Undef" - vivify_377: + vivify_382: $P1095 = $P1094."ast"() $P1096 = $P1092."!make"($P1095) .return ($P1096) @@ -23649,7 +23903,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "scoped" :subid("68_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "scoped" :subid("68_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1101 .annotate 'line', 401 new $P1100, 'ExceptionHandler' @@ -23662,36 +23916,36 @@ find_lex $P1102, "$/" .annotate 'line', 403 find_lex $P1105, "$/" - unless_null $P1105, vivify_378 + unless_null $P1105, vivify_383 $P1105 = root_new ['parrot';'Hash'] - vivify_378: + vivify_383: set $P1106, $P1105["declarator"] - unless_null $P1106, vivify_379 + unless_null $P1106, vivify_384 new $P1106, "Undef" - vivify_379: + vivify_384: if $P1106, if_1104 .annotate 'line', 404 find_lex $P1110, "$/" - unless_null $P1110, vivify_380 + unless_null $P1110, vivify_385 $P1110 = root_new ['parrot';'Hash'] - vivify_380: + vivify_385: set $P1111, $P1110["multi_declarator"] - unless_null $P1111, vivify_381 + unless_null $P1111, vivify_386 new $P1111, "Undef" - vivify_381: + vivify_386: $P1112 = $P1111."ast"() set $P1103, $P1112 .annotate 'line', 403 goto if_1104_end if_1104: find_lex $P1107, "$/" - unless_null $P1107, vivify_382 + unless_null $P1107, vivify_387 $P1107 = root_new ['parrot';'Hash'] - vivify_382: + vivify_387: set $P1108, $P1107["declarator"] - unless_null $P1108, vivify_383 + unless_null $P1108, vivify_388 new $P1108, "Undef" - vivify_383: + vivify_388: $P1109 = $P1108."ast"() set $P1103, $P1109 if_1104_end: @@ -23708,7 +23962,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "declarator" :subid("69_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "declarator" :subid("69_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1118 .annotate 'line', 407 new $P1117, 'ExceptionHandler' @@ -23721,36 +23975,36 @@ find_lex $P1119, "$/" .annotate 'line', 409 find_lex $P1122, "$/" - unless_null $P1122, vivify_384 + unless_null $P1122, vivify_389 $P1122 = root_new ['parrot';'Hash'] - vivify_384: + vivify_389: set $P1123, $P1122["routine_declarator"] - unless_null $P1123, vivify_385 + unless_null $P1123, vivify_390 new $P1123, "Undef" - vivify_385: + vivify_390: if $P1123, if_1121 .annotate 'line', 410 find_lex $P1127, "$/" - unless_null $P1127, vivify_386 + unless_null $P1127, vivify_391 $P1127 = root_new ['parrot';'Hash'] - vivify_386: + vivify_391: set $P1128, $P1127["variable_declarator"] - unless_null $P1128, vivify_387 + unless_null $P1128, vivify_392 new $P1128, "Undef" - vivify_387: + vivify_392: $P1129 = $P1128."ast"() set $P1120, $P1129 .annotate 'line', 409 goto if_1121_end if_1121: find_lex $P1124, "$/" - unless_null $P1124, vivify_388 + unless_null $P1124, vivify_393 $P1124 = root_new ['parrot';'Hash'] - vivify_388: + vivify_393: set $P1125, $P1124["routine_declarator"] - unless_null $P1125, vivify_389 + unless_null $P1125, vivify_394 new $P1125, "Undef" - vivify_389: + vivify_394: $P1126 = $P1125."ast"() set $P1120, $P1126 if_1121_end: @@ -23767,7 +24021,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "multi_declarator:sym" :subid("70_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "multi_declarator:sym" :subid("70_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1135 .annotate 'line', 413 new $P1134, 'ExceptionHandler' @@ -23778,34 +24032,34 @@ .lex "$/", param_1135 find_lex $P1136, "$/" find_lex $P1139, "$/" - unless_null $P1139, vivify_390 + unless_null $P1139, vivify_395 $P1139 = root_new ['parrot';'Hash'] - vivify_390: + vivify_395: set $P1140, $P1139["declarator"] - unless_null $P1140, vivify_391 + unless_null $P1140, vivify_396 new $P1140, "Undef" - vivify_391: + vivify_396: if $P1140, if_1138 find_lex $P1144, "$/" - unless_null $P1144, vivify_392 + unless_null $P1144, vivify_397 $P1144 = root_new ['parrot';'Hash'] - vivify_392: + vivify_397: set $P1145, $P1144["routine_def"] - unless_null $P1145, vivify_393 + unless_null $P1145, vivify_398 new $P1145, "Undef" - vivify_393: + vivify_398: $P1146 = $P1145."ast"() set $P1137, $P1146 goto if_1138_end if_1138: find_lex $P1141, "$/" - unless_null $P1141, vivify_394 + unless_null $P1141, vivify_399 $P1141 = root_new ['parrot';'Hash'] - vivify_394: + vivify_399: set $P1142, $P1141["declarator"] - unless_null $P1142, vivify_395 + unless_null $P1142, vivify_400 new $P1142, "Undef" - vivify_395: + vivify_400: $P1143 = $P1142."ast"() set $P1137, $P1143 if_1138_end: @@ -23821,7 +24075,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "multi_declarator:sym" :subid("71_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "multi_declarator:sym" :subid("71_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1152 .annotate 'line', 414 new $P1151, 'ExceptionHandler' @@ -23832,13 +24086,13 @@ .lex "$/", param_1152 find_lex $P1153, "$/" find_lex $P1154, "$/" - unless_null $P1154, vivify_396 + unless_null $P1154, vivify_401 $P1154 = root_new ['parrot';'Hash'] - vivify_396: + vivify_401: set $P1155, $P1154["declarator"] - unless_null $P1155, vivify_397 + unless_null $P1155, vivify_402 new $P1155, "Undef" - vivify_397: + vivify_402: $P1156 = $P1155."ast"() $P1157 = $P1153."!make"($P1156) .return ($P1157) @@ -23852,10 +24106,10 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "variable_declarator" :subid("72_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "variable_declarator" :subid("72_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1162 .annotate 'line', 417 - .const 'Sub' $P1202 = "73_1282016534.58916" + .const 'Sub' $P1202 = "73_1284728484.24945" capture_lex $P1202 new $P1161, 'ExceptionHandler' set_addr $P1161, control_1160 @@ -23877,28 +24131,28 @@ .lex "$BLOCK", $P1166 .annotate 'line', 418 find_lex $P1167, "$/" - unless_null $P1167, vivify_398 + unless_null $P1167, vivify_403 $P1167 = root_new ['parrot';'Hash'] - vivify_398: + vivify_403: set $P1168, $P1167["variable"] - unless_null $P1168, vivify_399 + unless_null $P1168, vivify_404 new $P1168, "Undef" - vivify_399: + vivify_404: $P1169 = $P1168."ast"() store_lex "$past", $P1169 .annotate 'line', 419 find_lex $P1170, "$/" - unless_null $P1170, vivify_400 + unless_null $P1170, vivify_405 $P1170 = root_new ['parrot';'Hash'] - vivify_400: + vivify_405: set $P1171, $P1170["variable"] - unless_null $P1171, vivify_401 + unless_null $P1171, vivify_406 $P1171 = root_new ['parrot';'Hash'] - vivify_401: + vivify_406: set $P1172, $P1171["sigil"] - unless_null $P1172, vivify_402 + unless_null $P1172, vivify_407 new $P1172, "Undef" - vivify_402: + vivify_407: store_lex "$sigil", $P1172 .annotate 'line', 420 find_lex $P1173, "$past" @@ -23906,13 +24160,13 @@ store_lex "$name", $P1174 .annotate 'line', 421 get_global $P1175, "@BLOCK" - unless_null $P1175, vivify_403 + unless_null $P1175, vivify_408 $P1175 = root_new ['parrot';'ResizablePMCArray'] - vivify_403: + vivify_408: set $P1176, $P1175[0] - unless_null $P1176, vivify_404 + unless_null $P1176, vivify_409 new $P1176, "Undef" - vivify_404: + vivify_409: store_lex "$BLOCK", $P1176 .annotate 'line', 422 find_lex $P1178, "$BLOCK" @@ -23927,17 +24181,17 @@ if_1177_end: .annotate 'line', 425 find_dynamic_lex $P1185, "$*SCOPE" - unless_null $P1185, vivify_405 + unless_null $P1185, vivify_410 get_hll_global $P1185, "$SCOPE" - unless_null $P1185, vivify_406 + unless_null $P1185, vivify_411 die "Contextual $*SCOPE not found" - vivify_406: - vivify_405: + vivify_411: + vivify_410: set $S1186, $P1185 iseq $I1187, $S1186, "has" if $I1187, if_1184 .annotate 'line', 434 - .const 'Sub' $P1202 = "73_1282016534.58916" + .const 'Sub' $P1202 = "73_1284728484.24945" capture_lex $P1202 $P1202() goto if_1184_end @@ -23948,33 +24202,33 @@ $P1188."symbol"($P1189, "attribute" :named("scope")) .annotate 'line', 427 find_lex $P1191, "$BLOCK" - unless_null $P1191, vivify_411 + unless_null $P1191, vivify_416 $P1191 = root_new ['parrot';'Hash'] - vivify_411: + vivify_416: set $P1192, $P1191["attributes"] - unless_null $P1192, vivify_412 + unless_null $P1192, vivify_417 new $P1192, "Undef" - vivify_412: + vivify_417: 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" - unless_null $P1195, vivify_413 + unless_null $P1195, vivify_418 $P1195 = root_new ['parrot';'Hash'] store_lex "$BLOCK", $P1195 - vivify_413: + vivify_418: set $P1195["attributes"], $P1194 unless_1190_end: .annotate 'line', 431 find_lex $P1196, "$BLOCK" - unless_null $P1196, vivify_414 + unless_null $P1196, vivify_419 $P1196 = root_new ['parrot';'Hash'] - vivify_414: + vivify_419: set $P1197, $P1196["attributes"] - unless_null $P1197, vivify_415 + unless_null $P1197, vivify_420 new $P1197, "Undef" - vivify_415: + vivify_420: find_lex $P1198, "$name" $P1197."push"($P1198) .annotate 'line', 432 @@ -23997,7 +24251,7 @@ .namespace ["NQP";"Actions"] -.sub "_block1201" :anon :subid("73_1282016534.58916") :outer("72_1282016534.58916") +.sub "_block1201" :anon :subid("73_1284728484.24945") :outer("72_1284728484.24945") .annotate 'line', 435 new $P1203, "Undef" .lex "$scope", $P1203 @@ -24006,12 +24260,12 @@ .lex "$decl", $P1204 .annotate 'line', 435 find_dynamic_lex $P1207, "$*SCOPE" - unless_null $P1207, vivify_407 + unless_null $P1207, vivify_412 get_hll_global $P1207, "$SCOPE" - unless_null $P1207, vivify_408 + unless_null $P1207, vivify_413 die "Contextual $*SCOPE not found" - vivify_408: - vivify_407: + vivify_413: + vivify_412: set $S1208, $P1207 iseq $I1209, $S1208, "our" if $I1209, if_1206 @@ -24043,13 +24297,13 @@ $P1219."symbol"($P1220, $P1221 :named("scope")) .annotate 'line', 440 find_lex $P1222, "$BLOCK" - unless_null $P1222, vivify_409 + unless_null $P1222, vivify_414 $P1222 = root_new ['parrot';'ResizablePMCArray'] - vivify_409: + vivify_414: set $P1223, $P1222[0] - unless_null $P1223, vivify_410 + unless_null $P1223, vivify_415 new $P1223, "Undef" - vivify_410: + vivify_415: find_lex $P1224, "$decl" $P1225 = $P1223."push"($P1224) .annotate 'line', 434 @@ -24059,7 +24313,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "routine_declarator:sym" :subid("74_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "routine_declarator:sym" :subid("74_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1233 .annotate 'line', 445 new $P1232, 'ExceptionHandler' @@ -24070,13 +24324,13 @@ .lex "$/", param_1233 find_lex $P1234, "$/" find_lex $P1235, "$/" - unless_null $P1235, vivify_416 + unless_null $P1235, vivify_421 $P1235 = root_new ['parrot';'Hash'] - vivify_416: + vivify_421: set $P1236, $P1235["routine_def"] - unless_null $P1236, vivify_417 + unless_null $P1236, vivify_422 new $P1236, "Undef" - vivify_417: + vivify_422: $P1237 = $P1236."ast"() $P1238 = $P1234."!make"($P1237) .return ($P1238) @@ -24090,7 +24344,7 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "routine_declarator:sym" :subid("75_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "routine_declarator:sym" :subid("75_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1243 .annotate 'line', 446 new $P1242, 'ExceptionHandler' @@ -24101,13 +24355,13 @@ .lex "$/", param_1243 find_lex $P1244, "$/" find_lex $P1245, "$/" - unless_null $P1245, vivify_418 + unless_null $P1245, vivify_423 $P1245 = root_new ['parrot';'Hash'] - vivify_418: + vivify_423: set $P1246, $P1245["method_def"] - unless_null $P1246, vivify_419 + unless_null $P1246, vivify_424 new $P1246, "Undef" - vivify_419: + vivify_424: $P1247 = $P1246."ast"() $P1248 = $P1244."!make"($P1247) .return ($P1248) @@ -24121,11 +24375,13 @@ .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "routine_def" :subid("76_1282016534.58916") :method :outer("11_1282016534.58916") +.sub "routine_def" :subid("76_1284728484.24945") :method :outer("11_1284728484.24945") .param pmc param_1253 .annotate 'line', 448 - .const 'Sub' $P1264 = "77_1282016534.58916" - capture_lex $P1264 + .const 'Sub' $P1312 = "78_1284728484.24945" + capture_lex $P1312 + .const 'Sub' $P1266 = "77_1284728484.24945" + capture_lex $P1266 new $P1252, 'ExceptionHandler' set_addr $P1252, control_1251 $P1252."handle_types"(.CONTROL_RETURN) @@ -24134,3530 +24390,3848 @@ .lex "$/", param_1253 .annotate 'line', 449 new $P1254, "Undef" - .lex "$past", $P1254 - find_lex $P1255, "$/" - unless_null $P1255, vivify_420 - $P1255 = root_new ['parrot';'Hash'] - vivify_420: - set $P1256, $P1255["blockoid"] - unless_null $P1256, vivify_421 - new $P1256, "Undef" - vivify_421: - $P1257 = $P1256."ast"() - store_lex "$past", $P1257 + .lex "$block", $P1254 +.annotate 'line', 452 + new $P1255, "Undef" + .lex "$past", $P1255 +.annotate 'line', 449 + find_lex $P1256, "$/" + unless_null $P1256, vivify_425 + $P1256 = root_new ['parrot';'Hash'] + vivify_425: + set $P1257, $P1256["blockoid"] + unless_null $P1257, vivify_426 + new $P1257, "Undef" + vivify_426: + $P1258 = $P1257."ast"() + store_lex "$block", $P1258 .annotate 'line', 450 - find_lex $P1258, "$past" - $P1258."blocktype"("declaration") + find_lex $P1259, "$block" + $P1259."blocktype"("declaration") .annotate 'line', 451 - find_lex $P1259, "$past" - $P1259."control"("return_pir") + find_lex $P1260, "$block" + $P1260."control"("return_pir") .annotate 'line', 452 - find_lex $P1261, "$/" - unless_null $P1261, vivify_422 - $P1261 = root_new ['parrot';'Hash'] - vivify_422: - set $P1262, $P1261["deflongname"] - unless_null $P1262, vivify_423 - new $P1262, "Undef" - vivify_423: - unless $P1262, if_1260_end - .const 'Sub' $P1264 = "77_1282016534.58916" - capture_lex $P1264 - $P1264() - if_1260_end: -.annotate 'line', 462 - find_lex $P1296, "$/" - find_lex $P1297, "$past" - $P1298 = $P1296."!make"($P1297) + find_lex $P1261, "$block" + store_lex "$past", $P1261 +.annotate 'line', 453 + find_lex $P1263, "$/" + unless_null $P1263, vivify_427 + $P1263 = root_new ['parrot';'Hash'] + vivify_427: + set $P1264, $P1263["deflongname"] + unless_null $P1264, vivify_428 + new $P1264, "Undef" + vivify_428: + unless $P1264, if_1262_end + .const 'Sub' $P1266 = "77_1284728484.24945" + capture_lex $P1266 + $P1266() + if_1262_end: +.annotate 'line', 463 + find_lex $P1298, "$block" + find_lex $P1299, "$past" + unless_null $P1299, vivify_442 + $P1299 = root_new ['parrot';'Hash'] + store_lex "$past", $P1299 + vivify_442: + set $P1299["block_past"], $P1298 +.annotate 'line', 464 + find_lex $P1300, "$/" + find_lex $P1301, "$past" + $P1300."!make"($P1301) +.annotate 'line', 465 + find_lex $P1304, "$/" + unless_null $P1304, vivify_443 + $P1304 = root_new ['parrot';'Hash'] + vivify_443: + set $P1305, $P1304["trait"] + unless_null $P1305, vivify_444 + new $P1305, "Undef" + vivify_444: + if $P1305, if_1303 + set $P1302, $P1305 + goto if_1303_end + if_1303: +.annotate 'line', 466 + find_lex $P1307, "$/" + unless_null $P1307, vivify_445 + $P1307 = root_new ['parrot';'Hash'] + vivify_445: + set $P1308, $P1307["trait"] + unless_null $P1308, vivify_446 + new $P1308, "Undef" + vivify_446: + defined $I1309, $P1308 + unless $I1309, for_undef_447 + iter $P1306, $P1308 + new $P1319, 'ExceptionHandler' + set_addr $P1319, loop1318_handler + $P1319."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1319 + loop1318_test: + unless $P1306, loop1318_done + shift $P1310, $P1306 + loop1318_redo: + .const 'Sub' $P1312 = "78_1284728484.24945" + capture_lex $P1312 + $P1312($P1310) + loop1318_next: + goto loop1318_test + loop1318_handler: + .local pmc exception + .get_results (exception) + getattribute $P1320, exception, 'type' + eq $P1320, .CONTROL_LOOP_NEXT, loop1318_next + eq $P1320, .CONTROL_LOOP_REDO, loop1318_redo + loop1318_done: + pop_eh + for_undef_447: +.annotate 'line', 465 + set $P1302, $P1306 + if_1303_end: .annotate 'line', 448 - .return ($P1298) + .return ($P1302) control_1251: .local pmc exception .get_results (exception) - getattribute $P1299, exception, "payload" - .return ($P1299) + getattribute $P1321, exception, "payload" + .return ($P1321) .end .namespace ["NQP";"Actions"] -.sub "_block1263" :anon :subid("77_1282016534.58916") :outer("76_1282016534.58916") -.annotate 'line', 453 - new $P1265, "Undef" - .lex "$name", $P1265 - find_lex $P1266, "$/" - unless_null $P1266, vivify_424 - $P1266 = root_new ['parrot';'Hash'] - vivify_424: - set $P1267, $P1266["sigil"] - unless_null $P1267, vivify_425 - $P1267 = root_new ['parrot';'ResizablePMCArray'] - vivify_425: - set $P1268, $P1267[0] - unless_null $P1268, vivify_426 - new $P1268, "Undef" - vivify_426: - set $S1269, $P1268 - new $P1270, 'String' - set $P1270, $S1269 - find_lex $P1271, "$/" - unless_null $P1271, vivify_427 - $P1271 = root_new ['parrot';'Hash'] - vivify_427: - set $P1272, $P1271["deflongname"] - unless_null $P1272, vivify_428 - $P1272 = root_new ['parrot';'ResizablePMCArray'] - vivify_428: - set $P1273, $P1272[0] - unless_null $P1273, vivify_429 - new $P1273, "Undef" +.sub "_block1265" :anon :subid("77_1284728484.24945") :outer("76_1284728484.24945") +.annotate 'line', 454 + new $P1267, "Undef" + .lex "$name", $P1267 + find_lex $P1268, "$/" + unless_null $P1268, vivify_429 + $P1268 = root_new ['parrot';'Hash'] vivify_429: - $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" - unless_null $P1280, vivify_431 - die "Contextual $*SCOPE not found" - vivify_431: + set $P1269, $P1268["sigil"] + unless_null $P1269, vivify_430 + $P1269 = root_new ['parrot';'ResizablePMCArray'] vivify_430: - set $S1281, $P1280 - isne $I1282, $S1281, "our" - if $I1282, if_1279 - new $P1278, 'Integer' - 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'] + set $P1270, $P1269[0] + unless_null $P1270, vivify_431 + new $P1270, "Undef" + vivify_431: + set $S1271, $P1270 + new $P1272, 'String' + set $P1272, $S1271 + find_lex $P1273, "$/" + unless_null $P1273, vivify_432 + $P1273 = root_new ['parrot';'Hash'] vivify_432: - set $P1284, $P1283[0] - unless_null $P1284, vivify_433 - $P1284 = root_new ['parrot';'ResizablePMCArray'] + set $P1274, $P1273["deflongname"] + unless_null $P1274, vivify_433 + $P1274 = root_new ['parrot';'ResizablePMCArray'] vivify_433: - set $P1285, $P1284[0] - unless_null $P1285, vivify_434 - new $P1285, "Undef" + set $P1275, $P1274[0] + unless_null $P1275, vivify_434 + new $P1275, "Undef" vivify_434: - get_hll_global $P1286, ["PAST"], "Var" - find_lex $P1287, "$name" - 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'] - vivify_435: - set $P1291, $P1290[0] - unless_null $P1291, vivify_436 - new $P1291, "Undef" + $S1276 = $P1275."ast"() + concat $P1277, $P1272, $S1276 + store_lex "$name", $P1277 +.annotate 'line', 455 + find_lex $P1278, "$past" + find_lex $P1279, "$name" + $P1278."name"($P1279) +.annotate 'line', 456 + find_dynamic_lex $P1282, "$*SCOPE" + unless_null $P1282, vivify_435 + get_hll_global $P1282, "$SCOPE" + unless_null $P1282, vivify_436 + die "Contextual $*SCOPE not found" vivify_436: - find_lex $P1292, "$name" - $P1291."symbol"($P1292, "lexical" :named("scope")) + vivify_435: + set $S1283, $P1282 + isne $I1284, $S1283, "our" + if $I1284, if_1281 + new $P1280, 'Integer' + set $P1280, $I1284 + goto if_1281_end + if_1281: +.annotate 'line', 457 + get_global $P1285, "@BLOCK" + unless_null $P1285, vivify_437 + $P1285 = root_new ['parrot';'ResizablePMCArray'] + vivify_437: + set $P1286, $P1285[0] + unless_null $P1286, vivify_438 + $P1286 = root_new ['parrot';'ResizablePMCArray'] + vivify_438: + set $P1287, $P1286[0] + unless_null $P1287, vivify_439 + new $P1287, "Undef" + vivify_439: + get_hll_global $P1288, ["PAST"], "Var" + find_lex $P1289, "$name" + find_lex $P1290, "$past" + $P1291 = $P1288."new"($P1289 :named("name"), 1 :named("isdecl"), $P1290 :named("viviself"), "lexical" :named("scope")) + $P1287."push"($P1291) .annotate 'line', 459 - get_hll_global $P1293, ["PAST"], "Var" + get_global $P1292, "@BLOCK" + unless_null $P1292, vivify_440 + $P1292 = root_new ['parrot';'ResizablePMCArray'] + vivify_440: + set $P1293, $P1292[0] + unless_null $P1293, vivify_441 + new $P1293, "Undef" + vivify_441: 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) + $P1293."symbol"($P1294, "lexical" :named("scope")) +.annotate 'line', 460 + get_hll_global $P1295, ["PAST"], "Var" + find_lex $P1296, "$name" + $P1297 = $P1295."new"($P1296 :named("name")) + store_lex "$past", $P1297 +.annotate 'line', 456 + set $P1280, $P1297 + if_1281_end: +.annotate 'line', 453 + .return ($P1280) .end .namespace ["NQP";"Actions"] -.include "except_types.pasm" -.sub "method_def" :subid("78_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1303 +.sub "_block1311" :anon :subid("78_1284728484.24945") :outer("76_1284728484.24945") + .param pmc param_1313 .annotate 'line', 466 - .const 'Sub' $P1324 = "79_1282016534.58916" - capture_lex $P1324 - new $P1302, 'ExceptionHandler' - set_addr $P1302, control_1301 - $P1302."handle_types"(.CONTROL_RETURN) - push_eh $P1302 + .lex "$_", param_1313 + find_lex $P1314, "$_" + $P1315 = $P1314."ast"() + find_lex $P1316, "$/" + $P1317 = $P1315($P1316) + .return ($P1317) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "method_def" :subid("79_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1325 +.annotate 'line', 471 + .const 'Sub' $P1377 = "81_1284728484.24945" + capture_lex $P1377 + .const 'Sub' $P1346 = "80_1284728484.24945" + capture_lex $P1346 + new $P1324, 'ExceptionHandler' + set_addr $P1324, control_1323 + $P1324."handle_types"(.CONTROL_RETURN) + push_eh $P1324 .lex "self", self - .lex "$/", param_1303 -.annotate 'line', 467 - new $P1304, "Undef" - .lex "$past", $P1304 - find_lex $P1305, "$/" - unless_null $P1305, vivify_437 - $P1305 = root_new ['parrot';'Hash'] - vivify_437: - set $P1306, $P1305["blockoid"] - unless_null $P1306, vivify_438 - new $P1306, "Undef" - 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" - unless_null $P1310, vivify_440 - die "Contextual $*SCOPE not found" - vivify_440: - vivify_439: - 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: + .lex "$/", param_1325 .annotate 'line', 472 - find_lex $P1314, "$past" - $P1314."control"("return_pir") + new $P1326, "Undef" + .lex "$past", $P1326 + find_lex $P1327, "$/" + unless_null $P1327, vivify_448 + $P1327 = root_new ['parrot';'Hash'] + vivify_448: + set $P1328, $P1327["blockoid"] + unless_null $P1328, vivify_449 + new $P1328, "Undef" + vivify_449: + $P1329 = $P1328."ast"() + store_lex "$past", $P1329 .annotate 'line', 473 - find_lex $P1315, "$past" - unless_null $P1315, vivify_441 - $P1315 = root_new ['parrot';'ResizablePMCArray'] - vivify_441: - set $P1316, $P1315[0] - unless_null $P1316, vivify_442 - new $P1316, "Undef" - vivify_442: - get_hll_global $P1317, ["PAST"], "Op" - $P1318 = $P1317."new"(" .lex \"self\", self" :named("inline")) - $P1316."unshift"($P1318) + find_lex $P1330, "$past" + $P1330."blocktype"("method") .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'] - vivify_443: - set $P1322, $P1321["deflongname"] - unless_null $P1322, vivify_444 - new $P1322, "Undef" - vivify_444: - unless $P1322, if_1320_end - .const 'Sub' $P1324 = "79_1282016534.58916" - capture_lex $P1324 - $P1324() - if_1320_end: + find_dynamic_lex $P1332, "$*SCOPE" + unless_null $P1332, vivify_450 + get_hll_global $P1332, "$SCOPE" + unless_null $P1332, vivify_451 + die "Contextual $*SCOPE not found" + vivify_451: + vivify_450: + set $S1333, $P1332 + iseq $I1334, $S1333, "our" + unless $I1334, if_1331_end +.annotate 'line', 475 + find_lex $P1335, "$past" + $P1335."pirflags"(":nsentry") + if_1331_end: +.annotate 'line', 477 + find_lex $P1336, "$past" + $P1336."control"("return_pir") +.annotate 'line', 478 + find_lex $P1337, "$past" + unless_null $P1337, vivify_452 + $P1337 = root_new ['parrot';'ResizablePMCArray'] + vivify_452: + set $P1338, $P1337[0] + unless_null $P1338, vivify_453 + new $P1338, "Undef" + vivify_453: + get_hll_global $P1339, ["PAST"], "Op" + $P1340 = $P1339."new"(" .lex \"self\", self" :named("inline")) + $P1338."unshift"($P1340) .annotate 'line', 479 - find_dynamic_lex $P1336, "$*MULTINESS" - unless_null $P1336, vivify_448 - get_hll_global $P1336, "$MULTINESS" - unless_null $P1336, vivify_449 - die "Contextual $*MULTINESS not found" - vivify_449: - vivify_448: - set $S1337, $P1336 - iseq $I1338, $S1337, "multi" - unless $I1338, if_1335_end - find_lex $P1339, "$past" - $P1340 = $P1339."multi"() - $P1340."unshift"("_") - if_1335_end: + find_lex $P1341, "$past" + $P1341."symbol"("self", "lexical" :named("scope")) .annotate 'line', 480 - find_lex $P1341, "$/" - find_lex $P1342, "$past" - $P1343 = $P1341."!make"($P1342) -.annotate 'line', 466 - .return ($P1343) - control_1301: + find_lex $P1343, "$/" + unless_null $P1343, vivify_454 + $P1343 = root_new ['parrot';'Hash'] + vivify_454: + set $P1344, $P1343["deflongname"] + unless_null $P1344, vivify_455 + new $P1344, "Undef" + vivify_455: + unless $P1344, if_1342_end + .const 'Sub' $P1346 = "80_1284728484.24945" + capture_lex $P1346 + $P1346() + if_1342_end: +.annotate 'line', 484 + find_dynamic_lex $P1358, "$*MULTINESS" + unless_null $P1358, vivify_459 + get_hll_global $P1358, "$MULTINESS" + unless_null $P1358, vivify_460 + die "Contextual $*MULTINESS not found" + vivify_460: + vivify_459: + set $S1359, $P1358 + iseq $I1360, $S1359, "multi" + unless $I1360, if_1357_end + find_lex $P1361, "$past" + $P1362 = $P1361."multi"() + $P1362."unshift"("_") + if_1357_end: +.annotate 'line', 485 + find_lex $P1363, "$past" + find_lex $P1364, "$past" + unless_null $P1364, vivify_461 + $P1364 = root_new ['parrot';'Hash'] + store_lex "$past", $P1364 + vivify_461: + set $P1364["block_past"], $P1363 +.annotate 'line', 486 + find_lex $P1365, "$/" + find_lex $P1366, "$past" + $P1365."!make"($P1366) +.annotate 'line', 487 + find_lex $P1369, "$/" + unless_null $P1369, vivify_462 + $P1369 = root_new ['parrot';'Hash'] + vivify_462: + set $P1370, $P1369["trait"] + unless_null $P1370, vivify_463 + new $P1370, "Undef" + vivify_463: + if $P1370, if_1368 + set $P1367, $P1370 + goto if_1368_end + if_1368: +.annotate 'line', 488 + find_lex $P1372, "$/" + unless_null $P1372, vivify_464 + $P1372 = root_new ['parrot';'Hash'] + vivify_464: + set $P1373, $P1372["trait"] + unless_null $P1373, vivify_465 + new $P1373, "Undef" + vivify_465: + defined $I1374, $P1373 + unless $I1374, for_undef_466 + iter $P1371, $P1373 + new $P1384, 'ExceptionHandler' + set_addr $P1384, loop1383_handler + $P1384."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1384 + loop1383_test: + unless $P1371, loop1383_done + shift $P1375, $P1371 + loop1383_redo: + .const 'Sub' $P1377 = "81_1284728484.24945" + capture_lex $P1377 + $P1377($P1375) + loop1383_next: + goto loop1383_test + loop1383_handler: + .local pmc exception + .get_results (exception) + getattribute $P1385, exception, 'type' + eq $P1385, .CONTROL_LOOP_NEXT, loop1383_next + eq $P1385, .CONTROL_LOOP_REDO, loop1383_redo + loop1383_done: + pop_eh + for_undef_466: +.annotate 'line', 487 + set $P1367, $P1371 + if_1368_end: +.annotate 'line', 471 + .return ($P1367) + control_1323: .local pmc exception .get_results (exception) - getattribute $P1344, exception, "payload" - .return ($P1344) + getattribute $P1386, exception, "payload" + .return ($P1386) .end .namespace ["NQP";"Actions"] -.sub "_block1323" :anon :subid("79_1282016534.58916") :outer("78_1282016534.58916") -.annotate 'line', 476 - new $P1325, "Undef" - .lex "$name", $P1325 - find_lex $P1326, "$/" - unless_null $P1326, vivify_445 - $P1326 = root_new ['parrot';'Hash'] - vivify_445: - set $P1327, $P1326["deflongname"] - unless_null $P1327, vivify_446 - $P1327 = root_new ['parrot';'ResizablePMCArray'] - vivify_446: - set $P1328, $P1327[0] - unless_null $P1328, vivify_447 - new $P1328, "Undef" - vivify_447: - $P1329 = $P1328."ast"() - set $S1330, $P1329 - 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) +.sub "_block1345" :anon :subid("80_1284728484.24945") :outer("79_1284728484.24945") +.annotate 'line', 481 + new $P1347, "Undef" + .lex "$name", $P1347 + find_lex $P1348, "$/" + unless_null $P1348, vivify_456 + $P1348 = root_new ['parrot';'Hash'] + vivify_456: + set $P1349, $P1348["deflongname"] + unless_null $P1349, vivify_457 + $P1349 = root_new ['parrot';'ResizablePMCArray'] + vivify_457: + set $P1350, $P1349[0] + unless_null $P1350, vivify_458 + new $P1350, "Undef" + vivify_458: + $P1351 = $P1350."ast"() + set $S1352, $P1351 + new $P1353, 'String' + set $P1353, $S1352 + store_lex "$name", $P1353 +.annotate 'line', 482 + find_lex $P1354, "$past" + find_lex $P1355, "$name" + $P1356 = $P1354."name"($P1355) +.annotate 'line', 480 + .return ($P1356) +.end + + +.namespace ["NQP";"Actions"] +.sub "_block1376" :anon :subid("81_1284728484.24945") :outer("79_1284728484.24945") + .param pmc param_1378 +.annotate 'line', 488 + .lex "$_", param_1378 + find_lex $P1379, "$_" + $P1380 = $P1379."ast"() + find_lex $P1381, "$/" + $P1382 = $P1380($P1381) + .return ($P1382) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "signature" :subid("80_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1348 -.annotate 'line', 484 - .const 'Sub' $P1374 = "82_1282016534.58916" - capture_lex $P1374 - .const 'Sub' $P1359 = "81_1282016534.58916" - capture_lex $P1359 - new $P1347, 'ExceptionHandler' - set_addr $P1347, control_1346 - $P1347."handle_types"(.CONTROL_RETURN) - push_eh $P1347 - .lex "self", self - .lex "$/", param_1348 -.annotate 'line', 485 - new $P1349, "Undef" - .lex "$BLOCKINIT", $P1349 - get_global $P1350, "@BLOCK" - unless_null $P1350, vivify_450 - $P1350 = root_new ['parrot';'ResizablePMCArray'] - vivify_450: - set $P1351, $P1350[0] - unless_null $P1351, vivify_451 - $P1351 = root_new ['parrot';'ResizablePMCArray'] - vivify_451: - set $P1352, $P1351[0] - unless_null $P1352, vivify_452 - 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'] - vivify_453: - set $P1355, $P1354["parameter"] - unless_null $P1355, vivify_454 - new $P1355, "Undef" - vivify_454: - defined $I1356, $P1355 - unless $I1356, for_undef_455 - iter $P1353, $P1355 - new $P1366, 'ExceptionHandler' - set_addr $P1366, loop1365_handler - $P1366."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1366 - loop1365_test: - unless $P1353, loop1365_done - shift $P1357, $P1353 - loop1365_redo: - .const 'Sub' $P1359 = "81_1282016534.58916" - capture_lex $P1359 - $P1359($P1357) - loop1365_next: - goto loop1365_test - loop1365_handler: - .local pmc exception - .get_results (exception) - getattribute $P1367, exception, 'type' - eq $P1367, .CONTROL_LOOP_NEXT, loop1365_next - eq $P1367, .CONTROL_LOOP_REDO, loop1365_redo - loop1365_done: +.sub "signature" :subid("82_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1390 +.annotate 'line', 493 + .const 'Sub' $P1416 = "84_1284728484.24945" + capture_lex $P1416 + .const 'Sub' $P1401 = "83_1284728484.24945" + capture_lex $P1401 + new $P1389, 'ExceptionHandler' + set_addr $P1389, control_1388 + $P1389."handle_types"(.CONTROL_RETURN) + push_eh $P1389 + .lex "self", self + .lex "$/", param_1390 +.annotate 'line', 494 + new $P1391, "Undef" + .lex "$BLOCKINIT", $P1391 + get_global $P1392, "@BLOCK" + unless_null $P1392, vivify_467 + $P1392 = root_new ['parrot';'ResizablePMCArray'] + vivify_467: + set $P1393, $P1392[0] + unless_null $P1393, vivify_468 + $P1393 = root_new ['parrot';'ResizablePMCArray'] + vivify_468: + set $P1394, $P1393[0] + unless_null $P1394, vivify_469 + new $P1394, "Undef" + vivify_469: + store_lex "$BLOCKINIT", $P1394 +.annotate 'line', 496 + find_lex $P1396, "$/" + unless_null $P1396, vivify_470 + $P1396 = root_new ['parrot';'Hash'] + vivify_470: + set $P1397, $P1396["parameter"] + unless_null $P1397, vivify_471 + new $P1397, "Undef" + vivify_471: + defined $I1398, $P1397 + unless $I1398, for_undef_472 + iter $P1395, $P1397 + new $P1408, 'ExceptionHandler' + set_addr $P1408, loop1407_handler + $P1408."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1408 + loop1407_test: + unless $P1395, loop1407_done + shift $P1399, $P1395 + loop1407_redo: + .const 'Sub' $P1401 = "83_1284728484.24945" + capture_lex $P1401 + $P1401($P1399) + loop1407_next: + goto loop1407_test + loop1407_handler: + .local pmc exception + .get_results (exception) + getattribute $P1409, exception, 'type' + eq $P1409, .CONTROL_LOOP_NEXT, loop1407_next + eq $P1409, .CONTROL_LOOP_REDO, loop1407_redo + loop1407_done: pop_eh - for_undef_455: -.annotate 'line', 490 - find_dynamic_lex $P1370, "$*MULTINESS" - unless_null $P1370, vivify_456 - get_hll_global $P1370, "$MULTINESS" - unless_null $P1370, vivify_457 + for_undef_472: +.annotate 'line', 499 + find_dynamic_lex $P1412, "$*MULTINESS" + unless_null $P1412, vivify_473 + get_hll_global $P1412, "$MULTINESS" + unless_null $P1412, vivify_474 die "Contextual $*MULTINESS not found" - vivify_457: - vivify_456: - set $S1371, $P1370 - iseq $I1372, $S1371, "multi" - if $I1372, if_1369 - new $P1368, 'Integer' - set $P1368, $I1372 - goto if_1369_end - if_1369: - .const 'Sub' $P1374 = "82_1282016534.58916" - capture_lex $P1374 - $P1400 = $P1374() - set $P1368, $P1400 - if_1369_end: -.annotate 'line', 484 - .return ($P1368) - control_1346: + vivify_474: + vivify_473: + set $S1413, $P1412 + iseq $I1414, $S1413, "multi" + if $I1414, if_1411 + new $P1410, 'Integer' + set $P1410, $I1414 + goto if_1411_end + if_1411: + .const 'Sub' $P1416 = "84_1284728484.24945" + capture_lex $P1416 + $P1454 = $P1416() + set $P1410, $P1454 + if_1411_end: +.annotate 'line', 493 + .return ($P1410) + control_1388: .local pmc exception .get_results (exception) - getattribute $P1401, exception, "payload" - .return ($P1401) + getattribute $P1455, exception, "payload" + .return ($P1455) .end .namespace ["NQP";"Actions"] -.sub "_block1358" :anon :subid("81_1282016534.58916") :outer("80_1282016534.58916") - .param pmc param_1360 -.annotate 'line', 487 - .lex "$_", param_1360 - find_lex $P1361, "$BLOCKINIT" - find_lex $P1362, "$_" - $P1363 = $P1362."ast"() - $P1364 = $P1361."push"($P1363) - .return ($P1364) +.sub "_block1400" :anon :subid("83_1284728484.24945") :outer("82_1284728484.24945") + .param pmc param_1402 +.annotate 'line', 496 + .lex "$_", param_1402 + find_lex $P1403, "$BLOCKINIT" + find_lex $P1404, "$_" + $P1405 = $P1404."ast"() + $P1406 = $P1403."push"($P1405) + .return ($P1406) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "_block1373" :anon :subid("82_1282016534.58916") :outer("80_1282016534.58916") -.annotate 'line', 490 - .const 'Sub' $P1383 = "83_1282016534.58916" - 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 - unless $I1380, for_undef_458 - iter $P1377, $P1379 - new $P1394, 'ExceptionHandler' - set_addr $P1394, loop1393_handler - $P1394."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1394 - loop1393_test: - unless $P1377, loop1393_done - shift $P1381, $P1377 - loop1393_redo: - .const 'Sub' $P1383 = "83_1282016534.58916" - capture_lex $P1383 - $P1383($P1381) - loop1393_next: - goto loop1393_test - loop1393_handler: - .local pmc exception - .get_results (exception) - getattribute $P1395, exception, 'type' - eq $P1395, .CONTROL_LOOP_NEXT, loop1393_next - eq $P1395, .CONTROL_LOOP_REDO, loop1393_redo - loop1393_done: +.sub "_block1415" :anon :subid("84_1284728484.24945") :outer("82_1284728484.24945") +.annotate 'line', 499 + .const 'Sub' $P1425 = "85_1284728484.24945" + capture_lex $P1425 +.annotate 'line', 500 + $P1417 = root_new ['parrot';'ResizablePMCArray'] + .lex "@params", $P1417 +.annotate 'line', 499 + find_lex $P1418, "@params" +.annotate 'line', 501 + find_lex $P1420, "$BLOCKINIT" + $P1421 = $P1420."list"() + defined $I1422, $P1421 + unless $I1422, for_undef_475 + iter $P1419, $P1421 + new $P1448, 'ExceptionHandler' + set_addr $P1448, loop1447_handler + $P1448."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1448 + loop1447_test: + unless $P1419, loop1447_done + shift $P1423, $P1419 + loop1447_redo: + .const 'Sub' $P1425 = "85_1284728484.24945" + capture_lex $P1425 + $P1425($P1423) + loop1447_next: + goto loop1447_test + loop1447_handler: + .local pmc exception + .get_results (exception) + getattribute $P1449, exception, 'type' + eq $P1449, .CONTROL_LOOP_NEXT, loop1447_next + eq $P1449, .CONTROL_LOOP_REDO, loop1447_redo + loop1447_done: pop_eh - for_undef_458: -.annotate 'line', 495 - get_global $P1396, "@BLOCK" - unless_null $P1396, vivify_459 - $P1396 = root_new ['parrot';'ResizablePMCArray'] - vivify_459: - set $P1397, $P1396[0] - unless_null $P1397, vivify_460 - new $P1397, "Undef" - vivify_460: - find_lex $P1398, "@params" - $P1399 = $P1397."multi"($P1398) -.annotate 'line', 490 - .return ($P1399) + for_undef_475: +.annotate 'line', 505 + get_global $P1450, "@BLOCK" + unless_null $P1450, vivify_476 + $P1450 = root_new ['parrot';'ResizablePMCArray'] + vivify_476: + set $P1451, $P1450[0] + unless_null $P1451, vivify_477 + new $P1451, "Undef" + vivify_477: + find_lex $P1452, "@params" + $P1453 = $P1451."multi"($P1452) +.annotate 'line', 499 + .return ($P1453) .end .namespace ["NQP";"Actions"] -.sub "_block1382" :anon :subid("83_1282016534.58916") :outer("82_1282016534.58916") - .param pmc param_1384 -.annotate 'line', 492 - .lex "$_", param_1384 -.annotate 'line', 493 - find_lex $P1385, "@params" - find_lex $P1387, "$_" - $P1388 = $P1387."multitype"() - set $P1386, $P1388 - defined $I1390, $P1386 - if $I1390, default_1389 - new $P1391, "String" - assign $P1391, "_" - set $P1386, $P1391 - default_1389: - $P1392 = $P1385."push"($P1386) -.annotate 'line', 492 - .return ($P1392) +.sub "_block1424" :anon :subid("85_1284728484.24945") :outer("84_1284728484.24945") + .param pmc param_1426 +.annotate 'line', 501 + .lex "$_", param_1426 +.annotate 'line', 503 + find_lex $P1433, "$_" + $P1434 = $P1433."slurpy"() + unless $P1434, unless_1432 + set $P1431, $P1434 + goto unless_1432_end + unless_1432: + find_lex $P1435, "$_" + $P1436 = $P1435."named"() + set $P1431, $P1436 + unless_1432_end: + unless $P1431, unless_1430 + set $P1429, $P1431 + goto unless_1430_end + unless_1430: + find_lex $P1437, "$_" + $P1438 = $P1437."viviself"() + set $P1429, $P1438 + unless_1430_end: + unless $P1429, unless_1428 + set $P1427, $P1429 + goto unless_1428_end + unless_1428: +.annotate 'line', 502 + find_lex $P1439, "@params" + find_lex $P1441, "$_" + $P1442 = $P1441."multitype"() + set $P1440, $P1442 + defined $I1444, $P1440 + if $I1444, default_1443 + new $P1445, "String" + assign $P1445, "_" + set $P1440, $P1445 + default_1443: + $P1446 = $P1439."push"($P1440) + set $P1427, $P1446 + unless_1428_end: +.annotate 'line', 501 + .return ($P1427) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "parameter" :subid("84_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1405 -.annotate 'line', 499 - .const 'Sub' $P1486 = "85_1282016534.58916" - capture_lex $P1486 - new $P1404, 'ExceptionHandler' - set_addr $P1404, control_1403 - $P1404."handle_types"(.CONTROL_RETURN) - push_eh $P1404 - .lex "self", self - .lex "$/", param_1405 -.annotate 'line', 500 - new $P1406, "Undef" - .lex "$quant", $P1406 -.annotate 'line', 501 - new $P1407, "Undef" - .lex "$past", $P1407 -.annotate 'line', 500 - find_lex $P1408, "$/" - unless_null $P1408, vivify_461 - $P1408 = root_new ['parrot';'Hash'] - vivify_461: - set $P1409, $P1408["quant"] - unless_null $P1409, vivify_462 - new $P1409, "Undef" - vivify_462: - store_lex "$quant", $P1409 - find_lex $P1410, "$past" -.annotate 'line', 502 - find_lex $P1412, "$/" - unless_null $P1412, vivify_463 - $P1412 = root_new ['parrot';'Hash'] - vivify_463: - set $P1413, $P1412["named_param"] - unless_null $P1413, vivify_464 - new $P1413, "Undef" - vivify_464: - if $P1413, if_1411 +.sub "parameter" :subid("86_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1459 .annotate 'line', 509 - find_lex $P1427, "$/" - unless_null $P1427, vivify_465 - $P1427 = root_new ['parrot';'Hash'] - vivify_465: - set $P1428, $P1427["param_var"] - unless_null $P1428, vivify_466 - new $P1428, "Undef" - vivify_466: - $P1429 = $P1428."ast"() - store_lex "$past", $P1429 + .const 'Sub' $P1540 = "87_1284728484.24945" + capture_lex $P1540 + new $P1458, 'ExceptionHandler' + set_addr $P1458, control_1457 + $P1458."handle_types"(.CONTROL_RETURN) + push_eh $P1458 + .lex "self", self + .lex "$/", param_1459 .annotate 'line', 510 - find_lex $P1431, "$quant" - set $S1432, $P1431 - iseq $I1433, $S1432, "*" - if $I1433, if_1430 -.annotate 'line', 514 - find_lex $P1442, "$quant" - set $S1443, $P1442 - iseq $I1444, $S1443, "?" - unless $I1444, if_1441_end -.annotate 'line', 515 - find_lex $P1445, "$past" - find_lex $P1446, "$/" - unless_null $P1446, vivify_467 - $P1446 = root_new ['parrot';'Hash'] - vivify_467: - set $P1447, $P1446["param_var"] - unless_null $P1447, vivify_468 - $P1447 = root_new ['parrot';'Hash'] - vivify_468: - set $P1448, $P1447["sigil"] - unless_null $P1448, vivify_469 - new $P1448, "Undef" - vivify_469: - $P1449 = "vivitype"($P1448) - $P1445."viviself"($P1449) - if_1441_end: -.annotate 'line', 514 - goto if_1430_end - if_1430: + new $P1460, "Undef" + .lex "$quant", $P1460 .annotate 'line', 511 - find_lex $P1434, "$past" - $P1434."slurpy"(1) -.annotate 'line', 512 - find_lex $P1435, "$past" - find_lex $P1436, "$/" - unless_null $P1436, vivify_470 - $P1436 = root_new ['parrot';'Hash'] - vivify_470: - set $P1437, $P1436["param_var"] - unless_null $P1437, vivify_471 - $P1437 = root_new ['parrot';'Hash'] - vivify_471: - set $P1438, $P1437["sigil"] - unless_null $P1438, vivify_472 - new $P1438, "Undef" - vivify_472: - set $S1439, $P1438 - iseq $I1440, $S1439, "%" - $P1435."named"($I1440) - if_1430_end: -.annotate 'line', 508 - goto if_1411_end - if_1411: -.annotate 'line', 503 - find_lex $P1414, "$/" - unless_null $P1414, vivify_473 - $P1414 = root_new ['parrot';'Hash'] - vivify_473: - set $P1415, $P1414["named_param"] - unless_null $P1415, vivify_474 - new $P1415, "Undef" - vivify_474: - $P1416 = $P1415."ast"() - store_lex "$past", $P1416 -.annotate 'line', 504 - find_lex $P1418, "$quant" - set $S1419, $P1418 - isne $I1420, $S1419, "!" - unless $I1420, if_1417_end -.annotate 'line', 505 - find_lex $P1421, "$past" - find_lex $P1422, "$/" - unless_null $P1422, vivify_475 - $P1422 = root_new ['parrot';'Hash'] - vivify_475: - set $P1423, $P1422["named_param"] - unless_null $P1423, vivify_476 - $P1423 = root_new ['parrot';'Hash'] - vivify_476: - set $P1424, $P1423["param_var"] - unless_null $P1424, vivify_477 - $P1424 = root_new ['parrot';'Hash'] - vivify_477: - set $P1425, $P1424["sigil"] - unless_null $P1425, vivify_478 - new $P1425, "Undef" + new $P1461, "Undef" + .lex "$past", $P1461 +.annotate 'line', 510 + find_lex $P1462, "$/" + unless_null $P1462, vivify_478 + $P1462 = root_new ['parrot';'Hash'] vivify_478: - $P1426 = "vivitype"($P1425) - $P1421."viviself"($P1426) - if_1417_end: - if_1411_end: -.annotate 'line', 518 - find_lex $P1451, "$/" - unless_null $P1451, vivify_479 - $P1451 = root_new ['parrot';'Hash'] + set $P1463, $P1462["quant"] + unless_null $P1463, vivify_479 + new $P1463, "Undef" vivify_479: - set $P1452, $P1451["default_value"] - unless_null $P1452, vivify_480 - new $P1452, "Undef" - vivify_480: - unless $P1452, if_1450_end -.annotate 'line', 519 - find_lex $P1454, "$quant" - set $S1455, $P1454 - iseq $I1456, $S1455, "*" - unless $I1456, if_1453_end -.annotate 'line', 520 - find_lex $P1457, "$/" - $P1458 = $P1457."CURSOR"() - $P1458."panic"("Can't put default on slurpy parameter") - if_1453_end: -.annotate 'line', 522 - find_lex $P1460, "$quant" - set $S1461, $P1460 - iseq $I1462, $S1461, "!" - unless $I1462, if_1459_end -.annotate 'line', 523 - find_lex $P1463, "$/" - $P1464 = $P1463."CURSOR"() - $P1464."panic"("Can't put default on required parameter") - if_1459_end: -.annotate 'line', 525 - find_lex $P1465, "$past" + store_lex "$quant", $P1463 + find_lex $P1464, "$past" +.annotate 'line', 512 find_lex $P1466, "$/" - unless_null $P1466, vivify_481 + unless_null $P1466, vivify_480 $P1466 = root_new ['parrot';'Hash'] + vivify_480: + set $P1467, $P1466["named_param"] + unless_null $P1467, vivify_481 + new $P1467, "Undef" vivify_481: - set $P1467, $P1466["default_value"] - unless_null $P1467, vivify_482 - $P1467 = root_new ['parrot';'ResizablePMCArray'] + if $P1467, if_1465 +.annotate 'line', 519 + find_lex $P1481, "$/" + unless_null $P1481, vivify_482 + $P1481 = root_new ['parrot';'Hash'] vivify_482: - set $P1468, $P1467[0] - unless_null $P1468, vivify_483 - $P1468 = root_new ['parrot';'Hash'] + set $P1482, $P1481["param_var"] + unless_null $P1482, vivify_483 + new $P1482, "Undef" vivify_483: - set $P1469, $P1468["EXPR"] - unless_null $P1469, vivify_484 - new $P1469, "Undef" + $P1483 = $P1482."ast"() + store_lex "$past", $P1483 +.annotate 'line', 520 + find_lex $P1485, "$quant" + set $S1486, $P1485 + iseq $I1487, $S1486, "*" + if $I1487, if_1484 +.annotate 'line', 524 + find_lex $P1496, "$quant" + set $S1497, $P1496 + iseq $I1498, $S1497, "?" + unless $I1498, if_1495_end +.annotate 'line', 525 + find_lex $P1499, "$past" + find_lex $P1500, "$/" + unless_null $P1500, vivify_484 + $P1500 = root_new ['parrot';'Hash'] vivify_484: - $P1470 = $P1469."ast"() - $P1465."viviself"($P1470) - if_1450_end: -.annotate 'line', 527 - find_lex $P1472, "$past" - $P1473 = $P1472."viviself"() - if $P1473, unless_1471_end - get_global $P1474, "@BLOCK" - unless_null $P1474, vivify_485 - $P1474 = root_new ['parrot';'ResizablePMCArray'] + set $P1501, $P1500["param_var"] + unless_null $P1501, vivify_485 + $P1501 = root_new ['parrot';'Hash'] vivify_485: - set $P1475, $P1474[0] - unless_null $P1475, vivify_486 - new $P1475, "Undef" + set $P1502, $P1501["sigil"] + unless_null $P1502, vivify_486 + new $P1502, "Undef" vivify_486: - get_global $P1476, "@BLOCK" - unless_null $P1476, vivify_487 - $P1476 = root_new ['parrot';'ResizablePMCArray'] + $P1503 = "vivitype"($P1502) + $P1499."viviself"($P1503) + if_1495_end: +.annotate 'line', 524 + goto if_1484_end + if_1484: +.annotate 'line', 521 + find_lex $P1488, "$past" + $P1488."slurpy"(1) +.annotate 'line', 522 + find_lex $P1489, "$past" + find_lex $P1490, "$/" + unless_null $P1490, vivify_487 + $P1490 = root_new ['parrot';'Hash'] vivify_487: - set $P1477, $P1476[0] - unless_null $P1477, vivify_488 - new $P1477, "Undef" + set $P1491, $P1490["param_var"] + unless_null $P1491, vivify_488 + $P1491 = root_new ['parrot';'Hash'] vivify_488: - $P1478 = $P1477."arity"() - set $N1479, $P1478 - new $P1480, 'Float' - set $P1480, $N1479 - add $P1481, $P1480, 1 - $P1475."arity"($P1481) - unless_1471_end: -.annotate 'line', 530 - find_lex $P1483, "$/" - unless_null $P1483, vivify_489 - $P1483 = root_new ['parrot';'Hash'] + set $P1492, $P1491["sigil"] + unless_null $P1492, vivify_489 + new $P1492, "Undef" vivify_489: - set $P1484, $P1483["typename"] - unless_null $P1484, vivify_490 - new $P1484, "Undef" + set $S1493, $P1492 + iseq $I1494, $S1493, "%" + $P1489."named"($I1494) + if_1484_end: +.annotate 'line', 518 + goto if_1465_end + if_1465: +.annotate 'line', 513 + find_lex $P1468, "$/" + unless_null $P1468, vivify_490 + $P1468 = root_new ['parrot';'Hash'] vivify_490: - unless $P1484, if_1482_end - .const 'Sub' $P1486 = "85_1282016534.58916" - capture_lex $P1486 - $P1486() - if_1482_end: -.annotate 'line', 536 - find_lex $P1510, "$/" - find_lex $P1511, "$past" - $P1512 = $P1510."!make"($P1511) -.annotate 'line', 499 - .return ($P1512) - control_1403: - .local pmc exception - .get_results (exception) - getattribute $P1513, exception, "payload" - .return ($P1513) -.end - - -.namespace ["NQP";"Actions"] -.include "except_types.pasm" -.sub "_block1485" :anon :subid("85_1282016534.58916") :outer("84_1282016534.58916") -.annotate 'line', 530 - .const 'Sub' $P1498 = "86_1282016534.58916" - capture_lex $P1498 -.annotate 'line', 531 - $P1487 = root_new ['parrot';'ResizablePMCArray'] - .lex "@multitype", $P1487 -.annotate 'line', 530 - find_lex $P1488, "@multitype" -.annotate 'line', 532 - find_lex $P1490, "$/" - unless_null $P1490, vivify_491 - $P1490 = root_new ['parrot';'Hash'] + set $P1469, $P1468["named_param"] + unless_null $P1469, vivify_491 + new $P1469, "Undef" vivify_491: - set $P1491, $P1490["typename"] - unless_null $P1491, vivify_492 - $P1491 = root_new ['parrot';'ResizablePMCArray'] + $P1470 = $P1469."ast"() + store_lex "$past", $P1470 +.annotate 'line', 514 + find_lex $P1472, "$quant" + set $S1473, $P1472 + isne $I1474, $S1473, "!" + unless $I1474, if_1471_end +.annotate 'line', 515 + find_lex $P1475, "$past" + find_lex $P1476, "$/" + unless_null $P1476, vivify_492 + $P1476 = root_new ['parrot';'Hash'] vivify_492: - set $P1492, $P1491[0] - unless_null $P1492, vivify_493 - $P1492 = root_new ['parrot';'Hash'] + set $P1477, $P1476["named_param"] + unless_null $P1477, vivify_493 + $P1477 = root_new ['parrot';'Hash'] vivify_493: - set $P1493, $P1492["name"] - unless_null $P1493, vivify_494 - $P1493 = root_new ['parrot';'Hash'] + set $P1478, $P1477["param_var"] + unless_null $P1478, vivify_494 + $P1478 = root_new ['parrot';'Hash'] vivify_494: - set $P1494, $P1493["identifier"] - unless_null $P1494, vivify_495 - new $P1494, "Undef" + set $P1479, $P1478["sigil"] + unless_null $P1479, vivify_495 + new $P1479, "Undef" vivify_495: - defined $I1495, $P1494 - unless $I1495, for_undef_496 - iter $P1489, $P1494 - new $P1505, 'ExceptionHandler' - set_addr $P1505, loop1504_handler - $P1505."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1505 - loop1504_test: - unless $P1489, loop1504_done - shift $P1496, $P1489 - loop1504_redo: - .const 'Sub' $P1498 = "86_1282016534.58916" - capture_lex $P1498 - $P1498($P1496) - loop1504_next: - goto loop1504_test - loop1504_handler: - .local pmc exception - .get_results (exception) - getattribute $P1506, exception, 'type' - eq $P1506, .CONTROL_LOOP_NEXT, loop1504_next - eq $P1506, .CONTROL_LOOP_REDO, loop1504_redo - loop1504_done: - pop_eh - for_undef_496: -.annotate 'line', 533 - find_lex $P1507, "$past" - find_lex $P1508, "@multitype" - $P1509 = $P1507."multitype"($P1508) + $P1480 = "vivitype"($P1479) + $P1475."viviself"($P1480) + if_1471_end: + if_1465_end: +.annotate 'line', 528 + find_lex $P1505, "$/" + unless_null $P1505, vivify_496 + $P1505 = root_new ['parrot';'Hash'] + vivify_496: + set $P1506, $P1505["default_value"] + unless_null $P1506, vivify_497 + new $P1506, "Undef" + vivify_497: + unless $P1506, if_1504_end +.annotate 'line', 529 + find_lex $P1508, "$quant" + set $S1509, $P1508 + iseq $I1510, $S1509, "*" + unless $I1510, if_1507_end .annotate 'line', 530 - .return ($P1509) -.end - - -.namespace ["NQP";"Actions"] -.sub "_block1497" :anon :subid("86_1282016534.58916") :outer("85_1282016534.58916") - .param pmc param_1499 + find_lex $P1511, "$/" + $P1512 = $P1511."CURSOR"() + $P1512."panic"("Can't put default on slurpy parameter") + if_1507_end: .annotate 'line', 532 - .lex "$_", param_1499 - find_lex $P1500, "@multitype" - find_lex $P1501, "$_" - set $S1502, $P1501 - $P1503 = $P1500."push"($S1502) - .return ($P1503) + find_lex $P1514, "$quant" + set $S1515, $P1514 + iseq $I1516, $S1515, "!" + unless $I1516, if_1513_end +.annotate 'line', 533 + find_lex $P1517, "$/" + $P1518 = $P1517."CURSOR"() + $P1518."panic"("Can't put default on required parameter") + if_1513_end: +.annotate 'line', 535 + find_lex $P1519, "$past" + find_lex $P1520, "$/" + unless_null $P1520, vivify_498 + $P1520 = root_new ['parrot';'Hash'] + vivify_498: + set $P1521, $P1520["default_value"] + unless_null $P1521, vivify_499 + $P1521 = root_new ['parrot';'ResizablePMCArray'] + vivify_499: + set $P1522, $P1521[0] + unless_null $P1522, vivify_500 + $P1522 = root_new ['parrot';'Hash'] + vivify_500: + set $P1523, $P1522["EXPR"] + unless_null $P1523, vivify_501 + new $P1523, "Undef" + vivify_501: + $P1524 = $P1523."ast"() + $P1519."viviself"($P1524) + if_1504_end: +.annotate 'line', 537 + find_lex $P1526, "$past" + $P1527 = $P1526."viviself"() + if $P1527, unless_1525_end + get_global $P1528, "@BLOCK" + unless_null $P1528, vivify_502 + $P1528 = root_new ['parrot';'ResizablePMCArray'] + vivify_502: + set $P1529, $P1528[0] + unless_null $P1529, vivify_503 + new $P1529, "Undef" + vivify_503: + get_global $P1530, "@BLOCK" + unless_null $P1530, vivify_504 + $P1530 = root_new ['parrot';'ResizablePMCArray'] + vivify_504: + set $P1531, $P1530[0] + unless_null $P1531, vivify_505 + new $P1531, "Undef" + vivify_505: + $P1532 = $P1531."arity"() + set $N1533, $P1532 + new $P1534, 'Float' + set $P1534, $N1533 + add $P1535, $P1534, 1 + $P1529."arity"($P1535) + unless_1525_end: +.annotate 'line', 540 + find_lex $P1537, "$/" + unless_null $P1537, vivify_506 + $P1537 = root_new ['parrot';'Hash'] + vivify_506: + set $P1538, $P1537["typename"] + unless_null $P1538, vivify_507 + new $P1538, "Undef" + vivify_507: + unless $P1538, if_1536_end + .const 'Sub' $P1540 = "87_1284728484.24945" + capture_lex $P1540 + $P1540() + if_1536_end: +.annotate 'line', 546 + find_lex $P1564, "$/" + find_lex $P1565, "$past" + $P1566 = $P1564."!make"($P1565) +.annotate 'line', 509 + .return ($P1566) + control_1457: + .local pmc exception + .get_results (exception) + getattribute $P1567, exception, "payload" + .return ($P1567) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "param_var" :subid("87_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1517 -.annotate 'line', 539 - new $P1516, 'ExceptionHandler' - set_addr $P1516, control_1515 - $P1516."handle_types"(.CONTROL_RETURN) - push_eh $P1516 - .lex "self", self - .lex "$/", param_1517 +.sub "_block1539" :anon :subid("87_1284728484.24945") :outer("86_1284728484.24945") .annotate 'line', 540 - new $P1518, "Undef" - .lex "$name", $P1518 + .const 'Sub' $P1552 = "88_1284728484.24945" + capture_lex $P1552 .annotate 'line', 541 - new $P1519, "Undef" - .lex "$past", $P1519 + $P1541 = root_new ['parrot';'ResizablePMCArray'] + .lex "@multitype", $P1541 .annotate 'line', 540 - find_lex $P1520, "$/" - set $S1521, $P1520 - new $P1522, 'String' - set $P1522, $S1521 - store_lex "$name", $P1522 -.annotate 'line', 541 - get_hll_global $P1523, ["PAST"], "Var" - find_lex $P1524, "$name" - find_lex $P1525, "$/" - $P1526 = $P1523."new"($P1524 :named("name"), "parameter" :named("scope"), 1 :named("isdecl"), $P1525 :named("node")) - store_lex "$past", $P1526 + find_lex $P1542, "@multitype" +.annotate 'line', 542 + find_lex $P1544, "$/" + unless_null $P1544, vivify_508 + $P1544 = root_new ['parrot';'Hash'] + vivify_508: + set $P1545, $P1544["typename"] + unless_null $P1545, vivify_509 + $P1545 = root_new ['parrot';'ResizablePMCArray'] + vivify_509: + set $P1546, $P1545[0] + unless_null $P1546, vivify_510 + $P1546 = root_new ['parrot';'Hash'] + vivify_510: + set $P1547, $P1546["name"] + unless_null $P1547, vivify_511 + $P1547 = root_new ['parrot';'Hash'] + vivify_511: + set $P1548, $P1547["identifier"] + unless_null $P1548, vivify_512 + new $P1548, "Undef" + vivify_512: + defined $I1549, $P1548 + unless $I1549, for_undef_513 + iter $P1543, $P1548 + new $P1559, 'ExceptionHandler' + set_addr $P1559, loop1558_handler + $P1559."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1559 + loop1558_test: + unless $P1543, loop1558_done + shift $P1550, $P1543 + loop1558_redo: + .const 'Sub' $P1552 = "88_1284728484.24945" + capture_lex $P1552 + $P1552($P1550) + loop1558_next: + goto loop1558_test + loop1558_handler: + .local pmc exception + .get_results (exception) + getattribute $P1560, exception, 'type' + eq $P1560, .CONTROL_LOOP_NEXT, loop1558_next + eq $P1560, .CONTROL_LOOP_REDO, loop1558_redo + loop1558_done: + pop_eh + for_undef_513: .annotate 'line', 543 - get_global $P1527, "@BLOCK" - unless_null $P1527, vivify_497 - $P1527 = root_new ['parrot';'ResizablePMCArray'] - vivify_497: - set $P1528, $P1527[0] - unless_null $P1528, vivify_498 - new $P1528, "Undef" - vivify_498: - find_lex $P1529, "$name" - $P1528."symbol"($P1529, "lexical" :named("scope")) -.annotate 'line', 544 - find_lex $P1530, "$/" - find_lex $P1531, "$past" - $P1532 = $P1530."!make"($P1531) -.annotate 'line', 539 - .return ($P1532) - control_1515: - .local pmc exception - .get_results (exception) - getattribute $P1533, exception, "payload" - .return ($P1533) + find_lex $P1561, "$past" + find_lex $P1562, "@multitype" + $P1563 = $P1561."multitype"($P1562) +.annotate 'line', 540 + .return ($P1563) +.end + + +.namespace ["NQP";"Actions"] +.sub "_block1551" :anon :subid("88_1284728484.24945") :outer("87_1284728484.24945") + .param pmc param_1553 +.annotate 'line', 542 + .lex "$_", param_1553 + find_lex $P1554, "@multitype" + find_lex $P1555, "$_" + set $S1556, $P1555 + $P1557 = $P1554."push"($S1556) + .return ($P1557) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "named_param" :subid("88_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1537 -.annotate 'line', 547 - new $P1536, 'ExceptionHandler' - set_addr $P1536, control_1535 - $P1536."handle_types"(.CONTROL_RETURN) - push_eh $P1536 - .lex "self", self - .lex "$/", param_1537 -.annotate 'line', 548 - new $P1538, "Undef" - .lex "$past", $P1538 - find_lex $P1539, "$/" - unless_null $P1539, vivify_499 - $P1539 = root_new ['parrot';'Hash'] - vivify_499: - set $P1540, $P1539["param_var"] - unless_null $P1540, vivify_500 - new $P1540, "Undef" - vivify_500: - $P1541 = $P1540."ast"() - store_lex "$past", $P1541 +.sub "param_var" :subid("89_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1571 .annotate 'line', 549 - find_lex $P1542, "$past" - find_lex $P1543, "$/" - unless_null $P1543, vivify_501 - $P1543 = root_new ['parrot';'Hash'] - vivify_501: - set $P1544, $P1543["param_var"] - unless_null $P1544, vivify_502 - $P1544 = root_new ['parrot';'Hash'] - vivify_502: - set $P1545, $P1544["name"] - unless_null $P1545, vivify_503 - new $P1545, "Undef" - vivify_503: - set $S1546, $P1545 - $P1542."named"($S1546) + new $P1570, 'ExceptionHandler' + set_addr $P1570, control_1569 + $P1570."handle_types"(.CONTROL_RETURN) + push_eh $P1570 + .lex "self", self + .lex "$/", param_1571 .annotate 'line', 550 - find_lex $P1547, "$/" - find_lex $P1548, "$past" - $P1549 = $P1547."!make"($P1548) -.annotate 'line', 547 - .return ($P1549) - control_1535: + new $P1572, "Undef" + .lex "$name", $P1572 +.annotate 'line', 551 + new $P1573, "Undef" + .lex "$past", $P1573 +.annotate 'line', 550 + find_lex $P1574, "$/" + set $S1575, $P1574 + new $P1576, 'String' + set $P1576, $S1575 + store_lex "$name", $P1576 +.annotate 'line', 551 + get_hll_global $P1577, ["PAST"], "Var" + find_lex $P1578, "$name" + find_lex $P1579, "$/" + $P1580 = $P1577."new"($P1578 :named("name"), "parameter" :named("scope"), 1 :named("isdecl"), $P1579 :named("node")) + store_lex "$past", $P1580 +.annotate 'line', 553 + get_global $P1581, "@BLOCK" + unless_null $P1581, vivify_514 + $P1581 = root_new ['parrot';'ResizablePMCArray'] + vivify_514: + set $P1582, $P1581[0] + unless_null $P1582, vivify_515 + new $P1582, "Undef" + vivify_515: + find_lex $P1583, "$name" + $P1582."symbol"($P1583, "lexical" :named("scope")) +.annotate 'line', 554 + find_lex $P1584, "$/" + find_lex $P1585, "$past" + $P1586 = $P1584."!make"($P1585) +.annotate 'line', 549 + .return ($P1586) + control_1569: .local pmc exception .get_results (exception) - getattribute $P1550, exception, "payload" - .return ($P1550) + getattribute $P1587, exception, "payload" + .return ($P1587) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "regex_declarator" :subid("89_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1554 - .param pmc param_1555 :optional - .param int has_param_1555 :opt_flag -.annotate 'line', 553 - .const 'Sub' $P1625 = "91_1282016534.58916" - capture_lex $P1625 - .const 'Sub' $P1597 = "90_1282016534.58916" - capture_lex $P1597 - new $P1553, 'ExceptionHandler' - set_addr $P1553, control_1552 - $P1553."handle_types"(.CONTROL_RETURN) - push_eh $P1553 - .lex "self", self - .lex "$/", param_1554 - if has_param_1555, optparam_504 - new $P1556, "Undef" - set param_1555, $P1556 - optparam_504: - .lex "$key", param_1555 -.annotate 'line', 554 - $P1557 = root_new ['parrot';'ResizablePMCArray'] - .lex "@MODIFIERS", $P1557 +.sub "named_param" :subid("90_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1591 .annotate 'line', 557 - new $P1558, "Undef" - .lex "$name", $P1558 + new $P1590, 'ExceptionHandler' + set_addr $P1590, control_1589 + $P1590."handle_types"(.CONTROL_RETURN) + push_eh $P1590 + .lex "self", self + .lex "$/", param_1591 .annotate 'line', 558 - new $P1559, "Undef" - .lex "$past", $P1559 -.annotate 'line', 554 - - $P1560 = get_hll_global ['Regex';'P6Regex';'Actions'], '@MODIFIERS' - - store_lex "@MODIFIERS", $P1560 -.annotate 'line', 557 - find_lex $P1561, "$/" - unless_null $P1561, vivify_505 - $P1561 = root_new ['parrot';'Hash'] - vivify_505: - set $P1562, $P1561["deflongname"] - unless_null $P1562, vivify_506 - new $P1562, "Undef" - vivify_506: - $P1563 = $P1562."ast"() - set $S1564, $P1563 - new $P1565, 'String' - set $P1565, $S1564 - store_lex "$name", $P1565 - find_lex $P1566, "$past" + new $P1592, "Undef" + .lex "$past", $P1592 + find_lex $P1593, "$/" + unless_null $P1593, vivify_516 + $P1593 = root_new ['parrot';'Hash'] + vivify_516: + set $P1594, $P1593["param_var"] + unless_null $P1594, vivify_517 + new $P1594, "Undef" + vivify_517: + $P1595 = $P1594."ast"() + store_lex "$past", $P1595 .annotate 'line', 559 - find_lex $P1568, "$/" - unless_null $P1568, vivify_507 - $P1568 = root_new ['parrot';'Hash'] - vivify_507: - set $P1569, $P1568["proto"] - unless_null $P1569, vivify_508 - new $P1569, "Undef" - vivify_508: - if $P1569, if_1567 -.annotate 'line', 586 - find_lex $P1593, "$key" - set $S1594, $P1593 - iseq $I1595, $S1594, "open" - if $I1595, if_1592 -.annotate 'line', 599 - .const 'Sub' $P1625 = "91_1282016534.58916" - capture_lex $P1625 - $P1625() - goto if_1592_end - if_1592: -.annotate 'line', 586 - .const 'Sub' $P1597 = "90_1282016534.58916" - capture_lex $P1597 - $P1597() - if_1592_end: - goto if_1567_end - if_1567: -.annotate 'line', 561 - get_hll_global $P1570, ["PAST"], "Stmts" -.annotate 'line', 562 - get_hll_global $P1571, ["PAST"], "Block" - find_lex $P1572, "$name" -.annotate 'line', 563 - get_hll_global $P1573, ["PAST"], "Op" -.annotate 'line', 564 - get_hll_global $P1574, ["PAST"], "Var" - $P1575 = $P1574."new"("self" :named("name"), "register" :named("scope")) - find_lex $P1576, "$name" - $P1577 = $P1573."new"($P1575, $P1576, "!protoregex" :named("name"), "callmethod" :named("pasttype")) -.annotate 'line', 563 - find_lex $P1578, "$/" - $P1579 = $P1571."new"($P1577, $P1572 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1578 :named("node")) -.annotate 'line', 573 - get_hll_global $P1580, ["PAST"], "Block" - new $P1581, "String" - assign $P1581, "!PREFIX__" - find_lex $P1582, "$name" - concat $P1583, $P1581, $P1582 -.annotate 'line', 574 - get_hll_global $P1584, ["PAST"], "Op" -.annotate 'line', 575 - get_hll_global $P1585, ["PAST"], "Var" - $P1586 = $P1585."new"("self" :named("name"), "register" :named("scope")) - find_lex $P1587, "$name" - $P1588 = $P1584."new"($P1586, $P1587, "!PREFIX__!protoregex" :named("name"), "callmethod" :named("pasttype")) -.annotate 'line', 574 - find_lex $P1589, "$/" - $P1590 = $P1580."new"($P1588, $P1583 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1589 :named("node")) -.annotate 'line', 573 - $P1591 = $P1570."new"($P1579, $P1590) -.annotate 'line', 561 - store_lex "$past", $P1591 - if_1567_end: -.annotate 'line', 613 - find_lex $P1646, "$/" - find_lex $P1647, "$past" - $P1648 = $P1646."!make"($P1647) -.annotate 'line', 553 - .return ($P1648) - control_1552: + find_lex $P1596, "$past" + find_lex $P1597, "$/" + unless_null $P1597, vivify_518 + $P1597 = root_new ['parrot';'Hash'] + vivify_518: + set $P1598, $P1597["param_var"] + unless_null $P1598, vivify_519 + $P1598 = root_new ['parrot';'Hash'] + vivify_519: + set $P1599, $P1598["name"] + unless_null $P1599, vivify_520 + new $P1599, "Undef" + vivify_520: + set $S1600, $P1599 + $P1596."named"($S1600) +.annotate 'line', 560 + find_lex $P1601, "$/" + find_lex $P1602, "$past" + $P1603 = $P1601."!make"($P1602) +.annotate 'line', 557 + .return ($P1603) + control_1589: .local pmc exception .get_results (exception) - getattribute $P1649, exception, "payload" - .return ($P1649) -.end - - -.namespace ["NQP";"Actions"] -.sub "_block1624" :anon :subid("91_1282016534.58916") :outer("89_1282016534.58916") -.annotate 'line', 600 - new $P1626, "Undef" - .lex "$regex", $P1626 -.annotate 'line', 601 - get_hll_global $P1627, ["Regex";"P6Regex";"Actions"], "buildsub" - find_lex $P1628, "$/" - unless_null $P1628, vivify_509 - $P1628 = root_new ['parrot';'Hash'] - vivify_509: - set $P1629, $P1628["p6regex"] - unless_null $P1629, vivify_510 - new $P1629, "Undef" - vivify_510: - $P1630 = $P1629."ast"() - get_global $P1631, "@BLOCK" - $P1632 = $P1631."shift"() - $P1633 = $P1627($P1630, $P1632) - store_lex "$regex", $P1633 -.annotate 'line', 602 - find_lex $P1634, "$regex" - find_lex $P1635, "$name" - $P1634."name"($P1635) -.annotate 'line', 604 - get_hll_global $P1636, ["PAST"], "Op" -.annotate 'line', 606 - get_hll_global $P1637, ["PAST"], "Var" - new $P1638, "ResizablePMCArray" - push $P1638, "Regex" - $P1639 = $P1637."new"("Method" :named("name"), $P1638 :named("namespace"), "package" :named("scope")) - find_lex $P1640, "$regex" - $P1641 = $P1636."new"($P1639, $P1640, "callmethod" :named("pasttype"), "new" :named("name")) -.annotate 'line', 604 - store_lex "$past", $P1641 -.annotate 'line', 610 - find_lex $P1642, "$regex" - find_lex $P1643, "$past" - unless_null $P1643, vivify_511 - $P1643 = root_new ['parrot';'Hash'] - store_lex "$past", $P1643 - vivify_511: - set $P1643["sink"], $P1642 -.annotate 'line', 611 - find_lex $P1644, "@MODIFIERS" - $P1645 = $P1644."shift"() -.annotate 'line', 599 - .return ($P1645) + getattribute $P1604, exception, "payload" + .return ($P1604) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "_block1596" :anon :subid("90_1282016534.58916") :outer("89_1282016534.58916") -.annotate 'line', 587 - $P1598 = root_new ['parrot';'Hash'] - .lex "%h", $P1598 -.annotate 'line', 586 - find_lex $P1599, "%h" -.annotate 'line', 588 - find_lex $P1601, "$/" - unless_null $P1601, vivify_512 - $P1601 = root_new ['parrot';'Hash'] - vivify_512: - set $P1602, $P1601["sym"] - unless_null $P1602, vivify_513 - new $P1602, "Undef" - vivify_513: - set $S1603, $P1602 - iseq $I1604, $S1603, "token" - unless $I1604, if_1600_end - new $P1605, "Integer" - assign $P1605, 1 - find_lex $P1606, "%h" - unless_null $P1606, vivify_514 - $P1606 = root_new ['parrot';'Hash'] - store_lex "%h", $P1606 - vivify_514: - set $P1606["r"], $P1605 - if_1600_end: -.annotate 'line', 589 - find_lex $P1608, "$/" - unless_null $P1608, vivify_515 - $P1608 = root_new ['parrot';'Hash'] - vivify_515: - set $P1609, $P1608["sym"] - unless_null $P1609, vivify_516 - new $P1609, "Undef" - vivify_516: - set $S1610, $P1609 - iseq $I1611, $S1610, "rule" - unless $I1611, if_1607_end - new $P1612, "Integer" - assign $P1612, 1 - find_lex $P1613, "%h" - unless_null $P1613, vivify_517 - $P1613 = root_new ['parrot';'Hash'] - store_lex "%h", $P1613 - vivify_517: - set $P1613["r"], $P1612 - new $P1614, "Integer" - assign $P1614, 1 - find_lex $P1615, "%h" - unless_null $P1615, vivify_518 - $P1615 = root_new ['parrot';'Hash'] - store_lex "%h", $P1615 - vivify_518: - set $P1615["s"], $P1614 - if_1607_end: -.annotate 'line', 590 - find_lex $P1616, "@MODIFIERS" - find_lex $P1617, "%h" - $P1616."unshift"($P1617) -.annotate 'line', 591 - - $P0 = find_lex '$name' - set_hll_global ['Regex';'P6Regex';'Actions'], '$REGEXNAME', $P0 - -.annotate 'line', 595 - get_global $P1618, "@BLOCK" - unless_null $P1618, vivify_519 - $P1618 = root_new ['parrot';'ResizablePMCArray'] - vivify_519: - set $P1619, $P1618[0] - unless_null $P1619, vivify_520 - new $P1619, "Undef" - vivify_520: - $P1619."symbol"(unicode:"$\x{a2}", "lexical" :named("scope")) -.annotate 'line', 596 - get_global $P1620, "@BLOCK" - unless_null $P1620, vivify_521 - $P1620 = root_new ['parrot';'ResizablePMCArray'] +.sub "trait" :subid("91_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1608 +.annotate 'line', 563 + new $P1607, 'ExceptionHandler' + set_addr $P1607, control_1606 + $P1607."handle_types"(.CONTROL_RETURN) + push_eh $P1607 + .lex "self", self + .lex "$/", param_1608 +.annotate 'line', 564 + find_lex $P1609, "$/" + find_lex $P1610, "$/" + unless_null $P1610, vivify_521 + $P1610 = root_new ['parrot';'Hash'] vivify_521: - set $P1621, $P1620[0] - unless_null $P1621, vivify_522 - new $P1621, "Undef" + set $P1611, $P1610["trait_mod"] + unless_null $P1611, vivify_522 + new $P1611, "Undef" vivify_522: - $P1621."symbol"("$/", "lexical" :named("scope")) -.annotate 'line', 597 - new $P1622, "Exception" - set $P1622['type'], .CONTROL_RETURN - new $P1623, "Integer" - assign $P1623, 0 - setattribute $P1622, 'payload', $P1623 - throw $P1622 -.annotate 'line', 586 - .return () + $P1612 = $P1611."ast"() + $P1613 = $P1609."!make"($P1612) +.annotate 'line', 563 + .return ($P1613) + control_1606: + .local pmc exception + .get_results (exception) + getattribute $P1614, exception, "payload" + .return ($P1614) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "dotty" :subid("92_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1653 -.annotate 'line', 617 - new $P1652, 'ExceptionHandler' - set_addr $P1652, control_1651 - $P1652."handle_types"(.CONTROL_RETURN) - push_eh $P1652 - .lex "self", self - .lex "$/", param_1653 -.annotate 'line', 618 - new $P1654, "Undef" - .lex "$past", $P1654 - find_lex $P1657, "$/" - unless_null $P1657, vivify_523 - $P1657 = root_new ['parrot';'Hash'] +.sub "trait_mod:sym" :subid("92_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1618 +.annotate 'line', 567 + .const 'Sub' $P1638 = "93_1284728484.24945" + capture_lex $P1638 + new $P1617, 'ExceptionHandler' + set_addr $P1617, control_1616 + $P1617."handle_types"(.CONTROL_RETURN) + push_eh $P1617 + .lex "self", self + .lex "$/", param_1618 +.annotate 'line', 568 + new $P1619, "Undef" + .lex "$cpast", $P1619 + find_lex $P1620, "$/" + unless_null $P1620, vivify_523 + $P1620 = root_new ['parrot';'Hash'] vivify_523: - set $P1658, $P1657["args"] - unless_null $P1658, vivify_524 - new $P1658, "Undef" + set $P1621, $P1620["circumfix"] + unless_null $P1621, vivify_524 + $P1621 = root_new ['parrot';'ResizablePMCArray'] vivify_524: - if $P1658, if_1656 - get_hll_global $P1663, ["PAST"], "Op" - find_lex $P1664, "$/" - $P1665 = $P1663."new"($P1664 :named("node")) - set $P1655, $P1665 - goto if_1656_end - if_1656: - find_lex $P1659, "$/" - unless_null $P1659, vivify_525 - $P1659 = root_new ['parrot';'Hash'] + set $P1622, $P1621[0] + unless_null $P1622, vivify_525 + new $P1622, "Undef" vivify_525: - set $P1660, $P1659["args"] - unless_null $P1660, vivify_526 - $P1660 = root_new ['parrot';'ResizablePMCArray'] + $P1623 = $P1622."ast"() + store_lex "$cpast", $P1623 +.annotate 'line', 569 + find_lex $P1626, "$/" + unless_null $P1626, vivify_526 + $P1626 = root_new ['parrot';'Hash'] vivify_526: - set $P1661, $P1660[0] - unless_null $P1661, vivify_527 - new $P1661, "Undef" + set $P1627, $P1626["longname"] + unless_null $P1627, vivify_527 + new $P1627, "Undef" vivify_527: - $P1662 = $P1661."ast"() - set $P1655, $P1662 - if_1656_end: - store_lex "$past", $P1655 -.annotate 'line', 619 - find_lex $P1666, "$past" - find_lex $P1669, "$/" - unless_null $P1669, vivify_528 - $P1669 = root_new ['parrot';'Hash'] + set $S1628, $P1627 + iseq $I1629, $S1628, "pirflags" + if $I1629, if_1625 +.annotate 'line', 575 + find_lex $P1648, "$/" + $P1649 = $P1648."CURSOR"() + new $P1650, 'String' + set $P1650, "Trait '" + find_lex $P1651, "$/" + unless_null $P1651, vivify_528 + $P1651 = root_new ['parrot';'Hash'] vivify_528: - set $P1670, $P1669["quote"] - unless_null $P1670, vivify_529 - new $P1670, "Undef" + set $P1652, $P1651["longname"] + unless_null $P1652, vivify_529 + new $P1652, "Undef" vivify_529: - if $P1670, if_1668 - find_lex $P1674, "$/" - unless_null $P1674, vivify_530 - $P1674 = root_new ['parrot';'Hash'] - vivify_530: - set $P1675, $P1674["longname"] - unless_null $P1675, vivify_531 - new $P1675, "Undef" - vivify_531: - set $S1676, $P1675 - new $P1667, 'String' - set $P1667, $S1676 - goto if_1668_end - if_1668: - find_lex $P1671, "$/" - unless_null $P1671, vivify_532 - $P1671 = root_new ['parrot';'Hash'] - vivify_532: - set $P1672, $P1671["quote"] - unless_null $P1672, vivify_533 - new $P1672, "Undef" - vivify_533: - $P1673 = $P1672."ast"() - set $P1667, $P1673 - if_1668_end: - $P1666."name"($P1667) -.annotate 'line', 620 - find_lex $P1677, "$past" - $P1677."pasttype"("callmethod") -.annotate 'line', 621 - find_lex $P1678, "$/" - find_lex $P1679, "$past" - $P1680 = $P1678."!make"($P1679) -.annotate 'line', 617 - .return ($P1680) - control_1651: + concat $P1653, $P1650, $P1652 + concat $P1654, $P1653, "' not implemented" + $P1655 = $P1649."panic"($P1654) +.annotate 'line', 574 + set $P1624, $P1655 +.annotate 'line', 569 + goto if_1625_end + if_1625: +.annotate 'line', 571 + get_hll_global $P1631, ["PAST"], "Val" + find_lex $P1632, "$cpast" + $P1633 = $P1631."ACCEPTS"($P1632) + if $P1633, unless_1630_end +.annotate 'line', 570 + find_lex $P1634, "$/" + $P1635 = $P1634."CURSOR"() + $P1635."panic"("Trait 'pirflags' requires constant scalar argument") + unless_1630_end: +.annotate 'line', 572 + find_lex $P1636, "$/" + .const 'Sub' $P1638 = "93_1284728484.24945" + newclosure $P1646, $P1638 + $P1647 = $P1636."!make"($P1646) +.annotate 'line', 569 + set $P1624, $P1647 + if_1625_end: +.annotate 'line', 567 + .return ($P1624) + control_1616: .local pmc exception .get_results (exception) - getattribute $P1681, exception, "payload" - .return ($P1681) + getattribute $P1656, exception, "payload" + .return ($P1656) .end .namespace ["NQP";"Actions"] -.include "except_types.pasm" -.sub "term:sym" :subid("93_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1685 -.annotate 'line', 626 - new $P1684, 'ExceptionHandler' - set_addr $P1684, control_1683 - $P1684."handle_types"(.CONTROL_RETURN) - push_eh $P1684 - .lex "self", self - .lex "$/", param_1685 -.annotate 'line', 627 - find_lex $P1686, "$/" - get_hll_global $P1687, ["PAST"], "Var" - $P1688 = $P1687."new"("self" :named("name")) - $P1689 = $P1686."!make"($P1688) -.annotate 'line', 626 - .return ($P1689) - control_1683: - .local pmc exception - .get_results (exception) - getattribute $P1690, exception, "payload" - .return ($P1690) +.sub "_block1637" :anon :subid("93_1284728484.24945") :outer("92_1284728484.24945") + .param pmc param_1639 +.annotate 'line', 572 + .lex "$match", param_1639 + find_lex $P1640, "$match" + $P1641 = $P1640."ast"() + set $P1642, $P1641["block_past"] + unless_null $P1642, vivify_530 + new $P1642, "Undef" + vivify_530: + find_lex $P1643, "$cpast" + $P1644 = $P1643."value"() + $P1645 = $P1642."pirflags"($P1644) + .return ($P1645) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("94_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1694 -.annotate 'line', 630 - new $P1693, 'ExceptionHandler' - set_addr $P1693, control_1692 - $P1693."handle_types"(.CONTROL_RETURN) - push_eh $P1693 - .lex "self", self - .lex "$/", param_1694 -.annotate 'line', 631 - new $P1695, "Undef" - .lex "$past", $P1695 - find_lex $P1696, "$/" - unless_null $P1696, vivify_534 - $P1696 = root_new ['parrot';'Hash'] +.sub "regex_declarator" :subid("94_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1660 + .param pmc param_1661 :optional + .param int has_param_1661 :opt_flag +.annotate 'line', 579 + .const 'Sub' $P1731 = "96_1284728484.24945" + capture_lex $P1731 + .const 'Sub' $P1703 = "95_1284728484.24945" + capture_lex $P1703 + new $P1659, 'ExceptionHandler' + set_addr $P1659, control_1658 + $P1659."handle_types"(.CONTROL_RETURN) + push_eh $P1659 + .lex "self", self + .lex "$/", param_1660 + if has_param_1661, optparam_531 + new $P1662, "Undef" + set param_1661, $P1662 + optparam_531: + .lex "$key", param_1661 +.annotate 'line', 580 + $P1663 = root_new ['parrot';'ResizablePMCArray'] + .lex "@MODIFIERS", $P1663 +.annotate 'line', 583 + new $P1664, "Undef" + .lex "$name", $P1664 +.annotate 'line', 584 + new $P1665, "Undef" + .lex "$past", $P1665 +.annotate 'line', 580 + + $P1666 = get_hll_global ['Regex';'P6Regex';'Actions'], '@MODIFIERS' + + store_lex "@MODIFIERS", $P1666 +.annotate 'line', 583 + find_lex $P1667, "$/" + unless_null $P1667, vivify_532 + $P1667 = root_new ['parrot';'Hash'] + vivify_532: + set $P1668, $P1667["deflongname"] + unless_null $P1668, vivify_533 + new $P1668, "Undef" + vivify_533: + $P1669 = $P1668."ast"() + set $S1670, $P1669 + new $P1671, 'String' + set $P1671, $S1670 + store_lex "$name", $P1671 + find_lex $P1672, "$past" +.annotate 'line', 585 + find_lex $P1674, "$/" + unless_null $P1674, vivify_534 + $P1674 = root_new ['parrot';'Hash'] vivify_534: - set $P1697, $P1696["args"] - unless_null $P1697, vivify_535 - new $P1697, "Undef" + set $P1675, $P1674["proto"] + unless_null $P1675, vivify_535 + new $P1675, "Undef" vivify_535: - $P1698 = $P1697."ast"() - store_lex "$past", $P1698 -.annotate 'line', 632 - find_lex $P1699, "$past" - find_lex $P1700, "$/" - unless_null $P1700, vivify_536 - $P1700 = root_new ['parrot';'Hash'] - vivify_536: - set $P1701, $P1700["deflongname"] - unless_null $P1701, vivify_537 - new $P1701, "Undef" - vivify_537: - set $S1702, $P1701 - $P1699."name"($S1702) -.annotate 'line', 633 - find_lex $P1703, "$/" - find_lex $P1704, "$past" - $P1705 = $P1703."!make"($P1704) -.annotate 'line', 630 - .return ($P1705) - control_1692: + if $P1675, if_1673 +.annotate 'line', 612 + find_lex $P1699, "$key" + set $S1700, $P1699 + iseq $I1701, $S1700, "open" + if $I1701, if_1698 +.annotate 'line', 625 + .const 'Sub' $P1731 = "96_1284728484.24945" + capture_lex $P1731 + $P1731() + goto if_1698_end + if_1698: +.annotate 'line', 612 + .const 'Sub' $P1703 = "95_1284728484.24945" + capture_lex $P1703 + $P1703() + if_1698_end: + goto if_1673_end + if_1673: +.annotate 'line', 587 + get_hll_global $P1676, ["PAST"], "Stmts" +.annotate 'line', 588 + get_hll_global $P1677, ["PAST"], "Block" + find_lex $P1678, "$name" +.annotate 'line', 589 + get_hll_global $P1679, ["PAST"], "Op" +.annotate 'line', 590 + get_hll_global $P1680, ["PAST"], "Var" + $P1681 = $P1680."new"("self" :named("name"), "register" :named("scope")) + find_lex $P1682, "$name" + $P1683 = $P1679."new"($P1681, $P1682, "!protoregex" :named("name"), "callmethod" :named("pasttype")) +.annotate 'line', 589 + find_lex $P1684, "$/" + $P1685 = $P1677."new"($P1683, $P1678 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1684 :named("node")) +.annotate 'line', 599 + get_hll_global $P1686, ["PAST"], "Block" + new $P1687, "String" + assign $P1687, "!PREFIX__" + find_lex $P1688, "$name" + concat $P1689, $P1687, $P1688 +.annotate 'line', 600 + get_hll_global $P1690, ["PAST"], "Op" +.annotate 'line', 601 + get_hll_global $P1691, ["PAST"], "Var" + $P1692 = $P1691."new"("self" :named("name"), "register" :named("scope")) + find_lex $P1693, "$name" + $P1694 = $P1690."new"($P1692, $P1693, "!PREFIX__!protoregex" :named("name"), "callmethod" :named("pasttype")) +.annotate 'line', 600 + find_lex $P1695, "$/" + $P1696 = $P1686."new"($P1694, $P1689 :named("name"), "method" :named("blocktype"), 0 :named("lexical"), $P1695 :named("node")) +.annotate 'line', 599 + $P1697 = $P1676."new"($P1685, $P1696) +.annotate 'line', 587 + store_lex "$past", $P1697 + if_1673_end: +.annotate 'line', 639 + find_lex $P1752, "$/" + find_lex $P1753, "$past" + $P1754 = $P1752."!make"($P1753) +.annotate 'line', 579 + .return ($P1754) + control_1658: .local pmc exception .get_results (exception) - getattribute $P1706, exception, "payload" - .return ($P1706) + getattribute $P1755, exception, "payload" + .return ($P1755) .end .namespace ["NQP";"Actions"] -.include "except_types.pasm" -.sub "term:sym" :subid("95_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1710 +.sub "_block1730" :anon :subid("96_1284728484.24945") :outer("94_1284728484.24945") +.annotate 'line', 626 + new $P1732, "Undef" + .lex "$regex", $P1732 +.annotate 'line', 627 + get_hll_global $P1733, ["Regex";"P6Regex";"Actions"], "buildsub" + find_lex $P1734, "$/" + unless_null $P1734, vivify_536 + $P1734 = root_new ['parrot';'Hash'] + vivify_536: + set $P1735, $P1734["p6regex"] + unless_null $P1735, vivify_537 + new $P1735, "Undef" + vivify_537: + $P1736 = $P1735."ast"() + get_global $P1737, "@BLOCK" + $P1738 = $P1737."shift"() + $P1739 = $P1733($P1736, $P1738) + store_lex "$regex", $P1739 +.annotate 'line', 628 + find_lex $P1740, "$regex" + find_lex $P1741, "$name" + $P1740."name"($P1741) +.annotate 'line', 630 + get_hll_global $P1742, ["PAST"], "Op" +.annotate 'line', 632 + get_hll_global $P1743, ["PAST"], "Var" + new $P1744, "ResizablePMCArray" + push $P1744, "Regex" + $P1745 = $P1743."new"("Method" :named("name"), $P1744 :named("namespace"), "package" :named("scope")) + find_lex $P1746, "$regex" + $P1747 = $P1742."new"($P1745, $P1746, "callmethod" :named("pasttype"), "new" :named("name")) +.annotate 'line', 630 + store_lex "$past", $P1747 .annotate 'line', 636 - new $P1709, 'ExceptionHandler' - set_addr $P1709, control_1708 - $P1709."handle_types"(.CONTROL_RETURN) - push_eh $P1709 - .lex "self", self - .lex "$/", param_1710 -.annotate 'line', 637 - $P1711 = root_new ['parrot';'ResizablePMCArray'] - .lex "@ns", $P1711 -.annotate 'line', 638 - new $P1712, "Undef" - .lex "$name", $P1712 -.annotate 'line', 640 - new $P1713, "Undef" - .lex "$var", $P1713 -.annotate 'line', 642 - new $P1714, "Undef" - .lex "$past", $P1714 -.annotate 'line', 637 - find_lex $P1715, "$/" - unless_null $P1715, vivify_538 - $P1715 = root_new ['parrot';'Hash'] + find_lex $P1748, "$regex" + find_lex $P1749, "$past" + unless_null $P1749, vivify_538 + $P1749 = root_new ['parrot';'Hash'] + store_lex "$past", $P1749 vivify_538: - set $P1716, $P1715["name"] - unless_null $P1716, vivify_539 - $P1716 = root_new ['parrot';'Hash'] + set $P1749["sink"], $P1748 +.annotate 'line', 637 + find_lex $P1750, "@MODIFIERS" + $P1751 = $P1750."shift"() +.annotate 'line', 625 + .return ($P1751) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "_block1702" :anon :subid("95_1284728484.24945") :outer("94_1284728484.24945") +.annotate 'line', 613 + $P1704 = root_new ['parrot';'Hash'] + .lex "%h", $P1704 +.annotate 'line', 612 + find_lex $P1705, "%h" +.annotate 'line', 614 + find_lex $P1707, "$/" + unless_null $P1707, vivify_539 + $P1707 = root_new ['parrot';'Hash'] vivify_539: - set $P1717, $P1716["identifier"] - unless_null $P1717, vivify_540 - new $P1717, "Undef" + set $P1708, $P1707["sym"] + unless_null $P1708, vivify_540 + new $P1708, "Undef" vivify_540: - clone $P1718, $P1717 - store_lex "@ns", $P1718 -.annotate 'line', 638 - find_lex $P1719, "@ns" - $P1720 = $P1719."pop"() - store_lex "$name", $P1720 -.annotate 'line', 639 - find_lex $P1724, "@ns" - if $P1724, if_1723 - set $P1722, $P1724 - goto if_1723_end - if_1723: - find_lex $P1725, "@ns" - unless_null $P1725, vivify_541 - $P1725 = root_new ['parrot';'ResizablePMCArray'] + set $S1709, $P1708 + iseq $I1710, $S1709, "token" + unless $I1710, if_1706_end + new $P1711, "Integer" + assign $P1711, 1 + find_lex $P1712, "%h" + unless_null $P1712, vivify_541 + $P1712 = root_new ['parrot';'Hash'] + store_lex "%h", $P1712 vivify_541: - set $P1726, $P1725[0] - unless_null $P1726, vivify_542 - new $P1726, "Undef" + set $P1712["r"], $P1711 + if_1706_end: +.annotate 'line', 615 + find_lex $P1714, "$/" + unless_null $P1714, vivify_542 + $P1714 = root_new ['parrot';'Hash'] vivify_542: - set $S1727, $P1726 - iseq $I1728, $S1727, "GLOBAL" - new $P1722, 'Integer' - set $P1722, $I1728 - if_1723_end: - unless $P1722, if_1721_end - find_lex $P1729, "@ns" - $P1729."shift"() - if_1721_end: -.annotate 'line', 641 - get_hll_global $P1730, ["PAST"], "Var" - find_lex $P1731, "$name" - set $S1732, $P1731 - find_lex $P1733, "@ns" - $P1734 = $P1730."new"($S1732 :named("name"), $P1733 :named("namespace"), "package" :named("scope")) - store_lex "$var", $P1734 -.annotate 'line', 642 - find_lex $P1735, "$var" - store_lex "$past", $P1735 -.annotate 'line', 643 - find_lex $P1737, "$/" - unless_null $P1737, vivify_543 - $P1737 = root_new ['parrot';'Hash'] + set $P1715, $P1714["sym"] + unless_null $P1715, vivify_543 + new $P1715, "Undef" vivify_543: - set $P1738, $P1737["args"] - unless_null $P1738, vivify_544 - new $P1738, "Undef" + set $S1716, $P1715 + iseq $I1717, $S1716, "rule" + unless $I1717, if_1713_end + new $P1718, "Integer" + assign $P1718, 1 + find_lex $P1719, "%h" + unless_null $P1719, vivify_544 + $P1719 = root_new ['parrot';'Hash'] + store_lex "%h", $P1719 vivify_544: - unless $P1738, if_1736_end -.annotate 'line', 644 - find_lex $P1739, "$/" - unless_null $P1739, vivify_545 - $P1739 = root_new ['parrot';'Hash'] + set $P1719["r"], $P1718 + new $P1720, "Integer" + assign $P1720, 1 + find_lex $P1721, "%h" + unless_null $P1721, vivify_545 + $P1721 = root_new ['parrot';'Hash'] + store_lex "%h", $P1721 vivify_545: - set $P1740, $P1739["args"] - unless_null $P1740, vivify_546 - $P1740 = root_new ['parrot';'ResizablePMCArray'] + set $P1721["s"], $P1720 + if_1713_end: +.annotate 'line', 616 + find_lex $P1722, "@MODIFIERS" + find_lex $P1723, "%h" + $P1722."unshift"($P1723) +.annotate 'line', 617 + + $P0 = find_lex '$name' + set_hll_global ['Regex';'P6Regex';'Actions'], '$REGEXNAME', $P0 + +.annotate 'line', 621 + get_global $P1724, "@BLOCK" + unless_null $P1724, vivify_546 + $P1724 = root_new ['parrot';'ResizablePMCArray'] vivify_546: - set $P1741, $P1740[0] - unless_null $P1741, vivify_547 - new $P1741, "Undef" + set $P1725, $P1724[0] + unless_null $P1725, vivify_547 + new $P1725, "Undef" vivify_547: - $P1742 = $P1741."ast"() - store_lex "$past", $P1742 -.annotate 'line', 645 - find_lex $P1743, "$past" - find_lex $P1744, "$var" - $P1743."unshift"($P1744) - if_1736_end: -.annotate 'line', 647 - find_lex $P1745, "$/" - find_lex $P1746, "$past" - $P1747 = $P1745."!make"($P1746) -.annotate 'line', 636 - .return ($P1747) - control_1708: - .local pmc exception - .get_results (exception) - getattribute $P1748, exception, "payload" - .return ($P1748) + $P1725."symbol"(unicode:"$\x{a2}", "lexical" :named("scope")) +.annotate 'line', 622 + get_global $P1726, "@BLOCK" + unless_null $P1726, vivify_548 + $P1726 = root_new ['parrot';'ResizablePMCArray'] + vivify_548: + set $P1727, $P1726[0] + unless_null $P1727, vivify_549 + new $P1727, "Undef" + vivify_549: + $P1727."symbol"("$/", "lexical" :named("scope")) +.annotate 'line', 623 + new $P1728, "Exception" + set $P1728['type'], .CONTROL_RETURN + new $P1729, "Integer" + assign $P1729, 0 + setattribute $P1728, 'payload', $P1729 + throw $P1728 +.annotate 'line', 612 + .return () .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("96_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1752 -.annotate 'line', 650 - new $P1751, 'ExceptionHandler' - set_addr $P1751, control_1750 - $P1751."handle_types"(.CONTROL_RETURN) - push_eh $P1751 +.sub "dotty" :subid("97_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1759 +.annotate 'line', 643 + new $P1758, 'ExceptionHandler' + set_addr $P1758, control_1757 + $P1758."handle_types"(.CONTROL_RETURN) + push_eh $P1758 .lex "self", self - .lex "$/", param_1752 -.annotate 'line', 651 - new $P1753, "Undef" - .lex "$past", $P1753 -.annotate 'line', 652 - new $P1754, "Undef" - .lex "$pirop", $P1754 -.annotate 'line', 651 - find_lex $P1757, "$/" - unless_null $P1757, vivify_548 - $P1757 = root_new ['parrot';'Hash'] - vivify_548: - set $P1758, $P1757["args"] - unless_null $P1758, vivify_549 - new $P1758, "Undef" - vivify_549: - if $P1758, if_1756 - get_hll_global $P1763, ["PAST"], "Op" - find_lex $P1764, "$/" - $P1765 = $P1763."new"($P1764 :named("node")) - set $P1755, $P1765 - goto if_1756_end - if_1756: - find_lex $P1759, "$/" - unless_null $P1759, vivify_550 - $P1759 = root_new ['parrot';'Hash'] + .lex "$/", param_1759 +.annotate 'line', 644 + new $P1760, "Undef" + .lex "$past", $P1760 + find_lex $P1763, "$/" + unless_null $P1763, vivify_550 + $P1763 = root_new ['parrot';'Hash'] vivify_550: - set $P1760, $P1759["args"] - unless_null $P1760, vivify_551 - $P1760 = root_new ['parrot';'ResizablePMCArray'] + set $P1764, $P1763["args"] + unless_null $P1764, vivify_551 + new $P1764, "Undef" vivify_551: - set $P1761, $P1760[0] - unless_null $P1761, vivify_552 - new $P1761, "Undef" + if $P1764, if_1762 + get_hll_global $P1769, ["PAST"], "Op" + find_lex $P1770, "$/" + $P1771 = $P1769."new"($P1770 :named("node")) + set $P1761, $P1771 + goto if_1762_end + if_1762: + find_lex $P1765, "$/" + unless_null $P1765, vivify_552 + $P1765 = root_new ['parrot';'Hash'] vivify_552: - $P1762 = $P1761."ast"() - set $P1755, $P1762 - if_1756_end: - store_lex "$past", $P1755 -.annotate 'line', 652 - find_lex $P1766, "$/" + set $P1766, $P1765["args"] unless_null $P1766, vivify_553 - $P1766 = root_new ['parrot';'Hash'] + $P1766 = root_new ['parrot';'ResizablePMCArray'] vivify_553: - set $P1767, $P1766["op"] + set $P1767, $P1766[0] unless_null $P1767, vivify_554 new $P1767, "Undef" vivify_554: - set $S1768, $P1767 - new $P1769, 'String' - set $P1769, $S1768 - store_lex "$pirop", $P1769 + $P1768 = $P1767."ast"() + set $P1761, $P1768 + if_1762_end: + store_lex "$past", $P1761 +.annotate 'line', 645 + find_lex $P1772, "$past" + find_lex $P1775, "$/" + unless_null $P1775, vivify_555 + $P1775 = root_new ['parrot';'Hash'] + vivify_555: + set $P1776, $P1775["quote"] + unless_null $P1776, vivify_556 + new $P1776, "Undef" + vivify_556: + if $P1776, if_1774 + find_lex $P1780, "$/" + unless_null $P1780, vivify_557 + $P1780 = root_new ['parrot';'Hash'] + vivify_557: + set $P1781, $P1780["longname"] + unless_null $P1781, vivify_558 + new $P1781, "Undef" + vivify_558: + set $S1782, $P1781 + new $P1773, 'String' + set $P1773, $S1782 + goto if_1774_end + if_1774: + find_lex $P1777, "$/" + unless_null $P1777, vivify_559 + $P1777 = root_new ['parrot';'Hash'] + vivify_559: + set $P1778, $P1777["quote"] + unless_null $P1778, vivify_560 + new $P1778, "Undef" + vivify_560: + $P1779 = $P1778."ast"() + set $P1773, $P1779 + if_1774_end: + $P1772."name"($P1773) +.annotate 'line', 646 + find_lex $P1783, "$past" + $P1783."pasttype"("callmethod") +.annotate 'line', 647 + find_lex $P1784, "$/" + find_lex $P1785, "$past" + $P1786 = $P1784."!make"($P1785) +.annotate 'line', 643 + .return ($P1786) + control_1757: + .local pmc exception + .get_results (exception) + getattribute $P1787, exception, "payload" + .return ($P1787) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "term:sym" :subid("98_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1791 +.annotate 'line', 652 + new $P1790, 'ExceptionHandler' + set_addr $P1790, control_1789 + $P1790."handle_types"(.CONTROL_RETURN) + push_eh $P1790 + .lex "self", self + .lex "$/", param_1791 .annotate 'line', 653 + find_lex $P1792, "$/" + get_hll_global $P1793, ["PAST"], "Var" + $P1794 = $P1793."new"("self" :named("name")) + $P1795 = $P1792."!make"($P1794) +.annotate 'line', 652 + .return ($P1795) + control_1789: + .local pmc exception + .get_results (exception) + getattribute $P1796, exception, "payload" + .return ($P1796) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "term:sym" :subid("99_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1800 +.annotate 'line', 656 + new $P1799, 'ExceptionHandler' + set_addr $P1799, control_1798 + $P1799."handle_types"(.CONTROL_RETURN) + push_eh $P1799 + .lex "self", self + .lex "$/", param_1800 +.annotate 'line', 657 + new $P1801, "Undef" + .lex "$past", $P1801 + find_lex $P1802, "$/" + unless_null $P1802, vivify_561 + $P1802 = root_new ['parrot';'Hash'] + vivify_561: + set $P1803, $P1802["args"] + unless_null $P1803, vivify_562 + new $P1803, "Undef" + vivify_562: + $P1804 = $P1803."ast"() + store_lex "$past", $P1804 +.annotate 'line', 658 + find_lex $P1805, "$past" + find_lex $P1806, "$/" + unless_null $P1806, vivify_563 + $P1806 = root_new ['parrot';'Hash'] + vivify_563: + set $P1807, $P1806["deflongname"] + unless_null $P1807, vivify_564 + new $P1807, "Undef" + vivify_564: + set $S1808, $P1807 + $P1805."name"($S1808) +.annotate 'line', 659 + find_lex $P1809, "$/" + find_lex $P1810, "$past" + $P1811 = $P1809."!make"($P1810) +.annotate 'line', 656 + .return ($P1811) + control_1798: + .local pmc exception + .get_results (exception) + getattribute $P1812, exception, "payload" + .return ($P1812) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "term:sym" :subid("100_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1816 +.annotate 'line', 662 + new $P1815, 'ExceptionHandler' + set_addr $P1815, control_1814 + $P1815."handle_types"(.CONTROL_RETURN) + push_eh $P1815 + .lex "self", self + .lex "$/", param_1816 +.annotate 'line', 663 + $P1817 = root_new ['parrot';'ResizablePMCArray'] + .lex "@ns", $P1817 +.annotate 'line', 664 + new $P1818, "Undef" + .lex "$name", $P1818 +.annotate 'line', 666 + new $P1819, "Undef" + .lex "$var", $P1819 +.annotate 'line', 668 + new $P1820, "Undef" + .lex "$past", $P1820 +.annotate 'line', 663 + find_lex $P1821, "$/" + unless_null $P1821, vivify_565 + $P1821 = root_new ['parrot';'Hash'] + vivify_565: + set $P1822, $P1821["name"] + unless_null $P1822, vivify_566 + $P1822 = root_new ['parrot';'Hash'] + vivify_566: + set $P1823, $P1822["identifier"] + unless_null $P1823, vivify_567 + new $P1823, "Undef" + vivify_567: + clone $P1824, $P1823 + store_lex "@ns", $P1824 +.annotate 'line', 664 + find_lex $P1825, "@ns" + $P1826 = $P1825."pop"() + store_lex "$name", $P1826 +.annotate 'line', 665 + find_lex $P1830, "@ns" + if $P1830, if_1829 + set $P1828, $P1830 + goto if_1829_end + if_1829: + find_lex $P1831, "@ns" + unless_null $P1831, vivify_568 + $P1831 = root_new ['parrot';'ResizablePMCArray'] + vivify_568: + set $P1832, $P1831[0] + unless_null $P1832, vivify_569 + new $P1832, "Undef" + vivify_569: + set $S1833, $P1832 + iseq $I1834, $S1833, "GLOBAL" + new $P1828, 'Integer' + set $P1828, $I1834 + if_1829_end: + unless $P1828, if_1827_end + find_lex $P1835, "@ns" + $P1835."shift"() + if_1827_end: +.annotate 'line', 667 + get_hll_global $P1836, ["PAST"], "Var" + find_lex $P1837, "$name" + set $S1838, $P1837 + find_lex $P1839, "@ns" + $P1840 = $P1836."new"($S1838 :named("name"), $P1839 :named("namespace"), "package" :named("scope")) + store_lex "$var", $P1840 +.annotate 'line', 668 + find_lex $P1841, "$var" + store_lex "$past", $P1841 +.annotate 'line', 669 + find_lex $P1843, "$/" + unless_null $P1843, vivify_570 + $P1843 = root_new ['parrot';'Hash'] + vivify_570: + set $P1844, $P1843["args"] + unless_null $P1844, vivify_571 + new $P1844, "Undef" + vivify_571: + unless $P1844, if_1842_end +.annotate 'line', 670 + find_lex $P1845, "$/" + unless_null $P1845, vivify_572 + $P1845 = root_new ['parrot';'Hash'] + vivify_572: + set $P1846, $P1845["args"] + unless_null $P1846, vivify_573 + $P1846 = root_new ['parrot';'ResizablePMCArray'] + vivify_573: + set $P1847, $P1846[0] + unless_null $P1847, vivify_574 + new $P1847, "Undef" + vivify_574: + $P1848 = $P1847."ast"() + store_lex "$past", $P1848 +.annotate 'line', 671 + find_lex $P1849, "$past" + find_lex $P1850, "$var" + $P1849."unshift"($P1850) + if_1842_end: +.annotate 'line', 673 + find_lex $P1851, "$/" + find_lex $P1852, "$past" + $P1853 = $P1851."!make"($P1852) +.annotate 'line', 662 + .return ($P1853) + control_1814: + .local pmc exception + .get_results (exception) + getattribute $P1854, exception, "payload" + .return ($P1854) +.end + + +.namespace ["NQP";"Actions"] +.include "except_types.pasm" +.sub "term:sym" :subid("101_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1858 +.annotate 'line', 676 + new $P1857, 'ExceptionHandler' + set_addr $P1857, control_1856 + $P1857."handle_types"(.CONTROL_RETURN) + push_eh $P1857 + .lex "self", self + .lex "$/", param_1858 +.annotate 'line', 677 + new $P1859, "Undef" + .lex "$past", $P1859 +.annotate 'line', 678 + new $P1860, "Undef" + .lex "$pirop", $P1860 +.annotate 'line', 677 + find_lex $P1863, "$/" + unless_null $P1863, vivify_575 + $P1863 = root_new ['parrot';'Hash'] + vivify_575: + set $P1864, $P1863["args"] + unless_null $P1864, vivify_576 + new $P1864, "Undef" + vivify_576: + if $P1864, if_1862 + get_hll_global $P1869, ["PAST"], "Op" + find_lex $P1870, "$/" + $P1871 = $P1869."new"($P1870 :named("node")) + set $P1861, $P1871 + goto if_1862_end + if_1862: + find_lex $P1865, "$/" + unless_null $P1865, vivify_577 + $P1865 = root_new ['parrot';'Hash'] + vivify_577: + set $P1866, $P1865["args"] + unless_null $P1866, vivify_578 + $P1866 = root_new ['parrot';'ResizablePMCArray'] + vivify_578: + set $P1867, $P1866[0] + unless_null $P1867, vivify_579 + new $P1867, "Undef" + vivify_579: + $P1868 = $P1867."ast"() + set $P1861, $P1868 + if_1862_end: + store_lex "$past", $P1861 +.annotate 'line', 678 + find_lex $P1872, "$/" + unless_null $P1872, vivify_580 + $P1872 = root_new ['parrot';'Hash'] + vivify_580: + set $P1873, $P1872["op"] + unless_null $P1873, vivify_581 + new $P1873, "Undef" + vivify_581: + set $S1874, $P1873 + new $P1875, 'String' + set $P1875, $S1874 + store_lex "$pirop", $P1875 +.annotate 'line', 679 $P0 = find_lex '$pirop' $S0 = $P0 $P0 = split '__', $S0 $S0 = join ' ', $P0 - $P1770 = box $S0 + $P1876 = box $S0 - store_lex "$pirop", $P1770 -.annotate 'line', 660 - find_lex $P1771, "$past" - find_lex $P1772, "$pirop" - $P1771."pirop"($P1772) -.annotate 'line', 661 - find_lex $P1773, "$past" - $P1773."pasttype"("pirop") -.annotate 'line', 662 - find_lex $P1774, "$/" - find_lex $P1775, "$past" - $P1776 = $P1774."!make"($P1775) -.annotate 'line', 650 - .return ($P1776) - control_1750: + store_lex "$pirop", $P1876 +.annotate 'line', 686 + find_lex $P1877, "$past" + find_lex $P1878, "$pirop" + $P1877."pirop"($P1878) +.annotate 'line', 687 + find_lex $P1879, "$past" + $P1879."pasttype"("pirop") +.annotate 'line', 688 + find_lex $P1880, "$/" + find_lex $P1881, "$past" + $P1882 = $P1880."!make"($P1881) +.annotate 'line', 676 + .return ($P1882) + control_1856: .local pmc exception .get_results (exception) - getattribute $P1777, exception, "payload" - .return ($P1777) + getattribute $P1883, exception, "payload" + .return ($P1883) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "args" :subid("97_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1781 -.annotate 'line', 665 - new $P1780, 'ExceptionHandler' - set_addr $P1780, control_1779 - $P1780."handle_types"(.CONTROL_RETURN) - push_eh $P1780 - .lex "self", self - .lex "$/", param_1781 - find_lex $P1782, "$/" - find_lex $P1783, "$/" - unless_null $P1783, vivify_555 - $P1783 = root_new ['parrot';'Hash'] - vivify_555: - set $P1784, $P1783["arglist"] - unless_null $P1784, vivify_556 - new $P1784, "Undef" - vivify_556: - $P1785 = $P1784."ast"() - $P1786 = $P1782."!make"($P1785) - .return ($P1786) - control_1779: +.sub "args" :subid("102_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1887 +.annotate 'line', 691 + new $P1886, 'ExceptionHandler' + set_addr $P1886, control_1885 + $P1886."handle_types"(.CONTROL_RETURN) + push_eh $P1886 + .lex "self", self + .lex "$/", param_1887 + find_lex $P1888, "$/" + find_lex $P1889, "$/" + unless_null $P1889, vivify_582 + $P1889 = root_new ['parrot';'Hash'] + vivify_582: + set $P1890, $P1889["arglist"] + unless_null $P1890, vivify_583 + new $P1890, "Undef" + vivify_583: + $P1891 = $P1890."ast"() + $P1892 = $P1888."!make"($P1891) + .return ($P1892) + control_1885: .local pmc exception .get_results (exception) - getattribute $P1787, exception, "payload" - .return ($P1787) + getattribute $P1893, exception, "payload" + .return ($P1893) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "arglist" :subid("98_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1791 -.annotate 'line', 667 - .const 'Sub' $P1802 = "99_1282016534.58916" - capture_lex $P1802 - new $P1790, 'ExceptionHandler' - set_addr $P1790, control_1789 - $P1790."handle_types"(.CONTROL_RETURN) - push_eh $P1790 +.sub "arglist" :subid("103_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_1897 +.annotate 'line', 693 + .const 'Sub' $P1908 = "104_1284728484.24945" + capture_lex $P1908 + new $P1896, 'ExceptionHandler' + set_addr $P1896, control_1895 + $P1896."handle_types"(.CONTROL_RETURN) + push_eh $P1896 .lex "self", self - .lex "$/", param_1791 -.annotate 'line', 668 - new $P1792, "Undef" - .lex "$past", $P1792 -.annotate 'line', 676 - new $P1793, "Undef" - .lex "$i", $P1793 -.annotate 'line', 677 - new $P1794, "Undef" - .lex "$n", $P1794 -.annotate 'line', 668 - get_hll_global $P1795, ["PAST"], "Op" - find_lex $P1796, "$/" - $P1797 = $P1795."new"("call" :named("pasttype"), $P1796 :named("node")) - store_lex "$past", $P1797 -.annotate 'line', 669 - find_lex $P1799, "$/" - unless_null $P1799, vivify_557 - $P1799 = root_new ['parrot';'Hash'] - vivify_557: - set $P1800, $P1799["EXPR"] - unless_null $P1800, vivify_558 - new $P1800, "Undef" - vivify_558: - unless $P1800, if_1798_end - .const 'Sub' $P1802 = "99_1282016534.58916" - capture_lex $P1802 - $P1802() - if_1798_end: -.annotate 'line', 676 - new $P1834, "Integer" - assign $P1834, 0 - store_lex "$i", $P1834 -.annotate 'line', 677 - find_lex $P1835, "$past" - $P1836 = $P1835."list"() - set $N1837, $P1836 - new $P1838, 'Float' - set $P1838, $N1837 - store_lex "$n", $P1838 -.annotate 'line', 678 - new $P1886, 'ExceptionHandler' - set_addr $P1886, loop1885_handler - $P1886."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1886 - loop1885_test: - find_lex $P1839, "$i" - set $N1840, $P1839 - find_lex $P1841, "$n" - set $N1842, $P1841 - islt $I1843, $N1840, $N1842 - unless $I1843, loop1885_done - loop1885_redo: -.annotate 'line', 679 - find_lex $P1845, "$i" - set $I1846, $P1845 - find_lex $P1847, "$past" - unless_null $P1847, vivify_562 - $P1847 = root_new ['parrot';'ResizablePMCArray'] - vivify_562: - set $P1848, $P1847[$I1846] - unless_null $P1848, vivify_563 - new $P1848, "Undef" - vivify_563: - $S1849 = $P1848."name"() - iseq $I1850, $S1849, "&prefix:<|>" - unless $I1850, if_1844_end -.annotate 'line', 680 - find_lex $P1851, "$i" - set $I1852, $P1851 - find_lex $P1853, "$past" - unless_null $P1853, vivify_564 - $P1853 = root_new ['parrot';'ResizablePMCArray'] - vivify_564: - set $P1854, $P1853[$I1852] - unless_null $P1854, vivify_565 - $P1854 = root_new ['parrot';'ResizablePMCArray'] - vivify_565: - set $P1855, $P1854[0] - unless_null $P1855, vivify_566 - new $P1855, "Undef" - vivify_566: - find_lex $P1856, "$i" - set $I1857, $P1856 - find_lex $P1858, "$past" - unless_null $P1858, vivify_567 - $P1858 = root_new ['parrot';'ResizablePMCArray'] - store_lex "$past", $P1858 - vivify_567: - set $P1858[$I1857], $P1855 -.annotate 'line', 681 - find_lex $P1859, "$i" - set $I1860, $P1859 - find_lex $P1861, "$past" - unless_null $P1861, vivify_568 - $P1861 = root_new ['parrot';'ResizablePMCArray'] - vivify_568: - set $P1862, $P1861[$I1860] - unless_null $P1862, vivify_569 - new $P1862, "Undef" - vivify_569: - $P1862."flat"(1) -.annotate 'line', 682 - find_lex $P1866, "$i" - set $I1867, $P1866 - find_lex $P1868, "$past" - unless_null $P1868, vivify_570 - $P1868 = root_new ['parrot';'ResizablePMCArray'] - vivify_570: - set $P1869, $P1868[$I1867] - unless_null $P1869, vivify_571 - new $P1869, "Undef" - vivify_571: - get_hll_global $P1870, ["PAST"], "Val" - $P1871 = $P1869."isa"($P1870) - if $P1871, if_1865 - set $P1864, $P1871 - goto if_1865_end - if_1865: -.annotate 'line', 683 - find_lex $P1872, "$i" - set $I1873, $P1872 - find_lex $P1874, "$past" - unless_null $P1874, vivify_572 - $P1874 = root_new ['parrot';'ResizablePMCArray'] - vivify_572: - set $P1875, $P1874[$I1873] - unless_null $P1875, vivify_573 - new $P1875, "Undef" - vivify_573: - $S1876 = $P1875."name"() - substr $S1877, $S1876, 0, 1 - iseq $I1878, $S1877, "%" - new $P1864, 'Integer' - set $P1864, $I1878 - if_1865_end: - unless $P1864, if_1863_end -.annotate 'line', 684 - find_lex $P1879, "$i" - set $I1880, $P1879 - find_lex $P1881, "$past" - unless_null $P1881, vivify_574 - $P1881 = root_new ['parrot';'ResizablePMCArray'] - vivify_574: - set $P1882, $P1881[$I1880] - unless_null $P1882, vivify_575 - new $P1882, "Undef" - vivify_575: - $P1882."named"(1) - if_1863_end: - if_1844_end: -.annotate 'line', 679 - find_lex $P1883, "$i" - clone $P1884, $P1883 - inc $P1883 - loop1885_next: -.annotate 'line', 678 - goto loop1885_test - loop1885_handler: + .lex "$/", param_1897 +.annotate 'line', 694 + new $P1898, "Undef" + .lex "$past", $P1898 +.annotate 'line', 702 + new $P1899, "Undef" + .lex "$i", $P1899 +.annotate 'line', 703 + new $P1900, "Undef" + .lex "$n", $P1900 +.annotate 'line', 694 + get_hll_global $P1901, ["PAST"], "Op" + find_lex $P1902, "$/" + $P1903 = $P1901."new"("call" :named("pasttype"), $P1902 :named("node")) + store_lex "$past", $P1903 +.annotate 'line', 695 + find_lex $P1905, "$/" + unless_null $P1905, vivify_584 + $P1905 = root_new ['parrot';'Hash'] + vivify_584: + set $P1906, $P1905["EXPR"] + unless_null $P1906, vivify_585 + new $P1906, "Undef" + vivify_585: + unless $P1906, if_1904_end + .const 'Sub' $P1908 = "104_1284728484.24945" + capture_lex $P1908 + $P1908() + if_1904_end: +.annotate 'line', 702 + new $P1940, "Integer" + assign $P1940, 0 + store_lex "$i", $P1940 +.annotate 'line', 703 + find_lex $P1941, "$past" + $P1942 = $P1941."list"() + set $N1943, $P1942 + new $P1944, 'Float' + set $P1944, $N1943 + store_lex "$n", $P1944 +.annotate 'line', 704 + new $P1992, 'ExceptionHandler' + set_addr $P1992, loop1991_handler + $P1992."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1992 + loop1991_test: + find_lex $P1945, "$i" + set $N1946, $P1945 + find_lex $P1947, "$n" + set $N1948, $P1947 + islt $I1949, $N1946, $N1948 + unless $I1949, loop1991_done + loop1991_redo: +.annotate 'line', 705 + find_lex $P1951, "$i" + set $I1952, $P1951 + find_lex $P1953, "$past" + unless_null $P1953, vivify_589 + $P1953 = root_new ['parrot';'ResizablePMCArray'] + vivify_589: + set $P1954, $P1953[$I1952] + unless_null $P1954, vivify_590 + new $P1954, "Undef" + vivify_590: + $S1955 = $P1954."name"() + iseq $I1956, $S1955, "&prefix:<|>" + unless $I1956, if_1950_end +.annotate 'line', 706 + find_lex $P1957, "$i" + set $I1958, $P1957 + find_lex $P1959, "$past" + unless_null $P1959, vivify_591 + $P1959 = root_new ['parrot';'ResizablePMCArray'] + vivify_591: + set $P1960, $P1959[$I1958] + unless_null $P1960, vivify_592 + $P1960 = root_new ['parrot';'ResizablePMCArray'] + vivify_592: + set $P1961, $P1960[0] + unless_null $P1961, vivify_593 + new $P1961, "Undef" + vivify_593: + find_lex $P1962, "$i" + set $I1963, $P1962 + find_lex $P1964, "$past" + unless_null $P1964, vivify_594 + $P1964 = root_new ['parrot';'ResizablePMCArray'] + store_lex "$past", $P1964 + vivify_594: + set $P1964[$I1963], $P1961 +.annotate 'line', 707 + find_lex $P1965, "$i" + set $I1966, $P1965 + find_lex $P1967, "$past" + unless_null $P1967, vivify_595 + $P1967 = root_new ['parrot';'ResizablePMCArray'] + vivify_595: + set $P1968, $P1967[$I1966] + unless_null $P1968, vivify_596 + new $P1968, "Undef" + vivify_596: + $P1968."flat"(1) +.annotate 'line', 708 + find_lex $P1972, "$i" + set $I1973, $P1972 + find_lex $P1974, "$past" + unless_null $P1974, vivify_597 + $P1974 = root_new ['parrot';'ResizablePMCArray'] + vivify_597: + set $P1975, $P1974[$I1973] + unless_null $P1975, vivify_598 + new $P1975, "Undef" + vivify_598: + get_hll_global $P1976, ["PAST"], "Val" + $P1977 = $P1975."isa"($P1976) + if $P1977, if_1971 + set $P1970, $P1977 + goto if_1971_end + if_1971: +.annotate 'line', 709 + find_lex $P1978, "$i" + set $I1979, $P1978 + find_lex $P1980, "$past" + unless_null $P1980, vivify_599 + $P1980 = root_new ['parrot';'ResizablePMCArray'] + vivify_599: + set $P1981, $P1980[$I1979] + unless_null $P1981, vivify_600 + new $P1981, "Undef" + vivify_600: + $S1982 = $P1981."name"() + substr $S1983, $S1982, 0, 1 + iseq $I1984, $S1983, "%" + new $P1970, 'Integer' + set $P1970, $I1984 + if_1971_end: + unless $P1970, if_1969_end +.annotate 'line', 710 + find_lex $P1985, "$i" + set $I1986, $P1985 + find_lex $P1987, "$past" + unless_null $P1987, vivify_601 + $P1987 = root_new ['parrot';'ResizablePMCArray'] + vivify_601: + set $P1988, $P1987[$I1986] + unless_null $P1988, vivify_602 + new $P1988, "Undef" + vivify_602: + $P1988."named"(1) + if_1969_end: + if_1950_end: +.annotate 'line', 705 + find_lex $P1989, "$i" + clone $P1990, $P1989 + inc $P1989 + loop1991_next: +.annotate 'line', 704 + goto loop1991_test + loop1991_handler: .local pmc exception .get_results (exception) - getattribute $P1887, exception, 'type' - eq $P1887, .CONTROL_LOOP_NEXT, loop1885_next - eq $P1887, .CONTROL_LOOP_REDO, loop1885_redo - loop1885_done: + getattribute $P1993, exception, 'type' + eq $P1993, .CONTROL_LOOP_NEXT, loop1991_next + eq $P1993, .CONTROL_LOOP_REDO, loop1991_redo + loop1991_done: pop_eh -.annotate 'line', 689 - find_lex $P1888, "$/" - find_lex $P1889, "$past" - $P1890 = $P1888."!make"($P1889) -.annotate 'line', 667 - .return ($P1890) - control_1789: +.annotate 'line', 715 + find_lex $P1994, "$/" + find_lex $P1995, "$past" + $P1996 = $P1994."!make"($P1995) +.annotate 'line', 693 + .return ($P1996) + control_1895: .local pmc exception .get_results (exception) - getattribute $P1891, exception, "payload" - .return ($P1891) + getattribute $P1997, exception, "payload" + .return ($P1997) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "_block1801" :anon :subid("99_1282016534.58916") :outer("98_1282016534.58916") -.annotate 'line', 669 - .const 'Sub' $P1823 = "100_1282016534.58916" - capture_lex $P1823 -.annotate 'line', 670 - new $P1803, "Undef" - .lex "$expr", $P1803 - find_lex $P1804, "$/" - unless_null $P1804, vivify_559 - $P1804 = root_new ['parrot';'Hash'] - vivify_559: - set $P1805, $P1804["EXPR"] - unless_null $P1805, vivify_560 - new $P1805, "Undef" - vivify_560: - $P1806 = $P1805."ast"() - store_lex "$expr", $P1806 -.annotate 'line', 671 - find_lex $P1811, "$expr" - $S1812 = $P1811."name"() - iseq $I1813, $S1812, "&infix:<,>" - if $I1813, if_1810 - new $P1809, 'Integer' - set $P1809, $I1813 - goto if_1810_end - if_1810: - find_lex $P1814, "$expr" - $P1815 = $P1814."named"() - isfalse $I1816, $P1815 - new $P1809, 'Integer' - set $P1809, $I1816 - if_1810_end: - if $P1809, if_1808 -.annotate 'line', 674 - find_lex $P1831, "$past" - find_lex $P1832, "$expr" - $P1833 = $P1831."push"($P1832) - set $P1807, $P1833 -.annotate 'line', 671 - goto if_1808_end - if_1808: -.annotate 'line', 672 - find_lex $P1818, "$expr" - $P1819 = $P1818."list"() - defined $I1820, $P1819 - unless $I1820, for_undef_561 - iter $P1817, $P1819 - new $P1829, 'ExceptionHandler' - set_addr $P1829, loop1828_handler - $P1829."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1829 - loop1828_test: - unless $P1817, loop1828_done - shift $P1821, $P1817 - loop1828_redo: - .const 'Sub' $P1823 = "100_1282016534.58916" - capture_lex $P1823 - $P1823($P1821) - loop1828_next: - goto loop1828_test - loop1828_handler: - .local pmc exception - .get_results (exception) - getattribute $P1830, exception, 'type' - eq $P1830, .CONTROL_LOOP_NEXT, loop1828_next - eq $P1830, .CONTROL_LOOP_REDO, loop1828_redo - loop1828_done: +.sub "_block1907" :anon :subid("104_1284728484.24945") :outer("103_1284728484.24945") +.annotate 'line', 695 + .const 'Sub' $P1929 = "105_1284728484.24945" + capture_lex $P1929 +.annotate 'line', 696 + new $P1909, "Undef" + .lex "$expr", $P1909 + find_lex $P1910, "$/" + unless_null $P1910, vivify_586 + $P1910 = root_new ['parrot';'Hash'] + vivify_586: + set $P1911, $P1910["EXPR"] + unless_null $P1911, vivify_587 + new $P1911, "Undef" + vivify_587: + $P1912 = $P1911."ast"() + store_lex "$expr", $P1912 +.annotate 'line', 697 + find_lex $P1917, "$expr" + $S1918 = $P1917."name"() + iseq $I1919, $S1918, "&infix:<,>" + if $I1919, if_1916 + new $P1915, 'Integer' + set $P1915, $I1919 + goto if_1916_end + if_1916: + find_lex $P1920, "$expr" + $P1921 = $P1920."named"() + isfalse $I1922, $P1921 + new $P1915, 'Integer' + set $P1915, $I1922 + if_1916_end: + if $P1915, if_1914 +.annotate 'line', 700 + find_lex $P1937, "$past" + find_lex $P1938, "$expr" + $P1939 = $P1937."push"($P1938) + set $P1913, $P1939 +.annotate 'line', 697 + goto if_1914_end + if_1914: +.annotate 'line', 698 + find_lex $P1924, "$expr" + $P1925 = $P1924."list"() + defined $I1926, $P1925 + unless $I1926, for_undef_588 + iter $P1923, $P1925 + new $P1935, 'ExceptionHandler' + set_addr $P1935, loop1934_handler + $P1935."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1935 + loop1934_test: + unless $P1923, loop1934_done + shift $P1927, $P1923 + loop1934_redo: + .const 'Sub' $P1929 = "105_1284728484.24945" + capture_lex $P1929 + $P1929($P1927) + loop1934_next: + goto loop1934_test + loop1934_handler: + .local pmc exception + .get_results (exception) + getattribute $P1936, exception, 'type' + eq $P1936, .CONTROL_LOOP_NEXT, loop1934_next + eq $P1936, .CONTROL_LOOP_REDO, loop1934_redo + loop1934_done: pop_eh - for_undef_561: -.annotate 'line', 671 - set $P1807, $P1817 - if_1808_end: -.annotate 'line', 669 - .return ($P1807) + for_undef_588: +.annotate 'line', 697 + set $P1913, $P1923 + if_1914_end: +.annotate 'line', 695 + .return ($P1913) .end .namespace ["NQP";"Actions"] -.sub "_block1822" :anon :subid("100_1282016534.58916") :outer("99_1282016534.58916") - .param pmc param_1824 -.annotate 'line', 672 - .lex "$_", param_1824 - find_lex $P1825, "$past" - find_lex $P1826, "$_" - $P1827 = $P1825."push"($P1826) - .return ($P1827) +.sub "_block1928" :anon :subid("105_1284728484.24945") :outer("104_1284728484.24945") + .param pmc param_1930 +.annotate 'line', 698 + .lex "$_", param_1930 + find_lex $P1931, "$past" + find_lex $P1932, "$_" + $P1933 = $P1931."push"($P1932) + .return ($P1933) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("101_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1895 -.annotate 'line', 693 - new $P1894, 'ExceptionHandler' - set_addr $P1894, control_1893 - $P1894."handle_types"(.CONTROL_RETURN) - push_eh $P1894 - .lex "self", self - .lex "$/", param_1895 - find_lex $P1896, "$/" - find_lex $P1897, "$/" - unless_null $P1897, vivify_576 - $P1897 = root_new ['parrot';'Hash'] - vivify_576: - set $P1898, $P1897["value"] - unless_null $P1898, vivify_577 - new $P1898, "Undef" - vivify_577: - $P1899 = $P1898."ast"() - $P1900 = $P1896."!make"($P1899) - .return ($P1900) - control_1893: +.sub "term:sym" :subid("106_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2001 +.annotate 'line', 719 + new $P2000, 'ExceptionHandler' + set_addr $P2000, control_1999 + $P2000."handle_types"(.CONTROL_RETURN) + push_eh $P2000 + .lex "self", self + .lex "$/", param_2001 + find_lex $P2002, "$/" + find_lex $P2003, "$/" + unless_null $P2003, vivify_603 + $P2003 = root_new ['parrot';'Hash'] + vivify_603: + set $P2004, $P2003["value"] + unless_null $P2004, vivify_604 + new $P2004, "Undef" + vivify_604: + $P2005 = $P2004."ast"() + $P2006 = $P2002."!make"($P2005) + .return ($P2006) + control_1999: .local pmc exception .get_results (exception) - getattribute $P1901, exception, "payload" - .return ($P1901) + getattribute $P2007, exception, "payload" + .return ($P2007) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "circumfix:sym<( )>" :subid("102_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1905 -.annotate 'line', 695 - new $P1904, 'ExceptionHandler' - set_addr $P1904, control_1903 - $P1904."handle_types"(.CONTROL_RETURN) - push_eh $P1904 +.sub "circumfix:sym<( )>" :subid("107_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2011 +.annotate 'line', 721 + new $P2010, 'ExceptionHandler' + set_addr $P2010, control_2009 + $P2010."handle_types"(.CONTROL_RETURN) + push_eh $P2010 .lex "self", self - .lex "$/", param_1905 -.annotate 'line', 696 - find_lex $P1906, "$/" -.annotate 'line', 697 - find_lex $P1909, "$/" - unless_null $P1909, vivify_578 - $P1909 = root_new ['parrot';'Hash'] - vivify_578: - set $P1910, $P1909["EXPR"] - unless_null $P1910, vivify_579 - new $P1910, "Undef" - vivify_579: - if $P1910, if_1908 -.annotate 'line', 698 - get_hll_global $P1915, ["PAST"], "Op" - find_lex $P1916, "$/" - $P1917 = $P1915."new"("list" :named("pasttype"), $P1916 :named("node")) - set $P1907, $P1917 -.annotate 'line', 697 - goto if_1908_end - if_1908: - find_lex $P1911, "$/" - unless_null $P1911, vivify_580 - $P1911 = root_new ['parrot';'Hash'] - vivify_580: - set $P1912, $P1911["EXPR"] - unless_null $P1912, vivify_581 - $P1912 = root_new ['parrot';'ResizablePMCArray'] - vivify_581: - set $P1913, $P1912[0] - unless_null $P1913, vivify_582 - new $P1913, "Undef" - vivify_582: - $P1914 = $P1913."ast"() - set $P1907, $P1914 - if_1908_end: - $P1918 = $P1906."!make"($P1907) -.annotate 'line', 695 - .return ($P1918) - control_1903: + .lex "$/", param_2011 +.annotate 'line', 722 + find_lex $P2012, "$/" +.annotate 'line', 723 + find_lex $P2015, "$/" + unless_null $P2015, vivify_605 + $P2015 = root_new ['parrot';'Hash'] + vivify_605: + set $P2016, $P2015["EXPR"] + unless_null $P2016, vivify_606 + new $P2016, "Undef" + vivify_606: + if $P2016, if_2014 +.annotate 'line', 724 + get_hll_global $P2021, ["PAST"], "Op" + find_lex $P2022, "$/" + $P2023 = $P2021."new"("list" :named("pasttype"), $P2022 :named("node")) + set $P2013, $P2023 +.annotate 'line', 723 + goto if_2014_end + if_2014: + find_lex $P2017, "$/" + unless_null $P2017, vivify_607 + $P2017 = root_new ['parrot';'Hash'] + vivify_607: + set $P2018, $P2017["EXPR"] + unless_null $P2018, vivify_608 + $P2018 = root_new ['parrot';'ResizablePMCArray'] + vivify_608: + set $P2019, $P2018[0] + unless_null $P2019, vivify_609 + new $P2019, "Undef" + vivify_609: + $P2020 = $P2019."ast"() + set $P2013, $P2020 + if_2014_end: + $P2024 = $P2012."!make"($P2013) +.annotate 'line', 721 + .return ($P2024) + control_2009: .local pmc exception .get_results (exception) - getattribute $P1919, exception, "payload" - .return ($P1919) + getattribute $P2025, exception, "payload" + .return ($P2025) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "circumfix:sym<[ ]>" :subid("103_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1923 -.annotate 'line', 701 - new $P1922, 'ExceptionHandler' - set_addr $P1922, control_1921 - $P1922."handle_types"(.CONTROL_RETURN) - push_eh $P1922 +.sub "circumfix:sym<[ ]>" :subid("108_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2029 +.annotate 'line', 727 + new $P2028, 'ExceptionHandler' + set_addr $P2028, control_2027 + $P2028."handle_types"(.CONTROL_RETURN) + push_eh $P2028 .lex "self", self - .lex "$/", param_1923 -.annotate 'line', 702 - new $P1924, "Undef" - .lex "$past", $P1924 -.annotate 'line', 701 - find_lex $P1925, "$past" -.annotate 'line', 703 - find_lex $P1927, "$/" - unless_null $P1927, vivify_583 - $P1927 = root_new ['parrot';'Hash'] - vivify_583: - set $P1928, $P1927["EXPR"] - unless_null $P1928, vivify_584 - new $P1928, "Undef" - vivify_584: - if $P1928, if_1926 -.annotate 'line', 710 - get_hll_global $P1940, ["PAST"], "Op" - $P1941 = $P1940."new"("list" :named("pasttype")) - store_lex "$past", $P1941 -.annotate 'line', 709 - goto if_1926_end - if_1926: -.annotate 'line', 704 - find_lex $P1929, "$/" - unless_null $P1929, vivify_585 - $P1929 = root_new ['parrot';'Hash'] - vivify_585: - set $P1930, $P1929["EXPR"] - unless_null $P1930, vivify_586 - $P1930 = root_new ['parrot';'ResizablePMCArray'] - vivify_586: - set $P1931, $P1930[0] - unless_null $P1931, vivify_587 - new $P1931, "Undef" - vivify_587: - $P1932 = $P1931."ast"() - store_lex "$past", $P1932 -.annotate 'line', 705 - find_lex $P1934, "$past" - $S1935 = $P1934."name"() - isne $I1936, $S1935, "&infix:<,>" - unless $I1936, if_1933_end -.annotate 'line', 706 - get_hll_global $P1937, ["PAST"], "Op" - find_lex $P1938, "$past" - $P1939 = $P1937."new"($P1938, "list" :named("pasttype")) - store_lex "$past", $P1939 - if_1933_end: - if_1926_end: -.annotate 'line', 712 - find_lex $P1942, "$past" - $P1942."name"("&circumfix:<[ ]>") -.annotate 'line', 713 - find_lex $P1943, "$/" - find_lex $P1944, "$past" - $P1945 = $P1943."!make"($P1944) -.annotate 'line', 701 - .return ($P1945) - control_1921: - .local pmc exception - .get_results (exception) - getattribute $P1946, exception, "payload" - .return ($P1946) + .lex "$/", param_2029 +.annotate 'line', 728 + new $P2030, "Undef" + .lex "$past", $P2030 +.annotate 'line', 727 + find_lex $P2031, "$past" +.annotate 'line', 729 + find_lex $P2033, "$/" + unless_null $P2033, vivify_610 + $P2033 = root_new ['parrot';'Hash'] + vivify_610: + set $P2034, $P2033["EXPR"] + unless_null $P2034, vivify_611 + new $P2034, "Undef" + vivify_611: + if $P2034, if_2032 +.annotate 'line', 736 + get_hll_global $P2046, ["PAST"], "Op" + $P2047 = $P2046."new"("list" :named("pasttype")) + store_lex "$past", $P2047 +.annotate 'line', 735 + goto if_2032_end + if_2032: +.annotate 'line', 730 + find_lex $P2035, "$/" + unless_null $P2035, vivify_612 + $P2035 = root_new ['parrot';'Hash'] + vivify_612: + set $P2036, $P2035["EXPR"] + unless_null $P2036, vivify_613 + $P2036 = root_new ['parrot';'ResizablePMCArray'] + vivify_613: + set $P2037, $P2036[0] + unless_null $P2037, vivify_614 + new $P2037, "Undef" + vivify_614: + $P2038 = $P2037."ast"() + store_lex "$past", $P2038 +.annotate 'line', 731 + find_lex $P2040, "$past" + $S2041 = $P2040."name"() + isne $I2042, $S2041, "&infix:<,>" + unless $I2042, if_2039_end +.annotate 'line', 732 + get_hll_global $P2043, ["PAST"], "Op" + find_lex $P2044, "$past" + $P2045 = $P2043."new"($P2044, "list" :named("pasttype")) + store_lex "$past", $P2045 + if_2039_end: + if_2032_end: +.annotate 'line', 738 + find_lex $P2048, "$past" + $P2048."name"("&circumfix:<[ ]>") +.annotate 'line', 739 + find_lex $P2049, "$/" + find_lex $P2050, "$past" + $P2051 = $P2049."!make"($P2050) +.annotate 'line', 727 + .return ($P2051) + control_2027: + .local pmc exception + .get_results (exception) + getattribute $P2052, exception, "payload" + .return ($P2052) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "circumfix:sym" :subid("104_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1950 -.annotate 'line', 716 - new $P1949, 'ExceptionHandler' - set_addr $P1949, control_1948 - $P1949."handle_types"(.CONTROL_RETURN) - push_eh $P1949 - .lex "self", self - .lex "$/", param_1950 - find_lex $P1951, "$/" - find_lex $P1952, "$/" - unless_null $P1952, vivify_588 - $P1952 = root_new ['parrot';'Hash'] - vivify_588: - set $P1953, $P1952["quote_EXPR"] - unless_null $P1953, vivify_589 - new $P1953, "Undef" - vivify_589: - $P1954 = $P1953."ast"() - $P1955 = $P1951."!make"($P1954) - .return ($P1955) - control_1948: +.sub "circumfix:sym" :subid("109_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2056 +.annotate 'line', 742 + new $P2055, 'ExceptionHandler' + set_addr $P2055, control_2054 + $P2055."handle_types"(.CONTROL_RETURN) + push_eh $P2055 + .lex "self", self + .lex "$/", param_2056 + find_lex $P2057, "$/" + find_lex $P2058, "$/" + unless_null $P2058, vivify_615 + $P2058 = root_new ['parrot';'Hash'] + vivify_615: + set $P2059, $P2058["quote_EXPR"] + unless_null $P2059, vivify_616 + new $P2059, "Undef" + vivify_616: + $P2060 = $P2059."ast"() + $P2061 = $P2057."!make"($P2060) + .return ($P2061) + control_2054: .local pmc exception .get_results (exception) - getattribute $P1956, exception, "payload" - .return ($P1956) + getattribute $P2062, exception, "payload" + .return ($P2062) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("105_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1960 -.annotate 'line', 717 - new $P1959, 'ExceptionHandler' - set_addr $P1959, control_1958 - $P1959."handle_types"(.CONTROL_RETURN) - push_eh $P1959 - .lex "self", self - .lex "$/", param_1960 - find_lex $P1961, "$/" - find_lex $P1962, "$/" - unless_null $P1962, vivify_590 - $P1962 = root_new ['parrot';'Hash'] - vivify_590: - set $P1963, $P1962["quote_EXPR"] - unless_null $P1963, vivify_591 - new $P1963, "Undef" - vivify_591: - $P1964 = $P1963."ast"() - $P1965 = $P1961."!make"($P1964) - .return ($P1965) - control_1958: +.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("110_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2066 +.annotate 'line', 743 + new $P2065, 'ExceptionHandler' + set_addr $P2065, control_2064 + $P2065."handle_types"(.CONTROL_RETURN) + push_eh $P2065 + .lex "self", self + .lex "$/", param_2066 + find_lex $P2067, "$/" + find_lex $P2068, "$/" + unless_null $P2068, vivify_617 + $P2068 = root_new ['parrot';'Hash'] + vivify_617: + set $P2069, $P2068["quote_EXPR"] + unless_null $P2069, vivify_618 + new $P2069, "Undef" + vivify_618: + $P2070 = $P2069."ast"() + $P2071 = $P2067."!make"($P2070) + .return ($P2071) + control_2064: .local pmc exception .get_results (exception) - getattribute $P1966, exception, "payload" - .return ($P1966) + getattribute $P2072, exception, "payload" + .return ($P2072) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "circumfix:sym<{ }>" :subid("106_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1970 -.annotate 'line', 719 - new $P1969, 'ExceptionHandler' - set_addr $P1969, control_1968 - $P1969."handle_types"(.CONTROL_RETURN) - push_eh $P1969 - .lex "self", self - .lex "$/", param_1970 -.annotate 'line', 720 - new $P1971, "Undef" - .lex "$past", $P1971 - find_lex $P1974, "$/" - unless_null $P1974, vivify_592 - $P1974 = root_new ['parrot';'Hash'] - vivify_592: - set $P1975, $P1974["pblock"] - unless_null $P1975, vivify_593 - $P1975 = root_new ['parrot';'Hash'] - vivify_593: - set $P1976, $P1975["blockoid"] - unless_null $P1976, vivify_594 - $P1976 = root_new ['parrot';'Hash'] - vivify_594: - set $P1977, $P1976["statementlist"] - unless_null $P1977, vivify_595 - $P1977 = root_new ['parrot';'Hash'] - vivify_595: - set $P1978, $P1977["statement"] - unless_null $P1978, vivify_596 - new $P1978, "Undef" - vivify_596: - set $N1979, $P1978 - isgt $I1980, $N1979, 0.0 - if $I1980, if_1973 -.annotate 'line', 722 - $P1984 = "vivitype"("%") - set $P1972, $P1984 -.annotate 'line', 720 - goto if_1973_end - if_1973: -.annotate 'line', 721 - find_lex $P1981, "$/" - unless_null $P1981, vivify_597 - $P1981 = root_new ['parrot';'Hash'] - vivify_597: - set $P1982, $P1981["pblock"] - unless_null $P1982, vivify_598 - new $P1982, "Undef" - vivify_598: - $P1983 = $P1982."ast"() - set $P1972, $P1983 - if_1973_end: - store_lex "$past", $P1972 -.annotate 'line', 723 - new $P1985, "Integer" - assign $P1985, 1 - find_lex $P1986, "$past" - unless_null $P1986, vivify_599 - $P1986 = root_new ['parrot';'Hash'] - store_lex "$past", $P1986 - vivify_599: - set $P1986["bareblock"], $P1985 -.annotate 'line', 724 - find_lex $P1987, "$/" - find_lex $P1988, "$past" - $P1989 = $P1987."!make"($P1988) -.annotate 'line', 719 - .return ($P1989) - control_1968: +.sub "circumfix:sym<{ }>" :subid("111_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2076 +.annotate 'line', 745 + new $P2075, 'ExceptionHandler' + set_addr $P2075, control_2074 + $P2075."handle_types"(.CONTROL_RETURN) + push_eh $P2075 + .lex "self", self + .lex "$/", param_2076 +.annotate 'line', 746 + new $P2077, "Undef" + .lex "$past", $P2077 + find_lex $P2080, "$/" + unless_null $P2080, vivify_619 + $P2080 = root_new ['parrot';'Hash'] + vivify_619: + set $P2081, $P2080["pblock"] + unless_null $P2081, vivify_620 + $P2081 = root_new ['parrot';'Hash'] + vivify_620: + set $P2082, $P2081["blockoid"] + unless_null $P2082, vivify_621 + $P2082 = root_new ['parrot';'Hash'] + vivify_621: + set $P2083, $P2082["statementlist"] + unless_null $P2083, vivify_622 + $P2083 = root_new ['parrot';'Hash'] + vivify_622: + set $P2084, $P2083["statement"] + unless_null $P2084, vivify_623 + new $P2084, "Undef" + vivify_623: + set $N2085, $P2084 + isgt $I2086, $N2085, 0.0 + if $I2086, if_2079 +.annotate 'line', 748 + $P2090 = "vivitype"("%") + set $P2078, $P2090 +.annotate 'line', 746 + goto if_2079_end + if_2079: +.annotate 'line', 747 + find_lex $P2087, "$/" + unless_null $P2087, vivify_624 + $P2087 = root_new ['parrot';'Hash'] + vivify_624: + set $P2088, $P2087["pblock"] + unless_null $P2088, vivify_625 + new $P2088, "Undef" + vivify_625: + $P2089 = $P2088."ast"() + set $P2078, $P2089 + if_2079_end: + store_lex "$past", $P2078 +.annotate 'line', 749 + new $P2091, "Integer" + assign $P2091, 1 + find_lex $P2092, "$past" + unless_null $P2092, vivify_626 + $P2092 = root_new ['parrot';'Hash'] + store_lex "$past", $P2092 + vivify_626: + set $P2092["bareblock"], $P2091 +.annotate 'line', 750 + find_lex $P2093, "$/" + find_lex $P2094, "$past" + $P2095 = $P2093."!make"($P2094) +.annotate 'line', 745 + .return ($P2095) + control_2074: .local pmc exception .get_results (exception) - getattribute $P1990, exception, "payload" - .return ($P1990) + getattribute $P2096, exception, "payload" + .return ($P2096) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "circumfix:sym" :subid("107_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_1994 -.annotate 'line', 727 - new $P1993, 'ExceptionHandler' - set_addr $P1993, control_1992 - $P1993."handle_types"(.CONTROL_RETURN) - push_eh $P1993 +.sub "circumfix:sym" :subid("112_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2100 +.annotate 'line', 753 + new $P2099, 'ExceptionHandler' + set_addr $P2099, control_2098 + $P2099."handle_types"(.CONTROL_RETURN) + push_eh $P2099 .lex "self", self - .lex "$/", param_1994 -.annotate 'line', 728 - new $P1995, "Undef" - .lex "$name", $P1995 - find_lex $P1998, "$/" - unless_null $P1998, vivify_600 - $P1998 = root_new ['parrot';'Hash'] - vivify_600: - set $P1999, $P1998["sigil"] - unless_null $P1999, vivify_601 - new $P1999, "Undef" - vivify_601: - set $S2000, $P1999 - iseq $I2001, $S2000, "@" - if $I2001, if_1997 -.annotate 'line', 729 - find_lex $P2005, "$/" - unless_null $P2005, vivify_602 - $P2005 = root_new ['parrot';'Hash'] - vivify_602: - set $P2006, $P2005["sigil"] - unless_null $P2006, vivify_603 - new $P2006, "Undef" - vivify_603: - set $S2007, $P2006 - iseq $I2008, $S2007, "%" - if $I2008, if_2004 - new $P2010, "String" - assign $P2010, "item" - set $P2003, $P2010 - goto if_2004_end - if_2004: - new $P2009, "String" - assign $P2009, "hash" - set $P2003, $P2009 - if_2004_end: - set $P1996, $P2003 -.annotate 'line', 728 - goto if_1997_end - if_1997: - new $P2002, "String" - assign $P2002, "list" - set $P1996, $P2002 - if_1997_end: - store_lex "$name", $P1996 -.annotate 'line', 731 - find_lex $P2011, "$/" - get_hll_global $P2012, ["PAST"], "Op" - find_lex $P2013, "$name" - find_lex $P2014, "$/" - unless_null $P2014, vivify_604 - $P2014 = root_new ['parrot';'Hash'] - vivify_604: - set $P2015, $P2014["semilist"] - unless_null $P2015, vivify_605 - new $P2015, "Undef" - vivify_605: - $P2016 = $P2015."ast"() - $P2017 = $P2012."new"($P2016, "callmethod" :named("pasttype"), $P2013 :named("name")) - $P2018 = $P2011."!make"($P2017) -.annotate 'line', 727 - .return ($P2018) - control_1992: + .lex "$/", param_2100 +.annotate 'line', 754 + new $P2101, "Undef" + .lex "$name", $P2101 + find_lex $P2104, "$/" + unless_null $P2104, vivify_627 + $P2104 = root_new ['parrot';'Hash'] + vivify_627: + set $P2105, $P2104["sigil"] + unless_null $P2105, vivify_628 + new $P2105, "Undef" + vivify_628: + set $S2106, $P2105 + iseq $I2107, $S2106, "@" + if $I2107, if_2103 +.annotate 'line', 755 + find_lex $P2111, "$/" + unless_null $P2111, vivify_629 + $P2111 = root_new ['parrot';'Hash'] + vivify_629: + set $P2112, $P2111["sigil"] + unless_null $P2112, vivify_630 + new $P2112, "Undef" + vivify_630: + set $S2113, $P2112 + iseq $I2114, $S2113, "%" + if $I2114, if_2110 + new $P2116, "String" + assign $P2116, "item" + set $P2109, $P2116 + goto if_2110_end + if_2110: + new $P2115, "String" + assign $P2115, "hash" + set $P2109, $P2115 + if_2110_end: + set $P2102, $P2109 +.annotate 'line', 754 + goto if_2103_end + if_2103: + new $P2108, "String" + assign $P2108, "list" + set $P2102, $P2108 + if_2103_end: + store_lex "$name", $P2102 +.annotate 'line', 757 + find_lex $P2117, "$/" + get_hll_global $P2118, ["PAST"], "Op" + find_lex $P2119, "$name" + find_lex $P2120, "$/" + unless_null $P2120, vivify_631 + $P2120 = root_new ['parrot';'Hash'] + vivify_631: + set $P2121, $P2120["semilist"] + unless_null $P2121, vivify_632 + new $P2121, "Undef" + vivify_632: + $P2122 = $P2121."ast"() + $P2123 = $P2118."new"($P2122, "callmethod" :named("pasttype"), $P2119 :named("name")) + $P2124 = $P2117."!make"($P2123) +.annotate 'line', 753 + .return ($P2124) + control_2098: .local pmc exception .get_results (exception) - getattribute $P2019, exception, "payload" - .return ($P2019) + getattribute $P2125, exception, "payload" + .return ($P2125) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "semilist" :subid("108_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2023 -.annotate 'line', 734 - new $P2022, 'ExceptionHandler' - set_addr $P2022, control_2021 - $P2022."handle_types"(.CONTROL_RETURN) - push_eh $P2022 +.sub "semilist" :subid("113_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2129 +.annotate 'line', 760 + new $P2128, 'ExceptionHandler' + set_addr $P2128, control_2127 + $P2128."handle_types"(.CONTROL_RETURN) + push_eh $P2128 .lex "self", self - .lex "$/", param_2023 - find_lex $P2024, "$/" - find_lex $P2025, "$/" - unless_null $P2025, vivify_606 - $P2025 = root_new ['parrot';'Hash'] - vivify_606: - set $P2026, $P2025["statement"] - unless_null $P2026, vivify_607 - new $P2026, "Undef" - vivify_607: - $P2027 = $P2026."ast"() - $P2028 = $P2024."!make"($P2027) - .return ($P2028) - control_2021: + .lex "$/", param_2129 + find_lex $P2130, "$/" + find_lex $P2131, "$/" + unless_null $P2131, vivify_633 + $P2131 = root_new ['parrot';'Hash'] + vivify_633: + set $P2132, $P2131["statement"] + unless_null $P2132, vivify_634 + new $P2132, "Undef" + vivify_634: + $P2133 = $P2132."ast"() + $P2134 = $P2130."!make"($P2133) + .return ($P2134) + control_2127: .local pmc exception .get_results (exception) - getattribute $P2029, exception, "payload" - .return ($P2029) + getattribute $P2135, exception, "payload" + .return ($P2135) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postcircumfix:sym<[ ]>" :subid("109_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2033 -.annotate 'line', 736 - new $P2032, 'ExceptionHandler' - set_addr $P2032, control_2031 - $P2032."handle_types"(.CONTROL_RETURN) - push_eh $P2032 - .lex "self", self - .lex "$/", param_2033 -.annotate 'line', 737 - find_lex $P2034, "$/" - get_hll_global $P2035, ["PAST"], "Var" - find_lex $P2036, "$/" - unless_null $P2036, vivify_608 - $P2036 = root_new ['parrot';'Hash'] - vivify_608: - set $P2037, $P2036["EXPR"] - unless_null $P2037, vivify_609 - new $P2037, "Undef" - vivify_609: - $P2038 = $P2037."ast"() -.annotate 'line', 739 - $P2039 = "vivitype"("@") - $P2040 = $P2035."new"($P2038, "keyed_int" :named("scope"), "Undef" :named("viviself"), $P2039 :named("vivibase")) -.annotate 'line', 737 - $P2041 = $P2034."!make"($P2040) -.annotate 'line', 736 - .return ($P2041) - control_2031: +.sub "postcircumfix:sym<[ ]>" :subid("114_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2139 +.annotate 'line', 762 + new $P2138, 'ExceptionHandler' + set_addr $P2138, control_2137 + $P2138."handle_types"(.CONTROL_RETURN) + push_eh $P2138 + .lex "self", self + .lex "$/", param_2139 +.annotate 'line', 763 + find_lex $P2140, "$/" + get_hll_global $P2141, ["PAST"], "Var" + find_lex $P2142, "$/" + unless_null $P2142, vivify_635 + $P2142 = root_new ['parrot';'Hash'] + vivify_635: + set $P2143, $P2142["EXPR"] + unless_null $P2143, vivify_636 + new $P2143, "Undef" + vivify_636: + $P2144 = $P2143."ast"() +.annotate 'line', 765 + $P2145 = "vivitype"("@") + $P2146 = $P2141."new"($P2144, "keyed_int" :named("scope"), "Undef" :named("viviself"), $P2145 :named("vivibase")) +.annotate 'line', 763 + $P2147 = $P2140."!make"($P2146) +.annotate 'line', 762 + .return ($P2147) + control_2137: .local pmc exception .get_results (exception) - getattribute $P2042, exception, "payload" - .return ($P2042) + getattribute $P2148, exception, "payload" + .return ($P2148) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postcircumfix:sym<{ }>" :subid("110_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2046 -.annotate 'line', 742 - new $P2045, 'ExceptionHandler' - set_addr $P2045, control_2044 - $P2045."handle_types"(.CONTROL_RETURN) - push_eh $P2045 +.sub "postcircumfix:sym<{ }>" :subid("115_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2152 +.annotate 'line', 768 + new $P2151, 'ExceptionHandler' + set_addr $P2151, control_2150 + $P2151."handle_types"(.CONTROL_RETURN) + push_eh $P2151 .lex "self", self - .lex "$/", param_2046 -.annotate 'line', 743 - find_lex $P2047, "$/" - get_hll_global $P2048, ["PAST"], "Var" - find_lex $P2049, "$/" - unless_null $P2049, vivify_610 - $P2049 = root_new ['parrot';'Hash'] - vivify_610: - set $P2050, $P2049["EXPR"] - unless_null $P2050, vivify_611 - new $P2050, "Undef" - vivify_611: - $P2051 = $P2050."ast"() -.annotate 'line', 745 - $P2052 = "vivitype"("%") - $P2053 = $P2048."new"($P2051, "keyed" :named("scope"), "Undef" :named("viviself"), $P2052 :named("vivibase")) -.annotate 'line', 743 - $P2054 = $P2047."!make"($P2053) -.annotate 'line', 742 - .return ($P2054) - control_2044: + .lex "$/", param_2152 +.annotate 'line', 769 + find_lex $P2153, "$/" + get_hll_global $P2154, ["PAST"], "Var" + find_lex $P2155, "$/" + unless_null $P2155, vivify_637 + $P2155 = root_new ['parrot';'Hash'] + vivify_637: + set $P2156, $P2155["EXPR"] + unless_null $P2156, vivify_638 + new $P2156, "Undef" + vivify_638: + $P2157 = $P2156."ast"() +.annotate 'line', 771 + $P2158 = "vivitype"("%") + $P2159 = $P2154."new"($P2157, "keyed" :named("scope"), "Undef" :named("viviself"), $P2158 :named("vivibase")) +.annotate 'line', 769 + $P2160 = $P2153."!make"($P2159) +.annotate 'line', 768 + .return ($P2160) + control_2150: .local pmc exception .get_results (exception) - getattribute $P2055, exception, "payload" - .return ($P2055) + getattribute $P2161, exception, "payload" + .return ($P2161) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postcircumfix:sym" :subid("111_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2059 -.annotate 'line', 748 - new $P2058, 'ExceptionHandler' - set_addr $P2058, control_2057 - $P2058."handle_types"(.CONTROL_RETURN) - push_eh $P2058 - .lex "self", self - .lex "$/", param_2059 -.annotate 'line', 749 - find_lex $P2060, "$/" - get_hll_global $P2061, ["PAST"], "Var" - find_lex $P2062, "$/" - unless_null $P2062, vivify_612 - $P2062 = root_new ['parrot';'Hash'] - vivify_612: - set $P2063, $P2062["quote_EXPR"] - unless_null $P2063, vivify_613 - new $P2063, "Undef" - vivify_613: - $P2064 = $P2063."ast"() -.annotate 'line', 751 - $P2065 = "vivitype"("%") - $P2066 = $P2061."new"($P2064, "keyed" :named("scope"), "Undef" :named("viviself"), $P2065 :named("vivibase")) -.annotate 'line', 749 - $P2067 = $P2060."!make"($P2066) -.annotate 'line', 748 - .return ($P2067) - control_2057: +.sub "postcircumfix:sym" :subid("116_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2165 +.annotate 'line', 774 + new $P2164, 'ExceptionHandler' + set_addr $P2164, control_2163 + $P2164."handle_types"(.CONTROL_RETURN) + push_eh $P2164 + .lex "self", self + .lex "$/", param_2165 +.annotate 'line', 775 + find_lex $P2166, "$/" + get_hll_global $P2167, ["PAST"], "Var" + find_lex $P2168, "$/" + unless_null $P2168, vivify_639 + $P2168 = root_new ['parrot';'Hash'] + vivify_639: + set $P2169, $P2168["quote_EXPR"] + unless_null $P2169, vivify_640 + new $P2169, "Undef" + vivify_640: + $P2170 = $P2169."ast"() +.annotate 'line', 777 + $P2171 = "vivitype"("%") + $P2172 = $P2167."new"($P2170, "keyed" :named("scope"), "Undef" :named("viviself"), $P2171 :named("vivibase")) +.annotate 'line', 775 + $P2173 = $P2166."!make"($P2172) +.annotate 'line', 774 + .return ($P2173) + control_2163: .local pmc exception .get_results (exception) - getattribute $P2068, exception, "payload" - .return ($P2068) + getattribute $P2174, exception, "payload" + .return ($P2174) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postcircumfix:sym<( )>" :subid("112_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2072 -.annotate 'line', 754 - new $P2071, 'ExceptionHandler' - set_addr $P2071, control_2070 - $P2071."handle_types"(.CONTROL_RETURN) - push_eh $P2071 +.sub "postcircumfix:sym<( )>" :subid("117_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2178 +.annotate 'line', 780 + new $P2177, 'ExceptionHandler' + set_addr $P2177, control_2176 + $P2177."handle_types"(.CONTROL_RETURN) + push_eh $P2177 .lex "self", self - .lex "$/", param_2072 -.annotate 'line', 755 - find_lex $P2073, "$/" - find_lex $P2074, "$/" - unless_null $P2074, vivify_614 - $P2074 = root_new ['parrot';'Hash'] - vivify_614: - set $P2075, $P2074["arglist"] - unless_null $P2075, vivify_615 - new $P2075, "Undef" - vivify_615: - $P2076 = $P2075."ast"() - $P2077 = $P2073."!make"($P2076) -.annotate 'line', 754 - .return ($P2077) - control_2070: + .lex "$/", param_2178 +.annotate 'line', 781 + find_lex $P2179, "$/" + find_lex $P2180, "$/" + unless_null $P2180, vivify_641 + $P2180 = root_new ['parrot';'Hash'] + vivify_641: + set $P2181, $P2180["arglist"] + unless_null $P2181, vivify_642 + new $P2181, "Undef" + vivify_642: + $P2182 = $P2181."ast"() + $P2183 = $P2179."!make"($P2182) +.annotate 'line', 780 + .return ($P2183) + control_2176: .local pmc exception .get_results (exception) - getattribute $P2078, exception, "payload" - .return ($P2078) + getattribute $P2184, exception, "payload" + .return ($P2184) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "value" :subid("113_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2082 -.annotate 'line', 758 - new $P2081, 'ExceptionHandler' - set_addr $P2081, control_2080 - $P2081."handle_types"(.CONTROL_RETURN) - push_eh $P2081 +.sub "value" :subid("118_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2188 +.annotate 'line', 784 + new $P2187, 'ExceptionHandler' + set_addr $P2187, control_2186 + $P2187."handle_types"(.CONTROL_RETURN) + push_eh $P2187 .lex "self", self - .lex "$/", param_2082 -.annotate 'line', 759 - find_lex $P2083, "$/" - find_lex $P2086, "$/" - unless_null $P2086, vivify_616 - $P2086 = root_new ['parrot';'Hash'] - vivify_616: - set $P2087, $P2086["quote"] - unless_null $P2087, vivify_617 - new $P2087, "Undef" - vivify_617: - if $P2087, if_2085 - find_lex $P2091, "$/" - unless_null $P2091, vivify_618 - $P2091 = root_new ['parrot';'Hash'] - vivify_618: - set $P2092, $P2091["number"] - unless_null $P2092, vivify_619 - new $P2092, "Undef" - vivify_619: - $P2093 = $P2092."ast"() - set $P2084, $P2093 - goto if_2085_end - if_2085: - find_lex $P2088, "$/" - unless_null $P2088, vivify_620 - $P2088 = root_new ['parrot';'Hash'] - vivify_620: - set $P2089, $P2088["quote"] - unless_null $P2089, vivify_621 - new $P2089, "Undef" - vivify_621: - $P2090 = $P2089."ast"() - set $P2084, $P2090 - if_2085_end: - $P2094 = $P2083."!make"($P2084) -.annotate 'line', 758 - .return ($P2094) - control_2080: + .lex "$/", param_2188 +.annotate 'line', 785 + find_lex $P2189, "$/" + find_lex $P2192, "$/" + unless_null $P2192, vivify_643 + $P2192 = root_new ['parrot';'Hash'] + vivify_643: + set $P2193, $P2192["quote"] + unless_null $P2193, vivify_644 + new $P2193, "Undef" + vivify_644: + if $P2193, if_2191 + find_lex $P2197, "$/" + unless_null $P2197, vivify_645 + $P2197 = root_new ['parrot';'Hash'] + vivify_645: + set $P2198, $P2197["number"] + unless_null $P2198, vivify_646 + new $P2198, "Undef" + vivify_646: + $P2199 = $P2198."ast"() + set $P2190, $P2199 + goto if_2191_end + if_2191: + find_lex $P2194, "$/" + unless_null $P2194, vivify_647 + $P2194 = root_new ['parrot';'Hash'] + vivify_647: + set $P2195, $P2194["quote"] + unless_null $P2195, vivify_648 + new $P2195, "Undef" + vivify_648: + $P2196 = $P2195."ast"() + set $P2190, $P2196 + if_2191_end: + $P2200 = $P2189."!make"($P2190) +.annotate 'line', 784 + .return ($P2200) + control_2186: .local pmc exception .get_results (exception) - getattribute $P2095, exception, "payload" - .return ($P2095) + getattribute $P2201, exception, "payload" + .return ($P2201) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "number" :subid("114_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2099 -.annotate 'line', 762 - new $P2098, 'ExceptionHandler' - set_addr $P2098, control_2097 - $P2098."handle_types"(.CONTROL_RETURN) - push_eh $P2098 +.sub "number" :subid("119_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2205 +.annotate 'line', 788 + new $P2204, 'ExceptionHandler' + set_addr $P2204, control_2203 + $P2204."handle_types"(.CONTROL_RETURN) + push_eh $P2204 .lex "self", self - .lex "$/", param_2099 -.annotate 'line', 763 - new $P2100, "Undef" - .lex "$value", $P2100 - find_lex $P2103, "$/" - unless_null $P2103, vivify_622 - $P2103 = root_new ['parrot';'Hash'] - vivify_622: - set $P2104, $P2103["dec_number"] - unless_null $P2104, vivify_623 - new $P2104, "Undef" - vivify_623: - if $P2104, if_2102 - find_lex $P2108, "$/" - unless_null $P2108, vivify_624 - $P2108 = root_new ['parrot';'Hash'] - vivify_624: - set $P2109, $P2108["integer"] - unless_null $P2109, vivify_625 - new $P2109, "Undef" - vivify_625: - $P2110 = $P2109."ast"() - set $P2101, $P2110 - goto if_2102_end - if_2102: - find_lex $P2105, "$/" - unless_null $P2105, vivify_626 - $P2105 = root_new ['parrot';'Hash'] - vivify_626: - set $P2106, $P2105["dec_number"] - unless_null $P2106, vivify_627 - new $P2106, "Undef" - vivify_627: - $P2107 = $P2106."ast"() - set $P2101, $P2107 - if_2102_end: - store_lex "$value", $P2101 -.annotate 'line', 764 - find_lex $P2112, "$/" - unless_null $P2112, vivify_628 - $P2112 = root_new ['parrot';'Hash'] - vivify_628: - set $P2113, $P2112["sign"] - unless_null $P2113, vivify_629 - new $P2113, "Undef" - vivify_629: - set $S2114, $P2113 - iseq $I2115, $S2114, "-" - unless $I2115, if_2111_end - find_lex $P2116, "$value" - neg $P2117, $P2116 - store_lex "$value", $P2117 - if_2111_end: -.annotate 'line', 765 - find_lex $P2118, "$/" - get_hll_global $P2119, ["PAST"], "Val" - find_lex $P2120, "$value" - $P2121 = $P2119."new"($P2120 :named("value")) - $P2122 = $P2118."!make"($P2121) -.annotate 'line', 762 - .return ($P2122) - control_2097: + .lex "$/", param_2205 +.annotate 'line', 789 + new $P2206, "Undef" + .lex "$value", $P2206 + find_lex $P2209, "$/" + unless_null $P2209, vivify_649 + $P2209 = root_new ['parrot';'Hash'] + vivify_649: + set $P2210, $P2209["dec_number"] + unless_null $P2210, vivify_650 + new $P2210, "Undef" + vivify_650: + if $P2210, if_2208 + find_lex $P2214, "$/" + unless_null $P2214, vivify_651 + $P2214 = root_new ['parrot';'Hash'] + vivify_651: + set $P2215, $P2214["integer"] + unless_null $P2215, vivify_652 + new $P2215, "Undef" + vivify_652: + $P2216 = $P2215."ast"() + set $P2207, $P2216 + goto if_2208_end + if_2208: + find_lex $P2211, "$/" + unless_null $P2211, vivify_653 + $P2211 = root_new ['parrot';'Hash'] + vivify_653: + set $P2212, $P2211["dec_number"] + unless_null $P2212, vivify_654 + new $P2212, "Undef" + vivify_654: + $P2213 = $P2212."ast"() + set $P2207, $P2213 + if_2208_end: + store_lex "$value", $P2207 +.annotate 'line', 790 + find_lex $P2218, "$/" + unless_null $P2218, vivify_655 + $P2218 = root_new ['parrot';'Hash'] + vivify_655: + set $P2219, $P2218["sign"] + unless_null $P2219, vivify_656 + new $P2219, "Undef" + vivify_656: + set $S2220, $P2219 + iseq $I2221, $S2220, "-" + unless $I2221, if_2217_end + find_lex $P2222, "$value" + neg $P2223, $P2222 + store_lex "$value", $P2223 + if_2217_end: +.annotate 'line', 791 + find_lex $P2224, "$/" + get_hll_global $P2225, ["PAST"], "Val" + find_lex $P2226, "$value" + $P2227 = $P2225."new"($P2226 :named("value")) + $P2228 = $P2224."!make"($P2227) +.annotate 'line', 788 + .return ($P2228) + control_2203: .local pmc exception .get_results (exception) - getattribute $P2123, exception, "payload" - .return ($P2123) + getattribute $P2229, exception, "payload" + .return ($P2229) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("115_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2127 -.annotate 'line', 768 - new $P2126, 'ExceptionHandler' - set_addr $P2126, control_2125 - $P2126."handle_types"(.CONTROL_RETURN) - push_eh $P2126 - .lex "self", self - .lex "$/", param_2127 - find_lex $P2128, "$/" - find_lex $P2129, "$/" - unless_null $P2129, vivify_630 - $P2129 = root_new ['parrot';'Hash'] - vivify_630: - set $P2130, $P2129["quote_EXPR"] - unless_null $P2130, vivify_631 - new $P2130, "Undef" - vivify_631: - $P2131 = $P2130."ast"() - $P2132 = $P2128."!make"($P2131) - .return ($P2132) - control_2125: +.sub "quote:sym" :subid("120_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2233 +.annotate 'line', 794 + new $P2232, 'ExceptionHandler' + set_addr $P2232, control_2231 + $P2232."handle_types"(.CONTROL_RETURN) + push_eh $P2232 + .lex "self", self + .lex "$/", param_2233 + find_lex $P2234, "$/" + find_lex $P2235, "$/" + unless_null $P2235, vivify_657 + $P2235 = root_new ['parrot';'Hash'] + vivify_657: + set $P2236, $P2235["quote_EXPR"] + unless_null $P2236, vivify_658 + new $P2236, "Undef" + vivify_658: + $P2237 = $P2236."ast"() + $P2238 = $P2234."!make"($P2237) + .return ($P2238) + control_2231: .local pmc exception .get_results (exception) - getattribute $P2133, exception, "payload" - .return ($P2133) + getattribute $P2239, exception, "payload" + .return ($P2239) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("116_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2137 -.annotate 'line', 769 - new $P2136, 'ExceptionHandler' - set_addr $P2136, control_2135 - $P2136."handle_types"(.CONTROL_RETURN) - push_eh $P2136 - .lex "self", self - .lex "$/", param_2137 - find_lex $P2138, "$/" - find_lex $P2139, "$/" - unless_null $P2139, vivify_632 - $P2139 = root_new ['parrot';'Hash'] - vivify_632: - set $P2140, $P2139["quote_EXPR"] - unless_null $P2140, vivify_633 - new $P2140, "Undef" - vivify_633: - $P2141 = $P2140."ast"() - $P2142 = $P2138."!make"($P2141) - .return ($P2142) - control_2135: +.sub "quote:sym" :subid("121_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2243 +.annotate 'line', 795 + new $P2242, 'ExceptionHandler' + set_addr $P2242, control_2241 + $P2242."handle_types"(.CONTROL_RETURN) + push_eh $P2242 + .lex "self", self + .lex "$/", param_2243 + find_lex $P2244, "$/" + find_lex $P2245, "$/" + unless_null $P2245, vivify_659 + $P2245 = root_new ['parrot';'Hash'] + vivify_659: + set $P2246, $P2245["quote_EXPR"] + unless_null $P2246, vivify_660 + new $P2246, "Undef" + vivify_660: + $P2247 = $P2246."ast"() + $P2248 = $P2244."!make"($P2247) + .return ($P2248) + control_2241: .local pmc exception .get_results (exception) - getattribute $P2143, exception, "payload" - .return ($P2143) + getattribute $P2249, exception, "payload" + .return ($P2249) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("117_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2147 -.annotate 'line', 770 - new $P2146, 'ExceptionHandler' - set_addr $P2146, control_2145 - $P2146."handle_types"(.CONTROL_RETURN) - push_eh $P2146 +.sub "quote:sym" :subid("122_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2253 +.annotate 'line', 796 + new $P2252, 'ExceptionHandler' + set_addr $P2252, control_2251 + $P2252."handle_types"(.CONTROL_RETURN) + push_eh $P2252 .lex "self", self - .lex "$/", param_2147 - find_lex $P2148, "$/" - find_lex $P2149, "$/" - unless_null $P2149, vivify_634 - $P2149 = root_new ['parrot';'Hash'] - vivify_634: - set $P2150, $P2149["quote_EXPR"] - unless_null $P2150, vivify_635 - new $P2150, "Undef" - vivify_635: - $P2151 = $P2150."ast"() - $P2152 = $P2148."!make"($P2151) - .return ($P2152) - control_2145: + .lex "$/", param_2253 + find_lex $P2254, "$/" + find_lex $P2255, "$/" + unless_null $P2255, vivify_661 + $P2255 = root_new ['parrot';'Hash'] + vivify_661: + set $P2256, $P2255["quote_EXPR"] + unless_null $P2256, vivify_662 + new $P2256, "Undef" + vivify_662: + $P2257 = $P2256."ast"() + $P2258 = $P2254."!make"($P2257) + .return ($P2258) + control_2251: .local pmc exception .get_results (exception) - getattribute $P2153, exception, "payload" - .return ($P2153) + getattribute $P2259, exception, "payload" + .return ($P2259) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("118_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2157 -.annotate 'line', 771 - new $P2156, 'ExceptionHandler' - set_addr $P2156, control_2155 - $P2156."handle_types"(.CONTROL_RETURN) - push_eh $P2156 - .lex "self", self - .lex "$/", param_2157 - find_lex $P2158, "$/" - find_lex $P2159, "$/" - unless_null $P2159, vivify_636 - $P2159 = root_new ['parrot';'Hash'] - vivify_636: - set $P2160, $P2159["quote_EXPR"] - unless_null $P2160, vivify_637 - new $P2160, "Undef" - vivify_637: - $P2161 = $P2160."ast"() - $P2162 = $P2158."!make"($P2161) - .return ($P2162) - control_2155: +.sub "quote:sym" :subid("123_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2263 +.annotate 'line', 797 + new $P2262, 'ExceptionHandler' + set_addr $P2262, control_2261 + $P2262."handle_types"(.CONTROL_RETURN) + push_eh $P2262 + .lex "self", self + .lex "$/", param_2263 + find_lex $P2264, "$/" + find_lex $P2265, "$/" + unless_null $P2265, vivify_663 + $P2265 = root_new ['parrot';'Hash'] + vivify_663: + set $P2266, $P2265["quote_EXPR"] + unless_null $P2266, vivify_664 + new $P2266, "Undef" + vivify_664: + $P2267 = $P2266."ast"() + $P2268 = $P2264."!make"($P2267) + .return ($P2268) + control_2261: .local pmc exception .get_results (exception) - getattribute $P2163, exception, "payload" - .return ($P2163) + getattribute $P2269, exception, "payload" + .return ($P2269) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("119_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2167 -.annotate 'line', 772 - new $P2166, 'ExceptionHandler' - set_addr $P2166, control_2165 - $P2166."handle_types"(.CONTROL_RETURN) - push_eh $P2166 - .lex "self", self - .lex "$/", param_2167 - find_lex $P2168, "$/" - find_lex $P2169, "$/" - unless_null $P2169, vivify_638 - $P2169 = root_new ['parrot';'Hash'] - vivify_638: - set $P2170, $P2169["quote_EXPR"] - unless_null $P2170, vivify_639 - new $P2170, "Undef" - vivify_639: - $P2171 = $P2170."ast"() - $P2172 = $P2168."!make"($P2171) - .return ($P2172) - control_2165: +.sub "quote:sym" :subid("124_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2273 +.annotate 'line', 798 + new $P2272, 'ExceptionHandler' + set_addr $P2272, control_2271 + $P2272."handle_types"(.CONTROL_RETURN) + push_eh $P2272 + .lex "self", self + .lex "$/", param_2273 + find_lex $P2274, "$/" + find_lex $P2275, "$/" + unless_null $P2275, vivify_665 + $P2275 = root_new ['parrot';'Hash'] + vivify_665: + set $P2276, $P2275["quote_EXPR"] + unless_null $P2276, vivify_666 + new $P2276, "Undef" + vivify_666: + $P2277 = $P2276."ast"() + $P2278 = $P2274."!make"($P2277) + .return ($P2278) + control_2271: .local pmc exception .get_results (exception) - getattribute $P2173, exception, "payload" - .return ($P2173) + getattribute $P2279, exception, "payload" + .return ($P2279) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("120_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2177 -.annotate 'line', 773 - new $P2176, 'ExceptionHandler' - set_addr $P2176, control_2175 - $P2176."handle_types"(.CONTROL_RETURN) - push_eh $P2176 - .lex "self", self - .lex "$/", param_2177 -.annotate 'line', 774 - find_lex $P2178, "$/" - get_hll_global $P2179, ["PAST"], "Op" - find_lex $P2180, "$/" - unless_null $P2180, vivify_640 - $P2180 = root_new ['parrot';'Hash'] - vivify_640: - set $P2181, $P2180["quote_EXPR"] - unless_null $P2181, vivify_641 - new $P2181, "Undef" - vivify_641: - $P2182 = $P2181."ast"() - $P2183 = $P2182."value"() - find_lex $P2184, "$/" - $P2185 = $P2179."new"($P2183 :named("inline"), "inline" :named("pasttype"), $P2184 :named("node")) - $P2186 = $P2178."!make"($P2185) -.annotate 'line', 773 - .return ($P2186) - control_2175: +.sub "quote:sym" :subid("125_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2283 +.annotate 'line', 799 + new $P2282, 'ExceptionHandler' + set_addr $P2282, control_2281 + $P2282."handle_types"(.CONTROL_RETURN) + push_eh $P2282 + .lex "self", self + .lex "$/", param_2283 +.annotate 'line', 800 + find_lex $P2284, "$/" + get_hll_global $P2285, ["PAST"], "Op" + find_lex $P2286, "$/" + unless_null $P2286, vivify_667 + $P2286 = root_new ['parrot';'Hash'] + vivify_667: + set $P2287, $P2286["quote_EXPR"] + unless_null $P2287, vivify_668 + new $P2287, "Undef" + vivify_668: + $P2288 = $P2287."ast"() + $P2289 = $P2288."value"() + find_lex $P2290, "$/" + $P2291 = $P2285."new"($P2289 :named("inline"), "inline" :named("pasttype"), $P2290 :named("node")) + $P2292 = $P2284."!make"($P2291) +.annotate 'line', 799 + .return ($P2292) + control_2281: .local pmc exception .get_results (exception) - getattribute $P2187, exception, "payload" - .return ($P2187) + getattribute $P2293, exception, "payload" + .return ($P2293) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote:sym" :subid("121_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2191 - .param pmc param_2192 :optional - .param int has_param_2192 :opt_flag -.annotate 'line', 779 - new $P2190, 'ExceptionHandler' - set_addr $P2190, control_2189 - $P2190."handle_types"(.CONTROL_RETURN) - push_eh $P2190 - .lex "self", self - .lex "$/", param_2191 - if has_param_2192, optparam_642 - new $P2193, "Undef" - set param_2192, $P2193 - optparam_642: - .lex "$key", param_2192 -.annotate 'line', 789 - new $P2194, "Undef" - .lex "$regex", $P2194 -.annotate 'line', 791 - new $P2195, "Undef" - .lex "$past", $P2195 -.annotate 'line', 780 - find_lex $P2197, "$key" - set $S2198, $P2197 - iseq $I2199, $S2198, "open" - unless $I2199, if_2196_end -.annotate 'line', 781 +.sub "quote:sym" :subid("126_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2297 + .param pmc param_2298 :optional + .param int has_param_2298 :opt_flag +.annotate 'line', 805 + new $P2296, 'ExceptionHandler' + set_addr $P2296, control_2295 + $P2296."handle_types"(.CONTROL_RETURN) + push_eh $P2296 + .lex "self", self + .lex "$/", param_2297 + if has_param_2298, optparam_669 + new $P2299, "Undef" + set param_2298, $P2299 + optparam_669: + .lex "$key", param_2298 +.annotate 'line', 815 + new $P2300, "Undef" + .lex "$regex", $P2300 +.annotate 'line', 817 + new $P2301, "Undef" + .lex "$past", $P2301 +.annotate 'line', 806 + find_lex $P2303, "$key" + set $S2304, $P2303 + iseq $I2305, $S2304, "open" + unless $I2305, if_2302_end +.annotate 'line', 807 null $P0 set_hll_global ['Regex';'P6Regex';'Actions'], '$REGEXNAME', $P0 -.annotate 'line', 785 - get_global $P2200, "@BLOCK" - unless_null $P2200, vivify_643 - $P2200 = root_new ['parrot';'ResizablePMCArray'] - vivify_643: - set $P2201, $P2200[0] - unless_null $P2201, vivify_644 - new $P2201, "Undef" - vivify_644: - $P2201."symbol"(unicode:"$\x{a2}", "lexical" :named("scope")) -.annotate 'line', 786 - get_global $P2202, "@BLOCK" - unless_null $P2202, vivify_645 - $P2202 = root_new ['parrot';'ResizablePMCArray'] - vivify_645: - set $P2203, $P2202[0] - unless_null $P2203, vivify_646 - new $P2203, "Undef" - vivify_646: - $P2203."symbol"("$/", "lexical" :named("scope")) -.annotate 'line', 787 - new $P2204, "Exception" - set $P2204['type'], .CONTROL_RETURN - new $P2205, "Integer" - assign $P2205, 0 - setattribute $P2204, 'payload', $P2205 - throw $P2204 - if_2196_end: -.annotate 'line', 790 - get_hll_global $P2206, ["Regex";"P6Regex";"Actions"], "buildsub" - find_lex $P2207, "$/" - unless_null $P2207, vivify_647 - $P2207 = root_new ['parrot';'Hash'] - vivify_647: - set $P2208, $P2207["p6regex"] - unless_null $P2208, vivify_648 - new $P2208, "Undef" - vivify_648: - $P2209 = $P2208."ast"() - get_global $P2210, "@BLOCK" - $P2211 = $P2210."shift"() - $P2212 = $P2206($P2209, $P2211) - store_lex "$regex", $P2212 -.annotate 'line', 792 - get_hll_global $P2213, ["PAST"], "Op" -.annotate 'line', 794 - get_hll_global $P2214, ["PAST"], "Var" - new $P2215, "ResizablePMCArray" - push $P2215, "Regex" - $P2216 = $P2214."new"("Regex" :named("name"), $P2215 :named("namespace"), "package" :named("scope")) - find_lex $P2217, "$regex" - $P2218 = $P2213."new"($P2216, $P2217, "callmethod" :named("pasttype"), "new" :named("name")) -.annotate 'line', 792 - store_lex "$past", $P2218 -.annotate 'line', 798 - find_lex $P2219, "$regex" - find_lex $P2220, "$past" - unless_null $P2220, vivify_649 - $P2220 = root_new ['parrot';'Hash'] - store_lex "$past", $P2220 - vivify_649: - set $P2220["sink"], $P2219 -.annotate 'line', 799 - find_lex $P2221, "$/" - find_lex $P2222, "$past" - $P2223 = $P2221."!make"($P2222) -.annotate 'line', 779 - .return ($P2223) - control_2189: +.annotate 'line', 811 + get_global $P2306, "@BLOCK" + unless_null $P2306, vivify_670 + $P2306 = root_new ['parrot';'ResizablePMCArray'] + vivify_670: + set $P2307, $P2306[0] + unless_null $P2307, vivify_671 + new $P2307, "Undef" + vivify_671: + $P2307."symbol"(unicode:"$\x{a2}", "lexical" :named("scope")) +.annotate 'line', 812 + get_global $P2308, "@BLOCK" + unless_null $P2308, vivify_672 + $P2308 = root_new ['parrot';'ResizablePMCArray'] + vivify_672: + set $P2309, $P2308[0] + unless_null $P2309, vivify_673 + new $P2309, "Undef" + vivify_673: + $P2309."symbol"("$/", "lexical" :named("scope")) +.annotate 'line', 813 + new $P2310, "Exception" + set $P2310['type'], .CONTROL_RETURN + new $P2311, "Integer" + assign $P2311, 0 + setattribute $P2310, 'payload', $P2311 + throw $P2310 + if_2302_end: +.annotate 'line', 816 + get_hll_global $P2312, ["Regex";"P6Regex";"Actions"], "buildsub" + find_lex $P2313, "$/" + unless_null $P2313, vivify_674 + $P2313 = root_new ['parrot';'Hash'] + vivify_674: + set $P2314, $P2313["p6regex"] + unless_null $P2314, vivify_675 + new $P2314, "Undef" + vivify_675: + $P2315 = $P2314."ast"() + get_global $P2316, "@BLOCK" + $P2317 = $P2316."shift"() + $P2318 = $P2312($P2315, $P2317) + store_lex "$regex", $P2318 +.annotate 'line', 818 + get_hll_global $P2319, ["PAST"], "Op" +.annotate 'line', 820 + get_hll_global $P2320, ["PAST"], "Var" + new $P2321, "ResizablePMCArray" + push $P2321, "Regex" + $P2322 = $P2320."new"("Regex" :named("name"), $P2321 :named("namespace"), "package" :named("scope")) + find_lex $P2323, "$regex" + $P2324 = $P2319."new"($P2322, $P2323, "callmethod" :named("pasttype"), "new" :named("name")) +.annotate 'line', 818 + store_lex "$past", $P2324 +.annotate 'line', 824 + find_lex $P2325, "$regex" + find_lex $P2326, "$past" + unless_null $P2326, vivify_676 + $P2326 = root_new ['parrot';'Hash'] + store_lex "$past", $P2326 + vivify_676: + set $P2326["sink"], $P2325 +.annotate 'line', 825 + find_lex $P2327, "$/" + find_lex $P2328, "$past" + $P2329 = $P2327."!make"($P2328) +.annotate 'line', 805 + .return ($P2329) + control_2295: .local pmc exception .get_results (exception) - getattribute $P2224, exception, "payload" - .return ($P2224) + getattribute $P2330, exception, "payload" + .return ($P2330) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym<$>" :subid("122_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2228 -.annotate 'line', 802 - new $P2227, 'ExceptionHandler' - set_addr $P2227, control_2226 - $P2227."handle_types"(.CONTROL_RETURN) - push_eh $P2227 - .lex "self", self - .lex "$/", param_2228 - find_lex $P2229, "$/" - find_lex $P2230, "$/" - unless_null $P2230, vivify_650 - $P2230 = root_new ['parrot';'Hash'] - vivify_650: - set $P2231, $P2230["variable"] - unless_null $P2231, vivify_651 - new $P2231, "Undef" - vivify_651: - $P2232 = $P2231."ast"() - $P2233 = $P2229."!make"($P2232) - .return ($P2233) - control_2226: - .local pmc exception - .get_results (exception) - getattribute $P2234, exception, "payload" - .return ($P2234) +.sub "quote_escape:sym<$>" :subid("127_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2334 +.annotate 'line', 828 + new $P2333, 'ExceptionHandler' + set_addr $P2333, control_2332 + $P2333."handle_types"(.CONTROL_RETURN) + push_eh $P2333 + .lex "self", self + .lex "$/", param_2334 + find_lex $P2335, "$/" + find_lex $P2336, "$/" + unless_null $P2336, vivify_677 + $P2336 = root_new ['parrot';'Hash'] + vivify_677: + set $P2337, $P2336["variable"] + unless_null $P2337, vivify_678 + new $P2337, "Undef" + vivify_678: + $P2338 = $P2337."ast"() + $P2339 = $P2335."!make"($P2338) + .return ($P2339) + control_2332: + .local pmc exception + .get_results (exception) + getattribute $P2340, exception, "payload" + .return ($P2340) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym<{ }>" :subid("123_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2238 -.annotate 'line', 803 - new $P2237, 'ExceptionHandler' - set_addr $P2237, control_2236 - $P2237."handle_types"(.CONTROL_RETURN) - push_eh $P2237 - .lex "self", self - .lex "$/", param_2238 -.annotate 'line', 804 - find_lex $P2239, "$/" - get_hll_global $P2240, ["PAST"], "Op" -.annotate 'line', 805 - find_lex $P2241, "$/" - unless_null $P2241, vivify_652 - $P2241 = root_new ['parrot';'Hash'] - vivify_652: - set $P2242, $P2241["block"] - unless_null $P2242, vivify_653 - new $P2242, "Undef" - vivify_653: - $P2243 = $P2242."ast"() - $P2244 = "block_immediate"($P2243) - find_lex $P2245, "$/" - $P2246 = $P2240."new"($P2244, "set S*" :named("pirop"), $P2245 :named("node")) -.annotate 'line', 804 - $P2247 = $P2239."!make"($P2246) -.annotate 'line', 803 - .return ($P2247) - control_2236: +.sub "quote_escape:sym<{ }>" :subid("128_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2344 +.annotate 'line', 829 + new $P2343, 'ExceptionHandler' + set_addr $P2343, control_2342 + $P2343."handle_types"(.CONTROL_RETURN) + push_eh $P2343 + .lex "self", self + .lex "$/", param_2344 +.annotate 'line', 830 + find_lex $P2345, "$/" + get_hll_global $P2346, ["PAST"], "Op" +.annotate 'line', 831 + find_lex $P2347, "$/" + unless_null $P2347, vivify_679 + $P2347 = root_new ['parrot';'Hash'] + vivify_679: + set $P2348, $P2347["block"] + unless_null $P2348, vivify_680 + new $P2348, "Undef" + vivify_680: + $P2349 = $P2348."ast"() + $P2350 = "block_immediate"($P2349) + find_lex $P2351, "$/" + $P2352 = $P2346."new"($P2350, "set S*" :named("pirop"), $P2351 :named("node")) +.annotate 'line', 830 + $P2353 = $P2345."!make"($P2352) +.annotate 'line', 829 + .return ($P2353) + control_2342: .local pmc exception .get_results (exception) - getattribute $P2248, exception, "payload" - .return ($P2248) + getattribute $P2354, exception, "payload" + .return ($P2354) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "quote_escape:sym" :subid("124_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2252 -.annotate 'line', 808 - new $P2251, 'ExceptionHandler' - set_addr $P2251, control_2250 - $P2251."handle_types"(.CONTROL_RETURN) - push_eh $P2251 +.sub "quote_escape:sym" :subid("129_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2358 +.annotate 'line', 834 + new $P2357, 'ExceptionHandler' + set_addr $P2357, control_2356 + $P2357."handle_types"(.CONTROL_RETURN) + push_eh $P2357 .lex "self", self - .lex "$/", param_2252 - find_lex $P2253, "$/" - $P2254 = $P2253."!make"("\e") - .return ($P2254) - control_2250: + .lex "$/", param_2358 + find_lex $P2359, "$/" + $P2360 = $P2359."!make"("\e") + .return ($P2360) + control_2356: .local pmc exception .get_results (exception) - getattribute $P2255, exception, "payload" - .return ($P2255) + getattribute $P2361, exception, "payload" + .return ($P2361) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postfix:sym<.>" :subid("125_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2259 -.annotate 'line', 812 - new $P2258, 'ExceptionHandler' - set_addr $P2258, control_2257 - $P2258."handle_types"(.CONTROL_RETURN) - push_eh $P2258 - .lex "self", self - .lex "$/", param_2259 - find_lex $P2260, "$/" - find_lex $P2261, "$/" - unless_null $P2261, vivify_654 - $P2261 = root_new ['parrot';'Hash'] - vivify_654: - set $P2262, $P2261["dotty"] - unless_null $P2262, vivify_655 - new $P2262, "Undef" - vivify_655: - $P2263 = $P2262."ast"() - $P2264 = $P2260."!make"($P2263) - .return ($P2264) - control_2257: +.sub "postfix:sym<.>" :subid("130_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2365 +.annotate 'line', 838 + new $P2364, 'ExceptionHandler' + set_addr $P2364, control_2363 + $P2364."handle_types"(.CONTROL_RETURN) + push_eh $P2364 + .lex "self", self + .lex "$/", param_2365 + find_lex $P2366, "$/" + find_lex $P2367, "$/" + unless_null $P2367, vivify_681 + $P2367 = root_new ['parrot';'Hash'] + vivify_681: + set $P2368, $P2367["dotty"] + unless_null $P2368, vivify_682 + new $P2368, "Undef" + vivify_682: + $P2369 = $P2368."ast"() + $P2370 = $P2366."!make"($P2369) + .return ($P2370) + control_2363: .local pmc exception .get_results (exception) - getattribute $P2265, exception, "payload" - .return ($P2265) + getattribute $P2371, exception, "payload" + .return ($P2371) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postfix:sym<++>" :subid("126_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2269 -.annotate 'line', 814 - new $P2268, 'ExceptionHandler' - set_addr $P2268, control_2267 - $P2268."handle_types"(.CONTROL_RETURN) - push_eh $P2268 - .lex "self", self - .lex "$/", param_2269 -.annotate 'line', 815 - find_lex $P2270, "$/" - get_hll_global $P2271, ["PAST"], "Op" -.annotate 'line', 816 - new $P2272, "ResizablePMCArray" - push $P2272, " clone %r, %0" - push $P2272, " inc %0" - $P2273 = $P2271."new"("postfix:<++>" :named("name"), $P2272 :named("inline"), "inline" :named("pasttype")) -.annotate 'line', 815 - $P2274 = $P2270."!make"($P2273) -.annotate 'line', 814 - .return ($P2274) - control_2267: +.sub "postfix:sym<++>" :subid("131_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2375 +.annotate 'line', 840 + new $P2374, 'ExceptionHandler' + set_addr $P2374, control_2373 + $P2374."handle_types"(.CONTROL_RETURN) + push_eh $P2374 + .lex "self", self + .lex "$/", param_2375 +.annotate 'line', 841 + find_lex $P2376, "$/" + get_hll_global $P2377, ["PAST"], "Op" +.annotate 'line', 842 + new $P2378, "ResizablePMCArray" + push $P2378, " clone %r, %0" + push $P2378, " inc %0" + $P2379 = $P2377."new"("postfix:<++>" :named("name"), $P2378 :named("inline"), "inline" :named("pasttype")) +.annotate 'line', 841 + $P2380 = $P2376."!make"($P2379) +.annotate 'line', 840 + .return ($P2380) + control_2373: .local pmc exception .get_results (exception) - getattribute $P2275, exception, "payload" - .return ($P2275) + getattribute $P2381, exception, "payload" + .return ($P2381) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "postfix:sym<-->" :subid("127_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2279 -.annotate 'line', 820 - new $P2278, 'ExceptionHandler' - set_addr $P2278, control_2277 - $P2278."handle_types"(.CONTROL_RETURN) - push_eh $P2278 - .lex "self", self - .lex "$/", param_2279 -.annotate 'line', 821 - find_lex $P2280, "$/" - get_hll_global $P2281, ["PAST"], "Op" -.annotate 'line', 822 - new $P2282, "ResizablePMCArray" - push $P2282, " clone %r, %0" - push $P2282, " dec %0" - $P2283 = $P2281."new"("postfix:<-->" :named("name"), $P2282 :named("inline"), "inline" :named("pasttype")) -.annotate 'line', 821 - $P2284 = $P2280."!make"($P2283) -.annotate 'line', 820 - .return ($P2284) - control_2277: +.sub "postfix:sym<-->" :subid("132_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2385 +.annotate 'line', 846 + new $P2384, 'ExceptionHandler' + set_addr $P2384, control_2383 + $P2384."handle_types"(.CONTROL_RETURN) + push_eh $P2384 + .lex "self", self + .lex "$/", param_2385 +.annotate 'line', 847 + find_lex $P2386, "$/" + get_hll_global $P2387, ["PAST"], "Op" +.annotate 'line', 848 + new $P2388, "ResizablePMCArray" + push $P2388, " clone %r, %0" + push $P2388, " dec %0" + $P2389 = $P2387."new"("postfix:<-->" :named("name"), $P2388 :named("inline"), "inline" :named("pasttype")) +.annotate 'line', 847 + $P2390 = $P2386."!make"($P2389) +.annotate 'line', 846 + .return ($P2390) + control_2383: .local pmc exception .get_results (exception) - getattribute $P2285, exception, "payload" - .return ($P2285) + getattribute $P2391, exception, "payload" + .return ($P2391) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "prefix:sym" :subid("128_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2289 -.annotate 'line', 826 - new $P2288, 'ExceptionHandler' - set_addr $P2288, control_2287 - $P2288."handle_types"(.CONTROL_RETURN) - push_eh $P2288 +.sub "prefix:sym" :subid("133_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2395 +.annotate 'line', 852 + new $P2394, 'ExceptionHandler' + set_addr $P2394, control_2393 + $P2394."handle_types"(.CONTROL_RETURN) + push_eh $P2394 .lex "self", self - .lex "$/", param_2289 -.annotate 'line', 827 - find_lex $P2290, "$/" - get_hll_global $P2291, ["PAST"], "Op" -.annotate 'line', 828 - get_hll_global $P2292, ["PAST"], "Var" - $P2293 = $P2292."new"("$/" :named("name"), "contextual" :named("scope")) - find_lex $P2294, "$/" - $P2295 = $P2291."new"($P2293, "callmethod" :named("pasttype"), "!make" :named("name"), $P2294 :named("node")) -.annotate 'line', 827 - $P2296 = $P2290."!make"($P2295) -.annotate 'line', 826 - .return ($P2296) - control_2287: + .lex "$/", param_2395 +.annotate 'line', 853 + find_lex $P2396, "$/" + get_hll_global $P2397, ["PAST"], "Op" +.annotate 'line', 854 + get_hll_global $P2398, ["PAST"], "Var" + $P2399 = $P2398."new"("$/" :named("name"), "contextual" :named("scope")) + find_lex $P2400, "$/" + $P2401 = $P2397."new"($P2399, "callmethod" :named("pasttype"), "!make" :named("name"), $P2400 :named("node")) +.annotate 'line', 853 + $P2402 = $P2396."!make"($P2401) +.annotate 'line', 852 + .return ($P2402) + control_2393: .local pmc exception .get_results (exception) - getattribute $P2297, exception, "payload" - .return ($P2297) + getattribute $P2403, exception, "payload" + .return ($P2403) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("129_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2302 -.annotate 'line', 844 - new $P2301, 'ExceptionHandler' - set_addr $P2301, control_2300 - $P2301."handle_types"(.CONTROL_RETURN) - push_eh $P2301 +.sub "term:sym" :subid("134_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2408 +.annotate 'line', 870 + new $P2407, 'ExceptionHandler' + set_addr $P2407, control_2406 + $P2407."handle_types"(.CONTROL_RETURN) + push_eh $P2407 .lex "self", self - .lex "$/", param_2302 - find_lex $P2303, "$/" - $P2304 = "control"($P2303, "CONTROL_LOOP_NEXT") - .return ($P2304) - control_2300: + .lex "$/", param_2408 + find_lex $P2409, "$/" + $P2410 = "control"($P2409, "CONTROL_LOOP_NEXT") + .return ($P2410) + control_2406: .local pmc exception .get_results (exception) - getattribute $P2305, exception, "payload" - .return ($P2305) + getattribute $P2411, exception, "payload" + .return ($P2411) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("130_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2309 -.annotate 'line', 845 - new $P2308, 'ExceptionHandler' - set_addr $P2308, control_2307 - $P2308."handle_types"(.CONTROL_RETURN) - push_eh $P2308 +.sub "term:sym" :subid("135_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2415 +.annotate 'line', 871 + new $P2414, 'ExceptionHandler' + set_addr $P2414, control_2413 + $P2414."handle_types"(.CONTROL_RETURN) + push_eh $P2414 .lex "self", self - .lex "$/", param_2309 - find_lex $P2310, "$/" - $P2311 = "control"($P2310, "CONTROL_LOOP_LAST") - .return ($P2311) - control_2307: + .lex "$/", param_2415 + find_lex $P2416, "$/" + $P2417 = "control"($P2416, "CONTROL_LOOP_LAST") + .return ($P2417) + control_2413: .local pmc exception .get_results (exception) - getattribute $P2312, exception, "payload" - .return ($P2312) + getattribute $P2418, exception, "payload" + .return ($P2418) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "term:sym" :subid("131_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2316 -.annotate 'line', 846 - new $P2315, 'ExceptionHandler' - set_addr $P2315, control_2314 - $P2315."handle_types"(.CONTROL_RETURN) - push_eh $P2315 +.sub "term:sym" :subid("136_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2422 +.annotate 'line', 872 + new $P2421, 'ExceptionHandler' + set_addr $P2421, control_2420 + $P2421."handle_types"(.CONTROL_RETURN) + push_eh $P2421 .lex "self", self - .lex "$/", param_2316 - find_lex $P2317, "$/" - $P2318 = "control"($P2317, "CONTROL_LOOP_REDO") - .return ($P2318) - control_2314: + .lex "$/", param_2422 + find_lex $P2423, "$/" + $P2424 = "control"($P2423, "CONTROL_LOOP_REDO") + .return ($P2424) + control_2420: .local pmc exception .get_results (exception) - getattribute $P2319, exception, "payload" - .return ($P2319) + getattribute $P2425, exception, "payload" + .return ($P2425) .end .namespace ["NQP";"Actions"] .include "except_types.pasm" -.sub "infix:sym<~~>" :subid("132_1282016534.58916") :method :outer("11_1282016534.58916") - .param pmc param_2323 -.annotate 'line', 848 - new $P2322, 'ExceptionHandler' - set_addr $P2322, control_2321 - $P2322."handle_types"(.CONTROL_RETURN) - push_eh $P2322 - .lex "self", self - .lex "$/", param_2323 -.annotate 'line', 849 - find_lex $P2324, "$/" - get_hll_global $P2325, ["PAST"], "Op" - find_lex $P2326, "$/" - $P2327 = $P2325."new"("callmethod" :named("pasttype"), "ACCEPTS" :named("name"), $P2326 :named("node")) - $P2328 = $P2324."!make"($P2327) -.annotate 'line', 848 - .return ($P2328) - control_2321: +.sub "infix:sym<~~>" :subid("137_1284728484.24945") :method :outer("11_1284728484.24945") + .param pmc param_2429 +.annotate 'line', 874 + new $P2428, 'ExceptionHandler' + set_addr $P2428, control_2427 + $P2428."handle_types"(.CONTROL_RETURN) + push_eh $P2428 + .lex "self", self + .lex "$/", param_2429 +.annotate 'line', 875 + find_lex $P2430, "$/" + get_hll_global $P2431, ["PAST"], "Op" + find_lex $P2432, "$/" + $P2433 = $P2431."new"("callmethod" :named("pasttype"), "ACCEPTS" :named("name"), $P2432 :named("node")) + $P2434 = $P2430."!make"($P2433) +.annotate 'line', 874 + .return ($P2434) + control_2427: .local pmc exception .get_results (exception) - getattribute $P2329, exception, "payload" - .return ($P2329) + getattribute $P2435, exception, "payload" + .return ($P2435) .end .namespace ["NQP";"RegexActions"] -.sub "_block2330" :subid("133_1282016534.58916") :outer("11_1282016534.58916") -.annotate 'line', 853 - .const 'Sub' $P2416 = "140_1282016534.58916" - capture_lex $P2416 - .const 'Sub' $P2403 = "139_1282016534.58916" - capture_lex $P2403 - .const 'Sub' $P2386 = "138_1282016534.58916" - capture_lex $P2386 - .const 'Sub' $P2373 = "137_1282016534.58916" - capture_lex $P2373 - .const 'Sub' $P2360 = "136_1282016534.58916" - capture_lex $P2360 - .const 'Sub' $P2347 = "135_1282016534.58916" - capture_lex $P2347 - .const 'Sub' $P2332 = "134_1282016534.58916" - capture_lex $P2332 -.annotate 'line', 887 - .const 'Sub' $P2416 = "140_1282016534.58916" - newclosure $P2441, $P2416 -.annotate 'line', 853 - .return ($P2441) +.sub "_block2436" :subid("138_1284728484.24945") :outer("11_1284728484.24945") +.annotate 'line', 879 + .const 'Sub' $P2522 = "145_1284728484.24945" + capture_lex $P2522 + .const 'Sub' $P2509 = "144_1284728484.24945" + capture_lex $P2509 + .const 'Sub' $P2492 = "143_1284728484.24945" + capture_lex $P2492 + .const 'Sub' $P2479 = "142_1284728484.24945" + capture_lex $P2479 + .const 'Sub' $P2466 = "141_1284728484.24945" + capture_lex $P2466 + .const 'Sub' $P2453 = "140_1284728484.24945" + capture_lex $P2453 + .const 'Sub' $P2438 = "139_1284728484.24945" + capture_lex $P2438 +.annotate 'line', 913 + .const 'Sub' $P2522 = "145_1284728484.24945" + newclosure $P2547, $P2522 +.annotate 'line', 879 + .return ($P2547) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "metachar:sym<:my>" :subid("134_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2335 -.annotate 'line', 855 - new $P2334, 'ExceptionHandler' - set_addr $P2334, control_2333 - $P2334."handle_types"(.CONTROL_RETURN) - push_eh $P2334 - .lex "self", self - .lex "$/", param_2335 -.annotate 'line', 856 - new $P2336, "Undef" - .lex "$past", $P2336 - find_lex $P2337, "$/" - unless_null $P2337, vivify_656 - $P2337 = root_new ['parrot';'Hash'] - vivify_656: - set $P2338, $P2337["statement"] - unless_null $P2338, vivify_657 - new $P2338, "Undef" - vivify_657: - $P2339 = $P2338."ast"() - store_lex "$past", $P2339 -.annotate 'line', 857 - find_lex $P2340, "$/" - get_hll_global $P2341, ["PAST"], "Regex" - find_lex $P2342, "$past" - find_lex $P2343, "$/" - $P2344 = $P2341."new"($P2342, "pastnode" :named("pasttype"), "declarative" :named("subtype"), $P2343 :named("node")) - $P2345 = $P2340."!make"($P2344) -.annotate 'line', 855 - .return ($P2345) - control_2333: +.sub "metachar:sym<:my>" :subid("139_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2441 +.annotate 'line', 881 + new $P2440, 'ExceptionHandler' + set_addr $P2440, control_2439 + $P2440."handle_types"(.CONTROL_RETURN) + push_eh $P2440 + .lex "self", self + .lex "$/", param_2441 +.annotate 'line', 882 + new $P2442, "Undef" + .lex "$past", $P2442 + find_lex $P2443, "$/" + unless_null $P2443, vivify_683 + $P2443 = root_new ['parrot';'Hash'] + vivify_683: + set $P2444, $P2443["statement"] + unless_null $P2444, vivify_684 + new $P2444, "Undef" + vivify_684: + $P2445 = $P2444."ast"() + store_lex "$past", $P2445 +.annotate 'line', 883 + find_lex $P2446, "$/" + get_hll_global $P2447, ["PAST"], "Regex" + find_lex $P2448, "$past" + find_lex $P2449, "$/" + $P2450 = $P2447."new"($P2448, "pastnode" :named("pasttype"), "declarative" :named("subtype"), $P2449 :named("node")) + $P2451 = $P2446."!make"($P2450) +.annotate 'line', 881 + .return ($P2451) + control_2439: .local pmc exception .get_results (exception) - getattribute $P2346, exception, "payload" - .return ($P2346) + getattribute $P2452, exception, "payload" + .return ($P2452) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "metachar:sym<{ }>" :subid("135_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2350 -.annotate 'line', 861 - new $P2349, 'ExceptionHandler' - set_addr $P2349, control_2348 - $P2349."handle_types"(.CONTROL_RETURN) - push_eh $P2349 +.sub "metachar:sym<{ }>" :subid("140_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2456 +.annotate 'line', 887 + new $P2455, 'ExceptionHandler' + set_addr $P2455, control_2454 + $P2455."handle_types"(.CONTROL_RETURN) + push_eh $P2455 .lex "self", self - .lex "$/", param_2350 -.annotate 'line', 862 - find_lex $P2351, "$/" - get_hll_global $P2352, ["PAST"], "Regex" - find_lex $P2353, "$/" - unless_null $P2353, vivify_658 - $P2353 = root_new ['parrot';'Hash'] - vivify_658: - set $P2354, $P2353["codeblock"] - unless_null $P2354, vivify_659 - new $P2354, "Undef" - vivify_659: - $P2355 = $P2354."ast"() - find_lex $P2356, "$/" - $P2357 = $P2352."new"($P2355, "pastnode" :named("pasttype"), $P2356 :named("node")) - $P2358 = $P2351."!make"($P2357) -.annotate 'line', 861 - .return ($P2358) - control_2348: + .lex "$/", param_2456 +.annotate 'line', 888 + find_lex $P2457, "$/" + get_hll_global $P2458, ["PAST"], "Regex" + find_lex $P2459, "$/" + unless_null $P2459, vivify_685 + $P2459 = root_new ['parrot';'Hash'] + vivify_685: + set $P2460, $P2459["codeblock"] + unless_null $P2460, vivify_686 + new $P2460, "Undef" + vivify_686: + $P2461 = $P2460."ast"() + find_lex $P2462, "$/" + $P2463 = $P2458."new"($P2461, "pastnode" :named("pasttype"), $P2462 :named("node")) + $P2464 = $P2457."!make"($P2463) +.annotate 'line', 887 + .return ($P2464) + control_2454: .local pmc exception .get_results (exception) - getattribute $P2359, exception, "payload" - .return ($P2359) + getattribute $P2465, exception, "payload" + .return ($P2465) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("136_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2363 -.annotate 'line', 866 - new $P2362, 'ExceptionHandler' - set_addr $P2362, control_2361 - $P2362."handle_types"(.CONTROL_RETURN) - push_eh $P2362 - .lex "self", self - .lex "$/", param_2363 -.annotate 'line', 867 - find_lex $P2364, "$/" - get_hll_global $P2365, ["PAST"], "Regex" - find_lex $P2366, "$/" - unless_null $P2366, vivify_660 - $P2366 = root_new ['parrot';'Hash'] - vivify_660: - set $P2367, $P2366["var"] - unless_null $P2367, vivify_661 - new $P2367, "Undef" - vivify_661: - $P2368 = $P2367."ast"() - find_lex $P2369, "$/" - $P2370 = $P2365."new"("!INTERPOLATE", $P2368, "subrule" :named("pasttype"), "method" :named("subtype"), $P2369 :named("node")) - $P2371 = $P2364."!make"($P2370) -.annotate 'line', 866 - .return ($P2371) - control_2361: +.sub "metachar:sym" :subid("141_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2469 +.annotate 'line', 892 + new $P2468, 'ExceptionHandler' + set_addr $P2468, control_2467 + $P2468."handle_types"(.CONTROL_RETURN) + push_eh $P2468 + .lex "self", self + .lex "$/", param_2469 +.annotate 'line', 893 + find_lex $P2470, "$/" + get_hll_global $P2471, ["PAST"], "Regex" + find_lex $P2472, "$/" + unless_null $P2472, vivify_687 + $P2472 = root_new ['parrot';'Hash'] + vivify_687: + set $P2473, $P2472["var"] + unless_null $P2473, vivify_688 + new $P2473, "Undef" + vivify_688: + $P2474 = $P2473."ast"() + find_lex $P2475, "$/" + $P2476 = $P2471."new"("!INTERPOLATE", $P2474, "subrule" :named("pasttype"), "method" :named("subtype"), $P2475 :named("node")) + $P2477 = $P2470."!make"($P2476) +.annotate 'line', 892 + .return ($P2477) + control_2467: .local pmc exception .get_results (exception) - getattribute $P2372, exception, "payload" - .return ($P2372) + getattribute $P2478, exception, "payload" + .return ($P2478) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "assertion:sym<{ }>" :subid("137_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2376 -.annotate 'line', 871 - new $P2375, 'ExceptionHandler' - set_addr $P2375, control_2374 - $P2375."handle_types"(.CONTROL_RETURN) - push_eh $P2375 - .lex "self", self - .lex "$/", param_2376 -.annotate 'line', 872 - find_lex $P2377, "$/" - get_hll_global $P2378, ["PAST"], "Regex" - find_lex $P2379, "$/" - unless_null $P2379, vivify_662 - $P2379 = root_new ['parrot';'Hash'] - vivify_662: - set $P2380, $P2379["codeblock"] - unless_null $P2380, vivify_663 - new $P2380, "Undef" - vivify_663: - $P2381 = $P2380."ast"() - find_lex $P2382, "$/" - $P2383 = $P2378."new"("!INTERPOLATE_REGEX", $P2381, "subrule" :named("pasttype"), "method" :named("subtype"), $P2382 :named("node")) - $P2384 = $P2377."!make"($P2383) -.annotate 'line', 871 - .return ($P2384) - control_2374: +.sub "assertion:sym<{ }>" :subid("142_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2482 +.annotate 'line', 897 + new $P2481, 'ExceptionHandler' + set_addr $P2481, control_2480 + $P2481."handle_types"(.CONTROL_RETURN) + push_eh $P2481 + .lex "self", self + .lex "$/", param_2482 +.annotate 'line', 898 + find_lex $P2483, "$/" + get_hll_global $P2484, ["PAST"], "Regex" + find_lex $P2485, "$/" + unless_null $P2485, vivify_689 + $P2485 = root_new ['parrot';'Hash'] + vivify_689: + set $P2486, $P2485["codeblock"] + unless_null $P2486, vivify_690 + new $P2486, "Undef" + vivify_690: + $P2487 = $P2486."ast"() + find_lex $P2488, "$/" + $P2489 = $P2484."new"("!INTERPOLATE_REGEX", $P2487, "subrule" :named("pasttype"), "method" :named("subtype"), $P2488 :named("node")) + $P2490 = $P2483."!make"($P2489) +.annotate 'line', 897 + .return ($P2490) + control_2480: .local pmc exception .get_results (exception) - getattribute $P2385, exception, "payload" - .return ($P2385) + getattribute $P2491, exception, "payload" + .return ($P2491) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("138_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2389 -.annotate 'line', 876 - new $P2388, 'ExceptionHandler' - set_addr $P2388, control_2387 - $P2388."handle_types"(.CONTROL_RETURN) - push_eh $P2388 - .lex "self", self - .lex "$/", param_2389 -.annotate 'line', 877 - find_lex $P2390, "$/" - get_hll_global $P2391, ["PAST"], "Regex" - find_lex $P2392, "$/" - unless_null $P2392, vivify_664 - $P2392 = root_new ['parrot';'Hash'] - vivify_664: - set $P2393, $P2392["codeblock"] - unless_null $P2393, vivify_665 - new $P2393, "Undef" - vivify_665: - $P2394 = $P2393."ast"() -.annotate 'line', 878 - find_lex $P2395, "$/" - unless_null $P2395, vivify_666 - $P2395 = root_new ['parrot';'Hash'] - vivify_666: - set $P2396, $P2395["zw"] - unless_null $P2396, vivify_667 - new $P2396, "Undef" - vivify_667: - set $S2397, $P2396 - iseq $I2398, $S2397, "!" - find_lex $P2399, "$/" - $P2400 = $P2391."new"($P2394, "zerowidth" :named("subtype"), $I2398 :named("negate"), "pastnode" :named("pasttype"), $P2399 :named("node")) -.annotate 'line', 877 - $P2401 = $P2390."!make"($P2400) -.annotate 'line', 876 - .return ($P2401) - control_2387: +.sub "assertion:sym" :subid("143_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2495 +.annotate 'line', 902 + new $P2494, 'ExceptionHandler' + set_addr $P2494, control_2493 + $P2494."handle_types"(.CONTROL_RETURN) + push_eh $P2494 + .lex "self", self + .lex "$/", param_2495 +.annotate 'line', 903 + find_lex $P2496, "$/" + get_hll_global $P2497, ["PAST"], "Regex" + find_lex $P2498, "$/" + unless_null $P2498, vivify_691 + $P2498 = root_new ['parrot';'Hash'] + vivify_691: + set $P2499, $P2498["codeblock"] + unless_null $P2499, vivify_692 + new $P2499, "Undef" + vivify_692: + $P2500 = $P2499."ast"() +.annotate 'line', 904 + find_lex $P2501, "$/" + unless_null $P2501, vivify_693 + $P2501 = root_new ['parrot';'Hash'] + vivify_693: + set $P2502, $P2501["zw"] + unless_null $P2502, vivify_694 + new $P2502, "Undef" + vivify_694: + set $S2503, $P2502 + iseq $I2504, $S2503, "!" + find_lex $P2505, "$/" + $P2506 = $P2497."new"($P2500, "zerowidth" :named("subtype"), $I2504 :named("negate"), "pastnode" :named("pasttype"), $P2505 :named("node")) +.annotate 'line', 903 + $P2507 = $P2496."!make"($P2506) +.annotate 'line', 902 + .return ($P2507) + control_2493: .local pmc exception .get_results (exception) - getattribute $P2402, exception, "payload" - .return ($P2402) + getattribute $P2508, exception, "payload" + .return ($P2508) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("139_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2406 -.annotate 'line', 882 - new $P2405, 'ExceptionHandler' - set_addr $P2405, control_2404 - $P2405."handle_types"(.CONTROL_RETURN) - push_eh $P2405 - .lex "self", self - .lex "$/", param_2406 -.annotate 'line', 883 - find_lex $P2407, "$/" - get_hll_global $P2408, ["PAST"], "Regex" - find_lex $P2409, "$/" - unless_null $P2409, vivify_668 - $P2409 = root_new ['parrot';'Hash'] - vivify_668: - set $P2410, $P2409["var"] - unless_null $P2410, vivify_669 - new $P2410, "Undef" - vivify_669: - $P2411 = $P2410."ast"() - find_lex $P2412, "$/" - $P2413 = $P2408."new"("!INTERPOLATE_REGEX", $P2411, "subrule" :named("pasttype"), "method" :named("subtype"), $P2412 :named("node")) - $P2414 = $P2407."!make"($P2413) -.annotate 'line', 882 - .return ($P2414) - control_2404: +.sub "assertion:sym" :subid("144_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2512 +.annotate 'line', 908 + new $P2511, 'ExceptionHandler' + set_addr $P2511, control_2510 + $P2511."handle_types"(.CONTROL_RETURN) + push_eh $P2511 + .lex "self", self + .lex "$/", param_2512 +.annotate 'line', 909 + find_lex $P2513, "$/" + get_hll_global $P2514, ["PAST"], "Regex" + find_lex $P2515, "$/" + unless_null $P2515, vivify_695 + $P2515 = root_new ['parrot';'Hash'] + vivify_695: + set $P2516, $P2515["var"] + unless_null $P2516, vivify_696 + new $P2516, "Undef" + vivify_696: + $P2517 = $P2516."ast"() + find_lex $P2518, "$/" + $P2519 = $P2514."new"("!INTERPOLATE_REGEX", $P2517, "subrule" :named("pasttype"), "method" :named("subtype"), $P2518 :named("node")) + $P2520 = $P2513."!make"($P2519) +.annotate 'line', 908 + .return ($P2520) + control_2510: .local pmc exception .get_results (exception) - getattribute $P2415, exception, "payload" - .return ($P2415) + getattribute $P2521, exception, "payload" + .return ($P2521) .end .namespace ["NQP";"RegexActions"] .include "except_types.pasm" -.sub "codeblock" :subid("140_1282016534.58916") :method :outer("133_1282016534.58916") - .param pmc param_2419 -.annotate 'line', 887 - new $P2418, 'ExceptionHandler' - set_addr $P2418, control_2417 - $P2418."handle_types"(.CONTROL_RETURN) - push_eh $P2418 - .lex "self", self - .lex "$/", param_2419 -.annotate 'line', 888 - new $P2420, "Undef" - .lex "$block", $P2420 -.annotate 'line', 890 - new $P2421, "Undef" - .lex "$past", $P2421 -.annotate 'line', 888 - find_lex $P2422, "$/" - unless_null $P2422, vivify_670 - $P2422 = root_new ['parrot';'Hash'] - vivify_670: - set $P2423, $P2422["block"] - unless_null $P2423, vivify_671 - new $P2423, "Undef" - vivify_671: - $P2424 = $P2423."ast"() - store_lex "$block", $P2424 -.annotate 'line', 889 - find_lex $P2425, "$block" - $P2425."blocktype"("immediate") -.annotate 'line', 891 - get_hll_global $P2426, ["PAST"], "Stmts" -.annotate 'line', 892 - get_hll_global $P2427, ["PAST"], "Op" -.annotate 'line', 893 - get_hll_global $P2428, ["PAST"], "Var" - $P2429 = $P2428."new"("$/" :named("name")) -.annotate 'line', 894 - get_hll_global $P2430, ["PAST"], "Op" -.annotate 'line', 895 - get_hll_global $P2431, ["PAST"], "Var" - $P2432 = $P2431."new"(unicode:"$\x{a2}" :named("name")) - $P2433 = $P2430."new"($P2432, "MATCH" :named("name"), "callmethod" :named("pasttype")) -.annotate 'line', 894 - $P2434 = $P2427."new"($P2429, $P2433, "bind" :named("pasttype")) -.annotate 'line', 892 - find_lex $P2435, "$block" - $P2436 = $P2426."new"($P2434, $P2435) -.annotate 'line', 891 - store_lex "$past", $P2436 -.annotate 'line', 903 - find_lex $P2437, "$/" - find_lex $P2438, "$past" - $P2439 = $P2437."!make"($P2438) -.annotate 'line', 887 - .return ($P2439) - control_2417: +.sub "codeblock" :subid("145_1284728484.24945") :method :outer("138_1284728484.24945") + .param pmc param_2525 +.annotate 'line', 913 + new $P2524, 'ExceptionHandler' + set_addr $P2524, control_2523 + $P2524."handle_types"(.CONTROL_RETURN) + push_eh $P2524 + .lex "self", self + .lex "$/", param_2525 +.annotate 'line', 914 + new $P2526, "Undef" + .lex "$block", $P2526 +.annotate 'line', 916 + new $P2527, "Undef" + .lex "$past", $P2527 +.annotate 'line', 914 + find_lex $P2528, "$/" + unless_null $P2528, vivify_697 + $P2528 = root_new ['parrot';'Hash'] + vivify_697: + set $P2529, $P2528["block"] + unless_null $P2529, vivify_698 + new $P2529, "Undef" + vivify_698: + $P2530 = $P2529."ast"() + store_lex "$block", $P2530 +.annotate 'line', 915 + find_lex $P2531, "$block" + $P2531."blocktype"("immediate") +.annotate 'line', 917 + get_hll_global $P2532, ["PAST"], "Stmts" +.annotate 'line', 918 + get_hll_global $P2533, ["PAST"], "Op" +.annotate 'line', 919 + get_hll_global $P2534, ["PAST"], "Var" + $P2535 = $P2534."new"("$/" :named("name")) +.annotate 'line', 920 + get_hll_global $P2536, ["PAST"], "Op" +.annotate 'line', 921 + get_hll_global $P2537, ["PAST"], "Var" + $P2538 = $P2537."new"(unicode:"$\x{a2}" :named("name")) + $P2539 = $P2536."new"($P2538, "MATCH" :named("name"), "callmethod" :named("pasttype")) +.annotate 'line', 920 + $P2540 = $P2533."new"($P2535, $P2539, "bind" :named("pasttype")) +.annotate 'line', 918 + find_lex $P2541, "$block" + $P2542 = $P2532."new"($P2540, $P2541) +.annotate 'line', 917 + store_lex "$past", $P2542 +.annotate 'line', 929 + find_lex $P2543, "$/" + find_lex $P2544, "$past" + $P2545 = $P2543."!make"($P2544) +.annotate 'line', 913 + .return ($P2545) + control_2523: .local pmc exception .get_results (exception) - getattribute $P2440, exception, "payload" - .return ($P2440) + getattribute $P2546, exception, "payload" + .return ($P2546) .end .namespace ["NQP";"Actions"] -.sub "_block2443" :load :anon :subid("141_1282016534.58916") +.sub "_block2549" :load :anon :subid("146_1284728484.24945") .annotate 'line', 3 - .const 'Sub' $P2445 = "11_1282016534.58916" - $P2446 = $P2445() - .return ($P2446) + .const 'Sub' $P2551 = "11_1284728484.24945" + $P2552 = $P2551() + .return ($P2552) .end .namespace [] -.sub "_block2453" :load :anon :subid("143_1282016534.58916") +.sub "_block2559" :load :anon :subid("148_1284728484.24945") .annotate 'line', 1 - .const 'Sub' $P2455 = "10_1282016534.58916" - $P2456 = $P2455() - .return ($P2456) + .const 'Sub' $P2561 = "10_1284728484.24945" + $P2562 = $P2561() + .return ($P2562) .end ### .include 'src/cheats/nqp-builtins.pir' diff -Nru parrot-2.7.0/ext/nqp-rx/src/stage0/nqp-setting.nqp parrot-2.8.0/ext/nqp-rx/src/stage0/nqp-setting.nqp --- parrot-2.7.0/ext/nqp-rx/src/stage0/nqp-setting.nqp 2010-06-26 14:37:14.000000000 +0000 +++ parrot-2.8.0/ext/nqp-rx/src/stage0/nqp-setting.nqp 2010-09-21 07:48:52.000000000 +0000 @@ -213,6 +213,36 @@ ~$result; } +=begin item split +Splits C<$text> on occurences of C<$regex> +=end item + +# our sub split ($regex, $text) { +# my $pos := 0; +# my @result; +# my $looking := 1; +# while $looking { +# my $match := +# Regex::Cursor.parse($text, :rule($regex), :c($pos)) ; +# +# if ?$match { +# my $from := $match.from(); +# my $to := $match.to(); +# my $prefix := pir::substr__sPii($text, $pos, $from-$pos); +# @result.push($prefix); +# $pos := $match.to(); +# } else { +# my $len := pir::length($text); +# if $pos < $len { +# @result.push(pir::substr__ssi($text, $pos) ); +# } +# $looking := 0; +# } +# } +# return @result; +# } + + # vim: ft=perl6 # From src/setting/IO.pm diff -Nru parrot-2.7.0/ext/nqp-rx/src/stage0/P6Regex-s0.pir parrot-2.8.0/ext/nqp-rx/src/stage0/P6Regex-s0.pir --- parrot-2.7.0/ext/nqp-rx/src/stage0/P6Regex-s0.pir 2010-08-17 18:07:25.000000000 +0000 +++ parrot-2.8.0/ext/nqp-rx/src/stage0/P6Regex-s0.pir 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2009, The Perl Foundation. -# $Id: P6Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: P6Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -16,7 +16,7 @@ ### .include 'gen/p6regex-grammar.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016522.91354") +.sub "_block11" :anon :subid("10_1284728471.30547") .annotate 'line', 0 get_hll_global $P14, ["Regex";"P6Regex";"Grammar"], "_block13" capture_lex $P14 @@ -30,153 +30,161 @@ .annotate 'line', 3 get_hll_global $P14, ["Regex";"P6Regex";"Grammar"], "_block13" capture_lex $P14 - $P572 = $P14() + $P620 = $P14() .annotate 'line', 1 - .return ($P572) - .const 'Sub' $P574 = "161_1282016522.91354" - .return ($P574) + .return ($P620) + .const 'Sub' $P622 = "174_1284728471.30547" + .return ($P622) .end .namespace [] -.sub "" :load :init :subid("post162") :outer("10_1282016522.91354") +.sub "" :load :init :subid("post175") :outer("10_1284728471.30547") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016522.91354" + .const 'Sub' $P12 = "10_1284728471.30547" .local pmc block set block, $P12 - $P577 = get_root_global ["parrot"], "P6metaclass" - $P577."new_class"("Regex::P6Regex::Grammar", "HLL::Grammar" :named("parent")) + $P625 = get_root_global ["parrot"], "P6metaclass" + $P625."new_class"("Regex::P6Regex::Grammar", "HLL::Grammar" :named("parent")) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block13" :subid("11_1282016522.91354") :outer("10_1282016522.91354") +.sub "_block13" :subid("11_1284728471.30547") :outer("10_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P561 = "158_1282016522.91354" - capture_lex $P561 - .const 'Sub' $P554 = "156_1282016522.91354" - capture_lex $P554 - .const 'Sub' $P547 = "154_1282016522.91354" - capture_lex $P547 - .const 'Sub' $P527 = "149_1282016522.91354" - capture_lex $P527 - .const 'Sub' $P493 = "143_1282016522.91354" - capture_lex $P493 - .const 'Sub' $P481 = "140_1282016522.91354" - capture_lex $P481 - .const 'Sub' $P469 = "137_1282016522.91354" - capture_lex $P469 - .const 'Sub' $P463 = "135_1282016522.91354" - capture_lex $P463 - .const 'Sub' $P452 = "132_1282016522.91354" + .const 'Sub' $P609 = "171_1284728471.30547" + capture_lex $P609 + .const 'Sub' $P602 = "169_1284728471.30547" + capture_lex $P602 + .const 'Sub' $P595 = "167_1284728471.30547" + capture_lex $P595 + .const 'Sub' $P575 = "162_1284728471.30547" + capture_lex $P575 + .const 'Sub' $P541 = "156_1284728471.30547" + capture_lex $P541 + .const 'Sub' $P529 = "153_1284728471.30547" + capture_lex $P529 + .const 'Sub' $P517 = "150_1284728471.30547" + capture_lex $P517 + .const 'Sub' $P511 = "148_1284728471.30547" + capture_lex $P511 + .const 'Sub' $P500 = "145_1284728471.30547" + capture_lex $P500 + .const 'Sub' $P489 = "142_1284728471.30547" + capture_lex $P489 + .const 'Sub' $P480 = "138_1284728471.30547" + capture_lex $P480 + .const 'Sub' $P470 = "135_1284728471.30547" + capture_lex $P470 + .const 'Sub' $P464 = "133_1284728471.30547" + capture_lex $P464 + .const 'Sub' $P458 = "131_1284728471.30547" + capture_lex $P458 + .const 'Sub' $P452 = "129_1284728471.30547" capture_lex $P452 - .const 'Sub' $P441 = "129_1282016522.91354" - capture_lex $P441 - .const 'Sub' $P432 = "125_1282016522.91354" - capture_lex $P432 - .const 'Sub' $P426 = "123_1282016522.91354" - capture_lex $P426 - .const 'Sub' $P420 = "121_1282016522.91354" - capture_lex $P420 - .const 'Sub' $P414 = "119_1282016522.91354" - capture_lex $P414 - .const 'Sub' $P408 = "117_1282016522.91354" - capture_lex $P408 - .const 'Sub' $P400 = "115_1282016522.91354" - capture_lex $P400 - .const 'Sub' $P389 = "113_1282016522.91354" - capture_lex $P389 - .const 'Sub' $P378 = "111_1282016522.91354" - capture_lex $P378 - .const 'Sub' $P372 = "109_1282016522.91354" - capture_lex $P372 - .const 'Sub' $P366 = "107_1282016522.91354" - capture_lex $P366 - .const 'Sub' $P360 = "105_1282016522.91354" - capture_lex $P360 - .const 'Sub' $P354 = "103_1282016522.91354" - capture_lex $P354 - .const 'Sub' $P348 = "101_1282016522.91354" - capture_lex $P348 - .const 'Sub' $P342 = "99_1282016522.91354" - capture_lex $P342 - .const 'Sub' $P336 = "97_1282016522.91354" - capture_lex $P336 - .const 'Sub' $P330 = "95_1282016522.91354" - capture_lex $P330 - .const 'Sub' $P318 = "91_1282016522.91354" - capture_lex $P318 - .const 'Sub' $P308 = "89_1282016522.91354" + .const 'Sub' $P446 = "127_1284728471.30547" + capture_lex $P446 + .const 'Sub' $P438 = "125_1284728471.30547" + capture_lex $P438 + .const 'Sub' $P427 = "123_1284728471.30547" + capture_lex $P427 + .const 'Sub' $P416 = "121_1284728471.30547" + capture_lex $P416 + .const 'Sub' $P410 = "119_1284728471.30547" + capture_lex $P410 + .const 'Sub' $P404 = "117_1284728471.30547" + capture_lex $P404 + .const 'Sub' $P398 = "115_1284728471.30547" + capture_lex $P398 + .const 'Sub' $P392 = "113_1284728471.30547" + capture_lex $P392 + .const 'Sub' $P386 = "111_1284728471.30547" + capture_lex $P386 + .const 'Sub' $P380 = "109_1284728471.30547" + capture_lex $P380 + .const 'Sub' $P374 = "107_1284728471.30547" + capture_lex $P374 + .const 'Sub' $P368 = "105_1284728471.30547" + capture_lex $P368 + .const 'Sub' $P356 = "101_1284728471.30547" + capture_lex $P356 + .const 'Sub' $P346 = "99_1284728471.30547" + capture_lex $P346 + .const 'Sub' $P339 = "97_1284728471.30547" + capture_lex $P339 + .const 'Sub' $P327 = "95_1284728471.30547" + capture_lex $P327 + .const 'Sub' $P320 = "93_1284728471.30547" + capture_lex $P320 + .const 'Sub' $P314 = "91_1284728471.30547" + capture_lex $P314 + .const 'Sub' $P308 = "89_1284728471.30547" capture_lex $P308 - .const 'Sub' $P301 = "87_1282016522.91354" - capture_lex $P301 - .const 'Sub' $P289 = "85_1282016522.91354" - capture_lex $P289 - .const 'Sub' $P282 = "83_1282016522.91354" - capture_lex $P282 - .const 'Sub' $P276 = "81_1282016522.91354" - capture_lex $P276 - .const 'Sub' $P270 = "79_1282016522.91354" - capture_lex $P270 - .const 'Sub' $P263 = "77_1282016522.91354" - capture_lex $P263 - .const 'Sub' $P256 = "75_1282016522.91354" + .const 'Sub' $P302 = "87_1284728471.30547" + capture_lex $P302 + .const 'Sub' $P295 = "85_1284728471.30547" + capture_lex $P295 + .const 'Sub' $P288 = "83_1284728471.30547" + capture_lex $P288 + .const 'Sub' $P281 = "81_1284728471.30547" + capture_lex $P281 + .const 'Sub' $P274 = "79_1284728471.30547" + capture_lex $P274 + .const 'Sub' $P268 = "77_1284728471.30547" + capture_lex $P268 + .const 'Sub' $P262 = "75_1284728471.30547" + capture_lex $P262 + .const 'Sub' $P256 = "73_1284728471.30547" capture_lex $P256 - .const 'Sub' $P249 = "73_1282016522.91354" - capture_lex $P249 - .const 'Sub' $P242 = "71_1282016522.91354" - capture_lex $P242 - .const 'Sub' $P236 = "69_1282016522.91354" - capture_lex $P236 - .const 'Sub' $P230 = "67_1282016522.91354" - capture_lex $P230 - .const 'Sub' $P224 = "65_1282016522.91354" - capture_lex $P224 - .const 'Sub' $P218 = "63_1282016522.91354" - capture_lex $P218 - .const 'Sub' $P212 = "61_1282016522.91354" - capture_lex $P212 - .const 'Sub' $P207 = "59_1282016522.91354" - capture_lex $P207 - .const 'Sub' $P202 = "57_1282016522.91354" - capture_lex $P202 - .const 'Sub' $P196 = "55_1282016522.91354" - capture_lex $P196 - .const 'Sub' $P190 = "53_1282016522.91354" - capture_lex $P190 - .const 'Sub' $P184 = "51_1282016522.91354" - capture_lex $P184 - .const 'Sub' $P169 = "46_1282016522.91354" - capture_lex $P169 - .const 'Sub' $P154 = "44_1282016522.91354" - capture_lex $P154 - .const 'Sub' $P147 = "42_1282016522.91354" - capture_lex $P147 - .const 'Sub' $P140 = "40_1282016522.91354" - capture_lex $P140 - .const 'Sub' $P133 = "38_1282016522.91354" - capture_lex $P133 - .const 'Sub' $P116 = "33_1282016522.91354" - capture_lex $P116 - .const 'Sub' $P104 = "30_1282016522.91354" - capture_lex $P104 - .const 'Sub' $P97 = "28_1282016522.91354" + .const 'Sub' $P250 = "71_1284728471.30547" + capture_lex $P250 + .const 'Sub' $P244 = "69_1284728471.30547" + capture_lex $P244 + .const 'Sub' $P239 = "67_1284728471.30547" + capture_lex $P239 + .const 'Sub' $P234 = "65_1284728471.30547" + capture_lex $P234 + .const 'Sub' $P228 = "63_1284728471.30547" + capture_lex $P228 + .const 'Sub' $P222 = "61_1284728471.30547" + capture_lex $P222 + .const 'Sub' $P216 = "59_1284728471.30547" + capture_lex $P216 + .const 'Sub' $P201 = "54_1284728471.30547" + capture_lex $P201 + .const 'Sub' $P186 = "52_1284728471.30547" + capture_lex $P186 + .const 'Sub' $P163 = "46_1284728471.30547" + capture_lex $P163 + .const 'Sub' $P156 = "44_1284728471.30547" + capture_lex $P156 + .const 'Sub' $P149 = "42_1284728471.30547" + capture_lex $P149 + .const 'Sub' $P142 = "40_1284728471.30547" + capture_lex $P142 + .const 'Sub' $P125 = "35_1284728471.30547" + capture_lex $P125 + .const 'Sub' $P113 = "32_1284728471.30547" + capture_lex $P113 + .const 'Sub' $P106 = "30_1284728471.30547" + capture_lex $P106 + .const 'Sub' $P97 = "28_1284728471.30547" capture_lex $P97 - .const 'Sub' $P87 = "26_1282016522.91354" + .const 'Sub' $P87 = "26_1284728471.30547" capture_lex $P87 - .const 'Sub' $P80 = "24_1282016522.91354" + .const 'Sub' $P80 = "24_1284728471.30547" capture_lex $P80 - .const 'Sub' $P68 = "22_1282016522.91354" + .const 'Sub' $P68 = "22_1284728471.30547" capture_lex $P68 - .const 'Sub' $P61 = "20_1282016522.91354" + .const 'Sub' $P61 = "20_1284728471.30547" capture_lex $P61 - .const 'Sub' $P54 = "18_1282016522.91354" + .const 'Sub' $P54 = "18_1284728471.30547" capture_lex $P54 - .const 'Sub' $P44 = "15_1282016522.91354" + .const 'Sub' $P44 = "15_1284728471.30547" capture_lex $P44 - .const 'Sub' $P37 = "13_1282016522.91354" + .const 'Sub' $P37 = "13_1284728471.30547" capture_lex $P37 - .const 'Sub' $P15 = "12_1282016522.91354" + .const 'Sub' $P15 = "12_1284728471.30547" capture_lex $P15 $P0 = find_dynamic_lex "$*CTXSAVE" if null $P0 goto ctxsave_done @@ -184,17 +192,17 @@ unless $I0 goto ctxsave_done $P0."ctxsave"() ctxsave_done: - .const 'Sub' $P561 = "158_1282016522.91354" - capture_lex $P561 - .return ($P561) - .const 'Sub' $P569 = "160_1282016522.91354" - .return ($P569) + .const 'Sub' $P609 = "171_1284728471.30547" + capture_lex $P609 + .return ($P609) + .const 'Sub' $P617 = "173_1284728471.30547" + .return ($P617) .end .namespace ["Regex";"P6Regex";"Grammar"] .include "except_types.pasm" -.sub "obs" :subid("12_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "obs" :subid("12_1284728471.30547") :method :outer("11_1284728471.30547") .param pmc param_18 .param pmc param_19 .param pmc param_20 :optional @@ -207,11 +215,11 @@ .lex "self", self .lex "$old", param_18 .lex "$new", param_19 - if has_param_20, optparam_163 + if has_param_20, optparam_176 new $P21, "String" assign $P21, "in Perl 6" set param_20, $P21 - optparam_163: + optparam_176: .lex "$when", param_20 .annotate 'line', 4 find_lex $P22, "self" @@ -241,7 +249,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "ws" :subid("13_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "ws" :subid("13_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx38_tgt .local int rx38_pos @@ -263,9 +271,9 @@ substr rx38_tgt, rx38_tgt, rx38_off rx38_start: eq $I10, 1, rx38_restart - if_null rx38_debug, debug_164 - rx38_cur."!cursor_debug"("START ", "ws") - debug_164: + if_null rx38_debug, debug_177 + rx38_cur."!cursor_debug"("START", "ws") + debug_177: $I10 = self.'from'() ne $I10, -1, rxscan41_done goto rxscan41_scan @@ -314,15 +322,15 @@ rxquantr42_done: # rx pass rx38_cur."!cursor_pass"(rx38_pos, "ws") - if_null rx38_debug, debug_165 - rx38_cur."!cursor_debug"("PASS ", "ws", " at pos=", rx38_pos) - debug_165: + if_null rx38_debug, debug_178 + rx38_cur."!cursor_debug"("PASS", "ws", " at pos=", rx38_pos) + debug_178: .return (rx38_cur) rx38_restart: .annotate 'line', 3 - if_null rx38_debug, debug_166 - rx38_cur."!cursor_debug"("NEXT ", "ws") - debug_166: + if_null rx38_debug, debug_179 + rx38_cur."!cursor_debug"("NEXT", "ws") + debug_179: rx38_fail: (rx38_rep, rx38_pos, $I10, $P10) = rx38_cur."!mark_fail"(0) lt rx38_pos, -1, rx38_done @@ -330,16 +338,16 @@ jump $I10 rx38_done: rx38_cur."!cursor_fail"() - if_null rx38_debug, debug_167 - rx38_cur."!cursor_debug"("FAIL ", "ws") - debug_167: + if_null rx38_debug, debug_180 + rx38_cur."!cursor_debug"("FAIL", "ws") + debug_180: .return (rx38_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__ws" :subid("14_1282016522.91354") :method +.sub "!PREFIX__ws" :subid("14_1284728471.30547") :method .annotate 'line', 3 new $P40, "ResizablePMCArray" push $P40, "" @@ -348,9 +356,9 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "normspace" :subid("15_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "normspace" :subid("15_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P50 = "17_1282016522.91354" + .const 'Sub' $P50 = "17_1284728471.30547" capture_lex $P50 .local string rx45_tgt .local int rx45_pos @@ -372,9 +380,9 @@ substr rx45_tgt, rx45_tgt, rx45_off rx45_start: eq $I10, 1, rx45_restart - if_null rx45_debug, debug_168 - rx45_cur."!cursor_debug"("START ", "normspace") - debug_168: + if_null rx45_debug, debug_181 + rx45_cur."!cursor_debug"("START", "normspace") + debug_181: $I10 = self.'from'() ne $I10, -1, rxscan48_done goto rxscan48_scan @@ -390,7 +398,7 @@ .annotate 'line', 10 # rx subrule "before" subtype=zerowidth negate= rx45_cur."!cursor_pos"(rx45_pos) - .const 'Sub' $P50 = "17_1282016522.91354" + .const 'Sub' $P50 = "17_1284728471.30547" capture_lex $P50 $P10 = rx45_cur."before"($P50) unless $P10, rx45_fail @@ -401,15 +409,15 @@ rx45_pos = $P10."pos"() # rx pass rx45_cur."!cursor_pass"(rx45_pos, "normspace") - if_null rx45_debug, debug_173 - rx45_cur."!cursor_debug"("PASS ", "normspace", " at pos=", rx45_pos) - debug_173: + if_null rx45_debug, debug_186 + rx45_cur."!cursor_debug"("PASS", "normspace", " at pos=", rx45_pos) + debug_186: .return (rx45_cur) rx45_restart: .annotate 'line', 3 - if_null rx45_debug, debug_174 - rx45_cur."!cursor_debug"("NEXT ", "normspace") - debug_174: + if_null rx45_debug, debug_187 + rx45_cur."!cursor_debug"("NEXT", "normspace") + debug_187: rx45_fail: (rx45_rep, rx45_pos, $I10, $P10) = rx45_cur."!mark_fail"(0) lt rx45_pos, -1, rx45_done @@ -417,16 +425,16 @@ jump $I10 rx45_done: rx45_cur."!cursor_fail"() - if_null rx45_debug, debug_175 - rx45_cur."!cursor_debug"("FAIL ", "normspace") - debug_175: + if_null rx45_debug, debug_188 + rx45_cur."!cursor_debug"("FAIL", "normspace") + debug_188: .return (rx45_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__normspace" :subid("16_1282016522.91354") :method +.sub "!PREFIX__normspace" :subid("16_1284728471.30547") :method .annotate 'line', 3 new $P47, "ResizablePMCArray" push $P47, "" @@ -435,7 +443,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block49" :anon :subid("17_1282016522.91354") :method :outer("15_1282016522.91354") +.sub "_block49" :anon :subid("17_1284728471.30547") :method :outer("15_1284728471.30547") .annotate 'line', 10 .local string rx51_tgt .local int rx51_pos @@ -457,9 +465,9 @@ substr rx51_tgt, rx51_tgt, rx51_off rx51_start: eq $I10, 1, rx51_restart - if_null rx51_debug, debug_169 - rx51_cur."!cursor_debug"("START ", "") - debug_169: + if_null rx51_debug, debug_182 + rx51_cur."!cursor_debug"("START", "") + debug_182: $I10 = self.'from'() ne $I10, -1, rxscan52_done goto rxscan52_scan @@ -493,14 +501,14 @@ alt53_end: # rx pass rx51_cur."!cursor_pass"(rx51_pos, "") - if_null rx51_debug, debug_170 - rx51_cur."!cursor_debug"("PASS ", "", " at pos=", rx51_pos) - debug_170: + if_null rx51_debug, debug_183 + rx51_cur."!cursor_debug"("PASS", "", " at pos=", rx51_pos) + debug_183: .return (rx51_cur) rx51_restart: - if_null rx51_debug, debug_171 - rx51_cur."!cursor_debug"("NEXT ", "") - debug_171: + if_null rx51_debug, debug_184 + rx51_cur."!cursor_debug"("NEXT", "") + debug_184: rx51_fail: (rx51_rep, rx51_pos, $I10, $P10) = rx51_cur."!mark_fail"(0) lt rx51_pos, -1, rx51_done @@ -508,16 +516,16 @@ jump $I10 rx51_done: rx51_cur."!cursor_fail"() - if_null rx51_debug, debug_172 - rx51_cur."!cursor_debug"("FAIL ", "") - debug_172: + if_null rx51_debug, debug_185 + rx51_cur."!cursor_debug"("FAIL", "") + debug_185: .return (rx51_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "identifier" :subid("18_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "identifier" :subid("18_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx55_tgt .local int rx55_pos @@ -539,9 +547,9 @@ substr rx55_tgt, rx55_tgt, rx55_off rx55_start: eq $I10, 1, rx55_restart - if_null rx55_debug, debug_176 - rx55_cur."!cursor_debug"("START ", "identifier") - debug_176: + if_null rx55_debug, debug_189 + rx55_cur."!cursor_debug"("START", "identifier") + debug_189: $I10 = self.'from'() ne $I10, -1, rxscan59_done goto rxscan59_scan @@ -584,15 +592,15 @@ rxquantr60_done: # rx pass rx55_cur."!cursor_pass"(rx55_pos, "identifier") - if_null rx55_debug, debug_177 - rx55_cur."!cursor_debug"("PASS ", "identifier", " at pos=", rx55_pos) - debug_177: + if_null rx55_debug, debug_190 + rx55_cur."!cursor_debug"("PASS", "identifier", " at pos=", rx55_pos) + debug_190: .return (rx55_cur) rx55_restart: .annotate 'line', 3 - if_null rx55_debug, debug_178 - rx55_cur."!cursor_debug"("NEXT ", "identifier") - debug_178: + if_null rx55_debug, debug_191 + rx55_cur."!cursor_debug"("NEXT", "identifier") + debug_191: rx55_fail: (rx55_rep, rx55_pos, $I10, $P10) = rx55_cur."!mark_fail"(0) lt rx55_pos, -1, rx55_done @@ -600,16 +608,16 @@ jump $I10 rx55_done: rx55_cur."!cursor_fail"() - if_null rx55_debug, debug_179 - rx55_cur."!cursor_debug"("FAIL ", "identifier") - debug_179: + if_null rx55_debug, debug_192 + rx55_cur."!cursor_debug"("FAIL", "identifier") + debug_192: .return (rx55_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__identifier" :subid("19_1282016522.91354") :method +.sub "!PREFIX__identifier" :subid("19_1284728471.30547") :method .annotate 'line', 3 $P57 = self."!PREFIX__!subrule"("ident", "") new $P58, "ResizablePMCArray" @@ -619,7 +627,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "arg" :subid("20_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "arg" :subid("20_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx62_tgt .local int rx62_pos @@ -641,9 +649,9 @@ substr rx62_tgt, rx62_tgt, rx62_off rx62_start: eq $I10, 1, rx62_restart - if_null rx62_debug, debug_180 - rx62_cur."!cursor_debug"("START ", "arg") - debug_180: + if_null rx62_debug, debug_193 + rx62_cur."!cursor_debug"("START", "arg") + debug_193: $I10 = self.'from'() ne $I10, -1, rxscan65_done goto rxscan65_scan @@ -662,7 +670,6 @@ 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 substr $S10, rx62_tgt, $I10, 1 index $I11, "'", $S10 @@ -680,7 +687,6 @@ 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 substr $S10, rx62_tgt, $I10, 1 index $I11, "\"", $S10 @@ -719,15 +725,15 @@ .annotate 'line', 14 # rx pass rx62_cur."!cursor_pass"(rx62_pos, "arg") - if_null rx62_debug, debug_181 - rx62_cur."!cursor_debug"("PASS ", "arg", " at pos=", rx62_pos) - debug_181: + if_null rx62_debug, debug_194 + rx62_cur."!cursor_debug"("PASS", "arg", " at pos=", rx62_pos) + debug_194: .return (rx62_cur) rx62_restart: .annotate 'line', 3 - if_null rx62_debug, debug_182 - rx62_cur."!cursor_debug"("NEXT ", "arg") - debug_182: + if_null rx62_debug, debug_195 + rx62_cur."!cursor_debug"("NEXT", "arg") + debug_195: rx62_fail: (rx62_rep, rx62_pos, $I10, $P10) = rx62_cur."!mark_fail"(0) lt rx62_pos, -1, rx62_done @@ -735,16 +741,16 @@ jump $I10 rx62_done: rx62_cur."!cursor_fail"() - if_null rx62_debug, debug_183 - rx62_cur."!cursor_debug"("FAIL ", "arg") - debug_183: + if_null rx62_debug, debug_196 + rx62_cur."!cursor_debug"("FAIL", "arg") + debug_196: .return (rx62_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__arg" :subid("21_1282016522.91354") :method +.sub "!PREFIX__arg" :subid("21_1284728471.30547") :method .annotate 'line', 3 new $P64, "ResizablePMCArray" push $P64, "" @@ -755,7 +761,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "arglist" :subid("22_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "arglist" :subid("22_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx69_tgt .local int rx69_pos @@ -778,9 +784,9 @@ substr rx69_tgt, rx69_tgt, rx69_off rx69_start: eq $I10, 1, rx69_restart - if_null rx69_debug, debug_184 - rx69_cur."!cursor_debug"("START ", "arglist") - debug_184: + if_null rx69_debug, debug_197 + rx69_cur."!cursor_debug"("START", "arglist") + debug_197: $I10 = self.'from'() ne $I10, -1, rxscan73_done goto rxscan73_scan @@ -852,15 +858,15 @@ rx69_pos = $P10."pos"() # rx pass rx69_cur."!cursor_pass"(rx69_pos, "arglist") - if_null rx69_debug, debug_185 - rx69_cur."!cursor_debug"("PASS ", "arglist", " at pos=", rx69_pos) - debug_185: + if_null rx69_debug, debug_198 + rx69_cur."!cursor_debug"("PASS", "arglist", " at pos=", rx69_pos) + debug_198: .return (rx69_cur) rx69_restart: .annotate 'line', 3 - if_null rx69_debug, debug_186 - rx69_cur."!cursor_debug"("NEXT ", "arglist") - debug_186: + if_null rx69_debug, debug_199 + rx69_cur."!cursor_debug"("NEXT", "arglist") + debug_199: rx69_fail: (rx69_rep, rx69_pos, $I10, $P10) = rx69_cur."!mark_fail"(0) lt rx69_pos, -1, rx69_done @@ -868,16 +874,16 @@ jump $I10 rx69_done: rx69_cur."!cursor_fail"() - if_null rx69_debug, debug_187 - rx69_cur."!cursor_debug"("FAIL ", "arglist") - debug_187: + if_null rx69_debug, debug_200 + rx69_cur."!cursor_debug"("FAIL", "arglist") + debug_200: .return (rx69_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__arglist" :subid("23_1282016522.91354") :method +.sub "!PREFIX__arglist" :subid("23_1284728471.30547") :method .annotate 'line', 3 $P71 = self."!PREFIX__!subrule"("ws", "") new $P72, "ResizablePMCArray" @@ -887,7 +893,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "TOP" :subid("24_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "TOP" :subid("24_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx81_tgt .local int rx81_pos @@ -909,9 +915,9 @@ substr rx81_tgt, rx81_tgt, rx81_off rx81_start: eq $I10, 1, rx81_restart - if_null rx81_debug, debug_188 - rx81_cur."!cursor_debug"("START ", "TOP") - debug_188: + if_null rx81_debug, debug_201 + rx81_cur."!cursor_debug"("START", "TOP") + debug_201: $I10 = self.'from'() ne $I10, -1, rxscan85_done goto rxscan85_scan @@ -949,15 +955,15 @@ .annotate 'line', 24 # rx pass rx81_cur."!cursor_pass"(rx81_pos, "TOP") - if_null rx81_debug, debug_189 - rx81_cur."!cursor_debug"("PASS ", "TOP", " at pos=", rx81_pos) - debug_189: + if_null rx81_debug, debug_202 + rx81_cur."!cursor_debug"("PASS", "TOP", " at pos=", rx81_pos) + debug_202: .return (rx81_cur) rx81_restart: .annotate 'line', 3 - if_null rx81_debug, debug_190 - rx81_cur."!cursor_debug"("NEXT ", "TOP") - debug_190: + if_null rx81_debug, debug_203 + rx81_cur."!cursor_debug"("NEXT", "TOP") + debug_203: rx81_fail: (rx81_rep, rx81_pos, $I10, $P10) = rx81_cur."!mark_fail"(0) lt rx81_pos, -1, rx81_done @@ -965,16 +971,16 @@ jump $I10 rx81_done: rx81_cur."!cursor_fail"() - if_null rx81_debug, debug_191 - rx81_cur."!cursor_debug"("FAIL ", "TOP") - debug_191: + if_null rx81_debug, debug_204 + rx81_cur."!cursor_debug"("FAIL", "TOP") + debug_204: .return (rx81_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__TOP" :subid("25_1282016522.91354") :method +.sub "!PREFIX__TOP" :subid("25_1284728471.30547") :method .annotate 'line', 3 $P83 = self."!PREFIX__!subrule"("nibbler", "") new $P84, "ResizablePMCArray" @@ -984,7 +990,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "nibbler" :subid("26_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "nibbler" :subid("26_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx88_tgt .local int rx88_pos @@ -994,7 +1000,7 @@ .local pmc rx88_cur .local pmc rx88_debug (rx88_cur, rx88_pos, rx88_tgt, $I10) = self."!cursor_start"() - rx88_cur."!cursor_caparray"("termish") + rx88_cur."!cursor_caparray"("termconj") getattribute rx88_debug, rx88_cur, "$!debug" .lex unicode:"$\x{a2}", rx88_cur .local pmc match @@ -1007,9 +1013,9 @@ substr rx88_tgt, rx88_tgt, rx88_off rx88_start: eq $I10, 1, rx88_restart - if_null rx88_debug, debug_192 - rx88_cur."!cursor_debug"("START ", "nibbler") - debug_192: + if_null rx88_debug, debug_205 + rx88_cur."!cursor_debug"("START", "nibbler") + debug_205: $I10 = self.'from'() ne $I10, -1, rxscan91_done goto rxscan91_scan @@ -1082,12 +1088,12 @@ (rx88_rep) = rx88_cur."!mark_commit"($I10) rxquantr92_done: .annotate 'line', 32 - # rx subrule "termish" subtype=capture negate= + # rx subrule "termconj" subtype=capture negate= rx88_cur."!cursor_pos"(rx88_pos) - $P10 = rx88_cur."termish"() + $P10 = rx88_cur."termconj"() unless $P10, rx88_fail rx88_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("termish") + $P10."!cursor_names"("termconj") rx88_pos = $P10."pos"() .annotate 'line', 35 # rx rxquantr94 ** 0..* @@ -1119,12 +1125,12 @@ .annotate 'line', 34 set_addr $I10, alt96_1 rx88_cur."!mark_push"(0, rx88_pos, $I10) - # rx subrule "termish" subtype=capture negate= + # rx subrule "termconj" subtype=capture negate= rx88_cur."!cursor_pos"(rx88_pos) - $P10 = rx88_cur."termish"() + $P10 = rx88_cur."termconj"() unless $P10, rx88_fail rx88_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("termish") + $P10."!cursor_names"("termconj") rx88_pos = $P10."pos"() goto alt96_end alt96_1: @@ -1144,15 +1150,15 @@ .annotate 'line', 29 # rx pass rx88_cur."!cursor_pass"(rx88_pos, "nibbler") - if_null rx88_debug, debug_193 - rx88_cur."!cursor_debug"("PASS ", "nibbler", " at pos=", rx88_pos) - debug_193: + if_null rx88_debug, debug_206 + rx88_cur."!cursor_debug"("PASS", "nibbler", " at pos=", rx88_pos) + debug_206: .return (rx88_cur) rx88_restart: .annotate 'line', 3 - if_null rx88_debug, debug_194 - rx88_cur."!cursor_debug"("NEXT ", "nibbler") - debug_194: + if_null rx88_debug, debug_207 + rx88_cur."!cursor_debug"("NEXT", "nibbler") + debug_207: rx88_fail: (rx88_rep, rx88_pos, $I10, $P10) = rx88_cur."!mark_fail"(0) lt rx88_pos, -1, rx88_done @@ -1160,16 +1166,16 @@ jump $I10 rx88_done: rx88_cur."!cursor_fail"() - if_null rx88_debug, debug_195 - rx88_cur."!cursor_debug"("FAIL ", "nibbler") - debug_195: + if_null rx88_debug, debug_208 + rx88_cur."!cursor_debug"("FAIL", "nibbler") + debug_208: .return (rx88_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__nibbler" :subid("27_1282016522.91354") :method +.sub "!PREFIX__nibbler" :subid("27_1284728471.30547") :method .annotate 'line', 3 new $P90, "ResizablePMCArray" push $P90, "" @@ -1178,7 +1184,7 @@ .namespace ["Regex";"P6Regex";"Grammar"] -.sub "termish" :subid("28_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "termconj" :subid("28_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 .local string rx98_tgt .local int rx98_pos @@ -1188,7 +1194,7 @@ .local pmc rx98_cur .local pmc rx98_debug (rx98_cur, rx98_pos, rx98_tgt, $I10) = self."!cursor_start"() - rx98_cur."!cursor_caparray"("noun") + rx98_cur."!cursor_caparray"("termish") getattribute rx98_debug, rx98_cur, "$!debug" .lex unicode:"$\x{a2}", rx98_cur .local pmc match @@ -1201,57 +1207,93 @@ substr rx98_tgt, rx98_tgt, rx98_off rx98_start: eq $I10, 1, rx98_restart - if_null rx98_debug, debug_196 - rx98_cur."!cursor_debug"("START ", "termish") - debug_196: + if_null rx98_debug, debug_209 + rx98_cur."!cursor_debug"("START", "termconj") + debug_209: $I10 = self.'from'() - ne $I10, -1, rxscan101_done - goto rxscan101_scan - rxscan101_loop: + ne $I10, -1, rxscan102_done + goto rxscan102_scan + rxscan102_loop: ($P10) = rx98_cur."from"() inc $P10 set rx98_pos, $P10 - ge rx98_pos, rx98_eos, rxscan101_done - rxscan101_scan: - set_addr $I10, rxscan101_loop + ge rx98_pos, rx98_eos, rxscan102_done + rxscan102_scan: + set_addr $I10, rxscan102_loop rx98_cur."!mark_push"(0, rx98_pos, $I10) - rxscan101_done: + rxscan102_done: .annotate 'line', 39 - # rx rxquantr102 ** 1..* - set_addr $I10, rxquantr102_done - rx98_cur."!mark_push"(0, -1, $I10) - rxquantr102_loop: - # rx subrule "quantified_atom" subtype=capture negate= + # rx subrule "termish" subtype=capture negate= rx98_cur."!cursor_pos"(rx98_pos) - $P10 = rx98_cur."quantified_atom"() + $P10 = rx98_cur."termish"() unless $P10, rx98_fail - goto rxsubrule103_pass - rxsubrule103_back: - $P10 = $P10."!cursor_next"() + 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 "&&" + add $I11, rx98_pos, 2 + gt $I11, rx98_eos, rx98_fail + sub $I11, rx98_pos, rx98_off + substr $S10, rx98_tgt, $I11, 2 + ne $S10, "&&", rx98_fail + add rx98_pos, 2 + goto alt104_end + alt104_1: + # rx literal "&" + add $I11, rx98_pos, 1 + gt $I11, rx98_eos, rx98_fail + sub $I11, rx98_pos, rx98_off + ord $I11, rx98_tgt, $I11 + ne $I11, 38, rx98_fail + 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= + rx98_cur."!cursor_pos"(rx98_pos) + $P10 = rx98_cur."termish"() + unless $P10, rx98_fail + rx98_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("termish") + rx98_pos = $P10."pos"() + goto alt105_end + alt105_1: + # rx subrule "panic" subtype=method negate= + rx98_cur."!cursor_pos"(rx98_pos) + $P10 = rx98_cur."panic"("Null pattern not allowed") unless $P10, rx98_fail - rxsubrule103_pass: - set_addr $I10, rxsubrule103_back - rx98_cur."!mark_push"(0, rx98_pos, $I10, $P10) - $P10."!cursor_names"("noun") rx98_pos = $P10."pos"() - set_addr $I10, rxquantr102_done + alt105_end: +.annotate 'line', 42 + set_addr $I10, rxquantr103_done (rx98_rep) = rx98_cur."!mark_commit"($I10) - set_addr $I10, rxquantr102_done + set_addr $I10, rxquantr103_done rx98_cur."!mark_push"(rx98_rep, rx98_pos, $I10) - goto rxquantr102_loop - rxquantr102_done: + goto rxquantr103_loop + rxquantr103_done: .annotate 'line', 38 # rx pass - rx98_cur."!cursor_pass"(rx98_pos, "termish") - if_null rx98_debug, debug_197 - rx98_cur."!cursor_debug"("PASS ", "termish", " at pos=", rx98_pos) - debug_197: + rx98_cur."!cursor_pass"(rx98_pos, "termconj") + if_null rx98_debug, debug_210 + rx98_cur."!cursor_debug"("PASS", "termconj", " at pos=", rx98_pos) + debug_210: .return (rx98_cur) rx98_restart: .annotate 'line', 3 - if_null rx98_debug, debug_198 - rx98_cur."!cursor_debug"("NEXT ", "termish") - debug_198: + if_null rx98_debug, debug_211 + rx98_cur."!cursor_debug"("NEXT", "termconj") + debug_211: rx98_fail: (rx98_rep, rx98_pos, $I10, $P10) = rx98_cur."!mark_fail"(0) lt rx98_pos, -1, rx98_done @@ -1259,154 +1301,128 @@ jump $I10 rx98_done: rx98_cur."!cursor_fail"() - if_null rx98_debug, debug_199 - rx98_cur."!cursor_debug"("FAIL ", "termish") - debug_199: + if_null rx98_debug, debug_212 + rx98_cur."!cursor_debug"("FAIL", "termconj") + debug_212: .return (rx98_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__termish" :subid("29_1282016522.91354") :method +.sub "!PREFIX__termconj" :subid("29_1284728471.30547") :method .annotate 'line', 3 - new $P100, "ResizablePMCArray" - push $P100, "" - .return ($P100) + $P100 = self."!PREFIX__!subrule"("termish", "") + new $P101, "ResizablePMCArray" + push $P101, $P100 + .return ($P101) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantified_atom" :subid("30_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .const 'Sub' $P113 = "32_1282016522.91354" - capture_lex $P113 - .local string rx105_tgt - .local int rx105_pos - .local int rx105_off - .local int rx105_eos - .local int rx105_rep - .local pmc rx105_cur - .local pmc rx105_debug - (rx105_cur, rx105_pos, rx105_tgt, $I10) = self."!cursor_start"() - rx105_cur."!cursor_caparray"("quantifier", "backmod") - getattribute rx105_debug, rx105_cur, "$!debug" - .lex unicode:"$\x{a2}", rx105_cur - .local pmc match - .lex "$/", match - length rx105_eos, rx105_tgt - gt rx105_pos, rx105_eos, rx105_done - set rx105_off, 0 - lt rx105_pos, 2, rx105_start - sub rx105_off, rx105_pos, 1 - substr rx105_tgt, rx105_tgt, rx105_off - rx105_start: - eq $I10, 1, rx105_restart - if_null rx105_debug, debug_200 - rx105_cur."!cursor_debug"("START ", "quantified_atom") - debug_200: +.sub "termish" :subid("30_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx107_tgt + .local int rx107_pos + .local int rx107_off + .local int rx107_eos + .local int rx107_rep + .local pmc rx107_cur + .local pmc rx107_debug + (rx107_cur, rx107_pos, rx107_tgt, $I10) = self."!cursor_start"() + rx107_cur."!cursor_caparray"("noun") + getattribute rx107_debug, rx107_cur, "$!debug" + .lex unicode:"$\x{a2}", rx107_cur + .local pmc match + .lex "$/", match + length rx107_eos, rx107_tgt + gt rx107_pos, rx107_eos, rx107_done + set rx107_off, 0 + lt rx107_pos, 2, rx107_start + sub rx107_off, rx107_pos, 1 + substr rx107_tgt, rx107_tgt, rx107_off + rx107_start: + eq $I10, 1, rx107_restart + if_null rx107_debug, debug_213 + rx107_cur."!cursor_debug"("START", "termish") + debug_213: $I10 = self.'from'() - ne $I10, -1, rxscan109_done - goto rxscan109_scan - rxscan109_loop: - ($P10) = rx105_cur."from"() - inc $P10 - set rx105_pos, $P10 - ge rx105_pos, rx105_eos, rxscan109_done - rxscan109_scan: - set_addr $I10, rxscan109_loop - rx105_cur."!mark_push"(0, rx105_pos, $I10) - rxscan109_done: -.annotate 'line', 43 - # rx subrule "atom" subtype=capture negate= - rx105_cur."!cursor_pos"(rx105_pos) - $P10 = rx105_cur."atom"() - unless $P10, rx105_fail - rx105_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("atom") - rx105_pos = $P10."pos"() - # rx rxquantr110 ** 0..1 - set_addr $I10, rxquantr110_done - rx105_cur."!mark_push"(0, rx105_pos, $I10) - rxquantr110_loop: - # rx subrule "ws" subtype=method negate= - rx105_cur."!cursor_pos"(rx105_pos) - $P10 = rx105_cur."ws"() - unless $P10, rx105_fail - rx105_pos = $P10."pos"() - alt111_0: - set_addr $I10, alt111_1 - rx105_cur."!mark_push"(0, rx105_pos, $I10) - # rx subrule "quantifier" subtype=capture negate= - rx105_cur."!cursor_pos"(rx105_pos) - $P10 = rx105_cur."quantifier"() - unless $P10, rx105_fail - rx105_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("quantifier") - rx105_pos = $P10."pos"() - goto alt111_end - alt111_1: - # rx subrule "before" subtype=zerowidth negate= - rx105_cur."!cursor_pos"(rx105_pos) - .const 'Sub' $P113 = "32_1282016522.91354" - capture_lex $P113 - $P10 = rx105_cur."before"($P113) - unless $P10, rx105_fail - # rx subrule "backmod" subtype=capture negate= - rx105_cur."!cursor_pos"(rx105_pos) - $P10 = rx105_cur."backmod"() - unless $P10, rx105_fail - rx105_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("backmod") - rx105_pos = $P10."pos"() - # rx subrule "alpha" subtype=zerowidth negate=1 - rx105_cur."!cursor_pos"(rx105_pos) - $P10 = rx105_cur."alpha"() - if $P10, rx105_fail - alt111_end: - set_addr $I10, rxquantr110_done - (rx105_rep) = rx105_cur."!mark_commit"($I10) - rxquantr110_done: -.annotate 'line', 42 - # rx pass - rx105_cur."!cursor_pass"(rx105_pos, "quantified_atom") - if_null rx105_debug, debug_205 - rx105_cur."!cursor_debug"("PASS ", "quantified_atom", " at pos=", rx105_pos) - debug_205: - .return (rx105_cur) - rx105_restart: + ne $I10, -1, rxscan110_done + goto rxscan110_scan + rxscan110_loop: + ($P10) = rx107_cur."from"() + inc $P10 + set rx107_pos, $P10 + ge rx107_pos, rx107_eos, rxscan110_done + rxscan110_scan: + 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) + rxquantr111_loop: + # rx subrule "quantified_atom" subtype=capture negate= + rx107_cur."!cursor_pos"(rx107_pos) + $P10 = rx107_cur."quantified_atom"() + unless $P10, rx107_fail + goto rxsubrule112_pass + rxsubrule112_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx107_fail + rxsubrule112_pass: + set_addr $I10, rxsubrule112_back + rx107_cur."!mark_push"(0, rx107_pos, $I10, $P10) + $P10."!cursor_names"("noun") + rx107_pos = $P10."pos"() + set_addr $I10, rxquantr111_done + (rx107_rep) = rx107_cur."!mark_commit"($I10) + set_addr $I10, rxquantr111_done + 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_214 + rx107_cur."!cursor_debug"("PASS", "termish", " at pos=", rx107_pos) + debug_214: + .return (rx107_cur) + rx107_restart: .annotate 'line', 3 - if_null rx105_debug, debug_206 - rx105_cur."!cursor_debug"("NEXT ", "quantified_atom") - debug_206: - rx105_fail: - (rx105_rep, rx105_pos, $I10, $P10) = rx105_cur."!mark_fail"(0) - lt rx105_pos, -1, rx105_done - eq rx105_pos, -1, rx105_fail - jump $I10 - rx105_done: - rx105_cur."!cursor_fail"() - if_null rx105_debug, debug_207 - rx105_cur."!cursor_debug"("FAIL ", "quantified_atom") - debug_207: - .return (rx105_cur) + if_null rx107_debug, debug_215 + rx107_cur."!cursor_debug"("NEXT", "termish") + debug_215: + rx107_fail: + (rx107_rep, rx107_pos, $I10, $P10) = rx107_cur."!mark_fail"(0) + lt rx107_pos, -1, rx107_done + eq rx107_pos, -1, rx107_fail + jump $I10 + rx107_done: + rx107_cur."!cursor_fail"() + if_null rx107_debug, debug_216 + rx107_cur."!cursor_debug"("FAIL", "termish") + debug_216: + .return (rx107_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantified_atom" :subid("31_1282016522.91354") :method +.sub "!PREFIX__termish" :subid("31_1284728471.30547") :method .annotate 'line', 3 - $P107 = self."!PREFIX__!subrule"("atom", "") - new $P108, "ResizablePMCArray" - push $P108, $P107 - .return ($P108) + new $P109, "ResizablePMCArray" + push $P109, "" + .return ($P109) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block112" :anon :subid("32_1282016522.91354") :method :outer("30_1282016522.91354") -.annotate 'line', 43 +.sub "quantified_atom" :subid("32_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .const 'Sub' $P122 = "34_1284728471.30547" + capture_lex $P122 .local string rx114_tgt .local int rx114_pos .local int rx114_off @@ -1415,6 +1431,7 @@ .local pmc rx114_cur .local pmc rx114_debug (rx114_cur, rx114_pos, rx114_tgt, $I10) = self."!cursor_start"() + rx114_cur."!cursor_caparray"("quantifier", "backmod") getattribute rx114_debug, rx114_cur, "$!debug" .lex unicode:"$\x{a2}", rx114_cur .local pmc match @@ -1427,38 +1444,83 @@ substr rx114_tgt, rx114_tgt, rx114_off rx114_start: eq $I10, 1, rx114_restart - if_null rx114_debug, debug_201 - rx114_cur."!cursor_debug"("START ", "") - debug_201: + if_null rx114_debug, debug_217 + rx114_cur."!cursor_debug"("START", "quantified_atom") + debug_217: $I10 = self.'from'() - ne $I10, -1, rxscan115_done - goto rxscan115_scan - rxscan115_loop: + ne $I10, -1, rxscan118_done + goto rxscan118_scan + rxscan118_loop: ($P10) = rx114_cur."from"() inc $P10 set rx114_pos, $P10 - ge rx114_pos, rx114_eos, rxscan115_done - rxscan115_scan: - set_addr $I10, rxscan115_loop + ge rx114_pos, rx114_eos, rxscan118_done + rxscan118_scan: + set_addr $I10, rxscan118_loop rx114_cur."!mark_push"(0, rx114_pos, $I10) - rxscan115_done: - # rx literal ":" - add $I11, rx114_pos, 1 - gt $I11, rx114_eos, rx114_fail - sub $I11, rx114_pos, rx114_off - ord $I11, rx114_tgt, $I11 - ne $I11, 58, rx114_fail - add rx114_pos, 1 - # rx pass - rx114_cur."!cursor_pass"(rx114_pos, "") - if_null rx114_debug, debug_202 - rx114_cur."!cursor_debug"("PASS ", "", " at pos=", rx114_pos) - debug_202: + rxscan118_done: +.annotate 'line', 50 + # rx subrule "atom" subtype=capture negate= + rx114_cur."!cursor_pos"(rx114_pos) + $P10 = rx114_cur."atom"() + unless $P10, rx114_fail + rx114_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("atom") + rx114_pos = $P10."pos"() + # rx rxquantr119 ** 0..1 + set_addr $I10, rxquantr119_done + rx114_cur."!mark_push"(0, rx114_pos, $I10) + rxquantr119_loop: + # rx subrule "ws" subtype=method negate= + rx114_cur."!cursor_pos"(rx114_pos) + $P10 = rx114_cur."ws"() + unless $P10, rx114_fail + rx114_pos = $P10."pos"() + alt120_0: + set_addr $I10, alt120_1 + rx114_cur."!mark_push"(0, rx114_pos, $I10) + # rx subrule "quantifier" subtype=capture negate= + rx114_cur."!cursor_pos"(rx114_pos) + $P10 = rx114_cur."quantifier"() + unless $P10, rx114_fail + rx114_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quantifier") + rx114_pos = $P10."pos"() + goto alt120_end + alt120_1: + # rx subrule "before" subtype=zerowidth negate= + rx114_cur."!cursor_pos"(rx114_pos) + .const 'Sub' $P122 = "34_1284728471.30547" + capture_lex $P122 + $P10 = rx114_cur."before"($P122) + unless $P10, rx114_fail + # rx subrule "backmod" subtype=capture negate= + rx114_cur."!cursor_pos"(rx114_pos) + $P10 = rx114_cur."backmod"() + unless $P10, rx114_fail + rx114_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("backmod") + rx114_pos = $P10."pos"() + # rx subrule "alpha" subtype=zerowidth negate=1 + rx114_cur."!cursor_pos"(rx114_pos) + $P10 = rx114_cur."alpha"() + if $P10, rx114_fail + alt120_end: + 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_222 + rx114_cur."!cursor_debug"("PASS", "quantified_atom", " at pos=", rx114_pos) + debug_222: .return (rx114_cur) rx114_restart: - if_null rx114_debug, debug_203 - rx114_cur."!cursor_debug"("NEXT ", "") - debug_203: +.annotate 'line', 3 + if_null rx114_debug, debug_223 + rx114_cur."!cursor_debug"("NEXT", "quantified_atom") + debug_223: rx114_fail: (rx114_rep, rx114_pos, $I10, $P10) = rx114_cur."!mark_fail"(0) lt rx114_pos, -1, rx114_done @@ -1466,6966 +1528,7584 @@ jump $I10 rx114_done: rx114_cur."!cursor_fail"() - if_null rx114_debug, debug_204 - rx114_cur."!cursor_debug"("FAIL ", "") - debug_204: + if_null rx114_debug, debug_224 + rx114_cur."!cursor_debug"("FAIL", "quantified_atom") + debug_224: .return (rx114_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "atom" :subid("33_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "!PREFIX__quantified_atom" :subid("33_1284728471.30547") :method .annotate 'line', 3 - .const 'Sub' $P126 = "35_1282016522.91354" - capture_lex $P126 - .local string rx117_tgt - .local int rx117_pos - .local int rx117_off - .local int rx117_eos - .local int rx117_rep - .local pmc rx117_cur - .local pmc rx117_debug - (rx117_cur, rx117_pos, rx117_tgt, $I10) = self."!cursor_start"() - getattribute rx117_debug, rx117_cur, "$!debug" - .lex unicode:"$\x{a2}", rx117_cur - .local pmc match - .lex "$/", match - length rx117_eos, rx117_tgt - gt rx117_pos, rx117_eos, rx117_done - set rx117_off, 0 - lt rx117_pos, 2, rx117_start - sub rx117_off, rx117_pos, 1 - substr rx117_tgt, rx117_tgt, rx117_off - rx117_start: - eq $I10, 1, rx117_restart - if_null rx117_debug, debug_208 - rx117_cur."!cursor_debug"("START ", "atom") - debug_208: + $P116 = self."!PREFIX__!subrule"("atom", "") + new $P117, "ResizablePMCArray" + push $P117, $P116 + .return ($P117) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block121" :anon :subid("34_1284728471.30547") :method :outer("32_1284728471.30547") +.annotate 'line', 50 + .local string rx123_tgt + .local int rx123_pos + .local int rx123_off + .local int rx123_eos + .local int rx123_rep + .local pmc rx123_cur + .local pmc rx123_debug + (rx123_cur, rx123_pos, rx123_tgt, $I10) = self."!cursor_start"() + getattribute rx123_debug, rx123_cur, "$!debug" + .lex unicode:"$\x{a2}", rx123_cur + .local pmc match + .lex "$/", match + length rx123_eos, rx123_tgt + gt rx123_pos, rx123_eos, rx123_done + set rx123_off, 0 + lt rx123_pos, 2, rx123_start + sub rx123_off, rx123_pos, 1 + substr rx123_tgt, rx123_tgt, rx123_off + rx123_start: + eq $I10, 1, rx123_restart + if_null rx123_debug, debug_218 + rx123_cur."!cursor_debug"("START", "") + debug_218: $I10 = self.'from'() - ne $I10, -1, rxscan121_done - goto rxscan121_scan - rxscan121_loop: - ($P10) = rx117_cur."from"() - inc $P10 - set rx117_pos, $P10 - ge rx117_pos, rx117_eos, rxscan121_done - rxscan121_scan: - set_addr $I10, rxscan121_loop - rx117_cur."!mark_push"(0, rx117_pos, $I10) - rxscan121_done: - alt122_0: -.annotate 'line', 48 - set_addr $I10, alt122_1 - rx117_cur."!mark_push"(0, rx117_pos, $I10) -.annotate 'line', 49 + ne $I10, -1, rxscan124_done + goto rxscan124_scan + rxscan124_loop: + ($P10) = rx123_cur."from"() + inc $P10 + set rx123_pos, $P10 + ge rx123_pos, rx123_eos, rxscan124_done + rxscan124_scan: + set_addr $I10, rxscan124_loop + rx123_cur."!mark_push"(0, rx123_pos, $I10) + rxscan124_done: + # rx literal ":" + add $I11, rx123_pos, 1 + gt $I11, rx123_eos, rx123_fail + sub $I11, rx123_pos, rx123_off + ord $I11, rx123_tgt, $I11 + ne $I11, 58, rx123_fail + add rx123_pos, 1 + # rx pass + rx123_cur."!cursor_pass"(rx123_pos, "") + if_null rx123_debug, debug_219 + rx123_cur."!cursor_debug"("PASS", "", " at pos=", rx123_pos) + debug_219: + .return (rx123_cur) + rx123_restart: + if_null rx123_debug, debug_220 + rx123_cur."!cursor_debug"("NEXT", "") + debug_220: + rx123_fail: + (rx123_rep, rx123_pos, $I10, $P10) = rx123_cur."!mark_fail"(0) + lt rx123_pos, -1, rx123_done + eq rx123_pos, -1, rx123_fail + jump $I10 + rx123_done: + rx123_cur."!cursor_fail"() + if_null rx123_debug, debug_221 + rx123_cur."!cursor_debug"("FAIL", "") + debug_221: + .return (rx123_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "atom" :subid("35_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .const 'Sub' $P135 = "37_1284728471.30547" + capture_lex $P135 + .local string rx126_tgt + .local int rx126_pos + .local int rx126_off + .local int rx126_eos + .local int rx126_rep + .local pmc rx126_cur + .local pmc rx126_debug + (rx126_cur, rx126_pos, rx126_tgt, $I10) = self."!cursor_start"() + getattribute rx126_debug, rx126_cur, "$!debug" + .lex unicode:"$\x{a2}", rx126_cur + .local pmc match + .lex "$/", match + length rx126_eos, rx126_tgt + gt rx126_pos, rx126_eos, rx126_done + set rx126_off, 0 + lt rx126_pos, 2, rx126_start + sub rx126_off, rx126_pos, 1 + substr rx126_tgt, rx126_tgt, rx126_off + rx126_start: + eq $I10, 1, rx126_restart + if_null rx126_debug, debug_225 + rx126_cur."!cursor_debug"("START", "atom") + debug_225: + $I10 = self.'from'() + ne $I10, -1, rxscan130_done + goto rxscan130_scan + rxscan130_loop: + ($P10) = rx126_cur."from"() + inc $P10 + set rx126_pos, $P10 + ge rx126_pos, rx126_eos, rxscan130_done + rxscan130_scan: + set_addr $I10, rxscan130_loop + 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 rx117_pos, rx117_eos, rx117_fail - sub $I10, rx117_pos, rx117_off - is_cclass $I11, 8192, rx117_tgt, $I10 - unless $I11, rx117_fail - inc rx117_pos - # rx rxquantr123 ** 0..1 - set_addr $I10, rxquantr123_done - rx117_cur."!mark_push"(0, rx117_pos, $I10) - rxquantr123_loop: - # rx rxquantg124 ** 1..* - rxquantg124_loop: + ge rx126_pos, rx126_eos, rx126_fail + sub $I10, rx126_pos, rx126_off + is_cclass $I11, 8192, rx126_tgt, $I10 + unless $I11, rx126_fail + inc rx126_pos + # rx rxquantr132 ** 0..1 + set_addr $I10, rxquantr132_done + rx126_cur."!mark_push"(0, rx126_pos, $I10) + rxquantr132_loop: + # rx rxquantg133 ** 1..* + rxquantg133_loop: # rx charclass w - ge rx117_pos, rx117_eos, rx117_fail - sub $I10, rx117_pos, rx117_off - is_cclass $I11, 8192, rx117_tgt, $I10 - unless $I11, rx117_fail - inc rx117_pos - set_addr $I10, rxquantg124_done - rx117_cur."!mark_push"(rx117_rep, rx117_pos, $I10) - goto rxquantg124_loop - rxquantg124_done: + ge rx126_pos, rx126_eos, rx126_fail + sub $I10, rx126_pos, rx126_off + is_cclass $I11, 8192, rx126_tgt, $I10 + unless $I11, rx126_fail + inc rx126_pos + set_addr $I10, rxquantg133_done + rx126_cur."!mark_push"(rx126_rep, rx126_pos, $I10) + goto rxquantg133_loop + rxquantg133_done: # rx subrule "before" subtype=zerowidth negate= - rx117_cur."!cursor_pos"(rx117_pos) - .const 'Sub' $P126 = "35_1282016522.91354" - capture_lex $P126 - $P10 = rx117_cur."before"($P126) - unless $P10, rx117_fail - set_addr $I10, rxquantr123_done - (rx117_rep) = rx117_cur."!mark_commit"($I10) - rxquantr123_done: - goto alt122_end - alt122_1: -.annotate 'line', 50 + rx126_cur."!cursor_pos"(rx126_pos) + .const 'Sub' $P135 = "37_1284728471.30547" + capture_lex $P135 + $P10 = rx126_cur."before"($P135) + unless $P10, rx126_fail + set_addr $I10, rxquantr132_done + (rx126_rep) = rx126_cur."!mark_commit"($I10) + rxquantr132_done: + goto alt131_end + alt131_1: +.annotate 'line', 57 # rx subrule "metachar" subtype=capture negate= - rx117_cur."!cursor_pos"(rx117_pos) - $P10 = rx117_cur."metachar"() - unless $P10, rx117_fail - rx117_cur."!mark_push"(0, -1, 0, $P10) + rx126_cur."!cursor_pos"(rx126_pos) + $P10 = rx126_cur."metachar"() + unless $P10, rx126_fail + rx126_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("metachar") - rx117_pos = $P10."pos"() - alt122_end: -.annotate 'line', 46 + rx126_pos = $P10."pos"() + alt131_end: +.annotate 'line', 53 # rx pass - rx117_cur."!cursor_pass"(rx117_pos, "atom") - if_null rx117_debug, debug_213 - rx117_cur."!cursor_debug"("PASS ", "atom", " at pos=", rx117_pos) - debug_213: - .return (rx117_cur) - rx117_restart: + rx126_cur."!cursor_pass"(rx126_pos, "atom") + if_null rx126_debug, debug_230 + rx126_cur."!cursor_debug"("PASS", "atom", " at pos=", rx126_pos) + debug_230: + .return (rx126_cur) + rx126_restart: .annotate 'line', 3 - if_null rx117_debug, debug_214 - rx117_cur."!cursor_debug"("NEXT ", "atom") - debug_214: - rx117_fail: - (rx117_rep, rx117_pos, $I10, $P10) = rx117_cur."!mark_fail"(0) - lt rx117_pos, -1, rx117_done - eq rx117_pos, -1, rx117_fail - jump $I10 - rx117_done: - rx117_cur."!cursor_fail"() - if_null rx117_debug, debug_215 - rx117_cur."!cursor_debug"("FAIL ", "atom") - debug_215: - .return (rx117_cur) + if_null rx126_debug, debug_231 + rx126_cur."!cursor_debug"("NEXT", "atom") + debug_231: + rx126_fail: + (rx126_rep, rx126_pos, $I10, $P10) = rx126_cur."!mark_fail"(0) + lt rx126_pos, -1, rx126_done + eq rx126_pos, -1, rx126_fail + jump $I10 + rx126_done: + rx126_cur."!cursor_fail"() + if_null rx126_debug, debug_232 + rx126_cur."!cursor_debug"("FAIL", "atom") + debug_232: + .return (rx126_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__atom" :subid("34_1282016522.91354") :method +.sub "!PREFIX__atom" :subid("36_1284728471.30547") :method .annotate 'line', 3 - $P119 = self."!PREFIX__!subrule"("metachar", "") - new $P120, "ResizablePMCArray" - push $P120, $P119 - push $P120, "" - .return ($P120) + $P128 = self."!PREFIX__!subrule"("metachar", "") + new $P129, "ResizablePMCArray" + push $P129, $P128 + push $P129, "" + .return ($P129) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block125" :anon :subid("35_1282016522.91354") :method :outer("33_1282016522.91354") -.annotate 'line', 49 - .local string rx127_tgt - .local int rx127_pos - .local int rx127_off - .local int rx127_eos - .local int rx127_rep - .local pmc rx127_cur - .local pmc rx127_debug - (rx127_cur, rx127_pos, rx127_tgt, $I10) = self."!cursor_start"() - getattribute rx127_debug, rx127_cur, "$!debug" - .lex unicode:"$\x{a2}", rx127_cur - .local pmc match - .lex "$/", match - length rx127_eos, rx127_tgt - gt rx127_pos, rx127_eos, rx127_done - set rx127_off, 0 - lt rx127_pos, 2, rx127_start - sub rx127_off, rx127_pos, 1 - substr rx127_tgt, rx127_tgt, rx127_off - rx127_start: - eq $I10, 1, rx127_restart - if_null rx127_debug, debug_209 - rx127_cur."!cursor_debug"("START ", "") - debug_209: +.sub "_block134" :anon :subid("37_1284728471.30547") :method :outer("35_1284728471.30547") +.annotate 'line', 56 + .local string rx136_tgt + .local int rx136_pos + .local int rx136_off + .local int rx136_eos + .local int rx136_rep + .local pmc rx136_cur + .local pmc rx136_debug + (rx136_cur, rx136_pos, rx136_tgt, $I10) = self."!cursor_start"() + getattribute rx136_debug, rx136_cur, "$!debug" + .lex unicode:"$\x{a2}", rx136_cur + .local pmc match + .lex "$/", match + length rx136_eos, rx136_tgt + gt rx136_pos, rx136_eos, rx136_done + set rx136_off, 0 + lt rx136_pos, 2, rx136_start + sub rx136_off, rx136_pos, 1 + substr rx136_tgt, rx136_tgt, rx136_off + rx136_start: + eq $I10, 1, rx136_restart + if_null rx136_debug, debug_226 + rx136_cur."!cursor_debug"("START", "") + debug_226: $I10 = self.'from'() - ne $I10, -1, rxscan128_done - goto rxscan128_scan - rxscan128_loop: - ($P10) = rx127_cur."from"() - inc $P10 - set rx127_pos, $P10 - ge rx127_pos, rx127_eos, rxscan128_done - rxscan128_scan: - set_addr $I10, rxscan128_loop - rx127_cur."!mark_push"(0, rx127_pos, $I10) - rxscan128_done: + ne $I10, -1, rxscan137_done + goto rxscan137_scan + rxscan137_loop: + ($P10) = rx136_cur."from"() + inc $P10 + set rx136_pos, $P10 + ge rx136_pos, rx136_eos, rxscan137_done + rxscan137_scan: + set_addr $I10, rxscan137_loop + rx136_cur."!mark_push"(0, rx136_pos, $I10) + rxscan137_done: # rx charclass w - ge rx127_pos, rx127_eos, rx127_fail - sub $I10, rx127_pos, rx127_off - is_cclass $I11, 8192, rx127_tgt, $I10 - unless $I11, rx127_fail - inc rx127_pos - # rx pass - rx127_cur."!cursor_pass"(rx127_pos, "") - if_null rx127_debug, debug_210 - rx127_cur."!cursor_debug"("PASS ", "", " at pos=", rx127_pos) - debug_210: - .return (rx127_cur) - rx127_restart: - if_null rx127_debug, debug_211 - rx127_cur."!cursor_debug"("NEXT ", "") - debug_211: - rx127_fail: - (rx127_rep, rx127_pos, $I10, $P10) = rx127_cur."!mark_fail"(0) - lt rx127_pos, -1, rx127_done - eq rx127_pos, -1, rx127_fail - jump $I10 - rx127_done: - rx127_cur."!cursor_fail"() - if_null rx127_debug, debug_212 - rx127_cur."!cursor_debug"("FAIL ", "") - debug_212: - .return (rx127_cur) + ge rx136_pos, rx136_eos, rx136_fail + sub $I10, rx136_pos, rx136_off + is_cclass $I11, 8192, rx136_tgt, $I10 + unless $I11, rx136_fail + inc rx136_pos + # rx pass + rx136_cur."!cursor_pass"(rx136_pos, "") + if_null rx136_debug, debug_227 + rx136_cur."!cursor_debug"("PASS", "", " at pos=", rx136_pos) + debug_227: + .return (rx136_cur) + rx136_restart: + if_null rx136_debug, debug_228 + rx136_cur."!cursor_debug"("NEXT", "") + debug_228: + rx136_fail: + (rx136_rep, rx136_pos, $I10, $P10) = rx136_cur."!mark_fail"(0) + lt rx136_pos, -1, rx136_done + eq rx136_pos, -1, rx136_fail + jump $I10 + rx136_done: + rx136_cur."!cursor_fail"() + if_null rx136_debug, debug_229 + rx136_cur."!cursor_debug"("FAIL", "") + debug_229: + .return (rx136_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantifier" :subid("36_1282016522.91354") :method -.annotate 'line', 54 - $P130 = self."!protoregex"("quantifier") - .return ($P130) +.sub "quantifier" :subid("38_1284728471.30547") :method +.annotate 'line', 61 + $P139 = self."!protoregex"("quantifier") + .return ($P139) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantifier" :subid("37_1282016522.91354") :method -.annotate 'line', 54 - $P132 = self."!PREFIX__!protoregex"("quantifier") - .return ($P132) +.sub "!PREFIX__quantifier" :subid("39_1284728471.30547") :method +.annotate 'line', 61 + $P141 = self."!PREFIX__!protoregex"("quantifier") + .return ($P141) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantifier:sym<*>" :subid("38_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "quantifier:sym<*>" :subid("40_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx134_tgt - .local int rx134_pos - .local int rx134_off - .local int rx134_eos - .local int rx134_rep - .local pmc rx134_cur - .local pmc rx134_debug - (rx134_cur, rx134_pos, rx134_tgt, $I10) = self."!cursor_start"() - getattribute rx134_debug, rx134_cur, "$!debug" - .lex unicode:"$\x{a2}", rx134_cur - .local pmc match - .lex "$/", match - length rx134_eos, rx134_tgt - gt rx134_pos, rx134_eos, rx134_done - set rx134_off, 0 - lt rx134_pos, 2, rx134_start - sub rx134_off, rx134_pos, 1 - substr rx134_tgt, rx134_tgt, rx134_off - rx134_start: - eq $I10, 1, rx134_restart - if_null rx134_debug, debug_216 - rx134_cur."!cursor_debug"("START ", "quantifier:sym<*>") - debug_216: + .local string rx143_tgt + .local int rx143_pos + .local int rx143_off + .local int rx143_eos + .local int rx143_rep + .local pmc rx143_cur + .local pmc rx143_debug + (rx143_cur, rx143_pos, rx143_tgt, $I10) = self."!cursor_start"() + getattribute rx143_debug, rx143_cur, "$!debug" + .lex unicode:"$\x{a2}", rx143_cur + .local pmc match + .lex "$/", match + length rx143_eos, rx143_tgt + gt rx143_pos, rx143_eos, rx143_done + set rx143_off, 0 + lt rx143_pos, 2, rx143_start + sub rx143_off, rx143_pos, 1 + substr rx143_tgt, rx143_tgt, rx143_off + rx143_start: + eq $I10, 1, rx143_restart + if_null rx143_debug, debug_233 + rx143_cur."!cursor_debug"("START", "quantifier:sym<*>") + debug_233: $I10 = self.'from'() - ne $I10, -1, rxscan138_done - goto rxscan138_scan - rxscan138_loop: - ($P10) = rx134_cur."from"() - inc $P10 - set rx134_pos, $P10 - ge rx134_pos, rx134_eos, rxscan138_done - rxscan138_scan: - set_addr $I10, rxscan138_loop - rx134_cur."!mark_push"(0, rx134_pos, $I10) - rxscan138_done: -.annotate 'line', 55 + ne $I10, -1, rxscan147_done + goto rxscan147_scan + rxscan147_loop: + ($P10) = rx143_cur."from"() + inc $P10 + set rx143_pos, $P10 + ge rx143_pos, rx143_eos, rxscan147_done + rxscan147_scan: + 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_139_fail - rx134_cur."!mark_push"(0, rx134_pos, $I10) + set_addr $I10, rxcap_148_fail + rx143_cur."!mark_push"(0, rx143_pos, $I10) # rx literal "*" - add $I11, rx134_pos, 1 - gt $I11, rx134_eos, rx134_fail - sub $I11, rx134_pos, rx134_off - ord $I11, rx134_tgt, $I11 - ne $I11, 42, rx134_fail - add rx134_pos, 1 - set_addr $I10, rxcap_139_fail - ($I12, $I11) = rx134_cur."!mark_peek"($I10) - rx134_cur."!cursor_pos"($I11) - ($P10) = rx134_cur."!cursor_start"() - $P10."!cursor_pass"(rx134_pos, "") - rx134_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx143_pos, 1 + gt $I11, rx143_eos, rx143_fail + sub $I11, rx143_pos, rx143_off + ord $I11, rx143_tgt, $I11 + ne $I11, 42, rx143_fail + add rx143_pos, 1 + set_addr $I10, rxcap_148_fail + ($I12, $I11) = rx143_cur."!mark_peek"($I10) + rx143_cur."!cursor_pos"($I11) + ($P10) = rx143_cur."!cursor_start"() + $P10."!cursor_pass"(rx143_pos, "") + rx143_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_139_done - rxcap_139_fail: - goto rx134_fail - rxcap_139_done: + goto rxcap_148_done + rxcap_148_fail: + goto rx143_fail + rxcap_148_done: # rx subrule "backmod" subtype=capture negate= - rx134_cur."!cursor_pos"(rx134_pos) - $P10 = rx134_cur."backmod"() - unless $P10, rx134_fail - rx134_cur."!mark_push"(0, -1, 0, $P10) + rx143_cur."!cursor_pos"(rx143_pos) + $P10 = rx143_cur."backmod"() + unless $P10, rx143_fail + rx143_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("backmod") - rx134_pos = $P10."pos"() + rx143_pos = $P10."pos"() # rx pass - rx134_cur."!cursor_pass"(rx134_pos, "quantifier:sym<*>") - if_null rx134_debug, debug_217 - rx134_cur."!cursor_debug"("PASS ", "quantifier:sym<*>", " at pos=", rx134_pos) - debug_217: - .return (rx134_cur) - rx134_restart: + rx143_cur."!cursor_pass"(rx143_pos, "quantifier:sym<*>") + if_null rx143_debug, debug_234 + rx143_cur."!cursor_debug"("PASS", "quantifier:sym<*>", " at pos=", rx143_pos) + debug_234: + .return (rx143_cur) + rx143_restart: .annotate 'line', 3 - if_null rx134_debug, debug_218 - rx134_cur."!cursor_debug"("NEXT ", "quantifier:sym<*>") - debug_218: - rx134_fail: - (rx134_rep, rx134_pos, $I10, $P10) = rx134_cur."!mark_fail"(0) - lt rx134_pos, -1, rx134_done - eq rx134_pos, -1, rx134_fail - jump $I10 - rx134_done: - rx134_cur."!cursor_fail"() - if_null rx134_debug, debug_219 - rx134_cur."!cursor_debug"("FAIL ", "quantifier:sym<*>") - debug_219: - .return (rx134_cur) + if_null rx143_debug, debug_235 + rx143_cur."!cursor_debug"("NEXT", "quantifier:sym<*>") + debug_235: + rx143_fail: + (rx143_rep, rx143_pos, $I10, $P10) = rx143_cur."!mark_fail"(0) + lt rx143_pos, -1, rx143_done + eq rx143_pos, -1, rx143_fail + jump $I10 + rx143_done: + rx143_cur."!cursor_fail"() + if_null rx143_debug, debug_236 + rx143_cur."!cursor_debug"("FAIL", "quantifier:sym<*>") + debug_236: + .return (rx143_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantifier:sym<*>" :subid("39_1282016522.91354") :method +.sub "!PREFIX__quantifier:sym<*>" :subid("41_1284728471.30547") :method .annotate 'line', 3 - $P136 = self."!PREFIX__!subrule"("backmod", "*") - new $P137, "ResizablePMCArray" - push $P137, $P136 - .return ($P137) + $P145 = self."!PREFIX__!subrule"("backmod", "*") + new $P146, "ResizablePMCArray" + push $P146, $P145 + .return ($P146) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantifier:sym<+>" :subid("40_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "quantifier:sym<+>" :subid("42_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx141_tgt - .local int rx141_pos - .local int rx141_off - .local int rx141_eos - .local int rx141_rep - .local pmc rx141_cur - .local pmc rx141_debug - (rx141_cur, rx141_pos, rx141_tgt, $I10) = self."!cursor_start"() - getattribute rx141_debug, rx141_cur, "$!debug" - .lex unicode:"$\x{a2}", rx141_cur + .local string rx150_tgt + .local int rx150_pos + .local int rx150_off + .local int rx150_eos + .local int rx150_rep + .local pmc rx150_cur + .local pmc rx150_debug + (rx150_cur, rx150_pos, rx150_tgt, $I10) = self."!cursor_start"() + getattribute rx150_debug, rx150_cur, "$!debug" + .lex unicode:"$\x{a2}", rx150_cur .local pmc match .lex "$/", match - length rx141_eos, rx141_tgt - gt rx141_pos, rx141_eos, rx141_done - set rx141_off, 0 - lt rx141_pos, 2, rx141_start - sub rx141_off, rx141_pos, 1 - substr rx141_tgt, rx141_tgt, rx141_off - rx141_start: - eq $I10, 1, rx141_restart - if_null rx141_debug, debug_220 - rx141_cur."!cursor_debug"("START ", "quantifier:sym<+>") - debug_220: + length rx150_eos, rx150_tgt + gt rx150_pos, rx150_eos, rx150_done + set rx150_off, 0 + lt rx150_pos, 2, rx150_start + sub rx150_off, rx150_pos, 1 + substr rx150_tgt, rx150_tgt, rx150_off + rx150_start: + eq $I10, 1, rx150_restart + if_null rx150_debug, debug_237 + rx150_cur."!cursor_debug"("START", "quantifier:sym<+>") + debug_237: $I10 = self.'from'() - ne $I10, -1, rxscan145_done - goto rxscan145_scan - rxscan145_loop: - ($P10) = rx141_cur."from"() - inc $P10 - set rx141_pos, $P10 - ge rx141_pos, rx141_eos, rxscan145_done - rxscan145_scan: - set_addr $I10, rxscan145_loop - rx141_cur."!mark_push"(0, rx141_pos, $I10) - rxscan145_done: -.annotate 'line', 56 + ne $I10, -1, rxscan154_done + goto rxscan154_scan + rxscan154_loop: + ($P10) = rx150_cur."from"() + inc $P10 + set rx150_pos, $P10 + ge rx150_pos, rx150_eos, rxscan154_done + rxscan154_scan: + 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_146_fail - rx141_cur."!mark_push"(0, rx141_pos, $I10) + set_addr $I10, rxcap_155_fail + rx150_cur."!mark_push"(0, rx150_pos, $I10) # rx literal "+" - add $I11, rx141_pos, 1 - gt $I11, rx141_eos, rx141_fail - sub $I11, rx141_pos, rx141_off - ord $I11, rx141_tgt, $I11 - ne $I11, 43, rx141_fail - add rx141_pos, 1 - set_addr $I10, rxcap_146_fail - ($I12, $I11) = rx141_cur."!mark_peek"($I10) - rx141_cur."!cursor_pos"($I11) - ($P10) = rx141_cur."!cursor_start"() - $P10."!cursor_pass"(rx141_pos, "") - rx141_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx150_pos, 1 + gt $I11, rx150_eos, rx150_fail + sub $I11, rx150_pos, rx150_off + ord $I11, rx150_tgt, $I11 + ne $I11, 43, rx150_fail + add rx150_pos, 1 + set_addr $I10, rxcap_155_fail + ($I12, $I11) = rx150_cur."!mark_peek"($I10) + rx150_cur."!cursor_pos"($I11) + ($P10) = rx150_cur."!cursor_start"() + $P10."!cursor_pass"(rx150_pos, "") + rx150_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_146_done - rxcap_146_fail: - goto rx141_fail - rxcap_146_done: + goto rxcap_155_done + rxcap_155_fail: + goto rx150_fail + rxcap_155_done: # rx subrule "backmod" subtype=capture negate= - rx141_cur."!cursor_pos"(rx141_pos) - $P10 = rx141_cur."backmod"() - unless $P10, rx141_fail - rx141_cur."!mark_push"(0, -1, 0, $P10) + rx150_cur."!cursor_pos"(rx150_pos) + $P10 = rx150_cur."backmod"() + unless $P10, rx150_fail + rx150_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("backmod") - rx141_pos = $P10."pos"() + rx150_pos = $P10."pos"() # rx pass - rx141_cur."!cursor_pass"(rx141_pos, "quantifier:sym<+>") - if_null rx141_debug, debug_221 - rx141_cur."!cursor_debug"("PASS ", "quantifier:sym<+>", " at pos=", rx141_pos) - debug_221: - .return (rx141_cur) - rx141_restart: + rx150_cur."!cursor_pass"(rx150_pos, "quantifier:sym<+>") + if_null rx150_debug, debug_238 + rx150_cur."!cursor_debug"("PASS", "quantifier:sym<+>", " at pos=", rx150_pos) + debug_238: + .return (rx150_cur) + rx150_restart: .annotate 'line', 3 - if_null rx141_debug, debug_222 - rx141_cur."!cursor_debug"("NEXT ", "quantifier:sym<+>") - debug_222: - rx141_fail: - (rx141_rep, rx141_pos, $I10, $P10) = rx141_cur."!mark_fail"(0) - lt rx141_pos, -1, rx141_done - eq rx141_pos, -1, rx141_fail - jump $I10 - rx141_done: - rx141_cur."!cursor_fail"() - if_null rx141_debug, debug_223 - rx141_cur."!cursor_debug"("FAIL ", "quantifier:sym<+>") - debug_223: - .return (rx141_cur) + if_null rx150_debug, debug_239 + rx150_cur."!cursor_debug"("NEXT", "quantifier:sym<+>") + debug_239: + rx150_fail: + (rx150_rep, rx150_pos, $I10, $P10) = rx150_cur."!mark_fail"(0) + lt rx150_pos, -1, rx150_done + eq rx150_pos, -1, rx150_fail + jump $I10 + rx150_done: + rx150_cur."!cursor_fail"() + if_null rx150_debug, debug_240 + rx150_cur."!cursor_debug"("FAIL", "quantifier:sym<+>") + debug_240: + .return (rx150_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantifier:sym<+>" :subid("41_1282016522.91354") :method +.sub "!PREFIX__quantifier:sym<+>" :subid("43_1284728471.30547") :method .annotate 'line', 3 - $P143 = self."!PREFIX__!subrule"("backmod", "+") - new $P144, "ResizablePMCArray" - push $P144, $P143 - .return ($P144) + $P152 = self."!PREFIX__!subrule"("backmod", "+") + new $P153, "ResizablePMCArray" + push $P153, $P152 + .return ($P153) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantifier:sym" :subid("42_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "quantifier:sym" :subid("44_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx148_tgt - .local int rx148_pos - .local int rx148_off - .local int rx148_eos - .local int rx148_rep - .local pmc rx148_cur - .local pmc rx148_debug - (rx148_cur, rx148_pos, rx148_tgt, $I10) = self."!cursor_start"() - getattribute rx148_debug, rx148_cur, "$!debug" - .lex unicode:"$\x{a2}", rx148_cur + .local string rx157_tgt + .local int rx157_pos + .local int rx157_off + .local int rx157_eos + .local int rx157_rep + .local pmc rx157_cur + .local pmc rx157_debug + (rx157_cur, rx157_pos, rx157_tgt, $I10) = self."!cursor_start"() + getattribute rx157_debug, rx157_cur, "$!debug" + .lex unicode:"$\x{a2}", rx157_cur .local pmc match .lex "$/", match - length rx148_eos, rx148_tgt - gt rx148_pos, rx148_eos, rx148_done - set rx148_off, 0 - lt rx148_pos, 2, rx148_start - sub rx148_off, rx148_pos, 1 - substr rx148_tgt, rx148_tgt, rx148_off - rx148_start: - eq $I10, 1, rx148_restart - if_null rx148_debug, debug_224 - rx148_cur."!cursor_debug"("START ", "quantifier:sym") - debug_224: + length rx157_eos, rx157_tgt + gt rx157_pos, rx157_eos, rx157_done + set rx157_off, 0 + lt rx157_pos, 2, rx157_start + sub rx157_off, rx157_pos, 1 + substr rx157_tgt, rx157_tgt, rx157_off + rx157_start: + eq $I10, 1, rx157_restart + if_null rx157_debug, debug_241 + rx157_cur."!cursor_debug"("START", "quantifier:sym") + debug_241: $I10 = self.'from'() - ne $I10, -1, rxscan152_done - goto rxscan152_scan - rxscan152_loop: - ($P10) = rx148_cur."from"() - inc $P10 - set rx148_pos, $P10 - ge rx148_pos, rx148_eos, rxscan152_done - rxscan152_scan: - set_addr $I10, rxscan152_loop - rx148_cur."!mark_push"(0, rx148_pos, $I10) - rxscan152_done: -.annotate 'line', 57 + ne $I10, -1, rxscan161_done + goto rxscan161_scan + rxscan161_loop: + ($P10) = rx157_cur."from"() + inc $P10 + set rx157_pos, $P10 + ge rx157_pos, rx157_eos, rxscan161_done + rxscan161_scan: + 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_153_fail - rx148_cur."!mark_push"(0, rx148_pos, $I10) + set_addr $I10, rxcap_162_fail + rx157_cur."!mark_push"(0, rx157_pos, $I10) # rx literal "?" - add $I11, rx148_pos, 1 - gt $I11, rx148_eos, rx148_fail - sub $I11, rx148_pos, rx148_off - ord $I11, rx148_tgt, $I11 - ne $I11, 63, rx148_fail - add rx148_pos, 1 - set_addr $I10, rxcap_153_fail - ($I12, $I11) = rx148_cur."!mark_peek"($I10) - rx148_cur."!cursor_pos"($I11) - ($P10) = rx148_cur."!cursor_start"() - $P10."!cursor_pass"(rx148_pos, "") - rx148_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx157_pos, 1 + gt $I11, rx157_eos, rx157_fail + sub $I11, rx157_pos, rx157_off + ord $I11, rx157_tgt, $I11 + ne $I11, 63, rx157_fail + add rx157_pos, 1 + set_addr $I10, rxcap_162_fail + ($I12, $I11) = rx157_cur."!mark_peek"($I10) + rx157_cur."!cursor_pos"($I11) + ($P10) = rx157_cur."!cursor_start"() + $P10."!cursor_pass"(rx157_pos, "") + rx157_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_153_done - rxcap_153_fail: - goto rx148_fail - rxcap_153_done: + goto rxcap_162_done + rxcap_162_fail: + goto rx157_fail + rxcap_162_done: # rx subrule "backmod" subtype=capture negate= - rx148_cur."!cursor_pos"(rx148_pos) - $P10 = rx148_cur."backmod"() - unless $P10, rx148_fail - rx148_cur."!mark_push"(0, -1, 0, $P10) + rx157_cur."!cursor_pos"(rx157_pos) + $P10 = rx157_cur."backmod"() + unless $P10, rx157_fail + rx157_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("backmod") - rx148_pos = $P10."pos"() + rx157_pos = $P10."pos"() # rx pass - rx148_cur."!cursor_pass"(rx148_pos, "quantifier:sym") - if_null rx148_debug, debug_225 - rx148_cur."!cursor_debug"("PASS ", "quantifier:sym", " at pos=", rx148_pos) - debug_225: - .return (rx148_cur) - rx148_restart: + rx157_cur."!cursor_pass"(rx157_pos, "quantifier:sym") + if_null rx157_debug, debug_242 + rx157_cur."!cursor_debug"("PASS", "quantifier:sym", " at pos=", rx157_pos) + debug_242: + .return (rx157_cur) + rx157_restart: .annotate 'line', 3 - if_null rx148_debug, debug_226 - rx148_cur."!cursor_debug"("NEXT ", "quantifier:sym") - debug_226: - rx148_fail: - (rx148_rep, rx148_pos, $I10, $P10) = rx148_cur."!mark_fail"(0) - lt rx148_pos, -1, rx148_done - eq rx148_pos, -1, rx148_fail - jump $I10 - rx148_done: - rx148_cur."!cursor_fail"() - if_null rx148_debug, debug_227 - rx148_cur."!cursor_debug"("FAIL ", "quantifier:sym") - debug_227: - .return (rx148_cur) + if_null rx157_debug, debug_243 + rx157_cur."!cursor_debug"("NEXT", "quantifier:sym") + debug_243: + rx157_fail: + (rx157_rep, rx157_pos, $I10, $P10) = rx157_cur."!mark_fail"(0) + lt rx157_pos, -1, rx157_done + eq rx157_pos, -1, rx157_fail + jump $I10 + rx157_done: + rx157_cur."!cursor_fail"() + if_null rx157_debug, debug_244 + rx157_cur."!cursor_debug"("FAIL", "quantifier:sym") + debug_244: + .return (rx157_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantifier:sym" :subid("43_1282016522.91354") :method +.sub "!PREFIX__quantifier:sym" :subid("45_1284728471.30547") :method .annotate 'line', 3 - $P150 = self."!PREFIX__!subrule"("backmod", "?") - new $P151, "ResizablePMCArray" - push $P151, $P150 - .return ($P151) + $P159 = self."!PREFIX__!subrule"("backmod", "?") + new $P160, "ResizablePMCArray" + push $P160, $P159 + .return ($P160) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "quantifier:sym<**>" :subid("44_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "quantifier:sym<{N,M}>" :subid("46_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx155_tgt - .local int rx155_pos - .local int rx155_off - .local int rx155_eos - .local int rx155_rep - .local pmc rx155_cur - .local pmc rx155_debug - (rx155_cur, rx155_pos, rx155_tgt, $I10) = self."!cursor_start"() - rx155_cur."!cursor_caparray"("max", "normspace") - getattribute rx155_debug, rx155_cur, "$!debug" - .lex unicode:"$\x{a2}", rx155_cur - .local pmc match - .lex "$/", match - length rx155_eos, rx155_tgt - gt rx155_pos, rx155_eos, rx155_done - set rx155_off, 0 - lt rx155_pos, 2, rx155_start - sub rx155_off, rx155_pos, 1 - substr rx155_tgt, rx155_tgt, rx155_off - rx155_start: - eq $I10, 1, rx155_restart - if_null rx155_debug, debug_228 - rx155_cur."!cursor_debug"("START ", "quantifier:sym<**>") - debug_228: + .const 'Sub' $P183 = "51_1284728471.30547" + capture_lex $P183 + .const 'Sub' $P178 = "50_1284728471.30547" + capture_lex $P178 + .const 'Sub' $P174 = "49_1284728471.30547" + capture_lex $P174 + .const 'Sub' $P171 = "48_1284728471.30547" + capture_lex $P171 + .local string rx164_tgt + .local int rx164_pos + .local int rx164_off + .local int rx164_eos + .local int rx164_rep + .local pmc rx164_cur + .local pmc rx164_debug + (rx164_cur, rx164_pos, rx164_tgt, $I10) = self."!cursor_start"() + getattribute rx164_debug, rx164_cur, "$!debug" + .lex unicode:"$\x{a2}", rx164_cur + .local pmc match + .lex "$/", match + length rx164_eos, rx164_tgt + gt rx164_pos, rx164_eos, rx164_done + set rx164_off, 0 + lt rx164_pos, 2, rx164_start + sub rx164_off, rx164_pos, 1 + substr rx164_tgt, rx164_tgt, rx164_off + rx164_start: + eq $I10, 1, rx164_restart + if_null rx164_debug, debug_245 + rx164_cur."!cursor_debug"("START", "quantifier:sym<{N,M}>") + debug_245: $I10 = self.'from'() - ne $I10, -1, rxscan158_done - goto rxscan158_scan - rxscan158_loop: - ($P10) = rx155_cur."from"() - inc $P10 - set rx155_pos, $P10 - ge rx155_pos, rx155_eos, rxscan158_done - rxscan158_scan: - set_addr $I10, rxscan158_loop - rx155_cur."!mark_push"(0, rx155_pos, $I10) - rxscan158_done: -.annotate 'line', 59 - # rx subcapture "sym" - set_addr $I10, rxcap_159_fail - rx155_cur."!mark_push"(0, rx155_pos, $I10) - # rx literal "**" - add $I11, rx155_pos, 2 - gt $I11, rx155_eos, rx155_fail - sub $I11, rx155_pos, rx155_off - substr $S10, rx155_tgt, $I11, 2 - ne $S10, "**", rx155_fail - add rx155_pos, 2 - set_addr $I10, rxcap_159_fail - ($I12, $I11) = rx155_cur."!mark_peek"($I10) - rx155_cur."!cursor_pos"($I11) - ($P10) = rx155_cur."!cursor_start"() - $P10."!cursor_pass"(rx155_pos, "") - rx155_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_159_done - rxcap_159_fail: - goto rx155_fail - rxcap_159_done: - # rx rxquantr160 ** 0..1 - set_addr $I10, rxquantr160_done - rx155_cur."!mark_push"(0, rx155_pos, $I10) - rxquantr160_loop: - # rx subrule "normspace" subtype=capture negate= - rx155_cur."!cursor_pos"(rx155_pos) - $P10 = rx155_cur."normspace"() - unless $P10, rx155_fail - goto rxsubrule161_pass - rxsubrule161_back: - $P10 = $P10."!cursor_next"() - unless $P10, rx155_fail - rxsubrule161_pass: - set_addr $I10, rxsubrule161_back - rx155_cur."!mark_push"(0, rx155_pos, $I10, $P10) - $P10."!cursor_names"("normspace") - rx155_pos = $P10."pos"() - set_addr $I10, rxquantr160_done - (rx155_rep) = rx155_cur."!mark_commit"($I10) - rxquantr160_done: - # rx subrule "backmod" subtype=capture negate= - rx155_cur."!cursor_pos"(rx155_pos) - $P10 = rx155_cur."backmod"() - unless $P10, rx155_fail - rx155_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("backmod") - rx155_pos = $P10."pos"() - # rx rxquantr162 ** 0..1 - set_addr $I10, rxquantr162_done - rx155_cur."!mark_push"(0, rx155_pos, $I10) - rxquantr162_loop: - # rx subrule "normspace" subtype=capture negate= - rx155_cur."!cursor_pos"(rx155_pos) - $P10 = rx155_cur."normspace"() - unless $P10, rx155_fail - goto rxsubrule163_pass - rxsubrule163_back: - $P10 = $P10."!cursor_next"() - unless $P10, rx155_fail - rxsubrule163_pass: - set_addr $I10, rxsubrule163_back - rx155_cur."!mark_push"(0, rx155_pos, $I10, $P10) - $P10."!cursor_names"("normspace") - rx155_pos = $P10."pos"() - set_addr $I10, rxquantr162_done - (rx155_rep) = rx155_cur."!mark_commit"($I10) - rxquantr162_done: - alt164_0: -.annotate 'line', 60 - set_addr $I10, alt164_1 - rx155_cur."!mark_push"(0, rx155_pos, $I10) -.annotate 'line', 61 - # rx subcapture "min" - set_addr $I10, rxcap_165_fail - rx155_cur."!mark_push"(0, rx155_pos, $I10) - # rx charclass_q d r 1..-1 - sub $I10, rx155_pos, rx155_off - find_not_cclass $I11, 8, rx155_tgt, $I10, rx155_eos - add $I12, $I10, 1 - lt $I11, $I12, rx155_fail - add rx155_pos, rx155_off, $I11 - set_addr $I10, rxcap_165_fail - ($I12, $I11) = rx155_cur."!mark_peek"($I10) - rx155_cur."!cursor_pos"($I11) - ($P10) = rx155_cur."!cursor_start"() - $P10."!cursor_pass"(rx155_pos, "") - rx155_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("min") - goto rxcap_165_done - rxcap_165_fail: - goto rx155_fail - rxcap_165_done: -.annotate 'line', 68 - # rx rxquantr166 ** 0..1 - set_addr $I10, rxquantr166_done - rx155_cur."!mark_push"(0, rx155_pos, $I10) - rxquantr166_loop: -.annotate 'line', 62 - # rx literal ".." - add $I11, rx155_pos, 2 - gt $I11, rx155_eos, rx155_fail - sub $I11, rx155_pos, rx155_off - substr $S10, rx155_tgt, $I11, 2 - ne $S10, "..", rx155_fail - add rx155_pos, 2 -.annotate 'line', 63 - # rx subcapture "max" - set_addr $I10, rxcap_168_fail - rx155_cur."!mark_push"(0, rx155_pos, $I10) - alt167_0: - set_addr $I10, alt167_1 - rx155_cur."!mark_push"(0, rx155_pos, $I10) -.annotate 'line', 64 - # rx charclass_q d r 1..-1 - sub $I10, rx155_pos, rx155_off - find_not_cclass $I11, 8, rx155_tgt, $I10, rx155_eos - add $I12, $I10, 1 - lt $I11, $I12, rx155_fail - add rx155_pos, rx155_off, $I11 - goto alt167_end - alt167_1: - set_addr $I10, alt167_2 - rx155_cur."!mark_push"(0, rx155_pos, $I10) + ne $I10, -1, rxscan167_done + goto rxscan167_scan + rxscan167_loop: + ($P10) = rx164_cur."from"() + inc $P10 + set rx164_pos, $P10 + ge rx164_pos, rx164_eos, rxscan167_done + rxscan167_scan: + set_addr $I10, rxscan167_loop + rx164_cur."!mark_push"(0, rx164_pos, $I10) + rxscan167_done: .annotate 'line', 65 - # rx literal "*" - add $I11, rx155_pos, 1 - gt $I11, rx155_eos, rx155_fail - sub $I11, rx155_pos, rx155_off - ord $I11, rx155_tgt, $I11 - ne $I11, 42, rx155_fail - add rx155_pos, 1 - goto alt167_end - alt167_2: + rx164_cur."!cursor_pos"(rx164_pos) + find_lex $P168, unicode:"$\x{a2}" + $P169 = $P168."MATCH"() + store_lex "$/", $P169 + .const 'Sub' $P171 = "48_1284728471.30547" + capture_lex $P171 + $P172 = $P171() + # rx literal "{" + add $I11, rx164_pos, 1 + gt $I11, rx164_eos, rx164_fail + sub $I11, rx164_pos, rx164_off + ord $I11, rx164_tgt, $I11 + ne $I11, 123, rx164_fail + add rx164_pos, 1 + # rx subrule $P174 subtype=capture negate= + rx164_cur."!cursor_pos"(rx164_pos) + .const 'Sub' $P174 = "49_1284728471.30547" + capture_lex $P174 + $P10 = rx164_cur.$P174() + unless $P10, rx164_fail + rx164_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"(0) + rx164_pos = $P10."pos"() + # rx subrule $P178 subtype=capture negate= + rx164_cur."!cursor_pos"(rx164_pos) + .const 'Sub' $P178 = "50_1284728471.30547" + capture_lex $P178 + $P10 = rx164_cur.$P178() + unless $P10, rx164_fail + rx164_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("1") + rx164_pos = $P10."pos"() + # rx subrule $P183 subtype=capture negate= + rx164_cur."!cursor_pos"(rx164_pos) + .const 'Sub' $P183 = "51_1284728471.30547" + capture_lex $P183 + $P10 = rx164_cur.$P183() + unless $P10, rx164_fail + rx164_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("2") + rx164_pos = $P10."pos"() + # rx literal "}" + add $I11, rx164_pos, 1 + gt $I11, rx164_eos, rx164_fail + sub $I11, rx164_pos, rx164_off + ord $I11, rx164_tgt, $I11 + ne $I11, 125, rx164_fail + add rx164_pos, 1 .annotate 'line', 66 - # rx subrule "panic" subtype=method negate= - rx155_cur."!cursor_pos"(rx155_pos) - $P10 = rx155_cur."panic"("Only integers or '*' allowed as range quantifier endpoint") - unless $P10, rx155_fail - rx155_pos = $P10."pos"() - alt167_end: -.annotate 'line', 63 - set_addr $I10, rxcap_168_fail - ($I12, $I11) = rx155_cur."!mark_peek"($I10) - rx155_cur."!cursor_pos"($I11) - ($P10) = rx155_cur."!cursor_start"() - $P10."!cursor_pass"(rx155_pos, "") - rx155_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("max") - goto rxcap_168_done - rxcap_168_fail: - goto rx155_fail - rxcap_168_done: -.annotate 'line', 68 - set_addr $I10, rxquantr166_done - (rx155_rep) = rx155_cur."!mark_commit"($I10) - rxquantr166_done: -.annotate 'line', 61 - goto alt164_end - alt164_1: + # rx subrule "obs" subtype=method negate= + rx164_cur."!cursor_pos"(rx164_pos) + $P10 = rx164_cur."obs"("{N,M} as general quantifier", "** N..M (or ** N..*)") + unless $P10, rx164_fail + rx164_pos = $P10."pos"() +.annotate 'line', 65 + # rx pass + rx164_cur."!cursor_pass"(rx164_pos, "quantifier:sym<{N,M}>") + if_null rx164_debug, debug_258 + rx164_cur."!cursor_debug"("PASS", "quantifier:sym<{N,M}>", " at pos=", rx164_pos) + debug_258: + .return (rx164_cur) + rx164_restart: +.annotate 'line', 3 + if_null rx164_debug, debug_259 + rx164_cur."!cursor_debug"("NEXT", "quantifier:sym<{N,M}>") + debug_259: + rx164_fail: + (rx164_rep, rx164_pos, $I10, $P10) = rx164_cur."!mark_fail"(0) + lt rx164_pos, -1, rx164_done + eq rx164_pos, -1, rx164_fail + jump $I10 + rx164_done: + rx164_cur."!cursor_fail"() + if_null rx164_debug, debug_260 + rx164_cur."!cursor_debug"("FAIL", "quantifier:sym<{N,M}>") + debug_260: + .return (rx164_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "!PREFIX__quantifier:sym<{N,M}>" :subid("47_1284728471.30547") :method +.annotate 'line', 3 + new $P166, "ResizablePMCArray" + push $P166, "" + .return ($P166) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block170" :anon :subid("48_1284728471.30547") :outer("46_1284728471.30547") +.annotate 'line', 65 + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block173" :anon :subid("49_1284728471.30547") :method :outer("46_1284728471.30547") +.annotate 'line', 65 + .local string rx175_tgt + .local int rx175_pos + .local int rx175_off + .local int rx175_eos + .local int rx175_rep + .local pmc rx175_cur + .local pmc rx175_debug + (rx175_cur, rx175_pos, rx175_tgt, $I10) = self."!cursor_start"() + getattribute rx175_debug, rx175_cur, "$!debug" + .lex unicode:"$\x{a2}", rx175_cur + .local pmc match + .lex "$/", match + length rx175_eos, rx175_tgt + gt rx175_pos, rx175_eos, rx175_done + set rx175_off, 0 + lt rx175_pos, 2, rx175_start + sub rx175_off, rx175_pos, 1 + substr rx175_tgt, rx175_tgt, rx175_off + rx175_start: + eq $I10, 1, rx175_restart + if_null rx175_debug, debug_246 + rx175_cur."!cursor_debug"("START", "") + debug_246: + $I10 = self.'from'() + ne $I10, -1, rxscan176_done + goto rxscan176_scan + rxscan176_loop: + ($P10) = rx175_cur."from"() + inc $P10 + set rx175_pos, $P10 + ge rx175_pos, rx175_eos, rxscan176_done + rxscan176_scan: + set_addr $I10, rxscan176_loop + rx175_cur."!mark_push"(0, rx175_pos, $I10) + rxscan176_done: + # rx charclass_q d r 1..-1 + sub $I10, rx175_pos, rx175_off + find_not_cclass $I11, 8, rx175_tgt, $I10, rx175_eos + add $I12, $I10, 1 + lt $I11, $I12, rx175_fail + add rx175_pos, rx175_off, $I11 + # rx pass + rx175_cur."!cursor_pass"(rx175_pos, "") + if_null rx175_debug, debug_247 + rx175_cur."!cursor_debug"("PASS", "", " at pos=", rx175_pos) + debug_247: + .return (rx175_cur) + rx175_restart: + if_null rx175_debug, debug_248 + rx175_cur."!cursor_debug"("NEXT", "") + debug_248: + rx175_fail: + (rx175_rep, rx175_pos, $I10, $P10) = rx175_cur."!mark_fail"(0) + lt rx175_pos, -1, rx175_done + eq rx175_pos, -1, rx175_fail + jump $I10 + rx175_done: + rx175_cur."!cursor_fail"() + if_null rx175_debug, debug_249 + rx175_cur."!cursor_debug"("FAIL", "") + debug_249: + .return (rx175_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block177" :anon :subid("50_1284728471.30547") :method :outer("46_1284728471.30547") +.annotate 'line', 65 + .local string rx179_tgt + .local int rx179_pos + .local int rx179_off + .local int rx179_eos + .local int rx179_rep + .local pmc rx179_cur + .local pmc rx179_debug + (rx179_cur, rx179_pos, rx179_tgt, $I10) = self."!cursor_start"() + getattribute rx179_debug, rx179_cur, "$!debug" + .lex unicode:"$\x{a2}", rx179_cur + .local pmc match + .lex "$/", match + length rx179_eos, rx179_tgt + gt rx179_pos, rx179_eos, rx179_done + set rx179_off, 0 + lt rx179_pos, 2, rx179_start + sub rx179_off, rx179_pos, 1 + substr rx179_tgt, rx179_tgt, rx179_off + rx179_start: + eq $I10, 1, rx179_restart + if_null rx179_debug, debug_250 + rx179_cur."!cursor_debug"("START", "") + debug_250: + $I10 = self.'from'() + ne $I10, -1, rxscan180_done + goto rxscan180_scan + rxscan180_loop: + ($P10) = rx179_cur."from"() + inc $P10 + set rx179_pos, $P10 + ge rx179_pos, rx179_eos, rxscan180_done + rxscan180_scan: + set_addr $I10, rxscan180_loop + rx179_cur."!mark_push"(0, rx179_pos, $I10) + rxscan180_done: + # rx rxquantr181 ** 0..1 + set_addr $I10, rxquantr181_done + rx179_cur."!mark_push"(0, rx179_pos, $I10) + rxquantr181_loop: + # rx literal "," + add $I11, rx179_pos, 1 + gt $I11, rx179_eos, rx179_fail + sub $I11, rx179_pos, rx179_off + ord $I11, rx179_tgt, $I11 + ne $I11, 44, rx179_fail + add rx179_pos, 1 + set_addr $I10, rxquantr181_done + (rx179_rep) = rx179_cur."!mark_commit"($I10) + rxquantr181_done: + # rx pass + rx179_cur."!cursor_pass"(rx179_pos, "") + if_null rx179_debug, debug_251 + rx179_cur."!cursor_debug"("PASS", "", " at pos=", rx179_pos) + debug_251: + .return (rx179_cur) + rx179_restart: + if_null rx179_debug, debug_252 + rx179_cur."!cursor_debug"("NEXT", "") + debug_252: + rx179_fail: + (rx179_rep, rx179_pos, $I10, $P10) = rx179_cur."!mark_fail"(0) + lt rx179_pos, -1, rx179_done + eq rx179_pos, -1, rx179_fail + jump $I10 + rx179_done: + rx179_cur."!cursor_fail"() + if_null rx179_debug, debug_253 + rx179_cur."!cursor_debug"("FAIL", "") + debug_253: + .return (rx179_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block182" :anon :subid("51_1284728471.30547") :method :outer("46_1284728471.30547") +.annotate 'line', 65 + .local string rx184_tgt + .local int rx184_pos + .local int rx184_off + .local int rx184_eos + .local int rx184_rep + .local pmc rx184_cur + .local pmc rx184_debug + (rx184_cur, rx184_pos, rx184_tgt, $I10) = self."!cursor_start"() + getattribute rx184_debug, rx184_cur, "$!debug" + .lex unicode:"$\x{a2}", rx184_cur + .local pmc match + .lex "$/", match + length rx184_eos, rx184_tgt + gt rx184_pos, rx184_eos, rx184_done + set rx184_off, 0 + lt rx184_pos, 2, rx184_start + sub rx184_off, rx184_pos, 1 + substr rx184_tgt, rx184_tgt, rx184_off + rx184_start: + eq $I10, 1, rx184_restart + if_null rx184_debug, debug_254 + rx184_cur."!cursor_debug"("START", "") + debug_254: + $I10 = self.'from'() + ne $I10, -1, rxscan185_done + goto rxscan185_scan + rxscan185_loop: + ($P10) = rx184_cur."from"() + inc $P10 + set rx184_pos, $P10 + ge rx184_pos, rx184_eos, rxscan185_done + rxscan185_scan: + set_addr $I10, rxscan185_loop + rx184_cur."!mark_push"(0, rx184_pos, $I10) + rxscan185_done: + # rx charclass_q d r 0..-1 + sub $I10, rx184_pos, rx184_off + find_not_cclass $I11, 8, rx184_tgt, $I10, rx184_eos + add rx184_pos, rx184_off, $I11 + # rx pass + rx184_cur."!cursor_pass"(rx184_pos, "") + if_null rx184_debug, debug_255 + rx184_cur."!cursor_debug"("PASS", "", " at pos=", rx184_pos) + debug_255: + .return (rx184_cur) + rx184_restart: + if_null rx184_debug, debug_256 + rx184_cur."!cursor_debug"("NEXT", "") + debug_256: + rx184_fail: + (rx184_rep, rx184_pos, $I10, $P10) = rx184_cur."!mark_fail"(0) + lt rx184_pos, -1, rx184_done + eq rx184_pos, -1, rx184_fail + jump $I10 + rx184_done: + rx184_cur."!cursor_fail"() + if_null rx184_debug, debug_257 + rx184_cur."!cursor_debug"("FAIL", "") + debug_257: + .return (rx184_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "quantifier:sym<**>" :subid("52_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx187_tgt + .local int rx187_pos + .local int rx187_off + .local int rx187_eos + .local int rx187_rep + .local pmc rx187_cur + .local pmc rx187_debug + (rx187_cur, rx187_pos, rx187_tgt, $I10) = self."!cursor_start"() + rx187_cur."!cursor_caparray"("max", "normspace") + getattribute rx187_debug, rx187_cur, "$!debug" + .lex unicode:"$\x{a2}", rx187_cur + .local pmc match + .lex "$/", match + length rx187_eos, rx187_tgt + gt rx187_pos, rx187_eos, rx187_done + set rx187_off, 0 + lt rx187_pos, 2, rx187_start + sub rx187_off, rx187_pos, 1 + substr rx187_tgt, rx187_tgt, rx187_off + rx187_start: + eq $I10, 1, rx187_restart + if_null rx187_debug, debug_261 + rx187_cur."!cursor_debug"("START", "quantifier:sym<**>") + debug_261: + $I10 = self.'from'() + ne $I10, -1, rxscan190_done + goto rxscan190_scan + rxscan190_loop: + ($P10) = rx187_cur."from"() + inc $P10 + set rx187_pos, $P10 + ge rx187_pos, rx187_eos, rxscan190_done + rxscan190_scan: + set_addr $I10, rxscan190_loop + rx187_cur."!mark_push"(0, rx187_pos, $I10) + rxscan190_done: .annotate 'line', 69 + # rx subcapture "sym" + set_addr $I10, rxcap_191_fail + rx187_cur."!mark_push"(0, rx187_pos, $I10) + # rx literal "**" + add $I11, rx187_pos, 2 + gt $I11, rx187_eos, rx187_fail + sub $I11, rx187_pos, rx187_off + substr $S10, rx187_tgt, $I11, 2 + ne $S10, "**", rx187_fail + add rx187_pos, 2 + set_addr $I10, rxcap_191_fail + ($I12, $I11) = rx187_cur."!mark_peek"($I10) + rx187_cur."!cursor_pos"($I11) + ($P10) = rx187_cur."!cursor_start"() + $P10."!cursor_pass"(rx187_pos, "") + rx187_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_191_done + rxcap_191_fail: + goto rx187_fail + rxcap_191_done: + # rx rxquantr192 ** 0..1 + set_addr $I10, rxquantr192_done + rx187_cur."!mark_push"(0, rx187_pos, $I10) + rxquantr192_loop: + # rx subrule "normspace" subtype=capture negate= + rx187_cur."!cursor_pos"(rx187_pos) + $P10 = rx187_cur."normspace"() + unless $P10, rx187_fail + goto rxsubrule193_pass + rxsubrule193_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx187_fail + rxsubrule193_pass: + set_addr $I10, rxsubrule193_back + rx187_cur."!mark_push"(0, rx187_pos, $I10, $P10) + $P10."!cursor_names"("normspace") + rx187_pos = $P10."pos"() + set_addr $I10, rxquantr192_done + (rx187_rep) = rx187_cur."!mark_commit"($I10) + rxquantr192_done: + # rx subrule "backmod" subtype=capture negate= + rx187_cur."!cursor_pos"(rx187_pos) + $P10 = rx187_cur."backmod"() + unless $P10, rx187_fail + rx187_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("backmod") + rx187_pos = $P10."pos"() + # rx rxquantr194 ** 0..1 + set_addr $I10, rxquantr194_done + rx187_cur."!mark_push"(0, rx187_pos, $I10) + rxquantr194_loop: + # rx subrule "normspace" subtype=capture negate= + rx187_cur."!cursor_pos"(rx187_pos) + $P10 = rx187_cur."normspace"() + unless $P10, rx187_fail + goto rxsubrule195_pass + rxsubrule195_back: + $P10 = $P10."!cursor_next"() + unless $P10, rx187_fail + rxsubrule195_pass: + set_addr $I10, rxsubrule195_back + rx187_cur."!mark_push"(0, rx187_pos, $I10, $P10) + $P10."!cursor_names"("normspace") + rx187_pos = $P10."pos"() + set_addr $I10, rxquantr194_done + (rx187_rep) = rx187_cur."!mark_commit"($I10) + rxquantr194_done: + alt196_0: +.annotate 'line', 70 + set_addr $I10, alt196_1 + rx187_cur."!mark_push"(0, rx187_pos, $I10) +.annotate 'line', 71 + # rx subcapture "min" + set_addr $I10, rxcap_197_fail + rx187_cur."!mark_push"(0, rx187_pos, $I10) + # rx charclass_q d r 1..-1 + sub $I10, rx187_pos, rx187_off + find_not_cclass $I11, 8, rx187_tgt, $I10, rx187_eos + add $I12, $I10, 1 + lt $I11, $I12, rx187_fail + add rx187_pos, rx187_off, $I11 + set_addr $I10, rxcap_197_fail + ($I12, $I11) = rx187_cur."!mark_peek"($I10) + rx187_cur."!cursor_pos"($I11) + ($P10) = rx187_cur."!cursor_start"() + $P10."!cursor_pass"(rx187_pos, "") + rx187_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("min") + goto rxcap_197_done + rxcap_197_fail: + goto rx187_fail + rxcap_197_done: +.annotate 'line', 78 + # rx rxquantr198 ** 0..1 + set_addr $I10, rxquantr198_done + rx187_cur."!mark_push"(0, rx187_pos, $I10) + rxquantr198_loop: +.annotate 'line', 72 + # rx literal ".." + add $I11, rx187_pos, 2 + gt $I11, rx187_eos, rx187_fail + sub $I11, rx187_pos, rx187_off + substr $S10, rx187_tgt, $I11, 2 + ne $S10, "..", rx187_fail + add rx187_pos, 2 +.annotate 'line', 73 + # rx subcapture "max" + set_addr $I10, rxcap_200_fail + rx187_cur."!mark_push"(0, rx187_pos, $I10) + alt199_0: + set_addr $I10, alt199_1 + rx187_cur."!mark_push"(0, rx187_pos, $I10) +.annotate 'line', 74 + # rx charclass_q d r 1..-1 + sub $I10, rx187_pos, rx187_off + find_not_cclass $I11, 8, rx187_tgt, $I10, rx187_eos + add $I12, $I10, 1 + lt $I11, $I12, rx187_fail + add rx187_pos, rx187_off, $I11 + goto alt199_end + alt199_1: + set_addr $I10, alt199_2 + rx187_cur."!mark_push"(0, rx187_pos, $I10) +.annotate 'line', 75 + # rx literal "*" + add $I11, rx187_pos, 1 + gt $I11, rx187_eos, rx187_fail + sub $I11, rx187_pos, rx187_off + ord $I11, rx187_tgt, $I11 + ne $I11, 42, rx187_fail + add rx187_pos, 1 + goto alt199_end + alt199_2: +.annotate 'line', 76 + # rx subrule "panic" subtype=method negate= + rx187_cur."!cursor_pos"(rx187_pos) + $P10 = rx187_cur."panic"("Only integers or '*' allowed as range quantifier endpoint") + unless $P10, rx187_fail + rx187_pos = $P10."pos"() + alt199_end: +.annotate 'line', 73 + set_addr $I10, rxcap_200_fail + ($I12, $I11) = rx187_cur."!mark_peek"($I10) + rx187_cur."!cursor_pos"($I11) + ($P10) = rx187_cur."!cursor_start"() + $P10."!cursor_pass"(rx187_pos, "") + rx187_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("max") + goto rxcap_200_done + rxcap_200_fail: + goto rx187_fail + rxcap_200_done: +.annotate 'line', 78 + set_addr $I10, rxquantr198_done + (rx187_rep) = rx187_cur."!mark_commit"($I10) + rxquantr198_done: +.annotate 'line', 71 + goto alt196_end + alt196_1: +.annotate 'line', 79 # rx subrule "quantified_atom" subtype=capture negate= - rx155_cur."!cursor_pos"(rx155_pos) - $P10 = rx155_cur."quantified_atom"() - unless $P10, rx155_fail - rx155_cur."!mark_push"(0, -1, 0, $P10) + rx187_cur."!cursor_pos"(rx187_pos) + $P10 = rx187_cur."quantified_atom"() + unless $P10, rx187_fail + rx187_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quantified_atom") - rx155_pos = $P10."pos"() - alt164_end: -.annotate 'line', 58 - # rx pass - rx155_cur."!cursor_pass"(rx155_pos, "quantifier:sym<**>") - if_null rx155_debug, debug_229 - rx155_cur."!cursor_debug"("PASS ", "quantifier:sym<**>", " at pos=", rx155_pos) - debug_229: - .return (rx155_cur) - rx155_restart: + rx187_pos = $P10."pos"() + alt196_end: +.annotate 'line', 68 + # rx pass + rx187_cur."!cursor_pass"(rx187_pos, "quantifier:sym<**>") + if_null rx187_debug, debug_262 + rx187_cur."!cursor_debug"("PASS", "quantifier:sym<**>", " at pos=", rx187_pos) + debug_262: + .return (rx187_cur) + rx187_restart: .annotate 'line', 3 - if_null rx155_debug, debug_230 - rx155_cur."!cursor_debug"("NEXT ", "quantifier:sym<**>") - debug_230: - rx155_fail: - (rx155_rep, rx155_pos, $I10, $P10) = rx155_cur."!mark_fail"(0) - lt rx155_pos, -1, rx155_done - eq rx155_pos, -1, rx155_fail - jump $I10 - rx155_done: - rx155_cur."!cursor_fail"() - if_null rx155_debug, debug_231 - rx155_cur."!cursor_debug"("FAIL ", "quantifier:sym<**>") - debug_231: - .return (rx155_cur) + if_null rx187_debug, debug_263 + rx187_cur."!cursor_debug"("NEXT", "quantifier:sym<**>") + debug_263: + rx187_fail: + (rx187_rep, rx187_pos, $I10, $P10) = rx187_cur."!mark_fail"(0) + lt rx187_pos, -1, rx187_done + eq rx187_pos, -1, rx187_fail + jump $I10 + rx187_done: + rx187_cur."!cursor_fail"() + if_null rx187_debug, debug_264 + rx187_cur."!cursor_debug"("FAIL", "quantifier:sym<**>") + debug_264: + .return (rx187_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__quantifier:sym<**>" :subid("45_1282016522.91354") :method +.sub "!PREFIX__quantifier:sym<**>" :subid("53_1284728471.30547") :method .annotate 'line', 3 - new $P157, "ResizablePMCArray" - push $P157, "**" - .return ($P157) + new $P189, "ResizablePMCArray" + push $P189, "**" + .return ($P189) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backmod" :subid("46_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backmod" :subid("54_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P177 = "48_1282016522.91354" - capture_lex $P177 - .local string rx170_tgt - .local int rx170_pos - .local int rx170_off - .local int rx170_eos - .local int rx170_rep - .local pmc rx170_cur - .local pmc rx170_debug - (rx170_cur, rx170_pos, rx170_tgt, $I10) = self."!cursor_start"() - getattribute rx170_debug, rx170_cur, "$!debug" - .lex unicode:"$\x{a2}", rx170_cur + .const 'Sub' $P209 = "56_1284728471.30547" + capture_lex $P209 + .local string rx202_tgt + .local int rx202_pos + .local int rx202_off + .local int rx202_eos + .local int rx202_rep + .local pmc rx202_cur + .local pmc rx202_debug + (rx202_cur, rx202_pos, rx202_tgt, $I10) = self."!cursor_start"() + getattribute rx202_debug, rx202_cur, "$!debug" + .lex unicode:"$\x{a2}", rx202_cur .local pmc match .lex "$/", match - length rx170_eos, rx170_tgt - gt rx170_pos, rx170_eos, rx170_done - set rx170_off, 0 - lt rx170_pos, 2, rx170_start - sub rx170_off, rx170_pos, 1 - substr rx170_tgt, rx170_tgt, rx170_off - rx170_start: - eq $I10, 1, rx170_restart - if_null rx170_debug, debug_232 - rx170_cur."!cursor_debug"("START ", "backmod") - debug_232: + length rx202_eos, rx202_tgt + gt rx202_pos, rx202_eos, rx202_done + set rx202_off, 0 + lt rx202_pos, 2, rx202_start + sub rx202_off, rx202_pos, 1 + substr rx202_tgt, rx202_tgt, rx202_off + rx202_start: + eq $I10, 1, rx202_restart + if_null rx202_debug, debug_265 + rx202_cur."!cursor_debug"("START", "backmod") + debug_265: $I10 = self.'from'() - ne $I10, -1, rxscan173_done - goto rxscan173_scan - rxscan173_loop: - ($P10) = rx170_cur."from"() - inc $P10 - set rx170_pos, $P10 - ge rx170_pos, rx170_eos, rxscan173_done - rxscan173_scan: - set_addr $I10, rxscan173_loop - rx170_cur."!mark_push"(0, rx170_pos, $I10) - rxscan173_done: -.annotate 'line', 73 - # rx rxquantr174 ** 0..1 - set_addr $I10, rxquantr174_done - rx170_cur."!mark_push"(0, rx170_pos, $I10) - rxquantr174_loop: + ne $I10, -1, rxscan205_done + goto rxscan205_scan + rxscan205_loop: + ($P10) = rx202_cur."from"() + inc $P10 + set rx202_pos, $P10 + ge rx202_pos, rx202_eos, rxscan205_done + rxscan205_scan: + set_addr $I10, rxscan205_loop + rx202_cur."!mark_push"(0, rx202_pos, $I10) + rxscan205_done: +.annotate 'line', 83 + # rx rxquantr206 ** 0..1 + set_addr $I10, rxquantr206_done + rx202_cur."!mark_push"(0, rx202_pos, $I10) + rxquantr206_loop: # rx literal ":" - add $I11, rx170_pos, 1 - gt $I11, rx170_eos, rx170_fail - sub $I11, rx170_pos, rx170_off - ord $I11, rx170_tgt, $I11 - ne $I11, 58, rx170_fail - add rx170_pos, 1 - set_addr $I10, rxquantr174_done - (rx170_rep) = rx170_cur."!mark_commit"($I10) - rxquantr174_done: - alt175_0: - set_addr $I10, alt175_1 - rx170_cur."!mark_push"(0, rx170_pos, $I10) + add $I11, rx202_pos, 1 + gt $I11, rx202_eos, rx202_fail + sub $I11, rx202_pos, rx202_off + ord $I11, rx202_tgt, $I11 + ne $I11, 58, rx202_fail + add rx202_pos, 1 + set_addr $I10, rxquantr206_done + (rx202_rep) = rx202_cur."!mark_commit"($I10) + rxquantr206_done: + alt207_0: + set_addr $I10, alt207_1 + rx202_cur."!mark_push"(0, rx202_pos, $I10) # rx literal "?" - add $I11, rx170_pos, 1 - gt $I11, rx170_eos, rx170_fail - sub $I11, rx170_pos, rx170_off - ord $I11, rx170_tgt, $I11 - ne $I11, 63, rx170_fail - add rx170_pos, 1 - goto alt175_end - alt175_1: - set_addr $I10, alt175_2 - rx170_cur."!mark_push"(0, rx170_pos, $I10) + add $I11, rx202_pos, 1 + gt $I11, rx202_eos, rx202_fail + sub $I11, rx202_pos, rx202_off + ord $I11, rx202_tgt, $I11 + ne $I11, 63, rx202_fail + add rx202_pos, 1 + goto alt207_end + alt207_1: + set_addr $I10, alt207_2 + rx202_cur."!mark_push"(0, rx202_pos, $I10) # rx literal "!" - add $I11, rx170_pos, 1 - gt $I11, rx170_eos, rx170_fail - sub $I11, rx170_pos, rx170_off - ord $I11, rx170_tgt, $I11 - ne $I11, 33, rx170_fail - add rx170_pos, 1 - goto alt175_end - alt175_2: + add $I11, rx202_pos, 1 + gt $I11, rx202_eos, rx202_fail + sub $I11, rx202_pos, rx202_off + ord $I11, rx202_tgt, $I11 + ne $I11, 33, rx202_fail + add rx202_pos, 1 + goto alt207_end + alt207_2: # rx subrule "before" subtype=zerowidth negate=1 - rx170_cur."!cursor_pos"(rx170_pos) - .const 'Sub' $P177 = "48_1282016522.91354" - capture_lex $P177 - $P10 = rx170_cur."before"($P177) - if $P10, rx170_fail - alt175_end: - # rx pass - rx170_cur."!cursor_pass"(rx170_pos, "backmod") - if_null rx170_debug, debug_237 - rx170_cur."!cursor_debug"("PASS ", "backmod", " at pos=", rx170_pos) - debug_237: - .return (rx170_cur) - rx170_restart: + rx202_cur."!cursor_pos"(rx202_pos) + .const 'Sub' $P209 = "56_1284728471.30547" + capture_lex $P209 + $P10 = rx202_cur."before"($P209) + if $P10, rx202_fail + alt207_end: + # rx pass + rx202_cur."!cursor_pass"(rx202_pos, "backmod") + if_null rx202_debug, debug_270 + rx202_cur."!cursor_debug"("PASS", "backmod", " at pos=", rx202_pos) + debug_270: + .return (rx202_cur) + rx202_restart: .annotate 'line', 3 - if_null rx170_debug, debug_238 - rx170_cur."!cursor_debug"("NEXT ", "backmod") - debug_238: - rx170_fail: - (rx170_rep, rx170_pos, $I10, $P10) = rx170_cur."!mark_fail"(0) - lt rx170_pos, -1, rx170_done - eq rx170_pos, -1, rx170_fail - jump $I10 - rx170_done: - rx170_cur."!cursor_fail"() - if_null rx170_debug, debug_239 - rx170_cur."!cursor_debug"("FAIL ", "backmod") - debug_239: - .return (rx170_cur) + if_null rx202_debug, debug_271 + rx202_cur."!cursor_debug"("NEXT", "backmod") + debug_271: + rx202_fail: + (rx202_rep, rx202_pos, $I10, $P10) = rx202_cur."!mark_fail"(0) + lt rx202_pos, -1, rx202_done + eq rx202_pos, -1, rx202_fail + jump $I10 + rx202_done: + rx202_cur."!cursor_fail"() + if_null rx202_debug, debug_272 + rx202_cur."!cursor_debug"("FAIL", "backmod") + debug_272: + .return (rx202_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backmod" :subid("47_1282016522.91354") :method +.sub "!PREFIX__backmod" :subid("55_1284728471.30547") :method .annotate 'line', 3 - new $P172, "ResizablePMCArray" - push $P172, "" - .return ($P172) + new $P204, "ResizablePMCArray" + push $P204, "" + .return ($P204) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block176" :anon :subid("48_1282016522.91354") :method :outer("46_1282016522.91354") -.annotate 'line', 73 - .local string rx178_tgt - .local int rx178_pos - .local int rx178_off - .local int rx178_eos - .local int rx178_rep - .local pmc rx178_cur - .local pmc rx178_debug - (rx178_cur, rx178_pos, rx178_tgt, $I10) = self."!cursor_start"() - getattribute rx178_debug, rx178_cur, "$!debug" - .lex unicode:"$\x{a2}", rx178_cur - .local pmc match - .lex "$/", match - length rx178_eos, rx178_tgt - gt rx178_pos, rx178_eos, rx178_done - set rx178_off, 0 - lt rx178_pos, 2, rx178_start - sub rx178_off, rx178_pos, 1 - substr rx178_tgt, rx178_tgt, rx178_off - rx178_start: - eq $I10, 1, rx178_restart - if_null rx178_debug, debug_233 - rx178_cur."!cursor_debug"("START ", "") - debug_233: +.sub "_block208" :anon :subid("56_1284728471.30547") :method :outer("54_1284728471.30547") +.annotate 'line', 83 + .local string rx210_tgt + .local int rx210_pos + .local int rx210_off + .local int rx210_eos + .local int rx210_rep + .local pmc rx210_cur + .local pmc rx210_debug + (rx210_cur, rx210_pos, rx210_tgt, $I10) = self."!cursor_start"() + getattribute rx210_debug, rx210_cur, "$!debug" + .lex unicode:"$\x{a2}", rx210_cur + .local pmc match + .lex "$/", match + length rx210_eos, rx210_tgt + gt rx210_pos, rx210_eos, rx210_done + set rx210_off, 0 + lt rx210_pos, 2, rx210_start + sub rx210_off, rx210_pos, 1 + substr rx210_tgt, rx210_tgt, rx210_off + rx210_start: + eq $I10, 1, rx210_restart + if_null rx210_debug, debug_266 + rx210_cur."!cursor_debug"("START", "") + debug_266: $I10 = self.'from'() - ne $I10, -1, rxscan179_done - goto rxscan179_scan - rxscan179_loop: - ($P10) = rx178_cur."from"() - inc $P10 - set rx178_pos, $P10 - ge rx178_pos, rx178_eos, rxscan179_done - rxscan179_scan: - set_addr $I10, rxscan179_loop - rx178_cur."!mark_push"(0, rx178_pos, $I10) - rxscan179_done: + ne $I10, -1, rxscan211_done + goto rxscan211_scan + rxscan211_loop: + ($P10) = rx210_cur."from"() + inc $P10 + set rx210_pos, $P10 + ge rx210_pos, rx210_eos, rxscan211_done + rxscan211_scan: + set_addr $I10, rxscan211_loop + rx210_cur."!mark_push"(0, rx210_pos, $I10) + rxscan211_done: # rx literal ":" - add $I11, rx178_pos, 1 - gt $I11, rx178_eos, rx178_fail - sub $I11, rx178_pos, rx178_off - ord $I11, rx178_tgt, $I11 - ne $I11, 58, rx178_fail - add rx178_pos, 1 - # rx pass - rx178_cur."!cursor_pass"(rx178_pos, "") - if_null rx178_debug, debug_234 - rx178_cur."!cursor_debug"("PASS ", "", " at pos=", rx178_pos) - debug_234: - .return (rx178_cur) - rx178_restart: - if_null rx178_debug, debug_235 - rx178_cur."!cursor_debug"("NEXT ", "") - debug_235: - rx178_fail: - (rx178_rep, rx178_pos, $I10, $P10) = rx178_cur."!mark_fail"(0) - lt rx178_pos, -1, rx178_done - eq rx178_pos, -1, rx178_fail - jump $I10 - rx178_done: - rx178_cur."!cursor_fail"() - if_null rx178_debug, debug_236 - rx178_cur."!cursor_debug"("FAIL ", "") - debug_236: - .return (rx178_cur) + add $I11, rx210_pos, 1 + gt $I11, rx210_eos, rx210_fail + sub $I11, rx210_pos, rx210_off + ord $I11, rx210_tgt, $I11 + ne $I11, 58, rx210_fail + add rx210_pos, 1 + # rx pass + rx210_cur."!cursor_pass"(rx210_pos, "") + if_null rx210_debug, debug_267 + rx210_cur."!cursor_debug"("PASS", "", " at pos=", rx210_pos) + debug_267: + .return (rx210_cur) + rx210_restart: + if_null rx210_debug, debug_268 + rx210_cur."!cursor_debug"("NEXT", "") + debug_268: + rx210_fail: + (rx210_rep, rx210_pos, $I10, $P10) = rx210_cur."!mark_fail"(0) + lt rx210_pos, -1, rx210_done + eq rx210_pos, -1, rx210_fail + jump $I10 + rx210_done: + rx210_cur."!cursor_fail"() + if_null rx210_debug, debug_269 + rx210_cur."!cursor_debug"("FAIL", "") + debug_269: + .return (rx210_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar" :subid("49_1282016522.91354") :method -.annotate 'line', 75 - $P181 = self."!protoregex"("metachar") - .return ($P181) +.sub "metachar" :subid("57_1284728471.30547") :method +.annotate 'line', 85 + $P213 = self."!protoregex"("metachar") + .return ($P213) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar" :subid("50_1282016522.91354") :method -.annotate 'line', 75 - $P183 = self."!PREFIX__!protoregex"("metachar") - .return ($P183) +.sub "!PREFIX__metachar" :subid("58_1284728471.30547") :method +.annotate 'line', 85 + $P215 = self."!PREFIX__!protoregex"("metachar") + .return ($P215) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("51_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("59_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx185_tgt - .local int rx185_pos - .local int rx185_off - .local int rx185_eos - .local int rx185_rep - .local pmc rx185_cur - .local pmc rx185_debug - (rx185_cur, rx185_pos, rx185_tgt, $I10) = self."!cursor_start"() - getattribute rx185_debug, rx185_cur, "$!debug" - .lex unicode:"$\x{a2}", rx185_cur - .local pmc match - .lex "$/", match - length rx185_eos, rx185_tgt - gt rx185_pos, rx185_eos, rx185_done - set rx185_off, 0 - lt rx185_pos, 2, rx185_start - sub rx185_off, rx185_pos, 1 - substr rx185_tgt, rx185_tgt, rx185_off - rx185_start: - eq $I10, 1, rx185_restart - if_null rx185_debug, debug_240 - rx185_cur."!cursor_debug"("START ", "metachar:sym") - debug_240: + .local string rx217_tgt + .local int rx217_pos + .local int rx217_off + .local int rx217_eos + .local int rx217_rep + .local pmc rx217_cur + .local pmc rx217_debug + (rx217_cur, rx217_pos, rx217_tgt, $I10) = self."!cursor_start"() + getattribute rx217_debug, rx217_cur, "$!debug" + .lex unicode:"$\x{a2}", rx217_cur + .local pmc match + .lex "$/", match + length rx217_eos, rx217_tgt + gt rx217_pos, rx217_eos, rx217_done + set rx217_off, 0 + lt rx217_pos, 2, rx217_start + sub rx217_off, rx217_pos, 1 + substr rx217_tgt, rx217_tgt, rx217_off + rx217_start: + eq $I10, 1, rx217_restart + if_null rx217_debug, debug_273 + rx217_cur."!cursor_debug"("START", "metachar:sym") + debug_273: $I10 = self.'from'() - ne $I10, -1, rxscan189_done - goto rxscan189_scan - rxscan189_loop: - ($P10) = rx185_cur."from"() - inc $P10 - set rx185_pos, $P10 - ge rx185_pos, rx185_eos, rxscan189_done - rxscan189_scan: - set_addr $I10, rxscan189_loop - rx185_cur."!mark_push"(0, rx185_pos, $I10) - rxscan189_done: -.annotate 'line', 76 + ne $I10, -1, rxscan221_done + goto rxscan221_scan + rxscan221_loop: + ($P10) = rx217_cur."from"() + inc $P10 + set rx217_pos, $P10 + ge rx217_pos, rx217_eos, rxscan221_done + rxscan221_scan: + set_addr $I10, rxscan221_loop + rx217_cur."!mark_push"(0, rx217_pos, $I10) + rxscan221_done: +.annotate 'line', 86 # rx subrule "normspace" subtype=method negate= - rx185_cur."!cursor_pos"(rx185_pos) - $P10 = rx185_cur."normspace"() - unless $P10, rx185_fail - rx185_pos = $P10."pos"() - # rx pass - rx185_cur."!cursor_pass"(rx185_pos, "metachar:sym") - if_null rx185_debug, debug_241 - rx185_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx185_pos) - debug_241: - .return (rx185_cur) - rx185_restart: + rx217_cur."!cursor_pos"(rx217_pos) + $P10 = rx217_cur."normspace"() + unless $P10, rx217_fail + rx217_pos = $P10."pos"() + # rx pass + rx217_cur."!cursor_pass"(rx217_pos, "metachar:sym") + if_null rx217_debug, debug_274 + rx217_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx217_pos) + debug_274: + .return (rx217_cur) + rx217_restart: .annotate 'line', 3 - if_null rx185_debug, debug_242 - rx185_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_242: - rx185_fail: - (rx185_rep, rx185_pos, $I10, $P10) = rx185_cur."!mark_fail"(0) - lt rx185_pos, -1, rx185_done - eq rx185_pos, -1, rx185_fail - jump $I10 - rx185_done: - rx185_cur."!cursor_fail"() - if_null rx185_debug, debug_243 - rx185_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_243: - .return (rx185_cur) + if_null rx217_debug, debug_275 + rx217_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_275: + rx217_fail: + (rx217_rep, rx217_pos, $I10, $P10) = rx217_cur."!mark_fail"(0) + lt rx217_pos, -1, rx217_done + eq rx217_pos, -1, rx217_fail + jump $I10 + rx217_done: + rx217_cur."!cursor_fail"() + if_null rx217_debug, debug_276 + rx217_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_276: + .return (rx217_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("52_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("60_1284728471.30547") :method .annotate 'line', 3 - $P187 = self."!PREFIX__!subrule"("normspace", "") - new $P188, "ResizablePMCArray" - push $P188, $P187 - .return ($P188) + $P219 = self."!PREFIX__!subrule"("normspace", "") + new $P220, "ResizablePMCArray" + push $P220, $P219 + .return ($P220) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<[ ]>" :subid("53_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<[ ]>" :subid("61_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx191_tgt - .local int rx191_pos - .local int rx191_off - .local int rx191_eos - .local int rx191_rep - .local pmc rx191_cur - .local pmc rx191_debug - (rx191_cur, rx191_pos, rx191_tgt, $I10) = self."!cursor_start"() - getattribute rx191_debug, rx191_cur, "$!debug" - .lex unicode:"$\x{a2}", rx191_cur + .local string rx223_tgt + .local int rx223_pos + .local int rx223_off + .local int rx223_eos + .local int rx223_rep + .local pmc rx223_cur + .local pmc rx223_debug + (rx223_cur, rx223_pos, rx223_tgt, $I10) = self."!cursor_start"() + getattribute rx223_debug, rx223_cur, "$!debug" + .lex unicode:"$\x{a2}", rx223_cur .local pmc match .lex "$/", match - length rx191_eos, rx191_tgt - gt rx191_pos, rx191_eos, rx191_done - set rx191_off, 0 - lt rx191_pos, 2, rx191_start - sub rx191_off, rx191_pos, 1 - substr rx191_tgt, rx191_tgt, rx191_off - rx191_start: - eq $I10, 1, rx191_restart - if_null rx191_debug, debug_244 - rx191_cur."!cursor_debug"("START ", "metachar:sym<[ ]>") - debug_244: + length rx223_eos, rx223_tgt + gt rx223_pos, rx223_eos, rx223_done + set rx223_off, 0 + lt rx223_pos, 2, rx223_start + sub rx223_off, rx223_pos, 1 + substr rx223_tgt, rx223_tgt, rx223_off + rx223_start: + eq $I10, 1, rx223_restart + if_null rx223_debug, debug_277 + rx223_cur."!cursor_debug"("START", "metachar:sym<[ ]>") + debug_277: $I10 = self.'from'() - ne $I10, -1, rxscan195_done - goto rxscan195_scan - rxscan195_loop: - ($P10) = rx191_cur."from"() - inc $P10 - set rx191_pos, $P10 - ge rx191_pos, rx191_eos, rxscan195_done - rxscan195_scan: - set_addr $I10, rxscan195_loop - rx191_cur."!mark_push"(0, rx191_pos, $I10) - rxscan195_done: -.annotate 'line', 77 + ne $I10, -1, rxscan227_done + goto rxscan227_scan + rxscan227_loop: + ($P10) = rx223_cur."from"() + inc $P10 + set rx223_pos, $P10 + ge rx223_pos, rx223_eos, rxscan227_done + rxscan227_scan: + set_addr $I10, rxscan227_loop + rx223_cur."!mark_push"(0, rx223_pos, $I10) + rxscan227_done: +.annotate 'line', 87 # rx literal "[" - add $I11, rx191_pos, 1 - gt $I11, rx191_eos, rx191_fail - sub $I11, rx191_pos, rx191_off - ord $I11, rx191_tgt, $I11 - ne $I11, 91, rx191_fail - add rx191_pos, 1 + add $I11, rx223_pos, 1 + gt $I11, rx223_eos, rx223_fail + sub $I11, rx223_pos, rx223_off + ord $I11, rx223_tgt, $I11 + ne $I11, 91, rx223_fail + add rx223_pos, 1 # rx subrule "nibbler" subtype=capture negate= - rx191_cur."!cursor_pos"(rx191_pos) - $P10 = rx191_cur."nibbler"() - unless $P10, rx191_fail - rx191_cur."!mark_push"(0, -1, 0, $P10) + rx223_cur."!cursor_pos"(rx223_pos) + $P10 = rx223_cur."nibbler"() + unless $P10, rx223_fail + rx223_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("nibbler") - rx191_pos = $P10."pos"() + rx223_pos = $P10."pos"() # rx literal "]" - add $I11, rx191_pos, 1 - gt $I11, rx191_eos, rx191_fail - sub $I11, rx191_pos, rx191_off - ord $I11, rx191_tgt, $I11 - ne $I11, 93, rx191_fail - add rx191_pos, 1 - # rx pass - rx191_cur."!cursor_pass"(rx191_pos, "metachar:sym<[ ]>") - if_null rx191_debug, debug_245 - rx191_cur."!cursor_debug"("PASS ", "metachar:sym<[ ]>", " at pos=", rx191_pos) - debug_245: - .return (rx191_cur) - rx191_restart: + add $I11, rx223_pos, 1 + gt $I11, rx223_eos, rx223_fail + sub $I11, rx223_pos, rx223_off + ord $I11, rx223_tgt, $I11 + ne $I11, 93, rx223_fail + add rx223_pos, 1 + # rx pass + rx223_cur."!cursor_pass"(rx223_pos, "metachar:sym<[ ]>") + if_null rx223_debug, debug_278 + rx223_cur."!cursor_debug"("PASS", "metachar:sym<[ ]>", " at pos=", rx223_pos) + debug_278: + .return (rx223_cur) + rx223_restart: .annotate 'line', 3 - if_null rx191_debug, debug_246 - rx191_cur."!cursor_debug"("NEXT ", "metachar:sym<[ ]>") - debug_246: - rx191_fail: - (rx191_rep, rx191_pos, $I10, $P10) = rx191_cur."!mark_fail"(0) - lt rx191_pos, -1, rx191_done - eq rx191_pos, -1, rx191_fail - jump $I10 - rx191_done: - rx191_cur."!cursor_fail"() - if_null rx191_debug, debug_247 - rx191_cur."!cursor_debug"("FAIL ", "metachar:sym<[ ]>") - debug_247: - .return (rx191_cur) + if_null rx223_debug, debug_279 + rx223_cur."!cursor_debug"("NEXT", "metachar:sym<[ ]>") + debug_279: + rx223_fail: + (rx223_rep, rx223_pos, $I10, $P10) = rx223_cur."!mark_fail"(0) + lt rx223_pos, -1, rx223_done + eq rx223_pos, -1, rx223_fail + jump $I10 + rx223_done: + rx223_cur."!cursor_fail"() + if_null rx223_debug, debug_280 + rx223_cur."!cursor_debug"("FAIL", "metachar:sym<[ ]>") + debug_280: + .return (rx223_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<[ ]>" :subid("54_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<[ ]>" :subid("62_1284728471.30547") :method .annotate 'line', 3 - $P193 = self."!PREFIX__!subrule"("nibbler", "[") - new $P194, "ResizablePMCArray" - push $P194, $P193 - .return ($P194) + $P225 = self."!PREFIX__!subrule"("nibbler", "[") + new $P226, "ResizablePMCArray" + push $P226, $P225 + .return ($P226) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<( )>" :subid("55_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<( )>" :subid("63_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx197_tgt - .local int rx197_pos - .local int rx197_off - .local int rx197_eos - .local int rx197_rep - .local pmc rx197_cur - .local pmc rx197_debug - (rx197_cur, rx197_pos, rx197_tgt, $I10) = self."!cursor_start"() - getattribute rx197_debug, rx197_cur, "$!debug" - .lex unicode:"$\x{a2}", rx197_cur - .local pmc match - .lex "$/", match - length rx197_eos, rx197_tgt - gt rx197_pos, rx197_eos, rx197_done - set rx197_off, 0 - lt rx197_pos, 2, rx197_start - sub rx197_off, rx197_pos, 1 - substr rx197_tgt, rx197_tgt, rx197_off - rx197_start: - eq $I10, 1, rx197_restart - if_null rx197_debug, debug_248 - rx197_cur."!cursor_debug"("START ", "metachar:sym<( )>") - debug_248: + .local string rx229_tgt + .local int rx229_pos + .local int rx229_off + .local int rx229_eos + .local int rx229_rep + .local pmc rx229_cur + .local pmc rx229_debug + (rx229_cur, rx229_pos, rx229_tgt, $I10) = self."!cursor_start"() + getattribute rx229_debug, rx229_cur, "$!debug" + .lex unicode:"$\x{a2}", rx229_cur + .local pmc match + .lex "$/", match + length rx229_eos, rx229_tgt + gt rx229_pos, rx229_eos, rx229_done + set rx229_off, 0 + lt rx229_pos, 2, rx229_start + sub rx229_off, rx229_pos, 1 + substr rx229_tgt, rx229_tgt, rx229_off + rx229_start: + eq $I10, 1, rx229_restart + if_null rx229_debug, debug_281 + rx229_cur."!cursor_debug"("START", "metachar:sym<( )>") + debug_281: $I10 = self.'from'() - ne $I10, -1, rxscan201_done - goto rxscan201_scan - rxscan201_loop: - ($P10) = rx197_cur."from"() - inc $P10 - set rx197_pos, $P10 - ge rx197_pos, rx197_eos, rxscan201_done - rxscan201_scan: - set_addr $I10, rxscan201_loop - rx197_cur."!mark_push"(0, rx197_pos, $I10) - rxscan201_done: -.annotate 'line', 78 + ne $I10, -1, rxscan233_done + goto rxscan233_scan + rxscan233_loop: + ($P10) = rx229_cur."from"() + inc $P10 + set rx229_pos, $P10 + ge rx229_pos, rx229_eos, rxscan233_done + rxscan233_scan: + set_addr $I10, rxscan233_loop + rx229_cur."!mark_push"(0, rx229_pos, $I10) + rxscan233_done: +.annotate 'line', 88 # rx literal "(" - add $I11, rx197_pos, 1 - gt $I11, rx197_eos, rx197_fail - sub $I11, rx197_pos, rx197_off - ord $I11, rx197_tgt, $I11 - ne $I11, 40, rx197_fail - add rx197_pos, 1 + add $I11, rx229_pos, 1 + gt $I11, rx229_eos, rx229_fail + sub $I11, rx229_pos, rx229_off + ord $I11, rx229_tgt, $I11 + ne $I11, 40, rx229_fail + add rx229_pos, 1 # rx subrule "nibbler" subtype=capture negate= - rx197_cur."!cursor_pos"(rx197_pos) - $P10 = rx197_cur."nibbler"() - unless $P10, rx197_fail - rx197_cur."!mark_push"(0, -1, 0, $P10) + rx229_cur."!cursor_pos"(rx229_pos) + $P10 = rx229_cur."nibbler"() + unless $P10, rx229_fail + rx229_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("nibbler") - rx197_pos = $P10."pos"() + rx229_pos = $P10."pos"() # rx literal ")" - add $I11, rx197_pos, 1 - gt $I11, rx197_eos, rx197_fail - sub $I11, rx197_pos, rx197_off - ord $I11, rx197_tgt, $I11 - ne $I11, 41, rx197_fail - add rx197_pos, 1 - # rx pass - rx197_cur."!cursor_pass"(rx197_pos, "metachar:sym<( )>") - if_null rx197_debug, debug_249 - rx197_cur."!cursor_debug"("PASS ", "metachar:sym<( )>", " at pos=", rx197_pos) - debug_249: - .return (rx197_cur) - rx197_restart: + add $I11, rx229_pos, 1 + gt $I11, rx229_eos, rx229_fail + sub $I11, rx229_pos, rx229_off + ord $I11, rx229_tgt, $I11 + ne $I11, 41, rx229_fail + add rx229_pos, 1 + # rx pass + rx229_cur."!cursor_pass"(rx229_pos, "metachar:sym<( )>") + if_null rx229_debug, debug_282 + rx229_cur."!cursor_debug"("PASS", "metachar:sym<( )>", " at pos=", rx229_pos) + debug_282: + .return (rx229_cur) + rx229_restart: .annotate 'line', 3 - if_null rx197_debug, debug_250 - rx197_cur."!cursor_debug"("NEXT ", "metachar:sym<( )>") - debug_250: - rx197_fail: - (rx197_rep, rx197_pos, $I10, $P10) = rx197_cur."!mark_fail"(0) - lt rx197_pos, -1, rx197_done - eq rx197_pos, -1, rx197_fail - jump $I10 - rx197_done: - rx197_cur."!cursor_fail"() - if_null rx197_debug, debug_251 - rx197_cur."!cursor_debug"("FAIL ", "metachar:sym<( )>") - debug_251: - .return (rx197_cur) + if_null rx229_debug, debug_283 + rx229_cur."!cursor_debug"("NEXT", "metachar:sym<( )>") + debug_283: + rx229_fail: + (rx229_rep, rx229_pos, $I10, $P10) = rx229_cur."!mark_fail"(0) + lt rx229_pos, -1, rx229_done + eq rx229_pos, -1, rx229_fail + jump $I10 + rx229_done: + rx229_cur."!cursor_fail"() + if_null rx229_debug, debug_284 + rx229_cur."!cursor_debug"("FAIL", "metachar:sym<( )>") + debug_284: + .return (rx229_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<( )>" :subid("56_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<( )>" :subid("64_1284728471.30547") :method .annotate 'line', 3 - $P199 = self."!PREFIX__!subrule"("nibbler", "(") - new $P200, "ResizablePMCArray" - push $P200, $P199 - .return ($P200) + $P231 = self."!PREFIX__!subrule"("nibbler", "(") + new $P232, "ResizablePMCArray" + push $P232, $P231 + .return ($P232) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<'>" :subid("57_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<'>" :subid("65_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx203_tgt - .local int rx203_pos - .local int rx203_off - .local int rx203_eos - .local int rx203_rep - .local pmc rx203_cur - .local pmc rx203_debug - (rx203_cur, rx203_pos, rx203_tgt, $I10) = self."!cursor_start"() - getattribute rx203_debug, rx203_cur, "$!debug" - .lex unicode:"$\x{a2}", rx203_cur + .local string rx235_tgt + .local int rx235_pos + .local int rx235_off + .local int rx235_eos + .local int rx235_rep + .local pmc rx235_cur + .local pmc rx235_debug + (rx235_cur, rx235_pos, rx235_tgt, $I10) = self."!cursor_start"() + getattribute rx235_debug, rx235_cur, "$!debug" + .lex unicode:"$\x{a2}", rx235_cur .local pmc match .lex "$/", match - length rx203_eos, rx203_tgt - gt rx203_pos, rx203_eos, rx203_done - set rx203_off, 0 - lt rx203_pos, 2, rx203_start - sub rx203_off, rx203_pos, 1 - substr rx203_tgt, rx203_tgt, rx203_off - rx203_start: - eq $I10, 1, rx203_restart - if_null rx203_debug, debug_252 - rx203_cur."!cursor_debug"("START ", "metachar:sym<'>") - debug_252: + length rx235_eos, rx235_tgt + gt rx235_pos, rx235_eos, rx235_done + set rx235_off, 0 + lt rx235_pos, 2, rx235_start + sub rx235_off, rx235_pos, 1 + substr rx235_tgt, rx235_tgt, rx235_off + rx235_start: + eq $I10, 1, rx235_restart + if_null rx235_debug, debug_285 + rx235_cur."!cursor_debug"("START", "metachar:sym<'>") + debug_285: $I10 = self.'from'() - ne $I10, -1, rxscan206_done - goto rxscan206_scan - rxscan206_loop: - ($P10) = rx203_cur."from"() - inc $P10 - set rx203_pos, $P10 - ge rx203_pos, rx203_eos, rxscan206_done - rxscan206_scan: - set_addr $I10, rxscan206_loop - rx203_cur."!mark_push"(0, rx203_pos, $I10) - rxscan206_done: -.annotate 'line', 79 + ne $I10, -1, rxscan238_done + goto rxscan238_scan + rxscan238_loop: + ($P10) = rx235_cur."from"() + inc $P10 + set rx235_pos, $P10 + ge rx235_pos, rx235_eos, rxscan238_done + rxscan238_scan: + set_addr $I10, rxscan238_loop + rx235_cur."!mark_push"(0, rx235_pos, $I10) + rxscan238_done: +.annotate 'line', 89 # rx enumcharlist negate=0 zerowidth - ge rx203_pos, rx203_eos, rx203_fail - sub $I10, rx203_pos, rx203_off - substr $S10, rx203_tgt, $I10, 1 + sub $I10, rx235_pos, rx235_off + substr $S10, rx235_tgt, $I10, 1 index $I11, "'", $S10 - lt $I11, 0, rx203_fail + lt $I11, 0, rx235_fail # rx subrule "quote_EXPR" subtype=capture negate= - rx203_cur."!cursor_pos"(rx203_pos) - $P10 = rx203_cur."quote_EXPR"(":q") - unless $P10, rx203_fail - rx203_cur."!mark_push"(0, -1, 0, $P10) + rx235_cur."!cursor_pos"(rx235_pos) + $P10 = rx235_cur."quote_EXPR"(":q") + unless $P10, rx235_fail + rx235_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quote_EXPR") - rx203_pos = $P10."pos"() + rx235_pos = $P10."pos"() # rx pass - rx203_cur."!cursor_pass"(rx203_pos, "metachar:sym<'>") - if_null rx203_debug, debug_253 - rx203_cur."!cursor_debug"("PASS ", "metachar:sym<'>", " at pos=", rx203_pos) - debug_253: - .return (rx203_cur) - rx203_restart: + rx235_cur."!cursor_pass"(rx235_pos, "metachar:sym<'>") + if_null rx235_debug, debug_286 + rx235_cur."!cursor_debug"("PASS", "metachar:sym<'>", " at pos=", rx235_pos) + debug_286: + .return (rx235_cur) + rx235_restart: .annotate 'line', 3 - if_null rx203_debug, debug_254 - rx203_cur."!cursor_debug"("NEXT ", "metachar:sym<'>") - debug_254: - rx203_fail: - (rx203_rep, rx203_pos, $I10, $P10) = rx203_cur."!mark_fail"(0) - lt rx203_pos, -1, rx203_done - eq rx203_pos, -1, rx203_fail - jump $I10 - rx203_done: - rx203_cur."!cursor_fail"() - if_null rx203_debug, debug_255 - rx203_cur."!cursor_debug"("FAIL ", "metachar:sym<'>") - debug_255: - .return (rx203_cur) + if_null rx235_debug, debug_287 + rx235_cur."!cursor_debug"("NEXT", "metachar:sym<'>") + debug_287: + rx235_fail: + (rx235_rep, rx235_pos, $I10, $P10) = rx235_cur."!mark_fail"(0) + lt rx235_pos, -1, rx235_done + eq rx235_pos, -1, rx235_fail + jump $I10 + rx235_done: + rx235_cur."!cursor_fail"() + if_null rx235_debug, debug_288 + rx235_cur."!cursor_debug"("FAIL", "metachar:sym<'>") + debug_288: + .return (rx235_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<'>" :subid("58_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<'>" :subid("66_1284728471.30547") :method .annotate 'line', 3 - new $P205, "ResizablePMCArray" - push $P205, "'" - .return ($P205) + new $P237, "ResizablePMCArray" + push $P237, "'" + .return ($P237) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<\">" :subid("59_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<\">" :subid("67_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx208_tgt - .local int rx208_pos - .local int rx208_off - .local int rx208_eos - .local int rx208_rep - .local pmc rx208_cur - .local pmc rx208_debug - (rx208_cur, rx208_pos, rx208_tgt, $I10) = self."!cursor_start"() - getattribute rx208_debug, rx208_cur, "$!debug" - .lex unicode:"$\x{a2}", rx208_cur + .local string rx240_tgt + .local int rx240_pos + .local int rx240_off + .local int rx240_eos + .local int rx240_rep + .local pmc rx240_cur + .local pmc rx240_debug + (rx240_cur, rx240_pos, rx240_tgt, $I10) = self."!cursor_start"() + getattribute rx240_debug, rx240_cur, "$!debug" + .lex unicode:"$\x{a2}", rx240_cur .local pmc match .lex "$/", match - length rx208_eos, rx208_tgt - gt rx208_pos, rx208_eos, rx208_done - set rx208_off, 0 - lt rx208_pos, 2, rx208_start - sub rx208_off, rx208_pos, 1 - substr rx208_tgt, rx208_tgt, rx208_off - rx208_start: - eq $I10, 1, rx208_restart - if_null rx208_debug, debug_256 - rx208_cur."!cursor_debug"("START ", "metachar:sym<\">") - debug_256: + length rx240_eos, rx240_tgt + gt rx240_pos, rx240_eos, rx240_done + set rx240_off, 0 + lt rx240_pos, 2, rx240_start + sub rx240_off, rx240_pos, 1 + substr rx240_tgt, rx240_tgt, rx240_off + rx240_start: + eq $I10, 1, rx240_restart + if_null rx240_debug, debug_289 + rx240_cur."!cursor_debug"("START", "metachar:sym<\">") + debug_289: $I10 = self.'from'() - ne $I10, -1, rxscan211_done - goto rxscan211_scan - rxscan211_loop: - ($P10) = rx208_cur."from"() - inc $P10 - set rx208_pos, $P10 - ge rx208_pos, rx208_eos, rxscan211_done - rxscan211_scan: - set_addr $I10, rxscan211_loop - rx208_cur."!mark_push"(0, rx208_pos, $I10) - rxscan211_done: -.annotate 'line', 80 + ne $I10, -1, rxscan243_done + goto rxscan243_scan + rxscan243_loop: + ($P10) = rx240_cur."from"() + inc $P10 + set rx240_pos, $P10 + ge rx240_pos, rx240_eos, rxscan243_done + rxscan243_scan: + set_addr $I10, rxscan243_loop + rx240_cur."!mark_push"(0, rx240_pos, $I10) + rxscan243_done: +.annotate 'line', 90 # rx enumcharlist negate=0 zerowidth - ge rx208_pos, rx208_eos, rx208_fail - sub $I10, rx208_pos, rx208_off - substr $S10, rx208_tgt, $I10, 1 + sub $I10, rx240_pos, rx240_off + substr $S10, rx240_tgt, $I10, 1 index $I11, "\"", $S10 - lt $I11, 0, rx208_fail + lt $I11, 0, rx240_fail # rx subrule "quote_EXPR" subtype=capture negate= - rx208_cur."!cursor_pos"(rx208_pos) - $P10 = rx208_cur."quote_EXPR"(":qq") - unless $P10, rx208_fail - rx208_cur."!mark_push"(0, -1, 0, $P10) + rx240_cur."!cursor_pos"(rx240_pos) + $P10 = rx240_cur."quote_EXPR"(":qq") + unless $P10, rx240_fail + rx240_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quote_EXPR") - rx208_pos = $P10."pos"() + rx240_pos = $P10."pos"() # rx pass - rx208_cur."!cursor_pass"(rx208_pos, "metachar:sym<\">") - if_null rx208_debug, debug_257 - rx208_cur."!cursor_debug"("PASS ", "metachar:sym<\">", " at pos=", rx208_pos) - debug_257: - .return (rx208_cur) - rx208_restart: + rx240_cur."!cursor_pass"(rx240_pos, "metachar:sym<\">") + if_null rx240_debug, debug_290 + rx240_cur."!cursor_debug"("PASS", "metachar:sym<\">", " at pos=", rx240_pos) + debug_290: + .return (rx240_cur) + rx240_restart: .annotate 'line', 3 - if_null rx208_debug, debug_258 - rx208_cur."!cursor_debug"("NEXT ", "metachar:sym<\">") - debug_258: - rx208_fail: - (rx208_rep, rx208_pos, $I10, $P10) = rx208_cur."!mark_fail"(0) - lt rx208_pos, -1, rx208_done - eq rx208_pos, -1, rx208_fail - jump $I10 - rx208_done: - rx208_cur."!cursor_fail"() - if_null rx208_debug, debug_259 - rx208_cur."!cursor_debug"("FAIL ", "metachar:sym<\">") - debug_259: - .return (rx208_cur) + if_null rx240_debug, debug_291 + rx240_cur."!cursor_debug"("NEXT", "metachar:sym<\">") + debug_291: + rx240_fail: + (rx240_rep, rx240_pos, $I10, $P10) = rx240_cur."!mark_fail"(0) + lt rx240_pos, -1, rx240_done + eq rx240_pos, -1, rx240_fail + jump $I10 + rx240_done: + rx240_cur."!cursor_fail"() + if_null rx240_debug, debug_292 + rx240_cur."!cursor_debug"("FAIL", "metachar:sym<\">") + debug_292: + .return (rx240_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<\">" :subid("60_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<\">" :subid("68_1284728471.30547") :method .annotate 'line', 3 - new $P210, "ResizablePMCArray" - push $P210, "\"" - .return ($P210) + new $P242, "ResizablePMCArray" + push $P242, "\"" + .return ($P242) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<.>" :subid("61_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<.>" :subid("69_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx213_tgt - .local int rx213_pos - .local int rx213_off - .local int rx213_eos - .local int rx213_rep - .local pmc rx213_cur - .local pmc rx213_debug - (rx213_cur, rx213_pos, rx213_tgt, $I10) = self."!cursor_start"() - getattribute rx213_debug, rx213_cur, "$!debug" - .lex unicode:"$\x{a2}", rx213_cur + .local string rx245_tgt + .local int rx245_pos + .local int rx245_off + .local int rx245_eos + .local int rx245_rep + .local pmc rx245_cur + .local pmc rx245_debug + (rx245_cur, rx245_pos, rx245_tgt, $I10) = self."!cursor_start"() + getattribute rx245_debug, rx245_cur, "$!debug" + .lex unicode:"$\x{a2}", rx245_cur .local pmc match .lex "$/", match - length rx213_eos, rx213_tgt - gt rx213_pos, rx213_eos, rx213_done - set rx213_off, 0 - lt rx213_pos, 2, rx213_start - sub rx213_off, rx213_pos, 1 - substr rx213_tgt, rx213_tgt, rx213_off - rx213_start: - eq $I10, 1, rx213_restart - if_null rx213_debug, debug_260 - rx213_cur."!cursor_debug"("START ", "metachar:sym<.>") - debug_260: + length rx245_eos, rx245_tgt + gt rx245_pos, rx245_eos, rx245_done + set rx245_off, 0 + lt rx245_pos, 2, rx245_start + sub rx245_off, rx245_pos, 1 + substr rx245_tgt, rx245_tgt, rx245_off + rx245_start: + eq $I10, 1, rx245_restart + if_null rx245_debug, debug_293 + rx245_cur."!cursor_debug"("START", "metachar:sym<.>") + debug_293: $I10 = self.'from'() - ne $I10, -1, rxscan216_done - goto rxscan216_scan - rxscan216_loop: - ($P10) = rx213_cur."from"() - inc $P10 - set rx213_pos, $P10 - ge rx213_pos, rx213_eos, rxscan216_done - rxscan216_scan: - set_addr $I10, rxscan216_loop - rx213_cur."!mark_push"(0, rx213_pos, $I10) - rxscan216_done: -.annotate 'line', 81 + ne $I10, -1, rxscan248_done + goto rxscan248_scan + rxscan248_loop: + ($P10) = rx245_cur."from"() + inc $P10 + set rx245_pos, $P10 + ge rx245_pos, rx245_eos, rxscan248_done + rxscan248_scan: + set_addr $I10, rxscan248_loop + rx245_cur."!mark_push"(0, rx245_pos, $I10) + rxscan248_done: +.annotate 'line', 91 # rx subcapture "sym" - set_addr $I10, rxcap_217_fail - rx213_cur."!mark_push"(0, rx213_pos, $I10) + set_addr $I10, rxcap_249_fail + rx245_cur."!mark_push"(0, rx245_pos, $I10) # rx literal "." - add $I11, rx213_pos, 1 - gt $I11, rx213_eos, rx213_fail - sub $I11, rx213_pos, rx213_off - ord $I11, rx213_tgt, $I11 - ne $I11, 46, rx213_fail - add rx213_pos, 1 - set_addr $I10, rxcap_217_fail - ($I12, $I11) = rx213_cur."!mark_peek"($I10) - rx213_cur."!cursor_pos"($I11) - ($P10) = rx213_cur."!cursor_start"() - $P10."!cursor_pass"(rx213_pos, "") - rx213_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx245_pos, 1 + gt $I11, rx245_eos, rx245_fail + sub $I11, rx245_pos, rx245_off + ord $I11, rx245_tgt, $I11 + ne $I11, 46, rx245_fail + add rx245_pos, 1 + set_addr $I10, rxcap_249_fail + ($I12, $I11) = rx245_cur."!mark_peek"($I10) + rx245_cur."!cursor_pos"($I11) + ($P10) = rx245_cur."!cursor_start"() + $P10."!cursor_pass"(rx245_pos, "") + rx245_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_217_done - rxcap_217_fail: - goto rx213_fail - rxcap_217_done: - # rx pass - rx213_cur."!cursor_pass"(rx213_pos, "metachar:sym<.>") - if_null rx213_debug, debug_261 - rx213_cur."!cursor_debug"("PASS ", "metachar:sym<.>", " at pos=", rx213_pos) - debug_261: - .return (rx213_cur) - rx213_restart: + goto rxcap_249_done + rxcap_249_fail: + goto rx245_fail + rxcap_249_done: + # rx pass + rx245_cur."!cursor_pass"(rx245_pos, "metachar:sym<.>") + if_null rx245_debug, debug_294 + rx245_cur."!cursor_debug"("PASS", "metachar:sym<.>", " at pos=", rx245_pos) + debug_294: + .return (rx245_cur) + rx245_restart: .annotate 'line', 3 - if_null rx213_debug, debug_262 - rx213_cur."!cursor_debug"("NEXT ", "metachar:sym<.>") - debug_262: - rx213_fail: - (rx213_rep, rx213_pos, $I10, $P10) = rx213_cur."!mark_fail"(0) - lt rx213_pos, -1, rx213_done - eq rx213_pos, -1, rx213_fail - jump $I10 - rx213_done: - rx213_cur."!cursor_fail"() - if_null rx213_debug, debug_263 - rx213_cur."!cursor_debug"("FAIL ", "metachar:sym<.>") - debug_263: - .return (rx213_cur) + if_null rx245_debug, debug_295 + rx245_cur."!cursor_debug"("NEXT", "metachar:sym<.>") + debug_295: + rx245_fail: + (rx245_rep, rx245_pos, $I10, $P10) = rx245_cur."!mark_fail"(0) + lt rx245_pos, -1, rx245_done + eq rx245_pos, -1, rx245_fail + jump $I10 + rx245_done: + rx245_cur."!cursor_fail"() + if_null rx245_debug, debug_296 + rx245_cur."!cursor_debug"("FAIL", "metachar:sym<.>") + debug_296: + .return (rx245_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<.>" :subid("62_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<.>" :subid("70_1284728471.30547") :method .annotate 'line', 3 - new $P215, "ResizablePMCArray" - push $P215, "." - .return ($P215) + new $P247, "ResizablePMCArray" + push $P247, "." + .return ($P247) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<^>" :subid("63_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<^>" :subid("71_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx219_tgt - .local int rx219_pos - .local int rx219_off - .local int rx219_eos - .local int rx219_rep - .local pmc rx219_cur - .local pmc rx219_debug - (rx219_cur, rx219_pos, rx219_tgt, $I10) = self."!cursor_start"() - getattribute rx219_debug, rx219_cur, "$!debug" - .lex unicode:"$\x{a2}", rx219_cur - .local pmc match - .lex "$/", match - length rx219_eos, rx219_tgt - gt rx219_pos, rx219_eos, rx219_done - set rx219_off, 0 - lt rx219_pos, 2, rx219_start - sub rx219_off, rx219_pos, 1 - substr rx219_tgt, rx219_tgt, rx219_off - rx219_start: - eq $I10, 1, rx219_restart - if_null rx219_debug, debug_264 - rx219_cur."!cursor_debug"("START ", "metachar:sym<^>") - debug_264: + .local string rx251_tgt + .local int rx251_pos + .local int rx251_off + .local int rx251_eos + .local int rx251_rep + .local pmc rx251_cur + .local pmc rx251_debug + (rx251_cur, rx251_pos, rx251_tgt, $I10) = self."!cursor_start"() + getattribute rx251_debug, rx251_cur, "$!debug" + .lex unicode:"$\x{a2}", rx251_cur + .local pmc match + .lex "$/", match + length rx251_eos, rx251_tgt + gt rx251_pos, rx251_eos, rx251_done + set rx251_off, 0 + lt rx251_pos, 2, rx251_start + sub rx251_off, rx251_pos, 1 + substr rx251_tgt, rx251_tgt, rx251_off + rx251_start: + eq $I10, 1, rx251_restart + if_null rx251_debug, debug_297 + rx251_cur."!cursor_debug"("START", "metachar:sym<^>") + debug_297: $I10 = self.'from'() - ne $I10, -1, rxscan222_done - goto rxscan222_scan - rxscan222_loop: - ($P10) = rx219_cur."from"() - inc $P10 - set rx219_pos, $P10 - ge rx219_pos, rx219_eos, rxscan222_done - rxscan222_scan: - set_addr $I10, rxscan222_loop - rx219_cur."!mark_push"(0, rx219_pos, $I10) - rxscan222_done: -.annotate 'line', 82 + ne $I10, -1, rxscan254_done + goto rxscan254_scan + rxscan254_loop: + ($P10) = rx251_cur."from"() + inc $P10 + set rx251_pos, $P10 + ge rx251_pos, rx251_eos, rxscan254_done + rxscan254_scan: + set_addr $I10, rxscan254_loop + rx251_cur."!mark_push"(0, rx251_pos, $I10) + rxscan254_done: +.annotate 'line', 92 # rx subcapture "sym" - set_addr $I10, rxcap_223_fail - rx219_cur."!mark_push"(0, rx219_pos, $I10) + set_addr $I10, rxcap_255_fail + rx251_cur."!mark_push"(0, rx251_pos, $I10) # rx literal "^" - add $I11, rx219_pos, 1 - gt $I11, rx219_eos, rx219_fail - sub $I11, rx219_pos, rx219_off - ord $I11, rx219_tgt, $I11 - ne $I11, 94, rx219_fail - add rx219_pos, 1 - set_addr $I10, rxcap_223_fail - ($I12, $I11) = rx219_cur."!mark_peek"($I10) - rx219_cur."!cursor_pos"($I11) - ($P10) = rx219_cur."!cursor_start"() - $P10."!cursor_pass"(rx219_pos, "") - rx219_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx251_pos, 1 + gt $I11, rx251_eos, rx251_fail + sub $I11, rx251_pos, rx251_off + ord $I11, rx251_tgt, $I11 + ne $I11, 94, rx251_fail + add rx251_pos, 1 + set_addr $I10, rxcap_255_fail + ($I12, $I11) = rx251_cur."!mark_peek"($I10) + rx251_cur."!cursor_pos"($I11) + ($P10) = rx251_cur."!cursor_start"() + $P10."!cursor_pass"(rx251_pos, "") + rx251_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_223_done - rxcap_223_fail: - goto rx219_fail - rxcap_223_done: - # rx pass - rx219_cur."!cursor_pass"(rx219_pos, "metachar:sym<^>") - if_null rx219_debug, debug_265 - rx219_cur."!cursor_debug"("PASS ", "metachar:sym<^>", " at pos=", rx219_pos) - debug_265: - .return (rx219_cur) - rx219_restart: + goto rxcap_255_done + rxcap_255_fail: + goto rx251_fail + rxcap_255_done: + # rx pass + rx251_cur."!cursor_pass"(rx251_pos, "metachar:sym<^>") + if_null rx251_debug, debug_298 + rx251_cur."!cursor_debug"("PASS", "metachar:sym<^>", " at pos=", rx251_pos) + debug_298: + .return (rx251_cur) + rx251_restart: .annotate 'line', 3 - if_null rx219_debug, debug_266 - rx219_cur."!cursor_debug"("NEXT ", "metachar:sym<^>") - debug_266: - rx219_fail: - (rx219_rep, rx219_pos, $I10, $P10) = rx219_cur."!mark_fail"(0) - lt rx219_pos, -1, rx219_done - eq rx219_pos, -1, rx219_fail - jump $I10 - rx219_done: - rx219_cur."!cursor_fail"() - if_null rx219_debug, debug_267 - rx219_cur."!cursor_debug"("FAIL ", "metachar:sym<^>") - debug_267: - .return (rx219_cur) + if_null rx251_debug, debug_299 + rx251_cur."!cursor_debug"("NEXT", "metachar:sym<^>") + debug_299: + rx251_fail: + (rx251_rep, rx251_pos, $I10, $P10) = rx251_cur."!mark_fail"(0) + lt rx251_pos, -1, rx251_done + eq rx251_pos, -1, rx251_fail + jump $I10 + rx251_done: + rx251_cur."!cursor_fail"() + if_null rx251_debug, debug_300 + rx251_cur."!cursor_debug"("FAIL", "metachar:sym<^>") + debug_300: + .return (rx251_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<^>" :subid("64_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<^>" :subid("72_1284728471.30547") :method .annotate 'line', 3 - new $P221, "ResizablePMCArray" - push $P221, "^" - .return ($P221) + new $P253, "ResizablePMCArray" + push $P253, "^" + .return ($P253) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<^^>" :subid("65_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<^^>" :subid("73_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx225_tgt - .local int rx225_pos - .local int rx225_off - .local int rx225_eos - .local int rx225_rep - .local pmc rx225_cur - .local pmc rx225_debug - (rx225_cur, rx225_pos, rx225_tgt, $I10) = self."!cursor_start"() - getattribute rx225_debug, rx225_cur, "$!debug" - .lex unicode:"$\x{a2}", rx225_cur + .local string rx257_tgt + .local int rx257_pos + .local int rx257_off + .local int rx257_eos + .local int rx257_rep + .local pmc rx257_cur + .local pmc rx257_debug + (rx257_cur, rx257_pos, rx257_tgt, $I10) = self."!cursor_start"() + getattribute rx257_debug, rx257_cur, "$!debug" + .lex unicode:"$\x{a2}", rx257_cur .local pmc match .lex "$/", match - length rx225_eos, rx225_tgt - gt rx225_pos, rx225_eos, rx225_done - set rx225_off, 0 - lt rx225_pos, 2, rx225_start - sub rx225_off, rx225_pos, 1 - substr rx225_tgt, rx225_tgt, rx225_off - rx225_start: - eq $I10, 1, rx225_restart - if_null rx225_debug, debug_268 - rx225_cur."!cursor_debug"("START ", "metachar:sym<^^>") - debug_268: + length rx257_eos, rx257_tgt + gt rx257_pos, rx257_eos, rx257_done + set rx257_off, 0 + lt rx257_pos, 2, rx257_start + sub rx257_off, rx257_pos, 1 + substr rx257_tgt, rx257_tgt, rx257_off + rx257_start: + eq $I10, 1, rx257_restart + if_null rx257_debug, debug_301 + rx257_cur."!cursor_debug"("START", "metachar:sym<^^>") + debug_301: $I10 = self.'from'() - ne $I10, -1, rxscan228_done - goto rxscan228_scan - rxscan228_loop: - ($P10) = rx225_cur."from"() - inc $P10 - set rx225_pos, $P10 - ge rx225_pos, rx225_eos, rxscan228_done - rxscan228_scan: - set_addr $I10, rxscan228_loop - rx225_cur."!mark_push"(0, rx225_pos, $I10) - rxscan228_done: -.annotate 'line', 83 + ne $I10, -1, rxscan260_done + goto rxscan260_scan + rxscan260_loop: + ($P10) = rx257_cur."from"() + inc $P10 + set rx257_pos, $P10 + ge rx257_pos, rx257_eos, rxscan260_done + rxscan260_scan: + set_addr $I10, rxscan260_loop + rx257_cur."!mark_push"(0, rx257_pos, $I10) + rxscan260_done: +.annotate 'line', 93 # rx subcapture "sym" - set_addr $I10, rxcap_229_fail - rx225_cur."!mark_push"(0, rx225_pos, $I10) + set_addr $I10, rxcap_261_fail + rx257_cur."!mark_push"(0, rx257_pos, $I10) # rx literal "^^" - add $I11, rx225_pos, 2 - gt $I11, rx225_eos, rx225_fail - sub $I11, rx225_pos, rx225_off - substr $S10, rx225_tgt, $I11, 2 - ne $S10, "^^", rx225_fail - add rx225_pos, 2 - set_addr $I10, rxcap_229_fail - ($I12, $I11) = rx225_cur."!mark_peek"($I10) - rx225_cur."!cursor_pos"($I11) - ($P10) = rx225_cur."!cursor_start"() - $P10."!cursor_pass"(rx225_pos, "") - rx225_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx257_pos, 2 + gt $I11, rx257_eos, rx257_fail + sub $I11, rx257_pos, rx257_off + substr $S10, rx257_tgt, $I11, 2 + ne $S10, "^^", rx257_fail + add rx257_pos, 2 + set_addr $I10, rxcap_261_fail + ($I12, $I11) = rx257_cur."!mark_peek"($I10) + rx257_cur."!cursor_pos"($I11) + ($P10) = rx257_cur."!cursor_start"() + $P10."!cursor_pass"(rx257_pos, "") + rx257_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_229_done - rxcap_229_fail: - goto rx225_fail - rxcap_229_done: - # rx pass - rx225_cur."!cursor_pass"(rx225_pos, "metachar:sym<^^>") - if_null rx225_debug, debug_269 - rx225_cur."!cursor_debug"("PASS ", "metachar:sym<^^>", " at pos=", rx225_pos) - debug_269: - .return (rx225_cur) - rx225_restart: + goto rxcap_261_done + rxcap_261_fail: + goto rx257_fail + rxcap_261_done: + # rx pass + rx257_cur."!cursor_pass"(rx257_pos, "metachar:sym<^^>") + if_null rx257_debug, debug_302 + rx257_cur."!cursor_debug"("PASS", "metachar:sym<^^>", " at pos=", rx257_pos) + debug_302: + .return (rx257_cur) + rx257_restart: .annotate 'line', 3 - if_null rx225_debug, debug_270 - rx225_cur."!cursor_debug"("NEXT ", "metachar:sym<^^>") - debug_270: - rx225_fail: - (rx225_rep, rx225_pos, $I10, $P10) = rx225_cur."!mark_fail"(0) - lt rx225_pos, -1, rx225_done - eq rx225_pos, -1, rx225_fail - jump $I10 - rx225_done: - rx225_cur."!cursor_fail"() - if_null rx225_debug, debug_271 - rx225_cur."!cursor_debug"("FAIL ", "metachar:sym<^^>") - debug_271: - .return (rx225_cur) + if_null rx257_debug, debug_303 + rx257_cur."!cursor_debug"("NEXT", "metachar:sym<^^>") + debug_303: + rx257_fail: + (rx257_rep, rx257_pos, $I10, $P10) = rx257_cur."!mark_fail"(0) + lt rx257_pos, -1, rx257_done + eq rx257_pos, -1, rx257_fail + jump $I10 + rx257_done: + rx257_cur."!cursor_fail"() + if_null rx257_debug, debug_304 + rx257_cur."!cursor_debug"("FAIL", "metachar:sym<^^>") + debug_304: + .return (rx257_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<^^>" :subid("66_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<^^>" :subid("74_1284728471.30547") :method .annotate 'line', 3 - new $P227, "ResizablePMCArray" - push $P227, "^^" - .return ($P227) + new $P259, "ResizablePMCArray" + push $P259, "^^" + .return ($P259) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<$>" :subid("67_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<$>" :subid("75_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx231_tgt - .local int rx231_pos - .local int rx231_off - .local int rx231_eos - .local int rx231_rep - .local pmc rx231_cur - .local pmc rx231_debug - (rx231_cur, rx231_pos, rx231_tgt, $I10) = self."!cursor_start"() - getattribute rx231_debug, rx231_cur, "$!debug" - .lex unicode:"$\x{a2}", rx231_cur - .local pmc match - .lex "$/", match - length rx231_eos, rx231_tgt - gt rx231_pos, rx231_eos, rx231_done - set rx231_off, 0 - lt rx231_pos, 2, rx231_start - sub rx231_off, rx231_pos, 1 - substr rx231_tgt, rx231_tgt, rx231_off - rx231_start: - eq $I10, 1, rx231_restart - if_null rx231_debug, debug_272 - rx231_cur."!cursor_debug"("START ", "metachar:sym<$>") - debug_272: + .local string rx263_tgt + .local int rx263_pos + .local int rx263_off + .local int rx263_eos + .local int rx263_rep + .local pmc rx263_cur + .local pmc rx263_debug + (rx263_cur, rx263_pos, rx263_tgt, $I10) = self."!cursor_start"() + getattribute rx263_debug, rx263_cur, "$!debug" + .lex unicode:"$\x{a2}", rx263_cur + .local pmc match + .lex "$/", match + length rx263_eos, rx263_tgt + gt rx263_pos, rx263_eos, rx263_done + set rx263_off, 0 + lt rx263_pos, 2, rx263_start + sub rx263_off, rx263_pos, 1 + substr rx263_tgt, rx263_tgt, rx263_off + rx263_start: + eq $I10, 1, rx263_restart + if_null rx263_debug, debug_305 + rx263_cur."!cursor_debug"("START", "metachar:sym<$>") + debug_305: $I10 = self.'from'() - ne $I10, -1, rxscan234_done - goto rxscan234_scan - rxscan234_loop: - ($P10) = rx231_cur."from"() - inc $P10 - set rx231_pos, $P10 - ge rx231_pos, rx231_eos, rxscan234_done - rxscan234_scan: - set_addr $I10, rxscan234_loop - rx231_cur."!mark_push"(0, rx231_pos, $I10) - rxscan234_done: -.annotate 'line', 84 + ne $I10, -1, rxscan266_done + goto rxscan266_scan + rxscan266_loop: + ($P10) = rx263_cur."from"() + inc $P10 + set rx263_pos, $P10 + ge rx263_pos, rx263_eos, rxscan266_done + rxscan266_scan: + set_addr $I10, rxscan266_loop + rx263_cur."!mark_push"(0, rx263_pos, $I10) + rxscan266_done: +.annotate 'line', 94 # rx subcapture "sym" - set_addr $I10, rxcap_235_fail - rx231_cur."!mark_push"(0, rx231_pos, $I10) + set_addr $I10, rxcap_267_fail + rx263_cur."!mark_push"(0, rx263_pos, $I10) # rx literal "$" - add $I11, rx231_pos, 1 - gt $I11, rx231_eos, rx231_fail - sub $I11, rx231_pos, rx231_off - ord $I11, rx231_tgt, $I11 - ne $I11, 36, rx231_fail - add rx231_pos, 1 - set_addr $I10, rxcap_235_fail - ($I12, $I11) = rx231_cur."!mark_peek"($I10) - rx231_cur."!cursor_pos"($I11) - ($P10) = rx231_cur."!cursor_start"() - $P10."!cursor_pass"(rx231_pos, "") - rx231_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx263_pos, 1 + gt $I11, rx263_eos, rx263_fail + sub $I11, rx263_pos, rx263_off + ord $I11, rx263_tgt, $I11 + ne $I11, 36, rx263_fail + add rx263_pos, 1 + set_addr $I10, rxcap_267_fail + ($I12, $I11) = rx263_cur."!mark_peek"($I10) + rx263_cur."!cursor_pos"($I11) + ($P10) = rx263_cur."!cursor_start"() + $P10."!cursor_pass"(rx263_pos, "") + rx263_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_235_done - rxcap_235_fail: - goto rx231_fail - rxcap_235_done: - # rx pass - rx231_cur."!cursor_pass"(rx231_pos, "metachar:sym<$>") - if_null rx231_debug, debug_273 - rx231_cur."!cursor_debug"("PASS ", "metachar:sym<$>", " at pos=", rx231_pos) - debug_273: - .return (rx231_cur) - rx231_restart: + goto rxcap_267_done + rxcap_267_fail: + goto rx263_fail + rxcap_267_done: + # rx pass + rx263_cur."!cursor_pass"(rx263_pos, "metachar:sym<$>") + if_null rx263_debug, debug_306 + rx263_cur."!cursor_debug"("PASS", "metachar:sym<$>", " at pos=", rx263_pos) + debug_306: + .return (rx263_cur) + rx263_restart: .annotate 'line', 3 - if_null rx231_debug, debug_274 - rx231_cur."!cursor_debug"("NEXT ", "metachar:sym<$>") - debug_274: - rx231_fail: - (rx231_rep, rx231_pos, $I10, $P10) = rx231_cur."!mark_fail"(0) - lt rx231_pos, -1, rx231_done - eq rx231_pos, -1, rx231_fail - jump $I10 - rx231_done: - rx231_cur."!cursor_fail"() - if_null rx231_debug, debug_275 - rx231_cur."!cursor_debug"("FAIL ", "metachar:sym<$>") - debug_275: - .return (rx231_cur) + if_null rx263_debug, debug_307 + rx263_cur."!cursor_debug"("NEXT", "metachar:sym<$>") + debug_307: + rx263_fail: + (rx263_rep, rx263_pos, $I10, $P10) = rx263_cur."!mark_fail"(0) + lt rx263_pos, -1, rx263_done + eq rx263_pos, -1, rx263_fail + jump $I10 + rx263_done: + rx263_cur."!cursor_fail"() + if_null rx263_debug, debug_308 + rx263_cur."!cursor_debug"("FAIL", "metachar:sym<$>") + debug_308: + .return (rx263_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<$>" :subid("68_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<$>" :subid("76_1284728471.30547") :method .annotate 'line', 3 - new $P233, "ResizablePMCArray" - push $P233, "$" - .return ($P233) + new $P265, "ResizablePMCArray" + push $P265, "$" + .return ($P265) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<$$>" :subid("69_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<$$>" :subid("77_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx237_tgt - .local int rx237_pos - .local int rx237_off - .local int rx237_eos - .local int rx237_rep - .local pmc rx237_cur - .local pmc rx237_debug - (rx237_cur, rx237_pos, rx237_tgt, $I10) = self."!cursor_start"() - getattribute rx237_debug, rx237_cur, "$!debug" - .lex unicode:"$\x{a2}", rx237_cur + .local string rx269_tgt + .local int rx269_pos + .local int rx269_off + .local int rx269_eos + .local int rx269_rep + .local pmc rx269_cur + .local pmc rx269_debug + (rx269_cur, rx269_pos, rx269_tgt, $I10) = self."!cursor_start"() + getattribute rx269_debug, rx269_cur, "$!debug" + .lex unicode:"$\x{a2}", rx269_cur .local pmc match .lex "$/", match - length rx237_eos, rx237_tgt - gt rx237_pos, rx237_eos, rx237_done - set rx237_off, 0 - lt rx237_pos, 2, rx237_start - sub rx237_off, rx237_pos, 1 - substr rx237_tgt, rx237_tgt, rx237_off - rx237_start: - eq $I10, 1, rx237_restart - if_null rx237_debug, debug_276 - rx237_cur."!cursor_debug"("START ", "metachar:sym<$$>") - debug_276: + length rx269_eos, rx269_tgt + gt rx269_pos, rx269_eos, rx269_done + set rx269_off, 0 + lt rx269_pos, 2, rx269_start + sub rx269_off, rx269_pos, 1 + substr rx269_tgt, rx269_tgt, rx269_off + rx269_start: + eq $I10, 1, rx269_restart + if_null rx269_debug, debug_309 + rx269_cur."!cursor_debug"("START", "metachar:sym<$$>") + debug_309: $I10 = self.'from'() - ne $I10, -1, rxscan240_done - goto rxscan240_scan - rxscan240_loop: - ($P10) = rx237_cur."from"() - inc $P10 - set rx237_pos, $P10 - ge rx237_pos, rx237_eos, rxscan240_done - rxscan240_scan: - set_addr $I10, rxscan240_loop - rx237_cur."!mark_push"(0, rx237_pos, $I10) - rxscan240_done: -.annotate 'line', 85 + ne $I10, -1, rxscan272_done + goto rxscan272_scan + rxscan272_loop: + ($P10) = rx269_cur."from"() + inc $P10 + set rx269_pos, $P10 + ge rx269_pos, rx269_eos, rxscan272_done + rxscan272_scan: + set_addr $I10, rxscan272_loop + rx269_cur."!mark_push"(0, rx269_pos, $I10) + rxscan272_done: +.annotate 'line', 95 # rx subcapture "sym" - set_addr $I10, rxcap_241_fail - rx237_cur."!mark_push"(0, rx237_pos, $I10) + set_addr $I10, rxcap_273_fail + rx269_cur."!mark_push"(0, rx269_pos, $I10) # rx literal "$$" - add $I11, rx237_pos, 2 - gt $I11, rx237_eos, rx237_fail - sub $I11, rx237_pos, rx237_off - substr $S10, rx237_tgt, $I11, 2 - ne $S10, "$$", rx237_fail - add rx237_pos, 2 - set_addr $I10, rxcap_241_fail - ($I12, $I11) = rx237_cur."!mark_peek"($I10) - rx237_cur."!cursor_pos"($I11) - ($P10) = rx237_cur."!cursor_start"() - $P10."!cursor_pass"(rx237_pos, "") - rx237_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx269_pos, 2 + gt $I11, rx269_eos, rx269_fail + sub $I11, rx269_pos, rx269_off + substr $S10, rx269_tgt, $I11, 2 + ne $S10, "$$", rx269_fail + add rx269_pos, 2 + set_addr $I10, rxcap_273_fail + ($I12, $I11) = rx269_cur."!mark_peek"($I10) + rx269_cur."!cursor_pos"($I11) + ($P10) = rx269_cur."!cursor_start"() + $P10."!cursor_pass"(rx269_pos, "") + rx269_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_241_done - rxcap_241_fail: - goto rx237_fail - rxcap_241_done: - # rx pass - rx237_cur."!cursor_pass"(rx237_pos, "metachar:sym<$$>") - if_null rx237_debug, debug_277 - rx237_cur."!cursor_debug"("PASS ", "metachar:sym<$$>", " at pos=", rx237_pos) - debug_277: - .return (rx237_cur) - rx237_restart: + goto rxcap_273_done + rxcap_273_fail: + goto rx269_fail + rxcap_273_done: + # rx pass + rx269_cur."!cursor_pass"(rx269_pos, "metachar:sym<$$>") + if_null rx269_debug, debug_310 + rx269_cur."!cursor_debug"("PASS", "metachar:sym<$$>", " at pos=", rx269_pos) + debug_310: + .return (rx269_cur) + rx269_restart: .annotate 'line', 3 - if_null rx237_debug, debug_278 - rx237_cur."!cursor_debug"("NEXT ", "metachar:sym<$$>") - debug_278: - rx237_fail: - (rx237_rep, rx237_pos, $I10, $P10) = rx237_cur."!mark_fail"(0) - lt rx237_pos, -1, rx237_done - eq rx237_pos, -1, rx237_fail - jump $I10 - rx237_done: - rx237_cur."!cursor_fail"() - if_null rx237_debug, debug_279 - rx237_cur."!cursor_debug"("FAIL ", "metachar:sym<$$>") - debug_279: - .return (rx237_cur) + if_null rx269_debug, debug_311 + rx269_cur."!cursor_debug"("NEXT", "metachar:sym<$$>") + debug_311: + rx269_fail: + (rx269_rep, rx269_pos, $I10, $P10) = rx269_cur."!mark_fail"(0) + lt rx269_pos, -1, rx269_done + eq rx269_pos, -1, rx269_fail + jump $I10 + rx269_done: + rx269_cur."!cursor_fail"() + if_null rx269_debug, debug_312 + rx269_cur."!cursor_debug"("FAIL", "metachar:sym<$$>") + debug_312: + .return (rx269_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<$$>" :subid("70_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<$$>" :subid("78_1284728471.30547") :method .annotate 'line', 3 - new $P239, "ResizablePMCArray" - push $P239, "$$" - .return ($P239) + new $P271, "ResizablePMCArray" + push $P271, "$$" + .return ($P271) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<:::>" :subid("71_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<:::>" :subid("79_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx243_tgt - .local int rx243_pos - .local int rx243_off - .local int rx243_eos - .local int rx243_rep - .local pmc rx243_cur - .local pmc rx243_debug - (rx243_cur, rx243_pos, rx243_tgt, $I10) = self."!cursor_start"() - getattribute rx243_debug, rx243_cur, "$!debug" - .lex unicode:"$\x{a2}", rx243_cur + .local string rx275_tgt + .local int rx275_pos + .local int rx275_off + .local int rx275_eos + .local int rx275_rep + .local pmc rx275_cur + .local pmc rx275_debug + (rx275_cur, rx275_pos, rx275_tgt, $I10) = self."!cursor_start"() + getattribute rx275_debug, rx275_cur, "$!debug" + .lex unicode:"$\x{a2}", rx275_cur .local pmc match .lex "$/", match - length rx243_eos, rx243_tgt - gt rx243_pos, rx243_eos, rx243_done - set rx243_off, 0 - lt rx243_pos, 2, rx243_start - sub rx243_off, rx243_pos, 1 - substr rx243_tgt, rx243_tgt, rx243_off - rx243_start: - eq $I10, 1, rx243_restart - if_null rx243_debug, debug_280 - rx243_cur."!cursor_debug"("START ", "metachar:sym<:::>") - debug_280: + length rx275_eos, rx275_tgt + gt rx275_pos, rx275_eos, rx275_done + set rx275_off, 0 + lt rx275_pos, 2, rx275_start + sub rx275_off, rx275_pos, 1 + substr rx275_tgt, rx275_tgt, rx275_off + rx275_start: + eq $I10, 1, rx275_restart + if_null rx275_debug, debug_313 + rx275_cur."!cursor_debug"("START", "metachar:sym<:::>") + debug_313: $I10 = self.'from'() - ne $I10, -1, rxscan247_done - goto rxscan247_scan - rxscan247_loop: - ($P10) = rx243_cur."from"() - inc $P10 - set rx243_pos, $P10 - ge rx243_pos, rx243_eos, rxscan247_done - rxscan247_scan: - set_addr $I10, rxscan247_loop - rx243_cur."!mark_push"(0, rx243_pos, $I10) - rxscan247_done: -.annotate 'line', 86 + ne $I10, -1, rxscan279_done + goto rxscan279_scan + rxscan279_loop: + ($P10) = rx275_cur."from"() + inc $P10 + set rx275_pos, $P10 + ge rx275_pos, rx275_eos, rxscan279_done + rxscan279_scan: + set_addr $I10, rxscan279_loop + rx275_cur."!mark_push"(0, rx275_pos, $I10) + rxscan279_done: +.annotate 'line', 96 # rx subcapture "sym" - set_addr $I10, rxcap_248_fail - rx243_cur."!mark_push"(0, rx243_pos, $I10) + set_addr $I10, rxcap_280_fail + rx275_cur."!mark_push"(0, rx275_pos, $I10) # rx literal ":::" - add $I11, rx243_pos, 3 - gt $I11, rx243_eos, rx243_fail - sub $I11, rx243_pos, rx243_off - substr $S10, rx243_tgt, $I11, 3 - ne $S10, ":::", rx243_fail - add rx243_pos, 3 - set_addr $I10, rxcap_248_fail - ($I12, $I11) = rx243_cur."!mark_peek"($I10) - rx243_cur."!cursor_pos"($I11) - ($P10) = rx243_cur."!cursor_start"() - $P10."!cursor_pass"(rx243_pos, "") - rx243_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx275_pos, 3 + gt $I11, rx275_eos, rx275_fail + sub $I11, rx275_pos, rx275_off + substr $S10, rx275_tgt, $I11, 3 + ne $S10, ":::", rx275_fail + add rx275_pos, 3 + set_addr $I10, rxcap_280_fail + ($I12, $I11) = rx275_cur."!mark_peek"($I10) + rx275_cur."!cursor_pos"($I11) + ($P10) = rx275_cur."!cursor_start"() + $P10."!cursor_pass"(rx275_pos, "") + rx275_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_248_done - rxcap_248_fail: - goto rx243_fail - rxcap_248_done: + goto rxcap_280_done + rxcap_280_fail: + goto rx275_fail + rxcap_280_done: # rx subrule "panic" subtype=method negate= - rx243_cur."!cursor_pos"(rx243_pos) - $P10 = rx243_cur."panic"("::: not yet implemented") - unless $P10, rx243_fail - rx243_pos = $P10."pos"() - # rx pass - rx243_cur."!cursor_pass"(rx243_pos, "metachar:sym<:::>") - if_null rx243_debug, debug_281 - rx243_cur."!cursor_debug"("PASS ", "metachar:sym<:::>", " at pos=", rx243_pos) - debug_281: - .return (rx243_cur) - rx243_restart: + rx275_cur."!cursor_pos"(rx275_pos) + $P10 = rx275_cur."panic"("::: not yet implemented") + unless $P10, rx275_fail + rx275_pos = $P10."pos"() + # rx pass + rx275_cur."!cursor_pass"(rx275_pos, "metachar:sym<:::>") + if_null rx275_debug, debug_314 + rx275_cur."!cursor_debug"("PASS", "metachar:sym<:::>", " at pos=", rx275_pos) + debug_314: + .return (rx275_cur) + rx275_restart: .annotate 'line', 3 - if_null rx243_debug, debug_282 - rx243_cur."!cursor_debug"("NEXT ", "metachar:sym<:::>") - debug_282: - rx243_fail: - (rx243_rep, rx243_pos, $I10, $P10) = rx243_cur."!mark_fail"(0) - lt rx243_pos, -1, rx243_done - eq rx243_pos, -1, rx243_fail - jump $I10 - rx243_done: - rx243_cur."!cursor_fail"() - if_null rx243_debug, debug_283 - rx243_cur."!cursor_debug"("FAIL ", "metachar:sym<:::>") - debug_283: - .return (rx243_cur) + if_null rx275_debug, debug_315 + rx275_cur."!cursor_debug"("NEXT", "metachar:sym<:::>") + debug_315: + rx275_fail: + (rx275_rep, rx275_pos, $I10, $P10) = rx275_cur."!mark_fail"(0) + lt rx275_pos, -1, rx275_done + eq rx275_pos, -1, rx275_fail + jump $I10 + rx275_done: + rx275_cur."!cursor_fail"() + if_null rx275_debug, debug_316 + rx275_cur."!cursor_debug"("FAIL", "metachar:sym<:::>") + debug_316: + .return (rx275_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<:::>" :subid("72_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<:::>" :subid("80_1284728471.30547") :method .annotate 'line', 3 - $P245 = self."!PREFIX__!subrule"("panic", ":::") - new $P246, "ResizablePMCArray" - push $P246, $P245 - .return ($P246) + $P277 = self."!PREFIX__!subrule"("panic", ":::") + new $P278, "ResizablePMCArray" + push $P278, $P277 + .return ($P278) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<::>" :subid("73_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<::>" :subid("81_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx250_tgt - .local int rx250_pos - .local int rx250_off - .local int rx250_eos - .local int rx250_rep - .local pmc rx250_cur - .local pmc rx250_debug - (rx250_cur, rx250_pos, rx250_tgt, $I10) = self."!cursor_start"() - getattribute rx250_debug, rx250_cur, "$!debug" - .lex unicode:"$\x{a2}", rx250_cur + .local string rx282_tgt + .local int rx282_pos + .local int rx282_off + .local int rx282_eos + .local int rx282_rep + .local pmc rx282_cur + .local pmc rx282_debug + (rx282_cur, rx282_pos, rx282_tgt, $I10) = self."!cursor_start"() + getattribute rx282_debug, rx282_cur, "$!debug" + .lex unicode:"$\x{a2}", rx282_cur .local pmc match .lex "$/", match - length rx250_eos, rx250_tgt - gt rx250_pos, rx250_eos, rx250_done - set rx250_off, 0 - lt rx250_pos, 2, rx250_start - sub rx250_off, rx250_pos, 1 - substr rx250_tgt, rx250_tgt, rx250_off - rx250_start: - eq $I10, 1, rx250_restart - if_null rx250_debug, debug_284 - rx250_cur."!cursor_debug"("START ", "metachar:sym<::>") - debug_284: + length rx282_eos, rx282_tgt + gt rx282_pos, rx282_eos, rx282_done + set rx282_off, 0 + lt rx282_pos, 2, rx282_start + sub rx282_off, rx282_pos, 1 + substr rx282_tgt, rx282_tgt, rx282_off + rx282_start: + eq $I10, 1, rx282_restart + if_null rx282_debug, debug_317 + rx282_cur."!cursor_debug"("START", "metachar:sym<::>") + debug_317: $I10 = self.'from'() - ne $I10, -1, rxscan254_done - goto rxscan254_scan - rxscan254_loop: - ($P10) = rx250_cur."from"() - inc $P10 - set rx250_pos, $P10 - ge rx250_pos, rx250_eos, rxscan254_done - rxscan254_scan: - set_addr $I10, rxscan254_loop - rx250_cur."!mark_push"(0, rx250_pos, $I10) - rxscan254_done: -.annotate 'line', 87 + ne $I10, -1, rxscan286_done + goto rxscan286_scan + rxscan286_loop: + ($P10) = rx282_cur."from"() + inc $P10 + set rx282_pos, $P10 + ge rx282_pos, rx282_eos, rxscan286_done + rxscan286_scan: + set_addr $I10, rxscan286_loop + rx282_cur."!mark_push"(0, rx282_pos, $I10) + rxscan286_done: +.annotate 'line', 97 # rx subcapture "sym" - set_addr $I10, rxcap_255_fail - rx250_cur."!mark_push"(0, rx250_pos, $I10) + set_addr $I10, rxcap_287_fail + rx282_cur."!mark_push"(0, rx282_pos, $I10) # rx literal "::" - add $I11, rx250_pos, 2 - gt $I11, rx250_eos, rx250_fail - sub $I11, rx250_pos, rx250_off - substr $S10, rx250_tgt, $I11, 2 - ne $S10, "::", rx250_fail - add rx250_pos, 2 - set_addr $I10, rxcap_255_fail - ($I12, $I11) = rx250_cur."!mark_peek"($I10) - rx250_cur."!cursor_pos"($I11) - ($P10) = rx250_cur."!cursor_start"() - $P10."!cursor_pass"(rx250_pos, "") - rx250_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx282_pos, 2 + gt $I11, rx282_eos, rx282_fail + sub $I11, rx282_pos, rx282_off + substr $S10, rx282_tgt, $I11, 2 + ne $S10, "::", rx282_fail + add rx282_pos, 2 + set_addr $I10, rxcap_287_fail + ($I12, $I11) = rx282_cur."!mark_peek"($I10) + rx282_cur."!cursor_pos"($I11) + ($P10) = rx282_cur."!cursor_start"() + $P10."!cursor_pass"(rx282_pos, "") + rx282_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_255_done - rxcap_255_fail: - goto rx250_fail - rxcap_255_done: + goto rxcap_287_done + rxcap_287_fail: + goto rx282_fail + rxcap_287_done: # rx subrule "panic" subtype=method negate= - rx250_cur."!cursor_pos"(rx250_pos) - $P10 = rx250_cur."panic"(":: not yet implemented") - unless $P10, rx250_fail - rx250_pos = $P10."pos"() - # rx pass - rx250_cur."!cursor_pass"(rx250_pos, "metachar:sym<::>") - if_null rx250_debug, debug_285 - rx250_cur."!cursor_debug"("PASS ", "metachar:sym<::>", " at pos=", rx250_pos) - debug_285: - .return (rx250_cur) - rx250_restart: + rx282_cur."!cursor_pos"(rx282_pos) + $P10 = rx282_cur."panic"(":: not yet implemented") + unless $P10, rx282_fail + rx282_pos = $P10."pos"() + # rx pass + rx282_cur."!cursor_pass"(rx282_pos, "metachar:sym<::>") + if_null rx282_debug, debug_318 + rx282_cur."!cursor_debug"("PASS", "metachar:sym<::>", " at pos=", rx282_pos) + debug_318: + .return (rx282_cur) + rx282_restart: .annotate 'line', 3 - if_null rx250_debug, debug_286 - rx250_cur."!cursor_debug"("NEXT ", "metachar:sym<::>") - debug_286: - rx250_fail: - (rx250_rep, rx250_pos, $I10, $P10) = rx250_cur."!mark_fail"(0) - lt rx250_pos, -1, rx250_done - eq rx250_pos, -1, rx250_fail - jump $I10 - rx250_done: - rx250_cur."!cursor_fail"() - if_null rx250_debug, debug_287 - rx250_cur."!cursor_debug"("FAIL ", "metachar:sym<::>") - debug_287: - .return (rx250_cur) + if_null rx282_debug, debug_319 + rx282_cur."!cursor_debug"("NEXT", "metachar:sym<::>") + debug_319: + rx282_fail: + (rx282_rep, rx282_pos, $I10, $P10) = rx282_cur."!mark_fail"(0) + lt rx282_pos, -1, rx282_done + eq rx282_pos, -1, rx282_fail + jump $I10 + rx282_done: + rx282_cur."!cursor_fail"() + if_null rx282_debug, debug_320 + rx282_cur."!cursor_debug"("FAIL", "metachar:sym<::>") + debug_320: + .return (rx282_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<::>" :subid("74_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<::>" :subid("82_1284728471.30547") :method .annotate 'line', 3 - $P252 = self."!PREFIX__!subrule"("panic", "::") - new $P253, "ResizablePMCArray" - push $P253, $P252 - .return ($P253) + $P284 = self."!PREFIX__!subrule"("panic", "::") + new $P285, "ResizablePMCArray" + push $P285, $P284 + .return ($P285) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("75_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("83_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx257_tgt - .local int rx257_pos - .local int rx257_off - .local int rx257_eos - .local int rx257_rep - .local pmc rx257_cur - .local pmc rx257_debug - (rx257_cur, rx257_pos, rx257_tgt, $I10) = self."!cursor_start"() - getattribute rx257_debug, rx257_cur, "$!debug" - .lex unicode:"$\x{a2}", rx257_cur + .local string rx289_tgt + .local int rx289_pos + .local int rx289_off + .local int rx289_eos + .local int rx289_rep + .local pmc rx289_cur + .local pmc rx289_debug + (rx289_cur, rx289_pos, rx289_tgt, $I10) = self."!cursor_start"() + getattribute rx289_debug, rx289_cur, "$!debug" + .lex unicode:"$\x{a2}", rx289_cur .local pmc match .lex "$/", match - length rx257_eos, rx257_tgt - gt rx257_pos, rx257_eos, rx257_done - set rx257_off, 0 - lt rx257_pos, 2, rx257_start - sub rx257_off, rx257_pos, 1 - substr rx257_tgt, rx257_tgt, rx257_off - rx257_start: - eq $I10, 1, rx257_restart - if_null rx257_debug, debug_288 - rx257_cur."!cursor_debug"("START ", "metachar:sym") - debug_288: + length rx289_eos, rx289_tgt + gt rx289_pos, rx289_eos, rx289_done + set rx289_off, 0 + lt rx289_pos, 2, rx289_start + sub rx289_off, rx289_pos, 1 + substr rx289_tgt, rx289_tgt, rx289_off + rx289_start: + eq $I10, 1, rx289_restart + if_null rx289_debug, debug_321 + rx289_cur."!cursor_debug"("START", "metachar:sym") + debug_321: $I10 = self.'from'() - ne $I10, -1, rxscan260_done - goto rxscan260_scan - rxscan260_loop: - ($P10) = rx257_cur."from"() - inc $P10 - set rx257_pos, $P10 - ge rx257_pos, rx257_eos, rxscan260_done - rxscan260_scan: - set_addr $I10, rxscan260_loop - rx257_cur."!mark_push"(0, rx257_pos, $I10) - rxscan260_done: -.annotate 'line', 88 + ne $I10, -1, rxscan292_done + goto rxscan292_scan + rxscan292_loop: + ($P10) = rx289_cur."from"() + inc $P10 + set rx289_pos, $P10 + ge rx289_pos, rx289_eos, rxscan292_done + rxscan292_scan: + set_addr $I10, rxscan292_loop + rx289_cur."!mark_push"(0, rx289_pos, $I10) + rxscan292_done: +.annotate 'line', 98 # rx subcapture "sym" - set_addr $I10, rxcap_262_fail - rx257_cur."!mark_push"(0, rx257_pos, $I10) - alt261_0: - set_addr $I10, alt261_1 - rx257_cur."!mark_push"(0, rx257_pos, $I10) + set_addr $I10, rxcap_294_fail + rx289_cur."!mark_push"(0, rx289_pos, $I10) + alt293_0: + set_addr $I10, alt293_1 + rx289_cur."!mark_push"(0, rx289_pos, $I10) # rx literal "<<" - add $I11, rx257_pos, 2 - gt $I11, rx257_eos, rx257_fail - sub $I11, rx257_pos, rx257_off - substr $S10, rx257_tgt, $I11, 2 - ne $S10, "<<", rx257_fail - add rx257_pos, 2 - goto alt261_end - alt261_1: + add $I11, rx289_pos, 2 + gt $I11, rx289_eos, rx289_fail + sub $I11, rx289_pos, rx289_off + substr $S10, rx289_tgt, $I11, 2 + ne $S10, "<<", rx289_fail + add rx289_pos, 2 + goto alt293_end + alt293_1: # rx literal unicode:"\x{ab}" - add $I11, rx257_pos, 1 - gt $I11, rx257_eos, rx257_fail - sub $I11, rx257_pos, rx257_off - ord $I11, rx257_tgt, $I11 - ne $I11, 171, rx257_fail - add rx257_pos, 1 - alt261_end: - set_addr $I10, rxcap_262_fail - ($I12, $I11) = rx257_cur."!mark_peek"($I10) - rx257_cur."!cursor_pos"($I11) - ($P10) = rx257_cur."!cursor_start"() - $P10."!cursor_pass"(rx257_pos, "") - rx257_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx289_pos, 1 + gt $I11, rx289_eos, rx289_fail + sub $I11, rx289_pos, rx289_off + ord $I11, rx289_tgt, $I11 + ne $I11, 171, rx289_fail + add rx289_pos, 1 + alt293_end: + set_addr $I10, rxcap_294_fail + ($I12, $I11) = rx289_cur."!mark_peek"($I10) + rx289_cur."!cursor_pos"($I11) + ($P10) = rx289_cur."!cursor_start"() + $P10."!cursor_pass"(rx289_pos, "") + rx289_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_262_done - rxcap_262_fail: - goto rx257_fail - rxcap_262_done: + goto rxcap_294_done + rxcap_294_fail: + goto rx289_fail + rxcap_294_done: # rx pass - rx257_cur."!cursor_pass"(rx257_pos, "metachar:sym") - if_null rx257_debug, debug_289 - rx257_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx257_pos) - debug_289: - .return (rx257_cur) - rx257_restart: + rx289_cur."!cursor_pass"(rx289_pos, "metachar:sym") + if_null rx289_debug, debug_322 + rx289_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx289_pos) + debug_322: + .return (rx289_cur) + rx289_restart: .annotate 'line', 3 - if_null rx257_debug, debug_290 - rx257_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_290: - rx257_fail: - (rx257_rep, rx257_pos, $I10, $P10) = rx257_cur."!mark_fail"(0) - lt rx257_pos, -1, rx257_done - eq rx257_pos, -1, rx257_fail - jump $I10 - rx257_done: - rx257_cur."!cursor_fail"() - if_null rx257_debug, debug_291 - rx257_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_291: - .return (rx257_cur) + if_null rx289_debug, debug_323 + rx289_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_323: + rx289_fail: + (rx289_rep, rx289_pos, $I10, $P10) = rx289_cur."!mark_fail"(0) + lt rx289_pos, -1, rx289_done + eq rx289_pos, -1, rx289_fail + jump $I10 + rx289_done: + rx289_cur."!cursor_fail"() + if_null rx289_debug, debug_324 + rx289_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_324: + .return (rx289_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("76_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("84_1284728471.30547") :method .annotate 'line', 3 - new $P259, "ResizablePMCArray" - push $P259, unicode:"\x{ab}" - push $P259, "<<" - .return ($P259) + new $P291, "ResizablePMCArray" + push $P291, unicode:"\x{ab}" + push $P291, "<<" + .return ($P291) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("77_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("85_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx264_tgt - .local int rx264_pos - .local int rx264_off - .local int rx264_eos - .local int rx264_rep - .local pmc rx264_cur - .local pmc rx264_debug - (rx264_cur, rx264_pos, rx264_tgt, $I10) = self."!cursor_start"() - getattribute rx264_debug, rx264_cur, "$!debug" - .lex unicode:"$\x{a2}", rx264_cur - .local pmc match - .lex "$/", match - length rx264_eos, rx264_tgt - gt rx264_pos, rx264_eos, rx264_done - set rx264_off, 0 - lt rx264_pos, 2, rx264_start - sub rx264_off, rx264_pos, 1 - substr rx264_tgt, rx264_tgt, rx264_off - rx264_start: - eq $I10, 1, rx264_restart - if_null rx264_debug, debug_292 - rx264_cur."!cursor_debug"("START ", "metachar:sym") - debug_292: + .local string rx296_tgt + .local int rx296_pos + .local int rx296_off + .local int rx296_eos + .local int rx296_rep + .local pmc rx296_cur + .local pmc rx296_debug + (rx296_cur, rx296_pos, rx296_tgt, $I10) = self."!cursor_start"() + getattribute rx296_debug, rx296_cur, "$!debug" + .lex unicode:"$\x{a2}", rx296_cur + .local pmc match + .lex "$/", match + length rx296_eos, rx296_tgt + gt rx296_pos, rx296_eos, rx296_done + set rx296_off, 0 + lt rx296_pos, 2, rx296_start + sub rx296_off, rx296_pos, 1 + substr rx296_tgt, rx296_tgt, rx296_off + rx296_start: + eq $I10, 1, rx296_restart + if_null rx296_debug, debug_325 + rx296_cur."!cursor_debug"("START", "metachar:sym") + debug_325: $I10 = self.'from'() - ne $I10, -1, rxscan267_done - goto rxscan267_scan - rxscan267_loop: - ($P10) = rx264_cur."from"() - inc $P10 - set rx264_pos, $P10 - ge rx264_pos, rx264_eos, rxscan267_done - rxscan267_scan: - set_addr $I10, rxscan267_loop - rx264_cur."!mark_push"(0, rx264_pos, $I10) - rxscan267_done: -.annotate 'line', 89 + ne $I10, -1, rxscan299_done + goto rxscan299_scan + rxscan299_loop: + ($P10) = rx296_cur."from"() + inc $P10 + set rx296_pos, $P10 + ge rx296_pos, rx296_eos, rxscan299_done + rxscan299_scan: + set_addr $I10, rxscan299_loop + rx296_cur."!mark_push"(0, rx296_pos, $I10) + rxscan299_done: +.annotate 'line', 99 # rx subcapture "sym" - set_addr $I10, rxcap_269_fail - rx264_cur."!mark_push"(0, rx264_pos, $I10) - alt268_0: - set_addr $I10, alt268_1 - rx264_cur."!mark_push"(0, rx264_pos, $I10) + set_addr $I10, rxcap_301_fail + rx296_cur."!mark_push"(0, rx296_pos, $I10) + alt300_0: + set_addr $I10, alt300_1 + rx296_cur."!mark_push"(0, rx296_pos, $I10) # rx literal ">>" - add $I11, rx264_pos, 2 - gt $I11, rx264_eos, rx264_fail - sub $I11, rx264_pos, rx264_off - substr $S10, rx264_tgt, $I11, 2 - ne $S10, ">>", rx264_fail - add rx264_pos, 2 - goto alt268_end - alt268_1: + add $I11, rx296_pos, 2 + gt $I11, rx296_eos, rx296_fail + sub $I11, rx296_pos, rx296_off + substr $S10, rx296_tgt, $I11, 2 + ne $S10, ">>", rx296_fail + add rx296_pos, 2 + goto alt300_end + alt300_1: # rx literal unicode:"\x{bb}" - add $I11, rx264_pos, 1 - gt $I11, rx264_eos, rx264_fail - sub $I11, rx264_pos, rx264_off - ord $I11, rx264_tgt, $I11 - ne $I11, 187, rx264_fail - add rx264_pos, 1 - alt268_end: - set_addr $I10, rxcap_269_fail - ($I12, $I11) = rx264_cur."!mark_peek"($I10) - rx264_cur."!cursor_pos"($I11) - ($P10) = rx264_cur."!cursor_start"() - $P10."!cursor_pass"(rx264_pos, "") - rx264_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx296_pos, 1 + gt $I11, rx296_eos, rx296_fail + sub $I11, rx296_pos, rx296_off + ord $I11, rx296_tgt, $I11 + ne $I11, 187, rx296_fail + add rx296_pos, 1 + alt300_end: + set_addr $I10, rxcap_301_fail + ($I12, $I11) = rx296_cur."!mark_peek"($I10) + rx296_cur."!cursor_pos"($I11) + ($P10) = rx296_cur."!cursor_start"() + $P10."!cursor_pass"(rx296_pos, "") + rx296_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_269_done - rxcap_269_fail: - goto rx264_fail - rxcap_269_done: - # rx pass - rx264_cur."!cursor_pass"(rx264_pos, "metachar:sym") - if_null rx264_debug, debug_293 - rx264_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx264_pos) - debug_293: - .return (rx264_cur) - rx264_restart: + goto rxcap_301_done + rxcap_301_fail: + goto rx296_fail + rxcap_301_done: + # rx pass + rx296_cur."!cursor_pass"(rx296_pos, "metachar:sym") + if_null rx296_debug, debug_326 + rx296_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx296_pos) + debug_326: + .return (rx296_cur) + rx296_restart: .annotate 'line', 3 - if_null rx264_debug, debug_294 - rx264_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_294: - rx264_fail: - (rx264_rep, rx264_pos, $I10, $P10) = rx264_cur."!mark_fail"(0) - lt rx264_pos, -1, rx264_done - eq rx264_pos, -1, rx264_fail - jump $I10 - rx264_done: - rx264_cur."!cursor_fail"() - if_null rx264_debug, debug_295 - rx264_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_295: - .return (rx264_cur) + if_null rx296_debug, debug_327 + rx296_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_327: + rx296_fail: + (rx296_rep, rx296_pos, $I10, $P10) = rx296_cur."!mark_fail"(0) + lt rx296_pos, -1, rx296_done + eq rx296_pos, -1, rx296_fail + jump $I10 + rx296_done: + rx296_cur."!cursor_fail"() + if_null rx296_debug, debug_328 + rx296_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_328: + .return (rx296_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("78_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("86_1284728471.30547") :method .annotate 'line', 3 - new $P266, "ResizablePMCArray" - push $P266, unicode:"\x{bb}" - push $P266, ">>" - .return ($P266) + new $P298, "ResizablePMCArray" + push $P298, unicode:"\x{bb}" + push $P298, ">>" + .return ($P298) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("79_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("87_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx271_tgt - .local int rx271_pos - .local int rx271_off - .local int rx271_eos - .local int rx271_rep - .local pmc rx271_cur - .local pmc rx271_debug - (rx271_cur, rx271_pos, rx271_tgt, $I10) = self."!cursor_start"() - getattribute rx271_debug, rx271_cur, "$!debug" - .lex unicode:"$\x{a2}", rx271_cur + .local string rx303_tgt + .local int rx303_pos + .local int rx303_off + .local int rx303_eos + .local int rx303_rep + .local pmc rx303_cur + .local pmc rx303_debug + (rx303_cur, rx303_pos, rx303_tgt, $I10) = self."!cursor_start"() + getattribute rx303_debug, rx303_cur, "$!debug" + .lex unicode:"$\x{a2}", rx303_cur .local pmc match .lex "$/", match - length rx271_eos, rx271_tgt - gt rx271_pos, rx271_eos, rx271_done - set rx271_off, 0 - lt rx271_pos, 2, rx271_start - sub rx271_off, rx271_pos, 1 - substr rx271_tgt, rx271_tgt, rx271_off - rx271_start: - eq $I10, 1, rx271_restart - if_null rx271_debug, debug_296 - rx271_cur."!cursor_debug"("START ", "metachar:sym") - debug_296: + length rx303_eos, rx303_tgt + gt rx303_pos, rx303_eos, rx303_done + set rx303_off, 0 + lt rx303_pos, 2, rx303_start + sub rx303_off, rx303_pos, 1 + substr rx303_tgt, rx303_tgt, rx303_off + rx303_start: + eq $I10, 1, rx303_restart + if_null rx303_debug, debug_329 + rx303_cur."!cursor_debug"("START", "metachar:sym") + debug_329: $I10 = self.'from'() - ne $I10, -1, rxscan275_done - goto rxscan275_scan - rxscan275_loop: - ($P10) = rx271_cur."from"() - inc $P10 - set rx271_pos, $P10 - ge rx271_pos, rx271_eos, rxscan275_done - rxscan275_scan: - set_addr $I10, rxscan275_loop - rx271_cur."!mark_push"(0, rx271_pos, $I10) - rxscan275_done: -.annotate 'line', 90 + ne $I10, -1, rxscan307_done + goto rxscan307_scan + rxscan307_loop: + ($P10) = rx303_cur."from"() + inc $P10 + set rx303_pos, $P10 + ge rx303_pos, rx303_eos, rxscan307_done + rxscan307_scan: + set_addr $I10, rxscan307_loop + rx303_cur."!mark_push"(0, rx303_pos, $I10) + rxscan307_done: +.annotate 'line', 100 # rx literal "\\" - add $I11, rx271_pos, 1 - gt $I11, rx271_eos, rx271_fail - sub $I11, rx271_pos, rx271_off - ord $I11, rx271_tgt, $I11 - ne $I11, 92, rx271_fail - add rx271_pos, 1 + add $I11, rx303_pos, 1 + gt $I11, rx303_eos, rx303_fail + sub $I11, rx303_pos, rx303_off + ord $I11, rx303_tgt, $I11 + ne $I11, 92, rx303_fail + add rx303_pos, 1 # rx subrule "backslash" subtype=capture negate= - rx271_cur."!cursor_pos"(rx271_pos) - $P10 = rx271_cur."backslash"() - unless $P10, rx271_fail - rx271_cur."!mark_push"(0, -1, 0, $P10) + rx303_cur."!cursor_pos"(rx303_pos) + $P10 = rx303_cur."backslash"() + unless $P10, rx303_fail + rx303_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("backslash") - rx271_pos = $P10."pos"() + rx303_pos = $P10."pos"() # rx pass - rx271_cur."!cursor_pass"(rx271_pos, "metachar:sym") - if_null rx271_debug, debug_297 - rx271_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx271_pos) - debug_297: - .return (rx271_cur) - rx271_restart: + rx303_cur."!cursor_pass"(rx303_pos, "metachar:sym") + if_null rx303_debug, debug_330 + rx303_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx303_pos) + debug_330: + .return (rx303_cur) + rx303_restart: .annotate 'line', 3 - if_null rx271_debug, debug_298 - rx271_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_298: - rx271_fail: - (rx271_rep, rx271_pos, $I10, $P10) = rx271_cur."!mark_fail"(0) - lt rx271_pos, -1, rx271_done - eq rx271_pos, -1, rx271_fail - jump $I10 - rx271_done: - rx271_cur."!cursor_fail"() - if_null rx271_debug, debug_299 - rx271_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_299: - .return (rx271_cur) + if_null rx303_debug, debug_331 + rx303_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_331: + rx303_fail: + (rx303_rep, rx303_pos, $I10, $P10) = rx303_cur."!mark_fail"(0) + lt rx303_pos, -1, rx303_done + eq rx303_pos, -1, rx303_fail + jump $I10 + rx303_done: + rx303_cur."!cursor_fail"() + if_null rx303_debug, debug_332 + rx303_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_332: + .return (rx303_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("80_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("88_1284728471.30547") :method .annotate 'line', 3 - $P273 = self."!PREFIX__!subrule"("backslash", "\\") - new $P274, "ResizablePMCArray" - push $P274, $P273 - .return ($P274) + $P305 = self."!PREFIX__!subrule"("backslash", "\\") + new $P306, "ResizablePMCArray" + push $P306, $P305 + .return ($P306) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("81_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("89_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx277_tgt - .local int rx277_pos - .local int rx277_off - .local int rx277_eos - .local int rx277_rep - .local pmc rx277_cur - .local pmc rx277_debug - (rx277_cur, rx277_pos, rx277_tgt, $I10) = self."!cursor_start"() - getattribute rx277_debug, rx277_cur, "$!debug" - .lex unicode:"$\x{a2}", rx277_cur + .local string rx309_tgt + .local int rx309_pos + .local int rx309_off + .local int rx309_eos + .local int rx309_rep + .local pmc rx309_cur + .local pmc rx309_debug + (rx309_cur, rx309_pos, rx309_tgt, $I10) = self."!cursor_start"() + getattribute rx309_debug, rx309_cur, "$!debug" + .lex unicode:"$\x{a2}", rx309_cur .local pmc match .lex "$/", match - length rx277_eos, rx277_tgt - gt rx277_pos, rx277_eos, rx277_done - set rx277_off, 0 - lt rx277_pos, 2, rx277_start - sub rx277_off, rx277_pos, 1 - substr rx277_tgt, rx277_tgt, rx277_off - rx277_start: - eq $I10, 1, rx277_restart - if_null rx277_debug, debug_300 - rx277_cur."!cursor_debug"("START ", "metachar:sym") - debug_300: + length rx309_eos, rx309_tgt + gt rx309_pos, rx309_eos, rx309_done + set rx309_off, 0 + lt rx309_pos, 2, rx309_start + sub rx309_off, rx309_pos, 1 + substr rx309_tgt, rx309_tgt, rx309_off + rx309_start: + eq $I10, 1, rx309_restart + if_null rx309_debug, debug_333 + rx309_cur."!cursor_debug"("START", "metachar:sym") + debug_333: $I10 = self.'from'() - ne $I10, -1, rxscan281_done - goto rxscan281_scan - rxscan281_loop: - ($P10) = rx277_cur."from"() - inc $P10 - set rx277_pos, $P10 - ge rx277_pos, rx277_eos, rxscan281_done - rxscan281_scan: - set_addr $I10, rxscan281_loop - rx277_cur."!mark_push"(0, rx277_pos, $I10) - rxscan281_done: -.annotate 'line', 91 + ne $I10, -1, rxscan313_done + goto rxscan313_scan + rxscan313_loop: + ($P10) = rx309_cur."from"() + inc $P10 + set rx309_pos, $P10 + ge rx309_pos, rx309_eos, rxscan313_done + rxscan313_scan: + set_addr $I10, rxscan313_loop + rx309_cur."!mark_push"(0, rx309_pos, $I10) + rxscan313_done: +.annotate 'line', 101 # rx subrule "mod_internal" subtype=capture negate= - rx277_cur."!cursor_pos"(rx277_pos) - $P10 = rx277_cur."mod_internal"() - unless $P10, rx277_fail - rx277_cur."!mark_push"(0, -1, 0, $P10) + rx309_cur."!cursor_pos"(rx309_pos) + $P10 = rx309_cur."mod_internal"() + unless $P10, rx309_fail + rx309_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("mod_internal") - rx277_pos = $P10."pos"() + rx309_pos = $P10."pos"() # rx pass - rx277_cur."!cursor_pass"(rx277_pos, "metachar:sym") - if_null rx277_debug, debug_301 - rx277_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx277_pos) - debug_301: - .return (rx277_cur) - rx277_restart: + rx309_cur."!cursor_pass"(rx309_pos, "metachar:sym") + if_null rx309_debug, debug_334 + rx309_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx309_pos) + debug_334: + .return (rx309_cur) + rx309_restart: .annotate 'line', 3 - if_null rx277_debug, debug_302 - rx277_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_302: - rx277_fail: - (rx277_rep, rx277_pos, $I10, $P10) = rx277_cur."!mark_fail"(0) - lt rx277_pos, -1, rx277_done - eq rx277_pos, -1, rx277_fail - jump $I10 - rx277_done: - rx277_cur."!cursor_fail"() - if_null rx277_debug, debug_303 - rx277_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_303: - .return (rx277_cur) + if_null rx309_debug, debug_335 + rx309_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_335: + rx309_fail: + (rx309_rep, rx309_pos, $I10, $P10) = rx309_cur."!mark_fail"(0) + lt rx309_pos, -1, rx309_done + eq rx309_pos, -1, rx309_fail + jump $I10 + rx309_done: + rx309_cur."!cursor_fail"() + if_null rx309_debug, debug_336 + rx309_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_336: + .return (rx309_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("82_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("90_1284728471.30547") :method .annotate 'line', 3 - $P279 = self."!PREFIX__!subrule"("mod_internal", "") - new $P280, "ResizablePMCArray" - push $P280, $P279 - .return ($P280) + $P311 = self."!PREFIX__!subrule"("mod_internal", "") + new $P312, "ResizablePMCArray" + push $P312, $P311 + .return ($P312) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<~>" :subid("83_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .local string rx283_tgt - .local int rx283_pos - .local int rx283_off - .local int rx283_eos - .local int rx283_rep - .local pmc rx283_cur - .local pmc rx283_debug - (rx283_cur, rx283_pos, rx283_tgt, $I10) = self."!cursor_start"() - getattribute rx283_debug, rx283_cur, "$!debug" - .lex unicode:"$\x{a2}", rx283_cur - .local pmc match - .lex "$/", match - length rx283_eos, rx283_tgt - gt rx283_pos, rx283_eos, rx283_done - set rx283_off, 0 - lt rx283_pos, 2, rx283_start - sub rx283_off, rx283_pos, 1 - substr rx283_tgt, rx283_tgt, rx283_off - rx283_start: - eq $I10, 1, rx283_restart - if_null rx283_debug, debug_304 - rx283_cur."!cursor_debug"("START ", "metachar:sym<~>") - debug_304: +.sub "metachar:sym" :subid("91_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx315_tgt + .local int rx315_pos + .local int rx315_off + .local int rx315_eos + .local int rx315_rep + .local pmc rx315_cur + .local pmc rx315_debug + (rx315_cur, rx315_pos, rx315_tgt, $I10) = self."!cursor_start"() + getattribute rx315_debug, rx315_cur, "$!debug" + .lex unicode:"$\x{a2}", rx315_cur + .local pmc match + .lex "$/", match + length rx315_eos, rx315_tgt + gt rx315_pos, rx315_eos, rx315_done + set rx315_off, 0 + lt rx315_pos, 2, rx315_start + sub rx315_off, rx315_pos, 1 + substr rx315_tgt, rx315_tgt, rx315_off + rx315_start: + eq $I10, 1, rx315_restart + if_null rx315_debug, debug_337 + rx315_cur."!cursor_debug"("START", "metachar:sym") + debug_337: $I10 = self.'from'() - ne $I10, -1, rxscan287_done - goto rxscan287_scan - rxscan287_loop: - ($P10) = rx283_cur."from"() - inc $P10 - set rx283_pos, $P10 - ge rx283_pos, rx283_eos, rxscan287_done - rxscan287_scan: - set_addr $I10, rxscan287_loop - rx283_cur."!mark_push"(0, rx283_pos, $I10) - rxscan287_done: -.annotate 'line', 95 - # rx subcapture "sym" - set_addr $I10, rxcap_288_fail - rx283_cur."!mark_push"(0, rx283_pos, $I10) - # rx literal "~" - add $I11, rx283_pos, 1 - gt $I11, rx283_eos, rx283_fail - sub $I11, rx283_pos, rx283_off - ord $I11, rx283_tgt, $I11 - ne $I11, 126, rx283_fail - add rx283_pos, 1 - set_addr $I10, rxcap_288_fail - ($I12, $I11) = rx283_cur."!mark_peek"($I10) - rx283_cur."!cursor_pos"($I11) - ($P10) = rx283_cur."!cursor_start"() - $P10."!cursor_pass"(rx283_pos, "") - rx283_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("sym") - goto rxcap_288_done - rxcap_288_fail: - goto rx283_fail - rxcap_288_done: -.annotate 'line', 96 - # rx subrule "ws" subtype=method negate= - rx283_cur."!cursor_pos"(rx283_pos) - $P10 = rx283_cur."ws"() - unless $P10, rx283_fail - rx283_pos = $P10."pos"() - # rx subrule "quantified_atom" subtype=capture negate= - rx283_cur."!cursor_pos"(rx283_pos) - $P10 = rx283_cur."quantified_atom"() - unless $P10, rx283_fail - rx283_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("GOAL") - rx283_pos = $P10."pos"() -.annotate 'line', 97 - # rx subrule "ws" subtype=method negate= - rx283_cur."!cursor_pos"(rx283_pos) - $P10 = rx283_cur."ws"() - unless $P10, rx283_fail - rx283_pos = $P10."pos"() - # rx subrule "quantified_atom" subtype=capture negate= - rx283_cur."!cursor_pos"(rx283_pos) - $P10 = rx283_cur."quantified_atom"() - unless $P10, rx283_fail - rx283_cur."!mark_push"(0, -1, 0, $P10) - $P10."!cursor_names"("EXPR") - rx283_pos = $P10."pos"() -.annotate 'line', 94 + ne $I10, -1, rxscan319_done + goto rxscan319_scan + rxscan319_loop: + ($P10) = rx315_cur."from"() + inc $P10 + set rx315_pos, $P10 + ge rx315_pos, rx315_eos, rxscan319_done + rxscan319_scan: + set_addr $I10, rxscan319_loop + rx315_cur."!mark_push"(0, rx315_pos, $I10) + rxscan319_done: +.annotate 'line', 103 + # rx subrule "quantifier" subtype=capture negate= + rx315_cur."!cursor_pos"(rx315_pos) + $P10 = rx315_cur."quantifier"() + unless $P10, rx315_fail + rx315_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("quantifier") + rx315_pos = $P10."pos"() + # rx subrule "panic" subtype=method negate= + rx315_cur."!cursor_pos"(rx315_pos) + $P10 = rx315_cur."panic"("Quantifier quantifies nothing") + unless $P10, rx315_fail + rx315_pos = $P10."pos"() +.annotate 'line', 102 # rx pass - rx283_cur."!cursor_pass"(rx283_pos, "metachar:sym<~>") - if_null rx283_debug, debug_305 - rx283_cur."!cursor_debug"("PASS ", "metachar:sym<~>", " at pos=", rx283_pos) - debug_305: - .return (rx283_cur) - rx283_restart: + rx315_cur."!cursor_pass"(rx315_pos, "metachar:sym") + if_null rx315_debug, debug_338 + rx315_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx315_pos) + debug_338: + .return (rx315_cur) + rx315_restart: .annotate 'line', 3 - if_null rx283_debug, debug_306 - rx283_cur."!cursor_debug"("NEXT ", "metachar:sym<~>") - debug_306: - rx283_fail: - (rx283_rep, rx283_pos, $I10, $P10) = rx283_cur."!mark_fail"(0) - lt rx283_pos, -1, rx283_done - eq rx283_pos, -1, rx283_fail - jump $I10 - rx283_done: - rx283_cur."!cursor_fail"() - if_null rx283_debug, debug_307 - rx283_cur."!cursor_debug"("FAIL ", "metachar:sym<~>") - debug_307: - .return (rx283_cur) + if_null rx315_debug, debug_339 + rx315_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_339: + rx315_fail: + (rx315_rep, rx315_pos, $I10, $P10) = rx315_cur."!mark_fail"(0) + lt rx315_pos, -1, rx315_done + eq rx315_pos, -1, rx315_fail + jump $I10 + rx315_done: + rx315_cur."!cursor_fail"() + if_null rx315_debug, debug_340 + rx315_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_340: + .return (rx315_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<~>" :subid("84_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("92_1284728471.30547") :method .annotate 'line', 3 - $P285 = self."!PREFIX__!subrule"("ws", "~") - new $P286, "ResizablePMCArray" - push $P286, $P285 - .return ($P286) + $P317 = self."!PREFIX__!subrule"("quantifier", "") + new $P318, "ResizablePMCArray" + push $P318, $P317 + .return ($P318) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym<{*}>" :subid("85_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym<~>" :subid("93_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx290_tgt - .local int rx290_pos - .local int rx290_off - .local int rx290_eos - .local int rx290_rep - .local pmc rx290_cur - .local pmc rx290_debug - (rx290_cur, rx290_pos, rx290_tgt, $I10) = self."!cursor_start"() - rx290_cur."!cursor_caparray"("key") - getattribute rx290_debug, rx290_cur, "$!debug" - .lex unicode:"$\x{a2}", rx290_cur + .local string rx321_tgt + .local int rx321_pos + .local int rx321_off + .local int rx321_eos + .local int rx321_rep + .local pmc rx321_cur + .local pmc rx321_debug + (rx321_cur, rx321_pos, rx321_tgt, $I10) = self."!cursor_start"() + getattribute rx321_debug, rx321_cur, "$!debug" + .lex unicode:"$\x{a2}", rx321_cur .local pmc match .lex "$/", match - length rx290_eos, rx290_tgt - gt rx290_pos, rx290_eos, rx290_done - set rx290_off, 0 - lt rx290_pos, 2, rx290_start - sub rx290_off, rx290_pos, 1 - substr rx290_tgt, rx290_tgt, rx290_off - rx290_start: - eq $I10, 1, rx290_restart - if_null rx290_debug, debug_308 - rx290_cur."!cursor_debug"("START ", "metachar:sym<{*}>") - debug_308: + length rx321_eos, rx321_tgt + gt rx321_pos, rx321_eos, rx321_done + set rx321_off, 0 + lt rx321_pos, 2, rx321_start + sub rx321_off, rx321_pos, 1 + substr rx321_tgt, rx321_tgt, rx321_off + rx321_start: + eq $I10, 1, rx321_restart + if_null rx321_debug, debug_341 + rx321_cur."!cursor_debug"("START", "metachar:sym<~>") + debug_341: $I10 = self.'from'() - ne $I10, -1, rxscan293_done - goto rxscan293_scan - rxscan293_loop: - ($P10) = rx290_cur."from"() - inc $P10 - set rx290_pos, $P10 - ge rx290_pos, rx290_eos, rxscan293_done - rxscan293_scan: - set_addr $I10, rxscan293_loop - rx290_cur."!mark_push"(0, rx290_pos, $I10) - rxscan293_done: -.annotate 'line', 101 + ne $I10, -1, rxscan325_done + goto rxscan325_scan + rxscan325_loop: + ($P10) = rx321_cur."from"() + inc $P10 + set rx321_pos, $P10 + ge rx321_pos, rx321_eos, rxscan325_done + rxscan325_scan: + set_addr $I10, rxscan325_loop + rx321_cur."!mark_push"(0, rx321_pos, $I10) + rxscan325_done: +.annotate 'line', 108 # rx subcapture "sym" - set_addr $I10, rxcap_294_fail - rx290_cur."!mark_push"(0, rx290_pos, $I10) + set_addr $I10, rxcap_326_fail + rx321_cur."!mark_push"(0, rx321_pos, $I10) + # rx literal "~" + add $I11, rx321_pos, 1 + gt $I11, rx321_eos, rx321_fail + sub $I11, rx321_pos, rx321_off + ord $I11, rx321_tgt, $I11 + ne $I11, 126, rx321_fail + add rx321_pos, 1 + set_addr $I10, rxcap_326_fail + ($I12, $I11) = rx321_cur."!mark_peek"($I10) + rx321_cur."!cursor_pos"($I11) + ($P10) = rx321_cur."!cursor_start"() + $P10."!cursor_pass"(rx321_pos, "") + rx321_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("sym") + goto rxcap_326_done + rxcap_326_fail: + goto rx321_fail + rxcap_326_done: +.annotate 'line', 109 + # rx subrule "ws" subtype=method negate= + rx321_cur."!cursor_pos"(rx321_pos) + $P10 = rx321_cur."ws"() + unless $P10, rx321_fail + rx321_pos = $P10."pos"() + # rx subrule "quantified_atom" subtype=capture negate= + rx321_cur."!cursor_pos"(rx321_pos) + $P10 = rx321_cur."quantified_atom"() + unless $P10, rx321_fail + rx321_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("GOAL") + rx321_pos = $P10."pos"() +.annotate 'line', 110 + # rx subrule "ws" subtype=method negate= + rx321_cur."!cursor_pos"(rx321_pos) + $P10 = rx321_cur."ws"() + unless $P10, rx321_fail + rx321_pos = $P10."pos"() + # rx subrule "quantified_atom" subtype=capture negate= + rx321_cur."!cursor_pos"(rx321_pos) + $P10 = rx321_cur."quantified_atom"() + unless $P10, rx321_fail + rx321_cur."!mark_push"(0, -1, 0, $P10) + $P10."!cursor_names"("EXPR") + rx321_pos = $P10."pos"() +.annotate 'line', 107 + # rx pass + rx321_cur."!cursor_pass"(rx321_pos, "metachar:sym<~>") + if_null rx321_debug, debug_342 + rx321_cur."!cursor_debug"("PASS", "metachar:sym<~>", " at pos=", rx321_pos) + debug_342: + .return (rx321_cur) + rx321_restart: +.annotate 'line', 3 + if_null rx321_debug, debug_343 + rx321_cur."!cursor_debug"("NEXT", "metachar:sym<~>") + debug_343: + rx321_fail: + (rx321_rep, rx321_pos, $I10, $P10) = rx321_cur."!mark_fail"(0) + lt rx321_pos, -1, rx321_done + eq rx321_pos, -1, rx321_fail + jump $I10 + rx321_done: + rx321_cur."!cursor_fail"() + if_null rx321_debug, debug_344 + rx321_cur."!cursor_debug"("FAIL", "metachar:sym<~>") + debug_344: + .return (rx321_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "!PREFIX__metachar:sym<~>" :subid("94_1284728471.30547") :method +.annotate 'line', 3 + $P323 = self."!PREFIX__!subrule"("ws", "~") + new $P324, "ResizablePMCArray" + push $P324, $P323 + .return ($P324) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "metachar:sym<{*}>" :subid("95_1284728471.30547") :method :outer("11_1284728471.30547") +.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"() + rx328_cur."!cursor_caparray"("key") + 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_345 + rx328_cur."!cursor_debug"("START", "metachar:sym<{*}>") + debug_345: + $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', 114 + # rx subcapture "sym" + set_addr $I10, rxcap_332_fail + rx328_cur."!mark_push"(0, rx328_pos, $I10) # rx literal "{*}" - add $I11, rx290_pos, 3 - gt $I11, rx290_eos, rx290_fail - sub $I11, rx290_pos, rx290_off - substr $S10, rx290_tgt, $I11, 3 - ne $S10, "{*}", rx290_fail - add rx290_pos, 3 - set_addr $I10, rxcap_294_fail - ($I12, $I11) = rx290_cur."!mark_peek"($I10) - rx290_cur."!cursor_pos"($I11) - ($P10) = rx290_cur."!cursor_start"() - $P10."!cursor_pass"(rx290_pos, "") - rx290_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx328_pos, 3 + gt $I11, rx328_eos, rx328_fail + sub $I11, rx328_pos, rx328_off + substr $S10, rx328_tgt, $I11, 3 + ne $S10, "{*}", rx328_fail + add rx328_pos, 3 + set_addr $I10, rxcap_332_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) $P10."!cursor_names"("sym") - goto rxcap_294_done - rxcap_294_fail: - goto rx290_fail - rxcap_294_done: -.annotate 'line', 102 - # rx rxquantr295 ** 0..1 - set_addr $I10, rxquantr295_done - rx290_cur."!mark_push"(0, rx290_pos, $I10) - rxquantr295_loop: - # rx rxquantr296 ** 0..* - set_addr $I10, rxquantr296_done - rx290_cur."!mark_push"(0, rx290_pos, $I10) - rxquantr296_loop: - # rx enumcharlist negate=0 - ge rx290_pos, rx290_eos, rx290_fail - sub $I10, rx290_pos, rx290_off - substr $S10, rx290_tgt, $I10, 1 + goto rxcap_332_done + rxcap_332_fail: + goto rx328_fail + rxcap_332_done: +.annotate 'line', 115 + # rx rxquantr333 ** 0..1 + set_addr $I10, rxquantr333_done + rx328_cur."!mark_push"(0, rx328_pos, $I10) + rxquantr333_loop: + # rx enumcharlist_q negate=0 r 0..-1 + sub $I10, rx328_pos, rx328_off + set rx328_rep, 0 + sub $I12, rx328_eos, rx328_pos + rxenumcharlistq334_loop: + le $I12, 0, rxenumcharlistq334_done + substr $S10, rx328_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, rx290_fail - inc rx290_pos - set_addr $I10, rxquantr296_done - (rx290_rep) = rx290_cur."!mark_commit"($I10) - set_addr $I10, rxquantr296_done - rx290_cur."!mark_push"(rx290_rep, rx290_pos, $I10) - goto rxquantr296_loop - rxquantr296_done: + lt $I11, 0, rxenumcharlistq334_done + inc rx328_rep + inc $I10 + dec $I12 + goto rxenumcharlistq334_loop + rxenumcharlistq334_done: + add rx328_pos, rx328_pos, rx328_rep # rx literal "#= " - add $I11, rx290_pos, 3 - gt $I11, rx290_eos, rx290_fail - sub $I11, rx290_pos, rx290_off - substr $S10, rx290_tgt, $I11, 3 - ne $S10, "#= ", rx290_fail - add rx290_pos, 3 - # rx rxquantr297 ** 0..* - set_addr $I10, rxquantr297_done - rx290_cur."!mark_push"(0, rx290_pos, $I10) - rxquantr297_loop: - # rx enumcharlist negate=0 - ge rx290_pos, rx290_eos, rx290_fail - sub $I10, rx290_pos, rx290_off - substr $S10, rx290_tgt, $I10, 1 + add $I11, rx328_pos, 3 + gt $I11, rx328_eos, rx328_fail + sub $I11, rx328_pos, rx328_off + substr $S10, rx328_tgt, $I11, 3 + ne $S10, "#= ", rx328_fail + add rx328_pos, 3 + # rx enumcharlist_q negate=0 r 0..-1 + sub $I10, rx328_pos, rx328_off + set rx328_rep, 0 + sub $I12, rx328_eos, rx328_pos + rxenumcharlistq335_loop: + le $I12, 0, rxenumcharlistq335_done + substr $S10, rx328_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, rx290_fail - inc rx290_pos - set_addr $I10, rxquantr297_done - (rx290_rep) = rx290_cur."!mark_commit"($I10) - set_addr $I10, rxquantr297_done - rx290_cur."!mark_push"(rx290_rep, rx290_pos, $I10) - goto rxquantr297_loop - rxquantr297_done: + lt $I11, 0, rxenumcharlistq335_done + inc rx328_rep + inc $I10 + dec $I12 + goto rxenumcharlistq335_loop + rxenumcharlistq335_done: + add rx328_pos, rx328_pos, rx328_rep # rx subcapture "key" - set_addr $I10, rxcap_300_fail - rx290_cur."!mark_push"(0, rx290_pos, $I10) + set_addr $I10, rxcap_338_fail + rx328_cur."!mark_push"(0, rx328_pos, $I10) # rx charclass_q S r 1..-1 - sub $I10, rx290_pos, rx290_off - find_cclass $I11, 32, rx290_tgt, $I10, rx290_eos + sub $I10, rx328_pos, rx328_off + find_cclass $I11, 32, rx328_tgt, $I10, rx328_eos add $I12, $I10, 1 - lt $I11, $I12, rx290_fail - add rx290_pos, rx290_off, $I11 - # rx rxquantr298 ** 0..* - set_addr $I10, rxquantr298_done - rx290_cur."!mark_push"(0, rx290_pos, $I10) - rxquantr298_loop: - # rx rxquantr299 ** 1..* - set_addr $I10, rxquantr299_done - rx290_cur."!mark_push"(0, -1, $I10) - rxquantr299_loop: - # rx enumcharlist negate=0 - ge rx290_pos, rx290_eos, rx290_fail - sub $I10, rx290_pos, rx290_off - substr $S10, rx290_tgt, $I10, 1 + lt $I11, $I12, rx328_fail + add rx328_pos, rx328_off, $I11 + # rx rxquantr336 ** 0..* + set_addr $I10, rxquantr336_done + rx328_cur."!mark_push"(0, rx328_pos, $I10) + rxquantr336_loop: + # rx enumcharlist_q negate=0 r 1..-1 + sub $I10, rx328_pos, rx328_off + set rx328_rep, 0 + sub $I12, rx328_eos, rx328_pos + rxenumcharlistq337_loop: + le $I12, 0, rxenumcharlistq337_done + substr $S10, rx328_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, rx290_fail - inc rx290_pos - set_addr $I10, rxquantr299_done - (rx290_rep) = rx290_cur."!mark_commit"($I10) - set_addr $I10, rxquantr299_done - rx290_cur."!mark_push"(rx290_rep, rx290_pos, $I10) - goto rxquantr299_loop - rxquantr299_done: + lt $I11, 0, rxenumcharlistq337_done + inc rx328_rep + inc $I10 + dec $I12 + goto rxenumcharlistq337_loop + rxenumcharlistq337_done: + lt rx328_rep, 1, rx328_fail + add rx328_pos, rx328_pos, rx328_rep # rx charclass_q S r 1..-1 - sub $I10, rx290_pos, rx290_off - find_cclass $I11, 32, rx290_tgt, $I10, rx290_eos + sub $I10, rx328_pos, rx328_off + find_cclass $I11, 32, rx328_tgt, $I10, rx328_eos add $I12, $I10, 1 - lt $I11, $I12, rx290_fail - add rx290_pos, rx290_off, $I11 - set_addr $I10, rxquantr298_done - (rx290_rep) = rx290_cur."!mark_commit"($I10) - set_addr $I10, rxquantr298_done - rx290_cur."!mark_push"(rx290_rep, rx290_pos, $I10) - goto rxquantr298_loop - rxquantr298_done: - set_addr $I10, rxcap_300_fail - ($I12, $I11) = rx290_cur."!mark_peek"($I10) - rx290_cur."!cursor_pos"($I11) - ($P10) = rx290_cur."!cursor_start"() - $P10."!cursor_pass"(rx290_pos, "") - rx290_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, $I12, rx328_fail + add rx328_pos, rx328_off, $I11 + set_addr $I10, rxquantr336_done + (rx328_rep) = rx328_cur."!mark_commit"($I10) + set_addr $I10, rxquantr336_done + rx328_cur."!mark_push"(rx328_rep, rx328_pos, $I10) + goto rxquantr336_loop + rxquantr336_done: + set_addr $I10, rxcap_338_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) $P10."!cursor_names"("key") - goto rxcap_300_done - rxcap_300_fail: - goto rx290_fail - rxcap_300_done: - set_addr $I10, rxquantr295_done - (rx290_rep) = rx290_cur."!mark_commit"($I10) - rxquantr295_done: -.annotate 'line', 100 - # rx pass - rx290_cur."!cursor_pass"(rx290_pos, "metachar:sym<{*}>") - if_null rx290_debug, debug_309 - rx290_cur."!cursor_debug"("PASS ", "metachar:sym<{*}>", " at pos=", rx290_pos) - debug_309: - .return (rx290_cur) - rx290_restart: + goto rxcap_338_done + rxcap_338_fail: + goto rx328_fail + rxcap_338_done: + set_addr $I10, rxquantr333_done + (rx328_rep) = rx328_cur."!mark_commit"($I10) + rxquantr333_done: +.annotate 'line', 113 + # rx pass + rx328_cur."!cursor_pass"(rx328_pos, "metachar:sym<{*}>") + if_null rx328_debug, debug_346 + rx328_cur."!cursor_debug"("PASS", "metachar:sym<{*}>", " at pos=", rx328_pos) + debug_346: + .return (rx328_cur) + rx328_restart: .annotate 'line', 3 - if_null rx290_debug, debug_310 - rx290_cur."!cursor_debug"("NEXT ", "metachar:sym<{*}>") - debug_310: - rx290_fail: - (rx290_rep, rx290_pos, $I10, $P10) = rx290_cur."!mark_fail"(0) - lt rx290_pos, -1, rx290_done - eq rx290_pos, -1, rx290_fail - jump $I10 - rx290_done: - rx290_cur."!cursor_fail"() - if_null rx290_debug, debug_311 - rx290_cur."!cursor_debug"("FAIL ", "metachar:sym<{*}>") - debug_311: - .return (rx290_cur) + if_null rx328_debug, debug_347 + rx328_cur."!cursor_debug"("NEXT", "metachar:sym<{*}>") + debug_347: + 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_348 + rx328_cur."!cursor_debug"("FAIL", "metachar:sym<{*}>") + debug_348: + .return (rx328_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym<{*}>" :subid("86_1282016522.91354") :method +.sub "!PREFIX__metachar:sym<{*}>" :subid("96_1284728471.30547") :method .annotate 'line', 3 - new $P292, "ResizablePMCArray" - push $P292, "{*}" - .return ($P292) + new $P330, "ResizablePMCArray" + push $P330, "{*}" + .return ($P330) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("87_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("97_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx302_tgt - .local int rx302_pos - .local int rx302_off - .local int rx302_eos - .local int rx302_rep - .local pmc rx302_cur - .local pmc rx302_debug - (rx302_cur, rx302_pos, rx302_tgt, $I10) = self."!cursor_start"() - getattribute rx302_debug, rx302_cur, "$!debug" - .lex unicode:"$\x{a2}", rx302_cur + .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 rx302_eos, rx302_tgt - gt rx302_pos, rx302_eos, rx302_done - set rx302_off, 0 - lt rx302_pos, 2, rx302_start - sub rx302_off, rx302_pos, 1 - substr rx302_tgt, rx302_tgt, rx302_off - rx302_start: - eq $I10, 1, rx302_restart - if_null rx302_debug, debug_312 - rx302_cur."!cursor_debug"("START ", "metachar:sym") - debug_312: + 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_349 + rx340_cur."!cursor_debug"("START", "metachar:sym") + debug_349: $I10 = self.'from'() - ne $I10, -1, rxscan306_done - goto rxscan306_scan - rxscan306_loop: - ($P10) = rx302_cur."from"() - inc $P10 - set rx302_pos, $P10 - ge rx302_pos, rx302_eos, rxscan306_done - rxscan306_scan: - set_addr $I10, rxscan306_loop - rx302_cur."!mark_push"(0, rx302_pos, $I10) - rxscan306_done: -.annotate 'line', 105 + ne $I10, -1, rxscan344_done + goto rxscan344_scan + rxscan344_loop: + ($P10) = rx340_cur."from"() + inc $P10 + set rx340_pos, $P10 + ge rx340_pos, rx340_eos, rxscan344_done + rxscan344_scan: + set_addr $I10, rxscan344_loop + rx340_cur."!mark_push"(0, rx340_pos, $I10) + rxscan344_done: +.annotate 'line', 118 # rx literal "<" - add $I11, rx302_pos, 1 - gt $I11, rx302_eos, rx302_fail - sub $I11, rx302_pos, rx302_off - ord $I11, rx302_tgt, $I11 - ne $I11, 60, rx302_fail - add rx302_pos, 1 + add $I11, rx340_pos, 1 + gt $I11, rx340_eos, rx340_fail + sub $I11, rx340_pos, rx340_off + ord $I11, rx340_tgt, $I11 + ne $I11, 60, rx340_fail + add rx340_pos, 1 # rx subrule "assertion" subtype=capture negate= - rx302_cur."!cursor_pos"(rx302_pos) - $P10 = rx302_cur."assertion"() - unless $P10, rx302_fail - rx302_cur."!mark_push"(0, -1, 0, $P10) + rx340_cur."!cursor_pos"(rx340_pos) + $P10 = rx340_cur."assertion"() + unless $P10, rx340_fail + rx340_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("assertion") - rx302_pos = $P10."pos"() - alt307_0: -.annotate 'line', 106 - set_addr $I10, alt307_1 - rx302_cur."!mark_push"(0, rx302_pos, $I10) + rx340_pos = $P10."pos"() + alt345_0: +.annotate 'line', 119 + set_addr $I10, alt345_1 + rx340_cur."!mark_push"(0, rx340_pos, $I10) # rx literal ">" - add $I11, rx302_pos, 1 - gt $I11, rx302_eos, rx302_fail - sub $I11, rx302_pos, rx302_off - ord $I11, rx302_tgt, $I11 - ne $I11, 62, rx302_fail - add rx302_pos, 1 - goto alt307_end - alt307_1: + add $I11, rx340_pos, 1 + gt $I11, rx340_eos, rx340_fail + sub $I11, rx340_pos, rx340_off + ord $I11, rx340_tgt, $I11 + ne $I11, 62, rx340_fail + add rx340_pos, 1 + goto alt345_end + alt345_1: # rx subrule "panic" subtype=method negate= - rx302_cur."!cursor_pos"(rx302_pos) - $P10 = rx302_cur."panic"("regex assertion not terminated by angle bracket") - unless $P10, rx302_fail - rx302_pos = $P10."pos"() - alt307_end: -.annotate 'line', 104 + rx340_cur."!cursor_pos"(rx340_pos) + $P10 = rx340_cur."panic"("regex assertion not terminated by angle bracket") + unless $P10, rx340_fail + rx340_pos = $P10."pos"() + alt345_end: +.annotate 'line', 117 # rx pass - rx302_cur."!cursor_pass"(rx302_pos, "metachar:sym") - if_null rx302_debug, debug_313 - rx302_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx302_pos) - debug_313: - .return (rx302_cur) - rx302_restart: + rx340_cur."!cursor_pass"(rx340_pos, "metachar:sym") + if_null rx340_debug, debug_350 + rx340_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx340_pos) + debug_350: + .return (rx340_cur) + rx340_restart: .annotate 'line', 3 - if_null rx302_debug, debug_314 - rx302_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_314: - rx302_fail: - (rx302_rep, rx302_pos, $I10, $P10) = rx302_cur."!mark_fail"(0) - lt rx302_pos, -1, rx302_done - eq rx302_pos, -1, rx302_fail - jump $I10 - rx302_done: - rx302_cur."!cursor_fail"() - if_null rx302_debug, debug_315 - rx302_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_315: - .return (rx302_cur) + if_null rx340_debug, debug_351 + rx340_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_351: + 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_352 + rx340_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_352: + .return (rx340_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("88_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("98_1284728471.30547") :method .annotate 'line', 3 - $P304 = self."!PREFIX__!subrule"("assertion", "<") - new $P305, "ResizablePMCArray" - push $P305, $P304 - .return ($P305) + $P342 = self."!PREFIX__!subrule"("assertion", "<") + new $P343, "ResizablePMCArray" + push $P343, $P342 + .return ($P343) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("89_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "metachar:sym" :subid("99_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx309_tgt - .local int rx309_pos - .local int rx309_off - .local int rx309_eos - .local int rx309_rep - .local pmc rx309_cur - .local pmc rx309_debug - (rx309_cur, rx309_pos, rx309_tgt, $I10) = self."!cursor_start"() - rx309_cur."!cursor_caparray"("quantified_atom") - getattribute rx309_debug, rx309_cur, "$!debug" - .lex unicode:"$\x{a2}", rx309_cur - .local pmc match - .lex "$/", match - length rx309_eos, rx309_tgt - gt rx309_pos, rx309_eos, rx309_done - set rx309_off, 0 - lt rx309_pos, 2, rx309_start - sub rx309_off, rx309_pos, 1 - substr rx309_tgt, rx309_tgt, rx309_off - rx309_start: - eq $I10, 1, rx309_restart - if_null rx309_debug, debug_316 - rx309_cur."!cursor_debug"("START ", "metachar:sym") - debug_316: + .local string rx347_tgt + .local int rx347_pos + .local int rx347_off + .local int rx347_eos + .local int rx347_rep + .local pmc rx347_cur + .local pmc rx347_debug + (rx347_cur, rx347_pos, rx347_tgt, $I10) = self."!cursor_start"() + rx347_cur."!cursor_caparray"("quantified_atom") + getattribute rx347_debug, rx347_cur, "$!debug" + .lex unicode:"$\x{a2}", rx347_cur + .local pmc match + .lex "$/", match + length rx347_eos, rx347_tgt + gt rx347_pos, rx347_eos, rx347_done + set rx347_off, 0 + lt rx347_pos, 2, rx347_start + sub rx347_off, rx347_pos, 1 + substr rx347_tgt, rx347_tgt, rx347_off + rx347_start: + eq $I10, 1, rx347_restart + if_null rx347_debug, debug_353 + rx347_cur."!cursor_debug"("START", "metachar:sym") + debug_353: $I10 = self.'from'() - ne $I10, -1, rxscan312_done - goto rxscan312_scan - rxscan312_loop: - ($P10) = rx309_cur."from"() - inc $P10 - set rx309_pos, $P10 - ge rx309_pos, rx309_eos, rxscan312_done - rxscan312_scan: - set_addr $I10, rxscan312_loop - rx309_cur."!mark_push"(0, rx309_pos, $I10) - rxscan312_done: - alt313_0: -.annotate 'line', 110 - set_addr $I10, alt313_1 - rx309_cur."!mark_push"(0, rx309_pos, $I10) -.annotate 'line', 111 + ne $I10, -1, rxscan350_done + goto rxscan350_scan + rxscan350_loop: + ($P10) = rx347_cur."from"() + inc $P10 + set rx347_pos, $P10 + ge rx347_pos, rx347_eos, rxscan350_done + rxscan350_scan: + set_addr $I10, rxscan350_loop + rx347_cur."!mark_push"(0, rx347_pos, $I10) + rxscan350_done: + alt351_0: +.annotate 'line', 123 + set_addr $I10, alt351_1 + rx347_cur."!mark_push"(0, rx347_pos, $I10) +.annotate 'line', 124 # rx literal "$<" - add $I11, rx309_pos, 2 - gt $I11, rx309_eos, rx309_fail - sub $I11, rx309_pos, rx309_off - substr $S10, rx309_tgt, $I11, 2 - ne $S10, "$<", rx309_fail - add rx309_pos, 2 + add $I11, rx347_pos, 2 + gt $I11, rx347_eos, rx347_fail + sub $I11, rx347_pos, rx347_off + substr $S10, rx347_tgt, $I11, 2 + ne $S10, "$<", rx347_fail + add rx347_pos, 2 # rx subcapture "name" - set_addr $I10, rxcap_315_fail - rx309_cur."!mark_push"(0, rx309_pos, $I10) - # rx rxquantr314 ** 1..* - set_addr $I10, rxquantr314_done - rx309_cur."!mark_push"(0, -1, $I10) - rxquantr314_loop: - # rx enumcharlist negate=1 - ge rx309_pos, rx309_eos, rx309_fail - sub $I10, rx309_pos, rx309_off - substr $S10, rx309_tgt, $I10, 1 + set_addr $I10, rxcap_353_fail + rx347_cur."!mark_push"(0, rx347_pos, $I10) + # rx enumcharlist_q negate=1 r 1..-1 + sub $I10, rx347_pos, rx347_off + set rx347_rep, 0 + sub $I12, rx347_eos, rx347_pos + rxenumcharlistq352_loop: + le $I12, 0, rxenumcharlistq352_done + substr $S10, rx347_tgt, $I10, 1 index $I11, ">", $S10 - ge $I11, 0, rx309_fail - inc rx309_pos - set_addr $I10, rxquantr314_done - (rx309_rep) = rx309_cur."!mark_commit"($I10) - set_addr $I10, rxquantr314_done - rx309_cur."!mark_push"(rx309_rep, rx309_pos, $I10) - goto rxquantr314_loop - rxquantr314_done: - set_addr $I10, rxcap_315_fail - ($I12, $I11) = rx309_cur."!mark_peek"($I10) - rx309_cur."!cursor_pos"($I11) - ($P10) = rx309_cur."!cursor_start"() - $P10."!cursor_pass"(rx309_pos, "") - rx309_cur."!mark_push"(0, -1, 0, $P10) + ge $I11, 0, rxenumcharlistq352_done + inc rx347_rep + inc $I10 + dec $I12 + goto rxenumcharlistq352_loop + rxenumcharlistq352_done: + lt rx347_rep, 1, rx347_fail + add rx347_pos, rx347_pos, rx347_rep + set_addr $I10, rxcap_353_fail + ($I12, $I11) = rx347_cur."!mark_peek"($I10) + rx347_cur."!cursor_pos"($I11) + ($P10) = rx347_cur."!cursor_start"() + $P10."!cursor_pass"(rx347_pos, "") + rx347_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("name") - goto rxcap_315_done - rxcap_315_fail: - goto rx309_fail - rxcap_315_done: + goto rxcap_353_done + rxcap_353_fail: + goto rx347_fail + rxcap_353_done: # rx literal ">" - add $I11, rx309_pos, 1 - gt $I11, rx309_eos, rx309_fail - sub $I11, rx309_pos, rx309_off - ord $I11, rx309_tgt, $I11 - ne $I11, 62, rx309_fail - add rx309_pos, 1 - goto alt313_end - alt313_1: -.annotate 'line', 112 + add $I11, rx347_pos, 1 + gt $I11, rx347_eos, rx347_fail + sub $I11, rx347_pos, rx347_off + ord $I11, rx347_tgt, $I11 + ne $I11, 62, rx347_fail + add rx347_pos, 1 + goto alt351_end + alt351_1: +.annotate 'line', 125 # rx literal "$" - add $I11, rx309_pos, 1 - gt $I11, rx309_eos, rx309_fail - sub $I11, rx309_pos, rx309_off - ord $I11, rx309_tgt, $I11 - ne $I11, 36, rx309_fail - add rx309_pos, 1 + add $I11, rx347_pos, 1 + gt $I11, rx347_eos, rx347_fail + sub $I11, rx347_pos, rx347_off + ord $I11, rx347_tgt, $I11 + ne $I11, 36, rx347_fail + add rx347_pos, 1 # rx subcapture "pos" - set_addr $I10, rxcap_316_fail - rx309_cur."!mark_push"(0, rx309_pos, $I10) + set_addr $I10, rxcap_354_fail + rx347_cur."!mark_push"(0, rx347_pos, $I10) # rx charclass_q d r 1..-1 - sub $I10, rx309_pos, rx309_off - find_not_cclass $I11, 8, rx309_tgt, $I10, rx309_eos + sub $I10, rx347_pos, rx347_off + find_not_cclass $I11, 8, rx347_tgt, $I10, rx347_eos add $I12, $I10, 1 - lt $I11, $I12, rx309_fail - add rx309_pos, rx309_off, $I11 - set_addr $I10, rxcap_316_fail - ($I12, $I11) = rx309_cur."!mark_peek"($I10) - rx309_cur."!cursor_pos"($I11) - ($P10) = rx309_cur."!cursor_start"() - $P10."!cursor_pass"(rx309_pos, "") - rx309_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, $I12, rx347_fail + add rx347_pos, rx347_off, $I11 + set_addr $I10, rxcap_354_fail + ($I12, $I11) = rx347_cur."!mark_peek"($I10) + rx347_cur."!cursor_pos"($I11) + ($P10) = rx347_cur."!cursor_start"() + $P10."!cursor_pass"(rx347_pos, "") + rx347_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("pos") - goto rxcap_316_done - rxcap_316_fail: - goto rx309_fail - rxcap_316_done: - alt313_end: -.annotate 'line', 115 - # rx rxquantr317 ** 0..1 - set_addr $I10, rxquantr317_done - rx309_cur."!mark_push"(0, rx309_pos, $I10) - rxquantr317_loop: + goto rxcap_354_done + rxcap_354_fail: + goto rx347_fail + rxcap_354_done: + alt351_end: +.annotate 'line', 128 + # rx rxquantr355 ** 0..1 + set_addr $I10, rxquantr355_done + rx347_cur."!mark_push"(0, rx347_pos, $I10) + rxquantr355_loop: # rx subrule "ws" subtype=method negate= - rx309_cur."!cursor_pos"(rx309_pos) - $P10 = rx309_cur."ws"() - unless $P10, rx309_fail - rx309_pos = $P10."pos"() + rx347_cur."!cursor_pos"(rx347_pos) + $P10 = rx347_cur."ws"() + unless $P10, rx347_fail + rx347_pos = $P10."pos"() # rx literal "=" - add $I11, rx309_pos, 1 - gt $I11, rx309_eos, rx309_fail - sub $I11, rx309_pos, rx309_off - ord $I11, rx309_tgt, $I11 - ne $I11, 61, rx309_fail - add rx309_pos, 1 + add $I11, rx347_pos, 1 + gt $I11, rx347_eos, rx347_fail + sub $I11, rx347_pos, rx347_off + ord $I11, rx347_tgt, $I11 + ne $I11, 61, rx347_fail + add rx347_pos, 1 # rx subrule "ws" subtype=method negate= - rx309_cur."!cursor_pos"(rx309_pos) - $P10 = rx309_cur."ws"() - unless $P10, rx309_fail - rx309_pos = $P10."pos"() + rx347_cur."!cursor_pos"(rx347_pos) + $P10 = rx347_cur."ws"() + unless $P10, rx347_fail + rx347_pos = $P10."pos"() # rx subrule "quantified_atom" subtype=capture negate= - rx309_cur."!cursor_pos"(rx309_pos) - $P10 = rx309_cur."quantified_atom"() - unless $P10, rx309_fail - rx309_cur."!mark_push"(0, -1, 0, $P10) + rx347_cur."!cursor_pos"(rx347_pos) + $P10 = rx347_cur."quantified_atom"() + unless $P10, rx347_fail + rx347_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("quantified_atom") - rx309_pos = $P10."pos"() - set_addr $I10, rxquantr317_done - (rx309_rep) = rx309_cur."!mark_commit"($I10) - rxquantr317_done: -.annotate 'line', 109 + rx347_pos = $P10."pos"() + set_addr $I10, rxquantr355_done + (rx347_rep) = rx347_cur."!mark_commit"($I10) + rxquantr355_done: +.annotate 'line', 122 # rx pass - rx309_cur."!cursor_pass"(rx309_pos, "metachar:sym") - if_null rx309_debug, debug_317 - rx309_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx309_pos) - debug_317: - .return (rx309_cur) - rx309_restart: + rx347_cur."!cursor_pass"(rx347_pos, "metachar:sym") + if_null rx347_debug, debug_354 + rx347_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx347_pos) + debug_354: + .return (rx347_cur) + rx347_restart: .annotate 'line', 3 - if_null rx309_debug, debug_318 - rx309_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_318: - rx309_fail: - (rx309_rep, rx309_pos, $I10, $P10) = rx309_cur."!mark_fail"(0) - lt rx309_pos, -1, rx309_done - eq rx309_pos, -1, rx309_fail - jump $I10 - rx309_done: - rx309_cur."!cursor_fail"() - if_null rx309_debug, debug_319 - rx309_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_319: - .return (rx309_cur) + if_null rx347_debug, debug_355 + rx347_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_355: + rx347_fail: + (rx347_rep, rx347_pos, $I10, $P10) = rx347_cur."!mark_fail"(0) + lt rx347_pos, -1, rx347_done + eq rx347_pos, -1, rx347_fail + jump $I10 + rx347_done: + rx347_cur."!cursor_fail"() + if_null rx347_debug, debug_356 + rx347_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_356: + .return (rx347_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("90_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("100_1284728471.30547") :method .annotate 'line', 3 - new $P311, "ResizablePMCArray" - push $P311, "$" - push $P311, "$<" - .return ($P311) + new $P349, "ResizablePMCArray" + push $P349, "$" + push $P349, "$<" + .return ($P349) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "metachar:sym" :subid("91_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .local string rx319_tgt - .local int rx319_pos - .local int rx319_off - .local int rx319_eos - .local int rx319_rep - .local pmc rx319_cur - .local pmc rx319_debug - (rx319_cur, rx319_pos, rx319_tgt, $I10) = self."!cursor_start"() - getattribute rx319_debug, rx319_cur, "$!debug" - .lex unicode:"$\x{a2}", rx319_cur - .local pmc match - .lex "$/", match - length rx319_eos, rx319_tgt - gt rx319_pos, rx319_eos, rx319_done - set rx319_off, 0 - lt rx319_pos, 2, rx319_start - sub rx319_off, rx319_pos, 1 - substr rx319_tgt, rx319_tgt, rx319_off - rx319_start: - eq $I10, 1, rx319_restart - if_null rx319_debug, debug_320 - rx319_cur."!cursor_debug"("START ", "metachar:sym") - debug_320: +.sub "metachar:sym" :subid("101_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx357_tgt + .local int rx357_pos + .local int rx357_off + .local int rx357_eos + .local int rx357_rep + .local pmc rx357_cur + .local pmc rx357_debug + (rx357_cur, rx357_pos, rx357_tgt, $I10) = self."!cursor_start"() + getattribute rx357_debug, rx357_cur, "$!debug" + .lex unicode:"$\x{a2}", rx357_cur + .local pmc match + .lex "$/", match + length rx357_eos, rx357_tgt + gt rx357_pos, rx357_eos, rx357_done + set rx357_off, 0 + lt rx357_pos, 2, rx357_start + sub rx357_off, rx357_pos, 1 + substr rx357_tgt, rx357_tgt, rx357_off + rx357_start: + eq $I10, 1, rx357_restart + if_null rx357_debug, debug_357 + rx357_cur."!cursor_debug"("START", "metachar:sym") + debug_357: $I10 = self.'from'() - ne $I10, -1, rxscan322_done - goto rxscan322_scan - rxscan322_loop: - ($P10) = rx319_cur."from"() - inc $P10 - set rx319_pos, $P10 - ge rx319_pos, rx319_eos, rxscan322_done - rxscan322_scan: - set_addr $I10, rxscan322_loop - rx319_cur."!mark_push"(0, rx319_pos, $I10) - rxscan322_done: -.annotate 'line', 119 + ne $I10, -1, rxscan360_done + goto rxscan360_scan + rxscan360_loop: + ($P10) = rx357_cur."from"() + inc $P10 + set rx357_pos, $P10 + ge rx357_pos, rx357_eos, rxscan360_done + rxscan360_scan: + set_addr $I10, rxscan360_loop + rx357_cur."!mark_push"(0, rx357_pos, $I10) + rxscan360_done: +.annotate 'line', 132 # rx literal ":PIR{{" - add $I11, rx319_pos, 6 - gt $I11, rx319_eos, rx319_fail - sub $I11, rx319_pos, rx319_off - substr $S10, rx319_tgt, $I11, 6 - ne $S10, ":PIR{{", rx319_fail - add rx319_pos, 6 + add $I11, rx357_pos, 6 + gt $I11, rx357_eos, rx357_fail + sub $I11, rx357_pos, rx357_off + substr $S10, rx357_tgt, $I11, 6 + ne $S10, ":PIR{{", rx357_fail + add rx357_pos, 6 # rx subcapture "pir" - set_addr $I10, rxcap_325_fail - rx319_cur."!mark_push"(0, rx319_pos, $I10) - # rx rxquantf323 ** 0..* - set_addr $I10, rxquantf323_loop - rx319_cur."!mark_push"(0, rx319_pos, $I10) - goto rxquantf323_done - rxquantf323_loop: + set_addr $I10, rxcap_363_fail + rx357_cur."!mark_push"(0, rx357_pos, $I10) + # rx rxquantf361 ** 0..* + set_addr $I10, rxquantf361_loop + rx357_cur."!mark_push"(0, rx357_pos, $I10) + goto rxquantf361_done + rxquantf361_loop: # rx charclass . - ge rx319_pos, rx319_eos, rx319_fail - inc rx319_pos - set_addr $I10, rxquantf323_loop - rx319_cur."!mark_push"(rx319_rep, rx319_pos, $I10) - rxquantf323_done: - set_addr $I10, rxcap_325_fail - ($I12, $I11) = rx319_cur."!mark_peek"($I10) - rx319_cur."!cursor_pos"($I11) - ($P10) = rx319_cur."!cursor_start"() - $P10."!cursor_pass"(rx319_pos, "") - rx319_cur."!mark_push"(0, -1, 0, $P10) + ge rx357_pos, rx357_eos, rx357_fail + inc rx357_pos + set_addr $I10, rxquantf361_loop + rx357_cur."!mark_push"(rx357_rep, rx357_pos, $I10) + rxquantf361_done: + set_addr $I10, rxcap_363_fail + ($I12, $I11) = rx357_cur."!mark_peek"($I10) + rx357_cur."!cursor_pos"($I11) + ($P10) = rx357_cur."!cursor_start"() + $P10."!cursor_pass"(rx357_pos, "") + rx357_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("pir") - goto rxcap_325_done - rxcap_325_fail: - goto rx319_fail - rxcap_325_done: + goto rxcap_363_done + rxcap_363_fail: + goto rx357_fail + rxcap_363_done: # rx literal "}}" - add $I11, rx319_pos, 2 - gt $I11, rx319_eos, rx319_fail - sub $I11, rx319_pos, rx319_off - substr $S10, rx319_tgt, $I11, 2 - ne $S10, "}}", rx319_fail - add rx319_pos, 2 -.annotate 'line', 118 + add $I11, rx357_pos, 2 + gt $I11, rx357_eos, rx357_fail + sub $I11, rx357_pos, rx357_off + substr $S10, rx357_tgt, $I11, 2 + ne $S10, "}}", rx357_fail + add rx357_pos, 2 +.annotate 'line', 131 # rx pass - rx319_cur."!cursor_pass"(rx319_pos, "metachar:sym") - if_null rx319_debug, debug_321 - rx319_cur."!cursor_debug"("PASS ", "metachar:sym", " at pos=", rx319_pos) - debug_321: - .return (rx319_cur) - rx319_restart: + rx357_cur."!cursor_pass"(rx357_pos, "metachar:sym") + if_null rx357_debug, debug_358 + rx357_cur."!cursor_debug"("PASS", "metachar:sym", " at pos=", rx357_pos) + debug_358: + .return (rx357_cur) + rx357_restart: .annotate 'line', 3 - if_null rx319_debug, debug_322 - rx319_cur."!cursor_debug"("NEXT ", "metachar:sym") - debug_322: - rx319_fail: - (rx319_rep, rx319_pos, $I10, $P10) = rx319_cur."!mark_fail"(0) - lt rx319_pos, -1, rx319_done - eq rx319_pos, -1, rx319_fail - jump $I10 - rx319_done: - rx319_cur."!cursor_fail"() - if_null rx319_debug, debug_323 - rx319_cur."!cursor_debug"("FAIL ", "metachar:sym") - debug_323: - .return (rx319_cur) + if_null rx357_debug, debug_359 + rx357_cur."!cursor_debug"("NEXT", "metachar:sym") + debug_359: + rx357_fail: + (rx357_rep, rx357_pos, $I10, $P10) = rx357_cur."!mark_fail"(0) + lt rx357_pos, -1, rx357_done + eq rx357_pos, -1, rx357_fail + jump $I10 + rx357_done: + rx357_cur."!cursor_fail"() + if_null rx357_debug, debug_360 + rx357_cur."!cursor_debug"("FAIL", "metachar:sym") + debug_360: + .return (rx357_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__metachar:sym" :subid("92_1282016522.91354") :method +.sub "!PREFIX__metachar:sym" :subid("102_1284728471.30547") :method .annotate 'line', 3 - new $P321, "ResizablePMCArray" - push $P321, ":PIR{{" - .return ($P321) + new $P359, "ResizablePMCArray" + push $P359, ":PIR{{" + .return ($P359) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash" :subid("93_1282016522.91354") :method -.annotate 'line', 122 - $P327 = self."!protoregex"("backslash") - .return ($P327) +.sub "backslash" :subid("103_1284728471.30547") :method +.annotate 'line', 135 + $P365 = self."!protoregex"("backslash") + .return ($P365) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash" :subid("94_1282016522.91354") :method -.annotate 'line', 122 - $P329 = self."!PREFIX__!protoregex"("backslash") - .return ($P329) +.sub "!PREFIX__backslash" :subid("104_1284728471.30547") :method +.annotate 'line', 135 + $P367 = self."!PREFIX__!protoregex"("backslash") + .return ($P367) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("95_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("105_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx331_tgt - .local int rx331_pos - .local int rx331_off - .local int rx331_eos - .local int rx331_rep - .local pmc rx331_cur - .local pmc rx331_debug - (rx331_cur, rx331_pos, rx331_tgt, $I10) = self."!cursor_start"() - getattribute rx331_debug, rx331_cur, "$!debug" - .lex unicode:"$\x{a2}", rx331_cur - .local pmc match - .lex "$/", match - length rx331_eos, rx331_tgt - gt rx331_pos, rx331_eos, rx331_done - set rx331_off, 0 - lt rx331_pos, 2, rx331_start - sub rx331_off, rx331_pos, 1 - substr rx331_tgt, rx331_tgt, rx331_off - rx331_start: - eq $I10, 1, rx331_restart - if_null rx331_debug, debug_324 - rx331_cur."!cursor_debug"("START ", "backslash:sym") - debug_324: + .local string rx369_tgt + .local int rx369_pos + .local int rx369_off + .local int rx369_eos + .local int rx369_rep + .local pmc rx369_cur + .local pmc rx369_debug + (rx369_cur, rx369_pos, rx369_tgt, $I10) = self."!cursor_start"() + getattribute rx369_debug, rx369_cur, "$!debug" + .lex unicode:"$\x{a2}", rx369_cur + .local pmc match + .lex "$/", match + length rx369_eos, rx369_tgt + gt rx369_pos, rx369_eos, rx369_done + set rx369_off, 0 + lt rx369_pos, 2, rx369_start + sub rx369_off, rx369_pos, 1 + substr rx369_tgt, rx369_tgt, rx369_off + rx369_start: + eq $I10, 1, rx369_restart + if_null rx369_debug, debug_361 + rx369_cur."!cursor_debug"("START", "backslash:sym") + debug_361: $I10 = self.'from'() - ne $I10, -1, rxscan334_done - goto rxscan334_scan - rxscan334_loop: - ($P10) = rx331_cur."from"() - inc $P10 - set rx331_pos, $P10 - ge rx331_pos, rx331_eos, rxscan334_done - rxscan334_scan: - set_addr $I10, rxscan334_loop - rx331_cur."!mark_push"(0, rx331_pos, $I10) - rxscan334_done: -.annotate 'line', 123 + ne $I10, -1, rxscan372_done + goto rxscan372_scan + rxscan372_loop: + ($P10) = rx369_cur."from"() + inc $P10 + set rx369_pos, $P10 + ge rx369_pos, rx369_eos, rxscan372_done + rxscan372_scan: + set_addr $I10, rxscan372_loop + rx369_cur."!mark_push"(0, rx369_pos, $I10) + rxscan372_done: +.annotate 'line', 136 # rx subcapture "sym" - set_addr $I10, rxcap_335_fail - rx331_cur."!mark_push"(0, rx331_pos, $I10) + set_addr $I10, rxcap_373_fail + rx369_cur."!mark_push"(0, rx369_pos, $I10) # rx enumcharlist negate=0 - ge rx331_pos, rx331_eos, rx331_fail - sub $I10, rx331_pos, rx331_off - substr $S10, rx331_tgt, $I10, 1 + ge rx369_pos, rx369_eos, rx369_fail + sub $I10, rx369_pos, rx369_off + substr $S10, rx369_tgt, $I10, 1 index $I11, "dswnDSWN", $S10 - lt $I11, 0, rx331_fail - inc rx331_pos - set_addr $I10, rxcap_335_fail - ($I12, $I11) = rx331_cur."!mark_peek"($I10) - rx331_cur."!cursor_pos"($I11) - ($P10) = rx331_cur."!cursor_start"() - $P10."!cursor_pass"(rx331_pos, "") - rx331_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx369_fail + inc rx369_pos + set_addr $I10, rxcap_373_fail + ($I12, $I11) = rx369_cur."!mark_peek"($I10) + rx369_cur."!cursor_pos"($I11) + ($P10) = rx369_cur."!cursor_start"() + $P10."!cursor_pass"(rx369_pos, "") + rx369_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_335_done - rxcap_335_fail: - goto rx331_fail - rxcap_335_done: - # rx pass - rx331_cur."!cursor_pass"(rx331_pos, "backslash:sym") - if_null rx331_debug, debug_325 - rx331_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx331_pos) - debug_325: - .return (rx331_cur) - rx331_restart: + goto rxcap_373_done + rxcap_373_fail: + goto rx369_fail + rxcap_373_done: + # rx pass + rx369_cur."!cursor_pass"(rx369_pos, "backslash:sym") + if_null rx369_debug, debug_362 + rx369_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx369_pos) + debug_362: + .return (rx369_cur) + rx369_restart: .annotate 'line', 3 - if_null rx331_debug, debug_326 - rx331_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_326: - rx331_fail: - (rx331_rep, rx331_pos, $I10, $P10) = rx331_cur."!mark_fail"(0) - lt rx331_pos, -1, rx331_done - eq rx331_pos, -1, rx331_fail - jump $I10 - rx331_done: - rx331_cur."!cursor_fail"() - if_null rx331_debug, debug_327 - rx331_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_327: - .return (rx331_cur) + if_null rx369_debug, debug_363 + rx369_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_363: + rx369_fail: + (rx369_rep, rx369_pos, $I10, $P10) = rx369_cur."!mark_fail"(0) + lt rx369_pos, -1, rx369_done + eq rx369_pos, -1, rx369_fail + jump $I10 + rx369_done: + rx369_cur."!cursor_fail"() + if_null rx369_debug, debug_364 + rx369_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_364: + .return (rx369_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("96_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("106_1284728471.30547") :method .annotate 'line', 3 - new $P333, "ResizablePMCArray" - push $P333, "N" - push $P333, "W" - push $P333, "S" - push $P333, "D" - push $P333, "n" - push $P333, "w" - push $P333, "s" - push $P333, "d" - .return ($P333) + new $P371, "ResizablePMCArray" + push $P371, "N" + push $P371, "W" + push $P371, "S" + push $P371, "D" + push $P371, "n" + push $P371, "w" + push $P371, "s" + push $P371, "d" + .return ($P371) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("97_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("107_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx337_tgt - .local int rx337_pos - .local int rx337_off - .local int rx337_eos - .local int rx337_rep - .local pmc rx337_cur - .local pmc rx337_debug - (rx337_cur, rx337_pos, rx337_tgt, $I10) = self."!cursor_start"() - getattribute rx337_debug, rx337_cur, "$!debug" - .lex unicode:"$\x{a2}", rx337_cur + .local string rx375_tgt + .local int rx375_pos + .local int rx375_off + .local int rx375_eos + .local int rx375_rep + .local pmc rx375_cur + .local pmc rx375_debug + (rx375_cur, rx375_pos, rx375_tgt, $I10) = self."!cursor_start"() + getattribute rx375_debug, rx375_cur, "$!debug" + .lex unicode:"$\x{a2}", rx375_cur .local pmc match .lex "$/", match - length rx337_eos, rx337_tgt - gt rx337_pos, rx337_eos, rx337_done - set rx337_off, 0 - lt rx337_pos, 2, rx337_start - sub rx337_off, rx337_pos, 1 - substr rx337_tgt, rx337_tgt, rx337_off - rx337_start: - eq $I10, 1, rx337_restart - if_null rx337_debug, debug_328 - rx337_cur."!cursor_debug"("START ", "backslash:sym") - debug_328: + length rx375_eos, rx375_tgt + gt rx375_pos, rx375_eos, rx375_done + set rx375_off, 0 + lt rx375_pos, 2, rx375_start + sub rx375_off, rx375_pos, 1 + substr rx375_tgt, rx375_tgt, rx375_off + rx375_start: + eq $I10, 1, rx375_restart + if_null rx375_debug, debug_365 + rx375_cur."!cursor_debug"("START", "backslash:sym") + debug_365: $I10 = self.'from'() - ne $I10, -1, rxscan340_done - goto rxscan340_scan - rxscan340_loop: - ($P10) = rx337_cur."from"() - inc $P10 - set rx337_pos, $P10 - ge rx337_pos, rx337_eos, rxscan340_done - rxscan340_scan: - set_addr $I10, rxscan340_loop - rx337_cur."!mark_push"(0, rx337_pos, $I10) - rxscan340_done: -.annotate 'line', 124 + ne $I10, -1, rxscan378_done + goto rxscan378_scan + rxscan378_loop: + ($P10) = rx375_cur."from"() + inc $P10 + set rx375_pos, $P10 + ge rx375_pos, rx375_eos, rxscan378_done + rxscan378_scan: + set_addr $I10, rxscan378_loop + rx375_cur."!mark_push"(0, rx375_pos, $I10) + rxscan378_done: +.annotate 'line', 137 # rx subcapture "sym" - set_addr $I10, rxcap_341_fail - rx337_cur."!mark_push"(0, rx337_pos, $I10) + set_addr $I10, rxcap_379_fail + rx375_cur."!mark_push"(0, rx375_pos, $I10) # rx enumcharlist negate=0 - ge rx337_pos, rx337_eos, rx337_fail - sub $I10, rx337_pos, rx337_off - substr $S10, rx337_tgt, $I10, 1 + ge rx375_pos, rx375_eos, rx375_fail + sub $I10, rx375_pos, rx375_off + substr $S10, rx375_tgt, $I10, 1 index $I11, "bB", $S10 - lt $I11, 0, rx337_fail - inc rx337_pos - set_addr $I10, rxcap_341_fail - ($I12, $I11) = rx337_cur."!mark_peek"($I10) - rx337_cur."!cursor_pos"($I11) - ($P10) = rx337_cur."!cursor_start"() - $P10."!cursor_pass"(rx337_pos, "") - rx337_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx375_fail + inc rx375_pos + set_addr $I10, rxcap_379_fail + ($I12, $I11) = rx375_cur."!mark_peek"($I10) + rx375_cur."!cursor_pos"($I11) + ($P10) = rx375_cur."!cursor_start"() + $P10."!cursor_pass"(rx375_pos, "") + rx375_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_341_done - rxcap_341_fail: - goto rx337_fail - rxcap_341_done: - # rx pass - rx337_cur."!cursor_pass"(rx337_pos, "backslash:sym") - if_null rx337_debug, debug_329 - rx337_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx337_pos) - debug_329: - .return (rx337_cur) - rx337_restart: + goto rxcap_379_done + rxcap_379_fail: + goto rx375_fail + rxcap_379_done: + # rx pass + rx375_cur."!cursor_pass"(rx375_pos, "backslash:sym") + if_null rx375_debug, debug_366 + rx375_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx375_pos) + debug_366: + .return (rx375_cur) + rx375_restart: .annotate 'line', 3 - if_null rx337_debug, debug_330 - rx337_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_330: - rx337_fail: - (rx337_rep, rx337_pos, $I10, $P10) = rx337_cur."!mark_fail"(0) - lt rx337_pos, -1, rx337_done - eq rx337_pos, -1, rx337_fail - jump $I10 - rx337_done: - rx337_cur."!cursor_fail"() - if_null rx337_debug, debug_331 - rx337_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_331: - .return (rx337_cur) + if_null rx375_debug, debug_367 + rx375_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_367: + rx375_fail: + (rx375_rep, rx375_pos, $I10, $P10) = rx375_cur."!mark_fail"(0) + lt rx375_pos, -1, rx375_done + eq rx375_pos, -1, rx375_fail + jump $I10 + rx375_done: + rx375_cur."!cursor_fail"() + if_null rx375_debug, debug_368 + rx375_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_368: + .return (rx375_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("98_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("108_1284728471.30547") :method .annotate 'line', 3 - new $P339, "ResizablePMCArray" - push $P339, "B" - push $P339, "b" - .return ($P339) + new $P377, "ResizablePMCArray" + push $P377, "B" + push $P377, "b" + .return ($P377) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("99_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("109_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx343_tgt - .local int rx343_pos - .local int rx343_off - .local int rx343_eos - .local int rx343_rep - .local pmc rx343_cur - .local pmc rx343_debug - (rx343_cur, rx343_pos, rx343_tgt, $I10) = self."!cursor_start"() - getattribute rx343_debug, rx343_cur, "$!debug" - .lex unicode:"$\x{a2}", rx343_cur + .local string rx381_tgt + .local int rx381_pos + .local int rx381_off + .local int rx381_eos + .local int rx381_rep + .local pmc rx381_cur + .local pmc rx381_debug + (rx381_cur, rx381_pos, rx381_tgt, $I10) = self."!cursor_start"() + getattribute rx381_debug, rx381_cur, "$!debug" + .lex unicode:"$\x{a2}", rx381_cur .local pmc match .lex "$/", match - length rx343_eos, rx343_tgt - gt rx343_pos, rx343_eos, rx343_done - set rx343_off, 0 - lt rx343_pos, 2, rx343_start - sub rx343_off, rx343_pos, 1 - substr rx343_tgt, rx343_tgt, rx343_off - rx343_start: - eq $I10, 1, rx343_restart - if_null rx343_debug, debug_332 - rx343_cur."!cursor_debug"("START ", "backslash:sym") - debug_332: + length rx381_eos, rx381_tgt + gt rx381_pos, rx381_eos, rx381_done + set rx381_off, 0 + lt rx381_pos, 2, rx381_start + sub rx381_off, rx381_pos, 1 + substr rx381_tgt, rx381_tgt, rx381_off + rx381_start: + eq $I10, 1, rx381_restart + if_null rx381_debug, debug_369 + rx381_cur."!cursor_debug"("START", "backslash:sym") + debug_369: $I10 = self.'from'() - ne $I10, -1, rxscan346_done - goto rxscan346_scan - rxscan346_loop: - ($P10) = rx343_cur."from"() - inc $P10 - set rx343_pos, $P10 - ge rx343_pos, rx343_eos, rxscan346_done - rxscan346_scan: - set_addr $I10, rxscan346_loop - rx343_cur."!mark_push"(0, rx343_pos, $I10) - rxscan346_done: -.annotate 'line', 125 + ne $I10, -1, rxscan384_done + goto rxscan384_scan + rxscan384_loop: + ($P10) = rx381_cur."from"() + inc $P10 + set rx381_pos, $P10 + ge rx381_pos, rx381_eos, rxscan384_done + rxscan384_scan: + set_addr $I10, rxscan384_loop + rx381_cur."!mark_push"(0, rx381_pos, $I10) + rxscan384_done: +.annotate 'line', 138 # rx subcapture "sym" - set_addr $I10, rxcap_347_fail - rx343_cur."!mark_push"(0, rx343_pos, $I10) + set_addr $I10, rxcap_385_fail + rx381_cur."!mark_push"(0, rx381_pos, $I10) # rx enumcharlist negate=0 - ge rx343_pos, rx343_eos, rx343_fail - sub $I10, rx343_pos, rx343_off - substr $S10, rx343_tgt, $I10, 1 + ge rx381_pos, rx381_eos, rx381_fail + sub $I10, rx381_pos, rx381_off + substr $S10, rx381_tgt, $I10, 1 index $I11, "eE", $S10 - lt $I11, 0, rx343_fail - inc rx343_pos - set_addr $I10, rxcap_347_fail - ($I12, $I11) = rx343_cur."!mark_peek"($I10) - rx343_cur."!cursor_pos"($I11) - ($P10) = rx343_cur."!cursor_start"() - $P10."!cursor_pass"(rx343_pos, "") - rx343_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx381_fail + inc rx381_pos + set_addr $I10, rxcap_385_fail + ($I12, $I11) = rx381_cur."!mark_peek"($I10) + rx381_cur."!cursor_pos"($I11) + ($P10) = rx381_cur."!cursor_start"() + $P10."!cursor_pass"(rx381_pos, "") + rx381_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_347_done - rxcap_347_fail: - goto rx343_fail - rxcap_347_done: - # rx pass - rx343_cur."!cursor_pass"(rx343_pos, "backslash:sym") - if_null rx343_debug, debug_333 - rx343_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx343_pos) - debug_333: - .return (rx343_cur) - rx343_restart: + goto rxcap_385_done + rxcap_385_fail: + goto rx381_fail + rxcap_385_done: + # rx pass + rx381_cur."!cursor_pass"(rx381_pos, "backslash:sym") + if_null rx381_debug, debug_370 + rx381_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx381_pos) + debug_370: + .return (rx381_cur) + rx381_restart: .annotate 'line', 3 - if_null rx343_debug, debug_334 - rx343_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_334: - rx343_fail: - (rx343_rep, rx343_pos, $I10, $P10) = rx343_cur."!mark_fail"(0) - lt rx343_pos, -1, rx343_done - eq rx343_pos, -1, rx343_fail - jump $I10 - rx343_done: - rx343_cur."!cursor_fail"() - if_null rx343_debug, debug_335 - rx343_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_335: - .return (rx343_cur) + if_null rx381_debug, debug_371 + rx381_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_371: + rx381_fail: + (rx381_rep, rx381_pos, $I10, $P10) = rx381_cur."!mark_fail"(0) + lt rx381_pos, -1, rx381_done + eq rx381_pos, -1, rx381_fail + jump $I10 + rx381_done: + rx381_cur."!cursor_fail"() + if_null rx381_debug, debug_372 + rx381_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_372: + .return (rx381_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("100_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("110_1284728471.30547") :method .annotate 'line', 3 - new $P345, "ResizablePMCArray" - push $P345, "E" - push $P345, "e" - .return ($P345) + new $P383, "ResizablePMCArray" + push $P383, "E" + push $P383, "e" + .return ($P383) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("101_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("111_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx349_tgt - .local int rx349_pos - .local int rx349_off - .local int rx349_eos - .local int rx349_rep - .local pmc rx349_cur - .local pmc rx349_debug - (rx349_cur, rx349_pos, rx349_tgt, $I10) = self."!cursor_start"() - getattribute rx349_debug, rx349_cur, "$!debug" - .lex unicode:"$\x{a2}", rx349_cur + .local string rx387_tgt + .local int rx387_pos + .local int rx387_off + .local int rx387_eos + .local int rx387_rep + .local pmc rx387_cur + .local pmc rx387_debug + (rx387_cur, rx387_pos, rx387_tgt, $I10) = self."!cursor_start"() + getattribute rx387_debug, rx387_cur, "$!debug" + .lex unicode:"$\x{a2}", rx387_cur .local pmc match .lex "$/", match - length rx349_eos, rx349_tgt - gt rx349_pos, rx349_eos, rx349_done - set rx349_off, 0 - lt rx349_pos, 2, rx349_start - sub rx349_off, rx349_pos, 1 - substr rx349_tgt, rx349_tgt, rx349_off - rx349_start: - eq $I10, 1, rx349_restart - if_null rx349_debug, debug_336 - rx349_cur."!cursor_debug"("START ", "backslash:sym") - debug_336: + length rx387_eos, rx387_tgt + gt rx387_pos, rx387_eos, rx387_done + set rx387_off, 0 + lt rx387_pos, 2, rx387_start + sub rx387_off, rx387_pos, 1 + substr rx387_tgt, rx387_tgt, rx387_off + rx387_start: + eq $I10, 1, rx387_restart + if_null rx387_debug, debug_373 + rx387_cur."!cursor_debug"("START", "backslash:sym") + debug_373: $I10 = self.'from'() - ne $I10, -1, rxscan352_done - goto rxscan352_scan - rxscan352_loop: - ($P10) = rx349_cur."from"() - inc $P10 - set rx349_pos, $P10 - ge rx349_pos, rx349_eos, rxscan352_done - rxscan352_scan: - set_addr $I10, rxscan352_loop - rx349_cur."!mark_push"(0, rx349_pos, $I10) - rxscan352_done: -.annotate 'line', 126 + ne $I10, -1, rxscan390_done + goto rxscan390_scan + rxscan390_loop: + ($P10) = rx387_cur."from"() + inc $P10 + set rx387_pos, $P10 + ge rx387_pos, rx387_eos, rxscan390_done + rxscan390_scan: + set_addr $I10, rxscan390_loop + rx387_cur."!mark_push"(0, rx387_pos, $I10) + rxscan390_done: +.annotate 'line', 139 # rx subcapture "sym" - set_addr $I10, rxcap_353_fail - rx349_cur."!mark_push"(0, rx349_pos, $I10) + set_addr $I10, rxcap_391_fail + rx387_cur."!mark_push"(0, rx387_pos, $I10) # rx enumcharlist negate=0 - ge rx349_pos, rx349_eos, rx349_fail - sub $I10, rx349_pos, rx349_off - substr $S10, rx349_tgt, $I10, 1 + ge rx387_pos, rx387_eos, rx387_fail + sub $I10, rx387_pos, rx387_off + substr $S10, rx387_tgt, $I10, 1 index $I11, "fF", $S10 - lt $I11, 0, rx349_fail - inc rx349_pos - set_addr $I10, rxcap_353_fail - ($I12, $I11) = rx349_cur."!mark_peek"($I10) - rx349_cur."!cursor_pos"($I11) - ($P10) = rx349_cur."!cursor_start"() - $P10."!cursor_pass"(rx349_pos, "") - rx349_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx387_fail + inc rx387_pos + set_addr $I10, rxcap_391_fail + ($I12, $I11) = rx387_cur."!mark_peek"($I10) + rx387_cur."!cursor_pos"($I11) + ($P10) = rx387_cur."!cursor_start"() + $P10."!cursor_pass"(rx387_pos, "") + rx387_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_353_done - rxcap_353_fail: - goto rx349_fail - rxcap_353_done: - # rx pass - rx349_cur."!cursor_pass"(rx349_pos, "backslash:sym") - if_null rx349_debug, debug_337 - rx349_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx349_pos) - debug_337: - .return (rx349_cur) - rx349_restart: + goto rxcap_391_done + rxcap_391_fail: + goto rx387_fail + rxcap_391_done: + # rx pass + rx387_cur."!cursor_pass"(rx387_pos, "backslash:sym") + if_null rx387_debug, debug_374 + rx387_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx387_pos) + debug_374: + .return (rx387_cur) + rx387_restart: .annotate 'line', 3 - if_null rx349_debug, debug_338 - rx349_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_338: - rx349_fail: - (rx349_rep, rx349_pos, $I10, $P10) = rx349_cur."!mark_fail"(0) - lt rx349_pos, -1, rx349_done - eq rx349_pos, -1, rx349_fail - jump $I10 - rx349_done: - rx349_cur."!cursor_fail"() - if_null rx349_debug, debug_339 - rx349_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_339: - .return (rx349_cur) + if_null rx387_debug, debug_375 + rx387_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_375: + rx387_fail: + (rx387_rep, rx387_pos, $I10, $P10) = rx387_cur."!mark_fail"(0) + lt rx387_pos, -1, rx387_done + eq rx387_pos, -1, rx387_fail + jump $I10 + rx387_done: + rx387_cur."!cursor_fail"() + if_null rx387_debug, debug_376 + rx387_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_376: + .return (rx387_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("102_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("112_1284728471.30547") :method .annotate 'line', 3 - new $P351, "ResizablePMCArray" - push $P351, "F" - push $P351, "f" - .return ($P351) + new $P389, "ResizablePMCArray" + push $P389, "F" + push $P389, "f" + .return ($P389) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("103_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("113_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx355_tgt - .local int rx355_pos - .local int rx355_off - .local int rx355_eos - .local int rx355_rep - .local pmc rx355_cur - .local pmc rx355_debug - (rx355_cur, rx355_pos, rx355_tgt, $I10) = self."!cursor_start"() - getattribute rx355_debug, rx355_cur, "$!debug" - .lex unicode:"$\x{a2}", rx355_cur + .local string rx393_tgt + .local int rx393_pos + .local int rx393_off + .local int rx393_eos + .local int rx393_rep + .local pmc rx393_cur + .local pmc rx393_debug + (rx393_cur, rx393_pos, rx393_tgt, $I10) = self."!cursor_start"() + getattribute rx393_debug, rx393_cur, "$!debug" + .lex unicode:"$\x{a2}", rx393_cur .local pmc match .lex "$/", match - length rx355_eos, rx355_tgt - gt rx355_pos, rx355_eos, rx355_done - set rx355_off, 0 - lt rx355_pos, 2, rx355_start - sub rx355_off, rx355_pos, 1 - substr rx355_tgt, rx355_tgt, rx355_off - rx355_start: - eq $I10, 1, rx355_restart - if_null rx355_debug, debug_340 - rx355_cur."!cursor_debug"("START ", "backslash:sym") - debug_340: + length rx393_eos, rx393_tgt + gt rx393_pos, rx393_eos, rx393_done + set rx393_off, 0 + lt rx393_pos, 2, rx393_start + sub rx393_off, rx393_pos, 1 + substr rx393_tgt, rx393_tgt, rx393_off + rx393_start: + eq $I10, 1, rx393_restart + if_null rx393_debug, debug_377 + rx393_cur."!cursor_debug"("START", "backslash:sym") + debug_377: $I10 = self.'from'() - ne $I10, -1, rxscan358_done - goto rxscan358_scan - rxscan358_loop: - ($P10) = rx355_cur."from"() - inc $P10 - set rx355_pos, $P10 - ge rx355_pos, rx355_eos, rxscan358_done - rxscan358_scan: - set_addr $I10, rxscan358_loop - rx355_cur."!mark_push"(0, rx355_pos, $I10) - rxscan358_done: -.annotate 'line', 127 + ne $I10, -1, rxscan396_done + goto rxscan396_scan + rxscan396_loop: + ($P10) = rx393_cur."from"() + inc $P10 + set rx393_pos, $P10 + ge rx393_pos, rx393_eos, rxscan396_done + rxscan396_scan: + set_addr $I10, rxscan396_loop + rx393_cur."!mark_push"(0, rx393_pos, $I10) + rxscan396_done: +.annotate 'line', 140 # rx subcapture "sym" - set_addr $I10, rxcap_359_fail - rx355_cur."!mark_push"(0, rx355_pos, $I10) + set_addr $I10, rxcap_397_fail + rx393_cur."!mark_push"(0, rx393_pos, $I10) # rx enumcharlist negate=0 - ge rx355_pos, rx355_eos, rx355_fail - sub $I10, rx355_pos, rx355_off - substr $S10, rx355_tgt, $I10, 1 + ge rx393_pos, rx393_eos, rx393_fail + sub $I10, rx393_pos, rx393_off + substr $S10, rx393_tgt, $I10, 1 index $I11, "hH", $S10 - lt $I11, 0, rx355_fail - inc rx355_pos - set_addr $I10, rxcap_359_fail - ($I12, $I11) = rx355_cur."!mark_peek"($I10) - rx355_cur."!cursor_pos"($I11) - ($P10) = rx355_cur."!cursor_start"() - $P10."!cursor_pass"(rx355_pos, "") - rx355_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx393_fail + inc rx393_pos + set_addr $I10, rxcap_397_fail + ($I12, $I11) = rx393_cur."!mark_peek"($I10) + rx393_cur."!cursor_pos"($I11) + ($P10) = rx393_cur."!cursor_start"() + $P10."!cursor_pass"(rx393_pos, "") + rx393_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_359_done - rxcap_359_fail: - goto rx355_fail - rxcap_359_done: - # rx pass - rx355_cur."!cursor_pass"(rx355_pos, "backslash:sym") - if_null rx355_debug, debug_341 - rx355_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx355_pos) - debug_341: - .return (rx355_cur) - rx355_restart: + goto rxcap_397_done + rxcap_397_fail: + goto rx393_fail + rxcap_397_done: + # rx pass + rx393_cur."!cursor_pass"(rx393_pos, "backslash:sym") + if_null rx393_debug, debug_378 + rx393_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx393_pos) + debug_378: + .return (rx393_cur) + rx393_restart: .annotate 'line', 3 - if_null rx355_debug, debug_342 - rx355_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_342: - rx355_fail: - (rx355_rep, rx355_pos, $I10, $P10) = rx355_cur."!mark_fail"(0) - lt rx355_pos, -1, rx355_done - eq rx355_pos, -1, rx355_fail - jump $I10 - rx355_done: - rx355_cur."!cursor_fail"() - if_null rx355_debug, debug_343 - rx355_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_343: - .return (rx355_cur) + if_null rx393_debug, debug_379 + rx393_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_379: + rx393_fail: + (rx393_rep, rx393_pos, $I10, $P10) = rx393_cur."!mark_fail"(0) + lt rx393_pos, -1, rx393_done + eq rx393_pos, -1, rx393_fail + jump $I10 + rx393_done: + rx393_cur."!cursor_fail"() + if_null rx393_debug, debug_380 + rx393_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_380: + .return (rx393_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("104_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("114_1284728471.30547") :method .annotate 'line', 3 - new $P357, "ResizablePMCArray" - push $P357, "H" - push $P357, "h" - .return ($P357) + new $P395, "ResizablePMCArray" + push $P395, "H" + push $P395, "h" + .return ($P395) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("105_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("115_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx361_tgt - .local int rx361_pos - .local int rx361_off - .local int rx361_eos - .local int rx361_rep - .local pmc rx361_cur - .local pmc rx361_debug - (rx361_cur, rx361_pos, rx361_tgt, $I10) = self."!cursor_start"() - getattribute rx361_debug, rx361_cur, "$!debug" - .lex unicode:"$\x{a2}", rx361_cur + .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 rx361_eos, rx361_tgt - gt rx361_pos, rx361_eos, rx361_done - set rx361_off, 0 - lt rx361_pos, 2, rx361_start - sub rx361_off, rx361_pos, 1 - substr rx361_tgt, rx361_tgt, rx361_off - rx361_start: - eq $I10, 1, rx361_restart - if_null rx361_debug, debug_344 - rx361_cur."!cursor_debug"("START ", "backslash:sym") - debug_344: + 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_381 + rx399_cur."!cursor_debug"("START", "backslash:sym") + debug_381: $I10 = self.'from'() - ne $I10, -1, rxscan364_done - goto rxscan364_scan - rxscan364_loop: - ($P10) = rx361_cur."from"() - inc $P10 - set rx361_pos, $P10 - ge rx361_pos, rx361_eos, rxscan364_done - rxscan364_scan: - set_addr $I10, rxscan364_loop - rx361_cur."!mark_push"(0, rx361_pos, $I10) - rxscan364_done: -.annotate 'line', 128 + ne $I10, -1, rxscan402_done + goto rxscan402_scan + rxscan402_loop: + ($P10) = rx399_cur."from"() + inc $P10 + set rx399_pos, $P10 + ge rx399_pos, rx399_eos, rxscan402_done + rxscan402_scan: + set_addr $I10, rxscan402_loop + rx399_cur."!mark_push"(0, rx399_pos, $I10) + rxscan402_done: +.annotate 'line', 141 # rx subcapture "sym" - set_addr $I10, rxcap_365_fail - rx361_cur."!mark_push"(0, rx361_pos, $I10) + set_addr $I10, rxcap_403_fail + rx399_cur."!mark_push"(0, rx399_pos, $I10) # rx enumcharlist negate=0 - ge rx361_pos, rx361_eos, rx361_fail - sub $I10, rx361_pos, rx361_off - substr $S10, rx361_tgt, $I10, 1 + ge rx399_pos, rx399_eos, rx399_fail + sub $I10, rx399_pos, rx399_off + substr $S10, rx399_tgt, $I10, 1 index $I11, "rR", $S10 - lt $I11, 0, rx361_fail - inc rx361_pos - set_addr $I10, rxcap_365_fail - ($I12, $I11) = rx361_cur."!mark_peek"($I10) - rx361_cur."!cursor_pos"($I11) - ($P10) = rx361_cur."!cursor_start"() - $P10."!cursor_pass"(rx361_pos, "") - rx361_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx399_fail + inc rx399_pos + set_addr $I10, rxcap_403_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) $P10."!cursor_names"("sym") - goto rxcap_365_done - rxcap_365_fail: - goto rx361_fail - rxcap_365_done: - # rx pass - rx361_cur."!cursor_pass"(rx361_pos, "backslash:sym") - if_null rx361_debug, debug_345 - rx361_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx361_pos) - debug_345: - .return (rx361_cur) - rx361_restart: + goto rxcap_403_done + rxcap_403_fail: + goto rx399_fail + rxcap_403_done: + # rx pass + rx399_cur."!cursor_pass"(rx399_pos, "backslash:sym") + if_null rx399_debug, debug_382 + rx399_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx399_pos) + debug_382: + .return (rx399_cur) + rx399_restart: .annotate 'line', 3 - if_null rx361_debug, debug_346 - rx361_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_346: - rx361_fail: - (rx361_rep, rx361_pos, $I10, $P10) = rx361_cur."!mark_fail"(0) - lt rx361_pos, -1, rx361_done - eq rx361_pos, -1, rx361_fail - jump $I10 - rx361_done: - rx361_cur."!cursor_fail"() - if_null rx361_debug, debug_347 - rx361_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_347: - .return (rx361_cur) + if_null rx399_debug, debug_383 + rx399_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_383: + 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_384 + rx399_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_384: + .return (rx399_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("106_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("116_1284728471.30547") :method .annotate 'line', 3 - new $P363, "ResizablePMCArray" - push $P363, "R" - push $P363, "r" - .return ($P363) + new $P401, "ResizablePMCArray" + push $P401, "R" + push $P401, "r" + .return ($P401) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("107_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("117_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx367_tgt - .local int rx367_pos - .local int rx367_off - .local int rx367_eos - .local int rx367_rep - .local pmc rx367_cur - .local pmc rx367_debug - (rx367_cur, rx367_pos, rx367_tgt, $I10) = self."!cursor_start"() - getattribute rx367_debug, rx367_cur, "$!debug" - .lex unicode:"$\x{a2}", rx367_cur + .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 rx367_eos, rx367_tgt - gt rx367_pos, rx367_eos, rx367_done - set rx367_off, 0 - lt rx367_pos, 2, rx367_start - sub rx367_off, rx367_pos, 1 - substr rx367_tgt, rx367_tgt, rx367_off - rx367_start: - eq $I10, 1, rx367_restart - if_null rx367_debug, debug_348 - rx367_cur."!cursor_debug"("START ", "backslash:sym") - debug_348: + 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_385 + rx405_cur."!cursor_debug"("START", "backslash:sym") + debug_385: $I10 = self.'from'() - ne $I10, -1, rxscan370_done - goto rxscan370_scan - rxscan370_loop: - ($P10) = rx367_cur."from"() - inc $P10 - set rx367_pos, $P10 - ge rx367_pos, rx367_eos, rxscan370_done - rxscan370_scan: - set_addr $I10, rxscan370_loop - rx367_cur."!mark_push"(0, rx367_pos, $I10) - rxscan370_done: -.annotate 'line', 129 + ne $I10, -1, rxscan408_done + goto rxscan408_scan + rxscan408_loop: + ($P10) = rx405_cur."from"() + inc $P10 + set rx405_pos, $P10 + ge rx405_pos, rx405_eos, rxscan408_done + rxscan408_scan: + set_addr $I10, rxscan408_loop + rx405_cur."!mark_push"(0, rx405_pos, $I10) + rxscan408_done: +.annotate 'line', 142 # rx subcapture "sym" - set_addr $I10, rxcap_371_fail - rx367_cur."!mark_push"(0, rx367_pos, $I10) + set_addr $I10, rxcap_409_fail + rx405_cur."!mark_push"(0, rx405_pos, $I10) # rx enumcharlist negate=0 - ge rx367_pos, rx367_eos, rx367_fail - sub $I10, rx367_pos, rx367_off - substr $S10, rx367_tgt, $I10, 1 + ge rx405_pos, rx405_eos, rx405_fail + sub $I10, rx405_pos, rx405_off + substr $S10, rx405_tgt, $I10, 1 index $I11, "tT", $S10 - lt $I11, 0, rx367_fail - inc rx367_pos - set_addr $I10, rxcap_371_fail - ($I12, $I11) = rx367_cur."!mark_peek"($I10) - rx367_cur."!cursor_pos"($I11) - ($P10) = rx367_cur."!cursor_start"() - $P10."!cursor_pass"(rx367_pos, "") - rx367_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx405_fail + inc rx405_pos + set_addr $I10, rxcap_409_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_371_done - rxcap_371_fail: - goto rx367_fail - rxcap_371_done: - # rx pass - rx367_cur."!cursor_pass"(rx367_pos, "backslash:sym") - if_null rx367_debug, debug_349 - rx367_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx367_pos) - debug_349: - .return (rx367_cur) - rx367_restart: + goto rxcap_409_done + rxcap_409_fail: + goto rx405_fail + rxcap_409_done: + # rx pass + rx405_cur."!cursor_pass"(rx405_pos, "backslash:sym") + if_null rx405_debug, debug_386 + rx405_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx405_pos) + debug_386: + .return (rx405_cur) + rx405_restart: .annotate 'line', 3 - if_null rx367_debug, debug_350 - rx367_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_350: - rx367_fail: - (rx367_rep, rx367_pos, $I10, $P10) = rx367_cur."!mark_fail"(0) - lt rx367_pos, -1, rx367_done - eq rx367_pos, -1, rx367_fail - jump $I10 - rx367_done: - rx367_cur."!cursor_fail"() - if_null rx367_debug, debug_351 - rx367_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_351: - .return (rx367_cur) + if_null rx405_debug, debug_387 + rx405_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_387: + 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_388 + rx405_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_388: + .return (rx405_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("108_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("118_1284728471.30547") :method .annotate 'line', 3 - new $P369, "ResizablePMCArray" - push $P369, "T" - push $P369, "t" - .return ($P369) + new $P407, "ResizablePMCArray" + push $P407, "T" + push $P407, "t" + .return ($P407) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("109_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("119_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx373_tgt - .local int rx373_pos - .local int rx373_off - .local int rx373_eos - .local int rx373_rep - .local pmc rx373_cur - .local pmc rx373_debug - (rx373_cur, rx373_pos, rx373_tgt, $I10) = self."!cursor_start"() - getattribute rx373_debug, rx373_cur, "$!debug" - .lex unicode:"$\x{a2}", rx373_cur + .local string rx411_tgt + .local int rx411_pos + .local int rx411_off + .local int rx411_eos + .local int rx411_rep + .local pmc rx411_cur + .local pmc rx411_debug + (rx411_cur, rx411_pos, rx411_tgt, $I10) = self."!cursor_start"() + getattribute rx411_debug, rx411_cur, "$!debug" + .lex unicode:"$\x{a2}", rx411_cur .local pmc match .lex "$/", match - length rx373_eos, rx373_tgt - gt rx373_pos, rx373_eos, rx373_done - set rx373_off, 0 - lt rx373_pos, 2, rx373_start - sub rx373_off, rx373_pos, 1 - substr rx373_tgt, rx373_tgt, rx373_off - rx373_start: - eq $I10, 1, rx373_restart - if_null rx373_debug, debug_352 - rx373_cur."!cursor_debug"("START ", "backslash:sym") - debug_352: + length rx411_eos, rx411_tgt + gt rx411_pos, rx411_eos, rx411_done + set rx411_off, 0 + lt rx411_pos, 2, rx411_start + sub rx411_off, rx411_pos, 1 + substr rx411_tgt, rx411_tgt, rx411_off + rx411_start: + eq $I10, 1, rx411_restart + if_null rx411_debug, debug_389 + rx411_cur."!cursor_debug"("START", "backslash:sym") + debug_389: $I10 = self.'from'() - ne $I10, -1, rxscan376_done - goto rxscan376_scan - rxscan376_loop: - ($P10) = rx373_cur."from"() - inc $P10 - set rx373_pos, $P10 - ge rx373_pos, rx373_eos, rxscan376_done - rxscan376_scan: - set_addr $I10, rxscan376_loop - rx373_cur."!mark_push"(0, rx373_pos, $I10) - rxscan376_done: -.annotate 'line', 130 + ne $I10, -1, rxscan414_done + goto rxscan414_scan + rxscan414_loop: + ($P10) = rx411_cur."from"() + inc $P10 + set rx411_pos, $P10 + ge rx411_pos, rx411_eos, rxscan414_done + rxscan414_scan: + set_addr $I10, rxscan414_loop + rx411_cur."!mark_push"(0, rx411_pos, $I10) + rxscan414_done: +.annotate 'line', 143 # rx subcapture "sym" - set_addr $I10, rxcap_377_fail - rx373_cur."!mark_push"(0, rx373_pos, $I10) + set_addr $I10, rxcap_415_fail + rx411_cur."!mark_push"(0, rx411_pos, $I10) # rx enumcharlist negate=0 - ge rx373_pos, rx373_eos, rx373_fail - sub $I10, rx373_pos, rx373_off - substr $S10, rx373_tgt, $I10, 1 + ge rx411_pos, rx411_eos, rx411_fail + sub $I10, rx411_pos, rx411_off + substr $S10, rx411_tgt, $I10, 1 index $I11, "vV", $S10 - lt $I11, 0, rx373_fail - inc rx373_pos - set_addr $I10, rxcap_377_fail - ($I12, $I11) = rx373_cur."!mark_peek"($I10) - rx373_cur."!cursor_pos"($I11) - ($P10) = rx373_cur."!cursor_start"() - $P10."!cursor_pass"(rx373_pos, "") - rx373_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx411_fail + inc rx411_pos + set_addr $I10, rxcap_415_fail + ($I12, $I11) = rx411_cur."!mark_peek"($I10) + rx411_cur."!cursor_pos"($I11) + ($P10) = rx411_cur."!cursor_start"() + $P10."!cursor_pass"(rx411_pos, "") + rx411_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_377_done - rxcap_377_fail: - goto rx373_fail - rxcap_377_done: - # rx pass - rx373_cur."!cursor_pass"(rx373_pos, "backslash:sym") - if_null rx373_debug, debug_353 - rx373_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx373_pos) - debug_353: - .return (rx373_cur) - rx373_restart: + goto rxcap_415_done + rxcap_415_fail: + goto rx411_fail + rxcap_415_done: + # rx pass + rx411_cur."!cursor_pass"(rx411_pos, "backslash:sym") + if_null rx411_debug, debug_390 + rx411_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx411_pos) + debug_390: + .return (rx411_cur) + rx411_restart: .annotate 'line', 3 - if_null rx373_debug, debug_354 - rx373_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_354: - rx373_fail: - (rx373_rep, rx373_pos, $I10, $P10) = rx373_cur."!mark_fail"(0) - lt rx373_pos, -1, rx373_done - eq rx373_pos, -1, rx373_fail - jump $I10 - rx373_done: - rx373_cur."!cursor_fail"() - if_null rx373_debug, debug_355 - rx373_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_355: - .return (rx373_cur) + if_null rx411_debug, debug_391 + rx411_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_391: + rx411_fail: + (rx411_rep, rx411_pos, $I10, $P10) = rx411_cur."!mark_fail"(0) + lt rx411_pos, -1, rx411_done + eq rx411_pos, -1, rx411_fail + jump $I10 + rx411_done: + rx411_cur."!cursor_fail"() + if_null rx411_debug, debug_392 + rx411_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_392: + .return (rx411_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("110_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("120_1284728471.30547") :method .annotate 'line', 3 - new $P375, "ResizablePMCArray" - push $P375, "V" - push $P375, "v" - .return ($P375) + new $P413, "ResizablePMCArray" + push $P413, "V" + push $P413, "v" + .return ($P413) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("111_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("121_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx379_tgt - .local int rx379_pos - .local int rx379_off - .local int rx379_eos - .local int rx379_rep - .local pmc rx379_cur - .local pmc rx379_debug - (rx379_cur, rx379_pos, rx379_tgt, $I10) = self."!cursor_start"() - getattribute rx379_debug, rx379_cur, "$!debug" - .lex unicode:"$\x{a2}", rx379_cur + .local string rx417_tgt + .local int rx417_pos + .local int rx417_off + .local int rx417_eos + .local int rx417_rep + .local pmc rx417_cur + .local pmc rx417_debug + (rx417_cur, rx417_pos, rx417_tgt, $I10) = self."!cursor_start"() + getattribute rx417_debug, rx417_cur, "$!debug" + .lex unicode:"$\x{a2}", rx417_cur .local pmc match .lex "$/", match - length rx379_eos, rx379_tgt - gt rx379_pos, rx379_eos, rx379_done - set rx379_off, 0 - lt rx379_pos, 2, rx379_start - sub rx379_off, rx379_pos, 1 - substr rx379_tgt, rx379_tgt, rx379_off - rx379_start: - eq $I10, 1, rx379_restart - if_null rx379_debug, debug_356 - rx379_cur."!cursor_debug"("START ", "backslash:sym") - debug_356: + length rx417_eos, rx417_tgt + gt rx417_pos, rx417_eos, rx417_done + set rx417_off, 0 + lt rx417_pos, 2, rx417_start + sub rx417_off, rx417_pos, 1 + substr rx417_tgt, rx417_tgt, rx417_off + rx417_start: + eq $I10, 1, rx417_restart + if_null rx417_debug, debug_393 + rx417_cur."!cursor_debug"("START", "backslash:sym") + debug_393: $I10 = self.'from'() - ne $I10, -1, rxscan386_done - goto rxscan386_scan - rxscan386_loop: - ($P10) = rx379_cur."from"() - inc $P10 - set rx379_pos, $P10 - ge rx379_pos, rx379_eos, rxscan386_done - rxscan386_scan: - set_addr $I10, rxscan386_loop - rx379_cur."!mark_push"(0, rx379_pos, $I10) - rxscan386_done: -.annotate 'line', 131 + ne $I10, -1, rxscan424_done + goto rxscan424_scan + rxscan424_loop: + ($P10) = rx417_cur."from"() + inc $P10 + set rx417_pos, $P10 + ge rx417_pos, rx417_eos, rxscan424_done + rxscan424_scan: + set_addr $I10, rxscan424_loop + rx417_cur."!mark_push"(0, rx417_pos, $I10) + rxscan424_done: +.annotate 'line', 144 # rx subcapture "sym" - set_addr $I10, rxcap_387_fail - rx379_cur."!mark_push"(0, rx379_pos, $I10) + set_addr $I10, rxcap_425_fail + rx417_cur."!mark_push"(0, rx417_pos, $I10) # rx enumcharlist negate=0 - ge rx379_pos, rx379_eos, rx379_fail - sub $I10, rx379_pos, rx379_off - substr $S10, rx379_tgt, $I10, 1 + ge rx417_pos, rx417_eos, rx417_fail + sub $I10, rx417_pos, rx417_off + substr $S10, rx417_tgt, $I10, 1 index $I11, "oO", $S10 - lt $I11, 0, rx379_fail - inc rx379_pos - set_addr $I10, rxcap_387_fail - ($I12, $I11) = rx379_cur."!mark_peek"($I10) - rx379_cur."!cursor_pos"($I11) - ($P10) = rx379_cur."!cursor_start"() - $P10."!cursor_pass"(rx379_pos, "") - rx379_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx417_fail + inc rx417_pos + set_addr $I10, rxcap_425_fail + ($I12, $I11) = rx417_cur."!mark_peek"($I10) + rx417_cur."!cursor_pos"($I11) + ($P10) = rx417_cur."!cursor_start"() + $P10."!cursor_pass"(rx417_pos, "") + rx417_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_387_done - rxcap_387_fail: - goto rx379_fail - rxcap_387_done: - alt388_0: - set_addr $I10, alt388_1 - rx379_cur."!mark_push"(0, rx379_pos, $I10) + goto rxcap_425_done + rxcap_425_fail: + goto rx417_fail + rxcap_425_done: + alt426_0: + set_addr $I10, alt426_1 + rx417_cur."!mark_push"(0, rx417_pos, $I10) # rx subrule "octint" subtype=capture negate= - rx379_cur."!cursor_pos"(rx379_pos) - $P10 = rx379_cur."octint"() - unless $P10, rx379_fail - rx379_cur."!mark_push"(0, -1, 0, $P10) + rx417_cur."!cursor_pos"(rx417_pos) + $P10 = rx417_cur."octint"() + unless $P10, rx417_fail + rx417_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("octint") - rx379_pos = $P10."pos"() - goto alt388_end - alt388_1: + rx417_pos = $P10."pos"() + goto alt426_end + alt426_1: # rx literal "[" - add $I11, rx379_pos, 1 - gt $I11, rx379_eos, rx379_fail - sub $I11, rx379_pos, rx379_off - ord $I11, rx379_tgt, $I11 - ne $I11, 91, rx379_fail - add rx379_pos, 1 + add $I11, rx417_pos, 1 + gt $I11, rx417_eos, rx417_fail + sub $I11, rx417_pos, rx417_off + ord $I11, rx417_tgt, $I11 + ne $I11, 91, rx417_fail + add rx417_pos, 1 # rx subrule "octints" subtype=capture negate= - rx379_cur."!cursor_pos"(rx379_pos) - $P10 = rx379_cur."octints"() - unless $P10, rx379_fail - rx379_cur."!mark_push"(0, -1, 0, $P10) + rx417_cur."!cursor_pos"(rx417_pos) + $P10 = rx417_cur."octints"() + unless $P10, rx417_fail + rx417_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("octints") - rx379_pos = $P10."pos"() + rx417_pos = $P10."pos"() # rx literal "]" - add $I11, rx379_pos, 1 - gt $I11, rx379_eos, rx379_fail - sub $I11, rx379_pos, rx379_off - ord $I11, rx379_tgt, $I11 - ne $I11, 93, rx379_fail - add rx379_pos, 1 - alt388_end: - # rx pass - rx379_cur."!cursor_pass"(rx379_pos, "backslash:sym") - if_null rx379_debug, debug_357 - rx379_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx379_pos) - debug_357: - .return (rx379_cur) - rx379_restart: + add $I11, rx417_pos, 1 + gt $I11, rx417_eos, rx417_fail + sub $I11, rx417_pos, rx417_off + ord $I11, rx417_tgt, $I11 + ne $I11, 93, rx417_fail + add rx417_pos, 1 + alt426_end: + # rx pass + rx417_cur."!cursor_pass"(rx417_pos, "backslash:sym") + if_null rx417_debug, debug_394 + rx417_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx417_pos) + debug_394: + .return (rx417_cur) + rx417_restart: .annotate 'line', 3 - if_null rx379_debug, debug_358 - rx379_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_358: - rx379_fail: - (rx379_rep, rx379_pos, $I10, $P10) = rx379_cur."!mark_fail"(0) - lt rx379_pos, -1, rx379_done - eq rx379_pos, -1, rx379_fail - jump $I10 - rx379_done: - rx379_cur."!cursor_fail"() - if_null rx379_debug, debug_359 - rx379_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_359: - .return (rx379_cur) + if_null rx417_debug, debug_395 + rx417_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_395: + rx417_fail: + (rx417_rep, rx417_pos, $I10, $P10) = rx417_cur."!mark_fail"(0) + lt rx417_pos, -1, rx417_done + eq rx417_pos, -1, rx417_fail + jump $I10 + rx417_done: + rx417_cur."!cursor_fail"() + if_null rx417_debug, debug_396 + rx417_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_396: + .return (rx417_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("112_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("122_1284728471.30547") :method .annotate 'line', 3 - $P381 = self."!PREFIX__!subrule"("octints", "O[") - $P382 = self."!PREFIX__!subrule"("octint", "O") - $P383 = self."!PREFIX__!subrule"("octints", "o[") - $P384 = self."!PREFIX__!subrule"("octint", "o") - new $P385, "ResizablePMCArray" - push $P385, $P381 - push $P385, $P382 - push $P385, $P383 - push $P385, $P384 - .return ($P385) + $P419 = self."!PREFIX__!subrule"("octints", "O[") + $P420 = self."!PREFIX__!subrule"("octint", "O") + $P421 = self."!PREFIX__!subrule"("octints", "o[") + $P422 = self."!PREFIX__!subrule"("octint", "o") + new $P423, "ResizablePMCArray" + push $P423, $P419 + push $P423, $P420 + push $P423, $P421 + push $P423, $P422 + .return ($P423) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("113_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("123_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx390_tgt - .local int rx390_pos - .local int rx390_off - .local int rx390_eos - .local int rx390_rep - .local pmc rx390_cur - .local pmc rx390_debug - (rx390_cur, rx390_pos, rx390_tgt, $I10) = self."!cursor_start"() - getattribute rx390_debug, rx390_cur, "$!debug" - .lex unicode:"$\x{a2}", rx390_cur + .local string rx428_tgt + .local int rx428_pos + .local int rx428_off + .local int rx428_eos + .local int rx428_rep + .local pmc rx428_cur + .local pmc rx428_debug + (rx428_cur, rx428_pos, rx428_tgt, $I10) = self."!cursor_start"() + getattribute rx428_debug, rx428_cur, "$!debug" + .lex unicode:"$\x{a2}", rx428_cur .local pmc match .lex "$/", match - length rx390_eos, rx390_tgt - gt rx390_pos, rx390_eos, rx390_done - set rx390_off, 0 - lt rx390_pos, 2, rx390_start - sub rx390_off, rx390_pos, 1 - substr rx390_tgt, rx390_tgt, rx390_off - rx390_start: - eq $I10, 1, rx390_restart - if_null rx390_debug, debug_360 - rx390_cur."!cursor_debug"("START ", "backslash:sym") - debug_360: + length rx428_eos, rx428_tgt + gt rx428_pos, rx428_eos, rx428_done + set rx428_off, 0 + lt rx428_pos, 2, rx428_start + sub rx428_off, rx428_pos, 1 + substr rx428_tgt, rx428_tgt, rx428_off + rx428_start: + eq $I10, 1, rx428_restart + if_null rx428_debug, debug_397 + rx428_cur."!cursor_debug"("START", "backslash:sym") + debug_397: $I10 = self.'from'() - ne $I10, -1, rxscan397_done - goto rxscan397_scan - rxscan397_loop: - ($P10) = rx390_cur."from"() - inc $P10 - set rx390_pos, $P10 - ge rx390_pos, rx390_eos, rxscan397_done - rxscan397_scan: - set_addr $I10, rxscan397_loop - rx390_cur."!mark_push"(0, rx390_pos, $I10) - rxscan397_done: -.annotate 'line', 132 + ne $I10, -1, rxscan435_done + goto rxscan435_scan + rxscan435_loop: + ($P10) = rx428_cur."from"() + inc $P10 + set rx428_pos, $P10 + ge rx428_pos, rx428_eos, rxscan435_done + rxscan435_scan: + set_addr $I10, rxscan435_loop + rx428_cur."!mark_push"(0, rx428_pos, $I10) + rxscan435_done: +.annotate 'line', 145 # rx subcapture "sym" - set_addr $I10, rxcap_398_fail - rx390_cur."!mark_push"(0, rx390_pos, $I10) + set_addr $I10, rxcap_436_fail + rx428_cur."!mark_push"(0, rx428_pos, $I10) # rx enumcharlist negate=0 - ge rx390_pos, rx390_eos, rx390_fail - sub $I10, rx390_pos, rx390_off - substr $S10, rx390_tgt, $I10, 1 + ge rx428_pos, rx428_eos, rx428_fail + sub $I10, rx428_pos, rx428_off + substr $S10, rx428_tgt, $I10, 1 index $I11, "xX", $S10 - lt $I11, 0, rx390_fail - inc rx390_pos - set_addr $I10, rxcap_398_fail - ($I12, $I11) = rx390_cur."!mark_peek"($I10) - rx390_cur."!cursor_pos"($I11) - ($P10) = rx390_cur."!cursor_start"() - $P10."!cursor_pass"(rx390_pos, "") - rx390_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx428_fail + inc rx428_pos + set_addr $I10, rxcap_436_fail + ($I12, $I11) = rx428_cur."!mark_peek"($I10) + rx428_cur."!cursor_pos"($I11) + ($P10) = rx428_cur."!cursor_start"() + $P10."!cursor_pass"(rx428_pos, "") + rx428_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_398_done - rxcap_398_fail: - goto rx390_fail - rxcap_398_done: - alt399_0: - set_addr $I10, alt399_1 - rx390_cur."!mark_push"(0, rx390_pos, $I10) + goto rxcap_436_done + rxcap_436_fail: + goto rx428_fail + rxcap_436_done: + alt437_0: + set_addr $I10, alt437_1 + rx428_cur."!mark_push"(0, rx428_pos, $I10) # rx subrule "hexint" subtype=capture negate= - rx390_cur."!cursor_pos"(rx390_pos) - $P10 = rx390_cur."hexint"() - unless $P10, rx390_fail - rx390_cur."!mark_push"(0, -1, 0, $P10) + rx428_cur."!cursor_pos"(rx428_pos) + $P10 = rx428_cur."hexint"() + unless $P10, rx428_fail + rx428_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("hexint") - rx390_pos = $P10."pos"() - goto alt399_end - alt399_1: + rx428_pos = $P10."pos"() + goto alt437_end + alt437_1: # rx literal "[" - add $I11, rx390_pos, 1 - gt $I11, rx390_eos, rx390_fail - sub $I11, rx390_pos, rx390_off - ord $I11, rx390_tgt, $I11 - ne $I11, 91, rx390_fail - add rx390_pos, 1 + add $I11, rx428_pos, 1 + gt $I11, rx428_eos, rx428_fail + sub $I11, rx428_pos, rx428_off + ord $I11, rx428_tgt, $I11 + ne $I11, 91, rx428_fail + add rx428_pos, 1 # rx subrule "hexints" subtype=capture negate= - rx390_cur."!cursor_pos"(rx390_pos) - $P10 = rx390_cur."hexints"() - unless $P10, rx390_fail - rx390_cur."!mark_push"(0, -1, 0, $P10) + rx428_cur."!cursor_pos"(rx428_pos) + $P10 = rx428_cur."hexints"() + unless $P10, rx428_fail + rx428_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("hexints") - rx390_pos = $P10."pos"() + rx428_pos = $P10."pos"() # rx literal "]" - add $I11, rx390_pos, 1 - gt $I11, rx390_eos, rx390_fail - sub $I11, rx390_pos, rx390_off - ord $I11, rx390_tgt, $I11 - ne $I11, 93, rx390_fail - add rx390_pos, 1 - alt399_end: - # rx pass - rx390_cur."!cursor_pass"(rx390_pos, "backslash:sym") - if_null rx390_debug, debug_361 - rx390_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx390_pos) - debug_361: - .return (rx390_cur) - rx390_restart: + add $I11, rx428_pos, 1 + gt $I11, rx428_eos, rx428_fail + sub $I11, rx428_pos, rx428_off + ord $I11, rx428_tgt, $I11 + ne $I11, 93, rx428_fail + add rx428_pos, 1 + alt437_end: + # rx pass + rx428_cur."!cursor_pass"(rx428_pos, "backslash:sym") + if_null rx428_debug, debug_398 + rx428_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx428_pos) + debug_398: + .return (rx428_cur) + rx428_restart: .annotate 'line', 3 - if_null rx390_debug, debug_362 - rx390_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_362: - rx390_fail: - (rx390_rep, rx390_pos, $I10, $P10) = rx390_cur."!mark_fail"(0) - lt rx390_pos, -1, rx390_done - eq rx390_pos, -1, rx390_fail - jump $I10 - rx390_done: - rx390_cur."!cursor_fail"() - if_null rx390_debug, debug_363 - rx390_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_363: - .return (rx390_cur) + if_null rx428_debug, debug_399 + rx428_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_399: + rx428_fail: + (rx428_rep, rx428_pos, $I10, $P10) = rx428_cur."!mark_fail"(0) + lt rx428_pos, -1, rx428_done + eq rx428_pos, -1, rx428_fail + jump $I10 + rx428_done: + rx428_cur."!cursor_fail"() + if_null rx428_debug, debug_400 + rx428_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_400: + .return (rx428_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("114_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("124_1284728471.30547") :method .annotate 'line', 3 - $P392 = self."!PREFIX__!subrule"("hexints", "X[") - $P393 = self."!PREFIX__!subrule"("hexint", "X") - $P394 = self."!PREFIX__!subrule"("hexints", "x[") - $P395 = self."!PREFIX__!subrule"("hexint", "x") - new $P396, "ResizablePMCArray" - push $P396, $P392 - push $P396, $P393 - push $P396, $P394 - push $P396, $P395 - .return ($P396) + $P430 = self."!PREFIX__!subrule"("hexints", "X[") + $P431 = self."!PREFIX__!subrule"("hexint", "X") + $P432 = self."!PREFIX__!subrule"("hexints", "x[") + $P433 = self."!PREFIX__!subrule"("hexint", "x") + new $P434, "ResizablePMCArray" + push $P434, $P430 + push $P434, $P431 + push $P434, $P432 + push $P434, $P433 + .return ($P434) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("115_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("125_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx401_tgt - .local int rx401_pos - .local int rx401_off - .local int rx401_eos - .local int rx401_rep - .local pmc rx401_cur - .local pmc rx401_debug - (rx401_cur, rx401_pos, rx401_tgt, $I10) = self."!cursor_start"() - getattribute rx401_debug, rx401_cur, "$!debug" - .lex unicode:"$\x{a2}", rx401_cur + .local string rx439_tgt + .local int rx439_pos + .local int rx439_off + .local int rx439_eos + .local int rx439_rep + .local pmc rx439_cur + .local pmc rx439_debug + (rx439_cur, rx439_pos, rx439_tgt, $I10) = self."!cursor_start"() + getattribute rx439_debug, rx439_cur, "$!debug" + .lex unicode:"$\x{a2}", rx439_cur .local pmc match .lex "$/", match - length rx401_eos, rx401_tgt - gt rx401_pos, rx401_eos, rx401_done - set rx401_off, 0 - lt rx401_pos, 2, rx401_start - sub rx401_off, rx401_pos, 1 - substr rx401_tgt, rx401_tgt, rx401_off - rx401_start: - eq $I10, 1, rx401_restart - if_null rx401_debug, debug_364 - rx401_cur."!cursor_debug"("START ", "backslash:sym") - debug_364: + length rx439_eos, rx439_tgt + gt rx439_pos, rx439_eos, rx439_done + set rx439_off, 0 + lt rx439_pos, 2, rx439_start + sub rx439_off, rx439_pos, 1 + substr rx439_tgt, rx439_tgt, rx439_off + rx439_start: + eq $I10, 1, rx439_restart + if_null rx439_debug, debug_401 + rx439_cur."!cursor_debug"("START", "backslash:sym") + debug_401: $I10 = self.'from'() - ne $I10, -1, rxscan406_done - goto rxscan406_scan - rxscan406_loop: - ($P10) = rx401_cur."from"() - inc $P10 - set rx401_pos, $P10 - ge rx401_pos, rx401_eos, rxscan406_done - rxscan406_scan: - set_addr $I10, rxscan406_loop - rx401_cur."!mark_push"(0, rx401_pos, $I10) - rxscan406_done: -.annotate 'line', 133 + ne $I10, -1, rxscan444_done + goto rxscan444_scan + rxscan444_loop: + ($P10) = rx439_cur."from"() + inc $P10 + set rx439_pos, $P10 + ge rx439_pos, rx439_eos, rxscan444_done + rxscan444_scan: + set_addr $I10, rxscan444_loop + rx439_cur."!mark_push"(0, rx439_pos, $I10) + rxscan444_done: +.annotate 'line', 146 # rx subcapture "sym" - set_addr $I10, rxcap_407_fail - rx401_cur."!mark_push"(0, rx401_pos, $I10) + set_addr $I10, rxcap_445_fail + rx439_cur."!mark_push"(0, rx439_pos, $I10) # rx enumcharlist negate=0 - ge rx401_pos, rx401_eos, rx401_fail - sub $I10, rx401_pos, rx401_off - substr $S10, rx401_tgt, $I10, 1 + ge rx439_pos, rx439_eos, rx439_fail + sub $I10, rx439_pos, rx439_off + substr $S10, rx439_tgt, $I10, 1 index $I11, "cC", $S10 - lt $I11, 0, rx401_fail - inc rx401_pos - set_addr $I10, rxcap_407_fail - ($I12, $I11) = rx401_cur."!mark_peek"($I10) - rx401_cur."!cursor_pos"($I11) - ($P10) = rx401_cur."!cursor_start"() - $P10."!cursor_pass"(rx401_pos, "") - rx401_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, 0, rx439_fail + inc rx439_pos + set_addr $I10, rxcap_445_fail + ($I12, $I11) = rx439_cur."!mark_peek"($I10) + rx439_cur."!cursor_pos"($I11) + ($P10) = rx439_cur."!cursor_start"() + $P10."!cursor_pass"(rx439_pos, "") + rx439_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_407_done - rxcap_407_fail: - goto rx401_fail - rxcap_407_done: + goto rxcap_445_done + rxcap_445_fail: + goto rx439_fail + rxcap_445_done: # rx subrule "charspec" subtype=capture negate= - rx401_cur."!cursor_pos"(rx401_pos) - $P10 = rx401_cur."charspec"() - unless $P10, rx401_fail - rx401_cur."!mark_push"(0, -1, 0, $P10) + rx439_cur."!cursor_pos"(rx439_pos) + $P10 = rx439_cur."charspec"() + unless $P10, rx439_fail + rx439_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("charspec") - rx401_pos = $P10."pos"() + rx439_pos = $P10."pos"() # rx pass - rx401_cur."!cursor_pass"(rx401_pos, "backslash:sym") - if_null rx401_debug, debug_365 - rx401_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx401_pos) - debug_365: - .return (rx401_cur) - rx401_restart: + rx439_cur."!cursor_pass"(rx439_pos, "backslash:sym") + if_null rx439_debug, debug_402 + rx439_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx439_pos) + debug_402: + .return (rx439_cur) + rx439_restart: .annotate 'line', 3 - if_null rx401_debug, debug_366 - rx401_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_366: - rx401_fail: - (rx401_rep, rx401_pos, $I10, $P10) = rx401_cur."!mark_fail"(0) - lt rx401_pos, -1, rx401_done - eq rx401_pos, -1, rx401_fail - jump $I10 - rx401_done: - rx401_cur."!cursor_fail"() - if_null rx401_debug, debug_367 - rx401_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_367: - .return (rx401_cur) + if_null rx439_debug, debug_403 + rx439_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_403: + rx439_fail: + (rx439_rep, rx439_pos, $I10, $P10) = rx439_cur."!mark_fail"(0) + lt rx439_pos, -1, rx439_done + eq rx439_pos, -1, rx439_fail + jump $I10 + rx439_done: + rx439_cur."!cursor_fail"() + if_null rx439_debug, debug_404 + rx439_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_404: + .return (rx439_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("116_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("126_1284728471.30547") :method .annotate 'line', 3 - $P403 = self."!PREFIX__!subrule"("charspec", "C") - $P404 = self."!PREFIX__!subrule"("charspec", "c") - new $P405, "ResizablePMCArray" - push $P405, $P403 - push $P405, $P404 - .return ($P405) + $P441 = self."!PREFIX__!subrule"("charspec", "C") + $P442 = self."!PREFIX__!subrule"("charspec", "c") + new $P443, "ResizablePMCArray" + push $P443, $P441 + push $P443, $P442 + .return ($P443) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("117_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("127_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx409_tgt - .local int rx409_pos - .local int rx409_off - .local int rx409_eos - .local int rx409_rep - .local pmc rx409_cur - .local pmc rx409_debug - (rx409_cur, rx409_pos, rx409_tgt, $I10) = self."!cursor_start"() - getattribute rx409_debug, rx409_cur, "$!debug" - .lex unicode:"$\x{a2}", rx409_cur + .local string rx447_tgt + .local int rx447_pos + .local int rx447_off + .local int rx447_eos + .local int rx447_rep + .local pmc rx447_cur + .local pmc rx447_debug + (rx447_cur, rx447_pos, rx447_tgt, $I10) = self."!cursor_start"() + getattribute rx447_debug, rx447_cur, "$!debug" + .lex unicode:"$\x{a2}", rx447_cur .local pmc match .lex "$/", match - length rx409_eos, rx409_tgt - gt rx409_pos, rx409_eos, rx409_done - set rx409_off, 0 - lt rx409_pos, 2, rx409_start - sub rx409_off, rx409_pos, 1 - substr rx409_tgt, rx409_tgt, rx409_off - rx409_start: - eq $I10, 1, rx409_restart - if_null rx409_debug, debug_368 - rx409_cur."!cursor_debug"("START ", "backslash:sym") - debug_368: + length rx447_eos, rx447_tgt + gt rx447_pos, rx447_eos, rx447_done + set rx447_off, 0 + lt rx447_pos, 2, rx447_start + sub rx447_off, rx447_pos, 1 + substr rx447_tgt, rx447_tgt, rx447_off + rx447_start: + eq $I10, 1, rx447_restart + if_null rx447_debug, debug_405 + rx447_cur."!cursor_debug"("START", "backslash:sym") + debug_405: $I10 = self.'from'() - ne $I10, -1, rxscan413_done - goto rxscan413_scan - rxscan413_loop: - ($P10) = rx409_cur."from"() - inc $P10 - set rx409_pos, $P10 - ge rx409_pos, rx409_eos, rxscan413_done - rxscan413_scan: - set_addr $I10, rxscan413_loop - rx409_cur."!mark_push"(0, rx409_pos, $I10) - rxscan413_done: -.annotate 'line', 134 + ne $I10, -1, rxscan451_done + goto rxscan451_scan + rxscan451_loop: + ($P10) = rx447_cur."from"() + inc $P10 + set rx447_pos, $P10 + ge rx447_pos, rx447_eos, rxscan451_done + rxscan451_scan: + set_addr $I10, rxscan451_loop + rx447_cur."!mark_push"(0, rx447_pos, $I10) + rxscan451_done: +.annotate 'line', 147 # rx literal "A" - add $I11, rx409_pos, 1 - gt $I11, rx409_eos, rx409_fail - sub $I11, rx409_pos, rx409_off - ord $I11, rx409_tgt, $I11 - ne $I11, 65, rx409_fail - add rx409_pos, 1 + add $I11, rx447_pos, 1 + gt $I11, rx447_eos, rx447_fail + sub $I11, rx447_pos, rx447_off + ord $I11, rx447_tgt, $I11 + ne $I11, 65, rx447_fail + add rx447_pos, 1 # rx subrule "obs" subtype=method negate= - rx409_cur."!cursor_pos"(rx409_pos) - $P10 = rx409_cur."obs"("\\A as beginning-of-string matcher", "^") - unless $P10, rx409_fail - rx409_pos = $P10."pos"() - # rx pass - rx409_cur."!cursor_pass"(rx409_pos, "backslash:sym") - if_null rx409_debug, debug_369 - rx409_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx409_pos) - debug_369: - .return (rx409_cur) - rx409_restart: + rx447_cur."!cursor_pos"(rx447_pos) + $P10 = rx447_cur."obs"("\\A as beginning-of-string matcher", "^") + unless $P10, rx447_fail + rx447_pos = $P10."pos"() + # rx pass + rx447_cur."!cursor_pass"(rx447_pos, "backslash:sym") + if_null rx447_debug, debug_406 + rx447_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx447_pos) + debug_406: + .return (rx447_cur) + rx447_restart: .annotate 'line', 3 - if_null rx409_debug, debug_370 - rx409_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_370: - rx409_fail: - (rx409_rep, rx409_pos, $I10, $P10) = rx409_cur."!mark_fail"(0) - lt rx409_pos, -1, rx409_done - eq rx409_pos, -1, rx409_fail - jump $I10 - rx409_done: - rx409_cur."!cursor_fail"() - if_null rx409_debug, debug_371 - rx409_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_371: - .return (rx409_cur) + if_null rx447_debug, debug_407 + rx447_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_407: + rx447_fail: + (rx447_rep, rx447_pos, $I10, $P10) = rx447_cur."!mark_fail"(0) + lt rx447_pos, -1, rx447_done + eq rx447_pos, -1, rx447_fail + jump $I10 + rx447_done: + rx447_cur."!cursor_fail"() + if_null rx447_debug, debug_408 + rx447_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_408: + .return (rx447_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("118_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("128_1284728471.30547") :method .annotate 'line', 3 - $P411 = self."!PREFIX__!subrule"("obs", "A") - new $P412, "ResizablePMCArray" - push $P412, $P411 - .return ($P412) + $P449 = self."!PREFIX__!subrule"("obs", "A") + new $P450, "ResizablePMCArray" + push $P450, $P449 + .return ($P450) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("119_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("129_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx415_tgt - .local int rx415_pos - .local int rx415_off - .local int rx415_eos - .local int rx415_rep - .local pmc rx415_cur - .local pmc rx415_debug - (rx415_cur, rx415_pos, rx415_tgt, $I10) = self."!cursor_start"() - getattribute rx415_debug, rx415_cur, "$!debug" - .lex unicode:"$\x{a2}", rx415_cur + .local string rx453_tgt + .local int rx453_pos + .local int rx453_off + .local int rx453_eos + .local int rx453_rep + .local pmc rx453_cur + .local pmc rx453_debug + (rx453_cur, rx453_pos, rx453_tgt, $I10) = self."!cursor_start"() + getattribute rx453_debug, rx453_cur, "$!debug" + .lex unicode:"$\x{a2}", rx453_cur .local pmc match .lex "$/", match - length rx415_eos, rx415_tgt - gt rx415_pos, rx415_eos, rx415_done - set rx415_off, 0 - lt rx415_pos, 2, rx415_start - sub rx415_off, rx415_pos, 1 - substr rx415_tgt, rx415_tgt, rx415_off - rx415_start: - eq $I10, 1, rx415_restart - if_null rx415_debug, debug_372 - rx415_cur."!cursor_debug"("START ", "backslash:sym") - debug_372: + length rx453_eos, rx453_tgt + gt rx453_pos, rx453_eos, rx453_done + set rx453_off, 0 + lt rx453_pos, 2, rx453_start + sub rx453_off, rx453_pos, 1 + substr rx453_tgt, rx453_tgt, rx453_off + rx453_start: + eq $I10, 1, rx453_restart + if_null rx453_debug, debug_409 + rx453_cur."!cursor_debug"("START", "backslash:sym") + debug_409: $I10 = self.'from'() - ne $I10, -1, rxscan419_done - goto rxscan419_scan - rxscan419_loop: - ($P10) = rx415_cur."from"() - inc $P10 - set rx415_pos, $P10 - ge rx415_pos, rx415_eos, rxscan419_done - rxscan419_scan: - set_addr $I10, rxscan419_loop - rx415_cur."!mark_push"(0, rx415_pos, $I10) - rxscan419_done: -.annotate 'line', 135 + ne $I10, -1, rxscan457_done + goto rxscan457_scan + rxscan457_loop: + ($P10) = rx453_cur."from"() + inc $P10 + set rx453_pos, $P10 + ge rx453_pos, rx453_eos, rxscan457_done + rxscan457_scan: + set_addr $I10, rxscan457_loop + rx453_cur."!mark_push"(0, rx453_pos, $I10) + rxscan457_done: +.annotate 'line', 148 # rx literal "z" - add $I11, rx415_pos, 1 - gt $I11, rx415_eos, rx415_fail - sub $I11, rx415_pos, rx415_off - ord $I11, rx415_tgt, $I11 - ne $I11, 122, rx415_fail - add rx415_pos, 1 + add $I11, rx453_pos, 1 + gt $I11, rx453_eos, rx453_fail + sub $I11, rx453_pos, rx453_off + ord $I11, rx453_tgt, $I11 + ne $I11, 122, rx453_fail + add rx453_pos, 1 # rx subrule "obs" subtype=method negate= - rx415_cur."!cursor_pos"(rx415_pos) - $P10 = rx415_cur."obs"("\\z as end-of-string matcher", "$") - unless $P10, rx415_fail - rx415_pos = $P10."pos"() - # rx pass - rx415_cur."!cursor_pass"(rx415_pos, "backslash:sym") - if_null rx415_debug, debug_373 - rx415_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx415_pos) - debug_373: - .return (rx415_cur) - rx415_restart: + rx453_cur."!cursor_pos"(rx453_pos) + $P10 = rx453_cur."obs"("\\z as end-of-string matcher", "$") + unless $P10, rx453_fail + rx453_pos = $P10."pos"() + # rx pass + rx453_cur."!cursor_pass"(rx453_pos, "backslash:sym") + if_null rx453_debug, debug_410 + rx453_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx453_pos) + debug_410: + .return (rx453_cur) + rx453_restart: .annotate 'line', 3 - if_null rx415_debug, debug_374 - rx415_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_374: - rx415_fail: - (rx415_rep, rx415_pos, $I10, $P10) = rx415_cur."!mark_fail"(0) - lt rx415_pos, -1, rx415_done - eq rx415_pos, -1, rx415_fail - jump $I10 - rx415_done: - rx415_cur."!cursor_fail"() - if_null rx415_debug, debug_375 - rx415_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_375: - .return (rx415_cur) + if_null rx453_debug, debug_411 + rx453_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_411: + rx453_fail: + (rx453_rep, rx453_pos, $I10, $P10) = rx453_cur."!mark_fail"(0) + lt rx453_pos, -1, rx453_done + eq rx453_pos, -1, rx453_fail + jump $I10 + rx453_done: + rx453_cur."!cursor_fail"() + if_null rx453_debug, debug_412 + rx453_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_412: + .return (rx453_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("120_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("130_1284728471.30547") :method .annotate 'line', 3 - $P417 = self."!PREFIX__!subrule"("obs", "z") - new $P418, "ResizablePMCArray" - push $P418, $P417 - .return ($P418) + $P455 = self."!PREFIX__!subrule"("obs", "z") + new $P456, "ResizablePMCArray" + push $P456, $P455 + .return ($P456) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("121_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("131_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx421_tgt - .local int rx421_pos - .local int rx421_off - .local int rx421_eos - .local int rx421_rep - .local pmc rx421_cur - .local pmc rx421_debug - (rx421_cur, rx421_pos, rx421_tgt, $I10) = self."!cursor_start"() - getattribute rx421_debug, rx421_cur, "$!debug" - .lex unicode:"$\x{a2}", rx421_cur - .local pmc match - .lex "$/", match - length rx421_eos, rx421_tgt - gt rx421_pos, rx421_eos, rx421_done - set rx421_off, 0 - lt rx421_pos, 2, rx421_start - sub rx421_off, rx421_pos, 1 - substr rx421_tgt, rx421_tgt, rx421_off - rx421_start: - eq $I10, 1, rx421_restart - if_null rx421_debug, debug_376 - rx421_cur."!cursor_debug"("START ", "backslash:sym") - debug_376: + .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_413 + rx459_cur."!cursor_debug"("START", "backslash:sym") + debug_413: $I10 = self.'from'() - ne $I10, -1, rxscan425_done - goto rxscan425_scan - rxscan425_loop: - ($P10) = rx421_cur."from"() - inc $P10 - set rx421_pos, $P10 - ge rx421_pos, rx421_eos, rxscan425_done - rxscan425_scan: - set_addr $I10, rxscan425_loop - rx421_cur."!mark_push"(0, rx421_pos, $I10) - rxscan425_done: -.annotate 'line', 136 + ne $I10, -1, rxscan463_done + goto rxscan463_scan + rxscan463_loop: + ($P10) = rx459_cur."from"() + inc $P10 + set rx459_pos, $P10 + ge rx459_pos, rx459_eos, rxscan463_done + rxscan463_scan: + set_addr $I10, rxscan463_loop + rx459_cur."!mark_push"(0, rx459_pos, $I10) + rxscan463_done: +.annotate 'line', 149 # rx literal "Z" - add $I11, rx421_pos, 1 - gt $I11, rx421_eos, rx421_fail - sub $I11, rx421_pos, rx421_off - ord $I11, rx421_tgt, $I11 - ne $I11, 90, rx421_fail - add rx421_pos, 1 + add $I11, rx459_pos, 1 + gt $I11, rx459_eos, rx459_fail + sub $I11, rx459_pos, rx459_off + ord $I11, rx459_tgt, $I11 + ne $I11, 90, rx459_fail + add rx459_pos, 1 # rx subrule "obs" subtype=method negate= - rx421_cur."!cursor_pos"(rx421_pos) - $P10 = rx421_cur."obs"("\\Z as end-of-string matcher", "\\n?$") - unless $P10, rx421_fail - rx421_pos = $P10."pos"() - # rx pass - rx421_cur."!cursor_pass"(rx421_pos, "backslash:sym") - if_null rx421_debug, debug_377 - rx421_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx421_pos) - debug_377: - .return (rx421_cur) - rx421_restart: + rx459_cur."!cursor_pos"(rx459_pos) + $P10 = rx459_cur."obs"("\\Z as end-of-string matcher", "\\n?$") + unless $P10, rx459_fail + rx459_pos = $P10."pos"() + # rx pass + rx459_cur."!cursor_pass"(rx459_pos, "backslash:sym") + if_null rx459_debug, debug_414 + rx459_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx459_pos) + debug_414: + .return (rx459_cur) + rx459_restart: .annotate 'line', 3 - if_null rx421_debug, debug_378 - rx421_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_378: - rx421_fail: - (rx421_rep, rx421_pos, $I10, $P10) = rx421_cur."!mark_fail"(0) - lt rx421_pos, -1, rx421_done - eq rx421_pos, -1, rx421_fail - jump $I10 - rx421_done: - rx421_cur."!cursor_fail"() - if_null rx421_debug, debug_379 - rx421_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_379: - .return (rx421_cur) + if_null rx459_debug, debug_415 + rx459_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_415: + 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_416 + rx459_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_416: + .return (rx459_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("122_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("132_1284728471.30547") :method .annotate 'line', 3 - $P423 = self."!PREFIX__!subrule"("obs", "Z") - new $P424, "ResizablePMCArray" - push $P424, $P423 - .return ($P424) + $P461 = self."!PREFIX__!subrule"("obs", "Z") + new $P462, "ResizablePMCArray" + push $P462, $P461 + .return ($P462) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("123_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("133_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx427_tgt - .local int rx427_pos - .local int rx427_off - .local int rx427_eos - .local int rx427_rep - .local pmc rx427_cur - .local pmc rx427_debug - (rx427_cur, rx427_pos, rx427_tgt, $I10) = self."!cursor_start"() - getattribute rx427_debug, rx427_cur, "$!debug" - .lex unicode:"$\x{a2}", rx427_cur + .local string rx465_tgt + .local int rx465_pos + .local int rx465_off + .local int rx465_eos + .local int rx465_rep + .local pmc rx465_cur + .local pmc rx465_debug + (rx465_cur, rx465_pos, rx465_tgt, $I10) = self."!cursor_start"() + getattribute rx465_debug, rx465_cur, "$!debug" + .lex unicode:"$\x{a2}", rx465_cur .local pmc match .lex "$/", match - length rx427_eos, rx427_tgt - gt rx427_pos, rx427_eos, rx427_done - set rx427_off, 0 - lt rx427_pos, 2, rx427_start - sub rx427_off, rx427_pos, 1 - substr rx427_tgt, rx427_tgt, rx427_off - rx427_start: - eq $I10, 1, rx427_restart - if_null rx427_debug, debug_380 - rx427_cur."!cursor_debug"("START ", "backslash:sym") - debug_380: + length rx465_eos, rx465_tgt + gt rx465_pos, rx465_eos, rx465_done + set rx465_off, 0 + lt rx465_pos, 2, rx465_start + sub rx465_off, rx465_pos, 1 + substr rx465_tgt, rx465_tgt, rx465_off + rx465_start: + eq $I10, 1, rx465_restart + if_null rx465_debug, debug_417 + rx465_cur."!cursor_debug"("START", "backslash:sym") + debug_417: $I10 = self.'from'() - ne $I10, -1, rxscan431_done - goto rxscan431_scan - rxscan431_loop: - ($P10) = rx427_cur."from"() - inc $P10 - set rx427_pos, $P10 - ge rx427_pos, rx427_eos, rxscan431_done - rxscan431_scan: - set_addr $I10, rxscan431_loop - rx427_cur."!mark_push"(0, rx427_pos, $I10) - rxscan431_done: -.annotate 'line', 137 + ne $I10, -1, rxscan469_done + goto rxscan469_scan + rxscan469_loop: + ($P10) = rx465_cur."from"() + inc $P10 + set rx465_pos, $P10 + ge rx465_pos, rx465_eos, rxscan469_done + rxscan469_scan: + set_addr $I10, rxscan469_loop + rx465_cur."!mark_push"(0, rx465_pos, $I10) + rxscan469_done: +.annotate 'line', 150 # rx literal "Q" - add $I11, rx427_pos, 1 - gt $I11, rx427_eos, rx427_fail - sub $I11, rx427_pos, rx427_off - ord $I11, rx427_tgt, $I11 - ne $I11, 81, rx427_fail - add rx427_pos, 1 + add $I11, rx465_pos, 1 + gt $I11, rx465_eos, rx465_fail + sub $I11, rx465_pos, rx465_off + ord $I11, rx465_tgt, $I11 + ne $I11, 81, rx465_fail + add rx465_pos, 1 # rx subrule "obs" subtype=method negate= - rx427_cur."!cursor_pos"(rx427_pos) - $P10 = rx427_cur."obs"("\\Q as quotemeta", "quotes or literal variable match") - unless $P10, rx427_fail - rx427_pos = $P10."pos"() - # rx pass - rx427_cur."!cursor_pass"(rx427_pos, "backslash:sym") - if_null rx427_debug, debug_381 - rx427_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx427_pos) - debug_381: - .return (rx427_cur) - rx427_restart: + rx465_cur."!cursor_pos"(rx465_pos) + $P10 = rx465_cur."obs"("\\Q as quotemeta", "quotes or literal variable match") + unless $P10, rx465_fail + rx465_pos = $P10."pos"() + # rx pass + rx465_cur."!cursor_pass"(rx465_pos, "backslash:sym") + if_null rx465_debug, debug_418 + rx465_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx465_pos) + debug_418: + .return (rx465_cur) + rx465_restart: .annotate 'line', 3 - if_null rx427_debug, debug_382 - rx427_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_382: - rx427_fail: - (rx427_rep, rx427_pos, $I10, $P10) = rx427_cur."!mark_fail"(0) - lt rx427_pos, -1, rx427_done - eq rx427_pos, -1, rx427_fail - jump $I10 - rx427_done: - rx427_cur."!cursor_fail"() - if_null rx427_debug, debug_383 - rx427_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_383: - .return (rx427_cur) + if_null rx465_debug, debug_419 + rx465_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_419: + rx465_fail: + (rx465_rep, rx465_pos, $I10, $P10) = rx465_cur."!mark_fail"(0) + lt rx465_pos, -1, rx465_done + eq rx465_pos, -1, rx465_fail + jump $I10 + rx465_done: + rx465_cur."!cursor_fail"() + if_null rx465_debug, debug_420 + rx465_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_420: + .return (rx465_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("124_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("134_1284728471.30547") :method .annotate 'line', 3 - $P429 = self."!PREFIX__!subrule"("obs", "Q") - new $P430, "ResizablePMCArray" - push $P430, $P429 - .return ($P430) + $P467 = self."!PREFIX__!subrule"("obs", "Q") + new $P468, "ResizablePMCArray" + push $P468, $P467 + .return ($P468) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "backslash:sym" :subid("125_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "backslash:sym" :subid("135_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx433_tgt - .local int rx433_pos - .local int rx433_off - .local int rx433_eos - .local int rx433_rep - .local pmc rx433_cur - .local pmc rx433_debug - (rx433_cur, rx433_pos, rx433_tgt, $I10) = self."!cursor_start"() - getattribute rx433_debug, rx433_cur, "$!debug" - .lex unicode:"$\x{a2}", rx433_cur - .local pmc match - .lex "$/", match - length rx433_eos, rx433_tgt - gt rx433_pos, rx433_eos, rx433_done - set rx433_off, 0 - lt rx433_pos, 2, rx433_start - sub rx433_off, rx433_pos, 1 - substr rx433_tgt, rx433_tgt, rx433_off - rx433_start: - eq $I10, 1, rx433_restart - if_null rx433_debug, debug_384 - rx433_cur."!cursor_debug"("START ", "backslash:sym") - debug_384: + .const 'Sub' $P478 = "137_1284728471.30547" + capture_lex $P478 + .local string rx471_tgt + .local int rx471_pos + .local int rx471_off + .local int rx471_eos + .local int rx471_rep + .local pmc rx471_cur + .local pmc rx471_debug + (rx471_cur, rx471_pos, rx471_tgt, $I10) = self."!cursor_start"() + getattribute rx471_debug, rx471_cur, "$!debug" + .lex unicode:"$\x{a2}", rx471_cur + .local pmc match + .lex "$/", match + length rx471_eos, rx471_tgt + gt rx471_pos, rx471_eos, rx471_done + set rx471_off, 0 + lt rx471_pos, 2, rx471_start + sub rx471_off, rx471_pos, 1 + substr rx471_tgt, rx471_tgt, rx471_off + rx471_start: + eq $I10, 1, rx471_restart + if_null rx471_debug, debug_421 + rx471_cur."!cursor_debug"("START", "backslash:sym") + debug_421: $I10 = self.'from'() - ne $I10, -1, rxscan436_done - goto rxscan436_scan - rxscan436_loop: - ($P10) = rx433_cur."from"() - inc $P10 - set rx433_pos, $P10 - ge rx433_pos, rx433_eos, rxscan436_done - rxscan436_scan: - set_addr $I10, rxscan436_loop - rx433_cur."!mark_push"(0, rx433_pos, $I10) - rxscan436_done: -.annotate 'line', 138 + ne $I10, -1, rxscan474_done + goto rxscan474_scan + rxscan474_loop: + ($P10) = rx471_cur."from"() + inc $P10 + set rx471_pos, $P10 + ge rx471_pos, rx471_eos, rxscan474_done + rxscan474_scan: + set_addr $I10, rxscan474_loop + rx471_cur."!mark_push"(0, rx471_pos, $I10) + rxscan474_done: +.annotate 'line', 151 + rx471_cur."!cursor_pos"(rx471_pos) + find_lex $P475, unicode:"$\x{a2}" + $P476 = $P475."MATCH"() + store_lex "$/", $P476 + .const 'Sub' $P478 = "137_1284728471.30547" + capture_lex $P478 + $P479 = $P478() + # rx charclass w + ge rx471_pos, rx471_eos, rx471_fail + sub $I10, rx471_pos, rx471_off + is_cclass $I11, 8192, rx471_tgt, $I10 + unless $I11, rx471_fail + inc rx471_pos + # rx subrule "panic" subtype=method negate= + rx471_cur."!cursor_pos"(rx471_pos) + $P10 = rx471_cur."panic"("Unrecognized backslash sequence") + unless $P10, rx471_fail + rx471_pos = $P10."pos"() + # rx pass + rx471_cur."!cursor_pass"(rx471_pos, "backslash:sym") + if_null rx471_debug, debug_422 + rx471_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx471_pos) + debug_422: + .return (rx471_cur) + rx471_restart: +.annotate 'line', 3 + if_null rx471_debug, debug_423 + rx471_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_423: + rx471_fail: + (rx471_rep, rx471_pos, $I10, $P10) = rx471_cur."!mark_fail"(0) + lt rx471_pos, -1, rx471_done + eq rx471_pos, -1, rx471_fail + jump $I10 + rx471_done: + rx471_cur."!cursor_fail"() + if_null rx471_debug, debug_424 + rx471_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_424: + .return (rx471_cur) + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "!PREFIX__backslash:sym" :subid("136_1284728471.30547") :method +.annotate 'line', 3 + new $P473, "ResizablePMCArray" + push $P473, "" + .return ($P473) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block477" :anon :subid("137_1284728471.30547") :outer("135_1284728471.30547") +.annotate 'line', 151 + .return () +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "backslash:sym" :subid("138_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx481_tgt + .local int rx481_pos + .local int rx481_off + .local int rx481_eos + .local int rx481_rep + .local pmc rx481_cur + .local pmc rx481_debug + (rx481_cur, rx481_pos, rx481_tgt, $I10) = self."!cursor_start"() + getattribute rx481_debug, rx481_cur, "$!debug" + .lex unicode:"$\x{a2}", rx481_cur + .local pmc match + .lex "$/", match + length rx481_eos, rx481_tgt + gt rx481_pos, rx481_eos, rx481_done + set rx481_off, 0 + lt rx481_pos, 2, rx481_start + sub rx481_off, rx481_pos, 1 + substr rx481_tgt, rx481_tgt, rx481_off + rx481_start: + eq $I10, 1, rx481_restart + if_null rx481_debug, debug_425 + rx481_cur."!cursor_debug"("START", "backslash:sym") + debug_425: + $I10 = self.'from'() + ne $I10, -1, rxscan484_done + goto rxscan484_scan + rxscan484_loop: + ($P10) = rx481_cur."from"() + inc $P10 + set rx481_pos, $P10 + ge rx481_pos, rx481_eos, rxscan484_done + rxscan484_scan: + set_addr $I10, rxscan484_loop + rx481_cur."!mark_push"(0, rx481_pos, $I10) + rxscan484_done: +.annotate 'line', 152 # rx charclass W - ge rx433_pos, rx433_eos, rx433_fail - sub $I10, rx433_pos, rx433_off - is_cclass $I11, 8192, rx433_tgt, $I10 - if $I11, rx433_fail - inc rx433_pos - # rx pass - rx433_cur."!cursor_pass"(rx433_pos, "backslash:sym") - if_null rx433_debug, debug_385 - rx433_cur."!cursor_debug"("PASS ", "backslash:sym", " at pos=", rx433_pos) - debug_385: - .return (rx433_cur) - rx433_restart: + ge rx481_pos, rx481_eos, rx481_fail + sub $I10, rx481_pos, rx481_off + is_cclass $I11, 8192, rx481_tgt, $I10 + if $I11, rx481_fail + inc rx481_pos + # rx pass + rx481_cur."!cursor_pass"(rx481_pos, "backslash:sym") + if_null rx481_debug, debug_426 + rx481_cur."!cursor_debug"("PASS", "backslash:sym", " at pos=", rx481_pos) + debug_426: + .return (rx481_cur) + rx481_restart: .annotate 'line', 3 - if_null rx433_debug, debug_386 - rx433_cur."!cursor_debug"("NEXT ", "backslash:sym") - debug_386: - rx433_fail: - (rx433_rep, rx433_pos, $I10, $P10) = rx433_cur."!mark_fail"(0) - lt rx433_pos, -1, rx433_done - eq rx433_pos, -1, rx433_fail - jump $I10 - rx433_done: - rx433_cur."!cursor_fail"() - if_null rx433_debug, debug_387 - rx433_cur."!cursor_debug"("FAIL ", "backslash:sym") - debug_387: - .return (rx433_cur) + if_null rx481_debug, debug_427 + rx481_cur."!cursor_debug"("NEXT", "backslash:sym") + debug_427: + rx481_fail: + (rx481_rep, rx481_pos, $I10, $P10) = rx481_cur."!mark_fail"(0) + lt rx481_pos, -1, rx481_done + eq rx481_pos, -1, rx481_fail + jump $I10 + rx481_done: + rx481_cur."!cursor_fail"() + if_null rx481_debug, debug_428 + rx481_cur."!cursor_debug"("FAIL", "backslash:sym") + debug_428: + .return (rx481_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__backslash:sym" :subid("126_1282016522.91354") :method +.sub "!PREFIX__backslash:sym" :subid("139_1284728471.30547") :method .annotate 'line', 3 - new $P435, "ResizablePMCArray" - push $P435, "" - .return ($P435) + new $P483, "ResizablePMCArray" + push $P483, "" + .return ($P483) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion" :subid("127_1282016522.91354") :method -.annotate 'line', 140 - $P438 = self."!protoregex"("assertion") - .return ($P438) +.sub "assertion" :subid("140_1284728471.30547") :method +.annotate 'line', 154 + $P486 = self."!protoregex"("assertion") + .return ($P486) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion" :subid("128_1282016522.91354") :method -.annotate 'line', 140 - $P440 = self."!PREFIX__!protoregex"("assertion") - .return ($P440) +.sub "!PREFIX__assertion" :subid("141_1284728471.30547") :method +.annotate 'line', 154 + $P488 = self."!PREFIX__!protoregex"("assertion") + .return ($P488) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion:sym" :subid("129_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "assertion:sym" :subid("142_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P449 = "131_1282016522.91354" - capture_lex $P449 - .local string rx442_tgt - .local int rx442_pos - .local int rx442_off - .local int rx442_eos - .local int rx442_rep - .local pmc rx442_cur - .local pmc rx442_debug - (rx442_cur, rx442_pos, rx442_tgt, $I10) = self."!cursor_start"() - getattribute rx442_debug, rx442_cur, "$!debug" - .lex unicode:"$\x{a2}", rx442_cur - .local pmc match - .lex "$/", match - length rx442_eos, rx442_tgt - gt rx442_pos, rx442_eos, rx442_done - set rx442_off, 0 - lt rx442_pos, 2, rx442_start - sub rx442_off, rx442_pos, 1 - substr rx442_tgt, rx442_tgt, rx442_off - rx442_start: - eq $I10, 1, rx442_restart - if_null rx442_debug, debug_388 - rx442_cur."!cursor_debug"("START ", "assertion:sym") - debug_388: + .const 'Sub' $P497 = "144_1284728471.30547" + capture_lex $P497 + .local string rx490_tgt + .local int rx490_pos + .local int rx490_off + .local int rx490_eos + .local int rx490_rep + .local pmc rx490_cur + .local pmc rx490_debug + (rx490_cur, rx490_pos, rx490_tgt, $I10) = self."!cursor_start"() + getattribute rx490_debug, rx490_cur, "$!debug" + .lex unicode:"$\x{a2}", rx490_cur + .local pmc match + .lex "$/", match + length rx490_eos, rx490_tgt + gt rx490_pos, rx490_eos, rx490_done + set rx490_off, 0 + lt rx490_pos, 2, rx490_start + sub rx490_off, rx490_pos, 1 + substr rx490_tgt, rx490_tgt, rx490_off + rx490_start: + eq $I10, 1, rx490_restart + if_null rx490_debug, debug_429 + rx490_cur."!cursor_debug"("START", "assertion:sym") + debug_429: $I10 = self.'from'() - 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, rxscan446_done - rxscan446_scan: - set_addr $I10, rxscan446_loop - rx442_cur."!mark_push"(0, rx442_pos, $I10) - rxscan446_done: -.annotate 'line', 142 + ne $I10, -1, rxscan494_done + goto rxscan494_scan + rxscan494_loop: + ($P10) = rx490_cur."from"() + inc $P10 + set rx490_pos, $P10 + ge rx490_pos, rx490_eos, rxscan494_done + rxscan494_scan: + set_addr $I10, rxscan494_loop + rx490_cur."!mark_push"(0, rx490_pos, $I10) + rxscan494_done: +.annotate 'line', 156 # rx literal "?" - add $I11, rx442_pos, 1 - gt $I11, rx442_eos, rx442_fail - sub $I11, rx442_pos, rx442_off - ord $I11, rx442_tgt, $I11 - ne $I11, 63, rx442_fail - add rx442_pos, 1 - alt447_0: - set_addr $I10, alt447_1 - rx442_cur."!mark_push"(0, rx442_pos, $I10) + add $I11, rx490_pos, 1 + gt $I11, rx490_eos, rx490_fail + sub $I11, rx490_pos, rx490_off + ord $I11, rx490_tgt, $I11 + ne $I11, 63, rx490_fail + add rx490_pos, 1 + alt495_0: + set_addr $I10, alt495_1 + rx490_cur."!mark_push"(0, rx490_pos, $I10) # rx subrule "before" subtype=zerowidth negate= - rx442_cur."!cursor_pos"(rx442_pos) - .const 'Sub' $P449 = "131_1282016522.91354" - capture_lex $P449 - $P10 = rx442_cur."before"($P449) - unless $P10, rx442_fail - goto alt447_end - alt447_1: + rx490_cur."!cursor_pos"(rx490_pos) + .const 'Sub' $P497 = "144_1284728471.30547" + capture_lex $P497 + $P10 = rx490_cur."before"($P497) + unless $P10, rx490_fail + goto alt495_end + alt495_1: # rx subrule "assertion" subtype=capture negate= - rx442_cur."!cursor_pos"(rx442_pos) - $P10 = rx442_cur."assertion"() - unless $P10, rx442_fail - rx442_cur."!mark_push"(0, -1, 0, $P10) + rx490_cur."!cursor_pos"(rx490_pos) + $P10 = rx490_cur."assertion"() + unless $P10, rx490_fail + rx490_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("assertion") - rx442_pos = $P10."pos"() - alt447_end: + rx490_pos = $P10."pos"() + alt495_end: # rx pass - rx442_cur."!cursor_pass"(rx442_pos, "assertion:sym") - if_null rx442_debug, debug_393 - rx442_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx442_pos) - debug_393: - .return (rx442_cur) - rx442_restart: + rx490_cur."!cursor_pass"(rx490_pos, "assertion:sym") + if_null rx490_debug, debug_434 + rx490_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx490_pos) + debug_434: + .return (rx490_cur) + rx490_restart: .annotate 'line', 3 - if_null rx442_debug, debug_394 - rx442_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_394: - rx442_fail: - (rx442_rep, rx442_pos, $I10, $P10) = rx442_cur."!mark_fail"(0) - lt rx442_pos, -1, rx442_done - eq rx442_pos, -1, rx442_fail - jump $I10 - rx442_done: - rx442_cur."!cursor_fail"() - if_null rx442_debug, debug_395 - rx442_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_395: - .return (rx442_cur) + if_null rx490_debug, debug_435 + rx490_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_435: + rx490_fail: + (rx490_rep, rx490_pos, $I10, $P10) = rx490_cur."!mark_fail"(0) + lt rx490_pos, -1, rx490_done + eq rx490_pos, -1, rx490_fail + jump $I10 + rx490_done: + rx490_cur."!cursor_fail"() + if_null rx490_debug, debug_436 + rx490_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_436: + .return (rx490_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion:sym" :subid("130_1282016522.91354") :method +.sub "!PREFIX__assertion:sym" :subid("143_1284728471.30547") :method .annotate 'line', 3 - $P444 = self."!PREFIX__!subrule"("assertion", "?") - new $P445, "ResizablePMCArray" - push $P445, $P444 - push $P445, "?" - .return ($P445) + $P492 = self."!PREFIX__!subrule"("assertion", "?") + new $P493, "ResizablePMCArray" + push $P493, $P492 + push $P493, "?" + .return ($P493) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block448" :anon :subid("131_1282016522.91354") :method :outer("129_1282016522.91354") -.annotate 'line', 142 - .local string rx450_tgt - .local int rx450_pos - .local int rx450_off - .local int rx450_eos - .local int rx450_rep - .local pmc rx450_cur - .local pmc rx450_debug - (rx450_cur, rx450_pos, rx450_tgt, $I10) = self."!cursor_start"() - getattribute rx450_debug, rx450_cur, "$!debug" - .lex unicode:"$\x{a2}", rx450_cur - .local pmc match - .lex "$/", match - length rx450_eos, rx450_tgt - gt rx450_pos, rx450_eos, rx450_done - set rx450_off, 0 - lt rx450_pos, 2, rx450_start - sub rx450_off, rx450_pos, 1 - substr rx450_tgt, rx450_tgt, rx450_off - rx450_start: - eq $I10, 1, rx450_restart - if_null rx450_debug, debug_389 - rx450_cur."!cursor_debug"("START ", "") - debug_389: +.sub "_block496" :anon :subid("144_1284728471.30547") :method :outer("142_1284728471.30547") +.annotate 'line', 156 + .local string rx498_tgt + .local int rx498_pos + .local int rx498_off + .local int rx498_eos + .local int rx498_rep + .local pmc rx498_cur + .local pmc rx498_debug + (rx498_cur, rx498_pos, rx498_tgt, $I10) = self."!cursor_start"() + getattribute rx498_debug, rx498_cur, "$!debug" + .lex unicode:"$\x{a2}", rx498_cur + .local pmc match + .lex "$/", match + length rx498_eos, rx498_tgt + gt rx498_pos, rx498_eos, rx498_done + set rx498_off, 0 + lt rx498_pos, 2, rx498_start + sub rx498_off, rx498_pos, 1 + substr rx498_tgt, rx498_tgt, rx498_off + rx498_start: + eq $I10, 1, rx498_restart + if_null rx498_debug, debug_430 + rx498_cur."!cursor_debug"("START", "") + debug_430: $I10 = self.'from'() - ne $I10, -1, rxscan451_done - goto rxscan451_scan - rxscan451_loop: - ($P10) = rx450_cur."from"() - inc $P10 - set rx450_pos, $P10 - ge rx450_pos, rx450_eos, rxscan451_done - rxscan451_scan: - set_addr $I10, rxscan451_loop - rx450_cur."!mark_push"(0, rx450_pos, $I10) - rxscan451_done: + ne $I10, -1, rxscan499_done + goto rxscan499_scan + rxscan499_loop: + ($P10) = rx498_cur."from"() + inc $P10 + set rx498_pos, $P10 + ge rx498_pos, rx498_eos, rxscan499_done + rxscan499_scan: + set_addr $I10, rxscan499_loop + rx498_cur."!mark_push"(0, rx498_pos, $I10) + rxscan499_done: # rx literal ">" - add $I11, rx450_pos, 1 - gt $I11, rx450_eos, rx450_fail - sub $I11, rx450_pos, rx450_off - ord $I11, rx450_tgt, $I11 - ne $I11, 62, rx450_fail - add rx450_pos, 1 - # rx pass - rx450_cur."!cursor_pass"(rx450_pos, "") - if_null rx450_debug, debug_390 - rx450_cur."!cursor_debug"("PASS ", "", " at pos=", rx450_pos) - debug_390: - .return (rx450_cur) - rx450_restart: - if_null rx450_debug, debug_391 - rx450_cur."!cursor_debug"("NEXT ", "") - debug_391: - rx450_fail: - (rx450_rep, rx450_pos, $I10, $P10) = rx450_cur."!mark_fail"(0) - lt rx450_pos, -1, rx450_done - eq rx450_pos, -1, rx450_fail - jump $I10 - rx450_done: - rx450_cur."!cursor_fail"() - if_null rx450_debug, debug_392 - rx450_cur."!cursor_debug"("FAIL ", "") - debug_392: - .return (rx450_cur) + add $I11, rx498_pos, 1 + gt $I11, rx498_eos, rx498_fail + sub $I11, rx498_pos, rx498_off + ord $I11, rx498_tgt, $I11 + ne $I11, 62, rx498_fail + add rx498_pos, 1 + # rx pass + rx498_cur."!cursor_pass"(rx498_pos, "") + if_null rx498_debug, debug_431 + rx498_cur."!cursor_debug"("PASS", "", " at pos=", rx498_pos) + debug_431: + .return (rx498_cur) + rx498_restart: + if_null rx498_debug, debug_432 + rx498_cur."!cursor_debug"("NEXT", "") + debug_432: + rx498_fail: + (rx498_rep, rx498_pos, $I10, $P10) = rx498_cur."!mark_fail"(0) + lt rx498_pos, -1, rx498_done + eq rx498_pos, -1, rx498_fail + jump $I10 + rx498_done: + rx498_cur."!cursor_fail"() + if_null rx498_debug, debug_433 + rx498_cur."!cursor_debug"("FAIL", "") + debug_433: + .return (rx498_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion:sym" :subid("132_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "assertion:sym" :subid("145_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P460 = "134_1282016522.91354" - capture_lex $P460 - .local string rx453_tgt - .local int rx453_pos - .local int rx453_off - .local int rx453_eos - .local int rx453_rep - .local pmc rx453_cur - .local pmc rx453_debug - (rx453_cur, rx453_pos, rx453_tgt, $I10) = self."!cursor_start"() - getattribute rx453_debug, rx453_cur, "$!debug" - .lex unicode:"$\x{a2}", rx453_cur - .local pmc match - .lex "$/", match - length rx453_eos, rx453_tgt - gt rx453_pos, rx453_eos, rx453_done - set rx453_off, 0 - lt rx453_pos, 2, rx453_start - sub rx453_off, rx453_pos, 1 - substr rx453_tgt, rx453_tgt, rx453_off - rx453_start: - eq $I10, 1, rx453_restart - if_null rx453_debug, debug_396 - rx453_cur."!cursor_debug"("START ", "assertion:sym") - debug_396: + .const 'Sub' $P508 = "147_1284728471.30547" + capture_lex $P508 + .local string rx501_tgt + .local int rx501_pos + .local int rx501_off + .local int rx501_eos + .local int rx501_rep + .local pmc rx501_cur + .local pmc rx501_debug + (rx501_cur, rx501_pos, rx501_tgt, $I10) = self."!cursor_start"() + getattribute rx501_debug, rx501_cur, "$!debug" + .lex unicode:"$\x{a2}", rx501_cur + .local pmc match + .lex "$/", match + length rx501_eos, rx501_tgt + gt rx501_pos, rx501_eos, rx501_done + set rx501_off, 0 + lt rx501_pos, 2, rx501_start + sub rx501_off, rx501_pos, 1 + substr rx501_tgt, rx501_tgt, rx501_off + rx501_start: + eq $I10, 1, rx501_restart + if_null rx501_debug, debug_437 + rx501_cur."!cursor_debug"("START", "assertion:sym") + debug_437: $I10 = self.'from'() - ne $I10, -1, rxscan457_done - goto rxscan457_scan - rxscan457_loop: - ($P10) = rx453_cur."from"() - inc $P10 - set rx453_pos, $P10 - ge rx453_pos, rx453_eos, rxscan457_done - rxscan457_scan: - set_addr $I10, rxscan457_loop - rx453_cur."!mark_push"(0, rx453_pos, $I10) - rxscan457_done: -.annotate 'line', 143 + ne $I10, -1, rxscan505_done + goto rxscan505_scan + rxscan505_loop: + ($P10) = rx501_cur."from"() + inc $P10 + set rx501_pos, $P10 + ge rx501_pos, rx501_eos, rxscan505_done + rxscan505_scan: + set_addr $I10, rxscan505_loop + rx501_cur."!mark_push"(0, rx501_pos, $I10) + rxscan505_done: +.annotate 'line', 157 # rx literal "!" - add $I11, rx453_pos, 1 - gt $I11, rx453_eos, rx453_fail - sub $I11, rx453_pos, rx453_off - ord $I11, rx453_tgt, $I11 - ne $I11, 33, rx453_fail - add rx453_pos, 1 - alt458_0: - set_addr $I10, alt458_1 - rx453_cur."!mark_push"(0, rx453_pos, $I10) + add $I11, rx501_pos, 1 + gt $I11, rx501_eos, rx501_fail + sub $I11, rx501_pos, rx501_off + ord $I11, rx501_tgt, $I11 + ne $I11, 33, rx501_fail + add rx501_pos, 1 + alt506_0: + set_addr $I10, alt506_1 + rx501_cur."!mark_push"(0, rx501_pos, $I10) # rx subrule "before" subtype=zerowidth negate= - rx453_cur."!cursor_pos"(rx453_pos) - .const 'Sub' $P460 = "134_1282016522.91354" - capture_lex $P460 - $P10 = rx453_cur."before"($P460) - unless $P10, rx453_fail - goto alt458_end - alt458_1: + rx501_cur."!cursor_pos"(rx501_pos) + .const 'Sub' $P508 = "147_1284728471.30547" + capture_lex $P508 + $P10 = rx501_cur."before"($P508) + unless $P10, rx501_fail + goto alt506_end + alt506_1: # rx subrule "assertion" subtype=capture negate= - rx453_cur."!cursor_pos"(rx453_pos) - $P10 = rx453_cur."assertion"() - unless $P10, rx453_fail - rx453_cur."!mark_push"(0, -1, 0, $P10) + rx501_cur."!cursor_pos"(rx501_pos) + $P10 = rx501_cur."assertion"() + unless $P10, rx501_fail + rx501_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("assertion") - rx453_pos = $P10."pos"() - alt458_end: + rx501_pos = $P10."pos"() + alt506_end: # rx pass - rx453_cur."!cursor_pass"(rx453_pos, "assertion:sym") - if_null rx453_debug, debug_401 - rx453_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx453_pos) - debug_401: - .return (rx453_cur) - rx453_restart: + rx501_cur."!cursor_pass"(rx501_pos, "assertion:sym") + if_null rx501_debug, debug_442 + rx501_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx501_pos) + debug_442: + .return (rx501_cur) + rx501_restart: .annotate 'line', 3 - if_null rx453_debug, debug_402 - rx453_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_402: - rx453_fail: - (rx453_rep, rx453_pos, $I10, $P10) = rx453_cur."!mark_fail"(0) - lt rx453_pos, -1, rx453_done - eq rx453_pos, -1, rx453_fail - jump $I10 - rx453_done: - rx453_cur."!cursor_fail"() - if_null rx453_debug, debug_403 - rx453_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_403: - .return (rx453_cur) + if_null rx501_debug, debug_443 + rx501_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_443: + rx501_fail: + (rx501_rep, rx501_pos, $I10, $P10) = rx501_cur."!mark_fail"(0) + lt rx501_pos, -1, rx501_done + eq rx501_pos, -1, rx501_fail + jump $I10 + rx501_done: + rx501_cur."!cursor_fail"() + if_null rx501_debug, debug_444 + rx501_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_444: + .return (rx501_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion:sym" :subid("133_1282016522.91354") :method +.sub "!PREFIX__assertion:sym" :subid("146_1284728471.30547") :method .annotate 'line', 3 - $P455 = self."!PREFIX__!subrule"("assertion", "!") - new $P456, "ResizablePMCArray" - push $P456, $P455 - push $P456, "!" - .return ($P456) + $P503 = self."!PREFIX__!subrule"("assertion", "!") + new $P504, "ResizablePMCArray" + push $P504, $P503 + push $P504, "!" + .return ($P504) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block459" :anon :subid("134_1282016522.91354") :method :outer("132_1282016522.91354") -.annotate 'line', 143 - .local string rx461_tgt - .local int rx461_pos - .local int rx461_off - .local int rx461_eos - .local int rx461_rep - .local pmc rx461_cur - .local pmc rx461_debug - (rx461_cur, rx461_pos, rx461_tgt, $I10) = self."!cursor_start"() - getattribute rx461_debug, rx461_cur, "$!debug" - .lex unicode:"$\x{a2}", rx461_cur - .local pmc match - .lex "$/", match - length rx461_eos, rx461_tgt - gt rx461_pos, rx461_eos, rx461_done - set rx461_off, 0 - lt rx461_pos, 2, rx461_start - sub rx461_off, rx461_pos, 1 - substr rx461_tgt, rx461_tgt, rx461_off - rx461_start: - eq $I10, 1, rx461_restart - if_null rx461_debug, debug_397 - rx461_cur."!cursor_debug"("START ", "") - debug_397: +.sub "_block507" :anon :subid("147_1284728471.30547") :method :outer("145_1284728471.30547") +.annotate 'line', 157 + .local string rx509_tgt + .local int rx509_pos + .local int rx509_off + .local int rx509_eos + .local int rx509_rep + .local pmc rx509_cur + .local pmc rx509_debug + (rx509_cur, rx509_pos, rx509_tgt, $I10) = self."!cursor_start"() + getattribute rx509_debug, rx509_cur, "$!debug" + .lex unicode:"$\x{a2}", rx509_cur + .local pmc match + .lex "$/", match + length rx509_eos, rx509_tgt + gt rx509_pos, rx509_eos, rx509_done + set rx509_off, 0 + lt rx509_pos, 2, rx509_start + sub rx509_off, rx509_pos, 1 + substr rx509_tgt, rx509_tgt, rx509_off + rx509_start: + eq $I10, 1, rx509_restart + if_null rx509_debug, debug_438 + rx509_cur."!cursor_debug"("START", "") + debug_438: $I10 = self.'from'() - ne $I10, -1, rxscan462_done - goto rxscan462_scan - rxscan462_loop: - ($P10) = rx461_cur."from"() - inc $P10 - set rx461_pos, $P10 - ge rx461_pos, rx461_eos, rxscan462_done - rxscan462_scan: - set_addr $I10, rxscan462_loop - rx461_cur."!mark_push"(0, rx461_pos, $I10) - rxscan462_done: + ne $I10, -1, rxscan510_done + goto rxscan510_scan + rxscan510_loop: + ($P10) = rx509_cur."from"() + inc $P10 + set rx509_pos, $P10 + ge rx509_pos, rx509_eos, rxscan510_done + rxscan510_scan: + set_addr $I10, rxscan510_loop + rx509_cur."!mark_push"(0, rx509_pos, $I10) + rxscan510_done: # rx literal ">" - add $I11, rx461_pos, 1 - gt $I11, rx461_eos, rx461_fail - sub $I11, rx461_pos, rx461_off - ord $I11, rx461_tgt, $I11 - ne $I11, 62, rx461_fail - add rx461_pos, 1 - # rx pass - rx461_cur."!cursor_pass"(rx461_pos, "") - if_null rx461_debug, debug_398 - rx461_cur."!cursor_debug"("PASS ", "", " at pos=", rx461_pos) - debug_398: - .return (rx461_cur) - rx461_restart: - if_null rx461_debug, debug_399 - rx461_cur."!cursor_debug"("NEXT ", "") - debug_399: - rx461_fail: - (rx461_rep, rx461_pos, $I10, $P10) = rx461_cur."!mark_fail"(0) - lt rx461_pos, -1, rx461_done - eq rx461_pos, -1, rx461_fail - jump $I10 - rx461_done: - rx461_cur."!cursor_fail"() - if_null rx461_debug, debug_400 - rx461_cur."!cursor_debug"("FAIL ", "") - debug_400: - .return (rx461_cur) + add $I11, rx509_pos, 1 + gt $I11, rx509_eos, rx509_fail + sub $I11, rx509_pos, rx509_off + ord $I11, rx509_tgt, $I11 + ne $I11, 62, rx509_fail + add rx509_pos, 1 + # rx pass + rx509_cur."!cursor_pass"(rx509_pos, "") + if_null rx509_debug, debug_439 + rx509_cur."!cursor_debug"("PASS", "", " at pos=", rx509_pos) + debug_439: + .return (rx509_cur) + rx509_restart: + if_null rx509_debug, debug_440 + rx509_cur."!cursor_debug"("NEXT", "") + debug_440: + rx509_fail: + (rx509_rep, rx509_pos, $I10, $P10) = rx509_cur."!mark_fail"(0) + lt rx509_pos, -1, rx509_done + eq rx509_pos, -1, rx509_fail + jump $I10 + rx509_done: + rx509_cur."!cursor_fail"() + if_null rx509_debug, debug_441 + rx509_cur."!cursor_debug"("FAIL", "") + debug_441: + .return (rx509_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion:sym" :subid("135_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "assertion:sym" :subid("148_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .local string rx464_tgt - .local int rx464_pos - .local int rx464_off - .local int rx464_eos - .local int rx464_rep - .local pmc rx464_cur - .local pmc rx464_debug - (rx464_cur, rx464_pos, rx464_tgt, $I10) = self."!cursor_start"() - getattribute rx464_debug, rx464_cur, "$!debug" - .lex unicode:"$\x{a2}", rx464_cur + .local string rx512_tgt + .local int rx512_pos + .local int rx512_off + .local int rx512_eos + .local int rx512_rep + .local pmc rx512_cur + .local pmc rx512_debug + (rx512_cur, rx512_pos, rx512_tgt, $I10) = self."!cursor_start"() + getattribute rx512_debug, rx512_cur, "$!debug" + .lex unicode:"$\x{a2}", rx512_cur .local pmc match .lex "$/", match - length rx464_eos, rx464_tgt - gt rx464_pos, rx464_eos, rx464_done - set rx464_off, 0 - lt rx464_pos, 2, rx464_start - sub rx464_off, rx464_pos, 1 - substr rx464_tgt, rx464_tgt, rx464_off - rx464_start: - eq $I10, 1, rx464_restart - if_null rx464_debug, debug_404 - rx464_cur."!cursor_debug"("START ", "assertion:sym") - debug_404: + length rx512_eos, rx512_tgt + gt rx512_pos, rx512_eos, rx512_done + set rx512_off, 0 + lt rx512_pos, 2, rx512_start + sub rx512_off, rx512_pos, 1 + substr rx512_tgt, rx512_tgt, rx512_off + rx512_start: + eq $I10, 1, rx512_restart + if_null rx512_debug, debug_445 + rx512_cur."!cursor_debug"("START", "assertion:sym") + debug_445: $I10 = self.'from'() - ne $I10, -1, rxscan468_done - goto rxscan468_scan - rxscan468_loop: - ($P10) = rx464_cur."from"() - inc $P10 - set rx464_pos, $P10 - ge rx464_pos, rx464_eos, rxscan468_done - rxscan468_scan: - set_addr $I10, rxscan468_loop - rx464_cur."!mark_push"(0, rx464_pos, $I10) - rxscan468_done: -.annotate 'line', 146 + ne $I10, -1, rxscan516_done + goto rxscan516_scan + rxscan516_loop: + ($P10) = rx512_cur."from"() + inc $P10 + set rx512_pos, $P10 + ge rx512_pos, rx512_eos, rxscan516_done + rxscan516_scan: + set_addr $I10, rxscan516_loop + rx512_cur."!mark_push"(0, rx512_pos, $I10) + rxscan516_done: +.annotate 'line', 160 # rx literal "." - add $I11, rx464_pos, 1 - gt $I11, rx464_eos, rx464_fail - sub $I11, rx464_pos, rx464_off - ord $I11, rx464_tgt, $I11 - ne $I11, 46, rx464_fail - add rx464_pos, 1 + add $I11, rx512_pos, 1 + gt $I11, rx512_eos, rx512_fail + sub $I11, rx512_pos, rx512_off + ord $I11, rx512_tgt, $I11 + ne $I11, 46, rx512_fail + add rx512_pos, 1 # rx subrule "assertion" subtype=capture negate= - rx464_cur."!cursor_pos"(rx464_pos) - $P10 = rx464_cur."assertion"() - unless $P10, rx464_fail - rx464_cur."!mark_push"(0, -1, 0, $P10) + rx512_cur."!cursor_pos"(rx512_pos) + $P10 = rx512_cur."assertion"() + unless $P10, rx512_fail + rx512_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("assertion") - rx464_pos = $P10."pos"() -.annotate 'line', 145 + rx512_pos = $P10."pos"() +.annotate 'line', 159 # rx pass - rx464_cur."!cursor_pass"(rx464_pos, "assertion:sym") - if_null rx464_debug, debug_405 - rx464_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx464_pos) - debug_405: - .return (rx464_cur) - rx464_restart: + rx512_cur."!cursor_pass"(rx512_pos, "assertion:sym") + if_null rx512_debug, debug_446 + rx512_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx512_pos) + debug_446: + .return (rx512_cur) + rx512_restart: .annotate 'line', 3 - if_null rx464_debug, debug_406 - rx464_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_406: - rx464_fail: - (rx464_rep, rx464_pos, $I10, $P10) = rx464_cur."!mark_fail"(0) - lt rx464_pos, -1, rx464_done - eq rx464_pos, -1, rx464_fail - jump $I10 - rx464_done: - rx464_cur."!cursor_fail"() - if_null rx464_debug, debug_407 - rx464_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_407: - .return (rx464_cur) + if_null rx512_debug, debug_447 + rx512_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_447: + rx512_fail: + (rx512_rep, rx512_pos, $I10, $P10) = rx512_cur."!mark_fail"(0) + lt rx512_pos, -1, rx512_done + eq rx512_pos, -1, rx512_fail + jump $I10 + rx512_done: + rx512_cur."!cursor_fail"() + if_null rx512_debug, debug_448 + rx512_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_448: + .return (rx512_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion:sym" :subid("136_1282016522.91354") :method +.sub "!PREFIX__assertion:sym" :subid("149_1284728471.30547") :method .annotate 'line', 3 - $P466 = self."!PREFIX__!subrule"("assertion", ".") - new $P467, "ResizablePMCArray" - push $P467, $P466 - .return ($P467) + $P514 = self."!PREFIX__!subrule"("assertion", ".") + new $P515, "ResizablePMCArray" + push $P515, $P514 + .return ($P515) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion:sym" :subid("137_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .const 'Sub' $P478 = "139_1282016522.91354" - capture_lex $P478 - .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"() - rx470_cur."!cursor_caparray"("nibbler", "arglist", "assertion") - 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_408 - rx470_cur."!cursor_debug"("START ", "assertion:sym") - debug_408: +.sub "assertion:sym" :subid("150_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .const 'Sub' $P526 = "152_1284728471.30547" + capture_lex $P526 + .local string rx518_tgt + .local int rx518_pos + .local int rx518_off + .local int rx518_eos + .local int rx518_rep + .local pmc rx518_cur + .local pmc rx518_debug + (rx518_cur, rx518_pos, rx518_tgt, $I10) = self."!cursor_start"() + rx518_cur."!cursor_caparray"("nibbler", "arglist", "assertion") + getattribute rx518_debug, rx518_cur, "$!debug" + .lex unicode:"$\x{a2}", rx518_cur + .local pmc match + .lex "$/", match + length rx518_eos, rx518_tgt + gt rx518_pos, rx518_eos, rx518_done + set rx518_off, 0 + lt rx518_pos, 2, rx518_start + sub rx518_off, rx518_pos, 1 + substr rx518_tgt, rx518_tgt, rx518_off + rx518_start: + eq $I10, 1, rx518_restart + if_null rx518_debug, debug_449 + rx518_cur."!cursor_debug"("START", "assertion:sym") + debug_449: $I10 = self.'from'() - ne $I10, -1, rxscan474_done - goto rxscan474_scan - rxscan474_loop: - ($P10) = rx470_cur."from"() + ne $I10, -1, rxscan522_done + goto rxscan522_scan + rxscan522_loop: + ($P10) = rx518_cur."from"() inc $P10 - set rx470_pos, $P10 - ge rx470_pos, rx470_eos, rxscan474_done - rxscan474_scan: - set_addr $I10, rxscan474_loop - rx470_cur."!mark_push"(0, rx470_pos, $I10) - rxscan474_done: -.annotate 'line', 150 + set rx518_pos, $P10 + ge rx518_pos, rx518_eos, rxscan522_done + rxscan522_scan: + set_addr $I10, rxscan522_loop + rx518_cur."!mark_push"(0, rx518_pos, $I10) + rxscan522_done: +.annotate 'line', 164 # rx subrule "identifier" subtype=capture negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."identifier"() - unless $P10, rx470_fail - rx470_cur."!mark_push"(0, -1, 0, $P10) + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."identifier"() + unless $P10, rx518_fail + rx518_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("longname") - rx470_pos = $P10."pos"() -.annotate 'line', 157 - # rx rxquantr475 ** 0..1 - set_addr $I10, rxquantr475_done - rx470_cur."!mark_push"(0, rx470_pos, $I10) - rxquantr475_loop: - alt476_0: -.annotate 'line', 151 - set_addr $I10, alt476_1 - rx470_cur."!mark_push"(0, rx470_pos, $I10) -.annotate 'line', 152 + rx518_pos = $P10."pos"() +.annotate 'line', 171 + # rx rxquantr523 ** 0..1 + set_addr $I10, rxquantr523_done + rx518_cur."!mark_push"(0, rx518_pos, $I10) + rxquantr523_loop: + alt524_0: +.annotate 'line', 165 + set_addr $I10, alt524_1 + rx518_cur."!mark_push"(0, rx518_pos, $I10) +.annotate 'line', 166 # rx subrule "before" subtype=zerowidth negate= - rx470_cur."!cursor_pos"(rx470_pos) - .const 'Sub' $P478 = "139_1282016522.91354" - capture_lex $P478 - $P10 = rx470_cur."before"($P478) - unless $P10, rx470_fail - goto alt476_end - alt476_1: - set_addr $I10, alt476_2 - rx470_cur."!mark_push"(0, rx470_pos, $I10) -.annotate 'line', 153 + rx518_cur."!cursor_pos"(rx518_pos) + .const 'Sub' $P526 = "152_1284728471.30547" + capture_lex $P526 + $P10 = rx518_cur."before"($P526) + unless $P10, rx518_fail + goto alt524_end + alt524_1: + set_addr $I10, alt524_2 + rx518_cur."!mark_push"(0, rx518_pos, $I10) +.annotate 'line', 167 # 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, 61, rx470_fail - add rx470_pos, 1 + add $I11, rx518_pos, 1 + gt $I11, rx518_eos, rx518_fail + sub $I11, rx518_pos, rx518_off + ord $I11, rx518_tgt, $I11 + ne $I11, 61, rx518_fail + add rx518_pos, 1 # rx subrule "assertion" subtype=capture negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."assertion"() - unless $P10, rx470_fail - rx470_cur."!mark_push"(0, -1, 0, $P10) + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."assertion"() + unless $P10, rx518_fail + rx518_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("assertion") - rx470_pos = $P10."pos"() - goto alt476_end - alt476_2: - set_addr $I10, alt476_3 - rx470_cur."!mark_push"(0, rx470_pos, $I10) -.annotate 'line', 154 + rx518_pos = $P10."pos"() + goto alt524_end + alt524_2: + set_addr $I10, alt524_3 + rx518_cur."!mark_push"(0, rx518_pos, $I10) +.annotate 'line', 168 # 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, 58, rx470_fail - add rx470_pos, 1 + add $I11, rx518_pos, 1 + gt $I11, rx518_eos, rx518_fail + sub $I11, rx518_pos, rx518_off + ord $I11, rx518_tgt, $I11 + ne $I11, 58, rx518_fail + add rx518_pos, 1 # rx subrule "arglist" subtype=capture negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."arglist"() - unless $P10, rx470_fail - rx470_cur."!mark_push"(0, -1, 0, $P10) + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."arglist"() + unless $P10, rx518_fail + rx518_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("arglist") - rx470_pos = $P10."pos"() - goto alt476_end - alt476_3: - set_addr $I10, alt476_4 - rx470_cur."!mark_push"(0, rx470_pos, $I10) -.annotate 'line', 155 + rx518_pos = $P10."pos"() + goto alt524_end + alt524_3: + set_addr $I10, alt524_4 + rx518_cur."!mark_push"(0, rx518_pos, $I10) +.annotate 'line', 169 # 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, 40, rx470_fail - add rx470_pos, 1 + add $I11, rx518_pos, 1 + gt $I11, rx518_eos, rx518_fail + sub $I11, rx518_pos, rx518_off + ord $I11, rx518_tgt, $I11 + ne $I11, 40, rx518_fail + add rx518_pos, 1 # rx subrule "arglist" subtype=capture negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."arglist"() - unless $P10, rx470_fail - rx470_cur."!mark_push"(0, -1, 0, $P10) + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."arglist"() + unless $P10, rx518_fail + rx518_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("arglist") - rx470_pos = $P10."pos"() + rx518_pos = $P10."pos"() # 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, 41, rx470_fail - add rx470_pos, 1 - goto alt476_end - alt476_4: -.annotate 'line', 156 + add $I11, rx518_pos, 1 + gt $I11, rx518_eos, rx518_fail + sub $I11, rx518_pos, rx518_off + ord $I11, rx518_tgt, $I11 + ne $I11, 41, rx518_fail + add rx518_pos, 1 + goto alt524_end + alt524_4: +.annotate 'line', 170 # rx subrule "normspace" subtype=method negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."normspace"() - unless $P10, rx470_fail - rx470_pos = $P10."pos"() + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."normspace"() + unless $P10, rx518_fail + rx518_pos = $P10."pos"() # rx subrule "nibbler" subtype=capture negate= - rx470_cur."!cursor_pos"(rx470_pos) - $P10 = rx470_cur."nibbler"() - unless $P10, rx470_fail - rx470_cur."!mark_push"(0, -1, 0, $P10) + rx518_cur."!cursor_pos"(rx518_pos) + $P10 = rx518_cur."nibbler"() + unless $P10, rx518_fail + rx518_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("nibbler") - rx470_pos = $P10."pos"() - alt476_end: -.annotate 'line', 157 - set_addr $I10, rxquantr475_done - (rx470_rep) = rx470_cur."!mark_commit"($I10) - rxquantr475_done: -.annotate 'line', 149 + rx518_pos = $P10."pos"() + alt524_end: +.annotate 'line', 171 + set_addr $I10, rxquantr523_done + (rx518_rep) = rx518_cur."!mark_commit"($I10) + rxquantr523_done: +.annotate 'line', 163 # rx pass - rx470_cur."!cursor_pass"(rx470_pos, "assertion:sym") - if_null rx470_debug, debug_413 - rx470_cur."!cursor_debug"("PASS ", "assertion:sym", " at pos=", rx470_pos) - debug_413: - .return (rx470_cur) - rx470_restart: + rx518_cur."!cursor_pass"(rx518_pos, "assertion:sym") + if_null rx518_debug, debug_454 + rx518_cur."!cursor_debug"("PASS", "assertion:sym", " at pos=", rx518_pos) + debug_454: + .return (rx518_cur) + rx518_restart: .annotate 'line', 3 - if_null rx470_debug, debug_414 - rx470_cur."!cursor_debug"("NEXT ", "assertion:sym") - debug_414: - 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_415 - rx470_cur."!cursor_debug"("FAIL ", "assertion:sym") - debug_415: - .return (rx470_cur) + if_null rx518_debug, debug_455 + rx518_cur."!cursor_debug"("NEXT", "assertion:sym") + debug_455: + rx518_fail: + (rx518_rep, rx518_pos, $I10, $P10) = rx518_cur."!mark_fail"(0) + lt rx518_pos, -1, rx518_done + eq rx518_pos, -1, rx518_fail + jump $I10 + rx518_done: + rx518_cur."!cursor_fail"() + if_null rx518_debug, debug_456 + rx518_cur."!cursor_debug"("FAIL", "assertion:sym") + debug_456: + .return (rx518_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion:sym" :subid("138_1282016522.91354") :method +.sub "!PREFIX__assertion:sym" :subid("151_1284728471.30547") :method .annotate 'line', 3 - $P472 = self."!PREFIX__!subrule"("identifier", "") - new $P473, "ResizablePMCArray" - push $P473, $P472 - .return ($P473) + $P520 = self."!PREFIX__!subrule"("identifier", "") + new $P521, "ResizablePMCArray" + push $P521, $P520 + .return ($P521) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block477" :anon :subid("139_1282016522.91354") :method :outer("137_1282016522.91354") -.annotate 'line', 152 - .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"() - 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_409 - rx479_cur."!cursor_debug"("START ", "") - debug_409: +.sub "_block525" :anon :subid("152_1284728471.30547") :method :outer("150_1284728471.30547") +.annotate 'line', 166 + .local string rx527_tgt + .local int rx527_pos + .local int rx527_off + .local int rx527_eos + .local int rx527_rep + .local pmc rx527_cur + .local pmc rx527_debug + (rx527_cur, rx527_pos, rx527_tgt, $I10) = self."!cursor_start"() + getattribute rx527_debug, rx527_cur, "$!debug" + .lex unicode:"$\x{a2}", rx527_cur + .local pmc match + .lex "$/", match + length rx527_eos, rx527_tgt + gt rx527_pos, rx527_eos, rx527_done + set rx527_off, 0 + lt rx527_pos, 2, rx527_start + sub rx527_off, rx527_pos, 1 + substr rx527_tgt, rx527_tgt, rx527_off + rx527_start: + eq $I10, 1, rx527_restart + if_null rx527_debug, debug_450 + rx527_cur."!cursor_debug"("START", "") + debug_450: $I10 = self.'from'() - ne $I10, -1, rxscan480_done - goto rxscan480_scan - rxscan480_loop: - ($P10) = rx479_cur."from"() - inc $P10 - set rx479_pos, $P10 - ge rx479_pos, rx479_eos, rxscan480_done - rxscan480_scan: - set_addr $I10, rxscan480_loop - rx479_cur."!mark_push"(0, rx479_pos, $I10) - rxscan480_done: + ne $I10, -1, rxscan528_done + goto rxscan528_scan + rxscan528_loop: + ($P10) = rx527_cur."from"() + inc $P10 + set rx527_pos, $P10 + ge rx527_pos, rx527_eos, rxscan528_done + rxscan528_scan: + set_addr $I10, rxscan528_loop + rx527_cur."!mark_push"(0, rx527_pos, $I10) + rxscan528_done: # 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, 62, rx479_fail - add rx479_pos, 1 - # rx pass - rx479_cur."!cursor_pass"(rx479_pos, "") - if_null rx479_debug, debug_410 - rx479_cur."!cursor_debug"("PASS ", "", " at pos=", rx479_pos) - debug_410: - .return (rx479_cur) - rx479_restart: - if_null rx479_debug, debug_411 - rx479_cur."!cursor_debug"("NEXT ", "") - debug_411: - 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_412 - rx479_cur."!cursor_debug"("FAIL ", "") - debug_412: - .return (rx479_cur) + add $I11, rx527_pos, 1 + gt $I11, rx527_eos, rx527_fail + sub $I11, rx527_pos, rx527_off + ord $I11, rx527_tgt, $I11 + ne $I11, 62, rx527_fail + add rx527_pos, 1 + # rx pass + rx527_cur."!cursor_pass"(rx527_pos, "") + if_null rx527_debug, debug_451 + rx527_cur."!cursor_debug"("PASS", "", " at pos=", rx527_pos) + debug_451: + .return (rx527_cur) + rx527_restart: + if_null rx527_debug, debug_452 + rx527_cur."!cursor_debug"("NEXT", "") + debug_452: + rx527_fail: + (rx527_rep, rx527_pos, $I10, $P10) = rx527_cur."!mark_fail"(0) + lt rx527_pos, -1, rx527_done + eq rx527_pos, -1, rx527_fail + jump $I10 + rx527_done: + rx527_cur."!cursor_fail"() + if_null rx527_debug, debug_453 + rx527_cur."!cursor_debug"("FAIL", "") + debug_453: + .return (rx527_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "assertion:sym<[>" :subid("140_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "assertion:sym<[>" :subid("153_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P487 = "142_1282016522.91354" - capture_lex $P487 - .local string rx482_tgt - .local int rx482_pos - .local int rx482_off - .local int rx482_eos - .local int rx482_rep - .local pmc rx482_cur - .local pmc rx482_debug - (rx482_cur, rx482_pos, rx482_tgt, $I10) = self."!cursor_start"() - rx482_cur."!cursor_caparray"("cclass_elem") - getattribute rx482_debug, rx482_cur, "$!debug" - .lex unicode:"$\x{a2}", rx482_cur - .local pmc match - .lex "$/", match - length rx482_eos, rx482_tgt - gt rx482_pos, rx482_eos, rx482_done - set rx482_off, 0 - lt rx482_pos, 2, rx482_start - sub rx482_off, rx482_pos, 1 - substr rx482_tgt, rx482_tgt, rx482_off - rx482_start: - eq $I10, 1, rx482_restart - if_null rx482_debug, debug_416 - rx482_cur."!cursor_debug"("START ", "assertion:sym<[>") - debug_416: + .const 'Sub' $P535 = "155_1284728471.30547" + capture_lex $P535 + .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"() + rx530_cur."!cursor_caparray"("cclass_elem") + 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_457 + rx530_cur."!cursor_debug"("START", "assertion:sym<[>") + debug_457: $I10 = self.'from'() - ne $I10, -1, rxscan485_done - goto rxscan485_scan - rxscan485_loop: - ($P10) = rx482_cur."from"() - inc $P10 - set rx482_pos, $P10 - ge rx482_pos, rx482_eos, rxscan485_done - rxscan485_scan: - set_addr $I10, rxscan485_loop - rx482_cur."!mark_push"(0, rx482_pos, $I10) - rxscan485_done: -.annotate 'line', 160 + ne $I10, -1, rxscan533_done + goto rxscan533_scan + rxscan533_loop: + ($P10) = rx530_cur."from"() + inc $P10 + set rx530_pos, $P10 + ge rx530_pos, rx530_eos, rxscan533_done + rxscan533_scan: + set_addr $I10, rxscan533_loop + rx530_cur."!mark_push"(0, rx530_pos, $I10) + rxscan533_done: +.annotate 'line', 174 # rx subrule "before" subtype=zerowidth negate= - rx482_cur."!cursor_pos"(rx482_pos) - .const 'Sub' $P487 = "142_1282016522.91354" - capture_lex $P487 - $P10 = rx482_cur."before"($P487) - unless $P10, rx482_fail - # rx rxquantr491 ** 1..* - set_addr $I10, rxquantr491_done - rx482_cur."!mark_push"(0, -1, $I10) - rxquantr491_loop: + rx530_cur."!cursor_pos"(rx530_pos) + .const 'Sub' $P535 = "155_1284728471.30547" + capture_lex $P535 + $P10 = rx530_cur."before"($P535) + unless $P10, rx530_fail + # rx rxquantr539 ** 1..* + set_addr $I10, rxquantr539_done + rx530_cur."!mark_push"(0, -1, $I10) + rxquantr539_loop: # rx subrule "cclass_elem" subtype=capture negate= - rx482_cur."!cursor_pos"(rx482_pos) - $P10 = rx482_cur."cclass_elem"() - unless $P10, rx482_fail - goto rxsubrule492_pass - rxsubrule492_back: + rx530_cur."!cursor_pos"(rx530_pos) + $P10 = rx530_cur."cclass_elem"() + unless $P10, rx530_fail + goto rxsubrule540_pass + rxsubrule540_back: $P10 = $P10."!cursor_next"() - unless $P10, rx482_fail - rxsubrule492_pass: - set_addr $I10, rxsubrule492_back - rx482_cur."!mark_push"(0, rx482_pos, $I10, $P10) + unless $P10, rx530_fail + rxsubrule540_pass: + set_addr $I10, rxsubrule540_back + rx530_cur."!mark_push"(0, rx530_pos, $I10, $P10) $P10."!cursor_names"("cclass_elem") - rx482_pos = $P10."pos"() - set_addr $I10, rxquantr491_done - (rx482_rep) = rx482_cur."!mark_commit"($I10) - set_addr $I10, rxquantr491_done - rx482_cur."!mark_push"(rx482_rep, rx482_pos, $I10) - goto rxquantr491_loop - rxquantr491_done: - # rx pass - rx482_cur."!cursor_pass"(rx482_pos, "assertion:sym<[>") - if_null rx482_debug, debug_421 - rx482_cur."!cursor_debug"("PASS ", "assertion:sym<[>", " at pos=", rx482_pos) - debug_421: - .return (rx482_cur) - rx482_restart: + rx530_pos = $P10."pos"() + set_addr $I10, rxquantr539_done + (rx530_rep) = rx530_cur."!mark_commit"($I10) + set_addr $I10, rxquantr539_done + rx530_cur."!mark_push"(rx530_rep, rx530_pos, $I10) + goto rxquantr539_loop + rxquantr539_done: + # rx pass + rx530_cur."!cursor_pass"(rx530_pos, "assertion:sym<[>") + if_null rx530_debug, debug_462 + rx530_cur."!cursor_debug"("PASS", "assertion:sym<[>", " at pos=", rx530_pos) + debug_462: + .return (rx530_cur) + rx530_restart: .annotate 'line', 3 - if_null rx482_debug, debug_422 - rx482_cur."!cursor_debug"("NEXT ", "assertion:sym<[>") - debug_422: - rx482_fail: - (rx482_rep, rx482_pos, $I10, $P10) = rx482_cur."!mark_fail"(0) - lt rx482_pos, -1, rx482_done - eq rx482_pos, -1, rx482_fail - jump $I10 - rx482_done: - rx482_cur."!cursor_fail"() - if_null rx482_debug, debug_423 - rx482_cur."!cursor_debug"("FAIL ", "assertion:sym<[>") - debug_423: - .return (rx482_cur) + if_null rx530_debug, debug_463 + rx530_cur."!cursor_debug"("NEXT", "assertion:sym<[>") + debug_463: + 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_464 + rx530_cur."!cursor_debug"("FAIL", "assertion:sym<[>") + debug_464: + .return (rx530_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__assertion:sym<[>" :subid("141_1282016522.91354") :method +.sub "!PREFIX__assertion:sym<[>" :subid("154_1284728471.30547") :method .annotate 'line', 3 - new $P484, "ResizablePMCArray" - push $P484, "" - .return ($P484) + new $P532, "ResizablePMCArray" + push $P532, "" + .return ($P532) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block486" :anon :subid("142_1282016522.91354") :method :outer("140_1282016522.91354") -.annotate 'line', 160 - .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_417 - rx488_cur."!cursor_debug"("START ", "") - debug_417: +.sub "_block534" :anon :subid("155_1284728471.30547") :method :outer("153_1284728471.30547") +.annotate 'line', 174 + .local string rx536_tgt + .local int rx536_pos + .local int rx536_off + .local int rx536_eos + .local int rx536_rep + .local pmc rx536_cur + .local pmc rx536_debug + (rx536_cur, rx536_pos, rx536_tgt, $I10) = self."!cursor_start"() + getattribute rx536_debug, rx536_cur, "$!debug" + .lex unicode:"$\x{a2}", rx536_cur + .local pmc match + .lex "$/", match + length rx536_eos, rx536_tgt + gt rx536_pos, rx536_eos, rx536_done + set rx536_off, 0 + lt rx536_pos, 2, rx536_start + sub rx536_off, rx536_pos, 1 + substr rx536_tgt, rx536_tgt, rx536_off + rx536_start: + eq $I10, 1, rx536_restart + if_null rx536_debug, debug_458 + rx536_cur."!cursor_debug"("START", "") + debug_458: $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: - alt490_0: - set_addr $I10, alt490_1 - rx488_cur."!mark_push"(0, rx488_pos, $I10) + ne $I10, -1, rxscan537_done + goto rxscan537_scan + rxscan537_loop: + ($P10) = rx536_cur."from"() + inc $P10 + set rx536_pos, $P10 + ge rx536_pos, rx536_eos, rxscan537_done + rxscan537_scan: + set_addr $I10, rxscan537_loop + rx536_cur."!mark_push"(0, rx536_pos, $I10) + rxscan537_done: + alt538_0: + set_addr $I10, alt538_1 + rx536_cur."!mark_push"(0, rx536_pos, $I10) # 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, 91, rx488_fail - add rx488_pos, 1 - goto alt490_end - alt490_1: - set_addr $I10, alt490_2 - rx488_cur."!mark_push"(0, rx488_pos, $I10) + add $I11, rx536_pos, 1 + gt $I11, rx536_eos, rx536_fail + sub $I11, rx536_pos, rx536_off + ord $I11, rx536_tgt, $I11 + ne $I11, 91, rx536_fail + add rx536_pos, 1 + goto alt538_end + alt538_1: + set_addr $I10, alt538_2 + rx536_cur."!mark_push"(0, rx536_pos, $I10) # 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, 43, rx488_fail - add rx488_pos, 1 - goto alt490_end - alt490_2: + add $I11, rx536_pos, 1 + gt $I11, rx536_eos, rx536_fail + sub $I11, rx536_pos, rx536_off + ord $I11, rx536_tgt, $I11 + ne $I11, 43, rx536_fail + add rx536_pos, 1 + goto alt538_end + alt538_2: # 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, 45, rx488_fail - add rx488_pos, 1 - alt490_end: - # rx pass - rx488_cur."!cursor_pass"(rx488_pos, "") - if_null rx488_debug, debug_418 - rx488_cur."!cursor_debug"("PASS ", "", " at pos=", rx488_pos) - debug_418: - .return (rx488_cur) - rx488_restart: - if_null rx488_debug, debug_419 - rx488_cur."!cursor_debug"("NEXT ", "") - debug_419: - 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_420 - rx488_cur."!cursor_debug"("FAIL ", "") - debug_420: - .return (rx488_cur) + add $I11, rx536_pos, 1 + gt $I11, rx536_eos, rx536_fail + sub $I11, rx536_pos, rx536_off + ord $I11, rx536_tgt, $I11 + ne $I11, 45, rx536_fail + add rx536_pos, 1 + alt538_end: + # rx pass + rx536_cur."!cursor_pass"(rx536_pos, "") + if_null rx536_debug, debug_459 + rx536_cur."!cursor_debug"("PASS", "", " at pos=", rx536_pos) + debug_459: + .return (rx536_cur) + rx536_restart: + if_null rx536_debug, debug_460 + rx536_cur."!cursor_debug"("NEXT", "") + debug_460: + rx536_fail: + (rx536_rep, rx536_pos, $I10, $P10) = rx536_cur."!mark_fail"(0) + lt rx536_pos, -1, rx536_done + eq rx536_pos, -1, rx536_fail + jump $I10 + rx536_done: + rx536_cur."!cursor_fail"() + if_null rx536_debug, debug_461 + rx536_cur."!cursor_debug"("FAIL", "") + debug_461: + .return (rx536_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "cclass_elem" :subid("143_1282016522.91354") :method :outer("11_1282016522.91354") +.sub "cclass_elem" :subid("156_1284728471.30547") :method :outer("11_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P505 = "145_1282016522.91354" - capture_lex $P505 - .local string rx494_tgt - .local int rx494_pos - .local int rx494_off - .local int rx494_eos - .local int rx494_rep - .local pmc rx494_cur - .local pmc rx494_debug - (rx494_cur, rx494_pos, rx494_tgt, $I10) = self."!cursor_start"() - rx494_cur."!cursor_caparray"("charspec") - getattribute rx494_debug, rx494_cur, "$!debug" - .lex unicode:"$\x{a2}", rx494_cur - .local pmc match - .lex "$/", match - length rx494_eos, rx494_tgt - gt rx494_pos, rx494_eos, rx494_done - set rx494_off, 0 - lt rx494_pos, 2, rx494_start - sub rx494_off, rx494_pos, 1 - substr rx494_tgt, rx494_tgt, rx494_off - rx494_start: - eq $I10, 1, rx494_restart - if_null rx494_debug, debug_424 - rx494_cur."!cursor_debug"("START ", "cclass_elem") - debug_424: - $I10 = self.'from'() - ne $I10, -1, rxscan497_done - goto rxscan497_scan - rxscan497_loop: - ($P10) = rx494_cur."from"() - inc $P10 - set rx494_pos, $P10 - ge rx494_pos, rx494_eos, rxscan497_done - rxscan497_scan: - set_addr $I10, rxscan497_loop - rx494_cur."!mark_push"(0, rx494_pos, $I10) - rxscan497_done: -.annotate 'line', 163 + .const 'Sub' $P553 = "158_1284728471.30547" + capture_lex $P553 + .local string rx542_tgt + .local int rx542_pos + .local int rx542_off + .local int rx542_eos + .local int rx542_rep + .local pmc rx542_cur + .local pmc rx542_debug + (rx542_cur, rx542_pos, rx542_tgt, $I10) = self."!cursor_start"() + rx542_cur."!cursor_caparray"("charspec") + getattribute rx542_debug, rx542_cur, "$!debug" + .lex unicode:"$\x{a2}", rx542_cur + .local pmc match + .lex "$/", match + length rx542_eos, rx542_tgt + gt rx542_pos, rx542_eos, rx542_done + set rx542_off, 0 + lt rx542_pos, 2, rx542_start + sub rx542_off, rx542_pos, 1 + substr rx542_tgt, rx542_tgt, rx542_off + rx542_start: + eq $I10, 1, rx542_restart + if_null rx542_debug, debug_465 + rx542_cur."!cursor_debug"("START", "cclass_elem") + debug_465: + $I10 = self.'from'() + ne $I10, -1, rxscan545_done + goto rxscan545_scan + rxscan545_loop: + ($P10) = rx542_cur."from"() + inc $P10 + set rx542_pos, $P10 + ge rx542_pos, rx542_eos, rxscan545_done + rxscan545_scan: + set_addr $I10, rxscan545_loop + rx542_cur."!mark_push"(0, rx542_pos, $I10) + rxscan545_done: +.annotate 'line', 177 # rx subcapture "sign" - set_addr $I10, rxcap_499_fail - rx494_cur."!mark_push"(0, rx494_pos, $I10) - alt498_0: - set_addr $I10, alt498_1 - rx494_cur."!mark_push"(0, rx494_pos, $I10) + set_addr $I10, rxcap_547_fail + rx542_cur."!mark_push"(0, rx542_pos, $I10) + alt546_0: + set_addr $I10, alt546_1 + rx542_cur."!mark_push"(0, rx542_pos, $I10) # rx literal "+" - add $I11, rx494_pos, 1 - gt $I11, rx494_eos, rx494_fail - sub $I11, rx494_pos, rx494_off - ord $I11, rx494_tgt, $I11 - ne $I11, 43, rx494_fail - add rx494_pos, 1 - goto alt498_end - alt498_1: - set_addr $I10, alt498_2 - rx494_cur."!mark_push"(0, rx494_pos, $I10) + add $I11, rx542_pos, 1 + gt $I11, rx542_eos, rx542_fail + sub $I11, rx542_pos, rx542_off + ord $I11, rx542_tgt, $I11 + ne $I11, 43, rx542_fail + add rx542_pos, 1 + goto alt546_end + alt546_1: + set_addr $I10, alt546_2 + rx542_cur."!mark_push"(0, rx542_pos, $I10) # rx literal "-" - add $I11, rx494_pos, 1 - gt $I11, rx494_eos, rx494_fail - sub $I11, rx494_pos, rx494_off - ord $I11, rx494_tgt, $I11 - ne $I11, 45, rx494_fail - add rx494_pos, 1 - goto alt498_end - alt498_2: - alt498_end: - set_addr $I10, rxcap_499_fail - ($I12, $I11) = rx494_cur."!mark_peek"($I10) - rx494_cur."!cursor_pos"($I11) - ($P10) = rx494_cur."!cursor_start"() - $P10."!cursor_pass"(rx494_pos, "") - rx494_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx542_pos, 1 + gt $I11, rx542_eos, rx542_fail + sub $I11, rx542_pos, rx542_off + ord $I11, rx542_tgt, $I11 + ne $I11, 45, rx542_fail + add rx542_pos, 1 + goto alt546_end + alt546_2: + alt546_end: + set_addr $I10, rxcap_547_fail + ($I12, $I11) = rx542_cur."!mark_peek"($I10) + rx542_cur."!cursor_pos"($I11) + ($P10) = rx542_cur."!cursor_start"() + $P10."!cursor_pass"(rx542_pos, "") + rx542_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sign") - goto rxcap_499_done - rxcap_499_fail: - goto rx494_fail - rxcap_499_done: -.annotate 'line', 164 - # rx rxquantr500 ** 0..1 - set_addr $I10, rxquantr500_done - rx494_cur."!mark_push"(0, rx494_pos, $I10) - rxquantr500_loop: + goto rxcap_547_done + rxcap_547_fail: + goto rx542_fail + rxcap_547_done: +.annotate 'line', 178 + # rx rxquantr548 ** 0..1 + set_addr $I10, rxquantr548_done + rx542_cur."!mark_push"(0, rx542_pos, $I10) + rxquantr548_loop: # rx subrule "normspace" subtype=method negate= - rx494_cur."!cursor_pos"(rx494_pos) - $P10 = rx494_cur."normspace"() - unless $P10, rx494_fail - goto rxsubrule501_pass - rxsubrule501_back: + rx542_cur."!cursor_pos"(rx542_pos) + $P10 = rx542_cur."normspace"() + unless $P10, rx542_fail + goto rxsubrule549_pass + rxsubrule549_back: $P10 = $P10."!cursor_next"() - unless $P10, rx494_fail - rxsubrule501_pass: - set_addr $I10, rxsubrule501_back - rx494_cur."!mark_push"(0, rx494_pos, $I10, $P10) - rx494_pos = $P10."pos"() - set_addr $I10, rxquantr500_done - (rx494_rep) = rx494_cur."!mark_commit"($I10) - rxquantr500_done: - alt502_0: -.annotate 'line', 165 - set_addr $I10, alt502_1 - rx494_cur."!mark_push"(0, rx494_pos, $I10) -.annotate 'line', 166 + unless $P10, rx542_fail + rxsubrule549_pass: + set_addr $I10, rxsubrule549_back + rx542_cur."!mark_push"(0, rx542_pos, $I10, $P10) + rx542_pos = $P10."pos"() + set_addr $I10, rxquantr548_done + (rx542_rep) = rx542_cur."!mark_commit"($I10) + rxquantr548_done: + alt550_0: +.annotate 'line', 179 + set_addr $I10, alt550_1 + rx542_cur."!mark_push"(0, rx542_pos, $I10) +.annotate 'line', 180 # rx literal "[" - add $I11, rx494_pos, 1 - gt $I11, rx494_eos, rx494_fail - sub $I11, rx494_pos, rx494_off - ord $I11, rx494_tgt, $I11 - ne $I11, 91, rx494_fail - add rx494_pos, 1 -.annotate 'line', 169 - # rx rxquantr503 ** 0..* - set_addr $I10, rxquantr503_done - rx494_cur."!mark_push"(0, rx494_pos, $I10) - rxquantr503_loop: -.annotate 'line', 166 - # rx subrule $P505 subtype=capture negate= - rx494_cur."!cursor_pos"(rx494_pos) - .const 'Sub' $P505 = "145_1282016522.91354" - capture_lex $P505 - $P10 = rx494_cur.$P505() - unless $P10, rx494_fail - goto rxsubrule523_pass - rxsubrule523_back: + add $I11, rx542_pos, 1 + gt $I11, rx542_eos, rx542_fail + sub $I11, rx542_pos, rx542_off + ord $I11, rx542_tgt, $I11 + ne $I11, 91, rx542_fail + add rx542_pos, 1 +.annotate 'line', 183 + # rx rxquantr551 ** 0..* + set_addr $I10, rxquantr551_done + rx542_cur."!mark_push"(0, rx542_pos, $I10) + rxquantr551_loop: +.annotate 'line', 180 + # rx subrule $P553 subtype=capture negate= + rx542_cur."!cursor_pos"(rx542_pos) + .const 'Sub' $P553 = "158_1284728471.30547" + capture_lex $P553 + $P10 = rx542_cur.$P553() + unless $P10, rx542_fail + goto rxsubrule571_pass + rxsubrule571_back: $P10 = $P10."!cursor_next"() - unless $P10, rx494_fail - rxsubrule523_pass: - set_addr $I10, rxsubrule523_back - rx494_cur."!mark_push"(0, rx494_pos, $I10, $P10) + unless $P10, rx542_fail + rxsubrule571_pass: + set_addr $I10, rxsubrule571_back + rx542_cur."!mark_push"(0, rx542_pos, $I10, $P10) $P10."!cursor_names"("charspec") - rx494_pos = $P10."pos"() -.annotate 'line', 169 - set_addr $I10, rxquantr503_done - (rx494_rep) = rx494_cur."!mark_commit"($I10) - set_addr $I10, rxquantr503_done - rx494_cur."!mark_push"(rx494_rep, rx494_pos, $I10) - goto rxquantr503_loop - rxquantr503_done: -.annotate 'line', 170 + rx542_pos = $P10."pos"() +.annotate 'line', 183 + set_addr $I10, rxquantr551_done + (rx542_rep) = rx542_cur."!mark_commit"($I10) + set_addr $I10, rxquantr551_done + rx542_cur."!mark_push"(rx542_rep, rx542_pos, $I10) + goto rxquantr551_loop + rxquantr551_done: +.annotate 'line', 184 # rx charclass_q s r 0..-1 - sub $I10, rx494_pos, rx494_off - find_not_cclass $I11, 32, rx494_tgt, $I10, rx494_eos - add rx494_pos, rx494_off, $I11 + sub $I10, rx542_pos, rx542_off + find_not_cclass $I11, 32, rx542_tgt, $I10, rx542_eos + add rx542_pos, rx542_off, $I11 # rx literal "]" - add $I11, rx494_pos, 1 - gt $I11, rx494_eos, rx494_fail - sub $I11, rx494_pos, rx494_off - ord $I11, rx494_tgt, $I11 - ne $I11, 93, rx494_fail - add rx494_pos, 1 -.annotate 'line', 166 - goto alt502_end - alt502_1: -.annotate 'line', 171 + add $I11, rx542_pos, 1 + gt $I11, rx542_eos, rx542_fail + sub $I11, rx542_pos, rx542_off + ord $I11, rx542_tgt, $I11 + ne $I11, 93, rx542_fail + add rx542_pos, 1 +.annotate 'line', 180 + goto alt550_end + alt550_1: +.annotate 'line', 185 # rx subcapture "name" - set_addr $I10, rxcap_524_fail - rx494_cur."!mark_push"(0, rx494_pos, $I10) + set_addr $I10, rxcap_572_fail + rx542_cur."!mark_push"(0, rx542_pos, $I10) # rx charclass_q w r 1..-1 - sub $I10, rx494_pos, rx494_off - find_not_cclass $I11, 8192, rx494_tgt, $I10, rx494_eos + sub $I10, rx542_pos, rx542_off + find_not_cclass $I11, 8192, rx542_tgt, $I10, rx542_eos add $I12, $I10, 1 - lt $I11, $I12, rx494_fail - add rx494_pos, rx494_off, $I11 - set_addr $I10, rxcap_524_fail - ($I12, $I11) = rx494_cur."!mark_peek"($I10) - rx494_cur."!cursor_pos"($I11) - ($P10) = rx494_cur."!cursor_start"() - $P10."!cursor_pass"(rx494_pos, "") - rx494_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, $I12, rx542_fail + add rx542_pos, rx542_off, $I11 + set_addr $I10, rxcap_572_fail + ($I12, $I11) = rx542_cur."!mark_peek"($I10) + rx542_cur."!cursor_pos"($I11) + ($P10) = rx542_cur."!cursor_start"() + $P10."!cursor_pass"(rx542_pos, "") + rx542_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("name") - goto rxcap_524_done - rxcap_524_fail: - goto rx494_fail - rxcap_524_done: - alt502_end: -.annotate 'line', 173 - # rx rxquantr525 ** 0..1 - set_addr $I10, rxquantr525_done - rx494_cur."!mark_push"(0, rx494_pos, $I10) - rxquantr525_loop: + goto rxcap_572_done + rxcap_572_fail: + goto rx542_fail + rxcap_572_done: + alt550_end: +.annotate 'line', 187 + # rx rxquantr573 ** 0..1 + set_addr $I10, rxquantr573_done + rx542_cur."!mark_push"(0, rx542_pos, $I10) + rxquantr573_loop: # rx subrule "normspace" subtype=method negate= - rx494_cur."!cursor_pos"(rx494_pos) - $P10 = rx494_cur."normspace"() - unless $P10, rx494_fail - goto rxsubrule526_pass - rxsubrule526_back: + rx542_cur."!cursor_pos"(rx542_pos) + $P10 = rx542_cur."normspace"() + unless $P10, rx542_fail + goto rxsubrule574_pass + rxsubrule574_back: $P10 = $P10."!cursor_next"() - unless $P10, rx494_fail - rxsubrule526_pass: - set_addr $I10, rxsubrule526_back - rx494_cur."!mark_push"(0, rx494_pos, $I10, $P10) - rx494_pos = $P10."pos"() - set_addr $I10, rxquantr525_done - (rx494_rep) = rx494_cur."!mark_commit"($I10) - rxquantr525_done: -.annotate 'line', 162 + unless $P10, rx542_fail + rxsubrule574_pass: + set_addr $I10, rxsubrule574_back + rx542_cur."!mark_push"(0, rx542_pos, $I10, $P10) + rx542_pos = $P10."pos"() + set_addr $I10, rxquantr573_done + (rx542_rep) = rx542_cur."!mark_commit"($I10) + rxquantr573_done: +.annotate 'line', 176 # rx pass - rx494_cur."!cursor_pass"(rx494_pos, "cclass_elem") - if_null rx494_debug, debug_441 - rx494_cur."!cursor_debug"("PASS ", "cclass_elem", " at pos=", rx494_pos) - debug_441: - .return (rx494_cur) - rx494_restart: -.annotate 'line', 3 - if_null rx494_debug, debug_442 - rx494_cur."!cursor_debug"("NEXT ", "cclass_elem") - debug_442: - rx494_fail: - (rx494_rep, rx494_pos, $I10, $P10) = rx494_cur."!mark_fail"(0) - lt rx494_pos, -1, rx494_done - eq rx494_pos, -1, rx494_fail - jump $I10 - rx494_done: - rx494_cur."!cursor_fail"() - if_null rx494_debug, debug_443 - rx494_cur."!cursor_debug"("FAIL ", "cclass_elem") - debug_443: - .return (rx494_cur) + rx542_cur."!cursor_pass"(rx542_pos, "cclass_elem") + if_null rx542_debug, debug_482 + rx542_cur."!cursor_debug"("PASS", "cclass_elem", " at pos=", rx542_pos) + debug_482: + .return (rx542_cur) + rx542_restart: +.annotate 'line', 3 + if_null rx542_debug, debug_483 + rx542_cur."!cursor_debug"("NEXT", "cclass_elem") + debug_483: + rx542_fail: + (rx542_rep, rx542_pos, $I10, $P10) = rx542_cur."!mark_fail"(0) + lt rx542_pos, -1, rx542_done + eq rx542_pos, -1, rx542_fail + jump $I10 + rx542_done: + rx542_cur."!cursor_fail"() + if_null rx542_debug, debug_484 + rx542_cur."!cursor_debug"("FAIL", "cclass_elem") + debug_484: + .return (rx542_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__cclass_elem" :subid("144_1282016522.91354") :method -.annotate 'line', 3 - new $P496, "ResizablePMCArray" - push $P496, "" - push $P496, "-" - push $P496, "+" - .return ($P496) +.sub "!PREFIX__cclass_elem" :subid("157_1284728471.30547") :method +.annotate 'line', 3 + new $P544, "ResizablePMCArray" + push $P544, "" + push $P544, "-" + push $P544, "+" + .return ($P544) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block504" :anon :subid("145_1282016522.91354") :method :outer("143_1282016522.91354") -.annotate 'line', 166 - .const 'Sub' $P520 = "148_1282016522.91354" - capture_lex $P520 - .const 'Sub' $P515 = "147_1282016522.91354" - capture_lex $P515 - .const 'Sub' $P511 = "146_1282016522.91354" - capture_lex $P511 - .local string rx506_tgt - .local int rx506_pos - .local int rx506_off - .local int rx506_eos - .local int rx506_rep - .local pmc rx506_cur - .local pmc rx506_debug - (rx506_cur, rx506_pos, rx506_tgt, $I10) = self."!cursor_start"() - rx506_cur."!cursor_caparray"("1") - getattribute rx506_debug, rx506_cur, "$!debug" - .lex unicode:"$\x{a2}", rx506_cur - .local pmc match - .lex "$/", match - length rx506_eos, rx506_tgt - gt rx506_pos, rx506_eos, rx506_done - set rx506_off, 0 - lt rx506_pos, 2, rx506_start - sub rx506_off, rx506_pos, 1 - substr rx506_tgt, rx506_tgt, rx506_off - rx506_start: - eq $I10, 1, rx506_restart - if_null rx506_debug, debug_425 - rx506_cur."!cursor_debug"("START ", "") - debug_425: - $I10 = self.'from'() - ne $I10, -1, rxscan507_done - goto rxscan507_scan - rxscan507_loop: - ($P10) = rx506_cur."from"() - inc $P10 - set rx506_pos, $P10 - ge rx506_pos, rx506_eos, rxscan507_done - rxscan507_scan: - set_addr $I10, rxscan507_loop - rx506_cur."!mark_push"(0, rx506_pos, $I10) - rxscan507_done: - alt508_0: - set_addr $I10, alt508_1 - rx506_cur."!mark_push"(0, rx506_pos, $I10) -.annotate 'line', 167 +.sub "_block552" :anon :subid("158_1284728471.30547") :method :outer("156_1284728471.30547") +.annotate 'line', 180 + .const 'Sub' $P568 = "161_1284728471.30547" + capture_lex $P568 + .const 'Sub' $P563 = "160_1284728471.30547" + capture_lex $P563 + .const 'Sub' $P559 = "159_1284728471.30547" + capture_lex $P559 + .local string rx554_tgt + .local int rx554_pos + .local int rx554_off + .local int rx554_eos + .local int rx554_rep + .local pmc rx554_cur + .local pmc rx554_debug + (rx554_cur, rx554_pos, rx554_tgt, $I10) = self."!cursor_start"() + rx554_cur."!cursor_caparray"("1") + getattribute rx554_debug, rx554_cur, "$!debug" + .lex unicode:"$\x{a2}", rx554_cur + .local pmc match + .lex "$/", match + length rx554_eos, rx554_tgt + gt rx554_pos, rx554_eos, rx554_done + set rx554_off, 0 + lt rx554_pos, 2, rx554_start + sub rx554_off, rx554_pos, 1 + substr rx554_tgt, rx554_tgt, rx554_off + rx554_start: + eq $I10, 1, rx554_restart + if_null rx554_debug, debug_466 + rx554_cur."!cursor_debug"("START", "") + debug_466: + $I10 = self.'from'() + ne $I10, -1, rxscan555_done + goto rxscan555_scan + rxscan555_loop: + ($P10) = rx554_cur."from"() + inc $P10 + set rx554_pos, $P10 + ge rx554_pos, rx554_eos, rxscan555_done + rxscan555_scan: + set_addr $I10, rxscan555_loop + rx554_cur."!mark_push"(0, rx554_pos, $I10) + rxscan555_done: + alt556_0: + set_addr $I10, alt556_1 + rx554_cur."!mark_push"(0, rx554_pos, $I10) +.annotate 'line', 181 # rx charclass_q s r 0..-1 - sub $I10, rx506_pos, rx506_off - find_not_cclass $I11, 32, rx506_tgt, $I10, rx506_eos - add rx506_pos, rx506_off, $I11 + sub $I10, rx554_pos, rx554_off + find_not_cclass $I11, 32, rx554_tgt, $I10, rx554_eos + add rx554_pos, rx554_off, $I11 # rx literal "-" - add $I11, rx506_pos, 1 - gt $I11, rx506_eos, rx506_fail - sub $I11, rx506_pos, rx506_off - ord $I11, rx506_tgt, $I11 - ne $I11, 45, rx506_fail - add rx506_pos, 1 + add $I11, rx554_pos, 1 + gt $I11, rx554_eos, rx554_fail + sub $I11, rx554_pos, rx554_off + ord $I11, rx554_tgt, $I11 + ne $I11, 45, rx554_fail + add rx554_pos, 1 # rx subrule "obs" subtype=method negate= - rx506_cur."!cursor_pos"(rx506_pos) - $P10 = rx506_cur."obs"("- as character range", "..") - unless $P10, rx506_fail - rx506_pos = $P10."pos"() - goto alt508_end - alt508_1: -.annotate 'line', 168 + rx554_cur."!cursor_pos"(rx554_pos) + $P10 = rx554_cur."obs"("- as character range", "..") + unless $P10, rx554_fail + rx554_pos = $P10."pos"() + goto alt556_end + alt556_1: +.annotate 'line', 182 # rx charclass_q s r 0..-1 - sub $I10, rx506_pos, rx506_off - find_not_cclass $I11, 32, rx506_tgt, $I10, rx506_eos - add rx506_pos, rx506_off, $I11 - alt509_0: - set_addr $I10, alt509_1 - rx506_cur."!mark_push"(0, rx506_pos, $I10) + sub $I10, rx554_pos, rx554_off + find_not_cclass $I11, 32, rx554_tgt, $I10, rx554_eos + add rx554_pos, rx554_off, $I11 + alt557_0: + set_addr $I10, alt557_1 + rx554_cur."!mark_push"(0, rx554_pos, $I10) # rx literal "\\" - add $I11, rx506_pos, 1 - gt $I11, rx506_eos, rx506_fail - sub $I11, rx506_pos, rx506_off - ord $I11, rx506_tgt, $I11 - ne $I11, 92, rx506_fail - add rx506_pos, 1 - # rx subrule $P511 subtype=capture negate= - rx506_cur."!cursor_pos"(rx506_pos) - .const 'Sub' $P511 = "146_1282016522.91354" - capture_lex $P511 - $P10 = rx506_cur.$P511() - unless $P10, rx506_fail - rx506_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx554_pos, 1 + gt $I11, rx554_eos, rx554_fail + sub $I11, rx554_pos, rx554_off + ord $I11, rx554_tgt, $I11 + ne $I11, 92, rx554_fail + add rx554_pos, 1 + # rx subrule $P559 subtype=capture negate= + rx554_cur."!cursor_pos"(rx554_pos) + .const 'Sub' $P559 = "159_1284728471.30547" + capture_lex $P559 + $P10 = rx554_cur.$P559() + unless $P10, rx554_fail + rx554_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"(0) - rx506_pos = $P10."pos"() - goto alt509_end - alt509_1: - # rx subrule $P515 subtype=capture negate= - rx506_cur."!cursor_pos"(rx506_pos) - .const 'Sub' $P515 = "147_1282016522.91354" - capture_lex $P515 - $P10 = rx506_cur.$P515() - unless $P10, rx506_fail - rx506_cur."!mark_push"(0, -1, 0, $P10) + rx554_pos = $P10."pos"() + goto alt557_end + alt557_1: + # rx subrule $P563 subtype=capture negate= + rx554_cur."!cursor_pos"(rx554_pos) + .const 'Sub' $P563 = "160_1284728471.30547" + capture_lex $P563 + $P10 = rx554_cur.$P563() + unless $P10, rx554_fail + rx554_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"(0) - rx506_pos = $P10."pos"() - alt509_end: - # rx rxquantr518 ** 0..1 - set_addr $I10, rxquantr518_done - rx506_cur."!mark_push"(0, rx506_pos, $I10) - rxquantr518_loop: + rx554_pos = $P10."pos"() + alt557_end: + # rx rxquantr566 ** 0..1 + set_addr $I10, rxquantr566_done + rx554_cur."!mark_push"(0, rx554_pos, $I10) + rxquantr566_loop: # rx charclass_q s r 0..-1 - sub $I10, rx506_pos, rx506_off - find_not_cclass $I11, 32, rx506_tgt, $I10, rx506_eos - add rx506_pos, rx506_off, $I11 + sub $I10, rx554_pos, rx554_off + find_not_cclass $I11, 32, rx554_tgt, $I10, rx554_eos + add rx554_pos, rx554_off, $I11 # rx literal ".." - add $I11, rx506_pos, 2 - gt $I11, rx506_eos, rx506_fail - sub $I11, rx506_pos, rx506_off - substr $S10, rx506_tgt, $I11, 2 - ne $S10, "..", rx506_fail - add rx506_pos, 2 + add $I11, rx554_pos, 2 + gt $I11, rx554_eos, rx554_fail + sub $I11, rx554_pos, rx554_off + substr $S10, rx554_tgt, $I11, 2 + ne $S10, "..", rx554_fail + add rx554_pos, 2 # rx charclass_q s r 0..-1 - sub $I10, rx506_pos, rx506_off - find_not_cclass $I11, 32, rx506_tgt, $I10, rx506_eos - add rx506_pos, rx506_off, $I11 - # rx subrule $P520 subtype=capture negate= - rx506_cur."!cursor_pos"(rx506_pos) - .const 'Sub' $P520 = "148_1282016522.91354" - capture_lex $P520 - $P10 = rx506_cur.$P520() - unless $P10, rx506_fail - rx506_cur."!mark_push"(0, -1, 0, $P10) + sub $I10, rx554_pos, rx554_off + find_not_cclass $I11, 32, rx554_tgt, $I10, rx554_eos + add rx554_pos, rx554_off, $I11 + # rx subrule $P568 subtype=capture negate= + rx554_cur."!cursor_pos"(rx554_pos) + .const 'Sub' $P568 = "161_1284728471.30547" + capture_lex $P568 + $P10 = rx554_cur.$P568() + unless $P10, rx554_fail + rx554_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("1") - rx506_pos = $P10."pos"() - set_addr $I10, rxquantr518_done - (rx506_rep) = rx506_cur."!mark_commit"($I10) - rxquantr518_done: - alt508_end: -.annotate 'line', 166 + rx554_pos = $P10."pos"() + set_addr $I10, rxquantr566_done + (rx554_rep) = rx554_cur."!mark_commit"($I10) + rxquantr566_done: + alt556_end: +.annotate 'line', 180 # rx pass - rx506_cur."!cursor_pass"(rx506_pos, "") - if_null rx506_debug, debug_438 - rx506_cur."!cursor_debug"("PASS ", "", " at pos=", rx506_pos) - debug_438: - .return (rx506_cur) - rx506_restart: - if_null rx506_debug, debug_439 - rx506_cur."!cursor_debug"("NEXT ", "") - debug_439: - rx506_fail: - (rx506_rep, rx506_pos, $I10, $P10) = rx506_cur."!mark_fail"(0) - lt rx506_pos, -1, rx506_done - eq rx506_pos, -1, rx506_fail - jump $I10 - rx506_done: - rx506_cur."!cursor_fail"() - if_null rx506_debug, debug_440 - rx506_cur."!cursor_debug"("FAIL ", "") - debug_440: - .return (rx506_cur) + rx554_cur."!cursor_pass"(rx554_pos, "") + if_null rx554_debug, debug_479 + rx554_cur."!cursor_debug"("PASS", "", " at pos=", rx554_pos) + debug_479: + .return (rx554_cur) + rx554_restart: + if_null rx554_debug, debug_480 + rx554_cur."!cursor_debug"("NEXT", "") + debug_480: + rx554_fail: + (rx554_rep, rx554_pos, $I10, $P10) = rx554_cur."!mark_fail"(0) + lt rx554_pos, -1, rx554_done + eq rx554_pos, -1, rx554_fail + jump $I10 + rx554_done: + rx554_cur."!cursor_fail"() + if_null rx554_debug, debug_481 + rx554_cur."!cursor_debug"("FAIL", "") + debug_481: + .return (rx554_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block510" :anon :subid("146_1282016522.91354") :method :outer("145_1282016522.91354") -.annotate 'line', 168 - .local string rx512_tgt - .local int rx512_pos - .local int rx512_off - .local int rx512_eos - .local int rx512_rep - .local pmc rx512_cur - .local pmc rx512_debug - (rx512_cur, rx512_pos, rx512_tgt, $I10) = self."!cursor_start"() - getattribute rx512_debug, rx512_cur, "$!debug" - .lex unicode:"$\x{a2}", rx512_cur - .local pmc match - .lex "$/", match - length rx512_eos, rx512_tgt - gt rx512_pos, rx512_eos, rx512_done - set rx512_off, 0 - lt rx512_pos, 2, rx512_start - sub rx512_off, rx512_pos, 1 - substr rx512_tgt, rx512_tgt, rx512_off - rx512_start: - eq $I10, 1, rx512_restart - if_null rx512_debug, debug_426 - rx512_cur."!cursor_debug"("START ", "") - debug_426: - $I10 = self.'from'() - ne $I10, -1, rxscan513_done - goto rxscan513_scan - rxscan513_loop: - ($P10) = rx512_cur."from"() - inc $P10 - set rx512_pos, $P10 - ge rx512_pos, rx512_eos, rxscan513_done - rxscan513_scan: - set_addr $I10, rxscan513_loop - rx512_cur."!mark_push"(0, rx512_pos, $I10) - rxscan513_done: +.sub "_block558" :anon :subid("159_1284728471.30547") :method :outer("158_1284728471.30547") +.annotate 'line', 182 + .local string rx560_tgt + .local int rx560_pos + .local int rx560_off + .local int rx560_eos + .local int rx560_rep + .local pmc rx560_cur + .local pmc rx560_debug + (rx560_cur, rx560_pos, rx560_tgt, $I10) = self."!cursor_start"() + getattribute rx560_debug, rx560_cur, "$!debug" + .lex unicode:"$\x{a2}", rx560_cur + .local pmc match + .lex "$/", match + length rx560_eos, rx560_tgt + gt rx560_pos, rx560_eos, rx560_done + set rx560_off, 0 + lt rx560_pos, 2, rx560_start + sub rx560_off, rx560_pos, 1 + substr rx560_tgt, rx560_tgt, rx560_off + rx560_start: + eq $I10, 1, rx560_restart + if_null rx560_debug, debug_467 + rx560_cur."!cursor_debug"("START", "") + debug_467: + $I10 = self.'from'() + ne $I10, -1, rxscan561_done + goto rxscan561_scan + rxscan561_loop: + ($P10) = rx560_cur."from"() + inc $P10 + set rx560_pos, $P10 + ge rx560_pos, rx560_eos, rxscan561_done + rxscan561_scan: + set_addr $I10, rxscan561_loop + rx560_cur."!mark_push"(0, rx560_pos, $I10) + rxscan561_done: # rx charclass . - ge rx512_pos, rx512_eos, rx512_fail - inc rx512_pos + ge rx560_pos, rx560_eos, rx560_fail + inc rx560_pos # rx pass - rx512_cur."!cursor_pass"(rx512_pos, "") - if_null rx512_debug, debug_427 - rx512_cur."!cursor_debug"("PASS ", "", " at pos=", rx512_pos) - debug_427: - .return (rx512_cur) - rx512_restart: - if_null rx512_debug, debug_428 - rx512_cur."!cursor_debug"("NEXT ", "") - debug_428: - rx512_fail: - (rx512_rep, rx512_pos, $I10, $P10) = rx512_cur."!mark_fail"(0) - lt rx512_pos, -1, rx512_done - eq rx512_pos, -1, rx512_fail - jump $I10 - rx512_done: - rx512_cur."!cursor_fail"() - if_null rx512_debug, debug_429 - rx512_cur."!cursor_debug"("FAIL ", "") - debug_429: - .return (rx512_cur) + rx560_cur."!cursor_pass"(rx560_pos, "") + if_null rx560_debug, debug_468 + rx560_cur."!cursor_debug"("PASS", "", " at pos=", rx560_pos) + debug_468: + .return (rx560_cur) + rx560_restart: + if_null rx560_debug, debug_469 + rx560_cur."!cursor_debug"("NEXT", "") + debug_469: + rx560_fail: + (rx560_rep, rx560_pos, $I10, $P10) = rx560_cur."!mark_fail"(0) + lt rx560_pos, -1, rx560_done + eq rx560_pos, -1, rx560_fail + jump $I10 + rx560_done: + rx560_cur."!cursor_fail"() + if_null rx560_debug, debug_470 + rx560_cur."!cursor_debug"("FAIL", "") + debug_470: + .return (rx560_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block514" :anon :subid("147_1282016522.91354") :method :outer("145_1282016522.91354") -.annotate 'line', 168 - .local string rx516_tgt - .local int rx516_pos - .local int rx516_off - .local int rx516_eos - .local int rx516_rep - .local pmc rx516_cur - .local pmc rx516_debug - (rx516_cur, rx516_pos, rx516_tgt, $I10) = self."!cursor_start"() - getattribute rx516_debug, rx516_cur, "$!debug" - .lex unicode:"$\x{a2}", rx516_cur - .local pmc match - .lex "$/", match - length rx516_eos, rx516_tgt - gt rx516_pos, rx516_eos, rx516_done - set rx516_off, 0 - lt rx516_pos, 2, rx516_start - sub rx516_off, rx516_pos, 1 - substr rx516_tgt, rx516_tgt, rx516_off - rx516_start: - eq $I10, 1, rx516_restart - if_null rx516_debug, debug_430 - rx516_cur."!cursor_debug"("START ", "") - debug_430: +.sub "_block562" :anon :subid("160_1284728471.30547") :method :outer("158_1284728471.30547") +.annotate 'line', 182 + .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_471 + rx564_cur."!cursor_debug"("START", "") + debug_471: $I10 = self.'from'() - ne $I10, -1, rxscan517_done - goto rxscan517_scan - rxscan517_loop: - ($P10) = rx516_cur."from"() - inc $P10 - set rx516_pos, $P10 - ge rx516_pos, rx516_eos, rxscan517_done - rxscan517_scan: - set_addr $I10, rxscan517_loop - rx516_cur."!mark_push"(0, rx516_pos, $I10) - rxscan517_done: + ne $I10, -1, rxscan565_done + goto rxscan565_scan + rxscan565_loop: + ($P10) = rx564_cur."from"() + inc $P10 + set rx564_pos, $P10 + ge rx564_pos, rx564_eos, rxscan565_done + rxscan565_scan: + set_addr $I10, rxscan565_loop + rx564_cur."!mark_push"(0, rx564_pos, $I10) + rxscan565_done: # rx enumcharlist negate=1 - ge rx516_pos, rx516_eos, rx516_fail - sub $I10, rx516_pos, rx516_off - substr $S10, rx516_tgt, $I10, 1 + ge rx564_pos, rx564_eos, rx564_fail + sub $I10, rx564_pos, rx564_off + substr $S10, rx564_tgt, $I10, 1 index $I11, "]\\", $S10 - ge $I11, 0, rx516_fail - inc rx516_pos + ge $I11, 0, rx564_fail + inc rx564_pos # rx pass - rx516_cur."!cursor_pass"(rx516_pos, "") - if_null rx516_debug, debug_431 - rx516_cur."!cursor_debug"("PASS ", "", " at pos=", rx516_pos) - debug_431: - .return (rx516_cur) - rx516_restart: - if_null rx516_debug, debug_432 - rx516_cur."!cursor_debug"("NEXT ", "") - debug_432: - rx516_fail: - (rx516_rep, rx516_pos, $I10, $P10) = rx516_cur."!mark_fail"(0) - lt rx516_pos, -1, rx516_done - eq rx516_pos, -1, rx516_fail - jump $I10 - rx516_done: - rx516_cur."!cursor_fail"() - if_null rx516_debug, debug_433 - rx516_cur."!cursor_debug"("FAIL ", "") - debug_433: - .return (rx516_cur) + rx564_cur."!cursor_pass"(rx564_pos, "") + if_null rx564_debug, debug_472 + rx564_cur."!cursor_debug"("PASS", "", " at pos=", rx564_pos) + debug_472: + .return (rx564_cur) + rx564_restart: + if_null rx564_debug, debug_473 + rx564_cur."!cursor_debug"("NEXT", "") + debug_473: + 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_474 + rx564_cur."!cursor_debug"("FAIL", "") + debug_474: + .return (rx564_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block519" :anon :subid("148_1282016522.91354") :method :outer("145_1282016522.91354") -.annotate 'line', 168 - .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_434 - rx521_cur."!cursor_debug"("START ", "") - debug_434: - $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: +.sub "_block567" :anon :subid("161_1284728471.30547") :method :outer("158_1284728471.30547") +.annotate 'line', 182 + .local string rx569_tgt + .local int rx569_pos + .local int rx569_off + .local int rx569_eos + .local int rx569_rep + .local pmc rx569_cur + .local pmc rx569_debug + (rx569_cur, rx569_pos, rx569_tgt, $I10) = self."!cursor_start"() + getattribute rx569_debug, rx569_cur, "$!debug" + .lex unicode:"$\x{a2}", rx569_cur + .local pmc match + .lex "$/", match + length rx569_eos, rx569_tgt + gt rx569_pos, rx569_eos, rx569_done + set rx569_off, 0 + lt rx569_pos, 2, rx569_start + sub rx569_off, rx569_pos, 1 + substr rx569_tgt, rx569_tgt, rx569_off + rx569_start: + eq $I10, 1, rx569_restart + if_null rx569_debug, debug_475 + rx569_cur."!cursor_debug"("START", "") + debug_475: + $I10 = self.'from'() + ne $I10, -1, rxscan570_done + goto rxscan570_scan + rxscan570_loop: + ($P10) = rx569_cur."from"() + inc $P10 + set rx569_pos, $P10 + ge rx569_pos, rx569_eos, rxscan570_done + rxscan570_scan: + set_addr $I10, rxscan570_loop + rx569_cur."!mark_push"(0, rx569_pos, $I10) + rxscan570_done: # rx charclass . - ge rx521_pos, rx521_eos, rx521_fail - inc rx521_pos + ge rx569_pos, rx569_eos, rx569_fail + inc rx569_pos # rx pass - rx521_cur."!cursor_pass"(rx521_pos, "") - if_null rx521_debug, debug_435 - rx521_cur."!cursor_debug"("PASS ", "", " at pos=", rx521_pos) - debug_435: - .return (rx521_cur) - rx521_restart: - if_null rx521_debug, debug_436 - rx521_cur."!cursor_debug"("NEXT ", "") - debug_436: - 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_437 - rx521_cur."!cursor_debug"("FAIL ", "") - debug_437: - .return (rx521_cur) + rx569_cur."!cursor_pass"(rx569_pos, "") + if_null rx569_debug, debug_476 + rx569_cur."!cursor_debug"("PASS", "", " at pos=", rx569_pos) + debug_476: + .return (rx569_cur) + rx569_restart: + if_null rx569_debug, debug_477 + rx569_cur."!cursor_debug"("NEXT", "") + debug_477: + rx569_fail: + (rx569_rep, rx569_pos, $I10, $P10) = rx569_cur."!mark_fail"(0) + lt rx569_pos, -1, rx569_done + eq rx569_pos, -1, rx569_fail + jump $I10 + rx569_done: + rx569_cur."!cursor_fail"() + if_null rx569_debug, debug_478 + rx569_cur."!cursor_debug"("FAIL", "") + debug_478: + .return (rx569_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "mod_internal" :subid("149_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .const 'Sub' $P536 = "151_1282016522.91354" - capture_lex $P536 - .local string rx528_tgt - .local int rx528_pos - .local int rx528_off - .local int rx528_eos - .local int rx528_rep - .local pmc rx528_cur - .local pmc rx528_debug - (rx528_cur, rx528_pos, rx528_tgt, $I10) = self."!cursor_start"() - rx528_cur."!cursor_caparray"("n") - getattribute rx528_debug, rx528_cur, "$!debug" - .lex unicode:"$\x{a2}", rx528_cur - .local pmc match - .lex "$/", match - length rx528_eos, rx528_tgt - gt rx528_pos, rx528_eos, rx528_done - set rx528_off, 0 - lt rx528_pos, 2, rx528_start - sub rx528_off, rx528_pos, 1 - substr rx528_tgt, rx528_tgt, rx528_off - rx528_start: - eq $I10, 1, rx528_restart - if_null rx528_debug, debug_444 - rx528_cur."!cursor_debug"("START ", "mod_internal") - debug_444: - $I10 = self.'from'() - ne $I10, -1, rxscan532_done - goto rxscan532_scan - rxscan532_loop: - ($P10) = rx528_cur."from"() - inc $P10 - set rx528_pos, $P10 - ge rx528_pos, rx528_eos, rxscan532_done - rxscan532_scan: - set_addr $I10, rxscan532_loop - rx528_cur."!mark_push"(0, rx528_pos, $I10) - rxscan532_done: - alt533_0: -.annotate 'line', 177 - set_addr $I10, alt533_1 - rx528_cur."!mark_push"(0, rx528_pos, $I10) -.annotate 'line', 178 +.sub "mod_internal" :subid("162_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .const 'Sub' $P584 = "164_1284728471.30547" + capture_lex $P584 + .local string rx576_tgt + .local int rx576_pos + .local int rx576_off + .local int rx576_eos + .local int rx576_rep + .local pmc rx576_cur + .local pmc rx576_debug + (rx576_cur, rx576_pos, rx576_tgt, $I10) = self."!cursor_start"() + rx576_cur."!cursor_caparray"("n") + getattribute rx576_debug, rx576_cur, "$!debug" + .lex unicode:"$\x{a2}", rx576_cur + .local pmc match + .lex "$/", match + length rx576_eos, rx576_tgt + gt rx576_pos, rx576_eos, rx576_done + set rx576_off, 0 + lt rx576_pos, 2, rx576_start + sub rx576_off, rx576_pos, 1 + substr rx576_tgt, rx576_tgt, rx576_off + rx576_start: + eq $I10, 1, rx576_restart + if_null rx576_debug, debug_485 + rx576_cur."!cursor_debug"("START", "mod_internal") + debug_485: + $I10 = self.'from'() + ne $I10, -1, rxscan580_done + goto rxscan580_scan + rxscan580_loop: + ($P10) = rx576_cur."from"() + inc $P10 + set rx576_pos, $P10 + ge rx576_pos, rx576_eos, rxscan580_done + rxscan580_scan: + set_addr $I10, rxscan580_loop + rx576_cur."!mark_push"(0, rx576_pos, $I10) + rxscan580_done: + alt581_0: +.annotate 'line', 191 + set_addr $I10, alt581_1 + rx576_cur."!mark_push"(0, rx576_pos, $I10) +.annotate 'line', 192 # rx literal ":" - add $I11, rx528_pos, 1 - gt $I11, rx528_eos, rx528_fail - sub $I11, rx528_pos, rx528_off - ord $I11, rx528_tgt, $I11 - ne $I11, 58, rx528_fail - add rx528_pos, 1 - # rx rxquantr534 ** 1..1 - set_addr $I10, rxquantr534_done - rx528_cur."!mark_push"(0, -1, $I10) - rxquantr534_loop: - # rx subrule $P536 subtype=capture negate= - rx528_cur."!cursor_pos"(rx528_pos) - .const 'Sub' $P536 = "151_1282016522.91354" - capture_lex $P536 - $P10 = rx528_cur.$P536() - unless $P10, rx528_fail - goto rxsubrule540_pass - rxsubrule540_back: + add $I11, rx576_pos, 1 + gt $I11, rx576_eos, rx576_fail + sub $I11, rx576_pos, rx576_off + ord $I11, rx576_tgt, $I11 + ne $I11, 58, rx576_fail + add rx576_pos, 1 + # rx rxquantr582 ** 1..1 + set_addr $I10, rxquantr582_done + rx576_cur."!mark_push"(0, -1, $I10) + rxquantr582_loop: + # rx subrule $P584 subtype=capture negate= + rx576_cur."!cursor_pos"(rx576_pos) + .const 'Sub' $P584 = "164_1284728471.30547" + capture_lex $P584 + $P10 = rx576_cur.$P584() + unless $P10, rx576_fail + goto rxsubrule588_pass + rxsubrule588_back: $P10 = $P10."!cursor_next"() - unless $P10, rx528_fail - rxsubrule540_pass: - set_addr $I10, rxsubrule540_back - rx528_cur."!mark_push"(0, rx528_pos, $I10, $P10) + unless $P10, rx576_fail + rxsubrule588_pass: + set_addr $I10, rxsubrule588_back + rx576_cur."!mark_push"(0, rx576_pos, $I10, $P10) $P10."!cursor_names"("n") - rx528_pos = $P10."pos"() - set_addr $I10, rxquantr534_done - (rx528_rep) = rx528_cur."!mark_commit"($I10) - rxquantr534_done: + rx576_pos = $P10."pos"() + set_addr $I10, rxquantr582_done + (rx576_rep) = rx576_cur."!mark_commit"($I10) + rxquantr582_done: # rx subrule "mod_ident" subtype=capture negate= - rx528_cur."!cursor_pos"(rx528_pos) - $P10 = rx528_cur."mod_ident"() - unless $P10, rx528_fail - rx528_cur."!mark_push"(0, -1, 0, $P10) + rx576_cur."!cursor_pos"(rx576_pos) + $P10 = rx576_cur."mod_ident"() + unless $P10, rx576_fail + rx576_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("mod_ident") - rx528_pos = $P10."pos"() + rx576_pos = $P10."pos"() # rxanchor rwb - le rx528_pos, 0, rx528_fail - sub $I10, rx528_pos, rx528_off - is_cclass $I11, 8192, rx528_tgt, $I10 - if $I11, rx528_fail + le rx576_pos, 0, rx576_fail + sub $I10, rx576_pos, rx576_off + is_cclass $I11, 8192, rx576_tgt, $I10 + if $I11, rx576_fail dec $I10 - is_cclass $I11, 8192, rx528_tgt, $I10 - unless $I11, rx528_fail - goto alt533_end - alt533_1: -.annotate 'line', 179 + is_cclass $I11, 8192, rx576_tgt, $I10 + unless $I11, rx576_fail + goto alt581_end + alt581_1: +.annotate 'line', 193 # rx literal ":" - add $I11, rx528_pos, 1 - gt $I11, rx528_eos, rx528_fail - sub $I11, rx528_pos, rx528_off - ord $I11, rx528_tgt, $I11 - ne $I11, 58, rx528_fail - add rx528_pos, 1 + add $I11, rx576_pos, 1 + gt $I11, rx576_eos, rx576_fail + sub $I11, rx576_pos, rx576_off + ord $I11, rx576_tgt, $I11 + ne $I11, 58, rx576_fail + add rx576_pos, 1 # rx subrule "mod_ident" subtype=capture negate= - rx528_cur."!cursor_pos"(rx528_pos) - $P10 = rx528_cur."mod_ident"() - unless $P10, rx528_fail - rx528_cur."!mark_push"(0, -1, 0, $P10) + rx576_cur."!cursor_pos"(rx576_pos) + $P10 = rx576_cur."mod_ident"() + unless $P10, rx576_fail + rx576_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("mod_ident") - rx528_pos = $P10."pos"() - # rx rxquantr541 ** 0..1 - set_addr $I10, rxquantr541_done - rx528_cur."!mark_push"(0, rx528_pos, $I10) - rxquantr541_loop: + rx576_pos = $P10."pos"() + # rx rxquantr589 ** 0..1 + set_addr $I10, rxquantr589_done + rx576_cur."!mark_push"(0, rx576_pos, $I10) + rxquantr589_loop: # rx literal "(" - add $I11, rx528_pos, 1 - gt $I11, rx528_eos, rx528_fail - sub $I11, rx528_pos, rx528_off - ord $I11, rx528_tgt, $I11 - ne $I11, 40, rx528_fail - add rx528_pos, 1 + add $I11, rx576_pos, 1 + gt $I11, rx576_eos, rx576_fail + sub $I11, rx576_pos, rx576_off + ord $I11, rx576_tgt, $I11 + ne $I11, 40, rx576_fail + add rx576_pos, 1 # rx subcapture "n" - set_addr $I10, rxcap_542_fail - rx528_cur."!mark_push"(0, rx528_pos, $I10) + set_addr $I10, rxcap_590_fail + rx576_cur."!mark_push"(0, rx576_pos, $I10) # rx charclass_q d r 1..-1 - sub $I10, rx528_pos, rx528_off - find_not_cclass $I11, 8, rx528_tgt, $I10, rx528_eos + sub $I10, rx576_pos, rx576_off + find_not_cclass $I11, 8, rx576_tgt, $I10, rx576_eos add $I12, $I10, 1 - lt $I11, $I12, rx528_fail - add rx528_pos, rx528_off, $I11 - set_addr $I10, rxcap_542_fail - ($I12, $I11) = rx528_cur."!mark_peek"($I10) - rx528_cur."!cursor_pos"($I11) - ($P10) = rx528_cur."!cursor_start"() - $P10."!cursor_pass"(rx528_pos, "") - rx528_cur."!mark_push"(0, -1, 0, $P10) + lt $I11, $I12, rx576_fail + add rx576_pos, rx576_off, $I11 + set_addr $I10, rxcap_590_fail + ($I12, $I11) = rx576_cur."!mark_peek"($I10) + rx576_cur."!cursor_pos"($I11) + ($P10) = rx576_cur."!cursor_start"() + $P10."!cursor_pass"(rx576_pos, "") + rx576_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("n") - goto rxcap_542_done - rxcap_542_fail: - goto rx528_fail - rxcap_542_done: + goto rxcap_590_done + rxcap_590_fail: + goto rx576_fail + rxcap_590_done: # rx literal ")" - add $I11, rx528_pos, 1 - gt $I11, rx528_eos, rx528_fail - sub $I11, rx528_pos, rx528_off - ord $I11, rx528_tgt, $I11 - ne $I11, 41, rx528_fail - add rx528_pos, 1 - set_addr $I10, rxquantr541_done - (rx528_rep) = rx528_cur."!mark_commit"($I10) - rxquantr541_done: - alt533_end: -.annotate 'line', 176 + add $I11, rx576_pos, 1 + gt $I11, rx576_eos, rx576_fail + sub $I11, rx576_pos, rx576_off + ord $I11, rx576_tgt, $I11 + ne $I11, 41, rx576_fail + add rx576_pos, 1 + set_addr $I10, rxquantr589_done + (rx576_rep) = rx576_cur."!mark_commit"($I10) + rxquantr589_done: + alt581_end: +.annotate 'line', 190 # rx pass - rx528_cur."!cursor_pass"(rx528_pos, "mod_internal") - if_null rx528_debug, debug_449 - rx528_cur."!cursor_debug"("PASS ", "mod_internal", " at pos=", rx528_pos) - debug_449: - .return (rx528_cur) - rx528_restart: -.annotate 'line', 3 - if_null rx528_debug, debug_450 - rx528_cur."!cursor_debug"("NEXT ", "mod_internal") - debug_450: - rx528_fail: - (rx528_rep, rx528_pos, $I10, $P10) = rx528_cur."!mark_fail"(0) - lt rx528_pos, -1, rx528_done - eq rx528_pos, -1, rx528_fail - jump $I10 - rx528_done: - rx528_cur."!cursor_fail"() - if_null rx528_debug, debug_451 - rx528_cur."!cursor_debug"("FAIL ", "mod_internal") - debug_451: - .return (rx528_cur) + rx576_cur."!cursor_pass"(rx576_pos, "mod_internal") + if_null rx576_debug, debug_490 + rx576_cur."!cursor_debug"("PASS", "mod_internal", " at pos=", rx576_pos) + debug_490: + .return (rx576_cur) + rx576_restart: +.annotate 'line', 3 + if_null rx576_debug, debug_491 + rx576_cur."!cursor_debug"("NEXT", "mod_internal") + debug_491: + rx576_fail: + (rx576_rep, rx576_pos, $I10, $P10) = rx576_cur."!mark_fail"(0) + lt rx576_pos, -1, rx576_done + eq rx576_pos, -1, rx576_fail + jump $I10 + rx576_done: + rx576_cur."!cursor_fail"() + if_null rx576_debug, debug_492 + rx576_cur."!cursor_debug"("FAIL", "mod_internal") + debug_492: + .return (rx576_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__mod_internal" :subid("150_1282016522.91354") :method -.annotate 'line', 3 - $P530 = self."!PREFIX__!subrule"("mod_ident", ":") - new $P531, "ResizablePMCArray" - push $P531, $P530 - push $P531, ":" - .return ($P531) -.end - - -.namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block535" :anon :subid("151_1282016522.91354") :method :outer("149_1282016522.91354") -.annotate 'line', 178 - .local string rx537_tgt - .local int rx537_pos - .local int rx537_off - .local int rx537_eos - .local int rx537_rep - .local pmc rx537_cur - .local pmc rx537_debug - (rx537_cur, rx537_pos, rx537_tgt, $I10) = self."!cursor_start"() - getattribute rx537_debug, rx537_cur, "$!debug" - .lex unicode:"$\x{a2}", rx537_cur - .local pmc match - .lex "$/", match - length rx537_eos, rx537_tgt - gt rx537_pos, rx537_eos, rx537_done - set rx537_off, 0 - lt rx537_pos, 2, rx537_start - sub rx537_off, rx537_pos, 1 - substr rx537_tgt, rx537_tgt, rx537_off - rx537_start: - eq $I10, 1, rx537_restart - if_null rx537_debug, debug_445 - rx537_cur."!cursor_debug"("START ", "") - debug_445: - $I10 = self.'from'() - 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, rxscan538_done - rxscan538_scan: - set_addr $I10, rxscan538_loop - rx537_cur."!mark_push"(0, rx537_pos, $I10) - rxscan538_done: - alt539_0: - set_addr $I10, alt539_1 - rx537_cur."!mark_push"(0, rx537_pos, $I10) +.sub "!PREFIX__mod_internal" :subid("163_1284728471.30547") :method +.annotate 'line', 3 + $P578 = self."!PREFIX__!subrule"("mod_ident", ":") + new $P579, "ResizablePMCArray" + push $P579, $P578 + push $P579, ":" + .return ($P579) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "_block583" :anon :subid("164_1284728471.30547") :method :outer("162_1284728471.30547") +.annotate 'line', 192 + .local string rx585_tgt + .local int rx585_pos + .local int rx585_off + .local int rx585_eos + .local int rx585_rep + .local pmc rx585_cur + .local pmc rx585_debug + (rx585_cur, rx585_pos, rx585_tgt, $I10) = self."!cursor_start"() + getattribute rx585_debug, rx585_cur, "$!debug" + .lex unicode:"$\x{a2}", rx585_cur + .local pmc match + .lex "$/", match + length rx585_eos, rx585_tgt + gt rx585_pos, rx585_eos, rx585_done + set rx585_off, 0 + lt rx585_pos, 2, rx585_start + sub rx585_off, rx585_pos, 1 + substr rx585_tgt, rx585_tgt, rx585_off + rx585_start: + eq $I10, 1, rx585_restart + if_null rx585_debug, debug_486 + rx585_cur."!cursor_debug"("START", "") + debug_486: + $I10 = self.'from'() + ne $I10, -1, rxscan586_done + goto rxscan586_scan + rxscan586_loop: + ($P10) = rx585_cur."from"() + inc $P10 + set rx585_pos, $P10 + ge rx585_pos, rx585_eos, rxscan586_done + rxscan586_scan: + set_addr $I10, rxscan586_loop + rx585_cur."!mark_push"(0, rx585_pos, $I10) + rxscan586_done: + alt587_0: + set_addr $I10, alt587_1 + rx585_cur."!mark_push"(0, rx585_pos, $I10) # 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, 33, rx537_fail - add rx537_pos, 1 - goto alt539_end - alt539_1: + add $I11, rx585_pos, 1 + gt $I11, rx585_eos, rx585_fail + sub $I11, rx585_pos, rx585_off + ord $I11, rx585_tgt, $I11 + ne $I11, 33, rx585_fail + add rx585_pos, 1 + goto alt587_end + alt587_1: # rx charclass_q d r 1..-1 - sub $I10, rx537_pos, rx537_off - find_not_cclass $I11, 8, rx537_tgt, $I10, rx537_eos + sub $I10, rx585_pos, rx585_off + find_not_cclass $I11, 8, rx585_tgt, $I10, rx585_eos add $I12, $I10, 1 - lt $I11, $I12, rx537_fail - add rx537_pos, rx537_off, $I11 - alt539_end: - # rx pass - 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: - 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 - eq rx537_pos, -1, rx537_fail - jump $I10 - rx537_done: - rx537_cur."!cursor_fail"() - if_null rx537_debug, debug_448 - rx537_cur."!cursor_debug"("FAIL ", "") - debug_448: - .return (rx537_cur) + lt $I11, $I12, rx585_fail + add rx585_pos, rx585_off, $I11 + alt587_end: + # rx pass + rx585_cur."!cursor_pass"(rx585_pos, "") + if_null rx585_debug, debug_487 + rx585_cur."!cursor_debug"("PASS", "", " at pos=", rx585_pos) + debug_487: + .return (rx585_cur) + rx585_restart: + if_null rx585_debug, debug_488 + rx585_cur."!cursor_debug"("NEXT", "") + debug_488: + rx585_fail: + (rx585_rep, rx585_pos, $I10, $P10) = rx585_cur."!mark_fail"(0) + lt rx585_pos, -1, rx585_done + eq rx585_pos, -1, rx585_fail + jump $I10 + rx585_done: + rx585_cur."!cursor_fail"() + if_null rx585_debug, debug_489 + rx585_cur."!cursor_debug"("FAIL", "") + debug_489: + .return (rx585_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "mod_ident" :subid("152_1282016522.91354") :method -.annotate 'line', 183 - $P544 = self."!protoregex"("mod_ident") - .return ($P544) -.end - - -.namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__mod_ident" :subid("153_1282016522.91354") :method -.annotate 'line', 183 - $P546 = self."!PREFIX__!protoregex"("mod_ident") - .return ($P546) -.end - - -.namespace ["Regex";"P6Regex";"Grammar"] -.sub "mod_ident:sym" :subid("154_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .local string rx548_tgt - .local int rx548_pos - .local int rx548_off - .local int rx548_eos - .local int rx548_rep - .local pmc rx548_cur - .local pmc rx548_debug - (rx548_cur, rx548_pos, rx548_tgt, $I10) = self."!cursor_start"() - getattribute rx548_debug, rx548_cur, "$!debug" - .lex unicode:"$\x{a2}", rx548_cur - .local pmc match - .lex "$/", match - length rx548_eos, rx548_tgt - gt rx548_pos, rx548_eos, rx548_done - set rx548_off, 0 - lt rx548_pos, 2, rx548_start - sub rx548_off, rx548_pos, 1 - substr rx548_tgt, rx548_tgt, rx548_off - rx548_start: - eq $I10, 1, rx548_restart - if_null rx548_debug, debug_452 - rx548_cur."!cursor_debug"("START ", "mod_ident:sym") - debug_452: - $I10 = self.'from'() - ne $I10, -1, rxscan551_done - goto rxscan551_scan - rxscan551_loop: - ($P10) = rx548_cur."from"() - inc $P10 - set rx548_pos, $P10 - ge rx548_pos, rx548_eos, rxscan551_done - rxscan551_scan: - set_addr $I10, rxscan551_loop - rx548_cur."!mark_push"(0, rx548_pos, $I10) - rxscan551_done: -.annotate 'line', 184 +.sub "mod_ident" :subid("165_1284728471.30547") :method +.annotate 'line', 197 + $P592 = self."!protoregex"("mod_ident") + .return ($P592) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "!PREFIX__mod_ident" :subid("166_1284728471.30547") :method +.annotate 'line', 197 + $P594 = self."!PREFIX__!protoregex"("mod_ident") + .return ($P594) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "mod_ident:sym" :subid("167_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx596_tgt + .local int rx596_pos + .local int rx596_off + .local int rx596_eos + .local int rx596_rep + .local pmc rx596_cur + .local pmc rx596_debug + (rx596_cur, rx596_pos, rx596_tgt, $I10) = self."!cursor_start"() + getattribute rx596_debug, rx596_cur, "$!debug" + .lex unicode:"$\x{a2}", rx596_cur + .local pmc match + .lex "$/", match + length rx596_eos, rx596_tgt + gt rx596_pos, rx596_eos, rx596_done + set rx596_off, 0 + lt rx596_pos, 2, rx596_start + sub rx596_off, rx596_pos, 1 + substr rx596_tgt, rx596_tgt, rx596_off + rx596_start: + eq $I10, 1, rx596_restart + if_null rx596_debug, debug_493 + rx596_cur."!cursor_debug"("START", "mod_ident:sym") + debug_493: + $I10 = self.'from'() + ne $I10, -1, rxscan599_done + goto rxscan599_scan + rxscan599_loop: + ($P10) = rx596_cur."from"() + inc $P10 + set rx596_pos, $P10 + ge rx596_pos, rx596_eos, rxscan599_done + rxscan599_scan: + set_addr $I10, rxscan599_loop + rx596_cur."!mark_push"(0, rx596_pos, $I10) + rxscan599_done: +.annotate 'line', 198 # rx subcapture "sym" - set_addr $I10, rxcap_552_fail - rx548_cur."!mark_push"(0, rx548_pos, $I10) + set_addr $I10, rxcap_600_fail + rx596_cur."!mark_push"(0, rx596_pos, $I10) # rx literal "i" - add $I11, rx548_pos, 1 - gt $I11, rx548_eos, rx548_fail - sub $I11, rx548_pos, rx548_off - ord $I11, rx548_tgt, $I11 - ne $I11, 105, rx548_fail - add rx548_pos, 1 - set_addr $I10, rxcap_552_fail - ($I12, $I11) = rx548_cur."!mark_peek"($I10) - rx548_cur."!cursor_pos"($I11) - ($P10) = rx548_cur."!cursor_start"() - $P10."!cursor_pass"(rx548_pos, "") - rx548_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx596_pos, 1 + gt $I11, rx596_eos, rx596_fail + sub $I11, rx596_pos, rx596_off + ord $I11, rx596_tgt, $I11 + ne $I11, 105, rx596_fail + add rx596_pos, 1 + set_addr $I10, rxcap_600_fail + ($I12, $I11) = rx596_cur."!mark_peek"($I10) + rx596_cur."!cursor_pos"($I11) + ($P10) = rx596_cur."!cursor_start"() + $P10."!cursor_pass"(rx596_pos, "") + rx596_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_552_done - rxcap_552_fail: - goto rx548_fail - rxcap_552_done: - # rx rxquantr553 ** 0..1 - set_addr $I10, rxquantr553_done - rx548_cur."!mark_push"(0, rx548_pos, $I10) - rxquantr553_loop: + goto rxcap_600_done + rxcap_600_fail: + goto rx596_fail + rxcap_600_done: + # rx rxquantr601 ** 0..1 + set_addr $I10, rxquantr601_done + rx596_cur."!mark_push"(0, rx596_pos, $I10) + rxquantr601_loop: # rx literal "gnorecase" - add $I11, rx548_pos, 9 - gt $I11, rx548_eos, rx548_fail - sub $I11, rx548_pos, rx548_off - substr $S10, rx548_tgt, $I11, 9 - ne $S10, "gnorecase", rx548_fail - add rx548_pos, 9 - set_addr $I10, rxquantr553_done - (rx548_rep) = rx548_cur."!mark_commit"($I10) - rxquantr553_done: - # rx pass - rx548_cur."!cursor_pass"(rx548_pos, "mod_ident:sym") - if_null rx548_debug, debug_453 - rx548_cur."!cursor_debug"("PASS ", "mod_ident:sym", " at pos=", rx548_pos) - debug_453: - .return (rx548_cur) - rx548_restart: -.annotate 'line', 3 - if_null rx548_debug, debug_454 - rx548_cur."!cursor_debug"("NEXT ", "mod_ident:sym") - debug_454: - rx548_fail: - (rx548_rep, rx548_pos, $I10, $P10) = rx548_cur."!mark_fail"(0) - lt rx548_pos, -1, rx548_done - eq rx548_pos, -1, rx548_fail - jump $I10 - rx548_done: - rx548_cur."!cursor_fail"() - if_null rx548_debug, debug_455 - rx548_cur."!cursor_debug"("FAIL ", "mod_ident:sym") - debug_455: - .return (rx548_cur) + add $I11, rx596_pos, 9 + gt $I11, rx596_eos, rx596_fail + sub $I11, rx596_pos, rx596_off + substr $S10, rx596_tgt, $I11, 9 + ne $S10, "gnorecase", rx596_fail + add rx596_pos, 9 + set_addr $I10, rxquantr601_done + (rx596_rep) = rx596_cur."!mark_commit"($I10) + rxquantr601_done: + # rx pass + rx596_cur."!cursor_pass"(rx596_pos, "mod_ident:sym") + if_null rx596_debug, debug_494 + rx596_cur."!cursor_debug"("PASS", "mod_ident:sym", " at pos=", rx596_pos) + debug_494: + .return (rx596_cur) + rx596_restart: +.annotate 'line', 3 + if_null rx596_debug, debug_495 + rx596_cur."!cursor_debug"("NEXT", "mod_ident:sym") + debug_495: + rx596_fail: + (rx596_rep, rx596_pos, $I10, $P10) = rx596_cur."!mark_fail"(0) + lt rx596_pos, -1, rx596_done + eq rx596_pos, -1, rx596_fail + jump $I10 + rx596_done: + rx596_cur."!cursor_fail"() + if_null rx596_debug, debug_496 + rx596_cur."!cursor_debug"("FAIL", "mod_ident:sym") + debug_496: + .return (rx596_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__mod_ident:sym" :subid("155_1282016522.91354") :method -.annotate 'line', 3 - new $P550, "ResizablePMCArray" - push $P550, "i" - .return ($P550) -.end - - -.namespace ["Regex";"P6Regex";"Grammar"] -.sub "mod_ident:sym" :subid("156_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .local string rx555_tgt - .local int rx555_pos - .local int rx555_off - .local int rx555_eos - .local int rx555_rep - .local pmc rx555_cur - .local pmc rx555_debug - (rx555_cur, rx555_pos, rx555_tgt, $I10) = self."!cursor_start"() - getattribute rx555_debug, rx555_cur, "$!debug" - .lex unicode:"$\x{a2}", rx555_cur - .local pmc match - .lex "$/", match - length rx555_eos, rx555_tgt - gt rx555_pos, rx555_eos, rx555_done - set rx555_off, 0 - lt rx555_pos, 2, rx555_start - sub rx555_off, rx555_pos, 1 - substr rx555_tgt, rx555_tgt, rx555_off - rx555_start: - eq $I10, 1, rx555_restart - if_null rx555_debug, debug_456 - rx555_cur."!cursor_debug"("START ", "mod_ident:sym") - debug_456: - $I10 = self.'from'() - ne $I10, -1, rxscan558_done - goto rxscan558_scan - rxscan558_loop: - ($P10) = rx555_cur."from"() - inc $P10 - set rx555_pos, $P10 - ge rx555_pos, rx555_eos, rxscan558_done - rxscan558_scan: - set_addr $I10, rxscan558_loop - rx555_cur."!mark_push"(0, rx555_pos, $I10) - rxscan558_done: -.annotate 'line', 185 +.sub "!PREFIX__mod_ident:sym" :subid("168_1284728471.30547") :method +.annotate 'line', 3 + new $P598, "ResizablePMCArray" + push $P598, "i" + .return ($P598) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "mod_ident:sym" :subid("169_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx603_tgt + .local int rx603_pos + .local int rx603_off + .local int rx603_eos + .local int rx603_rep + .local pmc rx603_cur + .local pmc rx603_debug + (rx603_cur, rx603_pos, rx603_tgt, $I10) = self."!cursor_start"() + getattribute rx603_debug, rx603_cur, "$!debug" + .lex unicode:"$\x{a2}", rx603_cur + .local pmc match + .lex "$/", match + length rx603_eos, rx603_tgt + gt rx603_pos, rx603_eos, rx603_done + set rx603_off, 0 + lt rx603_pos, 2, rx603_start + sub rx603_off, rx603_pos, 1 + substr rx603_tgt, rx603_tgt, rx603_off + rx603_start: + eq $I10, 1, rx603_restart + if_null rx603_debug, debug_497 + rx603_cur."!cursor_debug"("START", "mod_ident:sym") + debug_497: + $I10 = self.'from'() + ne $I10, -1, rxscan606_done + goto rxscan606_scan + rxscan606_loop: + ($P10) = rx603_cur."from"() + inc $P10 + set rx603_pos, $P10 + ge rx603_pos, rx603_eos, rxscan606_done + rxscan606_scan: + set_addr $I10, rxscan606_loop + rx603_cur."!mark_push"(0, rx603_pos, $I10) + rxscan606_done: +.annotate 'line', 199 # rx subcapture "sym" - set_addr $I10, rxcap_559_fail - rx555_cur."!mark_push"(0, rx555_pos, $I10) + set_addr $I10, rxcap_607_fail + rx603_cur."!mark_push"(0, rx603_pos, $I10) # rx literal "r" - add $I11, rx555_pos, 1 - gt $I11, rx555_eos, rx555_fail - sub $I11, rx555_pos, rx555_off - ord $I11, rx555_tgt, $I11 - ne $I11, 114, rx555_fail - add rx555_pos, 1 - set_addr $I10, rxcap_559_fail - ($I12, $I11) = rx555_cur."!mark_peek"($I10) - rx555_cur."!cursor_pos"($I11) - ($P10) = rx555_cur."!cursor_start"() - $P10."!cursor_pass"(rx555_pos, "") - rx555_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx603_pos, 1 + gt $I11, rx603_eos, rx603_fail + sub $I11, rx603_pos, rx603_off + ord $I11, rx603_tgt, $I11 + ne $I11, 114, rx603_fail + add rx603_pos, 1 + set_addr $I10, rxcap_607_fail + ($I12, $I11) = rx603_cur."!mark_peek"($I10) + rx603_cur."!cursor_pos"($I11) + ($P10) = rx603_cur."!cursor_start"() + $P10."!cursor_pass"(rx603_pos, "") + rx603_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_559_done - rxcap_559_fail: - goto rx555_fail - rxcap_559_done: - # rx rxquantr560 ** 0..1 - set_addr $I10, rxquantr560_done - rx555_cur."!mark_push"(0, rx555_pos, $I10) - rxquantr560_loop: + goto rxcap_607_done + rxcap_607_fail: + goto rx603_fail + rxcap_607_done: + # rx rxquantr608 ** 0..1 + set_addr $I10, rxquantr608_done + rx603_cur."!mark_push"(0, rx603_pos, $I10) + rxquantr608_loop: # rx literal "atchet" - add $I11, rx555_pos, 6 - gt $I11, rx555_eos, rx555_fail - sub $I11, rx555_pos, rx555_off - substr $S10, rx555_tgt, $I11, 6 - ne $S10, "atchet", rx555_fail - add rx555_pos, 6 - set_addr $I10, rxquantr560_done - (rx555_rep) = rx555_cur."!mark_commit"($I10) - rxquantr560_done: - # rx pass - rx555_cur."!cursor_pass"(rx555_pos, "mod_ident:sym") - if_null rx555_debug, debug_457 - rx555_cur."!cursor_debug"("PASS ", "mod_ident:sym", " at pos=", rx555_pos) - debug_457: - .return (rx555_cur) - rx555_restart: -.annotate 'line', 3 - if_null rx555_debug, debug_458 - rx555_cur."!cursor_debug"("NEXT ", "mod_ident:sym") - debug_458: - rx555_fail: - (rx555_rep, rx555_pos, $I10, $P10) = rx555_cur."!mark_fail"(0) - lt rx555_pos, -1, rx555_done - eq rx555_pos, -1, rx555_fail - jump $I10 - rx555_done: - rx555_cur."!cursor_fail"() - if_null rx555_debug, debug_459 - rx555_cur."!cursor_debug"("FAIL ", "mod_ident:sym") - debug_459: - .return (rx555_cur) + add $I11, rx603_pos, 6 + gt $I11, rx603_eos, rx603_fail + sub $I11, rx603_pos, rx603_off + substr $S10, rx603_tgt, $I11, 6 + ne $S10, "atchet", rx603_fail + add rx603_pos, 6 + set_addr $I10, rxquantr608_done + (rx603_rep) = rx603_cur."!mark_commit"($I10) + rxquantr608_done: + # rx pass + rx603_cur."!cursor_pass"(rx603_pos, "mod_ident:sym") + if_null rx603_debug, debug_498 + rx603_cur."!cursor_debug"("PASS", "mod_ident:sym", " at pos=", rx603_pos) + debug_498: + .return (rx603_cur) + rx603_restart: +.annotate 'line', 3 + if_null rx603_debug, debug_499 + rx603_cur."!cursor_debug"("NEXT", "mod_ident:sym") + debug_499: + rx603_fail: + (rx603_rep, rx603_pos, $I10, $P10) = rx603_cur."!mark_fail"(0) + lt rx603_pos, -1, rx603_done + eq rx603_pos, -1, rx603_fail + jump $I10 + rx603_done: + rx603_cur."!cursor_fail"() + if_null rx603_debug, debug_500 + rx603_cur."!cursor_debug"("FAIL", "mod_ident:sym") + debug_500: + .return (rx603_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__mod_ident:sym" :subid("157_1282016522.91354") :method -.annotate 'line', 3 - new $P557, "ResizablePMCArray" - push $P557, "r" - .return ($P557) -.end - - -.namespace ["Regex";"P6Regex";"Grammar"] -.sub "mod_ident:sym" :subid("158_1282016522.91354") :method :outer("11_1282016522.91354") -.annotate 'line', 3 - .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_460 - rx562_cur."!cursor_debug"("START ", "mod_ident:sym") - debug_460: - $I10 = self.'from'() - ne $I10, -1, rxscan565_done - goto rxscan565_scan - rxscan565_loop: - ($P10) = rx562_cur."from"() - inc $P10 - set rx562_pos, $P10 - ge rx562_pos, rx562_eos, rxscan565_done - rxscan565_scan: - set_addr $I10, rxscan565_loop - rx562_cur."!mark_push"(0, rx562_pos, $I10) - rxscan565_done: -.annotate 'line', 186 +.sub "!PREFIX__mod_ident:sym" :subid("170_1284728471.30547") :method +.annotate 'line', 3 + new $P605, "ResizablePMCArray" + push $P605, "r" + .return ($P605) +.end + + +.namespace ["Regex";"P6Regex";"Grammar"] +.sub "mod_ident:sym" :subid("171_1284728471.30547") :method :outer("11_1284728471.30547") +.annotate 'line', 3 + .local string rx610_tgt + .local int rx610_pos + .local int rx610_off + .local int rx610_eos + .local int rx610_rep + .local pmc rx610_cur + .local pmc rx610_debug + (rx610_cur, rx610_pos, rx610_tgt, $I10) = self."!cursor_start"() + getattribute rx610_debug, rx610_cur, "$!debug" + .lex unicode:"$\x{a2}", rx610_cur + .local pmc match + .lex "$/", match + length rx610_eos, rx610_tgt + gt rx610_pos, rx610_eos, rx610_done + set rx610_off, 0 + lt rx610_pos, 2, rx610_start + sub rx610_off, rx610_pos, 1 + substr rx610_tgt, rx610_tgt, rx610_off + rx610_start: + eq $I10, 1, rx610_restart + if_null rx610_debug, debug_501 + rx610_cur."!cursor_debug"("START", "mod_ident:sym") + debug_501: + $I10 = self.'from'() + ne $I10, -1, rxscan613_done + goto rxscan613_scan + rxscan613_loop: + ($P10) = rx610_cur."from"() + inc $P10 + set rx610_pos, $P10 + ge rx610_pos, rx610_eos, rxscan613_done + rxscan613_scan: + set_addr $I10, rxscan613_loop + rx610_cur."!mark_push"(0, rx610_pos, $I10) + rxscan613_done: +.annotate 'line', 200 # rx subcapture "sym" - set_addr $I10, rxcap_566_fail - rx562_cur."!mark_push"(0, rx562_pos, $I10) + set_addr $I10, rxcap_614_fail + rx610_cur."!mark_push"(0, rx610_pos, $I10) # rx literal "s" - add $I11, rx562_pos, 1 - gt $I11, rx562_eos, rx562_fail - sub $I11, rx562_pos, rx562_off - ord $I11, rx562_tgt, $I11 - ne $I11, 115, rx562_fail - add rx562_pos, 1 - set_addr $I10, rxcap_566_fail - ($I12, $I11) = rx562_cur."!mark_peek"($I10) - rx562_cur."!cursor_pos"($I11) - ($P10) = rx562_cur."!cursor_start"() - $P10."!cursor_pass"(rx562_pos, "") - rx562_cur."!mark_push"(0, -1, 0, $P10) + add $I11, rx610_pos, 1 + gt $I11, rx610_eos, rx610_fail + sub $I11, rx610_pos, rx610_off + ord $I11, rx610_tgt, $I11 + ne $I11, 115, rx610_fail + add rx610_pos, 1 + set_addr $I10, rxcap_614_fail + ($I12, $I11) = rx610_cur."!mark_peek"($I10) + rx610_cur."!cursor_pos"($I11) + ($P10) = rx610_cur."!cursor_start"() + $P10."!cursor_pass"(rx610_pos, "") + rx610_cur."!mark_push"(0, -1, 0, $P10) $P10."!cursor_names"("sym") - goto rxcap_566_done - rxcap_566_fail: - goto rx562_fail - rxcap_566_done: - # rx rxquantr567 ** 0..1 - set_addr $I10, rxquantr567_done - rx562_cur."!mark_push"(0, rx562_pos, $I10) - rxquantr567_loop: + goto rxcap_614_done + rxcap_614_fail: + goto rx610_fail + rxcap_614_done: + # rx rxquantr615 ** 0..1 + set_addr $I10, rxquantr615_done + rx610_cur."!mark_push"(0, rx610_pos, $I10) + rxquantr615_loop: # rx literal "igspace" - add $I11, rx562_pos, 7 - gt $I11, rx562_eos, rx562_fail - sub $I11, rx562_pos, rx562_off - substr $S10, rx562_tgt, $I11, 7 - ne $S10, "igspace", rx562_fail - add rx562_pos, 7 - set_addr $I10, rxquantr567_done - (rx562_rep) = rx562_cur."!mark_commit"($I10) - rxquantr567_done: - # rx pass - rx562_cur."!cursor_pass"(rx562_pos, "mod_ident:sym") - if_null rx562_debug, debug_461 - rx562_cur."!cursor_debug"("PASS ", "mod_ident:sym", " at pos=", rx562_pos) - debug_461: - .return (rx562_cur) - rx562_restart: + add $I11, rx610_pos, 7 + gt $I11, rx610_eos, rx610_fail + sub $I11, rx610_pos, rx610_off + substr $S10, rx610_tgt, $I11, 7 + ne $S10, "igspace", rx610_fail + add rx610_pos, 7 + set_addr $I10, rxquantr615_done + (rx610_rep) = rx610_cur."!mark_commit"($I10) + rxquantr615_done: + # rx pass + rx610_cur."!cursor_pass"(rx610_pos, "mod_ident:sym") + if_null rx610_debug, debug_502 + rx610_cur."!cursor_debug"("PASS", "mod_ident:sym", " at pos=", rx610_pos) + debug_502: + .return (rx610_cur) + rx610_restart: .annotate 'line', 3 - if_null rx562_debug, debug_462 - rx562_cur."!cursor_debug"("NEXT ", "mod_ident:sym") - debug_462: - 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_463 - rx562_cur."!cursor_debug"("FAIL ", "mod_ident:sym") - debug_463: - .return (rx562_cur) + if_null rx610_debug, debug_503 + rx610_cur."!cursor_debug"("NEXT", "mod_ident:sym") + debug_503: + rx610_fail: + (rx610_rep, rx610_pos, $I10, $P10) = rx610_cur."!mark_fail"(0) + lt rx610_pos, -1, rx610_done + eq rx610_pos, -1, rx610_fail + jump $I10 + rx610_done: + rx610_cur."!cursor_fail"() + if_null rx610_debug, debug_504 + rx610_cur."!cursor_debug"("FAIL", "mod_ident:sym") + debug_504: + .return (rx610_cur) .return () .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "!PREFIX__mod_ident:sym" :subid("159_1282016522.91354") :method +.sub "!PREFIX__mod_ident:sym" :subid("172_1284728471.30547") :method .annotate 'line', 3 - new $P564, "ResizablePMCArray" - push $P564, "s" - .return ($P564) + new $P612, "ResizablePMCArray" + push $P612, "s" + .return ($P612) .end .namespace ["Regex";"P6Regex";"Grammar"] -.sub "_block568" :load :anon :subid("160_1282016522.91354") +.sub "_block616" :load :anon :subid("173_1284728471.30547") .annotate 'line', 3 - .const 'Sub' $P570 = "11_1282016522.91354" - $P571 = $P570() - .return ($P571) + .const 'Sub' $P618 = "11_1284728471.30547" + $P619 = $P618() + .return ($P619) .end .namespace [] -.sub "_block573" :load :anon :subid("161_1282016522.91354") +.sub "_block621" :load :anon :subid("174_1284728471.30547") .annotate 'line', 1 - .const 'Sub' $P575 = "10_1282016522.91354" - $P576 = $P575() - .return ($P576) + .const 'Sub' $P623 = "10_1284728471.30547" + $P624 = $P623() + .return ($P624) .end ### .include 'gen/p6regex-actions.pir' .namespace [] -.sub "_block11" :anon :subid("10_1282016526.02169") +.sub "_block11" :anon :subid("10_1284728474.62745") .annotate 'line', 0 get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13" capture_lex $P14 @@ -8439,153 +9119,155 @@ .annotate 'line', 4 get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13" capture_lex $P14 - $P1634 = $P14() + $P1671 = $P14() .annotate 'line', 1 - .return ($P1634) - .const 'Sub' $P1636 = "92_1282016526.02169" - .return ($P1636) + .return ($P1671) + .const 'Sub' $P1673 = "94_1284728474.62745" + .return ($P1673) .end .namespace [] -.sub "" :load :init :subid("post93") :outer("10_1282016526.02169") +.sub "" :load :init :subid("post95") :outer("10_1284728474.62745") .annotate 'line', 0 - .const 'Sub' $P12 = "10_1282016526.02169" + .const 'Sub' $P12 = "10_1284728474.62745" .local pmc block set block, $P12 - $P1639 = get_root_global ["parrot"], "P6metaclass" - $P1639."new_class"("Regex::P6Regex::Actions", "HLL::Actions" :named("parent")) + $P1676 = get_root_global ["parrot"], "P6metaclass" + $P1676."new_class"("Regex::P6Regex::Actions", "HLL::Actions" :named("parent")) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block13" :subid("11_1282016526.02169") :outer("10_1282016526.02169") +.sub "_block13" :subid("11_1284728474.62745") :outer("10_1284728474.62745") .annotate 'line', 4 - .const 'Sub' $P1611 = "90_1282016526.02169" - capture_lex $P1611 - .const 'Sub' $P1591 = "89_1282016526.02169" - capture_lex $P1591 - .const 'Sub' $P1559 = "88_1282016526.02169" - capture_lex $P1559 - .const 'Sub' $P1490 = "84_1282016526.02169" - capture_lex $P1490 - .const 'Sub' $P1422 = "82_1282016526.02169" - capture_lex $P1422 - .const 'Sub' $P1350 = "79_1282016526.02169" - capture_lex $P1350 - .const 'Sub' $P1336 = "78_1282016526.02169" - capture_lex $P1336 - .const 'Sub' $P1312 = "77_1282016526.02169" - capture_lex $P1312 - .const 'Sub' $P1294 = "76_1282016526.02169" - capture_lex $P1294 - .const 'Sub' $P1280 = "75_1282016526.02169" - capture_lex $P1280 - .const 'Sub' $P1267 = "74_1282016526.02169" - capture_lex $P1267 - .const 'Sub' $P1236 = "73_1282016526.02169" - capture_lex $P1236 - .const 'Sub' $P1205 = "72_1282016526.02169" - capture_lex $P1205 - .const 'Sub' $P1189 = "71_1282016526.02169" - capture_lex $P1189 - .const 'Sub' $P1173 = "70_1282016526.02169" - capture_lex $P1173 - .const 'Sub' $P1157 = "69_1282016526.02169" - capture_lex $P1157 - .const 'Sub' $P1141 = "68_1282016526.02169" - capture_lex $P1141 - .const 'Sub' $P1125 = "67_1282016526.02169" - capture_lex $P1125 - .const 'Sub' $P1109 = "66_1282016526.02169" - capture_lex $P1109 - .const 'Sub' $P1093 = "65_1282016526.02169" - capture_lex $P1093 - .const 'Sub' $P1069 = "64_1282016526.02169" - capture_lex $P1069 - .const 'Sub' $P1054 = "63_1282016526.02169" - capture_lex $P1054 - .const 'Sub' $P996 = "62_1282016526.02169" - capture_lex $P996 - .const 'Sub' $P975 = "61_1282016526.02169" - capture_lex $P975 - .const 'Sub' $P953 = "60_1282016526.02169" - capture_lex $P953 - .const 'Sub' $P943 = "59_1282016526.02169" - capture_lex $P943 - .const 'Sub' $P933 = "58_1282016526.02169" - capture_lex $P933 - .const 'Sub' $P923 = "57_1282016526.02169" - capture_lex $P923 - .const 'Sub' $P911 = "56_1282016526.02169" - capture_lex $P911 - .const 'Sub' $P899 = "55_1282016526.02169" - capture_lex $P899 - .const 'Sub' $P887 = "54_1282016526.02169" - capture_lex $P887 - .const 'Sub' $P875 = "53_1282016526.02169" - capture_lex $P875 - .const 'Sub' $P863 = "52_1282016526.02169" - capture_lex $P863 - .const 'Sub' $P851 = "51_1282016526.02169" - capture_lex $P851 - .const 'Sub' $P839 = "50_1282016526.02169" - capture_lex $P839 - .const 'Sub' $P827 = "49_1282016526.02169" - capture_lex $P827 - .const 'Sub' $P799 = "48_1282016526.02169" - capture_lex $P799 - .const 'Sub' $P771 = "47_1282016526.02169" - capture_lex $P771 - .const 'Sub' $P753 = "46_1282016526.02169" - capture_lex $P753 - .const 'Sub' $P743 = "45_1282016526.02169" - capture_lex $P743 - .const 'Sub' $P725 = "44_1282016526.02169" - capture_lex $P725 - .const 'Sub' $P652 = "42_1282016526.02169" - capture_lex $P652 - .const 'Sub' $P635 = "41_1282016526.02169" - capture_lex $P635 - .const 'Sub' $P620 = "40_1282016526.02169" - capture_lex $P620 - .const 'Sub' $P605 = "39_1282016526.02169" - capture_lex $P605 - .const 'Sub' $P579 = "38_1282016526.02169" - capture_lex $P579 - .const 'Sub' $P528 = "36_1282016526.02169" - capture_lex $P528 - .const 'Sub' $P460 = "34_1282016526.02169" + .const 'Sub' $P1648 = "92_1284728474.62745" + capture_lex $P1648 + .const 'Sub' $P1628 = "91_1284728474.62745" + capture_lex $P1628 + .const 'Sub' $P1596 = "90_1284728474.62745" + capture_lex $P1596 + .const 'Sub' $P1527 = "86_1284728474.62745" + capture_lex $P1527 + .const 'Sub' $P1459 = "84_1284728474.62745" + capture_lex $P1459 + .const 'Sub' $P1387 = "81_1284728474.62745" + capture_lex $P1387 + .const 'Sub' $P1373 = "80_1284728474.62745" + capture_lex $P1373 + .const 'Sub' $P1349 = "79_1284728474.62745" + capture_lex $P1349 + .const 'Sub' $P1331 = "78_1284728474.62745" + capture_lex $P1331 + .const 'Sub' $P1317 = "77_1284728474.62745" + capture_lex $P1317 + .const 'Sub' $P1304 = "76_1284728474.62745" + capture_lex $P1304 + .const 'Sub' $P1273 = "75_1284728474.62745" + capture_lex $P1273 + .const 'Sub' $P1242 = "74_1284728474.62745" + capture_lex $P1242 + .const 'Sub' $P1226 = "73_1284728474.62745" + capture_lex $P1226 + .const 'Sub' $P1210 = "72_1284728474.62745" + capture_lex $P1210 + .const 'Sub' $P1194 = "71_1284728474.62745" + capture_lex $P1194 + .const 'Sub' $P1178 = "70_1284728474.62745" + capture_lex $P1178 + .const 'Sub' $P1162 = "69_1284728474.62745" + capture_lex $P1162 + .const 'Sub' $P1146 = "68_1284728474.62745" + capture_lex $P1146 + .const 'Sub' $P1130 = "67_1284728474.62745" + capture_lex $P1130 + .const 'Sub' $P1106 = "66_1284728474.62745" + capture_lex $P1106 + .const 'Sub' $P1091 = "65_1284728474.62745" + capture_lex $P1091 + .const 'Sub' $P1033 = "64_1284728474.62745" + capture_lex $P1033 + .const 'Sub' $P1012 = "63_1284728474.62745" + capture_lex $P1012 + .const 'Sub' $P990 = "62_1284728474.62745" + capture_lex $P990 + .const 'Sub' $P980 = "61_1284728474.62745" + capture_lex $P980 + .const 'Sub' $P970 = "60_1284728474.62745" + capture_lex $P970 + .const 'Sub' $P960 = "59_1284728474.62745" + capture_lex $P960 + .const 'Sub' $P948 = "58_1284728474.62745" + capture_lex $P948 + .const 'Sub' $P936 = "57_1284728474.62745" + capture_lex $P936 + .const 'Sub' $P924 = "56_1284728474.62745" + capture_lex $P924 + .const 'Sub' $P912 = "55_1284728474.62745" + capture_lex $P912 + .const 'Sub' $P900 = "54_1284728474.62745" + capture_lex $P900 + .const 'Sub' $P888 = "53_1284728474.62745" + capture_lex $P888 + .const 'Sub' $P876 = "52_1284728474.62745" + capture_lex $P876 + .const 'Sub' $P864 = "51_1284728474.62745" + capture_lex $P864 + .const 'Sub' $P836 = "50_1284728474.62745" + capture_lex $P836 + .const 'Sub' $P808 = "49_1284728474.62745" + capture_lex $P808 + .const 'Sub' $P790 = "48_1284728474.62745" + capture_lex $P790 + .const 'Sub' $P780 = "47_1284728474.62745" + capture_lex $P780 + .const 'Sub' $P762 = "46_1284728474.62745" + capture_lex $P762 + .const 'Sub' $P689 = "44_1284728474.62745" + capture_lex $P689 + .const 'Sub' $P672 = "43_1284728474.62745" + capture_lex $P672 + .const 'Sub' $P657 = "42_1284728474.62745" + capture_lex $P657 + .const 'Sub' $P642 = "41_1284728474.62745" + capture_lex $P642 + .const 'Sub' $P616 = "40_1284728474.62745" + capture_lex $P616 + .const 'Sub' $P565 = "38_1284728474.62745" + capture_lex $P565 + .const 'Sub' $P497 = "36_1284728474.62745" + capture_lex $P497 + .const 'Sub' $P460 = "34_1284728474.62745" capture_lex $P460 - .const 'Sub' $P404 = "31_1282016526.02169" + .const 'Sub' $P404 = "31_1284728474.62745" capture_lex $P404 - .const 'Sub' $P389 = "30_1282016526.02169" + .const 'Sub' $P389 = "30_1284728474.62745" capture_lex $P389 - .const 'Sub' $P363 = "28_1282016526.02169" + .const 'Sub' $P363 = "28_1284728474.62745" capture_lex $P363 - .const 'Sub' $P346 = "27_1282016526.02169" + .const 'Sub' $P346 = "27_1284728474.62745" capture_lex $P346 - .const 'Sub' $P312 = "26_1282016526.02169" + .const 'Sub' $P312 = "26_1284728474.62745" capture_lex $P312 - .const 'Sub' $P57 = "13_1282016526.02169" + .const 'Sub' $P57 = "13_1284728474.62745" capture_lex $P57 - .const 'Sub' $P16 = "12_1282016526.02169" + .const 'Sub' $P16 = "12_1284728474.62745" capture_lex $P16 get_global $P15, "@MODIFIERS" - unless_null $P15, vivify_95 + unless_null $P15, vivify_97 $P15 = root_new ['parrot';'ResizablePMCArray'] set_global "@MODIFIERS", $P15 - vivify_95: -.annotate 'line', 492 - .const 'Sub' $P16 = "12_1282016526.02169" + vivify_97: +.annotate 'line', 506 + .const 'Sub' $P16 = "12_1284728474.62745" newclosure $P56, $P16 .lex "buildsub", $P56 -.annotate 'line', 510 - .const 'Sub' $P57 = "13_1282016526.02169" +.annotate 'line', 524 + .const 'Sub' $P57 = "13_1284728474.62745" newclosure $P311, $P57 .lex "capnames", $P311 -.annotate 'line', 576 - .const 'Sub' $P312 = "26_1282016526.02169" +.annotate 'line', 590 + .const 'Sub' $P312 = "26_1284728474.62745" newclosure $P344, $P312 .lex "backmod", $P344 .annotate 'line', 4 @@ -8596,90 +9278,90 @@ $P0."ctxsave"() ctxsave_done: get_global $P345, "@MODIFIERS" -.annotate 'line', 485 - find_lex $P1588, "buildsub" - find_lex $P1589, "capnames" - find_lex $P1590, "backmod" -.annotate 'line', 589 - .const 'Sub' $P1611 = "90_1282016526.02169" - newclosure $P1628, $P1611 +.annotate 'line', 499 + find_lex $P1625, "buildsub" + find_lex $P1626, "capnames" + find_lex $P1627, "backmod" +.annotate 'line', 603 + .const 'Sub' $P1648 = "92_1284728474.62745" + newclosure $P1665, $P1648 .annotate 'line', 4 - .return ($P1628) - .const 'Sub' $P1630 = "91_1282016526.02169" - .return ($P1630) + .return ($P1665) + .const 'Sub' $P1667 = "93_1284728474.62745" + .return ($P1667) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "" :load :init :subid("post94") :outer("11_1282016526.02169") +.sub "" :load :init :subid("post96") :outer("11_1284728474.62745") .annotate 'line', 4 get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13" .local pmc block set block, $P14 .annotate 'line', 7 - $P1633 = new ['ResizablePMCArray'] + $P1670 = new ['ResizablePMCArray'] $P0 = new ['Hash'] - push $P1633, $P0 + push $P1670, $P0 - set_global "@MODIFIERS", $P1633 + set_global "@MODIFIERS", $P1670 .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "buildsub" :subid("12_1282016526.02169") :outer("11_1282016526.02169") +.sub "buildsub" :subid("12_1284728474.62745") :outer("11_1284728474.62745") .param pmc param_19 .param pmc param_20 :optional .param int has_param_20 :opt_flag -.annotate 'line', 492 +.annotate 'line', 506 new $P18, 'ExceptionHandler' set_addr $P18, control_17 $P18."handle_types"(.CONTROL_RETURN) push_eh $P18 .lex "$rpast", param_19 - if has_param_20, optparam_96 + if has_param_20, optparam_98 get_hll_global $P21, ["PAST"], "Block" $P22 = $P21."new"() set param_20, $P22 - optparam_96: + optparam_98: .lex "$block", param_20 -.annotate 'line', 493 +.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', 494 +.annotate 'line', 508 new $P26, "Integer" assign $P26, 0 find_lex $P27, "%capnames" - unless_null $P27, vivify_97 + unless_null $P27, vivify_99 $P27 = root_new ['parrot';'Hash'] store_lex "%capnames", $P27 - vivify_97: + vivify_99: set $P27[""], $P26 -.annotate 'line', 495 +.annotate 'line', 509 get_hll_global $P28, ["PAST"], "Regex" -.annotate 'line', 496 +.annotate 'line', 510 get_hll_global $P29, ["PAST"], "Regex" $P30 = $P29."new"("scan" :named("pasttype")) find_lex $P31, "$rpast" -.annotate 'line', 498 +.annotate 'line', 512 get_hll_global $P32, ["PAST"], "Regex" -.annotate 'line', 499 +.annotate 'line', 513 get_global $P35, "@MODIFIERS" - unless_null $P35, vivify_98 + unless_null $P35, vivify_100 $P35 = root_new ['parrot';'ResizablePMCArray'] - vivify_98: + vivify_100: set $P36, $P35[0] - unless_null $P36, vivify_99 + unless_null $P36, vivify_101 $P36 = root_new ['parrot';'Hash'] - vivify_99: + vivify_101: set $P37, $P36["r"] - unless_null $P37, vivify_100 + unless_null $P37, vivify_102 new $P37, "Undef" - vivify_100: + vivify_102: if $P37, if_34 new $P39, "String" assign $P39, "g" @@ -8691,34 +9373,34 @@ set $P33, $P38 if_34_end: $P40 = $P32."new"("pass" :named("pasttype"), $P33 :named("backtrack")) -.annotate 'line', 498 +.annotate 'line', 512 find_lex $P41, "%capnames" $P42 = $P28."new"($P30, $P31, $P40, "concat" :named("pasttype"), $P41 :named("capnames")) -.annotate 'line', 495 +.annotate 'line', 509 store_lex "$rpast", $P42 -.annotate 'line', 503 +.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', 504 +.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', 505 +.annotate 'line', 519 find_lex $P51, "$block" find_lex $P52, "$rpast" $P51."push"($P52) -.annotate 'line', 506 +.annotate 'line', 520 find_lex $P53, "$block" $P53."blocktype"("method") find_lex $P54, "$block" -.annotate 'line', 492 +.annotate 'line', 506 .return ($P54) control_17: .local pmc exception @@ -8730,19 +9412,19 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "capnames" :subid("13_1282016526.02169") :outer("11_1282016526.02169") +.sub "capnames" :subid("13_1284728474.62745") :outer("11_1284728474.62745") .param pmc param_60 .param pmc param_61 -.annotate 'line', 510 - .const 'Sub' $P286 = "24_1282016526.02169" +.annotate 'line', 524 + .const 'Sub' $P286 = "24_1284728474.62745" capture_lex $P286 - .const 'Sub' $P223 = "21_1282016526.02169" + .const 'Sub' $P223 = "21_1284728474.62745" capture_lex $P223 - .const 'Sub' $P181 = "19_1282016526.02169" + .const 'Sub' $P181 = "19_1284728474.62745" capture_lex $P181 - .const 'Sub' $P139 = "17_1282016526.02169" + .const 'Sub' $P139 = "17_1284728474.62745" capture_lex $P139 - .const 'Sub' $P72 = "14_1282016526.02169" + .const 'Sub' $P72 = "14_1284728474.62745" capture_lex $P72 new $P59, 'ExceptionHandler' set_addr $P59, control_58 @@ -8750,29 +9432,29 @@ push_eh $P59 .lex "$ast", param_60 .lex "$count", param_61 -.annotate 'line', 511 +.annotate 'line', 525 $P62 = root_new ['parrot';'Hash'] .lex "%capnames", $P62 -.annotate 'line', 512 +.annotate 'line', 526 new $P63, "Undef" .lex "$pasttype", $P63 -.annotate 'line', 510 +.annotate 'line', 524 find_lex $P64, "%capnames" -.annotate 'line', 512 +.annotate 'line', 526 find_lex $P65, "$ast" $P66 = $P65."pasttype"() store_lex "$pasttype", $P66 -.annotate 'line', 513 +.annotate 'line', 527 find_lex $P68, "$pasttype" set $S69, $P68 iseq $I70, $S69, "alt" if $I70, if_67 -.annotate 'line', 526 +.annotate 'line', 540 find_lex $P130, "$pasttype" set $S131, $P130 iseq $I132, $S131, "concat" if $I132, if_129 -.annotate 'line', 535 +.annotate 'line', 549 find_lex $P174, "$pasttype" set $S175, $P174 iseq $I176, $S175, "subrule" @@ -8788,41 +9470,41 @@ set $P172, $I179 if_173_end: if $P172, if_171 -.annotate 'line', 548 +.annotate 'line', 562 find_lex $P219, "$pasttype" set $S220, $P219 iseq $I221, $S220, "subcapture" if $I221, if_218 -.annotate 'line', 565 +.annotate 'line', 579 find_lex $P282, "$pasttype" set $S283, $P282 iseq $I284, $S283, "quant" unless $I284, if_281_end - .const 'Sub' $P286 = "24_1282016526.02169" + .const 'Sub' $P286 = "24_1284728474.62745" capture_lex $P286 $P286() if_281_end: goto if_218_end if_218: -.annotate 'line', 548 - .const 'Sub' $P223 = "21_1282016526.02169" +.annotate 'line', 562 + .const 'Sub' $P223 = "21_1284728474.62745" capture_lex $P223 $P223() if_218_end: goto if_171_end if_171: -.annotate 'line', 535 - .const 'Sub' $P181 = "19_1282016526.02169" +.annotate 'line', 549 + .const 'Sub' $P181 = "19_1284728474.62745" capture_lex $P181 $P181() if_171_end: goto if_129_end if_129: -.annotate 'line', 527 +.annotate 'line', 541 find_lex $P134, "$ast" $P135 = $P134."list"() defined $I136, $P135 - unless $I136, for_undef_121 + unless $I136, for_undef_123 iter $P133, $P135 new $P169, 'ExceptionHandler' set_addr $P169, loop168_handler @@ -8832,7 +9514,7 @@ unless $P133, loop168_done shift $P137, $P133 loop168_redo: - .const 'Sub' $P139 = "17_1282016526.02169" + .const 'Sub' $P139 = "17_1284728474.62745" capture_lex $P139 $P139($P137) loop168_next: @@ -8845,26 +9527,26 @@ eq $P170, .CONTROL_LOOP_REDO, loop168_redo loop168_done: pop_eh - for_undef_121: + for_undef_123: if_129_end: -.annotate 'line', 526 +.annotate 'line', 540 goto if_67_end if_67: -.annotate 'line', 513 - .const 'Sub' $P72 = "14_1282016526.02169" +.annotate 'line', 527 + .const 'Sub' $P72 = "14_1284728474.62745" capture_lex $P72 $P72() if_67_end: -.annotate 'line', 572 +.annotate 'line', 586 find_lex $P307, "$count" find_lex $P308, "%capnames" - unless_null $P308, vivify_141 + unless_null $P308, vivify_143 $P308 = root_new ['parrot';'Hash'] store_lex "%capnames", $P308 - vivify_141: + vivify_143: set $P308[""], $P307 find_lex $P309, "%capnames" -.annotate 'line', 510 +.annotate 'line', 524 .return ($P309) control_58: .local pmc exception @@ -8876,28 +9558,28 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block285" :anon :subid("24_1282016526.02169") :outer("13_1282016526.02169") -.annotate 'line', 565 - .const 'Sub' $P297 = "25_1282016526.02169" +.sub "_block285" :anon :subid("24_1284728474.62745") :outer("13_1284728474.62745") +.annotate 'line', 579 + .const 'Sub' $P297 = "25_1284728474.62745" capture_lex $P297 -.annotate 'line', 566 +.annotate 'line', 580 $P287 = root_new ['parrot';'Hash'] .lex "%astcap", $P287 find_lex $P288, "$ast" - unless_null $P288, vivify_101 + unless_null $P288, vivify_103 $P288 = root_new ['parrot';'ResizablePMCArray'] - vivify_101: + vivify_103: set $P289, $P288[0] - unless_null $P289, vivify_102 + unless_null $P289, vivify_104 new $P289, "Undef" - vivify_102: + vivify_104: find_lex $P290, "$count" $P291 = "capnames"($P289, $P290) store_lex "%astcap", $P291 -.annotate 'line', 567 +.annotate 'line', 581 find_lex $P293, "%astcap" defined $I294, $P293 - unless $I294, for_undef_103 + unless $I294, for_undef_105 iter $P292, $P293 new $P303, 'ExceptionHandler' set_addr $P303, loop302_handler @@ -8907,7 +9589,7 @@ unless $P292, loop302_done shift $P295, $P292 loop302_redo: - .const 'Sub' $P297 = "25_1282016526.02169" + .const 'Sub' $P297 = "25_1284728474.62745" capture_lex $P297 $P297($P295) loop302_next: @@ -8920,74 +9602,74 @@ eq $P304, .CONTROL_LOOP_REDO, loop302_redo loop302_done: pop_eh - for_undef_103: -.annotate 'line', 570 + for_undef_105: +.annotate 'line', 584 find_lex $P305, "%astcap" - unless_null $P305, vivify_105 + unless_null $P305, vivify_107 $P305 = root_new ['parrot';'Hash'] - vivify_105: + vivify_107: set $P306, $P305[""] - unless_null $P306, vivify_106 + unless_null $P306, vivify_108 new $P306, "Undef" - vivify_106: + vivify_108: store_lex "$count", $P306 -.annotate 'line', 565 +.annotate 'line', 579 .return ($P306) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block296" :anon :subid("25_1282016526.02169") :outer("24_1282016526.02169") +.sub "_block296" :anon :subid("25_1284728474.62745") :outer("24_1284728474.62745") .param pmc param_298 -.annotate 'line', 567 +.annotate 'line', 581 .lex "$_", param_298 -.annotate 'line', 568 +.annotate 'line', 582 new $P299, "Integer" assign $P299, 2 find_lex $P300, "$_" find_lex $P301, "%capnames" - unless_null $P301, vivify_104 + unless_null $P301, vivify_106 $P301 = root_new ['parrot';'Hash'] store_lex "%capnames", $P301 - vivify_104: + vivify_106: set $P301[$P300], $P299 -.annotate 'line', 567 +.annotate 'line', 581 .return ($P299) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block222" :anon :subid("21_1282016526.02169") :outer("13_1282016526.02169") -.annotate 'line', 548 - .const 'Sub' $P263 = "23_1282016526.02169" +.sub "_block222" :anon :subid("21_1284728474.62745") :outer("13_1284728474.62745") +.annotate 'line', 562 + .const 'Sub' $P263 = "23_1284728474.62745" capture_lex $P263 - .const 'Sub' $P235 = "22_1282016526.02169" + .const 'Sub' $P235 = "22_1284728474.62745" capture_lex $P235 -.annotate 'line', 549 +.annotate 'line', 563 new $P224, "Undef" .lex "$name", $P224 -.annotate 'line', 550 +.annotate 'line', 564 $P225 = root_new ['parrot';'ResizablePMCArray'] .lex "@names", $P225 -.annotate 'line', 559 +.annotate 'line', 573 $P226 = root_new ['parrot';'Hash'] .lex "%x", $P226 -.annotate 'line', 549 +.annotate 'line', 563 find_lex $P227, "$ast" $P228 = $P227."name"() store_lex "$name", $P228 -.annotate 'line', 550 +.annotate 'line', 564 $P0 = find_lex '$name' $S0 = $P0 $P229 = split '=', $S0 store_lex "@names", $P229 -.annotate 'line', 555 +.annotate 'line', 569 find_lex $P231, "@names" defined $I232, $P231 - unless $I232, for_undef_107 + unless $I232, for_undef_109 iter $P230, $P231 new $P252, 'ExceptionHandler' set_addr $P252, loop251_handler @@ -8997,7 +9679,7 @@ unless $P230, loop251_done shift $P233, $P230 loop251_redo: - .const 'Sub' $P235 = "22_1282016526.02169" + .const 'Sub' $P235 = "22_1284728474.62745" capture_lex $P235 $P235($P233) loop251_next: @@ -9010,23 +9692,23 @@ eq $P253, .CONTROL_LOOP_REDO, loop251_redo loop251_done: pop_eh - for_undef_107: -.annotate 'line', 559 + for_undef_109: +.annotate 'line', 573 find_lex $P254, "$ast" - unless_null $P254, vivify_109 + unless_null $P254, vivify_111 $P254 = root_new ['parrot';'ResizablePMCArray'] - vivify_109: + vivify_111: set $P255, $P254[0] - unless_null $P255, vivify_110 + unless_null $P255, vivify_112 new $P255, "Undef" - vivify_110: + vivify_112: find_lex $P256, "$count" $P257 = "capnames"($P255, $P256) store_lex "%x", $P257 -.annotate 'line', 560 +.annotate 'line', 574 find_lex $P259, "%x" defined $I260, $P259 - unless $I260, for_undef_111 + unless $I260, for_undef_113 iter $P258, $P259 new $P277, 'ExceptionHandler' set_addr $P277, loop276_handler @@ -9036,7 +9718,7 @@ unless $P258, loop276_done shift $P261, $P258 loop276_redo: - .const 'Sub' $P263 = "23_1282016526.02169" + .const 'Sub' $P263 = "23_1284728474.62745" capture_lex $P263 $P263($P261) loop276_next: @@ -9049,28 +9731,28 @@ eq $P278, .CONTROL_LOOP_REDO, loop276_redo loop276_done: pop_eh - for_undef_111: -.annotate 'line', 563 + for_undef_113: +.annotate 'line', 577 find_lex $P279, "%x" - unless_null $P279, vivify_117 + unless_null $P279, vivify_119 $P279 = root_new ['parrot';'Hash'] - vivify_117: + vivify_119: set $P280, $P279[""] - unless_null $P280, vivify_118 + unless_null $P280, vivify_120 new $P280, "Undef" - vivify_118: + vivify_120: store_lex "$count", $P280 -.annotate 'line', 548 +.annotate 'line', 562 .return ($P280) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block234" :anon :subid("22_1282016526.02169") :outer("21_1282016526.02169") +.sub "_block234" :anon :subid("22_1284728474.62745") :outer("21_1284728474.62745") .param pmc param_236 -.annotate 'line', 555 +.annotate 'line', 569 .lex "$_", param_236 -.annotate 'line', 556 +.annotate 'line', 570 find_lex $P240, "$_" set $S241, $P240 iseq $I242, $S241, "0" @@ -9090,78 +9772,78 @@ add $P247, $P246, 1 store_lex "$count", $P247 if_237_end: -.annotate 'line', 557 +.annotate 'line', 571 new $P248, "Integer" assign $P248, 1 find_lex $P249, "$_" find_lex $P250, "%capnames" - unless_null $P250, vivify_108 + unless_null $P250, vivify_110 $P250 = root_new ['parrot';'Hash'] store_lex "%capnames", $P250 - vivify_108: + vivify_110: set $P250[$P249], $P248 -.annotate 'line', 555 +.annotate 'line', 569 .return ($P248) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block262" :anon :subid("23_1282016526.02169") :outer("21_1282016526.02169") +.sub "_block262" :anon :subid("23_1284728474.62745") :outer("21_1284728474.62745") .param pmc param_264 -.annotate 'line', 560 +.annotate 'line', 574 .lex "$_", param_264 -.annotate 'line', 561 +.annotate 'line', 575 find_lex $P265, "$_" find_lex $P266, "%capnames" - unless_null $P266, vivify_112 + unless_null $P266, vivify_114 $P266 = root_new ['parrot';'Hash'] - vivify_112: + vivify_114: set $P267, $P266[$P265] - unless_null $P267, vivify_113 + unless_null $P267, vivify_115 new $P267, "Undef" - vivify_113: + vivify_115: set $N268, $P267 new $P269, 'Float' set $P269, $N268 find_lex $P270, "$_" find_lex $P271, "%x" - unless_null $P271, vivify_114 + unless_null $P271, vivify_116 $P271 = root_new ['parrot';'Hash'] - vivify_114: + vivify_116: set $P272, $P271[$P270] - unless_null $P272, vivify_115 + unless_null $P272, vivify_117 new $P272, "Undef" - vivify_115: + vivify_117: add $P273, $P269, $P272 find_lex $P274, "$_" find_lex $P275, "%capnames" - unless_null $P275, vivify_116 + unless_null $P275, vivify_118 $P275 = root_new ['parrot';'Hash'] store_lex "%capnames", $P275 - vivify_116: + vivify_118: set $P275[$P274], $P273 -.annotate 'line', 560 +.annotate 'line', 574 .return ($P273) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block180" :anon :subid("19_1282016526.02169") :outer("13_1282016526.02169") -.annotate 'line', 535 - .const 'Sub' $P199 = "20_1282016526.02169" +.sub "_block180" :anon :subid("19_1284728474.62745") :outer("13_1284728474.62745") +.annotate 'line', 549 + .const 'Sub' $P199 = "20_1284728474.62745" capture_lex $P199 -.annotate 'line', 536 +.annotate 'line', 550 new $P182, "Undef" .lex "$name", $P182 -.annotate 'line', 538 +.annotate 'line', 552 $P183 = root_new ['parrot';'ResizablePMCArray'] .lex "@names", $P183 -.annotate 'line', 536 +.annotate 'line', 550 find_lex $P184, "$ast" $P185 = $P184."name"() store_lex "$name", $P185 -.annotate 'line', 537 +.annotate 'line', 551 find_lex $P187, "$name" set $S188, $P187 iseq $I189, $S188, "" @@ -9172,17 +9854,17 @@ find_lex $P192, "$name" $P191."name"($P192) if_186_end: -.annotate 'line', 538 +.annotate 'line', 552 $P0 = find_lex '$name' $S0 = $P0 $P193 = split '=', $S0 store_lex "@names", $P193 -.annotate 'line', 543 +.annotate 'line', 557 find_lex $P195, "@names" defined $I196, $P195 - unless $I196, for_undef_119 + unless $I196, for_undef_121 iter $P194, $P195 new $P216, 'ExceptionHandler' set_addr $P216, loop215_handler @@ -9192,7 +9874,7 @@ unless $P194, loop215_done shift $P197, $P194 loop215_redo: - .const 'Sub' $P199 = "20_1282016526.02169" + .const 'Sub' $P199 = "20_1284728474.62745" capture_lex $P199 $P199($P197) loop215_next: @@ -9205,18 +9887,18 @@ eq $P217, .CONTROL_LOOP_REDO, loop215_redo loop215_done: pop_eh - for_undef_119: -.annotate 'line', 535 + for_undef_121: +.annotate 'line', 549 .return ($P194) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block198" :anon :subid("20_1282016526.02169") :outer("19_1282016526.02169") +.sub "_block198" :anon :subid("20_1284728474.62745") :outer("19_1284728474.62745") .param pmc param_200 -.annotate 'line', 543 +.annotate 'line', 557 .lex "$_", param_200 -.annotate 'line', 544 +.annotate 'line', 558 find_lex $P204, "$_" set $S205, $P204 iseq $I206, $S205, "0" @@ -9236,29 +9918,29 @@ add $P211, $P210, 1 store_lex "$count", $P211 if_201_end: -.annotate 'line', 545 +.annotate 'line', 559 new $P212, "Integer" assign $P212, 1 find_lex $P213, "$_" find_lex $P214, "%capnames" - unless_null $P214, vivify_120 + unless_null $P214, vivify_122 $P214 = root_new ['parrot';'Hash'] store_lex "%capnames", $P214 - vivify_120: + vivify_122: set $P214[$P213], $P212 -.annotate 'line', 543 +.annotate 'line', 557 .return ($P212) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block138" :anon :subid("17_1282016526.02169") :outer("13_1282016526.02169") +.sub "_block138" :anon :subid("17_1284728474.62745") :outer("13_1284728474.62745") .param pmc param_141 -.annotate 'line', 527 - .const 'Sub' $P150 = "18_1282016526.02169" +.annotate 'line', 541 + .const 'Sub' $P150 = "18_1284728474.62745" capture_lex $P150 -.annotate 'line', 528 +.annotate 'line', 542 $P140 = root_new ['parrot';'Hash'] .lex "%x", $P140 .lex "$_", param_141 @@ -9266,10 +9948,10 @@ find_lex $P143, "$count" $P144 = "capnames"($P142, $P143) store_lex "%x", $P144 -.annotate 'line', 529 +.annotate 'line', 543 find_lex $P146, "%x" defined $I147, $P146 - unless $I147, for_undef_122 + unless $I147, for_undef_124 iter $P145, $P146 new $P164, 'ExceptionHandler' set_addr $P164, loop163_handler @@ -9279,7 +9961,7 @@ unless $P145, loop163_done shift $P148, $P145 loop163_redo: - .const 'Sub' $P150 = "18_1282016526.02169" + .const 'Sub' $P150 = "18_1284728474.62745" capture_lex $P150 $P150($P148) loop163_next: @@ -9292,78 +9974,78 @@ eq $P165, .CONTROL_LOOP_REDO, loop163_redo loop163_done: pop_eh - for_undef_122: -.annotate 'line', 532 + for_undef_124: +.annotate 'line', 546 find_lex $P166, "%x" - unless_null $P166, vivify_128 + unless_null $P166, vivify_130 $P166 = root_new ['parrot';'Hash'] - vivify_128: + vivify_130: set $P167, $P166[""] - unless_null $P167, vivify_129 + unless_null $P167, vivify_131 new $P167, "Undef" - vivify_129: + vivify_131: store_lex "$count", $P167 -.annotate 'line', 527 +.annotate 'line', 541 .return ($P167) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block149" :anon :subid("18_1282016526.02169") :outer("17_1282016526.02169") +.sub "_block149" :anon :subid("18_1284728474.62745") :outer("17_1284728474.62745") .param pmc param_151 -.annotate 'line', 529 +.annotate 'line', 543 .lex "$_", param_151 -.annotate 'line', 530 +.annotate 'line', 544 find_lex $P152, "$_" find_lex $P153, "%capnames" - unless_null $P153, vivify_123 + unless_null $P153, vivify_125 $P153 = root_new ['parrot';'Hash'] - vivify_123: + vivify_125: set $P154, $P153[$P152] - unless_null $P154, vivify_124 + unless_null $P154, vivify_126 new $P154, "Undef" - vivify_124: + vivify_126: set $N155, $P154 new $P156, 'Float' set $P156, $N155 find_lex $P157, "$_" find_lex $P158, "%x" - unless_null $P158, vivify_125 + unless_null $P158, vivify_127 $P158 = root_new ['parrot';'Hash'] - vivify_125: + vivify_127: set $P159, $P158[$P157] - unless_null $P159, vivify_126 + unless_null $P159, vivify_128 new $P159, "Undef" - vivify_126: + vivify_128: add $P160, $P156, $P159 find_lex $P161, "$_" find_lex $P162, "%capnames" - unless_null $P162, vivify_127 + unless_null $P162, vivify_129 $P162 = root_new ['parrot';'Hash'] store_lex "%capnames", $P162 - vivify_127: + vivify_129: set $P162[$P161], $P160 -.annotate 'line', 529 +.annotate 'line', 543 .return ($P160) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block71" :anon :subid("14_1282016526.02169") :outer("13_1282016526.02169") -.annotate 'line', 513 - .const 'Sub' $P81 = "15_1282016526.02169" +.sub "_block71" :anon :subid("14_1284728474.62745") :outer("13_1284728474.62745") +.annotate 'line', 527 + .const 'Sub' $P81 = "15_1284728474.62745" capture_lex $P81 -.annotate 'line', 514 +.annotate 'line', 528 new $P73, "Undef" .lex "$max", $P73 find_lex $P74, "$count" store_lex "$max", $P74 -.annotate 'line', 515 +.annotate 'line', 529 find_lex $P76, "$ast" $P77 = $P76."list"() defined $I78, $P77 - unless $I78, for_undef_130 + unless $I78, for_undef_132 iter $P75, $P77 new $P126, 'ExceptionHandler' set_addr $P126, loop125_handler @@ -9373,7 +10055,7 @@ unless $P75, loop125_done shift $P79, $P75 loop125_redo: - .const 'Sub' $P81 = "15_1282016526.02169" + .const 'Sub' $P81 = "15_1284728474.62745" capture_lex $P81 $P81($P79) loop125_next: @@ -9386,23 +10068,23 @@ eq $P127, .CONTROL_LOOP_REDO, loop125_redo loop125_done: pop_eh - for_undef_130: -.annotate 'line', 524 + for_undef_132: +.annotate 'line', 538 find_lex $P128, "$max" store_lex "$count", $P128 -.annotate 'line', 513 +.annotate 'line', 527 .return ($P128) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block80" :anon :subid("15_1282016526.02169") :outer("14_1282016526.02169") +.sub "_block80" :anon :subid("15_1284728474.62745") :outer("14_1284728474.62745") .param pmc param_83 -.annotate 'line', 515 - .const 'Sub' $P92 = "16_1282016526.02169" +.annotate 'line', 529 + .const 'Sub' $P92 = "16_1284728474.62745" capture_lex $P92 -.annotate 'line', 516 +.annotate 'line', 530 $P82 = root_new ['parrot';'Hash'] .lex "%x", $P82 .lex "$_", param_83 @@ -9410,10 +10092,10 @@ find_lex $P85, "$count" $P86 = "capnames"($P84, $P85) store_lex "%x", $P86 -.annotate 'line', 517 +.annotate 'line', 531 find_lex $P88, "%x" defined $I89, $P88 - unless $I89, for_undef_131 + unless $I89, for_undef_133 iter $P87, $P88 new $P113, 'ExceptionHandler' set_addr $P113, loop112_handler @@ -9423,7 +10105,7 @@ unless $P87, loop112_done shift $P90, $P87 loop112_redo: - .const 'Sub' $P92 = "16_1282016526.02169" + .const 'Sub' $P92 = "16_1284728474.62745" capture_lex $P92 $P92($P90) loop112_next: @@ -9436,16 +10118,16 @@ eq $P114, .CONTROL_LOOP_REDO, loop112_redo loop112_done: pop_eh - for_undef_131: -.annotate 'line', 522 + for_undef_133: +.annotate 'line', 536 find_lex $P117, "%x" - unless_null $P117, vivify_137 + unless_null $P117, vivify_139 $P117 = root_new ['parrot';'Hash'] - vivify_137: + vivify_139: set $P118, $P117[""] - unless_null $P118, vivify_138 + unless_null $P118, vivify_140 new $P118, "Undef" - vivify_138: + vivify_140: set $N119, $P118 find_lex $P120, "$max" set $N121, $P120 @@ -9456,36 +10138,36 @@ goto if_116_end if_116: find_lex $P123, "%x" - unless_null $P123, vivify_139 + unless_null $P123, vivify_141 $P123 = root_new ['parrot';'Hash'] - vivify_139: + vivify_141: set $P124, $P123[""] - unless_null $P124, vivify_140 + unless_null $P124, vivify_142 new $P124, "Undef" - vivify_140: + vivify_142: store_lex "$max", $P124 set $P115, $P124 if_116_end: -.annotate 'line', 515 +.annotate 'line', 529 .return ($P115) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block91" :anon :subid("16_1282016526.02169") :outer("15_1282016526.02169") +.sub "_block91" :anon :subid("16_1284728474.62745") :outer("15_1284728474.62745") .param pmc param_93 -.annotate 'line', 517 +.annotate 'line', 531 .lex "$_", param_93 -.annotate 'line', 518 +.annotate 'line', 532 find_lex $P98, "$_" find_lex $P99, "%capnames" - unless_null $P99, vivify_132 + unless_null $P99, vivify_134 $P99 = root_new ['parrot';'Hash'] - vivify_132: + vivify_134: set $P100, $P99[$P98] - unless_null $P100, vivify_133 + unless_null $P100, vivify_135 new $P100, "Undef" - vivify_133: + vivify_135: set $N101, $P100 islt $I102, $N101, 2.0 if $I102, if_97 @@ -9495,13 +10177,13 @@ if_97: find_lex $P103, "$_" find_lex $P104, "%x" - unless_null $P104, vivify_134 + unless_null $P104, vivify_136 $P104 = root_new ['parrot';'Hash'] - vivify_134: + vivify_136: set $P105, $P104[$P103] - unless_null $P105, vivify_135 + unless_null $P105, vivify_137 new $P105, "Undef" - vivify_135: + vivify_137: set $N106, $P105 iseq $I107, $N106, 1.0 new $P96, 'Integer' @@ -9517,37 +10199,37 @@ assign $P108, 1 set $P94, $P108 if_95_end: -.annotate 'line', 519 +.annotate 'line', 533 find_lex $P110, "$_" find_lex $P111, "%capnames" - unless_null $P111, vivify_136 + unless_null $P111, vivify_138 $P111 = root_new ['parrot';'Hash'] store_lex "%capnames", $P111 - vivify_136: + vivify_138: set $P111[$P110], $P94 -.annotate 'line', 517 +.annotate 'line', 531 .return ($P94) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backmod" :subid("26_1282016526.02169") :outer("11_1282016526.02169") +.sub "backmod" :subid("26_1284728474.62745") :outer("11_1284728474.62745") .param pmc param_315 .param pmc param_316 -.annotate 'line', 576 +.annotate 'line', 590 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', 577 +.annotate 'line', 591 find_lex $P318, "$backmod" set $S319, $P318 iseq $I320, $S319, ":" if $I320, if_317 -.annotate 'line', 578 +.annotate 'line', 592 find_lex $P325, "$backmod" set $S326, $P325 iseq $I327, $S326, ":?" @@ -9563,7 +10245,7 @@ set $P323, $I330 unless_324_end: if $P323, if_322 -.annotate 'line', 579 +.annotate 'line', 593 find_lex $P335, "$backmod" set $S336, $P335 iseq $I337, $S336, ":!" @@ -9584,18 +10266,18 @@ if_332_end: goto if_322_end if_322: -.annotate 'line', 578 +.annotate 'line', 592 find_lex $P331, "$ast" $P331."backtrack"("f") if_322_end: goto if_317_end if_317: -.annotate 'line', 577 +.annotate 'line', 591 find_lex $P321, "$ast" $P321."backtrack"("r") if_317_end: find_lex $P342, "$ast" -.annotate 'line', 576 +.annotate 'line', 590 .return ($P342) control_313: .local pmc exception @@ -9607,7 +10289,7 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "arg" :subid("27_1282016526.02169") :method :outer("11_1282016526.02169") +.sub "arg" :subid("27_1284728474.62745") :method :outer("11_1284728474.62745") .param pmc param_349 .annotate 'line', 14 new $P348, 'ExceptionHandler' @@ -9619,35 +10301,35 @@ .annotate 'line', 15 find_lex $P350, "$/" find_lex $P353, "$/" - unless_null $P353, vivify_142 + unless_null $P353, vivify_144 $P353 = root_new ['parrot';'Hash'] - vivify_142: + vivify_144: set $P354, $P353["quote_EXPR"] - unless_null $P354, vivify_143 + unless_null $P354, vivify_145 new $P354, "Undef" - vivify_143: + vivify_145: if $P354, if_352 find_lex $P358, "$/" - unless_null $P358, vivify_144 + unless_null $P358, vivify_146 $P358 = root_new ['parrot';'Hash'] - vivify_144: + vivify_146: set $P359, $P358["val"] - unless_null $P359, vivify_145 + unless_null $P359, vivify_147 new $P359, "Undef" - vivify_145: + vivify_147: set $N360, $P359 new $P351, 'Float' set $P351, $N360 goto if_352_end if_352: find_lex $P355, "$/" - unless_null $P355, vivify_146 + unless_null $P355, vivify_148 $P355 = root_new ['parrot';'Hash'] - vivify_146: + vivify_148: set $P356, $P355["quote_EXPR"] - unless_null $P356, vivify_147 + unless_null $P356, vivify_149 new $P356, "Undef" - vivify_147: + vivify_149: $P357 = $P356."ast"() set $P351, $P357 if_352_end: @@ -9664,10 +10346,10 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "arglist" :subid("28_1282016526.02169") :method :outer("11_1282016526.02169") +.sub "arglist" :subid("28_1284728474.62745") :method :outer("11_1284728474.62745") .param pmc param_366 .annotate 'line', 18 - .const 'Sub' $P376 = "29_1282016526.02169" + .const 'Sub' $P376 = "29_1284728474.62745" capture_lex $P376 new $P365, 'ExceptionHandler' set_addr $P365, control_364 @@ -9683,15 +10365,15 @@ store_lex "$past", $P369 .annotate 'line', 20 find_lex $P371, "$/" - unless_null $P371, vivify_148 + unless_null $P371, vivify_150 $P371 = root_new ['parrot';'Hash'] - vivify_148: + vivify_150: set $P372, $P371["arg"] - unless_null $P372, vivify_149 + unless_null $P372, vivify_151 new $P372, "Undef" - vivify_149: + vivify_151: defined $I373, $P372 - unless $I373, for_undef_150 + unless $I373, for_undef_152 iter $P370, $P372 new $P383, 'ExceptionHandler' set_addr $P383, loop382_handler @@ -9701,7 +10383,7 @@ unless $P370, loop382_done shift $P374, $P370 loop382_redo: - .const 'Sub' $P376 = "29_1282016526.02169" + .const 'Sub' $P376 = "29_1284728474.62745" capture_lex $P376 $P376($P374) loop382_next: @@ -9714,7 +10396,7 @@ eq $P384, .CONTROL_LOOP_REDO, loop382_redo loop382_done: pop_eh - for_undef_150: + for_undef_152: .annotate 'line', 21 find_lex $P385, "$/" find_lex $P386, "$past" @@ -9730,7 +10412,7 @@ .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block375" :anon :subid("29_1282016526.02169") :outer("28_1282016526.02169") +.sub "_block375" :anon :subid("29_1284728474.62745") :outer("28_1284728474.62745") .param pmc param_377 .annotate 'line', 20 .lex "$_", param_377 @@ -9744,7 +10426,7 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "TOP" :subid("30_1282016526.02169") :method :outer("11_1282016526.02169") +.sub "TOP" :subid("30_1284728474.62745") :method :outer("11_1284728474.62745") .param pmc param_392 .annotate 'line', 24 new $P391, 'ExceptionHandler' @@ -9757,13 +10439,13 @@ new $P393, "Undef" .lex "$past", $P393 find_lex $P394, "$/" - unless_null $P394, vivify_151 + unless_null $P394, vivify_153 $P394 = root_new ['parrot';'Hash'] - vivify_151: + vivify_153: set $P395, $P394["nibbler"] - unless_null $P395, vivify_152 + unless_null $P395, vivify_154 new $P395, "Undef" - vivify_152: + vivify_154: $P396 = $P395."ast"() $P397 = "buildsub"($P396) store_lex "$past", $P397 @@ -9787,14 +10469,14 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "nibbler" :subid("31_1282016526.02169") :method :outer("11_1282016526.02169") +.sub "nibbler" :subid("31_1284728474.62745") :method :outer("11_1284728474.62745") .param pmc param_407 .param pmc param_408 :optional .param int has_param_408 :opt_flag .annotate 'line', 30 - .const 'Sub' $P443 = "33_1282016526.02169" + .const 'Sub' $P443 = "33_1284728474.62745" capture_lex $P443 - .const 'Sub' $P416 = "32_1282016526.02169" + .const 'Sub' $P416 = "32_1284728474.62745" capture_lex $P416 new $P406, 'ExceptionHandler' set_addr $P406, control_405 @@ -9802,10 +10484,10 @@ push_eh $P406 .lex "self", self .lex "$/", param_407 - if has_param_408, optparam_153 + if has_param_408, optparam_155 new $P409, "Undef" set param_408, $P409 - optparam_153: + optparam_155: .lex "$key", param_408 .annotate 'line', 39 new $P410, "Undef" @@ -9815,7 +10497,7 @@ set $S413, $P412 iseq $I414, $S413, "open" unless $I414, if_411_end - .const 'Sub' $P416 = "32_1282016526.02169" + .const 'Sub' $P416 = "32_1284728474.62745" capture_lex $P416 $P416() if_411_end: @@ -9825,29 +10507,29 @@ find_lex $P428, "$past" .annotate 'line', 40 find_lex $P430, "$/" - unless_null $P430, vivify_156 + unless_null $P430, vivify_158 $P430 = root_new ['parrot';'Hash'] - vivify_156: - set $P431, $P430["termish"] - unless_null $P431, vivify_157 + vivify_158: + set $P431, $P430["termconj"] + unless_null $P431, vivify_159 new $P431, "Undef" - vivify_157: + vivify_159: set $N432, $P431 isgt $I433, $N432, 1.0 if $I433, if_429 .annotate 'line', 47 find_lex $P452, "$/" - unless_null $P452, vivify_158 + unless_null $P452, vivify_160 $P452 = root_new ['parrot';'Hash'] - vivify_158: - set $P453, $P452["termish"] - unless_null $P453, vivify_159 + vivify_160: + set $P453, $P452["termconj"] + unless_null $P453, vivify_161 $P453 = root_new ['parrot';'ResizablePMCArray'] - vivify_159: + vivify_161: set $P454, $P453[0] - unless_null $P454, vivify_160 + unless_null $P454, vivify_162 new $P454, "Undef" - vivify_160: + vivify_162: $P455 = $P454."ast"() store_lex "$past", $P455 .annotate 'line', 46 @@ -9860,15 +10542,15 @@ store_lex "$past", $P436 .annotate 'line', 42 find_lex $P438, "$/" - unless_null $P438, vivify_161 + unless_null $P438, vivify_163 $P438 = root_new ['parrot';'Hash'] - vivify_161: - set $P439, $P438["termish"] - unless_null $P439, vivify_162 + vivify_163: + set $P439, $P438["termconj"] + unless_null $P439, vivify_164 new $P439, "Undef" - vivify_162: + vivify_164: defined $I440, $P439 - unless $I440, for_undef_163 + unless $I440, for_undef_165 iter $P437, $P439 new $P450, 'ExceptionHandler' set_addr $P450, loop449_handler @@ -9878,7 +10560,7 @@ unless $P437, loop449_done shift $P441, $P437 loop449_redo: - .const 'Sub' $P443 = "33_1282016526.02169" + .const 'Sub' $P443 = "33_1284728474.62745" capture_lex $P443 $P443($P441) loop449_next: @@ -9891,7 +10573,7 @@ eq $P451, .CONTROL_LOOP_REDO, loop449_redo loop449_done: pop_eh - for_undef_163: + for_undef_165: if_429_end: .annotate 'line', 49 find_lex $P456, "$/" @@ -9909,7 +10591,7 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "_block415" :anon :subid("32_1282016526.02169") :outer("31_1282016526.02169") +.sub "_block415" :anon :subid("32_1284728474.62745") :outer("31_1284728474.62745") .annotate 'line', 32 $P417 = root_new ['parrot';'Hash'] .lex "%old", $P417 @@ -9918,13 +10600,13 @@ .lex "%new", $P418 .annotate 'line', 32 get_global $P419, "@MODIFIERS" - unless_null $P419, vivify_154 + unless_null $P419, vivify_156 $P419 = root_new ['parrot';'ResizablePMCArray'] - vivify_154: + vivify_156: set $P420, $P419[0] - unless_null $P420, vivify_155 + unless_null $P420, vivify_157 new $P420, "Undef" - vivify_155: + vivify_157: store_lex "%old", $P420 .annotate 'line', 33 find_lex $P421, "%old" @@ -9947,7 +10629,7 @@ .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block442" :anon :subid("33_1282016526.02169") :outer("31_1282016526.02169") +.sub "_block442" :anon :subid("33_1284728474.62745") :outer("31_1284728474.62745") .param pmc param_444 .annotate 'line', 42 .lex "$_", param_444 @@ -9963,11 +10645,11 @@ .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "termish" :subid("34_1282016526.02169") :method :outer("11_1282016526.02169") +.sub "termconj" :subid("34_1284728474.62745") :method :outer("11_1284728474.62745") .param pmc param_463 .annotate 'line', 52 - .const 'Sub' $P476 = "35_1282016526.02169" - capture_lex $P476 + .const 'Sub' $P480 = "35_1284728474.62745" + capture_lex $P480 new $P462, 'ExceptionHandler' set_addr $P462, control_461 $P462."handle_types"(.CONTROL_RETURN) @@ -9977,2724 +10659,2841 @@ .annotate 'line', 53 new $P464, "Undef" .lex "$past", $P464 +.annotate 'line', 52 + find_lex $P465, "$past" .annotate 'line', 54 - new $P465, "Undef" - .lex "$lastlit", $P465 -.annotate 'line', 53 - get_hll_global $P466, ["PAST"], "Regex" find_lex $P467, "$/" - $P468 = $P466."new"("concat" :named("pasttype"), $P467 :named("node")) - store_lex "$past", $P468 -.annotate 'line', 54 - new $P469, "Integer" - assign $P469, 0 - store_lex "$lastlit", $P469 + unless_null $P467, vivify_166 + $P467 = root_new ['parrot';'Hash'] + vivify_166: + set $P468, $P467["termish"] + unless_null $P468, vivify_167 + new $P468, "Undef" + vivify_167: + 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'] + vivify_168: + set $P490, $P489["termish"] + unless_null $P490, vivify_169 + $P490 = root_new ['parrot';'ResizablePMCArray'] + vivify_169: + set $P491, $P490[0] + unless_null $P491, vivify_170 + new $P491, "Undef" + vivify_170: + $P492 = $P491."ast"() + store_lex "$past", $P492 +.annotate 'line', 60 + goto if_466_end + if_466: .annotate 'line', 55 - find_lex $P471, "$/" - unless_null $P471, vivify_164 - $P471 = root_new ['parrot';'Hash'] - vivify_164: - set $P472, $P471["noun"] - unless_null $P472, vivify_165 - new $P472, "Undef" - vivify_165: - defined $I473, $P472 - unless $I473, for_undef_166 - iter $P470, $P472 - new $P522, 'ExceptionHandler' - set_addr $P522, loop521_handler - $P522."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P522 - loop521_test: - unless $P470, loop521_done - shift $P474, $P470 - loop521_redo: - .const 'Sub' $P476 = "35_1282016526.02169" - capture_lex $P476 - $P476($P474) - loop521_next: - goto loop521_test - loop521_handler: - .local pmc exception - .get_results (exception) - getattribute $P523, exception, 'type' - eq $P523, .CONTROL_LOOP_NEXT, loop521_next - eq $P523, .CONTROL_LOOP_REDO, loop521_redo - loop521_done: + 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'] + vivify_171: + set $P476, $P475["termish"] + unless_null $P476, vivify_172 + new $P476, "Undef" + vivify_172: + defined $I477, $P476 + unless $I477, for_undef_173 + iter $P474, $P476 + new $P487, 'ExceptionHandler' + set_addr $P487, loop486_handler + $P487."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P487 + loop486_test: + unless $P474, loop486_done + shift $P478, $P474 + loop486_redo: + .const 'Sub' $P480 = "35_1284728474.62745" + capture_lex $P480 + $P480($P478) + loop486_next: + goto loop486_test + loop486_handler: + .local pmc exception + .get_results (exception) + getattribute $P488, exception, 'type' + eq $P488, .CONTROL_LOOP_NEXT, loop486_next + eq $P488, .CONTROL_LOOP_REDO, loop486_redo + loop486_done: pop_eh - for_undef_166: -.annotate 'line', 70 - find_lex $P524, "$/" - find_lex $P525, "$past" - $P526 = $P524."!make"($P525) + for_undef_173: + if_466_end: +.annotate 'line', 63 + find_lex $P493, "$/" + find_lex $P494, "$past" + $P495 = $P493."!make"($P494) .annotate 'line', 52 - .return ($P526) + .return ($P495) control_461: .local pmc exception .get_results (exception) - getattribute $P527, exception, "payload" - .return ($P527) + getattribute $P496, exception, "payload" + .return ($P496) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block475" :anon :subid("35_1282016526.02169") :outer("34_1282016526.02169") - .param pmc param_478 +.sub "_block479" :anon :subid("35_1284728474.62745") :outer("34_1284728474.62745") + .param pmc param_481 .annotate 'line', 56 - new $P477, "Undef" - .lex "$ast", $P477 - .lex "$_", param_478 - find_lex $P479, "$_" - $P480 = $P479."ast"() - store_lex "$ast", $P480 + .lex "$_", param_481 .annotate 'line', 57 - find_lex $P483, "$ast" - if $P483, if_482 - set $P481, $P483 - goto if_482_end - if_482: -.annotate 'line', 58 - find_lex $P490, "$lastlit" - if $P490, if_489 - set $P488, $P490 - goto if_489_end - if_489: - find_lex $P491, "$ast" - $S492 = $P491."pasttype"() - iseq $I493, $S492, "literal" - new $P488, 'Integer' - set $P488, $I493 - if_489_end: - if $P488, if_487 - set $P486, $P488 - goto if_487_end - if_487: -.annotate 'line', 59 - get_hll_global $P494, ["PAST"], "Node" - find_lex $P495, "$ast" - unless_null $P495, vivify_167 - $P495 = root_new ['parrot';'ResizablePMCArray'] - vivify_167: - set $P496, $P495[0] - unless_null $P496, vivify_168 - new $P496, "Undef" - vivify_168: - $P497 = $P494."ACCEPTS"($P496) - isfalse $I498, $P497 - new $P486, 'Integer' - set $P486, $I498 - if_487_end: - if $P486, if_485 -.annotate 'line', 63 - find_lex $P505, "$past" - find_lex $P506, "$ast" - $P505."push"($P506) -.annotate 'line', 64 - find_lex $P511, "$ast" - $S512 = $P511."pasttype"() - iseq $I513, $S512, "literal" - if $I513, if_510 - new $P509, 'Integer' - set $P509, $I513 - goto if_510_end - if_510: -.annotate 'line', 65 - get_hll_global $P514, ["PAST"], "Node" - find_lex $P515, "$ast" - unless_null $P515, vivify_169 - $P515 = root_new ['parrot';'ResizablePMCArray'] - vivify_169: - set $P516, $P515[0] - unless_null $P516, vivify_170 - new $P516, "Undef" - vivify_170: - $P517 = $P514."ACCEPTS"($P516) - isfalse $I518, $P517 - new $P509, 'Integer' - set $P509, $I518 - if_510_end: - if $P509, if_508 - new $P520, "Integer" - assign $P520, 0 - set $P507, $P520 - goto if_508_end - if_508: - find_lex $P519, "$ast" - set $P507, $P519 - if_508_end: + 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_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_500 .annotate 'line', 66 - store_lex "$lastlit", $P507 -.annotate 'line', 62 - set $P484, $P507 -.annotate 'line', 59 - goto if_485_end - if_485: -.annotate 'line', 60 - find_lex $P499, "$lastlit" - unless_null $P499, vivify_171 - $P499 = root_new ['parrot';'ResizablePMCArray'] - vivify_171: - set $P500, $P499[0] - unless_null $P500, vivify_172 - new $P500, "Undef" - vivify_172: - find_lex $P501, "$ast" - unless_null $P501, vivify_173 - $P501 = root_new ['parrot';'ResizablePMCArray'] - vivify_173: - set $P502, $P501[0] - unless_null $P502, vivify_174 + .const 'Sub' $P513 = "37_1284728474.62745" + capture_lex $P513 + new $P499, 'ExceptionHandler' + set_addr $P499, control_498 + $P499."handle_types"(.CONTROL_RETURN) + 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'] vivify_174: - concat $P503, $P500, $P502 - find_lex $P504, "$lastlit" - unless_null $P504, vivify_175 - $P504 = root_new ['parrot';'ResizablePMCArray'] - store_lex "$lastlit", $P504 + set $P509, $P508["noun"] + unless_null $P509, vivify_175 + new $P509, "Undef" vivify_175: - set $P504[0], $P503 -.annotate 'line', 59 - set $P484, $P503 - if_485_end: -.annotate 'line', 57 - set $P481, $P484 - if_482_end: -.annotate 'line', 55 - .return ($P481) + defined $I510, $P509 + unless $I510, for_undef_176 + iter $P507, $P509 + new $P559, 'ExceptionHandler' + set_addr $P559, loop558_handler + $P559."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P559 + loop558_test: + unless $P507, loop558_done + shift $P511, $P507 + loop558_redo: + .const 'Sub' $P513 = "37_1284728474.62745" + capture_lex $P513 + $P513($P511) + loop558_next: + goto loop558_test + loop558_handler: + .local pmc exception + .get_results (exception) + getattribute $P560, exception, 'type' + eq $P560, .CONTROL_LOOP_NEXT, loop558_next + eq $P560, .CONTROL_LOOP_REDO, loop558_redo + 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 + .get_results (exception) + getattribute $P564, exception, "payload" + .return ($P564) .end .namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "quantified_atom" :subid("36_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_531 +.sub "_block512" :anon :subid("37_1284728474.62745") :outer("36_1284728474.62745") + .param pmc param_515 +.annotate 'line', 70 + 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 + goto if_526_end + if_526: + find_lex $P528, "$ast" + $S529 = $P528."pasttype"() + iseq $I530, $S529, "literal" + new $P525, 'Integer' + set $P525, $I530 + if_526_end: + if $P525, if_524 + set $P523, $P525 + goto if_524_end + if_524: .annotate 'line', 73 - .const 'Sub' $P540 = "37_1282016526.02169" - capture_lex $P540 - new $P530, 'ExceptionHandler' - set_addr $P530, control_529 - $P530."handle_types"(.CONTROL_RETURN) - push_eh $P530 - .lex "self", self - .lex "$/", param_531 -.annotate 'line', 74 - new $P532, "Undef" - .lex "$past", $P532 - find_lex $P533, "$/" - unless_null $P533, vivify_176 - $P533 = root_new ['parrot';'Hash'] - vivify_176: - set $P534, $P533["atom"] - unless_null $P534, vivify_177 - new $P534, "Undef" + get_hll_global $P531, ["PAST"], "Node" + find_lex $P532, "$ast" + unless_null $P532, vivify_177 + $P532 = root_new ['parrot';'ResizablePMCArray'] vivify_177: - $P535 = $P534."ast"() - store_lex "$past", $P535 -.annotate 'line', 75 - find_lex $P537, "$/" - unless_null $P537, vivify_178 - $P537 = root_new ['parrot';'Hash'] + set $P533, $P532[0] + unless_null $P533, vivify_178 + new $P533, "Undef" vivify_178: - set $P538, $P537["quantifier"] - unless_null $P538, vivify_179 - new $P538, "Undef" + $P534 = $P531."ACCEPTS"($P533) + isfalse $I535, $P534 + new $P523, 'Integer' + 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" + if $I550, if_547 + new $P546, 'Integer' + 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 + $P552 = root_new ['parrot';'ResizablePMCArray'] vivify_179: - if $P538, if_536 -.annotate 'line', 81 - find_lex $P555, "$/" - unless_null $P555, vivify_180 - $P555 = root_new ['parrot';'Hash'] + set $P553, $P552[0] + unless_null $P553, vivify_180 + new $P553, "Undef" vivify_180: - set $P556, $P555["backmod"] - unless_null $P556, vivify_181 - $P556 = root_new ['parrot';'ResizablePMCArray'] + $P554 = $P551."ACCEPTS"($P553) + isfalse $I555, $P554 + new $P546, 'Integer' + set $P546, $I555 + if_547_end: + if $P546, if_545 + new $P557, "Integer" + assign $P557, 0 + set $P544, $P557 + goto if_545_end + if_545: + 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'] vivify_181: - set $P557, $P556[0] - unless_null $P557, vivify_182 - new $P557, "Undef" + set $P537, $P536[0] + unless_null $P537, vivify_182 + new $P537, "Undef" vivify_182: - unless $P557, if_554_end - find_lex $P558, "$past" - find_lex $P559, "$/" - unless_null $P559, vivify_183 - $P559 = root_new ['parrot';'Hash'] + find_lex $P538, "$ast" + unless_null $P538, vivify_183 + $P538 = root_new ['parrot';'ResizablePMCArray'] vivify_183: - set $P560, $P559["backmod"] - unless_null $P560, vivify_184 - $P560 = root_new ['parrot';'ResizablePMCArray'] + set $P539, $P538[0] + unless_null $P539, vivify_184 + new $P539, "Undef" vivify_184: - set $P561, $P560[0] - unless_null $P561, vivify_185 - new $P561, "Undef" + concat $P540, $P537, $P539 + find_lex $P541, "$lastlit" + unless_null $P541, vivify_185 + $P541 = root_new ['parrot';'ResizablePMCArray'] + store_lex "$lastlit", $P541 vivify_185: - "backmod"($P558, $P561) - if_554_end: - goto if_536_end - if_536: -.annotate 'line', 75 - .const 'Sub' $P540 = "37_1282016526.02169" - capture_lex $P540 - $P540() - if_536_end: -.annotate 'line', 82 - find_lex $P567, "$past" - if $P567, if_566 - set $P565, $P567 - goto if_566_end - if_566: - find_lex $P568, "$past" - $P569 = $P568."backtrack"() - isfalse $I570, $P569 - new $P565, 'Integer' - set $P565, $I570 - if_566_end: - if $P565, if_564 - set $P563, $P565 - goto if_564_end - if_564: - get_global $P571, "@MODIFIERS" - unless_null $P571, vivify_189 - $P571 = root_new ['parrot';'ResizablePMCArray'] - vivify_189: - set $P572, $P571[0] - unless_null $P572, vivify_190 - $P572 = root_new ['parrot';'Hash'] - vivify_190: - set $P573, $P572["r"] - unless_null $P573, vivify_191 - new $P573, "Undef" - vivify_191: - set $P563, $P573 - if_564_end: - unless $P563, if_562_end -.annotate 'line', 83 - find_lex $P574, "$past" - $P574."backtrack"("r") - if_562_end: -.annotate 'line', 85 - find_lex $P575, "$/" - find_lex $P576, "$past" - $P577 = $P575."!make"($P576) + set $P541[0], $P540 .annotate 'line', 73 - .return ($P577) - control_529: - .local pmc exception - .get_results (exception) - getattribute $P578, exception, "payload" - .return ($P578) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.sub "_block539" :anon :subid("37_1282016526.02169") :outer("36_1282016526.02169") -.annotate 'line', 77 - new $P541, "Undef" - .lex "$qast", $P541 -.annotate 'line', 76 - find_lex $P543, "$past" - isfalse $I544, $P543 - unless $I544, if_542_end - find_lex $P545, "$/" - $P546 = $P545."CURSOR"() - $P546."panic"("Quantifier follows nothing") - if_542_end: -.annotate 'line', 77 - find_lex $P547, "$/" - unless_null $P547, vivify_186 - $P547 = root_new ['parrot';'Hash'] - vivify_186: - set $P548, $P547["quantifier"] - unless_null $P548, vivify_187 - $P548 = root_new ['parrot';'ResizablePMCArray'] - vivify_187: - set $P549, $P548[0] - unless_null $P549, vivify_188 - new $P549, "Undef" - vivify_188: - $P550 = $P549."ast"() - store_lex "$qast", $P550 -.annotate 'line', 78 - find_lex $P551, "$qast" - find_lex $P552, "$past" - $P551."unshift"($P552) -.annotate 'line', 79 - find_lex $P553, "$qast" - store_lex "$past", $P553 -.annotate 'line', 75 - .return ($P553) + 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 "atom" :subid("38_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_582 -.annotate 'line', 88 - new $P581, 'ExceptionHandler' - set_addr $P581, control_580 - $P581."handle_types"(.CONTROL_RETURN) - push_eh $P581 +.sub "quantified_atom" :subid("38_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_568 +.annotate 'line', 87 + .const 'Sub' $P577 = "39_1284728474.62745" + capture_lex $P577 + new $P567, 'ExceptionHandler' + set_addr $P567, control_566 + $P567."handle_types"(.CONTROL_RETURN) + push_eh $P567 .lex "self", self - .lex "$/", param_582 -.annotate 'line', 89 - new $P583, "Undef" - .lex "$past", $P583 + .lex "$/", param_568 .annotate 'line', 88 - find_lex $P584, "$past" -.annotate 'line', 90 - find_lex $P586, "$/" - unless_null $P586, vivify_192 - $P586 = root_new ['parrot';'Hash'] + new $P569, "Undef" + .lex "$past", $P569 + find_lex $P570, "$/" + unless_null $P570, vivify_186 + $P570 = root_new ['parrot';'Hash'] + vivify_186: + set $P571, $P570["atom"] + unless_null $P571, vivify_187 + new $P571, "Undef" + 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'] + vivify_188: + set $P575, $P574["quantifier"] + unless_null $P575, vivify_189 + 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'] + vivify_190: + set $P593, $P592["backmod"] + unless_null $P593, vivify_191 + $P593 = root_new ['parrot';'ResizablePMCArray'] + vivify_191: + set $P594, $P593[0] + unless_null $P594, vivify_192 + new $P594, "Undef" vivify_192: - set $P587, $P586["metachar"] - unless_null $P587, vivify_193 - new $P587, "Undef" + unless $P594, if_591_end + find_lex $P595, "$past" + find_lex $P596, "$/" + unless_null $P596, vivify_193 + $P596 = root_new ['parrot';'Hash'] vivify_193: - if $P587, if_585 -.annotate 'line', 92 - get_hll_global $P591, ["PAST"], "Regex" - find_lex $P592, "$/" - set $S593, $P592 - find_lex $P594, "$/" - $P595 = $P591."new"($S593, "literal" :named("pasttype"), $P594 :named("node")) - store_lex "$past", $P595 -.annotate 'line', 93 - get_global $P597, "@MODIFIERS" + set $P597, $P596["backmod"] unless_null $P597, vivify_194 $P597 = root_new ['parrot';'ResizablePMCArray'] vivify_194: set $P598, $P597[0] unless_null $P598, vivify_195 - $P598 = root_new ['parrot';'Hash'] + new $P598, "Undef" vivify_195: - set $P599, $P598["i"] - unless_null $P599, vivify_196 - new $P599, "Undef" - vivify_196: - unless $P599, if_596_end - find_lex $P600, "$past" - $P600."subtype"("ignorecase") - if_596_end: -.annotate 'line', 91 - goto if_585_end - if_585: -.annotate 'line', 90 - find_lex $P588, "$/" - unless_null $P588, vivify_197 - $P588 = root_new ['parrot';'Hash'] - vivify_197: - set $P589, $P588["metachar"] - unless_null $P589, vivify_198 - new $P589, "Undef" - vivify_198: - $P590 = $P589."ast"() - store_lex "$past", $P590 - if_585_end: -.annotate 'line', 95 - find_lex $P601, "$/" - find_lex $P602, "$past" - $P603 = $P601."!make"($P602) -.annotate 'line', 88 - .return ($P603) - control_580: + "backmod"($P595, $P598) + if_591_end: + goto if_573_end + if_573: +.annotate 'line', 89 + .const 'Sub' $P577 = "39_1284728474.62745" + capture_lex $P577 + $P577() + if_573_end: +.annotate 'line', 96 + find_lex $P604, "$past" + if $P604, if_603 + set $P602, $P604 + goto if_603_end + if_603: + find_lex $P605, "$past" + $P606 = $P605."backtrack"() + isfalse $I607, $P606 + new $P602, 'Integer' + set $P602, $I607 + if_603_end: + if $P602, if_601 + set $P600, $P602 + goto if_601_end + if_601: + get_global $P608, "@MODIFIERS" + unless_null $P608, vivify_199 + $P608 = root_new ['parrot';'ResizablePMCArray'] + vivify_199: + set $P609, $P608[0] + unless_null $P609, vivify_200 + $P609 = root_new ['parrot';'Hash'] + vivify_200: + set $P610, $P609["r"] + unless_null $P610, vivify_201 + new $P610, "Undef" + vivify_201: + 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 .get_results (exception) - getattribute $P604, exception, "payload" - .return ($P604) + getattribute $P615, exception, "payload" + .return ($P615) .end .namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "quantifier:sym<*>" :subid("39_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_608 -.annotate 'line', 98 - new $P607, 'ExceptionHandler' - set_addr $P607, control_606 - $P607."handle_types"(.CONTROL_RETURN) - push_eh $P607 - .lex "self", self - .lex "$/", param_608 -.annotate 'line', 99 - new $P609, "Undef" - .lex "$past", $P609 - get_hll_global $P610, ["PAST"], "Regex" - find_lex $P611, "$/" - $P612 = $P610."new"("quant" :named("pasttype"), $P611 :named("node")) - store_lex "$past", $P612 -.annotate 'line', 100 - find_lex $P613, "$/" - find_lex $P614, "$past" - find_lex $P615, "$/" - unless_null $P615, vivify_199 - $P615 = root_new ['parrot';'Hash'] - vivify_199: - set $P616, $P615["backmod"] - unless_null $P616, vivify_200 - new $P616, "Undef" - vivify_200: - $P617 = "backmod"($P614, $P616) - $P618 = $P613."!make"($P617) -.annotate 'line', 98 - .return ($P618) - control_606: - .local pmc exception - .get_results (exception) - getattribute $P619, exception, "payload" - .return ($P619) +.sub "_block576" :anon :subid("39_1284728474.62745") :outer("38_1284728474.62745") +.annotate 'line', 91 + new $P578, "Undef" + .lex "$qast", $P578 +.annotate 'line', 90 + find_lex $P580, "$past" + isfalse $I581, $P580 + unless $I581, if_579_end + find_lex $P582, "$/" + $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'] + vivify_196: + set $P585, $P584["quantifier"] + unless_null $P585, vivify_197 + $P585 = root_new ['parrot';'ResizablePMCArray'] + vivify_197: + set $P586, $P585[0] + unless_null $P586, vivify_198 + new $P586, "Undef" + 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 "quantifier:sym<+>" :subid("40_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_623 -.annotate 'line', 103 - new $P622, 'ExceptionHandler' - set_addr $P622, control_621 - $P622."handle_types"(.CONTROL_RETURN) - push_eh $P622 +.sub "atom" :subid("40_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_619 +.annotate 'line', 102 + new $P618, 'ExceptionHandler' + set_addr $P618, control_617 + $P618."handle_types"(.CONTROL_RETURN) + push_eh $P618 .lex "self", self - .lex "$/", param_623 + .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'] + vivify_202: + set $P624, $P623["metachar"] + unless_null $P624, vivify_203 new $P624, "Undef" - .lex "$past", $P624 - get_hll_global $P625, ["PAST"], "Regex" - find_lex $P626, "$/" - $P627 = $P625."new"("quant" :named("pasttype"), 1 :named("min"), $P626 :named("node")) - store_lex "$past", $P627 + 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'] + vivify_204: + set $P635, $P634[0] + unless_null $P635, vivify_205 + $P635 = root_new ['parrot';'Hash'] + vivify_205: + set $P636, $P635["i"] + unless_null $P636, vivify_206 + new $P636, "Undef" + vivify_206: + unless $P636, if_633_end + find_lex $P637, "$past" + $P637."subtype"("ignorecase") + if_633_end: .annotate 'line', 105 - find_lex $P628, "$/" - find_lex $P629, "$past" - find_lex $P630, "$/" - unless_null $P630, vivify_201 - $P630 = root_new ['parrot';'Hash'] - vivify_201: - set $P631, $P630["backmod"] - unless_null $P631, vivify_202 - new $P631, "Undef" - vivify_202: - $P632 = "backmod"($P629, $P631) - $P633 = $P628."!make"($P632) -.annotate 'line', 103 - .return ($P633) - control_621: + goto if_622_end + if_622: +.annotate 'line', 104 + find_lex $P625, "$/" + unless_null $P625, vivify_207 + $P625 = root_new ['parrot';'Hash'] + vivify_207: + set $P626, $P625["metachar"] + unless_null $P626, vivify_208 + new $P626, "Undef" + vivify_208: + $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 .get_results (exception) - getattribute $P634, exception, "payload" - .return ($P634) + getattribute $P641, exception, "payload" + .return ($P641) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "quantifier:sym" :subid("41_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_638 -.annotate 'line', 108 - new $P637, 'ExceptionHandler' - set_addr $P637, control_636 - $P637."handle_types"(.CONTROL_RETURN) - push_eh $P637 +.sub "quantifier:sym<*>" :subid("41_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_645 +.annotate 'line', 112 + new $P644, 'ExceptionHandler' + set_addr $P644, control_643 + $P644."handle_types"(.CONTROL_RETURN) + push_eh $P644 .lex "self", self - .lex "$/", param_638 -.annotate 'line', 109 - new $P639, "Undef" - .lex "$past", $P639 - get_hll_global $P640, ["PAST"], "Regex" - find_lex $P641, "$/" - $P642 = $P640."new"("quant" :named("pasttype"), 0 :named("min"), 1 :named("max"), $P641 :named("node")) - store_lex "$past", $P642 -.annotate 'line', 110 - find_lex $P643, "$/" - find_lex $P644, "$past" - find_lex $P645, "$/" - unless_null $P645, vivify_203 - $P645 = root_new ['parrot';'Hash'] - vivify_203: - set $P646, $P645["backmod"] - unless_null $P646, vivify_204 + .lex "$/", param_645 +.annotate 'line', 113 new $P646, "Undef" - vivify_204: - $P647 = "backmod"($P644, $P646) - $P643."!make"($P647) -.annotate 'line', 111 + .lex "$past", $P646 + get_hll_global $P647, ["PAST"], "Regex" find_lex $P648, "$/" - find_lex $P649, "$past" - $P650 = $P648."!make"($P649) -.annotate 'line', 108 - .return ($P650) - control_636: + $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, "$/" + unless_null $P652, vivify_209 + $P652 = root_new ['parrot';'Hash'] + vivify_209: + set $P653, $P652["backmod"] + unless_null $P653, vivify_210 + new $P653, "Undef" + vivify_210: + $P654 = "backmod"($P651, $P653) + $P655 = $P650."!make"($P654) +.annotate 'line', 112 + .return ($P655) + control_643: .local pmc exception .get_results (exception) - getattribute $P651, exception, "payload" - .return ($P651) + getattribute $P656, exception, "payload" + .return ($P656) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "quantifier:sym<**>" :subid("42_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_655 -.annotate 'line', 114 - .const 'Sub' $P670 = "43_1282016526.02169" - capture_lex $P670 - new $P654, 'ExceptionHandler' - set_addr $P654, control_653 - $P654."handle_types"(.CONTROL_RETURN) - push_eh $P654 - .lex "self", self - .lex "$/", param_655 -.annotate 'line', 115 - new $P656, "Undef" - .lex "$past", $P656 -.annotate 'line', 116 - new $P657, "Undef" - .lex "$ws", $P657 -.annotate 'line', 114 - find_lex $P658, "$past" -.annotate 'line', 116 - find_lex $P661, "$/" - unless_null $P661, vivify_205 - $P661 = root_new ['parrot';'Hash'] - vivify_205: - set $P662, $P661["normspace"] - unless_null $P662, vivify_206 - new $P662, "Undef" - vivify_206: - if $P662, if_660 - set $P659, $P662 - goto if_660_end - if_660: - get_global $P663, "@MODIFIERS" - unless_null $P663, vivify_207 - $P663 = root_new ['parrot';'ResizablePMCArray'] - vivify_207: - set $P664, $P663[0] - unless_null $P664, vivify_208 - $P664 = root_new ['parrot';'Hash'] - vivify_208: - set $P665, $P664["s"] - unless_null $P665, vivify_209 - new $P665, "Undef" - vivify_209: - set $P659, $P665 - if_660_end: - store_lex "$ws", $P659 +.sub "quantifier:sym<+>" :subid("42_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_660 .annotate 'line', 117 + 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, "$/" - unless_null $P667, vivify_210 + unless_null $P667, vivify_211 $P667 = root_new ['parrot';'Hash'] - vivify_210: - set $P668, $P667["quantified_atom"] - unless_null $P668, vivify_211 - new $P668, "Undef" vivify_211: - if $P668, if_666 -.annotate 'line', 133 - get_hll_global $P688, ["PAST"], "Regex" - find_lex $P689, "$/" - unless_null $P689, vivify_212 - $P689 = root_new ['parrot';'Hash'] + set $P668, $P667["backmod"] + unless_null $P668, vivify_212 + new $P668, "Undef" vivify_212: - set $P690, $P689["min"] - unless_null $P690, vivify_213 - new $P690, "Undef" + $P669 = "backmod"($P666, $P668) + $P670 = $P665."!make"($P669) +.annotate 'line', 117 + .return ($P670) + control_658: + .local pmc exception + .get_results (exception) + getattribute $P671, exception, "payload" + .return ($P671) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.include "except_types.pasm" +.sub "quantifier:sym" :subid("43_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_675 +.annotate 'line', 122 + 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, "$/" + unless_null $P682, vivify_213 + $P682 = root_new ['parrot';'Hash'] vivify_213: - set $N691, $P690 - find_lex $P692, "$/" - $P693 = $P688."new"("quant" :named("pasttype"), $N691 :named("min"), $P692 :named("node")) - store_lex "$past", $P693 -.annotate 'line', 134 - find_lex $P695, "$/" - unless_null $P695, vivify_214 - $P695 = root_new ['parrot';'Hash'] + set $P683, $P682["backmod"] + unless_null $P683, vivify_214 + new $P683, "Undef" vivify_214: - set $P696, $P695["max"] - unless_null $P696, vivify_215 - new $P696, "Undef" + $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 + .get_results (exception) + getattribute $P688, exception, "payload" + .return ($P688) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.include "except_types.pasm" +.sub "quantifier:sym<**>" :subid("44_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_692 +.annotate 'line', 128 + .const 'Sub' $P707 = "45_1284728474.62745" + capture_lex $P707 + new $P691, 'ExceptionHandler' + set_addr $P691, control_690 + $P691."handle_types"(.CONTROL_RETURN) + 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'] vivify_215: - isfalse $I697, $P696 - if $I697, if_694 -.annotate 'line', 135 - find_lex $P703, "$/" - unless_null $P703, vivify_216 - $P703 = root_new ['parrot';'Hash'] + set $P699, $P698["normspace"] + unless_null $P699, vivify_216 + new $P699, "Undef" vivify_216: - set $P704, $P703["max"] - unless_null $P704, vivify_217 - $P704 = root_new ['parrot';'ResizablePMCArray'] + if $P699, if_697 + set $P696, $P699 + goto if_697_end + if_697: + get_global $P700, "@MODIFIERS" + unless_null $P700, vivify_217 + $P700 = root_new ['parrot';'ResizablePMCArray'] vivify_217: - set $P705, $P704[0] - unless_null $P705, vivify_218 - new $P705, "Undef" + set $P701, $P700[0] + unless_null $P701, vivify_218 + $P701 = root_new ['parrot';'Hash'] vivify_218: - set $S706, $P705 - isne $I707, $S706, "*" - unless $I707, if_702_end - find_lex $P708, "$past" - find_lex $P709, "$/" - unless_null $P709, vivify_219 - $P709 = root_new ['parrot';'Hash'] + set $P702, $P701["s"] + unless_null $P702, vivify_219 + new $P702, "Undef" vivify_219: - set $P710, $P709["max"] - unless_null $P710, vivify_220 - $P710 = root_new ['parrot';'ResizablePMCArray'] + 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'] vivify_220: - set $P711, $P710[0] - unless_null $P711, vivify_221 - new $P711, "Undef" + set $P705, $P704["quantified_atom"] + unless_null $P705, vivify_221 + new $P705, "Undef" vivify_221: - set $N712, $P711 - $P708."max"($N712) - if_702_end: - goto if_694_end - if_694: -.annotate 'line', 134 - find_lex $P698, "$past" - find_lex $P699, "$/" - unless_null $P699, vivify_222 - $P699 = root_new ['parrot';'Hash'] + if $P705, if_703 +.annotate 'line', 147 + get_hll_global $P725, ["PAST"], "Regex" + find_lex $P726, "$/" + unless_null $P726, vivify_222 + $P726 = root_new ['parrot';'Hash'] vivify_222: - set $P700, $P699["min"] - unless_null $P700, vivify_223 - new $P700, "Undef" + set $P727, $P726["min"] + unless_null $P727, vivify_223 + new $P727, "Undef" vivify_223: - set $N701, $P700 - $P698."max"($N701) - if_694_end: -.annotate 'line', 136 - find_lex $P714, "$ws" - unless $P714, if_713_end - find_lex $P715, "$past" - get_hll_global $P716, ["PAST"], "Regex" - $P717 = $P716."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype")) - $P715."sep"($P717) - if_713_end: -.annotate 'line', 132 - goto if_666_end - if_666: -.annotate 'line', 117 - .const 'Sub' $P670 = "43_1282016526.02169" - capture_lex $P670 - $P670() - if_666_end: -.annotate 'line', 140 - find_lex $P718, "$/" - find_lex $P719, "$past" - find_lex $P720, "$/" - unless_null $P720, vivify_226 - $P720 = root_new ['parrot';'Hash'] - vivify_226: - set $P721, $P720["backmod"] - unless_null $P721, vivify_227 - new $P721, "Undef" - vivify_227: - $P722 = "backmod"($P719, $P721) - $P723 = $P718."!make"($P722) -.annotate 'line', 114 - .return ($P723) - control_653: - .local pmc exception - .get_results (exception) - getattribute $P724, exception, "payload" - .return ($P724) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.sub "_block669" :anon :subid("43_1282016526.02169") :outer("42_1282016526.02169") -.annotate 'line', 118 - new $P671, "Undef" - .lex "$ast", $P671 - find_lex $P672, "$/" - unless_null $P672, vivify_224 - $P672 = root_new ['parrot';'Hash'] + set $N728, $P727 + 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'] vivify_224: - set $P673, $P672["quantified_atom"] - unless_null $P673, vivify_225 - new $P673, "Undef" + set $P733, $P732["max"] + unless_null $P733, vivify_225 + new $P733, "Undef" vivify_225: - $P674 = $P673."ast"() - store_lex "$ast", $P674 -.annotate 'line', 119 - find_lex $P676, "$ws" - unless $P676, if_675_end -.annotate 'line', 120 - get_hll_global $P677, ["PAST"], "Regex" -.annotate 'line', 122 - get_hll_global $P678, ["PAST"], "Regex" - $P679 = $P678."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype")) - find_lex $P680, "$ast" -.annotate 'line', 125 - get_hll_global $P681, ["PAST"], "Regex" - $P682 = $P681."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype")) - $P683 = $P677."new"($P679, $P680, $P682, "concat" :named("pasttype")) -.annotate 'line', 120 - store_lex "$ast", $P683 - if_675_end: -.annotate 'line', 129 - get_hll_global $P684, ["PAST"], "Regex" - find_lex $P685, "$ast" - find_lex $P686, "$/" - $P687 = $P684."new"("quant" :named("pasttype"), 1 :named("min"), $P685 :named("sep"), $P686 :named("node")) - store_lex "$past", $P687 -.annotate 'line', 117 - .return ($P687) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "metachar:sym" :subid("44_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_728 -.annotate 'line', 143 - new $P727, 'ExceptionHandler' - set_addr $P727, control_726 - $P727."handle_types"(.CONTROL_RETURN) - push_eh $P727 - .lex "self", self - .lex "$/", param_728 -.annotate 'line', 144 - new $P729, "Undef" - .lex "$past", $P729 -.annotate 'line', 145 - get_global $P732, "@MODIFIERS" - unless_null $P732, vivify_228 - $P732 = root_new ['parrot';'ResizablePMCArray'] + isfalse $I734, $P733 + if $I734, if_731 +.annotate 'line', 149 + find_lex $P740, "$/" + unless_null $P740, vivify_226 + $P740 = root_new ['parrot';'Hash'] + vivify_226: + set $P741, $P740["max"] + unless_null $P741, vivify_227 + $P741 = root_new ['parrot';'ResizablePMCArray'] + vivify_227: + set $P742, $P741[0] + unless_null $P742, vivify_228 + new $P742, "Undef" vivify_228: - set $P733, $P732[0] - unless_null $P733, vivify_229 - $P733 = root_new ['parrot';'Hash'] + set $S743, $P742 + isne $I744, $S743, "*" + unless $I744, if_739_end + find_lex $P745, "$past" + find_lex $P746, "$/" + unless_null $P746, vivify_229 + $P746 = root_new ['parrot';'Hash'] vivify_229: - set $P734, $P733["s"] - unless_null $P734, vivify_230 - new $P734, "Undef" + set $P747, $P746["max"] + unless_null $P747, vivify_230 + $P747 = root_new ['parrot';'ResizablePMCArray'] vivify_230: - if $P734, if_731 - new $P738, "Integer" - assign $P738, 0 - set $P730, $P738 + set $P748, $P747[0] + unless_null $P748, vivify_231 + new $P748, "Undef" + vivify_231: + set $N749, $P748 + $P745."max"($N749) + if_739_end: goto if_731_end if_731: - get_hll_global $P735, ["PAST"], "Regex" +.annotate 'line', 148 + find_lex $P735, "$past" find_lex $P736, "$/" - $P737 = $P735."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype"), $P736 :named("node")) - set $P730, $P737 + unless_null $P736, vivify_232 + $P736 = root_new ['parrot';'Hash'] + vivify_232: + set $P737, $P736["min"] + unless_null $P737, vivify_233 + new $P737, "Undef" + vivify_233: + set $N738, $P737 + $P735."max"($N738) if_731_end: - store_lex "$past", $P730 -.annotate 'line', 148 - find_lex $P739, "$/" - find_lex $P740, "$past" - $P741 = $P739."!make"($P740) -.annotate 'line', 143 - .return ($P741) - control_726: +.annotate 'line', 150 + find_lex $P751, "$ws" + unless $P751, if_750_end + find_lex $P752, "$past" + get_hll_global $P753, ["PAST"], "Regex" + $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_1284728474.62745" + capture_lex $P707 + $P707() + if_703_end: +.annotate 'line', 154 + find_lex $P755, "$/" + find_lex $P756, "$past" + find_lex $P757, "$/" + unless_null $P757, vivify_236 + $P757 = root_new ['parrot';'Hash'] + vivify_236: + set $P758, $P757["backmod"] + unless_null $P758, vivify_237 + new $P758, "Undef" + vivify_237: + $P759 = "backmod"($P756, $P758) + $P760 = $P755."!make"($P759) +.annotate 'line', 128 + .return ($P760) + control_690: .local pmc exception .get_results (exception) - getattribute $P742, exception, "payload" - .return ($P742) + getattribute $P761, exception, "payload" + .return ($P761) .end .namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "metachar:sym<[ ]>" :subid("45_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_746 -.annotate 'line', 152 - new $P745, 'ExceptionHandler' - set_addr $P745, control_744 - $P745."handle_types"(.CONTROL_RETURN) - push_eh $P745 - .lex "self", self - .lex "$/", param_746 -.annotate 'line', 153 - find_lex $P747, "$/" - find_lex $P748, "$/" - unless_null $P748, vivify_231 - $P748 = root_new ['parrot';'Hash'] - vivify_231: - set $P749, $P748["nibbler"] - unless_null $P749, vivify_232 - new $P749, "Undef" - vivify_232: - $P750 = $P749."ast"() - $P751 = $P747."!make"($P750) -.annotate 'line', 152 - .return ($P751) - control_744: - .local pmc exception - .get_results (exception) - getattribute $P752, exception, "payload" - .return ($P752) +.sub "_block706" :anon :subid("45_1284728474.62745") :outer("44_1284728474.62745") +.annotate 'line', 132 + new $P708, "Undef" + .lex "$ast", $P708 + find_lex $P709, "$/" + unless_null $P709, vivify_234 + $P709 = root_new ['parrot';'Hash'] + vivify_234: + set $P710, $P709["quantified_atom"] + unless_null $P710, vivify_235 + new $P710, "Undef" + 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<( )>" :subid("46_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_756 -.annotate 'line', 156 - new $P755, 'ExceptionHandler' - set_addr $P755, control_754 - $P755."handle_types"(.CONTROL_RETURN) - push_eh $P755 - .lex "self", self - .lex "$/", param_756 +.sub "metachar:sym" :subid("46_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_765 .annotate 'line', 157 - new $P757, "Undef" - .lex "$subpast", $P757 + 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 $P758, "Undef" - .lex "$past", $P758 + new $P766, "Undef" + .lex "$past", $P766 +.annotate 'line', 159 + get_global $P769, "@MODIFIERS" + unless_null $P769, vivify_238 + $P769 = root_new ['parrot';'ResizablePMCArray'] + vivify_238: + set $P770, $P769[0] + unless_null $P770, vivify_239 + $P770 = root_new ['parrot';'Hash'] + vivify_239: + set $P771, $P770["s"] + unless_null $P771, vivify_240 + new $P771, "Undef" + vivify_240: + if $P771, if_768 + new $P775, "Integer" + assign $P775, 0 + set $P767, $P775 + goto if_768_end + if_768: + get_hll_global $P772, ["PAST"], "Regex" + find_lex $P773, "$/" + $P774 = $P772."new"("ws", "subrule" :named("pasttype"), "method" :named("subtype"), $P773 :named("node")) + 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 - find_lex $P759, "$/" - unless_null $P759, vivify_233 - $P759 = root_new ['parrot';'Hash'] - vivify_233: - set $P760, $P759["nibbler"] - unless_null $P760, vivify_234 - new $P760, "Undef" - vivify_234: - $P761 = $P760."ast"() - $P762 = "buildsub"($P761) - store_lex "$subpast", $P762 -.annotate 'line', 158 - get_hll_global $P763, ["PAST"], "Regex" - find_lex $P764, "$subpast" - find_lex $P765, "$/" - $P766 = $P763."new"($P764, "subrule" :named("pasttype"), "capture" :named("subtype"), $P765 :named("node")) - store_lex "$past", $P766 -.annotate 'line', 160 - find_lex $P767, "$/" - find_lex $P768, "$past" - $P769 = $P767."!make"($P768) -.annotate 'line', 156 - .return ($P769) - control_754: + .return ($P778) + control_763: .local pmc exception .get_results (exception) - getattribute $P770, exception, "payload" - .return ($P770) + getattribute $P779, exception, "payload" + .return ($P779) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<'>" :subid("47_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_774 -.annotate 'line', 163 - new $P773, 'ExceptionHandler' - set_addr $P773, control_772 - $P773."handle_types"(.CONTROL_RETURN) - push_eh $P773 - .lex "self", self - .lex "$/", param_774 -.annotate 'line', 164 - new $P775, "Undef" - .lex "$quote", $P775 +.sub "metachar:sym<[ ]>" :subid("47_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_783 .annotate 'line', 166 - new $P776, "Undef" - .lex "$past", $P776 -.annotate 'line', 164 - find_lex $P777, "$/" - unless_null $P777, vivify_235 - $P777 = root_new ['parrot';'Hash'] - vivify_235: - set $P778, $P777["quote_EXPR"] - unless_null $P778, vivify_236 - new $P778, "Undef" - vivify_236: - $P779 = $P778."ast"() - store_lex "$quote", $P779 -.annotate 'line', 165 - get_hll_global $P781, ["PAST"], "Val" - find_lex $P782, "$quote" - $P783 = $P781."ACCEPTS"($P782) - unless $P783, if_780_end - find_lex $P784, "$quote" - $P785 = $P784."value"() - store_lex "$quote", $P785 - if_780_end: -.annotate 'line', 166 - get_hll_global $P786, ["PAST"], "Regex" - find_lex $P787, "$quote" - find_lex $P788, "$/" - $P789 = $P786."new"($P787, "literal" :named("pasttype"), $P788 :named("node")) - store_lex "$past", $P789 + 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 - get_global $P791, "@MODIFIERS" - unless_null $P791, vivify_237 - $P791 = root_new ['parrot';'ResizablePMCArray'] - vivify_237: - set $P792, $P791[0] - unless_null $P792, vivify_238 - $P792 = root_new ['parrot';'Hash'] - vivify_238: - set $P793, $P792["i"] - unless_null $P793, vivify_239 - new $P793, "Undef" - vivify_239: - unless $P793, if_790_end - find_lex $P794, "$past" - $P794."subtype"("ignorecase") - if_790_end: -.annotate 'line', 168 - find_lex $P795, "$/" - find_lex $P796, "$past" - $P797 = $P795."!make"($P796) -.annotate 'line', 163 - .return ($P797) - control_772: + find_lex $P784, "$/" + find_lex $P785, "$/" + unless_null $P785, vivify_241 + $P785 = root_new ['parrot';'Hash'] + vivify_241: + set $P786, $P785["nibbler"] + unless_null $P786, vivify_242 + new $P786, "Undef" + vivify_242: + $P787 = $P786."ast"() + $P788 = $P784."!make"($P787) +.annotate 'line', 166 + .return ($P788) + control_781: .local pmc exception .get_results (exception) - getattribute $P798, exception, "payload" - .return ($P798) + getattribute $P789, exception, "payload" + .return ($P789) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<\">" :subid("48_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_802 -.annotate 'line', 171 - new $P801, 'ExceptionHandler' - set_addr $P801, control_800 - $P801."handle_types"(.CONTROL_RETURN) - push_eh $P801 +.sub "metachar:sym<( )>" :subid("48_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_793 +.annotate 'line', 170 + new $P792, 'ExceptionHandler' + set_addr $P792, control_791 + $P792."handle_types"(.CONTROL_RETURN) + push_eh $P792 .lex "self", self - .lex "$/", param_802 -.annotate 'line', 172 - new $P803, "Undef" - .lex "$quote", $P803 -.annotate 'line', 174 - new $P804, "Undef" - .lex "$past", $P804 + .lex "$/", param_793 +.annotate 'line', 171 + new $P794, "Undef" + .lex "$subpast", $P794 .annotate 'line', 172 - find_lex $P805, "$/" - unless_null $P805, vivify_240 - $P805 = root_new ['parrot';'Hash'] - vivify_240: - set $P806, $P805["quote_EXPR"] - unless_null $P806, vivify_241 - new $P806, "Undef" - vivify_241: - $P807 = $P806."ast"() - store_lex "$quote", $P807 -.annotate 'line', 173 - get_hll_global $P809, ["PAST"], "Val" - find_lex $P810, "$quote" - $P811 = $P809."ACCEPTS"($P810) - unless $P811, if_808_end - find_lex $P812, "$quote" - $P813 = $P812."value"() - store_lex "$quote", $P813 - if_808_end: -.annotate 'line', 174 - get_hll_global $P814, ["PAST"], "Regex" - find_lex $P815, "$quote" - find_lex $P816, "$/" - $P817 = $P814."new"($P815, "literal" :named("pasttype"), $P816 :named("node")) - store_lex "$past", $P817 -.annotate 'line', 175 - get_global $P819, "@MODIFIERS" - unless_null $P819, vivify_242 - $P819 = root_new ['parrot';'ResizablePMCArray'] - vivify_242: - set $P820, $P819[0] - unless_null $P820, vivify_243 - $P820 = root_new ['parrot';'Hash'] + new $P795, "Undef" + .lex "$past", $P795 +.annotate 'line', 171 + find_lex $P796, "$/" + unless_null $P796, vivify_243 + $P796 = root_new ['parrot';'Hash'] vivify_243: - set $P821, $P820["i"] - unless_null $P821, vivify_244 - new $P821, "Undef" + set $P797, $P796["nibbler"] + unless_null $P797, vivify_244 + new $P797, "Undef" vivify_244: - unless $P821, if_818_end - find_lex $P822, "$past" - $P822."subtype"("ignorecase") - if_818_end: -.annotate 'line', 176 - find_lex $P823, "$/" - find_lex $P824, "$past" - $P825 = $P823."!make"($P824) -.annotate 'line', 171 - .return ($P825) - control_800: + $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 .get_results (exception) - getattribute $P826, exception, "payload" - .return ($P826) + getattribute $P807, exception, "payload" + .return ($P807) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<.>" :subid("49_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_830 -.annotate 'line', 179 - new $P829, 'ExceptionHandler' - set_addr $P829, control_828 - $P829."handle_types"(.CONTROL_RETURN) - push_eh $P829 +.sub "metachar:sym<'>" :subid("49_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_811 +.annotate 'line', 177 + new $P810, 'ExceptionHandler' + set_addr $P810, control_809 + $P810."handle_types"(.CONTROL_RETURN) + push_eh $P810 .lex "self", self - .lex "$/", param_830 + .lex "$/", param_811 +.annotate 'line', 178 + new $P812, "Undef" + .lex "$quote", $P812 .annotate 'line', 180 - new $P831, "Undef" - .lex "$past", $P831 - get_hll_global $P832, ["PAST"], "Regex" - find_lex $P833, "$/" - $P834 = $P832."new"("charclass" :named("pasttype"), "." :named("subtype"), $P833 :named("node")) - store_lex "$past", $P834 -.annotate 'line', 181 - find_lex $P835, "$/" - find_lex $P836, "$past" - $P837 = $P835."!make"($P836) + new $P813, "Undef" + .lex "$past", $P813 +.annotate 'line', 178 + find_lex $P814, "$/" + unless_null $P814, vivify_245 + $P814 = root_new ['parrot';'Hash'] + vivify_245: + set $P815, $P814["quote_EXPR"] + unless_null $P815, vivify_246 + new $P815, "Undef" + vivify_246: + $P816 = $P815."ast"() + store_lex "$quote", $P816 .annotate 'line', 179 - .return ($P837) - control_828: + get_hll_global $P818, ["PAST"], "Val" + find_lex $P819, "$quote" + $P820 = $P818."ACCEPTS"($P819) + unless $P820, if_817_end + find_lex $P821, "$quote" + $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'] + vivify_247: + set $P829, $P828[0] + unless_null $P829, vivify_248 + $P829 = root_new ['parrot';'Hash'] + vivify_248: + set $P830, $P829["i"] + unless_null $P830, vivify_249 + new $P830, "Undef" + vivify_249: + unless $P830, if_827_end + 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 .get_results (exception) - getattribute $P838, exception, "payload" - .return ($P838) + getattribute $P835, exception, "payload" + .return ($P835) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<^>" :subid("50_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_842 -.annotate 'line', 184 - new $P841, 'ExceptionHandler' - set_addr $P841, control_840 - $P841."handle_types"(.CONTROL_RETURN) - push_eh $P841 - .lex "self", self - .lex "$/", param_842 +.sub "metachar:sym<\">" :subid("50_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_839 .annotate 'line', 185 - new $P843, "Undef" - .lex "$past", $P843 - get_hll_global $P844, ["PAST"], "Regex" - find_lex $P845, "$/" - $P846 = $P844."new"("anchor" :named("pasttype"), "bos" :named("subtype"), $P845 :named("node")) - store_lex "$past", $P846 + 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 - find_lex $P847, "$/" - find_lex $P848, "$past" - $P849 = $P847."!make"($P848) -.annotate 'line', 184 - .return ($P849) - control_840: - .local pmc exception - .get_results (exception) - getattribute $P850, exception, "payload" - .return ($P850) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "metachar:sym<^^>" :subid("51_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_854 + 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'] + vivify_250: + set $P843, $P842["quote_EXPR"] + unless_null $P843, vivify_251 + new $P843, "Undef" + 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) + unless $P848, if_845_end + find_lex $P849, "$quote" + $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 - new $P853, 'ExceptionHandler' - set_addr $P853, control_852 - $P853."handle_types"(.CONTROL_RETURN) - push_eh $P853 - .lex "self", self - .lex "$/", param_854 + get_global $P856, "@MODIFIERS" + unless_null $P856, vivify_252 + $P856 = root_new ['parrot';'ResizablePMCArray'] + vivify_252: + set $P857, $P856[0] + unless_null $P857, vivify_253 + $P857 = root_new ['parrot';'Hash'] + vivify_253: + set $P858, $P857["i"] + unless_null $P858, vivify_254 + new $P858, "Undef" + vivify_254: + unless $P858, if_855_end + find_lex $P859, "$past" + $P859."subtype"("ignorecase") + if_855_end: .annotate 'line', 190 - new $P855, "Undef" - .lex "$past", $P855 - get_hll_global $P856, ["PAST"], "Regex" - find_lex $P857, "$/" - $P858 = $P856."new"("anchor" :named("pasttype"), "bol" :named("subtype"), $P857 :named("node")) - store_lex "$past", $P858 -.annotate 'line', 191 - find_lex $P859, "$/" - find_lex $P860, "$past" - $P861 = $P859."!make"($P860) -.annotate 'line', 189 - .return ($P861) - control_852: + find_lex $P860, "$/" + find_lex $P861, "$past" + $P862 = $P860."!make"($P861) +.annotate 'line', 185 + .return ($P862) + control_837: .local pmc exception .get_results (exception) - getattribute $P862, exception, "payload" - .return ($P862) + getattribute $P863, exception, "payload" + .return ($P863) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<$>" :subid("52_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_866 -.annotate 'line', 194 - new $P865, 'ExceptionHandler' - set_addr $P865, control_864 - $P865."handle_types"(.CONTROL_RETURN) - push_eh $P865 +.sub "metachar:sym<.>" :subid("51_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_867 +.annotate 'line', 193 + new $P866, 'ExceptionHandler' + set_addr $P866, control_865 + $P866."handle_types"(.CONTROL_RETURN) + push_eh $P866 .lex "self", self - .lex "$/", param_866 -.annotate 'line', 195 - new $P867, "Undef" - .lex "$past", $P867 - get_hll_global $P868, ["PAST"], "Regex" - find_lex $P869, "$/" - $P870 = $P868."new"("anchor" :named("pasttype"), "eos" :named("subtype"), $P869 :named("node")) - store_lex "$past", $P870 -.annotate 'line', 196 - find_lex $P871, "$/" - find_lex $P872, "$past" - $P873 = $P871."!make"($P872) + .lex "$/", param_867 .annotate 'line', 194 - .return ($P873) - control_864: + 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 .get_results (exception) - getattribute $P874, exception, "payload" - .return ($P874) + getattribute $P875, exception, "payload" + .return ($P875) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<$$>" :subid("53_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_878 -.annotate 'line', 199 - new $P877, 'ExceptionHandler' - set_addr $P877, control_876 - $P877."handle_types"(.CONTROL_RETURN) - push_eh $P877 +.sub "metachar:sym<^>" :subid("52_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_879 +.annotate 'line', 198 + new $P878, 'ExceptionHandler' + set_addr $P878, control_877 + $P878."handle_types"(.CONTROL_RETURN) + push_eh $P878 .lex "self", self - .lex "$/", param_878 -.annotate 'line', 200 - new $P879, "Undef" - .lex "$past", $P879 - get_hll_global $P880, ["PAST"], "Regex" - find_lex $P881, "$/" - $P882 = $P880."new"("anchor" :named("pasttype"), "eol" :named("subtype"), $P881 :named("node")) - store_lex "$past", $P882 -.annotate 'line', 201 - find_lex $P883, "$/" - find_lex $P884, "$past" - $P885 = $P883."!make"($P884) + .lex "$/", param_879 .annotate 'line', 199 - .return ($P885) - control_876: + 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 .get_results (exception) - getattribute $P886, exception, "payload" - .return ($P886) + getattribute $P887, exception, "payload" + .return ($P887) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<:::>" :subid("54_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_890 -.annotate 'line', 204 - new $P889, 'ExceptionHandler' - set_addr $P889, control_888 - $P889."handle_types"(.CONTROL_RETURN) - push_eh $P889 +.sub "metachar:sym<^^>" :subid("53_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_891 +.annotate 'line', 203 + new $P890, 'ExceptionHandler' + set_addr $P890, control_889 + $P890."handle_types"(.CONTROL_RETURN) + push_eh $P890 .lex "self", self - .lex "$/", param_890 -.annotate 'line', 205 - new $P891, "Undef" - .lex "$past", $P891 - get_hll_global $P892, ["PAST"], "Regex" - find_lex $P893, "$/" - $P894 = $P892."new"("cut" :named("pasttype"), $P893 :named("node")) - store_lex "$past", $P894 -.annotate 'line', 206 - find_lex $P895, "$/" - find_lex $P896, "$past" - $P897 = $P895."!make"($P896) + .lex "$/", param_891 .annotate 'line', 204 - .return ($P897) - control_888: + 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 .get_results (exception) - getattribute $P898, exception, "payload" - .return ($P898) + getattribute $P899, exception, "payload" + .return ($P899) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("55_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_902 -.annotate 'line', 209 - new $P901, 'ExceptionHandler' - set_addr $P901, control_900 - $P901."handle_types"(.CONTROL_RETURN) - push_eh $P901 +.sub "metachar:sym<$>" :subid("54_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_903 +.annotate 'line', 208 + new $P902, 'ExceptionHandler' + set_addr $P902, control_901 + $P902."handle_types"(.CONTROL_RETURN) + push_eh $P902 .lex "self", self - .lex "$/", param_902 -.annotate 'line', 210 - new $P903, "Undef" - .lex "$past", $P903 - get_hll_global $P904, ["PAST"], "Regex" - find_lex $P905, "$/" - $P906 = $P904."new"("anchor" :named("pasttype"), "lwb" :named("subtype"), $P905 :named("node")) - store_lex "$past", $P906 -.annotate 'line', 211 - find_lex $P907, "$/" - find_lex $P908, "$past" - $P909 = $P907."!make"($P908) + .lex "$/", param_903 .annotate 'line', 209 - .return ($P909) - control_900: + 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 .get_results (exception) - getattribute $P910, exception, "payload" - .return ($P910) + getattribute $P911, exception, "payload" + .return ($P911) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("56_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_914 -.annotate 'line', 214 - new $P913, 'ExceptionHandler' - set_addr $P913, control_912 - $P913."handle_types"(.CONTROL_RETURN) - push_eh $P913 +.sub "metachar:sym<$$>" :subid("55_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_915 +.annotate 'line', 213 + new $P914, 'ExceptionHandler' + set_addr $P914, control_913 + $P914."handle_types"(.CONTROL_RETURN) + push_eh $P914 .lex "self", self - .lex "$/", param_914 -.annotate 'line', 215 - new $P915, "Undef" - .lex "$past", $P915 - get_hll_global $P916, ["PAST"], "Regex" - find_lex $P917, "$/" - $P918 = $P916."new"("anchor" :named("pasttype"), "rwb" :named("subtype"), $P917 :named("node")) - store_lex "$past", $P918 -.annotate 'line', 216 - find_lex $P919, "$/" - find_lex $P920, "$past" - $P921 = $P919."!make"($P920) + .lex "$/", param_915 .annotate 'line', 214 - .return ($P921) - control_912: + 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 .get_results (exception) - getattribute $P922, exception, "payload" - .return ($P922) + getattribute $P923, exception, "payload" + .return ($P923) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("57_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_926 -.annotate 'line', 219 - new $P925, 'ExceptionHandler' - set_addr $P925, control_924 - $P925."handle_types"(.CONTROL_RETURN) - push_eh $P925 +.sub "metachar:sym<:::>" :subid("56_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_927 +.annotate 'line', 218 + new $P926, 'ExceptionHandler' + set_addr $P926, control_925 + $P926."handle_types"(.CONTROL_RETURN) + push_eh $P926 .lex "self", self - .lex "$/", param_926 -.annotate 'line', 220 - find_lex $P927, "$/" - find_lex $P928, "$/" - unless_null $P928, vivify_245 - $P928 = root_new ['parrot';'Hash'] - vivify_245: - set $P929, $P928["backslash"] - unless_null $P929, vivify_246 - new $P929, "Undef" - vivify_246: - $P930 = $P929."ast"() - $P931 = $P927."!make"($P930) + .lex "$/", param_927 .annotate 'line', 219 - .return ($P931) - control_924: + 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 .get_results (exception) - getattribute $P932, exception, "payload" - .return ($P932) + getattribute $P935, exception, "payload" + .return ($P935) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("58_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_936 +.sub "metachar:sym" :subid("57_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_939 .annotate 'line', 223 - new $P935, 'ExceptionHandler' - set_addr $P935, control_934 - $P935."handle_types"(.CONTROL_RETURN) - push_eh $P935 + new $P938, 'ExceptionHandler' + set_addr $P938, control_937 + $P938."handle_types"(.CONTROL_RETURN) + push_eh $P938 .lex "self", self - .lex "$/", param_936 + .lex "$/", param_939 .annotate 'line', 224 - find_lex $P937, "$/" - find_lex $P938, "$/" - unless_null $P938, vivify_247 - $P938 = root_new ['parrot';'Hash'] - vivify_247: - set $P939, $P938["mod_internal"] - unless_null $P939, vivify_248 - new $P939, "Undef" - vivify_248: - $P940 = $P939."ast"() - $P941 = $P937."!make"($P940) + 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 ($P941) - control_934: + .return ($P946) + control_937: .local pmc exception .get_results (exception) - getattribute $P942, exception, "payload" - .return ($P942) + getattribute $P947, exception, "payload" + .return ($P947) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("59_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_946 -.annotate 'line', 227 - new $P945, 'ExceptionHandler' - set_addr $P945, control_944 - $P945."handle_types"(.CONTROL_RETURN) - push_eh $P945 - .lex "self", self - .lex "$/", param_946 +.sub "metachar:sym" :subid("58_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_951 .annotate 'line', 228 - find_lex $P947, "$/" - find_lex $P948, "$/" - unless_null $P948, vivify_249 - $P948 = root_new ['parrot';'Hash'] - vivify_249: - set $P949, $P948["assertion"] - unless_null $P949, vivify_250 - new $P949, "Undef" - vivify_250: - $P950 = $P949."ast"() - $P951 = $P947."!make"($P950) -.annotate 'line', 227 - .return ($P951) - control_944: + 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 .get_results (exception) - getattribute $P952, exception, "payload" - .return ($P952) + getattribute $P959, exception, "payload" + .return ($P959) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<~>" :subid("60_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_956 -.annotate 'line', 231 - new $P955, 'ExceptionHandler' - set_addr $P955, control_954 - $P955."handle_types"(.CONTROL_RETURN) - push_eh $P955 - .lex "self", self - .lex "$/", param_956 -.annotate 'line', 232 - find_lex $P957, "$/" - get_hll_global $P958, ["PAST"], "Regex" +.sub "metachar:sym" :subid("59_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_963 .annotate 'line', 233 - find_lex $P959, "$/" - unless_null $P959, vivify_251 - $P959 = root_new ['parrot';'Hash'] - vivify_251: - set $P960, $P959["EXPR"] - unless_null $P960, vivify_252 - new $P960, "Undef" - vivify_252: - $P961 = $P960."ast"() + 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 - get_hll_global $P962, ["PAST"], "Regex" -.annotate 'line', 235 - find_lex $P963, "$/" - unless_null $P963, vivify_253 - $P963 = root_new ['parrot';'Hash'] - vivify_253: - set $P964, $P963["GOAL"] - unless_null $P964, vivify_254 - new $P964, "Undef" - vivify_254: - $P965 = $P964."ast"() -.annotate 'line', 236 - get_hll_global $P966, ["PAST"], "Regex" - find_lex $P967, "$/" - unless_null $P967, vivify_255 - $P967 = root_new ['parrot';'Hash'] + find_lex $P964, "$/" + find_lex $P965, "$/" + unless_null $P965, vivify_255 + $P965 = root_new ['parrot';'Hash'] vivify_255: - set $P968, $P967["GOAL"] - unless_null $P968, vivify_256 - new $P968, "Undef" + set $P966, $P965["backslash"] + unless_null $P966, vivify_256 + new $P966, "Undef" vivify_256: - set $S969, $P968 - $P970 = $P966."new"("FAILGOAL", $S969, "subrule" :named("pasttype"), "method" :named("subtype")) - $P971 = $P962."new"($P965, $P970, "alt" :named("pasttype")) -.annotate 'line', 234 - $P972 = $P958."new"($P961, $P971, "concat" :named("pasttype")) -.annotate 'line', 232 - $P973 = $P957."!make"($P972) -.annotate 'line', 231 - .return ($P973) - control_954: + $P967 = $P966."ast"() + $P968 = $P964."!make"($P967) +.annotate 'line', 233 + .return ($P968) + control_961: .local pmc exception .get_results (exception) - getattribute $P974, exception, "payload" - .return ($P974) + getattribute $P969, exception, "payload" + .return ($P969) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym<{*}>" :subid("61_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_978 -.annotate 'line', 244 - new $P977, 'ExceptionHandler' - set_addr $P977, control_976 - $P977."handle_types"(.CONTROL_RETURN) - push_eh $P977 +.sub "metachar:sym" :subid("60_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_973 +.annotate 'line', 237 + new $P972, 'ExceptionHandler' + set_addr $P972, control_971 + $P972."handle_types"(.CONTROL_RETURN) + push_eh $P972 .lex "self", self - .lex "$/", param_978 -.annotate 'line', 245 - new $P979, "Undef" - .lex "$past", $P979 -.annotate 'line', 246 - find_lex $P982, "$/" - unless_null $P982, vivify_257 - $P982 = root_new ['parrot';'Hash'] + .lex "$/", param_973 +.annotate 'line', 238 + find_lex $P974, "$/" + find_lex $P975, "$/" + unless_null $P975, vivify_257 + $P975 = root_new ['parrot';'Hash'] vivify_257: - set $P983, $P982["key"] - unless_null $P983, vivify_258 - new $P983, "Undef" + set $P976, $P975["mod_internal"] + unless_null $P976, vivify_258 + new $P976, "Undef" vivify_258: - if $P983, if_981 - new $P991, "Integer" - assign $P991, 0 - set $P980, $P991 - goto if_981_end - if_981: - get_hll_global $P984, ["PAST"], "Regex" + $P977 = $P976."ast"() + $P978 = $P974."!make"($P977) +.annotate 'line', 237 + .return ($P978) + control_971: + .local pmc exception + .get_results (exception) + getattribute $P979, exception, "payload" + .return ($P979) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.include "except_types.pasm" +.sub "metachar:sym" :subid("61_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_983 +.annotate 'line', 241 + 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 $P985 = root_new ['parrot';'Hash'] vivify_259: - set $P986, $P985["key"] + set $P986, $P985["assertion"] unless_null $P986, vivify_260 - $P986 = root_new ['parrot';'ResizablePMCArray'] + new $P986, "Undef" vivify_260: - set $P987, $P986[0] - unless_null $P987, vivify_261 - new $P987, "Undef" - vivify_261: - set $S988, $P987 - find_lex $P989, "$/" - $P990 = $P984."new"($S988, "reduce" :named("pasttype"), $P989 :named("node")) - set $P980, $P990 - if_981_end: - store_lex "$past", $P980 -.annotate 'line', 248 - find_lex $P992, "$/" - find_lex $P993, "$past" - $P994 = $P992."!make"($P993) -.annotate 'line', 244 - .return ($P994) - control_976: + $P987 = $P986."ast"() + $P988 = $P984."!make"($P987) +.annotate 'line', 241 + .return ($P988) + control_981: .local pmc exception .get_results (exception) - getattribute $P995, exception, "payload" - .return ($P995) + getattribute $P989, exception, "payload" + .return ($P989) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("62_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_999 -.annotate 'line', 251 - new $P998, 'ExceptionHandler' - set_addr $P998, control_997 - $P998."handle_types"(.CONTROL_RETURN) - push_eh $P998 +.sub "metachar:sym<~>" :subid("62_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_993 +.annotate 'line', 245 + new $P992, 'ExceptionHandler' + set_addr $P992, control_991 + $P992."handle_types"(.CONTROL_RETURN) + push_eh $P992 .lex "self", self - .lex "$/", param_999 -.annotate 'line', 252 - new $P1000, "Undef" - .lex "$past", $P1000 -.annotate 'line', 253 - new $P1001, "Undef" - .lex "$name", $P1001 -.annotate 'line', 251 - find_lex $P1002, "$past" -.annotate 'line', 253 - find_lex $P1005, "$/" - unless_null $P1005, vivify_262 - $P1005 = root_new ['parrot';'Hash'] + .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'] + vivify_261: + set $P997, $P996["EXPR"] + unless_null $P997, vivify_262 + new $P997, "Undef" vivify_262: - set $P1006, $P1005["pos"] - unless_null $P1006, vivify_263 - new $P1006, "Undef" + $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'] vivify_263: - if $P1006, if_1004 - find_lex $P1010, "$/" - unless_null $P1010, vivify_264 - $P1010 = root_new ['parrot';'Hash'] + set $P1001, $P1000["GOAL"] + unless_null $P1001, vivify_264 + new $P1001, "Undef" vivify_264: - set $P1011, $P1010["name"] - unless_null $P1011, vivify_265 - new $P1011, "Undef" + $P1002 = $P1001."ast"() +.annotate 'line', 250 + get_hll_global $P1003, ["PAST"], "Regex" + find_lex $P1004, "$/" + unless_null $P1004, vivify_265 + $P1004 = root_new ['parrot';'Hash'] vivify_265: - set $S1012, $P1011 - new $P1003, 'String' - set $P1003, $S1012 - goto if_1004_end - if_1004: - find_lex $P1007, "$/" - unless_null $P1007, vivify_266 - $P1007 = root_new ['parrot';'Hash'] + set $P1005, $P1004["GOAL"] + unless_null $P1005, vivify_266 + new $P1005, "Undef" vivify_266: - set $P1008, $P1007["pos"] - unless_null $P1008, vivify_267 - new $P1008, "Undef" - vivify_267: - set $N1009, $P1008 - new $P1003, 'Float' - set $P1003, $N1009 - if_1004_end: - store_lex "$name", $P1003 -.annotate 'line', 254 - find_lex $P1014, "$/" - unless_null $P1014, vivify_268 - $P1014 = root_new ['parrot';'Hash'] - vivify_268: - set $P1015, $P1014["quantified_atom"] - unless_null $P1015, vivify_269 - new $P1015, "Undef" - vivify_269: - if $P1015, if_1013 -.annotate 'line', 265 - get_hll_global $P1046, ["PAST"], "Regex" - find_lex $P1047, "$name" - find_lex $P1048, "$/" - $P1049 = $P1046."new"("!BACKREF", $P1047, "subrule" :named("pasttype"), "method" :named("subtype"), $P1048 :named("node")) - store_lex "$past", $P1049 -.annotate 'line', 264 - goto if_1013_end - if_1013: -.annotate 'line', 255 - find_lex $P1016, "$/" - unless_null $P1016, vivify_270 - $P1016 = root_new ['parrot';'Hash'] - vivify_270: - set $P1017, $P1016["quantified_atom"] - unless_null $P1017, vivify_271 - $P1017 = root_new ['parrot';'ResizablePMCArray'] - vivify_271: - set $P1018, $P1017[0] - unless_null $P1018, vivify_272 - new $P1018, "Undef" - vivify_272: - $P1019 = $P1018."ast"() - store_lex "$past", $P1019 -.annotate 'line', 256 - find_lex $P1023, "$past" - $S1024 = $P1023."pasttype"() - iseq $I1025, $S1024, "quant" - if $I1025, if_1022 - new $P1021, 'Integer' - set $P1021, $I1025 - goto if_1022_end - if_1022: - find_lex $P1026, "$past" - unless_null $P1026, vivify_273 - $P1026 = root_new ['parrot';'ResizablePMCArray'] - vivify_273: - set $P1027, $P1026[0] - unless_null $P1027, vivify_274 - new $P1027, "Undef" - vivify_274: - $S1028 = $P1027."pasttype"() - iseq $I1029, $S1028, "subrule" - new $P1021, 'Integer' - set $P1021, $I1029 - if_1022_end: - if $P1021, if_1020 -.annotate 'line', 259 - find_lex $P1035, "$past" - $S1036 = $P1035."pasttype"() - iseq $I1037, $S1036, "subrule" - if $I1037, if_1034 -.annotate 'line', 261 - get_hll_global $P1041, ["PAST"], "Regex" - find_lex $P1042, "$past" - find_lex $P1043, "$name" - find_lex $P1044, "$/" - $P1045 = $P1041."new"($P1042, $P1043 :named("name"), "subcapture" :named("pasttype"), $P1044 :named("node")) - store_lex "$past", $P1045 -.annotate 'line', 260 - goto if_1034_end - if_1034: -.annotate 'line', 259 - find_lex $P1038, "self" - find_lex $P1039, "$past" - find_lex $P1040, "$name" - $P1038."subrule_alias"($P1039, $P1040) - if_1034_end: - goto if_1020_end - if_1020: -.annotate 'line', 257 - find_lex $P1030, "self" - find_lex $P1031, "$past" - unless_null $P1031, vivify_275 - $P1031 = root_new ['parrot';'ResizablePMCArray'] - vivify_275: - set $P1032, $P1031[0] - unless_null $P1032, vivify_276 - new $P1032, "Undef" - vivify_276: - find_lex $P1033, "$name" - $P1030."subrule_alias"($P1032, $P1033) - if_1020_end: - if_1013_end: -.annotate 'line', 268 - find_lex $P1050, "$/" - find_lex $P1051, "$past" - $P1052 = $P1050."!make"($P1051) -.annotate 'line', 251 - .return ($P1052) - control_997: + 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 .get_results (exception) - getattribute $P1053, exception, "payload" - .return ($P1053) + getattribute $P1011, exception, "payload" + .return ($P1011) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "metachar:sym" :subid("63_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1057 -.annotate 'line', 271 - new $P1056, 'ExceptionHandler' - set_addr $P1056, control_1055 - $P1056."handle_types"(.CONTROL_RETURN) - push_eh $P1056 - .lex "self", self - .lex "$/", param_1057 -.annotate 'line', 272 - find_lex $P1058, "$/" - get_hll_global $P1059, ["PAST"], "Regex" -.annotate 'line', 273 - get_hll_global $P1060, ["PAST"], "Op" - find_lex $P1061, "$/" - unless_null $P1061, vivify_277 - $P1061 = root_new ['parrot';'Hash'] - vivify_277: - set $P1062, $P1061["pir"] - unless_null $P1062, vivify_278 - new $P1062, "Undef" - vivify_278: - set $S1063, $P1062 - $P1064 = $P1060."new"($S1063 :named("inline"), "inline" :named("pasttype")) - find_lex $P1065, "$/" - $P1066 = $P1059."new"($P1064, "pastnode" :named("pasttype"), $P1065 :named("node")) -.annotate 'line', 272 - $P1067 = $P1058."!make"($P1066) -.annotate 'line', 271 - .return ($P1067) - control_1055: +.sub "metachar:sym<{*}>" :subid("63_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1015 +.annotate 'line', 258 + 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'] + vivify_267: + set $P1020, $P1019["key"] + unless_null $P1020, vivify_268 + new $P1020, "Undef" + vivify_268: + if $P1020, if_1018 + new $P1028, "Integer" + assign $P1028, 0 + set $P1017, $P1028 + goto if_1018_end + if_1018: + get_hll_global $P1021, ["PAST"], "Regex" + find_lex $P1022, "$/" + unless_null $P1022, vivify_269 + $P1022 = root_new ['parrot';'Hash'] + vivify_269: + set $P1023, $P1022["key"] + unless_null $P1023, vivify_270 + $P1023 = root_new ['parrot';'ResizablePMCArray'] + vivify_270: + set $P1024, $P1023[0] + unless_null $P1024, vivify_271 + new $P1024, "Undef" + vivify_271: + set $S1025, $P1024 + find_lex $P1026, "$/" + $P1027 = $P1021."new"($S1025, "reduce" :named("pasttype"), $P1026 :named("node")) + 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 .get_results (exception) - getattribute $P1068, exception, "payload" - .return ($P1068) + getattribute $P1032, exception, "payload" + .return ($P1032) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("64_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1072 -.annotate 'line', 279 - new $P1071, 'ExceptionHandler' - set_addr $P1071, control_1070 - $P1071."handle_types"(.CONTROL_RETURN) - push_eh $P1071 - .lex "self", self - .lex "$/", param_1072 -.annotate 'line', 280 - new $P1073, "Undef" - .lex "$subtype", $P1073 -.annotate 'line', 281 - new $P1074, "Undef" - .lex "$past", $P1074 -.annotate 'line', 280 - find_lex $P1077, "$/" - unless_null $P1077, vivify_279 - $P1077 = root_new ['parrot';'Hash'] - vivify_279: - set $P1078, $P1077["sym"] - unless_null $P1078, vivify_280 - new $P1078, "Undef" - vivify_280: - set $S1079, $P1078 - iseq $I1080, $S1079, "n" - if $I1080, if_1076 - find_lex $P1082, "$/" - unless_null $P1082, vivify_281 - $P1082 = root_new ['parrot';'Hash'] - vivify_281: - set $P1083, $P1082["sym"] - unless_null $P1083, vivify_282 - new $P1083, "Undef" - vivify_282: - set $S1084, $P1083 - new $P1075, 'String' - set $P1075, $S1084 - goto if_1076_end - if_1076: - new $P1081, "String" - assign $P1081, "nl" - set $P1075, $P1081 - if_1076_end: - store_lex "$subtype", $P1075 -.annotate 'line', 281 - get_hll_global $P1085, ["PAST"], "Regex" - find_lex $P1086, "$subtype" - find_lex $P1087, "$/" - $P1088 = $P1085."new"("charclass" :named("pasttype"), $P1086 :named("subtype"), $P1087 :named("node")) - store_lex "$past", $P1088 -.annotate 'line', 282 - find_lex $P1089, "$/" - find_lex $P1090, "$past" - $P1091 = $P1089."!make"($P1090) +.sub "metachar:sym" :subid("64_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1036 +.annotate 'line', 265 + 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'] + vivify_272: + set $P1043, $P1042["pos"] + unless_null $P1043, vivify_273 + new $P1043, "Undef" + vivify_273: + if $P1043, if_1041 + find_lex $P1047, "$/" + unless_null $P1047, vivify_274 + $P1047 = root_new ['parrot';'Hash'] + vivify_274: + set $P1048, $P1047["name"] + unless_null $P1048, vivify_275 + new $P1048, "Undef" + vivify_275: + set $S1049, $P1048 + new $P1040, 'String' + set $P1040, $S1049 + goto if_1041_end + if_1041: + find_lex $P1044, "$/" + unless_null $P1044, vivify_276 + $P1044 = root_new ['parrot';'Hash'] + vivify_276: + set $P1045, $P1044["pos"] + unless_null $P1045, vivify_277 + new $P1045, "Undef" + vivify_277: + set $N1046, $P1045 + new $P1040, 'Float' + 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'] + vivify_278: + set $P1052, $P1051["quantified_atom"] + unless_null $P1052, vivify_279 + new $P1052, "Undef" + vivify_279: + if $P1052, if_1050 .annotate 'line', 279 - .return ($P1091) - control_1070: + 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'] + vivify_280: + set $P1054, $P1053["quantified_atom"] + unless_null $P1054, vivify_281 + $P1054 = root_new ['parrot';'ResizablePMCArray'] + vivify_281: + set $P1055, $P1054[0] + unless_null $P1055, vivify_282 + new $P1055, "Undef" + vivify_282: + $P1056 = $P1055."ast"() + store_lex "$past", $P1056 +.annotate 'line', 270 + find_lex $P1060, "$past" + $S1061 = $P1060."pasttype"() + iseq $I1062, $S1061, "quant" + if $I1062, if_1059 + new $P1058, 'Integer' + set $P1058, $I1062 + goto if_1059_end + if_1059: + find_lex $P1063, "$past" + unless_null $P1063, vivify_283 + $P1063 = root_new ['parrot';'ResizablePMCArray'] + vivify_283: + set $P1064, $P1063[0] + unless_null $P1064, vivify_284 + new $P1064, "Undef" + vivify_284: + $S1065 = $P1064."pasttype"() + iseq $I1066, $S1065, "subrule" + new $P1058, 'Integer' + 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" + $P1075."subrule_alias"($P1076, $P1077) + 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 + $P1068 = root_new ['parrot';'ResizablePMCArray'] + vivify_285: + set $P1069, $P1068[0] + unless_null $P1069, vivify_286 + new $P1069, "Undef" + vivify_286: + find_lex $P1070, "$name" + $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 .get_results (exception) - getattribute $P1092, exception, "payload" - .return ($P1092) + getattribute $P1090, exception, "payload" + .return ($P1090) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("65_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1096 +.sub "metachar:sym" :subid("65_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1094 .annotate 'line', 285 - new $P1095, 'ExceptionHandler' - set_addr $P1095, control_1094 - $P1095."handle_types"(.CONTROL_RETURN) - push_eh $P1095 + new $P1093, 'ExceptionHandler' + set_addr $P1093, control_1092 + $P1093."handle_types"(.CONTROL_RETURN) + push_eh $P1093 .lex "self", self - .lex "$/", param_1096 + .lex "$/", param_1094 .annotate 'line', 286 - new $P1097, "Undef" - .lex "$past", $P1097 - get_hll_global $P1098, ["PAST"], "Regex" + find_lex $P1095, "$/" + get_hll_global $P1096, ["PAST"], "Regex" .annotate 'line', 287 - find_lex $P1099, "$/" - unless_null $P1099, vivify_283 - $P1099 = root_new ['parrot';'Hash'] - vivify_283: - set $P1100, $P1099["sym"] - unless_null $P1100, vivify_284 - new $P1100, "Undef" - vivify_284: - set $S1101, $P1100 - iseq $I1102, $S1101, "B" - find_lex $P1103, "$/" - $P1104 = $P1098."new"("\b", "enumcharlist" :named("pasttype"), $I1102 :named("negate"), $P1103 :named("node")) + get_hll_global $P1097, ["PAST"], "Op" + find_lex $P1098, "$/" + unless_null $P1098, vivify_287 + $P1098 = root_new ['parrot';'Hash'] + vivify_287: + set $P1099, $P1098["pir"] + unless_null $P1099, vivify_288 + new $P1099, "Undef" + vivify_288: + set $S1100, $P1099 + $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 - store_lex "$past", $P1104 -.annotate 'line', 288 - find_lex $P1105, "$/" - find_lex $P1106, "$past" - $P1107 = $P1105."!make"($P1106) + $P1104 = $P1095."!make"($P1103) .annotate 'line', 285 - .return ($P1107) - control_1094: + .return ($P1104) + control_1092: .local pmc exception .get_results (exception) - getattribute $P1108, exception, "payload" - .return ($P1108) + getattribute $P1105, exception, "payload" + .return ($P1105) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("66_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1112 -.annotate 'line', 291 - new $P1111, 'ExceptionHandler' - set_addr $P1111, control_1110 - $P1111."handle_types"(.CONTROL_RETURN) - push_eh $P1111 - .lex "self", self - .lex "$/", param_1112 -.annotate 'line', 292 - new $P1113, "Undef" - .lex "$past", $P1113 - get_hll_global $P1114, ["PAST"], "Regex" +.sub "backslash:sym" :subid("66_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1109 .annotate 'line', 293 - find_lex $P1115, "$/" - unless_null $P1115, vivify_285 - $P1115 = root_new ['parrot';'Hash'] - vivify_285: - set $P1116, $P1115["sym"] - unless_null $P1116, vivify_286 - new $P1116, "Undef" - vivify_286: - set $S1117, $P1116 - iseq $I1118, $S1117, "E" - find_lex $P1119, "$/" - $P1120 = $P1114."new"("\e", "enumcharlist" :named("pasttype"), $I1118 :named("negate"), $P1119 :named("node")) -.annotate 'line', 292 - store_lex "$past", $P1120 + 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 - find_lex $P1121, "$/" - find_lex $P1122, "$past" - $P1123 = $P1121."!make"($P1122) -.annotate 'line', 291 - .return ($P1123) - control_1110: + 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'] + vivify_289: + set $P1115, $P1114["sym"] + unless_null $P1115, vivify_290 + new $P1115, "Undef" + vivify_290: + set $S1116, $P1115 + iseq $I1117, $S1116, "n" + if $I1117, if_1113 + find_lex $P1119, "$/" + unless_null $P1119, vivify_291 + $P1119 = root_new ['parrot';'Hash'] + vivify_291: + set $P1120, $P1119["sym"] + unless_null $P1120, vivify_292 + new $P1120, "Undef" + vivify_292: + set $S1121, $P1120 + new $P1112, 'String' + set $P1112, $S1121 + goto if_1113_end + if_1113: + new $P1118, "String" + assign $P1118, "nl" + 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 .get_results (exception) - getattribute $P1124, exception, "payload" - .return ($P1124) + getattribute $P1129, exception, "payload" + .return ($P1129) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("67_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1128 -.annotate 'line', 297 - new $P1127, 'ExceptionHandler' - set_addr $P1127, control_1126 - $P1127."handle_types"(.CONTROL_RETURN) - push_eh $P1127 - .lex "self", self - .lex "$/", param_1128 -.annotate 'line', 298 - new $P1129, "Undef" - .lex "$past", $P1129 - get_hll_global $P1130, ["PAST"], "Regex" +.sub "backslash:sym" :subid("67_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1133 .annotate 'line', 299 - find_lex $P1131, "$/" - unless_null $P1131, vivify_287 - $P1131 = root_new ['parrot';'Hash'] - vivify_287: - set $P1132, $P1131["sym"] - unless_null $P1132, vivify_288 - new $P1132, "Undef" - vivify_288: - set $S1133, $P1132 - iseq $I1134, $S1133, "F" - find_lex $P1135, "$/" - $P1136 = $P1130."new"("\f", "enumcharlist" :named("pasttype"), $I1134 :named("negate"), $P1135 :named("node")) -.annotate 'line', 298 - store_lex "$past", $P1136 + 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'] + vivify_293: + set $P1137, $P1136["sym"] + unless_null $P1137, vivify_294 + new $P1137, "Undef" + vivify_294: + set $S1138, $P1137 + iseq $I1139, $S1138, "B" + find_lex $P1140, "$/" + $P1141 = $P1135."new"("\b", "enumcharlist" :named("pasttype"), $I1139 :named("negate"), $P1140 :named("node")) .annotate 'line', 300 - find_lex $P1137, "$/" - find_lex $P1138, "$past" - $P1139 = $P1137."!make"($P1138) -.annotate 'line', 297 - .return ($P1139) - control_1126: + 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 .get_results (exception) - getattribute $P1140, exception, "payload" - .return ($P1140) + getattribute $P1145, exception, "payload" + .return ($P1145) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("68_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1144 -.annotate 'line', 303 - new $P1143, 'ExceptionHandler' - set_addr $P1143, control_1142 - $P1143."handle_types"(.CONTROL_RETURN) - push_eh $P1143 - .lex "self", self - .lex "$/", param_1144 -.annotate 'line', 304 - new $P1145, "Undef" - .lex "$past", $P1145 - get_hll_global $P1146, ["PAST"], "Regex" +.sub "backslash:sym" :subid("68_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1149 .annotate 'line', 305 - find_lex $P1147, "$/" - unless_null $P1147, vivify_289 - $P1147 = root_new ['parrot';'Hash'] - vivify_289: - set $P1148, $P1147["sym"] - unless_null $P1148, vivify_290 - new $P1148, "Undef" - vivify_290: - set $S1149, $P1148 - iseq $I1150, $S1149, "H" - find_lex $P1151, "$/" - $P1152 = $P1146."new"(unicode:"\t \x{a0}\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000", "enumcharlist" :named("pasttype"), $I1150 :named("negate"), $P1151 :named("node")) -.annotate 'line', 304 - store_lex "$past", $P1152 + 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 - find_lex $P1153, "$/" - find_lex $P1154, "$past" - $P1155 = $P1153."!make"($P1154) -.annotate 'line', 303 - .return ($P1155) - control_1142: + 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'] + vivify_295: + set $P1153, $P1152["sym"] + unless_null $P1153, vivify_296 + new $P1153, "Undef" + vivify_296: + set $S1154, $P1153 + 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 .get_results (exception) - getattribute $P1156, exception, "payload" - .return ($P1156) + getattribute $P1161, exception, "payload" + .return ($P1161) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("69_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1160 -.annotate 'line', 309 - new $P1159, 'ExceptionHandler' - set_addr $P1159, control_1158 - $P1159."handle_types"(.CONTROL_RETURN) - push_eh $P1159 - .lex "self", self - .lex "$/", param_1160 -.annotate 'line', 310 - new $P1161, "Undef" - .lex "$past", $P1161 - get_hll_global $P1162, ["PAST"], "Regex" +.sub "backslash:sym" :subid("69_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1165 .annotate 'line', 311 - find_lex $P1163, "$/" - unless_null $P1163, vivify_291 - $P1163 = root_new ['parrot';'Hash'] - vivify_291: - set $P1164, $P1163["sym"] - unless_null $P1164, vivify_292 - new $P1164, "Undef" - vivify_292: - set $S1165, $P1164 - iseq $I1166, $S1165, "R" - find_lex $P1167, "$/" - $P1168 = $P1162."new"("\r", "enumcharlist" :named("pasttype"), $I1166 :named("negate"), $P1167 :named("node")) -.annotate 'line', 310 - store_lex "$past", $P1168 + 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'] + vivify_297: + set $P1169, $P1168["sym"] + unless_null $P1169, vivify_298 + new $P1169, "Undef" + vivify_298: + set $S1170, $P1169 + iseq $I1171, $S1170, "F" + find_lex $P1172, "$/" + $P1173 = $P1167."new"("\f", "enumcharlist" :named("pasttype"), $I1171 :named("negate"), $P1172 :named("node")) .annotate 'line', 312 - find_lex $P1169, "$/" - find_lex $P1170, "$past" - $P1171 = $P1169."!make"($P1170) -.annotate 'line', 309 - .return ($P1171) - control_1158: + 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 .get_results (exception) - getattribute $P1172, exception, "payload" - .return ($P1172) + getattribute $P1177, exception, "payload" + .return ($P1177) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("70_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1176 -.annotate 'line', 315 - new $P1175, 'ExceptionHandler' - set_addr $P1175, control_1174 - $P1175."handle_types"(.CONTROL_RETURN) - push_eh $P1175 - .lex "self", self - .lex "$/", param_1176 -.annotate 'line', 316 - new $P1177, "Undef" - .lex "$past", $P1177 - get_hll_global $P1178, ["PAST"], "Regex" +.sub "backslash:sym" :subid("70_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1181 .annotate 'line', 317 - find_lex $P1179, "$/" - unless_null $P1179, vivify_293 - $P1179 = root_new ['parrot';'Hash'] - vivify_293: - set $P1180, $P1179["sym"] - unless_null $P1180, vivify_294 - new $P1180, "Undef" - vivify_294: - set $S1181, $P1180 - iseq $I1182, $S1181, "T" - find_lex $P1183, "$/" - $P1184 = $P1178."new"("\t", "enumcharlist" :named("pasttype"), $I1182 :named("negate"), $P1183 :named("node")) -.annotate 'line', 316 - store_lex "$past", $P1184 + 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 - find_lex $P1185, "$/" - find_lex $P1186, "$past" - $P1187 = $P1185."!make"($P1186) -.annotate 'line', 315 - .return ($P1187) - control_1174: + 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'] + vivify_299: + set $P1185, $P1184["sym"] + unless_null $P1185, vivify_300 + new $P1185, "Undef" + vivify_300: + set $S1186, $P1185 + 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 .get_results (exception) - getattribute $P1188, exception, "payload" - .return ($P1188) + getattribute $P1193, exception, "payload" + .return ($P1193) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("71_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1192 -.annotate 'line', 321 - new $P1191, 'ExceptionHandler' - set_addr $P1191, control_1190 - $P1191."handle_types"(.CONTROL_RETURN) - push_eh $P1191 +.sub "backslash:sym" :subid("71_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1197 +.annotate 'line', 323 + new $P1196, 'ExceptionHandler' + set_addr $P1196, control_1195 + $P1196."handle_types"(.CONTROL_RETURN) + push_eh $P1196 .lex "self", self - .lex "$/", param_1192 -.annotate 'line', 322 - new $P1193, "Undef" - .lex "$past", $P1193 - get_hll_global $P1194, ["PAST"], "Regex" + .lex "$/", param_1197 .annotate 'line', 324 - find_lex $P1195, "$/" - unless_null $P1195, vivify_295 - $P1195 = root_new ['parrot';'Hash'] - vivify_295: - set $P1196, $P1195["sym"] - unless_null $P1196, vivify_296 - new $P1196, "Undef" - vivify_296: - set $S1197, $P1196 - iseq $I1198, $S1197, "V" - find_lex $P1199, "$/" - $P1200 = $P1194."new"(unicode:"\n\x{b}\f\r\x{85}\u2028\u2029", "enumcharlist" :named("pasttype"), $I1198 :named("negate"), $P1199 :named("node")) -.annotate 'line', 322 - store_lex "$past", $P1200 + new $P1198, "Undef" + .lex "$past", $P1198 + get_hll_global $P1199, ["PAST"], "Regex" .annotate 'line', 325 - find_lex $P1201, "$/" - find_lex $P1202, "$past" - $P1203 = $P1201."!make"($P1202) -.annotate 'line', 321 - .return ($P1203) - control_1190: + find_lex $P1200, "$/" + unless_null $P1200, vivify_301 + $P1200 = root_new ['parrot';'Hash'] + vivify_301: + set $P1201, $P1200["sym"] + unless_null $P1201, vivify_302 + new $P1201, "Undef" + vivify_302: + set $S1202, $P1201 + 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 .get_results (exception) - getattribute $P1204, exception, "payload" - .return ($P1204) + getattribute $P1209, exception, "payload" + .return ($P1209) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("72_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1208 -.annotate 'line', 328 - new $P1207, 'ExceptionHandler' - set_addr $P1207, control_1206 - $P1207."handle_types"(.CONTROL_RETURN) - push_eh $P1207 - .lex "self", self - .lex "$/", param_1208 +.sub "backslash:sym" :subid("72_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1213 .annotate 'line', 329 - new $P1209, "Undef" - .lex "$octlit", $P1209 + 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 - get_hll_global $P1210, ["HLL";"Actions"], "ints_to_string" - find_lex $P1213, "$/" - unless_null $P1213, vivify_297 - $P1213 = root_new ['parrot';'Hash'] - vivify_297: - set $P1214, $P1213["octint"] - unless_null $P1214, vivify_298 new $P1214, "Undef" - vivify_298: - unless $P1214, unless_1212 - set $P1211, $P1214 - goto unless_1212_end - unless_1212: - find_lex $P1215, "$/" - unless_null $P1215, vivify_299 - $P1215 = root_new ['parrot';'Hash'] - vivify_299: - set $P1216, $P1215["octints"] - unless_null $P1216, vivify_300 - $P1216 = root_new ['parrot';'Hash'] - vivify_300: - set $P1217, $P1216["octint"] - unless_null $P1217, vivify_301 - new $P1217, "Undef" - vivify_301: - set $P1211, $P1217 - unless_1212_end: - $P1218 = $P1210($P1211) - store_lex "$octlit", $P1218 + .lex "$past", $P1214 + get_hll_global $P1215, ["PAST"], "Regex" .annotate 'line', 331 - find_lex $P1219, "$/" - find_lex $P1222, "$/" - unless_null $P1222, vivify_302 - $P1222 = root_new ['parrot';'Hash'] - vivify_302: - set $P1223, $P1222["sym"] - unless_null $P1223, vivify_303 - new $P1223, "Undef" + find_lex $P1216, "$/" + unless_null $P1216, vivify_303 + $P1216 = root_new ['parrot';'Hash'] vivify_303: - set $S1224, $P1223 - iseq $I1225, $S1224, "O" - if $I1225, if_1221 -.annotate 'line', 334 - get_hll_global $P1230, ["PAST"], "Regex" - find_lex $P1231, "$octlit" - find_lex $P1232, "$/" - $P1233 = $P1230."new"($P1231, "literal" :named("pasttype"), $P1232 :named("node")) - set $P1220, $P1233 -.annotate 'line', 331 - goto if_1221_end - if_1221: + set $P1217, $P1216["sym"] + unless_null $P1217, vivify_304 + new $P1217, "Undef" + vivify_304: + set $S1218, $P1217 + 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 - get_hll_global $P1226, ["PAST"], "Regex" - find_lex $P1227, "$octlit" - find_lex $P1228, "$/" - $P1229 = $P1226."new"($P1227, "enumcharlist" :named("pasttype"), 1 :named("negate"), $P1228 :named("node")) - set $P1220, $P1229 - if_1221_end: - $P1234 = $P1219."!make"($P1220) -.annotate 'line', 328 - .return ($P1234) - control_1206: + find_lex $P1222, "$/" + find_lex $P1223, "$past" + $P1224 = $P1222."!make"($P1223) +.annotate 'line', 329 + .return ($P1224) + control_1211: .local pmc exception .get_results (exception) - getattribute $P1235, exception, "payload" - .return ($P1235) + getattribute $P1225, exception, "payload" + .return ($P1225) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("73_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1239 -.annotate 'line', 337 - new $P1238, 'ExceptionHandler' - set_addr $P1238, control_1237 - $P1238."handle_types"(.CONTROL_RETURN) - push_eh $P1238 +.sub "backslash:sym" :subid("73_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1229 +.annotate 'line', 335 + new $P1228, 'ExceptionHandler' + set_addr $P1228, control_1227 + $P1228."handle_types"(.CONTROL_RETURN) + push_eh $P1228 .lex "self", self - .lex "$/", param_1239 + .lex "$/", param_1229 +.annotate 'line', 336 + new $P1230, "Undef" + .lex "$past", $P1230 + get_hll_global $P1231, ["PAST"], "Regex" .annotate 'line', 338 - new $P1240, "Undef" - .lex "$hexlit", $P1240 -.annotate 'line', 339 - get_hll_global $P1241, ["HLL";"Actions"], "ints_to_string" - find_lex $P1244, "$/" - unless_null $P1244, vivify_304 - $P1244 = root_new ['parrot';'Hash'] - vivify_304: - set $P1245, $P1244["hexint"] - unless_null $P1245, vivify_305 - new $P1245, "Undef" + find_lex $P1232, "$/" + unless_null $P1232, vivify_305 + $P1232 = root_new ['parrot';'Hash'] vivify_305: - unless $P1245, unless_1243 - set $P1242, $P1245 - goto unless_1243_end - unless_1243: - find_lex $P1246, "$/" - unless_null $P1246, vivify_306 - $P1246 = root_new ['parrot';'Hash'] + set $P1233, $P1232["sym"] + unless_null $P1233, vivify_306 + new $P1233, "Undef" vivify_306: - set $P1247, $P1246["hexints"] - unless_null $P1247, vivify_307 - $P1247 = root_new ['parrot';'Hash'] - vivify_307: - set $P1248, $P1247["hexint"] - unless_null $P1248, vivify_308 - new $P1248, "Undef" - vivify_308: - set $P1242, $P1248 - unless_1243_end: - $P1249 = $P1241($P1242) - store_lex "$hexlit", $P1249 -.annotate 'line', 340 - find_lex $P1250, "$/" - find_lex $P1253, "$/" - unless_null $P1253, vivify_309 - $P1253 = root_new ['parrot';'Hash'] - vivify_309: - set $P1254, $P1253["sym"] - unless_null $P1254, vivify_310 - new $P1254, "Undef" - vivify_310: - set $S1255, $P1254 - iseq $I1256, $S1255, "X" - if $I1256, if_1252 -.annotate 'line', 343 - get_hll_global $P1261, ["PAST"], "Regex" - find_lex $P1262, "$hexlit" - find_lex $P1263, "$/" - $P1264 = $P1261."new"($P1262, "literal" :named("pasttype"), $P1263 :named("node")) - set $P1251, $P1264 -.annotate 'line', 340 - goto if_1252_end - if_1252: -.annotate 'line', 341 - get_hll_global $P1257, ["PAST"], "Regex" - find_lex $P1258, "$hexlit" - find_lex $P1259, "$/" - $P1260 = $P1257."new"($P1258, "enumcharlist" :named("pasttype"), 1 :named("negate"), $P1259 :named("node")) - set $P1251, $P1260 - if_1252_end: - $P1265 = $P1250."!make"($P1251) -.annotate 'line', 337 - .return ($P1265) - control_1237: + set $S1234, $P1233 + 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 .get_results (exception) - getattribute $P1266, exception, "payload" - .return ($P1266) + getattribute $P1241, exception, "payload" + .return ($P1241) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("74_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1270 -.annotate 'line', 346 - new $P1269, 'ExceptionHandler' - set_addr $P1269, control_1268 - $P1269."handle_types"(.CONTROL_RETURN) - push_eh $P1269 - .lex "self", self - .lex "$/", param_1270 -.annotate 'line', 347 - find_lex $P1271, "$/" - get_hll_global $P1272, ["PAST"], "Regex" - find_lex $P1273, "$/" - unless_null $P1273, vivify_311 - $P1273 = root_new ['parrot';'Hash'] +.sub "backslash:sym" :subid("74_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1245 +.annotate 'line', 342 + 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 + $P1250 = root_new ['parrot';'Hash'] + vivify_307: + set $P1251, $P1250["octint"] + unless_null $P1251, vivify_308 + new $P1251, "Undef" + vivify_308: + unless $P1251, unless_1249 + set $P1248, $P1251 + goto unless_1249_end + unless_1249: + find_lex $P1252, "$/" + unless_null $P1252, vivify_309 + $P1252 = root_new ['parrot';'Hash'] + vivify_309: + set $P1253, $P1252["octints"] + unless_null $P1253, vivify_310 + $P1253 = root_new ['parrot';'Hash'] + vivify_310: + set $P1254, $P1253["octint"] + unless_null $P1254, vivify_311 + new $P1254, "Undef" vivify_311: - set $P1274, $P1273["charspec"] - unless_null $P1274, vivify_312 - new $P1274, "Undef" + set $P1248, $P1254 + unless_1249_end: + $P1255 = $P1247($P1248) + store_lex "$octlit", $P1255 +.annotate 'line', 345 + find_lex $P1256, "$/" + find_lex $P1259, "$/" + unless_null $P1259, vivify_312 + $P1259 = root_new ['parrot';'Hash'] vivify_312: - $P1275 = $P1274."ast"() - find_lex $P1276, "$/" - $P1277 = $P1272."new"($P1275, "literal" :named("pasttype"), $P1276 :named("node")) - $P1278 = $P1271."!make"($P1277) + set $P1260, $P1259["sym"] + unless_null $P1260, vivify_313 + new $P1260, "Undef" + vivify_313: + 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 - .return ($P1278) - control_1268: + get_hll_global $P1263, ["PAST"], "Regex" + find_lex $P1264, "$octlit" + find_lex $P1265, "$/" + $P1266 = $P1263."new"($P1264, "enumcharlist" :named("pasttype"), 1 :named("negate"), $P1265 :named("node")) + set $P1257, $P1266 + if_1258_end: + $P1271 = $P1256."!make"($P1257) +.annotate 'line', 342 + .return ($P1271) + control_1243: .local pmc exception .get_results (exception) - getattribute $P1279, exception, "payload" - .return ($P1279) + getattribute $P1272, exception, "payload" + .return ($P1272) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "backslash:sym" :subid("75_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1283 -.annotate 'line', 350 - new $P1282, 'ExceptionHandler' - set_addr $P1282, control_1281 - $P1282."handle_types"(.CONTROL_RETURN) - push_eh $P1282 - .lex "self", self - .lex "$/", param_1283 +.sub "backslash:sym" :subid("75_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1276 .annotate 'line', 351 - new $P1284, "Undef" - .lex "$past", $P1284 - get_hll_global $P1285, ["PAST"], "Regex" - find_lex $P1286, "$/" - set $S1287, $P1286 - find_lex $P1288, "$/" - $P1289 = $P1285."new"($S1287, "literal" :named("pasttype"), $P1288 :named("node")) - store_lex "$past", $P1289 + 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 + $P1281 = root_new ['parrot';'Hash'] + vivify_314: + set $P1282, $P1281["hexint"] + unless_null $P1282, vivify_315 + new $P1282, "Undef" + vivify_315: + unless $P1282, unless_1280 + set $P1279, $P1282 + goto unless_1280_end + unless_1280: + find_lex $P1283, "$/" + unless_null $P1283, vivify_316 + $P1283 = root_new ['parrot';'Hash'] + vivify_316: + set $P1284, $P1283["hexints"] + unless_null $P1284, vivify_317 + $P1284 = root_new ['parrot';'Hash'] + vivify_317: + set $P1285, $P1284["hexint"] + unless_null $P1285, vivify_318 + new $P1285, "Undef" + vivify_318: + set $P1279, $P1285 + unless_1280_end: + $P1286 = $P1278($P1279) + store_lex "$hexlit", $P1286 +.annotate 'line', 354 + find_lex $P1287, "$/" find_lex $P1290, "$/" - find_lex $P1291, "$past" - $P1292 = $P1290."!make"($P1291) -.annotate 'line', 350 - .return ($P1292) - control_1281: + unless_null $P1290, vivify_319 + $P1290 = root_new ['parrot';'Hash'] + vivify_319: + set $P1291, $P1290["sym"] + unless_null $P1291, vivify_320 + new $P1291, "Undef" + vivify_320: + 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, "$/" + $P1297 = $P1294."new"($P1295, "enumcharlist" :named("pasttype"), 1 :named("negate"), $P1296 :named("node")) + set $P1288, $P1297 + if_1289_end: + $P1302 = $P1287."!make"($P1288) +.annotate 'line', 351 + .return ($P1302) + control_1274: .local pmc exception .get_results (exception) - getattribute $P1293, exception, "payload" - .return ($P1293) + getattribute $P1303, exception, "payload" + .return ($P1303) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("76_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1297 -.annotate 'line', 356 - new $P1296, 'ExceptionHandler' - set_addr $P1296, control_1295 - $P1296."handle_types"(.CONTROL_RETURN) - push_eh $P1296 - .lex "self", self - .lex "$/", param_1297 -.annotate 'line', 357 - new $P1298, "Undef" - .lex "$past", $P1298 -.annotate 'line', 356 - find_lex $P1299, "$past" -.annotate 'line', 358 - find_lex $P1301, "$/" - unless_null $P1301, vivify_313 - $P1301 = root_new ['parrot';'Hash'] - vivify_313: - set $P1302, $P1301["assertion"] - unless_null $P1302, vivify_314 - new $P1302, "Undef" - vivify_314: - if $P1302, if_1300 -.annotate 'line', 362 - new $P1307, "Integer" - assign $P1307, 0 - store_lex "$past", $P1307 - goto if_1300_end - if_1300: -.annotate 'line', 359 - find_lex $P1303, "$/" - unless_null $P1303, vivify_315 - $P1303 = root_new ['parrot';'Hash'] - vivify_315: - set $P1304, $P1303["assertion"] - unless_null $P1304, vivify_316 - new $P1304, "Undef" - vivify_316: - $P1305 = $P1304."ast"() - store_lex "$past", $P1305 +.sub "backslash:sym" :subid("76_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1307 .annotate 'line', 360 - find_lex $P1306, "$past" - $P1306."subtype"("zerowidth") - if_1300_end: -.annotate 'line', 363 + 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, "$/" - find_lex $P1309, "$past" - $P1310 = $P1308."!make"($P1309) -.annotate 'line', 356 - .return ($P1310) - control_1295: + get_hll_global $P1309, ["PAST"], "Regex" + find_lex $P1310, "$/" + unless_null $P1310, vivify_321 + $P1310 = root_new ['parrot';'Hash'] + vivify_321: + set $P1311, $P1310["charspec"] + unless_null $P1311, vivify_322 + new $P1311, "Undef" + vivify_322: + $P1312 = $P1311."ast"() + 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 .get_results (exception) - getattribute $P1311, exception, "payload" - .return ($P1311) + getattribute $P1316, exception, "payload" + .return ($P1316) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("77_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1315 -.annotate 'line', 366 - new $P1314, 'ExceptionHandler' - set_addr $P1314, control_1313 - $P1314."handle_types"(.CONTROL_RETURN) - push_eh $P1314 - .lex "self", self - .lex "$/", param_1315 -.annotate 'line', 367 - new $P1316, "Undef" - .lex "$past", $P1316 +.sub "backslash:sym" :subid("77_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1320 +.annotate 'line', 364 + 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" + find_lex $P1323, "$/" + set $S1324, $P1323 + find_lex $P1325, "$/" + $P1326 = $P1322."new"($S1324, "literal" :named("pasttype"), $P1325 :named("node")) + store_lex "$past", $P1326 .annotate 'line', 366 - find_lex $P1317, "$past" -.annotate 'line', 368 - find_lex $P1319, "$/" - unless_null $P1319, vivify_317 - $P1319 = root_new ['parrot';'Hash'] - vivify_317: - set $P1320, $P1319["assertion"] - unless_null $P1320, vivify_318 - new $P1320, "Undef" - vivify_318: - if $P1320, if_1318 -.annotate 'line', 374 - get_hll_global $P1329, ["PAST"], "Regex" - find_lex $P1330, "$/" - $P1331 = $P1329."new"("anchor" :named("pasttype"), "fail" :named("subtype"), $P1330 :named("node")) - store_lex "$past", $P1331 -.annotate 'line', 373 - goto if_1318_end - if_1318: -.annotate 'line', 369 - find_lex $P1321, "$/" - unless_null $P1321, vivify_319 - $P1321 = root_new ['parrot';'Hash'] - vivify_319: - set $P1322, $P1321["assertion"] - unless_null $P1322, vivify_320 - new $P1322, "Undef" - vivify_320: - $P1323 = $P1322."ast"() - store_lex "$past", $P1323 -.annotate 'line', 370 - find_lex $P1324, "$past" - find_lex $P1325, "$past" - $P1326 = $P1325."negate"() - isfalse $I1327, $P1326 - $P1324."negate"($I1327) -.annotate 'line', 371 + find_lex $P1327, "$/" find_lex $P1328, "$past" - $P1328."subtype"("zerowidth") - if_1318_end: -.annotate 'line', 376 - find_lex $P1332, "$/" - find_lex $P1333, "$past" - $P1334 = $P1332."!make"($P1333) -.annotate 'line', 366 - .return ($P1334) - control_1313: + $P1329 = $P1327."!make"($P1328) +.annotate 'line', 364 + .return ($P1329) + control_1318: .local pmc exception .get_results (exception) - getattribute $P1335, exception, "payload" - .return ($P1335) + getattribute $P1330, exception, "payload" + .return ($P1330) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("78_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1339 -.annotate 'line', 379 - new $P1338, 'ExceptionHandler' - set_addr $P1338, control_1337 - $P1338."handle_types"(.CONTROL_RETURN) - push_eh $P1338 +.sub "assertion:sym" :subid("78_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1334 +.annotate 'line', 370 + new $P1333, 'ExceptionHandler' + set_addr $P1333, control_1332 + $P1333."handle_types"(.CONTROL_RETURN) + push_eh $P1333 .lex "self", self - .lex "$/", param_1339 -.annotate 'line', 380 - new $P1340, "Undef" - .lex "$past", $P1340 - find_lex $P1341, "$/" - unless_null $P1341, vivify_321 - $P1341 = root_new ['parrot';'Hash'] - vivify_321: - set $P1342, $P1341["assertion"] - unless_null $P1342, vivify_322 - new $P1342, "Undef" - vivify_322: - $P1343 = $P1342."ast"() - store_lex "$past", $P1343 -.annotate 'line', 381 - find_lex $P1344, "$past" - $P1344."subtype"("method") -.annotate 'line', 382 - find_lex $P1345, "$past" - $P1345."name"("") -.annotate 'line', 383 - find_lex $P1346, "$/" - find_lex $P1347, "$past" - $P1348 = $P1346."!make"($P1347) -.annotate 'line', 379 - .return ($P1348) - control_1337: + .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'] + vivify_323: + set $P1339, $P1338["assertion"] + unless_null $P1339, vivify_324 + 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'] + vivify_325: + set $P1341, $P1340["assertion"] + unless_null $P1341, vivify_326 + new $P1341, "Undef" + 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 .get_results (exception) - getattribute $P1349, exception, "payload" - .return ($P1349) + getattribute $P1348, exception, "payload" + .return ($P1348) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "assertion:sym" :subid("79_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1353 -.annotate 'line', 386 - .const 'Sub' $P1410 = "81_1282016526.02169" - capture_lex $P1410 - .const 'Sub' $P1376 = "80_1282016526.02169" - capture_lex $P1376 - new $P1352, 'ExceptionHandler' - set_addr $P1352, control_1351 - $P1352."handle_types"(.CONTROL_RETURN) - push_eh $P1352 +.sub "assertion:sym" :subid("79_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1352 +.annotate 'line', 380 + new $P1351, 'ExceptionHandler' + set_addr $P1351, control_1350 + $P1351."handle_types"(.CONTROL_RETURN) + push_eh $P1351 .lex "self", self - .lex "$/", param_1353 -.annotate 'line', 387 - new $P1354, "Undef" - .lex "$name", $P1354 -.annotate 'line', 388 - new $P1355, "Undef" - .lex "$past", $P1355 -.annotate 'line', 387 + .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_323 + unless_null $P1356, vivify_327 $P1356 = root_new ['parrot';'Hash'] - vivify_323: - set $P1357, $P1356["longname"] - unless_null $P1357, vivify_324 - new $P1357, "Undef" - vivify_324: - set $S1358, $P1357 - new $P1359, 'String' - set $P1359, $S1358 - store_lex "$name", $P1359 - find_lex $P1360, "$past" -.annotate 'line', 389 - find_lex $P1362, "$/" - unless_null $P1362, vivify_325 - $P1362 = root_new ['parrot';'Hash'] - vivify_325: - set $P1363, $P1362["assertion"] - unless_null $P1363, vivify_326 - new $P1363, "Undef" - vivify_326: - if $P1363, if_1361 -.annotate 'line', 393 - find_lex $P1372, "$name" - set $S1373, $P1372 - iseq $I1374, $S1373, "sym" - if $I1374, if_1371 -.annotate 'line', 409 - find_lex $P1386, "self" - find_lex $P1387, "$/" - $P1388 = $P1386."named_assertion"($P1387) - store_lex "$past", $P1388 -.annotate 'line', 410 - find_lex $P1390, "$/" - unless_null $P1390, vivify_327 - $P1390 = root_new ['parrot';'Hash'] vivify_327: - set $P1391, $P1390["nibbler"] - unless_null $P1391, vivify_328 - new $P1391, "Undef" + set $P1357, $P1356["assertion"] + unless_null $P1357, vivify_328 + new $P1357, "Undef" vivify_328: - if $P1391, if_1389 -.annotate 'line', 413 - find_lex $P1399, "$/" - unless_null $P1399, vivify_329 - $P1399 = root_new ['parrot';'Hash'] + 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'] vivify_329: - set $P1400, $P1399["arglist"] - unless_null $P1400, vivify_330 - new $P1400, "Undef" + set $P1359, $P1358["assertion"] + unless_null $P1359, vivify_330 + new $P1359, "Undef" vivify_330: - unless $P1400, if_1398_end -.annotate 'line', 414 - find_lex $P1402, "$/" - unless_null $P1402, vivify_331 - $P1402 = root_new ['parrot';'Hash'] + $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 + .get_results (exception) + getattribute $P1372, exception, "payload" + .return ($P1372) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.include "except_types.pasm" +.sub "assertion:sym" :subid("80_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1376 +.annotate 'line', 393 + 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, "$/" + unless_null $P1378, vivify_331 + $P1378 = root_new ['parrot';'Hash'] vivify_331: - set $P1403, $P1402["arglist"] - unless_null $P1403, vivify_332 - $P1403 = root_new ['parrot';'ResizablePMCArray'] + set $P1379, $P1378["assertion"] + unless_null $P1379, vivify_332 + new $P1379, "Undef" vivify_332: - set $P1404, $P1403[0] - unless_null $P1404, vivify_333 - new $P1404, "Undef" - vivify_333: - $P1405 = $P1404."ast"() - $P1406 = $P1405."list"() - defined $I1407, $P1406 - unless $I1407, for_undef_334 - iter $P1401, $P1406 - new $P1416, 'ExceptionHandler' - set_addr $P1416, loop1415_handler - $P1416."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1416 - loop1415_test: - unless $P1401, loop1415_done - shift $P1408, $P1401 - loop1415_redo: - .const 'Sub' $P1410 = "81_1282016526.02169" - capture_lex $P1410 - $P1410($P1408) - loop1415_next: - goto loop1415_test - loop1415_handler: - .local pmc exception - .get_results (exception) - getattribute $P1417, exception, 'type' - eq $P1417, .CONTROL_LOOP_NEXT, loop1415_next - eq $P1417, .CONTROL_LOOP_REDO, loop1415_redo - loop1415_done: - pop_eh - for_undef_334: - if_1398_end: -.annotate 'line', 413 - goto if_1389_end - if_1389: -.annotate 'line', 411 - find_lex $P1392, "$past" + $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 + .get_results (exception) + getattribute $P1386, exception, "payload" + .return ($P1386) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.include "except_types.pasm" +.sub "assertion:sym" :subid("81_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1390 +.annotate 'line', 400 + .const 'Sub' $P1447 = "83_1284728474.62745" + capture_lex $P1447 + .const 'Sub' $P1413 = "82_1284728474.62745" + capture_lex $P1413 + new $P1389, 'ExceptionHandler' + set_addr $P1389, control_1388 + $P1389."handle_types"(.CONTROL_RETURN) + 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_335 + unless_null $P1393, vivify_333 $P1393 = root_new ['parrot';'Hash'] + vivify_333: + set $P1394, $P1393["longname"] + unless_null $P1394, vivify_334 + new $P1394, "Undef" + vivify_334: + set $S1395, $P1394 + new $P1396, 'String' + 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'] vivify_335: - set $P1394, $P1393["nibbler"] - unless_null $P1394, vivify_336 - $P1394 = root_new ['parrot';'ResizablePMCArray'] + set $P1400, $P1399["assertion"] + unless_null $P1400, vivify_336 + new $P1400, "Undef" vivify_336: - set $P1395, $P1394[0] - unless_null $P1395, vivify_337 - new $P1395, "Undef" + 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'] vivify_337: - $P1396 = $P1395."ast"() - $P1397 = "buildsub"($P1396) - $P1392."push"($P1397) - if_1389_end: -.annotate 'line', 408 - goto if_1371_end - if_1371: -.annotate 'line', 393 - .const 'Sub' $P1376 = "80_1282016526.02169" - capture_lex $P1376 - $P1376() - if_1371_end: - goto if_1361_end - if_1361: -.annotate 'line', 390 - find_lex $P1364, "$/" - unless_null $P1364, vivify_338 - $P1364 = root_new ['parrot';'Hash'] + set $P1428, $P1427["nibbler"] + unless_null $P1428, vivify_338 + new $P1428, "Undef" vivify_338: - set $P1365, $P1364["assertion"] - unless_null $P1365, vivify_339 - $P1365 = root_new ['parrot';'ResizablePMCArray'] + if $P1428, if_1426 +.annotate 'line', 427 + find_lex $P1436, "$/" + unless_null $P1436, vivify_339 + $P1436 = root_new ['parrot';'Hash'] vivify_339: - set $P1366, $P1365[0] - unless_null $P1366, vivify_340 - new $P1366, "Undef" + set $P1437, $P1436["arglist"] + unless_null $P1437, vivify_340 + new $P1437, "Undef" vivify_340: - $P1367 = $P1366."ast"() - store_lex "$past", $P1367 -.annotate 'line', 391 - find_lex $P1368, "self" - find_lex $P1369, "$past" - find_lex $P1370, "$name" - $P1368."subrule_alias"($P1369, $P1370) - if_1361_end: -.annotate 'line', 417 - find_lex $P1418, "$/" - find_lex $P1419, "$past" - $P1420 = $P1418."!make"($P1419) -.annotate 'line', 386 - .return ($P1420) - control_1351: + unless $P1437, if_1435_end +.annotate 'line', 428 + find_lex $P1439, "$/" + unless_null $P1439, vivify_341 + $P1439 = root_new ['parrot';'Hash'] + vivify_341: + set $P1440, $P1439["arglist"] + unless_null $P1440, vivify_342 + $P1440 = root_new ['parrot';'ResizablePMCArray'] + vivify_342: + set $P1441, $P1440[0] + unless_null $P1441, vivify_343 + new $P1441, "Undef" + vivify_343: + $P1442 = $P1441."ast"() + $P1443 = $P1442."list"() + defined $I1444, $P1443 + unless $I1444, for_undef_344 + iter $P1438, $P1443 + new $P1453, 'ExceptionHandler' + set_addr $P1453, loop1452_handler + $P1453."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1453 + loop1452_test: + unless $P1438, loop1452_done + shift $P1445, $P1438 + loop1452_redo: + .const 'Sub' $P1447 = "83_1284728474.62745" + capture_lex $P1447 + $P1447($P1445) + loop1452_next: + goto loop1452_test + loop1452_handler: + .local pmc exception + .get_results (exception) + getattribute $P1454, exception, 'type' + eq $P1454, .CONTROL_LOOP_NEXT, loop1452_next + eq $P1454, .CONTROL_LOOP_REDO, loop1452_redo + loop1452_done: + 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 + $P1430 = root_new ['parrot';'Hash'] + vivify_345: + set $P1431, $P1430["nibbler"] + unless_null $P1431, vivify_346 + $P1431 = root_new ['parrot';'ResizablePMCArray'] + vivify_346: + set $P1432, $P1431[0] + unless_null $P1432, vivify_347 + new $P1432, "Undef" + vivify_347: + $P1433 = $P1432."ast"() + $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_1284728474.62745" + 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'] + vivify_348: + set $P1402, $P1401["assertion"] + unless_null $P1402, vivify_349 + $P1402 = root_new ['parrot';'ResizablePMCArray'] + vivify_349: + set $P1403, $P1402[0] + unless_null $P1403, vivify_350 + new $P1403, "Undef" + 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 .get_results (exception) - getattribute $P1421, exception, "payload" - .return ($P1421) + getattribute $P1458, exception, "payload" + .return ($P1458) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block1409" :anon :subid("81_1282016526.02169") :outer("79_1282016526.02169") - .param pmc param_1411 -.annotate 'line', 414 - .lex "$_", param_1411 - find_lex $P1412, "$past" - find_lex $P1413, "$_" - $P1414 = $P1412."push"($P1413) - .return ($P1414) +.sub "_block1446" :anon :subid("83_1284728474.62745") :outer("81_1284728474.62745") + .param pmc param_1448 +.annotate 'line', 428 + .lex "$_", param_1448 + find_lex $P1449, "$past" + find_lex $P1450, "$_" + $P1451 = $P1449."push"($P1450) + .return ($P1451) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block1375" :anon :subid("80_1282016526.02169") :outer("79_1282016526.02169") -.annotate 'line', 394 - new $P1377, "Undef" - .lex "$regexsym", $P1377 +.sub "_block1412" :anon :subid("82_1284728474.62745") :outer("81_1284728474.62745") +.annotate 'line', 408 + new $P1414, "Undef" + .lex "$regexsym", $P1414 $P0 = get_global '$REGEXNAME' $S0 = $P0 @@ -12702,390 +13501,390 @@ add $I0, 5 $S0 = substr $S0, $I0 $S0 = chopn $S0, 1 - $P1378 = box $S0 + $P1415 = box $S0 - store_lex "$regexsym", $P1378 -.annotate 'line', 403 - get_hll_global $P1379, ["PAST"], "Regex" -.annotate 'line', 404 - get_hll_global $P1380, ["PAST"], "Regex" - find_lex $P1381, "$regexsym" - $P1382 = $P1380."new"($P1381, "literal" :named("pasttype")) - find_lex $P1383, "$name" - find_lex $P1384, "$/" - $P1385 = $P1379."new"($P1382, $P1383 :named("name"), "subcapture" :named("pasttype"), $P1384 :named("node")) -.annotate 'line', 403 - store_lex "$past", $P1385 -.annotate 'line', 393 - .return ($P1385) + 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("82_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1425 -.annotate 'line', 420 - .const 'Sub' $P1460 = "83_1282016526.02169" - capture_lex $P1460 - new $P1424, 'ExceptionHandler' - set_addr $P1424, control_1423 - $P1424."handle_types"(.CONTROL_RETURN) - push_eh $P1424 - .lex "self", self - .lex "$/", param_1425 -.annotate 'line', 421 - new $P1426, "Undef" - .lex "$clist", $P1426 -.annotate 'line', 422 - new $P1427, "Undef" - .lex "$past", $P1427 -.annotate 'line', 431 - new $P1428, "Undef" - .lex "$i", $P1428 -.annotate 'line', 432 - new $P1429, "Undef" - .lex "$n", $P1429 -.annotate 'line', 421 - find_lex $P1430, "$/" - unless_null $P1430, vivify_341 - $P1430 = root_new ['parrot';'Hash'] - vivify_341: - set $P1431, $P1430["cclass_elem"] - unless_null $P1431, vivify_342 - new $P1431, "Undef" - vivify_342: - store_lex "$clist", $P1431 -.annotate 'line', 422 - find_lex $P1432, "$clist" - unless_null $P1432, vivify_343 - $P1432 = root_new ['parrot';'ResizablePMCArray'] - vivify_343: - set $P1433, $P1432[0] - unless_null $P1433, vivify_344 - new $P1433, "Undef" - vivify_344: - $P1434 = $P1433."ast"() - store_lex "$past", $P1434 -.annotate 'line', 423 - find_lex $P1438, "$past" - $P1439 = $P1438."negate"() - if $P1439, if_1437 - set $P1436, $P1439 - goto if_1437_end - if_1437: - find_lex $P1440, "$past" - $S1441 = $P1440."pasttype"() - iseq $I1442, $S1441, "subrule" - new $P1436, 'Integer' - set $P1436, $I1442 - if_1437_end: - unless $P1436, if_1435_end -.annotate 'line', 424 - find_lex $P1443, "$past" - $P1443."subtype"("zerowidth") -.annotate 'line', 425 - get_hll_global $P1444, ["PAST"], "Regex" - find_lex $P1445, "$past" -.annotate 'line', 427 - get_hll_global $P1446, ["PAST"], "Regex" - $P1447 = $P1446."new"("charclass" :named("pasttype"), "." :named("subtype")) - find_lex $P1448, "$/" - $P1449 = $P1444."new"($P1445, $P1447, $P1448 :named("node")) -.annotate 'line', 425 - store_lex "$past", $P1449 - if_1435_end: -.annotate 'line', 431 - new $P1450, "Integer" - assign $P1450, 1 - store_lex "$i", $P1450 -.annotate 'line', 432 - find_lex $P1451, "$clist" - set $N1452, $P1451 - new $P1453, 'Float' - set $P1453, $N1452 - store_lex "$n", $P1453 -.annotate 'line', 433 - new $P1484, 'ExceptionHandler' - set_addr $P1484, loop1483_handler - $P1484."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1484 - loop1483_test: - find_lex $P1454, "$i" - set $N1455, $P1454 - find_lex $P1456, "$n" - set $N1457, $P1456 - islt $I1458, $N1455, $N1457 - unless $I1458, loop1483_done - loop1483_redo: - .const 'Sub' $P1460 = "83_1282016526.02169" - capture_lex $P1460 - $P1460() - loop1483_next: - goto loop1483_test - loop1483_handler: - .local pmc exception - .get_results (exception) - getattribute $P1485, exception, 'type' - eq $P1485, .CONTROL_LOOP_NEXT, loop1483_next - eq $P1485, .CONTROL_LOOP_REDO, loop1483_redo - loop1483_done: - pop_eh -.annotate 'line', 444 - find_lex $P1486, "$/" - find_lex $P1487, "$past" - $P1488 = $P1486."!make"($P1487) -.annotate 'line', 420 - .return ($P1488) - control_1423: - .local pmc exception - .get_results (exception) - getattribute $P1489, exception, "payload" - .return ($P1489) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.sub "_block1459" :anon :subid("83_1282016526.02169") :outer("82_1282016526.02169") +.sub "assertion:sym<[>" :subid("84_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1462 .annotate 'line', 434 - new $P1461, "Undef" - .lex "$ast", $P1461 - find_lex $P1462, "$i" - set $I1463, $P1462 - find_lex $P1464, "$clist" - unless_null $P1464, vivify_345 - $P1464 = root_new ['parrot';'ResizablePMCArray'] - vivify_345: - set $P1465, $P1464[$I1463] - unless_null $P1465, vivify_346 + .const 'Sub' $P1497 = "85_1284728474.62745" + capture_lex $P1497 + new $P1461, 'ExceptionHandler' + set_addr $P1461, control_1460 + $P1461."handle_types"(.CONTROL_RETURN) + 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" - vivify_346: - $P1466 = $P1465."ast"() - store_lex "$ast", $P1466 + .lex "$i", $P1465 +.annotate 'line', 446 + new $P1466, "Undef" + .lex "$n", $P1466 .annotate 'line', 435 - find_lex $P1468, "$ast" - $P1469 = $P1468."negate"() - if $P1469, if_1467 -.annotate 'line', 440 - get_hll_global $P1476, ["PAST"], "Regex" - find_lex $P1477, "$past" - find_lex $P1478, "$ast" - find_lex $P1479, "$/" - $P1480 = $P1476."new"($P1477, $P1478, "alt" :named("pasttype"), $P1479 :named("node")) - store_lex "$past", $P1480 -.annotate 'line', 439 - goto if_1467_end - if_1467: + find_lex $P1467, "$/" + unless_null $P1467, vivify_351 + $P1467 = root_new ['parrot';'Hash'] + vivify_351: + set $P1468, $P1467["cclass_elem"] + unless_null $P1468, vivify_352 + new $P1468, "Undef" + vivify_352: + store_lex "$clist", $P1468 .annotate 'line', 436 - find_lex $P1470, "$ast" - $P1470."subtype"("zerowidth") + find_lex $P1469, "$clist" + unless_null $P1469, vivify_353 + $P1469 = root_new ['parrot';'ResizablePMCArray'] + vivify_353: + set $P1470, $P1469[0] + unless_null $P1470, vivify_354 + new $P1470, "Undef" + vivify_354: + $P1471 = $P1470."ast"() + store_lex "$past", $P1471 .annotate 'line', 437 - get_hll_global $P1471, ["PAST"], "Regex" - find_lex $P1472, "$ast" - find_lex $P1473, "$past" - find_lex $P1474, "$/" - $P1475 = $P1471."new"($P1472, $P1473, "concat" :named("pasttype"), $P1474 :named("node")) - store_lex "$past", $P1475 - if_1467_end: -.annotate 'line', 442 - find_lex $P1481, "$i" - add $P1482, $P1481, 1 - store_lex "$i", $P1482 -.annotate 'line', 433 - .return ($P1482) -.end - - -.namespace ["Regex";"P6Regex";"Actions"] -.include "except_types.pasm" -.sub "cclass_elem" :subid("84_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1493 + find_lex $P1475, "$past" + $P1476 = $P1475."negate"() + if $P1476, if_1474 + set $P1473, $P1476 + goto if_1474_end + if_1474: + find_lex $P1477, "$past" + $S1478 = $P1477."pasttype"() + iseq $I1479, $S1478, "subrule" + new $P1473, 'Integer' + 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 - .const 'Sub' $P1518 = "86_1282016526.02169" - capture_lex $P1518 - .const 'Sub' $P1502 = "85_1282016526.02169" - capture_lex $P1502 - new $P1492, 'ExceptionHandler' - set_addr $P1492, control_1491 - $P1492."handle_types"(.CONTROL_RETURN) - push_eh $P1492 - .lex "self", self - .lex "$/", param_1493 -.annotate 'line', 448 - new $P1494, "Undef" - .lex "$str", $P1494 -.annotate 'line', 449 - new $P1495, "Undef" - .lex "$past", $P1495 -.annotate 'line', 448 - new $P1496, "String" - assign $P1496, "" - store_lex "$str", $P1496 - find_lex $P1497, "$past" -.annotate 'line', 450 - find_lex $P1499, "$/" - unless_null $P1499, vivify_347 - $P1499 = root_new ['parrot';'Hash'] - vivify_347: - set $P1500, $P1499["name"] - unless_null $P1500, vivify_348 - new $P1500, "Undef" - vivify_348: - if $P1500, if_1498 -.annotate 'line', 454 - find_lex $P1513, "$/" - unless_null $P1513, vivify_349 - $P1513 = root_new ['parrot';'Hash'] - vivify_349: - set $P1514, $P1513["charspec"] - unless_null $P1514, vivify_350 - new $P1514, "Undef" - vivify_350: - defined $I1515, $P1514 - unless $I1515, for_undef_351 - iter $P1512, $P1514 - new $P1544, 'ExceptionHandler' - set_addr $P1544, loop1543_handler - $P1544."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) - push_eh $P1544 - loop1543_test: - unless $P1512, loop1543_done - shift $P1516, $P1512 - loop1543_redo: - .const 'Sub' $P1518 = "86_1282016526.02169" - capture_lex $P1518 - $P1518($P1516) - loop1543_next: - goto loop1543_test - loop1543_handler: - .local pmc exception - .get_results (exception) - getattribute $P1545, exception, 'type' - eq $P1545, .CONTROL_LOOP_NEXT, loop1543_next - eq $P1545, .CONTROL_LOOP_REDO, loop1543_redo - loop1543_done: + new $P1521, 'ExceptionHandler' + set_addr $P1521, loop1520_handler + $P1521."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1521 + loop1520_test: + find_lex $P1491, "$i" + set $N1492, $P1491 + find_lex $P1493, "$n" + set $N1494, $P1493 + islt $I1495, $N1492, $N1494 + unless $I1495, loop1520_done + loop1520_redo: + .const 'Sub' $P1497 = "85_1284728474.62745" + capture_lex $P1497 + $P1497() + loop1520_next: + goto loop1520_test + loop1520_handler: + .local pmc exception + .get_results (exception) + getattribute $P1522, exception, 'type' + eq $P1522, .CONTROL_LOOP_NEXT, loop1520_next + eq $P1522, .CONTROL_LOOP_REDO, loop1520_redo + loop1520_done: pop_eh - for_undef_351: -.annotate 'line', 479 - get_hll_global $P1546, ["PAST"], "Regex" - find_lex $P1547, "$str" - find_lex $P1548, "$/" - $P1549 = $P1546."new"($P1547, "enumcharlist" :named("pasttype"), $P1548 :named("node")) - store_lex "$past", $P1549 -.annotate 'line', 453 - goto if_1498_end - if_1498: -.annotate 'line', 450 - .const 'Sub' $P1502 = "85_1282016526.02169" - capture_lex $P1502 - $P1502() - if_1498_end: -.annotate 'line', 481 - find_lex $P1550, "$past" - find_lex $P1551, "$/" - unless_null $P1551, vivify_363 - $P1551 = root_new ['parrot';'Hash'] - vivify_363: - set $P1552, $P1551["sign"] - unless_null $P1552, vivify_364 - new $P1552, "Undef" - vivify_364: - set $S1553, $P1552 - iseq $I1554, $S1553, "-" - $P1550."negate"($I1554) -.annotate 'line', 482 - find_lex $P1555, "$/" - find_lex $P1556, "$past" - $P1557 = $P1555."!make"($P1556) -.annotate 'line', 447 - .return ($P1557) - control_1491: +.annotate 'line', 458 + find_lex $P1523, "$/" + find_lex $P1524, "$past" + $P1525 = $P1523."!make"($P1524) +.annotate 'line', 434 + .return ($P1525) + control_1460: .local pmc exception .get_results (exception) - getattribute $P1558, exception, "payload" - .return ($P1558) + getattribute $P1526, exception, "payload" + .return ($P1526) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block1517" :anon :subid("86_1282016526.02169") :outer("84_1282016526.02169") - .param pmc param_1519 -.annotate 'line', 454 - .const 'Sub' $P1525 = "87_1282016526.02169" - capture_lex $P1525 - .lex "$_", param_1519 -.annotate 'line', 455 - find_lex $P1522, "$_" - unless_null $P1522, vivify_352 - $P1522 = root_new ['parrot';'ResizablePMCArray'] - vivify_352: - set $P1523, $P1522[1] - unless_null $P1523, vivify_353 - new $P1523, "Undef" - vivify_353: - if $P1523, if_1521 -.annotate 'line', 477 - find_lex $P1539, "$str" - find_lex $P1540, "$_" - unless_null $P1540, vivify_354 - $P1540 = root_new ['parrot';'ResizablePMCArray'] - vivify_354: - set $P1541, $P1540[0] - unless_null $P1541, vivify_355 - new $P1541, "Undef" +.sub "_block1496" :anon :subid("85_1284728474.62745") :outer("84_1284728474.62745") +.annotate 'line', 448 + new $P1498, "Undef" + .lex "$ast", $P1498 + find_lex $P1499, "$i" + set $I1500, $P1499 + find_lex $P1501, "$clist" + unless_null $P1501, vivify_355 + $P1501 = root_new ['parrot';'ResizablePMCArray'] vivify_355: - concat $P1542, $P1539, $P1541 - store_lex "$str", $P1542 - set $P1520, $P1542 -.annotate 'line', 455 - goto if_1521_end - if_1521: - .const 'Sub' $P1525 = "87_1282016526.02169" - capture_lex $P1525 - $P1538 = $P1525() - set $P1520, $P1538 - if_1521_end: + set $P1502, $P1501[$I1500] + unless_null $P1502, vivify_356 + new $P1502, "Undef" + 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 - .return ($P1520) + 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" + find_lex $P1511, "$/" + $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"] -.sub "_block1524" :anon :subid("87_1282016526.02169") :outer("86_1282016526.02169") -.annotate 'line', 456 - new $P1526, "Undef" - .lex "$a", $P1526 -.annotate 'line', 457 - new $P1527, "Undef" - .lex "$b", $P1527 -.annotate 'line', 458 - new $P1528, "Undef" - .lex "$c", $P1528 -.annotate 'line', 456 - find_lex $P1529, "$_" - unless_null $P1529, vivify_356 - $P1529 = root_new ['parrot';'ResizablePMCArray'] - vivify_356: - set $P1530, $P1529[0] - unless_null $P1530, vivify_357 - new $P1530, "Undef" +.include "except_types.pasm" +.sub "cclass_elem" :subid("86_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1530 +.annotate 'line', 461 + .const 'Sub' $P1555 = "88_1284728474.62745" + capture_lex $P1555 + .const 'Sub' $P1539 = "87_1284728474.62745" + capture_lex $P1539 + new $P1529, 'ExceptionHandler' + set_addr $P1529, control_1528 + $P1529."handle_types"(.CONTROL_RETURN) + 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'] vivify_357: - store_lex "$a", $P1530 -.annotate 'line', 457 - find_lex $P1531, "$_" - unless_null $P1531, vivify_358 - $P1531 = root_new ['parrot';'ResizablePMCArray'] + set $P1537, $P1536["name"] + unless_null $P1537, vivify_358 + new $P1537, "Undef" vivify_358: - set $P1532, $P1531[1] - unless_null $P1532, vivify_359 - $P1532 = root_new ['parrot';'ResizablePMCArray'] + if $P1537, if_1535 +.annotate 'line', 468 + find_lex $P1550, "$/" + unless_null $P1550, vivify_359 + $P1550 = root_new ['parrot';'Hash'] vivify_359: - set $P1533, $P1532[0] - unless_null $P1533, vivify_360 - new $P1533, "Undef" + set $P1551, $P1550["charspec"] + unless_null $P1551, vivify_360 + new $P1551, "Undef" vivify_360: - store_lex "$b", $P1533 -.annotate 'line', 458 + defined $I1552, $P1551 + unless $I1552, for_undef_361 + iter $P1549, $P1551 + new $P1581, 'ExceptionHandler' + set_addr $P1581, loop1580_handler + $P1581."handle_types"(.CONTROL_LOOP_NEXT, .CONTROL_LOOP_REDO, .CONTROL_LOOP_LAST) + push_eh $P1581 + loop1580_test: + unless $P1549, loop1580_done + shift $P1553, $P1549 + loop1580_redo: + .const 'Sub' $P1555 = "88_1284728474.62745" + capture_lex $P1555 + $P1555($P1553) + loop1580_next: + goto loop1580_test + loop1580_handler: + .local pmc exception + .get_results (exception) + getattribute $P1582, exception, 'type' + eq $P1582, .CONTROL_LOOP_NEXT, loop1580_next + eq $P1582, .CONTROL_LOOP_REDO, loop1580_redo + 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_1284728474.62745" + capture_lex $P1539 + $P1539() + if_1535_end: +.annotate 'line', 495 + find_lex $P1587, "$past" + find_lex $P1588, "$/" + unless_null $P1588, vivify_373 + $P1588 = root_new ['parrot';'Hash'] + vivify_373: + set $P1589, $P1588["sign"] + unless_null $P1589, vivify_374 + new $P1589, "Undef" + vivify_374: + 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 + .get_results (exception) + getattribute $P1595, exception, "payload" + .return ($P1595) +.end + + +.namespace ["Regex";"P6Regex";"Actions"] +.sub "_block1554" :anon :subid("88_1284728474.62745") :outer("86_1284728474.62745") + .param pmc param_1556 +.annotate 'line', 468 + .const 'Sub' $P1562 = "89_1284728474.62745" + capture_lex $P1562 + .lex "$_", param_1556 +.annotate 'line', 469 + find_lex $P1559, "$_" + unless_null $P1559, vivify_362 + $P1559 = root_new ['parrot';'ResizablePMCArray'] + vivify_362: + set $P1560, $P1559[1] + unless_null $P1560, vivify_363 + new $P1560, "Undef" + vivify_363: + if $P1560, if_1558 +.annotate 'line', 491 + find_lex $P1576, "$str" + find_lex $P1577, "$_" + unless_null $P1577, vivify_364 + $P1577 = root_new ['parrot';'ResizablePMCArray'] + vivify_364: + set $P1578, $P1577[0] + unless_null $P1578, vivify_365 + new $P1578, "Undef" + vivify_365: + concat $P1579, $P1576, $P1578 + store_lex "$str", $P1579 + set $P1557, $P1579 +.annotate 'line', 469 + goto if_1558_end + if_1558: + .const 'Sub' $P1562 = "89_1284728474.62745" + 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_1284728474.62745") :outer("88_1284728474.62745") +.annotate 'line', 470 + 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'] + vivify_366: + set $P1567, $P1566[0] + unless_null $P1567, vivify_367 + 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'] + vivify_368: + set $P1569, $P1568[1] + unless_null $P1569, vivify_369 + $P1569 = root_new ['parrot';'ResizablePMCArray'] + vivify_369: + set $P1570, $P1569[0] + unless_null $P1570, vivify_370 + new $P1570, "Undef" + vivify_370: + store_lex "$b", $P1570 +.annotate 'line', 472 $P0 = find_lex '$a' $S0 = $P0 @@ -13101,255 +13900,255 @@ inc $I0 goto cclass_loop cclass_done: - $P1534 = box $S2 + $P1571 = box $S2 - store_lex "$c", $P1534 -.annotate 'line', 475 - find_lex $P1535, "$str" - find_lex $P1536, "$c" - concat $P1537, $P1535, $P1536 - store_lex "$str", $P1537 -.annotate 'line', 455 - .return ($P1537) + 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 "_block1501" :anon :subid("85_1282016526.02169") :outer("84_1282016526.02169") -.annotate 'line', 451 - new $P1503, "Undef" - .lex "$name", $P1503 - find_lex $P1504, "$/" - unless_null $P1504, vivify_361 - $P1504 = root_new ['parrot';'Hash'] - vivify_361: - set $P1505, $P1504["name"] - unless_null $P1505, vivify_362 - new $P1505, "Undef" - vivify_362: - set $S1506, $P1505 - new $P1507, 'String' - set $P1507, $S1506 - store_lex "$name", $P1507 -.annotate 'line', 452 - get_hll_global $P1508, ["PAST"], "Regex" - find_lex $P1509, "$name" - find_lex $P1510, "$/" - $P1511 = $P1508."new"($P1509, "subrule" :named("pasttype"), "method" :named("subtype"), $P1510 :named("node")) - store_lex "$past", $P1511 -.annotate 'line', 450 - .return ($P1511) +.sub "_block1538" :anon :subid("87_1284728474.62745") :outer("86_1284728474.62745") +.annotate 'line', 465 + new $P1540, "Undef" + .lex "$name", $P1540 + find_lex $P1541, "$/" + unless_null $P1541, vivify_371 + $P1541 = root_new ['parrot';'Hash'] + vivify_371: + set $P1542, $P1541["name"] + unless_null $P1542, vivify_372 + new $P1542, "Undef" + vivify_372: + set $S1543, $P1542 + 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("88_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1562 -.annotate 'line', 485 - new $P1561, 'ExceptionHandler' - set_addr $P1561, control_1560 - $P1561."handle_types"(.CONTROL_RETURN) - push_eh $P1561 - .lex "self", self - .lex "$/", param_1562 -.annotate 'line', 486 - $P1563 = root_new ['parrot';'Hash'] - .lex "%mods", $P1563 -.annotate 'line', 487 - new $P1564, "Undef" - .lex "$n", $P1564 -.annotate 'line', 486 - get_global $P1565, "@MODIFIERS" - unless_null $P1565, vivify_365 - $P1565 = root_new ['parrot';'ResizablePMCArray'] - vivify_365: - set $P1566, $P1565[0] - unless_null $P1566, vivify_366 - new $P1566, "Undef" - vivify_366: - store_lex "%mods", $P1566 -.annotate 'line', 487 - find_lex $P1569, "$/" - unless_null $P1569, vivify_367 - $P1569 = root_new ['parrot';'Hash'] - vivify_367: - set $P1570, $P1569["n"] - unless_null $P1570, vivify_368 - $P1570 = root_new ['parrot';'ResizablePMCArray'] - vivify_368: - set $P1571, $P1570[0] - unless_null $P1571, vivify_369 - new $P1571, "Undef" - vivify_369: - set $S1572, $P1571 - isgt $I1573, $S1572, "" - if $I1573, if_1568 - new $P1578, "Integer" - assign $P1578, 1 - set $P1567, $P1578 - goto if_1568_end - if_1568: - find_lex $P1574, "$/" - unless_null $P1574, vivify_370 - $P1574 = root_new ['parrot';'Hash'] - vivify_370: - set $P1575, $P1574["n"] - unless_null $P1575, vivify_371 - $P1575 = root_new ['parrot';'ResizablePMCArray'] - vivify_371: - set $P1576, $P1575[0] - unless_null $P1576, vivify_372 - new $P1576, "Undef" - vivify_372: - set $N1577, $P1576 - new $P1567, 'Float' - set $P1567, $N1577 - if_1568_end: - store_lex "$n", $P1567 -.annotate 'line', 488 - find_lex $P1579, "$n" - find_lex $P1580, "$/" - unless_null $P1580, vivify_373 - $P1580 = root_new ['parrot';'Hash'] - vivify_373: - set $P1581, $P1580["mod_ident"] - unless_null $P1581, vivify_374 - $P1581 = root_new ['parrot';'Hash'] - vivify_374: - set $P1582, $P1581["sym"] - unless_null $P1582, vivify_375 - new $P1582, "Undef" +.sub "mod_internal" :subid("90_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1599 +.annotate 'line', 499 + 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'] vivify_375: - set $S1583, $P1582 - find_lex $P1584, "%mods" - unless_null $P1584, vivify_376 - $P1584 = root_new ['parrot';'Hash'] - store_lex "%mods", $P1584 + set $P1603, $P1602[0] + unless_null $P1603, vivify_376 + new $P1603, "Undef" vivify_376: - set $P1584[$S1583], $P1579 -.annotate 'line', 489 - find_lex $P1585, "$/" - $P1586 = $P1585."!make"(0) -.annotate 'line', 485 - .return ($P1586) - control_1560: + store_lex "%mods", $P1603 +.annotate 'line', 501 + find_lex $P1606, "$/" + unless_null $P1606, vivify_377 + $P1606 = root_new ['parrot';'Hash'] + vivify_377: + set $P1607, $P1606["n"] + unless_null $P1607, vivify_378 + $P1607 = root_new ['parrot';'ResizablePMCArray'] + vivify_378: + set $P1608, $P1607[0] + unless_null $P1608, vivify_379 + new $P1608, "Undef" + vivify_379: + set $S1609, $P1608 + isgt $I1610, $S1609, "" + if $I1610, if_1605 + new $P1615, "Integer" + assign $P1615, 1 + set $P1604, $P1615 + goto if_1605_end + if_1605: + find_lex $P1611, "$/" + unless_null $P1611, vivify_380 + $P1611 = root_new ['parrot';'Hash'] + vivify_380: + set $P1612, $P1611["n"] + unless_null $P1612, vivify_381 + $P1612 = root_new ['parrot';'ResizablePMCArray'] + vivify_381: + set $P1613, $P1612[0] + unless_null $P1613, vivify_382 + new $P1613, "Undef" + vivify_382: + set $N1614, $P1613 + new $P1604, 'Float' + 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 + $P1617 = root_new ['parrot';'Hash'] + vivify_383: + set $P1618, $P1617["mod_ident"] + unless_null $P1618, vivify_384 + $P1618 = root_new ['parrot';'Hash'] + vivify_384: + set $P1619, $P1618["sym"] + unless_null $P1619, vivify_385 + new $P1619, "Undef" + vivify_385: + set $S1620, $P1619 + find_lex $P1621, "%mods" + unless_null $P1621, vivify_386 + $P1621 = root_new ['parrot';'Hash'] + 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 .get_results (exception) - getattribute $P1587, exception, "payload" - .return ($P1587) + getattribute $P1624, exception, "payload" + .return ($P1624) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "subrule_alias" :subid("89_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1594 - .param pmc param_1595 -.annotate 'line', 583 - new $P1593, 'ExceptionHandler' - set_addr $P1593, control_1592 - $P1593."handle_types"(.CONTROL_RETURN) - push_eh $P1593 - .lex "self", self - .lex "$past", param_1594 - .lex "$name", param_1595 -.annotate 'line', 584 - find_lex $P1597, "$past" - $S1598 = $P1597."name"() - isgt $I1599, $S1598, "" - if $I1599, if_1596 -.annotate 'line', 585 - find_lex $P1606, "$past" - find_lex $P1607, "$name" - $P1606."name"($P1607) - goto if_1596_end - if_1596: -.annotate 'line', 584 - find_lex $P1600, "$past" - find_lex $P1601, "$name" - concat $P1602, $P1601, "=" - find_lex $P1603, "$past" - $S1604 = $P1603."name"() - concat $P1605, $P1602, $S1604 - $P1600."name"($P1605) - if_1596_end: -.annotate 'line', 586 - find_lex $P1608, "$past" - $P1609 = $P1608."subtype"("capture") -.annotate 'line', 583 - .return ($P1609) - control_1592: - .local pmc exception - .get_results (exception) - getattribute $P1610, exception, "payload" - .return ($P1610) +.sub "subrule_alias" :subid("91_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1631 + .param pmc param_1632 +.annotate 'line', 597 + new $P1630, 'ExceptionHandler' + set_addr $P1630, control_1629 + $P1630."handle_types"(.CONTROL_RETURN) + push_eh $P1630 + .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, "=" + find_lex $P1640, "$past" + $S1641 = $P1640."name"() + 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 + .get_results (exception) + getattribute $P1647, exception, "payload" + .return ($P1647) .end .namespace ["Regex";"P6Regex";"Actions"] .include "except_types.pasm" -.sub "named_assertion" :subid("90_1282016526.02169") :method :outer("11_1282016526.02169") - .param pmc param_1614 -.annotate 'line', 589 - new $P1613, 'ExceptionHandler' - set_addr $P1613, control_1612 - $P1613."handle_types"(.CONTROL_RETURN) - push_eh $P1613 - .lex "self", self - .lex "$/", param_1614 -.annotate 'line', 590 - new $P1615, "Undef" - .lex "$name", $P1615 -.annotate 'line', 591 - new $P1616, "Undef" - .lex "$past", $P1616 -.annotate 'line', 590 - find_lex $P1617, "$/" - unless_null $P1617, vivify_377 - $P1617 = root_new ['parrot';'Hash'] - vivify_377: - set $P1618, $P1617["longname"] - unless_null $P1618, vivify_378 - new $P1618, "Undef" - vivify_378: - set $S1619, $P1618 - new $P1620, 'String' - set $P1620, $S1619 - store_lex "$name", $P1620 -.annotate 'line', 591 - get_hll_global $P1621, ["PAST"], "Regex" - find_lex $P1622, "$name" - find_lex $P1623, "$name" - find_lex $P1624, "$/" - $P1625 = $P1621."new"($P1622, $P1623 :named("name"), "subrule" :named("pasttype"), "capture" :named("subtype"), $P1624 :named("node")) - store_lex "$past", $P1625 - find_lex $P1626, "$past" -.annotate 'line', 589 - .return ($P1626) - control_1612: +.sub "named_assertion" :subid("92_1284728474.62745") :method :outer("11_1284728474.62745") + .param pmc param_1651 +.annotate 'line', 603 + 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'] + vivify_387: + set $P1655, $P1654["longname"] + unless_null $P1655, vivify_388 + new $P1655, "Undef" + vivify_388: + set $S1656, $P1655 + 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" + find_lex $P1661, "$/" + $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 .get_results (exception) - getattribute $P1627, exception, "payload" - .return ($P1627) + getattribute $P1664, exception, "payload" + .return ($P1664) .end .namespace ["Regex";"P6Regex";"Actions"] -.sub "_block1629" :load :anon :subid("91_1282016526.02169") +.sub "_block1666" :load :anon :subid("93_1284728474.62745") .annotate 'line', 4 - .const 'Sub' $P1631 = "11_1282016526.02169" - $P1632 = $P1631() - .return ($P1632) + .const 'Sub' $P1668 = "11_1284728474.62745" + $P1669 = $P1668() + .return ($P1669) .end .namespace [] -.sub "_block1635" :load :anon :subid("92_1282016526.02169") +.sub "_block1672" :load :anon :subid("94_1284728474.62745") .annotate 'line', 1 - .const 'Sub' $P1637 = "10_1282016526.02169" - $P1638 = $P1637() - .return ($P1638) + .const 'Sub' $P1674 = "10_1284728474.62745" + $P1675 = $P1674() + .return ($P1675) .end # .include 'src/cheats/p6regex-grammar.pir' diff -Nru parrot-2.7.0/ext/nqp-rx/src/stage0/Regex-s0.pir parrot-2.8.0/ext/nqp-rx/src/stage0/Regex-s0.pir --- parrot-2.7.0/ext/nqp-rx/src/stage0/Regex-s0.pir 2010-08-17 18:15:19.000000000 +0000 +++ parrot-2.8.0/ext/nqp-rx/src/stage0/Regex-s0.pir 2010-09-21 07:48:52.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -12,7 +12,7 @@ ### .include 'src/Regex/Cursor.pir' # Copyright (C) 2009, The Perl Foundation. -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -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 @@ -493,22 +492,28 @@ =cut .sub '!cursor_debug' :method + .param string tag .param pmc args :slurpy $P0 = getattribute self, '$!debug' if null $P0 goto done unless $P0 goto done - .local pmc from, pos, orig - .local int line + .local pmc fmt, from, pos, orig, line + fmt = new ['ResizablePMCArray'] from = getattribute self, '$!from' orig = getattribute self, '$!target' - line = orig.'lineof'(from) - inc line + $P0 = get_hll_global ['HLL'], 'Compiler' + line = $P0.'lineof'(orig, from, 'cache'=>1) + $P0 = getinterp $P1 = $P0.'stdhandle'(2) - print $P1, from - print $P1, '/' - print $P1, line - print $P1, ': ' + + $N0 = time + push fmt, $N0 + push fmt, from + push fmt, line + push fmt, tag + $S0 = sprintf "%.6f %d/%d %-8s ", fmt + print $P1, $S0 $S0 = join '', args print $P1, $S0 print $P1, "\n" @@ -949,7 +954,7 @@ # vim: expandtab shiftwidth=4 ft=pir: ### .include 'src/Regex/Cursor-builtins.pir' # Copyright (C) 2009, The Perl Foundation. -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -1015,6 +1020,11 @@ .local int pos, eos .local string tgt (cur, pos, tgt) = self.'!cursor_start'() + .local pmc debug + debug = getattribute cur, '$!debug' + if null debug goto debug_1 + cur.'!cursor_debug'('START', 'ww') + debug_1: if pos == 0 goto fail eos = length tgt if pos == eos goto fail @@ -1025,7 +1035,13 @@ unless $I0 goto fail pass: cur.'!cursor_pass'(pos, 'ww') + if null debug goto done + cur.'!cursor_debug'('PASS', 'ww') + goto done fail: + if null debug goto done + cur.'!cursor_debug'('FAIL', 'ww') + done: .return (cur) .end @@ -1058,11 +1074,23 @@ .local int pos .local string tgt (cur, pos, tgt) = self.'!cursor_start'() + .local pmc debug + debug = getattribute cur, '$!debug' + if null debug goto debug_1 + cur.'!cursor_debug'('START', name) + debug_1: $I0 = is_cclass cclass, tgt, pos unless $I0 goto fail inc pos + pass: cur.'!cursor_pass'(pos, name) + if null debug goto done + cur.'!cursor_debug'('PASS', name) + goto done fail: + if null debug goto done + cur.'!cursor_debug'('FAIL', name) + done: .return (cur) .end @@ -1071,6 +1099,11 @@ .local int pos .local string tgt (cur, pos, tgt) = self.'!cursor_start'() + .local pmc debug + debug = getattribute cur, '$!debug' + if null debug goto debug_1 + cur.'!cursor_debug'('START', 'alpha') + debug_1: $I0 = is_cclass .CCLASS_ALPHABETIC, tgt, pos if $I0 goto pass @@ -1082,7 +1115,13 @@ pass: inc pos cur.'!cursor_pass'(pos, 'alpha') + if null debug goto done + cur.'!cursor_debug'('PASS', 'alpha') + goto done fail: + if null debug goto done + cur.'!cursor_debug'('FAIL', 'alpha') + done: .return (cur) .end @@ -1141,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 @@ -1209,7 +1247,7 @@ have_tokrx: if null debug goto debug_skip_1 - self.'!cursor_debug'('PROTO ', name) + self.'!cursor_debug'('PROTO', name) debug_skip_1: # If there are no entries at all for this protoregex, we fail outright. @@ -1232,7 +1270,7 @@ if null debug goto debug_skip_2 $S0 = escape token $S1 = escape token1 - self.'!cursor_debug'(' token1="', $S1, '", token="', $S0, '"') + self.'!cursor_debug'('NOTE', 'token1="', $S1, '", token="', $S0, '"') debug_skip_2: # Create a hash to keep track of the methods we've already called, @@ -1281,14 +1319,14 @@ pos = result.'pos'() if null debug goto debug_skip_3 - self.'!cursor_debug'('PASS ', name, ' at pos=', pos) + self.'!cursor_debug'('PASS', name, ' at pos=', pos) debug_skip_3: .return (result) fail: if null debug goto debug_skip_4 - self.'!cursor_debug'('FAIL ', name) + self.'!cursor_debug'('FAIL', name) debug_skip_4: unless null result goto fail_1 result = self.'!cursor_start'() @@ -1353,7 +1391,7 @@ toklen = prototable[$S0] unless null tokrx goto tokrx_done - self.'!cursor_debug'('Generating protoregex table for ', name) + self.'!cursor_debug'('NOTE','Generating protoregex table for ', name) .local pmc toklen, tokrx toklen = new ['Hash'] @@ -1640,7 +1678,7 @@ ### .include 'src/Regex/Match.pir' # Copyright (C) 2009, The Perl Foundation. -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -1848,7 +1886,7 @@ # vim: expandtab shiftwidth=4 ft=pir: ### .include 'src/Regex/Method.pir' # Copyright (C) 2009, The Perl Foundation. -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -1933,7 +1971,7 @@ ### .include 'src/Regex/Dumper.pir' # Copyright (C) 2005-2009, Parrot Foundation. # Copyright (C) 2009, The Perl Foundation. -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 TITLE @@ -2140,7 +2178,7 @@ # vim: expandtab shiftwidth=4 ft=pir: ### .include 'src/PAST/Regex.pir' -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -2454,7 +2492,7 @@ # End: # vim: expandtab shiftwidth=4 ft=pir: ### .include 'src/PAST/Compiler-Regex.pir' -# $Id: Regex-s0.pir 48545 2010-08-17 04:29:27Z pmichaud $ +# $Id: Regex-s0.pir 49082 2010-09-17 13:39:17Z pmichaud $ =head1 NAME @@ -2613,12 +2651,12 @@ ops.'push_pirop'('substr', tgt, tgt, off, 'result'=>tgt) ops.'push'(startlabel) ops.'push_pirop'('eq', '$I10', 1, restartlabel) - self.'!cursorop'(ops, '!cursor_debug', 0, '"START "', regexname_esc) + self.'!cursorop'(ops, '!cursor_debug', 0, '"START"', regexname_esc) $P0 = self.'post_regex'(node) ops.'push'($P0) ops.'push'(restartlabel) - self.'!cursorop'(ops, '!cursor_debug', 0, '"NEXT "', regexname_esc) + self.'!cursorop'(ops, '!cursor_debug', 0, '"NEXT"', regexname_esc) ops.'push'(faillabel) self.'!cursorop'(ops, '!mark_fail', 4, rep, pos, '$I10', '$P10', 0) ops.'push_pirop'('lt', pos, CURSOR_FAIL, donelabel) @@ -2626,7 +2664,7 @@ ops.'push_pirop'('jump', '$I10') ops.'push'(donelabel) self.'!cursorop'(ops, '!cursor_fail', 0) - self.'!cursorop'(ops, '!cursor_debug', 0, '"FAIL "', regexname_esc) + self.'!cursorop'(ops, '!cursor_debug', 0, '"FAIL"', regexname_esc) ops.'push_pirop'('return', cur) .return (ops) .end @@ -3101,6 +3139,70 @@ .end +=item conj(PAST::Regex node) + +=cut + +.sub 'conj' :method :multi(_, ['PAST';'Regex']) + .param pmc node + + .local pmc cur, pos, fail + (cur, pos, fail) = self.'!rxregs'('cur pos fail') + + .local string name + name = self.'unique'('conj') + concat name, '_' + + .local pmc ops, iter + ops = self.'post_new'('Ops', 'node'=>node, 'result'=>cur) + iter = node.'iterator'() + unless iter goto done + + .local pmc clabel + $S0 = concat name, 'mark' + clabel = self.'post_new'('Label', 'result'=>$S0) + + .local int acount + .local pmc alabel, apast, apost + acount = 0 + $S0 = acount + $S0 = concat name, $S0 + alabel = self.'post_new'('Label', 'result'=>$S0) + + ops.'push_pirop'('inline', name, 'inline'=>' # rx %0') + ops.'push_pirop'('set_addr', '$I10', clabel) + self.'!cursorop'(ops, '!mark_push', 0, pos, CURSOR_FAIL, '$I10') + ops.'push_pirop'('goto', alabel) + ops.'push'(clabel) + ops.'push_pirop'('goto', fail) + ops.'push'(alabel) + apast = shift iter + apost = self.'post_regex'(apast, cur) + ops.'push'(apost) + ops.'push_pirop'('set_addr', '$I10', clabel) + self.'!cursorop'(ops, '!mark_peek', 1, '$I11', '$I10') + self.'!cursorop'(ops, '!mark_push', 0, '$I11', pos, '$I10') + + iter_loop: + inc acount + $S0 = acount + $S0 = concat name, $S0 + alabel = self.'post_new'('Label', 'result'=>$S0) + ops.'push'(alabel) + ops.'push_pirop'('set', pos, '$I11') + apast = shift iter + apost = self.'post_regex'(apast, cur) + ops.'push'(apost) + ops.'push_pirop'('set_addr', '$I10', clabel) + self.'!cursorop'(ops, '!mark_peek', 2, '$I11', '$I12', '$I10') + ops.'push_pirop'('ne', pos, '$I12', fail) + if iter goto iter_loop + iter_done: + done: + .return (ops) +.end + + =item cut(PAST::Regex node) Generate POST for the cut-group and cut-rule operators. @@ -3146,7 +3248,9 @@ ops.'push_pirop'('inline', negate, subtype, 'inline'=>' # rx enumcharlist negate=%0 %1') + if zerowidth goto skip_zero_1 ops.'push_pirop'('ge', pos, eos, fail) + skip_zero_1: ops.'push_pirop'('sub', '$I10', pos, off) ops.'push_pirop'('substr', '$S10', tgt, '$I10', 1) ops.'push_pirop'('index', '$I11', charlist, '$S10') @@ -3157,6 +3261,69 @@ .return (ops) .end +.sub 'enumcharlist_q' :method :multi(_, ['PAST';'Regex']) + .param pmc node + .param string backtrack + .param int min + .param int max + .param pmc sep + + if backtrack != 'r' goto pessimistic + if sep goto pessimistic + + .local pmc cur, tgt, pos, off, eos, fail, rep, ops + (cur, tgt, pos, off, eos, fail, rep) = self.'!rxregs'('cur tgt pos off eos fail rep') + ops = self.'post_new'('Ops', 'node'=>node, 'result'=>cur) + + .local string charlist + charlist = node[0] + charlist = self.'escape'(charlist) + .local pmc negate, testop + negate = node.'negate'() + testop = self.'??!!'(negate, 'ge', 'lt') + .local string subtype + subtype = node.'subtype'() + if subtype == 'zerowidth' goto pessimistic + + .local pmc looplabel, donelabel + .local string name + name = self.'unique'('rxenumcharlistq') + $S1 = concat name, '_loop' + looplabel = self.'post_new'('Label', 'result'=>$S1) + $S1 = concat name, '_done' + donelabel = self.'post_new'('Label', 'result'=>$S1) + + ops.'push_pirop'('inline', negate, subtype, backtrack, min, max, 'inline'=>' # rx enumcharlist_q negate=%0 %1 %2 %3..%4') + ops.'push_pirop'('sub', '$I10', pos, off) + ops.'push_pirop'('set', rep, 0) + ops.'push_pirop'('sub', '$I12', eos, pos) + unless max > 0 goto max1_done + ops.'push_pirop'('le', '$I12', max, looplabel) + ops.'push_pirop'('set', '$I12', max) + max1_done: + ops.'push'(looplabel) + ops.'push_pirop'('le', '$I12', 0, donelabel) + ops.'push_pirop'('substr', '$S10', tgt, '$I10', 1) + ops.'push_pirop'('index', '$I11', charlist, '$S10') + ops.'push_pirop'(testop, '$I11', 0, donelabel) + ops.'push_pirop'('inc', rep) + if max == 1 goto max2_done + ops.'push_pirop'('inc', '$I10') + ops.'push_pirop'('dec', '$I12') + ops.'push_pirop'('goto', looplabel) + max2_done: + ops.'push'(donelabel) + unless min > 0 goto min2_done + ops.'push_pirop'('lt', rep, min, fail) + min2_done: + ops.'push_pirop'('add', pos, pos, rep) + .return (ops) + + pessimistic: + null ops + .return (ops) +.end + =item literal(PAST::Regex node) @@ -3294,7 +3461,7 @@ ops.'push_pirop'('inline', 'inline'=>' # rx pass') self.'!cursorop'(ops, '!cursor_pass', 0, pos, regexname) - self.'!cursorop'(ops, '!cursor_debug', 0, '"PASS "', regexname, '" at pos="', pos) + self.'!cursorop'(ops, '!cursor_debug', 0, '"PASS"', regexname, '" at pos="', pos) .local string backtrack backtrack = node.'backtrack'() diff -Nru parrot-2.7.0/include/parrot/call.h parrot-2.8.0/include/parrot/call.h --- parrot-2.7.0/include/parrot/call.h 2010-08-17 18:07:25.000000000 +0000 +++ parrot-2.8.0/include/parrot/call.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* call.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: call.h 48546 2010-08-17 04:41:28Z petdance $ + * $Id: call.h 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ * Overview: * Data Structure and Algorithms: * Call argument handling. @@ -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); \ } \ diff -Nru parrot-2.7.0/include/parrot/charset.h parrot-2.8.0/include/parrot/charset.h --- parrot-2.7.0/include/parrot/charset.h 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/include/parrot/charset.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,277 +0,0 @@ -/* charset.h - * Copyright (C) 2004-2010, Parrot Foundation. - * SVN Info - * $Id: charset.h 46897 2010-05-22 20:50:13Z plobsing $ - * 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: - */ diff -Nru parrot-2.7.0/include/parrot/context.h parrot-2.8.0/include/parrot/context.h --- parrot-2.7.0/include/parrot/context.h 2010-08-06 11:23:31.000000000 +0000 +++ parrot-2.8.0/include/parrot/context.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* context.h * Copyright (C) 2009-2010, Parrot Foundation. * SVN Info - * $Id: context.h 48277 2010-08-03 05:51:00Z plobsing $ + * $Id: context.h 49140 2010-09-19 01:00:06Z plobsing $ * Overview: * Context */ @@ -134,14 +134,6 @@ PARROT_EXPORT PARROT_PURE_FUNCTION -PARROT_CAN_RETURN_NULL -INTVAL Parrot_pcc_get_int_constant_func(SHIM_INTERP, - ARGIN(PMC *ctx), - INTVAL idx) - __attribute__nonnull__(2); - -PARROT_EXPORT -PARROT_PURE_FUNCTION PARROT_CANNOT_RETURN_NULL PMC* Parrot_pcc_get_lex_pad_func(SHIM_INTERP, ARGIN(PMC *ctx)) __attribute__nonnull__(2); @@ -339,9 +331,6 @@ PARROT_ASSERT_ARG(ctx)) #define ASSERT_ARGS_Parrot_pcc_get_HLL_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(ctx)) -#define ASSERT_ARGS_Parrot_pcc_get_int_constant_func \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(ctx)) #define ASSERT_ARGS_Parrot_pcc_get_lex_pad_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(ctx)) #define ASSERT_ARGS_Parrot_pcc_get_namespace_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ @@ -452,7 +441,6 @@ # define Parrot_pcc_get_signature(i, c) (CONTEXT_STRUCT(c)->current_sig) # define Parrot_pcc_set_signature(i, c, value) (CONTEXT_STRUCT(c)->current_sig = (value)) -# define Parrot_pcc_get_int_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.integer) # define Parrot_pcc_get_num_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.number) # define Parrot_pcc_get_string_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.string) # define Parrot_pcc_get_pmc_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)].u.key) @@ -510,7 +498,6 @@ # define Parrot_pcc_get_signature(i, c) Parrot_pcc_get_signature_func((i), (c)) # define Parrot_pcc_set_signature(i, c, value) Parrot_pcc_set_signature_func((i), (c), (value)) -# define Parrot_pcc_get_int_constant(i, c, idx) Parrot_pcc_get_int_constant_func((i), (c), (idx)) # define Parrot_pcc_get_num_constant(i, c, idx) Parrot_pcc_get_num_constant_func((i), (c), (idx)) # define Parrot_pcc_get_string_constant(i, c, idx) Parrot_pcc_get_string_constant_func((i), (c), (idx)) # define Parrot_pcc_get_pmc_constant(i, c, idx) Parrot_pcc_get_pmc_constant_func((i), (c), (idx)) diff -Nru parrot-2.7.0/include/parrot/debugger.h parrot-2.8.0/include/parrot/debugger.h --- parrot-2.7.0/include/parrot/debugger.h 2010-05-28 05:23:32.000000000 +0000 +++ parrot-2.8.0/include/parrot/debugger.h 2010-09-21 07:48:53.000000000 +0000 @@ -6,7 +6,7 @@ * debugger.h * * SVN Info - * $Id: debugger.h 47059 2010-05-27 18:09:27Z fperrad $ + * $Id: debugger.h 49021 2010-09-15 17:44:16Z Paul C. Anagnostopoulos $ * Overview: * Parrot debugger header files * History: @@ -129,8 +129,9 @@ /* PDB_breakpoint_t * List of breakpoints. * - * pc: Where the breakpoint is * id: The identification number of this breakpoint + * pc: Where the breakpoint is + * line: The source file line number * skip: The number of times to skip this breakpoint * condition: The condition attached to the breakpoint; may be NULL * prev, next: The previous & next breakpoints in the list; may be NULL. @@ -139,8 +140,9 @@ typedef struct PDB_breakpoint *PDB_breakpoint_ptr; typedef struct PDB_breakpoint { - opcode_t *pc; unsigned long id; + opcode_t *pc; + unsigned long line; long skip; PDB_condition_t *condition; PDB_breakpoint_ptr prev; diff -Nru parrot-2.7.0/include/parrot/encoding.h parrot-2.8.0/include/parrot/encoding.h --- parrot-2.7.0/include/parrot/encoding.h 2010-05-27 01:53:10.000000000 +0000 +++ parrot-2.8.0/include/parrot/encoding.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* encoding.h * Copyright (C) 2004-2007, Parrot Foundation. * SVN Info - * $Id: encoding.h 46999 2010-05-25 22:53:48Z darbelo $ + * $Id: encoding.h 48833 2010-09-07 22:58:38Z nwellnhof $ * Overview: * This is the header for the generic encoding functions * Data Structure and Algorithms: @@ -15,56 +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 void (*encoding_iter_init_t)(PARROT_INTERP, const STRING *src, - struct string_iterator_t *); - -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_iter_init_t iter_init; - encoding_find_cclass_t find_cclass; - encoding_hash_t hash; -}; - -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. */ @@ -73,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 @@ -102,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); @@ -135,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) @@ -166,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) \ @@ -183,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 = (\ @@ -193,29 +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_ITER_INIT(i, src, iter) \ - ((src)->encoding)->iter_init((i), (src), (iter)) -#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 */ /* diff -Nru parrot-2.7.0/include/parrot/gc_api.h parrot-2.8.0/include/parrot/gc_api.h --- parrot-2.7.0/include/parrot/gc_api.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/gc_api.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* gc_api.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: gc_api.h 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: gc_api.h 49092 2010-09-17 22:17:24Z nwellnhof $ * Overview: * Handles dead object destruction of the various headers * History: @@ -33,6 +33,8 @@ #define ALIGNED_STRING_SIZE(len) (((len) + sizeof (void*) + WORD_ALIGN_1) & WORD_ALIGN_MASK) +#define GC_DYNAMIC_THRESHOLD_DEFAULT 25 + /* pool iteration */ typedef enum { POOL_PMC = 0x01, diff -Nru parrot-2.7.0/include/parrot/hash.h parrot-2.8.0/include/parrot/hash.h --- parrot-2.7.0/include/parrot/hash.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/hash.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* hash.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: hash.h 48418 2010-08-11 20:20:52Z chromatic $ + * $Id: hash.h 49186 2010-09-20 21:19:22Z luben $ * Overview: * Hashtable implementation */ @@ -21,22 +21,20 @@ /* A BucketIndex is an index into the pool of available buckets. */ typedef UINTVAL BucketIndex; -#define INITBucketIndex ((BucketIndex)-2) #define N_BUCKETS(n) ((n)) #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 */ @@ -51,7 +49,7 @@ HashBucket *buckets; /* List of Bucket pointers */ - HashBucket **bucket_indices; + HashBucket **index; /* Store for empty buckets */ HashBucket *free_list; @@ -71,13 +69,47 @@ /* 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 */ + +#define parrot_hash_iterate_linear(_hash, _code) \ +{ \ + HashBucket *_bucket = (_hash)->buckets; \ + UINTVAL _found = 0; \ + while (_found < (_hash)->entries){ \ + if (_bucket->key){ \ + _code \ + _found++; \ + } \ + _bucket++; \ + } \ +} + +#define parrot_hash_iterate_indexed(_hash, _code) \ +{ \ + UINTVAL _loc; \ + if ((_hash)->entries){ \ + for (_loc = 0; _loc <= (_hash)->mask; ++_loc) { \ + HashBucket *_bucket = (_hash)->index[_loc]; \ + while (_bucket) { \ + _code \ + _bucket = _bucket->next; \ + } \ + } \ + } \ +} + +#define parrot_hash_iterate(_hash, _code) \ +{ \ + if ((_hash)->key_type == Hash_key_type_int \ + || (_hash)->key_type == Hash_key_type_cstring \ + || (_hash)->key_type == Hash_key_type_ptr) \ + parrot_hash_iterate_indexed((_hash), _code) \ + else \ + parrot_hash_iterate_linear((_hash), _code) \ +} + typedef void (*value_free)(ARGFREE(void *)); /* To avoid creating OrderedHashItem PMC we reuse FixedPMCArray PMC */ @@ -146,17 +178,6 @@ __attribute__nonnull__(2); PARROT_EXPORT -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -void * parrot_hash_get_idx(PARROT_INTERP, - ARGIN(const Hash *hash), - ARGMOD(PMC *key)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*key); - -PARROT_EXPORT PARROT_IGNORABLE_RESULT PARROT_CANNOT_RETURN_NULL HashBucket* parrot_hash_put(PARROT_INTERP, @@ -174,16 +195,6 @@ __attribute__nonnull__(2); PARROT_EXPORT -void parrot_hash_visit(PARROT_INTERP, - ARGMOD(Hash *hash), - ARGMOD(void *pinfo)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*hash) - FUNC_MODIFIES(*pinfo); - -PARROT_EXPORT void parrot_mark_hash(PARROT_INTERP, ARGMOD(Hash *hash)) __attribute__nonnull__(1) __attribute__nonnull__(2) @@ -210,19 +221,6 @@ Hash * parrot_new_pointer_hash(PARROT_INTERP) __attribute__nonnull__(1); -PARROT_CANNOT_RETURN_NULL -PMC* get_integer_pmc(PARROT_INTERP, INTVAL value) - __attribute__nonnull__(1); - -PARROT_CANNOT_RETURN_NULL -PMC* get_number_pmc(PARROT_INTERP, FLOATVAL value) - __attribute__nonnull__(1); - -PARROT_CANNOT_RETURN_NULL -PMC * get_string_pmc(PARROT_INTERP, ARGIN(STRING *value)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - PARROT_CAN_RETURN_NULL void* hash_key_from_int(PARROT_INTERP, ARGIN(const Hash *hash), INTVAL key) __attribute__nonnull__(1) @@ -319,32 +317,6 @@ __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -int int_compare(SHIM_INTERP, - ARGIN_NULLOK(const void *a), - ARGIN_NULLOK(const void *b)); - -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) @@ -360,15 +332,18 @@ PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT -PARROT_MALLOC Hash * parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type, + Hash_key_type hkey_type) + __attribute__nonnull__(1); + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +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)) - __attribute__nonnull__(1) - __attribute__nonnull__(4) - __attribute__nonnull__(5); + UINTVAL size) + __attribute__nonnull__(1); void parrot_hash_clone_prunable(PARROT_INTERP, ARGIN(const Hash *hash), @@ -379,27 +354,20 @@ __attribute__nonnull__(3) FUNC_MODIFIES(*dest); -PARROT_WARN_UNUSED_RESULT -PARROT_PURE_FUNCTION -int PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b)) +void Parrot_hash_freeze(PARROT_INTERP, + ARGIN(const Hash *hash), + ARGMOD(PMC *info)) __attribute__nonnull__(1) __attribute__nonnull__(2) - __attribute__nonnull__(3); - -PARROT_WARN_UNUSED_RESULT -int STRING_compare(PARROT_INTERP, - ARGIN(const void *search_key), - ARGIN_NULLOK(const void *bucket_key)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(3) + FUNC_MODIFIES(*info); +PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT -int STRING_compare_distinct_cs_enc(PARROT_INTERP, - ARGIN(const void *search_key), - ARGIN(const void *bucket_key)) +Hash * Parrot_hash_thaw(PARROT_INTERP, ARGMOD(PMC *info)) __attribute__nonnull__(1) __attribute__nonnull__(2) - __attribute__nonnull__(3); + FUNC_MODIFIES(*info); #define ASSERT_ARGS_parrot_dump_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) #define ASSERT_ARGS_parrot_hash_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ @@ -424,19 +392,11 @@ #define ASSERT_ARGS_parrot_hash_get_bucket __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) -#define ASSERT_ARGS_parrot_hash_get_idx __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(hash) \ - , PARROT_ASSERT_ARG(key)) #define ASSERT_ARGS_parrot_hash_put __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) #define ASSERT_ARGS_parrot_hash_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(hash)) -#define ASSERT_ARGS_parrot_hash_visit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(hash) \ - , PARROT_ASSERT_ARG(pinfo)) #define ASSERT_ARGS_parrot_mark_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) @@ -448,13 +408,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_get_integer_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp)) -#define ASSERT_ARGS_get_number_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp)) -#define ASSERT_ARGS_get_string_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(value)) #define ASSERT_ARGS_hash_key_from_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) @@ -500,14 +453,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_int_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#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)) @@ -516,25 +461,20 @@ , 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)) #define ASSERT_ARGS_parrot_hash_clone_prunable __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash) \ , PARROT_ASSERT_ARG(dest)) -#define ASSERT_ARGS_PMC_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_Parrot_hash_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(a) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_STRING_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(search_key)) -#define ASSERT_ARGS_STRING_compare_distinct_cs_enc \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(hash) \ + , PARROT_ASSERT_ARG(info)) +#define ASSERT_ARGS_Parrot_hash_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(search_key) \ - , PARROT_ASSERT_ARG(bucket_key)) + , PARROT_ASSERT_ARG(info)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: src/hash.c */ diff -Nru parrot-2.7.0/include/parrot/imageio.h parrot-2.8.0/include/parrot/imageio.h --- parrot-2.7.0/include/parrot/imageio.h 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/include/parrot/imageio.h 2010-09-21 07:48:53.000000000 +0000 @@ -0,0 +1,33 @@ +/* Copyright (C) 2001-2009, Parrot Foundation. + * $Id: imageio.h 49131 2010-09-18 04:03:13Z plobsing $ + */ +#ifndef PARROT_IMAGEIO_H_GUARD +#define PARROT_IMAGEIO_H_GUARD + +#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0)) + +/* macros/constants to handle packing/unpacking of PMC IDs and flags + * the 2 LSBs are used for flags, all other bits are used for PMC ID + */ +#define PackID_new(id, flags) (((UINTVAL)(id) * 4) | ((UINTVAL)(flags) & 3)) +#define PackID_get_PMCID(id) ((UINTVAL)(id) / 4) +#define PackID_set_PMCID(lv, id) (lv) = PackID_new((id), PackID_get_FLAGS(lv)) +#define PackID_get_FLAGS(id) ((UINTVAL)(id) & 3) +#define PackID_set_FLAGS(lv, flags) (lv) = PackID_new(PackID_get_PMCID(lv), (flags)) + +/* preallocate freeze image for aggregates with this estimation */ +#define FREEZE_BYTES_PER_ITEM 9 + +enum { + enum_PackID_normal = 0, + enum_PackID_seen = 1, +}; + +#endif /* PARROT_IMAGEIO_H_GUARD */ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/include/parrot/interpreter.h parrot-2.8.0/include/parrot/interpreter.h --- parrot-2.7.0/include/parrot/interpreter.h 2010-06-17 04:58:34.000000000 +0000 +++ parrot-2.8.0/include/parrot/interpreter.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* interpreter.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: interpreter.h 47655 2010-06-16 15:26:43Z NotFound $ + * $Id: interpreter.h 49092 2010-09-17 22:17:24Z nwellnhof $ * Overview: * The interpreter API handles running the operations */ @@ -172,6 +172,8 @@ struct GC_Subsystem *gc_sys; /*functions and data specific to current GC subsystem*/ + UINTVAL gc_threshold; /* maximum percentage of memory + wasted by GC */ PMC *gc_registry; /* root set of registered PMCs */ @@ -182,19 +184,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 +207,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 */ @@ -503,24 +496,26 @@ __attribute__nonnull__(3); PARROT_EXPORT -void register_nci_method(PARROT_INTERP, +void register_native_pcc_method_in_ns(PARROT_INTERP, const int type, ARGIN(void *func), - ARGIN(const char *name), - ARGIN(const char *proto)) + ARGIN(STRING *name), + ARGIN(STRING *signature)) __attribute__nonnull__(1) __attribute__nonnull__(3) __attribute__nonnull__(4) __attribute__nonnull__(5); PARROT_EXPORT -void register_raw_nci_method_in_ns(PARROT_INTERP, +void register_nci_method(PARROT_INTERP, const int type, ARGIN(void *func), - ARGIN(STRING *name)) + ARGIN(const char *name), + ARGIN(const char *proto)) __attribute__nonnull__(1) __attribute__nonnull__(3) - __attribute__nonnull__(4); + __attribute__nonnull__(4) + __attribute__nonnull__(5); #define ASSERT_ARGS_interpinfo __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) @@ -539,15 +534,17 @@ #define ASSERT_ARGS_Parrot_mark_method_writes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(name)) -#define ASSERT_ARGS_register_nci_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_register_native_pcc_method_in_ns \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(func) \ , PARROT_ASSERT_ARG(name) \ - , PARROT_ASSERT_ARG(proto)) -#define ASSERT_ARGS_register_raw_nci_method_in_ns __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(signature)) +#define ASSERT_ARGS_register_nci_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(func) \ - , PARROT_ASSERT_ARG(name)) + , PARROT_ASSERT_ARG(name) \ + , PARROT_ASSERT_ARG(proto)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: src/interp/inter_misc.c */ diff -Nru parrot-2.7.0/include/parrot/library.h parrot-2.8.0/include/parrot/library.h --- parrot-2.7.0/include/parrot/library.h 2009-09-29 23:53:46.000000000 +0000 +++ parrot-2.8.0/include/parrot/library.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* library.h * Copyright (C) 2004, Parrot Foundation. * SVN Info - * $Id: library.h 41533 2009-09-27 17:30:32Z NotFound $ + * $Id: library.h 48947 2010-09-12 00:32:05Z NotFound $ * Overview: * Contains accessor functions for the _parrotlib bytecode interface * Data Structure and Algorithms: @@ -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)) diff -Nru parrot-2.7.0/include/parrot/longopt.h parrot-2.8.0/include/parrot/longopt.h --- parrot-2.7.0/include/parrot/longopt.h 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/include/parrot/longopt.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* longopt.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: longopt.h 46943 2010-05-24 05:23:46Z petdance $ + * $Id: longopt.h 49092 2010-09-17 22:17:24Z nwellnhof $ * Overview: * Command line option parsing (for pre-initialized code) */ @@ -46,6 +46,7 @@ #define OPT_PBC_OUTPUT 131 #define OPT_RUNTIME_PREFIX 132 #define OPT_HASH_SEED 133 +#define OPT_GC_THRESHOLD 134 /* HEADERIZER BEGIN: src/longopt.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ diff -Nru parrot-2.7.0/include/parrot/misc.h parrot-2.8.0/include/parrot/misc.h --- parrot-2.7.0/include/parrot/misc.h 2010-05-28 05:23:32.000000000 +0000 +++ parrot-2.8.0/include/parrot/misc.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* misc.h * Copyright (C) 2001-2008, Parrot Foundation. * SVN Info - * $Id: misc.h 47051 2010-05-27 08:45:23Z plobsing $ + * $Id: misc.h 48873 2010-09-08 23:43:44Z Paul C. Anagnostopoulos $ * Overview: * Miscellaneous functions, mainly the Parrot_sprintf family * Data Structure and Algorithms: @@ -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 */ diff -Nru parrot-2.7.0/include/parrot/nci.h parrot-2.8.0/include/parrot/nci.h --- parrot-2.7.0/include/parrot/nci.h 2010-05-19 09:28:43.000000000 +0000 +++ parrot-2.8.0/include/parrot/nci.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* nci.h * Copyright (C) 2001-2007, Parrot Foundation. * SVN Info - * $Id: nci.h 46597 2010-05-14 05:31:37Z plobsing $ + * $Id: nci.h 48790 2010-09-04 20:06:03Z plobsing $ * Overview: * The nci API handles building native call frames * Data Structure and Algorithms: @@ -17,6 +17,7 @@ typedef PMC *(*nci_fb_func_t)(PARROT_INTERP, PMC *user_data, STRING *signature); typedef void (*nci_thunk_t)(PARROT_INTERP, PMC *, PMC *); +typedef void (*native_pcc_method_t)(PARROT_INTERP); void Parrot_nci_load_core_thunks(PARROT_INTERP); void Parrot_nci_load_extra_thunks(PARROT_INTERP); diff -Nru parrot-2.7.0/include/parrot/op.h parrot-2.8.0/include/parrot/op.h --- parrot-2.7.0/include/parrot/op.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/op.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* op.h * Copyright (C) 2001-2007, Parrot Foundation. * SVN Info - * $Id: op.h 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: op.h 48923 2010-09-10 23:34:18Z plobsing $ * Overview: * Header file for op functions. * Data Structure and Algorithms: @@ -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 */ diff -Nru parrot-2.7.0/include/parrot/oplib/core_ops.h parrot-2.8.0/include/parrot/oplib/core_ops.h --- parrot-2.7.0/include/parrot/oplib/core_ops.h 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/include/parrot/oplib/core_ops.h 2010-09-21 08:04:52.000000000 +0000 @@ -1,5 +1,5 @@ -/* $Id: core_ops.h 48558 2010-08-18 00:35:41Z mikehh $ */ +/* $Id: core_ops.h 49192 2010-09-21 08:04:49Z gerd $ */ #ifndef PARROT_OPLIB_CORE_OPS_H_GUARD #define PARROT_OPLIB_CORE_OPS_H_GUARD @@ -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_8_0(PARROT_INTERP, long init); opcode_t * Parrot_end(opcode_t *, PARROT_INTERP); opcode_t * Parrot_noop(opcode_t *, PARROT_INTERP); diff -Nru parrot-2.7.0/include/parrot/oplib/ops.h parrot-2.8.0/include/parrot/oplib/ops.h --- parrot-2.7.0/include/parrot/oplib/ops.h 2010-06-11 08:06:08.000000000 +0000 +++ parrot-2.8.0/include/parrot/oplib/ops.h 2010-09-21 07:50:57.000000000 +0000 @@ -1,5 +1,5 @@ -/* $Id: ops.h 47428 2010-06-06 08:32:34Z cotto $ */ +/* $Id$ */ #ifndef PARROT_OPLIB_OPS_H_GUARD #define PARROT_OPLIB_OPS_H_GUARD diff -Nru parrot-2.7.0/include/parrot/oplib.h parrot-2.8.0/include/parrot/oplib.h --- parrot-2.7.0/include/parrot/oplib.h 2010-06-17 04:58:34.000000000 +0000 +++ parrot-2.8.0/include/parrot/oplib.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* oplib.h * Copyright (C) 2001-2003, Parrot Foundation. * SVN Info - * $Id: oplib.h 47655 2010-06-16 15:26:43Z NotFound $ + * $Id: oplib.h 48923 2010-09-10 23:34:18Z plobsing $ * Overview: * Header file for op libraries. * Data Structure and Algorithms: @@ -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 { diff -Nru parrot-2.7.0/include/parrot/opsenum.h parrot-2.8.0/include/parrot/opsenum.h --- parrot-2.7.0/include/parrot/opsenum.h 2010-06-11 08:06:08.000000000 +0000 +++ parrot-2.8.0/include/parrot/opsenum.h 2010-09-21 07:50:57.000000000 +0000 @@ -1,5 +1,5 @@ -/* $Id: opsenum.h 47428 2010-06-06 08:32:34Z cotto $ */ +/* $Id$ */ #ifndef PARROT_OPSENUM_H_GUARD #define PARROT_OPSENUM_H_GUARD diff -Nru parrot-2.7.0/include/parrot/packfile.h parrot-2.8.0/include/parrot/packfile.h --- parrot-2.7.0/include/parrot/packfile.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/packfile.h 2010-09-21 07:48:53.000000000 +0000 @@ -4,7 +4,7 @@ /* packfile.h * -* $Id: packfile.h 48412 2010-08-11 05:38:18Z plobsing $ +* $Id: packfile.h 49140 2010-09-19 01:00:06Z plobsing $ * * History: * Rework by Melvin; new bytecode format, make bytecode portable. @@ -170,7 +170,6 @@ typedef struct PackFile_Constant { opcode_t type; union { - opcode_t integer; FLOATVAL number; STRING *string; PMC *key; @@ -263,7 +262,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 { @@ -1213,138 +1212,6 @@ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: src/packfile/pf_items.c */ - - -/* -** Byte Ordering Functions (byteorder.c) -*/ - -/* HEADERIZER BEGIN: src/byteorder.c */ -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ - -void fetch_buf_be_12( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_be_16( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_be_32( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_be_4( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_be_8( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_le_12( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_le_16( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_le_32( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_le_4( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -void fetch_buf_le_8( - ARGOUT(unsigned char *rb), - ARGIN(const unsigned char *b)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*rb); - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -INTVAL fetch_iv_be(INTVAL w); - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -INTVAL fetch_iv_le(INTVAL w); - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -opcode_t fetch_op_be(opcode_t w); - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -opcode_t fetch_op_le(opcode_t w); - -#define ASSERT_ARGS_fetch_buf_be_12 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_be_16 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_be_32 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_be_4 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_be_8 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_le_12 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_le_16 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_le_32 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_le_4 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_buf_le_8 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(rb) \ - , PARROT_ASSERT_ARG(b)) -#define ASSERT_ARGS_fetch_iv_be __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_fetch_iv_le __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_fetch_op_be __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_fetch_op_le __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: src/byteorder.c */ - #endif /* PARROT_PACKFILE_H_GUARD */ /* diff -Nru parrot-2.7.0/include/parrot/parrot.h parrot-2.8.0/include/parrot/parrot.h --- parrot-2.7.0/include/parrot/parrot.h 2010-06-19 12:34:18.000000000 +0000 +++ parrot-2.8.0/include/parrot/parrot.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* parrot.h * Copyright (C) 2001-2009, Parrot Foundation. * SVN Info - * $Id: parrot.h 47678 2010-06-18 00:29:10Z whiteknight $ + * $Id: parrot.h 48833 2010-09-07 22:58:38Z nwellnhof $ * Overview: * General header file includes for the parrot interpreter * Data Structure and Algorithms: @@ -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" diff -Nru parrot-2.7.0/include/parrot/platform_interface.h parrot-2.8.0/include/parrot/platform_interface.h --- parrot-2.7.0/include/parrot/platform_interface.h 2010-05-28 05:23:32.000000000 +0000 +++ parrot-2.8.0/include/parrot/platform_interface.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,6 +1,6 @@ /* * Copyright (C) 2003-2010, Parrot Foundation. - * $Id: platform_interface.h 47066 2010-05-27 21:53:29Z bacek $ + * $Id: platform_interface.h 48580 2010-08-20 12:42:42Z NotFound $ */ #ifndef PARROT_PLATFORM_INTERFACE_H_GUARD @@ -49,6 +49,13 @@ # define mem_realloc_executable(a, b, c) mem_internal_realloc((a), (c)) #endif + +/* +** Process ID +*/ + +UINTVAL Parrot_getpid(void); + /* ** Time */ diff -Nru parrot-2.7.0/include/parrot/pobj.h parrot-2.8.0/include/parrot/pobj.h --- parrot-2.7.0/include/parrot/pobj.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/pobj.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* pobj.h * Copyright (C) 2001-2005, Parrot Foundation. * SVN Info - * $Id: pobj.h 48495 2010-08-14 23:48:32Z mikehh $ + * $Id: pobj.h 49018 2010-09-15 15:18:32Z nwellnhof $ * Overview: * Parrot Object data members and flags enum * Data Structure and Algorithms: @@ -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. */ @@ -138,6 +135,8 @@ PObj_is_string_FLAG = POBJ_FLAG(8), /* PObj is a PMC */ PObj_is_PMC_FLAG = POBJ_FLAG(9), + /* PObj is a copy of a string that doesn't own the string buffer */ + PObj_is_string_copy_FLAG = POBJ_FLAG(10), /* the PMC is a shared PMC */ PObj_is_PMC_shared_FLAG = POBJ_FLAG(11), /* Same as PObj_is_shared_FLAG */ /* PObj is otherwise shared */ @@ -249,6 +248,10 @@ #define PObj_is_string_SET(o) PObj_flag_SET(is_string, o) #define PObj_is_string_CLEAR(o) PObj_flag_CLEAR(is_string, o) +#define PObj_is_string_copy_TEST(o) PObj_flag_TEST(is_string_copy, o) +#define PObj_is_string_copy_SET(o) PObj_flag_SET(is_string_copy, o) +#define PObj_is_string_copy_CLEAR(o) PObj_flag_CLEAR(is_string_copy, o) + #define PObj_sysmem_TEST(o) PObj_flag_TEST(sysmem, o) #define PObj_sysmem_SET(o) PObj_flag_SET(sysmem, o) #define PObj_sysmem_CLEAR(o) PObj_flag_CLEAR(sysmem, o) @@ -321,6 +324,10 @@ (PObj_sysmem_FLAG | PObj_on_free_list_FLAG | \ PObj_constant_FLAG | PObj_external_FLAG))) +#define PObj_is_growable_TESTALL(o) (!(PObj_get_FLAGS(o) & \ + (PObj_sysmem_FLAG | PObj_is_string_copy_FLAG | \ + PObj_constant_FLAG | PObj_external_FLAG))) + #define PObj_custom_mark_destroy_SETALL(o) do { \ PObj_custom_mark_SET(o); \ PObj_custom_destroy_SET(o); \ @@ -328,8 +335,8 @@ #define PObj_gc_CLEAR(o) (PObj_get_FLAGS(o) \ &= ~PObj_custom_destroy_FLAG \ - | ~PObj_custom_mark_FLAG \ - | ~PObj_live_FLAG) + & ~PObj_custom_mark_FLAG \ + & ~PObj_live_FLAG) #endif /* PARROT_POBJ_H_GUARD */ diff -Nru parrot-2.7.0/include/parrot/runcore_api.h parrot-2.8.0/include/parrot/runcore_api.h --- parrot-2.7.0/include/parrot/runcore_api.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/runcore_api.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* runcore_api.h * Copyright (C) 2001-2009, Parrot Foundation. * SVN Info - * $Id: runcore_api.h 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: runcore_api.h 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ * Overview: * Functions and macros to dispatch opcodes. */ @@ -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 = (\ diff -Nru parrot-2.7.0/include/parrot/runcore_profiling.h parrot-2.8.0/include/parrot/runcore_profiling.h --- parrot-2.7.0/include/parrot/runcore_profiling.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/runcore_profiling.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* runcore_api.h * Copyright (C) 2001-2009, Parrot Foundation. * SVN Info - * $Id: runcore_profiling.h 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: runcore_profiling.h 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ * Overview: * Functions and macros to dispatch opcodes. */ diff -Nru parrot-2.7.0/include/parrot/runcore_trace.h parrot-2.8.0/include/parrot/runcore_trace.h --- parrot-2.7.0/include/parrot/runcore_trace.h 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/include/parrot/runcore_trace.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* runcore_trace.h * Copyright (C) 2001-2009, Parrot Foundation. * SVN Info - * $Id: runcore_trace.h 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: runcore_trace.h 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ * Overview: * Tracing runcore. * Data Structure and Algorithms: diff -Nru parrot-2.7.0/include/parrot/scheduler_private.h parrot-2.8.0/include/parrot/scheduler_private.h --- parrot-2.7.0/include/parrot/scheduler_private.h 2009-02-17 21:01:41.000000000 +0000 +++ parrot-2.8.0/include/parrot/scheduler_private.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* scheduler.h * Copyright (C) 2007, Parrot Foundation. * SVN Info - * $Id: scheduler_private.h 36833 2009-02-17 20:09:26Z allison $ + * $Id: scheduler_private.h 48696 2010-08-27 17:12:46Z nwellnhof $ * Overview: * Parrot concurrency scheduler private core structs and flags * Data Structure and Algorithms: @@ -19,7 +19,8 @@ typedef enum { SCHEDULER_cache_valid_FLAG = PObj_private0_FLAG, SCHEDULER_wake_requested_FLAG = PObj_private1_FLAG, - SCHEDULER_terminate_requested_FLAG = PObj_private2_FLAG + SCHEDULER_terminate_requested_FLAG = PObj_private2_FLAG, + SCHEDULER_in_handler_FLAG = PObj_private3_FLAG } scheduler_flags_enum; #define SCHEDULER_get_FLAGS(o) (PObj_get_FLAGS(o)) @@ -42,6 +43,11 @@ #define SCHEDULER_terminate_requested_SET(o) SCHEDULER_flag_SET(terminate_requested, o) #define SCHEDULER_terminate_requested_CLEAR(o) SCHEDULER_flag_CLEAR(terminate_requested, o) +/* Mark if the scheduler is inside a handler */ +#define SCHEDULER_in_handler_TEST(o) SCHEDULER_flag_TEST(in_handler, o) +#define SCHEDULER_in_handler_SET(o) SCHEDULER_flag_SET(in_handler, o) +#define SCHEDULER_in_handler_CLEAR(o) SCHEDULER_flag_CLEAR(in_handler, o) + /* * Task private flags */ diff -Nru parrot-2.7.0/include/parrot/string_funcs.h parrot-2.8.0/include/parrot/string_funcs.h --- parrot-2.7.0/include/parrot/string_funcs.h 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/include/parrot/string_funcs.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* string_funcs.h * Copyright (C) 2001-2010, Parrot Foundation. * SVN Info - * $Id: string_funcs.h 46944 2010-05-24 06:04:42Z petdance $ + * $Id: string_funcs.h 48842 2010-09-08 00:26:33Z nwellnhof $ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: @@ -226,6 +226,31 @@ INTVAL Parrot_str_is_null(SHIM_INTERP, ARGIN_NULLOK(const STRING *s)); PARROT_EXPORT +INTVAL Parrot_str_iter_index(PARROT_INTERP, + ARGIN(const STRING *src), + ARGMOD(String_iter *start), + ARGOUT(String_iter *end), + ARGIN(const STRING *search)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + __attribute__nonnull__(4) + __attribute__nonnull__(5) + FUNC_MODIFIES(*start) + FUNC_MODIFIES(*end); + +PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +STRING * Parrot_str_iter_substr(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *l), + ARGIN_NULLOK(const String_iter *r)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3); + +PARROT_EXPORT PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL STRING* Parrot_str_join(PARROT_INTERP, @@ -272,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 @@ -301,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 @@ -390,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)) @@ -429,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); @@ -456,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, @@ -559,6 +558,16 @@ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(s)) #define ASSERT_ARGS_Parrot_str_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) +#define ASSERT_ARGS_Parrot_str_iter_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(src) \ + , PARROT_ASSERT_ARG(start) \ + , PARROT_ASSERT_ARG(end) \ + , PARROT_ASSERT_ARG(search)) +#define ASSERT_ARGS_Parrot_str_iter_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(l)) #define ASSERT_ARGS_Parrot_str_join __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(ar)) @@ -573,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 = (\ @@ -584,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)) @@ -614,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) \ @@ -628,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) \ diff -Nru parrot-2.7.0/include/parrot/string.h parrot-2.8.0/include/parrot/string.h --- parrot-2.7.0/include/parrot/string.h 2010-04-26 12:31:37.000000000 +0000 +++ parrot-2.8.0/include/parrot/string.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* string.h * Copyright (C) 2001-2003, Parrot Foundation. * SVN Info - * $Id: string.h 46020 2010-04-26 05:43:32Z bacek $ + * $Id: string.h 48833 2010-09-07 22:58:38Z nwellnhof $ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: @@ -18,29 +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 { - const STRING *str; - UINTVAL bytepos; - UINTVAL charpos; - UINTVAL (*get_and_advance)(PARROT_INTERP, struct string_iterator_t *i); - void (*set_and_advance)(PARROT_INTERP, struct string_iterator_t *i, UINTVAL c); - void (*set_position)(PARROT_INTERP, struct string_iterator_t *i, UINTVAL pos); -} String_iter; - #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) */ @@ -54,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 */ diff -Nru parrot-2.7.0/include/parrot/sub.h parrot-2.8.0/include/parrot/sub.h --- parrot-2.7.0/include/parrot/sub.h 2010-05-05 09:58:39.000000000 +0000 +++ parrot-2.8.0/include/parrot/sub.h 2010-09-21 07:48:53.000000000 +0000 @@ -1,7 +1,7 @@ /* sub.h * Copyright (C) 2001-2008, Parrot Foundation. * SVN Info - * $Id: sub.h 46264 2010-05-04 02:22:15Z coke $ + * $Id: sub.h 48948 2010-09-12 00:49:45Z NotFound $ * Data Structure and Algorithms: * Subroutine, coroutine, closure and continuation structures * and related routines. @@ -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) diff -Nru parrot-2.7.0/lib/Parrot/Configure/Compiler.pm parrot-2.8.0/lib/Parrot/Configure/Compiler.pm --- parrot-2.7.0/lib/Parrot/Configure/Compiler.pm 2010-03-10 22:50:47.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Configure/Compiler.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,15 +1,17 @@ -# Copyright (C) 2001-2008, Parrot Foundation. -# $Id: Compiler.pm 44681 2010-03-06 01:52:41Z coke $ +# Copyright (C) 2001-2010, Parrot Foundation. +# $Id: Compiler.pm 48653 2010-08-25 16:34:20Z gerd $ =head1 NAME -Parrot::Configure::Compiler - C-Related methods for configuration +Parrot::Configure::Compiler - C-Related methods for configuration and more =head1 DESCRIPTION The Parrot::Configure::Compiler module provides methods inherited by Parrot::Configure which prepare and/or run C programs during -compilation. +compilation. Also other files like makefiles will be generated with methods +from this module by replacing entries like C<@key@> with C's value from +the configuration system's data. =head2 Methods @@ -193,6 +195,49 @@ qw( .exe.manifest .ilk .pdb ); } +=item C + + $conf->shebang_mod($source, $target); + +Takes the specified source file, replacing entries like C<@key@> with +C's value from the configuration system's data, and writes the results +to specified target file. The replacement is only done in the first line of +the file normally to set the shebang value accordingly. + +=cut + +sub shebang_mod { + my $conf = shift; + my ( $source, $target ) = @_; + + open my $in, '<', $source or die "Can't open $source: $!"; + open my $out, '>', "$target.tmp" or die "Can't open $target.tmp: $!"; + + my $line = <$in>; + + # interpolate @foo@ values + $line =~ s{ \@ (\w+) \@ }{ + if(defined(my $val=$conf->data->get($1))) { + $val; + } + else { + warn "value for '\@$1\@' in $source is undef"; + ''; + } + }egx; + + print $out $line; + + while ( my $line = <$in> ) { + print $out $line; + } + + close($in) or die "Can't close $source: $!"; + close($out) or die "Can't close $target: $!"; + + move_if_diff( "$target.tmp", $target ); +} + =item C $conf->genfile($source, $target, %options); diff -Nru parrot-2.7.0/lib/Parrot/Configure/Options/Conf/Shared.pm parrot-2.8.0/lib/Parrot/Configure/Options/Conf/Shared.pm --- parrot-2.7.0/lib/Parrot/Configure/Options/Conf/Shared.pm 2010-05-27 01:53:10.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Configure/Options/Conf/Shared.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2009, Parrot Foundation. -# $Id: Shared.pm 47020 2010-05-26 08:56:38Z gerd $ +# $Id: Shared.pm 48925 2010-09-11 01:21:55Z jkeenan $ package Parrot::Configure::Options::Conf::Shared; use strict; @@ -77,6 +77,7 @@ without-gmp without-icu without-opengl + without-readline without-pcre without-threads without-zlib diff -Nru parrot-2.7.0/lib/Parrot/Configure/Options/Conf.pm parrot-2.8.0/lib/Parrot/Configure/Options/Conf.pm --- parrot-2.7.0/lib/Parrot/Configure/Options/Conf.pm 2010-05-27 01:53:10.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Configure/Options/Conf.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2009, Parrot Foundation. -# $Id: Conf.pm 47020 2010-05-26 08:56:38Z gerd $ +# $Id: Conf.pm 48925 2010-09-11 01:21:55Z jkeenan $ package Parrot::Configure::Options::Conf; use strict; @@ -18,7 +18,7 @@ our $script = q{Configure.pl}; our $parrot_version = Parrot::BuildUtil::parrot_version("$Bin/../../"); -our $svnid = '$Id: Conf.pm 47020 2010-05-26 08:56:38Z gerd $'; +our $svnid = '$Id: Conf.pm 48925 2010-09-11 01:21:55Z jkeenan $'; sub print_version { print "Parrot Version $parrot_version Configure 2.0\n"; @@ -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 diff -Nru parrot-2.7.0/lib/Parrot/Configure/Step/List.pm parrot-2.8.0/lib/Parrot/Configure/Step/List.pm --- parrot-2.7.0/lib/Parrot/Configure/Step/List.pm 2010-06-11 08:06:08.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Configure/Step/List.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: List.pm 47318 2010-06-03 01:36:45Z jkeenan $ +# $Id: List.pm 48833 2010-09-07 22:58:38Z nwellnhof $ package Parrot::Configure::Step::List; use strict; use warnings; @@ -28,8 +28,6 @@ init::optimize inter::shlibs inter::libparrot - inter::charset - inter::encoding inter::types auto::ops auto::pmc @@ -41,6 +39,7 @@ auto::isreg auto::jit auto::frames + auto::llvm auto::inline auto::gc auto::memalign diff -Nru parrot-2.7.0/lib/Parrot/Configure/Step/Test.pm parrot-2.8.0/lib/Parrot/Configure/Step/Test.pm --- parrot-2.7.0/lib/Parrot/Configure/Step/Test.pm 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Configure/Step/Test.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: Test.pm 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: Test.pm 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ package Parrot::Configure::Step::Test; diff -Nru parrot-2.7.0/lib/Parrot/Docs/Section/Tools.pm parrot-2.8.0/lib/Parrot/Docs/Section/Tools.pm --- parrot-2.7.0/lib/Parrot/Docs/Section/Tools.pm 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Docs/Section/Tools.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2006-2009, Parrot Foundation. -# $Id: Tools.pm 46946 2010-05-24 08:15:45Z cotto $ +# $Id: Tools.pm 48706 2010-08-28 02:39:25Z jkeenan $ =head1 NAME @@ -85,7 +85,7 @@ $self->new_item( '', 'tools/dev/list_unjitted.pl' ), $self->new_item( '', 'tools/dev/gen_class.pl' ), $self->new_item( '', 'tools/dev/nm.pl' ), - $self->new_item( '', 'tools/util/ncidef2pasm.pl' ), + $self->new_item( '', 'tools/dev/ncidef2pasm.pl' ), $self->new_item( '', 'tools/dev/pbc_header.pl' ), ), $self->new_group( diff -Nru parrot-2.7.0/lib/Parrot/H2inc.pm parrot-2.8.0/lib/Parrot/H2inc.pm --- parrot-2.7.0/lib/Parrot/H2inc.pm 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/H2inc.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,6 +1,6 @@ package Parrot::H2inc; # Copyright (C) 2010, Parrot Foundation. -# $Id: H2inc.pm 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: H2inc.pm 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ use strict; use warnings; diff -Nru parrot-2.7.0/lib/Parrot/Harness/Smoke.pm parrot-2.8.0/lib/Parrot/Harness/Smoke.pm --- parrot-2.7.0/lib/Parrot/Harness/Smoke.pm 2010-04-23 10:42:21.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Harness/Smoke.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2006-2008, Parrot Foundation. -# $Id: Smoke.pm 45830 2010-04-20 21:09:46Z dukeleto $ +# $Id: Smoke.pm 49023 2010-09-15 18:11:35Z dukeleto $ =head1 NAME @@ -50,7 +50,7 @@ send_archive_to_smolder( %env_data ); At the current time, automated smoke reports are collected and displayed via -the Smolder system at L. Such reports require +the Smolder system at L. Such reports require the Perl 5 F module, available from CPAN. On network problem or for offline use you may send tar reports later @@ -92,10 +92,10 @@ # language implementations have a different project id my %SMOLDER_CONFIG = ( - server => 'http://smolder.plusthree.com', + server => 'http://smolder.parrot.org', username => 'parrot-autobot', - password => 'squ@wk', - project_id => 8, + password => 'qa_rocks', + project_id => 1, report_file => ['parrot_test_run.tar.gz'], ); diff -Nru parrot-2.7.0/lib/Parrot/Headerizer.pm parrot-2.8.0/lib/Parrot/Headerizer.pm --- parrot-2.7.0/lib/Parrot/Headerizer.pm 2010-05-24 21:14:29.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Headerizer.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2004-2010, Parrot Foundation. -# $Id: Headerizer.pm 46820 2010-05-20 17:22:03Z petdance $ +# $Id: Headerizer.pm 48896 2010-09-10 00:46:07Z nwellnhof $ package Parrot::Headerizer; @@ -45,6 +45,7 @@ $self->{valid_macros} = { map { ( $_, 1 ) } qw( PARROT_EXPORT PARROT_INLINE + PARROT_NOINLINE PARROT_CAN_RETURN_NULL PARROT_CANNOT_RETURN_NULL diff -Nru parrot-2.7.0/lib/Parrot/Manifest.pm parrot-2.8.0/lib/Parrot/Manifest.pm --- parrot-2.7.0/lib/Parrot/Manifest.pm 2010-08-06 11:23:31.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Manifest.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Manifest.pm 48246 2010-08-01 18:22:31Z jkeenan $ +# $Id: Manifest.pm 48848 2010-09-08 01:29:00Z jkeenan $ # Copyright (C) 2007-2010, Parrot Foundation. =head1 NAME @@ -112,9 +112,9 @@ $manifest_lines_ref = $mani->prepare_manifest(); -Prepares the manifest from the read in by the C 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 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 diff -Nru parrot-2.7.0/lib/Parrot/Pmc2c/PMCEmitter.pm parrot-2.8.0/lib/Parrot/Pmc2c/PMCEmitter.pm --- parrot-2.7.0/lib/Parrot/Pmc2c/PMCEmitter.pm 2010-08-06 11:23:31.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Pmc2c/PMCEmitter.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2009, Parrot Foundation. -# $Id: PMCEmitter.pm 48224 2010-07-30 05:03:32Z darbelo $ +# $Id: PMCEmitter.pm 48837 2010-09-07 23:48:07Z nwellnhof $ =head1 NAME @@ -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 @@ -656,11 +656,18 @@ next unless $method->type eq Parrot::Pmc2c::Method::NON_VTABLE; #these differ for METHODs - my $method_name = $method->name; - my $symbol_name = $method->symbol; + my $method_name = $method->name; + my $symbol_name = $method->symbol; + my ($pcc_signature) = $method->pcc_signature; $cout .= <<"EOC"; - register_raw_nci_method_in_ns(interp, entry, F2DPTR(Parrot_${classname}_${method_name}), CONST_STRING_GEN(interp, "$symbol_name")); + { + STRING *method_name = CONST_STRING_GEN(interp, "$symbol_name"); + STRING *signature = CONST_STRING_GEN(interp, "$pcc_signature"); + register_native_pcc_method_in_ns(interp, entry, + F2DPTR(Parrot_${classname}_${method_name}), + method_name, signature); + } EOC if ( $method->{attrs}{write} ) { $cout .= <<"EOC"; @@ -828,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; } diff -Nru parrot-2.7.0/lib/Parrot/Pmc2c/PMC.pm parrot-2.8.0/lib/Parrot/Pmc2c/PMC.pm --- parrot-2.7.0/lib/Parrot/Pmc2c/PMC.pm 2010-03-31 12:02:44.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Pmc2c/PMC.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2004-2010, Parrot Foundation. -# $Id: PMC.pm 45297 2010-03-30 01:33:45Z coke $ +# $Id: PMC.pm 48935 2010-09-11 17:39:50Z jkeenan $ # =head1 NAME @@ -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; } diff -Nru parrot-2.7.0/lib/Parrot/Test.pm parrot-2.8.0/lib/Parrot/Test.pm --- parrot-2.7.0/lib/Parrot/Test.pm 2010-07-05 02:47:05.000000000 +0000 +++ parrot-2.8.0/lib/Parrot/Test.pm 2010-09-21 07:48:53.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2004-2009, Parrot Foundation. -# $Id: Test.pm 47888 2010-06-27 03:50:51Z petdance $ +# $Id: Test.pm 48947 2010-09-12 00:32:05Z NotFound $ =head1 NAME @@ -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(); diff -Nru parrot-2.7.0/MANIFEST parrot-2.8.0/MANIFEST --- parrot-2.7.0/MANIFEST 2010-08-18 01:39:38.000000000 +0000 +++ parrot-2.8.0/MANIFEST 2010-09-21 08:08:37.000000000 +0000 @@ -1,7 +1,7 @@ # ex: set ro: -# $Id: MANIFEST 48549 2010-08-17 12:45:46Z mikehh $ +# $Id: MANIFEST 49130 2010-09-18 03:47:34Z plobsing $ # -# generated by tools/dev/mk_manifest_and_skip.pl Tue Aug 17 12:44:33 2010 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sat Sep 18 03:19:23 2010 UT # # See below for documentation on the format of this file. # @@ -213,6 +213,8 @@ config/auto/isreg.pm [] config/auto/isreg/test_c.in [] config/auto/jit.pm [] +config/auto/llvm.pm [] +config/auto/llvm/hello.c [] config/auto/memalign.pm [] config/auto/memalign/test2_c.in [] config/auto/memalign/test_c.in [] @@ -274,6 +276,7 @@ config/gen/platform/ansi/dl.c [] config/gen/platform/ansi/exec.c [] config/gen/platform/ansi/io.h [] +config/gen/platform/ansi/pid.c [] config/gen/platform/ansi/time.c [] config/gen/platform/cygwin/math.c [] config/gen/platform/darwin/begin.c [] @@ -288,6 +291,7 @@ config/gen/platform/generic/math.c [] config/gen/platform/generic/math.h [] config/gen/platform/generic/memexec.c [] +config/gen/platform/generic/pid.c [] config/gen/platform/generic/platform_limits.h [] config/gen/platform/generic/signal.c [] config/gen/platform/generic/signal.h [] @@ -312,6 +316,7 @@ config/gen/platform/win32/io.h [] config/gen/platform/win32/misc.c [] config/gen/platform/win32/misc.h [] +config/gen/platform/win32/pid.c [] config/gen/platform/win32/signal.c [] config/gen/platform/win32/signal.h [] config/gen/platform/win32/stat.c [] @@ -342,8 +347,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 [] @@ -507,6 +510,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] @@ -598,11 +602,6 @@ examples/io/http.pir [examples] examples/io/httpd.pir [examples] examples/io/post.pir [examples] -examples/japh/README [examples] -examples/japh/japh1.pasm [examples] -examples/japh/japh3.pasm [examples] -examples/japh/japh4.pasm [examples] -examples/japh/japh5.pasm [examples] examples/json/postalcodes.pir [examples] examples/json/test.pir [examples] examples/languages/abc/MAINTAINER [examples] @@ -820,6 +819,7 @@ examples/tge/branch/transform.pir [examples] examples/tools/Makefile [examples] examples/tools/pbc_checker.cpp [examples] +examples/tools/pgegrep [examples] examples/tutorial/00_README.pod [examples] examples/tutorial/01_temp_var.pir [examples] examples/tutorial/02_local_var.pir [examples] @@ -945,7 +945,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 @@ -962,6 +961,7 @@ include/parrot/global_setup.h [main]include include/parrot/hash.h [main]include include/parrot/hll.h [main]include +include/parrot/imageio.h [main]include include/parrot/imcc.h [main]include include/parrot/interpreter.h [main]include include/parrot/io.h [main]include @@ -1241,7 +1241,6 @@ runtime/parrot/library/yaml_dumper.pir [library] src/atomic/gcc_x86.c [] src/atomic/sparc_v9.s [] -src/byteorder.c [] src/call/args.c [] src/call/context.c [] src/call/context_accessors.c [] @@ -1289,6 +1288,7 @@ src/gc/malloc.c [] src/gc/malloc_trace.c [] src/gc/mark_sweep.c [] +src/gc/string_gc.c [] src/gc/system.c [] src/global_setup.c [] src/hash.c [] @@ -1339,6 +1339,7 @@ src/ops/var.ops [] src/packdump.c [] src/packfile.c [] +src/packfile/byteorder.h [] src/packfile/pf_items.c [] src/packout.c [] src/parrot_debugger.c [] @@ -1377,9 +1378,10 @@ src/pmc/hash.pmc [] src/pmc/hashiterator.pmc [] src/pmc/hashiteratorkey.pmc [] -src/pmc/imageio.pmc [] +src/pmc/imageiofreeze.pmc [] src/pmc/imageiosize.pmc [] src/pmc/imageiostrings.pmc [] +src/pmc/imageiothaw.pmc [] src/pmc/integer.pmc [] src/pmc/iterator.pmc [] src/pmc/key.pmc [] @@ -1388,6 +1390,7 @@ src/pmc/managedstruct.pmc [] src/pmc/multisub.pmc [] src/pmc/namespace.pmc [] +src/pmc/nativepccmethod.pmc [] src/pmc/nci.pmc [] src/pmc/null.pmc [] src/pmc/object.pmc [] @@ -1441,28 +1444,18 @@ 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/binary.c [] +src/string/encoding/latin1.c [] +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 [] -src/string/encoding/ucs4.h [] src/string/encoding/utf16.c [] -src/string/encoding/utf16.h [] src/string/encoding/utf8.c [] -src/string/encoding/utf8.h [] src/string/primitives.c [] src/string/unicode.h [] src/sub.c [] @@ -1679,11 +1672,11 @@ t/dynpmc/subclass_with_pir_method.t [test] t/dynpmc/subproxy.t [test] t/examples/catchall.t [test] -t/examples/japh.t [test] t/examples/library.t [test] t/examples/namespace.t [test] t/examples/pasm.t [test] t/examples/past.t [test] +t/examples/pgegrep.t [test] t/examples/pir.t [test] t/examples/pod.t [test] t/examples/shootout.t [test] @@ -1734,7 +1727,6 @@ t/manifest/04-alt_file.t [test] t/manifest/05-alt_skip.t [test] t/manifest/README []doc -t/native_pbc/annotations.pbc [test] t/native_pbc/header.t [test] t/native_pbc/integer.pbc [test] t/native_pbc/integer.t [test] @@ -1763,7 +1755,6 @@ t/native_pbc/string_6.pbc [test] t/native_pbc/string_7.pbc [test] t/native_pbc/testdata/README []doc -t/native_pbc/testdata/annotations.pir [test] t/native_pbc/testdata/number.pasm [test] t/native_pbc/testdata/string.pasm [test] t/oo/attributes.t [test] @@ -1802,7 +1793,9 @@ t/op/exceptions.t [test] t/op/exit.t [test] t/op/fetch.t [test] -t/op/gc-leaky.t [test] +t/op/gc-active-buffers.t [test] +t/op/gc-leaky-box.t [test] +t/op/gc-leaky-call.t [test] t/op/gc.t [test] t/op/globals.t [test] t/op/ifunless.t [test] @@ -1827,6 +1820,7 @@ t/op/string_cs.t [test] t/op/string_mem.t [test] t/op/stringu.t [test] +t/op/testlib/test_strings.pir [test] t/op/time.t [test] t/op/vivify.t [test] t/perl/Parrot_Distribution.t [test] @@ -1945,6 +1939,8 @@ t/pmc/sub.t [test] t/pmc/sys.t [test] t/pmc/task.t [test] +t/pmc/testlib/annotations.pir [test] +t/pmc/testlib/number.pasm [test] t/pmc/testlib/packfile_common.pir [test] t/pmc/threads.t [test] t/pmc/timer.t [test] @@ -1984,6 +1980,7 @@ t/steps/auto/inline-01.t [test] t/steps/auto/isreg-01.t [test] t/steps/auto/jit-01.t [test] +t/steps/auto/llvm-01.t [test] t/steps/auto/memalign-01.t [test] t/steps/auto/msvc-01.t [test] t/steps/auto/neg_0-01.t [test] @@ -2019,8 +2016,6 @@ t/steps/init/install-01.t [test] t/steps/init/manifest-01.t [test] t/steps/init/optimize-01.t [test] -t/steps/inter/charset-01.t [test] -t/steps/inter/encoding-01.t [test] t/steps/inter/lex-01.t [test] t/steps/inter/lex-02.t [test] t/steps/inter/lex-03.t [test] @@ -2075,7 +2070,6 @@ t/tools/pbc_disassemble.t [test] t/tools/pbc_dump.t [test] t/tools/pbc_merge.t [test] -t/tools/pgegrep.t [test] t/tools/pmc2cutils/01-pmc2cutils.t [test] t/tools/pmc2cutils/02-find_file.t [test] t/tools/pmc2cutils/03-dump_vtable.t [test] @@ -2084,11 +2078,10 @@ t/tools/pmc2cutils/08-pmc-pm.t [test] t/tools/pmc2cutils/README []doc t/tools/testdata [test] -tools/build/addopstags.pl [] +tools/build/README []doc tools/build/c2str.pl [] tools/build/fixup_gen_file.pl [] tools/build/h2inc.pl [] -tools/build/headerizer.pl [] tools/build/ops2c.pl [devel] tools/build/parrot_config_c.pl [] tools/build/pbcversion_h.pl [] @@ -2096,18 +2089,22 @@ tools/build/vtable_extend.pl [] tools/build/vtable_h.pl [] tools/dev/.gdbinit [] +tools/dev/README []doc +tools/dev/addopstags.pl [] tools/dev/as2c.pl [] tools/dev/bench_op.pir [] tools/dev/branch_status.pl [] tools/dev/checkdepend.pl [] tools/dev/create_language.pl [devel] tools/dev/debian_docs.sh [] +tools/dev/dump_pbc.pl [] tools/dev/faces.pl [] tools/dev/fetch_languages.pl [] tools/dev/gen_charset_tables.pl [] tools/dev/gen_class.pl [] tools/dev/gen_makefile.pl [devel] tools/dev/gen_valgrind_suppressions.pl [] +tools/dev/headerizer.pl [] tools/dev/install_dev_files.pl [] tools/dev/install_doc_files.pl [] tools/dev/install_files.pl [] @@ -2117,7 +2114,7 @@ tools/dev/mk_gitignore.pl [] tools/dev/mk_inno.pl [] tools/dev/mk_inno_language.pl [] -tools/dev/mk_language_shell.pl [devel] +tools/dev/mk_language_shell.in [] tools/dev/mk_manifest_and_skip.pl [] tools/dev/mk_native_pbc [] tools/dev/mk_nci_thunks.pl [] @@ -2125,9 +2122,11 @@ tools/dev/mk_rpm_manifests.pl [] tools/dev/nci_test_gen.pl [] tools/dev/nci_thunk_gen.pir [] +tools/dev/ncidef2pasm.pl [] tools/dev/nm.pl [] tools/dev/nopaste.pl [] tools/dev/ops_not_tested.pl [] +tools/dev/parrot-config.pir [] tools/dev/parrot-fuzzer [] tools/dev/parrot.supp [] tools/dev/parrot_api.pl [] @@ -2136,6 +2135,9 @@ tools/dev/parrotbench.pl [] tools/dev/pbc_header.pl [] tools/dev/pbc_to_exe.pir [devel] +tools/dev/perlcritic-cage.conf [] +tools/dev/perlcritic.conf [] +tools/dev/perltidy.conf [] tools/dev/pmcrenumber.pl [] tools/dev/pmctree.pl [] tools/dev/pprof2cg.pl [devel] @@ -2143,6 +2145,7 @@ tools/dev/search-ops.pl [] tools/dev/svnclobber.pl [] tools/dev/symlink.pl [] +tools/dev/update_copyright.pl [] tools/dev/vgp [] tools/dev/vgp_darwin [] tools/dev/vms-patch [] @@ -2153,19 +2156,12 @@ tools/docs/write_docs.pl [] tools/install/smoke.pl [] tools/install/smoke_languages.pl [] -tools/util/crow.pir [] -tools/util/dump_pbc.pl [] -tools/util/gen_release_info.pl [] -tools/util/inc_ver.pir [] -tools/util/ncidef2pasm.pl [] -tools/util/parrot-config.pir [] -tools/util/perlcritic-cage.conf [] -tools/util/perlcritic.conf [] -tools/util/perltidy.conf [] -tools/util/pgegrep [] -tools/util/release.json [] -tools/util/templates.json [] -tools/util/update_copyright.pl [] +tools/release/README []doc +tools/release/crow.pir [] +tools/release/gen_release_info.pl [] +tools/release/inc_ver.pir [] +tools/release/release.json [] +tools/release/templates.json [] # Local variables: # mode: text # buffer-read-only: t diff -Nru parrot-2.7.0/MANIFEST.generated parrot-2.8.0/MANIFEST.generated --- parrot-2.7.0/MANIFEST.generated 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/MANIFEST.generated 2010-09-21 08:04:52.000000000 +0000 @@ -1,12 +1,12 @@ -# $Id: MANIFEST.generated 48558 2010-08-18 00:35:41Z mikehh $ +# $Id: MANIFEST.generated 49192 2010-09-21 08:04:49Z gerd $ # See tools/dev/install_files.pl for documentation on the # format of this file. # Please re-sort this file after *EVERY* modification -blib/lib/libparrot.2.7.0.dylib [main]lib +blib/lib/libparrot.2.8.0.dylib [main]lib blib/lib/libparrot.a [main]lib blib/lib/libparrot.dylib [main]lib blib/lib/libparrot.so [main]lib -blib/lib/libparrot.so.2.7.0 [main]lib +blib/lib/libparrot.so.2.8.0 [main]lib compilers/data_json/data_json.pbc [data_json] config/gen/call_list/opengl.in [] docs/ops/bit.pod [doc] @@ -69,9 +69,10 @@ include/pmc/pmc_hash.h [devel]include include/pmc/pmc_hashiterator.h [devel]include include/pmc/pmc_hashiteratorkey.h [devel]include -include/pmc/pmc_imageio.h [devel]include +include/pmc/pmc_imageiofreeze.h [devel]include include/pmc/pmc_imageiosize.h [devel]include include/pmc/pmc_imageiostrings.h [devel]include +include/pmc/pmc_imageiothaw.h [devel]include include/pmc/pmc_integer.h [devel]include include/pmc/pmc_iterator.h [devel]include include/pmc/pmc_key.h [devel]include @@ -80,6 +81,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 @@ -363,9 +365,10 @@ src/pmc/hash.dump [devel]src src/pmc/hashiterator.dump [devel]src src/pmc/hashiteratorkey.dump [devel]src -src/pmc/imageio.dump [devel]src +src/pmc/imageiofreeze.dump [devel]src src/pmc/imageiosize.dump [devel]src src/pmc/imageiostrings.dump [devel]src +src/pmc/imageiothaw.dump [devel]src src/pmc/integer.dump [devel]src src/pmc/iterator.dump [devel]src src/pmc/key.dump [devel]src @@ -374,6 +377,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 @@ -419,4 +423,5 @@ src/pmc/unmanagedstruct.dump [devel]src src/string_private_cstring.h [] tools/build/dynpmc.pl [] +tools/dev/mk_language_shell.pl [devel] vtable.dump [devel]src diff -Nru parrot-2.7.0/MANIFEST.SKIP parrot-2.8.0/MANIFEST.SKIP --- parrot-2.7.0/MANIFEST.SKIP 2010-06-26 14:37:23.000000000 +0000 +++ parrot-2.8.0/MANIFEST.SKIP 2010-09-21 07:48:57.000000000 +0000 @@ -1,6 +1,6 @@ # ex: set ro: -# $Id: MANIFEST.SKIP 47808 2010-06-24 14:08:03Z mikehh $ -# generated by tools/dev/mk_manifest_and_skip.pl Thu Jun 24 14:06:33 2010 UT +# $Id: MANIFEST.SKIP 48989 2010-09-14 05:50:02Z plobsing $ +# generated by tools/dev/mk_manifest_and_skip.pl Tue Sep 14 05:49:01 2010 UT # # This file should contain a transcript of the svn:ignore properties # of the directories in the Parrot subversion repository. (Needed for @@ -845,6 +845,8 @@ ^src/packfile/.*\.o/ ^src/packfile/.*\.obj$ ^src/packfile/.*\.obj/ +^src/packfile/.*\.str$ +^src/packfile/.*\.str/ # generated from svn:ignore of 'src/pmc/' ^src/pmc/.*\.c$ ^src/pmc/.*\.c/ @@ -1030,6 +1032,9 @@ ^t/op/.*\.pir/ ^t/op/.*_pbcexe.*$ ^t/op/.*_pbcexe.*/ +# generated from svn:ignore of 't/op/testlib/' +^t/op/testlib/.*\.pbc$ +^t/op/testlib/.*\.pbc/ # generated from svn:ignore of 't/perl/' ^t/perl/Parrot_Test_1\.pasm$ ^t/perl/Parrot_Test_1\.pasm/ @@ -1046,6 +1051,9 @@ ^t/pmc/.*\.pir/ ^t/pmc/.*_pbcexe.*$ ^t/pmc/.*_pbcexe.*/ +# generated from svn:ignore of 't/pmc/testlib/' +^t/pmc/testlib/.*\.pbc$ +^t/pmc/testlib/.*\.pbc/ # generated from svn:ignore of 't/src/' ^t/src/.*_.*$ ^t/src/.*_.*/ @@ -1077,6 +1085,9 @@ ^t/tools/pmc2c\..*\.h/ ^t/tools/pmc2c\..*\.pmc$ ^t/tools/pmc2c\..*\.pmc/ +# generated from svn:ignore of 'tools/dev/' +^tools/dev/mk_language_shell\.pl$ +^tools/dev/mk_language_shell\.pl/ # Local variables: # mode: text # buffer-read-only: t diff -Nru parrot-2.7.0/NEWS parrot-2.8.0/NEWS --- parrot-2.7.0/NEWS 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/NEWS 2010-09-21 07:48:57.000000000 +0000 @@ -1,5 +1,32 @@ -# $Id: NEWS 48556 2010-08-17 19:38:38Z dukeleto $ +# $Id: NEWS 49137 2010-09-18 16:25:12Z dukeleto $ +New in 2.8.0 +- Core + + Inlined hashing and comparison functions + + Hash memory allocation moved from system malloc to lazy allocated + + Avoided infinite catching of exceptions while dying from exception + + Some svn fixes + + Added a check for duplicate vtable entries in PMCs + + Building Parrot with Perl 5.12 and gcc-4.5 / g++-4.5 + + Eliminated cruft left over after dynops_mapping + + Improved charset and string encoding + + Better organisation of programs by reposition it to "tools/build" and "tools/release" + + Implemented Exception clone vtable function + + Added experimental function Parrot_getpid and getpid method + + --gc-threshold command line argument added, which controls the % of memory wasted by the GC + + Closed a lot of tickets +- Testing + + Added more core pmc tests + + Rearranged some tests with C coverage + + We now have Smolder back, at http://smolder.parrot.org . Submit reports with "make smoke" + + skip_all implementation in Parrot's Test::More completed +- GitMigration + + Set up a test site for github trac plugin at http://mksig.org/trac/ + + Code of Trac plugin at github is on http://github.com/cotto/github-trac + + Parrot is now mirrored on github at http://github.com/parrot/parrot +- Compilers + + Fixed problem with imcc HLL in load_bytecode difference between loading a pbc and compiling a pir + New in 2.7.0 - Core + cleanups in packfile and freeze/thaw handling diff -Nru parrot-2.7.0/PBC_COMPAT parrot-2.8.0/PBC_COMPAT --- parrot-2.7.0/PBC_COMPAT 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/PBC_COMPAT 2010-09-21 07:48:57.000000000 +0000 @@ -28,6 +28,9 @@ # please insert tab separated entries at the top of the list +8.4 2010.09.19 cotto add imageiothaw and imageiofreeze PMCs (plobsing) +8.3 2010.09.15 luben removed logical vtables +8.2 2010.08.19 cotto minor version bump for 2.7.0 8.1 2010.08.10 plobsing merge dynop_mapping branch 8.0 2010.07.20 coke released 2.6.0 7.0 2010.04.20 gerd released 2.3.0 (version # added ex post facto, as all previous version #s were published) diff -Nru parrot-2.7.0/README parrot-2.8.0/README --- parrot-2.7.0/README 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/README 2010-09-21 08:04:52.000000000 +0000 @@ -1,9 +1,9 @@ -This is Parrot, version 2.7.0 +This is Parrot, version 2.8.0 ------------------------------ Parrot is Copyright (C) 2001-2010, Parrot Foundation. -$Id: README 48558 2010-08-18 00:35:41Z mikehh $ +$Id: README 49192 2010-09-21 08:04:49Z gerd $ LICENSE INFORMATION ------------------- @@ -11,6 +11,11 @@ This code is distributed under the terms of the Artistic License 2.0. For more details, see the full text of the license in the file LICENSE. +OVERVIEW +-------- +Parrot is a virtual machine designed to efficiently compile and execute +bytecode for dynamic languages. + PREREQUISITES ------------- diff -Nru parrot-2.7.0/runtime/parrot/include/test_more.pir parrot-2.8.0/runtime/parrot/include/test_more.pir --- parrot-2.7.0/runtime/parrot/include/test_more.pir 2010-05-11 00:29:03.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/include/test_more.pir 2010-09-21 07:48:49.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2007-2008, Parrot Foundation. -# $Id: test_more.pir 46472 2010-05-10 13:34:07Z bacek $ +# $Id: test_more.pir 48951 2010-09-12 09:25:53Z fperrad $ =head1 Purpose @@ -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) diff -Nru parrot-2.7.0/runtime/parrot/library/Archive/Zip.pir parrot-2.8.0/runtime/parrot/library/Archive/Zip.pir --- parrot-2.7.0/runtime/parrot/library/Archive/Zip.pir 2010-06-11 08:06:03.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/Archive/Zip.pir 2010-09-21 07:48:49.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2010, Parrot Foundation. -# $Id: Zip.pir 47421 2010-06-06 04:41:48Z plobsing $ +# $Id: Zip.pir 48955 2010-09-12 13:27:17Z fperrad $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/runtime/parrot/library/distutils.pir parrot-2.8.0/runtime/parrot/library/distutils.pir --- parrot-2.7.0/runtime/parrot/library/distutils.pir 2010-08-15 00:39:31.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/distutils.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: distutils.pir 48433 2010-08-12 12:29:57Z fperrad $ +# $Id: distutils.pir 49086 2010-09-17 16:53:21Z fperrad $ =head1 NAME @@ -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 @@ -1213,7 +1222,7 @@ the key is the PMC name -the value is an array of PMC pathname or a single PPC pathname +the value is an array of PMC/C/H pathname or a single PMC pathname an array creates a PMC group @@ -1251,24 +1260,52 @@ .local pmc srcs srcs = hash[name] $I0 = does srcs, 'array' - unless $I0 goto L5 + unless $I0 goto L3 + .local pmc pmcs, includes + pmcs = new 'ResizableStringArray' + includes = new 'ResizableStringArray' $P1 = iter srcs - L3: - unless $P1 goto L4 + L4: + unless $P1 goto L5 .local string src src = shift $P1 + .local string ext + $I0 = rindex(src, '.') + ext = substr src, $I0 + unless ext == '.pmc' goto L6 + push pmcs, src + L6: + unless ext == '.h' goto L4 + push includes, src + goto L4 + L5: + $P1 = iter srcs + L7: + unless $P1 goto L8 + src = shift $P1 + $I0 = rindex(src, '.') + ext = substr src, $I0 + if ext == '.h' goto L7 $S0 = _mk_path_gen_dynpmc(src, obj) - $I0 = newer($S0, src) - if $I0 goto L3 + push includes, src + $I0 = newer($S0, includes) + $S1 = pop includes + if $I0 goto L7 + if ext == '.c' goto L9 __build_dynpmc(src, cflags) - goto L3 - L4: + goto L7 + L9: + __compile_cc($S0, src, cflags) + $S0 = ' ' . $S0 + ldflags .= $S0 + goto L7 + L8: $S0 = _mk_path_dynpmc(name, load_ext) $I0 = newer($S0, srcs) if $I0 goto L1 - __build_dynpmc_group(srcs, name, cflags, ldflags) + __build_dynpmc_group(pmcs, name, cflags, ldflags) goto L1 - L5: + L3: src = srcs $S0 = _mk_path_dynpmc(name, load_ext) $I0 = newer($S0, src) @@ -1449,8 +1486,7 @@ .sub '_mk_path_gen_dynpmc' :anon .param string src .param string ext - $I0 = length src - $I0 -= 4 + $I0 = rindex(src, '.') $S0 = substr src, 0, $I0 $S0 .= ext unless ext == '.h' goto L1 @@ -1770,14 +1806,19 @@ unless $P1 goto L4 .local string src src = shift $P1 + .local string ext + $I0 = rindex(src, '.') + ext = substr src, $I0 + if ext == '.h' goto L3 + $S0 = _mk_path_gen_dynpmc(src, obj) + unlink($S0, 1 :named('verbose')) + if ext == '.c' goto L3 $S0 = _mk_path_gen_dynpmc(src, '.c') unlink($S0, 1 :named('verbose')) $S0 = _mk_path_gen_dynpmc(src, '.h') unlink($S0, 1 :named('verbose')) $S0 = _mk_path_gen_dynpmc(src, '.dump') unlink($S0, 1 :named('verbose')) - $S0 = _mk_path_gen_dynpmc(src, obj) - unlink($S0, 1 :named('verbose')) goto L3 L4: src = srcs[0] @@ -2052,6 +2093,11 @@ a hash +=item smolder_credentials + +A string, of the form "USERNAME:PASSWORD" to be used as the credentials for +the server. The default is "parrot-autobot:qa_rocks" + =back =cut @@ -2146,6 +2192,14 @@ set $P0, 1 $P0[0] = archive push contents, $P0 + $S0 = get_value('smolder_credentials', "parrot-autobot:qa_rocks" :named('default'), kv :flat :named) + $P0 = split ':', $S0 + $P1 = $P0[0] + push contents, 'username' + push contents, $P1 + $P1 = $P0[1] + push contents, 'password' + push contents, $P1 load_bytecode 'LWP/UserAgent.pir' .local pmc ua, response ua = new ['LWP';'UserAgent'] @@ -2333,11 +2387,11 @@ if $I0 goto L1 $S0 = array $S3 = $S0 - $S2 = $S1 . $S3 $I0 = index $S0, "build/" unless $I0 == 0 goto L0 $S3 = substr $S0, 6 L0: + $S2 = $S1 . $S3 files[$S2] = $S0 goto L2 L1: @@ -4107,6 +4161,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 diff -Nru parrot-2.7.0/runtime/parrot/library/Math/Rand.pir parrot-2.8.0/runtime/parrot/library/Math/Rand.pir --- parrot-2.7.0/runtime/parrot/library/Math/Rand.pir 2010-08-15 00:39:31.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/Math/Rand.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2009, Parrot Foundation. -# $Id: Rand.pir 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: Rand.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/runtime/parrot/library/osutils.pir parrot-2.8.0/runtime/parrot/library/osutils.pir --- parrot-2.7.0/runtime/parrot/library/osutils.pir 2010-05-30 21:14:07.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/osutils.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: osutils.pir 47085 2010-05-28 07:51:09Z fperrad $ +# $Id: osutils.pir 49084 2010-09-17 15:19:32Z fperrad $ =head1 NAME @@ -851,6 +851,29 @@ .return (volume, directories, file) .end +=item rindex + +=cut + +.sub 'rindex' + .param string str + .param string sstr + .param int pos :optional + .param int has_pos :opt_flag + if has_pos goto L1 + pos = 0 + L1: + $I0 = index str, sstr, pos + unless $I0 < 0 goto L2 + .return ($I0) + L2: + $I1 = $I0 + inc $I0 + $I0 = index str, sstr, $I0 + unless $I0 < 0 goto L2 + .return ($I1) +.end + =back =head1 AUTHOR diff -Nru parrot-2.7.0/runtime/parrot/library/P6object.pir parrot-2.8.0/runtime/parrot/library/P6object.pir --- parrot-2.7.0/runtime/parrot/library/P6object.pir 2010-08-06 11:23:28.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/P6object.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: P6object.pir 48245 2010-08-01 06:29:58Z pmichaud $ +# $Id: P6object.pir 48908 2010-09-10 15:27:53Z pmichaud $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/runtime/parrot/library/pcre.pir parrot-2.8.0/runtime/parrot/library/pcre.pir --- parrot-2.7.0/runtime/parrot/library/pcre.pir 2010-05-28 05:23:21.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/pcre.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2004-2009, Parrot Foundation. -# $Id: pcre.pir 47051 2010-05-27 08:45:23Z plobsing $ +# $Id: pcre.pir 48995 2010-09-14 07:45:12Z fperrad $ =head1 TITLE @@ -89,6 +89,9 @@ loadlib libpcre, 'pcre3' loaded = defined libpcre if loaded goto LIB_LOADED + loadlib libpcre, 'libpcre-0' # pcre 8.10 and maybe others + loaded = defined libpcre + if loaded goto LIB_LOADED branch LIB_FAILED LIB_CYGWIN: diff -Nru parrot-2.7.0/runtime/parrot/library/Test/Builder/TestPlan.pir parrot-2.8.0/runtime/parrot/library/Test/Builder/TestPlan.pir --- parrot-2.7.0/runtime/parrot/library/Test/Builder/TestPlan.pir 2009-04-16 13:57:32.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/Test/Builder/TestPlan.pir 2010-09-21 07:48:49.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: TestPlan.pir 38115 2009-04-15 14:41:32Z fperrad $ +# $Id: TestPlan.pir 48951 2010-09-12 09:25:53Z fperrad $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/runtime/parrot/library/Test/Builder.pir parrot-2.8.0/runtime/parrot/library/Test/Builder.pir --- parrot-2.7.0/runtime/parrot/library/Test/Builder.pir 2010-05-11 00:29:03.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/Test/Builder.pir 2010-09-21 07:48:49.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: Builder.pir 46472 2010-05-10 13:34:07Z bacek $ +# $Id: Builder.pir 48967 2010-09-12 17:33:33Z jkeenan $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/runtime/parrot/library/Test/More.pir parrot-2.8.0/runtime/parrot/library/Test/More.pir --- parrot-2.7.0/runtime/parrot/library/Test/More.pir 2010-05-31 13:19:57.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/Test/More.pir 2010-09-21 07:48:49.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: More.pir 47208 2010-05-31 10:38:11Z bacek $ +# $Id: More.pir 48951 2010-09-12 09:25:53Z fperrad $ =head1 NAME @@ -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 + +=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 Records a test as pass or fail (like C, but marks it as TODO so it always diff -Nru parrot-2.7.0/runtime/parrot/library/URI/Escape.pir parrot-2.8.0/runtime/parrot/library/URI/Escape.pir --- parrot-2.7.0/runtime/parrot/library/URI/Escape.pir 2010-06-21 08:21:00.000000000 +0000 +++ parrot-2.8.0/runtime/parrot/library/URI/Escape.pir 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2010, Parrot Foundation. -# $Id: Escape.pir 47730 2010-06-20 14:42:37Z NotFound $ +# $Id: Escape.pir 49002 2010-09-14 19:11:14Z nwellnhof $ =head1 NAME @@ -40,13 +40,12 @@ .param string s .param string except - .local int asciicharset, utf8enc, scharset, senc - asciicharset = find_charset 'ascii' - scharset = charset s - if scharset == asciicharset goto encodeit + .local int asciienc, utf8enc, senc + senc = encoding s + asciienc = find_encoding 'ascii' + if senc == asciienc goto encodeit utf8enc = find_encoding 'utf8' - senc = encoding s if utf8enc == senc goto encodeit s = trans_encoding s, utf8enc diff -Nru parrot-2.7.0/src/byteorder.c parrot-2.8.0/src/byteorder.c --- parrot-2.7.0/src/byteorder.c 2010-03-31 12:02:44.000000000 +0000 +++ parrot-2.8.0/src/byteorder.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,567 +0,0 @@ -/* -Copyright (C) 2001-2009, Parrot Foundation. -$Id: byteorder.c 45297 2010-03-30 01:33:45Z coke $ - -=head1 NAME - -src/byteorder.c - Byteordering functions - -=head1 DESCRIPTION - -These are assigned to a vtable when the PBC file is loaded. - -If the vtable function for conversion from the native byteorder is called, -it is a I and will work, but the caller should know if the -byteorder in the PBC file is native and skip the conversion and just map -it in. - -=head2 Byte order handlers - -Configure will have checked for supported word sizes. - -=over 4 - -=cut - -*/ - -#include "parrot/parrot.h" - -/* HEADERIZER HFILE: include/parrot/packfile.h */ - -/* - -=item C - -This function converts a 4 or 8 byte C into little endian -format. If the native format is already little endian, then no -conversion is done. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -INTVAL -fetch_iv_le(INTVAL w) -{ - ASSERT_ARGS(fetch_iv_le) -#if !PARROT_BIGENDIAN - return w; -#else -# if INTVAL_SIZE == 4 - return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w >> 24); -# else -# if INTVAL_SIZE == 8 - INTVAL r; - - r = w << 56; - r |= (w & 0xff00) << 40; - r |= (w & 0xff0000) << 24; - r |= (w & 0xff000000) << 8; - r |= (w & 0xff00000000) >> 8; - r |= (w & 0xff0000000000) >> 24; - r |= (w & 0xff000000000000) >> 40; - r |= (w & 0xff00000000000000) >> 56; - return r; -# else - exit_fatal(1, "Unsupported INTVAL_SIZE=%d\n", - INTVAL_SIZE); -# endif -# endif -#endif -} - -/* - -=item C - -This function converts a 4 or 8 byte C into big endian format. -If the native format is already big endian, then no conversion is done. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -INTVAL -fetch_iv_be(INTVAL w) -{ - ASSERT_ARGS(fetch_iv_be) -#if PARROT_BIGENDIAN - return w; -#else -# if INTVAL_SIZE == 4 - return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w >> 24); -# else -# if INTVAL_SIZE == 8 - INTVAL r; - r = w << 56; - r |= (w & 0xff00) << 40; - r |= (w & 0xff0000) << 24; - r |= (w & 0xff000000) << 8; - r |= (w & 0xff00000000) >> 8; - r |= (w & 0xff0000000000) >> 24; - r |= (w & 0xff000000000000) >> 40; - r |= (w & 0xff00000000000000) >> 56; - return r; -# else - exit_fatal(1, "Unsupported INTVAL_SIZE=%d\n", - INTVAL_SIZE); -# endif -# endif -#endif -} - -/* - -=item C - -Same as C for opcode_t - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -opcode_t -fetch_op_be(opcode_t w) -{ - ASSERT_ARGS(fetch_op_be) -#if PARROT_BIGENDIAN - return w; -#else -# if OPCODE_T_SIZE == 4 - return (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) | - ((w & 0xff000000) >> 24); -# else - opcode_t r; - - r = w << 56; - r |= (w & 0xff00) << 40; - r |= (w & 0xff0000) << 24; - r |= (w & 0xff000000) << 8; - r |= (w & 0xff00000000) >> 8; - r |= (w & 0xff0000000000) >> 24; - r |= (w & 0xff000000000000) >> 40; - r |= (w & 0xff00000000000000) >> 56; - return r; -# endif -#endif -} - -/* - -=item C - -Same as C for opcode_t - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -opcode_t -fetch_op_le(opcode_t w) -{ - ASSERT_ARGS(fetch_op_le) -#if !PARROT_BIGENDIAN - return w; -#else -# if OPCODE_T_SIZE == 4 - return (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) | - ((w & 0xff000000) >> 24); -# else - opcode_t r; - - r = w << 56; - r |= (w & 0xff00) << 40; - r |= (w & 0xff0000) << 24; - r |= (w & 0xff000000) << 8; - r |= (w & 0xff00000000) >> 8; - r |= (w & 0xff0000000000) >> 24; - r |= (w & 0xff000000000000) >> 40; - r |= (w & 0xff00000000000000) >> 56; - return r; -# endif -#endif -} - -/* - -=pod - -Unrolled routines for swapping various sizes from 32-128 bits. These -should only be used if alignment is unknown or we are pulling something -out of a padded buffer. - -=cut - -*/ - -/* - -=item C - -Converts a 4-byte big-endian buffer C into a little-endian C. - -=cut - -*/ - -void -fetch_buf_be_4(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_be_4) -#if PARROT_BIGENDIAN - memcpy(rb, b, 4); -#else - rb[0] = b[3]; - rb[1] = b[2]; - rb[2] = b[1]; - rb[3] = b[0]; -#endif -} - -/* - -=item C - -Converts a 4-byte little-endian buffer C into a big-endian buffer C. - -=cut - -*/ - -void -fetch_buf_le_4(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_le_4) -#if !PARROT_BIGENDIAN - memcpy(rb, b, 4); -#else - rb[0] = b[3]; - rb[1] = b[2]; - rb[2] = b[1]; - rb[3] = b[0]; -#endif -} - -/* - -=item C - -Converts an 8-byte big-endian buffer C into a little-endian buffer C - -=cut - -*/ - -void -fetch_buf_be_8(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_be_8) -#if PARROT_BIGENDIAN - memcpy(rb, b, 8); -#else - rb[0] = b[7]; - rb[1] = b[6]; - rb[2] = b[5]; - rb[3] = b[4]; - rb[4] = b[3]; - rb[5] = b[2]; - rb[6] = b[1]; - rb[7] = b[0]; -#endif -} - -/* - -=item C - -Converts an 8-byte little-endian buffer C into a big-endian buffer C. - -=cut - -*/ - -void -fetch_buf_le_8(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_le_8) -#if !PARROT_BIGENDIAN - memcpy(rb, b, 8); -#else - rb[0] = b[7]; - rb[1] = b[6]; - rb[2] = b[5]; - rb[3] = b[4]; - rb[4] = b[3]; - rb[5] = b[2]; - rb[6] = b[1]; - rb[7] = b[0]; -#endif -} - -/* - -=item C - -Converts a 12-byte little-endian buffer C into a big-endian buffer C. - -=cut - -*/ - -void -fetch_buf_le_12(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_le_12) -#if !PARROT_BIGENDIAN - memcpy(rb, b, 12); -#else - rb[0] = b[11]; - rb[1] = b[10]; - rb[2] = b[9]; - rb[3] = b[8]; - rb[4] = b[7]; - rb[5] = b[6]; - rb[6] = b[5]; - rb[7] = b[4]; - rb[8] = b[3]; - rb[9] = b[2]; - rb[10] = b[1]; - rb[11] = b[0]; -#endif -} - -/* - -=item C - -Converts a 12-byte big-endian buffer C into a little-endian buffer C. - -=cut - -*/ - -void -fetch_buf_be_12(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_be_12) -#if PARROT_BIGENDIAN - memcpy(rb, b, 12); -#else - rb[0] = b[11]; - rb[1] = b[10]; - rb[2] = b[9]; - rb[3] = b[8]; - rb[4] = b[7]; - rb[5] = b[6]; - rb[6] = b[5]; - rb[7] = b[4]; - rb[8] = b[3]; - rb[9] = b[2]; - rb[10] = b[1]; - rb[11] = b[0]; -#endif -} - -/* - -=item C - -Converts a 16-byte little-endian buffer C into a big-endian buffer C. - -=cut - -*/ - -void -fetch_buf_le_16(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_le_16) -#if !PARROT_BIGENDIAN - memcpy(rb, b, 16); -#else - rb[0] = b[15]; - rb[1] = b[14]; - rb[2] = b[13]; - rb[3] = b[12]; - rb[4] = b[11]; - rb[5] = b[10]; - rb[6] = b[9]; - rb[7] = b[8]; - rb[8] = b[7]; - rb[9] = b[6]; - rb[10] = b[5]; - rb[11] = b[4]; - rb[12] = b[3]; - rb[13] = b[2]; - rb[14] = b[1]; - rb[15] = b[0]; -#endif -} - -/* - -=item C - -Converts a 16-byte big-endian buffer C into a little-endian buffer C. - -=cut - -*/ - -void -fetch_buf_be_16(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_be_16) -#if PARROT_BIGENDIAN - memcpy(rb, b, 16); -#else - rb[0] = b[15]; - rb[1] = b[14]; - rb[2] = b[13]; - rb[3] = b[12]; - rb[4] = b[11]; - rb[5] = b[10]; - rb[6] = b[9]; - rb[7] = b[8]; - rb[8] = b[7]; - rb[9] = b[6]; - rb[10] = b[5]; - rb[11] = b[4]; - rb[12] = b[3]; - rb[13] = b[2]; - rb[14] = b[1]; - rb[15] = b[0]; -#endif -} - -/* - -=item C - -Converts a 32-byte little-endian buffer C into a big-endian buffer C. - -=cut - -*/ - -void -fetch_buf_le_32(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_le_32) -#if !PARROT_BIGENDIAN - memcpy(rb, b, 32); -#else - rb[0] = b[31]; - rb[1] = b[30]; - rb[2] = b[29]; - rb[3] = b[28]; - rb[4] = b[27]; - rb[5] = b[26]; - rb[6] = b[25]; - rb[7] = b[24]; - rb[8] = b[23]; - rb[9] = b[22]; - rb[10] = b[21]; - rb[11] = b[20]; - rb[12] = b[19]; - rb[13] = b[18]; - rb[14] = b[17]; - rb[15] = b[16]; - rb[16] = b[15]; - rb[17] = b[14]; - rb[18] = b[13]; - rb[19] = b[12]; - rb[20] = b[11]; - rb[21] = b[10]; - rb[22] = b[9]; - rb[23] = b[8]; - rb[24] = b[7]; - rb[25] = b[6]; - rb[26] = b[5]; - rb[27] = b[4]; - rb[28] = b[3]; - rb[29] = b[2]; - rb[30] = b[1]; - rb[31] = b[0]; -#endif -} - -/* - -=item C - -Converts a 32-byte big-endian buffer C into a little-endian buffer C. - -=cut - -*/ - -void -fetch_buf_be_32(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) -{ - ASSERT_ARGS(fetch_buf_be_32) -#if PARROT_BIGENDIAN - memcpy(rb, b, 32); -#else - rb[0] = b[31]; - rb[1] = b[30]; - rb[2] = b[29]; - rb[3] = b[28]; - rb[4] = b[27]; - rb[5] = b[26]; - rb[6] = b[25]; - rb[7] = b[24]; - rb[8] = b[23]; - rb[9] = b[22]; - rb[10] = b[21]; - rb[11] = b[20]; - rb[12] = b[19]; - rb[13] = b[18]; - rb[14] = b[17]; - rb[15] = b[16]; - rb[16] = b[15]; - rb[17] = b[14]; - rb[18] = b[13]; - rb[19] = b[12]; - rb[20] = b[11]; - rb[21] = b[10]; - rb[22] = b[9]; - rb[23] = b[8]; - rb[24] = b[7]; - rb[25] = b[6]; - rb[26] = b[5]; - rb[27] = b[4]; - rb[28] = b[3]; - rb[29] = b[2]; - rb[30] = b[1]; - rb[31] = b[0]; -#endif -} - -/* - -=back - -=head1 HISTORY - -Initial version by Melvin on 2002/05/01 - -=cut - -*/ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/call/args.c parrot-2.8.0/src/call/args.c --- parrot-2.7.0/src/call/args.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/call/args.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: args.c 48434 2010-08-12 19:37:44Z chromatic $ +$Id: args.c 49009 2010-09-15 01:08:50Z luben $ =head1 NAME @@ -488,22 +488,12 @@ } } else if (VTABLE_does(interp, aggregate, CONST_STRING(interp, "hash"))) { - const INTVAL elements = VTABLE_elements(interp, aggregate); - INTVAL index; - PMC * const key = Parrot_pmc_new(interp, enum_class_Key); - VTABLE_set_integer_native(interp, key, 0); - SETATTR_Key_next_key(interp, key, (PMC *)INITBucketIndex); + Hash *hash = (Hash *)VTABLE_get_pointer(interp, aggregate); - /* Low-level hash iteration. */ - for (index = 0; index < elements; ++index) { - if (!PMC_IS_NULL(key)) { - STRING * const name = (STRING *)parrot_hash_get_idx(interp, - (Hash *)VTABLE_get_pointer(interp, aggregate), key); - PARROT_ASSERT(name); - VTABLE_set_pmc_keyed_str(interp, call_object, name, - VTABLE_get_pmc_keyed_str(interp, aggregate, name)); - } - } + parrot_hash_iterate(hash, + VTABLE_set_pmc_keyed_str(interp, call_object, + (STRING *)_bucket->key, + hash_value_to_pmc(interp, hash, _bucket->value));) } else { Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, @@ -746,7 +736,7 @@ { ASSERT_ARGS(fill_params) INTVAL *raw_params; - PMC *named_used_list = PMCNULL; + Hash *named_used_list = NULL; INTVAL param_index = 0; INTVAL arg_index = 0; INTVAL named_count = 0; @@ -799,6 +789,8 @@ else if (err_check) { /* We've used up all the parameters, but have extra positional * args left over. */ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "too many positional arguments: %d passed, %d expected", @@ -823,10 +815,13 @@ INTVAL num_positionals = positional_args - arg_index; if (num_positionals < 0) num_positionals = 0; - if (named_count > 0) + if (named_count > 0){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named parameters must follow all positional parameters"); + } collect_positional = Parrot_pmc_new_init_int(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray), @@ -848,10 +843,13 @@ /* Fill a named parameter with a positional argument. */ if (param_flags & PARROT_ARG_NAME) { STRING *param_name; - if (!(param_flags & PARROT_ARG_STRING)) + if (!(param_flags & PARROT_ARG_STRING)){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named parameters must have a name specified"); + } param_name = PARROT_ARG_CONSTANT_ISSET(param_flags) ? accessor->string_constant(interp, arg_info, param_index) : *accessor->string(interp, arg_info, param_index); @@ -864,15 +862,19 @@ param_flags = raw_params[param_index]; /* Mark the name as used, cannot be filled again. */ - if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */ - named_used_list = Parrot_pmc_new(interp, enum_class_Hash); - - VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1); - } - else if (named_count > 0) + if (named_used_list==NULL) /* Only created if needed. */ + named_used_list = parrot_create_hash(interp, + enum_type_INTVAL, Hash_key_type_STRING); + + parrot_hash_put(interp, named_used_list, param_name, (void *)1); + } + else if (named_count > 0){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named parameters must follow all positional parameters"); + } /* Check for :lookahead parameter goes here. */ @@ -895,6 +897,8 @@ VTABLE_get_number_keyed_int(interp, call_object, arg_index); break; default: + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "invalid parameter type"); break; @@ -941,12 +945,15 @@ if (param_flags & PARROT_ARG_NAME) break; - if (err_check) + if (err_check){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "too few positional arguments: " "%d passed, %d (or more) expected", positional_args, param_index + 1); + } } /* Go on to next argument and parameter. */ @@ -960,22 +967,29 @@ INTVAL param_flags = raw_params[param_index]; /* All remaining parameters must be named. */ - if (!(param_flags & PARROT_ARG_NAME)) + if (!(param_flags & PARROT_ARG_NAME)){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named parameters must follow all positional parameters"); + } if (arg_index < positional_args) { PMC *arg_sig; GETATTR_CallContext_arg_flags(interp, call_object, arg_sig); + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); + /* We've used up all the positional parameters, but have extra * positional args left over. */ - if (VTABLE_get_integer_keyed_int(interp, arg_sig, arg_index) & PARROT_ARG_NAME) + if (VTABLE_get_integer_keyed_int(interp, arg_sig, arg_index) & PARROT_ARG_NAME){ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named arguments must follow all positional arguments"); + } Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, @@ -998,15 +1012,19 @@ STRING * const name = VTABLE_get_string_keyed_int(interp, named_arg_list, named_arg_index); - if ((PMC_IS_NULL(named_used_list)) - || !VTABLE_exists_keyed_str(interp, named_used_list, name)) { + if ((named_used_list == NULL) + || !parrot_hash_exists(interp, named_used_list, name)) { + VTABLE_set_pmc_keyed_str(interp, collect_named, name, VTABLE_get_pmc_keyed_str(interp, call_object, name)); + /* Mark the name as used, cannot be filled again. */ - /* named_used_list only created if needed. */ - if (PMC_IS_NULL(named_used_list)) - named_used_list = Parrot_pmc_new(interp, enum_class_Hash); - VTABLE_set_integer_keyed_str(interp, named_used_list, name, 1); + if (named_used_list==NULL) /* Only created if needed. */ + named_used_list = parrot_create_hash(interp, + enum_type_INTVAL, Hash_key_type_STRING); + + parrot_hash_put(interp, named_used_list, name, (void *)1); + ++named_count; } } @@ -1017,10 +1035,13 @@ } /* Store the name. */ - if (!(param_flags & PARROT_ARG_STRING)) + if (!(param_flags & PARROT_ARG_STRING)){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "named parameters must have a name specified"); + } param_name = PARROT_ARG_CONSTANT_ISSET(param_flags) ? accessor->string_constant(interp, arg_info, param_index) @@ -1036,10 +1057,11 @@ if (VTABLE_exists_keyed_str(interp, call_object, param_name)) { /* Mark the name as used, cannot be filled again. */ - /* named_used_list only created if needed. */ - if (PMC_IS_NULL(named_used_list)) - named_used_list = Parrot_pmc_new(interp, enum_class_Hash); - VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1); + if (named_used_list==NULL) /* Only created if needed. */ + named_used_list = parrot_create_hash(interp, + enum_type_INTVAL, Hash_key_type_STRING); + + parrot_hash_put(interp, named_used_list, param_name, (void *)1); ++named_count; /* Fill the named parameter. */ @@ -1061,6 +1083,8 @@ VTABLE_get_pmc_keyed_str(interp, call_object, param_name); break; default: + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "invalid parameter type"); break; @@ -1097,31 +1121,42 @@ /* We don't have an argument for the parameter, and it's not * optional, so it's an error. */ else { - if (err_check) + if (err_check){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "too few named arguments: " "no argument for required parameter '%S'", param_name); + } } } ++param_index; } + /* Double check that all named arguments were assigned to parameters. */ if (err_check) { PMC *named_arg_list; Hash *h; /* Early exit to avoid vtable call */ GETATTR_CallContext_hash(interp, call_object, h); - if (!h || !h->entries) + if (!h || !h->entries){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); return; + } named_arg_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "named")); if (!PMC_IS_NULL(named_arg_list)) { const INTVAL named_arg_count = VTABLE_elements(interp, named_arg_list); - if (PMC_IS_NULL(named_used_list)) + + if (named_used_list==NULL){ + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); + return; /* The 'return' above is a temporary hack to duplicate an old @@ -1133,6 +1168,7 @@ "too many named arguments: %d passed, 0 used", named_arg_count); */ + } if (named_arg_count > named_count) { /* At this point we know we have named arguments that weren't @@ -1146,7 +1182,9 @@ STRING * const name = VTABLE_get_string_keyed_int(interp, named_arg_list, named_arg_index); - if (!VTABLE_exists_keyed_str(interp, named_used_list, name)) { + if (!parrot_hash_exists(interp, named_used_list, name)) { + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, "too many named arguments: '%S' not used", @@ -1156,6 +1194,8 @@ } } } + if (named_used_list != NULL) + parrot_hash_destroy(interp, named_used_list); } diff -Nru parrot-2.7.0/src/call/context_accessors.c parrot-2.8.0/src/call/context_accessors.c --- parrot-2.7.0/src/call/context_accessors.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/call/context_accessors.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2009, Parrot Foundation. -$Id: context_accessors.c 48277 2010-08-03 05:51:00Z plobsing $ +$Id: context_accessors.c 49140 2010-09-19 01:00:06Z plobsing $ =head1 NAME @@ -655,9 +655,6 @@ /* -=item C - =item C @@ -676,18 +673,6 @@ PARROT_EXPORT PARROT_PURE_FUNCTION PARROT_CAN_RETURN_NULL -INTVAL -Parrot_pcc_get_int_constant_func(SHIM_INTERP, ARGIN(PMC *ctx), INTVAL idx) -{ - ASSERT_ARGS(Parrot_pcc_get_int_constant_func) - const Parrot_Context * const c = CONTEXT_STRUCT(ctx); - PARROT_ASSERT(c->constants[idx].type == 'i'); - return c->constants[idx].u.integer; -} - -PARROT_EXPORT -PARROT_PURE_FUNCTION -PARROT_CAN_RETURN_NULL FLOATVAL Parrot_pcc_get_num_constant_func(SHIM_INTERP, ARGIN(PMC *ctx), INTVAL idx) { diff -Nru parrot-2.7.0/src/call/ops.c parrot-2.8.0/src/call/ops.c --- parrot-2.7.0/src/call/ops.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/call/ops.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: ops.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: ops.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/src/call/pcc.c parrot-2.8.0/src/call/pcc.c --- parrot-2.7.0/src/call/pcc.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/call/pcc.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: pcc.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: pcc.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -270,8 +270,7 @@ =item C -Check if current object require running ops. Used in tailcall for updating -RetContinuation. +Check if current object require running ops. =cut diff -Nru parrot-2.7.0/src/datatypes.c parrot-2.8.0/src/datatypes.c --- parrot-2.7.0/src/datatypes.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/datatypes.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,7 +1,7 @@ /* Copyright (C) 2002-2009, Parrot Foundation. License: Artistic 2.0, see README and LICENSE for details -$Id: datatypes.c 46192 2010-04-30 08:27:15Z jimmy $ +$Id: datatypes.c 48837 2010-09-07 23:48:07Z nwellnhof $ =head1 NAME @@ -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); } /* diff -Nru parrot-2.7.0/src/debug.c parrot-2.8.0/src/debug.c --- parrot-2.7.0/src/debug.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/debug.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: debug.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: debug.c 49069 2010-09-16 20:47:05Z bacek $ =head1 NAME @@ -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 @@ -81,6 +82,12 @@ static void debugger_cmdline(PARROT_INTERP) __attribute__nonnull__(1); +static void display_breakpoint( + ARGIN(PDB_t *pdb), + ARGIN(const PDB_breakpoint_t *breakpoint)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL PARROT_OBSERVER @@ -131,6 +138,9 @@ PARROT_ASSERT_ARG(pdb)) #define ASSERT_ARGS_debugger_cmdline __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) +#define ASSERT_ARGS_display_breakpoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pdb) \ + , PARROT_ASSERT_ARG(breakpoint)) #define ASSERT_ARGS_GDB_P __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(s)) @@ -524,6 +534,7 @@ DebuggerCmdList DebCmdList [] = { { "assign", 'a', &cmd_assign }, + { "blist", '\0', &cmd_listbreakpoints }, { "break", '\0', &cmd_break }, { "continue", '\0', &cmd_continue }, { "delete", 'd', &cmd_delete }, @@ -1415,8 +1426,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; } @@ -1475,8 +1486,8 @@ { ASSERT_ARGS(PDB_set_break) PDB_t * const pdb = interp->pdb; - PDB_breakpoint_t *newbreak; - PDB_breakpoint_t **lbreak; + PDB_breakpoint_t *newbreak, + *oldbreak; PDB_line_t *line = NULL; long bp_id; opcode_t *breakpos = NULL; @@ -1557,32 +1568,31 @@ newbreak->condition = PDB_cond(interp, command); } - /* Set the address where to stop */ + /* Set the address where to stop and the line number. */ newbreak->pc = breakpos; - - /* No next breakpoint */ - newbreak->next = NULL; + newbreak->line = line->number; /* Don't skip (at least initially) */ newbreak->skip = 0; - /* Add the breakpoint to the end of the list */ - bp_id = 1; - lbreak = & pdb->breakpoint; - while (*lbreak) { - bp_id = (*lbreak)->id + 1; - lbreak = & (*lbreak)->next; - } - newbreak->prev = *lbreak; - *lbreak = newbreak; - newbreak->id = bp_id; + /* Add the breakpoint to the end of the list, dealing with the first + breakpoint as a special case. */ + + if (!pdb->breakpoint) { + newbreak->id = 1; + pdb->breakpoint = newbreak; + } + else { + for (oldbreak = pdb->breakpoint; oldbreak->next; oldbreak = oldbreak->next) + ; + newbreak->id = oldbreak->id + 1; + oldbreak->next = newbreak; + newbreak->prev = oldbreak; + } /* Show breakpoint position */ - Parrot_io_eprintf(pdb->debugger, "Breakpoint %li at", newbreak->id); - if (line) - Parrot_io_eprintf(pdb->debugger, " line %li", line->number); - Parrot_io_eprintf(pdb->debugger, " pos %li\n", newbreak->pc - interp->code->base.data); + display_breakpoint(pdb, newbreak); } /* @@ -1600,15 +1610,16 @@ { ASSERT_ARGS(list_breakpoints) - PDB_breakpoint_t **lbreak; - for (lbreak = & pdb->breakpoint; *lbreak; lbreak = & (*lbreak)->next) { - PDB_breakpoint_t *br = *lbreak; - Parrot_io_eprintf(pdb->debugger, "Breakpoint %li at", br->id); - Parrot_io_eprintf(pdb->debugger, " pos %li", br->pc - pdb->debugee->code->base.data); - if (br->skip == -1) - Parrot_io_eprintf(pdb->debugger, " (disabled)"); - Parrot_io_eprintf(pdb->debugger, "\n"); - } + PDB_breakpoint_t *breakpoint; + + if (pdb->breakpoint) + for (breakpoint = pdb->breakpoint; + breakpoint; + breakpoint = breakpoint->next) + display_breakpoint(pdb, breakpoint); + + else + Parrot_io_eprintf(pdb->debugger, "No breakpoints set\n"); } /* @@ -1700,7 +1711,7 @@ breakpoint = breakpoint->next; if (!breakpoint) { - Parrot_io_eprintf(interp->pdb->debugger, "No breakpoint number %ld", n); + Parrot_io_eprintf(interp->pdb->debugger, "No breakpoint [%ld]", n); return NULL; } @@ -1734,16 +1745,17 @@ PDB_breakpoint_t * const breakpoint = PDB_find_breakpoint(interp, command); /* if the breakpoint exists, disable it. */ - if (breakpoint) + if (breakpoint) { breakpoint->skip = -1; + display_breakpoint(interp->pdb, breakpoint); + } } /* =item C -Reenable a disabled breakpoint; if the breakpoint was not disabled, has -no effect. +Reenable a disabled breakpoint. =cut @@ -1755,9 +1767,19 @@ ASSERT_ARGS(PDB_enable_breakpoint) PDB_breakpoint_t * const breakpoint = PDB_find_breakpoint(interp, command); - /* if the breakpoint exists, and it was disabled, enable it. */ - if (breakpoint && breakpoint->skip == -1) - breakpoint->skip = 0; + /* If there is a breakpoint and it's disabled, re-enable it. + If it's not disabled, tell the user. */ + + if (breakpoint) { + if (breakpoint->skip < 0) { + breakpoint->skip = 0; + display_breakpoint(interp->pdb, breakpoint); + } + else + Parrot_io_eprintf(interp->pdb->debugger, + "Breakpoint [%d] is not disabled", + breakpoint->id); + } } /* @@ -1774,17 +1796,13 @@ PDB_delete_breakpoint(PARROT_INTERP, ARGIN(const char *command)) { ASSERT_ARGS(PDB_delete_breakpoint) + PDB_t *pdb = interp->pdb; PDB_breakpoint_t * const breakpoint = PDB_find_breakpoint(interp, command); const PDB_line_t *line; long bp_id; if (breakpoint) { - if (!interp->pdb->file) - Parrot_ex_throw_from_c_args(interp, NULL, 0, "No file loaded"); - - line = interp->pdb->file->line; - while (line->opcode != breakpoint->pc) - line = line->next; + display_breakpoint(pdb, breakpoint); /* Delete the condition structure, if there is one */ if (breakpoint->condition) { @@ -1802,16 +1820,16 @@ } else if (!breakpoint->prev && breakpoint->next) { breakpoint->next->prev = NULL; - interp->pdb->breakpoint = breakpoint->next; + pdb->breakpoint = breakpoint->next; } else { - interp->pdb->breakpoint = NULL; + pdb->breakpoint = NULL; } - bp_id = breakpoint->id; + /* Kill the breakpoint */ mem_gc_free(interp, breakpoint); - Parrot_io_eprintf(interp->pdb->debugger, "Breakpoint %li deleted\n", bp_id); + Parrot_io_eprintf(pdb->debugger, "Deleted\n"); } } @@ -1890,7 +1908,7 @@ /* Remove the RUNNING state */ pdb->state &= ~PDB_RUNNING; - Parrot_io_eprintf(pdb->debugger, "Program exited.\n"); + Parrot_io_eprintf(pdb->debugger, "[program exited]\n"); return 1; } @@ -2094,6 +2112,8 @@ /* Add the STOPPED state and stop */ pdb->state |= PDB_STOPPED; + Parrot_io_eprintf(pdb->debugger, "Stop at "); + display_breakpoint(pdb, breakpoint); return 1; } @@ -2256,6 +2276,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 +2473,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) { @@ -2607,14 +2628,17 @@ ADD_OP_VAR_PART(interp, interp->code, pc, n); pc += n; - /* Prepare for next line */ - newline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t); - newline->label = NULL; - newline->next = NULL; - newline->number = pline->number + 1; - pline->next = newline; - pline = newline; - pline->source_offset = pfile->size; + /* Prepare for next line unless there will be no next line. */ + + if (pc < code_end) { + newline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t); + newline->label = NULL; + newline->next = NULL; + newline->number = pline->number + 1; + pline->next = newline; + pline = newline; + pline->source_offset = pfile->size; + } } /* Add labels to the lines they belong to */ @@ -2751,107 +2775,131 @@ */ +#define DEBUG_SOURCE_BUFFER_CHUNK 1024 + PARROT_EXPORT void PDB_load_source(PARROT_INTERP, ARGIN(const char *command)) { ASSERT_ARGS(PDB_load_source) - FILE *file; - char f[DEBUG_CMD_BUFFER_LENGTH + 1]; - int i, j, c; - PDB_file_t *pfile; - PDB_line_t *pline; - PDB_t * const pdb = interp->pdb; - opcode_t *pc = interp->code->base.data; - unsigned long size = 0; + PDB_t * const pdb = interp->pdb; + char file_spec[DEBUG_CMD_BUFFER_LENGTH+1]; + FILE *file_desc; + PDB_file_t *dfile; + PDB_line_t *dline, + *prev_dline = NULL; + size_t buffer_size; + ptrdiff_t start_offset; + int line = 0; + opcode_t *PC = interp->code->base.data; + int ci, i, ch; TRACEDEB_MSG("PDB_load_source"); - /* If there was a file already loaded or the bytecode was - disassembled, free it */ + /* Free any previous source lines. */ + if (pdb->file) { - PDB_free_file(interp->pdb->debugee, interp->pdb->debugee->pdb->file); - interp->pdb->debugee->pdb->file = NULL; + PDB_free_file(pdb->debugee, pdb->debugee->pdb->file); + pdb->debugee->pdb->file = NULL; } - /* Get the name of the file */ - for (j = 0; command[j] == ' '; ++j) - continue; - for (i = 0; command[j]; ++i, ++j) - f[i] = command[j]; + /* Get the source file specification. */ - f[i] = '\0'; + for (ci = 0; command[ci] == ' '; ++ci) ; + for (i = 0; command[ci]; ++i, ++ci) + file_spec[i] = command[ci]; + file_spec[i] = '\0'; - /* open the file */ - file = fopen(f, "r"); + /* Open the file for reading. */ - /* abort if fopen failed */ - if (!file) { - Parrot_io_eprintf(pdb->debugger, "Unable to load '%s'\n", f); + file_desc = fopen(file_spec, "r"); + if (!file_desc) { + Parrot_io_eprintf(pdb->debugger, "Cannot open '%s' for reading\n", + file_spec); return; } - pfile = mem_gc_allocate_zeroed_typed(interp, PDB_file_t); - pline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t); + /* Allocate a file block and the source buffer. */ - pfile->source = mem_gc_allocate_n_typed(interp, 1024, char); - pfile->line = pline; - pline->number = 1; + dfile = mem_gc_allocate_zeroed_typed(interp, PDB_file_t); + dfile->source = mem_gc_allocate_n_typed(interp, DEBUG_SOURCE_BUFFER_CHUNK, + char); + buffer_size = DEBUG_SOURCE_BUFFER_CHUNK; - PARROT_ASSERT(interp->code); - PARROT_ASSERT(interp->code->op_info_table); - PARROT_ASSERT(pc); - - while ((c = fgetc(file)) != EOF) { - /* Grow it */ - if (++size == 1024) { - pfile->source = mem_gc_realloc_n_typed(interp, pfile->source, - (size_t)pfile->size + 1024, char); - size = 0; - } - pfile->source[pfile->size] = (char)c; - - ++pfile->size; - - if (c == '\n') { - /* If the line has an opcode move to the next one, - otherwise leave it with NULL to skip it. */ - PDB_line_t *newline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t); - - if (PDB_hasinstruction(pfile->source + pline->source_offset)) { - size_t n = interp->code->op_info_table[*pc]->op_count; - pline->opcode = pc; - ADD_OP_VAR_PART(interp, interp->code, pc, n); - pc += n; + /* Load the source lines. */ - /* don't walk off the end of the program into neverland */ - if (pc >= interp->code->base.data + interp->code->base.size) - break; + do { + + /* Load characters until a newline or EOF is found. If the source + buffer fills up, extend it. */ + + start_offset = dfile->size; + do { + ch = fgetc(file_desc); + if (ch == EOF) + break; + dfile->source[dfile->size] = (char)ch; + if (++dfile->size >= buffer_size) { + buffer_size += DEBUG_SOURCE_BUFFER_CHUNK; + dfile->source = mem_gc_realloc_n_typed(interp, + dfile->source, + buffer_size, + char); } + } while (ch != '\n'); - newline->number = pline->number + 1; - pline->next = newline; - pline = newline; - pline->source_offset = pfile->size; - pline->opcode = NULL; - pline->label = NULL; + /* We're done at EOF unless the last line didn't end with a newline. */ + + if (ch == EOF && (dfile->size == 0 || dfile->source[dfile->size-1] == '\n')) + break; + + if (ch == EOF) { + dfile->source[dfile->size++] = '\n'; + Parrot_io_eprintf(pdb->debugger, + "(Newline appended to last line of file)\n"); } - } - fclose(file); + /* Allocate a line block and store information about the line. + Attempt to match the line with its opcode PC (does not work). */ - pdb->state |= PDB_SRC_LOADED; - pdb->file = pfile; + dline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t); + dline->source_offset = start_offset; + dline->number = ++line; + if (PDB_hasinstruction(dfile->source + start_offset)) { + if (PC < interp->code->base.data + interp->code->base.size) { + size_t n = interp->code->op_info_table[*PC]->op_count; + dline->opcode = PC; + ADD_OP_VAR_PART(interp, interp->code, PC, n); + PC += n; + } + } + + /* Chain the line onto the file block or previous line. */ + + if (prev_dline) + prev_dline->next = dline; + else + dfile->line = dline; + prev_dline = dline; - TRACEDEB_MSG("PDB_load_source finished"); + } while (ch != EOF); + + /* Close the source file, mark the file loaded, and line the file + block onto the PDB structure. */ + + fclose(file_desc); + + pdb->state |= PDB_SRC_LOADED; + pdb->file = dfile; } /* =item C -Return true if the line has an instruction. +Return true if the line has an instruction. This test does not provide +the ability to match source lines with opcode PCs. =cut @@ -2977,7 +3025,7 @@ =item C -Show lines from the source code file. +Display lines from the source code file. =cut @@ -2987,59 +3035,72 @@ PDB_list(PARROT_INTERP, ARGIN(const char *command)) { ASSERT_ARGS(PDB_list) - char *c; - unsigned long line_number; - unsigned long i; - PDB_line_t *line; PDB_t *pdb = interp->pdb; - unsigned long n = 10; + unsigned long start_line; + unsigned long line_count; + PDB_line_t *line; + unsigned long i; + char *ch; TRACEDEB_MSG("PDB_list"); + + /* Make sure the source file has been loaded. Get the starting + line and the number of lines from the command. Quit if zero + lines requested. */ + if (!pdb->file || !pdb->file->line) { Parrot_io_eprintf(pdb->debugger, "No source file loaded\n"); return; } - /* set the list line if provided */ - line_number = get_ulong(&command, 0); - pdb->file->list_line = (unsigned long) line_number; + start_line = get_ulong(&command, 1); + pdb->file->list_line = (unsigned long) start_line; - /* set the number of lines to print */ - n = get_ulong(&command, 10); + line_count = get_ulong(&command, 20); - /* if n is zero, we simply return, as we don't have to print anything */ - if (n == 0) + if (line_count == 0) { + Parrot_io_eprintf(pdb->debugger, "Zero lines were requested"); return; + } - line = pdb->file->line; + /* Run down the line list to the starting line. Quit if the + starting line number is too high. */ - for (i = 0; i < pdb->file->list_line && line->next; ++i) + for (i = 1, line = pdb->file->line; + i < pdb->file->list_line && line->next; + ++i) line = line->next; - i = 1; - while (line->next) { - Parrot_io_eprintf(pdb->debugger, "%li ", pdb->file->list_line + i); - /* If it has a label print it */ - if (line->label) - Parrot_io_eprintf(pdb->debugger, "L%li:\t", line->label->number); + if (i < start_line) { + Parrot_io_eprintf(pdb->debugger, "Starting line %d not in file\n", + start_line); + return; + } + + /* Run down the lines to be displayed. Include the PC, line number, + and line text. Quit if we run out of lines. */ + + for (i = 0; i < line_count; ++i) { + if (line->opcode) + Parrot_io_eprintf(pdb->debugger, "%04d ", + line->opcode - pdb->debugee->code->base.data); + else + Parrot_io_eprintf(pdb->debugger, " "); - c = pdb->file->source + line->source_offset; + Parrot_io_eprintf(pdb->debugger, "%4li ", line->number); - while (*c != '\n') - Parrot_io_eprintf(pdb->debugger, "%c", *(c++)); + for (ch = pdb->file->source + line->source_offset; *ch != '\n'; ++ch) + Parrot_io_eprintf(pdb->debugger, "%c", *ch); Parrot_io_eprintf(pdb->debugger, "\n"); line = line->next; - - if (i++ == n) - break; + if (!line) break; } - if (--i != n) - pdb->file->list_line = 0; - else - pdb->file->list_line += n; + /* Let the user know if there are any more lines. */ + + Parrot_io_eprintf(pdb->debugger, (line) ? "[more]\n" : "[end]\n"); } /* @@ -3107,31 +3168,29 @@ Parrot_Interp itdeb = interp->pdb ? interp->pdb->debugger : interp; Parrot_Interp itp = interp->pdb ? interp->pdb->debugee : interp; - Parrot_io_eprintf(itdeb, "Total memory allocated = %ld\n", + Parrot_io_eprintf(itdeb, "Total memory allocated: %ld\n", interpinfo(itp, TOTAL_MEM_ALLOC)); - Parrot_io_eprintf(itdeb, "GC mark runs = %ld\n", + Parrot_io_eprintf(itdeb, "GC mark runs: %ld\n", interpinfo(itp, GC_MARK_RUNS)); - Parrot_io_eprintf(itdeb, "Lazy gc mark runs = %ld\n", + Parrot_io_eprintf(itdeb, "Lazy gc mark runs: %ld\n", interpinfo(itp, GC_LAZY_MARK_RUNS)); - Parrot_io_eprintf(itdeb, "GC collect runs = %ld\n", + Parrot_io_eprintf(itdeb, "GC collect runs: %ld\n", interpinfo(itp, GC_COLLECT_RUNS)); - Parrot_io_eprintf(itdeb, "Collect memory = %ld\n", + Parrot_io_eprintf(itdeb, "Collect memory: %ld\n", interpinfo(itp, TOTAL_COPIED)); - Parrot_io_eprintf(itdeb, "Active PMCs = %ld\n", + Parrot_io_eprintf(itdeb, "Active PMCs: %ld\n", interpinfo(itp, ACTIVE_PMCS)); - Parrot_io_eprintf(itdeb, "Extended PMCs = %ld\n", - interpinfo(itp, EXTENDED_PMCS)); - Parrot_io_eprintf(itdeb, "Timely GC PMCs = %ld\n", + Parrot_io_eprintf(itdeb, "Timely GC PMCs: %ld\n", interpinfo(itp, IMPATIENT_PMCS)); - Parrot_io_eprintf(itdeb, "Total PMCs = %ld\n", + Parrot_io_eprintf(itdeb, "Total PMCs: %ld\n", interpinfo(itp, TOTAL_PMCS)); - Parrot_io_eprintf(itdeb, "Active buffers = %ld\n", + Parrot_io_eprintf(itdeb, "Active buffers: %ld\n", interpinfo(itp, ACTIVE_BUFFERS)); - Parrot_io_eprintf(itdeb, "Total buffers = %ld\n", + Parrot_io_eprintf(itdeb, "Total buffers: %ld\n", interpinfo(itp, TOTAL_BUFFERS)); - Parrot_io_eprintf(itdeb, "Header allocations since last collect = %ld\n", + Parrot_io_eprintf(itdeb, "Header allocations since last collect: %ld\n", interpinfo(itp, HEADER_ALLOCS_SINCE_COLLECT)); - Parrot_io_eprintf(itdeb, "Memory allocations since last collect = %ld\n", + Parrot_io_eprintf(itdeb, "Memory allocations since last collect: %ld\n", interpinfo(itp, MEM_ALLOCS_SINCE_COLLECT)); } @@ -3165,7 +3224,7 @@ for (i= 0; i < sizeof (DebCmdList) / sizeof (DebuggerCmdList); ++i) { const DebuggerCmdList *cmdlist = DebCmdList + i; Parrot_io_eprintf(interp->pdb->debugger, - " %-12s-- %s\n", cmdlist->name, cmdlist->cmd->shorthelp); + " %-12s %s\n", cmdlist->name, cmdlist->cmd->shorthelp); } Parrot_io_eprintf(interp->pdb->debugger, "\n" "Type \"help\" followed by a command name for full documentation.\n\n"); @@ -3420,6 +3479,37 @@ /* +=item C + +Displays a breakpoint. + +=cut + +*/ + +static void +display_breakpoint(ARGIN(PDB_t *pdb), ARGIN(const PDB_breakpoint_t *breakpoint)) +{ + ASSERT_ARGS(display_breakpoint) + + /* Display the breakpoint id, PC, line number (if known), + and disabled flag. */ + + Parrot_io_eprintf(pdb->debugger, + "[%d] breakpoint at PC %04d", + breakpoint->id, + breakpoint->pc - pdb->debugee->code->base.data); + if (breakpoint->line) + Parrot_io_eprintf(pdb->debugger, ", line %d", breakpoint->line); + if (breakpoint->skip < 0) + Parrot_io_eprintf(pdb->debugger, " (DISABLED)"); + Parrot_io_eprintf(pdb->debugger, "\n"); +} + + +/* + =back =head1 SEE ALSO @@ -3451,7 +3541,6 @@ */ - /* * Local variables: * c-file-style: "parrot" diff -Nru parrot-2.7.0/src/dynext.c parrot-2.8.0/src/dynext.c --- parrot-2.7.0/src/dynext.c 2010-07-07 00:11:19.000000000 +0000 +++ parrot-2.8.0/src/dynext.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* -Copyright (C) 2001-2008, Parrot Foundation. -$Id: dynext.c 48009 2010-07-05 14:33:31Z NotFound $ +Copyright (C) 2001-2010, Parrot Foundation. +$Id: dynext.c 48981 2010-09-13 19:17:36Z nwellnhof $ =head1 NAME @@ -145,8 +145,7 @@ =item C -Set a property C with value C on the C -C. +Sets a property C with value C on the C C. =cut @@ -164,12 +163,13 @@ VTABLE_setprop(interp, lib_pmc, key, prop); } + /* =item C -Store a C PMC in the interpreter's C. +Stores a C PMC in the interpreter's C. =cut @@ -194,12 +194,13 @@ VTABLE_set_pmc_keyed_str(interp, dyn_libs, path, lib_pmc); } + /* =item C -Check if a C PMC with the filename path exists. -If it does, return it. Otherwise, return NULL. +Returns a C PMC with the given filename path, if it exists. +Otherwise returns PMCNULL. =cut @@ -214,17 +215,16 @@ PMC * const iglobals = interp->iglobals; PMC * const dyn_libs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_DYN_LIBS); - if (!VTABLE_exists_keyed_str(interp, dyn_libs, path)) - return PMCNULL; return VTABLE_get_pmc_keyed_str(interp, dyn_libs, path); } + /* =item C -Call Parrot_dlopen with the Parrot String argument converted to C string. The +Calls C with the path argument converted to a C string. The flags argument will be converted into native form and used if applicable. =cut @@ -244,12 +244,13 @@ return handle; } + /* =item C -Return path and handle of a dynamic lib, setting lib_name to just the filestem +Returns path and handle of a dynamic lib, setting lib_name to just the filestem (i.e. without path or extension) as a freshly-allocated C string. =cut @@ -264,75 +265,80 @@ ARGIN_NULLOK(STRING *ext)) { ASSERT_ARGS(get_path) - STRING *path, *full_name; - const char *err = NULL; /* buffer returned from Parrot_dlerror */ - - PMC * const iglobals = interp->iglobals; + PMC * const iglobals = interp->iglobals; PMC * const lib_paths = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_LIB_PATHS); PMC * const share_ext = VTABLE_get_pmc_keyed_int(interp, lib_paths, PARROT_LIB_DYN_EXTS); - if (lib == NULL) { + STRING *path, *full_name; + + if (! lib) { *handle = Parrot_dlopen((char *)NULL, flags); - if (*handle) { + if (*handle) return CONST_STRING(interp, ""); + else { + const char *err = Parrot_dlerror(); + 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; } - err = Parrot_dlerror(); - Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, - "Couldn't dlopen(NULL): %s\n", - err ? err : "unknown reason"); - return NULL; } - /* - * first, try to add an extension to the file if it has none. - */ + /* first, try to add an extension to the file if it has none */ if (! ext) { const INTVAL n = VTABLE_elements(interp, share_ext); - INTVAL i; + INTVAL i; for (i = 0; i < n; ++i) { - ext = VTABLE_get_string_keyed_int(interp, share_ext, i); + ext = VTABLE_get_string_keyed_int(interp, share_ext, i); full_name = Parrot_str_concat(interp, wo_ext, ext); - path = Parrot_locate_runtime_file_str(interp, full_name, - PARROT_RUNTIME_FT_DYNEXT); + path = Parrot_locate_runtime_file_str(interp, full_name, + PARROT_RUNTIME_FT_DYNEXT); + if (path) { *handle = dlopen_string(interp, flags, path); - if (*handle) { + + if (*handle) return path; + else { + const char *err = Parrot_dlerror(); + 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; } - err = Parrot_dlerror(); - Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, - "Couldn't load '%Ss': %s\n", - full_name, err ? err : "unknown reason"); - return NULL; } - /* - * File with extension and prefix was not found, - * so try file.extension w/o prefix - */ + /* File not found with extension and prefix; try file.extension */ *handle = dlopen_string(interp, flags, full_name); - if (*handle) { + if (*handle) return full_name; - } } } + /* * finally, try the given file name as is. We still use * Parrot_locate_runtime_file so that (a) relative pathnames are searched in * the standard locations, and (b) the angle of the slashes are adjusted as * required for non-Unix systems. */ + full_name = Parrot_locate_runtime_file_str(interp, lib, - PARROT_RUNTIME_FT_DYNEXT); + PARROT_RUNTIME_FT_DYNEXT); + if (full_name) { *handle = dlopen_string(interp, flags, full_name); - if (*handle) { + + if (*handle) return full_name; - } } + /* * and on windows strip a leading "lib" * [shouldn't this happen in Parrot_locate_runtime_file instead?] @@ -340,10 +346,9 @@ #ifdef WIN32 if (!STRING_IS_EMPTY(lib) && memcmp(lib->strstart, "lib", 3) == 0) { *handle = Parrot_dlopen((char *)lib->strstart + 3, 0); - if (*handle) { - path = Parrot_str_substr(interp, lib, 3, lib->strlen - 3); - return path; - } + + if (*handle) + return Parrot_str_substr(interp, lib, 3, lib->strlen - 3); } #endif @@ -360,20 +365,25 @@ } #endif - /* And after-finally, let the OS use his own search */ - if (!STRING_IS_EMPTY(lib)) { + if (STRING_IS_EMPTY(lib)) { *handle = dlopen_string(interp, flags, lib); if (*handle) return lib; } + /* And after-finally, let the OS use his own search */ + { + const char *err = Parrot_dlerror(); + Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, + "Couldn't load '%Ss': %s\n", + lib, err ? err : "unknown reason"); - err = Parrot_dlerror(); - Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, - "Couldn't load '%Ss': %s\n", - lib, err ? err : "unknown reason"); - return NULL; + /* clear the error memory */ + (void)Parrot_dlerror(); + return NULL; + } } + /* =item C -Same as Parrot_dlsym but takes the symbol name from a Parrot String instead -of a C string. +Loads a symbol named C from the shared library represented by +C. =cut @@ -430,25 +441,26 @@ { ASSERT_ARGS(Parrot_dlsym_str) - void *ptr; if (STRING_IS_NULL(symbol)) - ptr = NULL; + return NULL; + else { char *const symbol_cs = Parrot_str_to_cstring(interp, symbol); - ptr = Parrot_dlsym(handle, symbol_cs); + void *ptr = Parrot_dlsym(handle, symbol_cs); Parrot_str_free_cstring(symbol_cs); + return ptr; } - return ptr; } + /* =item C -Loads and Initializes a new library and returns a ParrotLibrary PMC. -Takes the name of a library C, that is loaded with handle C. -Calls the necessary initialization routines, if any. +Loads and initializes a new library and returns a ParrotLibrary PMC. Takes the +name of a library C, that is loaded with handle C. Calls the +necessary initialization routines, if any. =cut @@ -472,12 +484,6 @@ Parrot_pcc_set_namespace(interp, context, Parrot_get_HLL_namespace(interp, parrot_hll_id)); - /* - * work around gcc 3.3.3 and other problem with dynpmcs - * something during library loading doesn't stand a GC run - */ - Parrot_block_GC_mark(interp); - if (lib_name) { STRING * const load_name = Parrot_sprintf_c(interp, "Parrot_lib_%Ss_load", lib_name); @@ -512,21 +518,18 @@ /* remember lib_pmc in iglobals */ store_lib_pmc(interp, lib_pmc, wo_ext, type, lib_name); - /* UNLOCK */ - Parrot_unblock_GC_mark(interp); - Parrot_pop_context(interp); return lib_pmc; } + /* =item C Extracts a STRING value from PMC C in interpreter C. Copies that -string into the pool of interpreter C using the default encoding -and charset. +string into the pool of interpreter C using the default encoding. =cut @@ -538,16 +541,17 @@ clone_string_into(ARGMOD(Interp *d), ARGIN(Interp *s), ARGIN(PMC *value)) { ASSERT_ARGS(clone_string_into) - STRING * const orig = VTABLE_get_string(s, value); - char * const raw_str = Parrot_str_to_cstring(s, orig); - STRING * const ret = + STRING * const orig = VTABLE_get_string(s, value); + 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; } + /* =item C @@ -570,6 +574,7 @@ return ret; } + /* =item C @@ -608,7 +613,8 @@ * Anyways, if we hope to share bytecode at runtime, we need to have * them have identical opcodes anyways. */ - PMC * const new_lib_pmc = Parrot_pmc_new_constant(d, enum_class_ParrotLibrary); + PMC * const new_lib_pmc = Parrot_pmc_new_constant(d, + enum_class_ParrotLibrary); PMC_data(new_lib_pmc) = handle; VTABLE_setprop(d, new_lib_pmc, CONST_STRING(s, "_filename"), make_string_pmc(d, wo_ext)); @@ -619,11 +625,13 @@ if (d->n_libs != s->n_libs) { INTVAL i; if (d->all_op_libs) - d->all_op_libs = (op_lib_t **)mem_internal_realloc(d->all_op_libs, - sizeof (op_lib_t *) * s->n_libs); + d->all_op_libs + = (op_lib_t **)mem_internal_realloc(d->all_op_libs, + sizeof (op_lib_t *) * s->n_libs); else - d->all_op_libs = (op_lib_t **)mem_internal_allocate(sizeof (op_lib_t *) * - s->n_libs); + d->all_op_libs + = (op_lib_t **)mem_internal_allocate(sizeof (op_lib_t *) * + s->n_libs); for (i = d->n_libs; i < s->n_libs; ++i) d->all_op_libs[i] = s->all_op_libs[i]; d->n_libs = s->n_libs; @@ -631,11 +639,11 @@ return new_lib_pmc; } - else { - return run_init_lib(d, handle, lib_name, wo_ext); - } + + return run_init_lib(d, handle, lib_name, wo_ext); } + /* =item C @@ -682,9 +690,8 @@ * * LOCK() */ - if (lib) { + if (lib) lib_name = parrot_split_path_ext(interp, lib, &wo_ext, &ext); - } else { wo_ext = CONST_STRING(interp, ""); lib_name = NULL; @@ -692,27 +699,27 @@ } lib_pmc = is_loaded(interp, wo_ext); - if (!PMC_IS_NULL(lib_pmc)) { - /* UNLOCK() */ + + /* UNLOCK() */ + if (!PMC_IS_NULL(lib_pmc)) return lib_pmc; - } - if (!PMC_IS_NULL(parameters)) { + if (!PMC_IS_NULL(parameters)) flags = VTABLE_get_integer(interp, parameters); - } path = get_path(interp, lib, (Parrot_dlopen_flags)flags, &handle, wo_ext, ext); - if (!path || !handle) { - /* - * XXX Parrot_ex_throw_from_c_args? return PMCNULL? - * PMC Undef seems convenient, because it can be queried with get_bool() - */ + + /* + * XXX Parrot_ex_throw_from_c_args? return PMCNULL? + * PMC Undef seems convenient, because it can be queried with get_bool() + */ + if (!path || !handle) return Parrot_pmc_new(interp, enum_class_Undef); - } return run_init_lib(interp, handle, lib_name, wo_ext); } + /* =back diff -Nru parrot-2.7.0/src/dynoplibs/math.ops parrot-2.8.0/src/dynoplibs/math.ops --- parrot-2.7.0/src/dynoplibs/math.ops 2010-05-28 05:23:29.000000000 +0000 +++ parrot-2.8.0/src/dynoplibs/math.ops 2010-09-21 07:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: math.ops 47051 2010-05-27 08:45:23Z plobsing $ + * $Id: math.ops 48675 2010-08-26 19:54:37Z chromatic $ ** math.ops */ @@ -95,8 +95,7 @@ result = VTABLE_get_integer(interp, $2) % $3; - $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2)); - VTABLE_set_integer_native(interp, $1, result); + $1 = Parrot_pmc_new_init_int(interp, VTABLE_type(interp, $2), result); } inline op cmod(invar PMC, invar PMC, invar PMC) :base_core { @@ -112,8 +111,7 @@ result = VTABLE_get_integer(interp, $2) % value; - $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2)); - VTABLE_set_integer_native(interp, $1, result); + $1 = Parrot_pmc_new_init_int(interp, VTABLE_type(interp, $2), result); } ######################################## @@ -173,8 +171,8 @@ result = fmod(VTABLE_get_integer(interp, $2), value); - $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2)); - VTABLE_set_integer_native(interp, $1, (INTVAL) result); + $1 = Parrot_pmc_new_init_int(interp, + VTABLE_type(interp, $2), (INTVAL)result); } =back diff -Nru parrot-2.7.0/src/dynoplibs/sys.ops parrot-2.8.0/src/dynoplibs/sys.ops --- parrot-2.7.0/src/dynoplibs/sys.ops 2010-05-28 05:23:29.000000000 +0000 +++ parrot-2.8.0/src/dynoplibs/sys.ops 2010-09-21 07:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: sys.ops 47051 2010-05-27 08:45:23Z plobsing $ + * $Id: sys.ops 48837 2010-09-07 23:48:07Z nwellnhof $ ** sys.ops */ @@ -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: diff -Nru parrot-2.7.0/src/dynoplibs/trans.ops parrot-2.8.0/src/dynoplibs/trans.ops --- parrot-2.7.0/src/dynoplibs/trans.ops 2010-05-28 05:23:29.000000000 +0000 +++ parrot-2.8.0/src/dynoplibs/trans.ops 2010-09-21 07:48:51.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: trans.ops 47051 2010-05-27 08:45:23Z plobsing $ + * $Id: trans.ops 48564 2010-08-19 02:03:11Z cotto $ * trans.ops */ @@ -105,6 +105,30 @@ ######################################## +=item B(out NUM, in NUM) + +Set $1 to the cotangent of $2 (given in radians). + +=cut + +inline op cot(out NUM, in NUM) :base_math { + $1 = ((FLOATVAL)1) / tan((FLOATVAL)$2); +} + +######################################## + +=item B(out NUM, in NUM) + +Set $1 to the cosecant of $2 (given in radians). + +=cut + +inline op csc(out NUM, in NUM) :base_math { + $1 = ((FLOATVAL)1) / sin((FLOATVAL)$2); +} + +######################################## + =item B(out NUM, in NUM) Set $1 to I raised to the power $2. I is the base of the natural diff -Nru parrot-2.7.0/src/dynpmc/Defines.in parrot-2.8.0/src/dynpmc/Defines.in --- parrot-2.7.0/src/dynpmc/Defines.in 2010-06-19 12:34:05.000000000 +0000 +++ parrot-2.8.0/src/dynpmc/Defines.in 2010-09-21 07:48:51.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2010, Parrot Foundation. -# $Id: Defines.in 47678 2010-06-18 00:29:10Z whiteknight $ +# $Id: Defines.in 48833 2010-09-07 22:58:38Z nwellnhof $ DYNPMC_TARGETS = \ #IF(has_zlib): $(DYNEXT_DIR)/gziphandle$(LOAD_EXT) \ @@ -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 \ diff -Nru parrot-2.7.0/src/dynpmc/gziphandle.pmc parrot-2.8.0/src/dynpmc/gziphandle.pmc --- parrot-2.7.0/src/dynpmc/gziphandle.pmc 2010-07-05 02:46:54.000000000 +0000 +++ parrot-2.8.0/src/dynpmc/gziphandle.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: gziphandle.pmc 47913 2010-06-29 18:16:46Z fperrad $ +$Id: gziphandle.pmc 48949 2010-09-12 01:05:04Z NotFound $ =head1 NAME @@ -216,21 +216,6 @@ /* -=item C - -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 diff -Nru parrot-2.7.0/src/dynpmc/Rules.in parrot-2.8.0/src/dynpmc/Rules.in --- parrot-2.7.0/src/dynpmc/Rules.in 2010-05-12 11:58:45.000000000 +0000 +++ parrot-2.8.0/src/dynpmc/Rules.in 2010-09-21 07:48:51.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2010, Parrot Foundation. -# $Id: Rules.in 46510 2010-05-11 14:15:36Z coke $ +# $Id: Rules.in 49020 2010-09-15 17:43:18Z coke $ $(DYNEXT_DIR)/dynlexpad$(LOAD_EXT): src/dynpmc/dynlexpad$(O) $(LD) @ld_out@$(DYNEXT_DIR)/dynlexpad$(LOAD_EXT) src/dynpmc/dynlexpad$(O) $(LINKARGS) @@ -78,8 +78,12 @@ src/dynpmc/pmc_gziphandle.h : src/dynpmc/gziphandle.c -src/dynpmc/gziphandle$(O): src/dynpmc/gziphandle.c $(DYNPMC_H_FILES) \ - src/dynpmc/pmc_gziphandle.h include/pmc/pmc_fixedintegerarray.h +src/dynpmc/gziphandle$(O): \ + src/dynpmc/gziphandle.c \ + $(DYNPMC_H_FILES) \ + src/dynpmc/pmc_gziphandle.h \ + include/pmc/pmc_handle.h \ + include/pmc/pmc_fixedintegerarray.h src/dynpmc/gziphandle.c: src/dynpmc/gziphandle.dump $(PMC2CC) src/dynpmc/gziphandle.pmc diff -Nru parrot-2.7.0/src/embed.c parrot-2.8.0/src/embed.c --- parrot-2.7.0/src/embed.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/embed.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: embed.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: embed.c 48923 2010-09-10 23:34:18Z plobsing $ =head1 NAME @@ -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 *) diff -Nru parrot-2.7.0/src/exceptions.c parrot-2.8.0/src/exceptions.c --- parrot-2.7.0/src/exceptions.c 2010-08-09 22:57:58.000000000 +0000 +++ parrot-2.8.0/src/exceptions.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: exceptions.c 48354 2010-08-09 03:55:54Z cotto $ +$Id: exceptions.c 48885 2010-09-09 17:45:26Z NotFound $ =head1 NAME @@ -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); } diff -Nru parrot-2.7.0/src/gc/alloc_memory.c parrot-2.8.0/src/gc/alloc_memory.c --- parrot-2.7.0/src/gc/alloc_memory.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/alloc_memory.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: alloc_memory.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: alloc_memory.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/src/gc/alloc_resources.c parrot-2.8.0/src/gc/alloc_resources.c --- parrot-2.7.0/src/gc/alloc_resources.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/alloc_resources.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: alloc_resources.c 48492 2010-08-14 20:01:39Z cotto $ +$Id: alloc_resources.c 49073 2010-09-16 23:39:23Z mikehh $ =head1 NAME @@ -30,26 +30,16 @@ #define RESOURCE_DEBUG 0 #define RESOURCE_DEBUG_SIZE 1000000 -#define POOL_SIZE (65536 * 2) - -typedef void (*compact_f) (Interp *, Memory_Pools * const, Variable_Size_Pool *); +typedef struct string_callback_data { + Memory_Block *new_block; /* A pointer to our working block */ + char *cur_spot; /* Where we're currently copying to */ +} string_callback_data; /* HEADERIZER HFILE: src/gc/gc_private.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -static void alloc_new_block( - ARGMOD(Memory_Pools *mem_pools), - size_t size, - ARGMOD(Variable_Size_Pool *pool), - ARGIN(const char *why)) - __attribute__nonnull__(1) - __attribute__nonnull__(3) - __attribute__nonnull__(4) - FUNC_MODIFIES(*mem_pools) - FUNC_MODIFIES(*pool); - PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT static const char * buffer_location(PARROT_INTERP, ARGIN(const Buffer *b)) @@ -76,47 +66,7 @@ __attribute__nonnull__(2) FUNC_MODIFIES(*dest_interp); -static void free_memory_pool(ARGFREE(Variable_Size_Pool *pool)); -static void free_old_mem_blocks( - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Variable_Size_Pool *pool), - ARGMOD(Memory_Block *new_block), - UINTVAL total_size) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*mem_pools) - FUNC_MODIFIES(*pool) - FUNC_MODIFIES(*new_block); - static void free_pool(ARGFREE(Fixed_Size_Pool *pool)); -static int is_block_almost_full(ARGIN(const Memory_Block *block)) - __attribute__nonnull__(1); - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static char * move_one_buffer(PARROT_INTERP, - ARGIN(Memory_Block *pool), - ARGMOD(Buffer *old_buf), - ARGMOD(char *new_pool_ptr)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - __attribute__nonnull__(4) - FUNC_MODIFIES(*old_buf) - FUNC_MODIFIES(*new_pool_ptr); - -PARROT_WARN_UNUSED_RESULT -PARROT_MALLOC -PARROT_CANNOT_RETURN_NULL -static Variable_Size_Pool * new_memory_pool( - size_t min_block, - NULLOK(compact_f compact)); - -PARROT_CANNOT_RETURN_NULL -static UINTVAL pad_pool_size(ARGIN(const Variable_Size_Pool *pool)) - __attribute__nonnull__(1); - static void Parrot_gc_merge_buffer_pools(PARROT_INTERP, ARGMOD(Memory_Pools *mem_pools), ARGMOD(Fixed_Size_Pool *dest), @@ -148,10 +98,6 @@ FUNC_MODIFIES(*mem_pools) FUNC_MODIFIES(*pool); -#define ASSERT_ARGS_alloc_new_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem_pools) \ - , PARROT_ASSERT_ARG(pool) \ - , PARROT_ASSERT_ARG(why)) #define ASSERT_ARGS_buffer_location __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(b)) @@ -167,22 +113,7 @@ #define ASSERT_ARGS_fix_pmc_syncs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(dest_interp) \ , PARROT_ASSERT_ARG(pool)) -#define ASSERT_ARGS_free_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_free_old_mem_blocks __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem_pools) \ - , PARROT_ASSERT_ARG(pool) \ - , PARROT_ASSERT_ARG(new_block)) #define ASSERT_ARGS_free_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_is_block_almost_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(block)) -#define ASSERT_ARGS_move_one_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(pool) \ - , PARROT_ASSERT_ARG(old_buf) \ - , PARROT_ASSERT_ARG(new_pool_ptr)) -#define ASSERT_ARGS_new_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_pad_pool_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(pool)) #define ASSERT_ARGS_Parrot_gc_merge_buffer_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(mem_pools) \ @@ -201,165 +132,6 @@ /* -=item C - -Allocate a new memory block. We allocate either the requested size or the -default size, whichever is larger. Add the new block to the given memory -pool. The given C text is used for debugging. - -=cut - -*/ - -static void -alloc_new_block( - ARGMOD(Memory_Pools *mem_pools), - size_t size, - ARGMOD(Variable_Size_Pool *pool), - ARGIN(const char *why)) -{ - ASSERT_ARGS(alloc_new_block) - Memory_Block *new_block; - - const size_t alloc_size = (size > pool->minimum_block_size) - ? size : pool->minimum_block_size; - -#if RESOURCE_DEBUG - fprintf(stderr, "new_block (%s) size %u -> %u\n", - why, size, alloc_size); -#else - UNUSED(why) -#endif - - /* Allocate a new block. Header info's on the front */ - new_block = (Memory_Block *)mem_internal_allocate_zeroed( - sizeof (Memory_Block) + alloc_size); - - if (!new_block) { - fprintf(stderr, "out of mem allocsize = %d\n", (int)alloc_size); - exit(EXIT_FAILURE); - } - - new_block->free = alloc_size; - new_block->size = alloc_size; - - new_block->next = NULL; - new_block->start = (char *)new_block + sizeof (Memory_Block); - new_block->top = new_block->start; - - /* Note that we've allocated it */ - mem_pools->memory_allocated += alloc_size; - - /* If this is for a public pool, add it to the list */ - new_block->prev = pool->top_block; - - /* If we're not first, then tack us on the list */ - if (pool->top_block) - pool->top_block->next = new_block; - - pool->top_block = new_block; - pool->total_allocated += alloc_size; -} - -/* - -=item C - -Allocates memory for headers. - -Alignment problems history: - -See L -for details. - -- return aligned pointer *if needed* -- return strings et al at unaligned i.e. void* boundaries -- remember alignment in a buffer header bit - use this in compaction code -- reduce alignment to a reasonable value i.e. MALLOC_ALIGNMENT - aka 2*sizeof (size_t) or just 8 (TODO make a config hint) - -See pobj.h for a discussion of the Buffer descriptor and the buffer itself, -including its header. - -=cut - -*/ - -PARROT_MALLOC -PARROT_CANNOT_RETURN_NULL -void * -mem_allocate(PARROT_INTERP, - ARGMOD(Memory_Pools *mem_pools), - size_t size, - ARGMOD(Variable_Size_Pool *pool)) -{ - ASSERT_ARGS(mem_allocate) - void *return_val; - - /* we always should have one block at least */ - PARROT_ASSERT(pool->top_block); - - /* If not enough room, try to find some */ - if (pool->top_block->free < size) { - /* - * force a GC mark run to get live flags set - * for incremental M&S collection is run from there - * but only if there may be something worth collecting! - * TODO pass required allocation size to the GC system, - * so that collection can be skipped if needed - */ - size_t new_mem = mem_pools->memory_used - - mem_pools->mem_used_last_collect; - if (!mem_pools->gc_mark_block_level - && new_mem > (mem_pools->mem_used_last_collect >> 1) - && new_mem > GC_SIZE_THRESHOLD) { - Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG); - - if (interp->gc_sys->sys_type != INF) { - /* Compact the pool if allowed and worthwhile */ - if (pool->compact) { - /* don't bother reclaiming if it's only a small amount */ - if ((pool->possibly_reclaimable * pool->reclaim_factor + - pool->guaranteed_reclaimable) > size) { - (*pool->compact) (interp, mem_pools, pool); - } - } - } - } - if (pool->top_block->free < size) { - if (pool->minimum_block_size < 65536 * 16) - pool->minimum_block_size *= 2; - /* - * TODO - Big blocks - * - * Mark the block as big block (it has just one item) - * And don't set big blocks as the top_block. - */ - alloc_new_block(mem_pools, size, pool, "compact failed"); - - ++mem_pools->mem_allocs_since_last_collect; - - if (pool->top_block->free < size) { - fprintf(stderr, "out of mem\n"); - exit(EXIT_FAILURE); - } - } - } - - /* TODO inline the fast path */ - return_val = pool->top_block->top; - pool->top_block->top += size; - pool->top_block->free -= size; - mem_pools->memory_used += size; - - return return_val; -} - -/* - =item C Recturns a constant string representing the location of the given @@ -398,6 +170,7 @@ =item C Prints a debug statement with information about the given PObj C. + =cut */ @@ -416,455 +189,10 @@ =back -=head2 Compaction Code - -=over 4 - -=item C - -Compact the string buffer pool. Does not perform a GC scan, or mark items -as being alive in any way. - -=cut - -*/ - -void -compact_pool(PARROT_INTERP, - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Variable_Size_Pool *pool)) -{ - ASSERT_ARGS(compact_pool) - INTVAL j; - UINTVAL total_size; - - Memory_Block *new_block; /* A pointer to our working block */ - char *cur_spot; /* Where we're currently copying to */ - - Fixed_Size_Arena *cur_buffer_arena; - - /* Bail if we're blocked */ - if (mem_pools->gc_sweep_block_level) - return; - - ++mem_pools->gc_collect_runs; - - /* Snag a block big enough for everything */ - total_size = pad_pool_size(pool); - - if (total_size == 0) - return; - - ++mem_pools->gc_sweep_block_level; - - /* We're collecting */ - mem_pools->mem_allocs_since_last_collect = 0; - mem_pools->header_allocs_since_last_collect = 0; - - alloc_new_block(mem_pools, total_size, pool, "inside compact"); - - new_block = pool->top_block; - - /* Start at the beginning */ - cur_spot = new_block->start; - - /* Run through all the Buffer header pools and copy */ - for (j = (INTVAL)mem_pools->num_sized - 1; j >= 0; --j) { - Fixed_Size_Pool * const header_pool = mem_pools->sized_header_pools[j]; - UINTVAL object_size; - - if (!header_pool) - continue; - - object_size = header_pool->object_size; - - for (cur_buffer_arena = header_pool->last_Arena; - cur_buffer_arena; - cur_buffer_arena = cur_buffer_arena->prev) { - Buffer *b = (Buffer *) cur_buffer_arena->start_objects; - UINTVAL i; - const size_t objects_end = cur_buffer_arena->used; - - for (i = objects_end; i; --i) { - - if (Buffer_buflen(b) && PObj_is_movable_TESTALL(b)) { - Memory_Block *old_block = Buffer_pool(b); - - if (!is_block_almost_full(old_block)) - cur_spot = move_one_buffer(interp, new_block, b, cur_spot); - } - - b = (Buffer *)((char *)b + object_size); - } - } - } - - /* Okay, we're done with the copy. Set the bits in the pool struct */ - /* First, where we allocate next */ - new_block->top = cur_spot; - - PARROT_ASSERT(new_block->size >= (size_t)new_block->top - - (size_t)new_block->start); - - /* How much is free. That's the total size minus the amount we used */ - new_block->free = new_block->size - (cur_spot - new_block->start); - mem_pools->memory_collected += (cur_spot - new_block->start); - mem_pools->memory_used += (cur_spot - new_block->start); - - free_old_mem_blocks(mem_pools, pool, new_block, total_size); - - --mem_pools->gc_sweep_block_level; -} - -/* - -=item C - -Calculate the size of the new pool. The currently used size equals the total -size minus the reclaimable size. Add a minimum block to the current amount, so -we can avoid having to allocate it in the future. - -Returns 0 if all blocks below the top block are almost full. In this case -compacting is not needed. - -TODO - Big blocks - -Currently all available blocks are compacted into one new -block with total_size. This is suboptimal, if the block has -just one live item from a big allocation. - -But currently it's unknown if the buffer memory is alive -as the live bits are in Buffer headers. We have to run the -compaction loop to check liveness. OTOH if this compaction -is running through all the buffer headers, there is no -relation to the block. - -Moving the live bit into the buffer thus also solves this -problem easily. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -static UINTVAL -pad_pool_size(ARGIN(const Variable_Size_Pool *pool)) -{ - ASSERT_ARGS(pad_pool_size) - Memory_Block *cur_block = pool->top_block->prev; - - UINTVAL total_size = 0; -#if RESOURCE_DEBUG - size_t total_blocks = 1; -#endif - - while (cur_block) { - if (!is_block_almost_full(cur_block)) - total_size += cur_block->size - cur_block->freed - cur_block->free; - cur_block = cur_block->prev; -#if RESOURCE_DEBUG - ++total_blocks; -#endif - } - - if (total_size == 0) - return 0; - - cur_block = pool->top_block; - if (!is_block_almost_full(cur_block)) - total_size += cur_block->size - cur_block->freed - cur_block->free; - - /* this makes for ever increasing allocations but fewer collect runs */ -#if WE_WANT_EVER_GROWING_ALLOCATIONS - total_size += pool->minimum_block_size; -#endif - -#if RESOURCE_DEBUG - fprintf(stderr, "Total blocks: %d\n", total_blocks); -#endif - - return total_size; -} - -/* - -=item C - -The compact_pool operation collects disjointed blocks of memory allocated on a -given pool's free list into one large block of memory. Once the new larger -memory block has been allocated, this function moves one buffer from the old -memory block to the new memory block and marks that it has been moved. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static char * -move_one_buffer(PARROT_INTERP, ARGIN(Memory_Block *pool), - ARGMOD(Buffer *old_buf), ARGMOD(char *new_pool_ptr)) -{ - ASSERT_ARGS(move_one_buffer) - - INTVAL *flags = NULL; - ptrdiff_t offset = 0; - Memory_Block *old_block = NULL; -#if RESOURCE_DEBUG - if (Buffer_buflen(old_buf) >= RESOURCE_DEBUG_SIZE) - debug_print_buf(interp, old_buf); -#else - UNUSED(interp); -#endif - - /* we can't perform the math all the time, because - * strstart might be in unallocated memory */ - if (PObj_is_COWable_TEST(old_buf)) { - flags = Buffer_bufflagsptr(old_buf); - old_block = Buffer_pool(old_buf); - - if (PObj_is_string_TEST(old_buf)) { - offset = (ptrdiff_t)((STRING *)old_buf)->strstart - - (ptrdiff_t)Buffer_bufstart(old_buf); - } - } - - /* buffer has already been moved; just change the header */ - if (flags && (*flags & Buffer_shared_FLAG) - && (*flags & Buffer_moved_FLAG)) { - /* Find out who else references our data */ - Buffer * const hdr = *((Buffer **)Buffer_bufstart(old_buf)); - - PARROT_ASSERT(PObj_is_COWable_TEST(old_buf)); - - /* Make sure they know that we own it too */ - /* Set Buffer_shared_FLAG in new buffer */ - *Buffer_bufflagsptr(hdr) |= Buffer_shared_FLAG; - - /* Now make sure we point to where the other guy does */ - Buffer_bufstart(old_buf) = Buffer_bufstart(hdr); - - /* And if we're a string, update strstart */ - /* Somewhat of a hack, but if we get per-pool - * collections, it should help ease the pain */ - if (PObj_is_string_TEST(old_buf)) - ((STRING *)old_buf)->strstart = - (char *)Buffer_bufstart(old_buf) + offset; - } - else { - new_pool_ptr = aligned_mem(old_buf, new_pool_ptr); - - /* Copy our memory to the new pool */ - memcpy(new_pool_ptr, Buffer_bufstart(old_buf), - Buffer_buflen(old_buf)); - - /* If we're shared */ - if (flags && (*flags & Buffer_shared_FLAG)) { - PARROT_ASSERT(PObj_is_COWable_TEST(old_buf)); - - /* Let the old buffer know how to find us */ - *((Buffer **)Buffer_bufstart(old_buf)) = old_buf; - - /* Finally, let the tail know that we've moved, so - * that any other references can know to look for - * us and not re-copy */ - *flags |= Buffer_moved_FLAG; - } - - Buffer_bufstart(old_buf) = new_pool_ptr; - - /* Remember new pool inside */ - *Buffer_poolptr(old_buf) = pool; - - if (PObj_is_string_TEST(old_buf)) - ((STRING *)old_buf)->strstart = - (char *)Buffer_bufstart(old_buf) + offset; - - new_pool_ptr += Buffer_buflen(old_buf); - } - - return new_pool_ptr; -} - -/* - -=item C - -The compact_pool operation collects disjointed blocks of memory allocated on a -given pool's free list into one large block of memory, setting it as the new -top block for the pool. Once that is done, and all items have been moved into -the new block of memory, this function iterates through the old blocks and -frees each one. It also performs the necessary housekeeping to record the -freed memory blocks. At the end of this function, the pool will have only one -block of memory on its free list. - -=cut - -*/ - -static void -free_old_mem_blocks( - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Variable_Size_Pool *pool), - ARGMOD(Memory_Block *new_block), - UINTVAL total_size) -{ - ASSERT_ARGS(free_old_mem_blocks) - Memory_Block *prev_block = new_block; - Memory_Block *cur_block = new_block->prev; - - PARROT_ASSERT(new_block == pool->top_block); - - while (cur_block) { - Memory_Block * const next_block = cur_block->prev; - - if (is_block_almost_full(cur_block)) { - /* Skip block */ - prev_block = cur_block; - cur_block = next_block; - } - else { - /* Note that we don't have it any more */ - mem_pools->memory_allocated -= cur_block->size; - mem_pools->memory_used -= - cur_block->size - cur_block->free - cur_block->freed; - - /* We know the pool body and pool header are a single chunk, so - * this is enough to get rid of 'em both */ - mem_internal_free(cur_block); - cur_block = next_block; - - /* Unlink it from list */ - prev_block->prev = next_block; - } - } - - /* Terminate list */ - prev_block->prev = NULL; - - - /* ANR: I suspect this should be set to new_block->size, instead of passing - * in the raw value of total_size, because alloc_new_block pads the size of - * the new block under certain conditions. Leaving it unmodified for now, - * so this refactor has no functionality changes, only code cleanups.*/ - pool->total_allocated = total_size; - pool->guaranteed_reclaimable = 0; - pool->possibly_reclaimable = 0; -} - -/* - -=item C - -Tests if the block is almost full and should be skipped during compacting. - -Returns true if less that 20% of block is available - -=cut - -*/ - -static int -is_block_almost_full(ARGIN(const Memory_Block *block)) -{ - ASSERT_ARGS(is_block_almost_full) - return 5 * (block->free + block->freed) < block->size; -} - -/* - -=item C - -Returns a pointer to the aligned allocated storage for Buffer C, -which might not be the same as the pointer to C because of -memory alignment. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -char * -aligned_mem(SHIM(const Buffer *buffer), ARGIN(char *mem)) -{ - ASSERT_ARGS(aligned_mem) - mem += sizeof (void *); - mem = (char *)(((unsigned long)(mem + WORD_ALIGN_1)) & WORD_ALIGN_MASK); - - return mem; -} - -/* - -=back - =head2 Parrot Re/Allocate Code =over 4 -=item C - -Allocate a new C structures, and set some initial values. -return a pointer to the new pool. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_MALLOC -PARROT_CANNOT_RETURN_NULL -static Variable_Size_Pool * -new_memory_pool(size_t min_block, NULLOK(compact_f compact)) -{ - ASSERT_ARGS(new_memory_pool) - Variable_Size_Pool * const pool = mem_internal_allocate_typed(Variable_Size_Pool); - - pool->top_block = NULL; - pool->compact = compact; - pool->minimum_block_size = min_block; - pool->total_allocated = 0; - pool->guaranteed_reclaimable = 0; - pool->possibly_reclaimable = 0; - pool->reclaim_factor = RECLAMATION_FACTOR; - - return pool; -} - -/* - -=item C - -Initialize the managed memory pools. Parrot maintains two C -structures, the general memory pool and the constant string pool. Create -and initialize both pool structures, and allocate initial blocks of memory -for both. - -=cut - -*/ - -void -initialize_var_size_pools(SHIM_INTERP, ARGMOD(Memory_Pools *mem_pools)) -{ - ASSERT_ARGS(initialize_var_size_pools) - - mem_pools->memory_pool = new_memory_pool(POOL_SIZE, &compact_pool); - alloc_new_block(mem_pools, POOL_SIZE, mem_pools->memory_pool, "init"); - - /* Constant strings - not compacted */ - mem_pools->constant_string_pool = new_memory_pool(POOL_SIZE, NULL); - alloc_new_block(mem_pools, POOL_SIZE, mem_pools->constant_string_pool, "init"); -} - - -/* - =item C Merge two memory pools together. Do this by moving all memory blocks @@ -924,8 +252,9 @@ ASSERT_ARGS(check_memory_system) size_t i; - check_var_size_obj_pool(mem_pools->memory_pool); - check_var_size_obj_pool(mem_pools->constant_string_pool); + check_var_size_obj_pool(mem_pools->string_gc.memory_pool); + check_var_size_obj_pool(mem_pools->string_gc.constant_string_pool); + check_fixed_size_obj_pool(mem_pools->pmc_pool); check_fixed_size_obj_pool(mem_pools->constant_pmc_pool); check_fixed_size_obj_pool(mem_pools->string_header_pool); @@ -986,10 +315,6 @@ PARROT_ASSERT(PObj_on_free_list_TEST((PObj*)pobj_walker)); } } - else if (pool->mem_pool != NULL) { - /*then it means we are a buffer*/ - check_buffer_ptr((Buffer*)object, pool->mem_pool); - } object = (PObj*)((char *)object + pool->object_size); PARROT_ASSERT(--count); } @@ -1248,54 +573,6 @@ } -/* - -=item C - -Frees a memory pool; helper function for C. - -=cut - -*/ - -static void -free_memory_pool(ARGFREE(Variable_Size_Pool *pool)) -{ - ASSERT_ARGS(free_memory_pool) - - Memory_Block *cur_block = pool->top_block; - - while (cur_block) { - Memory_Block * const next_block = cur_block->prev; - mem_internal_free(cur_block); - cur_block = next_block; - } - - mem_internal_free(pool); -} - - -/* - -=item C - -Destroys the memory pool and the constant string pool. Loop through both -pools and destroy all memory blocks contained in them. Once all the -blocks are freed, free the pools themselves. - -=cut - -*/ - -void -Parrot_gc_destroy_memory_pools(SHIM_INTERP, ARGMOD(Memory_Pools *mem_pools)) -{ - ASSERT_ARGS(Parrot_gc_destroy_memory_pools) - - free_memory_pool(mem_pools->constant_string_pool); - free_memory_pool(mem_pools->memory_pool); -} /* diff -Nru parrot-2.7.0/src/gc/api.c parrot-2.8.0/src/gc/api.c --- parrot-2.7.0/src/gc/api.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/api.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: api.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: api.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -359,9 +359,9 @@ =item C Returns a new C header from the string pool or the constant string -pool. Sets default flags on the string object: C, -C, and C (for GC). Initializes the data -field of the string buffer to C. +pool. Sets default flags on the string object: C and +C. Initializes the data field of the string buffer to +C. =cut @@ -381,7 +381,7 @@ string->strstart = NULL; PObj_get_FLAGS(string) |= - flags | PObj_is_string_FLAG | PObj_is_COWable_FLAG | PObj_live_FLAG; + flags | PObj_is_string_FLAG | PObj_is_COWable_FLAG; return string; } diff -Nru parrot-2.7.0/src/gc/gc_ms.c parrot-2.8.0/src/gc/gc_ms.c --- parrot-2.7.0/src/gc/gc_ms.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/gc_ms.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: gc_ms.c 48492 2010-08-14 20:01:39Z cotto $ +$Id: gc_ms.c 49093 2010-09-17 23:39:13Z mikehh $ =head1 NAME @@ -17,6 +17,8 @@ #include "parrot/parrot.h" #include "gc_private.h" +#define DEBUG_FREE_LIST 0 + PARROT_DOES_NOT_RETURN static void failed_allocation(unsigned int line, unsigned long size) /* HEADERIZER SKIP */ { @@ -31,6 +33,13 @@ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +PARROT_WARN_UNUSED_RESULT +static INTVAL contained_in_attr_pool( + ARGIN(const PMC_Attribute_Pool *pool), + ARGIN(const void *ptr)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + static int gc_ms_active_sized_buffers(ARGIN(const Memory_Pools *mem_pools)) __attribute__nonnull__(1); @@ -52,13 +61,6 @@ __attribute__nonnull__(3) FUNC_MODIFIES(*pool); -static void gc_ms_allocate_buffer_storage(PARROT_INTERP, - ARGOUT(Buffer *buffer), - size_t size) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*buffer); - PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT static Buffer * gc_ms_allocate_bufferlike_header(PARROT_INTERP, size_t size) @@ -153,6 +155,11 @@ static unsigned int gc_ms_is_blocked_GC_sweep(PARROT_INTERP) __attribute__nonnull__(1); +static void gc_ms_iterate_live_strings(PARROT_INTERP, + string_iterator_callback callback, + ARGIN_NULLOK(void *data)) + __attribute__nonnull__(1); + static void gc_ms_mark_and_sweep(PARROT_INTERP, UINTVAL flags) __attribute__nonnull__(1); @@ -172,13 +179,6 @@ __attribute__nonnull__(2) FUNC_MODIFIES(*pool); -static void gc_ms_reallocate_buffer_storage(PARROT_INTERP, - ARGMOD(Buffer *buffer), - size_t newsize) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*buffer); - PARROT_MALLOC PARROT_CANNOT_RETURN_NULL static void * gc_ms_reallocate_memory_chunk(SHIM_INTERP, @@ -192,13 +192,6 @@ size_t newsize, size_t oldsize); -static void gc_ms_reallocate_string_storage(PARROT_INTERP, - ARGMOD(STRING *str), - size_t newsize) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*str); - static int gc_ms_sweep_cb(PARROT_INTERP, ARGIN(Memory_Pools *mem_pools), ARGMOD(Fixed_Size_Pool *pool), @@ -253,6 +246,9 @@ __attribute__nonnull__(2) FUNC_MODIFIES(*mem_pools); +#define ASSERT_ARGS_contained_in_attr_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pool) \ + , PARROT_ASSERT_ARG(ptr)) #define ASSERT_ARGS_gc_ms_active_sized_buffers __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(mem_pools)) #define ASSERT_ARGS_gc_ms_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ @@ -263,9 +259,6 @@ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(mem_pools) \ , PARROT_ASSERT_ARG(pool)) -#define ASSERT_ARGS_gc_ms_allocate_buffer_storage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(buffer)) #define ASSERT_ARGS_gc_ms_allocate_bufferlike_header \ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) @@ -315,6 +308,8 @@ PARROT_ASSERT_ARG(interp)) #define ASSERT_ARGS_gc_ms_is_blocked_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) +#define ASSERT_ARGS_gc_ms_iterate_live_strings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp)) #define ASSERT_ARGS_gc_ms_mark_and_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) #define ASSERT_ARGS_gc_ms_mark_special __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ @@ -326,17 +321,9 @@ , PARROT_ASSERT_ARG(pool)) #define ASSERT_ARGS_gc_ms_pool_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(pool)) -#define ASSERT_ARGS_gc_ms_reallocate_buffer_storage \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(buffer)) #define ASSERT_ARGS_gc_ms_reallocate_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) #define ASSERT_ARGS_gc_ms_reallocate_memory_chunk_zeroed \ __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) -#define ASSERT_ARGS_gc_ms_reallocate_string_storage \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(str)) #define ASSERT_ARGS_gc_ms_sweep_cb __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(mem_pools) \ @@ -416,10 +403,10 @@ interp->gc_sys->allocate_pmc_attributes = gc_ms_allocate_pmc_attributes; interp->gc_sys->free_pmc_attributes = gc_ms_free_pmc_attributes; - interp->gc_sys->allocate_string_storage = gc_ms_allocate_string_storage; + interp->gc_sys->allocate_string_storage = gc_ms_allocate_string_storage; interp->gc_sys->reallocate_string_storage = gc_ms_reallocate_string_storage; - interp->gc_sys->allocate_buffer_storage = gc_ms_allocate_buffer_storage; + interp->gc_sys->allocate_buffer_storage = gc_ms_allocate_buffer_storage; interp->gc_sys->reallocate_buffer_storage = gc_ms_reallocate_buffer_storage; interp->gc_sys->allocate_fixed_size_storage = gc_ms_allocate_fixed_size_storage; @@ -444,7 +431,9 @@ interp->gc_sys->get_gc_info = gc_ms_get_gc_info; - initialize_var_size_pools(interp, interp->mem_pools); + interp->gc_sys->iterate_live_strings = gc_ms_iterate_live_strings; + + Parrot_gc_str_initialize(interp, &interp->mem_pools->string_gc); initialize_fixed_size_pools(interp, interp->mem_pools); Parrot_gc_initialize_fixed_size_pools(interp, interp->mem_pools, GC_NUM_INITIAL_FIXED_SIZE_POOLS); @@ -468,7 +457,7 @@ Parrot_gc_destroy_header_pools(interp, interp->mem_pools); /* memory pools in resources */ - Parrot_gc_destroy_memory_pools(interp, interp->mem_pools); + Parrot_gc_str_finalize(interp, &interp->mem_pools->string_gc); /* mem subsystem is dead now */ mem_internal_free(interp->mem_pools); @@ -497,6 +486,48 @@ Memory_Pools * const source_arena = source_interp->mem_pools; Parrot_gc_merge_memory_pools(dest_interp, dest_arena, source_arena); } + +/* + +=item C + +Determines whether a GC run is needed. The decision is based on the amount +of memory used since the last GC run. This amount is compared to a static +and a dynamic threshold. The dynamic threshold roughly limits the memory +wasted by objects that could be freed but are not yet collected to a +percentage of total memory that is actually needed. + +Increasing the dynamic threshold results in fewer GC runs and more memory +consumption. + +=cut + +*/ + +int +Parrot_gc_ms_needed(PARROT_INTERP) +{ + ASSERT_ARGS(Parrot_gc_ms_needed) + + const Memory_Pools * const mem_pools = interp->mem_pools; + size_t dynamic_threshold; + + /* new_mem is the additional amount of memory used since the last GC */ + size_t new_mem = mem_pools->memory_used + - mem_pools->mem_used_last_collect; + + /* Never run a GC if new_mem is below static GC_SIZE_THRESHOLD */ + if (new_mem <= GC_SIZE_THRESHOLD) + return 0; + + /* The dynamic threshold is a configurable percentage of the amount of + memory used after the last GC */ + dynamic_threshold = (size_t)(mem_pools->mem_used_last_collect * + (0.01 * interp->gc_threshold)); + + return new_mem > dynamic_threshold; +} + /* =item C @@ -585,7 +616,54 @@ gc_ms_compact_memory_pool(PARROT_INTERP) { ASSERT_ARGS(gc_ms_compact_memory_pool) - compact_pool(interp, interp->mem_pools, interp->mem_pools->memory_pool); + Parrot_gc_str_compact_pool(interp, &interp->mem_pools->string_gc); +} + +/* + +=item C + +=item C + +=item C + +=item C + +Functions for allocating strings/buffers storage. + +=cut +*/ + +void +gc_ms_allocate_string_storage(PARROT_INTERP, ARGIN(STRING *str), size_t size) +{ + ASSERT_ARGS(gc_ms_allocate_string_storage) + Parrot_gc_str_allocate_string_storage(interp, &interp->mem_pools->string_gc, str, size); +} + +void +gc_ms_reallocate_string_storage(PARROT_INTERP, ARGIN(STRING *str), size_t size) +{ + ASSERT_ARGS(gc_ms_reallocate_string_storage) + Parrot_gc_str_reallocate_string_storage(interp, &interp->mem_pools->string_gc, str, size); +} + +void +gc_ms_allocate_buffer_storage(PARROT_INTERP, ARGIN(Buffer *str), size_t size) +{ + ASSERT_ARGS(gc_ms_allocate_buffer_storage) + Parrot_gc_str_allocate_buffer_storage(interp, &interp->mem_pools->string_gc, str, size); +} + +void +gc_ms_reallocate_buffer_storage(PARROT_INTERP, ARGIN(Buffer *str), size_t size) +{ + ASSERT_ARGS(gc_ms_reallocate_buffer_storage) + Parrot_gc_str_reallocate_buffer_storage(interp, &interp->mem_pools->string_gc, str, size); } /* @@ -984,6 +1062,37 @@ /* +=item C + +Returns whether the given C<*ptr> points to a location in C. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +static INTVAL +contained_in_attr_pool(ARGIN(const PMC_Attribute_Pool *pool), ARGIN(const void *ptr)) +{ + ASSERT_ARGS(contained_in_attr_pool) + const PMC_Attribute_Arena *arena; + const ptrdiff_t item_space = pool->objects_per_alloc * pool->attr_size; + + for (arena = pool->top_arena; arena; arena = arena->next) { + const ptrdiff_t ptr_diff = (const char *)ptr - (const char *)(arena + 1); + + if (ptr_diff >= 0 + && ptr_diff < item_space + && ptr_diff % pool->attr_size == 0) + return 1; + } + + return 0; +} + +/* + =item C Deallocates an attibutes structure from a PMC if it has the auto_attrs @@ -1022,6 +1131,10 @@ ASSERT_ARGS(gc_ms_free_attributes_from_pool) PMC_Attribute_Free_List * const item = (PMC_Attribute_Free_List *)data; +#if DEBUG_FREE_LIST + PARROT_ASSERT(contained_in_attr_pool(pool, data)); +#endif + item->next = pool->free_list; pool->free_list = item; @@ -1030,234 +1143,6 @@ /* -=item C - -Allocates a chunk of memory of at least size C for the given Buffer. -buffer is guaranteed to be properly aligned for things like C, -so the size may be rounded up or down to guarantee that this alignment holds. - -=cut - -*/ - -static void -gc_ms_allocate_buffer_storage(PARROT_INTERP, - ARGOUT(Buffer *buffer), size_t size) -{ - ASSERT_ARGS(gc_ms_allocate_buffer_storage) - const size_t new_size = ALIGNED_STRING_SIZE(size); - - Buffer_bufstart(buffer) = (void *)aligned_mem(buffer, - (char *)mem_allocate(interp, - interp->mem_pools, new_size, interp->mem_pools->memory_pool)); - - /* Save pool used to allocate into buffer header */ - *Buffer_poolptr(buffer) = interp->mem_pools->memory_pool->top_block; - - Buffer_buflen(buffer) = new_size - sizeof (void *); -} - -/* - -=item C - -Reallocate the Buffer's buffer memory to the given size. The -allocated buffer will not shrink. If the buffer was allocated with -L the new buffer will also be aligned. As with -all reallocation, the new buffer might have moved and the additional -memory is not cleared. - -=cut - -*/ - -static void -gc_ms_reallocate_buffer_storage(PARROT_INTERP, ARGMOD(Buffer *buffer), - size_t newsize) -{ - ASSERT_ARGS(gc_ms_reallocate_buffer_storage) - size_t copysize; - char *mem; - Variable_Size_Pool * const pool = interp->mem_pools->memory_pool; - size_t new_size, needed, old_size; - - /* we don't shrink buffers */ - if (newsize <= Buffer_buflen(buffer)) - return; - - /* - * same as below but barely used and tested - only 3 list related - * tests do use true reallocation - * - * list.c, which does _reallocate, has 2 reallocations - * normally, which play ping pong with buffers. - * The normal case is therefore always to allocate a new block - */ - new_size = ALIGNED_STRING_SIZE(newsize); - old_size = ALIGNED_STRING_SIZE(Buffer_buflen(buffer)); - needed = new_size - old_size; - - if ((pool->top_block->free >= needed) - && (pool->top_block->top == (char *)Buffer_bufstart(buffer) + old_size)) { - pool->top_block->free -= needed; - pool->top_block->top += needed; - interp->mem_pools->memory_used += needed; - Buffer_buflen(buffer) = newsize; - return; - } - - copysize = Buffer_buflen(buffer); - - mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); - mem = aligned_mem(buffer, mem); - - /* We shouldn't ever have a 0 from size, but we do. If we can track down - * those bugs, this can be removed which would make things cheaper */ - if (copysize) - memcpy(mem, Buffer_bufstart(buffer), copysize); - - Buffer_bufstart(buffer) = mem; - - new_size -= sizeof (void *); - - Buffer_buflen(buffer) = new_size; - - /* Save pool used to allocate into buffer header */ - *Buffer_poolptr(buffer) = interp->mem_pools->memory_pool->top_block; -} - -/* - -=item C - -Allocate the STRING's buffer memory to the given size. The allocated -buffer maybe slightly bigger than the given C. This function -sets also C<< str->strstart >> to the new buffer location, C<< str->bufused >> -is B changed. - -=cut - -*/ - -void -gc_ms_allocate_string_storage(PARROT_INTERP, ARGOUT(STRING *str), - size_t size) -{ - ASSERT_ARGS(gc_ms_allocate_string_storage) - size_t new_size; - Variable_Size_Pool *pool; - char *mem; - - Buffer_buflen(str) = 0; - Buffer_bufstart(str) = NULL; - - if (size == 0) - return; - - pool = PObj_constant_TEST(str) - ? interp->mem_pools->constant_string_pool - : interp->mem_pools->memory_pool; - - new_size = ALIGNED_STRING_SIZE(size); - mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); - mem += sizeof (void *); - - Buffer_bufstart(str) = str->strstart = mem; - Buffer_buflen(str) = new_size - sizeof (void *); - - /* Save pool used to allocate into buffer header */ - *Buffer_poolptr(str) = pool->top_block; -} - -/* - -=item C - -Reallocate the STRING's buffer memory to the given size. The allocated -buffer will not shrink. This function sets also Cstrstart> to the -new buffer location, Cbufused> is B changed. - -=cut - -*/ - -static void -gc_ms_reallocate_string_storage(PARROT_INTERP, ARGMOD(STRING *str), - size_t newsize) -{ - ASSERT_ARGS(gc_ms_reallocate_string_storage) - size_t copysize; - char *mem, *oldmem; - size_t new_size, needed, old_size; - - Variable_Size_Pool * const pool = - PObj_constant_TEST(str) - ? interp->mem_pools->constant_string_pool - : interp->mem_pools->memory_pool; - - /* if the requested size is smaller then buflen, we are done */ - if (newsize <= Buffer_buflen(str)) - return; - - /* - * first check, if we can reallocate: - * - if the passed strings buffer is the last string in the pool and - * - if there is enough size, we can just move the pool's top pointer - */ - new_size = ALIGNED_STRING_SIZE(newsize); - old_size = ALIGNED_STRING_SIZE(Buffer_buflen(str)); - needed = new_size - old_size; - - if (pool->top_block->free >= needed - && pool->top_block->top == (char *)Buffer_bufstart(str) + old_size) { - pool->top_block->free -= needed; - pool->top_block->top += needed; - interp->mem_pools->memory_used += needed; - Buffer_buflen(str) = new_size - sizeof (void *); - return; - } - - PARROT_ASSERT(str->bufused <= newsize); - - /* only copy used memory, not total string buffer */ - copysize = str->bufused; - - mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); - mem += sizeof (void *); - - /* Update Memory_Block usage */ - /* We must not reallocate non-movable buffers! */ - PARROT_ASSERT(PObj_is_movable_TESTALL(str)); - - /* We must not reallocate shared buffers! */ - PARROT_ASSERT(!(*Buffer_bufflagsptr(str) & Buffer_shared_FLAG)); - - /* Decrease usage */ - PARROT_ASSERT(Buffer_pool(str)); - Buffer_pool(str)->freed += old_size; - interp->mem_pools->memory_used -= old_size; - - /* copy mem from strstart, *not* bufstart */ - oldmem = str->strstart; - Buffer_bufstart(str) = (void *)mem; - str->strstart = mem; - Buffer_buflen(str) = new_size - sizeof (void *); - - /* We shouldn't ever have a 0 from size, but we do. If we can track down - * those bugs, this can be removed which would make things cheaper */ - if (copysize) - memcpy(mem, oldmem, copysize); - - /* Save pool used to allocate into buffer header */ - *Buffer_poolptr(str) = pool->top_block; -} - -/* - =item C Allocates a fixed-size chunk of memory for use. This memory is not manually @@ -1502,15 +1387,12 @@ ARGMOD(Fixed_Size_Pool *pool)) { ASSERT_ARGS(gc_ms_more_traceable_objects) - size_t new_mem = mem_pools->memory_used - - mem_pools->mem_used_last_collect; if (pool->skip == GC_ONE_SKIP) pool->skip = GC_NO_SKIP; else if (pool->skip == GC_NEVER_SKIP || (pool->skip == GC_NO_SKIP - && (new_mem > (mem_pools->mem_used_last_collect >> 1) - && mem_pools->header_allocs_since_last_collect >= GC_SIZE_THRESHOLD))) + && Parrot_gc_ms_needed(interp))) Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG); /* requires that num_free_objects be updated in Parrot_gc_mark_and_sweep. @@ -1541,6 +1423,10 @@ ASSERT_ARGS(gc_ms_add_free_object) GC_MS_PObj_Wrapper *object = (GC_MS_PObj_Wrapper *)to_add; +#if DEBUG_FREE_LIST + PARROT_ASSERT(contained_in_pool(pool, to_add)); +#endif + PObj_flags_SETTO(object, PObj_on_free_list_FLAG); object->next_ptr = pool->free_list; @@ -1649,9 +1535,6 @@ if (alloc_size > POOL_MAX_BYTES) pool->objects_per_alloc = POOL_MAX_BYTES / pool->object_size; - - if (alloc_size > GC_SIZE_THRESHOLD) - pool->skip = GC_NEVER_SKIP; } @@ -1831,6 +1714,56 @@ } /* +=item C + +Iterate over live string invoking callback for each of them. Used during +compacting of string pool. + +=cut +*/ +static void +gc_ms_iterate_live_strings(PARROT_INTERP, + string_iterator_callback callback, + ARGIN_NULLOK(void *data)) +{ + ASSERT_ARGS(gc_ms_iterate_live_strings) + + Memory_Pools * const mem_pools = interp->mem_pools; + INTVAL j; + + /* Run through all the Buffer header pools and invoke callback */ + for (j = (INTVAL)mem_pools->num_sized - 1; j >= 0; --j) { + Fixed_Size_Pool * const header_pool = mem_pools->sized_header_pools[j]; + Fixed_Size_Arena * cur_buffer_arena; + UINTVAL object_size; + + if (!header_pool) + continue; + + object_size = header_pool->object_size; + + for (cur_buffer_arena = header_pool->last_Arena; + cur_buffer_arena; + cur_buffer_arena = cur_buffer_arena->prev) { + Buffer *b = (Buffer *) cur_buffer_arena->start_objects; + UINTVAL i; + const size_t objects_end = cur_buffer_arena->used; + + for (i = objects_end; i; --i) { + if (Buffer_buflen(b) && PObj_is_movable_TESTALL(b)) { + Memory_Block *old_block = Buffer_pool(b); + if (5 * (old_block->free + old_block->freed) >= old_block->size) + callback(interp, b, data); + } + b = (Buffer *)((char *)b + object_size); + } + } + } +} + + +/* =back diff -Nru parrot-2.7.0/src/gc/gc_private.h parrot-2.8.0/src/gc/gc_private.h --- parrot-2.7.0/src/gc/gc_private.h 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/gc_private.h 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: gc_private.h 48492 2010-08-14 20:01:39Z cotto $ +$Id: gc_private.h 49092 2010-09-17 22:17:24Z nwellnhof $ =head1 NAME @@ -86,11 +86,14 @@ /* how often to skip a full GC when this pool has nothing free */ typedef enum _gc_skip_type_enum { GC_NO_SKIP = 0, - GC_ONE_SKIP, + GC_ONE_SKIP, /* unused */ GC_ALWAYS_SKIP, - GC_NEVER_SKIP + GC_NEVER_SKIP /* unused */ } gc_skip_type_enum; +/* Callback for live string. Use Buffer for now... */ +typedef void (*string_iterator_callback)(PARROT_INTERP, Buffer *str, void *data); + typedef struct GC_Subsystem { /* Which GC subsystem are we using? See PARROT_GC_DEFAULT_TYPE in * include/parrot/settings.h for possible values */ @@ -148,6 +151,9 @@ /* Return by value to simplify memory management */ size_t (*get_gc_info)(PARROT_INTERP, Interpinfo_enum); + /* Iterate over _live_ strings. Used for string pool compacting */ + void (*iterate_live_strings)(PARROT_INTERP, string_iterator_callback callback, void *data); + /*Function hooks that GC systems can CHOOSE to provide if they need them *These will be called via the GC API functions Parrot_gc_func_name *e.g. read barrier && write barrier hooks can go here later ...*/ @@ -159,6 +165,8 @@ */ } GC_Subsystem; + + /* This header structure describes a block of memory that is part of a variable-size pool. The allocatable memory follows the header. */ @@ -239,9 +247,6 @@ hang off the Memory_Pools root structure. */ typedef struct Fixed_Size_Pool { - - struct Variable_Size_Pool *mem_pool; /* Pointer to associated variable-size - pool, or NULL. */ size_t object_size; /* Size in bytes of an individual pool object. This size may include a GC system-specific GC header. */ @@ -284,15 +289,22 @@ } Fixed_Size_Pool; +/* String GC subsystem data */ +typedef struct String_GC { + Variable_Size_Pool *memory_pool; /* General memory pool. */ + Variable_Size_Pool *constant_string_pool; /* Constant string pool (not + compacted */ +} String_GC; + /* This structure acts as the root for all the various memory pools: variable-sized, fixed-size, and PMC attributes. It also contains various GC-related items. It hangs off the Interp structure. */ typedef struct Memory_Pools { /* Pointers to pools */ - Variable_Size_Pool *memory_pool; /* General memory pool. */ - Variable_Size_Pool *constant_string_pool; /* Constant string pool (not - compacted). */ + String_GC string_gc; /* TEMPORARY */ + /* String GC susbsytem pointer */ + Fixed_Size_Pool *string_header_pool; /* String header pool. */ Fixed_Size_Pool *pmc_pool; /* PMC object pool. */ Fixed_Size_Pool *constant_pmc_pool; /* And one for constant PMCs. */ @@ -320,13 +332,16 @@ * blocks allocated from * the system since the last * GC run */ - size_t memory_allocated; /* The total amount of allocatable memory - * allocated. Doesn't count memory for - * headers or internal structures or - * anything */ - size_t memory_used; /* The total amount of - * memory used for - * buffers and headers */ + size_t memory_allocated; /* The total amount of memory allocated + * in fixed and variable size pools. + * Doesn't count memory for internal + * structures */ + size_t memory_used; /* The total amount of memory used + * in fixed and variable size + * pools. Also includes memory in + * variable size pools that has been + * freed but can only be reclaimed + * by a GC run */ size_t mem_used_last_collect; /* The total amount of * memory used after * the last GC run */ @@ -346,10 +361,9 @@ UINTVAL gc_sweep_block_level; /* How many outstanding GC block requests are there? */ - /* private data for the GC subsystem */ - void *gc_private; /* GC subsystem data */ } Memory_Pools; + /* HEADERIZER BEGIN: src/gc/system.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ @@ -494,11 +508,6 @@ /* HEADERIZER BEGIN: src/gc/alloc_resources.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -char * aligned_mem(SHIM(const Buffer *buffer), ARGIN(char *mem)) - __attribute__nonnull__(2); - void check_buffer_ptr( ARGMOD(Buffer * pobj), ARGMOD(Variable_Size_Pool * pool)) @@ -507,31 +516,6 @@ FUNC_MODIFIES(* pobj) FUNC_MODIFIES(* pool); -void compact_pool(PARROT_INTERP, - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Variable_Size_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*mem_pools) - FUNC_MODIFIES(*pool); - -void initialize_var_size_pools(SHIM_INTERP, ARGMOD(Memory_Pools *mem_pools)) - __attribute__nonnull__(2) - FUNC_MODIFIES(*mem_pools); - -PARROT_MALLOC -PARROT_CANNOT_RETURN_NULL -void * mem_allocate(PARROT_INTERP, - ARGMOD(Memory_Pools *mem_pools), - size_t size, - ARGMOD(Variable_Size_Pool *pool)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(4) - FUNC_MODIFIES(*mem_pools) - FUNC_MODIFIES(*pool); - void merge_pools( ARGMOD(Variable_Size_Pool *dest), ARGMOD(Variable_Size_Pool *source)) @@ -546,11 +530,6 @@ __attribute__nonnull__(2) FUNC_MODIFIES(*mem_pools); -void Parrot_gc_destroy_memory_pools(SHIM_INTERP, - ARGMOD(Memory_Pools *mem_pools)) - __attribute__nonnull__(2) - FUNC_MODIFIES(*mem_pools); - void Parrot_gc_merge_memory_pools( ARGMOD(Interp *dest_interp), ARGMOD(Memory_Pools *dest_arena), @@ -561,21 +540,9 @@ FUNC_MODIFIES(*dest_interp) FUNC_MODIFIES(*dest_arena); -#define ASSERT_ARGS_aligned_mem __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem)) #define ASSERT_ARGS_check_buffer_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(pobj) \ , PARROT_ASSERT_ARG(pool)) -#define ASSERT_ARGS_compact_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(mem_pools) \ - , PARROT_ASSERT_ARG(pool)) -#define ASSERT_ARGS_initialize_var_size_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem_pools)) -#define ASSERT_ARGS_mem_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(mem_pools) \ - , PARROT_ASSERT_ARG(pool)) #define ASSERT_ARGS_merge_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(dest) \ , PARROT_ASSERT_ARG(source)) @@ -583,9 +550,6 @@ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(mem_pools)) -#define ASSERT_ARGS_Parrot_gc_destroy_memory_pools \ - __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem_pools)) #define ASSERT_ARGS_Parrot_gc_merge_memory_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(dest_interp) \ , PARROT_ASSERT_ARG(dest_arena) \ @@ -597,16 +561,21 @@ /* HEADERIZER BEGIN: src/gc/gc_ms.c */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +void gc_ms_allocate_buffer_storage(PARROT_INTERP, + ARGIN(Buffer *str), + size_t size) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + PARROT_CANNOT_RETURN_NULL void * gc_ms_allocate_fixed_size_storage(PARROT_INTERP, size_t size) __attribute__nonnull__(1); void gc_ms_allocate_string_storage(PARROT_INTERP, - ARGOUT(STRING *str), + ARGIN(STRING *str), size_t size) __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*str); + __attribute__nonnull__(2); void gc_ms_compact_memory_pool(PARROT_INTERP) __attribute__nonnull__(1); @@ -628,9 +597,27 @@ __attribute__nonnull__(2) FUNC_MODIFIES(*pmc); +void gc_ms_reallocate_buffer_storage(PARROT_INTERP, + ARGIN(Buffer *str), + size_t size) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +void gc_ms_reallocate_string_storage(PARROT_INTERP, + ARGIN(STRING *str), + size_t size) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + void Parrot_gc_ms_init(PARROT_INTERP) __attribute__nonnull__(1); +int Parrot_gc_ms_needed(PARROT_INTERP) + __attribute__nonnull__(1); + +#define ASSERT_ARGS_gc_ms_allocate_buffer_storage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str)) #define ASSERT_ARGS_gc_ms_allocate_fixed_size_storage \ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) @@ -649,8 +636,18 @@ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(pmc)) +#define ASSERT_ARGS_gc_ms_reallocate_buffer_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str)) +#define ASSERT_ARGS_gc_ms_reallocate_string_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str)) #define ASSERT_ARGS_Parrot_gc_ms_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) +#define ASSERT_ARGS_Parrot_gc_ms_needed __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/gc/gc_ms.c */ @@ -665,6 +662,101 @@ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: src/gc/gc_inf.c */ + +/* HEADERIZER BEGIN: src/gc/string_gc.c */ +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ + +void Parrot_gc_str_allocate_buffer_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGOUT(Buffer *buffer), + size_t size) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*buffer); + +void Parrot_gc_str_allocate_string_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGOUT(STRING *str), + size_t size) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*str); + +void Parrot_gc_str_compact_pool(PARROT_INTERP, ARGIN(String_GC *gc)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +void Parrot_gc_str_finalize(SHIM_INTERP, ARGMOD(String_GC *gc)) + __attribute__nonnull__(2) + FUNC_MODIFIES(*gc); + +void Parrot_gc_str_free_buffer_storage(SHIM_INTERP, + ARGIN(String_GC *gc), + ARGMOD(Buffer *b)) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*b); + +void Parrot_gc_str_initialize(PARROT_INTERP, ARGMOD(String_GC *gc)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*gc); + +void Parrot_gc_str_reallocate_buffer_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGMOD(Buffer *buffer), + size_t newsize) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*buffer); + +void Parrot_gc_str_reallocate_string_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGMOD(STRING *str), + size_t newsize) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*str); + +#define ASSERT_ARGS_Parrot_gc_str_allocate_buffer_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc) \ + , PARROT_ASSERT_ARG(buffer)) +#define ASSERT_ARGS_Parrot_gc_str_allocate_string_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc) \ + , PARROT_ASSERT_ARG(str)) +#define ASSERT_ARGS_Parrot_gc_str_compact_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc)) +#define ASSERT_ARGS_Parrot_gc_str_finalize __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(gc)) +#define ASSERT_ARGS_Parrot_gc_str_free_buffer_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(gc) \ + , PARROT_ASSERT_ARG(b)) +#define ASSERT_ARGS_Parrot_gc_str_initialize __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc)) +#define ASSERT_ARGS_Parrot_gc_str_reallocate_buffer_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc) \ + , PARROT_ASSERT_ARG(buffer)) +#define ASSERT_ARGS_Parrot_gc_str_reallocate_string_storage \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(gc) \ + , PARROT_ASSERT_ARG(str)) +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +/* HEADERIZER END: src/gc/string_gc.c */ + #endif /* PARROT_GC_PRIVATE_H_GUARD */ /* diff -Nru parrot-2.7.0/src/gc/malloc_trace.c parrot-2.8.0/src/gc/malloc_trace.c --- parrot-2.7.0/src/gc/malloc_trace.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/malloc_trace.c 2010-09-21 07:48:51.000000000 +0000 @@ -2,7 +2,7 @@ * * by Wolfram Gloger 1995. * - * $Id: malloc_trace.c 48412 2010-08-11 05:38:18Z plobsing $ + * $Id: malloc_trace.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ * Copyright (C) 2002-2007, Parrot Foundation. */ diff -Nru parrot-2.7.0/src/gc/mark_sweep.c parrot-2.8.0/src/gc/mark_sweep.c --- parrot-2.7.0/src/gc/mark_sweep.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/mark_sweep.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: mark_sweep.c 48492 2010-08-14 20:01:39Z cotto $ +$Id: mark_sweep.c 49069 2010-09-16 20:47:05Z bacek $ =head1 NAME @@ -31,15 +31,13 @@ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -static void free_buffer(SHIM_INTERP, - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Fixed_Size_Pool *pool), +static void free_buffer(PARROT_INTERP, + ARGIN(Memory_Pools *mem_pools), + SHIM(Fixed_Size_Pool *pool), ARGMOD(Buffer *b)) + __attribute__nonnull__(1) __attribute__nonnull__(2) - __attribute__nonnull__(3) __attribute__nonnull__(4) - FUNC_MODIFIES(*mem_pools) - FUNC_MODIFIES(*pool) FUNC_MODIFIES(*b); static void free_pmc_in_pool(PARROT_INTERP, @@ -80,8 +78,8 @@ FUNC_MODIFIES(*mem_pools); #define ASSERT_ARGS_free_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(mem_pools) \ - , PARROT_ASSERT_ARG(pool) \ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(mem_pools) \ , PARROT_ASSERT_ARG(b)) #define ASSERT_ARGS_free_pmc_in_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ @@ -260,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; @@ -300,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); @@ -481,6 +481,7 @@ pool->last_Arena = new_arena; mem_pools->header_allocs_since_last_collect += size; + mem_pools->memory_allocated += size; } /* @@ -509,7 +510,6 @@ Fixed_Size_Pool * const pmc_pool = new_fixed_size_obj_pool(sizeof (PMC), num_headers); - pmc_pool->mem_pool = NULL; pmc_pool->gc_object = free_pmc_in_pool; (interp->gc_sys->init_pool)(interp, pmc_pool); @@ -574,7 +574,6 @@ pool->gc_object = (gc_object_fn_type)free_buffer; - pool->mem_pool = mem_pools->memory_pool; (interp->gc_sys->init_pool)(interp, pool); return pool; } @@ -603,7 +602,6 @@ pool->last_Arena = NULL; pool->free_list = NULL; - pool->mem_pool = NULL; pool->newfree = NULL; pool->newlast = NULL; pool->object_size = object_size; @@ -634,7 +632,6 @@ if (constant) { pool = new_bufferlike_pool(interp, mem_pools, sizeof (STRING)); pool->gc_object = NULL; - pool->mem_pool = mem_pools->constant_string_pool; } else pool = get_bufferlike_pool(interp, mem_pools, sizeof (STRING)); @@ -657,41 +654,18 @@ */ static void -free_buffer(SHIM_INTERP, - ARGMOD(Memory_Pools *mem_pools), - ARGMOD(Fixed_Size_Pool *pool), +free_buffer(PARROT_INTERP, + ARGIN(Memory_Pools *mem_pools), + SHIM(Fixed_Size_Pool *pool), ARGMOD(Buffer *b)) { ASSERT_ARGS(free_buffer) - Variable_Size_Pool * const mem_pool = (Variable_Size_Pool *)pool->mem_pool; /* If there is no allocated buffer - bail out */ if (!Buffer_buflen(b)) return; - /* XXX Jarkko reported that on irix pool->mem_pool was NULL, which really - * shouldn't happen */ - if (mem_pool) { - /* Update Memory_Block usage */ - if (PObj_is_movable_TESTALL(b)) { - INTVAL *buffer_flags = Buffer_bufflagsptr(b); - - /* Mask low 2 bits used for flags */ - Memory_Block * block = Buffer_pool(b); - - PARROT_ASSERT(block); - - /* We can have shared buffers. Don't count them (yet) */ - if (!(*buffer_flags & Buffer_shared_FLAG)) { - size_t size = ALIGNED_STRING_SIZE(Buffer_buflen(b)); - block->freed += size; - mem_pools->memory_used -= size; - } - - } - } - - Buffer_buflen(b) = 0; + Parrot_gc_str_free_buffer_storage(interp, &mem_pools->string_gc, b); } diff -Nru parrot-2.7.0/src/gc/string_gc.c parrot-2.8.0/src/gc/string_gc.c --- parrot-2.7.0/src/gc/string_gc.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/gc/string_gc.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,1191 @@ +/* +Copyright (C) 2010, Parrot Foundation. +$Id: string_gc.c 49092 2010-09-17 22:17:24Z nwellnhof $ + +=head1 NAME + +src/gc/string_gc.c - String GC subsystem. + +=head1 DESCRIPTION + +GC subsystem to manage STRINGs. + +=head2 Parrot Memory Management Code + +=over 4 + +=cut + +*/ + +#include "parrot/parrot.h" +#include "gc_private.h" + +typedef void (*compact_f) (Interp *, Memory_Pools * const, Variable_Size_Pool *); + +#define POOL_SIZE (65536 * 2) + +/* show allocated blocks on stderr */ +#define RESOURCE_DEBUG 0 +#define RESOURCE_DEBUG_SIZE 1000000 + +#define RECLAMATION_FACTOR 0.20 +#define WE_WANT_EVER_GROWING_ALLOCATIONS 0 + +typedef struct string_callback_data { + Memory_Block *new_block; /* A pointer to our working block */ + char *cur_spot; /* Where we're currently copying to */ +} string_callback_data; + +/* HEADERIZER HFILE: src/gc/gc_private.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 char * aligned_mem(SHIM(const Buffer *buffer), ARGIN(char *mem)) + __attribute__nonnull__(2); + +static void alloc_new_block( + ARGMOD(Memory_Pools *mem_pools), + size_t size, + ARGMOD(Variable_Size_Pool *pool), + ARGIN(const char *why)) + __attribute__nonnull__(1) + __attribute__nonnull__(3) + __attribute__nonnull__(4) + FUNC_MODIFIES(*mem_pools) + FUNC_MODIFIES(*pool); + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static const char * buffer_location(PARROT_INTERP, ARGIN(const Buffer *b)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +static void compact_pool(PARROT_INTERP, + ARGMOD(Memory_Pools *mem_pools), + ARGMOD(Variable_Size_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*mem_pools) + FUNC_MODIFIES(*pool); + +static void debug_print_buf(PARROT_INTERP, ARGIN(const Buffer *b)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +static void free_memory_pool(ARGFREE(Variable_Size_Pool *pool)); +static void free_old_mem_blocks( + ARGMOD(Memory_Pools *mem_pools), + ARGMOD(Variable_Size_Pool *pool), + ARGMOD(Memory_Block *new_block), + UINTVAL total_size) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*mem_pools) + FUNC_MODIFIES(*pool) + FUNC_MODIFIES(*new_block); + +static int is_block_almost_full(ARGIN(const Memory_Block *block)) + __attribute__nonnull__(1); + +PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL +static void * mem_allocate(PARROT_INTERP, + ARGMOD(Memory_Pools *mem_pools), + size_t size, + ARGMOD(Variable_Size_Pool *pool)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(4) + FUNC_MODIFIES(*mem_pools) + FUNC_MODIFIES(*pool); + +static void move_buffer_callback(PARROT_INTERP, + ARGIN(Buffer *b), + ARGIN(void *data)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3); + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static char * move_one_buffer(PARROT_INTERP, + ARGIN(Memory_Block *pool), + ARGMOD(Buffer *old_buf), + ARGMOD(char *new_pool_ptr)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + __attribute__nonnull__(4) + FUNC_MODIFIES(*old_buf) + FUNC_MODIFIES(*new_pool_ptr); + +PARROT_WARN_UNUSED_RESULT +PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL +static Variable_Size_Pool * new_memory_pool( + size_t min_block, + NULLOK(compact_f compact)); + +PARROT_CANNOT_RETURN_NULL +static UINTVAL pad_pool_size(ARGIN(const Variable_Size_Pool *pool)) + __attribute__nonnull__(1); + +#define ASSERT_ARGS_aligned_mem __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(mem)) +#define ASSERT_ARGS_alloc_new_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(mem_pools) \ + , PARROT_ASSERT_ARG(pool) \ + , PARROT_ASSERT_ARG(why)) +#define ASSERT_ARGS_buffer_location __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(b)) +#define ASSERT_ARGS_compact_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(mem_pools) \ + , PARROT_ASSERT_ARG(pool)) +#define ASSERT_ARGS_debug_print_buf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(b)) +#define ASSERT_ARGS_free_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) +#define ASSERT_ARGS_free_old_mem_blocks __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(mem_pools) \ + , PARROT_ASSERT_ARG(pool) \ + , PARROT_ASSERT_ARG(new_block)) +#define ASSERT_ARGS_is_block_almost_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(block)) +#define ASSERT_ARGS_mem_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(mem_pools) \ + , PARROT_ASSERT_ARG(pool)) +#define ASSERT_ARGS_move_buffer_callback __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(b) \ + , PARROT_ASSERT_ARG(data)) +#define ASSERT_ARGS_move_one_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(pool) \ + , PARROT_ASSERT_ARG(old_buf) \ + , PARROT_ASSERT_ARG(new_pool_ptr)) +#define ASSERT_ARGS_new_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) +#define ASSERT_ARGS_pad_pool_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pool)) +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +/* HEADERIZER END: static */ + +/* + +=item C + +Initialize the managed memory pools. Parrot maintains two C +structures, the general memory pool and the constant string pool. Create +and initialize both pool structures, and allocate initial blocks of memory +for both. + +=cut + +*/ + +void +Parrot_gc_str_initialize(PARROT_INTERP, ARGMOD(String_GC *gc)) +{ + ASSERT_ARGS(Parrot_gc_str_initialize) + + gc->memory_pool = new_memory_pool(POOL_SIZE, &compact_pool); + alloc_new_block(interp->mem_pools, POOL_SIZE, gc->memory_pool, "init"); + + /* Constant strings - not compacted */ + gc->constant_string_pool = new_memory_pool(POOL_SIZE, NULL); + alloc_new_block(interp->mem_pools, POOL_SIZE, gc->constant_string_pool, "init"); +} + +/* + +=item C + +Destroys the memory pool and the constant string pool. Loop through both +pools and destroy all memory blocks contained in them. Once all the +blocks are freed, free the pools themselves. + +=cut + +*/ + +void +Parrot_gc_str_finalize(SHIM_INTERP, ARGMOD(String_GC *gc)) +{ + ASSERT_ARGS(Parrot_gc_str_finalize) + + free_memory_pool(gc->constant_string_pool); + free_memory_pool(gc->memory_pool); +} + +/* + +=item C + +Allocates a chunk of memory of at least size C for the given Buffer. +buffer is guaranteed to be properly aligned for things like C, +so the size may be rounded up or down to guarantee that this alignment holds. + +=cut + +*/ + +void +Parrot_gc_str_allocate_buffer_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGOUT(Buffer *buffer), + size_t size) +{ + ASSERT_ARGS(Parrot_gc_str_allocate_buffer_storage) + const size_t new_size = ALIGNED_STRING_SIZE(size); + + Buffer_bufstart(buffer) = (void *)aligned_mem(buffer, + (char *)mem_allocate(interp, + interp->mem_pools, new_size, gc->memory_pool)); + + /* Save pool used to allocate into buffer header */ + *Buffer_poolptr(buffer) = gc->memory_pool->top_block; + + Buffer_buflen(buffer) = new_size - sizeof (void *); +} + +/* + +=item C + +Reallocate the Buffer's buffer memory to the given size. The +allocated buffer will not shrink. If the buffer was allocated with +L the new buffer will also be aligned. As with +all reallocation, the new buffer might have moved and the additional +memory is not cleared. + +=cut + +*/ + +void +Parrot_gc_str_reallocate_buffer_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGMOD(Buffer *buffer), + size_t newsize) +{ + ASSERT_ARGS(Parrot_gc_str_reallocate_buffer_storage) + size_t copysize; + char *mem; + Variable_Size_Pool * const pool = gc->memory_pool; + size_t new_size, needed, old_size; + + /* we don't shrink buffers */ + if (newsize <= Buffer_buflen(buffer)) + return; + + /* + * same as below but barely used and tested - only 3 list related + * tests do use true reallocation + * + * list.c, which does _reallocate, has 2 reallocations + * normally, which play ping pong with buffers. + * The normal case is therefore always to allocate a new block + */ + new_size = ALIGNED_STRING_SIZE(newsize); + old_size = ALIGNED_STRING_SIZE(Buffer_buflen(buffer)); + needed = new_size - old_size; + + if ((pool->top_block->free >= needed) + && (pool->top_block->top == (char *)Buffer_bufstart(buffer) + old_size)) { + pool->top_block->free -= needed; + pool->top_block->top += needed; + interp->mem_pools->memory_used += needed; + Buffer_buflen(buffer) = newsize; + return; + } + + copysize = Buffer_buflen(buffer); + + mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); + mem = aligned_mem(buffer, mem); + + /* We shouldn't ever have a 0 from size, but we do. If we can track down + * those bugs, this can be removed which would make things cheaper */ + if (copysize) + memcpy(mem, Buffer_bufstart(buffer), copysize); + + Buffer_bufstart(buffer) = mem; + + new_size -= sizeof (void *); + + Buffer_buflen(buffer) = new_size; + + /* Save pool used to allocate into buffer header */ + *Buffer_poolptr(buffer) = gc->memory_pool->top_block; +} + +/* + +=item C + +Allocate the STRING's buffer memory to the given size. The allocated +buffer maybe slightly bigger than the given C. This function +sets also C<< str->strstart >> to the new buffer location, C<< str->bufused >> +is B changed. + +=cut + +*/ + +void +Parrot_gc_str_allocate_string_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGOUT(STRING *str), + size_t size) +{ + ASSERT_ARGS(Parrot_gc_str_allocate_string_storage) + size_t new_size; + Variable_Size_Pool *pool; + char *mem; + + Buffer_buflen(str) = 0; + Buffer_bufstart(str) = NULL; + + if (size == 0) + return; + + pool = PObj_constant_TEST(str) + ? gc->constant_string_pool + : gc->memory_pool; + + new_size = ALIGNED_STRING_SIZE(size); + mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); + mem += sizeof (void *); + + Buffer_bufstart(str) = str->strstart = mem; + Buffer_buflen(str) = new_size - sizeof (void *); + + /* Save pool used to allocate into buffer header */ + *Buffer_poolptr(str) = pool->top_block; +} + +/* + +=item C + +Reallocate the STRING's buffer memory to the given size. The allocated +buffer will not shrink. This function sets also Cstrstart> to the +new buffer location, Cbufused> is B changed. + +=cut + +*/ + +void +Parrot_gc_str_reallocate_string_storage(PARROT_INTERP, + ARGIN(String_GC *gc), + ARGMOD(STRING *str), + size_t newsize) +{ + ASSERT_ARGS(Parrot_gc_str_reallocate_string_storage) + size_t copysize; + char *mem, *oldmem; + size_t new_size, needed, old_size; + + Variable_Size_Pool * const pool = + PObj_constant_TEST(str) + ? gc->constant_string_pool + : gc->memory_pool; + + /* if the requested size is smaller then buflen, we are done */ + if (newsize <= Buffer_buflen(str)) + return; + + /* + * first check, if we can reallocate: + * - if the passed strings buffer is the last string in the pool and + * - if there is enough size, we can just move the pool's top pointer + */ + new_size = ALIGNED_STRING_SIZE(newsize); + old_size = ALIGNED_STRING_SIZE(Buffer_buflen(str)); + needed = new_size - old_size; + + if (pool->top_block->free >= needed + && pool->top_block->top == (char *)Buffer_bufstart(str) + old_size) { + pool->top_block->free -= needed; + pool->top_block->top += needed; + interp->mem_pools->memory_used += needed; + Buffer_buflen(str) = new_size - sizeof (void *); + return; + } + + PARROT_ASSERT(str->bufused <= newsize); + + /* only copy used memory, not total string buffer */ + copysize = str->bufused; + + mem = (char *)mem_allocate(interp, interp->mem_pools, new_size, pool); + mem += sizeof (void *); + + /* Update Memory_Block usage */ + /* We must not reallocate non-movable buffers! */ + PARROT_ASSERT(PObj_is_movable_TESTALL(str)); + + /* We must not reallocate shared buffers! */ + PARROT_ASSERT(!(*Buffer_bufflagsptr(str) & Buffer_shared_FLAG)); + + /* Decrease usage */ + PARROT_ASSERT(Buffer_pool(str)); + Buffer_pool(str)->freed += old_size; + + /* copy mem from strstart, *not* bufstart */ + oldmem = str->strstart; + Buffer_bufstart(str) = (void *)mem; + str->strstart = mem; + Buffer_buflen(str) = new_size - sizeof (void *); + + /* We shouldn't ever have a 0 from size, but we do. If we can track down + * those bugs, this can be removed which would make things cheaper */ + if (copysize) + memcpy(mem, oldmem, copysize); + + /* Save pool used to allocate into buffer header */ + *Buffer_poolptr(str) = pool->top_block; +} + +/* +=item C + +Compact string pool. + +=cut +*/ +void +Parrot_gc_str_compact_pool(PARROT_INTERP, ARGIN(String_GC *gc)) +{ + ASSERT_ARGS(Parrot_gc_str_compact_pool) + compact_pool(interp, interp->mem_pools, gc->memory_pool); +} + +/* + +=item C + +Frees a buffer, returning it to the memory pool for Parrot to possibly +reuse later. + +=cut + +*/ + +void +Parrot_gc_str_free_buffer_storage(SHIM_INTERP, + ARGIN(String_GC *gc), + ARGMOD(Buffer *b)) +{ + ASSERT_ARGS(Parrot_gc_str_free_buffer_storage) + Variable_Size_Pool * const mem_pool = gc->memory_pool; + + /* If there is no allocated buffer - bail out */ + if (!Buffer_buflen(b)) + return; + + if (mem_pool) { + /* Update Memory_Block usage */ + if (PObj_is_movable_TESTALL(b)) { + INTVAL *buffer_flags = Buffer_bufflagsptr(b); + + /* Mask low 2 bits used for flags */ + Memory_Block * block = Buffer_pool(b); + + PARROT_ASSERT(block); + + /* We can have shared buffers. Don't count them (yet) */ + if (!(*buffer_flags & Buffer_shared_FLAG)) { + block->freed += ALIGNED_STRING_SIZE(Buffer_buflen(b)); + } + + } + } + + Buffer_buflen(b) = 0; +} + +/* +=item C + +Allocate a new C structures, and set some initial values. +return a pointer to the new pool. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL +static Variable_Size_Pool * +new_memory_pool(size_t min_block, NULLOK(compact_f compact)) +{ + ASSERT_ARGS(new_memory_pool) + Variable_Size_Pool * const pool = mem_internal_allocate_typed(Variable_Size_Pool); + + pool->top_block = NULL; + pool->compact = compact; + pool->minimum_block_size = min_block; + pool->total_allocated = 0; + pool->guaranteed_reclaimable = 0; + pool->possibly_reclaimable = 0; + pool->reclaim_factor = RECLAMATION_FACTOR; + + return pool; +} + +/* + +=item C + +Allocate a new memory block. We allocate either the requested size or the +default size, whichever is larger. Add the new block to the given memory +pool. The given C text is used for debugging. + +=cut + +*/ + +static void +alloc_new_block( + ARGMOD(Memory_Pools *mem_pools), + size_t size, + ARGMOD(Variable_Size_Pool *pool), + ARGIN(const char *why)) +{ + ASSERT_ARGS(alloc_new_block) + Memory_Block *new_block; + + const size_t alloc_size = (size > pool->minimum_block_size) + ? size : pool->minimum_block_size; + +#if RESOURCE_DEBUG + fprintf(stderr, "new_block (%s) size %u -> %u\n", + why, size, alloc_size); +#else + UNUSED(why) +#endif + + /* Allocate a new block. Header info's on the front */ + new_block = (Memory_Block *)mem_internal_allocate_zeroed( + sizeof (Memory_Block) + alloc_size); + + if (!new_block) { + fprintf(stderr, "out of mem allocsize = %d\n", (int)alloc_size); + exit(EXIT_FAILURE); + } + + new_block->free = alloc_size; + new_block->size = alloc_size; + + new_block->next = NULL; + new_block->start = (char *)new_block + sizeof (Memory_Block); + new_block->top = new_block->start; + + /* Note that we've allocated it */ + mem_pools->memory_allocated += alloc_size; + + /* If this is for a public pool, add it to the list */ + new_block->prev = pool->top_block; + + /* If we're not first, then tack us on the list */ + if (pool->top_block) + pool->top_block->next = new_block; + + pool->top_block = new_block; + pool->total_allocated += alloc_size; +} + +/* + +=item C + +Allocates memory for headers. + +Alignment problems history: + +See L +for details. + +- return aligned pointer *if needed* +- return strings et al at unaligned i.e. void* boundaries +- remember alignment in a buffer header bit + use this in compaction code +- reduce alignment to a reasonable value i.e. MALLOC_ALIGNMENT + aka 2*sizeof (size_t) or just 8 (TODO make a config hint) + +See pobj.h for a discussion of the Buffer descriptor and the buffer itself, +including its header. + +=cut + +*/ + +PARROT_MALLOC +PARROT_CANNOT_RETURN_NULL +static void * +mem_allocate(PARROT_INTERP, + ARGMOD(Memory_Pools *mem_pools), + size_t size, + ARGMOD(Variable_Size_Pool *pool)) +{ + ASSERT_ARGS(mem_allocate) + void *return_val; + + /* we always should have one block at least */ + PARROT_ASSERT(pool->top_block); + + /* If not enough room, try to find some */ + if (pool->top_block->free < size) { + /* + * force a GC mark run to get live flags set + * for incremental M&S collection is run from there + * but only if there may be something worth collecting! + * TODO pass required allocation size to the GC system, + * so that collection can be skipped if needed + */ + if (!mem_pools->gc_mark_block_level + && Parrot_gc_ms_needed(interp)) { + Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG); + + if (interp->gc_sys->sys_type != INF) { + /* Compact the pool if allowed and worthwhile */ + if (pool->compact) { + /* don't bother reclaiming if it's only a small amount */ + if ((pool->possibly_reclaimable * pool->reclaim_factor + + pool->guaranteed_reclaimable) > size) { + (*pool->compact) (interp, mem_pools, pool); + } + } + } + } + if (pool->top_block->free < size) { + if (pool->minimum_block_size < 65536 * 16) + pool->minimum_block_size *= 2; + /* + * TODO - Big blocks + * + * Mark the block as big block (it has just one item) + * And don't set big blocks as the top_block. + */ + alloc_new_block(mem_pools, size, pool, "compact failed"); + + ++mem_pools->mem_allocs_since_last_collect; + + if (pool->top_block->free < size) { + fprintf(stderr, "out of mem\n"); + exit(EXIT_FAILURE); + } + } + } + + /* TODO inline the fast path */ + return_val = pool->top_block->top; + pool->top_block->top += size; + pool->top_block->free -= size; + mem_pools->memory_used += size; + + return return_val; +} + +/* + +=item C + +Returns a pointer to the aligned allocated storage for Buffer C, +which might not be the same as the pointer to C because of +memory alignment. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static char * +aligned_mem(SHIM(const Buffer *buffer), ARGIN(char *mem)) +{ + ASSERT_ARGS(aligned_mem) + mem += sizeof (void *); + mem = (char *)(((unsigned long)(mem + WORD_ALIGN_1)) & WORD_ALIGN_MASK); + + return mem; +} + +/* + +=item C + +Recturns a constant string representing the location of the given +Buffer C in one of the PMC registers. If the PMC is not located +in one of the PMC registers of the current context, returns the +string C<"???">. + +=cut + +*/ + +#if RESOURCE_DEBUG +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static const char * +buffer_location(PARROT_INTERP, ARGIN(const Buffer *b)) +{ + ASSERT_ARGS(buffer_location) + Parrot_Context * const ctx = CONTEXT(interp); + static char reg[10]; + UINTVAL i; + + for (i = 0; i < ctx->n_regs_used[REGNO_STR]; ++i) { + PObj * const obj = (PObj *)Parrot_pcc_get_STRING_reg(interp, ctx, i); + if ((PObj *)obj == b) { + sprintf(reg, "S%d", (int)i); + return reg; + } + } + + return "???"; +} + +/* + +=item C + +Prints a debug statement with information about the given PObj C. +=cut + +*/ + +static void +debug_print_buf(PARROT_INTERP, ARGIN(const Buffer *b)) +{ + ASSERT_ARGS(debug_print_buf) + fprintf(stderr, "found %p, len %d, flags 0x%08x at %s\n", + b, (int)Buffer_buflen(b), (uint)PObj_get_FLAGS(b), + buffer_location(interp, b)); +} +#endif + +/* + +=back + +=head2 Compaction Code + +=over 4 + +=item C + +Compact the string buffer pool. Does not perform a GC scan, or mark items +as being alive in any way. + +=cut + +*/ + +static void +compact_pool(PARROT_INTERP, + ARGMOD(Memory_Pools *mem_pools), + ARGMOD(Variable_Size_Pool *pool)) +{ + ASSERT_ARGS(compact_pool) + INTVAL j; + UINTVAL total_size; + + Fixed_Size_Arena *cur_buffer_arena; + + /* Contains new_block and cur_spot */ + string_callback_data cb_data; + + + /* Bail if we're blocked */ + if (mem_pools->gc_sweep_block_level) + return; + + ++mem_pools->gc_sweep_block_level; + + /* We're collecting */ + mem_pools->mem_allocs_since_last_collect = 0; + mem_pools->header_allocs_since_last_collect = 0; + ++mem_pools->gc_collect_runs; + + /* Snag a block big enough for everything */ + total_size = pad_pool_size(pool); + + if (total_size == 0) { + free_old_mem_blocks(mem_pools, pool, pool->top_block, total_size); + --mem_pools->gc_sweep_block_level; + return; + } + + alloc_new_block(mem_pools, total_size, pool, "inside compact"); + + cb_data.new_block = pool->top_block; + + /* Start at the beginning */ + cb_data.cur_spot = cb_data.new_block->start; + + /* Run through all the Buffer header pools and copy */ + interp->gc_sys->iterate_live_strings(interp, move_buffer_callback, &cb_data); + + /* Okay, we're done with the copy. Set the bits in the pool struct */ + /* First, where we allocate next */ + cb_data.new_block->top = cb_data.cur_spot; + + PARROT_ASSERT(cb_data.new_block->size + >= + (size_t)cb_data.new_block->top - (size_t)cb_data.new_block->start); + + /* How much is free. That's the total size minus the amount we used */ + cb_data.new_block->free = cb_data.new_block->size + - (cb_data.cur_spot - cb_data.new_block->start); + mem_pools->memory_collected += (cb_data.cur_spot - cb_data.new_block->start); + mem_pools->memory_used += (cb_data.cur_spot - cb_data.new_block->start); + + free_old_mem_blocks(mem_pools, pool, cb_data.new_block, total_size); + + --mem_pools->gc_sweep_block_level; +} + +/* +=item C + +Callback for live STRING/Buffer for compating. + +=cut +*/ +static void +move_buffer_callback(PARROT_INTERP, ARGIN(Buffer *b), ARGIN(void *data)) +{ + ASSERT_ARGS(move_buffer_callback) + string_callback_data *cb = (string_callback_data*)data; + + if (Buffer_buflen(b) && PObj_is_movable_TESTALL(b)) { + Memory_Block *old_block = Buffer_pool(b); + + if (!is_block_almost_full(old_block)) + cb->cur_spot = move_one_buffer(interp, cb->new_block, b, cb->cur_spot); + } + +} + +/* + +=item C + +Calculate the size of the new pool. The currently used size equals the total +size minus the reclaimable size. Add a minimum block to the current amount, so +we can avoid having to allocate it in the future. + +Returns 0 if all blocks below the top block are almost full. In this case +compacting is not needed. + +TODO - Big blocks + +Currently all available blocks are compacted into one new +block with total_size. This is suboptimal, if the block has +just one live item from a big allocation. + +But currently it's unknown if the buffer memory is alive +as the live bits are in Buffer headers. We have to run the +compaction loop to check liveness. OTOH if this compaction +is running through all the buffer headers, there is no +relation to the block. + +Moving the live bit into the buffer thus also solves this +problem easily. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +static UINTVAL +pad_pool_size(ARGIN(const Variable_Size_Pool *pool)) +{ + ASSERT_ARGS(pad_pool_size) + Memory_Block *cur_block = pool->top_block->prev; + + UINTVAL total_size = 0; +#if RESOURCE_DEBUG + size_t total_blocks = 1; +#endif + + while (cur_block) { + if (!is_block_almost_full(cur_block)) + total_size += cur_block->size - cur_block->freed - cur_block->free; + cur_block = cur_block->prev; +#if RESOURCE_DEBUG + ++total_blocks; +#endif + } + + if (total_size == 0) + return 0; + + cur_block = pool->top_block; + if (!is_block_almost_full(cur_block)) + total_size += cur_block->size - cur_block->freed - cur_block->free; + + /* this makes for ever increasing allocations but fewer collect runs */ +#if WE_WANT_EVER_GROWING_ALLOCATIONS + total_size += pool->minimum_block_size; +#endif + +#if RESOURCE_DEBUG + fprintf(stderr, "Total blocks: %d\n", total_blocks); +#endif + + return total_size; +} + +/* + +=item C + +The compact_pool operation collects disjointed blocks of memory allocated on a +given pool's free list into one large block of memory. Once the new larger +memory block has been allocated, this function moves one buffer from the old +memory block to the new memory block and marks that it has been moved. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static char * +move_one_buffer(PARROT_INTERP, ARGIN(Memory_Block *pool), + ARGMOD(Buffer *old_buf), ARGMOD(char *new_pool_ptr)) +{ + ASSERT_ARGS(move_one_buffer) + + INTVAL *flags = NULL; + ptrdiff_t offset = 0; + Memory_Block *old_block = NULL; +#if RESOURCE_DEBUG + if (Buffer_buflen(old_buf) >= RESOURCE_DEBUG_SIZE) + debug_print_buf(interp, old_buf); +#else + UNUSED(interp); +#endif + + /* we can't perform the math all the time, because + * strstart might be in unallocated memory */ + if (PObj_is_COWable_TEST(old_buf)) { + flags = Buffer_bufflagsptr(old_buf); + old_block = Buffer_pool(old_buf); + + if (PObj_is_string_TEST(old_buf)) { + offset = (ptrdiff_t)((STRING *)old_buf)->strstart - + (ptrdiff_t)Buffer_bufstart(old_buf); + } + } + + /* buffer has already been moved; just change the header */ + if (flags && (*flags & Buffer_shared_FLAG) + && (*flags & Buffer_moved_FLAG)) { + /* Find out who else references our data */ + Buffer * const hdr = *((Buffer **)Buffer_bufstart(old_buf)); + + PARROT_ASSERT(PObj_is_COWable_TEST(old_buf)); + + /* Make sure they know that we own it too */ + /* Set Buffer_shared_FLAG in new buffer */ + *Buffer_bufflagsptr(hdr) |= Buffer_shared_FLAG; + + /* Now make sure we point to where the other guy does */ + Buffer_bufstart(old_buf) = Buffer_bufstart(hdr); + + /* And if we're a string, update strstart */ + /* Somewhat of a hack, but if we get per-pool + * collections, it should help ease the pain */ + if (PObj_is_string_TEST(old_buf)) + ((STRING *)old_buf)->strstart = + (char *)Buffer_bufstart(old_buf) + offset; + } + else { + new_pool_ptr = aligned_mem(old_buf, new_pool_ptr); + + /* Copy our memory to the new pool */ + memcpy(new_pool_ptr, Buffer_bufstart(old_buf), + Buffer_buflen(old_buf)); + + /* If we're shared */ + if (flags && (*flags & Buffer_shared_FLAG)) { + PARROT_ASSERT(PObj_is_COWable_TEST(old_buf)); + + /* Let the old buffer know how to find us */ + *((Buffer **)Buffer_bufstart(old_buf)) = old_buf; + + /* Finally, let the tail know that we've moved, so + * that any other references can know to look for + * us and not re-copy */ + *flags |= Buffer_moved_FLAG; + } + + Buffer_bufstart(old_buf) = new_pool_ptr; + + /* Remember new pool inside */ + *Buffer_poolptr(old_buf) = pool; + + if (PObj_is_string_TEST(old_buf)) + ((STRING *)old_buf)->strstart = + (char *)Buffer_bufstart(old_buf) + offset; + + new_pool_ptr += Buffer_buflen(old_buf); + } + + return new_pool_ptr; +} + +/* + +=item C + +The compact_pool operation collects disjointed blocks of memory allocated on a +given pool's free list into one large block of memory, setting it as the new +top block for the pool. Once that is done, and all items have been moved into +the new block of memory, this function iterates through the old blocks and +frees each one. It also performs the necessary housekeeping to record the +freed memory blocks. At the end of this function, the pool will have only one +block of memory on its free list. + +=cut + +*/ + +static void +free_old_mem_blocks( + ARGMOD(Memory_Pools *mem_pools), + ARGMOD(Variable_Size_Pool *pool), + ARGMOD(Memory_Block *new_block), + UINTVAL total_size) +{ + ASSERT_ARGS(free_old_mem_blocks) + Memory_Block *prev_block = new_block; + Memory_Block *cur_block = new_block->prev; + + PARROT_ASSERT(new_block == pool->top_block); + + while (cur_block) { + Memory_Block * const next_block = cur_block->prev; + + if (is_block_almost_full(cur_block)) { + /* Skip block */ + prev_block = cur_block; + cur_block = next_block; + } + else { + /* Note that we don't have it any more */ + mem_pools->memory_allocated -= cur_block->size; + mem_pools->memory_used -= cur_block->size - cur_block->free; + + /* We know the pool body and pool header are a single chunk, so + * this is enough to get rid of 'em both */ + mem_internal_free(cur_block); + cur_block = next_block; + + /* Unlink it from list */ + prev_block->prev = next_block; + } + } + + /* Terminate list */ + prev_block->prev = NULL; + + + /* ANR: I suspect this should be set to new_block->size, instead of passing + * in the raw value of total_size, because alloc_new_block pads the size of + * the new block under certain conditions. Leaving it unmodified for now, + * so this refactor has no functionality changes, only code cleanups.*/ + pool->total_allocated = total_size; + pool->guaranteed_reclaimable = 0; + pool->possibly_reclaimable = 0; +} + +/* + +=item C + +Tests if the block is almost full and should be skipped during compacting. + +Returns true if less that 20% of block is available + +=cut + +*/ + +static int +is_block_almost_full(ARGIN(const Memory_Block *block)) +{ + ASSERT_ARGS(is_block_almost_full) + return 5 * (block->free + block->freed) < block->size; +} + +/* + +=item C + +Frees a memory pool; helper function for C. + +=cut + +*/ + +static void +free_memory_pool(ARGFREE(Variable_Size_Pool *pool)) +{ + ASSERT_ARGS(free_memory_pool) + + Memory_Block *cur_block = pool->top_block; + + while (cur_block) { + Memory_Block * const next_block = cur_block->prev; + mem_internal_free(cur_block); + cur_block = next_block; + } + + mem_internal_free(pool); +} + +/* + +=back + +=head1 SEE ALSO + +F. +F. + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/src/gc/system.c parrot-2.8.0/src/gc/system.c --- parrot-2.7.0/src/gc/system.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/gc/system.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: system.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: system.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -75,6 +75,7 @@ __attribute__nonnull__(1) __attribute__nonnull__(2); +PARROT_NOINLINE static void trace_system_stack(PARROT_INTERP, ARGIN(const Memory_Pools *mem_pools)) __attribute__nonnull__(1) @@ -234,12 +235,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(const Memory_Pools *mem_pools)) { @@ -450,8 +453,8 @@ prefix = mask & buffer_min; 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; /* Do a quick approximate range check by bit-masking */ @@ -460,14 +463,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) && is_pmc_ptr(mem_pools, (void *)ptr)) { - Parrot_gc_mark_PObj_alive(interp, (PObj *)ptr); + if ((pmc_min <= ptr) + && (ptr < pmc_max) + && is_pmc_ptr(mem_pools, (void *)ptr)) { + Parrot_gc_mark_PMC_alive(interp, (PMC *)ptr); } - else if ((buffer_min <= ptr) && (ptr < buffer_max) && - is_buffer_ptr(mem_pools, (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_PObj_alive(interp, (PObj *)ptr); + else if ((buffer_min <= ptr) && (ptr < buffer_max) + && is_buffer_ptr(mem_pools, (void *)ptr)) { + if (PObj_is_string_TEST((PObj *)ptr)) + Parrot_gc_mark_STRING_alive(interp, (STRING *)ptr); + else + PObj_live_SET((PObj *)ptr); } } } @@ -519,7 +525,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); } diff -Nru parrot-2.7.0/src/global_setup.c parrot-2.8.0/src/global_setup.c --- parrot-2.7.0/src/global_setup.c 2010-05-19 09:28:37.000000000 +0000 +++ parrot-2.8.0/src/global_setup.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2008, Parrot Foundation. -$Id: global_setup.c 46620 2010-05-15 01:17:03Z plobsing $ +$Id: global_setup.c 48946 2010-09-12 00:26:36Z jkeenan $ =head1 NAME @@ -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); diff -Nru parrot-2.7.0/src/hash.c parrot-2.8.0/src/hash.c --- parrot-2.7.0/src/hash.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/hash.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: hash.c 48421 2010-08-11 21:15:36Z NotFound $ +$Id: hash.c 49152 2010-09-19 08:04:17Z mikehh $ =head1 NAME @@ -25,65 +25,171 @@ */ #include "parrot/parrot.h" -#include "pmc/pmc_key.h" -/* the number of entries above which it's faster to hash the hashval instead of - * looping over the used HashBuckets directly */ -#define INITIAL_BUCKETS 8 +/* hash first allocation size */ +#define INITIAL_SIZE 2 + +/* below this hash size we use fixed_size_allocator + * else we use system allocator */ +#define SPLIT_POINT 16 /* HEADERIZER HFILE: include/parrot/hash.h */ /* HEADERIZER BEGIN: static */ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +static void allocate_buckets(PARROT_INTERP, + ARGMOD(Hash *hash), + ARGIN_NULLOK(const UINTVAL size)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*hash); + +static void expand_hash(PARROT_INTERP, ARGMOD(Hash *hash)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*hash); + +PARROT_CANNOT_RETURN_NULL +static PMC* get_integer_pmc(PARROT_INTERP, INTVAL value) + __attribute__nonnull__(1); + +PARROT_CANNOT_RETURN_NULL +static PMC* get_number_pmc(PARROT_INTERP, FLOATVAL value) + __attribute__nonnull__(1); + +PARROT_CANNOT_RETURN_NULL +static PMC * get_string_pmc(PARROT_INTERP, ARGIN(STRING *value)) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + PARROT_WARN_UNUSED_RESULT PARROT_PURE_FUNCTION -static int cstring_compare(SHIM_INTERP, +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)) __attribute__nonnull__(2) __attribute__nonnull__(3); -static void expand_hash(PARROT_INTERP, ARGMOD(Hash *hash)) +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) - FUNC_MODIFIES(*hash); + __attribute__nonnull__(3); -static UINTVAL get_hash_val(PARROT_INTERP, - ARGIN(const Hash *hash), - ARGIN_NULLOK(const void *key)) +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); -static void hash_freeze(PARROT_INTERP, - ARGIN(const Hash *hash), - ARGMOD(PMC *info)) +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) - FUNC_MODIFIES(*info); + __attribute__nonnull__(3); -static void hash_thaw(PARROT_INTERP, ARGMOD(Hash *hash), ARGMOD(PMC *info)) +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) - __attribute__nonnull__(3) - FUNC_MODIFIES(*hash) - FUNC_MODIFIES(*info); + __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); + +PARROT_CAN_RETURN_NULL +static HashBucket * parrot_hash_get_bucket_string(PARROT_INTERP, + ARGIN(const Hash *hash), + ARGIN(STRING *s), + UINTVAL hashval) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3); + +static void parrot_hash_store_value_in_bucket(PARROT_INTERP, + ARGMOD(Hash *hash), + ARGMOD_NULLOK(HashBucket *bucket), + INTVAL hashval, + ARGIN_NULLOK(void *key), + ARGIN_NULLOK(void *value)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*hash) + FUNC_MODIFIES(*bucket); + static void parrot_mark_hash_both(PARROT_INTERP, ARGIN(Hash *hash)) __attribute__nonnull__(1) __attribute__nonnull__(2); @@ -96,33 +202,60 @@ __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -static int pointer_compare(SHIM_INTERP, - ARGIN_NULLOK(const void *a), - ARGIN_NULLOK(const void *b)); - -#define ASSERT_ARGS_cstring_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(a) \ - , PARROT_ASSERT_ARG(b)) +#define ASSERT_ARGS_allocate_buckets __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(hash)) #define ASSERT_ARGS_expand_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) -#define ASSERT_ARGS_get_hash_val __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_get_integer_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp)) +#define ASSERT_ARGS_get_number_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp)) +#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_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#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(hash) \ - , PARROT_ASSERT_ARG(info)) -#define ASSERT_ARGS_hash_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , 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(hash) \ - , PARROT_ASSERT_ARG(info)) + , 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_hash_get_bucket_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(hash) \ + , PARROT_ASSERT_ARG(s)) +#define ASSERT_ARGS_parrot_hash_store_value_in_bucket \ + __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(hash)) #define ASSERT_ARGS_parrot_mark_hash_both __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) @@ -132,15 +265,12 @@ #define ASSERT_ARGS_parrot_mark_hash_values __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(hash)) -#define ASSERT_ARGS_pointer_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ - - /* -=item C +=item C Returns the hashed value of the key C. See also string.c. @@ -150,8 +280,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) @@ -164,38 +296,8 @@ /* -=item C - -An inlinable helper function to avoid the overhead of calling key_hash_STRING() -when there's already a calculated hash value for the STRING key. - -=cut - -*/ - -static UINTVAL -get_hash_val(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(const void *key)) -{ - ASSERT_ARGS(get_hash_val) - if (hash->hash_val == (hash_hash_key_fn)key_hash_STRING) { - /* Must be non-const because str_to_hashval caches the result - * in the STRING struct */ - DECL_CONST_CAST; - STRING * const s = (STRING *)PARROT_const_cast(void *, key); - if (s->hashval) - return s->hashval; - return Parrot_str_to_hashval(interp, s); - } - - return (hash->hash_val)(interp, key, hash->seed); -} - - -/* - -=item C +=item C Compares the two strings, returning 0 if they are identical. @@ -204,60 +306,52 @@ */ PARROT_WARN_UNUSED_RESULT -int -STRING_compare(PARROT_INTERP, ARGIN(const void *search_key), ARGIN_NULLOK(const void *bucket_key)) +PARROT_PURE_FUNCTION +PARROT_INLINE +static int +hash_compare_string(PARROT_INTERP, ARGIN(const void *search_key), + ARGIN_NULLOK(const void *bucket_key)) { - ASSERT_ARGS(STRING_compare) + ASSERT_ARGS(hash_compare_string) STRING const *s1 = (STRING const *)search_key; STRING const *s2 = (STRING const *)bucket_key; - if (!s2) - return 1; - - if (s1->hashval != s2->hashval) - return 1; - - /* COWed strings */ - if (Buffer_bufstart(s1) == Buffer_bufstart(s2) - && s1->bufused == s2->bufused) - return 0; - - return CHARSET_COMPARE(interp, s1, s2); + return Parrot_str_equal(interp, s1, s2) == 0; } /* -=item C Compare two strings. Returns 0 if they are identical. Considers differing -charset or encoding to be distinct. +encodings to be distinct. */ PARROT_WARN_UNUSED_RESULT -int -STRING_compare_distinct_cs_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(STRING_compare_distinct_cs_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 STRING_compare(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 +=item C Compares the two pointers, returning 0 if they are identical @@ -266,11 +360,12 @@ */ PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION +PARROT_PURE_FUNCTION +PARROT_INLINE static int -pointer_compare(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b)) +hash_compare_pointer(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b)) { - ASSERT_ARGS(pointer_compare) + ASSERT_ARGS(hash_compare_pointer) return a != b; } @@ -287,7 +382,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) { @@ -314,25 +410,25 @@ 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; } /* -=item C +=item C Compares two C strings for equality, returning -1, 0, and 1 if the first string is less than, equal to, or greater than the second, respectively. @@ -343,17 +439,18 @@ PARROT_WARN_UNUSED_RESULT PARROT_PURE_FUNCTION +PARROT_INLINE static int -cstring_compare(SHIM_INTERP, ARGIN(const char *a), ARGIN(const char *b)) +hash_compare_cstring(SHIM_INTERP, ARGIN(const char *a), ARGIN(const char *b)) { - ASSERT_ARGS(cstring_compare) + ASSERT_ARGS(hash_compare_cstring) return strcmp(a, b); } /* -=item C +=item C Returns a hashed value for an PMC key (passed as a void pointer, sadly). @@ -363,7 +460,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) @@ -372,7 +470,7 @@ /* -=item C +=item C Compares two PMC for equality, returning 0 if the first is equal to second. Uses void pointers to store the PMC, sadly. @@ -383,10 +481,11 @@ PARROT_WARN_UNUSED_RESULT PARROT_PURE_FUNCTION -int -PMC_compare(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b)) +PARROT_INLINE +static int +hash_compare_pmc(PARROT_INTERP, ARGIN(PMC *a), ARGIN(PMC *b)) { - ASSERT_ARGS(PMC_compare) + ASSERT_ARGS(hash_compare_pmc) /* If pointers are same - PMCs are same */ if (a == b) @@ -401,7 +500,8 @@ /* -=item C +=item C Returns a hashed value for an integer key (passed as a void pointer, sadly). @@ -410,8 +510,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) @@ -420,7 +521,8 @@ /* -=item C +=item C 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 @@ -431,16 +533,91 @@ */ PARROT_WARN_UNUSED_RESULT -PARROT_CONST_FUNCTION -int -int_compare(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b)) +PARROT_PURE_FUNCTION +PARROT_INLINE +static int +hash_compare_int(SHIM_INTERP, ARGIN_NULLOK(const void *a), ARGIN_NULLOK(const void *b)) { - ASSERT_ARGS(int_compare) + ASSERT_ARGS(hash_compare_int) return a != b; } /* +=item C + +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 + +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 Prints out the hash in human-readable form, at least once someone implements @@ -477,12 +654,17 @@ int mark_key = 0; int mark_value = 0; + if (!hash->buckets) + return; + if (hash->entry_type == (PARROT_DATA_TYPE) enum_hash_string || hash->entry_type == (PARROT_DATA_TYPE) enum_hash_pmc) 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) { @@ -512,21 +694,17 @@ parrot_mark_hash_keys(PARROT_INTERP, ARGIN(Hash *hash)) { ASSERT_ARGS(parrot_mark_hash_keys) - const UINTVAL entries = hash->entries; - UINTVAL found = 0; - UINTVAL i; - - HashBucket *bucket = hash->buckets; - - for (i= 0; i <= hash->mask; ++i, ++bucket) { - if (bucket->key){ - PARROT_ASSERT(bucket->key); - Parrot_gc_mark_PObj_alive(interp, (PObj *)bucket->key); - - if (++found >= entries) - break; - } + 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);); } } @@ -545,24 +723,20 @@ parrot_mark_hash_values(PARROT_INTERP, ARGIN(Hash *hash)) { ASSERT_ARGS(parrot_mark_hash_values) - const UINTVAL entries = hash->entries; - UINTVAL found = 0; - UINTVAL i; - - HashBucket *bucket = hash->buckets; - - for (i= 0; i <= hash->mask; ++i, ++bucket) { - if (bucket->key){ - - PARROT_ASSERT(bucket->value); - Parrot_gc_mark_PObj_alive(interp, (PObj *)bucket->value); - if (++found >= entries) - break; - } + 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);); } } + /* =item C @@ -577,29 +751,28 @@ parrot_mark_hash_both(PARROT_INTERP, ARGIN(Hash *hash)) { ASSERT_ARGS(parrot_mark_hash_both) - const UINTVAL entries = hash->entries; - UINTVAL found = 0; - UINTVAL i; - - HashBucket *bucket = hash->buckets; - - for (i= 0; i <= hash->mask; ++i, ++bucket) { - if (bucket->key){ - 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 (++found >= entries) - break; - } + 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);); } } /* -=item C +=item C Visits the contents of a hash during freeze/thaw. @@ -609,29 +782,32 @@ */ -static void -hash_thaw(PARROT_INTERP, ARGMOD(Hash *hash), ARGMOD(PMC *info)) +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +Hash * +Parrot_hash_thaw(PARROT_INTERP, ARGMOD(PMC *info)) { - ASSERT_ARGS(hash_thaw) - - /* during thaw, info->extra is the key/value count */ - const size_t num_entries = (size_t) hash->entries; - const Hash_key_type key_type = hash->key_type; - const PARROT_DATA_TYPE entry_type = hash->entry_type; - size_t entry_index; + ASSERT_ARGS(Parrot_hash_thaw) - hash->entries = 0; + const size_t num_entries = VTABLE_shift_integer(interp, info); + 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 = parrot_create_hash_sized(interp, entry_type, key_type, num_entries); /* special case for great speed */ if (key_type == Hash_key_type_STRING && entry_type == enum_hash_int) { for (entry_index = 0; entry_index < num_entries; ++entry_index) { - STRING * const key = VTABLE_shift_string(interp, info); - const INTVAL i = VTABLE_shift_integer(interp, info); - parrot_hash_put(interp, hash, (void *)key, (void *)i); + STRING * const key = VTABLE_shift_string(interp, info); + const INTVAL i = VTABLE_shift_integer(interp, info); + const INTVAL hashval = key_hash_STRING(interp, key, hash->seed); + /* serialized hashes assumed not to contain duplicates */ + parrot_hash_store_value_in_bucket(interp, hash, NULL, hashval, + (void *)key, (void *)i); } - return; + return hash; } for (entry_index = 0; entry_index < num_entries; ++entry_index) { @@ -645,12 +821,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; @@ -687,104 +865,118 @@ break; } } + + return hash; } /* -=item C +=item C Freezes hash into a string. Takes an interpreter, a pointer to the hash, and a pointer to the structure containing the string start location. -Use by parrot_hash_visit. - =cut */ -static void -hash_freeze(PARROT_INTERP, ARGIN(const Hash *hash), ARGMOD(PMC *info)) +void +Parrot_hash_freeze(PARROT_INTERP, ARGIN(const Hash *hash), ARGMOD(PMC *info)) { - ASSERT_ARGS(hash_freeze) + ASSERT_ARGS(Parrot_hash_freeze) const Hash_key_type key_type = hash->key_type; const PARROT_DATA_TYPE entry_type = hash->entry_type; const size_t entries = hash->entries; size_t i; - for (i = 0; i < entries; ++i) { - HashBucket * const b = hash->buckets + i; + VTABLE_push_integer(interp, info, entries); + VTABLE_push_integer(interp, info, key_type); + VTABLE_push_integer(interp, info, entry_type); + parrot_hash_iterate(hash, switch (key_type) { case Hash_key_type_int: - VTABLE_push_integer(interp, info, (INTVAL)b->key); + VTABLE_push_integer(interp, info, (INTVAL)_bucket->key); break; case Hash_key_type_STRING: - VTABLE_push_string(interp, info, (STRING *)b->key); + case Hash_key_type_STRING_enc: + VTABLE_push_string(interp, info, (STRING *)_bucket->key); break; case Hash_key_type_PMC: - VTABLE_push_pmc(interp, info, (PMC *)b->key); + case Hash_key_type_PMC_ptr: + VTABLE_push_pmc(interp, info, (PMC *)_bucket->key); break; default: Parrot_ex_throw_from_c_args(interp, NULL, 1, "unimplemented key type"); break; } - switch (entry_type) { case enum_hash_int: - VTABLE_push_integer(interp, info, (INTVAL)b->value); + VTABLE_push_integer(interp, info, (INTVAL)_bucket->value); break; case enum_hash_string: - VTABLE_push_string(interp, info, (STRING *)b->value); + VTABLE_push_string(interp, info, (STRING *)_bucket->value); break; case enum_hash_pmc: - VTABLE_push_pmc(interp, info, (PMC *)b->value); + VTABLE_push_pmc(interp, info, (PMC *)_bucket->value); break; default: Parrot_ex_throw_from_c_args(interp, NULL, 1, "unimplemented value type"); break; - } - } + }); } - /* -=item C +=item C -Freezes or thaws a hash as specified. Takes an interpreter, a pointer to the -hash, and a pointer to the structure identifying what to do and the location of -the string. +Allocate sized buckets and index storage for a hash =cut */ -PARROT_EXPORT -void -parrot_hash_visit(PARROT_INTERP, ARGMOD(Hash *hash), ARGMOD(void *pinfo)) +static void +allocate_buckets(PARROT_INTERP, ARGMOD(Hash *hash), ARGIN_NULLOK(const UINTVAL size)) { - ASSERT_ARGS(parrot_hash_visit) - PMC* const info = (PMC*) pinfo; + ASSERT_ARGS(allocate_buckets) - switch (VTABLE_get_integer(interp, info)) { - case VISIT_THAW_NORMAL: - hash_thaw(interp, hash, info); - break; - case VISIT_FREEZE_NORMAL: - hash_freeze(interp, hash, info); - break; - default: - Parrot_ex_throw_from_c_args(interp, NULL, 1, - "unimplemented visit mode"); + UINTVAL new_size = INITIAL_SIZE; + HashBucket *new_buckets, *bucket; + size_t i; + + while (size > new_size) + new_size <<= 1; + + if (new_size > SPLIT_POINT) + new_buckets = (HashBucket *) Parrot_gc_allocate_memory_chunk( + interp, HASH_ALLOC_SIZE(new_size)); + else + new_buckets = (HashBucket *) Parrot_gc_allocate_fixed_size_storage( + interp, HASH_ALLOC_SIZE(new_size)); + + memset(new_buckets, 0, HASH_ALLOC_SIZE(new_size)); + + hash->mask = new_size - 1; + hash->buckets = new_buckets; + hash->index = (HashBucket **)(new_buckets + N_BUCKETS(new_size)); + + /* add new buckets to free_list + * lowest bucket is top on free list and will be used first */ + + bucket = hash->buckets + N_BUCKETS(new_size) - 1; + for (i = 0; i < N_BUCKETS(new_size); ++i, --bucket) { + bucket->next = hash->free_list; + hash->free_list = bucket; } } - /* =item C @@ -820,14 +1012,14 @@ 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; + 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_size = old_size << 1; /* Double. Right-shift is 2x */ + const UINTVAL new_mask = new_size - 1; size_t offset, i; /* @@ -838,92 +1030,99 @@ | --> buckets | | +---+---+---+-+-+-+-+ ^ ^ - | old_mem | hash->bucket_indices + | old_mem | hash->index */ /* resize mem */ - if (old_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)); - } - else { - /* Allocate a new buffer. */ - new_mem = (HashBucket *)Parrot_gc_allocate_memory_chunk_with_interior_pointers( - interp, HASH_ALLOC_SIZE(new_size)); - memcpy(new_mem, old_mem, HASH_ALLOC_SIZE(old_size)); - } + if (new_size > SPLIT_POINT) + new_mem = Parrot_gc_allocate_memory_chunk( + interp, HASH_ALLOC_SIZE(new_size)); + else + new_mem = Parrot_gc_allocate_fixed_size_storage( + interp, HASH_ALLOC_SIZE(new_size)); + + offset = (char *)new_mem - (char *)old_mem; + + new_buckets = (HashBucket *) new_mem; + new_index = (HashBucket **)(new_buckets + N_BUCKETS(new_size)); + + /* copy buckets and index */ + mem_sys_memcopy(new_buckets, hash->buckets, + N_BUCKETS(old_size) * sizeof (HashBucket)); + mem_sys_memcopy(new_index, hash->index, old_size * sizeof (HashBucket **)); + + /* free */ + if (old_size > SPLIT_POINT) + Parrot_gc_free_memory_chunk(interp, old_mem); + else + Parrot_gc_free_fixed_size_storage(interp, HASH_ALLOC_SIZE(old_size), old_mem); + + + /* clear second half of the buckets, freed by old the index */ + memset(new_buckets + N_BUCKETS(old_size), 0, + sizeof (HashBucket *) * old_size); + + /* clear second half of the index */ + memset(new_index + (old_size), 0, sizeof (HashBucket **) * old_size); + + /* +---+---+---+---+---+---+-+-+-+-+-+-+-+-+ - | buckets | old_bi | new_bi | + | buckets | old_index | new_index | +---+---+---+---+---+---+-+-+-+-+-+-+-+-+ ^ ^ - | new_mem | hash->bucket_indices + | new_mem | hash->index */ - bs = new_mem; - old_bi = (HashBucket **)(bs + old_nb); - new_bi = (HashBucket **)(bs + N_BUCKETS(new_size)); - - /* 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->bucket_indices = new_bi; - hash->buckets = bs; - hash->mask = new_size - 1; + hash->index = new_index; + hash->buckets = new_buckets; + hash->mask = new_mask; - /* clear freshly allocated bucket index */ - memset(new_bi + old_size, 0, sizeof (HashBucket *) * old_size); + /* reloc pointers and recalc bucket indices */ + for (i = 0; i < old_size; ++i) { + index = new_index + i; - /* - * reloc pointers - this part would be also needed, if we - * allocate hash memory from GC movable memory, and then - * also the free_list needs updating (this is empty now, - * as expand_hash is only called for that case). - */ - if (offset) { - size_t j; - for (j = 0; j < old_size; ++j) { - HashBucket **next_p = new_bi + j; - while (*next_p) { - *next_p = (HashBucket *)((char *)*next_p + offset); - b = *next_p; - next_p = &b->next; - } - } - } + while (*index != NULL) { + size_t new_loc; + size_t hashval; - /* recalc bucket index */ - for (i = 0; i < old_size; ++i) { - HashBucket **next_p = new_bi + i; + bucket = (HashBucket *)((char *)*index + offset); - while ((b = *next_p) != NULL) { /* rehash the bucket */ - const size_t new_loc = - get_hash_val(interp, hash, b->key) & (new_size - 1); + 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 = key_hash(interp, hash, bucket->key); + } + + 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 { + *index = bucket; + index = &bucket->next; } - else - next_p = &b->next; } } - /* add new buckets to free_list in reverse order + /* add new buckets to free_list * lowest bucket is top on free list and will be used first */ - for (i = 0, b = (HashBucket *)new_bi - 1; i < old_nb; ++i, --b) { - b->next = hash->free_list; - b->key = b->value = NULL; - hash->free_list = b; + bucket = new_buckets + N_BUCKETS(old_size); + for (i = N_BUCKETS(old_size)-1 ; i > 0; --i, ++bucket) { + bucket->next = bucket + 1; } + + bucket->next = NULL; + hash->free_list = new_buckets + N_BUCKETS(old_size); } @@ -945,9 +1144,7 @@ ASSERT_ARGS(parrot_new_hash) return parrot_create_hash(interp, enum_type_PMC, - Hash_key_type_STRING, - STRING_compare, - (hash_hash_key_fn)key_hash_STRING); + Hash_key_type_STRING); } @@ -969,9 +1166,7 @@ ASSERT_ARGS(parrot_new_cstring_hash) return parrot_create_hash(interp, enum_type_PMC, - Hash_key_type_cstring, - (hash_comp_fn)cstring_compare, - (hash_hash_key_fn)key_hash_cstring); + Hash_key_type_cstring); } @@ -993,9 +1188,7 @@ ASSERT_ARGS(parrot_new_pointer_hash) return parrot_create_hash(interp, enum_type_ptr, - Hash_key_type_ptr, - pointer_compare, - key_hash_pointer); + Hash_key_type_ptr); } @@ -1020,15 +1213,13 @@ ASSERT_ARGS(parrot_new_intval_hash) return parrot_create_hash(interp, enum_type_INTVAL, - Hash_key_type_int, - int_compare, - key_hash_int); + Hash_key_type_int); } /* =item C +Hash_key_type hkey_type)> Creates and initializes a hash. Function pointers determine its behaviors. @@ -1040,44 +1231,48 @@ PARROT_CANNOT_RETURN_NULL 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) - HashBucket *bp; - void *alloc = Parrot_gc_allocate_memory_chunk_with_interior_pointers( - interp, sizeof (Hash) + HASH_ALLOC_SIZE(INITIAL_BUCKETS)); - Hash * const hash = (Hash*)alloc; - size_t i; + Hash * const hash = (Hash*) Parrot_gc_allocate_fixed_size_storage(interp, sizeof (Hash)); - 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; - hash->mask = INITIAL_BUCKETS - 1; + hash->mask = 0; hash->entries = 0; + hash->index = NULL; + hash->buckets = NULL; + hash->free_list = NULL; - bp = (HashBucket *)((char *)alloc + sizeof (Hash)); - hash->free_list = NULL; + return hash; +} - /* fill free_list from hi addresses so that we can use - * buckets[i] directly in an OrderedHash, *if* nothing - * was deleted */ - - hash->buckets = bp; - bp += N_BUCKETS(INITIAL_BUCKETS); - hash->bucket_indices = (HashBucket **)bp; - - for (i = 0, --bp; i < N_BUCKETS(INITIAL_BUCKETS); ++i, --bp) { - bp->next = hash->free_list; - hash->free_list = bp; - } +/* + +=item C + +Creates and initializes a hash, similar to C. + +Preallocates at least C buckets. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +Hash * +parrot_create_hash_sized(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type, + UINTVAL size) +{ + ASSERT_ARGS(parrot_create_hash_sized) + + Hash *hash = parrot_create_hash(interp, val_type, hkey_type); + allocate_buckets(interp, hash, size); return hash; } @@ -1099,10 +1294,14 @@ parrot_hash_destroy(PARROT_INTERP, ARGFREE_NOTNULL(Hash *hash)) { ASSERT_ARGS(parrot_hash_destroy) - HashBucket * const bp = (HashBucket*)((char*)hash + sizeof (Hash)); - if (bp != hash->buckets) - mem_gc_free(interp, hash->buckets); - mem_gc_free(interp, hash); + if (hash->buckets){ + if (hash->mask > SPLIT_POINT) + Parrot_gc_free_memory_chunk(interp, hash->buckets); + else + Parrot_gc_free_fixed_size_storage(interp, + HASH_ALLOC_SIZE(hash->mask+1), hash->buckets); + } + Parrot_gc_free_fixed_size_storage(interp, sizeof (Hash), hash); } @@ -1121,17 +1320,9 @@ parrot_chash_destroy(PARROT_INTERP, ARGMOD(Hash *hash)) { ASSERT_ARGS(parrot_chash_destroy) - UINTVAL i; - - for (i = 0; i <= hash->mask; ++i) { - HashBucket *bucket = hash->bucket_indices[i]; - while (bucket) { - mem_gc_free(interp, bucket->key); - mem_gc_free(interp, bucket->value); - bucket = bucket->next; - } - } - + parrot_hash_iterate(hash, + mem_gc_free(interp, _bucket->key); + mem_gc_free(interp, _bucket->value);); parrot_hash_destroy(interp, hash); } @@ -1157,14 +1348,9 @@ ASSERT_ARGS(parrot_chash_destroy_values) UINTVAL i; - for (i = 0; i <= hash->mask; ++i) { - HashBucket *bucket = hash->bucket_indices[i]; - while (bucket) { - mem_gc_free(interp, bucket->key); - func(bucket->value); - bucket = bucket->next; - } - } + parrot_hash_iterate(hash, + mem_gc_free(interp, _bucket->key); + func(_bucket->value);); parrot_hash_destroy(interp, hash); } @@ -1194,72 +1380,6 @@ /* -=item C - -Finds the next index into the hash's internal storage for the given Key. Used -by iterators. Ugly. - -=cut - -*/ - -PARROT_EXPORT -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -void * -parrot_hash_get_idx(PARROT_INTERP, ARGIN(const Hash *hash), ARGMOD(PMC *key)) -{ - ASSERT_ARGS(parrot_hash_get_idx) - HashBucket *b; - void *res; - INTVAL i = VTABLE_get_integer(interp, key); - PMC *fake_bi; - BucketIndex bi; - - /* idx directly in the bucket store, which is at negative - * address from the data pointer */ - /* locate initial */ - const INTVAL size = (INTVAL)N_BUCKETS(hash->mask + 1); - - GETATTR_Key_next_key(interp, key, fake_bi); - bi = (BucketIndex)fake_bi; - - if (bi == INITBucketIndex) { - i = 0; - SETATTR_Key_next_key(interp, key, NULL); - } - else if (i >= size || i < 0) { - /* NOTE: These instances of SETATTR_Key_int_key can't be VTABLE - * functions because of the "special" way hash iterators work. */ - SETATTR_Key_int_key(interp, key, -1); - return NULL; - } - - res = NULL; - - for (b = hash->buckets + i; i < size ; ++i, ++b) { - /* XXX int keys may be zero - use different iterator */ - if (b->key) { - if (!res) - res = b->key; - - /* found next key - FIXME hash iter does auto next */ - else - break; - } - } - - if (i >= size) - i = -1; - - SETATTR_Key_int_key(interp, key, i); - - return res; -} - - -/* - =item C @@ -1276,31 +1396,34 @@ parrot_hash_get_bucket(PARROT_INTERP, ARGIN(const Hash *hash), ARGIN_NULLOK(const void *key)) { ASSERT_ARGS(parrot_hash_get_bucket) + DECL_CONST_CAST; if (hash->entries <= 0) return NULL; - /* if the fast search didn't work, try the normal hashing search */ - { - const UINTVAL hashval = get_hash_val(interp, hash, key); - HashBucket *bucket = hash->bucket_indices[hashval & hash->mask]; - const hash_comp_fn compare = hash->compare; + 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); - while (bucket) { - /* key equality is always a match, so it's worth checking */ - if (bucket->key == key + return parrot_hash_get_bucket_string(interp, hash, s, hashval); + } + else { + const size_t hashval = key_hash(interp, hash, + PARROT_const_cast(void *, key)); + HashBucket *bucket = hash->index[hashval & hash->mask]; - /* ... but the slower comparison is more accurate */ - || ((compare)(interp, key, bucket->key) == 0)) - return bucket; + while (bucket) { + if (hash_compare(interp, hash, + PARROT_const_cast(void *, key), + bucket->key) == 0) + break; bucket = bucket->next; } - } - return NULL; + return bucket; + } } - /* =item C +=item C -Puts the key and value into the hash. Note that C is B copied. +Given a hash, a STRING key, and the hashval of the key, returns the appropriate +bucket of the hash for the key. This assumes buckets are already available, so +ensure the hash has storage before calling this function. =cut */ -PARROT_EXPORT -PARROT_IGNORABLE_RESULT -PARROT_CANNOT_RETURN_NULL -HashBucket* -parrot_hash_put(PARROT_INTERP, ARGMOD(Hash *hash), - ARGIN_NULLOK(void *key), ARGIN_NULLOK(void *value)) +PARROT_CAN_RETURN_NULL +static HashBucket * +parrot_hash_get_bucket_string(PARROT_INTERP, ARGIN(const Hash *hash), + ARGIN(STRING *s), UINTVAL hashval) { - ASSERT_ARGS(parrot_hash_put) - const UINTVAL hashval = get_hash_val(interp, hash, key); - HashBucket *bucket = hash->bucket_indices[hashval & hash->mask]; - const hash_comp_fn compare = hash->compare; + ASSERT_ARGS(parrot_hash_get_bucket_string) + HashBucket *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) + const STRING *s2 = (const STRING *)bucket->key; + 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 (Parrot_str_equal(interp, s, s2)) + break; + } bucket = bucket->next; } + return bucket; +} + + +/* + +=item C + +Given a hash, a bucket, the hashval of the key, the key, and its value, stores +the value in the bucket. The bucket can be NULL, in which case this function +will allocate more storage as appropriate. + +Note that C is B copied. + +=cut + +*/ + +static void +parrot_hash_store_value_in_bucket(PARROT_INTERP, ARGMOD(Hash *hash), + ARGMOD_NULLOK(HashBucket *bucket), INTVAL hashval, + ARGIN_NULLOK(void *key), ARGIN_NULLOK(void *value)) +{ + ASSERT_ARGS(parrot_hash_store_value_in_bucket) + /* If we have a bucket already, put the value in it. Otherwise, we need to get a new bucket */ if (bucket) @@ -1383,20 +1539,68 @@ 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->bucket_indices[hashval & hash->mask]; - hash->bucket_indices[hashval & hash->mask] = bucket; + hash->free_list = bucket->next; + bucket->key = key; + bucket->value = value; + bucket->next = hash->index[hashval & hash->mask]; + hash->index[hashval & hash->mask] = bucket; + } +} + + +/* + +=item C + +Puts the key and value into the hash. Note that C is B copied. + +=cut + +*/ + +PARROT_EXPORT +PARROT_IGNORABLE_RESULT +PARROT_CANNOT_RETURN_NULL +HashBucket* +parrot_hash_put(PARROT_INTERP, ARGMOD(Hash *hash), + ARGIN_NULLOK(void *key), ARGIN_NULLOK(void *value)) +{ + ASSERT_ARGS(parrot_hash_put) + HashBucket *bucket = NULL; + size_t hashval; + + if (!hash->buckets){ + allocate_buckets(interp, hash, INITIAL_SIZE); + hashval = key_hash(interp, hash, key); } + else { + if (hash->key_type == Hash_key_type_STRING) { + STRING *s = (STRING *)key; + hashval = key_hash_STRING(interp, s, hash->seed); + bucket = parrot_hash_get_bucket_string(interp, hash, s, hashval); + } + else { + hashval = key_hash(interp, hash, key); + bucket = hash->index[hashval & hash->mask]; + + while (bucket) { + if (hash_compare(interp, hash, key, bucket->key) == 0) + break; + bucket = bucket->next; + } + } + } + + parrot_hash_store_value_in_bucket(interp, hash, bucket, hashval, + key, value); return bucket; } @@ -1417,19 +1621,20 @@ 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; - HashBucket **prev = &hash->bucket_indices[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) { - *prev = current->next; - --hash->entries; - current->next = hash->free_list; - current->key = NULL; - hash->free_list = current; - return; + const UINTVAL hashval = key_hash(interp, hash, key) & hash->mask; + if (hash->buckets){ + HashBucket **prev = &hash->index[hashval]; + if (*prev) { + for (; *prev; prev = &(*prev)->next) { + HashBucket *current = *prev; + if (hash_compare(interp, hash, key, current->key) == 0) { + *prev = current->next; + --hash->entries; + current->next = hash->free_list; + current->key = NULL; + hash->free_list = current; + return; + } } } } @@ -1472,33 +1677,39 @@ ARGOUT(Hash *dest), int deep) { ASSERT_ARGS(parrot_hash_clone_prunable) - UINTVAL entries = hash->entries; - UINTVAL i; - for (i = 0; i < entries; ++i) { + /* dest hash has the same size as source hash */ + if (dest->buckets){ + if (dest->mask+1 > SPLIT_POINT) + Parrot_gc_free_memory_chunk(interp, dest->buckets); + else + Parrot_gc_free_fixed_size_storage(interp, HASH_ALLOC_SIZE(dest->mask+1), dest->buckets); + } + allocate_buckets(interp, dest, hash->mask); + + parrot_hash_iterate(hash, void *valtmp; - HashBucket *b = hash->buckets + i; - void * const key = b->key; + void * const key = _bucket->key; switch (hash->entry_type) { - case enum_type_undef: - case enum_type_ptr: - case enum_type_INTVAL: - valtmp = (void *)b->value; - break; - case enum_type_STRING: - valtmp = b->value; + valtmp = _bucket->value; break; case enum_type_PMC: - if (PMC_IS_NULL((PMC *)b->value)) + if (PMC_IS_NULL((PMC *)_bucket->value)) valtmp = (void *)PMCNULL; else if (deep) - valtmp = (void *)VTABLE_clone(interp, (PMC*)b->value); + valtmp = (void *)VTABLE_clone(interp, (PMC*)_bucket->value); else - valtmp = b->value; + valtmp = _bucket->value; + break; + + case enum_type_undef: + case enum_type_ptr: + case enum_type_INTVAL: + valtmp = (void *)_bucket->value; break; default: @@ -1506,15 +1717,16 @@ Parrot_ex_throw_from_c_args(interp, NULL, -1, "hash corruption: type = %d\n", hash->entry_type); }; - - if (key) - parrot_hash_put(interp, dest, key, valtmp); - } + if (key) { + const size_t hashval = key_hash(interp, dest, key); + /* hash tables has no duplicate keys */ + parrot_hash_store_value_in_bucket(interp, dest, NULL, hashval, key, valtmp); + }); } /* -=item C +=item C Lookup the PMC type which is used for storing native integers. @@ -1523,7 +1735,7 @@ */ PARROT_CANNOT_RETURN_NULL -PMC* +static PMC* get_integer_pmc(PARROT_INTERP, INTVAL value) { ASSERT_ARGS(get_integer_pmc) @@ -1535,7 +1747,7 @@ /* -=item C +=item C Lookup the PMC type which is used for floating point numbers. @@ -1544,7 +1756,7 @@ */ PARROT_CANNOT_RETURN_NULL -PMC* +static PMC* get_number_pmc(PARROT_INTERP, FLOATVAL value) { ASSERT_ARGS(get_number_pmc) @@ -1555,7 +1767,7 @@ /* -=item C +=item C Lookup the PMC type which is used for storing strings. @@ -1564,7 +1776,7 @@ */ PARROT_CANNOT_RETURN_NULL -PMC * +static PMC * get_string_pmc(PARROT_INTERP, ARGIN(STRING *value)) { ASSERT_ARGS(get_string_pmc) @@ -1610,9 +1822,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: @@ -1649,10 +1863,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; @@ -1687,6 +1903,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) @@ -1715,6 +1932,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)) @@ -1750,9 +1968,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: @@ -1784,10 +2004,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; @@ -1819,9 +2041,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: diff -Nru parrot-2.7.0/src/hll.c parrot-2.8.0/src/hll.c --- parrot-2.7.0/src/hll.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/hll.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2005-2009, Parrot Foundation. -$Id: hll.c 48486 2010-08-14 00:49:03Z chromatic $ +$Id: hll.c 48811 2010-09-06 14:35:49Z NotFound $ =head1 NAME @@ -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); + } + } } /* diff -Nru parrot-2.7.0/src/interp/inter_cb.c parrot-2.8.0/src/interp/inter_cb.c --- parrot-2.7.0/src/interp/inter_cb.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/interp/inter_cb.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: inter_cb.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: inter_cb.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/src/interp/inter_create.c parrot-2.8.0/src/interp/inter_create.c --- parrot-2.7.0/src/interp/inter_create.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/interp/inter_create.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: inter_create.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: inter_create.c 49092 2010-09-17 22:17:24Z nwellnhof $ =head1 NAME @@ -165,6 +165,7 @@ interp->gc_sys->sys_type = parent ? parent->gc_sys->sys_type : PARROT_GC_DEFAULT_TYPE; + interp->gc_threshold = GC_DYNAMIC_THRESHOLD_DEFAULT; /* Done. Return and be done with it */ return interp; @@ -252,14 +253,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; /* create the root set registry */ interp->gc_registry = Parrot_pmc_new(interp, enum_class_AddrRegistry); @@ -446,10 +443,11 @@ 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 */ + /* strings, encodings - only once */ Parrot_str_finish(interp); PARROT_CORE_OPLIB_INIT(interp, 0); diff -Nru parrot-2.7.0/src/interp/inter_misc.c parrot-2.8.0/src/interp/inter_misc.c --- parrot-2.7.0/src/interp/inter_misc.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/interp/inter_misc.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: inter_misc.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: inter_misc.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -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 */ @@ -64,8 +64,8 @@ /* -=item C +=item C Create an entry in the C for the given raw NCI method of PMC class C. @@ -76,14 +76,14 @@ PARROT_EXPORT void -register_raw_nci_method_in_ns(PARROT_INTERP, const int type, ARGIN(void *func), - ARGIN(STRING *name)) +register_native_pcc_method_in_ns(PARROT_INTERP, const int type, ARGIN(void *func), + ARGIN(STRING *name), ARGIN(STRING *signature)) { - ASSERT_ARGS(register_raw_nci_method_in_ns) - PMC * const method = Parrot_pmc_new(interp, enum_class_NCI); + ASSERT_ARGS(register_native_pcc_method_in_ns) + PMC * method = Parrot_pmc_new(interp, enum_class_NativePCCMethod); /* setup call func */ - VTABLE_set_pointer(interp, method, func); + VTABLE_set_pointer_keyed_str(interp, method, signature, func); /* insert it into namespace */ VTABLE_set_pmc_keyed_str(interp, interp->vtables[type]->_namespace, diff -Nru parrot-2.7.0/src/io/api.c parrot-2.8.0/src/io/api.c --- parrot-2.7.0/src/io/api.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/io/api.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: api.c 48253 2010-08-02 13:07:50Z NotFound $ +$Id: api.c 48842 2010-09-08 00:26:33Z nwellnhof $ =head1 NAME @@ -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"))) diff -Nru parrot-2.7.0/src/io/buffer.c parrot-2.8.0/src/io/buffer.c --- parrot-2.7.0/src/io/buffer.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/io/buffer.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: buffer.c 46192 2010-04-30 08:27:15Z jimmy $ +$Id: buffer.c 48842 2010-09-08 00:26:33Z nwellnhof $ =head1 NAME @@ -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; diff -Nru parrot-2.7.0/src/io/filehandle.c parrot-2.8.0/src/io/filehandle.c --- parrot-2.7.0/src/io/filehandle.c 2010-04-23 10:42:13.000000000 +0000 +++ parrot-2.8.0/src/io/filehandle.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: filehandle.c 45852 2010-04-21 10:06:00Z bacek $ +$Id: filehandle.c 48842 2010-09-08 00:26:33Z nwellnhof $ =head1 NAME @@ -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 { diff -Nru parrot-2.7.0/src/io/socket_unix.c parrot-2.8.0/src/io/socket_unix.c --- parrot-2.7.0/src/io/socket_unix.c 2010-06-14 02:14:16.000000000 +0000 +++ parrot-2.8.0/src/io/socket_unix.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: socket_unix.c 47583 2010-06-13 01:02:26Z coke $ +$Id: socket_unix.c 48981 2010-09-13 19:17:36Z nwellnhof $ =head1 NAME @@ -349,10 +349,11 @@ AGAIN: if ((error = recv(io->os_handle, buf, 2048, 0)) >= 0) { bytesread += error; - /* The charset should probably be 'binary', but right now httpd.pir + /* The encoding 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; } } diff -Nru parrot-2.7.0/src/io/socket_win32.c parrot-2.8.0/src/io/socket_win32.c --- parrot-2.7.0/src/io/socket_win32.c 2010-06-14 02:14:16.000000000 +0000 +++ parrot-2.8.0/src/io/socket_win32.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: socket_win32.c 47583 2010-06-13 01:02:26Z coke $ +$Id: socket_win32.c 48981 2010-09-13 19:17:36Z nwellnhof $ =head1 NAME @@ -299,10 +299,11 @@ AGAIN: if ((error = recv((int)io->os_handle, buf, 2048, 0)) >= 0) { bytesread += error; - /* The charset should probably be 'binary', but right now httpd.pir + /* The encoding 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; } } diff -Nru parrot-2.7.0/src/io/utf8.c parrot-2.8.0/src/io/utf8.c --- parrot-2.7.0/src/io/utf8.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/io/utf8.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: utf8.c 46193 2010-04-30 08:53:15Z jimmy $ +$Id: utf8.c 48833 2010-09-07 22:58:38Z nwellnhof $ =head1 NAME @@ -53,11 +53,10 @@ 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 */ - Parrot_utf8_encoding_ptr->iter_init(interp, s, &iter); + STRING_ITER_INIT(interp, &iter); while (iter.bytepos < s->bufused) { if (iter.bytepos + 4 > s->bufused) { @@ -74,18 +73,15 @@ /* 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; - /* TT #1257: need to check the amount read here? */ read = Parrot_io_read_buffer(interp, filehandle, &s2); UNUSED(read); s->strlen = iter.charpos; s = Parrot_str_concat(interp, s, s2); - /* String is updated. Poke into iterator to replace old string */ - iter.str = s; *buf = s; len += len2 + 1; @@ -93,7 +89,7 @@ } } ok: - iter.get_and_advance(interp, &iter); + Parrot_utf8_encoding_ptr->iter_get_and_advance(interp, *buf, &iter); } s->strlen = iter.charpos; return len; diff -Nru parrot-2.7.0/src/library.c parrot-2.8.0/src/library.c --- parrot-2.7.0/src/library.c 2010-06-11 08:06:05.000000000 +0000 +++ parrot-2.8.0/src/library.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2009, Parrot Foundation. -$Id: library.c 47541 2010-06-10 18:38:14Z NotFound $ +$Id: library.c 48947 2010-09-12 00:32:05Z NotFound $ =head1 NAME @@ -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 - -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 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) diff -Nru parrot-2.7.0/src/longopt.c parrot-2.8.0/src/longopt.c --- parrot-2.7.0/src/longopt.c 2010-05-24 21:14:28.000000000 +0000 +++ parrot-2.8.0/src/longopt.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: longopt.c 46943 2010-05-24 05:23:46Z petdance $ +$Id: longopt.c 49092 2010-09-17 22:17:24Z nwellnhof $ =head1 NAME @@ -92,6 +92,7 @@ { 'O', 'O', OPTION_optional_FLAG, { "--optimize" } }, { 'R', 'R', OPTION_required_FLAG, { "--runcore" } }, { 'g', 'g', OPTION_required_FLAG, { "--gc" } }, + { '\0', OPT_GC_THRESHOLD, OPTION_required_FLAG, { "--gc-threshold" } }, { 'V', 'V', (OPTION_flags)0, { "--version" } }, { 'X', 'X', OPTION_required_FLAG, { "--dynext" } }, { '\0', OPT_DESTROY_FLAG, (OPTION_flags)0, diff -Nru parrot-2.7.0/src/main.c parrot-2.8.0/src/main.c --- parrot-2.7.0/src/main.c 2010-05-24 21:14:28.000000000 +0000 +++ parrot-2.8.0/src/main.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2007-2010, Parrot Foundation. -$Id: main.c 46934 2010-05-24 02:07:29Z plobsing $ +$Id: main.c 49093 2010-09-17 23:39:13Z mikehh $ =head1 NAME @@ -39,6 +39,11 @@ static void help_debug(void); PARROT_WARN_UNUSED_RESULT PARROT_PURE_FUNCTION +static int is_all_digits(ARGIN(const char *s)) + __attribute__nonnull__(1); + +PARROT_WARN_UNUSED_RESULT +PARROT_PURE_FUNCTION static int is_all_hex_digits(ARGIN(const char *s)) __attribute__nonnull__(1); @@ -74,6 +79,8 @@ #define ASSERT_ARGS_help __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) #define ASSERT_ARGS_help_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) +#define ASSERT_ARGS_is_all_digits __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(s)) #define ASSERT_ARGS_is_all_hex_digits __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(s)) #define ASSERT_ARGS_Parrot_version __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) @@ -159,6 +166,29 @@ /* +=item C + +Tests all characters in a string are decimal digits. +Returns 1 if true, 0 as soon as a non-decimal found + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_PURE_FUNCTION +static int +is_all_digits(ARGIN(const char *s)) +{ + ASSERT_ARGS(is_all_digits) + for (; *s; ++s) + if (!isdigit((unsigned char)*s)) + return 0; + return 1; +} + +/* + =item C Tests all characters in a string are hexadecimal digits. @@ -278,6 +308,7 @@ printf( " -w --warnings\n" " -G --no-gc\n" + " --gc-threshold=percentage maximum memory wasted by GC\n" " --gc-debug\n" " --leak-test|--destroy-at-end\n" " -g --gc ms|inf set GC type\n" @@ -367,6 +398,29 @@ } break; } + else if (!strncmp(arg, "--gc-threshold", 14)) { + + if ((arg = strrchr(arg, '='))) + ++arg; + else + arg = argv[++pos]; + + if (is_all_digits(arg)) { + interp->gc_threshold = strtoul(arg, NULL, 10); + + if (interp->gc_threshold > 1000) { + fprintf(stderr, "error: maximum GC threshold is 1000\n"); + exit(EXIT_FAILURE); + } + } + else { + fprintf(stderr, "error: invalid GC threshold specified:" + "'%s'\n", arg); + exit(EXIT_FAILURE); + } + ++pos; + arg = argv[pos]; + } else if (!strncmp(arg, "--hash-seed", 11)) { if ((arg = strrchr(arg, '='))) @@ -444,6 +498,9 @@ case 'g': /* Handled in parseflags_minimal */ break; + case OPT_GC_THRESHOLD: + /* handled in parseflags_minimal */ + break; case 't': if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) { const unsigned long _temp = strtoul(opt.opt_arg, NULL, 16); diff -Nru parrot-2.7.0/src/misc.c parrot-2.8.0/src/misc.c --- parrot-2.7.0/src/misc.c 2010-05-05 09:58:32.000000000 +0000 +++ parrot-2.8.0/src/misc.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: misc.c 46281 2010-05-04 14:09:45Z mikehh $ +$Id: misc.c 48837 2010-09-07 23:48:07Z nwellnhof $ =head1 NAME @@ -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); diff -Nru parrot-2.7.0/src/multidispatch.c parrot-2.8.0/src/multidispatch.c --- parrot-2.7.0/src/multidispatch.c 2010-06-19 12:34:05.000000000 +0000 +++ parrot-2.8.0/src/multidispatch.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2003-2010, Parrot Foundation. -$Id: multidispatch.c 47678 2010-06-18 00:29:10Z whiteknight $ +$Id: multidispatch.c 48790 2010-09-04 20:06:03Z plobsing $ =head1 NAME @@ -43,6 +43,7 @@ #include "parrot/oplib/ops.h" #include "multidispatch.str" #include "pmc/pmc_nci.h" +#include "pmc/pmc_nativepccmethod.h" #include "pmc/pmc_sub.h" #include "pmc/pmc_callcontext.h" @@ -590,8 +591,17 @@ Parrot_Sub_attributes *sub; INTVAL args, dist, i, j, n, m; - /* has to be a builtin multi method */ - if (pmc->vtable->base_type == enum_class_NCI) { + if (pmc->vtable->base_type == enum_class_NativePCCMethod) { + GETATTR_NativePCCMethod_mmd_multi_sig(interp, pmc, multi_sig); + if (PMC_IS_NULL(multi_sig)) { + STRING *long_sig; + + GETATTR_NativePCCMethod_mmd_long_signature(interp, pmc, long_sig); + multi_sig = mmd_build_type_tuple_from_long_sig(interp, long_sig); + SETATTR_NativePCCMethod_mmd_multi_sig(interp, pmc, multi_sig); + } + } + else if (pmc->vtable->base_type == enum_class_NCI) { GETATTR_NCI_multi_sig(interp, pmc, multi_sig); if (PMC_IS_NULL(multi_sig)) { STRING *long_sig; @@ -602,10 +612,10 @@ } } else { - /* not a multi; no distance */ PMC_get_sub(interp, pmc, sub); + if (!sub->multi_signature) - return 0; + return 0; /* not a multi; no distance */ multi_sig = Parrot_mmd_get_cached_multi_sig(interp, pmc); } @@ -963,18 +973,19 @@ ASSERT_ARGS(Parrot_mmd_add_multi_from_long_sig) Parrot_Sub_attributes *sub; STRING *sub_str = CONST_STRING(interp, "Sub"); - STRING *closure_str = CONST_STRING(interp, "Closure"); PMC *type_list = Parrot_str_split(interp, CONST_STRING(interp, ","), long_sig); STRING *ns_name = VTABLE_get_string_keyed_int(interp, type_list, 0); /* Attach a type tuple array to the sub for multi dispatch */ PMC *multi_sig = mmd_build_type_tuple_from_type_list(interp, type_list); - if (sub_obj->vtable->base_type == enum_class_NCI) { + if (sub_obj->vtable->base_type == enum_class_NativePCCMethod) { + SETATTR_NativePCCMethod_mmd_multi_sig(interp, sub_obj, multi_sig); + } + else if (sub_obj->vtable->base_type == enum_class_NCI) { SETATTR_NCI_multi_sig(interp, sub_obj, multi_sig); } - else if (VTABLE_isa(interp, sub_obj, sub_str) - || VTABLE_isa(interp, sub_obj, closure_str)) { + else if (VTABLE_isa(interp, sub_obj, sub_str)) { PMC_get_sub(interp, sub_obj, sub); sub->multi_signature = multi_sig; } diff -Nru parrot-2.7.0/src/namespace.c parrot-2.8.0/src/namespace.c --- parrot-2.7.0/src/namespace.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/namespace.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* -Copyright (C) 2004-2009, Parrot Foundation. -$Id: namespace.c 48435 2010-08-12 19:37:47Z chromatic $ +Copyright (C) 2004-2010, Parrot Foundation. +$Id: namespace.c 48919 2010-09-10 21:39:44Z chromatic $ =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"); @@ -727,9 +730,6 @@ PMC *ns; Parrot_Sub_attributes *sub; - /* PF structures aren't fully constructed yet */ - Parrot_block_GC_mark(interp); - /* store relative to HLL namespace */ PMC_get_sub(interp, sub_pmc, sub); Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp), sub->HLL_id); @@ -762,7 +762,6 @@ /* restore HLL_id */ Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp), cur_id); - Parrot_unblock_GC_mark(interp); } /* diff -Nru parrot-2.7.0/src/nci/core_thunks.c parrot-2.8.0/src/nci/core_thunks.c --- parrot-2.7.0/src/nci/core_thunks.c 2010-06-19 12:33:56.000000000 +0000 +++ parrot-2.8.0/src/nci/core_thunks.c 2010-09-21 07:48:51.000000000 +0000 @@ -10,7 +10,7 @@ /* src/nci/core_thunks.c * Copyright (C) 2010, Parrot Foundation. * SVN Info - * $Id: core_thunks.c 47675 2010-06-17 17:31:33Z NotFound $ + * $Id: core_thunks.c 48847 2010-09-08 01:27:56Z plobsing $ * Overview: * Native Call Interface routines. The code needed to build a * parrot to C call frame is in here @@ -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; diff -Nru parrot-2.7.0/src/nci/extra_thunks.c parrot-2.8.0/src/nci/extra_thunks.c --- parrot-2.7.0/src/nci/extra_thunks.c 2010-08-06 11:23:29.000000000 +0000 +++ parrot-2.8.0/src/nci/extra_thunks.c 2010-09-21 07:48:51.000000000 +0000 @@ -10,7 +10,7 @@ /* src/nci/extra_thunks.c * Copyright (C) 2010, Parrot Foundation. * SVN Info - * $Id: extra_thunks.c 48180 2010-07-26 17:57:00Z darbelo $ + * $Id: extra_thunks.c 48847 2010-09-08 01:27:56Z plobsing $ * Overview: * Native Call Interface routines. The code needed to build a * parrot to C call frame is in here @@ -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); } diff -Nru parrot-2.7.0/src/oo.c parrot-2.8.0/src/oo.c --- parrot-2.7.0/src/oo.c 2010-07-08 20:23:04.000000000 +0000 +++ parrot-2.8.0/src/oo.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2007-2010, Parrot Foundation. -$Id: oo.c 48028 2010-07-07 12:45:50Z Util $ +$Id: oo.c 48983 2010-09-13 20:58:55Z mikehh $ =head1 NAME @@ -50,15 +50,6 @@ __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -static PMC * find_method_direct_1(PARROT_INTERP, - ARGIN(PMC *_class), - ARGIN(STRING *method_name)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3); - PARROT_INLINE PARROT_CANNOT_RETURN_NULL PARROT_WARN_UNUSED_RESULT @@ -81,10 +72,6 @@ #define ASSERT_ARGS_fail_if_type_exists __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(name)) -#define ASSERT_ARGS_find_method_direct_1 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(_class) \ - , PARROT_ASSERT_ARG(method_name)) #define ASSERT_ARGS_get_pmc_proxy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp)) #define ASSERT_ARGS_invalidate_all_caches __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ @@ -94,6 +81,65 @@ /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ + +/* + +=item C + +Print some information about the search for a sub. + +=cut + +*/ + +#ifdef NDEBUG +# define TRACE_FM(i, c, m, sub) +#else +# define TRACE_FM(i, c, m, sub) \ + debug_trace_find_meth((i), (c), (m), (sub)) + +static void +debug_trace_find_meth(PARROT_INTERP, ARGIN(const PMC *_class), + ARGIN(const STRING *name), ARGIN_NULLOK(const PMC *sub)) +{ + ASSERT_ARGS(debug_trace_find_meth) + STRING *class_name; + const char *result; + Interp *tracer; + + if (!Interp_trace_TEST(interp, PARROT_TRACE_FIND_METH_FLAG)) + return; + + if (PObj_is_class_TEST(_class)) { + SLOTTYPE * const class_array = PMC_data_typed(_class, SLOTTYPE *); + PMC * const class_name_pmc = get_attrib_num(class_array, PCD_CLASS_NAME); + class_name = VTABLE_get_string(interp, class_name_pmc); + } + else + class_name = _class->vtable->whoami; + + if (sub) { + if (sub->vtable->base_type == enum_class_NativePCCMethod) + result = "NativePCCMethod"; + else if (sub->vtable->base_type == enum_class_NCI) + result = "NCI"; + else + result = "Sub"; + } + else + result = "no"; + + tracer = (interp->pdb && interp->pdb->debugger) ? + interp->pdb->debugger : + interp; + Parrot_io_eprintf(tracer, "# find_method class '%Ss' method '%Ss': %s\n", + class_name, name, result); +} + +#endif + + /* =item Cvtable->mro; + const INTVAL n = VTABLE_elements(interp, mro); + INTVAL i; + + for (i = 0; i < n; ++i) { + PMC * const _class = VTABLE_get_pmc_keyed_int(interp, mro, i); + PMC * const ns = VTABLE_get_namespace(interp, _class); + PMC * const class_obj = VTABLE_inspect_str(interp, ns, class_str); + PMC *method = PMCNULL; + PMC *method_hash; + + if (PMC_IS_NULL(class_obj)) + method_hash = VTABLE_inspect_str(interp, ns, methods_str); + else + method_hash = VTABLE_inspect_str(interp, class_obj, methods_str); + + if (!PMC_IS_NULL(method_hash)) + method = VTABLE_get_pmc_keyed_str(interp, method_hash, method_name); + if (PMC_IS_NULL(method)) + method = VTABLE_get_pmc_keyed_str(interp, ns, method_name); - if (Parrot_str_equal(interp, method_name, CONST_STRING(interp, "__get_string"))) - return find_method_direct_1(interp, _class, CONST_STRING(interp, "__get_repr")); + TRACE_FM(interp, _class, method_name, method); + if (!PMC_IS_NULL(method)) + return method; + } + + TRACE_FM(interp, _class, method_name, NULL); return PMCNULL; } @@ -908,16 +977,14 @@ { ASSERT_ARGS(Parrot_find_method_with_cache) - UINTVAL type, bits; - Caches *mc; - Meth_cache_entry *e; - - PARROT_ASSERT(method_name != 0); - #if DISABLE_METH_CACHE return Parrot_find_method_direct(interp, _class, method_name); #else + Caches *mc; + Meth_cache_entry *e; + UINTVAL type, bits; + if (! PObj_constant_TEST(method_name)) return Parrot_find_method_direct(interp, _class, method_name); @@ -926,31 +993,29 @@ bits = (((UINTVAL) Buffer_bufstart(method_name)) >> 2) & TBL_SIZE_MASK; if (type >= mc->mc_size) { - if (mc->idx) { + if (mc->idx) mc->idx = mem_gc_realloc_n_typed_zeroed(interp, mc->idx, - type + 1, mc->mc_size, Meth_cache_entry**); - } - else { - mc->idx = mem_gc_allocate_n_zeroed_typed(interp, type + 1, Meth_cache_entry**); - } + type + 1, mc->mc_size, Meth_cache_entry **); + else + mc->idx = mem_gc_allocate_n_zeroed_typed(interp, type + 1, + Meth_cache_entry **); + mc->mc_size = type + 1; } - if (mc->idx[type] == NULL) { + if (! mc->idx[type]) mc->idx[type] = mem_gc_allocate_n_zeroed_typed(interp, - TBL_SIZE, Meth_cache_entry*); - } + TBL_SIZE, Meth_cache_entry *); - e = mc->idx[type][bits]; + e = mc->idx[type][bits]; - while (e && e->strstart != Buffer_bufstart(method_name)) { - e = e->next; - } + while (e && e->strstart != Buffer_bufstart(method_name)) + e = e->next; if (!e) { /* when here no or no correct entry was at [bits] */ /* Use zeroed allocation because find_method_direct can trigger GC */ - e = mem_gc_allocate_zeroed_typed(interp, Meth_cache_entry); + e = mem_gc_allocate_zeroed_typed(interp, Meth_cache_entry); mc->idx[type][bits] = e; @@ -967,116 +1032,6 @@ /* -=item C - -Print some information about the search for a sub. - -=cut - -*/ - -#ifdef NDEBUG -# define TRACE_FM(i, c, m, sub) -#else -# define TRACE_FM(i, c, m, sub) \ - debug_trace_find_meth((i), (c), (m), (sub)) - -static void -debug_trace_find_meth(PARROT_INTERP, ARGIN(const PMC *_class), - ARGIN(const STRING *name), ARGIN_NULLOK(const PMC *sub)) -{ - ASSERT_ARGS(debug_trace_find_meth) - STRING *class_name; - const char *result; - Interp *tracer; - - if (!Interp_trace_TEST(interp, PARROT_TRACE_FIND_METH_FLAG)) - return; - - if (PObj_is_class_TEST(_class)) { - SLOTTYPE * const class_array = PMC_data_typed(_class, SLOTTYPE *); - PMC * const class_name_pmc = get_attrib_num(class_array, PCD_CLASS_NAME); - class_name = VTABLE_get_string(interp, class_name_pmc); - } - else - class_name = _class->vtable->whoami; - - if (sub) { - if (sub->vtable->base_type == enum_class_NCI) - result = "NCI"; - else - result = "Sub"; - } - else - result = "no"; - - tracer = (interp->pdb && interp->pdb->debugger) ? - interp->pdb->debugger : - interp; - Parrot_io_eprintf(tracer, "# find_method class '%Ss' method '%Ss': %s\n", - class_name, name, result); -} - -#endif - - -/* - -=item C - -Find the method with the given name in the specified class. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -static PMC * -find_method_direct_1(PARROT_INTERP, ARGIN(PMC *_class), - ARGIN(STRING *method_name)) -{ - ASSERT_ARGS(find_method_direct_1) - INTVAL i; - - PMC * const mro = _class->vtable->mro; - const INTVAL n = VTABLE_elements(interp, mro); - STRING * const methods_str = CONST_STRING(interp, "methods"); - STRING * const class_str = CONST_STRING(interp, "class"); - - for (i = 0; i < n; ++i) { - PMC * const _class = VTABLE_get_pmc_keyed_int(interp, mro, i); - PMC * const ns = VTABLE_get_namespace(interp, _class); - PMC * const class_obj = VTABLE_inspect_str(interp, ns, class_str); - PMC *method = PMCNULL; - PMC * method_hash; - - if (PMC_IS_NULL(class_obj)) - method_hash = VTABLE_inspect_str(interp, ns, methods_str); - else - method_hash = VTABLE_inspect_str(interp, class_obj, methods_str); - - if (!PMC_IS_NULL(method_hash)) - method = VTABLE_get_pmc_keyed_str(interp, method_hash, method_name); - - if (PMC_IS_NULL(method)) - method = VTABLE_get_pmc_keyed_str(interp, ns, method_name); - - TRACE_FM(interp, _class, method_name, method); - - if (!PMC_IS_NULL(method)) - return method; - } - - TRACE_FM(interp, _class, method_name, NULL); - return PMCNULL; -} - - -/* - =item C Merge together the MRO of the items in the list. diff -Nru parrot-2.7.0/src/ops/cmp.ops parrot-2.8.0/src/ops/cmp.ops --- parrot-2.7.0/src/ops/cmp.ops 2010-06-11 08:06:04.000000000 +0000 +++ parrot-2.8.0/src/ops/cmp.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: cmp.ops 47428 2010-06-06 08:32:34Z cotto $ + * $Id: cmp.ops 49022 2010-09-15 17:53:37Z luben $ ** cmp.ops */ @@ -928,7 +928,7 @@ } inline op and(invar PMC, invar PMC, invar PMC) :base_core { - $1 = VTABLE_logical_and(interp, $2, $3, $1); + $1 = VTABLE_get_bool(interp, $2) ? $3 : $2; } ######################################## @@ -954,11 +954,14 @@ } inline op not(invar PMC) :base_core { - VTABLE_i_logical_not(interp, $1); + VTABLE_set_bool(interp, $1, !VTABLE_get_bool(interp, $1)); } inline op not(out PMC, invar PMC) :base_core { - $1 = VTABLE_logical_not(interp, $2, $1); + const INTVAL a = ! VTABLE_get_bool(interp, $2); + if (PMC_IS_NULL($1)) + $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2)); + VTABLE_set_bool(interp, $1, a); } ######################################## @@ -976,7 +979,7 @@ } inline op or(invar PMC, invar PMC, invar PMC) :base_core { - $1 = VTABLE_logical_or(interp, $2, $3, $1); + $1 = VTABLE_get_bool(interp, $2) ? $2 : $3; } ######################################## @@ -995,7 +998,17 @@ } inline op xor(invar PMC, invar PMC, invar PMC) :base_core { - $1 = VTABLE_logical_xor(interp, $2, $3, $1); + const INTVAL a = VTABLE_get_bool(interp, $2); + const INTVAL b = VTABLE_get_bool(interp, $3); + if (a && ! b) + $1 = $2; + else + if (b && ! a) + $1 = $3 ; + else{ + $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2)); + VTABLE_set_bool(interp, $1, 0); + } } =back diff -Nru parrot-2.7.0/src/ops/core_ops.c parrot-2.8.0/src/ops/core_ops.c --- parrot-2.7.0/src/ops/core_ops.c 2010-08-18 00:46:48.000000000 +0000 +++ parrot-2.8.0/src/ops/core_ops.c 2010-09-21 07:50:59.000000000 +0000 @@ -18211,7 +18211,7 @@ opcode_t * Parrot_and_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - PREG(1) = VTABLE_logical_and(interp, PREG(2), PREG(3), PREG(1)); + PREG(1) = VTABLE_get_bool(interp, PREG(2)) ? PREG(3) : PREG(2); return (opcode_t *)cur_opcode + 4;} @@ -18232,14 +18232,17 @@ opcode_t * Parrot_not_p(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - VTABLE_i_logical_not(interp, PREG(1)); + VTABLE_set_bool(interp, PREG(1), !VTABLE_get_bool(interp, PREG(1))); return (opcode_t *)cur_opcode + 2;} opcode_t * Parrot_not_p_p(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - PREG(1) = VTABLE_logical_not(interp, PREG(2), PREG(1)); + const INTVAL a = ! VTABLE_get_bool(interp, PREG(2)); + if (PMC_IS_NULL(PREG(1))) + PREG(1) = Parrot_pmc_new(interp, VTABLE_type(interp, PREG(2))); + VTABLE_set_bool(interp, PREG(1), a); return (opcode_t *)cur_opcode + 3;} @@ -18267,7 +18270,7 @@ opcode_t * Parrot_or_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - PREG(1) = VTABLE_logical_or(interp, PREG(2), PREG(3), PREG(1)); + PREG(1) = VTABLE_get_bool(interp, PREG(2)) ? PREG(2) : PREG(3); return (opcode_t *)cur_opcode + 4;} @@ -18295,7 +18298,17 @@ opcode_t * Parrot_xor_p_p_p(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - PREG(1) = VTABLE_logical_xor(interp, PREG(2), PREG(3), PREG(1)); + const INTVAL a = VTABLE_get_bool(interp, PREG(2)); + const INTVAL b = VTABLE_get_bool(interp, PREG(3)); + if (a && ! b) + PREG(1) = PREG(2); + else + if (b && ! a) + PREG(1) = PREG(3) ; + else{ + PREG(1) = Parrot_pmc_new(interp, VTABLE_type(interp, PREG(2))); + VTABLE_set_bool(interp, PREG(1), 0); + } return (opcode_t *)cur_opcode + 4;} @@ -20453,32 +20466,14 @@ opcode_t * Parrot_addattribute_p_s(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - STRING * const class_name = string_from_literal(interp, "Class"); - STRING * const role_name = string_from_literal(interp, "Role"); - - if (VTABLE_isa(interp, PREG(1), class_name) || VTABLE_isa(interp, PREG(1), role_name)) - VTABLE_add_attribute(interp, PREG(1), SREG(2), PMCNULL); - else { - opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_INVALID_OPERATION, - "Cannot add attribute to non-class");return (opcode_t *)handler; - } + VTABLE_add_attribute(interp, PREG(1), SREG(2), PMCNULL); return (opcode_t *)cur_opcode + 3;} opcode_t * Parrot_addattribute_p_sc(opcode_t *cur_opcode, PARROT_INTERP) { const Parrot_Context * const CUR_CTX = Parrot_pcc_get_context_struct(interp, interp->ctx); - STRING * const class_name = string_from_literal(interp, "Class"); - STRING * const role_name = string_from_literal(interp, "Role"); - - if (VTABLE_isa(interp, PREG(1), class_name) || VTABLE_isa(interp, PREG(1), role_name)) - VTABLE_add_attribute(interp, PREG(1), CONST(2).u.string, PMCNULL); - else { - opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_INVALID_OPERATION, - "Cannot add attribute to non-class");return (opcode_t *)handler; - } + VTABLE_add_attribute(interp, PREG(1), CONST(2).u.string, PMCNULL); return (opcode_t *)cur_opcode + 3;} @@ -22872,21 +22867,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;} @@ -23121,35 +23116,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, @@ -23162,7 +23157,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, @@ -23615,7 +23610,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;} @@ -23623,7 +23619,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;} @@ -23631,7 +23628,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;} @@ -23778,13 +23776,8 @@ PMC * const result = PMC_IS_NULL(lex_pad) - ? NULL + ? PMCNULL : VTABLE_get_pmc_keyed_str(interp, lex_pad, lex_name); - if (!result) { - opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_LEX_NOT_FOUND, - "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler; - } PREG(1) = result; return (opcode_t *)cur_opcode + 3;} @@ -23798,13 +23791,8 @@ PMC * const result = PMC_IS_NULL(lex_pad) - ? NULL + ? PMCNULL : VTABLE_get_pmc_keyed_str(interp, lex_pad, lex_name); - if (!result) { - opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_LEX_NOT_FOUND, - "Lexical '%Ss' not found", lex_name);return (opcode_t *)handler; - } PREG(1) = result; return (opcode_t *)cur_opcode + 3;} @@ -25990,9 +25978,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;} @@ -26007,9 +25994,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;} @@ -26104,7 +26090,7 @@ PARROT_FUNCTION_CORE, /* core_type = PARROT_XX_CORE */ 0, /* flags */ 2, /* major_version */ - 6, /* minor_version */ + 8, /* minor_version */ 0, /* patch_version */ 1083, /* op_count */ core_op_info_table, /* op_info_table */ @@ -26229,9 +26215,9 @@ hop = NULL; hop_buckets = NULL; -} +}PARROT_EXPORT op_lib_t * -Parrot_DynOp_core_2_7_0(PARROT_INTERP, long init) { +Parrot_DynOp_core_2_8_0(PARROT_INTERP, long init) { /* initialize and return op_lib ptr */ if (init == 1) { @@ -26260,7 +26246,7 @@ { PMC *const lib = Parrot_pmc_new(interp, enum_class_ParrotLibrary); - ((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) Parrot_DynOp_core_2_7_0; + ((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) Parrot_DynOp_core_2_8_0; dynop_register(interp, lib); return lib; } diff -Nru parrot-2.7.0/src/ops/experimental.ops parrot-2.8.0/src/ops/experimental.ops --- parrot-2.7.0/src/ops/experimental.ops 2010-06-19 12:33:56.000000000 +0000 +++ parrot-2.8.0/src/ops/experimental.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: experimental.ops 47678 2010-06-18 00:29:10Z whiteknight $ + * $Id: experimental.ops 48933 2010-09-11 15:38:03Z nwellnhof $ ** experimental.ops */ @@ -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 } diff -Nru parrot-2.7.0/src/ops/object.ops parrot-2.8.0/src/ops/object.ops --- parrot-2.7.0/src/ops/object.ops 2010-07-05 02:46:51.000000000 +0000 +++ parrot-2.8.0/src/ops/object.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,6 +1,6 @@ /* -$Id: object.ops 47876 2010-06-26 20:54:09Z chromatic $ +$Id: object.ops 48851 2010-09-08 07:10:30Z cotto $ object.ops @@ -399,7 +399,8 @@ =item B(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 find the class of an instance of an object. use C for that. =cut @@ -463,17 +464,7 @@ =cut inline op addattribute(invar PMC, in STR) :object_classes { - STRING * const class_name = string_from_literal(interp, "Class"); - STRING * const role_name = string_from_literal(interp, "Role"); - - if (VTABLE_isa(interp, $1, class_name) || VTABLE_isa(interp, $1, role_name)) - VTABLE_add_attribute(interp, $1, $2, PMCNULL); - else { - opcode_t *handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_INVALID_OPERATION, - "Cannot add attribute to non-class"); - goto ADDRESS(handler); - } + VTABLE_add_attribute(interp, $1, $2, PMCNULL); } =item B(invar PMC, in STR) B<(unimplemented)> diff -Nru parrot-2.7.0/src/ops/pmc.ops parrot-2.8.0/src/ops/pmc.ops --- parrot-2.7.0/src/ops/pmc.ops 2010-06-19 12:33:56.000000000 +0000 +++ parrot-2.8.0/src/ops/pmc.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,6 +1,6 @@ /* -$Id: pmc.ops 47678 2010-06-18 00:29:10Z whiteknight $ +$Id: pmc.ops 48778 2010-09-04 11:48:35Z nwellnhof $ pmc.ops @@ -681,7 +681,7 @@ =item B(invar PMC, in PMC) -Have $1 turn itself into a PMC of type $2. +Have $1 turn itself into a PMC of type $2. $2 should be a Class PMC. =cut diff -Nru parrot-2.7.0/src/ops/set.ops parrot-2.8.0/src/ops/set.ops --- parrot-2.7.0/src/ops/set.ops 2010-06-11 08:06:04.000000000 +0000 +++ parrot-2.8.0/src/ops/set.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: set.ops 47428 2010-06-06 08:32:34Z cotto $ + * $Id: set.ops 48564 2010-08-19 02:03:11Z cotto $ ** set.ops */ @@ -40,6 +40,9 @@ =item B(out INT, in NUM) +A floating-point number is truncated (rounded toward zero) when assigned +to an integer register. + =item B(out INT, invar PMC) =item B(out INT, invar PMC) diff -Nru parrot-2.7.0/src/ops/string.ops parrot-2.8.0/src/ops/string.ops --- parrot-2.7.0/src/ops/string.ops 2010-06-11 08:06:04.000000000 +0000 +++ parrot-2.8.0/src/ops/string.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: string.ops 47428 2010-06-06 08:32:34Z cotto $ + * $Id: string.ops 48842 2010-09-08 00:26:33Z nwellnhof $ ** string.ops */ @@ -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, diff -Nru parrot-2.7.0/src/ops/sys.ops parrot-2.8.0/src/ops/sys.ops --- parrot-2.7.0/src/ops/sys.ops 2010-06-11 08:06:04.000000000 +0000 +++ parrot-2.8.0/src/ops/sys.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: sys.ops 47428 2010-06-06 08:32:34Z cotto $ + * $Id: sys.ops 48837 2010-09-07 23:48:07Z nwellnhof $ ** sys.ops */ @@ -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); } diff -Nru parrot-2.7.0/src/ops/var.ops parrot-2.8.0/src/ops/var.ops --- parrot-2.7.0/src/ops/var.ops 2010-06-19 12:33:56.000000000 +0000 +++ parrot-2.8.0/src/ops/var.ops 2010-09-21 07:48:50.000000000 +0000 @@ -1,5 +1,5 @@ /* - * $Id: var.ops 47678 2010-06-18 00:29:10Z whiteknight $ + * $Id: var.ops 48721 2010-08-30 01:04:08Z Paul C. Anagnostopoulos $ ** var.ops */ @@ -86,10 +86,8 @@ =item B(out PMC, in STR) -Find the lexical variable named $2 and store it in $1. This -opcode either throws an exception or returns a Null PMC for the failure case, -depending on the implementation of the LexPad PMC. Parrot's -standard LexPad throws an exception for non-existent names. +Find the lexical variable named $2 and store it in $1. Return a +Null PMC if the variable is not found. =cut @@ -100,14 +98,8 @@ PMC * const result = PMC_IS_NULL(lex_pad) - ? NULL + ? PMCNULL : VTABLE_get_pmc_keyed_str(interp, lex_pad, lex_name); - if (!result) { - opcode_t * const handler = Parrot_ex_throw_from_op_args(interp, NULL, - EXCEPTION_LEX_NOT_FOUND, - "Lexical '%Ss' not found", lex_name); - goto ADDRESS(handler); - } $1 = result; } @@ -455,9 +447,10 @@ =item B(out PMC, in STR) -Find the name $2 in lexical, current, global, or builtin namespace and -store it in $1. If the name doesn't exist -either throws an exception or sets $1 to PMCNULL, depending on current +Find the name C<$2> in lexicals, then the current namespace, then the HLL +root namespace, and finally Parrot builtins. These are checked in order +and the first match is returned in C<$1>. If no matches are found, +either throws an exception or sets C<$1> to PMCNULL, depending on current errors settings. See B. =cut diff -Nru parrot-2.7.0/src/packdump.c parrot-2.8.0/src/packdump.c --- parrot-2.7.0/src/packdump.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/packdump.c 2010-09-21 07:48:51.000000000 +0000 @@ -2,7 +2,7 @@ Copyright (C) 2001-2009, Parrot Foundation. This program is free software. It is subject to the same license as Parrot itself. -$Id: packdump.c 48277 2010-08-03 05:51:00Z plobsing $ +$Id: packdump.c 48833 2010-09-07 22:58:38Z nwellnhof $ =head1 NAME @@ -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); @@ -318,15 +318,16 @@ namespace_description = null; } Parrot_io_printf(interp, - "\t\tclass => %Ss,\n" - "\t\tstart_offs => %d,\n" - "\t\tend_offs => %d,\n" - "\t\tname => '%Ss',\n" - "\t\tsubid => '%Ss',\n" - "\t\tmethod => '%Ss',\n" - "\t\tnsentry => '%Ss',\n" - "\t\tnamespace => %Ss\n" - "\t\tHLL_id => %d,\n", + "\t\tclass => %Ss,\n" + "\t\tstart_offs => %d,\n" + "\t\tend_offs => %d,\n" + "\t\tname => '%Ss',\n" + "\t\tsubid => '%Ss',\n" + "\t\tmethod => '%Ss',\n" + "\t\tnsentry => '%Ss',\n" + "\t\tnamespace => %Ss,\n" + "\t\tHLL_id => %d,\n" + "\t\tn_regs_used => [ %d, %d, %d, %d ],\n", pmc->vtable->whoami, sub->start_offs, sub->end_offs, @@ -335,7 +336,11 @@ sub->method_name, sub->ns_entry_name, namespace_description, - sub->HLL_id); + sub->HLL_id, + sub->n_regs_used[0], + sub->n_regs_used[1], + sub->n_regs_used[2], + sub->n_regs_used[3]); break; case enum_class_FixedIntegerArray: Parrot_io_printf(interp, diff -Nru parrot-2.7.0/src/packfile/byteorder.h parrot-2.8.0/src/packfile/byteorder.h --- parrot-2.7.0/src/packfile/byteorder.h 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/packfile/byteorder.h 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,572 @@ +/* +Copyright (C) 2001-2009, Parrot Foundation. +$Id: byteorder.h 48630 2010-08-24 16:13:32Z mikehh $ + +=head1 NAME + +src/byteorder.c - Byteordering functions + +=head1 DESCRIPTION + +These are assigned to a vtable when the PBC file is loaded. + +If the vtable function for conversion from the native byteorder is called, +it is a I and will work, but the caller should know if the +byteorder in the PBC file is native and skip the conversion and just map +it in. + +=head2 Byte order handlers + +Configure will have checked for supported word sizes. + +=over 4 + +=cut + +*/ + +#ifndef PARROT_BYTEORDER_H_GUARD +#define PARROT_BYTEORDER_H_GUARD + +#include "parrot/parrot.h" + +/* HEADERIZER HFILE: none */ + +/* + +=item C + +This function converts a 4 or 8 byte C into little endian +format. If the native format is already little endian, then no +conversion is done. + +=cut + +*/ + +PARROT_INLINE +PARROT_WARN_UNUSED_RESULT +PARROT_CONST_FUNCTION +static INTVAL +fetch_iv_le(INTVAL w) +{ +#if !PARROT_BIGENDIAN + return w; +#else +# if INTVAL_SIZE == 4 + return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w >> 24); +# else +# if INTVAL_SIZE == 8 + INTVAL r; + + r = w << 56; + r |= (w & 0xff00) << 40; + r |= (w & 0xff0000) << 24; + r |= (w & 0xff000000) << 8; + r |= (w & 0xff00000000) >> 8; + r |= (w & 0xff0000000000) >> 24; + r |= (w & 0xff000000000000) >> 40; + r |= (w & 0xff00000000000000) >> 56; + return r; +# else + exit_fatal(1, "Unsupported INTVAL_SIZE=%d\n", + INTVAL_SIZE); +# endif +# endif +#endif +} + +/* + +=item C + +This function converts a 4 or 8 byte C into big endian format. +If the native format is already big endian, then no conversion is done. + +=cut + +*/ + +PARROT_INLINE +PARROT_WARN_UNUSED_RESULT +PARROT_CONST_FUNCTION +static INTVAL +fetch_iv_be(INTVAL w) +{ +#if PARROT_BIGENDIAN + return w; +#else +# if INTVAL_SIZE == 4 + return (w << 24) | ((w & 0xff00) << 8) | ((w & 0xff0000) >> 8) | (w >> 24); +# else +# if INTVAL_SIZE == 8 + INTVAL r; + r = w << 56; + r |= (w & 0xff00) << 40; + r |= (w & 0xff0000) << 24; + r |= (w & 0xff000000) << 8; + r |= (w & 0xff00000000) >> 8; + r |= (w & 0xff0000000000) >> 24; + r |= (w & 0xff000000000000) >> 40; + r |= (w & 0xff00000000000000) >> 56; + return r; +# else + exit_fatal(1, "Unsupported INTVAL_SIZE=%d\n", + INTVAL_SIZE); +# endif +# endif +#endif +} + +/* + +=item C + +Same as C for opcode_t + +=cut + +*/ + +PARROT_INLINE +PARROT_WARN_UNUSED_RESULT +PARROT_CONST_FUNCTION +static opcode_t +fetch_op_be(opcode_t w) +{ +#if PARROT_BIGENDIAN + return w; +#else +# if OPCODE_T_SIZE == 4 + return (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) | + ((w & 0xff000000) >> 24); +# else + opcode_t r; + + r = w << 56; + r |= (w & 0xff00) << 40; + r |= (w & 0xff0000) << 24; + r |= (w & 0xff000000) << 8; + r |= (w & 0xff00000000) >> 8; + r |= (w & 0xff0000000000) >> 24; + r |= (w & 0xff000000000000) >> 40; + r |= (w & 0xff00000000000000) >> 56; + return r; +# endif +#endif +} + +/* + +=item C + +Same as C for opcode_t + +=cut + +*/ + +PARROT_INLINE +PARROT_WARN_UNUSED_RESULT +PARROT_CONST_FUNCTION +static opcode_t +fetch_op_le(opcode_t w) +{ +#if !PARROT_BIGENDIAN + return w; +#else +# if OPCODE_T_SIZE == 4 + return (w << 24) | ((w & 0x0000ff00) << 8) | ((w & 0x00ff0000) >> 8) | + ((w & 0xff000000) >> 24); +# else + opcode_t r; + + r = w << 56; + r |= (w & 0xff00) << 40; + r |= (w & 0xff0000) << 24; + r |= (w & 0xff000000) << 8; + r |= (w & 0xff00000000) >> 8; + r |= (w & 0xff0000000000) >> 24; + r |= (w & 0xff000000000000) >> 40; + r |= (w & 0xff00000000000000) >> 56; + return r; +# endif +#endif +} + +/* + +=pod + +Unrolled routines for swapping various sizes from 32-128 bits. These +should only be used if alignment is unknown or we are pulling something +out of a padded buffer. + +=cut + +*/ + +/* + +=item C + +Converts a 4-byte big-endian buffer C into a little-endian C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_be_4(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if PARROT_BIGENDIAN + memcpy(rb, b, 4); +#else + rb[0] = b[3]; + rb[1] = b[2]; + rb[2] = b[1]; + rb[3] = b[0]; +#endif +} + +/* + +=item C + +Converts a 4-byte little-endian buffer C into a big-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_le_4(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if !PARROT_BIGENDIAN + memcpy(rb, b, 4); +#else + rb[0] = b[3]; + rb[1] = b[2]; + rb[2] = b[1]; + rb[3] = b[0]; +#endif +} + +/* + +=item C + +Converts an 8-byte big-endian buffer C into a little-endian buffer C + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_be_8(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if PARROT_BIGENDIAN + memcpy(rb, b, 8); +#else + rb[0] = b[7]; + rb[1] = b[6]; + rb[2] = b[5]; + rb[3] = b[4]; + rb[4] = b[3]; + rb[5] = b[2]; + rb[6] = b[1]; + rb[7] = b[0]; +#endif +} + +/* + +=item C + +Converts an 8-byte little-endian buffer C into a big-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_le_8(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if !PARROT_BIGENDIAN + memcpy(rb, b, 8); +#else + rb[0] = b[7]; + rb[1] = b[6]; + rb[2] = b[5]; + rb[3] = b[4]; + rb[4] = b[3]; + rb[5] = b[2]; + rb[6] = b[1]; + rb[7] = b[0]; +#endif +} + +/* + +=item C + +Converts a 12-byte little-endian buffer C into a big-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_le_12(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if !PARROT_BIGENDIAN + memcpy(rb, b, 12); +#else + rb[0] = b[11]; + rb[1] = b[10]; + rb[2] = b[9]; + rb[3] = b[8]; + rb[4] = b[7]; + rb[5] = b[6]; + rb[6] = b[5]; + rb[7] = b[4]; + rb[8] = b[3]; + rb[9] = b[2]; + rb[10] = b[1]; + rb[11] = b[0]; +#endif +} + +/* + +=item C + +Converts a 12-byte big-endian buffer C into a little-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_be_12(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if PARROT_BIGENDIAN + memcpy(rb, b, 12); +#else + rb[0] = b[11]; + rb[1] = b[10]; + rb[2] = b[9]; + rb[3] = b[8]; + rb[4] = b[7]; + rb[5] = b[6]; + rb[6] = b[5]; + rb[7] = b[4]; + rb[8] = b[3]; + rb[9] = b[2]; + rb[10] = b[1]; + rb[11] = b[0]; +#endif +} + +/* + +=item C + +Converts a 16-byte little-endian buffer C into a big-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_le_16(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if !PARROT_BIGENDIAN + memcpy(rb, b, 16); +#else + rb[0] = b[15]; + rb[1] = b[14]; + rb[2] = b[13]; + rb[3] = b[12]; + rb[4] = b[11]; + rb[5] = b[10]; + rb[6] = b[9]; + rb[7] = b[8]; + rb[8] = b[7]; + rb[9] = b[6]; + rb[10] = b[5]; + rb[11] = b[4]; + rb[12] = b[3]; + rb[13] = b[2]; + rb[14] = b[1]; + rb[15] = b[0]; +#endif +} + +/* + +=item C + +Converts a 16-byte big-endian buffer C into a little-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_be_16(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if PARROT_BIGENDIAN + memcpy(rb, b, 16); +#else + rb[0] = b[15]; + rb[1] = b[14]; + rb[2] = b[13]; + rb[3] = b[12]; + rb[4] = b[11]; + rb[5] = b[10]; + rb[6] = b[9]; + rb[7] = b[8]; + rb[8] = b[7]; + rb[9] = b[6]; + rb[10] = b[5]; + rb[11] = b[4]; + rb[12] = b[3]; + rb[13] = b[2]; + rb[14] = b[1]; + rb[15] = b[0]; +#endif +} + +/* + +=item C + +Converts a 32-byte little-endian buffer C into a big-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_le_32(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if !PARROT_BIGENDIAN + memcpy(rb, b, 32); +#else + rb[0] = b[31]; + rb[1] = b[30]; + rb[2] = b[29]; + rb[3] = b[28]; + rb[4] = b[27]; + rb[5] = b[26]; + rb[6] = b[25]; + rb[7] = b[24]; + rb[8] = b[23]; + rb[9] = b[22]; + rb[10] = b[21]; + rb[11] = b[20]; + rb[12] = b[19]; + rb[13] = b[18]; + rb[14] = b[17]; + rb[15] = b[16]; + rb[16] = b[15]; + rb[17] = b[14]; + rb[18] = b[13]; + rb[19] = b[12]; + rb[20] = b[11]; + rb[21] = b[10]; + rb[22] = b[9]; + rb[23] = b[8]; + rb[24] = b[7]; + rb[25] = b[6]; + rb[26] = b[5]; + rb[27] = b[4]; + rb[28] = b[3]; + rb[29] = b[2]; + rb[30] = b[1]; + rb[31] = b[0]; +#endif +} + +/* + +=item C + +Converts a 32-byte big-endian buffer C into a little-endian buffer C. + +=cut + +*/ + +PARROT_INLINE +static void +fetch_buf_be_32(ARGOUT(unsigned char *rb), ARGIN(const unsigned char *b)) +{ +#if PARROT_BIGENDIAN + memcpy(rb, b, 32); +#else + rb[0] = b[31]; + rb[1] = b[30]; + rb[2] = b[29]; + rb[3] = b[28]; + rb[4] = b[27]; + rb[5] = b[26]; + rb[6] = b[25]; + rb[7] = b[24]; + rb[8] = b[23]; + rb[9] = b[22]; + rb[10] = b[21]; + rb[11] = b[20]; + rb[12] = b[19]; + rb[13] = b[18]; + rb[14] = b[17]; + rb[15] = b[16]; + rb[16] = b[15]; + rb[17] = b[14]; + rb[18] = b[13]; + rb[19] = b[12]; + rb[20] = b[11]; + rb[21] = b[10]; + rb[22] = b[9]; + rb[23] = b[8]; + rb[24] = b[7]; + rb[25] = b[6]; + rb[26] = b[5]; + rb[27] = b[4]; + rb[28] = b[3]; + rb[29] = b[2]; + rb[30] = b[1]; + rb[31] = b[0]; +#endif +} + +#endif /* PARROT_BYTEORDER_H_GUARD */ + +/* + +=back + +=head1 HISTORY + +Initial version by Melvin on 2002/05/01 + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/src/packfile/pf_items.c parrot-2.8.0/src/packfile/pf_items.c --- parrot-2.7.0/src/packfile/pf_items.c 2010-08-06 11:23:29.000000000 +0000 +++ parrot-2.8.0/src/packfile/pf_items.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: pf_items.c 48310 2010-08-04 08:04:54Z plobsing $ +$Id: pf_items.c 48997 2010-09-14 12:00:33Z nwellnhof $ =head1 NAME @@ -33,6 +33,8 @@ */ #include "parrot/parrot.h" +#include "byteorder.h" +#include "pf_items.str" /* HEADERIZER HFILE: include/parrot/packfile.h */ @@ -892,16 +894,14 @@ unsigned char buf[4]; opcode_t o; } u; -#if PARROT_BIGENDIAN fetch_buf_le_4(u.buf, b); +#if PARROT_BIGENDIAN # if OPCODE_T_SIZE == 8 return (Parrot_Int4)(u.o >> 32); # else return (opcode_t) fetch_iv_be((INTVAL)u.o); # endif #else - /* inlining the effects of the fetch_buf_le_4() call is worth it */ - memcpy(u.buf, b, 4); # if OPCODE_T_SIZE == 8 /* without the cast we would not get a negative int, the vtable indices */ return (Parrot_Int4)(u.o & 0xffffffff); @@ -960,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; + } } /* @@ -1218,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; @@ -1245,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; @@ -1316,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); @@ -1327,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 || (encoding != CONST_STRING(interp, "")->encoding)) + 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", @@ -1412,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; diff -Nru parrot-2.7.0/src/packfile.c parrot-2.8.0/src/packfile.c --- parrot-2.7.0/src/packfile.c 2010-08-17 18:07:13.000000000 +0000 +++ parrot-2.8.0/src/packfile.c 2010-09-21 07:48:51.000000000 +0000 @@ -2,7 +2,7 @@ Copyright (C) 2001-2010, Parrot Foundation. This program is free software. It is subject to the same license as Parrot itself. -$Id: packfile.c 48501 2010-08-15 02:38:57Z plobsing $ +$Id: packfile.c 48895 2010-09-10 00:22:53Z nwellnhof $ =head1 NAME @@ -2632,15 +2632,28 @@ mem_gc_free(interp, byte_code->op_func_table); if (byte_code->op_info_table) mem_gc_free(interp, byte_code->op_info_table); - if (byte_code->op_mapping.libs) + if (byte_code->op_mapping.libs) { + opcode_t n_libs = byte_code->op_mapping.n_libs; + opcode_t i; + + for (i = 0; i < n_libs; i++) { + mem_gc_free(interp, byte_code->op_mapping.libs[i].table_ops); + mem_gc_free(interp, byte_code->op_mapping.libs[i].lib_ops); + } + mem_gc_free(interp, byte_code->op_mapping.libs); + } - byte_code->fixups = NULL; + if (byte_code->annotations) + PackFile_Annotations_destroy(interp, (PackFile_Segment *)byte_code->annotations); + + byte_code->annotations = NULL; byte_code->const_table = NULL; byte_code->debugs = NULL; - byte_code->op_mapping.libs = NULL; + byte_code->fixups = NULL; byte_code->op_func_table = NULL; byte_code->op_info_table = NULL; + byte_code->op_mapping.libs = NULL; } @@ -2765,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, @@ -2836,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", @@ -3189,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; @@ -3215,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); } @@ -3471,22 +3484,11 @@ if (!hash) return; - for (i = 0; i <= hash->mask; ++i) { - HashBucket *bucket = hash->bucket_indices[i]; - - while (bucket) { - PackFile_ConstTable * const table = - (PackFile_ConstTable *)bucket->key; - PackFile_Constant * const orig_consts = table->constants; - PackFile_Constant * const consts = - (PackFile_Constant *) bucket->value; - INTVAL j; - - mem_gc_free(interp, consts); - bucket = bucket->next; - } - } - + parrot_hash_iterate(hash, + PackFile_ConstTable * const table = (PackFile_ConstTable *)_bucket->key; + PackFile_Constant * const orig_consts = table->constants; + PackFile_Constant * const consts = (PackFile_Constant *) _bucket->value; + mem_gc_free(interp, consts);); parrot_hash_destroy(interp, hash); } @@ -3910,6 +3912,11 @@ self->const_count = 0; + if (self->string_hash) { + parrot_hash_destroy(interp, self->string_hash); + self->string_hash = NULL; + } + return; } @@ -4310,6 +4317,10 @@ /* Free any entries. */ if (self->entries) mem_gc_free(interp, self->entries); + + self->keys = NULL; + self->groups = NULL; + self->entries = NULL; } @@ -4452,6 +4463,7 @@ self->num_entries = PF_fetch_opcode(seg->pf, &cursor); self->entries = mem_gc_allocate_n_zeroed_typed(interp, self->num_entries, PackFile_Annotations_Entry); + for (i = 0; i < self->num_entries; ++i) { PackFile_Annotations_Entry * const entry = self->entries + i; entry->bytecode_offset = PF_fetch_opcode(seg->pf, &cursor); @@ -4648,11 +4660,11 @@ /* Add annotations entry. */ if (self->entries) - self->entries = mem_gc_realloc_n_typed(interp, self->entries, - 1 + self->num_entries, PackFile_Annotations_Entry); - else - self->entries = mem_gc_allocate_n_typed(interp, - 1 + self->num_entries, PackFile_Annotations_Entry); + self->entries = mem_gc_realloc_n_typed(interp, self->entries, + 1 + self->num_entries, PackFile_Annotations_Entry); + else + self->entries = mem_gc_allocate_n_typed(interp, + 1 + self->num_entries, PackFile_Annotations_Entry); self->entries[self->num_entries].bytecode_offset = offset; self->entries[self->num_entries].key = key_id; diff -Nru parrot-2.7.0/src/packout.c parrot-2.8.0/src/packout.c --- parrot-2.7.0/src/packout.c 2010-08-17 18:07:13.000000000 +0000 +++ parrot-2.8.0/src/packout.c 2010-09-21 07:48:51.000000000 +0000 @@ -2,7 +2,7 @@ Copyright (C) 2001-2010, Parrot Foundation. This program is free software. It is subject to the same license as Parrot itself. -$Id: packout.c 48528 2010-08-16 18:42:50Z plobsing $ +$Id: packout.c 48926 2010-09-11 05:49:57Z plobsing $ =head1 NAME @@ -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; } } diff -Nru parrot-2.7.0/src/parrot_debugger.c parrot-2.8.0/src/parrot_debugger.c --- parrot-2.7.0/src/parrot_debugger.c 2010-05-24 21:14:28.000000000 +0000 +++ parrot-2.8.0/src/parrot_debugger.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: parrot_debugger.c 46895 2010-05-22 20:30:39Z plobsing $ +$Id: parrot_debugger.c 49021 2010-09-15 17:44:16Z Paul C. Anagnostopoulos $ =head1 NAME @@ -113,7 +113,7 @@ =item C 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 or C @@ -136,6 +136,8 @@ */ +#define PARROT_IN_EXTENSION + #include #include #include @@ -152,7 +154,7 @@ =item C -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 -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 @@ -290,7 +294,7 @@ { fprintf(stderr, "Parrot " PARROT_VERSION " Debugger\n" - "\nPlease note: the debugger is currently under reconstruction\n"); + "(Please note: the debugger is currently under reconstruction)\n"); } /* @@ -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 diff -Nru parrot-2.7.0/src/pbc_dump.c parrot-2.8.0/src/pbc_dump.c --- parrot-2.7.0/src/pbc_dump.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pbc_dump.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: pbc_dump.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: pbc_dump.c 48926 2010-09-11 05:49:57Z plobsing $ =head1 NAME @@ -59,6 +59,7 @@ #include "parrot/parrot.h" #include "parrot/embed.h" #include "parrot/oplib/ops.h" +#include "parrot/oplib/core_ops.h" /* diff -Nru parrot-2.7.0/src/pbc_merge.c parrot-2.8.0/src/pbc_merge.c --- parrot-2.7.0/src/pbc_merge.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pbc_merge.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2005-2010, Parrot Foundation. -$Id: pbc_merge.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: pbc_merge.c 48923 2010-09-10 23:34:18Z plobsing $ =head1 NAME @@ -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); @@ -648,11 +650,11 @@ /* op not yet mapped */ bc->op_count++; bc->op_func_table = - mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count, + mem_gc_realloc_n_typed_zeroed(interp, bc->op_func_table, bc->op_count, bc->op_count - 1, op_func_t); bc->op_func_table[bc->op_count - 1] = op_func; bc->op_info_table = - mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count, + mem_gc_realloc_n_typed_zeroed(interp, bc->op_info_table, bc->op_count, bc->op_count - 1, op_info_t *); bc->op_info_table[bc->op_count - 1] = info; @@ -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; diff -Nru parrot-2.7.0/src/pmc/addrregistry.pmc parrot-2.8.0/src/pmc/addrregistry.pmc --- parrot-2.7.0/src/pmc/addrregistry.pmc 2010-05-05 09:58:28.000000000 +0000 +++ parrot-2.8.0/src/pmc/addrregistry.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2005-2009, Parrot Foundation. -$Id: addrregistry.pmc 46300 2010-05-05 03:58:50Z jimmy $ +$Id: addrregistry.pmc 48944 2010-09-11 23:44:56Z luben $ =head1 NAME @@ -46,9 +46,7 @@ VTABLE void init() { Hash *registry = parrot_create_hash(INTERP, enum_type_int, - Hash_key_type_PMC, - int_compare, - key_hash_int); + Hash_key_type_PMC_ptr); SET_ATTR_hash(INTERP, SELF, registry); PObj_custom_mark_destroy_SETALL(SELF); diff -Nru parrot-2.7.0/src/pmc/bigint.pmc parrot-2.8.0/src/pmc/bigint.pmc --- parrot-2.7.0/src/pmc/bigint.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/bigint.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2010, Parrot Foundation. -$Id: bigint.pmc 48526 2010-08-16 17:34:55Z NotFound $ +$Id: bigint.pmc 48673 2010-08-26 19:54:27Z chromatic $ =head1 NAME @@ -1258,6 +1258,12 @@ PObj_custom_destroy_SET(SELF); } + VTABLE void init_int(INTVAL iv) { + bigint_init(INTERP, SELF); + bigint_set_long(INTERP, SELF, (long)iv); + PObj_custom_destroy_SET(SELF); + } + VTABLE PMC *clone() { PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type); bigint_set(INTERP, res, SELF); diff -Nru parrot-2.7.0/src/pmc/boolean.pmc parrot-2.8.0/src/pmc/boolean.pmc --- parrot-2.7.0/src/pmc/boolean.pmc 2010-06-11 08:06:05.000000000 +0000 +++ parrot-2.8.0/src/pmc/boolean.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: boolean.pmc 47354 2010-06-04 15:52:18Z NotFound $ +$Id: boolean.pmc 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -8,103 +8,193 @@ =head1 DESCRIPTION -This class implements a boolean value variable. +This PMC implements a Boolean type with a single true/false value. +A C does not morph to other types when its value is set; it simply +changes its value. -Albeit the C is derived from the C, -it doesn't morph to other types. Only its value is changed. +This implementation of C inherits from the C PMC. +Unlike the previous implementation, it does I inherit +from C. -=head2 Methods +=head2 Functions -=over 4 +=over =cut */ /* HEADERIZER HFILE: none */ +/* HEADERIZER BEGIN: static */ +/* HEADERIZER END: static */ -pmclass Boolean extends Integer provides boolean provides scalar auto_attrs { +/* This new Boolean PMC stores its boolean value in a private PObj flag. */ + +#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 + +Create a new C with initial value C. + =item C -Initialises SELF value according to the boolean value of the passed PMC. +Create a new C with the given initial value interpreted +as a Boolean. + +=item C + +Create a new C with the given initial value interpreted +as a Boolean. =cut */ + + /* These 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 + VTABLE void init_int(INTVAL value) { + set_boolean_FLAG(SELF, value); + } -Return "1" or "0". +/* -=cut +=item C -*/ - VTABLE STRING *get_string() { - return SUPER(); - } +Obtain the value of the C as an integer: 1 = C, 0 = C. +=item C -/* +Same as C. -=item C +=item C -=item C +Obtain the value of the C as a float: 1.0 = C, 0.0 = C. + +=item C -=item C +Obtain the value of the C as a string: "1" = C, "0" = C. =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 + +Sets the value of the Boolean to the specified integer value: 0 = C, non-0 = +C. + +=item C + +Same as C. + =item C -Sets the value to C evaluated in a boolean context. +Sets the value of the Boolean to the specified float value: 0.0 = C, non-0.0 = +C. + +=item C + +Sets the Boolean to the value represented by the specified string. All values are +considered C except for C<""> and C<"0>", which are considered +C. =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)); + } + /* -=item C +=item C + +Used to archive the C. -Sets the value to C<*value> evaluated in a boolean context. +=item C + +Used to unarchive the C. =cut */ - VTABLE void set_string_native(STRING *value) { - SELF.set_bool(Parrot_str_boolean(INTERP, value)); + VTABLE void freeze(PMC *info) { + SUPER(info); + VTABLE_push_integer(INTERP, info, SELF.get_bool()); } + + VTABLE void thaw(PMC *info) { + SUPER(info); + SELF.set_bool(VTABLE_shift_integer(INTERP, info)); + } + } /* =back +See also the C PMC. + =cut */ diff -Nru parrot-2.7.0/src/pmc/bytebuffer.pmc parrot-2.8.0/src/pmc/bytebuffer.pmc --- parrot-2.7.0/src/pmc/bytebuffer.pmc 2010-06-21 08:21:00.000000000 +0000 +++ parrot-2.8.0/src/pmc/bytebuffer.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: bytebuffer.pmc 47724 2010-06-20 09:17:23Z NotFound $ +$Id: bytebuffer.pmc 49001 2010-09-14 18:00:28Z NotFound $ =head1 NAME @@ -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 */ @@ -306,26 +303,23 @@ =over 4 -=item C +=item C -Create a string with the buffer content and the charset and encoding -specified. +Create a string with the buffer content and the encoding specified. =cut */ - 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); } @@ -333,7 +327,7 @@ =item C -Create a string with the buffer content and the same charset and encoding +Create a string with the buffer content and the same encoding as the string argument. =cut @@ -344,11 +338,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,9 +362,9 @@ decrease the number of reallocations. =item C +*content, INTVAL size, const STR_VTABLE *encoding)> -Build a string fro the buffer content with the charset and encoding specified. +Build a string from the buffer content with the encoding specified. =cut @@ -391,25 +385,23 @@ 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; + else { + STRING * const result = Parrot_str_new_init(interp, + (const char *)content, size, encoding, 0); + if (!STRING_validate(interp, result)) + Parrot_ex_throw_from_c_args(interp, NULL, + EXCEPTION_INVALID_STRING_REPRESENTATION, + "Invalid buffer content"); + return result; + } } /* diff -Nru parrot-2.7.0/src/pmc/callcontext.pmc parrot-2.8.0/src/pmc/callcontext.pmc --- parrot-2.7.0/src/pmc/callcontext.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/callcontext.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2008-2010, Parrot Foundation. -$Id: callcontext.pmc 48526 2010-08-16 17:34:55Z NotFound $ +$Id: callcontext.pmc 49013 2010-09-15 05:33:29Z luben $ =head1 NAME @@ -208,7 +208,7 @@ GETATTR_CallContext_num_positionals(interp, self, num_positionals); memcpy(new_array, array, num_positionals * sizeof (Pcc_cell)); - if (num_positionals > 8) + if (allocated_positionals > 8) Parrot_gc_free_memory_chunk(interp, array); else Parrot_gc_free_fixed_size_storage(interp, @@ -390,9 +390,7 @@ if (!hash) { hash = parrot_create_hash(interp, enum_type_ptr, - Hash_key_type_STRING, - STRING_compare, - (hash_hash_key_fn)key_hash_STRING); + Hash_key_type_STRING); SETATTR_CallContext_hash(interp, SELF, hash); } @@ -468,17 +466,9 @@ mark_hash(PARROT_INTERP, ARGIN(Hash *h)) { ASSERT_ARGS(mark_hash) - INTVAL i; - - for (i = h->mask; i >= 0; --i) { - HashBucket *b = h->bucket_indices[i]; - - while (b) { - Parrot_gc_mark_STRING_alive(interp, (STRING *)b->key); - mark_cell(interp, (Pcc_cell *)b->value); - b = b->next; - } - } + parrot_hash_iterate(h, + Parrot_gc_mark_STRING_alive(interp, (STRING *)_bucket->key); + mark_cell(interp, (Pcc_cell *)_bucket->value);); } /* @@ -500,19 +490,10 @@ /* yes, this *looks* risky, but it's a Parrot STRING hash internally */ if (hash && hash->entries) { - UINTVAL i, j = 0; + UINTVAL j = 0; PMC *result = Parrot_pmc_new_init_int(interp, enum_class_FixedStringArray, hash->entries); - - for (i = 0; i <= hash->mask; ++i) { - HashBucket *b = hash->bucket_indices[i]; - - while (b) { - VTABLE_set_string_keyed_int(interp, result, - j++, (STRING *)b->key); - b = b->next; - } - } - + parrot_hash_iterate(hash, + VTABLE_set_string_keyed_int(interp, result, j++, (STRING *)_bucket->key);); return result; } @@ -702,17 +683,8 @@ GET_ATTR_hash(INTERP, SELF, hash); if (hash) { - UINTVAL i; - - for (i = 0; i <= hash->mask; ++i) { - HashBucket *b = hash->bucket_indices[i]; - - while (b) { - FREE_CELL(INTERP, (Pcc_cell *)b->value); - b = b->next; - } - } - + parrot_hash_iterate(hash, + FREE_CELL(INTERP, (Pcc_cell *)_bucket->value);); parrot_hash_destroy(INTERP, hash); SET_ATTR_hash(INTERP, SELF, NULL); } @@ -740,17 +712,8 @@ } if (hash) { - UINTVAL i; - - for (i = 0; i <= hash->mask; ++i) { - HashBucket *b = hash->bucket_indices[i]; - - while (b) { - FREE_CELL(INTERP, (Pcc_cell *)b->value); - b = b->next; - } - } - + parrot_hash_iterate(hash, + FREE_CELL(INTERP, (Pcc_cell *)_bucket->value);); parrot_hash_destroy(INTERP, hash); } @@ -1024,14 +987,14 @@ else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "handlers"))) GET_ATTR_handlers(INTERP, SELF, value); else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "current_HLL"))) { - /* This function from src/hash.c. */ - /* We probably have to move it to more suitable place */ GET_ATTR_current_HLL(INTERP, SELF, hll); - value = get_integer_pmc(INTERP, hll); + value = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer)); + VTABLE_set_integer_native(interp, value, hll); } else if (Parrot_str_equal(INTERP, key, CONST_STRING(INTERP, "current_hll"))) { GET_ATTR_current_HLL(INTERP, SELF, hll); - value = get_string_pmc(INTERP, Parrot_get_HLL_name(INTERP, hll)); + value = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String)); + VTABLE_set_string_native(interp, value, Parrot_get_HLL_name(INTERP, hll)); } else Parrot_ex_throw_from_c_args(INTERP, NULL, @@ -1381,7 +1344,8 @@ } VTABLE INTVAL get_integer_keyed_str(STRING *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_string(INTERP, hash, key); @@ -1395,7 +1359,8 @@ } VTABLE FLOATVAL get_number_keyed_str(STRING *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_string(INTERP, hash, key); @@ -1410,7 +1375,8 @@ VTABLE STRING * get_string_keyed_str(STRING *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_string(INTERP, hash, key); @@ -1424,7 +1390,8 @@ } VTABLE PMC * get_pmc_keyed_str(STRING *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_string(INTERP, hash, key); @@ -1442,7 +1409,8 @@ } VTABLE INTVAL get_integer_keyed(PMC *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_pmc(INTERP, hash, key); @@ -1456,7 +1424,8 @@ } VTABLE FLOATVAL get_number_keyed(PMC *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_pmc(INTERP, hash, key); @@ -1470,7 +1439,8 @@ } VTABLE STRING * get_string_keyed(PMC *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_pmc(INTERP, hash, key); @@ -1484,7 +1454,8 @@ } VTABLE PMC * get_pmc_keyed(PMC *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_pmc(INTERP, hash, key); @@ -1502,7 +1473,8 @@ } VTABLE INTVAL exists_keyed(PMC *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_pmc(INTERP, hash, key); @@ -1513,7 +1485,8 @@ } VTABLE INTVAL exists_keyed_str(STRING *key) { - Hash * const hash = get_hash(INTERP, SELF); + Hash *hash; + GETATTR_CallContext_hash(INTERP, SELF, hash); if (hash) { void * const k = hash_key_from_string(INTERP, hash, key); @@ -1549,6 +1522,7 @@ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type); INTVAL num; Pcc_cell *our_cells, *dest_cells; + Hash *hash; GET_ATTR_num_positionals(INTERP, SELF, num); /* Copy positionals */ @@ -1563,6 +1537,8 @@ GET_ATTR_arg_flags(INTERP, SELF, arg_flags); GET_ATTR_return_flags(INTERP, SELF, return_flags); + GET_ATTR_hash(INTERP, SELF, hash); + if (!PMC_IS_NULL(type_tuple)) SET_ATTR_type_tuple(INTERP, dest, VTABLE_clone(INTERP, type_tuple)); @@ -1575,8 +1551,8 @@ if (!PMC_IS_NULL(return_flags)) SET_ATTR_return_flags(INTERP, dest, VTABLE_clone(INTERP, return_flags)); - parrot_hash_clone(INTERP, get_hash(INTERP, SELF), - get_hash(INTERP, dest)); + if (hash) + parrot_hash_clone(INTERP, hash, get_hash(INTERP, dest)); return dest; } diff -Nru parrot-2.7.0/src/pmc/capture.pmc parrot-2.8.0/src/pmc/capture.pmc --- parrot-2.7.0/src/pmc/capture.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/capture.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: capture.pmc 48444 2010-08-13 06:39:10Z NotFound $ +$Id: capture.pmc 48652 2010-08-25 12:05:24Z nwellnhof $ =head1 NAME @@ -731,6 +731,8 @@ GET_ATTR_hash(INTERP, capture, hash); SET_ATTR_array(INTERP, SELF, array); SET_ATTR_hash(INTERP, SELF, hash); + if (!PMC_IS_NULL(array) || !PMC_IS_NULL(hash)) + PObj_custom_mark_SET(SELF); } else Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, diff -Nru parrot-2.7.0/src/pmc/class.pmc parrot-2.8.0/src/pmc/class.pmc --- parrot-2.7.0/src/pmc/class.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/class.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: class.pmc 48526 2010-08-16 17:34:55Z NotFound $ +$Id: class.pmc 48944 2010-09-11 23:44:56Z luben $ =head1 NAME @@ -141,20 +141,11 @@ __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) __attribute__nonnull__(2); -static int pointer_compare(SHIM_INTERP, - ARGIN_NULLOK(const void *a), - ARGIN_NULLOK(const void *b)); - #define ASSERT_ARGS_build_attrib_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(self)) @@ -178,49 +169,14 @@ , 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)) -#define ASSERT_ARGS_pointer_compare __attribute__unused__ int _ASSERT_ARGS_CHECK = (0) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ /* -=item C - -=cut - -*/ - -static int -pointer_compare(SHIM_INTERP, ARGIN_NULLOK(const void *a), - ARGIN_NULLOK(const void *b)) -{ - ASSERT_ARGS(pointer_compare) - return a != b; -} - -/* - -=item C - -=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 @@ -689,7 +645,7 @@ (Parrot_Class_attributes *) PMC_data(SELF); /* Set flag for custom GC mark. */ - PObj_custom_mark_SET(SELF); + PObj_custom_mark_destroy_SETALL(SELF); /* Set up the object. */ _class->name = CONST_STRING(INTERP, ""); @@ -706,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)pointer_compare, (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); @@ -1451,10 +1408,14 @@ if (PMC_IS_NULL(lookup)) return 0; - if (PObj_is_class_TEST(lookup) && lookup == SELF) - return 1; - - classobj = Parrot_oo_get_class(INTERP, lookup); + if (PObj_is_class_TEST(lookup)) { + if (lookup == SELF) + return 1; + else + classobj = lookup; + } + else + classobj = Parrot_oo_get_class(INTERP, lookup); if (PMC_IS_NULL(classobj)) return 0; diff -Nru parrot-2.7.0/src/pmc/codestring.pmc parrot-2.8.0/src/pmc/codestring.pmc --- parrot-2.7.0/src/pmc/codestring.pmc 2010-05-11 00:29:03.000000000 +0000 +++ parrot-2.8.0/src/pmc/codestring.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2007-2010, Parrot Foundation. -$Id: codestring.pmc 46390 2010-05-07 15:02:22Z bacek $ +$Id: codestring.pmc 49191 2010-09-20 23:56:30Z luben $ =head1 NAME diff -Nru parrot-2.7.0/src/pmc/complex.pmc parrot-2.8.0/src/pmc/complex.pmc --- parrot-2.7.0/src/pmc/complex.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/complex.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2010, Parrot Foundation. -$Id: complex.pmc 48435 2010-08-12 19:37:47Z chromatic $ +$Id: complex.pmc 48883 2010-09-09 13:45:02Z whiteknight $ =head1 NAME @@ -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 */ diff -Nru parrot-2.7.0/src/pmc/continuation.pmc parrot-2.8.0/src/pmc/continuation.pmc --- parrot-2.7.0/src/pmc/continuation.pmc 2010-05-19 09:28:37.000000000 +0000 +++ parrot-2.8.0/src/pmc/continuation.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: continuation.pmc 46700 2010-05-16 12:30:35Z bacek $ +$Id: continuation.pmc 48948 2010-09-12 00:49:45Z NotFound $ =head1 NAME @@ -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. */ diff -Nru parrot-2.7.0/src/pmc/default.pmc parrot-2.8.0/src/pmc/default.pmc --- parrot-2.7.0/src/pmc/default.pmc 2010-08-06 11:23:29.000000000 +0000 +++ parrot-2.8.0/src/pmc/default.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: default.pmc 48325 2010-08-05 06:30:27Z NotFound $ +$Id: default.pmc 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -533,6 +533,22 @@ /* +=item C + +Throws an exception, as you can only add an attribute to something Class-y or +Role-y. + +=cut + +*/ + + VTABLE void add_attribute(STRING *name, PMC *type) { + Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, + "Cannot add attribute to non-class"); + } + +/* + =item C Return the namespace for this PMC. @@ -781,7 +797,7 @@ INTVAL hashvalue() { STRING *s = SELF.get_string(); - return key_hash_STRING(INTERP, s, 0); + return Parrot_str_to_hashval(INTERP, s); } /* @@ -1839,56 +1855,6 @@ return retval; } -/* - -=item C - -Default fallback. Performs a multiple dispatch call for 'logical_or'. - -=cut - -*/ - - VTABLE PMC *logical_or(PMC *value, PMC *dest) { - PMC *result = PMCNULL; - Parrot_mmd_multi_dispatch_from_c_args(INTERP, - "logical_or", "PPP->P", SELF, value, dest, &result); - return result; - } - -/* - -=item C - -Default fallback. Performs a multiple dispatch call for 'logical_and'. - -=cut - -*/ - - VTABLE PMC *logical_and(PMC *value, PMC *dest) { - PMC *result = PMCNULL; - Parrot_mmd_multi_dispatch_from_c_args(INTERP, - "logical_and", "PPP->P", SELF, value, dest, &result); - return result; - } - -/* - -=item C - -Default fallback. Performs a multiple dispatch call for 'logical_xor'. - -=cut - -*/ - - VTABLE PMC *logical_xor(PMC *value, PMC *dest) { - PMC *result = PMCNULL; - Parrot_mmd_multi_dispatch_from_c_args(INTERP, - "logical_xor", "PPP->P", SELF, value, dest, &result); - return result; - } /* diff -Nru parrot-2.7.0/src/pmc/eval.pmc parrot-2.8.0/src/pmc/eval.pmc --- parrot-2.7.0/src/pmc/eval.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/eval.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: eval.pmc 48526 2010-08-16 17:34:55Z NotFound $ +$Id: eval.pmc 48956 2010-09-12 13:45:25Z jkeenan $ =head1 NAME @@ -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) { diff -Nru parrot-2.7.0/src/pmc/exception.pmc parrot-2.8.0/src/pmc/exception.pmc --- parrot-2.7.0/src/pmc/exception.pmc 2010-05-30 21:14:07.000000000 +0000 +++ parrot-2.8.0/src/pmc/exception.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: exception.pmc 47121 2010-05-30 00:59:52Z jonathan $ +$Id: exception.pmc 48734 2010-08-31 11:55:31Z NotFound $ =head1 NAME @@ -166,6 +166,46 @@ /* +=item C + +Create a copy of the Exception. + +Copy only the user supplied values, not the throwing and handling +information. + +=cut + +*/ + + VTABLE PMC *clone() { + PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type); + INTVAL id; + STRING *message; + PMC *payload; + INTVAL severity; + INTVAL type; + INTVAL exit_code; + GET_ATTR_id(INTERP, SELF, id); + SET_ATTR_id(INTERP, dest, id); + GET_ATTR_message(INTERP, SELF, message); + SET_ATTR_message(INTERP, dest, message); + GET_ATTR_severity(INTERP, SELF, severity); + SET_ATTR_severity(INTERP, dest, severity); + GET_ATTR_type(INTERP, SELF, type); + SET_ATTR_type(INTERP, dest, type); + GET_ATTR_exit_code(INTERP, SELF, exit_code); + SET_ATTR_exit_code(INTERP, dest, exit_code); + + GET_ATTR_payload(INTERP, SELF, payload); + if (!PMC_IS_NULL(payload)) { + payload = VTABLE_clone(INTERP, payload); + SET_ATTR_payload(INTERP, dest, payload); + } + return dest; + } + +/* + =item C Mark any active exception data as live. @@ -261,7 +301,7 @@ /* -=item C +=item C Returns the integer value for C<*key>. @@ -269,11 +309,9 @@ */ - VTABLE INTVAL get_integer_keyed(PMC *key) { - STRING * const name = VTABLE_get_string(INTERP, key); - INTVAL result = 0; - - switch (getAttrEnum(INTERP, name)) { + VTABLE INTVAL get_integer_keyed_str(STRING *key) { + INTVAL result = 0; + switch (getAttrEnum(INTERP, key)) { case attr_type: GET_ATTR_type(INTERP, SELF, result); break; @@ -289,7 +327,7 @@ default: /* If unknown attribute name, throw an exception. */ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND, - "No such integer attribute '%S'", name); + "No such integer attribute '%S'", key); } return result; @@ -297,7 +335,7 @@ /* -=item C +=item C Returns the integer value for C<*key>. @@ -305,28 +343,9 @@ */ - VTABLE INTVAL get_integer_keyed_str(STRING *key) { - INTVAL result = 0; - switch (getAttrEnum(INTERP, key)) { - case attr_type: - GET_ATTR_type(INTERP, SELF, result); - break; - case attr_severity: - GET_ATTR_severity(INTERP, SELF, result); - break; - case attr_exit_code: - GET_ATTR_exit_code(INTERP, SELF, result); - break; - case attr_handled: - GET_ATTR_handled(INTERP, SELF, result); - break; - default: - /* If unknown attribute name, throw an exception. */ - Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND, - "No such integer attribute '%S'", key); - } - - return result; + VTABLE INTVAL get_integer_keyed(PMC *key) { + STRING * const name = VTABLE_get_string(INTERP, key); + return SELF.get_integer_keyed_str(name); } /* @@ -414,7 +433,7 @@ /* -=item C +=item C Sets the integer value for C<*key>. @@ -422,9 +441,8 @@ */ - VTABLE void set_integer_keyed(PMC *key, INTVAL value) { - STRING * const name = VTABLE_get_string(INTERP, key); - switch (getAttrEnum(INTERP, name)) { + VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) { + switch (getAttrEnum(INTERP, key)) { case attr_type: SET_ATTR_type(INTERP, SELF, value); break; @@ -440,13 +458,13 @@ default: /* If unknown attribute name, throw an exception. */ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND, - "No such integer attribute '%S'", name); + "No such integer attribute '%S'", key); } } /* -=item C +=item C Sets the integer value for C<*key>. @@ -454,25 +472,9 @@ */ - VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) { - switch (getAttrEnum(INTERP, key)) { - case attr_type: - SET_ATTR_type(INTERP, SELF, value); - break; - case attr_severity: - SET_ATTR_severity(INTERP, SELF, value); - break; - case attr_exit_code: - SET_ATTR_exit_code(INTERP, SELF, value); - break; - case attr_handled: - SET_ATTR_handled(INTERP, SELF, value); - break; - default: - /* If unknown attribute name, throw an exception. */ - Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_ATTRIB_NOT_FOUND, - "No such integer attribute '%S'", key); - } + VTABLE void set_integer_keyed(PMC *key, INTVAL value) { + STRING * const name = VTABLE_get_string(INTERP, key); + SELF.set_integer_keyed_str(name, value); } /* @@ -588,6 +590,7 @@ GET_ATTR_exit_code(INTERP, SELF, exit_code); value = Parrot_pmc_new_init_int(INTERP, enum_class_Integer, exit_code); } + break; case attr_handled: { INTVAL handled; @@ -784,6 +787,7 @@ */ METHOD backtrace() { + STRING * const meth_backtrace = CONST_STRING(INTERP, "backtrace"); PMC *result = PMCNULL; PMC *resume; @@ -792,7 +796,8 @@ if (!PMC_IS_NULL(resume)) { /* We have a resume continuation, so we can get the address from that. */ const Parrot_Continuation_attributes * const cont = PARROT_CONTINUATION(resume); - Parrot_pcc_invoke_method_from_c_args(INTERP, cont->to_ctx, CONST_STRING(INTERP, "backtrace"), "P->P", resume, &result); + Parrot_pcc_invoke_method_from_c_args(INTERP, cont->to_ctx, meth_backtrace, + "P->P", resume, &result); } else { /* Hopefully we have a thrower set - our most epic fail fallback is @@ -801,7 +806,8 @@ GET_ATTR_thrower(INTERP, SELF, cur_ctx); if (PMC_IS_NULL(cur_ctx)) cur_ctx = CURRENT_CONTEXT(INTERP); - Parrot_pcc_invoke_method_from_c_args(INTERP, cur_ctx, CONST_STRING(INTERP, "backtrace"), "->P", &result); + Parrot_pcc_invoke_method_from_c_args(INTERP, cur_ctx, meth_backtrace, + "->P", &result); } RETURN(PMC *result); diff -Nru parrot-2.7.0/src/pmc/filehandle.pmc parrot-2.8.0/src/pmc/filehandle.pmc --- parrot-2.7.0/src/pmc/filehandle.pmc 2010-06-26 14:36:55.000000000 +0000 +++ parrot-2.8.0/src/pmc/filehandle.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2008-2010, Parrot Foundation. -$Id: filehandle.pmc 47784 2010-06-23 15:19:57Z NotFound $ +$Id: filehandle.pmc 49037 2010-09-16 08:22:52Z tcurtis $ =head1 NAME @@ -373,18 +373,24 @@ #ifdef PARROT_HAS_READLINE /* 4-column indent to get c_indent.t to DTRT */ - char * const r = readline(got_prompt ? prompt->strstart : NULL); + char *prompt_cstring = + (got_prompt ? Parrot_str_to_cstring(INTERP, prompt) : NULL); + char * const r = readline(prompt_cstring); + Parrot_str_free_cstring(prompt_cstring); if (r) { if (*r) add_history(r); string_result = Parrot_str_new(INTERP, r, 0); - mem_internal_free(r); + free(r); } #else - if (got_prompt) - fprintf(stderr, "%s", prompt->strstart); + if (got_prompt) { + char *prompt_cstring = Parrot_str_to_cstring(INTERP, prompt); + fprintf(stderr, "%s", prompt_cstring); + Parrot_str_free_cstring(prompt_cstring); + } if (!(PARROT_FILEHANDLE(SELF)->flags & PIO_F_LINEBUF)) Parrot_io_setlinebuf(INTERP, SELF); @@ -463,6 +469,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 +480,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); diff -Nru parrot-2.7.0/src/pmc/fixedbooleanarray.pmc parrot-2.8.0/src/pmc/fixedbooleanarray.pmc --- parrot-2.7.0/src/pmc/fixedbooleanarray.pmc 2010-05-05 09:58:28.000000000 +0000 +++ parrot-2.8.0/src/pmc/fixedbooleanarray.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: fixedbooleanarray.pmc 46300 2010-05-05 03:58:50Z jimmy $ +$Id: fixedbooleanarray.pmc 48998 2010-09-14 14:27:41Z NotFound $ =head1 NAME @@ -334,10 +334,8 @@ */ VTABLE PMC *get_pmc_keyed_int(INTVAL key) { - PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Boolean); - const INTVAL val = SELF.get_integer_keyed_int(key); - VTABLE_set_integer_native(INTERP, ret, val); - return ret; + return Parrot_pmc_new_init_int(INTERP, enum_class_Boolean, + SELF.get_integer_keyed_int(key)); } /* diff -Nru parrot-2.7.0/src/pmc/float.pmc parrot-2.8.0/src/pmc/float.pmc --- parrot-2.7.0/src/pmc/float.pmc 2010-04-30 14:50:29.000000000 +0000 +++ parrot-2.8.0/src/pmc/float.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2003-2009, Parrot Foundation. -$Id: float.pmc 46193 2010-04-30 08:53:15Z jimmy $ +$Id: float.pmc 49077 2010-09-17 09:35:49Z fperrad $ =head1 NAME @@ -77,7 +77,8 @@ =item C -Returns an integer representation of the number (by casting). +Returns an integer representation of the number by truncating +(rounding toward zero). =cut @@ -138,12 +139,14 @@ */ VTABLE void set_integer_native(INTVAL value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_Integer, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_Integer), 0); SELF.set_integer_native(value); } VTABLE void set_bool(INTVAL value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_Boolean), 0); SELF.set_bool(value); } @@ -174,7 +177,8 @@ */ VTABLE void set_string_native(STRING *value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_String), 0); SELF.set_string_native(value); } @@ -391,6 +395,10 @@ =item C +=item C + +=item C + =item C =item C @@ -425,13 +433,6 @@ RETURN(PMC *d); } - METHOD cos() { - PMC * const d = Parrot_pmc_new(INTERP, - Parrot_get_ctx_HLL_type(INTERP, enum_class_Float)); - SET_ATTR_fv(INTERP, d, cos(SELF.get_number())); - RETURN(PMC *d); - } - METHOD asec() { PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); SET_ATTR_fv(INTERP, d, acos(1.0 / SELF.get_number())); @@ -456,12 +457,31 @@ RETURN(PMC *d); } + METHOD cos() { + PMC * const d = Parrot_pmc_new(INTERP, + Parrot_get_ctx_HLL_type(INTERP, enum_class_Float)); + SET_ATTR_fv(INTERP, d, cos(SELF.get_number())); + RETURN(PMC *d); + } + METHOD cosh() { PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); SET_ATTR_fv(INTERP, d, cosh(SELF.get_number())); RETURN(PMC *d); } + METHOD cot() { + PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); + SET_ATTR_fv(INTERP, d, 1.0 / tan(SELF.get_number())); + RETURN(PMC *d); + } + + METHOD csc() { + PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); + SET_ATTR_fv(INTERP, d, 1.0 / sin(SELF.get_number())); + RETURN(PMC *d); + } + METHOD exp() { PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); SET_ATTR_fv(INTERP, d, exp(SELF.get_number())); diff -Nru parrot-2.7.0/src/pmc/hashiterator.pmc parrot-2.8.0/src/pmc/hashiterator.pmc --- parrot-2.7.0/src/pmc/hashiterator.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/hashiterator.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: hashiterator.pmc 48406 2010-08-11 03:00:11Z jkeenan $ +$Id: hashiterator.pmc 49178 2010-09-20 16:37:03Z luben $ =head1 NAME @@ -78,24 +78,34 @@ advance_to_next(PARROT_INTERP, ARGMOD(PMC *self)) { ASSERT_ARGS(advance_to_next) - Parrot_HashIterator_attributes * const attrs = PARROT_HASHITERATOR(self); - HashBucket *bucket = attrs->bucket; - - /* Try to advance current bucket */ - if (bucket) - bucket = bucket->next; - - while (!bucket) { - /* If there is no more buckets */ - if (attrs->pos == attrs->total_buckets) - break; - - bucket = attrs->parrot_hash->bucket_indices[attrs->pos++]; + if (attrs->parrot_hash->key_type == Hash_key_type_int + || attrs->parrot_hash->key_type == Hash_key_type_ptr + || attrs->parrot_hash->key_type == Hash_key_type_cstring){ + /* indexed scan */ + if (attrs->elements){ + if (attrs->bucket) + attrs->bucket = attrs->bucket->next; + while (!attrs->bucket) { + /* If there is no more buckets */ + if (attrs->pos == attrs->total_buckets) + break; + attrs->bucket = attrs->parrot_hash->index[attrs->pos++]; + } + } + } + else{ + /* linear scan */ + if (!attrs->bucket) + attrs->bucket = attrs->parrot_hash->buckets; + while (attrs->elements > 0) { + attrs->bucket = attrs->parrot_hash->buckets + attrs->pos++; + if (attrs->bucket->key) + break; + } } - attrs->bucket = bucket; - --attrs->elements; + --attrs->elements; return; } @@ -125,17 +135,11 @@ attrs->pmc_hash = hash; attrs->parrot_hash = (Hash*)VTABLE_get_pointer(INTERP, hash); attrs->total_buckets = attrs->parrot_hash->mask + 1; - attrs->bucket = 0; + attrs->elements = attrs->parrot_hash->entries; + attrs->bucket = NULL; attrs->pos = 0; - /* Will be decreased on initial advance_to_next */ - /* XXX Do we really need to support this use-case ? */ - attrs->elements = attrs->parrot_hash->entries + 1; PObj_custom_mark_SET(SELF); - - /* Initial state of iterator is "before start" */ - /* So, advance to first element */ - advance_to_next(INTERP, SELF); } /* @@ -178,9 +182,9 @@ if (value == ITERATE_FROM_START) { /* Restart iterator */ - attrs->bucket = 0; + attrs->elements = attrs->parrot_hash->entries; + attrs->bucket = NULL; attrs->pos = 0; - advance_to_next(INTERP, SELF); return; } @@ -212,7 +216,8 @@ */ VTABLE INTVAL get_bool() { - return PARROT_HASHITERATOR(SELF)->bucket != 0; + return PARROT_HASHITERATOR(SELF)->elements != 0; + } /* @@ -230,7 +235,7 @@ } VTABLE INTVAL get_integer() { - return SELF.elements(); + return PARROT_HASHITERATOR(SELF)->elements; } /* @@ -250,7 +255,10 @@ PMC *ret; - if (!attrs->bucket) + /* Move to next bucket */ + advance_to_next(INTERP, SELF); + + if (attrs->elements < 0) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); @@ -258,9 +266,6 @@ VTABLE_set_pointer_keyed_int(INTERP, ret, 0, attrs->parrot_hash); VTABLE_set_pointer_keyed_int(INTERP, ret, 1, attrs->bucket); - /* Move to next bucket */ - advance_to_next(INTERP, SELF); - return ret; } @@ -269,17 +274,15 @@ */ VTABLE STRING* shift_string() { - Parrot_HashIterator_attributes * const attrs = - PARROT_HASHITERATOR(SELF); - HashBucket * const bucket = attrs->bucket; - - if (!attrs->parrot_hash || !attrs->bucket) - return CONST_STRING(INTERP, ""); + Parrot_HashIterator_attributes * const attrs = PARROT_HASHITERATOR(SELF); /* Move to next bucket */ advance_to_next(INTERP, SELF); - return hash_key_to_string(INTERP, attrs->parrot_hash, bucket->key); + if (attrs->elements < 0) + return CONST_STRING(INTERP, ""); + + return hash_key_to_string(INTERP, attrs->parrot_hash, attrs->bucket->key); } } diff -Nru parrot-2.7.0/src/pmc/hash.pmc parrot-2.8.0/src/pmc/hash.pmc --- parrot-2.7.0/src/pmc/hash.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/hash.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: hash.pmc 48484 2010-08-14 00:48:56Z chromatic $ +$Id: hash.pmc 49190 2010-09-20 23:56:22Z luben $ =head1 NAME @@ -50,8 +50,62 @@ /* HEADERIZER HFILE: none */ /* 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 PMC* get_next_hash(PARROT_INTERP, + ARGMOD(Hash *hash), + ARGIN(void *key)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*hash); + +#define ASSERT_ARGS_get_next_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(hash) \ + , PARROT_ASSERT_ARG(key)) +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ +/* + +=item C + +Get the next hash for multipart keys. Autovivify a hash if it doesn't exist. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static PMC* +get_next_hash(PARROT_INTERP, ARGMOD(Hash *hash), ARGIN(void *key)) +{ + ASSERT_ARGS(get_next_hash) + PMC *next_hash; + HashBucket *bucket; + + if (hash->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); + + bucket = parrot_hash_get_bucket(interp, hash, key); + + if (bucket) { + next_hash = (PMC *)bucket->value; + } + else { + /* autovivify a Hash */ + next_hash = Parrot_pmc_new(interp, enum_class_Hash); + parrot_hash_put(interp, hash, key, next_hash); + } + + return next_hash; +} + pmclass Hash provides hash auto_attrs { ATTR Hash *hash; @@ -87,9 +141,7 @@ attr->hash = parrot_create_hash(INTERP, (PARROT_DATA_TYPE)value_type, - Hash_key_type_STRING, - STRING_compare, - (hash_hash_key_fn)key_hash_STRING); + Hash_key_type_STRING); PObj_custom_mark_destroy_SETALL(SELF); } @@ -98,6 +150,7 @@ if (hash) parrot_hash_destroy(INTERP, hash); } + /* =item C @@ -178,23 +231,17 @@ if (type == Hash_key_type_STRING) new_hash = parrot_create_hash(INTERP, entry_type, - Hash_key_type_STRING, - STRING_compare, - (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, - int_compare, - 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)PMC_compare, - (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 */ @@ -243,9 +290,9 @@ /* If someone called Hash.set_pointer with NULL pointer... - It will create STRING* keys hash. Because we can't use STRING_compare - directly - it declared static in F + It will create STRING* keys hash. */ + if (old_hash && old_hash->entry_type == type) return; @@ -255,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 : STRING_compare, - 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, @@ -328,12 +373,13 @@ } VTABLE STRING *get_repr() { - /* TT #1231: Use freeze in get_repr() (for hashes) */ - PMC * const iter = VTABLE_get_iter(INTERP, SELF); - STRING *res = CONST_STRING(INTERP, "{"); - const INTVAL n = VTABLE_elements(INTERP, SELF); + PMC * const iter = VTABLE_get_iter(INTERP, SELF); + PMC *sb = Parrot_pmc_new(INTERP, enum_class_StringBuilder); + const INTVAL n = VTABLE_elements(INTERP, SELF); INTVAL j; + VTABLE_push_string(INTERP, sb, CONST_STRING(INTERP, "{")); + for (j = 0; j < n; ++j) { STRING * const key = VTABLE_shift_string(INTERP, iter); char * const key_str = Parrot_str_to_cstring(INTERP, key); @@ -352,25 +398,22 @@ Parrot_str_free_cstring(key_str); if (all_digit) { - res = Parrot_str_concat(INTERP, res, key); + VTABLE_push_string(INTERP, sb, key); } else { - res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "'")); - res = Parrot_str_concat(INTERP, res, key); - res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "'")); + VTABLE_push_string(INTERP, sb, CONST_STRING(INTERP, "'")); + VTABLE_push_string(INTERP, sb, key); + VTABLE_push_string(INTERP, sb, CONST_STRING(INTERP, "'")); } - - res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ": ")); + VTABLE_push_string(INTERP, sb, CONST_STRING(INTERP, ":")); val = SELF.get_pmc_keyed_str(key); - res = Parrot_str_concat(INTERP, res, VTABLE_get_string(INTERP, val)); + VTABLE_push_string(INTERP, sb, VTABLE_get_string(INTERP, val)); if (j < n - 1) - res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, ", ")); + VTABLE_push_string(INTERP, sb, CONST_STRING(INTERP, ", ")); } - res = Parrot_str_concat(INTERP, res, CONST_STRING(INTERP, "}")); - - return res; + return VTABLE_get_string(INTERP, sb); } /* @@ -416,24 +459,25 @@ /* Handling Keys */ VTABLE INTVAL get_integer_keyed(PMC *key) { - const Hash * const hash = (Hash *)SELF.get_pointer(); - HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, - hash_key_from_pmc(INTERP, hash, key)); - PMC *valpmc; - PMC *nextkey; + const Hash * const hash = (Hash *)SELF.get_pointer(); + const void * const hash_key = hash_key_from_pmc(INTERP, hash, key); + HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, hash_key); if (!b) return 0; - nextkey = key_next(INTERP, key); - valpmc = hash_value_to_pmc(INTERP, hash, b->value); + key = key_next(INTERP, key); /* Stop recursion. This is last step */ - if (!nextkey) - return VTABLE_get_integer(INTERP, valpmc); + if (!key) + return hash_value_to_int(INTERP, hash, b->value); + + if (hash->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); - /* Recusively call to enclosed aggregate */ - return VTABLE_get_integer_keyed(INTERP, valpmc, nextkey); + /* Recursively call to enclosed aggregate */ + return VTABLE_get_integer_keyed(INTERP, (PMC *)b->value, key); } /* @@ -445,11 +489,8 @@ */ VTABLE void set_integer_keyed(PMC *key, INTVAL value) { - Hash * const hash = (Hash *)SELF.get_pointer(); - void * const keystr = hash_key_from_pmc(INTERP, hash, key); - PMC * const nextkey = key_next(INTERP, key); - PMC *box; - HashBucket *b; + Hash * const hash = (Hash *)SELF.get_pointer(); + void * const hash_key = hash_key_from_pmc(INTERP, hash, key); if (PObj_constant_TEST(SELF) && !PObj_constant_TEST((PObj *)key)) @@ -457,23 +498,16 @@ EXCEPTION_INVALID_OPERATION, "Used non-constant PMC key in constant hash."); - if (!nextkey) { - parrot_hash_put(INTERP, hash, keystr, + key = key_next(INTERP, key); + + if (!key) { + parrot_hash_put(INTERP, hash, hash_key, hash_value_from_int(INTERP, hash, value)); - return; } - - b = parrot_hash_get_bucket(INTERP, hash, keystr); - if (b) - box = hash_value_to_pmc(INTERP, hash, b->value); else { - /* autovivify an Hash */ - box = Parrot_pmc_new(INTERP, SELF.type()); - parrot_hash_put(INTERP, hash, keystr, - hash_value_from_pmc(INTERP, hash, box)); + PMC * const next_hash = get_next_hash(INTERP, hash, hash_key); + VTABLE_set_integer_keyed(INTERP, next_hash, key, value); } - - VTABLE_set_integer_keyed(INTERP, box, nextkey, value); } VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) { @@ -547,22 +581,23 @@ /* I can't migrate this function right now. Some problem with JITting */ VTABLE FLOATVAL get_number_keyed(PMC *key) { - PMC *nextkey; - PMC *valpmc; - const Hash * const hash = (Hash *)SELF.get_pointer(); - void * const keystr = hash_key_from_pmc(INTERP, hash, key); - HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, keystr); + const Hash * const hash = (Hash *)SELF.get_pointer(); + void * const hash_key = hash_key_from_pmc(INTERP, hash, key); + HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, hash_key); if (!b) return 0.0; - nextkey = key_next(INTERP, key); - valpmc = hash_value_to_pmc(INTERP, hash, b->value); + key = key_next(INTERP, key); + + if (!key) + return hash_value_to_number(INTERP, hash, b->value); - if (!nextkey) - return VTABLE_get_number(INTERP, valpmc); + if (hash->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); - return VTABLE_get_number_keyed(INTERP, valpmc, nextkey); + return VTABLE_get_number_keyed(INTERP, (PMC *)b->value, key); } @@ -581,8 +616,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); } @@ -593,7 +629,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); } @@ -609,24 +645,25 @@ */ VTABLE STRING *get_string_keyed(PMC *key) { - const Hash * const hash = (Hash *)SELF.get_pointer(); - HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, - hash_key_from_pmc(INTERP, hash, key)); - PMC *valpmc; - PMC *nextkey; + const Hash * const hash = (Hash *)SELF.get_pointer(); + const void * const hash_key = hash_key_from_pmc(INTERP, hash, key); + 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, ""); - nextkey = key_next(INTERP, key); - valpmc = hash_value_to_pmc(INTERP, hash, b->value); + key = key_next(INTERP, key); /* Stop recursion. This is last step */ - if (!nextkey) - return VTABLE_get_string(INTERP, valpmc); + if (!key) + return hash_value_to_string(INTERP, hash, b->value); + + if (hash->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); - /* Recusively call to enclosed aggregate */ - return VTABLE_get_string_keyed(INTERP, valpmc, nextkey); + /* Recursively call to enclosed aggregate */ + return VTABLE_get_string_keyed(INTERP, (PMC *)b->value, key); } /* @@ -638,11 +675,8 @@ */ VTABLE void set_string_keyed(PMC *key, STRING *value) { - Hash * const hash = (Hash *)SELF.get_pointer(); - void * const keystr = hash_key_from_pmc(INTERP, hash, key); - PMC * const nextkey = key_next(INTERP, key); - PMC *box; - HashBucket *b; + Hash * const hash = (Hash *)SELF.get_pointer(); + void * const hash_key = hash_key_from_pmc(INTERP, hash, key); if (PObj_constant_TEST(SELF)){ if (!PObj_constant_TEST((PObj *)key)) @@ -655,23 +689,16 @@ "Used non-constant STRING value in constant hash."); } - if (!nextkey) { - parrot_hash_put(INTERP, hash, keystr, + key = key_next(INTERP, key); + + if (!key) { + parrot_hash_put(INTERP, hash, hash_key, hash_value_from_string(INTERP, hash, value)); - return; } - - b = parrot_hash_get_bucket(INTERP, hash, keystr); - if (b) - box = hash_value_to_pmc(INTERP, hash, b->value); else { - /* autovivify an Hash */ - box = Parrot_pmc_new(INTERP, SELF.type()); - parrot_hash_put(INTERP, hash, keystr, - hash_value_from_pmc(INTERP, hash, box)); + PMC * const next_hash = get_next_hash(INTERP, hash, hash_key); + VTABLE_set_string_keyed(INTERP, next_hash, key, value); } - - VTABLE_set_string_keyed(INTERP, box, nextkey, value); } /* @@ -696,8 +723,7 @@ "Used non-constant STRING value in constant hash."); } - parrot_hash_put(INTERP, hash, - hash_key_from_string(INTERP, hash, key), + parrot_hash_put(INTERP, hash, hash_key_from_string(INTERP, hash, key), hash_value_from_string(INTERP, hash, value)); } @@ -731,14 +757,12 @@ VTABLE PMC *get_pmc_keyed_str(STRING *key) { const Hash *hash; - HashBucket *b = NULL; + HashBucket *b; GET_ATTR_hash(INTERP, SELF, hash); - /* special case the most likely key type, for speed */ - key = hash->key_type == Hash_key_type_STRING - ? key - : (STRING *)hash_key_from_string(INTERP, hash, key); + if (!hash->entries) + return PMCNULL; b = parrot_hash_get_bucket(INTERP, hash, key); @@ -765,24 +789,25 @@ /* Compound Key */ VTABLE PMC *get_pmc_keyed(PMC *key) { - const Hash * const hash = (Hash *)SELF.get_pointer(); - HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, - hash_key_from_pmc(INTERP, hash, key)); - PMC *valpmc; - PMC *nextkey; + const Hash * const hash = (Hash *)SELF.get_pointer(); + const void * const hash_key = hash_key_from_pmc(INTERP, hash, key); + HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, hash_key); if (!b) return PMCNULL; - nextkey = key_next(INTERP, key); - valpmc = hash_value_to_pmc(INTERP, hash, b->value); + key = key_next(INTERP, key); /* Stop recursion. This is last step */ - if (!nextkey) - return valpmc; + if (!key) + return hash_value_to_pmc(INTERP, hash, b->value); - /* Recusively call to enclosed aggregate */ - return VTABLE_get_pmc_keyed(INTERP, valpmc, nextkey); + if (hash->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); + + /* Recursively call to enclosed aggregate */ + return VTABLE_get_pmc_keyed(INTERP, (PMC *)b->value, key); } /* @@ -794,11 +819,8 @@ */ VTABLE void set_number_keyed(PMC *key, FLOATVAL value) { - Hash * const hash = (Hash *)SELF.get_pointer(); - void * const keystr = hash_key_from_pmc(INTERP, hash, key); - PMC * const nextkey = key_next(INTERP, key); - PMC *box = PMCNULL; - HashBucket *b; + Hash * const hash = (Hash *)SELF.get_pointer(); + void * const hash_key = hash_key_from_pmc(INTERP, hash, key); if (PObj_constant_TEST(SELF) && !PObj_constant_TEST((PObj *)key)) @@ -806,21 +828,16 @@ EXCEPTION_INVALID_OPERATION, "Used non-constant PMC key in constant hash."); - if (!nextkey) { - PMC * const val = get_number_pmc(INTERP, value); - parrot_hash_put(INTERP, hash, keystr, hash_value_from_pmc(INTERP, hash, val)); - return; - } - - b = parrot_hash_get_bucket(INTERP, (Hash *)SELF.get_pointer(), keystr); - if (b) - box = hash_value_to_pmc(INTERP, hash, b->value); - - /* autovivify an Hash */ - if (PMC_IS_NULL(box)) - box = Parrot_pmc_new(INTERP, SELF.type()); + key = key_next(INTERP, key); - VTABLE_set_number_keyed(INTERP, box, nextkey, value); + if (!key) { + parrot_hash_put(INTERP, hash, hash_key, + hash_value_from_number(INTERP, hash, value)); + } + else { + PMC * const next_hash = get_next_hash(INTERP, hash, hash_key); + VTABLE_set_number_keyed(INTERP, next_hash, key, value); + } } /* @@ -834,7 +851,7 @@ */ VTABLE void set_number_keyed_str(STRING *key, FLOATVAL value) { - PMC * const val = get_number_pmc(INTERP, value); + Hash * const hash = (Hash *)SELF.get_pointer(); if (PObj_constant_TEST(SELF) && !PObj_constant_TEST((PObj *)key)) @@ -842,7 +859,8 @@ EXCEPTION_INVALID_OPERATION, "Used non-constant STRING key in constant hash."); - parrot_hash_put(INTERP, (Hash *)SELF.get_pointer(), key, val); + parrot_hash_put(INTERP, hash, hash_key_from_string(INTERP, hash, key), + hash_value_from_number(INTERP, hash, value)); } /* @@ -854,11 +872,8 @@ */ VTABLE void set_pmc_keyed(PMC *key, PMC *value) { - Hash * const hash = (Hash *)SELF.get_pointer(); - void * const keystr = hash_key_from_pmc(INTERP, hash, key); - PMC * const nextkey = key_next(INTERP, key); - PMC *box; - HashBucket *b; + Hash * const hash = (Hash *)SELF.get_pointer(); + void * const hash_key = hash_key_from_pmc(INTERP, hash, key); if (PObj_constant_TEST(SELF)) { if (!PObj_constant_TEST((PObj *)key)) @@ -872,23 +887,15 @@ "Used non-constant PMC value in constant hash."); } - if (!nextkey) { - parrot_hash_put(INTERP, hash, keystr, value); - return; - } + key = key_next(INTERP, key); - b = parrot_hash_get_bucket(INTERP, hash, keystr); - if (b) - box = hash_value_to_pmc(INTERP, hash, b->value); + if (!key) { + parrot_hash_put(INTERP, hash, hash_key, value); + } else { - /* autovivify an Hash */ - box = Parrot_pmc_new(INTERP, SELF.type()); - parrot_hash_put(INTERP, hash, keystr, - hash_value_from_pmc(INTERP, hash, box)); + PMC * const next_hash = get_next_hash(INTERP, hash, hash_key); + VTABLE_set_pmc_keyed(INTERP, next_hash, key, value); } - - - VTABLE_set_pmc_keyed(INTERP, box, nextkey, value); } /* @@ -960,7 +967,12 @@ if (!key) return 1; - return VTABLE_exists_keyed(INTERP, hash_value_to_pmc(INTERP, h, b->value), key); + if (h->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); + + return VTABLE_exists_keyed(INTERP, (PMC *)b->value, key); } /* @@ -1006,9 +1018,13 @@ if (!key) return VTABLE_defined(INTERP, hash_value_to_pmc(INTERP, h, b->value)); - else - return VTABLE_defined_keyed(INTERP, - hash_value_to_pmc(INTERP, h, b->value), key); + + if (h->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); + + return VTABLE_defined_keyed(INTERP, (PMC *)b->value, key); } /* @@ -1045,10 +1061,17 @@ key = key_next(INTERP, key); - if (!key) + if (!key) { parrot_hash_delete(INTERP, h, sx); - else - VTABLE_delete_keyed(INTERP, (PMC *)b->value, key); + return; + } + + if (h->entry_type != enum_type_PMC) + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_OPERATION, + "Hash entry type must be PMC for multipart keys."); + + VTABLE_delete_keyed(INTERP, (PMC *)b->value, key); } /* @@ -1154,21 +1177,6 @@ /* -=item C - -Used during archiving to visit the elements in the hash. - -=cut - -*/ - - VTABLE void visit(PMC *info) { - parrot_hash_visit(INTERP, (Hash *)SELF.get_pointer(), info); - SUPER(info); - } - -/* - =item C Used to archive the hash. @@ -1178,12 +1186,7 @@ */ VTABLE void freeze(PMC *info) { - Hash * const hash = (Hash *)SELF.get_pointer(); - - SUPER(info); - VTABLE_push_integer(INTERP, info, VTABLE_elements(INTERP, SELF)); - VTABLE_push_integer(INTERP, info, (INTVAL)hash->key_type); - VTABLE_push_integer(INTERP, info, hash->entry_type); + Parrot_hash_freeze(INTERP, (Hash *)SELF.get_pointer(), info); } /* @@ -1197,48 +1200,7 @@ */ VTABLE void thaw(PMC *info) { - SUPER(info); - - { - const INTVAL elems = VTABLE_shift_integer(INTERP, info); - const INTVAL k_type = VTABLE_shift_integer(INTERP, info); - const INTVAL v_type = VTABLE_shift_integer(INTERP, info); - Hash *hash; - - if (k_type != Hash_key_type_STRING || v_type != enum_hash_pmc) { - hash_comp_fn cmp_fn; - hash_hash_key_fn key_fn; - - switch (k_type) { - case Hash_key_type_int: - key_fn = (hash_hash_key_fn)key_hash_int; - cmp_fn = (hash_comp_fn)int_compare; - break; - case Hash_key_type_STRING: - key_fn = (hash_hash_key_fn)key_hash_STRING; - cmp_fn = (hash_comp_fn)STRING_compare; - break; - case Hash_key_type_PMC: - key_fn = (hash_hash_key_fn)key_hash_PMC; - cmp_fn = (hash_comp_fn)PMC_compare; - break; - default: - Parrot_ex_throw_from_c_args(INTERP, NULL, 1, - "unimplemented key type"); - break; - } - - SELF.set_pointer(parrot_create_hash(INTERP, (PARROT_DATA_TYPE)v_type, - (Hash_key_type)k_type, cmp_fn, key_fn)); - } - - hash = (Hash *)SELF.get_pointer(); - - PARROT_ASSERT((INTVAL)hash->key_type == k_type); - PARROT_ASSERT(hash->entry_type == v_type); - - hash->entries = elems; - } + SELF.set_pointer((void *)Parrot_hash_thaw(INTERP, info)); } } diff -Nru parrot-2.7.0/src/pmc/imageiofreeze.pmc parrot-2.8.0/src/pmc/imageiofreeze.pmc --- parrot-2.7.0/src/pmc/imageiofreeze.pmc 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/pmc/imageiofreeze.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,526 @@ +/* +Copyright (C) 2010, Parrot Foundation. +$Id: imageiofreeze.pmc 49141 2010-09-19 01:18:18Z plobsing $ + +=head1 NAME + +src/pmc/imageiofreeze.pmc - ImageIOFreeze PMC + +=head1 DESCRIPTION + +Freezes other PMCs. + +=head1 FUNCTIONS + +=over 4 + +=cut + +*/ + +#include "parrot/imageio.h" + +/* HEADERIZER HFILE: none */ +/* HEADERIZER BEGIN: static */ +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ + +static void create_buffer(PARROT_INTERP, + ARGIN_NULLOK(PMC *pmc), + ARGMOD(PMC *info)) + __attribute__nonnull__(1) + __attribute__nonnull__(3) + FUNC_MODIFIES(*info); + +PARROT_INLINE +static void ensure_buffer_size(PARROT_INTERP, ARGIN(PMC *io), size_t len) + __attribute__nonnull__(1) + __attribute__nonnull__(2); + +PARROT_INLINE +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static opcode_t * GET_VISIT_CURSOR(ARGIN(const PMC *pmc)) + __attribute__nonnull__(1); + +PARROT_INLINE +static void INC_VISIT_CURSOR(ARGMOD(PMC *pmc), UINTVAL inc) + __attribute__nonnull__(1) + FUNC_MODIFIES(*pmc); + +PARROT_INLINE +static void SET_VISIT_CURSOR(ARGMOD(PMC *pmc), ARGIN(const char *cursor)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + FUNC_MODIFIES(*pmc); + +#define ASSERT_ARGS_create_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(info)) +#define ASSERT_ARGS_ensure_buffer_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(io)) +#define ASSERT_ARGS_GET_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pmc)) +#define ASSERT_ARGS_INC_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pmc)) +#define ASSERT_ARGS_SET_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(pmc) \ + , PARROT_ASSERT_ARG(cursor)) +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ +/* HEADERIZER END: static */ + +/* + +=item C + +Get the buffer cursor. Buffer relocations are handled. + +=cut + +*/ + +PARROT_INLINE +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +static opcode_t * +GET_VISIT_CURSOR(ARGIN(const PMC *pmc)) +{ + ASSERT_ARGS(GET_VISIT_CURSOR) + + char * const buf = (char *)Buffer_bufstart(PARROT_IMAGEIOFREEZE(pmc)->buffer); + const size_t pos = PARROT_IMAGEIOFREEZE(pmc)->pos; + return (opcode_t *)(buf + pos); +} + +/* + +=item C + +Set the buffer cursor. Buffer relocations are handled. + +=cut + +*/ + + +PARROT_INLINE +static void +SET_VISIT_CURSOR(ARGMOD(PMC *pmc), ARGIN(const char *cursor)) +{ + ASSERT_ARGS(SET_VISIT_CURSOR) + + const char * const bufstart = (const char *)Buffer_bufstart(PARROT_IMAGEIOFREEZE(pmc)->buffer); + PARROT_IMAGEIOFREEZE(pmc)->pos = (cursor - bufstart); +} + +/* + +=item C + +Increment the buffer cursor. Buffer relocations are handled. + +=cut + +*/ + + +PARROT_INLINE +static void +INC_VISIT_CURSOR(ARGMOD(PMC *pmc), UINTVAL inc) +{ + ASSERT_ARGS(INC_VISIT_CURSOR) + + PARROT_IMAGEIOFREEZE(pmc)->pos += inc; +} + + +/* + +=item C + +Allocate the image buffer. + +=cut + +*/ + +static void +create_buffer(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGMOD(PMC *info)) +{ + ASSERT_ARGS(create_buffer) + + INTVAL len; + + if (!PMC_IS_NULL(pmc)) { + STRING * const array = CONST_STRING(interp, "array"); + STRING * const hash = CONST_STRING(interp, "hash"); + INTVAL items = 1; + + if (VTABLE_does(interp, pmc, array) || VTABLE_does(interp, pmc, hash)) + items += VTABLE_elements(interp, pmc); + + len = items * FREEZE_BYTES_PER_ITEM; + } + else + len = FREEZE_BYTES_PER_ITEM; + + PARROT_IMAGEIOFREEZE(info)->buffer = + Parrot_gc_new_bufferlike_header(interp, sizeof (Buffer)); + Parrot_gc_allocate_buffer_storage_aligned(interp, + PARROT_IMAGEIOFREEZE(info)->buffer, len); + SET_VISIT_CURSOR(info, + (const char *)Buffer_bufstart(PARROT_IMAGEIOFREEZE(info)->buffer)); +} + +/* + +=item C + +Checks the size of the buffer to see if it can accommodate C more +bytes. If not, expands the buffer. + +=cut + +*/ + +PARROT_INLINE +static void +ensure_buffer_size(PARROT_INTERP, ARGIN(PMC *io), size_t len) +{ + ASSERT_ARGS(ensure_buffer_size) + + Buffer * const buf = PARROT_IMAGEIOFREEZE(io)->buffer; + const size_t used = PARROT_IMAGEIOFREEZE(io)->pos; + const int need_free = Buffer_buflen(buf) - used - len; + + /* grow by factor 1.5 or such */ + if (need_free <= 16) { + size_t new_size = (size_t) (Buffer_buflen(buf) * 1.5); + + if (new_size < Buffer_buflen(buf) - need_free + 512) + new_size = Buffer_buflen(buf) - need_free + 512; + + Parrot_gc_reallocate_buffer_storage(interp, buf, new_size); + PARROT_ASSERT(Buffer_buflen(buf) - used - len >= 15); + } + +#ifndef DISABLE_GC_DEBUG + Parrot_gc_compact_memory_pool(interp); +#endif +} + +pmclass ImageIOFreeze auto_attrs { + ATTR Buffer *buffer; /* buffer to store the image */ + ATTR size_t pos; /* current read/write buf position */ + ATTR PMC *seen; /* seen hash */ + ATTR PMC *todo; /* todo list */ + ATTR UINTVAL id; /* freze ID of PMC */ + ATTR struct PackFile *pf; + ATTR PackFile_ConstTable *pf_ct; + +/* + +=back + +=head1 VTABLES + +=over 4 + +=cut + +*/ + +/* + +=item C + +Initializes the PMC. + +=cut + +*/ + VTABLE void init() { + PARROT_IMAGEIOFREEZE(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash); + VTABLE_set_pointer(INTERP, PARROT_IMAGEIOFREEZE(SELF)->seen, + parrot_new_intval_hash(INTERP)); + + PARROT_IMAGEIOFREEZE(SELF)->todo = + Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray); + + PObj_flag_CLEAR(private1, SELF); + + PObj_custom_mark_SET(SELF); + } + + +/* + +=item C + +Destroys the PMC. + +=cut + +*/ + VTABLE void destroy() { + PackFile_destroy(INTERP, PARROT_IMAGEIOFREEZE(SELF)->pf); + PARROT_IMAGEIOFREEZE(SELF)->pf = NULL; + } + + +/* + +=item C + +Marks the PMC as alive. + +=cut + +*/ + VTABLE void mark() { + PObj * const buffer = (PObj *)(PARROT_IMAGEIOFREEZE(SELF)->buffer); + if (buffer) + Parrot_gc_mark_PObj_alive(INTERP, buffer); + Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOFREEZE(SELF)->todo); + Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOFREEZE(SELF)->seen); + } + + +/* + +=item C + +Returns the content of the image as a string. + +=cut + +*/ + + VTABLE STRING *get_string() { + return Parrot_str_new_from_buffer(INTERP, + PARROT_IMAGEIOFREEZE(SELF)->buffer, + PARROT_IMAGEIOFREEZE(SELF)->pos); + } + + +/* + +=item C + +Get the C list for this freeze/thaw for iterating over. + +=cut + +*/ + + VTABLE PMC *get_iter() { + return PARROT_IMAGEIOFREEZE(SELF)->todo; + } + +/* + +=item C + +Returns the flags describing the visit action. + +=cut + +*/ + + VTABLE INTVAL get_integer() { + return VISIT_FREEZE_NORMAL; + } + + +/* + +=item C + +Pushes the integer C onto the end of the image. + +=cut + +*/ + + VTABLE void push_integer(INTVAL v) { + const size_t len = PF_size_integer() * sizeof (opcode_t); + ensure_buffer_size(INTERP, SELF, len); + SET_VISIT_CURSOR(SELF, + (const char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v)); + } + + +/* + +=item C + +Pushes the float C onto the end of the image. + +=cut + +*/ + + VTABLE void push_float(FLOATVAL v) { + const size_t len = PF_size_number() * sizeof (opcode_t); + ensure_buffer_size(INTERP, SELF, len); + SET_VISIT_CURSOR(SELF, + (const char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v)); + } + + +/* + +=item C + +Pushes the string C<*v> onto the end of the image. + +=cut + +*/ + + VTABLE void push_string(STRING *v) { + if (PObj_flag_TEST(private1, SELF)) { + /* store a reference to constant table entry of string */ + PMC * const v_pmc = key_new_string(interp, v); + PackFile_ConstTable * const table = PARROT_IMAGEIOFREEZE(SELF)->pf_ct; + const int idx = + PackFile_ConstTable_rlookup(INTERP, table, v_pmc, PFC_STRING); + + if (idx >= 0) { + STATICSELF.push_integer(idx); + return; + } + + /* XXX handle cases where the PMC has changed after + * Parrot_freeze_strings was called eg: :immediate subs */ + STATICSELF.push_integer(-1); + + /* TODO + * should really be: + * PANIC(INTERP, "string not previously in constant table " + * "when freezing to packfile"); */ + } + + { + const size_t len = PF_size_string(v) * sizeof (opcode_t); + ensure_buffer_size(INTERP, SELF, len); + SET_VISIT_CURSOR(SELF, + (const char *)PF_store_string(GET_VISIT_CURSOR(SELF), v)); + } + } + + +/* + +=item C + +Pushes a reference to pmc C<*v> onto the end of the image. If C<*v> +hasn't been seen yet, it is also pushed onto the todo list. + +=cut + +*/ + + VTABLE void push_pmc(PMC *v) { + UINTVAL id; + int packid_type; + + if (PMC_IS_NULL(v)) { + id = 0; + packid_type = enum_PackID_seen; + } + else { + Hash * const hash = (Hash *)VTABLE_get_pointer(INTERP, + PARROT_IMAGEIOFREEZE(SELF)->seen); + HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, v); + + if (b) { + id = (UINTVAL)b->value; + packid_type = enum_PackID_seen; + } + else { + ++PARROT_IMAGEIOFREEZE(SELF)->id; /* next id to freeze */ + id = PARROT_IMAGEIOFREEZE(SELF)->id; + packid_type = enum_PackID_normal; + } + } + + SELF.push_integer(PackID_new(id, packid_type)); + + if (packid_type == enum_PackID_normal) { + Hash * const hash = (Hash *)VTABLE_get_pointer(INTERP, + PARROT_IMAGEIOFREEZE(SELF)->seen); + + PARROT_ASSERT(v); + + /* workaround to keep ParrotInterpreter PBC hack working */ + if (v->vtable->base_type == enum_class_ParrotInterpreter) + PObj_flag_CLEAR(private1, SELF); + + SELF.push_integer( + PObj_is_object_TEST(v) + ? (INTVAL) enum_class_Object + : v->vtable->base_type); + + parrot_hash_put(INTERP, hash, v, (void *)id); + VTABLE_push_pmc(INTERP, PARROT_IMAGEIOFREEZE(SELF)->todo, v); + } + } + + +/* + +=item C + +Sets the constant table of this ImageIO PMC. + +=cut + +*/ + + VTABLE void set_pointer(void *value) { + PObj_flag_SET(private1, SELF); + PARROT_IMAGEIOFREEZE(SELF)->pf_ct = (PackFile_ConstTable *)value; + } + + + VTABLE void set_pmc(PMC *p) + { + create_buffer(INTERP, p, SELF); + + if (PObj_flag_TEST(private1, SELF)) { + PARROT_IMAGEIOFREEZE(SELF)->pf = PARROT_IMAGEIOFREEZE(SELF)->pf_ct->base.pf; + } + else { + const UINTVAL header_length = + GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES); + + PARROT_IMAGEIOFREEZE(SELF)->pf = PackFile_new(INTERP, 0); + PObj_custom_destroy_SET(SELF); + + ensure_buffer_size(INTERP, SELF, header_length); + mem_sys_memcopy(GET_VISIT_CURSOR(SELF), + PARROT_IMAGEIOFREEZE(SELF)->pf->header, PACKFILE_HEADER_BYTES); + INC_VISIT_CURSOR(SELF, header_length); + } + + STATICSELF.push_pmc(p); + Parrot_visit_loop_visit(INTERP, SELF); + } +} + + +/* + +=back + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/src/pmc/imageio.pmc parrot-2.8.0/src/pmc/imageio.pmc --- parrot-2.7.0/src/pmc/imageio.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/imageio.pmc 1970-01-01 00:00:00.000000000 +0000 @@ -1,851 +0,0 @@ -/* -Copyright (C) 2010, Parrot Foundation. -$Id: imageio.pmc 48526 2010-08-16 17:34:55Z NotFound $ - -=head1 NAME - -src/pmc/imageio.pmc - ImageIO PMC - -=head1 DESCRIPTION - -Freezes and thaws other PMCs. - -=head1 FUNCTIONS - -=over 4 - -=cut - -*/ - -#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0)) - -/* preallocate freeze image for aggregates with this estimation */ -#define FREEZE_BYTES_PER_ITEM 9 - -/* macros/constants to handle packing/unpacking of PMC IDs and flags - * the 2 LSBs are used for flags, all other bits are used for PMC ID - */ -#define PackID_new(id, flags) (((UINTVAL)(id) * 4) | ((UINTVAL)(flags) & 3)) -#define PackID_get_PMCID(id) ((UINTVAL)(id) / 4) -#define PackID_set_PMCID(lv, id) (lv) = PackID_new((id), PackID_get_FLAGS(lv)) -#define PackID_get_FLAGS(id) ((UINTVAL)(id) & 3) -#define PackID_set_FLAGS(lv, flags) (lv) = PackID_new(PackID_get_PMCID(lv), (flags)) - -enum { - enum_PackID_normal = 0, - enum_PackID_seen = 1, -}; - -/* HEADERIZER HFILE: none */ -/* HEADERIZER BEGIN: static */ -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ - -static void create_buffer(PARROT_INTERP, - ARGIN_NULLOK(PMC *pmc), - ARGMOD(PMC *info)) - __attribute__nonnull__(1) - __attribute__nonnull__(3) - FUNC_MODIFIES(*info); - -PARROT_INLINE -static void ensure_buffer_size(PARROT_INTERP, ARGIN(PMC *io), size_t len) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -PARROT_INLINE -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static opcode_t * GET_VISIT_CURSOR(ARGIN(const PMC *pmc)) - __attribute__nonnull__(1); - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -PARROT_INLINE -static PMC* id_list_get(PARROT_INTERP, ARGIN(const PMC *io), UINTVAL id) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -PARROT_INLINE -static void INC_VISIT_CURSOR(ARGMOD(PMC *pmc), UINTVAL inc) - __attribute__nonnull__(1) - FUNC_MODIFIES(*pmc); - -PARROT_WARN_UNUSED_RESULT -PARROT_INLINE -static INTVAL INFO_HAS_DATA(ARGIN(const PMC *io)) - __attribute__nonnull__(1); - -PARROT_INLINE -static void SET_VISIT_CURSOR(ARGMOD(PMC *pmc), ARGIN(const char *cursor)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*pmc); - -static void visit_todo_list_freeze(PARROT_INTERP, - ARGIN_NULLOK(PMC* pmc), - ARGMOD(PMC* info)) - __attribute__nonnull__(1) - __attribute__nonnull__(3) - FUNC_MODIFIES(* info); - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -PARROT_INLINE -static PMC * visit_todo_list_thaw(PARROT_INTERP, ARGIN(PMC* info)) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -#define ASSERT_ARGS_create_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(info)) -#define ASSERT_ARGS_ensure_buffer_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(io)) -#define ASSERT_ARGS_GET_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(pmc)) -#define ASSERT_ARGS_id_list_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(io)) -#define ASSERT_ARGS_INC_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(pmc)) -#define ASSERT_ARGS_INFO_HAS_DATA __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(io)) -#define ASSERT_ARGS_SET_VISIT_CURSOR __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(pmc) \ - , PARROT_ASSERT_ARG(cursor)) -#define ASSERT_ARGS_visit_todo_list_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(info)) -#define ASSERT_ARGS_visit_todo_list_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(info)) -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: static */ - -/* - -=item C - -=cut - -*/ - -PARROT_INLINE -PARROT_CANNOT_RETURN_NULL -PARROT_WARN_UNUSED_RESULT -static opcode_t * -GET_VISIT_CURSOR(ARGIN(const PMC *pmc)) -{ - ASSERT_ARGS(GET_VISIT_CURSOR) - - char * const buf = (char *)Buffer_bufstart(PARROT_IMAGEIO(pmc)->buffer); - const size_t pos = PARROT_IMAGEIO(pmc)->pos; - return (opcode_t *)(buf + pos); -} - -/* - -=item C - -=cut - -*/ - - -PARROT_INLINE -static void -SET_VISIT_CURSOR(ARGMOD(PMC *pmc), ARGIN(const char *cursor)) -{ - ASSERT_ARGS(SET_VISIT_CURSOR) - - const char * const bufstart = (const char *)Buffer_bufstart(PARROT_IMAGEIO(pmc)->buffer); - PARROT_IMAGEIO(pmc)->pos = (cursor - bufstart); -} - -/* - -=item C - -=cut - -*/ - - -PARROT_INLINE -static void -INC_VISIT_CURSOR(ARGMOD(PMC *pmc), UINTVAL inc) -{ - ASSERT_ARGS(INC_VISIT_CURSOR) - - PARROT_IMAGEIO(pmc)->pos += inc; -} - - -#define BYTECODE_SHIFT_OK(pmc) PARROT_ASSERT( \ - PARROT_IMAGEIO(pmc)->pos <= PARROT_IMAGEIO(pmc)->input_length) - -/* - -=item C - -=cut - -*/ - -static void -create_buffer(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc), ARGMOD(PMC *info)) -{ - ASSERT_ARGS(create_buffer) - - INTVAL len; - - if (!PMC_IS_NULL(pmc)) { - STRING * const array = CONST_STRING(interp, "array"); - STRING * const hash = CONST_STRING(interp, "hash"); - INTVAL items = 1; - - if (VTABLE_does(interp, pmc, array) || VTABLE_does(interp, pmc, hash)) - items += VTABLE_elements(interp, pmc); - - len = items * FREEZE_BYTES_PER_ITEM; - } - else - len = FREEZE_BYTES_PER_ITEM; - - PARROT_IMAGEIO(info)->buffer = - Parrot_gc_new_bufferlike_header(interp, sizeof (Buffer)); - Parrot_gc_allocate_buffer_storage_aligned(interp, - PARROT_IMAGEIO(info)->buffer, len); - SET_VISIT_CURSOR(info, - (const char *)Buffer_bufstart(PARROT_IMAGEIO(info)->buffer)); -} - -/* - -=item C - -Checks the size of the buffer to see if it can accommodate C more -bytes. If not, expands the buffer. - -=cut - -*/ - -PARROT_INLINE -static void -ensure_buffer_size(PARROT_INTERP, ARGIN(PMC *io), size_t len) -{ - ASSERT_ARGS(ensure_buffer_size) - - Buffer * const buf = PARROT_IMAGEIO(io)->buffer; - const size_t used = PARROT_IMAGEIO(io)->pos; - const int need_free = Buffer_buflen(buf) - used - len; - - /* grow by factor 1.5 or such */ - if (need_free <= 16) { - size_t new_size = (size_t) (Buffer_buflen(buf) * 1.5); - - if (new_size < Buffer_buflen(buf) - need_free + 512) - new_size = Buffer_buflen(buf) - need_free + 512; - - Parrot_gc_reallocate_buffer_storage(interp, buf, new_size); - PARROT_ASSERT(Buffer_buflen(buf) - used - len >= 15); - } - -#ifndef DISABLE_GC_DEBUG - Parrot_gc_compact_memory_pool(interp); -#endif -} - -/* - -=item C - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_INLINE -static INTVAL -INFO_HAS_DATA(ARGIN(const PMC *io)) -{ - ASSERT_ARGS(INFO_HAS_DATA) - - return PARROT_IMAGEIO(io)->pos < PARROT_IMAGEIO(io)->input_length; -} - -/* - -=item C - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -PARROT_INLINE -static PMC* -id_list_get(PARROT_INTERP, ARGIN(const PMC *io), UINTVAL id) -{ - ASSERT_ARGS(id_list_get) - - return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->todo, id - 1); -} - -/* - -=item C - -=cut - -*/ - - -PARROT_WARN_UNUSED_RESULT -PARROT_CAN_RETURN_NULL -PARROT_INLINE -static PMC * -visit_todo_list_thaw(PARROT_INTERP, ARGIN(PMC* info)) -{ - ASSERT_ARGS(visit_todo_list_thaw) - - const UINTVAL n = VTABLE_shift_integer(interp, info); - const INTVAL id = PackID_get_PMCID(n); - const int packid_flags = PackID_get_FLAGS(n); - PMC *pmc = PMCNULL; - - PARROT_ASSERT(PARROT_IMAGEIO(info)->what == VISIT_THAW_NORMAL); - - switch (packid_flags) { - case enum_PackID_seen: - if (id) /* got a non-NULL PMC */ - pmc = id_list_get(interp, info, id); - break; - case enum_PackID_normal: - { - PMC * const todo = PARROT_IMAGEIO(info)->todo; - const INTVAL type = VTABLE_shift_integer(interp, info); - - PARROT_ASSERT(id - 1 - == VTABLE_elements(interp, PARROT_IMAGEIO(info)->todo)); - - if (type <= 0 || type > interp->n_vtable_max) - Parrot_ex_throw_from_c_args(interp, NULL, 1, - "Unknown PMC type to thaw %d", type); - - /* workaround to keep ParrotInterpreter PBC hack working */ - if (type == enum_class_ParrotInterpreter) - PObj_flag_CLEAR(private1, info); - - pmc = Parrot_pmc_new_noinit(interp, type); - - VTABLE_set_pmc_keyed_int(interp, todo, id - 1, pmc); - } - break; - default: - Parrot_ex_throw_from_c_args(interp, NULL, 1, - "Unknown PMC id args thaw %d", packid_flags); - break; - } - - return pmc; -} - -/* - -=item C - -=cut - -*/ - - -static void -visit_todo_list_freeze(PARROT_INTERP, ARGIN_NULLOK(PMC* pmc), ARGMOD(PMC* info)) -{ - ASSERT_ARGS(visit_todo_list_freeze) - - UINTVAL id; - int packid_type; - - PARROT_ASSERT(PARROT_IMAGEIO(info)->what == VISIT_FREEZE_NORMAL); - - if (PMC_IS_NULL(pmc)) { - id = 0; - packid_type = enum_PackID_seen; - } - else { - Hash * const hash = (Hash *)VTABLE_get_pointer(interp, - PARROT_IMAGEIO(info)->seen); - HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc); - - if (b) { - id = (UINTVAL)b->value; - packid_type = enum_PackID_seen; - } - else { - ++PARROT_IMAGEIO(info)->id; /* next id to freeze */ - id = PARROT_IMAGEIO(info)->id; - packid_type = enum_PackID_normal; - } - } - - VTABLE_push_integer(interp, info, PackID_new(id, packid_type)); - - if (packid_type == enum_PackID_normal) { - Hash * const hash = (Hash *)VTABLE_get_pointer(interp, - PARROT_IMAGEIO(info)->seen); - - PARROT_ASSERT(pmc); - - /* workaround to keep ParrotInterpreter PBC hack working */ - if (pmc->vtable->base_type == enum_class_ParrotInterpreter) - PObj_flag_CLEAR(private1, info); - - VTABLE_push_integer(interp, info, - PObj_is_object_TEST(pmc) - ? (INTVAL) enum_class_Object - : pmc->vtable->base_type); - - parrot_hash_put(interp, hash, pmc, (void *)id); - VTABLE_push_pmc(interp, PARROT_IMAGEIO(info)->todo, pmc); - } -} - - -pmclass ImageIO auto_attrs { - ATTR Buffer *buffer; /* buffer to store the image */ - ATTR size_t pos; /* current read/write buf position */ - ATTR size_t input_length; - ATTR INTVAL what; - ATTR PMC *seen; /* seen hash */ - ATTR PMC *todo; /* todo list */ - ATTR UINTVAL id; /* freze ID of PMC */ - ATTR struct PackFile *pf; - ATTR PackFile_ConstTable *pf_ct; - -/* - -=back - -=head1 VTABLES - -=over 4 - -=cut - -*/ - -/* - -=item C - -Initializes the PMC. - -=cut - -*/ - VTABLE void init() { - PARROT_IMAGEIO(SELF)->seen = PMCNULL; - PARROT_IMAGEIO(SELF)->todo = - Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray); - - PObj_flag_CLEAR(private1, SELF); - - PObj_custom_mark_SET(SELF); - } - - -/* - -=item C - -Destroys the PMC. - -=cut - -*/ - VTABLE void destroy() { - PackFile_destroy(INTERP, PARROT_IMAGEIO(SELF)->pf); - PARROT_IMAGEIO(SELF)->pf = NULL; - } - - -/* - -=item C - -Marks the PMC as alive. - -=cut - -*/ - VTABLE void mark() { - PObj * const buffer = (PObj *)(PARROT_IMAGEIO(SELF)->buffer); - if (buffer) - Parrot_gc_mark_PObj_alive(INTERP, buffer); - Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->todo); - Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen); - } - - -/* - -=item C - -Returns the content of the image as a string. - -=cut - -*/ - - VTABLE STRING *get_string() { - return Parrot_str_new_from_buffer(INTERP, - PARROT_IMAGEIO(SELF)->buffer, - PARROT_IMAGEIO(SELF)->pos); - } - - -/* - -=item C - -Gets the result PMC after a thaw. - -=cut - -*/ - - VTABLE PMC *get_pmc() { - return VTABLE_get_pmc_keyed_int(INTERP, - (PARROT_IMAGEIO(SELF))->todo, 0); - } - - -/* - -=item C - -Get the C list for this freeze/thaw for iterating over. - -=cut - -*/ - - VTABLE PMC *get_iter() { - return PARROT_IMAGEIO(SELF)->todo; - } - -/* - -=item C - -Returns the flags describing the visit action. - -=cut - -*/ - - VTABLE INTVAL get_integer() { - return PARROT_IMAGEIO(SELF)->what; - } - - -/* - -=item C - -Pushes the integer C onto the end of the image. - -=cut - -*/ - - VTABLE void push_integer(INTVAL v) { - const size_t len = PF_size_integer() * sizeof (opcode_t); - ensure_buffer_size(INTERP, SELF, len); - SET_VISIT_CURSOR(SELF, - (const char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v)); - } - - -/* - -=item C - -Pushes the float C onto the end of the image. - -=cut - -*/ - - VTABLE void push_float(FLOATVAL v) { - const size_t len = PF_size_number() * sizeof (opcode_t); - ensure_buffer_size(INTERP, SELF, len); - SET_VISIT_CURSOR(SELF, - (const char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v)); - } - - -/* - -=item C - -Pushes the string C<*v> onto the end of the image. - -=cut - -*/ - - VTABLE void push_string(STRING *v) { - if (PObj_flag_TEST(private1, SELF)) { - /* store a reference to constant table entry of string */ - PMC * const v_pmc = key_new_string(interp, v); - PackFile_ConstTable * const table = PARROT_IMAGEIO(SELF)->pf_ct; - const int idx = - PackFile_ConstTable_rlookup(INTERP, table, v_pmc, PFC_STRING); - - if (idx >= 0) { - STATICSELF.push_integer(idx); - return; - } - - /* XXX handle cases where the PMC has changed after - * Parrot_freeze_strings was called eg: :immediate subs */ - STATICSELF.push_integer(-1); - - /* TODO - * should really be: - * PANIC(INTERP, "string not previously in constant table " - * "when freezing to packfile"); */ - } - - { - const size_t len = PF_size_string(v) * sizeof (opcode_t); - ensure_buffer_size(INTERP, SELF, len); - SET_VISIT_CURSOR(SELF, - (const char *)PF_store_string(GET_VISIT_CURSOR(SELF), v)); - } - } - - -/* - -=item C - -Pushes a reference to pmc C<*v> onto the end of the image. If C<*v> -hasn't been seen yet, it is also pushed onto the todo list. - -=cut - -*/ - - VTABLE void push_pmc(PMC *v) { - visit_todo_list_freeze(INTERP, v, SELF); - } - - -/* - -=item C - -Sets the constant table of this ImageIO PMC. - -=cut - -*/ - - VTABLE void set_pointer(void *value) { - PObj_flag_SET(private1, SELF); - PARROT_IMAGEIO(SELF)->pf_ct = (PackFile_ConstTable *)value; - } - - -/* - -=item C - -Removes and returns an integer from the start of the image. - -=cut - -*/ - - VTABLE INTVAL shift_integer() { - /* inlining PF_fetch_integer speeds up PBC thawing measurably */ - const PackFile *pf = PARROT_IMAGEIO(SELF)->pf; - const opcode_t *pos = GET_VISIT_CURSOR(SELF); - const unsigned char *stream = (const unsigned char *)pos; - const INTVAL i = pf->fetch_iv(stream); - - SET_VISIT_CURSOR(SELF, (const char *)pos + pf->header->wordsize); - BYTECODE_SHIFT_OK(SELF); - return i; - } - - -/* - -=item C - -Removes and returns an number from the start of the image. - -=cut - -*/ - - VTABLE FLOATVAL shift_float() { - const opcode_t *pos = GET_VISIT_CURSOR(SELF); - FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf, &pos); - SET_VISIT_CURSOR(SELF, (const char *)pos); - BYTECODE_SHIFT_OK(SELF); - return f; - } - - -/* - -=item C - -Removes and returns a string from the start of the image. - -=cut - -*/ - - VTABLE STRING *shift_string() { - if (PObj_flag_TEST(private1, SELF)) { - const INTVAL i = STATICSELF.shift_integer(); - - if (i >= 0) { - PackFile_ConstTable *table = PARROT_IMAGEIO(SELF)->pf_ct; - - if (!table->constants[i].type) - Parrot_ex_throw_from_c_args(interp, NULL, - EXCEPTION_MALFORMED_PACKFILE, - "Reference to constant not yet unpacked %d", i); - return table->constants[i].u.string; - } - - /* XXX - * only got here because constant table doesn't contain the string - * fallback on inline strings - */ - } - - { - const opcode_t * pos = GET_VISIT_CURSOR(SELF); - STRING * const s = PF_fetch_string(INTERP, - PARROT_IMAGEIO(SELF)->pf, &pos); - SET_VISIT_CURSOR(SELF, (const char *)pos); - BYTECODE_SHIFT_OK(SELF); - return s; - } - } - - -/* - -=item C - -Removes and returns a reference to a pmc from the start of the image. - -=cut - -*/ - - VTABLE PMC *shift_pmc() { - return visit_todo_list_thaw(INTERP, SELF); - } - - VTABLE void set_pmc(PMC *p) - { - PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL; - - create_buffer(INTERP, p, SELF); - if (PObj_flag_TEST(private1, SELF)) { - PARROT_IMAGEIO(SELF)->pf = PARROT_IMAGEIO(SELF)->pf_ct->base.pf; - } - else { - const UINTVAL header_length = - GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES); - - PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0); - PObj_custom_destroy_SET(SELF); - - ensure_buffer_size(INTERP, SELF, header_length); - mem_sys_memcopy(GET_VISIT_CURSOR(SELF), - PARROT_IMAGEIO(SELF)->pf->header, PACKFILE_HEADER_BYTES); - INC_VISIT_CURSOR(SELF, header_length); - } - - PARROT_IMAGEIO(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash); - VTABLE_set_pointer(INTERP, PARROT_IMAGEIO(SELF)->seen, - parrot_new_intval_hash(INTERP)); - - STATICSELF.push_pmc(p); - Parrot_visit_loop_visit(INTERP, SELF); - } - - VTABLE void set_string_native(STRING *image) { - PMC *unused; - PARROT_IMAGEIO(SELF)->what = VISIT_THAW_NORMAL; - PARROT_IMAGEIO(SELF)->buffer = (Buffer *)image; - - PARROT_ASSERT(image->_bufstart == image->strstart); - - SET_VISIT_CURSOR(SELF, - (const char *)Buffer_bufstart(PARROT_IMAGEIO(SELF)->buffer)); - PARROT_IMAGEIO(SELF)->input_length = image->strlen; - - if (PObj_flag_TEST(private1, SELF)) { - PARROT_IMAGEIO(SELF)->pf = PARROT_IMAGEIO(SELF)->pf_ct->base.pf; - } - else { - const UINTVAL header_length = - GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES); - int unpacked_length; - - PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0); - PObj_custom_destroy_SET(SELF); - - PARROT_IMAGEIO(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY; - unpacked_length = PackFile_unpack(INTERP, PARROT_IMAGEIO(SELF)->pf, - GET_VISIT_CURSOR(SELF), PARROT_IMAGEIO(SELF)->input_length); - - if (unpacked_length) - INC_VISIT_CURSOR(SELF, header_length); - else - Parrot_ex_throw_from_c_args(INTERP, NULL, - EXCEPTION_INVALID_STRING_REPRESENTATION, - "PackFile header failed during unpack"); - } - - unused = STATICSELF.shift_pmc(); - Parrot_visit_loop_visit(INTERP, SELF); - - /* we're done reading the image */ - PARROT_ASSERT(!INFO_HAS_DATA(SELF)); - Parrot_visit_loop_thawfinish(INTERP, SELF); - } - - -/* - -=back - -=cut - -*/ - -} - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/pmc/imageiosize.pmc parrot-2.8.0/src/pmc/imageiosize.pmc --- parrot-2.7.0/src/pmc/imageiosize.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/imageiosize.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: imageiosize.pmc 48447 2010-08-13 07:36:33Z plobsing $ +$Id: imageiosize.pmc 48634 2010-08-24 17:14:54Z plobsing $ =head1 NAME @@ -17,64 +17,6 @@ #define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0)) /* HEADERIZER HFILE: none */ -/* HEADERIZER BEGIN: static */ -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ - -static void visit_todo_list_freeze(PARROT_INTERP, - ARGIN(PMC* pmc), - ARGMOD(PMC* info)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(* info); - -#define ASSERT_ARGS_visit_todo_list_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(pmc) \ - , PARROT_ASSERT_ARG(info)) -/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ -/* HEADERIZER END: static */ - -/* - -=head1 METHODS - -=over 4 - -=item C - -=back - -=cut - - */ - -static void -visit_todo_list_freeze(PARROT_INTERP, ARGIN(PMC* pmc), ARGMOD(PMC* info)) -{ - int is_new = 0; - - if (!PMC_IS_NULL(pmc)) { - Hash * const hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen); - HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc); - is_new = !b; - } - - VTABLE_push_integer(interp, info, 0); - - if (is_new) { - Hash * const hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen); - - parrot_hash_put(interp, hash, pmc, pmc); - - /* workaround to keep ParrotInterpreter PBC hack working */ - if (pmc->vtable->base_type == enum_class_ParrotInterpreter) - PObj_flag_CLEAR(private1, info); - - VTABLE_push_integer(interp, info, pmc->vtable->base_type); - VTABLE_push_pmc(interp, PARROT_IMAGEIOSIZE(info)->todo, pmc); - } -} pmclass ImageIOSize auto_attrs { ATTR PMC *seen; /* seen hash */ @@ -298,7 +240,28 @@ */ VTABLE void push_pmc(PMC *v) { - visit_todo_list_freeze(INTERP, v, SELF); + int is_new = 0; + + if (!PMC_IS_NULL(v)) { + Hash * const hash = (Hash *)VTABLE_get_pointer(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen); + HashBucket * const b = parrot_hash_get_bucket(INTERP, hash, v); + is_new = !b; + } + + SELF.push_integer(0); + + if (is_new) { + Hash * const hash = (Hash *)VTABLE_get_pointer(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen); + + parrot_hash_put(INTERP, hash, v, v); + + /* workaround to keep ParrotInterpreter PBC hack working */ + if (v->vtable->base_type == enum_class_ParrotInterpreter) + PObj_flag_CLEAR(private1, SELF); + + VTABLE_push_integer(INTERP, SELF, v->vtable->base_type); + VTABLE_push_pmc(INTERP, PARROT_IMAGEIOSIZE(SELF)->todo, v); + } } VTABLE void set_pmc(PMC *p) @@ -308,7 +271,7 @@ PARROT_IMAGEIOSIZE(SELF)->size += header_length; } - visit_todo_list_freeze(INTERP, p, SELF); + STATICSELF.push_pmc(p); Parrot_visit_loop_visit(INTERP, SELF); } diff -Nru parrot-2.7.0/src/pmc/imageiostrings.pmc parrot-2.8.0/src/pmc/imageiostrings.pmc --- parrot-2.7.0/src/pmc/imageiostrings.pmc 2010-05-19 09:28:37.000000000 +0000 +++ parrot-2.8.0/src/pmc/imageiostrings.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: imageiostrings.pmc 46776 2010-05-19 02:57:10Z plobsing $ +$Id: imageiostrings.pmc 48697 2010-08-27 17:31:30Z nwellnhof $ =head1 NAME @@ -50,6 +50,8 @@ parrot_new_intval_hash(INTERP)); PARROT_IMAGEIOSTRINGS(SELF)->list = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray); + + PObj_custom_mark_SET(SELF); } /* diff -Nru parrot-2.7.0/src/pmc/imageiothaw.pmc parrot-2.8.0/src/pmc/imageiothaw.pmc --- parrot-2.7.0/src/pmc/imageiothaw.pmc 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/pmc/imageiothaw.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,355 @@ +/* +Copyright (C) 2010, Parrot Foundation. +$Id: imageiothaw.pmc 49187 2010-09-20 21:25:17Z plobsing $ + +=head1 NAME + +src/pmc/imageiothaw.pmc - ImageIOThaw PMC + +=head1 DESCRIPTION + +Thaws PMCs from packfile images. + +=head1 VTABLES + +=over 4 + +=cut + +*/ + +#include "parrot/imageio.h" + +#define BYTECODE_SHIFT_OK(interp, pmc) PARROT_ASSERT( \ + PARROT_IMAGEIOTHAW(pmc)->curs <= (opcode_t *) \ + (PARROT_IMAGEIOTHAW(pmc)->img->strstart + \ + Parrot_str_byte_length((interp), PARROT_IMAGEIOTHAW(pmc)->img))) + + +/* HEADERIZER HFILE: none */ + +pmclass ImageIOThaw auto_attrs { + ATTR STRING *img; + ATTR opcode_t *curs; + ATTR PMC *todo; + ATTR PackFile *pf; + ATTR PackFile_ConstTable *pf_ct; + +/* + +=item C + +Initializes the PMC. + +=cut + +*/ + + VTABLE void init() { + PARROT_IMAGEIOTHAW(SELF)->todo = + Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray); + + PObj_flag_CLEAR(private1, SELF); + + PObj_custom_mark_SET(SELF); + } + + +/* + +=item C + +Destroys the PMC. + +=cut + +*/ + + VTABLE void destroy() { + PackFile_destroy(INTERP, PARROT_IMAGEIOTHAW(SELF)->pf); + PARROT_IMAGEIOTHAW(SELF)->pf = NULL; + } + + +/* + +=item C + +Marks the PMC as alive. + +=cut + +*/ + + VTABLE void mark() { + Parrot_gc_mark_STRING_alive(INTERP, PARROT_IMAGEIOTHAW(SELF)->img); + Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOTHAW(SELF)->todo); + } + + +/* + +=item C + +Thaws the PMC contained in C. + +=cut + +*/ + + VTABLE void set_string_native(STRING *image) { + if (!PObj_external_TEST(image)) + Parrot_str_pin(INTERP, image); + + PARROT_IMAGEIOTHAW(SELF)->img = image; + PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)image->strstart; + + if (PObj_flag_TEST(private1, SELF)) { + PARROT_IMAGEIOTHAW(SELF)->pf = PARROT_IMAGEIOTHAW(SELF)->pf_ct->base.pf; + } + else { + const UINTVAL header_length = + GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES); + int unpacked_length; + + PARROT_IMAGEIOTHAW(SELF)->pf = PackFile_new(INTERP, 0); + PObj_custom_destroy_SET(SELF); + + PARROT_IMAGEIOTHAW(SELF)->pf->options |= PFOPT_PMC_FREEZE_ONLY; + unpacked_length = PackFile_unpack(INTERP, PARROT_IMAGEIOTHAW(SELF)->pf, + PARROT_IMAGEIOTHAW(SELF)->curs, + Parrot_str_byte_length(interp, image)); + + if (unpacked_length) + PARROT_IMAGEIOTHAW(SELF)->curs += header_length / sizeof (opcode_t*); + else + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_STRING_REPRESENTATION, + "PackFile header failed during unpack"); + } + + STATICSELF.shift_pmc(); + Parrot_visit_loop_visit(INTERP, SELF); + + /* we're done reading the image */ + PARROT_ASSERT(image->strstart + Parrot_str_byte_length(interp, image) == + (char *)PARROT_IMAGEIOTHAW(SELF)->curs); + + Parrot_visit_loop_thawfinish(INTERP, SELF); + + if (!PObj_external_TEST(image)) + Parrot_str_unpin(INTERP, image); + } + + +/* + +=item C + +Gets the todo list for iterating over. + +=cut + +*/ + + VTABLE PMC *get_iter() { + return PARROT_IMAGEIOTHAW(SELF)->todo; + } + +/* + +=item C + +Get the thawed PMC. + +=cut + +*/ + + VTABLE PMC *get_pmc() { + return VTABLE_get_pmc_keyed_int(INTERP, + (PARROT_IMAGEIOTHAW(SELF))->todo, 0); + } + + +/* + +=item C + +Get the visit action. + +=cut + +*/ + + VTABLE INTVAL get_integer() { + return VISIT_THAW_NORMAL; + } + + +/* + +=item C + +Set an exterior constant table to use for cross-referencing constants. + +=cut + +*/ + + VTABLE void set_pointer(void *value) { + PObj_flag_SET(private1, SELF); + PARROT_IMAGEIOTHAW(SELF)->pf_ct = (PackFile_ConstTable *)value; + } + + +/* + +=item C + +Retreive an integer as the next item from the image. + +=cut + +*/ + + VTABLE INTVAL shift_integer() { + /* inlining PF_fetch_integer speeds up PBC thawing measurably */ + const PackFile *pf = PARROT_IMAGEIOTHAW(SELF)->pf; + const unsigned char *stream = (const unsigned char *)PARROT_IMAGEIOTHAW(SELF)->curs; + const INTVAL i = pf->fetch_iv(stream); + PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)(stream + pf->header->wordsize); + BYTECODE_SHIFT_OK(INTERP, SELF); + return i; + } + + +/* + +=item C + +Retreive a float as the next item from the image. + +=cut + +*/ + + VTABLE FLOATVAL shift_float() { + PackFile *pf = PARROT_IMAGEIOTHAW(SELF)->pf; + const opcode_t *curs = PARROT_IMAGEIOTHAW(SELF)->curs; + FLOATVAL f = PF_fetch_number(pf, &curs); + PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)curs; + BYTECODE_SHIFT_OK(INTERP, SELF); + return f; + } + + +/* + +=item C + +Retreive a string as the next item from the image. + +=cut + +*/ + + VTABLE STRING *shift_string() { + if (PObj_flag_TEST(private1, SELF)) { + const INTVAL i = STATICSELF.shift_integer(); + BYTECODE_SHIFT_OK(INTERP, SELF); + + if (i >= 0) { + PackFile_ConstTable *table = PARROT_IMAGEIOTHAW(SELF)->pf_ct; + + if (!table->constants[i].type) + Parrot_ex_throw_from_c_args(interp, NULL, + EXCEPTION_MALFORMED_PACKFILE, + "Reference to constant not yet unpacked %d", i); + return table->constants[i].u.string; + } + + /* XXX + * only got here because constant table doesn't contain the string + * fallback on inline strings + */ + } + + { + PackFile *pf = PARROT_IMAGEIOTHAW(SELF)->pf; + const opcode_t *curs = PARROT_IMAGEIOTHAW(SELF)->curs; + STRING *s = PF_fetch_string(INTERP, pf, &curs); + PARROT_IMAGEIOTHAW(SELF)->curs = (opcode_t *)curs; + BYTECODE_SHIFT_OK(INTERP, SELF); + return s; + } + } + + +/* + +=item C + +Retreive a PMC as the next item from the image. + +=cut + +*/ + + VTABLE PMC *shift_pmc() { + const UINTVAL n = SELF.shift_integer(); + const INTVAL id = PackID_get_PMCID(n); + const int packid_flags = PackID_get_FLAGS(n); + PMC *pmc = PMCNULL; + PMC *todo = PARROT_IMAGEIOTHAW(SELF)->todo; + + switch (packid_flags) { + case enum_PackID_seen: + if (id) /* got a non-NULL PMC */ + pmc = VTABLE_get_pmc_keyed_int(INTERP, todo, id - 1); + break; + case enum_PackID_normal: + { + const INTVAL type = SELF.shift_integer(); + + PARROT_ASSERT(id - 1 == VTABLE_elements(INTERP, todo)); + + if (type <= 0 || type > INTERP->n_vtable_max) + Parrot_ex_throw_from_c_args(INTERP, NULL, 1, + "Unknown PMC type to thaw %d", type); + + /* workaround to keep ParrotInterpreter PBC hack working */ + if (type == enum_class_ParrotInterpreter) + PObj_flag_CLEAR(private1, SELF); + + pmc = Parrot_pmc_new_noinit(INTERP, type); + + VTABLE_set_pmc_keyed_int(INTERP, todo, id - 1, pmc); + } + break; + default: + Parrot_ex_throw_from_c_args(INTERP, NULL, 1, + "Unknown PMC id args thaw %d", packid_flags); + break; + } + + return pmc; + } + +} + +/* + +=back + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ + diff -Nru parrot-2.7.0/src/pmc/integer.pmc parrot-2.8.0/src/pmc/integer.pmc --- parrot-2.7.0/src/pmc/integer.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/integer.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2003-2010, Parrot Foundation. -$Id: integer.pmc 48507 2010-08-15 05:43:56Z mikehh $ +$Id: integer.pmc 49077 2010-09-17 09:35:49Z fperrad $ =head1 NAME @@ -141,9 +141,8 @@ */ VTABLE PMC *clone() { - PMC * const clone = Parrot_pmc_new(INTERP, SELF->vtable->base_type); - VTABLE_set_integer_native(INTERP, clone, SELF.get_integer()); - return clone; + return Parrot_pmc_new_init_int(INTERP, SELF->vtable->base_type, + SELF.get_integer()); } /* @@ -258,7 +257,7 @@ =item C -Sets the value of the integer to the value of the C C<*value>. +Sets the value of the integer to the value of the native integer C<*value>. =cut @@ -287,20 +286,23 @@ */ VTABLE void set_number_native(FLOATVAL value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_Float), 0); SELF.set_number_native(value); } VTABLE void set_bool(INTVAL value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_Boolean), 0); SELF.set_bool(value); } VTABLE void set_string_native(STRING *value) { - Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0); + Parrot_pmc_reuse(INTERP, SELF, + Parrot_get_ctx_HLL_type(INTERP, enum_class_String), 0); SELF.set_string_native(value); } @@ -321,18 +323,13 @@ const INTVAL b = VTABLE_get_integer(INTERP, value); const INTVAL c = a + b; - if ((c^a) >= 0 || (c^b) >= 0) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - /* need this for e.g. Undef PMC */ - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((c^a) >= 0 || (c^b) >= 0) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { - PMC * temp; + PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_add(INTERP, temp, value, dest); } } @@ -340,10 +337,9 @@ MULTI PMC *add(Complex value, PMC *dest) { const INTVAL a = SELF.get_integer(); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value)); - - VTABLE_set_number_native(INTERP, dest, - a + VTABLE_get_number_keyed_int(INTERP, value, 0)); + dest = Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, value), + a + VTABLE_get_number_keyed_int(INTERP, value, 0)); VTABLE_set_number_keyed_int(INTERP, dest, 1, VTABLE_get_number_keyed_int(INTERP, value, 1)); @@ -354,17 +350,16 @@ MULTI PMC *add(BigInt value, PMC *dest) { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); return VTABLE_add(INTERP, temp, value, dest); } MULTI PMC *add(DEFAULT value, PMC *dest) { dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value)); - VTABLE_set_number_native(INTERP, dest, - SELF.get_integer() + VTABLE_get_number(INTERP, value)); + SELF.get_integer() + VTABLE_get_number(interp, value)); return dest; } @@ -373,17 +368,13 @@ const INTVAL a = VTABLE_get_integer(INTERP, SELF); const INTVAL c = a + b; - if ((c^a) >= 0 || (c^b) >= 0) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((c^a) >= 0 || (c^b) >= 0) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_add_int(INTERP, temp, b, dest); } } @@ -463,17 +454,13 @@ const INTVAL b = VTABLE_get_integer(INTERP, value); const INTVAL c = a - b; - if ((c^a) >= 0 || (c^~b) >= 0) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((c^a) >= 0 || (c^~b) >= 0) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_subtract(INTERP, temp, value, dest); } } @@ -495,8 +482,8 @@ MULTI PMC *subtract(BigInt value, PMC *dest) { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); return VTABLE_subtract(INTERP, temp, value, dest); } @@ -524,17 +511,13 @@ const INTVAL a = SELF.get_integer(); const INTVAL c = a - b; - if ((c^a) >= 0 || (c^~b) >= 0) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((c^a) >= 0 || (c^~b) >= 0) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_subtract_int(INTERP, temp, b, dest); } } @@ -624,17 +607,13 @@ const INTVAL c = a * b; const double cf = (double)a * (double)b; - if ((double) c == cf) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((double) c == cf) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_multiply(INTERP, temp, value, dest); } } @@ -657,10 +636,8 @@ MULTI PMC *multiply(DEFAULT value, PMC *dest) { const FLOATVAL valf = VTABLE_get_number(INTERP, value); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_number_native(INTERP, dest, SELF.get_number() * valf); - return dest; + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), + SELF.get_number() * valf); } @@ -669,17 +646,13 @@ const INTVAL c = a * b; const double cf = (double)a * (double)b; - if ((double) c == cf) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, c); - return dest; - } + if ((double) c == cf) + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), c); else { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, a); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); return VTABLE_multiply_int(INTERP, temp, b, dest); } } @@ -765,8 +738,8 @@ MULTI PMC *divide(BigInt value, PMC *dest) { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); return VTABLE_divide(INTERP, temp, value, dest); } @@ -777,9 +750,8 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "float division by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - VTABLE_set_number_native(INTERP, dest, SELF.get_number() / d); - return dest; + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), + SELF.get_number() / d); } @@ -826,8 +798,8 @@ MULTI PMC *floor_divide(BigInt value, PMC *dest) { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); return VTABLE_floor_divide(INTERP, temp, value, dest); } @@ -840,11 +812,9 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "float division by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - f = floor(SELF.get_number() / d); - VTABLE_set_integer_native(INTERP, dest, (INTVAL)f); - return dest; + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), + (INTVAL)f); } @@ -855,12 +825,9 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "float division by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - f = floor(SELF.get_number() / value); - VTABLE_set_integer_native(INTERP, dest, (INTVAL)f); - - return dest; + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), (INTVAL)f); } VTABLE PMC *floor_divide_float(FLOATVAL value, PMC *dest) { @@ -870,12 +837,9 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "float division by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - f = floor(SELF.get_number() / value); - VTABLE_set_integer_native(INTERP, dest, (INTVAL)f); - - return dest; + return Parrot_pmc_new_init_int(INTERP, + VTABLE_type(INTERP, SELF), (INTVAL)f); } MULTI void i_floor_divide(BigInt value) { @@ -948,8 +912,8 @@ MULTI PMC *modulus(BigInt value, PMC *dest) { PMC *temp; maybe_throw_overflow_error(INTERP); - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); return VTABLE_modulus(INTERP, temp, value, dest); } @@ -961,11 +925,8 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "int modulus by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), intval_mod(SELF.get_integer(), d)); - return dest; } @@ -974,11 +935,8 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "int modulus by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), intval_mod(SELF.get_integer(), value)); - return dest; } @@ -987,11 +945,8 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO, "int modulus by zero"); - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), intval_mod(SELF.get_integer(), (INTVAL)value)); - return dest; } @@ -1035,6 +990,46 @@ /* +=item C + +=item C + +Set C to the negated value of C. If the value of C +is the minimum integer, a BigInt is created. + +=cut + +*/ + + VTABLE PMC *neg(PMC *dest) { + const INTVAL a = SELF.get_integer(); + + if (a != PARROT_INTVAL_MIN) + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), + -a); + else { + PMC *promoted; + maybe_throw_overflow_error(INTERP); + promoted = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, 0); + return VTABLE_subtract_int(INTERP, promoted, a, promoted); + } + } + + VTABLE void i_neg() { + const INTVAL a = SELF.get_integer(); + + if (a != PARROT_INTVAL_MIN) + VTABLE_set_integer_native(INTERP, SELF, -a); + else { + maybe_throw_overflow_error(INTERP); + SELF = upgrade_self_to_bignum(INTERP, SELF); + VTABLE_set_integer_native(INTERP, SELF, 0); + VTABLE_i_subtract_int(INTERP, SELF, a); + } + } + +/* + =item C The C<==> operation. @@ -1045,15 +1040,16 @@ VTABLE INTVAL is_equal(PMC *value) { INTVAL retval; - PMC *temp; switch (value->vtable->base_type) { case enum_class_BigInt: - temp = Parrot_pmc_new(INTERP, enum_class_BigInt); - VTABLE_set_integer_native(INTERP, temp, SELF.get_integer()); + { + PMC const *temp = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, + SELF.get_integer()); Parrot_mmd_multi_dispatch_from_c_args(INTERP, "is_equal", "PP->I", temp, value, &retval); return retval; + } break; default: return (VTABLE_get_integer(INTERP, SELF) @@ -1074,15 +1070,20 @@ */ MULTI INTVAL cmp(String value) { - const FLOATVAL fdiff = SELF.get_number() - VTABLE_get_number(INTERP, value); + INTVAL iv; + GET_ATTR_iv(INTERP, SELF, iv); + { + const FLOATVAL fdiff = + (FLOATVAL)iv - VTABLE_get_number(INTERP, value); - if (FLOAT_IS_ZERO(fdiff)) { - const INTVAL idiff = - SELF.get_integer() - VTABLE_get_integer(INTERP, value); - return idiff > 0 ? 1 : idiff < 0 ? -1 : 0; - } + if (FLOAT_IS_ZERO(fdiff)) { + const INTVAL idiff = + SELF.get_integer() - VTABLE_get_integer(INTERP, value); + return idiff > 0 ? 1 : idiff < 0 ? -1 : 0; + } - return fdiff > 0 ? 1 : -1; + return fdiff > 0 ? 1 : -1; + } } @@ -1200,27 +1201,38 @@ =item C -Sets C to the absolute value of SELF. +Sets C to the absolute value of C. If the value of C +is the minimum integer, a BigInt is created. =cut */ VTABLE PMC *absolute(PMC *dest) { - const INTVAL a = abs(SELF.get_integer()); - - /* TT # 1245 overflow for -maxint */ - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, dest, a); - return dest; + const INTVAL a = SELF.get_integer(); + if (a != PARROT_INTVAL_MIN) + return Parrot_pmc_new_init_int(INTERP, VTABLE_type(INTERP, SELF), + abs(a)); + else { + PMC *promoted; + maybe_throw_overflow_error(INTERP); + promoted = Parrot_pmc_new_init_int(INTERP, enum_class_BigInt, a); + return VTABLE_neg(INTERP, promoted, dest); + } } VTABLE void i_absolute() { - const INTVAL a = abs(SELF.get_integer()); - VTABLE_set_integer_native(INTERP, SELF, a); + const INTVAL a = SELF.get_integer(); + + if (a != PARROT_INTVAL_MIN) + VTABLE_set_integer_native(INTERP, SELF, abs(a)); + else { + maybe_throw_overflow_error(INTERP); + SELF = upgrade_self_to_bignum(INTERP, SELF); + VTABLE_i_neg(INTERP, SELF); + } } diff -Nru parrot-2.7.0/src/pmc/lexinfo.pmc parrot-2.8.0/src/pmc/lexinfo.pmc --- parrot-2.7.0/src/pmc/lexinfo.pmc 2010-06-26 14:36:55.000000000 +0000 +++ parrot-2.8.0/src/pmc/lexinfo.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2008-2010, Parrot Foundation. -$Id: lexinfo.pmc 47863 2010-06-26 12:50:08Z whiteknight $ +$Id: lexinfo.pmc 48631 2010-08-24 16:22:28Z plobsing $ =head1 NAME @@ -56,8 +56,7 @@ } VTABLE void init() { - Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, - "Cannot create a LexInfo PMC without an initializer"); + SELF.init_pmc(PMCNULL); } VTABLE void init_pmc(PMC *sub) { @@ -99,25 +98,10 @@ if (Parrot_str_equal(INTERP, what, CONST_STRING(INTERP, "symbols"))) { PMC * const result = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray); const Hash *hash = (Hash *)SELF.get_pointer(); - const UINTVAL entries = hash->entries; - UINTVAL found = 0; - INTVAL i; - - for (i = hash->mask; i >= 0; --i) { - HashBucket *bucket = hash->bucket_indices[i]; - while (bucket) { - if (++found > entries) - Parrot_ex_throw_from_c_args(INTERP, NULL, 1, - "Detected corruption at LexInfo hash %p entries %d", - hash, (int)entries); - - PARROT_ASSERT(bucket->key); - VTABLE_push_string(INTERP, result, (STRING *)bucket->key); - - bucket = bucket->next; - } - } + parrot_hash_iterate(hash, + PARROT_ASSERT(_bucket->key); + VTABLE_push_string(INTERP, result, (STRING *)_bucket->key);); return result; } @@ -125,41 +109,6 @@ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, "Unknown introspection value '%S'", what); } - -/* - -=item C - -=item C - -=item C - -Freeze/thaw interface used during freeze/thaw of the Sub PMC. -The implementation of the Hash PMC is called. - -=cut - -*/ - - - VTABLE void thaw(PMC *info) { - const INTVAL elems = VTABLE_shift_integer(INTERP, info); - const INTVAL k_type = VTABLE_shift_integer(INTERP, info); - const INTVAL v_type = VTABLE_shift_integer(INTERP, info); - Hash *hash; - - UNUSED(k_type); - UNUSED(v_type); - - PARROT_ASSERT(v_type == enum_hash_int); - /* TODO make a better interface for hash creation - * TODO create hash with needed types in the first place - */ - - SELF.init_pmc(NULL); - hash = (Hash *)SELF.get_pointer(); - hash->entries = elems; - } } diff -Nru parrot-2.7.0/src/pmc/lexpad.pmc parrot-2.8.0/src/pmc/lexpad.pmc --- parrot-2.7.0/src/pmc/lexpad.pmc 2010-03-28 22:00:43.000000000 +0000 +++ parrot-2.8.0/src/pmc/lexpad.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* -Copyright (C) 2007-2009, Parrot Foundation. -$Id: lexpad.pmc 45219 2010-03-28 01:11:50Z petdance $ +Copyright (C) 2007-2010, Parrot Foundation. +$Id: lexpad.pmc 49148 2010-09-19 04:14:44Z chromatic $ =head1 NAME @@ -97,10 +97,14 @@ } VTABLE INTVAL exists_keyed_str(STRING *name) { - PMC *info; + PMC *info; + Hash *hash; GET_ATTR_lexinfo(INTERP, SELF, info); - return parrot_hash_get_bucket(INTERP, - (Hash *)VTABLE_get_pointer(INTERP, info), name) != 0; + hash = (Hash *)VTABLE_get_pointer(INTERP, info); + + return hash->entries + ? (parrot_hash_get_bucket(INTERP, hash, name) != 0) + : 0; } VTABLE INTVAL exists_keyed(PMC *name) { @@ -109,23 +113,24 @@ } VTABLE PMC *get_pmc_keyed_str(STRING *name) { - PMC * info; - Hash * hash; - PMC * ctx; - HashBucket * b; - INTVAL regno; + PMC *info; + Hash *hash; + PMC *ctx; + HashBucket *b; GET_ATTR_lexinfo(INTERP, SELF, info); - GET_ATTR_ctx(INTERP, SELF, ctx); hash = (Hash *)VTABLE_get_pointer(INTERP, info); - b = parrot_hash_get_bucket(INTERP, hash, name); - if (!b) - return NULL; + if (!hash->entries) + return PMCNULL; - regno = (INTVAL) b->value; + b = parrot_hash_get_bucket(INTERP, hash, name); + + if (!b) + return PMCNULL; - return CTX_REG_PMC(ctx, regno); + GET_ATTR_ctx(INTERP, SELF, ctx); + return CTX_REG_PMC(ctx, (INTVAL)b->value); } VTABLE PMC *get_pmc_keyed(PMC *name) { @@ -138,10 +143,8 @@ Hash * hash; PMC * ctx; HashBucket * b; - INTVAL regno; GET_ATTR_lexinfo(INTERP, SELF, info); - GET_ATTR_ctx(INTERP, SELF, ctx); hash = (Hash *)VTABLE_get_pointer(INTERP, info); b = parrot_hash_get_bucket(INTERP, hash, name); @@ -149,8 +152,8 @@ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LEX_NOT_FOUND, "Lexical '%Ss' not found", name); - regno = (INTVAL) b->value; - CTX_REG_PMC(ctx, regno) = value; + GET_ATTR_ctx(INTERP, SELF, ctx); + CTX_REG_PMC(ctx, (INTVAL)b->value) = value; } VTABLE void set_pmc_keyed(PMC *name, PMC *value) { diff -Nru parrot-2.7.0/src/pmc/multisub.pmc parrot-2.8.0/src/pmc/multisub.pmc --- parrot-2.7.0/src/pmc/multisub.pmc 2010-05-19 09:28:37.000000000 +0000 +++ parrot-2.8.0/src/pmc/multisub.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: multisub.pmc 46700 2010-05-16 12:30:35Z bacek $ +$Id: multisub.pmc 48718 2010-08-29 02:05:11Z chromatic $ =head1 NAME @@ -34,13 +34,9 @@ } VTABLE void push_pmc(PMC *value) { - STRING * const _sub = CONST_STRING(INTERP, "Sub"); - STRING * const _nci = CONST_STRING(INTERP, "NCI"); - - if (!VTABLE_isa(INTERP, value, _sub) - && !VTABLE_isa(INTERP, value, _nci)) - Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, - "attempt to push non Sub PMC"); + if (!VTABLE_does(INTERP, value, CONST_STRING(INTERP, "invokable"))) + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_OPERATION, "attempt to push non Sub PMC"); SUPER(value); } diff -Nru parrot-2.7.0/src/pmc/namespace.pmc parrot-2.8.0/src/pmc/namespace.pmc --- parrot-2.7.0/src/pmc/namespace.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/namespace.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2005-2010, Parrot Foundation. -$Id: namespace.pmc 48543 2010-08-17 02:33:06Z petdance $ +$Id: namespace.pmc 48790 2010-09-04 20:06:03Z plobsing $ =head1 NAME @@ -32,7 +32,7 @@ __attribute__nonnull__(2) __attribute__nonnull__(3); -static void add_nci_to_namespace(PARROT_INTERP, +static void add_native_to_namespace(PARROT_INTERP, ARGIN(PMC *SELF), ARGIN(STRING *key), ARGIN_NULLOK(PMC *value)) @@ -76,7 +76,7 @@ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(SELF) \ , PARROT_ASSERT_ARG(key)) -#define ASSERT_ARGS_add_nci_to_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_add_native_to_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(SELF) \ , PARROT_ASSERT_ARG(key)) @@ -235,15 +235,14 @@ */ static void -add_nci_to_namespace(PARROT_INTERP, ARGIN(PMC *SELF), ARGIN(STRING *key), +add_native_to_namespace(PARROT_INTERP, ARGIN(PMC *SELF), ARGIN(STRING *key), ARGIN_NULLOK(PMC *value)) { - ASSERT_ARGS(add_nci_to_namespace) - - STRING * const nci_str = CONST_STRING(interp, "NCI"); + ASSERT_ARGS(add_native_to_namespace) if (!PMC_IS_NULL(value) - && VTABLE_isa(interp, value, nci_str)) { + && (value->vtable->base_type == enum_class_NativePCCMethod || + value->vtable->base_type == enum_class_NCI)) { Parrot_NameSpace_attributes * const nsinfo = PARROT_NAMESPACE(SELF); PMC * const classobj = VTABLE_get_class(interp, SELF); @@ -427,18 +426,20 @@ :value->vtable->base_type == enum_class_NameSpace; /* don't need this everywhere yet */ - PMC * const old = (PMC *)parrot_hash_get(INTERP, (Hash *)SELF.get_pointer(), key); + PMC *old; /* If it's a sub... */ if (maybe_add_sub_to_namespace(INTERP, SELF, key, value)) return; - /* If it's an NCI method */ - add_nci_to_namespace(INTERP, SELF, key, value); + /* If it's an native method */ + add_native_to_namespace(INTERP, SELF, key, value); /* If it's a multi-sub and the first in this NS... */ add_multi_to_namespace(INTERP, SELF, key, value); + old = (PMC *)parrot_hash_get(INTERP, (Hash *)SELF.get_pointer(), key); + if (!old) SUPER(key, value); else { diff -Nru parrot-2.7.0/src/pmc/nativepccmethod.pmc parrot-2.8.0/src/pmc/nativepccmethod.pmc --- parrot-2.7.0/src/pmc/nativepccmethod.pmc 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/pmc/nativepccmethod.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,198 @@ +/* +Copyright (C) 2010, Parrot Foundation. +$Id: nativepccmethod.pmc 48909 2010-09-10 15:28:24Z pmichaud $ + +=head1 NAME + +src/pmc/nativepccmethod.pmc - Native PCC Method PMC + +=head1 DESCRIPTION + +Container for native functions that handle PCC on their own. + +=head2 Methods + +=over 4 + +=cut + +*/ + +/* HEADERIZER HFILE: none */ + +pmclass NativePCCMethod auto_attrs provides invokable { + ATTR STRING *signature; + ATTR void *func; + + /* MMD fields */ + ATTR STRING *mmd_long_signature; + ATTR PMC *mmd_multi_sig; + +/* + +=item C + +Initializes the PMC with a C function pointer. + +=cut + +*/ + + VTABLE void init() { + Parrot_NativePCCMethod_attributes *attrs = PARROT_NATIVEPCCMETHOD(SELF); + + attrs->func = NULL; + attrs->signature = STRINGNULL; + attrs->mmd_long_signature = STRINGNULL; + attrs->mmd_multi_sig = PMCNULL; + + PObj_custom_mark_SET(SELF); + } + +/* + +=item C + +Get the pointer to the native function. + +=item C + +Set the pointer to the native function and the PCC signature. + +=cut + +*/ + + + VTABLE void *get_pointer() { + return PARROT_NATIVEPCCMETHOD(SELF)->func; + } + + VTABLE void set_pointer_keyed_str(STRING *sig, void *func) { + PARROT_NATIVEPCCMETHOD(SELF)->signature = sig; + PARROT_NATIVEPCCMETHOD(SELF)->func = func; + } + +/* + +=item C + +=item C + +NULLness check. + +=cut + +*/ + + VTABLE INTVAL defined() { + return !! PARROT_NATIVEPCCMETHOD(SELF)->func; + } + + VTABLE INTVAL get_bool() { + return STATICSELF.defined(); + } + +/* + +=item C + +Call the function pointer. + +=cut + +*/ + + VTABLE opcode_t *invoke(void *next) { + void *func; + native_pcc_method_t fptr; + + GET_ATTR_func(INTERP, SELF, func); + if (!func) + Parrot_ex_throw_from_c_args(INTERP, NULL, + EXCEPTION_INVALID_OPERATION, + "attempt to call NULL native function"); + + fptr = (native_pcc_method_t)D2FPTR(func); + fptr(INTERP); + + /* + * If this function was tailcalled, the return result + * is already passed back to the caller of this frame. + * We therefore invoke the return continuation here, + * which gets rid of this frame and returns the real + * return address. + */ + { + PMC *cont = INTERP->current_cont; + + if (cont && cont != NEED_CONTINUATION + && (PObj_get_FLAGS(cont) & SUB_FLAG_TAILCALL)) { + cont = Parrot_pcc_get_continuation(interp, CURRENT_CONTEXT(interp)); + next = VTABLE_invoke(INTERP, cont, next); + } + } + + return (opcode_t *)next; + } + +/* + +=item C + +Mark contained elements for GC. + +=cut + +*/ + + VTABLE void mark() { + Parrot_NativePCCMethod_attributes *attrs = PARROT_NATIVEPCCMETHOD(SELF); + + Parrot_gc_mark_STRING_alive(interp, attrs->signature); + Parrot_gc_mark_STRING_alive(interp, attrs->mmd_long_signature); + Parrot_gc_mark_PMC_alive(interp, attrs->mmd_multi_sig); + } + +/* + +=item C + +Create a clone of this PMC. + +=cut + +*/ + + VTABLE PMC *clone() { + PMC *ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type); + Parrot_NativePCCMethod_attributes *self_attrs = PARROT_NATIVEPCCMETHOD(SELF); + Parrot_NativePCCMethod_attributes *ret_attrs = PARROT_NATIVEPCCMETHOD(ret); + + ret_attrs->func = self_attrs->func; + ret_attrs->signature = self_attrs->signature; + ret_attrs->mmd_long_signature = self_attrs->mmd_long_signature; + ret_attrs->mmd_multi_sig = self_attrs->mmd_multi_sig; + + return ret; + } +} + +/* + +=back + +=head1 SEE ALSO + +F. + +=cut + +*/ + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ diff -Nru parrot-2.7.0/src/pmc/nci.pmc parrot-2.8.0/src/pmc/nci.pmc --- parrot-2.7.0/src/pmc/nci.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/nci.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: nci.pmc 48543 2010-08-17 02:33:06Z petdance $ +$Id: nci.pmc 48928 2010-09-11 06:40:39Z chromatic $ =head1 NAME @@ -221,20 +221,6 @@ /* -=item C - -Sets the specified function pointer and raw flag. - -=cut - -*/ - - METHOD make_raw_nci(PMC *func) { - VTABLE_set_pointer(interp, SELF, (void *)func); - } - -/* - =item C Initializes the NCI with a C function pointer. @@ -244,11 +230,13 @@ */ VTABLE void init() { - /* Mark that we're not a raw NCI. */ - PObj_flag_CLEAR(private2, SELF); PObj_custom_mark_SET(SELF); } + VTABLE void *get_pointer() { + return PARROT_NCI(SELF)->orig_func; + } + /* =item C @@ -259,15 +247,6 @@ */ - VTABLE void set_pointer(void *ptr) { - SET_ATTR_orig_func(INTERP, SELF, ptr); - PObj_flag_SET(private2, SELF); - } - - VTABLE void *get_pointer() { - return PARROT_NCI(SELF)->orig_func; - } - VTABLE void set_pointer_keyed_str(STRING *key, void *func) { Parrot_NCI_attributes * const nci_info = PARROT_NCI(SELF); @@ -278,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); } @@ -300,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); } } @@ -337,7 +317,7 @@ nci_info_ret->pcc_params_signature = nci_info_self->pcc_params_signature; nci_info_ret->pcc_return_signature = nci_info_self->pcc_params_signature; nci_info_ret->arity = nci_info_self->arity; - PObj_get_FLAGS(ret) |= (PObj_get_FLAGS(SELF) & 0x7); + PObj_get_FLAGS(ret) = PObj_get_FLAGS(SELF); return ret; } @@ -377,9 +357,7 @@ PMC *cont; GET_ATTR_orig_func(INTERP, SELF, orig_func); - func = PObj_flag_TEST(private2, SELF) - ? (nci_thunk_t) D2FPTR(orig_func) - : (nci_thunk_t) D2FPTR(nci_info->func); + func = (nci_thunk_t)D2FPTR(nci_info->func); GET_ATTR_fb_info(INTERP, SELF, fb_info); diff -Nru parrot-2.7.0/src/pmc/object.pmc parrot-2.8.0/src/pmc/object.pmc --- parrot-2.7.0/src/pmc/object.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/object.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: object.pmc 48543 2010-08-17 02:33:06Z petdance $ +$Id: object.pmc 48920 2010-09-10 21:39:47Z chromatic $ =head1 NAME @@ -355,7 +355,7 @@ /* If there's a vtable override for 'get_attr_str' run that first. */ PMC * const method = Parrot_oo_find_vtable_override(INTERP, - VTABLE_get_class(INTERP, SELF), get_attr); + obj->_class, get_attr); if (!PMC_IS_NULL(method)) { PMC *result = PMCNULL; @@ -420,7 +420,7 @@ /* If there's a vtable override for 'set_attr_str' run that first. */ PMC * const method = Parrot_oo_find_vtable_override(INTERP, - VTABLE_get_class(INTERP, SELF), vtable_meth_name); + obj->_class, vtable_meth_name); if (!PMC_IS_NULL(method)) { Parrot_ext_call(INTERP, method, "PiSP->", SELF, name, value); @@ -594,20 +594,7 @@ */ VTABLE PMC *get_class() { - PMC * const classobj = PARROT_OBJECT(SELF)->_class; - STRING * const get_class = CONST_STRING(INTERP, "get_class"); - - /* If there's a vtable override for 'get_class' run that instead. */ - PMC * const method = Parrot_oo_find_vtable_override(INTERP, - classobj, get_class); - - if (!PMC_IS_NULL(method)) { - PMC *result; - Parrot_ext_call(INTERP, method, "Pi->P", SELF, &result); - return result; - } - - return classobj; + return PARROT_OBJECT(SELF)->_class; } @@ -690,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); } } diff -Nru parrot-2.7.0/src/pmc/oplib.pmc parrot-2.8.0/src/pmc/oplib.pmc --- parrot-2.7.0/src/pmc/oplib.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/oplib.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: oplib.pmc 48412 2010-08-11 05:38:18Z plobsing $ +$Id: oplib.pmc 48985 2010-09-14 00:00:40Z jkeenan $ =head1 NAME @@ -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; @@ -116,10 +116,6 @@ return STATICSELF.elements(); } - VTABLE INTVAL get_integer() { - return STATICSELF.elements(); - } - METHOD op_family(STRING *shortname) { char * const sname = Parrot_str_to_cstring(INTERP, shortname); diff -Nru parrot-2.7.0/src/pmc/packfileannotations.pmc parrot-2.8.0/src/pmc/packfileannotations.pmc --- parrot-2.7.0/src/pmc/packfileannotations.pmc 2010-05-11 00:29:03.000000000 +0000 +++ parrot-2.8.0/src/pmc/packfileannotations.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: packfileannotations.pmc 46369 2010-05-06 17:18:01Z NotFound $ +$Id: packfileannotations.pmc 48891 2010-09-09 21:37:38Z nwellnhof $ =head1 NAME @@ -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(); diff -Nru parrot-2.7.0/src/pmc/packfilefixupentry.pmc parrot-2.8.0/src/pmc/packfilefixupentry.pmc --- parrot-2.7.0/src/pmc/packfilefixupentry.pmc 2010-06-21 08:21:00.000000000 +0000 +++ parrot-2.8.0/src/pmc/packfilefixupentry.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: packfilefixupentry.pmc 47722 2010-06-20 08:51:14Z bacek $ +$Id: packfilefixupentry.pmc 48941 2010-09-11 21:59:33Z NotFound $ =head1 NAME @@ -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; } diff -Nru parrot-2.7.0/src/pmc/packfile.pmc parrot-2.8.0/src/pmc/packfile.pmc --- parrot-2.7.0/src/pmc/packfile.pmc 2010-08-17 18:07:12.000000000 +0000 +++ parrot-2.8.0/src/pmc/packfile.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: packfile.pmc 48514 2010-08-15 12:43:34Z mikehh $ +$Id: packfile.pmc 48941 2010-09-11 21:59:33Z NotFound $ =head1 NAME @@ -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 + +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 diff -Nru parrot-2.7.0/src/pmc/parrotinterpreter.pmc parrot-2.8.0/src/pmc/parrotinterpreter.pmc --- parrot-2.7.0/src/pmc/parrotinterpreter.pmc 2010-06-11 08:06:05.000000000 +0000 +++ parrot-2.8.0/src/pmc/parrotinterpreter.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: parrotinterpreter.pmc 47541 2010-06-10 18:38:14Z NotFound $ +$Id: parrotinterpreter.pmc 48583 2010-08-20 13:08:12Z NotFound $ =head1 NAME @@ -848,6 +848,23 @@ RETURN(PMC *handle); } +/* + +=item METHOD getpid() + +Returns the pid of the current process, 0 in platforms that doesn't +support it. + +This method is experimental. See TT #1564. + +=cut + +*/ + + METHOD getpid() { + INTVAL id = Parrot_getpid(); + RETURN(INTVAL id); + } } diff -Nru parrot-2.7.0/src/pmc/parrotlibrary.pmc parrot-2.8.0/src/pmc/parrotlibrary.pmc --- parrot-2.7.0/src/pmc/parrotlibrary.pmc 2010-03-28 22:00:43.000000000 +0000 +++ parrot-2.8.0/src/pmc/parrotlibrary.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* -Copyright (C) 2001-2009, Parrot Foundation. -$Id: parrotlibrary.pmc 45219 2010-03-28 01:11:50Z petdance $ +Copyright (C) 2001-2010, Parrot Foundation. +$Id: parrotlibrary.pmc 48704 2010-08-28 02:14:58Z chromatic $ =head1 NAME @@ -49,9 +49,7 @@ */ - VTABLE void init() { - PObj_custom_destroy_SET(SELF); - } + VTABLE void init() {} /* @@ -82,8 +80,14 @@ VTABLE PMC *clone() { PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type); - PMC_oplib_init(dest) = PMC_oplib_init(SELF); - PMC_dlhandle(dest) = PMC_dlhandle(SELF); + + if (PMC_oplib_init(SELF)) + PMC_oplib_init(dest) = PMC_oplib_init(SELF); + + if (PMC_dlhandle(SELF)) { + PMC_dlhandle(dest) = PMC_dlhandle(SELF); + PObj_custom_destroy_SET(dest); + } if (PMC_metadata(SELF)) PMC_metadata(dest) = VTABLE_clone(INTERP, PMC_metadata(SELF)); @@ -126,7 +130,7 @@ =item C -Get the pointer to the shared library handle. +Gets the pointer to the shared library handle. =cut @@ -140,7 +144,7 @@ =item C -Set the pointer to the shared library handle. +Sets the pointer to the shared library handle. =cut @@ -148,6 +152,7 @@ VTABLE void set_pointer(void *handle) { PMC_dlhandle(SELF) = handle; + PObj_custom_destroy_SET(SELF); } } @@ -155,16 +160,6 @@ =back -=head1 SEE ALSO - - Date: Mon, 29 Sep 2003 14:37:11 -0400 (EDT) - Subject: Library loading and initialization sequence - From: Dan Sugalski - -=head1 HISTORY - -Initial version by leo 2003.10.12. - =cut */ diff -Nru parrot-2.7.0/src/pmc/resizablestringarray.pmc parrot-2.8.0/src/pmc/resizablestringarray.pmc --- parrot-2.7.0/src/pmc/resizablestringarray.pmc 2010-05-05 09:58:28.000000000 +0000 +++ parrot-2.8.0/src/pmc/resizablestringarray.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: resizablestringarray.pmc 46300 2010-05-05 03:58:50Z jimmy $ +$Id: resizablestringarray.pmc 48985 2010-09-14 00:00:40Z jkeenan $ =head1 NAME @@ -302,25 +302,6 @@ /* -=item C - -Removes and returns the first element in the array. - -=cut - -*/ - - VTABLE PMC *shift_pmc() { - STRING * const strval = SELF.shift_string(); - PMC * const value = Parrot_pmc_new(INTERP, enum_class_String); - - VTABLE_set_string_native(INTERP, value, strval); - - return value; - } - -/* - =item C Removes and returns the first element in the array. diff -Nru parrot-2.7.0/src/pmc/scalar.pmc parrot-2.8.0/src/pmc/scalar.pmc --- parrot-2.7.0/src/pmc/scalar.pmc 2010-05-05 09:58:28.000000000 +0000 +++ parrot-2.8.0/src/pmc/scalar.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: scalar.pmc 46289 2010-05-04 22:16:04Z bacek $ +$Id: scalar.pmc 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -807,98 +807,6 @@ /* -=back - -=head2 Logical Methods - -=over 4 - -=item C - -Returns the result of the logical C of C and C, i.e. returns -C it is true or C: C is alway ignored. - -=cut - -*/ - - VTABLE PMC *logical_or(PMC *value, PMC *dest) { - if (SELF.get_bool()) - return SELF; - - return value; - } - -/* - -=item C< PMC *logical_and(PMC *value, PMC *dest)> - -Returns the result of the logical C of C and C, i.e. -returns C if C is true else C. C is always ignored. - -=cut - -*/ - - VTABLE PMC *logical_and(PMC *value, PMC *dest) { - if (SELF.get_bool()) - return value; - - return SELF; - } - -/* - -=item C - -Returns the result of the logical C of C and C<*value>. - -=cut - -*/ - - VTABLE PMC *logical_xor(PMC *value, PMC *dest) { - const INTVAL my_bool = SELF.get_bool(); - const INTVAL value_bool = VTABLE_get_bool(INTERP, value); - - if (my_bool && ! value_bool) - return SELF; - else if (value_bool && ! my_bool) - return value; - - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - VTABLE_set_bool(INTERP, dest, 0); - return dest; - } - -/* - -=item C - -=item C - -Returns in C<*dest> the result of the logical negation of the scalar and -C<*value>. - -=cut - -*/ - - VTABLE PMC *logical_not(PMC *dest) { - const INTVAL a = ! SELF.get_bool(); - - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_bool(INTERP, dest, a); - return dest; - } - - VTABLE void i_logical_not() { - VTABLE_set_bool(INTERP, SELF, ! SELF.get_bool()); - } - -/* - =item C Always returns true. diff -Nru parrot-2.7.0/src/pmc/scheduler.pmc parrot-2.8.0/src/pmc/scheduler.pmc --- parrot-2.7.0/src/pmc/scheduler.pmc 2010-06-12 13:50:22.000000000 +0000 +++ parrot-2.8.0/src/pmc/scheduler.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: scheduler.pmc 47560 2010-06-12 01:14:00Z whiteknight $ +$Id: scheduler.pmc 48696 2010-08-27 17:12:46Z nwellnhof $ =head1 NAME diff -Nru parrot-2.7.0/src/pmc/stringbuilder.pmc parrot-2.8.0/src/pmc/stringbuilder.pmc --- parrot-2.7.0/src/pmc/stringbuilder.pmc 2010-06-11 08:06:05.000000000 +0000 +++ parrot-2.8.0/src/pmc/stringbuilder.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: stringbuilder.pmc 47435 2010-06-07 17:43:09Z NotFound $ +$Id: stringbuilder.pmc 48982 2010-09-13 20:50:02Z luben $ =head1 NAME @@ -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 */ @@ -37,6 +34,7 @@ pmclass StringBuilder provides string auto_attrs { ATTR STRING *buffer; /* Mutable string to gather results */ + /* =item C @@ -51,6 +49,7 @@ STATICSELF.init_int(INITIAL_STRING_CAPACITY); } + /* =item C @@ -62,37 +61,64 @@ */ VTABLE void init_int(INTVAL initial_size) { - STRING * const buffer = mem_gc_allocate_zeroed_typed(INTERP, STRING); - buffer->encoding = Parrot_default_encoding_ptr; - buffer->charset = Parrot_default_charset_ptr; - /* We need all string flags here because we use this buffer in substr_str */ - buffer->flags = PObj_is_string_FLAG | PObj_live_FLAG | PObj_external_FLAG; - buffer->_bufstart = buffer->strstart = mem_gc_allocate_n_typed(INTERP, - initial_size, char); - buffer->_buflen = initial_size; + STRING * const buffer = Parrot_gc_new_string_header(INTERP, 0); + + if (initial_size < INITIAL_STRING_CAPACITY) + initial_size = INITIAL_STRING_CAPACITY; + + 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); } + /* -=item C +=item C -Free the buffer on destruction. +Initializes the StringBuilder with an array of STRINGs. =cut */ - VTABLE void destroy() { + VTABLE void init_pmc(PMC *ar) { + const INTVAL count = VTABLE_elements(INTERP, ar); + + if (!count) + STATICSELF.init_int(INITIAL_STRING_CAPACITY); + else { + STRING * const first = VTABLE_get_string_keyed_int(INTERP, ar, 0); + const INTVAL size = Parrot_str_byte_length(INTERP, first); + INTVAL i; + + /* it's just an estimate, but estimates help */ + STATICSELF.init_int(size * count); + SELF.push_string(first); + + for (i = 1; i < count; ++i) + SELF.push_string(VTABLE_get_string_keyed_int(INTERP, ar, i)); + } + } + +/* + +=item C + +Mark the buffer. + +=cut + +*/ + + 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); } } @@ -109,8 +135,8 @@ VTABLE STRING *get_string() { STRING *buffer; 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); } @@ -125,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)) @@ -136,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_live_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 */ @@ -218,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) { @@ -353,16 +396,13 @@ } else if (Parrot_str_equal(INTERP, key, comma)) { INTVAL num_args = VTABLE_elements(INTERP, args); - INTVAL pos_args = 1; + INTVAL pos_args; - VTABLE_push_string(INTERP, stringbuilder, - VTABLE_get_string_keyed_int(INTERP, args, 0)); - - while (pos_args < num_args) { - VTABLE_push_string(INTERP, stringbuilder, comma_space); + for (pos_args = 0; pos_args < num_args; ++pos_args) { + if (pos_args > 0) + VTABLE_push_string(INTERP, stringbuilder, comma_space); VTABLE_push_string(INTERP, stringbuilder, VTABLE_get_string_keyed_int(INTERP, args, pos_args)); - pos_args++; } } else if (Parrot_str_equal(INTERP, key, percent)) { @@ -418,17 +458,9 @@ /* -=item C +=item C -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 @@ -437,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; } /* diff -Nru parrot-2.7.0/src/pmc/stringhandle.pmc parrot-2.8.0/src/pmc/stringhandle.pmc --- parrot-2.7.0/src/pmc/stringhandle.pmc 2010-08-06 11:23:29.000000000 +0000 +++ parrot-2.8.0/src/pmc/stringhandle.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2008-2010, Parrot Foundation. -$Id: stringhandle.pmc 48253 2010-08-02 13:07:50Z NotFound $ +$Id: stringhandle.pmc 48949 2010-09-12 01:05:04Z NotFound $ =head1 NAME @@ -193,9 +193,10 @@ 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 = Parrot_str_new(INTERP, "", 0); + new_string = CONST_STRING(INTERP, ""); SET_ATTR_stringhandle(INTERP, SELF, new_string); } @@ -203,7 +204,7 @@ /* Set a default mode of read-only. */ GET_ATTR_mode(INTERP, SELF, open_mode); if (STRING_IS_NULL(open_mode)) { - open_mode = Parrot_str_new_constant(INTERP, "r"); + open_mode = CONST_STRING(INTERP, "r"); SET_ATTR_mode(INTERP, SELF, open_mode); } @@ -215,21 +216,6 @@ /* -=item C - -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 Reset some core data for the StringHandle, but don't delete the string data, as @@ -313,9 +299,10 @@ 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 = Parrot_str_new_constant(INTERP, ""); + string_result = CONST_STRING(INTERP, ""); } RETURN(STRING *string_result); diff -Nru parrot-2.7.0/src/pmc/stringiterator.pmc parrot-2.8.0/src/pmc/stringiterator.pmc --- parrot-2.7.0/src/pmc/stringiterator.pmc 2010-06-17 04:58:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/stringiterator.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: stringiterator.pmc 47643 2010-06-15 16:52:49Z NotFound $ +$Id: stringiterator.pmc 48833 2010-09-07 22:58:38Z nwellnhof $ =head1 NAME @@ -27,11 +27,9 @@ /* HEADERIZER END: static */ pmclass StringIterator auto_attrs extends Iterator { - ATTR PMC *string; /* String to iterate over */ - ATTR INTVAL pos; /* Current position of iterator for forward iterator */ - /* Previous position of iterator for reverse iterator */ - ATTR INTVAL length; /* Length of C */ - ATTR INTVAL reverse; /* Direction of iteration. 1 - for reverse iteration */ + ATTR STRING *str_val; /* String to iterate over */ + ATTR String_iter iter; /* String iterator */ + ATTR INTVAL reverse; /* Direction of iteration. 1 - for reverse iteration */ /* @@ -43,10 +41,13 @@ */ VTABLE void init_pmc(PMC *string) { - SET_ATTR_string(INTERP, SELF, string); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING * const str_val = VTABLE_get_string(INTERP, string); + + SET_ATTR_str_val(INTERP, SELF, str_val); + STRING_ITER_INIT(INTERP, iter); + SET_ATTR_reverse(INTERP, SELF, ITERATE_FROM_START); - /* by default, iterate from start */ - SELF.set_integer_native(ITERATE_FROM_START); PObj_custom_mark_SET(SELF); } @@ -61,9 +62,10 @@ */ VTABLE void mark() { - PMC *string; - GET_ATTR_string(INTERP, SELF, string); - Parrot_gc_mark_PMC_alive(INTERP, string); + STRING *str_val; + + GET_ATTR_str_val(INTERP, SELF, str_val); + Parrot_gc_mark_STRING_alive(INTERP, str_val); } /* @@ -74,15 +76,21 @@ */ VTABLE PMC* clone() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); - PMC * const clone = - Parrot_pmc_new_init(INTERP, enum_class_StringIterator, attrs->string); - Parrot_StringIterator_attributes * const clone_attrs = - PARROT_STRINGITERATOR(clone); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + PMC *clone, *str_pmc; + String_iter *clone_iter; + STRING *str_val; + INTVAL reverse; + + str_pmc = Parrot_pmc_new(INTERP, enum_class_String); + GET_ATTR_str_val(INTERP, SELF, str_val); + VTABLE_set_string_native(INTERP, str_pmc, str_val); + clone = Parrot_pmc_new_init(INTERP, enum_class_StringIterator, str_pmc); + clone_iter = &PARROT_STRINGITERATOR(clone)->iter; + *clone_iter = *iter; + GET_ATTR_reverse(INTERP, SELF, reverse); + SET_ATTR_reverse(INTERP, clone, reverse); - clone_attrs->pos = attrs->pos; - clone_attrs->reverse = attrs->reverse; return clone; } @@ -111,12 +119,17 @@ */ VTABLE INTVAL elements() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); - if (attrs->reverse) - return attrs->pos; + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; + INTVAL reverse; + + GET_ATTR_str_val(INTERP, SELF, str_val); + GET_ATTR_reverse(INTERP, SELF, reverse); + + if (reverse) + return iter->charpos; else - return attrs->length - attrs->pos; + return str_val->strlen - iter->charpos; } VTABLE INTVAL get_integer() { @@ -137,20 +150,19 @@ */ VTABLE void set_integer_native(INTVAL value) { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); - switch (value) { - case ITERATE_FROM_START: - attrs->reverse = 0; - attrs->pos = 0; - attrs->length = VTABLE_elements(INTERP, attrs->string); - break; - case ITERATE_FROM_END: - attrs->reverse = 1; - attrs->pos = attrs->length - = VTABLE_elements(INTERP, attrs->string); - break; - default: + STRING *str_val; + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + + 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); + } + else if (value == ITERATE_FROM_END) { + SET_ATTR_reverse(INTERP, SELF, 1); + STRING_iter_set_position(INTERP, str_val, iter, str_val->strlen); + } + else { Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION, "Wrong direction for StringIterator"); } @@ -167,9 +179,13 @@ */ VTABLE PMC *get_pmc() { - PMC *string; - GET_ATTR_string(INTERP, SELF, string); - return string ? string : PMCNULL; + PMC * const string = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type( + interp, enum_class_String)); + STRING *str_val; + + GET_ATTR_str_val(INTERP, SELF, str_val); + VTABLE_set_string_native(interp, string, str_val); + return string; } /* @@ -182,17 +198,20 @@ */ VTABLE PMC *shift_pmc() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; PMC *ret; + STRING *str_val, *substr; + const String_iter old_iter = *iter; - if (attrs->pos >= attrs->length) + GET_ATTR_str_val(INTERP, SELF, str_val); + if (iter->charpos >= str_val->strlen) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String)); - VTABLE_set_string_native(INTERP, ret, - VTABLE_get_string_keyed_int(INTERP, attrs->string, attrs->pos++)); + 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; } @@ -206,14 +225,17 @@ */ VTABLE STRING *shift_string() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; + const String_iter old_iter = *iter; - if (attrs->pos >= attrs->length) + GET_ATTR_str_val(INTERP, SELF, str_val); + if (iter->charpos >= str_val->strlen) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); - return VTABLE_get_string_keyed_int(INTERP, attrs->string, attrs->pos++); + STRING_iter_skip(INTERP, str_val, iter, 1); + return Parrot_str_iter_substr(INTERP, str_val, &old_iter, iter); } /* @@ -226,14 +248,15 @@ */ VTABLE INTVAL shift_integer() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; - if (attrs->pos >= attrs->length) + GET_ATTR_str_val(INTERP, SELF, str_val); + if (iter->charpos >= str_val->strlen) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); - return VTABLE_get_integer_keyed_int(INTERP, attrs->string, attrs->pos++); + return STRING_iter_get_and_advance(INTERP, str_val, iter); } /* @@ -246,17 +269,21 @@ */ VTABLE PMC *pop_pmc() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val, *substr; PMC *ret; + const String_iter old_iter = *iter; - if (!STATICSELF.get_bool()) + GET_ATTR_str_val(INTERP, SELF, str_val); + /* Shouldn't this test be (iter->charpos <= 0) ? */ + if (SELF.elements() <= 0) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String)); - VTABLE_set_string_native(INTERP, ret, - VTABLE_get_string_keyed_int(INTERP, attrs->string, --attrs->pos)); + 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; } @@ -270,14 +297,18 @@ */ VTABLE STRING *pop_string() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); - - if (!STATICSELF.get_bool()) + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; + const String_iter old_iter = *iter; + + GET_ATTR_str_val(INTERP, SELF, str_val); + /* Shouldn't this test be (iter->charpos <= 0) ? */ + if (SELF.elements() <= 0) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); - return VTABLE_get_string_keyed_int(INTERP, attrs->string, --attrs->pos); + STRING_iter_skip(INTERP, str_val, iter, -1); + return Parrot_str_iter_substr(INTERP, str_val, iter, &old_iter); } /* @@ -290,14 +321,17 @@ */ VTABLE INTVAL pop_integer() { - Parrot_StringIterator_attributes * const attrs = - PARROT_STRINGITERATOR(SELF); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; - if (!STATICSELF.get_bool()) + GET_ATTR_str_val(INTERP, SELF, str_val); + /* Shouldn't this test be (iter->charpos <= 0) ? */ + if (SELF.elements() <= 0) Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, "StopIteration"); - return VTABLE_get_integer_keyed_int(INTERP, attrs->string, --attrs->pos); + STRING_iter_skip(INTERP, str_val, iter, -1); + return STRING_iter_get(INTERP, str_val, iter, 0); } /* @@ -311,8 +345,16 @@ */ VTABLE INTVAL get_integer_keyed_int(INTVAL idx) { - return VTABLE_get_integer_keyed_int(INTERP, STATICSELF.get_pmc(), - PARROT_STRINGITERATOR(SELF)->pos + idx); + String_iter * const iter = &PARROT_STRINGITERATOR(SELF)->iter; + STRING *str_val; + const UINTVAL offset = iter->charpos + idx; + + GET_ATTR_str_val(INTERP, SELF, str_val); + if (offset >= str_val->strlen) + Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, + "StopIteration"); + + return STRING_iter_get(INTERP, str_val, iter, idx); } /* @@ -326,8 +368,22 @@ */ VTABLE STRING *get_string_keyed_int(INTVAL idx) { - return VTABLE_get_string_keyed_int(INTERP, STATICSELF.get_pmc(), - PARROT_STRINGITERATOR(SELF)->pos + idx); + String_iter iter = PARROT_STRINGITERATOR(SELF)->iter; + String_iter next_iter; + STRING *str_val; + const UINTVAL offset = iter.charpos + idx; + + GET_ATTR_str_val(INTERP, SELF, str_val); + if (offset >= str_val->strlen) + Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS, + "StopIteration"); + + if (idx != 0) + STRING_iter_skip(INTERP, str_val, &iter, idx); + next_iter = iter; + STRING_iter_skip(INTERP, str_val, &next_iter, 1); + + return Parrot_str_iter_substr(INTERP, str_val, &iter, &next_iter); } } diff -Nru parrot-2.7.0/src/pmc/string.pmc parrot-2.8.0/src/pmc/string.pmc --- parrot-2.7.0/src/pmc/string.pmc 2010-06-19 12:34:04.000000000 +0000 +++ parrot-2.8.0/src/pmc/string.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2003-2010, Parrot Foundation. -$Id: string.pmc 47673 2010-06-17 15:52:39Z NotFound $ +$Id: string.pmc 48833 2010-09-07 22:58:38Z nwellnhof $ =head1 NAME @@ -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); } diff -Nru parrot-2.7.0/src/pmc/sub.pmc parrot-2.8.0/src/pmc/sub.pmc --- parrot-2.7.0/src/pmc/sub.pmc 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/pmc/sub.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: sub.pmc 48435 2010-08-12 19:37:47Z chromatic $ +$Id: sub.pmc 49134 2010-09-18 06:33:29Z chromatic $ =head1 NAME @@ -19,6 +19,7 @@ */ #include "parrot/oplib/ops.h" +#include "parrot/oplib/core_ops.h" #include "sub.str" /* HEADERIZER HFILE: none */ @@ -742,7 +743,7 @@ INTVAL flags; int i; - SUPER(info); + STATICSELF.init(); PMC_get_sub(INTERP, SELF, sub); @@ -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; diff -Nru parrot-2.7.0/src/pmc/undef.pmc parrot-2.8.0/src/pmc/undef.pmc --- parrot-2.7.0/src/pmc/undef.pmc 2010-05-05 09:58:28.000000000 +0000 +++ parrot-2.8.0/src/pmc/undef.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* -Copyright (C) 2004-2009, Parrot Foundation. -$Id: undef.pmc 46300 2010-05-05 03:58:50Z jimmy $ +Copyright (C) 2004-2010, Parrot Foundation. +$Id: undef.pmc 49012 2010-09-15 05:33:20Z luben $ =head1 NAME @@ -178,7 +178,7 @@ Parrot_warn(INTERP, PARROT_WARNINGS_UNDEF_FLAG, "Stringifying an Undef PMC"); - return Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0); + return CONST_STRING(INTERP, ""); } /* @@ -212,22 +212,6 @@ /* -=item C - -Returns 1. - -=cut - -*/ - - VTABLE PMC *logical_not(PMC *dest) { - dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - VTABLE_set_bool(INTERP, dest, 1); - return dest; - } - -/* - =item C Unknown. (TODO) diff -Nru parrot-2.7.0/src/pmc/unmanagedstruct.pmc parrot-2.8.0/src/pmc/unmanagedstruct.pmc --- parrot-2.7.0/src/pmc/unmanagedstruct.pmc 2010-06-26 14:36:55.000000000 +0000 +++ parrot-2.8.0/src/pmc/unmanagedstruct.pmc 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: unmanagedstruct.pmc 47863 2010-06-26 12:50:08Z whiteknight $ +$Id: unmanagedstruct.pmc 48837 2010-09-07 23:48:07Z nwellnhof $ =head1 NAME @@ -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; diff -Nru parrot-2.7.0/src/pmc.c parrot-2.8.0/src/pmc.c --- parrot-2.7.0/src/pmc.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/pmc.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: pmc.c 48326 2010-08-05 07:10:05Z NotFound $ +$Id: pmc.c 48666 2010-08-26 12:42:06Z nwellnhof $ =head1 NAME @@ -127,7 +127,7 @@ #ifndef NDEBUG - pmc->vtable = (VTABLE *)0xdeadbeef; + pmc->data = (DPOINTER *)0xdeadbeef; #endif diff -Nru parrot-2.7.0/src/pmc_freeze.c parrot-2.8.0/src/pmc_freeze.c --- parrot-2.7.0/src/pmc_freeze.c 2010-08-17 18:07:13.000000000 +0000 +++ parrot-2.8.0/src/pmc_freeze.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: pmc_freeze.c 48501 2010-08-15 02:38:57Z plobsing $ +$Id: pmc_freeze.c 49130 2010-09-18 03:47:34Z plobsing $ =head1 NAME @@ -54,7 +54,7 @@ Parrot_freeze(PARROT_INTERP, ARGIN(PMC *pmc)) { ASSERT_ARGS(Parrot_freeze) - PMC * const image = Parrot_pmc_new(interp, enum_class_ImageIO); + PMC * const image = Parrot_pmc_new(interp, enum_class_ImageIOFreeze); VTABLE_set_pmc(interp, image, pmc); return VTABLE_get_string(interp, image); } @@ -83,7 +83,7 @@ STRING *image; DECL_CONST_CAST; - visitor = Parrot_pmc_new(interp, enum_class_ImageIO); + visitor = Parrot_pmc_new(interp, enum_class_ImageIOFreeze); VTABLE_set_pointer(interp, visitor, PARROT_const_cast(void *, (const void *)pf)); VTABLE_set_pmc(interp, visitor, pmc); @@ -199,7 +199,7 @@ ASSERT_ARGS(Parrot_thaw) PMC *result; - PMC * const info = Parrot_pmc_new(interp, enum_class_ImageIO); + PMC * const info = Parrot_pmc_new(interp, enum_class_ImageIOThaw); int gc_block = 0; /* @@ -251,7 +251,7 @@ ASSERT_ARGS(Parrot_thaw_pbc) PackFile * const pf = ct->base.pf; STRING *image = PF_fetch_buf(interp, pf, cursor); - PMC *info = Parrot_pmc_new(interp, enum_class_ImageIO); + PMC *info = Parrot_pmc_new(interp, enum_class_ImageIOThaw); VTABLE_set_pointer(interp, info, ct); VTABLE_set_string_native(interp, info, image); return VTABLE_get_pmc(interp, info); @@ -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); diff -Nru parrot-2.7.0/src/runcore/cores.c parrot-2.8.0/src/runcore/cores.c --- parrot-2.7.0/src/runcore/cores.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/runcore/cores.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: cores.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: cores.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -675,7 +675,7 @@ Parrot_ex_throw_from_c_args(interp, NULL, 1, "attempt to access code outside of current code segment"); - Parrot_gc_mark_and_sweep(interp, GC_TRACE_FULL); + Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG); Parrot_pcc_set_pc(interp, CURRENT_CONTEXT(interp), pc); DO_OP(pc, interp); @@ -717,7 +717,7 @@ "attempt to access code outside of current code segment"); if (interp->pdb->state & PDB_GCDEBUG) - Parrot_gc_mark_and_sweep(interp, 0); + Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG); if (interp->pdb->state & PDB_TRACING) { trace_op(interp, diff -Nru parrot-2.7.0/src/runcore/main.c parrot-2.8.0/src/runcore/main.c --- parrot-2.7.0/src/runcore/main.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/runcore/main.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: main.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: main.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -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 - -Setup a C containing pointers (or addresses) of the -C 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 Shuts down the runcores and deallocates any dynops memory. @@ -322,14 +263,10 @@ interp->cores = NULL; interp->run_core = NULL; - /* dynop libs */ - if (interp->n_libs <= 0) - return; + if (interp->all_op_libs) + mem_gc_free(interp, interp->all_op_libs); - 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; + interp->all_op_libs = NULL; } @@ -354,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."); @@ -389,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); -} - - - - -/* - -=item C -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. - -=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; + parrot_hash_oplib(interp, lib); } /* -=item C +=item C -Tell the interpreter's running core about the new function table. +Add the ops in C to the global name => op_info hash. =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); } } @@ -549,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; } diff -Nru parrot-2.7.0/src/runcore/profiling.c parrot-2.8.0/src/runcore/profiling.c --- parrot-2.7.0/src/runcore/profiling.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/runcore/profiling.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2009, Parrot Foundation. -$Id: profiling.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: profiling.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/src/runcore/trace.c parrot-2.8.0/src/runcore/trace.c --- parrot-2.7.0/src/runcore/trace.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/runcore/trace.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: trace.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: trace.c 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -127,15 +127,15 @@ return; } - if (!pmc->vtable || (UINTVAL)pmc->vtable == 0xdeadbeef) { - Parrot_io_eprintf(debugger, ""); - return; - } - if (PObj_on_free_list_TEST(pmc)) Parrot_io_eprintf(debugger, "**************** PMC is on free list *****\n"); + if (!pmc->vtable) { + Parrot_io_eprintf(debugger, ""); + return; + } + if (pmc->vtable->pmc_class == pmc) { STRING * const name = trace_class_name(interp, pmc); Parrot_io_eprintf(debugger, "Class=%Ss:PMC(%#p)", name, pmc); diff -Nru parrot-2.7.0/src/scheduler.c parrot-2.8.0/src/scheduler.c --- parrot-2.7.0/src/scheduler.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/scheduler.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2007-2010, Parrot Foundation. -$Id: scheduler.c 48241 2010-07-31 18:43:43Z NotFound $ +$Id: scheduler.c 48696 2010-08-27 17:12:46Z nwellnhof $ =head1 NAME @@ -111,8 +111,7 @@ =item C Handle the pending tasks in the scheduler's task list. Returns when there are -no more pending tasks. Returns 0 to terminate the scheduler runloop, or 1 to -continue the runloop. +no more pending tasks. =cut @@ -123,6 +122,12 @@ Parrot_cx_handle_tasks(PARROT_INTERP, ARGMOD(PMC *scheduler)) { ASSERT_ARGS(Parrot_cx_handle_tasks) + + /* avoid recursive calls */ + if (SCHEDULER_in_handler_TEST(scheduler)) + return; + + SCHEDULER_in_handler_SET(scheduler); SCHEDULER_wake_requested_CLEAR(scheduler); Parrot_cx_refresh_task_list(interp, scheduler); @@ -159,6 +164,8 @@ Parrot_cx_refresh_task_list(interp, scheduler); } /* end of pending tasks */ + + SCHEDULER_in_handler_CLEAR(scheduler); } /* diff -Nru parrot-2.7.0/src/spf_render.c parrot-2.8.0/src/spf_render.c --- parrot-2.7.0/src/spf_render.c 2010-05-05 09:58:32.000000000 +0000 +++ parrot-2.8.0/src/spf_render.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: spf_render.c 46248 2010-05-03 22:32:14Z darbelo $ +$Id: spf_render.c 48877 2010-09-09 02:49:19Z mikehh $ =head1 NAME @@ -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 + + 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)); } diff -Nru parrot-2.7.0/src/spf_vtable.c parrot-2.8.0/src/spf_vtable.c --- parrot-2.7.0/src/spf_vtable.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/spf_vtable.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2009, Parrot Foundation. -$Id: spf_vtable.c 46192 2010-04-30 08:27:15Z jimmy $ +$Id: spf_vtable.c 48837 2010-09-07 23:48:07Z nwellnhof $ =head1 NAME @@ -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); } diff -Nru parrot-2.7.0/src/string/api.c parrot-2.8.0/src/string/api.c --- parrot-2.7.0/src/string/api.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/string/api.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: api.c 48492 2010-08-14 20:01:39Z cotto $ +$Id: api.c 49149 2010-09-19 04:38:26Z chromatic $ =head1 NAME @@ -23,6 +23,8 @@ */ +#include + #include "parrot/parrot.h" #include "private_cstring.h" #include "api.str" @@ -35,7 +37,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 +47,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 +60,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 +134,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 +158,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 +187,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 +195,7 @@ /* -=item C +=item C Creates and returns an empty Parrot string. @@ -207,19 +206,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 +222,10 @@ /* -=item C +=item C -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 utf8 => utf8 => ascii, B C has ascii chars only. @@ -247,66 +239,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 +=item C -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 utf8 => utf8 => ascii, B C has ascii chars only. @@ -320,12 +305,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,19 +333,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 - | PObj_live_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; } @@ -386,12 +370,18 @@ STRING *d; const int is_movable = PObj_is_movable_TESTALL(s); - /* We set COW flag to avoid cloning buffer in compact_pool */ - d = Parrot_gc_new_string_header(interp, PObj_get_FLAGS(s) & ~PObj_constant_FLAG); + /* This might set the constant flag again but it is the right thing + * to do */ STRUCT_COPY(d, s); + /* Clear live flag. It might be set on constant strings */ + PObj_live_CLEAR(d); + + /* Set the string copy flag */ + PObj_is_string_copy_SET(d); + /* Now check that buffer allocated from pool and affected by compacting */ if (is_movable && Buffer_bufstart(s)) { /* If so, mark it as shared */ @@ -426,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; @@ -461,32 +449,52 @@ 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); - PARROT_ASSERT(enc); - PARROT_ASSERT(cs); - dest->encoding = enc; - dest->charset = cs; + if (PObj_is_growable_TESTALL(a) + && a->strstart + total_length <= + (char *)Buffer_bufstart(a) + Buffer_buflen(a)) { + /* String a is growable and there's enough space in the buffer */ + DECL_CONST_CAST; - /* Copy A first */ - mem_sys_memcopy(dest->strstart, a->strstart, a->bufused); + dest = Parrot_str_copy(interp, a); - /* Tack B on the end of A */ - mem_sys_memcopy((void *)((ptrcast_t)dest->strstart + a->bufused), - b->strstart, b->bufused); + /* Switch string copy flags */ + PObj_is_string_copy_SET(PARROT_const_cast(STRING *, a)); + PObj_is_string_copy_CLEAR(dest); + + /* Append b */ + mem_sys_memcopy(dest->strstart + dest->bufused, + b->strstart, b->bufused); + + dest->encoding = enc; + dest->hashval = 0; + } + else { + if (4 * b->bufused < a->bufused) { + /* Preallocate more memory if we're appending a short string to + a long string */ + total_length += total_length >> 1; + } + + dest = Parrot_str_new_noinit(interp, total_length); + PARROT_ASSERT(enc); + dest->encoding = enc; + + /* Copy A first */ + mem_sys_memcopy(dest->strstart, a->strstart, a->bufused); + + /* Tack B on the end of A */ + mem_sys_memcopy((void *)((ptrcast_t)dest->strstart + a->bufused), + b->strstart, b->bufused); + } dest->bufused = a->bufused + b->bufused; - dest->strlen = a->strlen + b_len; + dest->strlen = a->strlen + b->strlen; return dest; } @@ -515,7 +523,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); } @@ -548,8 +556,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; @@ -560,37 +567,6 @@ /* -=item C - -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 Creates and returns a constant Parrot string. @@ -615,7 +591,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, @@ -628,12 +604,12 @@ /* =item C +const char *encoding_name, UINTVAL flags)> Creates and returns a new Parrot string using C bytes of string data read from C. -The value of C specifies the string's representation. +The value of C specifies the string's representation. The currently recognised values are: 'iso-8859-1' @@ -644,7 +620,7 @@ The encoding is implicitly guessed; C implies the C encoding, and the other three assume C encoding. -If C is unspecified, the default charset 'ascii' will be used. +If C is unspecified, the default encoding 'ascii' will be used. The value of C is optionally one or more C flags C-ed together. @@ -658,74 +634,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 - -Creates and returns a new Parrot string using C bytes of string data read -from C. - -The value of C specifies the string's representation. It must be -a valid charset identifier. - - 'iso-8859-1' - 'ascii' - 'binary' - 'unicode' - -The encoding is implicitly guessed; C implies the C encoding, -and the other three assume C encoding. - -The value of C is optionally one or more C flags C-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 +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. @@ -739,13 +669,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) { /* @@ -760,23 +689,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; @@ -834,7 +763,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); } @@ -882,7 +811,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); } } @@ -950,17 +879,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); } @@ -1011,7 +936,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; } @@ -1033,7 +958,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; @@ -1074,8 +999,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, @@ -1084,24 +1010,125 @@ 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 (true_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 (STRING *)src; + else + return STRING_substr(interp, src, true_offset, true_length); +} + +/* + +=item C + +Returns the substring between iterators C and C. + +=cut + +*/ + +PARROT_EXPORT +PARROT_CANNOT_RETURN_NULL +PARROT_WARN_UNUSED_RESULT +STRING * +Parrot_str_iter_substr(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *l), ARGIN_NULLOK(const String_iter *r)) +{ + ASSERT_ARGS(Parrot_str_iter_substr) + STRING *dest = Parrot_str_copy(interp, str); + + dest->strstart = (char *)dest->strstart + l->bytepos; + + if (r == NULL) { + dest->bufused = str->bufused - l->bytepos; + dest->strlen = str->strlen - l->charpos; + } + else { + dest->bufused = r->bytepos - l->bytepos; + dest->strlen = r->charpos - l->charpos; + } + + dest->hashval = 0; + + return dest; +} + +/* + +=item C + +Find the next occurence of STRING C in STRING C starting at +String_iter C. If C is found C is modified to mark the +beginning of C and String_iter C is set to the character after +C in C. Returns the character position where C was found +or -1 if it wasn't found. + +=cut + +*/ + +PARROT_EXPORT +INTVAL +Parrot_str_iter_index(PARROT_INTERP, + ARGIN(const STRING *src), + ARGMOD(String_iter *start), ARGOUT(String_iter *end), + ARGIN(const STRING *search)) +{ + ASSERT_ARGS(Parrot_str_iter_index) + String_iter search_iter, search_start, next_start; + const UINTVAL len = search->strlen; + UINTVAL c0; + + if (len == 0) { + *end = *start; + return start->charpos; + } + + STRING_ITER_INIT(interp, &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); + + if (c1 == c0) { + UINTVAL c2; + *end = next_start; + + 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); + } while (c1 == c2); + + search_iter = search_start; + } + + *start = next_start; + } + + return -1; } @@ -1138,14 +1165,13 @@ 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; + UINTVAL start_byte, end_byte, start_char, end_char; INTVAL buf_size; if (STRING_IS_NULL(src)) { @@ -1170,24 +1196,27 @@ 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 */ - ENCODING_ITER_INIT(interp, src, &iter); + STRING_ITER_INIT(interp, &iter); - iter.set_position(interp, &iter, true_offset); + STRING_iter_set_position(interp, src, &iter, true_offset); start_byte = iter.bytepos; + start_char = iter.charpos; - iter.set_position(interp, &iter, true_offset + true_length); + STRING_iter_skip(interp, src, &iter, true_length); end_byte = iter.bytepos; + end_char = iter.charpos; /* not possible.... */ if (end_byte < start_byte) @@ -1198,14 +1227,12 @@ /* 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 - | PObj_is_COWable_FLAG - | PObj_live_FLAG; + | PObj_is_COWable_FLAG; /* size removed bytes added bytes */ buf_size = src->bufused - (end_byte - start_byte) + rep->bufused; @@ -1226,7 +1253,7 @@ (char *)src->strstart + end_byte, src->bufused - end_byte); - dest->strlen = CHARSET_CODEPOINTS(interp, dest); + dest->strlen = src->strlen - (end_char - start_char) + rep->strlen; dest->hashval = 0; return dest; @@ -1252,7 +1279,7 @@ ASSERT_ARGS(Parrot_str_chopn) STRING * const chopped = Parrot_str_copy(interp, s); - UINTVAL new_length, uchar_size; + UINTVAL new_length; if (n < 0) { new_length = -n; @@ -1273,23 +1300,23 @@ return chopped; } - uchar_size = chopped->bufused / chopped->strlen; - chopped->strlen = new_length; - - 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) { + const UINTVAL uchar_size = chopped->bufused / chopped->strlen; chopped->bufused = new_length * uchar_size; } else { String_iter iter; - ENCODING_ITER_INIT(interp, s, &iter); - iter.set_position(interp, &iter, new_length); + STRING_ITER_INIT(interp, &iter); + STRING_iter_set_position(interp, s, &iter, new_length); chopped->bufused = iter.bytepos; } + chopped->strlen = new_length; + return chopped; } @@ -1323,7 +1350,7 @@ ASSERT_STRING_SANITY(s1); ASSERT_STRING_SANITY(s2); - return CHARSET_COMPARE(interp, s1, s2); + return STRING_compare(interp, s1, s2); } @@ -1396,7 +1423,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; } @@ -1422,13 +1449,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); @@ -1440,7 +1467,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; @@ -1564,7 +1591,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", @@ -1574,7 +1601,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", @@ -1585,7 +1612,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; @@ -1630,7 +1657,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", @@ -1640,7 +1667,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", @@ -1651,7 +1678,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; @@ -1707,11 +1734,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; } @@ -1719,7 +1746,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; @@ -1860,60 +1887,34 @@ int sign = 1; UINTVAL i = 0; String_iter iter; - UINTVAL offs; - number_parse_state state = parse_start; - - ENCODING_ITER_INIT(interp, s, &iter); + INTVAL count = (INTVAL)s->strlen; + UINTVAL c; - for (offs = 0; (state != parse_end) && (offs < s->strlen); ++offs) { - const UINTVAL c = iter.get_and_advance(interp, &iter); - /* Check for overflow */ - if (c > 255) - break; - - switch (state) { - case parse_start: - if (isdigit((unsigned char)c)) { - const UINTVAL nextval = c - '0'; - if (i < max_safe || (i == max_safe && nextval <= last_dig)) - i = i * 10 + nextval; - else - Parrot_ex_throw_from_c_args(interp, NULL, - EXCEPTION_ERR_OVERFLOW, - "Integer value of String '%S' too big", s); - state = parse_before_dot; - } - else if (c == '-') { - sign = -1; - state = parse_before_dot; - } - else if (c == '+') - state = parse_before_dot; - else if (isspace((unsigned char)c)) - ; /* Do nothing */ - else - state = parse_end; - - break; + STRING_ITER_INIT(interp, &iter); - case parse_before_dot: - if (isdigit((unsigned char)c)) { - const UINTVAL nextval = c - '0'; - if (i < max_safe || (i == max_safe && nextval <= last_dig)) - i = i * 10 + nextval; - else - Parrot_ex_throw_from_c_args(interp, NULL, - EXCEPTION_ERR_OVERFLOW, - "Integer value of String '%S' too big", s); - } - else - state = parse_end; - break; - - default: - /* Pacify compiler */ + c = count-- > 0 ? STRING_iter_get_and_advance(interp, s, &iter) : 0; + while (c == ' ') + c = count-- > 0 ? STRING_iter_get_and_advance(interp, s, &iter) : 0; + switch (c) { + case '-': + sign = -1; + case '+': + c = count-- > 0 ? STRING_iter_get_and_advance(interp, s, &iter) : 0; + break; + default: + ; /* nothing */ + } + while (c) { + const UINTVAL nextval = c - (UINTVAL)'0'; + if (nextval > 9) break; - } + if (i < max_safe || (i == max_safe && nextval <= last_dig)) + i = i * 10 + nextval; + else + Parrot_ex_throw_from_c_args(interp, NULL, + EXCEPTION_ERR_OVERFLOW, + "Integer value of String '%S' too big", s); + c = count-- > 0 ? STRING_iter_get_and_advance(interp, s, &iter) : 0; } if (sign == 1 && i > (UINTVAL)PARROT_INTVAL_MAX) @@ -1956,17 +1957,16 @@ int d_length = 0; int check_nan = 0; /* Check for NaN and Inf after main loop */ String_iter iter; - UINTVAL offs; number_parse_state state = parse_start; if (STRING_IS_NULL(s)) return 0.0; - ENCODING_ITER_INIT(interp, s, &iter); + STRING_ITER_INIT(interp, &iter); - /* Handcrafter FSM to read float value */ - for (offs = 0; (state != parse_end) && (offs < s->strlen); ++offs) { - const UINTVAL c = iter.get_and_advance(interp, &iter); + /* 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); /* Check for overflow */ if (c > 255) break; @@ -2332,14 +2332,9 @@ size_t hashval = interp->hash_seed; - if ((!STRING_IS_NULL(s)) && 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 (!STRING_IS_NULL(s)) { + if (s->strlen) + hashval = STRING_hash(interp, s, hashval); s->hashval = hashval; } @@ -2391,10 +2386,12 @@ ARGIN_NULLOK(const STRING *src), UINTVAL limit) { ASSERT_ARGS(Parrot_str_escape_truncate) - STRING *result, *hex; - UINTVAL i, len, charlen; - String_iter iter; - unsigned char *dp; + STRING *result; + UINTVAL i, len, charlen; + String_iter iter; + char hex_buf[16]; + int hex_len; + char *dp; if (STRING_IS_NULL(src)) return STRINGNULL; @@ -2412,22 +2409,23 @@ /* 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 */ - ENCODING_ITER_INIT(interp, src, &iter); - dp = (unsigned char *)result->strstart; + STRING_ITER_INIT(interp, &iter); + dp = result->strstart; for (i = 0; len > 0; --len) { - UINTVAL c = iter.get_and_advance(interp, &iter); + unsigned c = STRING_iter_get_and_advance(interp, src, &iter); if (c < 0x7f) { /* process ASCII chars */ if (i >= charlen - 2) { /* resize - still len codepoints to go */ charlen += len * 2 + 16; + result->bufused = i; Parrot_gc_reallocate_string_storage(interp, result, charlen); /* start can change */ - dp = (unsigned char *)result->strstart; + dp = result->strstart; } switch (c) { case '\\': @@ -2469,28 +2467,34 @@ break; } if (c >= 0x20) { - dp[i++] = (unsigned char)c; - result->bufused = result->strlen = i; + dp[i++] = c; continue; } } /* escape by appending either \uhhhh or \x{hh...} */ - result->bufused = result->strlen = i; if (c < 0x0100 || c >= 0x10000) - hex = Parrot_sprintf_c(interp, "\\x{%x}", c); + hex_len = snprintf(hex_buf, 15, "\\x{%x}", c); else - hex = Parrot_sprintf_c(interp, "\\u%04x", c); + hex_len = snprintf(hex_buf, 15, "\\u%04x", c); - result = Parrot_str_concat(interp, result, hex); + if (hex_len < 0) + hex_len = 0; - /* adjust our insert idx */ - i += hex->strlen; + if (i + hex_len > charlen) { + /* resize - still len codepoints to go */ + charlen += len * 2 + 16; + result->bufused = i; + Parrot_gc_reallocate_string_storage(interp, result, charlen); + /* start can change */ + dp = result->strstart; + } - /* and usable len */ - charlen = Buffer_buflen(result); - dp = (unsigned char *)result->strstart; + mem_sys_memcopy(dp + i, hex_buf, hex_len); + + /* adjust our insert idx */ + i += hex_len; PARROT_ASSERT(i <= charlen); } @@ -2522,12 +2526,11 @@ /* =item C +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 @@ -2538,8 +2541,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) @@ -2553,23 +2555,23 @@ 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); result->bufused = reserved; - src->encoding->iter_init(interp, src, &itersrc); - encoding->iter_init(interp, result, &iterdest); + STRING_ITER_INIT(interp, &itersrc); + STRING_ITER_INIT(interp, &iterdest); while (itersrc.bytepos < srclen) { - INTVAL c = itersrc.get_and_advance(interp, &itersrc); + INTVAL c = STRING_iter_get_and_advance(interp, src, &itersrc); INTVAL next; do { pending = 0; next = c; if (c == '\\') { - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); switch (c) { /* Common one char sequences */ case 'a': next = '\a'; break; @@ -2579,10 +2581,11 @@ case 'v': next = '\v'; break; case 'f': next = '\f'; break; case 'r': next = '\r'; break; - case 'e': next = '\e'; break; + case 'e': next = '\x1B'; break; /* Escape character */ case 'c': - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); /* This assumes ascii-alike encoding */ if (c < 'A' || c > 'Z') throw_illegal_escape(interp); @@ -2590,11 +2593,12 @@ break; case 'x': digcount = 0; - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); if (c == '{') { /* \x{h..h} 1..8 hex digits */ while (itersrc.bytepos < srclen) { - c = itersrc.get_and_advance(interp, &itersrc); + c = STRING_iter_get_and_advance(interp, src, &itersrc); if (c == '}') break; if (!isxdigit(c)) @@ -2618,7 +2622,7 @@ pending = 0; break; } - c = itersrc.get_and_advance(interp, &itersrc); + c = STRING_iter_get_and_advance(interp, src, &itersrc); } } if (digcount == 0) @@ -2629,7 +2633,8 @@ case 'u': /* \uhhhh 4 hex digits */ for (digcount = 0; digcount < 4; ++digcount) { - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); if (!isxdigit(c)) throw_illegal_escape(interp); digbuf[digcount] = c; @@ -2640,7 +2645,8 @@ case 'U': /* \Uhhhhhhhh 8 hex digits */ for (digcount = 0; digcount < 8; ++digcount) { - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); if (!isxdigit(c)) throw_illegal_escape(interp); digbuf[digcount] = c; @@ -2653,21 +2659,22 @@ /* \ooo 1..3 oct digits */ digbuf[0] = c; for (digcount = 1; digcount < 3; ++digcount) { - c = itersrc.get_and_advance(interp, &itersrc); + if (itersrc.bytepos >= srclen) break; + c = STRING_iter_get_and_advance(interp, src, &itersrc); if (c < '0' || c > '7') break; digbuf[digcount] = c; } digbuf[digcount] = '\0'; next = strtol(digbuf, NULL, 8); - if (digcount < 3) + if (itersrc.bytepos < srclen && digcount < 3) pending = 1; break; default: next = c; } } - iterdest.set_and_advance(interp, &iterdest, next); + STRING_iter_set_and_advance(interp, result, &iterdest, next); } while (pending); } result->bufused = iterdest.bytepos; @@ -2702,9 +2709,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; @@ -2723,32 +2729,24 @@ #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); encoding = result->encoding; } - encoding->iter_init(interp, result, &iter); + STRING_ITER_INIT(interp, &iter); for (offs = d = 0; offs < clength; ++offs) { r = (Parrot_UInt4)((unsigned char *)result->strstart)[offs]; @@ -2771,7 +2769,7 @@ } PARROT_ASSERT(d < offs); - iter.set_and_advance(interp, &iter, r); + encoding->iter_set_and_advance(interp, result, &iter, r); ++d; } @@ -2780,9 +2778,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"); @@ -2812,7 +2810,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; } @@ -2842,7 +2840,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; } @@ -2872,7 +2870,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; } @@ -2963,7 +2961,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); } @@ -2990,7 +2988,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); } @@ -3019,7 +3017,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); } @@ -3043,21 +3041,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); } @@ -3066,8 +3051,7 @@ =item C -Converts C to the given charset or encoding and returns the result as a -new string. +Converts C to the given encoding and returns the result as a new string. =cut @@ -3081,7 +3065,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; @@ -3121,9 +3105,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); } @@ -3145,107 +3129,39 @@ Parrot_str_join(PARROT_INTERP, ARGIN_NULLOK(STRING *j), ARGIN(PMC *ar)) { ASSERT_ARGS(Parrot_str_join) - STRING **chunks; - STRING *res; - STRING *s; - char *pos; - const int ar_len = VTABLE_elements(interp, ar); - int total_length = 0; - int transcoded = 0; - int i; - - if (ar_len == 0) - return Parrot_str_new_noinit(interp, enum_stringrep_one, 0); - - if (STRING_IS_NULL(j)) - j = Parrot_str_new_noinit(interp, enum_stringrep_one, 0); - - chunks = (STRING **)Parrot_gc_allocate_fixed_size_storage(interp, - ar_len * sizeof (STRING *)); - - for (i = 0; i < ar_len; ++i) { - STRING *next = VTABLE_get_string_keyed_int(interp, ar, i); - - if (STRING_IS_NULL(next)) { - chunks[i] = STRINGNULL; - continue; - } - if (next->encoding != j->encoding) { - const ENCODING *e = j->encoding; - - string_rep_compatible(interp, next, j, &e); - if (e == Parrot_fixed_8_encoding_ptr) - e = Parrot_utf8_encoding_ptr; - j = e->to_encoding(interp, j); - transcoded = 1; - } - - chunks[i] = next; - total_length += next->bufused; + if (STRING_IS_NULL(j)) { + PMC *sb = Parrot_pmc_new_init(interp, enum_class_StringBuilder, ar); + return VTABLE_get_string(interp, sb); } - - /* with the right charset, transcode any strings if necessary */ - if (transcoded) { - const CHARSET *c = j->charset; - const ENCODING *e = j->encoding; - - for (i = 0; i < ar_len; ++i) { - STRING *s = chunks[i]; - - if (STRING_IS_NULL(s)) - continue; - - if (s->encoding != e || s->charset != c) { - STRING *new_s = e->to_encoding(interp, s); - chunks[i] = new_s; - total_length += s->bufused - new_s->bufused; - } + else { + PMC *sb; + STRING *first; + const int count = VTABLE_elements(interp, ar); + INTVAL length, j_length; + int i; + + if (count == 0) + return Parrot_str_new_noinit(interp, 0); + + first = VTABLE_get_string_keyed_int(interp, ar, 0); + length = Parrot_str_byte_length(interp, first); + j_length = Parrot_str_byte_length(interp, j); + + /* it's an approximiation, but it doesn't hurt */ + sb = Parrot_pmc_new_init_int(interp, enum_class_StringBuilder, + (length + j_length) * count); + + VTABLE_push_string(interp, sb, first); + + for (i = 1; i < count; ++i) { + VTABLE_push_string(interp, sb, j); + VTABLE_push_string(interp, sb, + VTABLE_get_string_keyed_int(interp, ar, i)); } - } - - /* add the length of the separator, now that it's transcoded */ - total_length += j->bufused * ar_len; - - res = Parrot_gc_new_string_header(interp, 0); - Parrot_gc_allocate_string_storage(interp, res, total_length); - res->charset = j->charset; - res->encoding = j->encoding; - - /* Iterate over chunks and append it to res */ - pos = res->strstart; - - /* Copy first chunk */ - s = chunks[0]; - if (!STRING_IS_NULL(s)) { - mem_sys_memcopy(pos, s->strstart, s->bufused); - pos += s->bufused; + return VTABLE_get_string(interp, sb); } - - for (i = 1; i < ar_len; ++i) { - STRING *next = chunks[i]; - - if (STRING_IS_NULL(next)) - continue; - - mem_sys_memcopy(pos, j->strstart, j->bufused); - pos += j->bufused; - - mem_sys_memcopy(pos, next->strstart, next->bufused); - pos += next->bufused; - - /* We can consume all buffer and pos will be next-after-end of buffer */ - PARROT_ASSERT(pos <= res->strstart + Buffer_buflen(res) + 1); - } - - res->bufused = pos - res->strstart; - res->strlen = CHARSET_CODEPOINTS(interp, res); - - Parrot_gc_free_fixed_size_storage(interp, ar_len * sizeof (STRING *), - chunks); - - return res; } @@ -3269,8 +3185,10 @@ ARGIN_NULLOK(const STRING *delim), ARGIN_NULLOK(STRING *str)) { ASSERT_ARGS(Parrot_str_split) - PMC *res; - INTVAL slen, dlen, ps, pe; + PMC *res; + STRING *tstr; + UINTVAL slen, dlen; + String_iter iter; if (STRING_IS_NULL(delim) || STRING_IS_NULL(str)) return PMCNULL; @@ -3282,44 +3200,38 @@ if (!slen) return res; + STRING_ITER_INIT(interp, &iter); dlen = Parrot_str_length(interp, delim); if (dlen == 0) { - int i; VTABLE_set_integer_native(interp, res, slen); - for (i = 0; i < slen; ++i) { - STRING * const p = Parrot_str_substr(interp, str, i, 1); - VTABLE_set_string_keyed_int(interp, res, i, p); - } - - return res; - } + do { + const String_iter old_iter = iter; - pe = Parrot_str_find_index(interp, str, delim, 0); + 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); - if (pe < 0) { - VTABLE_push_string(interp, res, str); return res; } - ps = 0; - - while (ps <= slen) { - const int pl = pe - ps; - STRING * const tstr = Parrot_str_substr(interp, str, ps, pl); - - VTABLE_push_string(interp, res, tstr); - ps = pe + Parrot_str_length(interp, delim); + do { + String_iter start, end; + INTVAL pos; - if (ps > slen) + start = iter; + if (Parrot_str_iter_index(interp, str, &start, &end, delim) < 0) break; - pe = Parrot_str_find_index(interp, str, delim, ps); + tstr = Parrot_str_iter_substr(interp, str, &iter, &start); + VTABLE_push_string(interp, res, tstr); + iter = end; + } while (iter.charpos < slen); - if (pe < 0) - pe = slen; - } + tstr = Parrot_str_iter_substr(interp, str, &iter, NULL); + VTABLE_push_string(interp, res, tstr); return res; } @@ -3369,7 +3281,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); } diff -Nru parrot-2.7.0/src/string/charset/ascii.c parrot-2.8.0/src/string/charset/ascii.c --- parrot-2.7.0/src/string/charset/ascii.c 2010-07-05 02:46:56.000000000 +0000 +++ parrot-2.8.0/src/string/charset/ascii.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,902 +0,0 @@ -/* -Copyright (C) 2004-2010, Parrot Foundation. -$Id: ascii.c 47917 2010-06-29 23:18:38Z jkeenan $ - -=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 - -Retrieves the graphemes for the STRING C, starting at -C and ending at C. - -=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 - -Attempts to convert STRING C to ASCII in STRING C. 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; - UINTVAL offs; - 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; - ENCODING_ITER_INIT(interp, src, &iter); - for (offs = 0; offs < len; ++offs) { - const UINTVAL c = iter.get_and_advance(interp, &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 - -Converts STRING C to ASCII charset STRING C. - -=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 - -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 - -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 - -Converts the STRING C 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 - -Converts the STRING C 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 - -Converts the STRING given by C 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 - -Sets the first character in the STRING C 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 - -Sets the first character of the STRING C 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 - -Converts the first letter of STRING C 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 - -Compares two strings as ASCII strings. If STRING C > C, returns -1. If C == C returns 0. If STRING C < C, 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 { - UINTVAL offs; - ENCODING_ITER_INIT(interp, rhs, &iter); - for (offs = 0; offs < min_len; ++offs) { - const UINTVAL cl = ENCODING_GET_BYTE(interp, lhs, offs); - const UINTVAL cr = iter.get_and_advance(interp, &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 - -Searches for the first instance of STRING C in STRING C. -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) - - if (search->strlen <= src->strlen) { - String_iter src_iter, search_iter; - const UINTVAL maxpos = src->strlen - search->strlen + 1; - const UINTVAL cfirst = Parrot_str_indexed(interp, search, 0); - - ENCODING_ITER_INIT(interp, src, &src_iter); - src_iter.set_position(interp, &src_iter, offs); - ENCODING_ITER_INIT(interp, search, &search_iter); - - while (src_iter.charpos < maxpos) { - if (cfirst == src_iter.get_and_advance(interp, &src_iter)) { - const INTVAL next_pos = src_iter.charpos; - const INTVAL next_byte = src_iter.bytepos; - UINTVAL len; - search_iter.set_position(interp, &search_iter, 1); - for (len = search->strlen - 1; len; --len) { - if ((src_iter.get_and_advance(interp, &src_iter)) != - (search_iter.get_and_advance(interp, &search_iter))) - break; - } - if (len == 0) - return next_pos - 1; - src_iter.charpos = next_pos; - src_iter.bytepos = next_byte; - } - } - } - return -1; -} - -/* - -=item C - -Searches for the first instance of STRING C in STRING C. -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 - -Searches for the last instance of STRING C in STRING -C. Starts searching at C. - -=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 - -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) - INTVAL offset; - String_iter iter; - const INTVAL length = Parrot_str_length(interp, src); - - ENCODING_ITER_INIT(interp, src, &iter); - for (offset = 0; offset < length; ++offset) { - const UINTVAL codepoint = iter.get_and_advance(interp, &iter); - if (codepoint >= 0x80) - return 0; - } - return 1; -} - -/* - -=item C - -Creates a new STRING object from a single codepoint C. 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 - -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 - -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 - -Returns C. - -=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 - -Computes the hash of STRING C starting with seed value -C. - -=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 - -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 - -Converts an ASCII STRING C to a binary STRING C. - -=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 - -Converts ASCII STRING C to ISO8859-1 STRING C. - -=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: - */ diff -Nru parrot-2.7.0/src/string/charset/ascii.h parrot-2.8.0/src/string/charset/ascii.h --- parrot-2.7.0/src/string/charset/ascii.h 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/charset/ascii.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,128 +0,0 @@ -/* ascii.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: ascii.h 46064 2010-04-27 14:55:24Z petdance $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/charset/binary.c parrot-2.8.0/src/string/charset/binary.c --- parrot-2.7.0/src/string/charset/binary.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/string/charset/binary.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,494 +0,0 @@ -/* -Copyright (C) 2004-2010, Parrot Foundation. -$Id: binary.c 48206 2010-07-28 21:52:30Z darbelo $ - -=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 - -Converts the STRING C to STRING C 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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -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 - -Returns C. - -=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 - -Creates a new STRING object from a single codepoint C. 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 - -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: - */ diff -Nru parrot-2.7.0/src/string/charset/binary.h parrot-2.8.0/src/string/charset/binary.h --- parrot-2.7.0/src/string/charset/binary.h 2010-04-23 10:42:12.000000000 +0000 +++ parrot-2.8.0/src/string/charset/binary.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* binary.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: binary.h 45852 2010-04-21 10:06:00Z bacek $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/charset/iso-8859-1.c parrot-2.8.0/src/string/charset/iso-8859-1.c --- parrot-2.7.0/src/string/charset/iso-8859-1.c 2010-07-05 02:46:56.000000000 +0000 +++ parrot-2.8.0/src/string/charset/iso-8859-1.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,733 +0,0 @@ -/* -Copyright (C) 2004-2010, Parrot Foundation. -$Id: iso-8859-1.c 47917 2010-06-29 23:18:38Z jkeenan $ - -=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 - -Converts STRING C to iso-8859-1 in STRING C. - -=cut - -*/ - -PARROT_CANNOT_RETURN_NULL -static STRING * -to_iso_8859_1(PARROT_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(to_iso_8859_1) - UINTVAL offs, src_len; - String_iter iter; - /* iso-8859-1 is never bigger then source */ - STRING * dest = Parrot_str_clone(interp, src); - - ENCODING_ITER_INIT(interp, src, &iter); - src_len = src->strlen; - dest->bufused = src_len; - dest->charset = Parrot_iso_8859_1_charset_ptr; - dest->encoding = Parrot_fixed_8_encoding_ptr; - for (offs = 0; offs < src_len; ++offs) { - const UINTVAL c = iter.get_and_advance(interp, &iter); - if (c >= 0x100) - Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LOSSY_CONVERSION, - "lossy conversion to iso-8559-1"); - - ENCODING_SET_BYTE(interp, dest, offs, c); - } - return dest; -} - -/* - -=item C - -Converts STRING C to unicode STRING C. - -=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); - ENCODING_ITER_INIT(interp, dest, &iter); - for (offs = 0; offs < src->strlen; ++offs) { - const UINTVAL c = ENCODING_GET_BYTE(interp, src, offs); - - if (iter.bytepos >= Buffer_buflen(dest) - 4) { - UINTVAL need = (UINTVAL)((src->strlen - offs) * 1.5); - if (need < 16) - need = 16; - Parrot_gc_reallocate_string_storage(interp, dest, - Buffer_buflen(dest) + need); - } - iter.set_and_advance(interp, &iter, c); - } - dest->bufused = iter.bytepos; - dest->strlen = iter.charpos; - return dest; -} - -/* - -=item C - -Converts the STRING C to an ISO-8859-1 STRING C. - -=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 - -ISO-8859-1 does not support composing, so we just copy the STRING C 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 - -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 - -Convert all graphemes in the STRING C 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 - -Converts all graphemes in STRING C 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 - -Converts the graphemes in STRING C 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 - -Converts the first grapheme in STRING C 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 - -Converts the first character of the STRING C 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 - -Converts the first grapheme in STRING C 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 - -Returns 1 if the STRING C 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 - -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 - -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 - -Returns C. - -=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 - -Creates a new STRING from the single codepoint C. - -=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 - -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 - -Converts STRING C in ISO-8859-1 to ASCII STRING C. - -=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: - */ diff -Nru parrot-2.7.0/src/string/charset/iso-8859-1.h parrot-2.8.0/src/string/charset/iso-8859-1.h --- parrot-2.7.0/src/string/charset/iso-8859-1.h 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/charset/iso-8859-1.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* iso_8859_1.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: iso-8859-1.h 46064 2010-04-27 14:55:24Z petdance $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/charset/tables.c parrot-2.8.0/src/string/charset/tables.c --- parrot-2.7.0/src/string/charset/tables.c 2009-03-08 22:01:44.000000000 +0000 +++ parrot-2.8.0/src/string/charset/tables.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -/* $Id: tables.c 37201 2009-03-08 12:07:48Z fperrad $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/charset/tables.h parrot-2.8.0/src/string/charset/tables.h --- parrot-2.7.0/src/string/charset/tables.h 2009-03-08 22:01:44.000000000 +0000 +++ parrot-2.8.0/src/string/charset/tables.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -/* $Id: tables.h 37201 2009-03-08 12:07:48Z fperrad $ - * 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: - */ - diff -Nru parrot-2.7.0/src/string/charset/unicode.c parrot-2.8.0/src/string/charset/unicode.c --- parrot-2.7.0/src/string/charset/unicode.c 2010-07-05 02:46:56.000000000 +0000 +++ parrot-2.8.0/src/string/charset/unicode.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,1080 +0,0 @@ -/* -Copyright (C) 2005-2010, Parrot Foundation. -$Id: unicode.c 47917 2010-06-29 23:18:38Z jkeenan $ - -=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 -# include -# include -# include -# include -#endif -#define EXCEPTION(err, str) \ - Parrot_ex_throw_from_c_args(interp, NULL, (err), (str)) - -#define UNIMPL EXCEPTION(EXCEPTION_UNIMPLEMENTED, "unimplemented unicode") - - -/* - -=item C - -Gets the graphemes from STRING C starting at C. Gets -C 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 - -Converts input STRING C to unicode STRING C. - -=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 - -If Parrot is built with ICU, composes the STRING C. 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 - -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 - -Converts the STRING C 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 - -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 - -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 - -Converts the first grapheme in the STRING C 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 - -Converts the first grapheme in the STRING C 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 - -Converts the first grapheme in STRING C 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 - -Compares two STRINGs, C and C. Returns -1 if C < C. Returns -0 if C = C. Returns 1 if C > C. - -=cut - -*/ - -static INTVAL -compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs)) -{ - ASSERT_ARGS(compare) - String_iter l_iter, r_iter; - UINTVAL offs, cl, cr, min_len, l_len, r_len; - - /* TODO make optimized equal - strings are equal length then already */ - ENCODING_ITER_INIT(interp, lhs, &l_iter); - ENCODING_ITER_INIT(interp, rhs, &r_iter); - - l_len = lhs->strlen; - r_len = rhs->strlen; - - min_len = l_len > r_len ? r_len : l_len; - - for (offs = 0; offs < min_len; ++offs) { - cl = l_iter.get_and_advance(interp, &l_iter); - cr = r_iter.get_and_advance(interp, &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 - -Finds the last index of substring C in STRING C, -starting from C. 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 - -Returns 1 if the STRING C is a valid unicode string, returns 0 otherwise. - -=cut - -*/ - -static UINTVAL -validate(PARROT_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(validate) - INTVAL offset; - String_iter iter; - const INTVAL length = Parrot_str_length(interp, src); - - ENCODING_ITER_INIT(interp, src, &iter); - for (offset = 0; offset < length; ++offset) { - const UINTVAL codepoint = iter.get_and_advance(interp, &iter); - /* Check for Unicode non-characters */ - if (codepoint >= 0xfdd0 - && (codepoint <= 0xfdef || (codepoint & 0xfffe) == 0xfffe) - && codepoint <= 0x10ffff) - return 0; - } - - return 1; -} - - -/* - -=item C - -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 - -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 - -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 pos = offset; - UINTVAL end = offset + count; - - ENCODING_ITER_INIT(interp, src, &iter); - - iter.set_position(interp, &iter, pos); - - end = src->strlen < end ? src->strlen : end; - - for (; pos < end; ++pos) { - codepoint = iter.get_and_advance(interp, &iter); - if (codepoint >= 256) { - if (u_iscclass(interp, codepoint, flags)) - return pos; - } - else { - if (Parrot_iso_8859_1_typetable[codepoint] & flags) - return pos; - } - } - - return end; -} - - -/* - -=item C - -Returns C. - -=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 pos = offset; - UINTVAL end = offset + count; - int bit; - - if (pos > src->strlen) { - /* XXX: Throw in this case? */ - return offset + count; - } - - ENCODING_ITER_INIT(interp, src, &iter); - - if (pos) - iter.set_position(interp, &iter, pos); - - end = src->strlen < end ? src->strlen : end; - - if (flags == enum_cclass_any) - return end; - - for (; pos < end; ++pos) { - codepoint = iter.get_and_advance(interp, &iter); - if (codepoint >= 256) { - for (bit = enum_cclass_uppercase; - bit <= enum_cclass_word ; bit <<= 1) { - if ((bit & flags) && !u_iscclass(interp, codepoint, bit)) - return pos; - } - } - else { - if (!(Parrot_iso_8859_1_typetable[codepoint] & flags)) - return pos; - } - } - - return end; -} - - -/* - -=item C - -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; - - ENCODING_ITER_INIT(interp, dest, &iter); - iter.set_and_advance(interp, &iter, codepoint); - dest->bufused = iter.bytepos; - - return dest; -} - - -/* - -=item C - -Computes the hash of the given STRING C with starting seed value C. - -=cut - -*/ - -static size_t -compute_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed) -{ - ASSERT_ARGS(compute_hash) - String_iter iter; - UINTVAL offs; - size_t hashval = seed; - - ENCODING_ITER_INIT(interp, src, &iter); - - for (offs = 0; offs < src->strlen; ++offs) { - const UINTVAL c = iter.get_and_advance(interp, &iter); - hashval += hashval << 5; - hashval += c; - } - - return hashval; -} - - -/* - -=item C - -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: - */ diff -Nru parrot-2.7.0/src/string/charset/unicode.h parrot-2.8.0/src/string/charset/unicode.h --- parrot-2.7.0/src/string/charset/unicode.h 2010-04-23 10:42:12.000000000 +0000 +++ parrot-2.8.0/src/string/charset/unicode.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -/* unicode.h - * Copyright (C) 2005-2007, Parrot Foundation. - * SVN Info - * $Id: unicode.h 45852 2010-04-21 10:06:00Z bacek $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/charset.c parrot-2.8.0/src/string/charset.c --- parrot-2.7.0/src/string/charset.c 2010-05-27 01:53:09.000000000 +0000 +++ parrot-2.8.0/src/string/charset.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,640 +0,0 @@ -/* -Copyright (C) 2004-2009, Parrot Foundation. -$Id: charset.c 46998 2010-05-25 22:43:21Z darbelo $ - -=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 - -Allocates a new C 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 - -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 - -Searches through the list of charsets for the charset given by C. -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 - -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 - -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 - -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 - -Returns the name of the charset given by the INTVAL index -C. - -=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 - -Returns the charset given by the INTVAL index C. - -=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 - -Returns a NULL-terminated C string with the name of the charset given by -INTVAL index C. - -=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 - -Adds a new charset C with name 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 - -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 - -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 - -Register a new charset C with name C. 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 - -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 - -Sets the current default charset to C with name C. - -=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 - -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 - -Finds a converter from charset C to charset C. - -=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 - -Registers a converter C from charset C to C. - -=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: - */ diff -Nru parrot-2.7.0/src/string/encoding/ascii.c parrot-2.8.0/src/string/encoding/ascii.c --- parrot-2.7.0/src/string/encoding/ascii.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/ascii.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,554 @@ +/* +Copyright (C) 2004-2010, Parrot Foundation. +$Id: ascii.c 49088 2010-09-17 17:51:12Z nwellnhof $ + +=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 "shared.h" +#include "tables.h" + +/* HEADERIZER HFILE: none */ + +/* 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 + +Converts STRING C to ASCII charset STRING C. + +=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 + +Creates a new STRING object from a single codepoint C. 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 + +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 + +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 + +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 + +Returns C. + +=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 + +Converts the STRING C 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 + +Converts the STRING C 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 + +Converts the STRING given by C 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 + +Sets the first character in the STRING C 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 + +Sets the first character of the STRING C 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 + +Converts the first letter of STRING C 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: + */ + diff -Nru parrot-2.7.0/src/string/encoding/binary.c parrot-2.8.0/src/string/encoding/binary.c --- parrot-2.7.0/src/string/encoding/binary.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/binary.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,275 @@ +/* +Copyright (C) 2004-2010, Parrot Foundation. +$Id: binary.c 49088 2010-09-17 17:51:12Z nwellnhof $ + +=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 "shared.h" + +/* HEADERIZER HFILE: none */ + +/* 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 + +Converts the STRING C to STRING C 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 + +Creates a new STRING object from a single codepoint C. 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 + +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 + +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 + +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 + +Returns C. + +=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 + +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: + */ diff -Nru parrot-2.7.0/src/string/encoding/fixed_8.c parrot-2.8.0/src/string/encoding/fixed_8.c --- parrot-2.7.0/src/string/encoding/fixed_8.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/fixed_8.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,530 +0,0 @@ -/* -Copyright (C) 2004-2010, Parrot Foundation. -$Id: fixed_8.c 46192 2010-04-30 08:27:15Z jimmy $ - -=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_get_next(PARROT_INTERP, ARGMOD(String_iter *iter)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*iter); - -static void fixed8_set_next(PARROT_INTERP, - ARGMOD(String_iter *iter), - UINTVAL c) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*iter); - -static void fixed8_set_position(SHIM_INTERP, - ARGMOD(String_iter *iter), - UINTVAL pos) - __attribute__nonnull__(2) - 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 iter_init(SHIM_INTERP, - ARGIN(const STRING *src), - ARGOUT(String_iter *iter)) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*iter); - -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_get_next __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(iter)) -#define ASSERT_ARGS_fixed8_set_next __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(iter)) -#define ASSERT_ARGS_fixed8_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - 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_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(src) \ - , PARROT_ASSERT_ARG(iter)) -#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 - -Converts the string C to this particular encoding. If C 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 - -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 - -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 - -Returns the byte in string C at position C. - -=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 - -Sets, in string C at position C, the byte C. - -=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 - -Returns the codepoints in string C at position C and length -C. (Delegates to C.) - -=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 - -Returns the bytes in string C at position C and length C. - -=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_copy(interp, src); - - return_string->encoding = src->encoding; - return_string->charset = src->charset; - - 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 - -Returns the number of codepoints in string C. - -=cut - -*/ - -static UINTVAL -codepoints(PARROT_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(codepoints) - return bytes(interp, src); -} - -/* - -=item C - -Returns the number of bytes in string C. - -=cut - -*/ - -static UINTVAL -bytes(SHIM_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(bytes) - return src->bufused; -} - -/* - * iterator functions - */ - -/* - -=item C - -Moves the string iterator C to the next codepoint. - -=cut - -*/ - -static UINTVAL -fixed8_get_next(PARROT_INTERP, ARGMOD(String_iter *iter)) -{ - ASSERT_ARGS(fixed8_get_next) - const UINTVAL c = get_byte(interp, iter->str, iter->charpos++); - ++iter->bytepos; - return c; -} - -/* - -=item C - -With the string iterator C, appends the codepoint C and advances to the -next position in the string. - -=cut - -*/ - -static void -fixed8_set_next(PARROT_INTERP, ARGMOD(String_iter *iter), UINTVAL c) -{ - ASSERT_ARGS(fixed8_set_next) - set_byte(interp, iter->str, iter->charpos++, c); - ++iter->bytepos; -} - -/* - -=item C - -Moves the string iterator C to the position C in the string. - -=cut - -*/ - -static void -fixed8_set_position(SHIM_INTERP, ARGMOD(String_iter *iter), UINTVAL pos) -{ - ASSERT_ARGS(fixed8_set_position) - iter->bytepos = iter->charpos = pos; - PARROT_ASSERT(pos <= Buffer_buflen(iter->str)); -} - - -/* - -=item C - -Initializes for string C the string iterator C. - -=cut - -*/ - -static void -iter_init(SHIM_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter)) -{ - ASSERT_ARGS(iter_init) - iter->str = src; - iter->bytepos = iter->charpos = 0; - iter->get_and_advance = fixed8_get_next; - iter->set_and_advance = fixed8_set_next; - iter->set_position = fixed8_set_position; -} - - -/* - -=item C - -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 - -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, - iter_init, - find_cclass, - fixed_8_hash - }; - - 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: - */ - diff -Nru parrot-2.7.0/src/string/encoding/fixed_8.h parrot-2.8.0/src/string/encoding/fixed_8.h --- parrot-2.7.0/src/string/encoding/fixed_8.h 2010-04-23 10:42:11.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/fixed_8.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* fixed_8.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: fixed_8.h 45852 2010-04-21 10:06:00Z bacek $ - * 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: - */ diff -Nru parrot-2.7.0/src/string/encoding/latin1.c parrot-2.8.0/src/string/encoding/latin1.c --- parrot-2.7.0/src/string/encoding/latin1.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/latin1.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,580 @@ +/* +Copyright (C) 2004-2010, Parrot Foundation. +$Id: latin1.c 49088 2010-09-17 17:51:12Z nwellnhof $ + +=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 "shared.h" +#include "tables.h" + +/* HEADERIZER HFILE: none */ + +/* 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 + +Converts the STRING C to an ISO-8859-1 STRING C. + +=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 + +Creates a new STRING from the single codepoint C. + +=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 + +Returns 1 if the STRING C 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 + +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 + +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 + +Returns C. + +=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 + +Convert all graphemes in the STRING C 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 + +Converts all graphemes in STRING C 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 + +Converts the graphemes in STRING C 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 + +Converts the first grapheme in STRING C 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 + +Converts the first character of the STRING C 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 + +Converts the first grapheme in STRING C 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: + */ diff -Nru parrot-2.7.0/src/string/encoding/shared.c parrot-2.8.0/src/string/encoding/shared.c --- parrot-2.7.0/src/string/encoding/shared.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/shared.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,1389 @@ +/* +Copyright (C) 2004-2010, Parrot Foundation. +$Id: shared.c 48938 2010-09-11 20:14:06Z chromatic $ + +=head1 NAME + +src/string/encoding/shared.c + +=head1 DESCRIPTION + +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 + +=cut + +*/ + +#include "parrot/parrot.h" +#include "tables.h" +#include "shared.h" + +#if PARROT_HAS_ICU +# include +# include +# include +# include +# include +#endif + +/* HEADERIZER HFILE: src/string/encoding/shared.h */ + +/* HEADERIZER BEGIN: static */ +/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ + +static int u_iscclass(PARROT_INTERP, UINTVAL codepoint, INTVAL flags) + __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 */ + +#define UNIMPL Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED, \ + "unimpl fixed_8") + + +/* + +=item C + +Compares two STRINGs, C and C. If STRING C == C, +returns 1. If C != C returns 0. + +=cut + +*/ + +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); + + 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; + + STRING_ITER_INIT(interp, &l_iter); + STRING_ITER_INIT(interp, &r_iter); + + 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 (cl != cr) + return 0; + } + + return 1; +} + + +/* + +=item C + +Compares two STRINGs, C and C. Returns -1 if C < C. Returns +0 if C = C. Returns 1 if C > C. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +INTVAL +encoding_compare(PARROT_INTERP, ARGIN(const STRING *lhs), ARGIN(const STRING *rhs)) +{ + 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); + + 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 + +Searches for the first instance of STRING C in STRING C. +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 +encoding_index(PARROT_INTERP, ARGIN(const STRING *src), ARGIN(const STRING *search), + UINTVAL offs) +{ + ASSERT_ARGS(encoding_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 + +Finds the last index of substring C in STRING C, +starting from C. Not implemented. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +INTVAL +encoding_rindex(PARROT_INTERP, SHIM(const STRING *src), + SHIM(const STRING *search_string), SHIM(UINTVAL offset)) +{ + ASSERT_ARGS(encoding_rindex) + /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */ + UNIMPL; +} + + +/* + +=item C + +Computes the hash of the given STRING C with starting seed value C. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +size_t +encoding_hash(PARROT_INTERP, ARGIN(const STRING *src), size_t seed) +{ + ASSERT_ARGS(encoding_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 + +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 + +Returns the number of codepoints in string C. + +=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 + */ + STRING_ITER_INIT(interp, &iter); + while (iter.bytepos < src->bufused) + STRING_iter_get_and_advance(interp, src, &iter); + return iter.charpos; +} + + +/* + +=item C + +Returns the codepoints in string C at position C and length +C. + +=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 + +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 + +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; + } + } + + return end; +} + + +/* + +=item C + +Returns C. + +=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 + +Retrieves the graphemes for the STRING C, starting at +C and ending at C. 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 + +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 + +Compares a fixed8 string with another string. If STRING C == C, +returns 1. If C != C 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 + +Compares a fixed8 string with another string. If STRING C > C, returns +1. If C == C returns 0. If STRING C < C, 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 + +Searches for the first instance of STRING C in STRING C. +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 + +Searches for the last instance of STRING C in STRING +C. Starts searching at C. + +=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 + +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 + +Returns the number of codepoints in string C. 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 + +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; + + 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; + } + + return buf[offset]; +} + + +/* + +=item C + +Returns the codepoints in string C at position C and length +C. + +=cut + +*/ + +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +STRING * +fixed8_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count) +{ + ASSERT_ARGS(fixed8_substr) + STRING * const return_string = Parrot_str_copy(interp, src); + + 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; + + return return_string; +} + + +/* + +=item C + +Can't compose ASCII strings, so performs a string copy on it and +returns the new string. + +=cut + +*/ + +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 + +Get the character at C plus C. + +=cut + +*/ + +UINTVAL +fixed8_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), ARGIN(const String_iter *iter), INTVAL offset) +{ + ASSERT_ARGS(fixed8_iter_get) + return fixed8_ord(interp, str, iter->charpos + offset); +} + + +/* + +=item C + +Moves the string iterator C by C characters. + +=cut + +*/ + +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 + +Moves the string iterator C to the next codepoint. + +=cut + +*/ + +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 = fixed8_ord(interp, str, iter->charpos++); + iter->bytepos++; + return c; +} + + +/* + +=item C + +With the string iterator C, appends the codepoint C and advances to the +next position in the string. + +=cut + +*/ + +void +fixed8_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *iter), UINTVAL c) +{ + ASSERT_ARGS(fixed8_iter_set_and_advance) + unsigned char *buf = (unsigned char *)str->strstart; + buf[iter->charpos++] = c; + iter->bytepos++; +} + + +/* + +=item C + +Moves the string iterator C to the position C in the string. + +=cut + +*/ + +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 + +Returns a one-codepoint string for the given codepoint. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +STRING * +unicode_chr(PARROT_INTERP, UINTVAL codepoint) +{ + 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 + +Returns 1 if the STRING C is a valid unicode string, returns 0 otherwise. + +=cut + +*/ + +UINTVAL +unicode_validate(PARROT_INTERP, ARGIN(const STRING *src)) +{ + ASSERT_ARGS(unicode_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); + /* Check for Unicode non-characters */ + if (codepoint >= 0xfdd0 + && (codepoint <= 0xfdef || (codepoint & 0xfffe) == 0xfffe) + && codepoint <= 0x10ffff) + return 0; + } + + return 1; +} + + +/* + +=item C + +If Parrot is built with ICU, composes the STRING C. 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 +STRING* +unicode_compose(PARROT_INTERP, ARGIN(const STRING *src)) +{ + ASSERT_ARGS(unicode_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, 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 + +Converts the STRING C 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 +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 + + if (src->bufused == src->strlen + && src->encoding == Parrot_utf8_encoding_ptr) { + return Parrot_ascii_encoding_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 + +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 +STRING* +unicode_downcase(PARROT_INTERP, ARGIN(const STRING *src)) +{ + ASSERT_ARGS(unicode_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_encoding_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 + +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 +STRING* +unicode_titlecase(PARROT_INTERP, ARGIN(const STRING *src)) +{ + ASSERT_ARGS(unicode_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_encoding_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 + +Converts the first grapheme in the STRING C to uppercase, if the +grapheme supports it. Not implemented. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +STRING* +unicode_upcase_first(PARROT_INTERP, SHIM(const STRING *src)) +{ + ASSERT_ARGS(unicode_upcase_first) + /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */ + UNIMPL; +} + + +/* + +=item C + +Converts the first grapheme in the STRING C to lower-case, if +the grapheme supports it. Not implemented + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +STRING* +unicode_downcase_first(PARROT_INTERP, SHIM(const STRING *src)) +{ + ASSERT_ARGS(unicode_downcase_first) + /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */ + UNIMPL; +} + + +/* + +=item C + +Converts the first grapheme in STRING C to title case, if the +string supports it. Not implemented. + +=cut + +*/ + +PARROT_CANNOT_RETURN_NULL +STRING* +unicode_titlecase_first(PARROT_INTERP, SHIM(const STRING *src)) +{ + ASSERT_ARGS(unicode_titlecase_first) + /* TODO: https://trac.parrot.org/parrot/wiki/StringsTasklist Implement this. */ + UNIMPL; +} + + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ + diff -Nru parrot-2.7.0/src/string/encoding/shared.h parrot-2.8.0/src/string/encoding/shared.h --- parrot-2.7.0/src/string/encoding/shared.h 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/shared.h 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,369 @@ +/* fixed_8.h + * Copyright (C) 2004-2007, Parrot Foundation. + * SVN Info + * $Id: shared.h 48835 2010-09-07 23:35:33Z mikehh $ + * 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: + */ diff -Nru parrot-2.7.0/src/string/encoding/tables.c parrot-2.8.0/src/string/encoding/tables.c --- parrot-2.7.0/src/string/encoding/tables.c 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/tables.c 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,93 @@ +/* $Id: tables.c 48833 2010-09-07 22:58:38Z nwellnhof $ + * 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: + */ diff -Nru parrot-2.7.0/src/string/encoding/tables.h parrot-2.8.0/src/string/encoding/tables.h --- parrot-2.7.0/src/string/encoding/tables.h 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/tables.h 2010-09-21 07:48:51.000000000 +0000 @@ -0,0 +1,36 @@ +/* $Id: tables.h 48833 2010-09-07 22:58:38Z nwellnhof $ + * 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: + */ + diff -Nru parrot-2.7.0/src/string/encoding/ucs2.c parrot-2.8.0/src/string/encoding/ucs2.c --- parrot-2.7.0/src/string/encoding/ucs2.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/ucs2.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: ucs2.c 46192 2010-04-30 08:27:15Z jimmy $ +$Id: ucs2.c 49088 2010-09-17 17:51:12Z nwellnhof $ =head1 NAME @@ -19,7 +19,7 @@ */ #include "parrot/parrot.h" -#include "../unicode.h" +#include "shared.h" #if !PARROT_HAS_ICU PARROT_DOES_NOT_RETURN @@ -31,143 +31,125 @@ } #endif -/* HEADERIZER HFILE: src/string/encoding/ucs2.h */ +/* HEADERIZER HFILE: none */ /* 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)) +static size_t ucs2_hash(PARROT_INTERP, + ARGIN(const STRING *s), + size_t hashval) __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) +static UINTVAL ucs2_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *i), + INTVAL offset) __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); +static UINTVAL ucs2_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i)) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); -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 void ucs2_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), + ARGMOD(String_iter *i), + UINTVAL c) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*str) + FUNC_MODIFIES(*i); + +static void ucs2_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + UINTVAL n) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); -static UINTVAL get_codepoint(PARROT_INTERP, +static void ucs2_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + INTVAL skip) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); + +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 * get_codepoints(PARROT_INTERP, +static STRING * ucs2_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, UINTVAL count) __attribute__nonnull__(1) __attribute__nonnull__(2); -static void iter_init(PARROT_INTERP, - ARGIN(const STRING *src), - ARGOUT(String_iter *iter)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*iter); - -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)) +static STRING * ucs2_to_encoding(PARROT_INTERP, ARGIN(const STRING *src)) __attribute__nonnull__(1) __attribute__nonnull__(2); -static UINTVAL ucs2_decode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i)) - __attribute__nonnull__(2) - FUNC_MODIFIES(*i); - -static void ucs2_encode_and_advance(SHIM_INTERP, - ARGMOD(String_iter *i), - UINTVAL c) - __attribute__nonnull__(2) - FUNC_MODIFIES(*i); - -static size_t ucs2_hash(PARROT_INTERP, - ARGIN(const STRING *s), - size_t hashval) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -static void ucs2_set_position(SHIM_INTERP, - ARGMOD(String_iter *i), - UINTVAL n) - __attribute__nonnull__(2) - 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 = (\ +#define ASSERT_ARGS_ucs2_hash __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)) +#define ASSERT_ARGS_ucs2_iter_get __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs2_iter_get_and_advance __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs2_iter_set_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs2_iter_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs2_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + 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_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_ucs2_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(src) \ - , PARROT_ASSERT_ARG(iter)) -#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(src)) +#define ASSERT_ARGS_ucs2_substr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(src)) -#define ASSERT_ARGS_ucs2_decode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_ucs2_encode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_ucs2_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_ucs2_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(s)) -#define ASSERT_ARGS_ucs2_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) + , PARROT_ASSERT_ARG(src)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ -#include "ucs2.h" - #if PARROT_HAS_ICU # include #endif @@ -177,7 +159,7 @@ /* -=item C +=item C Converts the string C to this particular encoding. If C is provided, it will contain the result. Otherwise this function operates in @@ -190,9 +172,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); @@ -206,98 +188,57 @@ /* -=item C +=item C -Returns the codepoint in string C at position C. +Returns the number of codepoints in string C. =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 - -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 -Returns the byte in string C at position C. +Returns the codepoint in string C at position C. =cut */ static UINTVAL -get_byte(PARROT_INTERP, SHIM(const STRING *src), SHIM(UINTVAL offset)) -{ - ASSERT_ARGS(get_byte) - UNIMPL; -} - -/* - -=item C - -Sets, in string C at position C, the byte C. - -=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 Returns the codepoints in string C at position C and length @@ -310,99 +251,76 @@ 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); + return_string->bufused = count * sizeof (UChar); + return_string->strlen = count; + return_string->hashval = 0; + return return_string; #else - { - String_iter iter; - UINTVAL start; - - iter_init(interp, src, &iter); - iter.set_position(interp, &iter, offset); - start = iter.bytepos; - return_string->strstart = (char *)return_string->strstart + start; - iter.set_position(interp, &iter, offset + count); - return_string->bufused = iter.bytepos - start; - } + UNUSED(src); + UNUSED(offset); + UNUSED(count); + no_ICU_lib(interp); #endif - return_string->strlen = count; - return_string->hashval = 0; - return return_string; } /* -=item C +=item C -Returns the bytes in string C at position C and length C. +Get the character at C + C. =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)) +static UINTVAL +ucs2_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset) { - ASSERT_ARGS(get_bytes) - UNIMPL; + ASSERT_ARGS(ucs2_iter_get) + return ucs2_ord(interp, str, i->charpos + offset); } - /* -=item C +=item C -Returns the number of codepoints in string C. +Moves the string iterator C by C characters. =cut */ -PARROT_WARN_UNUSED_RESULT -static UINTVAL -codepoints(PARROT_INTERP, ARGIN(const STRING *src)) +static void +ucs2_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), INTVAL skip) { - ASSERT_ARGS(codepoints) + ASSERT_ARGS(ucs2_iter_skip) + UNUSED(str); + #if PARROT_HAS_ICU - UNUSED(interp); - return src->bufused / sizeof (UChar); + i->charpos += skip; + i->bytepos += skip * sizeof (UChar); #else - UNUSED(src); + UNUSED(i); + UNUSED(skip); no_ICU_lib(interp); #endif } /* -=item C - -Returns the number of bytes in string C. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -static UINTVAL -bytes(SHIM_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(bytes) - return src->bufused; -} - -/* - -=item C +=item C Moves the string iterator C to the next UCS-2 codepoint. @@ -411,35 +329,34 @@ */ static UINTVAL -ucs2_decode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i)) +ucs2_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i)) { - ASSERT_ARGS(ucs2_decode_and_advance) + ASSERT_ARGS(ucs2_iter_get_and_advance) #if PARROT_HAS_ICU - const UChar * const s = (const UChar*) i->str->strstart; + UChar * const s = (UChar*) str->strstart; size_t pos = i->bytepos / sizeof (UChar); /* TODO either make sure that we don't go past end or use SAFE * iter versions */ const UChar c = s[pos++]; - ++i->charpos; + i->charpos++; i->bytepos = pos * sizeof (UChar); return c; #else - /* This function must never be called if compiled without ICU. - * See TT #557 - */ - PARROT_ASSERT(0); + UNUSED(str); UNUSED(i); + no_ICU_lib(interp); return (UINTVAL)0; /* Stop the static analyzers from panicing */ #endif } /* -=item C +=item C With the string iterator C, appends the codepoint C and advances to the next position in the string. @@ -449,64 +366,29 @@ */ static void -ucs2_encode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i), UINTVAL c) +ucs2_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *i), UINTVAL c) { - ASSERT_ARGS(ucs2_encode_and_advance) + ASSERT_ARGS(ucs2_iter_set_and_advance) #if PARROT_HAS_ICU - UChar *s = (UChar*) i->str->strstart; + UChar * const s = (UChar*) str->strstart; UINTVAL pos = i->bytepos / sizeof (UChar); - s[pos++] = (UChar)c; - ++i->charpos; + s[pos++] = (UChar)c; + i->charpos++; i->bytepos = pos * sizeof (UChar); #else - /* This function must never be called if compiled without ICU. - * See TT #557 - */ + UNUSED(str); UNUSED(i); UNUSED(c); - PARROT_ASSERT(0); -#endif -} - -/* - -=item C - -Returns the hashed value of the string, given a seed in hashval. - -=cut - -*/ - -static size_t -ucs2_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval) -{ - ASSERT_ARGS(ucs2_hash) -#if PARROT_HAS_ICU - const UChar *pos = (const UChar*) s->strstart; - UINTVAL len = s->strlen; - UNUSED(interp); - - while (len--) { - hashval += hashval << 5; - hashval += *(pos++); - } - - return hashval; - -#else - UNUSED(s); - UNUSED(hashval); - no_ICU_lib(interp); #endif } - /* -=item C +=item C Moves the string iterator C to the position C in the string. @@ -515,90 +397,100 @@ */ static void -ucs2_set_position(SHIM_INTERP, ARGMOD(String_iter *i), UINTVAL n) +ucs2_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), UINTVAL n) { - ASSERT_ARGS(ucs2_set_position) + ASSERT_ARGS(ucs2_iter_set_position) + UNUSED(str); #if PARROT_HAS_ICU i->charpos = n; i->bytepos = n * sizeof (UChar); #else - /* This function must never be called if compiled without ICU. - * See TT #557 - */ UNUSED(i); UNUSED(n); - PARROT_ASSERT(0); + no_ICU_lib(interp); #endif } - /* -=item C +=item C -Initializes for string C the string iterator C. +Returns the hashed value of the string, given a seed in hashval. =cut */ -static void -iter_init(PARROT_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter)) +static size_t +ucs2_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval) { - ASSERT_ARGS(iter_init) + ASSERT_ARGS(ucs2_hash) #if PARROT_HAS_ICU + const UChar *pos = (const UChar*) s->strstart; + UINTVAL len = s->strlen; UNUSED(interp); - iter->str = src; - iter->bytepos = 0; - iter->charpos = 0; - iter->get_and_advance = ucs2_decode_and_advance; - iter->set_and_advance = ucs2_encode_and_advance; - iter->set_position = ucs2_set_position; -#else - UNUSED(src); - UNUSED(iter); - no_ICU_lib(interp); -#endif -} -/* - -=item C + while (len--) { + hashval += hashval << 5; + hashval += *(pos++); + } -Initializes the UCS-2 encoding. + return hashval; -=cut +#else + UNUSED(s); + UNUSED(hashval); -*/ + no_ICU_lib(interp); +#endif +} -void -Parrot_encoding_ucs2_init(PARROT_INTERP) -{ - ASSERT_ARGS(Parrot_encoding_ucs2_init) - ENCODING * const return_encoding = Parrot_new_encoding(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 +}; - 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, - iter_init, - find_cclass, - ucs2_hash - }; - STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding); - Parrot_register_encoding(interp, "ucs2", return_encoding); +STR_VTABLE *Parrot_ucs2_encoding_ptr = &Parrot_ucs2_encoding; - return; -} /* diff -Nru parrot-2.7.0/src/string/encoding/ucs2.h parrot-2.8.0/src/string/encoding/ucs2.h --- parrot-2.7.0/src/string/encoding/ucs2.h 2010-04-23 10:42:11.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/ucs2.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* ucs2.h - * Copyright (C) 2004, Parrot Foundation. - * SVN Info - * $Id: ucs2.h 45852 2010-04-21 10:06:00Z bacek $ - * Overview: - * This is the header for the ucs2 fixed-width encoding. - * Data Structure and Algorithms: - * History: - * Notes: - * References: - */ - -#ifndef PARROT_ENCODING_UCS2_H_GUARD -#define PARROT_ENCODING_UCS2_H_GUARD - -/* 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 */ - -#endif /* PARROT_ENCODING_UCS2_H_GUARD */ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/string/encoding/ucs4.c parrot-2.8.0/src/string/encoding/ucs4.c --- parrot-2.7.0/src/string/encoding/ucs4.c 2010-05-27 01:53:09.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/ucs4.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2010, Parrot Foundation. -$Id: ucs4.c 47006 2010-05-26 02:08:28Z petdance $ +$Id: ucs4.c 49088 2010-09-17 17:51:12Z nwellnhof $ =head1 NAME @@ -19,7 +19,7 @@ */ #include "parrot/parrot.h" -#include "../unicode.h" +#include "shared.h" #if !PARROT_HAS_ICU PARROT_DOES_NOT_RETURN @@ -31,157 +31,133 @@ } #endif -/* HEADERIZER HFILE: src/string/encoding/ucs4.h */ +/* HEADERIZER HFILE: none */ /* 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)) +static size_t ucs4_hash(PARROT_INTERP, + ARGIN(const STRING *s), + size_t hashval) __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) +static UINTVAL ucs4_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *i), + INTVAL offset) __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 iter_init(PARROT_INTERP, - ARGIN(const STRING *src), - ARGOUT(String_iter *iter)) +static UINTVAL ucs4_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i)) __attribute__nonnull__(1) __attribute__nonnull__(2) __attribute__nonnull__(3) - FUNC_MODIFIES(*iter); - -static void set_byte(PARROT_INTERP, - SHIM(const STRING *src), - SHIM(UINTVAL offset), - SHIM(UINTVAL byte)) - __attribute__nonnull__(1); + FUNC_MODIFIES(*i); -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src)) +static void ucs4_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), + ARGMOD(String_iter *i), + UINTVAL c) __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*str) + FUNC_MODIFIES(*i); -static UINTVAL ucs4_decode_and_advance(PARROT_INTERP, - ARGMOD(String_iter *i)) +static void ucs4_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + UINTVAL n) __attribute__nonnull__(1) __attribute__nonnull__(2) + __attribute__nonnull__(3) FUNC_MODIFIES(*i); -static void ucs4_encode_and_advance(PARROT_INTERP, +static void ucs4_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), - UINTVAL c) + INTVAL skip) __attribute__nonnull__(1) __attribute__nonnull__(2) + __attribute__nonnull__(3) FUNC_MODIFIES(*i); -static size_t ucs4_hash(PARROT_INTERP, - ARGIN(const STRING *s), - size_t hashval) +static UINTVAL ucs4_ord(PARROT_INTERP, + ARGIN(const STRING *src), + UINTVAL offset) __attribute__nonnull__(1) __attribute__nonnull__(2); -static void ucs4_set_position(PARROT_INTERP, - ARGMOD(String_iter *i), - UINTVAL n) +PARROT_WARN_UNUSED_RESULT +static UINTVAL ucs4_scan(PARROT_INTERP, ARGIN(const STRING *src)) __attribute__nonnull__(1) - __attribute__nonnull__(2) - FUNC_MODIFIES(*i); + __attribute__nonnull__(2); -#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_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(src)) -#define ASSERT_ARGS_get_codepoints __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(s)) +#define ASSERT_ARGS_ucs4_iter_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(src)) -#define ASSERT_ARGS_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs4_iter_get_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(src) \ - , PARROT_ASSERT_ARG(iter)) -#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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs4_iter_set_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(src)) -#define ASSERT_ARGS_ucs4_decode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_ucs4_iter_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ , PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_ucs4_encode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_ucs4_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ , PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_ucs4_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_ucs4_ord __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(s)) -#define ASSERT_ARGS_ucs4_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(src)) +#define ASSERT_ARGS_ucs4_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(i)) + , 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 */ -#include "ucs4.h" - #if PARROT_HAS_ICU # include #endif + /* -=item C +=item C Converts the string C to this particular encoding. @@ -192,9 +168,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); @@ -202,11 +178,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); @@ -220,27 +197,26 @@ } + /* -=item C +=item C -Returns the codepoint in string C at position C. +Returns the number of codepoints in string C. =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 @@ -249,77 +225,34 @@ /* -=item C - -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 -Returns the byte in string C at position C. +Returns the codepoint in string C at position C. =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 - -Sets, in string C at position C, the byte C. - -=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 Returns the C codepoints stored at position C in string @@ -332,12 +265,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); @@ -346,103 +279,91 @@ #endif } + /* -=item C +=item C -Returns the bytes in string C at position C and length C. +Get the character at C + C. =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)) +static UINTVAL +ucs4_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset) { - ASSERT_ARGS(get_bytes) - Parrot_ex_throw_from_c_args(interp, NULL, - EXCEPTION_UNIMPLEMENTED, - "No get_bytes for UCS-4"); + ASSERT_ARGS(ucs4_iter_get) + return ucs4_ord(interp, str, i->charpos + offset); } /* -=item C +=item C -Returns the number of codepoints in string C. +Moves the string iterator C by C characters. =cut */ -PARROT_WARN_UNUSED_RESULT -static UINTVAL -codepoints(PARROT_INTERP, ARGIN(const STRING *src)) +static void +ucs4_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), INTVAL skip) { - ASSERT_ARGS(codepoints) + ASSERT_ARGS(ucs4_iter_skip) + UNUSED(str); + #if PARROT_HAS_ICU - UNUSED(interp); - return src->bufused / sizeof (UChar32); + i->charpos += skip; + i->bytepos += skip * sizeof (UChar32); #else - UNUSED(src); + UNUSED(i); + UNUSED(skip); no_ICU_lib(interp); #endif } -/* - -=item C - -Returns the number of bytes in string C. - -=cut - -*/ - -PARROT_WARN_UNUSED_RESULT -static UINTVAL -bytes(SHIM_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(bytes) - return src->bufused; -} /* -=item C +=item C -Moves the string iterator C to the next UCS-4 codepoint. +Moves the string iterator C to the next codepoint. =cut */ static UINTVAL -ucs4_decode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i)) +ucs4_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i)) { - ASSERT_ARGS(ucs4_decode_and_advance) + ASSERT_ARGS(ucs4_iter_get_and_advance) + #if PARROT_HAS_ICU - const UChar32 * const s = (const UChar32 *) i->str->strstart; - size_t pos = i->bytepos / sizeof (UChar32); - const UChar32 c = s[pos++]; - ++i->charpos; - i->bytepos = pos * sizeof (UChar32); + const UChar32 * const s = (const UChar32*) str->strstart; + const UChar32 c = s[i->charpos++]; + i->bytepos += sizeof (UChar32); return c; #else + UNUSED(str); UNUSED(i); no_ICU_lib(interp); + return (UINTVAL)0; /* Stop the static analyzers from panicing */ #endif } + /* -=item C +=item C With the string iterator C, appends the codepoint C and advances to the next position in the string. @@ -452,52 +373,28 @@ */ static void -ucs4_encode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i), UINTVAL c) +ucs4_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *i), UINTVAL c) { - ASSERT_ARGS(ucs4_encode_and_advance) + ASSERT_ARGS(ucs4_iter_set_and_advance) + #if PARROT_HAS_ICU - UChar32 *s = (UChar32 *) i->str->strstart; - size_t pos = i->bytepos / sizeof (UChar32); - s[pos++] = (UChar32) c; - ++i->charpos; - i->bytepos = pos * sizeof (UChar32); + UChar32 * const s = (UChar32*) str->strstart; + s[i->charpos++] = (UChar32)c; + i->bytepos += sizeof (UChar32); #else + UNUSED(str); UNUSED(i); + UNUSED(c); no_ICU_lib(interp); #endif } -#if PARROT_HAS_ICU -/* - -=item C - -Returns the hashed value of the string, given a seed in hashval. - -=cut - -*/ - -static size_t -ucs4_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval) -{ - ASSERT_ARGS(ucs4_hash) - const UChar32 *pos = (const UChar32*) s->strstart; - UINTVAL len = s->strlen; - UNUSED(interp); - - while (len--) { - hashval += hashval << 5; - hashval += *(pos++); - } - - return hashval; -} -#endif /* -=item C +=item C Moves the string iterator C to the position C in the string. @@ -506,9 +403,12 @@ */ static void -ucs4_set_position(PARROT_INTERP, ARGMOD(String_iter *i), UINTVAL n) +ucs4_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), UINTVAL n) { - ASSERT_ARGS(ucs4_set_position) + ASSERT_ARGS(ucs4_iter_set_position) + UNUSED(str); + #if PARROT_HAS_ICU i->charpos = n; i->bytepos = n * sizeof (UChar32); @@ -522,74 +422,75 @@ /* -=item C +=item C -Initializes for string C the string iterator C. +Returns the hashed value of the string, given a seed in hashval. =cut */ -static void -iter_init(PARROT_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter)) +static size_t +ucs4_hash(PARROT_INTERP, ARGIN(const STRING *s), size_t hashval) { - ASSERT_ARGS(iter_init) -#if PARROT_HAS_ICU + ASSERT_ARGS(ucs4_hash) + const Parrot_UInt4 *pos = (const Parrot_UInt4 *) s->strstart; + UINTVAL len = s->strlen; UNUSED(interp); - iter->str = src; - iter->bytepos = 0; - iter->charpos = 0; - iter->get_and_advance = ucs4_decode_and_advance; - iter->set_and_advance = ucs4_encode_and_advance; - iter->set_position = ucs4_set_position; -#else - UNUSED(src); - UNUSED(iter); - no_ICU_lib(interp); -#endif -} - -/* -=item C - -Initializes the UCS-4 encoding. + while (len--) { + hashval += hashval << 5; + hashval += *(pos++); + } -=cut + return hashval; +} -*/ -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, - iter_init, - find_cclass, -#if PARROT_HAS_ICU - ucs4_hash -#else - NULL -#endif - }; - 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; -} /* diff -Nru parrot-2.7.0/src/string/encoding/ucs4.h parrot-2.8.0/src/string/encoding/ucs4.h --- parrot-2.7.0/src/string/encoding/ucs4.h 2010-05-27 01:53:09.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/ucs4.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -/* -Copyright (C) 2010, Parrot Foundation. -$Id: ucs4.h 46998 2010-05-25 22:43:21Z darbelo $ -*/ - -#ifndef PARROT_ENCODING_UCS4_H_GUARD -#define PARROT_ENCODING_UCS4_H_GUARD - -/* 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 */ - -#endif /* PARROT_ENCODING_UCS4_H_GUARD */ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/string/encoding/utf16.c parrot-2.8.0/src/string/encoding/utf16.c --- parrot-2.7.0/src/string/encoding/utf16.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/utf16.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: utf16.c 46192 2010-04-30 08:27:15Z jimmy $ +$Id: utf16.c 49088 2010-09-17 17:51:12Z nwellnhof $ =head1 NAME @@ -19,141 +19,119 @@ */ #include "parrot/parrot.h" -#include "../unicode.h" +#include "shared.h" -/* HEADERIZER HFILE: src/string/encoding/utf16.h */ +/* HEADERIZER HFILE: none */ /* 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); +static UINTVAL utf16_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *i), + INTVAL offset) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3); PARROT_WARN_UNUSED_RESULT -static UINTVAL codepoints(PARROT_INTERP, ARGIN(const STRING *src)) +static UINTVAL utf16_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i)) __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); -PARROT_WARN_UNUSED_RESULT -static UINTVAL find_cclass(PARROT_INTERP, - ARGIN(const STRING *s), - ARGIN(const INTVAL *typetable), - INTVAL flags, - UINTVAL pos, - UINTVAL end) +static void utf16_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), + ARGMOD(String_iter *i), + UINTVAL c) __attribute__nonnull__(1) __attribute__nonnull__(2) - __attribute__nonnull__(3); + __attribute__nonnull__(3) + FUNC_MODIFIES(*str) + FUNC_MODIFIES(*i); -static UINTVAL get_byte(SHIM_INTERP, - ARGIN(const STRING *src), - UINTVAL offset) - __attribute__nonnull__(2); +static void utf16_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + UINTVAL n) + __attribute__nonnull__(1) + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); -PARROT_WARN_UNUSED_RESULT -PARROT_CANNOT_RETURN_NULL -static STRING * get_bytes(PARROT_INTERP, - ARGIN(const STRING *src), - UINTVAL offset, - UINTVAL count) +static void utf16_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + INTVAL skip) __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*i); -static UINTVAL get_codepoint(PARROT_INTERP, +static UINTVAL utf16_ord(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) +static UINTVAL utf16_scan(PARROT_INTERP, ARGIN(const STRING *src)) __attribute__nonnull__(1) __attribute__nonnull__(2); -static void iter_init(PARROT_INTERP, - ARGIN(const STRING *src), - ARGOUT(String_iter *iter)) - __attribute__nonnull__(1) - __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*iter); - -static void set_byte(PARROT_INTERP, +PARROT_WARN_UNUSED_RESULT +PARROT_CANNOT_RETURN_NULL +static STRING * utf16_substr(PARROT_INTERP, ARGIN(const STRING *src), UINTVAL offset, - UINTVAL byte) + UINTVAL count) __attribute__nonnull__(1) __attribute__nonnull__(2); PARROT_WARN_UNUSED_RESULT PARROT_CANNOT_RETURN_NULL -static STRING * to_encoding(PARROT_INTERP, ARGIN(const STRING *src)) +static STRING * utf16_to_encoding(PARROT_INTERP, ARGIN(const STRING *src)) __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_WARN_UNUSED_RESULT -static UINTVAL utf16_decode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i)) - __attribute__nonnull__(2) - FUNC_MODIFIES(*i); - -static void utf16_encode_and_advance(SHIM_INTERP, - ARGMOD(String_iter *i), - UINTVAL c) - __attribute__nonnull__(2) - FUNC_MODIFIES(*i); - -static void utf16_set_position(SHIM_INTERP, - ARGMOD(String_iter *i), - UINTVAL n) - __attribute__nonnull__(2) - 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 = (\ +#define ASSERT_ARGS_utf16_iter_get __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf16_iter_get_and_advance __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf16_iter_set_and_advance __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf16_iter_set_position __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(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf16_iter_skip __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + 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_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_utf16_scan __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(src) \ - , PARROT_ASSERT_ARG(iter)) -#define ASSERT_ARGS_set_byte __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , 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_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_utf16_to_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(src)) -#define ASSERT_ARGS_utf16_decode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_utf16_encode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_utf16_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) /* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */ /* HEADERIZER END: static */ -#include "utf16.h" - #if PARROT_HAS_ICU # include # include @@ -165,7 +143,7 @@ /* -=item C +=item C Converts the string C to this particular encoding. If C is provided, it will contain the result. Otherwise this function operates in @@ -179,9 +157,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; @@ -190,8 +168,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); @@ -201,7 +181,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; @@ -210,8 +189,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]; } @@ -234,7 +213,6 @@ } } result->bufused = dest_len * sizeof (UChar); - result->charset = Parrot_unicode_charset_ptr; result->encoding = Parrot_utf16_encoding_ptr; result->strlen = src_len; @@ -250,118 +228,76 @@ /* -=item C +=item C -Returns the codepoint in string C at position C. +Returns the number of codepoints in string C 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 - -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 -Returns the byte in string C at position C. +Returns the codepoint in string C at position C. =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 - -Sets, in string C at position C, the byte C. - -=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 Returns the codepoints in string C at position C and length @@ -374,97 +310,115 @@ 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) - String_iter iter; - UINTVAL start; + ASSERT_ARGS(utf16_substr) +#if PARROT_HAS_ICU + UINTVAL pos = 0, start; + const UChar * const s = (UChar*) src->strstart; STRING * const return_string = Parrot_str_copy(interp, src); - iter_init(interp, src, &iter); - iter.set_position(interp, &iter, offset); - start = iter.bytepos; - return_string->strstart = (char *)return_string->strstart + start ; - iter.set_position(interp, &iter, offset + count); - return_string->bufused = iter.bytepos - start; + U16_FWD_N_UNSAFE(s, pos, offset); + start = pos * sizeof (UChar); + return_string->strstart = (char *)return_string->strstart + start; + U16_FWD_N_UNSAFE(s, pos, count); + return_string->bufused = pos * sizeof (UChar) - start; return_string->strlen = count; return_string->hashval = 0; return return_string; -} - - -/* - -=item C - -Returns the bytes in string C at position C and length C. - -=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); +#else UNUSED(src); - UNUSED(offset) + UNUSED(offset); UNUSED(count); - UNIMPL; + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, + "no ICU lib loaded"); +#endif } /* -=item C +=item C -Returns the number of codepoints in string C. +Get the character at C plus C. =cut */ -PARROT_WARN_UNUSED_RESULT static UINTVAL -codepoints(PARROT_INTERP, ARGIN(const STRING *src)) +utf16_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset) { - ASSERT_ARGS(codepoints) - String_iter iter; - /* - * this is used to initially calculate src->strlen, - * therefore we must scan the whole string - */ - iter_init(interp, src, &iter); - while (iter.bytepos < src->bufused) - iter.get_and_advance(interp, &iter); - return iter.charpos; + ASSERT_ARGS(utf16_iter_get) +#if PARROT_HAS_ICU + const UChar * const s = (UChar*) str->strstart; + UINTVAL c, pos; + + pos = i->bytepos / sizeof (UChar); + if (offset > 0) { + U16_FWD_N_UNSAFE(s, pos, offset); + } + else if (offset < 0) { + U16_BACK_N_UNSAFE(s, pos, -offset); + } + U16_GET_UNSAFE(s, pos, c); + + return c; +#else + UNUSED(str); + UNUSED(i); + UNUSED(offset); + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, + "no ICU lib loaded"); +#endif } /* -=item C +=item C -Returns the number of bytes in string C. +Moves the string iterator C by C characters. =cut */ -PARROT_WARN_UNUSED_RESULT -static UINTVAL -bytes(SHIM_INTERP, ARGIN(const STRING *src)) +static void +utf16_iter_skip(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), INTVAL skip) { - ASSERT_ARGS(bytes) - return src->bufused; + ASSERT_ARGS(utf16_iter_skip) +#if PARROT_HAS_ICU + const UChar * const s = (UChar*) str->strstart; + UINTVAL pos = i->bytepos / sizeof (UChar); + + if (skip > 0) { + U16_FWD_N_UNSAFE(s, pos, skip); + } + else if (skip < 0) { + U16_BACK_N_UNSAFE(s, pos, -skip); + } + + i->charpos += skip; + i->bytepos = pos * sizeof (UChar); +#else + UNUSED(str); + UNUSED(i); + UNUSED(skip); + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, + "no ICU lib loaded"); +#endif } -#if PARROT_HAS_ICU /* -=item C +=item C Moves the string iterator C to the next UTF-16 codepoint. @@ -474,26 +428,34 @@ PARROT_WARN_UNUSED_RESULT static UINTVAL -utf16_decode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i)) +utf16_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i)) { - ASSERT_ARGS(utf16_decode_and_advance) - const UChar * const s = (const UChar*) i->str->strstart; - UINTVAL pos = i->bytepos / sizeof (UChar); - UINTVAL c; - + ASSERT_ARGS(utf16_iter_get_and_advance) +#if PARROT_HAS_ICU + const UChar * const s = (UChar*) str->strstart; + UINTVAL c, pos; + pos = i->bytepos / sizeof (UChar); /* TODO either make sure that we don't go past end or use SAFE * iter versions */ U16_NEXT_UNSAFE(s, pos, c); - ++i->charpos; + i->charpos++; i->bytepos = pos * sizeof (UChar); return c; +#else + UNUSED(str); + UNUSED(i); + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, + "no ICU lib loaded"); +#endif } /* -=item C +=item C With the string iterator C, appends the codepoint C and advances to the next position in the string. @@ -503,20 +465,31 @@ */ static void -utf16_encode_and_advance(SHIM_INTERP, ARGMOD(String_iter *i), UINTVAL c) +utf16_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *i), UINTVAL c) { - ASSERT_ARGS(utf16_encode_and_advance) - UChar * const s = (UChar*) i->str->strstart; - UINTVAL pos = i->bytepos / sizeof (UChar); + ASSERT_ARGS(utf16_iter_set_and_advance) +#if PARROT_HAS_ICU + UChar * const s = (UChar*) str->strstart; + UINTVAL pos; + pos = i->bytepos / sizeof (UChar); U16_APPEND_UNSAFE(s, pos, c); - ++i->charpos; + i->charpos++; i->bytepos = pos * sizeof (UChar); +#else + UNUSED(str); + UNUSED(i); + UNUSED(c); + + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, + "no ICU lib loaded"); +#endif } /* -=item C +=item C Moves the string iterator C to the position C in the string. @@ -525,83 +498,72 @@ */ static void -utf16_set_position(SHIM_INTERP, ARGMOD(String_iter *i), UINTVAL n) +utf16_iter_set_position(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), UINTVAL n) { - ASSERT_ARGS(utf16_set_position) - UChar * const s = (UChar*) i->str->strstart; + ASSERT_ARGS(utf16_iter_set_position) +#if PARROT_HAS_ICU + UChar * const s = (UChar*) str->strstart; UINTVAL pos; pos = 0; U16_FWD_N_UNSAFE(s, pos, n); i->charpos = n; i->bytepos = pos * sizeof (UChar); -} - -#endif - -/* - -=item C - -Initializes for string C the string iterator C. - -=cut - -*/ - -static void -iter_init(PARROT_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter)) -{ - ASSERT_ARGS(iter_init) - iter->str = src; - iter->bytepos = iter->charpos = 0; -#if PARROT_HAS_ICU - UNUSED(interp); - iter->get_and_advance = utf16_decode_and_advance; - iter->set_and_advance = utf16_encode_and_advance; - iter->set_position = utf16_set_position; #else + UNUSED(str); + UNUSED(i); + UNUSED(n); + Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR, "no ICU lib loaded"); #endif } -/* - -=item C -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, - iter_init, - find_cclass, - NULL - }; - STRUCT_COPY_FROM_STRUCT(return_encoding, base_encoding); - Parrot_register_encoding(interp, "utf16", return_encoding); - - return; -} /* diff -Nru parrot-2.7.0/src/string/encoding/utf16.h parrot-2.8.0/src/string/encoding/utf16.h --- parrot-2.7.0/src/string/encoding/utf16.h 2010-04-23 10:42:11.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/utf16.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* utf16.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: utf16.h 45852 2010-04-21 10:06:00Z bacek $ - * Overview: - * This is the header for the utf16 variable-width encoding. - * Data Structure and Algorithms: - * History: - * Notes: - * References: - */ - -#ifndef PARROT_ENCODING_UTF16_H_GUARD -#define PARROT_ENCODING_UTF16_H_GUARD - -/* 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 */ - -#endif /* PARROT_ENCODING_UTF16_H_GUARD */ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/string/encoding/utf8.c parrot-2.8.0/src/string/encoding/utf8.c --- parrot-2.7.0/src/string/encoding/utf8.c 2010-04-30 14:50:44.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/utf8.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: utf8.c 46193 2010-04-30 08:53:15Z jimmy $ +$Id: utf8.c 49088 2010-09-17 17:51:12Z nwellnhof $ =head1 NAME @@ -20,110 +20,78 @@ #include "parrot/parrot.h" #include "../unicode.h" -#include "utf8.h" +#include "shared.h" -/* HEADERIZER HFILE: src/string/encoding/utf8.h */ +/* HEADERIZER HFILE: none */ /* 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)) +static UINTVAL utf8_decode(PARROT_INTERP, ARGIN(const utf8_t *ptr)) __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) +static void * utf8_encode(PARROT_INTERP, ARGIN(void *ptr), UINTVAL c) __attribute__nonnull__(1) __attribute__nonnull__(2); -PARROT_CANNOT_RETURN_NULL -static STRING * get_codepoints(PARROT_INTERP, - ARGIN(const STRING *src), - UINTVAL offset, - UINTVAL count) +static UINTVAL utf8_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), + ARGIN(const String_iter *i), + INTVAL offset) __attribute__nonnull__(1) - __attribute__nonnull__(2); - -static void iter_init(SHIM_INTERP, - ARGIN(const STRING *src), - ARGOUT(String_iter *iter)) __attribute__nonnull__(2) - __attribute__nonnull__(3) - FUNC_MODIFIES(*iter); + __attribute__nonnull__(3); -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); - -static UINTVAL utf8_decode_and_advance(PARROT_INTERP, +static UINTVAL utf8_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i)) __attribute__nonnull__(1) __attribute__nonnull__(2) + __attribute__nonnull__(3) FUNC_MODIFIES(*i); -PARROT_CANNOT_RETURN_NULL -static void * utf8_encode(PARROT_INTERP, ARGIN(void *ptr), UINTVAL c) - __attribute__nonnull__(1) - __attribute__nonnull__(2); - -static void utf8_encode_and_advance(PARROT_INTERP, +static void utf8_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *i), UINTVAL c) __attribute__nonnull__(1) __attribute__nonnull__(2) + __attribute__nonnull__(3) + FUNC_MODIFIES(*str) FUNC_MODIFIES(*i); -static void utf8_set_position(SHIM_INTERP, +static void utf8_iter_set_position(SHIM_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), UINTVAL pos) __attribute__nonnull__(2) + __attribute__nonnull__(3) FUNC_MODIFIES(*i); +static void utf8_iter_skip(SHIM_INTERP, + ARGIN(const STRING *str), + ARGMOD(String_iter *i), + INTVAL skip) + __attribute__nonnull__(2) + __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) @@ -133,54 +101,51 @@ 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_iter_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(src) \ - , PARROT_ASSERT_ARG(iter)) -#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_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)) -#define ASSERT_ARGS_utf8_decode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_utf8_encode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ , PARROT_ASSERT_ARG(ptr)) -#define ASSERT_ARGS_utf8_decode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_utf8_iter_get __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ , PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_utf8_encode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ +#define ASSERT_ARGS_utf8_iter_get_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ - , PARROT_ASSERT_ARG(ptr)) -#define ASSERT_ARGS_utf8_encode_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf8_iter_set_and_advance __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ PARROT_ASSERT_ARG(interp) \ + , PARROT_ASSERT_ARG(str) \ + , PARROT_ASSERT_ARG(i)) +#define ASSERT_ARGS_utf8_iter_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ + PARROT_ASSERT_ARG(str) \ , PARROT_ASSERT_ARG(i)) -#define ASSERT_ARGS_utf8_set_position __attribute__unused__ int _ASSERT_ARGS_CHECK = (\ - PARROT_ASSERT_ARG(i)) +#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 */ @@ -206,25 +171,96 @@ 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6 /* cjk etc. */ }; + /* -=item C +=item C -Returns the number of characters in the C bytes from C<*ptr>. +Converts the string C to this particular encoding. If C 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 + +Returns the number of characters in string C 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) { @@ -239,6 +275,53 @@ return characters; } + +/* + +=item C + +Returns the number of codepoints in string C. + +=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 + +Returns the codepoint in string C at position C. + +=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 @@ -283,6 +366,7 @@ return c; } + /* =item C @@ -320,6 +404,7 @@ return (utf8_t *)ptr + len; } + /* =item C @@ -344,6 +429,7 @@ return u8ptr; } + /* =item C @@ -373,21 +459,70 @@ return u8ptr; } + /* -=back +=item C -=head2 Iterator Functions +Get the character at C plus C. -=over 4 +=cut + +*/ + +static UINTVAL +utf8_iter_get(PARROT_INTERP, + ARGIN(const STRING *str), ARGIN(const String_iter *i), INTVAL offset) +{ + ASSERT_ARGS(utf8_iter_get) + const utf8_t *u8ptr = (utf8_t *)((char *)str->strstart + i->bytepos); + + if (offset > 0) { + u8ptr = (const utf8_t *)utf8_skip_forward(u8ptr, offset); + } + else if (offset < 0) { + u8ptr = (const utf8_t *)utf8_skip_backward(u8ptr, -offset); + } + + return utf8_decode(interp, u8ptr); +} + + +/* + +=item C + +Moves the string iterator C by C characters. =cut */ +static void +utf8_iter_skip(SHIM_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), INTVAL skip) +{ + ASSERT_ARGS(utf8_iter_skip) + const utf8_t *u8ptr = (utf8_t *)((char *)str->strstart + i->bytepos); + + if (skip > 0) { + u8ptr = (const utf8_t *)utf8_skip_forward(u8ptr, skip); + } + else if (skip < 0) { + u8ptr = (const utf8_t *)utf8_skip_backward(u8ptr, -skip); + } + + i->charpos += skip; + i->bytepos = (const char *)u8ptr - (const char *)str->strstart; +} + + /* -=item C +=item C The UTF-8 implementation of the string iterator's C function. @@ -397,10 +532,11 @@ */ static UINTVAL -utf8_decode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i)) +utf8_iter_get_and_advance(PARROT_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i)) { - ASSERT_ARGS(utf8_decode_and_advance) - const utf8_t *u8ptr = (utf8_t *)((char *)i->str->strstart + i->bytepos); + ASSERT_ARGS(utf8_iter_get_and_advance) + const utf8_t *u8ptr = (utf8_t *)((char *)str->strstart + i->bytepos); UINTVAL c = *u8ptr; if (UTF8_IS_START(c)) { @@ -408,13 +544,12 @@ c &= UTF8_START_MASK(len); i->bytepos += len; - for (--len; len; --len) { - ++u8ptr; + for (len--; len; len--) { + u8ptr++; if (!UTF8_IS_CONTINUATION(*u8ptr)) Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_MALFORMED_UTF8, "Malformed UTF-8 string\n"); - c = UTF8_ACCUMULATE(c, *u8ptr); } @@ -427,17 +562,18 @@ "Malformed UTF-8 string\n"); } else { - ++i->bytepos; + i->bytepos++; } - ++i->charpos; + i->charpos++; return c; } + /* -=item C +=item C The UTF-8 implementation of the string iterator's C function. @@ -447,23 +583,24 @@ */ static void -utf8_encode_and_advance(PARROT_INTERP, ARGMOD(String_iter *i), UINTVAL c) +utf8_iter_set_and_advance(PARROT_INTERP, + ARGMOD(STRING *str), ARGMOD(String_iter *i), UINTVAL c) { - ASSERT_ARGS(utf8_encode_and_advance) - const STRING * const s = i->str; - unsigned char * const pos = (unsigned char *)s->strstart + i->bytepos; + ASSERT_ARGS(utf8_iter_set_and_advance) + unsigned char * const pos = (unsigned char *)str->strstart + i->bytepos; unsigned char * const new_pos = (unsigned char *)utf8_encode(interp, pos, c); i->bytepos += (new_pos - pos); /* XXX possible buffer overrun exception? */ - PARROT_ASSERT(i->bytepos <= Buffer_buflen(s)); - ++i->charpos; + PARROT_ASSERT(i->bytepos <= Buffer_buflen(str)); + i->charpos++; } + /* -=item C +=item C The UTF-8 implementation of the string iterator's C function. @@ -473,365 +610,93 @@ */ static void -utf8_set_position(SHIM_INTERP, ARGMOD(String_iter *i), UINTVAL pos) +utf8_iter_set_position(SHIM_INTERP, + ARGIN(const STRING *str), ARGMOD(String_iter *i), UINTVAL pos) { - ASSERT_ARGS(utf8_set_position) - const utf8_t *u8ptr = (const utf8_t *)i->str->strstart; + ASSERT_ARGS(utf8_iter_set_position) + const utf8_t *u8ptr = (const utf8_t *)str->strstart; - /* start from last known charpos, if we can */ - if (i->charpos <= pos) { - const UINTVAL old_pos = pos; - pos -= i->charpos; - u8ptr += i->bytepos; - i->charpos = old_pos; + if (pos == 0) { + i->charpos = 0; + i->bytepos = 0; + return; } - else - i->charpos = pos; - - while (pos-- > 0) - u8ptr += UTF8SKIP(u8ptr); - - i->bytepos = (const char *)u8ptr - (const char *)i->str->strstart; -} - -/* - -=item C - -Converts the string C to this particular encoding. If C 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; - String_iter src_iter; - UINTVAL offs, 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; - - /* init iter before possilby changing encoding */ - ENCODING_ITER_INIT(interp, src, &src_iter); - 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]; + /* + * we know the byte offsets of three positions: start, current and end + * now find the shortest way to reach pos + */ + if (pos < i->charpos) { + if (pos <= (i->charpos >> 1)) { + /* go forward from start */ + u8ptr = (const utf8_t *)utf8_skip_forward(u8ptr, pos); + } + else { + /* go backward from current */ + u8ptr = (const utf8_t *)utf8_skip_backward(u8ptr + i->bytepos, i->charpos - pos); } - result->bufused = dest_len; } else { - dest_len = src_len; - dest_pos = 0; - for (offs = 0; offs < src_len; ++offs) { - const UINTVAL c = src_iter.get_and_advance(interp, &src_iter); - unsigned char *new_pos; - unsigned char *pos; - - if (dest_len - dest_pos < 6) { - UINTVAL need = (UINTVAL)((src->strlen - offs) * 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); + const UINTVAL len = str->strlen; + if (pos <= i->charpos + ((len - i->charpos) >> 1)) { + /* go forward from current */ + u8ptr = (const utf8_t *)utf8_skip_forward(u8ptr + i->bytepos, pos - i->charpos); + } + else { + /* go backward from end */ + u8ptr = (const utf8_t *)utf8_skip_backward(u8ptr + str->bufused, len - pos); } - result->bufused = dest_pos; - } - - return result; -} - -/* - -=item C - -Returns the codepoint in string C at position C. - -=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 - -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 - -Returns the byte in string C at position C. - -=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 - -Sets, in string C at position C, the byte C. - -=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; + i->charpos = pos; + i->bytepos = (const char *)u8ptr - (const char *)str->strstart; } -/* - -=item C - -Returns the codepoints in string C at position C and length -C. - -=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; - - iter_init(interp, src, &iter); - - if (offset) - iter.set_position(interp, &iter, offset); - - start = iter.bytepos; - return_string->strstart = (char *)return_string->strstart + start; - - if (count) - iter.set_position(interp, &iter, offset + count); - - return_string->bufused = iter.bytepos - start; - return_string->strlen = count; - return_string->hashval = 0; - - return return_string; -} - -/* - -=item C - -Returns the bytes in string C at position C and length C. - -=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 - -Returns the number of codepoints in string C. - -=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 - */ - iter_init(interp, src, &iter); - while (iter.bytepos < src->bufused) - iter.get_and_advance(interp, &iter); - return iter.charpos; -} - -/* - -=item C - -Returns the number of bytes in string C. - -=cut - -*/ - -PARROT_PURE_FUNCTION -static UINTVAL -bytes(SHIM_INTERP, ARGIN(const STRING *src)) -{ - ASSERT_ARGS(bytes) - return src->bufused; -} - -/* - -=item C - -Initializes for string C the string iterator C. - -=cut - -*/ - -static void -iter_init(SHIM_INTERP, ARGIN(const STRING *src), ARGOUT(String_iter *iter)) -{ - ASSERT_ARGS(iter_init) - iter->str = src; - iter->bytepos = 0; - iter->charpos = 0; - iter->get_and_advance = utf8_decode_and_advance; - iter->set_and_advance = utf8_encode_and_advance; - iter->set_position = utf8_set_position; -} - -/* - -=item C - -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, - iter_init, - find_cclass, - NULL - }; - 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; -} /* diff -Nru parrot-2.7.0/src/string/encoding/utf8.h parrot-2.8.0/src/string/encoding/utf8.h --- parrot-2.7.0/src/string/encoding/utf8.h 2010-04-23 10:42:11.000000000 +0000 +++ parrot-2.8.0/src/string/encoding/utf8.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* utf8.h - * Copyright (C) 2004-2007, Parrot Foundation. - * SVN Info - * $Id: utf8.h 45852 2010-04-21 10:06:00Z bacek $ - * Overview: - * This is the header for the utf8 variable-width encoding. - * Data Structure and Algorithms: - * History: - * Notes: - * References: - */ - -#ifndef PARROT_ENCODING_UTF8_H_GUARD -#define PARROT_ENCODING_UTF8_H_GUARD - -/* 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 */ - -#endif /* PARROT_ENCODING_UTF8_H_GUARD */ - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ diff -Nru parrot-2.7.0/src/string/encoding.c parrot-2.8.0/src/string/encoding.c --- parrot-2.7.0/src/string/encoding.c 2010-05-27 01:53:09.000000000 +0000 +++ parrot-2.8.0/src/string/encoding.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2004-2010, Parrot Foundation. -$Id: encoding.c 46998 2010-05-25 22:43:21Z darbelo $ +$Id: encoding.c 49003 2010-09-14 19:11:35Z nwellnhof $ =head1 NAME @@ -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 +=item C 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 +=item C -Allocates the memory for a new C 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 Finds an encoding with the name C. 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 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 (Parrot_str_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 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 Returns the encoding given by the INTVAL index C. @@ -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 - -Registers a new character encoding C with the given name -C. 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; } /* @@ -339,7 +290,7 @@ =item C Helper function for initializing characterset encoding names. We can't create -the STRING names until the default encodings and charsets are already initted, +the STRING names until the default encodings are already initted, so the name generation is split into a second init stage. =cut @@ -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 +=item C Registers a character encoding C with name C. Only allows one of 5 possibilities: fixed_8, utf8, utf16, ucs2 and ucs4. @@ -371,46 +323,65 @@ 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 + +Creates the initial encodings. + +=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 +*encodingname, STR_VTABLE *encoding)> Sets the default encoding to C with name C. @@ -421,7 +392,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 +401,7 @@ /* -=item C +=item C Gets the default encoding. @@ -442,39 +413,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 - -Finds a converter from encoding C to C. 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: diff -Nru parrot-2.7.0/src/string/primitives.c parrot-2.8.0/src/string/primitives.c --- parrot-2.7.0/src/string/primitives.c 2010-08-17 18:07:13.000000000 +0000 +++ parrot-2.8.0/src/string/primitives.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2006-2009, Parrot Foundation. -$Id: primitives.c 48550 2010-08-17 15:43:29Z petdance $ +$Id: primitives.c 48833 2010-09-07 22:58:38Z nwellnhof $ =head1 NAME @@ -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'; } diff -Nru parrot-2.7.0/src/sub.c parrot-2.8.0/src/sub.c --- parrot-2.7.0/src/sub.c 2010-08-15 00:39:33.000000000 +0000 +++ parrot-2.8.0/src/sub.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: sub.c 48412 2010-08-11 05:38:18Z plobsing $ +$Id: sub.c 48923 2010-09-10 23:34:18Z plobsing $ =head1 NAME @@ -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 */ diff -Nru parrot-2.7.0/src/thread.c parrot-2.8.0/src/thread.c --- parrot-2.7.0/src/thread.c 2010-08-06 11:23:30.000000000 +0000 +++ parrot-2.8.0/src/thread.c 2010-09-21 07:48:51.000000000 +0000 @@ -1,6 +1,6 @@ /* Copyright (C) 2001-2010, Parrot Foundation. -$Id: thread.c 48241 2010-07-31 18:43:43Z NotFound $ +$Id: thread.c 48819 2010-09-07 04:48:09Z plobsing $ =head1 NAME @@ -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); } /* diff -Nru parrot-2.7.0/src/vtable.tbl parrot-2.8.0/src/vtable.tbl --- parrot-2.7.0/src/vtable.tbl 2010-07-24 11:07:45.000000000 +0000 +++ parrot-2.8.0/src/vtable.tbl 2010-09-21 07:48:51.000000000 +0000 @@ -1,4 +1,4 @@ -# $Id: vtable.tbl 48087 2010-07-14 21:54:57Z NotFound $ +# $Id: vtable.tbl 49012 2010-09-15 05:33:20Z luben $ # [MAIN] #default section name # MMD_EQ ... MMD_STRCMP must be in one block @@ -192,16 +192,6 @@ INTVAL cmp_string(PMC* value) PMC* cmp_pmc(PMC* value) -PMC* logical_or(PMC* value, PMC* dest) - -PMC* logical_and(PMC* value, PMC* dest) - -PMC* logical_xor(PMC* value, PMC* dest) - -PMC* logical_not(PMC* dest) -void i_logical_not() :write - - [STRING] PMC* concatenate(PMC* value, PMC* dest) PMC* concatenate_str(STRING* value, PMC* dest) diff -Nru parrot-2.7.0/t/codingstd/c_macro_args.t parrot-2.8.0/t/codingstd/c_macro_args.t --- parrot-2.7.0/t/codingstd/c_macro_args.t 2010-02-27 14:42:01.000000000 +0000 +++ parrot-2.8.0/t/codingstd/c_macro_args.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2008-2010, Parrot Foundation. -# $Id: c_macro_args.t 44326 2010-02-22 22:32:10Z mikehh $ +# $Id: c_macro_args.t 49188 2010-09-20 21:56:06Z mikehh $ use strict; use warnings; @@ -60,6 +60,9 @@ if ($definition ne "") { foreach my $arg (split /\s*,\s*/, $args) { + # skip args that are code blocks + next if $arg eq '_code'; + # eliminate any properly formed usage of the macro arg $definition =~ s/\Q($arg)//g; $definition =~ s/\Q[$arg]//g; diff -Nru parrot-2.7.0/t/codingstd/c_operator.t parrot-2.8.0/t/codingstd/c_operator.t --- parrot-2.7.0/t/codingstd/c_operator.t 2009-02-17 21:01:44.000000000 +0000 +++ parrot-2.8.0/t/codingstd/c_operator.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2006-2009, Parrot Foundation. -# $Id: c_operator.t 36833 2009-02-17 20:09:26Z allison $ +# $Id: c_operator.t 48722 2010-08-30 01:06:50Z jkeenan $ use strict; use warnings; @@ -75,25 +75,37 @@ $buf = strip_pod($buf); } - # strip ', ", and C comments + # strip ', ", and C comments #' $buf =~ s{ (?: - (?: (') (?: \\\\ | \\' | [^'] )* (') ) # remove ' string - | (?: (") (?: \\\\ | \\" | [^"] )* (") ) # remove " string - | /(\*) .*? (\*)/ # remove C comment + (?: (') (?: \\\\ | \\' | [^'] )* (') ) # rm ' string #' + | (?: (") (?: \\\\ | \\" | [^"] )* (") ) # rm " string #" + | /(\*) .*? (\*)/ # rm C comment ) }{defined $1 ? "$1$2" : defined $3 ? "$3$4" : "$5$6"}egsx; my @lines = split( /\n/, $buf ); - for my $line (@lines) { + $comma_space{$path} = []; + for (my $i=0; $i <= $#lines; $i++) { # after a comma there should be one space or a newline - if ( $line =~ m{ ( (?:,) (?! \s ) (?= .+) ) }gx ) { - $comma_space{$path} = undef; + if ( $lines[$i] =~ m{ ( (?:,) (?! \s ) (?= .+) ) }gx ) { + push @{ $comma_space{$path} }, $lines[$i]; } } } ## L/ - is( join("\n", keys %comma_space), "", "there should be one space or a newline after a comma" ); + my @comma_space_files; + for my $path ( sort keys %comma_space ) { + if (my $cnt = scalar @{ $comma_space{$path} }) { + push @comma_space_files, <<"END_ERROR"; +$path [$cnt line@{[ ($cnt >1) ? 's': '' ]}] at : +@{[ join("\n--\n", @{$comma_space{$path}}) ]} +END_ERROR + } + } + is(join("\n",@comma_space_files), + "", + "there should be one space or a newline after a comma"); } # Local Variables: diff -Nru parrot-2.7.0/t/codingstd/c_todo.t parrot-2.8.0/t/codingstd/c_todo.t --- parrot-2.7.0/t/codingstd/c_todo.t 2009-03-25 08:29:52.000000000 +0000 +++ parrot-2.8.0/t/codingstd/c_todo.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2006-2009, Parrot Foundation. -# $Id: c_todo.t 37688 2009-03-24 20:55:58Z coke $ +# $Id: c_todo.t 48723 2010-08-30 01:07:21Z jkeenan $ use strict; use warnings; @@ -60,7 +60,7 @@ my $num_failed_files = scalar keys %failed_files; TODO: { - local $TODO = 'some todos remain'; + local $TODO = scalar(@fixme) . ' todos remain'; ok( !scalar(@fixme), 'FIXME strings' ) or diag( "FIXME strings found in " diff -Nru parrot-2.7.0/t/codingstd/perlcritic.t parrot-2.8.0/t/codingstd/perlcritic.t --- parrot-2.7.0/t/codingstd/perlcritic.t 2010-05-24 21:14:30.000000000 +0000 +++ parrot-2.8.0/t/codingstd/perlcritic.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2008-2010, Parrot Foundation. -# $Id: perlcritic.t 46922 2010-05-23 21:38:28Z bacek $ +# $Id: perlcritic.t 48706 2010-08-28 02:39:25Z jkeenan $ =head1 NAME @@ -22,7 +22,7 @@ violations. This test uses a standard perlcriticrc file, located in -F +F If you wish to run a specific policy, the easiest way to do so is to temporarily add a custom theme to the configuration file and then specify @@ -62,7 +62,7 @@ 'theme=s' => \$theme ); -my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools util perlcritic.conf} ); +my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools dev perlcritic.conf} ); Test::Perl::Critic->import( -profile => $config, diff -Nru parrot-2.7.0/t/codingstd/pmc_docs.t parrot-2.8.0/t/codingstd/pmc_docs.t --- parrot-2.7.0/t/codingstd/pmc_docs.t 2010-08-17 18:07:26.000000000 +0000 +++ parrot-2.8.0/t/codingstd/pmc_docs.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: pmc_docs.t 48537 2010-08-17 00:26:39Z mikehh $ +# $Id: pmc_docs.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ use strict; use warnings; diff -Nru parrot-2.7.0/t/compilers/imcc/syn/const.t parrot-2.8.0/t/compilers/imcc/syn/const.t --- parrot-2.7.0/t/compilers/imcc/syn/const.t 2010-06-11 08:06:10.000000000 +0000 +++ parrot-2.8.0/t/compilers/imcc/syn/const.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: const.t 47301 2010-06-02 13:21:07Z coke $ +# $Id: const.t 48766 2010-09-02 13:38:04Z nwellnhof $ use strict; use warnings; @@ -9,7 +9,7 @@ use Test::More; use Parrot::Config; -use Parrot::Test tests => 34; +use Parrot::Test tests => 35; pir_output_is( <<'CODE', <<'OUT', "globalconst 1" ); @@ -592,6 +592,17 @@ 12 OUT +pir_error_output_like( <<'CODE', <<'OUT', "" ); +.sub 'bus_error' + .local string hello + hello = "'Allo, 'allo, 'allo." + .const string hello = "Hello, Polly." + say hello +.end +CODE +/^error:imcc:syntax error, duplicated IDENTIFIER/ +OUT + # Local Variables: # mode: cperl # cperl-indent-level: 4 diff -Nru parrot-2.7.0/t/compilers/pct/pct_hllcompiler.t parrot-2.8.0/t/compilers/pct/pct_hllcompiler.t --- parrot-2.7.0/t/compilers/pct/pct_hllcompiler.t 2009-02-17 21:01:42.000000000 +0000 +++ parrot-2.8.0/t/compilers/pct/pct_hllcompiler.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,13 +1,13 @@ #!perl # Copyright (C) 2005-2006, Parrot Foundation. -# $Id: pct_hllcompiler.t 36833 2009-02-17 20:09:26Z allison $ +# $Id: pct_hllcompiler.t 48866 2010-09-08 19:26:52Z pmichaud $ use strict; 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 diff -Nru parrot-2.7.0/t/dynoplibs/debug.t parrot-2.8.0/t/dynoplibs/debug.t --- parrot-2.7.0/t/dynoplibs/debug.t 2010-05-28 05:23:43.000000000 +0000 +++ parrot-2.8.0/t/dynoplibs/debug.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2001-2007, Parrot Foundation. -# $Id: debug.t 47051 2010-05-27 08:45:23Z plobsing $ +# $Id: debug.t 48721 2010-08-30 01:04:08Z Paul C. Anagnostopoulos $ use strict; use warnings; @@ -106,7 +106,7 @@ called from Sub 'parrot;Test1;main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/ OUTPUT -pir_error_output_like( <<'CODE', <<'OUTPUT', "debug backtrace - fetch of unknown lexical" ); +pir_error_output_like( <<'CODE', <<'OUTPUT', "debug backtrace - division by 0" ); .namespace ["Test2"] .sub main print "ok 1\n" @@ -115,13 +115,14 @@ .end .sub foo :lex print "ok 2\n" - find_lex $P0, "nosuchlex" + $I1 = 0 + div $I2, $I2, 0 print "not ok 3\n" .end CODE /^ok 1 ok 2 -Lexical 'nosuchlex' not found +Divide by zero current instr.: 'parrot;Test2;foo' pc (\d+|-1) \(.*?:(\d+|-1)\) called from Sub 'parrot;Test2;main' pc (\d+|-1) \(.*?:(\d+|-1)\)$/ OUTPUT diff -Nru parrot-2.7.0/t/dynoplibs/sysinfo.t parrot-2.8.0/t/dynoplibs/sysinfo.t --- parrot-2.7.0/t/dynoplibs/sysinfo.t 2010-05-28 05:23:43.000000000 +0000 +++ parrot-2.8.0/t/dynoplibs/sysinfo.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2008-2010, Parrot Foundation. -# $Id: sysinfo.t 47051 2010-05-27 08:45:23Z plobsing $ +# $Id: sysinfo.t 48988 2010-09-14 05:35:08Z plobsing $ # initial work by Brad Gilbert b2gills gmail com @@ -11,7 +11,7 @@ use Test::More; use Config; -use Parrot::Test tests => 14; +use Parrot::Test tests => 15; use Parrot::Config; @@ -183,6 +183,23 @@ CODE } +pir_output_is(<<'CODE', < 5; -use Parrot::Config; - -=head1 NAME - -t/examples/japh.t - Test some JAPHs - -=head1 SYNOPSIS - - % prove t/examples/japh.t - -=head1 DESCRIPTION - -Test the JAPHs in 'examples/japh'. -For now there are only JAPHs in PASM. - -Some JAPH are not really suitable for inclusion in automated tests. - -=head1 TODO - -Get the TODO JAPHs working or decide that they are not suitable for testing. - -=cut - -# known reasons for failure -my %todo = (); -if ( defined( $ENV{TEST_PROG_ARGS}) && $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/ ) { - $todo{4} = 'broken with JIT'; -} - -# run all tests and tell about todoness -foreach ( 1..5 ) { - my $pasm_fn = "examples/japh/japh$_.pasm"; - unless ( -e $pasm_fn ) { - pass("deleted"); - next; - } - - my @todo = $todo{$_} ? ( todo => $todo{$_} ) : (); - example_output_is( $pasm_fn, "Just another Parrot Hacker\n", @todo ); -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/t/examples/pgegrep.t parrot-2.8.0/t/examples/pgegrep.t --- parrot-2.7.0/t/examples/pgegrep.t 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/examples/pgegrep.t 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,111 @@ +#! perl +# Copyright (C) 2009, Parrot Foundation. +# $Id: pgegrep.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=head1 NAME + +t/tools/pgegrep.t - test the script tools/utils/pgegrep + +=head1 SYNOPSIS + + % prove t/examples/tools/pgegrep.t + +=head1 DESCRIPTION + +Tests the features of of the C utility (see F). + +=cut + +use strict; +use warnings; +use lib qw( . lib ../lib ../../lib ); + +use Fatal qw{open close}; +use Test::More; +use Parrot::Test tests => 10; +use Parrot::Config; +use File::Spec (); + +my $testdata = File::Spec->catfile(qw{. t tools testdata }); +my $testdata_escaped = $testdata; +$testdata_escaped =~ s!\\!\\\\!g; + +sub pgegrep_output_like { + my ($options, $snippet, $desc) = @_; + + my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; + my $pgegrep = File::Spec->catfile( qw{. examples tools pgegrep} ); + my $out = `$PARROT $pgegrep $options`; + + like( $out, $snippet, $desc ); + + return; +} + +pgegrep_output_like( + '-V', + qr!\Qpgegrep v0.0.1\E!, + 'pge reports correct version' +); + +pgegrep_output_like( + "cat $testdata", + qr!keyboardcat!, + 'basic sanity of matching a literal' +); + +pgegrep_output_like( + "-n cat $testdata", + qr!1:keyboardcat!, + 'matching a literal with line number' +); + +pgegrep_output_like( + "--line-number cat $testdata", + qr!1:keyboardcat!, + 'matching a literal with line number with long option' +); + +pgegrep_output_like( + "-H cat $testdata", + qr!$testdata_escaped:keyboardcat!, + 'matching a literal with file name' +); + +pgegrep_output_like( + "--with-filename cat $testdata", + qr!$testdata_escaped:keyboardcat!, + 'matching a literal with file name with long option' +); + + +pgegrep_output_like( + "-v cat $testdata", + qr!saxophonegiraffe!, + 'test inversion of match' +); + +pgegrep_output_like( + "--invert-match cat $testdata", + qr!saxophonegiraffe!, + 'test inversion of match with long option' +); + +pgegrep_output_like( + "-l cat $testdata", + qr!$testdata_escaped!, + 'find files that match' +); + +pgegrep_output_like( + "--files-with-matches cat $testdata", + qr!$testdata_escaped!, + 'find files that match with long option' +); + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/t/harness.pir parrot-2.8.0/t/harness.pir --- parrot-2.7.0/t/harness.pir 2010-05-28 05:23:44.000000000 +0000 +++ parrot-2.8.0/t/harness.pir 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #!parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: harness.pir 47054 2010-05-27 13:47:20Z fperrad $ +# $Id: harness.pir 49036 2010-09-16 08:18:24Z fperrad $ .sub 'main' :main .param pmc argv @@ -353,7 +353,7 @@ push contents, 'username' push contents, 'parrot-autobot' push contents, 'password' - push contents, 'squ@wk' + push contents, 'qa_rocks' push contents, 'comments' push contents, "EXPERIMENTAL t/harness.pir with LWP.pir" push contents, 'report_file' @@ -362,7 +362,7 @@ $P0[0] = 'parrot_test_run.tar.gz' push contents, $P0 load_bytecode 'LWP/UserAgent.pir' - .const string url = 'http://smolder.plusthree.com/app/projects/process_add_report/8' + .const string url = 'http://smolder.parrot.org/app/projects/process_add_report/1' .local pmc ua, response ua = new ['LWP';'UserAgent'] ua.'env_proxy'() diff -Nru parrot-2.7.0/t/library/archive_zip.t parrot-2.8.0/t/library/archive_zip.t --- parrot-2.7.0/t/library/archive_zip.t 2010-05-11 00:29:07.000000000 +0000 +++ parrot-2.8.0/t/library/archive_zip.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: archive_zip.t 46339 2010-05-06 12:05:46Z fperrad $ +# $Id: archive_zip.t 49066 2010-09-16 18:29:40Z fperrad $ =head1 NAME @@ -18,12 +18,23 @@ .sub 'main' :main .include 'test_more.pir' + .include 'iglobals.pasm' + .local pmc config_hash, interp - load_bytecode 'Archive/Zip.pir' + interp = getinterp + config_hash = interp[.IGLOBALS_CONFIG_HASH] + $S0 = config_hash['has_zlib'] + unless $S0 goto no_zlib plan(14) + load_bytecode 'Archive/Zip.pir' test_new() test_pack() + .return() + + no_zlib: + skip_all('No zlib library available') + .return() .end .sub 'test_new' diff -Nru parrot-2.7.0/t/library/osutils.t parrot-2.8.0/t/library/osutils.t --- parrot-2.7.0/t/library/osutils.t 2010-05-30 21:14:08.000000000 +0000 +++ parrot-2.8.0/t/library/osutils.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: osutils.t 47083 2010-05-28 07:33:24Z fperrad $ +# $Id: osutils.t 49084 2010-09-17 15:19:32Z fperrad $ =head1 NAME @@ -21,12 +21,13 @@ load_bytecode 'osutils.pir' - plan(17) + plan(19) test_basename() test_dirname() test_catfile() test_splitpath() test_newer() + test_rindex() .end .sub 'test_basename' @@ -80,6 +81,13 @@ nok($I0, "newer('osutils.pir', ['osutils.pir', 'stat.pasm'])") .end +.sub 'test_rindex' + $I0 = rindex('abc', '.') + is($I0, -1, "rindex('abc', '.')") + $I0 = rindex('abc.def.ghi', '.') + is($I0, 7, "rindex('abc.def.ghi', '.')") +.end + # Local Variables: # mode: pir Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/annotations.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/annotations.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/integer_4.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/integer_4.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/integer.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/integer.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/number_4.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/number_4.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/number.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/number.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/string_4.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/string_4.pbc differ Binary files /tmp/SBroFkkKI1/parrot-2.7.0/t/native_pbc/string.pbc and /tmp/hzn2lX1wTt/parrot-2.8.0/t/native_pbc/string.pbc differ diff -Nru parrot-2.7.0/t/native_pbc/testdata/annotations.pir parrot-2.8.0/t/native_pbc/testdata/annotations.pir --- parrot-2.7.0/t/native_pbc/testdata/annotations.pir 2009-04-18 07:07:59.000000000 +0000 +++ parrot-2.8.0/t/native_pbc/testdata/annotations.pir 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -# Copyright (C) 2009, Parrot Foundation. -# $Id: annotations.pir 38183 2009-04-17 21:58:24Z bacek $ - -.sub 'main' -.annotate "file", "annotations.pir" -.annotate "creator", "Parrot Foundation" -.annotate "line", 1 - say "Hi" - say "line" -.annotate "line", 2 - .return () -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/oo/isa.t parrot-2.8.0/t/oo/isa.t --- parrot-2.7.0/t/oo/isa.t 2010-04-25 21:00:05.000000000 +0000 +++ parrot-2.8.0/t/oo/isa.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2007-2008, Parrot Foundation. -# $Id: isa.t 46007 2010-04-25 11:44:15Z fperrad $ +# $Id: isa.t 48683 2010-08-27 04:04:00Z cotto $ =head1 NAME @@ -20,7 +20,7 @@ .sub main :main .include 'test_more.pir' - plan(29) + plan(30) isa_by_string_name() isa_by_class_object() @@ -28,6 +28,7 @@ subclass_isa_by_class_object() string_isa_and_pmc_isa_have_same_result() string_register_and_string_pmc_isa_have_same_result() + isa_accepts_rsa() .end @@ -181,6 +182,14 @@ ok( $I0, '... and false when it is not' ) .end +.sub isa_accepts_rsa + $P0 = newclass ['Foo';'Buz'] + $P1 = new $P0 + $P0 = split "::", "Foo::Buz" + $I0 = isa $P1, $P0 + ok($I0, "isa accepts a ResizablePMCArray") + .end + .HLL 'foo' .namespace ['XYZ'] diff -Nru parrot-2.7.0/t/oo/objects.t parrot-2.8.0/t/oo/objects.t --- parrot-2.7.0/t/oo/objects.t 2010-08-15 00:39:37.000000000 +0000 +++ parrot-2.8.0/t/oo/objects.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: objects.t 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: objects.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME @@ -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 " "' ) diff -Nru parrot-2.7.0/t/oo/root_new.t parrot-2.8.0/t/oo/root_new.t --- parrot-2.7.0/t/oo/root_new.t 2010-08-15 00:39:37.000000000 +0000 +++ parrot-2.8.0/t/oo/root_new.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2007-2010, Parrot Foundation. -# $Id: root_new.t 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: root_new.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/t/op/calling.t parrot-2.8.0/t/op/calling.t --- parrot-2.7.0/t/op/calling.t 2010-08-15 00:39:41.000000000 +0000 +++ parrot-2.8.0/t/op/calling.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: calling.t 48454 2010-08-13 15:42:51Z fperrad $ +# $Id: calling.t 48874 2010-09-09 00:54:54Z coke $ use strict; use warnings; @@ -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" ); diff -Nru parrot-2.7.0/t/op/exceptions.t parrot-2.8.0/t/op/exceptions.t --- parrot-2.7.0/t/op/exceptions.t 2010-03-31 12:02:45.000000000 +0000 +++ parrot-2.8.0/t/op/exceptions.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: exceptions.t 45297 2010-03-30 01:33:45Z coke $ +# $Id: exceptions.t 48815 2010-09-06 20:21:36Z plobsing $ use strict; use warnings; @@ -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" ); diff -Nru parrot-2.7.0/t/op/gc-active-buffers.t parrot-2.8.0/t/op/gc-active-buffers.t --- parrot-2.7.0/t/op/gc-active-buffers.t 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/op/gc-active-buffers.t 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,62 @@ +#!./parrot +# Copyright (C) 2010, Parrot Foundation. +# $Id: gc-active-buffers.t 48625 2010-08-24 14:30:24Z mikehh $ + +=head1 NAME + +t/op/gc-active-buffers.t - Test that buffers are freed as soon as possible + +=head1 SYNOPSIS + + % prove t/op/gc-active-buffers.t + +=head1 DESCRIPTION + +Tests that unused buffers (strings) are freed in the first GC run. See +TT1603 - http://trac.parrot.org/parrot/ticket/1603 + +=cut + +.include 'interpinfo.pasm' + +.sub _main :main + .include 'test_more.pir' + + plan(1) + + sweep 1 + $I0 = interpinfo .INTERPINFO_ACTIVE_BUFFERS + + .local int count + count= 1000 + loop: + unless count goto done + + # original test form TT1603 + $P0 = new 'CodeString' + $P0.'emit'("a") + $S0 = $P0 + + # another way to trigger the problem + $S1 = "abc" + $S2 = substr $S1, 0, 1 + + dec count + goto loop + done: + + sweep 1 + $I1 = interpinfo .INTERPINFO_ACTIVE_BUFFERS + + $I2 = $I1 - $I0 + $S0 = $I2 + $S0 .= " additional active buffers (which should be <= 100)" + $I3 = isle $I2, 100 + ok($I3, $S0) + .end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/op/gc-leaky-box.t parrot-2.8.0/t/op/gc-leaky-box.t --- parrot-2.7.0/t/op/gc-leaky-box.t 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/op/gc-leaky-box.t 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,77 @@ +#!./parrot +# Copyright (C) 2010, Parrot Foundation. +# $Id: gc-leaky-box.t 48679 2010-08-26 23:00:30Z nwellnhof $ + +=head1 NAME + +t/op/gc-leaky-box.t - test for memory leaks in the Garbage Collector + +=head1 SYNOPSIS + + % prove t/op/gc-leaky-box.t + +=head1 DESCRIPTION + +Tests that we actually do a GC mark and sweep after a large number of PMC's have +been created. Test suggested by chromatic++ . Also includes tests for +TT1465 - http://trac.parrot.org/parrot/ticket/1465 . + +=cut + +# 20:57 For every million PMCs allocated, see that the GC has performed a mark/sweep. + +.include 'interpinfo.pasm' + +.sub _main :main + .include 'test_more.pir' + + plan(3) + + $S0 = interpinfo .INTERPINFO_GC_SYS_NAME + if $S0 == "inf" goto dont_run_hanging_tests + + test_gc_mark_sweep() + + goto test_end + dont_run_hanging_tests: + ok(1, "#TODO - Test disabled on gc_inf") + ok(1, "#TODO - Test disabled on gc_inf") + ok(1, "#TODO - Test disabled on gc_inf") + test_end: +.end + +.sub test_gc_mark_sweep + .local int counter + + counter = 0 + loop: + $P0 = box 0 + inc counter + if counter < 2e6 goto loop + + $I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS + $I2 = interpinfo.INTERPINFO_GC_MARK_RUNS + $I3 = interpinfo.INTERPINFO_TOTAL_MEM_ALLOC + + $S1 = $I1 + $S0 = "performed " . $S1 + $S0 .= " (which should be >=1) GC collect runs" + ok($I1,$S0) + + $S1 = $I2 + $S0 = "performed " . $S1 + $S0 .= " (which should be >=1) GC mark runs" + ok($I2,$S0) + + $S1 = $I3 + $S0 = "allocated " . $S1 + $S0 .= " (which should be <= 2_000_000) bytes of memory" + $I4 = isle $I3, 2000000 + ok($I4,$S0) +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/op/gc-leaky-call.t parrot-2.8.0/t/op/gc-leaky-call.t --- parrot-2.7.0/t/op/gc-leaky-call.t 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/op/gc-leaky-call.t 2010-09-21 07:48:56.000000000 +0000 @@ -0,0 +1,77 @@ +#!./parrot +# Copyright (C) 2010, Parrot Foundation. +# $Id: gc-leaky-call.t 48679 2010-08-26 23:00:30Z nwellnhof $ + +=head1 NAME + +t/op/gc-leaky-call.t - test for memory leaks in the Garbage Collector + +=head1 SYNOPSIS + + % prove t/op/gc-leaky-call.t + +=head1 DESCRIPTION + +Tests that we actually do a GC mark and sweep after a large number of +function calls. + +=cut + +.include 'interpinfo.pasm' + +.sub _main :main + .include 'test_more.pir' + + plan(3) + + $S0 = interpinfo .INTERPINFO_GC_SYS_NAME + if $S0 == "inf" goto dont_run_hanging_tests + + test_gc_mark_sweep() + + goto test_end + dont_run_hanging_tests: + ok(1, "#TODO - Test disabled on gc_inf") + ok(1, "#TODO - Test disabled on gc_inf") + ok(1, "#TODO - Test disabled on gc_inf") + test_end: +.end + +.sub test_gc_mark_sweep + .local int counter + + counter = 0 + loop: + consume() + inc counter + if counter < 1e6 goto loop + + $I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS + $I2 = interpinfo.INTERPINFO_GC_MARK_RUNS + $I3 = interpinfo.INTERPINFO_TOTAL_MEM_ALLOC + + $S1 = $I1 + $S0 = "performed " . $S1 + $S0 .= " (which should be >=1) GC collect runs" + ok($I1,$S0) + + $S1 = $I2 + $S0 = "performed " . $S1 + $S0 .= " (which should be >=1) GC mark runs" + ok($I2,$S0) + + $S1 = $I3 + $S0 = "allocated " . $S1 + $S0 .= " (which should be <= 2_000_000) bytes of memory" + $I4 = isle $I3, 2000000 + ok($I4,$S0) +.end + +.sub consume +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/op/gc-leaky.t parrot-2.8.0/t/op/gc-leaky.t --- parrot-2.7.0/t/op/gc-leaky.t 2010-04-25 21:00:06.000000000 +0000 +++ parrot-2.8.0/t/op/gc-leaky.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,73 +0,0 @@ -#!./parrot -# Copyright (C) 2010, Parrot Foundation. -# $Id: gc-leaky.t 45945 2010-04-23 20:46:46Z fperrad $ - -=head1 NAME - -t/op/gc-leaky.t - test for memory leaks in the Garbage Collector - -=head1 SYNOPSIS - - % prove t/op/gc-leaky.t - -=head1 DESCRIPTION - -Tests that we actually do a GC mark and sweep after a large number of PMC's have -been created. Test suggested by chromatic++ . More tests are needed to close -TT1465 - http://trac.parrot.org/parrot/ticket/1465 . - -=cut - -# 20:57 For every million PMCs allocated, see that the GC has performed a mark/sweep. - -.include 'interpinfo.pasm' - -.sub _main :main - .include 'test_more.pir' - - plan(2) - - $S0 = interpinfo .INTERPINFO_GC_SYS_NAME - if $S0 == "inf" goto dont_run_hanging_tests - - test_gc_mark_sweep() - - goto test_end - dont_run_hanging_tests: - ok(1, "#TODO - Test disabled on gc_inf") - ok(1, "#TODO - Test disabled on gc_inf") - test_end: -.end - -.sub test_gc_mark_sweep - .local int counter - counter = 0 - loop: - $P0 = box 0 - inc counter - if counter > 1e6 goto done - goto loop - done: - diag("") - $I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS - $I2 = interpinfo.INTERPINFO_GC_MARK_RUNS - - $I3 = isge $I1, 1 - $I4 = isge $I2, 1 - - $S1 = $I1 - $S0 = "performed " . $S1 - $S0 .= " (which should be >=1) GC collect runs" - ok($I2,$S0) - - $S1 = $I2 - $S0 = "performed " . $S1 - $S0 .= " (which should be >=1) GC mark runs" - ok($I2,$S0) -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/op/integer.t parrot-2.8.0/t/op/integer.t --- parrot-2.7.0/t/op/integer.t 2010-08-06 11:23:32.000000000 +0000 +++ parrot-2.8.0/t/op/integer.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: integer.t 48214 2010-07-29 17:21:09Z NotFound $ +# $Id: integer.t 48986 2010-09-14 04:30:56Z plobsing $ =head1 NAME @@ -16,7 +16,7 @@ =cut -.const int TESTS = 152 +.const int TESTS = 153 .sub 'test' :main .include 'test_more.pir' @@ -48,6 +48,7 @@ test_sub_i_i() test_set_n() test_neg() + test_negate_max_integer() test_mul_i_i() test_null() test_div_i_i_by_zero() @@ -745,6 +746,37 @@ is($I0, -3, 'neg_i') .end +# Test to ensure that the negative of the maximum integer is equal to the +# minimum integer + 1. This should be true because we are assuming a +# two's-complement machine. + +.include 'iglobals.pasm' +.sub test_negate_max_integer + .local int max, min + + $P0 = getinterp + $P1 = $P0[.IGLOBALS_CONFIG_HASH] + $I0 = $P1['intvalsize'] + + # XXX can't use sysinfo (from sys_ops) in coretest + # build up 2's compliment min and max integers manually + max = 0x7F + min = 0x80 + dec $I0 + loop: + unless $I0 goto end_loop + min <<= 8 + max <<= 8 + max |= 0xFF + dec $I0 + goto loop + end_loop: + + neg max + inc min + is(max, min) +.end + .sub 'test_mul_i_i' $I0 = 3 $I1 = 4 diff -Nru parrot-2.7.0/t/op/lexicals.t parrot-2.8.0/t/op/lexicals.t --- parrot-2.7.0/t/op/lexicals.t 2010-05-11 00:29:07.000000000 +0000 +++ parrot-2.8.0/t/op/lexicals.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: lexicals.t 46450 2010-05-10 01:14:23Z plobsing $ +# $Id: lexicals.t 48721 2010-08-30 01:04:08Z Paul C. Anagnostopoulos $ use strict; use warnings; @@ -840,7 +840,7 @@ /Null PMC access/ OUT -pir_error_output_like( <<'CODE', <<'OUTPUT', 'get non existing' ); +pir_output_is( <<'CODE', <<'OUTPUT', 'get undefined lexical' ); .sub "main" :main .lex 'a', $P0 foo() @@ -852,9 +852,14 @@ .sub bar :outer('foo') .lex 'c', $P0 $P2 = find_lex 'no_such' + if null $P2 goto ok + print "Undefined name not NULL\n" + end +ok: + print "ok\n" .end CODE -/Lexical 'no_such' not found/ +ok OUTPUT pir_output_is( <<'CODE', <<'OUTPUT', 'find_name on lexicals' ); diff -Nru parrot-2.7.0/t/op/string_cs.t parrot-2.8.0/t/op/string_cs.t --- parrot-2.7.0/t/op/string_cs.t 2010-06-11 08:06:11.000000000 +0000 +++ parrot-2.8.0/t/op/string_cs.t 2010-09-21 07:48:56.000000000 +0000 @@ -1,12 +1,12 @@ #!perl # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: string_cs.t 47393 2010-06-05 22:08:15Z bacek $ +# $Id: string_cs.t 49075 2010-09-17 02:19:08Z nwellnhof $ use strict; use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 47; +use Parrot::Test tests => 50; use Parrot::Config; =head1 NAME @@ -19,7 +19,7 @@ =head1 DESCRIPTION -Tests charset support. +Tests encoding support. =cut @@ -37,10 +37,10 @@ ok 3 OUTPUT -pasm_output_is( <<'CODE', < '.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" ); diff -Nru parrot-2.7.0/t/pmc/exception.t parrot-2.8.0/t/pmc/exception.t --- parrot-2.7.0/t/pmc/exception.t 2010-06-23 10:46:15.000000000 +0000 +++ parrot-2.8.0/t/pmc/exception.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: exception.t 47743 2010-06-21 18:37:47Z NotFound $ +# $Id: exception.t 48770 2010-09-03 06:22:34Z NotFound $ =head1 NAME @@ -16,42 +16,137 @@ =cut +.include 'except_types.pasm' + .sub main :main .include 'test_more.pir' - plan(20) + plan(43) test_bool() test_int() + test_integer_keyed() + test_string_keyed() test_attrs() test_attributes() + test_setattribute_wrong() + test_birthtime() + test_handler_ctx() test_push_pop_eh() test_push_pop_eh_long() test_push_eh_throw() test_die() test_throw_obj() + test_clone() + test_throw_clone() + test_backtrace() + test_annotations() .end .sub test_bool - $P0 = new 'ExceptionHandler' - set_addr $P0, _handler - ok($P0,'ExceptionHandler object return true') $P1 = new 'Exception' ok($P1,'Exception object return true') - .return() - _handler: - say "howdy bool!" .end .sub test_int - $P0 = new 'ExceptionHandler' - set_addr $P0, _handler - push_eh $P0 + $P0 = new 'Exception' + $P0 = 42 $I0 = $P0 - ok(1,'get_integer on ExceptionHandler ') - .return() - _handler: - say "howdy int!" + is($I0, 42, 'set/get integer on Exception') +.end + +.sub test_integer_keyed + .local pmc ex, eh + .local int value + ex = new ['Exception'] + + value = ex['type'] + is(value, 0, 'get type default value') + ex['type'] = .EXCEPTION_SYNTAX_ERROR + value = ex['type'] + is(value, .EXCEPTION_SYNTAX_ERROR, 'get type value changed') + + value = ex['exit_code'] + is(value, 0, 'get exit_code default value') + ex['exit_code'] = 127 + value = ex['exit_code'] + is(value, 127, 'get exit_code value changed') + + value = ex['handled'] + is(value, 0, 'get handled default is false') + ex['handled'] = 1 + value = ex['handled'] + is(value, 1, 'get handled value changed') + + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_ATTRIB_NOT_FOUND) + set_label eh, catch + push_eh eh + value = 1 + ex['the droids you are looking for'] = 42 + value = 0 + catch: + finalize eh + is(value, 1, 'set invalid key throws') + + set_label eh, catch2 + value = 1 + value = ex['the droids you are looking for'] + value = 0 + catch2: + finalize eh + is(value, 1, 'get invalid key throws') +.end + +.sub test_string_keyed + .local pmc ex, eh + .local string value + .const string TEST_VALUE = 'fubar' + ex = new ['Exception'] + ex['message'] = TEST_VALUE + value = ex['message'] + is(value, TEST_VALUE, 'set/get string_keyed') +.end + + +.sub setattr_int + .param pmc obj + .param string attrname + .param int value + $P0 = new ['Integer'], value + setattribute obj, attrname, $P0 +.end + +.sub setattr_string + .param pmc obj + .param string attrname + .param string value + $P0 = new ['String'] + $P0 = value + setattribute obj, attrname, $P0 +.end + +.sub gotattr_int + .param pmc obj + .param string attrname + .param int checkvalue + + $S0 = 'got ' . attrname + $P1 = getattribute obj, attrname + $I1 = $P1 + is($I1, checkvalue, $S0) .end +.sub gotattr_string + .param pmc obj + .param string attrname + .param string checkvalue + + $S0 = 'got ' . attrname + $P1 = getattribute obj, attrname + $S1 = $P1 + is($S1, checkvalue, $S0) +.end + + .sub test_attrs $P0 = new 'ExceptionHandler' set_addr $P0, _handler @@ -68,53 +163,114 @@ getattribute $P4, $P0, 'severity' ok(1,'got severity') - push_eh done + push_eh catch $I0 = 1 getattribute $P5, $P0, 'foo' $I0 = 0 + goto done + catch: + .get_results($P0) + finalize $P0 done: ok($I0, "Can't fetch non-existent attribute") .end .sub test_attributes - push_eh handler $P1 = new ['Exception'] - $P2 = new ['String'] - $P2 = "just pining" - setattribute $P1, 'message', $P2 - $P3 = new ['Integer'] - $P3 = 5 - setattribute $P1, 'severity', $P3 - $P4 = new ['String'] - $P4 = "additional payload" - setattribute $P1, 'payload', $P4 - $P5 = new ['ResizablePMCArray'] - $P5 = 2 - $P5[0] = 'backtrace line 1' - $P5[1] = 'backtrace line 2' - setattribute $P1, 'backtrace', $P5 + setattr_int($P1, 'type', 5) + setattr_int($P1, 'severity', 6) + setattr_int($P1, 'exit_code', 7) + setattr_int($P1, 'handled', 1) + setattr_string($P1, 'message', "just pining") + setattr_string($P1, 'payload', "additional payload") + + $P8 = new ['ResizablePMCArray'] + $P8 = 2 + $P8[0] = 'backtrace line 1' + $P8[1] = 'backtrace line 2' + setattribute $P1, 'backtrace', $P8 + + push_eh handler throw $P1 - is(0, "throwing exception failed") + ok(0, "throwing exception failed") + skip(7, "because of throwing exception failed") .return() handler: .get_results($P0) + pop_eh - $P16 = getattribute $P0, 'message' - is($P16, "just pining", 'got message') + gotattr_int($P0, 'type', 5) + gotattr_int($P0, 'severity', 6) + gotattr_int($P0, 'exit_code', 7) + gotattr_int($P0, 'handled', 1) + gotattr_string($P0, 'message', "just pining") + gotattr_string($P0, 'payload', "additional payload") + + $P28 = getattribute $P0, 'backtrace' + $P30 = $P28[0] + is($P30, "backtrace line 1", 'got backtrace data') - $P17 = getattribute $P0, 'severity' - is($P17, 5, 'got severity') + $P31 = $P28[1] + is($P31, "backtrace line 2", 'more backtrace data') +.end - $P18 = getattribute $P0, 'payload' - is($P18, "additional payload", 'got payload') +.sub test_setattribute_wrong + .local pmc ex, eh + .local int result + ex = new ['Exception'] + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_ATTRIB_NOT_FOUND) + set_addr eh, catch + result = 0 + push_eh eh + setattribute ex, 'wrong attribute', eh + goto done + catch: + result = 1 + finalize eh + done: + is(result, 1, 'setting a wrong attribute throws') +.end - $P19 = getattribute $P0, 'backtrace' - $P20 = $P19[0] - is($P20, "backtrace line 1", 'got backtrace data') +.sub test_birthtime + .local pmc ex, bt + ex = new ['Exception'] + .local num n, nbt + n = 123.456 + ex = n + bt = getattribute ex, 'birthtime' + nbt = bt + is(nbt, n, 'get and set birthtime') +.end - $P20 = $P19[1] - is($P20, "backtrace line 2", 'more backtrace data') +.sub test_handler_ctx + .local pmc ex, eh, hc + .local int result + ex = new ['Exception'] + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_INVALID_OPERATION) + + result = 0 + set_label eh, catch_get + push_eh eh + hc = getattribute ex, 'handler_ctx' + goto done_get + catch_get: + finalize eh + result = 1 + done_get: + is(result, 1, 'get handler_ctx invalid operation') + + result = 0 + set_label eh, catch_set + setattribute ex, 'handler_ctx', ex + goto done_set + catch_set: + finalize eh + result = 1 + done_set: + is(result, 1, 'set handler_ctx invalid operation') .end .sub test_push_pop_eh @@ -173,6 +329,88 @@ ok(1,'caught exception object thrown') .end +# Test clone vtable function + +.sub test_clone + .local pmc ex, exclone + ex = new ['Exception'] + ex['type'] = .EXCEPTION_SYNTAX_ERROR + exclone = clone ex + .local int result + result = iseq ex, exclone + is(result, 1, 'cloned Exception is equal to original') + exclone['type'] = .EXCEPTION_ERR_OVERFLOW + result = iseq ex, exclone + is(result, 0, 'cloned and modified Exception is not equal to original') +.end + +.sub test_throw_clone + .local pmc ex, exclone, eh, ehguard + .local int result + ex = new ['Exception'] + ex['type'] = .EXCEPTION_SYNTAX_ERROR + exclone = clone ex + + ehguard = new ['ExceptionHandler'] + set_label ehguard, catchall + push_eh ehguard + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_SYNTAX_ERROR) + set_label eh, catch + result = 0 + push_eh eh + throw exclone + goto catchall + catch: + result = 1 + catchall: + finalize eh + finalize ehguard + is(result, 1, 'caught a cloned Exception') + + null exclone + result = 0 + .local pmc pay, getpay, exc + set_label ehguard, catchall2 + set_label eh, catch2 + + pay = new ['Integer'], 9875 + ex['payload'] = pay + exclone = clone ex + result = iseq ex, exclone + is(result, 1, 'cloned Exception with payload is equal to original') + + result = 0 + throw exclone + goto catchall2 + catch2: + .get_results(exc) + getpay = exc['payload'] + $I0 = getpay + if $I0 != 9875 goto catchall2 + result = 1 + catchall2: + is(result, 1, 'caught a cloned Exception with payload') +.end + +.sub test_backtrace + .local pmc ex, bt + ex = new ['Exception'] + bt = ex.'backtrace'() + $I0 = isnull bt + is($I0, 0, 'got backtrace from unthrow Exception') +.end + +.sub test_annotations + .local pmc ex, ann + ex = new ['Exception'] + ann = ex.'annotations'() + $I0 = isnull ann + is($I0, 0, 'got annotations from unthrow Exception') + $I0 = ann + is($I0, 0, 'annotations from unthrow Exception are empty') +.end + # Local Variables: # mode: pir # fill-column: 100 diff -Nru parrot-2.7.0/t/pmc/filehandle.t parrot-2.8.0/t/pmc/filehandle.t --- parrot-2.7.0/t/pmc/filehandle.t 2010-07-05 02:47:10.000000000 +0000 +++ parrot-2.8.0/t/pmc/filehandle.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: filehandle.t 47949 2010-07-01 20:47:29Z NotFound $ +# $Id: filehandle.t 48979 2010-09-13 18:55:26Z nwellnhof $ use strict; use warnings; @@ -539,29 +539,19 @@ \$P1.'close'() - \$I1 = charset line - \$S2 = charsetname \$I1 - if \$S2 == 'unicode' goto ok_3 - print \$S2 - print 'not ' - ok_3: - say 'ok 3 # unicode charset' - - \$I1 = encoding line \$S2 = encodingname \$I1 - if \$S2 == 'utf8' goto ok_4 + if \$S2 == 'utf8' goto ok_3 print \$S2 print 'not ' - ok_4: - say 'ok 4 # utf8 encoding' + ok_3: + say 'ok 3 # utf8 encoding' .end CODE ok 1 - $S1 = $P1.readline() # read with utf8 encoding on ok 2 - $S2 = $P1.readline() # read iso-8859-1 string -ok 3 # unicode charset -ok 4 # utf8 encoding +ok 3 # utf8 encoding OUT diff -Nru parrot-2.7.0/t/pmc/float.t parrot-2.8.0/t/pmc/float.t --- parrot-2.7.0/t/pmc/float.t 2010-06-21 08:21:01.000000000 +0000 +++ parrot-2.8.0/t/pmc/float.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: float.t 47728 2010-06-20 13:19:40Z mikehh $ +# $Id: float.t 48564 2010-08-19 02:03:11Z cotto $ =head1 NAME @@ -16,7 +16,7 @@ =cut -.const int TESTS = 162 +.const int TESTS = 166 .const num PRECISION = 0.000001 .sub 'test' :main @@ -78,10 +78,12 @@ log10_method() log2_method() sec_method() + csc_method() sech_method() sin_method() sinh_method() tan_method() + cot_method() tanh_method() sqrt_method() .end @@ -998,6 +1000,11 @@ test_method('sec', 0.5, 1.139493927) .end +.sub 'csc_method' + test_method('csc', 0.5, 2.0858296) + test_method('csc', 1.0, 1.1883951) +.end + .sub 'sech_method' test_method('sech', 0.0, 1.0) test_method('sech', 0.5, 0.886818884) @@ -1018,6 +1025,11 @@ test_method('tan', 0.5, 0.546302490) .end +.sub 'cot_method' + test_method('cot', 0.5, 1.8304877) + test_method('cot', 1.0, 0.64209262) +.end + .sub 'tanh_method' test_method('tanh', 0.0, 0.0) test_method('tanh', 0.5, 0.462117157) diff -Nru parrot-2.7.0/t/pmc/hashiteratorkey.t parrot-2.8.0/t/pmc/hashiteratorkey.t --- parrot-2.7.0/t/pmc/hashiteratorkey.t 2010-02-27 14:41:59.000000000 +0000 +++ parrot-2.8.0/t/pmc/hashiteratorkey.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: hashiteratorkey.t 44379 2010-02-23 11:15:03Z mikehh $ +# $Id: hashiteratorkey.t 48900 2010-09-10 02:48:54Z jkeenan $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/t/pmc/hashiterator.t parrot-2.8.0/t/pmc/hashiterator.t --- parrot-2.7.0/t/pmc/hashiterator.t 2010-06-23 10:46:15.000000000 +0000 +++ parrot-2.8.0/t/pmc/hashiterator.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,10 +1,10 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: hashiterator.t 47744 2010-06-21 19:04:58Z NotFound $ +# $Id: hashiterator.t 48854 2010-09-08 12:14:31Z NotFound $ =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 PMC. Checks key access with various types of +Tests the C 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 diff -Nru parrot-2.7.0/t/pmc/hash.t parrot-2.8.0/t/pmc/hash.t --- parrot-2.7.0/t/pmc/hash.t 2010-06-23 10:46:15.000000000 +0000 +++ parrot-2.8.0/t/pmc/hash.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: hash.t 47739 2010-06-21 14:58:48Z NotFound $ +# $Id: hash.t 49150 2010-09-19 06:57:54Z luben $ =head1 NAME @@ -25,11 +25,12 @@ .sub main :main .include 'test_more.pir' - plan(172) + plan(174) initial_hash_tests() more_than_one_hash() hash_key_type() + hash_value_type() null_key() hash_keys_with_nulls_in_them() nearly_the_same_hash_keys() @@ -156,6 +157,26 @@ end: .end +.sub hash_value_type + .local pmc h, eh + .local int r + h = new ['Hash'] + + h.'set_value_type'(.DATATYPE_INTVAL) + r = h.'get_value_type'() + is(r, .DATATYPE_INTVAL, 'get/set _value_type') + + r = 1 + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_UNIMPLEMENTED) + set_label eh, catch + push_eh eh + h.'set_value_type'(999999) + r = 0 + catch: + is(r, 1, 'set_value_type with invalid type throws') +.end + .sub null_key new $P0, ['Hash'] $P0['yum'] = 5 diff -Nru parrot-2.7.0/t/pmc/imageio.t parrot-2.8.0/t/pmc/imageio.t --- parrot-2.7.0/t/pmc/imageio.t 2010-04-25 20:59:59.000000000 +0000 +++ parrot-2.8.0/t/pmc/imageio.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,10 +1,10 @@ #!./parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: imageio.t 46007 2010-04-25 11:44:15Z fperrad $ +# $Id: imageio.t 49130 2010-09-18 03:47:34Z plobsing $ =head1 NAME -t/pmc/imageio.t - test ImageIO PMC +t/pmc/imageio.t - test ImageIOFreeze and ImageIOThaw PMC =head1 SYNOPSIS @@ -19,39 +19,41 @@ .sub main :main .include 'test_more.pir' - plan(11) + plan(12) - .local pmc imageio - imageio = new ['ImageIO'] - ok(1, 'instantiated ImageIO') + .local pmc frz, thw + frz = new ['ImageIOFreeze'] + ok(1, 'instantiated ImageIOFreeze') + + thw = new ['ImageIOThaw'] + ok(1, 'instantiated ImageIOThaw') .local pmc test_pmc test_pmc = 'get_test_simple'() - setref imageio, test_pmc - $S0 = imageio + setref frz, test_pmc + $S0 = frz ok($S0, 'frozen PMC is true (simple)') $S1 = freeze test_pmc is($S0, $S1, 'freeze gives same image as ImageIO (simple)') - imageio = new ['ImageIO'] - imageio = $S0 - $P0 = deref imageio + thw = $S0 + $P0 = deref thw ok($P0, 'thawed PMC is true (simple)') $P1 = thaw $S1 is($P0, $P1, 'thaw gives same PMC as ImageIO (simple)') is($P0, test_pmc, 'round trip gives same PMC (simple)') - imageio = new ['ImageIO'] + frz = new ['ImageIOFreeze'] test_pmc = 'get_test_aggregate'() - setref imageio, test_pmc - $S0 = imageio + setref frz, test_pmc + $S0 = frz ok($S0, 'frozen PMC is true (aggregate)') $S1 = freeze test_pmc is($S0, $S1, 'freeze gives same image as ImageIO (aggregate)') - imageio = new ['ImageIO'] - imageio = $S0 - $P0 = deref imageio + thw = new ['ImageIOThaw'] + thw = $S0 + $P0 = deref thw ok($P0, 'thawed PMC is true (aggregate)') $P1 = thaw $S1 is_deeply($P0, $P1, 'thaw gives same PMC as ImageIO (aggregate)') diff -Nru parrot-2.7.0/t/pmc/io.t parrot-2.8.0/t/pmc/io.t --- parrot-2.7.0/t/pmc/io.t 2010-06-11 08:06:10.000000000 +0000 +++ parrot-2.8.0/t/pmc/io.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: io.t 47511 2010-06-09 14:24:07Z plobsing $ +# $Id: io.t 48979 2010-09-13 18:55:26Z nwellnhof $ use strict; use warnings; @@ -645,20 +645,16 @@ $S1 = pio.'read'(1024) # read the rest of the file (much shorter than 1K) $S0 .= $S1 pio.'close'() - $I1 = charset $S0 - $S2 = charsetname $I1 - say $S2 $I1 = encoding $S0 $S2 = encodingname $I1 say $S2 - $I1 = find_charset 'iso-8859-1' - trans_charset $S1, $S0, $I1 + $I1 = find_encoding 'iso-8859-1' + trans_encoding $S1, $S0, $I1 print $S1 .end CODE -unicode utf8 T\xf6tsch OUTPUT diff -Nru parrot-2.7.0/t/pmc/lexinfo.t parrot-2.8.0/t/pmc/lexinfo.t --- parrot-2.7.0/t/pmc/lexinfo.t 2010-04-25 20:59:59.000000000 +0000 +++ parrot-2.8.0/t/pmc/lexinfo.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: lexinfo.t 46007 2010-04-25 11:44:15Z fperrad $ +# $Id: lexinfo.t 48902 2010-09-10 02:49:54Z NotFound $ =head1 NAME @@ -17,23 +17,15 @@ =cut +.include 'except_types.pasm' + .sub main :main .include 'test_more.pir' - plan(4) + plan(5) - new_test() inspect_test() -.end - -.sub new_test - push_eh eh - $P0 = new ['LexInfo'] - pop_eh - ok(0, "shouldn't be able to create a LexInfo without an initializer") - goto end -eh: - ok(1, "can't create a LexInfo without an initializer") -end: + inspect_invalid_test() + declare_lex_preg_test() .end .sub inspect_test @@ -70,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 diff -Nru parrot-2.7.0/t/pmc/namespace-old.t parrot-2.8.0/t/pmc/namespace-old.t --- parrot-2.7.0/t/pmc/namespace-old.t 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/t/pmc/namespace-old.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2001-2009, Parrot Foundation. -# $Id: namespace-old.t 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: namespace-old.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ use strict; use warnings; diff -Nru parrot-2.7.0/t/pmc/object-meths.t parrot-2.8.0/t/pmc/object-meths.t --- parrot-2.7.0/t/pmc/object-meths.t 2009-11-24 11:58:50.000000000 +0000 +++ parrot-2.8.0/t/pmc/object-meths.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,12 +1,12 @@ #! perl -# Copyright (C) 2001-2009, Parrot Foundation. -# $Id: object-meths.t 42708 2009-11-21 14:26:46Z jkeenan $ +# Copyright (C) 2001-2010, Parrot Foundation. +# $Id: object-meths.t 48785 2010-09-04 16:58:07Z chromatic $ use strict; use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 37; +use Parrot::Test tests => 36; =head1 NAME @@ -1080,24 +1080,6 @@ get_attr_str was called OUTPUT -pir_output_is( <<'CODE', <<'OUTPUT', "overloading get_class vtable" ); -.sub main :main - .local pmc cl, o, cl2 - cl = newclass 'MyClass' - o = new ['MyClass'] - cl2 = class o -.end - -.namespace ['MyClass'] - -.sub get_class :method :vtable - print "get_class was called\n" -.end - -CODE -get_class was called -OUTPUT - pir_error_output_like( <<'CODE', <<'OUTPUT', "method called on non-object" ); .namespace [ 'Foo' ] diff -Nru parrot-2.7.0/t/pmc/orderedhashiterator.t parrot-2.8.0/t/pmc/orderedhashiterator.t --- parrot-2.7.0/t/pmc/orderedhashiterator.t 2010-06-26 14:37:21.000000000 +0000 +++ parrot-2.8.0/t/pmc/orderedhashiterator.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: orderedhashiterator.t 47799 2010-06-24 06:14:22Z NotFound $ +# $Id: orderedhashiterator.t 48821 2010-09-07 18:06:42Z NotFound $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/t/pmc/packfileannotations.t parrot-2.8.0/t/pmc/packfileannotations.t --- parrot-2.7.0/t/pmc/packfileannotations.t 2010-06-01 22:11:08.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfileannotations.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: packfileannotations.t 47224 2010-05-31 13:58:11Z bacek $ +# $Id: packfileannotations.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -9,6 +9,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfileannotations.t =head1 DESCRIPTION @@ -19,6 +20,9 @@ .include 't/pmc/testlib/packfile_common.pir' +.const string annofilename = 't/pmc/testlib/annotations.pbc' + + .sub 'main' :main .include 'test_more.pir' plan(17) @@ -42,7 +46,7 @@ push_eh load_error $P0 = new ['FileHandle'] - $P0.'open'('t/native_pbc/annotations.pbc', 'r') + $P0.'open'(annofilename, 'r') $P0.'encoding'('binary') $S0 = $P0.'readall'() pf = new 'Packfile' @@ -98,6 +102,9 @@ $P6 = 2 anns[3] = $P6 + # Make sure the mark vtable is exercised and the content survives + sweep 1 + # Pack $S0 = pf pf = new 'Packfile' diff -Nru parrot-2.7.0/t/pmc/packfileconstanttable.t parrot-2.8.0/t/pmc/packfileconstanttable.t --- parrot-2.7.0/t/pmc/packfileconstanttable.t 2010-04-30 14:50:46.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfileconstanttable.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: packfileconstanttable.t 46140 2010-04-29 14:52:22Z NotFound $ +# $Id: packfileconstanttable.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -8,6 +8,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfileconstanttable.t =head1 DESCRIPTION @@ -62,6 +63,10 @@ pf = _pbc() pop_eh pftable = _get_consttable(pf) + + # Make sure the mark vtable is exercised and the content survives + sweep 1 + size = elements pftable ok(size, "PackfileConstantTable.elements returns non-zero") .return () diff -Nru parrot-2.7.0/t/pmc/packfiledirectory.t parrot-2.8.0/t/pmc/packfiledirectory.t --- parrot-2.7.0/t/pmc/packfiledirectory.t 2010-04-30 14:50:46.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfiledirectory.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: packfiledirectory.t 46140 2010-04-29 14:52:22Z NotFound $ +# $Id: packfiledirectory.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -9,6 +9,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfiledirectory.t =head1 DESCRIPTION diff -Nru parrot-2.7.0/t/pmc/packfilefixupentry.t parrot-2.8.0/t/pmc/packfilefixupentry.t --- parrot-2.7.0/t/pmc/packfilefixupentry.t 2010-04-30 14:50:46.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfilefixupentry.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: packfilefixupentry.t 46140 2010-04-29 14:52:22Z NotFound $ +# $Id: packfilefixupentry.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -8,6 +8,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfilefixupentry.t =head1 DESCRIPTION diff -Nru parrot-2.7.0/t/pmc/packfilefixuptable.t parrot-2.8.0/t/pmc/packfilefixuptable.t --- parrot-2.7.0/t/pmc/packfilefixuptable.t 2010-04-30 14:50:46.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfilefixuptable.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: packfilefixuptable.t 46140 2010-04-29 14:52:22Z NotFound $ +# $Id: packfilefixuptable.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -9,6 +9,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfilefixuptable.t =head1 DESCRIPTION diff -Nru parrot-2.7.0/t/pmc/packfilerawsegment.t parrot-2.8.0/t/pmc/packfilerawsegment.t --- parrot-2.7.0/t/pmc/packfilerawsegment.t 2010-04-30 14:50:46.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfilerawsegment.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: packfilerawsegment.t 46140 2010-04-29 14:52:22Z NotFound $ +# $Id: packfilerawsegment.t 48609 2010-08-23 07:13:45Z NotFound $ =head1 NAME @@ -9,6 +9,7 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfilerawsegment.t =head1 DESCRIPTION diff -Nru parrot-2.7.0/t/pmc/packfile.t parrot-2.8.0/t/pmc/packfile.t --- parrot-2.7.0/t/pmc/packfile.t 2010-08-06 11:23:32.000000000 +0000 +++ parrot-2.8.0/t/pmc/packfile.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: packfile.t 48286 2010-08-03 11:33:26Z NotFound $ +# $Id: packfile.t 48944 2010-09-11 23:44:56Z luben $ =head1 NAME @@ -9,14 +9,13 @@ =head1 SYNOPSIS + % make test_prep % prove t/pmc/packfile.t =head1 DESCRIPTION Tests the Packfile PMC. -If you see this tests failing after bumping PBC_COMPAT rerun tools/dev/mk_packfile_pbc. - =cut .include 't/pmc/testlib/packfile_common.pir' @@ -25,13 +24,13 @@ .sub main :main .include 'test_more.pir' - plan(37) + plan(47) 'test_new'() 'test_set_string_native'() 'test_get_string'() 'test_set_string'() - 'test_get_integer'() - 'test_set_integer'() + 'test_get_integer_keyed_str'() + 'test_set_integer_keyed_str'() 'test_get_directory'() 'test_load'() 'test_pack_fresh_packfile'() @@ -72,19 +71,24 @@ catch: result = 1 end: + pop_eh is(result, 1, 'set_string_native with invalid data throws') .end .sub 'test_get_string' - .local pmc pf + .local pmc pf, eh pf = new ['Packfile'] $S0 = pf["uuid"] ok(1, 'get_string(uuid)') # Requesting unknown key should throw exception - push_eh unknown_key + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_KEY_NOT_FOUND) + set_label eh, unknown_key + push_eh eh $S0 = pf["foo"] + pop_eh ok(0, "get_string_keyed_int return unknown key") .return () @@ -112,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 () @@ -121,20 +126,90 @@ .return () .end +# Compose the message for the given key +.sub 'keyed_str_msg' + .param string key + .local string msg + msg = 'get_integer_keyed_str(' + msg = concat msg, key + 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' + .param pmc pf + .param string key + .local string msg + .local int result + msg = 'keyed_str_msg'(key) + result = 0 + push_eh fail + + $I0 = pf[key] + result = 1 + goto end + fail: + .get_results($P0) + pop_eh + end: + ok(result, msg) +.end + +# 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' + push keys, 'fptype' + push keys, 'version_major' + push keys, 'version_minor' + 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 -.sub 'test_get_integer' - .local pmc pf push_eh load_error pf = _pbc() pop_eh - $I0 = pf["version_major"] - ok(1, "get_integer_keyed_str(version_major)") - - $I1 = pf["version_minor"] - ok(1, "get_integer_keyed_str(version_minor)") - $I2 = pf["version_patch"] - ok(1, "get_integer_keyed_str(version_patch)") + i = 0 + nextkey: + $S0 = keys[i] + do_get_integer_keyed_str(pf, $S0) + inc i + if i < nkeys goto nextkey # Requesting unknown key should throw exception push_eh unknown_key @@ -146,40 +221,71 @@ pop_eh ok(1, "get_integer_keyed_str handle unknown key properly") .return () + + # On load error report a failure for each test load_error: .get_results($P0) pop_eh - report_load_error($P0, "get_integer_keyed_str(version_major)") - report_load_error($P0, "get_integer_keyed_str(version_minor)") - report_load_error($P0, "get_integer_keyed_str(version_patch)") + + i = 0 + nexterr: + $S0 = keys[i] + $S0 = keyed_str_msg($S0) + report_load_error($P0, $S0) + inc i + if i < nkeys goto nexterr + report_load_error($P0, "get_integer_keyed_str unknown key") .return() .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 diff -Nru parrot-2.7.0/t/pmc/parrotinterpreter.t parrot-2.8.0/t/pmc/parrotinterpreter.t --- parrot-2.7.0/t/pmc/parrotinterpreter.t 2010-04-25 20:59:59.000000000 +0000 +++ parrot-2.8.0/t/pmc/parrotinterpreter.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: parrotinterpreter.t 46007 2010-04-25 11:44:15Z fperrad $ +# $Id: parrotinterpreter.t 48811 2010-09-06 14:35:49Z NotFound $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/t/pmc/stringbuilder.t parrot-2.8.0/t/pmc/stringbuilder.t --- parrot-2.7.0/t/pmc/stringbuilder.t 2010-06-12 13:50:22.000000000 +0000 +++ parrot-2.8.0/t/pmc/stringbuilder.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2010, Parrot Foundation. -# $Id: stringbuilder.t 47558 2010-06-11 15:21:19Z NotFound $ +# $Id: stringbuilder.t 49189 2010-09-20 22:45:00Z NotFound $ =head1 NAME @@ -20,8 +20,10 @@ .sub 'main' :main .include 'test_more.pir' - test_create() # 2 tests + test_create() # 3 tests + test_init_pmc() test_push_string() + test_push_string_resize() test_push_pmc() # 4 tests test_push_string_unicode() # 1 test test_i_concatenate() # 1 test @@ -36,6 +38,7 @@ emit_with_pos_and_named_args() test_unicode_conversion_tt1665() + test_encodings() done_testing() @@ -53,6 +56,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' @@ -69,9 +78,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") @@ -83,9 +89,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 @@ -93,9 +96,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 @@ -103,14 +103,34 @@ $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_string_resize' + # Try to cover the case of resizing a buffer while converting it to utf8 + # Depends on internal details of StringBuffer, so it may need changes + # when that internals do. + .local pmc sb + sb = new ["StringBuilder"] + .local string s + .local int i, n + # Get the allocated capacity and almost fill it + n = sb + n -= 2 + s = repeat iso-8859-1:"x", n + push sb, s + # push a string that needs reallocation and has incompatible encoding rep. + s = unicode:"yyyy" + push sb, s + # Check the expected string length. Not a rock solid check, but the + # purpose of this test is just code coverage, so is enough. + i = sb.'get_string_length'() + n = n + 4 + is(i, n, 'test_push_string_resize') .end .sub 'test_push_pmc' @@ -305,6 +325,47 @@ ok( $S0, "Pushing unicode strings doesn't kill StringBuilder") .end +.sub 'test_init_pmc' + .local pmc ar + ar = new ['ResizableStringArray'] + + push ar, "foo" + push ar, "bar" + + $S99 = repeat "x", 12 + push ar, $S99 + $S1 = 'foobar' . $S99 + + $S99 = repeat "y", 13 + push ar, $S99 + $S1 = $S1 . $S99 + + $S99 = repeat "z", 14 + push ar, $S99 + $S1 = $S1 . $S99 + + null $S0 + push ar, $S0 + + .local pmc sb + sb = new ["StringBuilder"], ar + $S0 = sb + 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 diff -Nru parrot-2.7.0/t/pmc/stringhandle.t parrot-2.8.0/t/pmc/stringhandle.t --- parrot-2.7.0/t/pmc/stringhandle.t 2010-06-26 14:37:21.000000000 +0000 +++ parrot-2.8.0/t/pmc/stringhandle.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2006-2010, Parrot Foundation. -# $Id: stringhandle.t 47809 2010-06-24 14:27:52Z NotFound $ +# $Id: stringhandle.t 48949 2010-09-12 01:05:04Z NotFound $ use strict; use warnings; @@ -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" ); diff -Nru parrot-2.7.0/t/pmc/stringiterator.t parrot-2.8.0/t/pmc/stringiterator.t --- parrot-2.7.0/t/pmc/stringiterator.t 2010-06-19 12:34:22.000000000 +0000 +++ parrot-2.8.0/t/pmc/stringiterator.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: stringiterator.t 47687 2010-06-18 16:31:45Z NotFound $ +# $Id: stringiterator.t 48761 2010-09-02 08:25:56Z NotFound $ =head1 NAME @@ -17,21 +17,34 @@ =cut .include 'iterator.pasm' +.include 'except_types.pasm' .sub main :main .include 'test_more.pir' - plan(24) + plan(30) + test_get_pmc() test_clone() test_elements() iterate_forward() # 11 tests iterate_backward() # 8 tests iterate_wrong() # 1 test iterate_out() # 1 test + get_keyed() .end + +.sub 'test_get_pmc' + .local pmc s, it, sget + s = new ['String'] + s = 'foobar' + it = iter s + sget = deref it + is(s, sget, 'deref StringIterator gives the iterated string') +.end + .sub 'test_clone' .local pmc s, it, itc .local int nit, nitc @@ -208,6 +221,46 @@ end: .end +.sub get_keyed + .local pmc s, it, eh + .local string s1 + .local int result, i1 + result = 0 + s = new ['String'] + s = 'hi' + it = iter s + s1 = it[0] + is(s1, 'h', 'get_string_keyed_int - zero') + s1 = it[1] + is(s1, 'i', 'get_string_keyed_int - not zero') + + eh = new ['ExceptionHandler'] + eh.'handle_types'(.EXCEPTION_OUT_OF_BOUNDS) + set_label eh, catch + push_eh eh + s1 = it[2] + goto done + catch: + finalize eh + result = 1 + done: + ok(result, 'get_string_keyed_int out of bounds') + + result = 0 + i1 = it[0] + s1 = chr i1 + is(s1, 'h', 'get_integer_keyed_int') + + set_label eh, catch2 + i1 = it[2] + goto done2 + catch2: + finalize eh + result = 1 + done2: + ok(result, 'get_integer_keyed_int out of bounds') +.end + # Local Variables: # mode: pir # fill-column: 100 diff -Nru parrot-2.7.0/t/pmc/string.t parrot-2.8.0/t/pmc/string.t --- parrot-2.7.0/t/pmc/string.t 2010-05-30 21:14:08.000000000 +0000 +++ parrot-2.8.0/t/pmc/string.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #!./parrot # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: string.t 47102 2010-05-29 06:50:09Z plobsing $ +# $Id: string.t 48800 2010-09-05 16:14:02Z nwellnhof $ =head1 NAME @@ -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 diff -Nru parrot-2.7.0/t/pmc/testlib/annotations.pir parrot-2.8.0/t/pmc/testlib/annotations.pir --- parrot-2.7.0/t/pmc/testlib/annotations.pir 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/pmc/testlib/annotations.pir 2010-09-21 07:48:54.000000000 +0000 @@ -0,0 +1,20 @@ +# Copyright (C) 2009-2010, Parrot Foundation. +# $Id: annotations.pir 48562 2010-08-18 13:09:42Z NotFound $ + +# This file is used from Packfile PMCs tests + +.sub 'main' +.annotate "file", "annotations.pir" +.annotate "creator", "Parrot Foundation" +.annotate "line", 1 + say "Hi" + say "line" +.annotate "line", 2 + .return () +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/pmc/testlib/number.pasm parrot-2.8.0/t/pmc/testlib/number.pasm --- parrot-2.7.0/t/pmc/testlib/number.pasm 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/pmc/testlib/number.pasm 2010-09-21 07:48:54.000000000 +0000 @@ -0,0 +1,91 @@ +# Copyright (C) 2009-2010, Parrot Foundation. +# $Id: number.pasm 48562 2010-08-18 13:09:42Z NotFound $ + +# This file is used from Packfile PMCs tests + + set N0, 1.0 + set N1, 4.0 + set N2, 16.0 + set N3, 64.0 + set N4, 256.0 + set N5, 1024.0 + set N6, 4096.0 + set N7, 16384.0 + set N8, 65536.0 + set N9, 262144.0 + set N10, 1048576.0 + set N11, 4194304.0 + set N12, 16777216.0 + set N13, 67108864.0 + set N14, 268435456.0 + set N15, 1073741824.0 + set N16, 4294967296.0 + set N17, 17179869184.0 + set N18, 68719476736.0 + set N19, 274877906944.0 + set N20, 1099511627776.0 + set N21, 4398046511104.0 + set N22, 17592186044416.0 + set N23, 70368744177664.0 + set N24, 281474976710656.0 + set N25, 1.12589990684262e+15 + + print N0 + print "\n" + print N1 + print "\n" + print N2 + print "\n" + print N3 + print "\n" + print N4 + print "\n" + print N5 + print "\n" + print N6 + print "\n" + print N7 + print "\n" + print N8 + print "\n" + print N9 + print "\n" + print N10 + print "\n" + print N11 + print "\n" + print N12 + print "\n" + print N13 + print "\n" + print N14 + print "\n" + print N15 + print "\n" + print N16 + print "\n" + print N17 + print "\n" + print N18 + print "\n" + print N19 + print "\n" + print N20 + print "\n" + print N21 + print "\n" + print N22 + print "\n" + print N23 + print "\n" + print N24 + print "\n" + print N25 + print "\n" + end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/t/pmc/testlib/packfile_common.pir parrot-2.8.0/t/pmc/testlib/packfile_common.pir --- parrot-2.7.0/t/pmc/testlib/packfile_common.pir 2010-06-01 22:11:08.000000000 +0000 +++ parrot-2.8.0/t/pmc/testlib/packfile_common.pir 2010-09-21 07:48:54.000000000 +0000 @@ -1,6 +1,6 @@ #! parrot # Copyright (C) 2009, Parrot Foundation. -# $Id: packfile_common.pir 47224 2010-05-31 13:58:11Z bacek $ +# $Id: packfile_common.pir 48561 2010-08-18 06:14:20Z NotFound $ # Common functions for various Packfile* PMCs tests. # Return test filename @@ -9,7 +9,7 @@ .sub '_filename' .local string filename - filename = 't/native_pbc/number.pbc' + filename = 't/pmc/testlib/number.pbc' .return (filename) .end diff -Nru parrot-2.7.0/t/pmc/timer.t parrot-2.8.0/t/pmc/timer.t --- parrot-2.7.0/t/pmc/timer.t 2009-11-24 11:58:50.000000000 +0000 +++ parrot-2.8.0/t/pmc/timer.t 2010-09-21 07:48:54.000000000 +0000 @@ -1,12 +1,12 @@ #! perl # Copyright (C) 2001-2008, Parrot Foundation. -# $Id: timer.t 42681 2009-11-21 13:31:42Z jkeenan $ +# $Id: timer.t 48694 2010-08-27 14:34:16Z nwellnhof $ use strict; use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 6; +use Parrot::Test tests => 7; use Parrot::Config; =head1 NAME @@ -200,6 +200,38 @@ 0 OUTPUT +pir_output_is( << 'CODE', << 'OUTPUT', "Timer - many repetitions" ); + +.include 'timer.pasm' + +.sub expired + $P0 = get_global "expired_count" + inc $P0 +.end + +.sub main :main + $P2 = new 'Integer' + set_global "expired_count", $P2 + + $P0 = new 'Timer' + $P1 = get_global "expired" + + $P0[.PARROT_TIMER_HANDLER] = $P1 + $P0[.PARROT_TIMER_SEC] = 0 + $P0[.PARROT_TIMER_REPEAT] = 9999 + $P0[.PARROT_TIMER_RUNNING] = 1 + +loop: + sleep 0 + if $P2 < 10000 goto loop + + sleep 0.5 + say $P2 +.end +CODE +10000 +OUTPUT + # Local Variables: # mode: cperl # cperl-indent-level: 4 diff -Nru parrot-2.7.0/t/run/options.t parrot-2.8.0/t/run/options.t --- parrot-2.7.0/t/run/options.t 2010-02-27 14:42:01.000000000 +0000 +++ parrot-2.8.0/t/run/options.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2005-2010, Parrot Foundation. -# $Id: options.t 44363 2010-02-23 03:04:21Z mikehh $ +# $Id: options.t 48731 2010-08-31 04:23:57Z cotto $ =head1 NAME @@ -20,7 +20,7 @@ use warnings; use lib qw( lib . ../lib ../../lib ); -use Test::More tests => 27; +use Test::More tests => 28; use Parrot::Config; use File::Temp 0.13 qw/tempfile/; use File::Spec; @@ -119,6 +119,14 @@ return $filename; } +#make sure that VERSION matches the output of --version +open(my $version_fh, "<", "VERSION") or die "couldn't open VERSION: $!"; +my $file_version = <$version_fh>; +chomp($file_version); +close($version_fh); +like( qx{$PARROT --version}, qr/.*${file_version}.*/, "VERSION matches --version" ); + + # Local Variables: # mode: cperl # cperl-indent-level: 4 diff -Nru parrot-2.7.0/t/src/embed.t parrot-2.8.0/t/src/embed.t --- parrot-2.7.0/t/src/embed.t 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/t/src/embed.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: embed.t 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: embed.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ use strict; use warnings; diff -Nru parrot-2.7.0/t/src/extend.t parrot-2.8.0/t/src/extend.t --- parrot-2.7.0/t/src/extend.t 2010-06-19 12:34:22.000000000 +0000 +++ parrot-2.8.0/t/src/extend.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #!perl # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: extend.t 47678 2010-06-18 00:29:10Z whiteknight $ +# $Id: extend.t 48771 2010-09-03 11:07:30Z NotFound $ use strict; use warnings; @@ -43,15 +43,13 @@ Parrot_Int new_value; /* Interpreter set-up */ - if (!interp) - return 1; + if (interp) { + Parrot_set_intreg(interp, parrot_reg, value); + new_value = Parrot_get_intreg(interp, parrot_reg); - Parrot_set_intreg(interp, parrot_reg, value); - new_value = Parrot_get_intreg(interp, parrot_reg); - - printf("%d\n", (int)new_value); - - Parrot_exit(interp, 0); + printf("%d\n", (int)new_value); + Parrot_destroy(interp); + } return 0; } @@ -74,15 +72,14 @@ Parrot_Float new_value; /* Interpreter set-up */ - if (!interp) - return 1; + if (interp) { + Parrot_set_numreg(interp, parrot_reg, value); + new_value = Parrot_get_numreg(interp, parrot_reg); - Parrot_set_numreg(interp, parrot_reg, value); - new_value = Parrot_get_numreg(interp, parrot_reg); + printf("%.1f\n", (double)new_value); - printf("%.1f\n", (double)new_value); - - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -103,13 +100,12 @@ Parrot_String output; /* Interpreter set-up */ - if (!interp) - return 1; - - output = Parrot_new_string(interp, "Test", 4, "iso-8859-1", 0); - Parrot_eprintf(interp, "%S\n", output); + if (interp) { + output = Parrot_new_string(interp, "Test", 4, "iso-8859-1", 0); + Parrot_eprintf(interp, "%S\n", output); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -131,16 +127,15 @@ Parrot_String value, new_value; /* Interpreter set-up */ - if (!interp) - return 1; - - value = Parrot_new_string(interp, "Test", 4, "iso-8859-1", 0); - Parrot_set_strreg(interp, parrot_reg, value); + if (interp) { + value = Parrot_new_string(interp, "Test", 4, "iso-8859-1", 0); + Parrot_set_strreg(interp, parrot_reg, value); - new_value = Parrot_get_strreg(interp, parrot_reg); - Parrot_eprintf(interp, "%S\n", new_value); + new_value = Parrot_get_strreg(interp, parrot_reg); + Parrot_eprintf(interp, "%S\n", new_value); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -163,18 +158,17 @@ Parrot_Int type, new_value; /* Interpreter set-up */ - if (!interp) - return 1; + if (interp) { + type = Parrot_PMC_typenum(interp, "Integer"); + testpmc = Parrot_PMC_new(interp, type); - type = Parrot_PMC_typenum(interp, "Integer"); - testpmc = Parrot_PMC_new(interp, type); + Parrot_PMC_set_integer_native(interp, testpmc, value); + new_value = Parrot_PMC_get_integer(interp, testpmc); - Parrot_PMC_set_integer_native(interp, testpmc, value); - new_value = Parrot_PMC_get_integer(interp, testpmc); + printf("%ld\n", (long)new_value); - printf("%ld\n", (long)new_value); - - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -211,11 +205,11 @@ Parrot_Interp interp = Parrot_new(NULL); /* Interpreter set-up */ - if (!interp) - return 1; + if (interp) { + Parrot_run_native(interp, the_test); - Parrot_run_native(interp, the_test); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -238,23 +232,22 @@ Parrot_PMC testpmc, newpmc; /* Interpreter set-up */ - if (!interp) - return 1; - - type = Parrot_PMC_typenum(interp, "Integer"); - testpmc = Parrot_PMC_new(interp, type); + if (interp) { + type = Parrot_PMC_typenum(interp, "Integer"); + testpmc = Parrot_PMC_new(interp, type); - Parrot_PMC_set_integer_native(interp, testpmc, value); + Parrot_PMC_set_integer_native(interp, testpmc, value); - parrot_reg = 31; - Parrot_set_pmcreg(interp, parrot_reg, testpmc); + parrot_reg = 31; + Parrot_set_pmcreg(interp, parrot_reg, testpmc); - newpmc = Parrot_get_pmcreg(interp, parrot_reg); - new_value = Parrot_PMC_get_integer(interp, newpmc); + newpmc = Parrot_get_pmcreg(interp, parrot_reg); + new_value = Parrot_PMC_get_integer(interp, newpmc); - printf("%d\n", (int)new_value); + printf("%d\n", (int)new_value); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -277,18 +270,17 @@ Parrot_PMC testpmc; /* Interpreter set-up */ - if (!interp) - return 1; + if (interp) { + type = Parrot_PMC_typenum(interp, "Float"); + testpmc = Parrot_PMC_new(interp, type); - type = Parrot_PMC_typenum(interp, "Float"); - testpmc = Parrot_PMC_new(interp, type); + Parrot_PMC_set_number_native(interp, testpmc, value); + new_value = Parrot_PMC_get_number(interp, testpmc); - Parrot_PMC_set_number_native(interp, testpmc, value); - new_value = Parrot_PMC_get_number(interp, testpmc); + printf("%.7f\n", (double)new_value); - printf("%.7f\n", (double)new_value); - - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -310,19 +302,18 @@ Parrot_PMC testpmc; /* Interpreter set-up */ - if (!interp) - return 1; - - type = Parrot_PMC_typenum(interp, "String"); - testpmc = Parrot_PMC_new(interp, type); + if (interp) { + type = Parrot_PMC_typenum(interp, "String"); + testpmc = Parrot_PMC_new(interp, type); - value = Parrot_new_string(interp, "Pumpking", 8, "iso-8859-1", 0); - Parrot_PMC_set_string_native(interp, testpmc, value); - new_value = Parrot_PMC_get_string(interp, testpmc); + value = Parrot_new_string(interp, "Pumpking", 8, "iso-8859-1", 0); + Parrot_PMC_set_string_native(interp, testpmc, value); + new_value = Parrot_PMC_get_string(interp, testpmc); - Parrot_eprintf(interp, "%S\n", new_value); + Parrot_eprintf(interp, "%S\n", new_value); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -362,12 +353,12 @@ main(int argc, const char *argv[]) { Parrot_Interp interp = Parrot_new(NULL); - if (!interp) - return 1; + if (interp) { - Parrot_run_native(interp, the_test); + Parrot_run_native(interp, the_test); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -420,12 +411,11 @@ main(int argc, const char *argv[]) { Parrot_Interp interp = Parrot_new(NULL); - if (!interp) - return 1; - - Parrot_run_native(interp, the_test); + if (interp) { + Parrot_run_native(interp, the_test); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -496,12 +486,11 @@ main(int argc, const char *argv[]) { Parrot_Interp interp = Parrot_new(NULL); - if (!interp) - return 1; - - Parrot_run_native(interp, the_test); + if (interp) { + Parrot_run_native(interp, the_test); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -541,7 +530,8 @@ .pcc_sub _sub1: get_params "" print "in sub1\n" - find_lex P2, "no_such_var" + set I1, 0 # Divide by 0 to force exception. + div I2, I1, 0 print "never\n" returncc EOF @@ -563,12 +553,11 @@ main(int argc, const char *argv[]) { Parrot_Interp interp = Parrot_new(NULL); - if (!interp) - return 1; - - Parrot_run_native(interp, the_test); + if (interp) { + Parrot_run_native(interp, the_test); - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } @@ -661,24 +650,16 @@ const char * code[] = { ".sub foo\\nsay \\"Hello from foo!\\"\\n.end\\n" }; Parrot_Interp interp = Parrot_new(NULL); - if (!interp) { - printf( "Hiss\\n" ); - return 1; - } + if (interp) { + packfile = Parrot_pbc_read( interp, "$temp_pbc", 0 ); - packfile = Parrot_pbc_read( interp, "$temp_pbc", 0 ); + if (packfile) { + Parrot_pbc_load( interp, packfile ); + Parrot_runcode( interp, 1, code ); + } - if (!packfile) { - printf( "Boo\\n" ); - return 1; + Parrot_destroy( interp ); } - - Parrot_pbc_load( interp, packfile ); - Parrot_runcode( interp, 1, code ); - - Parrot_destroy( interp ); - - Parrot_exit(interp, 0); return 0; } CODE @@ -700,25 +681,18 @@ Parrot_PMC sub; Parrot_String code_type, error, foo_name; - if (!interp) { - printf( "Hiss\n" ); - return 1; + if (interp) { + code_type = Parrot_str_new_constant( interp, "PIR" ); + retval = Parrot_compile_string( interp, code_type, code, &error ); + + if (retval) { + foo_name = Parrot_str_new_constant( interp, "foo" ); + sub = Parrot_ns_find_current_namespace_global( interp, foo_name ); + + Parrot_ext_call(interp, sub, "->"); + } + Parrot_destroy(interp); } - - code_type = Parrot_str_new_constant( interp, "PIR" ); - retval = Parrot_compile_string( interp, code_type, code, &error ); - - if (!retval) { - printf( "Boo\n" ); - return 1; - } - - foo_name = Parrot_str_new_constant( interp, "foo" ); - sub = Parrot_ns_find_current_namespace_global( interp, foo_name ); - - Parrot_ext_call(interp, sub, "->"); - - Parrot_exit(interp, 0); return 0; } CODE @@ -738,19 +712,15 @@ Parrot_PackFile pf; Parrot_Interp interp = Parrot_new(NULL); - if (!interp) { - printf( "No interpreter\\n" ); - return 1; + if (interp) { + pf = Parrot_pbc_read( interp, "$temp_pbc", 0 ); + Parrot_pbc_load( interp, pf ); + + sub = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) ); + Parrot_ext_call(interp, sub, "II->I", 100, 200, &result); + printf( "Result is %d.\\n", result ); + Parrot_destroy(interp); } - - pf = Parrot_pbc_read( interp, "$temp_pbc", 0 ); - Parrot_pbc_load( interp, pf ); - - sub = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) ); - Parrot_ext_call(interp, sub, "II->I", 100, 200, &result); - printf( "Result is %d.\\n", result ); - - Parrot_exit(interp, 0); return 0; } CODE @@ -770,19 +740,15 @@ Parrot_PackFile pf; Parrot_Interp interp = Parrot_new(NULL); - if (!interp) { - printf( "No interpreter\\n" ); - return 1; + if (interp) { + pf = Parrot_pbc_read( interp, "$temp_pbc", 0 ); + Parrot_pbc_load( interp, pf ); + + sub = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) ); + Parrot_ext_call( interp, sub, "II->I", 100, 200, &result ); + printf( "Result is %d.\\n", result ); + Parrot_destroy(interp); } - - pf = Parrot_pbc_read( interp, "$temp_pbc", 0 ); - Parrot_pbc_load( interp, pf ); - - sub = Parrot_ns_find_current_namespace_global( interp, Parrot_str_new_constant( interp, "add" ) ); - Parrot_ext_call( interp, sub, "II->I", 100, 200, &result ); - printf( "Result is %d.\\n", result ); - - Parrot_exit(interp, 0); return 0; } CODE @@ -825,14 +791,13 @@ printf("Starting interp %d\n", i); fflush(stdout); interp = Parrot_new(NULL); - if (!interp) - return 1; + if (interp) { + Parrot_set_flag(interp, PARROT_DESTROY_FLAG); - Parrot_set_flag(interp, PARROT_DESTROY_FLAG); - - printf("Destroying interp %d\n", i); - fflush(stdout); - interp_cleanup(interp, 0); + printf("Destroying interp %d\n", i); + fflush(stdout); + interp_cleanup(interp, 0); + } } return 0; diff -Nru parrot-2.7.0/t/src/warnings.t parrot-2.8.0/t/src/warnings.t --- parrot-2.7.0/t/src/warnings.t 2010-04-23 10:42:27.000000000 +0000 +++ parrot-2.8.0/t/src/warnings.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2001-2010, Parrot Foundation. -# $Id: warnings.t 45792 2010-04-19 05:49:04Z petdance $ +# $Id: warnings.t 48771 2010-09-03 11:07:30Z NotFound $ use strict; use warnings; @@ -39,12 +39,11 @@ Parrot_Interp interp = Parrot_new(NULL); int error_val; - if (!interp) - return 1; + if (interp) { + print_pbc_location(interp); - print_pbc_location(interp); - - Parrot_exit(interp, 0); + Parrot_destroy(interp); + } return 0; } CODE @@ -62,35 +61,34 @@ Parrot_Interp interp = Parrot_new(NULL); int error_val; - if (!interp) - return 1; - - PARROT_WARNINGS_on(interp, PARROT_WARNINGS_ALL_FLAG); + if (interp) { + PARROT_WARNINGS_on(interp, PARROT_WARNINGS_ALL_FLAG); - error_val = Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "all"); - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "all"); + Parrot_io_eprintf(interp, "%d\n", error_val); - /* warnings are on, this should return an error */ - error_val = Parrot_warn(interp, PARROT_WARNINGS_NONE_FLAG, "none"); - Parrot_io_eprintf(interp, "%d\n", error_val); + /* warnings are on, this should return an error */ + error_val = Parrot_warn(interp, PARROT_WARNINGS_NONE_FLAG, "none"); + Parrot_io_eprintf(interp, "%d\n", error_val); - error_val = Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "undef"); - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG, "undef"); + Parrot_io_eprintf(interp, "%d\n", error_val); - error_val = Parrot_warn(interp, PARROT_WARNINGS_IO_FLAG, "io"); - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, PARROT_WARNINGS_IO_FLAG, "io"); + Parrot_io_eprintf(interp, "%d\n", error_val); - error_val = Parrot_warn(interp, PARROT_WARNINGS_PLATFORM_FLAG, "platform"); - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, PARROT_WARNINGS_PLATFORM_FLAG, "platform"); + Parrot_io_eprintf(interp, "%d\n", error_val); - error_val = Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, "dynext"); - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, PARROT_WARNINGS_DYNEXT_FLAG, "dynext"); + Parrot_io_eprintf(interp, "%d\n", error_val); - error_val = Parrot_warn(interp, 0, "eek"); /* should return error */ - Parrot_io_eprintf(interp, "%d\n", error_val); + error_val = Parrot_warn(interp, 0, "eek"); /* should return error */ + Parrot_io_eprintf(interp, "%d\n", error_val); - Parrot_exit(interp, 0); - return 0; + Parrot_destroy(interp); + } + return 0; } CODE all diff -Nru parrot-2.7.0/t/steps/auto/llvm-01.t parrot-2.8.0/t/steps/auto/llvm-01.t --- parrot-2.7.0/t/steps/auto/llvm-01.t 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/t/steps/auto/llvm-01.t 2010-09-21 07:48:55.000000000 +0000 @@ -0,0 +1,418 @@ +#!perl +# Copyright (C) 2001-2007, Parrot Foundation. +# $Id: llvm-01.t 48741 2010-09-01 01:57:31Z jkeenan $ +# auto/llvm-01.t + +use strict; +use warnings; +use File::Temp qw( tempdir ); +use Test::More tests => 69; +use Carp; +use lib qw( lib t/configure/testlib ); +use_ok('config::init::defaults'); +use_ok('config::inter::progs'); +use_ok('config::auto::llvm'); +use Parrot::Configure; +use Parrot::Configure::Options qw( process_options ); +use Parrot::Configure::Test qw( + test_step_thru_runstep + rerun_defaults_for_testing + test_step_constructor_and_description +); +use IO::CaptureOutput qw( capture ); + +########## regular ########## + +my ($args, $step_list_ref) = process_options( { + argv => [ ], + mode => q{configure}, +} ); + +my $conf = Parrot::Configure->new; + +my $serialized = $conf->pcfreeze(); + +test_step_thru_runstep($conf, q{init::defaults}, $args); +test_step_thru_runstep($conf, q{inter::progs}, $args); + +my $pkg = q{auto::llvm}; + +$conf->add_steps($pkg); +$conf->options->set( %{$args} ); +my $step = test_step_constructor_and_description($conf); +my $ret = $step->runstep($conf); +ok( $ret, "runstep() returned true value" ); +like( $step->result(), qr/yes|no/, + "Result was either 'yes' or 'no'" ); + +$conf->replenish($serialized); + +########## --verbose ########## + +($args, $step_list_ref) = process_options( { + argv => [ q{--verbose} ], + mode => q{configure}, +} ); +rerun_defaults_for_testing($conf, $args ); +$conf->add_steps($pkg); +$conf->options->set( %{$args} ); +$step = test_step_constructor_and_description($conf); +{ + my $stdout; + my $ret = capture( + sub { $step->runstep($conf) }, + \$stdout + ); + ok( $ret, "runstep() returned true value" ); + like( $step->result(), qr/yes|no/, + "Result was either 'yes' or 'no'" ); + SKIP: { + skip 'No sense testing for verbose output if LLVM not present', + 2 unless ( $step->result() =~ /yes/ ); + like( $stdout, qr/llvm-gcc/s, + "Got expected verbose output" ); + like( $stdout, qr/Low Level Virtual Machine/s, + "Got expected verbose output" ); + } +} + +$step->set_result( undef ); +$conf->data->set( 'has_llvm' => undef ); +auto::llvm::_handle_result($step, $conf, 1); +is( $step->result(), 'yes', "Got expected 'yes' result" ); +ok( $conf->data->get( 'has_llvm' ), + "'has_llvm' set to true value, as expected" ); + +$step->set_result( undef ); +$conf->data->set( 'has_llvm' => undef ); +auto::llvm::_handle_result($step, $conf, 0); +is( $step->result(), 'no', "Got expected 'no' result" ); +ok( ! $conf->data->get( 'has_llvm' ), + "'has_llvm' set to false value, as expected" ); + +##### _handle_component_version_output() ##### + +my ($prog, $output, $llvm_lacking, $verbose); +$prog = [ 'llvm-gcc' => 'llvm-gcc' ]; + +$verbose = 0; + +$output = 'llvm-gcc'; +$llvm_lacking = 0; +$llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose +); +ok( ! $llvm_lacking, "llvm reported as not lacking" ); + +$output = 'foobar'; +$llvm_lacking = 0; +$llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose +); +ok( $llvm_lacking, "llvm reported as lacking: wrong output" ); + +$output = undef; +$llvm_lacking = 0; +$llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose +); +ok( $llvm_lacking, "llvm reported as lacking: output undefined" ); + +$verbose = 1; + +my ($stdout, $stderr); +my $exp = $prog->[0]; + +$output = 'llvm-gcc'; +$llvm_lacking = 0; +capture( + sub { + $llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose + ); + }, + \$stdout, + \$stderr, +); +ok( ! $llvm_lacking, "llvm reported as not lacking" ); +like( $stdout, qr/$output/, "Got expected verbose output: llvm not lacking" ); + +$output = 'foobar'; +$llvm_lacking = 0; +capture( + sub { + $llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose + ); + }, + \$stdout, + \$stderr, +); +ok( $llvm_lacking, "llvm reported as lacking: wrong output" ); +like( + $stdout, + qr/Could not get expected '--version' output for $exp/, + "Got expected verbose output: llvm lacking", +); + +$output = undef; +$llvm_lacking = 0; +capture( + sub { + $llvm_lacking = auto::llvm::_handle_component_version_output( + $prog, $output, $llvm_lacking, $verbose + ); + }, + \$stdout, + \$stderr, +); +ok( $llvm_lacking, "llvm reported as lacking: output undefined" ); +like( + $stdout, + qr/Could not get expected '--version' output for $exp/, + "Got expected verbose output: llvm lacking", +); + +##### _examine_llvm_gcc_version() ##### + +$output = ''; +$llvm_lacking = 0; +$verbose = 0; +$llvm_lacking = + auto::llvm::_examine_llvm_gcc_version( $output, $llvm_lacking, $verbose ); +ok( $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM lacking" ); + +$output = 'foobar'; +$llvm_lacking = 0; +$verbose = 0; +$llvm_lacking = + auto::llvm::_examine_llvm_gcc_version( $output, $llvm_lacking, $verbose ); +ok( $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM lacking" ); + +$output = '3.2.1'; +$llvm_lacking = 0; +$verbose = 0; +$llvm_lacking = + auto::llvm::_examine_llvm_gcc_version( $output, $llvm_lacking, $verbose ); +ok( $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM lacking" ); + +$output = '4.2.1'; +$llvm_lacking = 0; +$verbose = 0; +$llvm_lacking = + auto::llvm::_examine_llvm_gcc_version( $output, $llvm_lacking, $verbose ); +ok( ! $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM not lacking" ); + +$output = 'foobar'; +$llvm_lacking = 0; +$verbose = 1; +capture( + sub { $llvm_lacking = auto::llvm::_examine_llvm_gcc_version( + $output, $llvm_lacking, $verbose ); }, + \$stdout, + \$stderr, +); +ok( $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM lacking" ); +like( + $stdout, + qr/Unable to extract llvm-gcc major, minor and patch versions/, + "Got expected verbose output from _examine_llvm_gcc_version()", +); + +$output = '3.2.1'; +$llvm_lacking = 0; +$verbose = 1; +capture( + sub { $llvm_lacking = auto::llvm::_examine_llvm_gcc_version( + $output, $llvm_lacking, $verbose ); }, + \$stdout, + \$stderr, +); +ok( $llvm_lacking, "_examine_llvm_gcc_version() reported LLVM lacking" ); +like( + $stdout, + qr/llvm-gcc must be at least major version 4/, + "Got expected verbose output from _examine_llvm_gcc_version()", +); + +##### 4 methods ##### +$verbose = 0; + +$step->set_result( undef ); +$step->_handle_failure_to_compile_into_bitcode( $conf, $verbose ); +is( $step->result(), 'no', "Got expected result" ); + +$step->set_result( undef ); +$step->_handle_failure_to_execute_bitcode( $conf, $verbose ); +is( $step->result(), 'no', "Got expected result" ); + +$step->set_result( undef ); +$step->_handle_failure_to_compile_to_assembly( $conf, $verbose ); +is( $step->result(), 'no', "Got expected result" ); + +$step->set_result( undef ); +$step->_handle_failure_to_assemble_assembly( $conf, $verbose ); +is( $step->result(), 'no', "Got expected result" ); + +$verbose = 1; +capture( + sub { $step->_handle_failure_to_compile_into_bitcode( $conf, $verbose ); }, + \$stdout, + \$stderr, +); +like( $stdout, + qr/Unable to compile C file into LLVM bitcode file/, + "Got expected verbose output from _handle_failure_to_compile_into_bitcode()", +); + +capture( + sub { $step->_handle_failure_to_execute_bitcode( $conf, $verbose ); }, + \$stdout, + \$stderr, +); +like( $stdout, + qr/Unable to run LLVM bitcode file with 'lli'/, + "Got expected verbose output from _handle_failure_to_execute_bitcode()", +); + +capture( + sub { $step->_handle_failure_to_compile_to_assembly( $conf, $verbose ); }, + \$stdout, + \$stderr, +); +like( $stdout, + qr/Unable to compile program to native assembly using 'llc'/, + "Got expected verbose output from _handle_failure_to_compile_to_assembly()", +); + +capture( + sub { $step->_handle_failure_to_assemble_assembly( $conf, $verbose ); }, + \$stdout, + \$stderr, +); +like( $stdout, + qr/Unable to assemble native assembly into program/, + "Got expected verbose output from _handle_failure_to_assemble_assembly()", +); + +##### _handle_native_assembly_output() ##### + +{ + local $@ = ''; + $output = 'hello world'; + $verbose = 0; + ok( $step->_handle_native_assembly_output( $conf, $output, $verbose ), + "_handle_native_assembly_output() returned true value" ); + is( $step->result(), 'yes', "Got expected 'yes' result" ); +} + +{ + local $@ = 'error'; + $output = 'hello world'; + $verbose = 0; + ok( $step->_handle_native_assembly_output( $conf, $output, $verbose ), + "_handle_native_assembly_output() returned true value" ); + is( $step->result(), 'no', "Got expected 'no' result" ); +} + +{ + local $@ = ''; + $output = 'goodbye, cruel world'; + $verbose = 0; + ok( $step->_handle_native_assembly_output( $conf, $output, $verbose ), + "_handle_native_assembly_output() returned true value" ); + is( $step->result(), 'no', "Got expected 'no' result" ); +} + +{ + local $@ = 'error'; + $output = 'hello world'; + $verbose = 1; + capture( + sub { $step->_handle_native_assembly_output( + $conf, $output, $verbose); }, + \$stdout, + \$stderr, + ); + is( $step->result(), 'no', "Got expected 'no' result" ); + like( + $stdout, + qr/Unable to execute native assembly program successfully/, + "Got expected verbose output: native assembly program", + ); +} + +{ + local $@ = ''; + $output = 'goodbye, cruel world'; + $verbose = 1; + capture( + sub { $step->_handle_native_assembly_output( + $conf, $output, $verbose); }, + \$stdout, + \$stderr, + ); + is( $step->result(), 'no', "Got expected 'no' result" ); + like( + $stdout, + qr/Unable to execute native assembly program successfully/, + "Got expected verbose output: native assembly program", + ); +} + +##### _cleanup_llvm_files() ##### + +my ( $bcfile, $sfile, $nativefile ); +my $count_unlinked; + +$count_unlinked = + auto::llvm::_cleanup_llvm_files( $bcfile, $sfile, $nativefile ); +is( $count_unlinked, 0, "no files existed, hence none unlinked" ); + +( $bcfile, $sfile, $nativefile ) = ( '', '', '' ); +$count_unlinked = + auto::llvm::_cleanup_llvm_files( $bcfile, $sfile, $nativefile ); +is( $count_unlinked, 0, "no files existed, hence none unlinked" ); + +{ + my $tdir = tempdir( CLEANUP => 1 ); + $bcfile = qq|$tdir/bcfile|; + open my $FH, '>', $bcfile + or die "Unable to open handle for writing: $!"; + print $FH qq|bcfile hello world\n|; + close $FH or die "Unable to close handle after writing: $!"; + $count_unlinked = + auto::llvm::_cleanup_llvm_files( $bcfile, $sfile, $nativefile ); + is( $count_unlinked, 1, "one file existed, hence one unlinked" ); +} + +$conf->cc_clean(); + +pass("Completed all tests in $0"); + +################### DOCUMENTATION ################### + +=head1 NAME + +t/steps/auto/llvm-01.t - tests Parrot::Configure step auto::llvm + +=head1 SYNOPSIS + + prove t/steps/auto/llvm-01.t + +=head1 DESCRIPTION + +This file holds tests for auto::llvm. + +=head1 AUTHOR + +James E Keenan + +=cut + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/t/steps/auto/pmc-01.t parrot-2.8.0/t/steps/auto/pmc-01.t --- parrot-2.7.0/t/steps/auto/pmc-01.t 2009-11-19 10:20:38.000000000 +0000 +++ parrot-2.8.0/t/steps/auto/pmc-01.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,11 +1,11 @@ #! perl # Copyright (C) 2007, Parrot Foundation. -# $Id: pmc-01.t 42575 2009-11-19 01:00:42Z jkeenan $ +# $Id: pmc-01.t 48600 2010-08-23 00:15:13Z jkeenan $ # auto/pmc-01.t use strict; use warnings; -use Test::More tests => 23; +use Test::More tests => 33; use Carp; use Cwd; use File::Path qw| mkpath |; @@ -17,6 +17,7 @@ use Parrot::Configure::Test qw( test_step_constructor_and_description ); +use IO::CaptureOutput qw( capture ); ########## regular ########## @@ -94,14 +95,14 @@ my $pmcdir = qq{$tdir/src/pmc}; ok(mkpath($pmcdir, { mode => 0755 }), "Able to make directory for testing"); my $num = qq{$pmcdir/pmc.num}; - open my $IN3, ">", $num or croak "Unable to open file for writing: $!"; - print $IN3 "# comment line\n"; - print $IN3 "\n"; - print $IN3 "default.pmc\t0\n"; - print $IN3 "null.pmc 1\n"; - print $IN3 "env.pmc 2\n"; - print $IN3 "notapmc 3\n"; - close $IN3 or croak "Unable to close file after writing: $!"; + open my $OUT3, ">", $num or croak "Unable to open file for writing: $!"; + print $OUT3 "# comment line\n"; + print $OUT3 "\n"; + print $OUT3 "default.pmc\t0\n"; + print $OUT3 "null.pmc 1\n"; + print $OUT3 "env.pmc 2\n"; + print $OUT3 "notapmc 3\n"; + close $OUT3 or croak "Unable to close file after writing: $!"; my $order_ref = auto::pmc::get_pmc_order(); is_deeply( $order_ref, @@ -114,7 +115,12 @@ ); my @pmcs = qw| env.pmc default.pmc null.pmc other.pmc |; - my @sorted_pmcs = auto::pmc::sort_pmcs(@pmcs); + my $pseudoman = 'MANIFEST'; + open my $MAN, '>', $pseudoman or croak "Unable to open $pseudoman"; + print $MAN "src/pmc/$_\n" for @pmcs; + close $MAN or croak; + my @sorted_pmcs = + split / /, auto::pmc::get_sorted_pmc_str(@pmcs); is_deeply( \@sorted_pmcs, [ qw| default.pmc null.pmc env.pmc other.pmc | ], @@ -130,6 +136,61 @@ my $pmcdir = qq{$tdir/src/pmc}; ok(mkpath($pmcdir, { mode => 0755 }), "Able to make directory for testing"); + my $num = qq{$pmcdir/pmc.num}; + open my $OUT4, ">", $num or croak "Unable to open file for writing: $!"; + print $OUT4 "# comment line\n"; + print $OUT4 "\n"; + print $OUT4 "default.pmc\t0\n"; + print $OUT4 "null.pmc 1\n"; + print $OUT4 "env.pmc 2\n"; + print $OUT4 "notapmc 3\n"; + close $OUT4 or croak "Unable to close file after writing: $!"; + my $order_ref = auto::pmc::get_pmc_order(); + is_deeply( + $order_ref, + { + 'default.pmc' => 0, + 'null.pmc' => 1, + 'env.pmc' => 2, + }, + "Able to read src/pmc/pmc.num correctly" + ); + + my @pmcs = qw| env.pmc default.pmc null.pmc other.pmc |; + my $pseudoman = 'MANIFEST'; + open my $MAN, '>', $pseudoman or croak "Unable to open $pseudoman"; + print $MAN "src/pmc/$_\n" for @pmcs[0..2]; + close $MAN or croak; + { + my ($stdout, $stderr); + my @sorted_pmcs; + capture( sub { + @sorted_pmcs = split / /, + auto::pmc::get_sorted_pmc_str(@pmcs); + }, + \$stdout, + \$stderr, + ); + like( $stderr, + qr/PMCs found in \/src\/pmc not found in MANIFEST: $pmcs[3]/, + "Got expected warning", + ); + is_deeply( + \@sorted_pmcs, + [ qw| default.pmc null.pmc env.pmc other.pmc | ], + "PMCs sorted correctly" + ); + } + + ok( chdir $cwd, 'changed back to original directory after testing' ); +} + +{ + my $tdir = tempdir( CLEANUP => 1 ); + ok( chdir $tdir, 'changed to temp directory for testing' ); + + my $pmcdir = qq{$tdir/src/pmc}; + ok(mkpath($pmcdir, { mode => 0755 }), "Able to make directory for testing"); eval { my $order_ref = auto::pmc::get_pmc_order(); }; like($@, qr/Can't read src\/pmc\/pmc\.num/, "Got expected 'die' message"); @@ -138,6 +199,28 @@ ok( chdir $cwd, 'changed back to original directory after testing' ); } +my $seen_man = auto::pmc::pmcs_in_manifest(); +ok( keys %{$seen_man}, 'src/pmc/*.pmc files were seen in MANIFEST' ); + +{ + my $tdir = tempdir( CLEANUP => 1 ); + ok( chdir $tdir, 'changed to temp directory for testing' ); + + my @pmcs = qw| env.pmc default.pmc null.pmc other.pmc |; + my $pseudoman = 'foobar'; + open my $MAN, '>', $pseudoman or croak "Unable to open $pseudoman"; + print $MAN "src/pmc/$_\n" for @pmcs; + close $MAN or croak; + + my $seen_manifest = auto::pmc::pmcs_in_manifest($pseudoman); + is_deeply( + $seen_manifest, + { map { $_ => 1} @pmcs }, + "Got expected files in differently named MANIFEST", + ); + ok( chdir $cwd, 'changed back to original directory after testing' ); +} + pass("Completed all tests in $0"); ################### DOCUMENTATION ################### diff -Nru parrot-2.7.0/t/steps/auto/readline-01.t parrot-2.8.0/t/steps/auto/readline-01.t --- parrot-2.7.0/t/steps/auto/readline-01.t 2009-11-19 10:20:38.000000000 +0000 +++ parrot-2.8.0/t/steps/auto/readline-01.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,11 +1,11 @@ #! perl # Copyright (C) 2007, Parrot Foundation. -# $Id: readline-01.t 42575 2009-11-19 01:00:42Z jkeenan $ +# $Id: readline-01.t 48925 2010-09-11 01:21:55Z jkeenan $ # auto/readline-01.t 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'; diff -Nru parrot-2.7.0/t/steps/init/hints/linux-01.t parrot-2.8.0/t/steps/init/hints/linux-01.t --- parrot-2.7.0/t/steps/init/hints/linux-01.t 2010-08-15 00:39:36.000000000 +0000 +++ parrot-2.8.0/t/steps/init/hints/linux-01.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2009, Parrot Foundation. -# $Id: linux-01.t 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: linux-01.t 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ # init/hints/linux-01.t use strict; diff -Nru parrot-2.7.0/t/steps/inter/charset-01.t parrot-2.8.0/t/steps/inter/charset-01.t --- parrot-2.7.0/t/steps/inter/charset-01.t 2009-11-19 10:20:38.000000000 +0000 +++ parrot-2.8.0/t/steps/inter/charset-01.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -#! perl -# Copyright (C) 2007, Parrot Foundation. -# $Id: charset-01.t 42575 2009-11-19 01:00:42Z jkeenan $ -# inter/charset-01.t - -use strict; -use warnings; -use Test::More tests => 12; -use Carp; -use lib qw( lib t/configure/testlib ); -use_ok('config::inter::charset'); -use Parrot::Configure::Options qw( process_options ); -use Parrot::Configure::Step::Test; -use Parrot::Configure::Test qw( - test_step_constructor_and_description -); -use Tie::Filehandle::Preempt::Stdin; - -########## ask ########## - -my ($args, $step_list_ref) = process_options( - { - argv => [], - mode => q{configure}, - } -); - -my $conf = Parrot::Configure::Step::Test->new; -$conf->include_config_results( $args ); - -my $pkg = q{inter::charset}; - -$conf->add_steps($pkg); - -my $serialized = $conf->pcfreeze(); - -$conf->options->set( %{$args} ); -my $step = test_step_constructor_and_description($conf); -{ - open STDOUT, '>', "/dev/null" or croak "Unable to open to myout"; - my $ret = $step->runstep($conf); - close STDOUT or croak "Unable to close after myout"; - ok( $ret, "runstep() returned true value" ); -} - -$conf->replenish($serialized); - -########## ask ########## - -($args, $step_list_ref) = process_options( - { - argv => [ q{--ask} ], - mode => q{configure}, - } -); -$conf->options->set( %{$args} ); -$step = test_step_constructor_and_description($conf); - -my ( @prompts, $object ); - -$conf->options->set('intval' => 'alpha'); -$conf->options->set('floatval' => 'beta'); -$conf->options->set('opcode' => 'gamma'); -@prompts = qw( delta epsilon zeta ); - -$object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts; -can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') ); -isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' ); - -{ - open STDOUT, '>', "/dev/null" or croak "Unable to open to myout"; - my $ret = $step->runstep($conf); - close STDOUT or croak "Unable to close after myout"; - ok( $ret, "runstep() returned true value" ); -} - -undef $object; -untie *STDIN; -@prompts = (); - -pass("Completed all tests in $0"); - -################### DOCUMENTATION ################### - -=head1 NAME - -inter/charset-01.t - test inter::charset - -=head1 SYNOPSIS - - % prove t/steps/inter/charset-01.t - -=head1 DESCRIPTION - -The files in this directory test functionality used by F. - -The tests in this file test inter::charset. - -=head1 AUTHOR - -James E Keenan - -=head1 SEE ALSO - -config::inter::charset, F. - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/t/steps/inter/encoding-01.t parrot-2.8.0/t/steps/inter/encoding-01.t --- parrot-2.7.0/t/steps/inter/encoding-01.t 2009-11-19 10:20:38.000000000 +0000 +++ parrot-2.8.0/t/steps/inter/encoding-01.t 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -#! perl -# Copyright (C) 2007, Parrot Foundation. -# $Id: encoding-01.t 42575 2009-11-19 01:00:42Z jkeenan $ -# inter/encoding-01.t - -use strict; -use warnings; -use Test::More tests => 12; -use Carp; -use lib qw( lib t/configure/testlib ); -use_ok('config::inter::encoding'); -use Parrot::Configure::Options qw( process_options ); -use Parrot::Configure::Step::Test; -use Parrot::Configure::Test qw( - test_step_constructor_and_description -); -use Tie::Filehandle::Preempt::Stdin; - -########## no ask ########## - -my ($args, $step_list_ref) = process_options( - { - argv => [], - mode => q{configure}, - } -); - -my $conf = Parrot::Configure::Step::Test->new; -$conf->include_config_results( $args ); - -my $pkg = q{inter::encoding}; - -$conf->add_steps($pkg); - -my $serialized = $conf->pcfreeze(); - -$conf->options->set( %{$args} ); -my $step = test_step_constructor_and_description($conf); -{ - open STDOUT, '>', "/dev/null" or croak "Unable to open to myout"; - my $ret = $step->runstep($conf); - close STDOUT or croak "Unable to close after myout"; - ok( $ret, "runstep() returned true value" ); -} - -$conf->replenish($serialized); - -########## ask; $ENV{TEST_ENCODING} ########## - -$ENV{TEST_ENCODING} = 'fixed_8.c'; -do config::inter::encoding; -($args, $step_list_ref) = process_options( - { - argv => [q{--ask}], - mode => q{configure}, - } -); -$conf->options->set( %{$args} ); -$step = test_step_constructor_and_description($conf); -my ( @prompts, $prompt, $object ); -$prompt = $ENV{TEST_ENCODING}; -push @prompts, $prompt; -$object = tie *STDIN, 'Tie::Filehandle::Preempt::Stdin', @prompts; -can_ok( 'Tie::Filehandle::Preempt::Stdin', ('READLINE') ); -isa_ok( $object, 'Tie::Filehandle::Preempt::Stdin' ); -{ - open STDOUT, '>', "/dev/null" or croak "Unable to open to myout"; - my $ret = $step->runstep($conf); - close STDOUT or croak "Unable to close after myout"; - ok( $ret, "runstep() returned true value" ); -} - -undef $object; -untie *STDIN; -@prompts = (); - -pass("Completed all tests in $0"); - -################### DOCUMENTATION ################### - -=head1 NAME - -inter/encoding-01.t - test inter::encoding - -=head1 SYNOPSIS - - % prove t/steps/inter/encoding-01.t - -=head1 DESCRIPTION - -The files in this directory test functionality used by F. - -The tests in this file test inter::encoding. - -=head1 AUTHOR - -James E Keenan - -=head1 SEE ALSO - -config::inter::encoding, F. - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/t/tools/dump_pbc.t parrot-2.8.0/t/tools/dump_pbc.t --- parrot-2.7.0/t/tools/dump_pbc.t 2009-07-27 09:56:21.000000000 +0000 +++ parrot-2.8.0/t/tools/dump_pbc.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,10 +1,10 @@ #! perl # Copyright (C) 2008-2009, Parrot Foundation. -# $Id: dump_pbc.t 40228 2009-07-23 15:44:54Z dukeleto $ +# $Id: dump_pbc.t 48706 2010-08-28 02:39:25Z jkeenan $ =head1 NAME -t/tools/dumb_pbc.t - test the script tools/utils/dump_pbc.pl +t/tools/dumb_pbc.t - test the script tools/dev/dump_pbc.pl =head1 SYNOPSIS @@ -34,7 +34,7 @@ my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; system( "$PARROT --output $pbc_fn $pir_fn" ); - my $cmd = File::Spec->catfile( qw{. tools util dump_pbc.pl} ); + my $cmd = File::Spec->catfile( qw{. tools dev dump_pbc.pl} ); my $out = `$PConfig{perl} $cmd $pbc_fn`; like( $out, $snippet, $desc ); diff -Nru parrot-2.7.0/t/tools/parrot_debugger.t parrot-2.8.0/t/tools/parrot_debugger.t --- parrot-2.7.0/t/tools/parrot_debugger.t 2009-09-30 23:33:04.000000000 +0000 +++ parrot-2.8.0/t/tools/parrot_debugger.t 2010-09-21 07:48:55.000000000 +0000 @@ -1,6 +1,6 @@ #! perl # Copyright (C) 2007-2009, Parrot Foundation. -# $Id: parrot_debugger.t 41570 2009-09-30 03:22:22Z dukeleto $ +# $Id: parrot_debugger.t 49021 2010-09-15 17:44:16Z Paul C. Anagnostopoulos $ =head1 NAME @@ -45,6 +45,8 @@ plan skip_all => "parrot_debugger hasn't been built. Run make parrot_utils"; exit(0); } + plan skip_all => "parrot_debugger changes have rendered these tests obsolete."; + exit(0); } my $tests = 0; @@ -99,12 +101,15 @@ \$I1 = 242 .end PIR + pdb_output_like( < utility. - -=cut - -use strict; -use warnings; -use lib qw( . lib ../lib ../../lib ); - -use Fatal qw{open close}; -use Test::More; -use Parrot::Test tests => 10; -use Parrot::Config; -use File::Spec (); - -my $testdata = File::Spec->catfile(qw{. t tools testdata }); -my $testdata_escaped = $testdata; -$testdata_escaped =~ s!\\!\\\\!g; - -sub pgegrep_output_like { - my ($options, $snippet, $desc) = @_; - - my $PARROT = ".$PConfig{slash}$PConfig{test_prog}"; - my $pgegrep = File::Spec->catfile( qw{. tools util pgegrep} ); - my $out = `$PARROT $pgegrep $options`; - - like( $out, $snippet, $desc ); - - return; -} - -pgegrep_output_like( - '-V', - qr!\Qpgegrep v0.0.1\E!, - 'pge reports correct version' -); - -pgegrep_output_like( - "cat $testdata", - qr!keyboardcat!, - 'basic sanity of matching a literal' -); - -pgegrep_output_like( - "-n cat $testdata", - qr!1:keyboardcat!, - 'matching a literal with line number' -); - -pgegrep_output_like( - "--line-number cat $testdata", - qr!1:keyboardcat!, - 'matching a literal with line number with long option' -); - -pgegrep_output_like( - "-H cat $testdata", - qr!$testdata_escaped:keyboardcat!, - 'matching a literal with file name' -); - -pgegrep_output_like( - "--with-filename cat $testdata", - qr!$testdata_escaped:keyboardcat!, - 'matching a literal with file name with long option' -); - - -pgegrep_output_like( - "-v cat $testdata", - qr!saxophonegiraffe!, - 'test inversion of match' -); - -pgegrep_output_like( - "--invert-match cat $testdata", - qr!saxophonegiraffe!, - 'test inversion of match with long option' -); - -pgegrep_output_like( - "-l cat $testdata", - qr!$testdata_escaped!, - 'find files that match' -); - -pgegrep_output_like( - "--files-with-matches cat $testdata", - qr!$testdata_escaped!, - 'find files that match with long option' -); - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/build/addopstags.pl parrot-2.8.0/tools/build/addopstags.pl --- parrot-2.7.0/tools/build/addopstags.pl 2009-03-08 22:01:49.000000000 +0000 +++ parrot-2.8.0/tools/build/addopstags.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -#!perl - -# Copyright (C) 2004-2006, Parrot Foundation. -# $Id: addopstags.pl 37201 2009-03-08 12:07:48Z fperrad $ - -use strict; -use warnings; - -=head1 NAME - -tools/build/addopstags.pl - add src/ops/*.ops to tags - -=head1 SYNOPSIS - - perl tools/build/addopstags.pl src/ops/*.ops - -=head1 DESCRIPTION - -Add src/ops/*.ops to tags file. - -=cut - -my %seen; -my @tags; - -# Pull ops tags -while (<>) { - if (/\bop \s+ (\w+) \s* \(/x) { - next if $seen{$1}++; - - # tag file excmd xflags - push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n"; - } -} -continue { - close ARGV if eof; # reset $. -} - -# Pull existing tags -open my $T, '<', 'tags'; -push @tags, <$T>; -close $T; - -# Spit 'em out sorted -open $T, '>', 'tags'; -print $T sort @tags; -close $T; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/build/h2inc.pl parrot-2.8.0/tools/build/h2inc.pl --- parrot-2.7.0/tools/build/h2inc.pl 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/tools/build/h2inc.pl 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2009, Parrot Foundation. -# $Id: h2inc.pl 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: h2inc.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME diff -Nru parrot-2.7.0/tools/build/headerizer.pl parrot-2.8.0/tools/build/headerizer.pl --- parrot-2.7.0/tools/build/headerizer.pl 2010-05-24 21:14:28.000000000 +0000 +++ parrot-2.8.0/tools/build/headerizer.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,497 +0,0 @@ -#! perl -# Copyright (C) 2001-2010, Parrot Foundation. -# $Id: headerizer.pl 46820 2010-05-20 17:22:03Z petdance $ - -=head1 NAME - -tools/build/headerizer.pl - Generates the function header parts of .h -files from .c files - -=head1 SYNOPSIS - - % perl tools/build/headerizer.pl OBJFILES - -=head1 DESCRIPTION - -Update the headers in F with the function declarations in -the F<*.pmc> or F<*.c> files that correspond to the F<*.o> files passed -on the command line. - -=head1 TODO - -* Generate docs from funcs - -* Somehow handle static functions in the source file - -=head1 NOTES - -* the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them - -* Support for multiple .c files pointing at the same .h file - -* Does NOT remove all blocks in the .h file, so if a .c file -disappears, its block is "orphaned" and will remain there. - -=head1 COMMAND-LINE OPTIONS - -=over 4 - -=item C<--macro=X> - -Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT. - -=back - -=head1 COMMAND-LINE ARGUMENTS - -=over 4 - -=item C - -One or more object file names. - -=back - -=cut - -use strict; -use warnings; - -use Getopt::Long; -use lib qw( lib ); -use Parrot::Config; -use Parrot::Headerizer; - -my $headerizer = Parrot::Headerizer->new; - -main(); - -=head1 FUNCTIONS - -=head2 extract_function_declaration_and_update_source( $cfile_name ) - -Extract all the function declarations from the C file specified by -I<$cfile_name>, and update the comment blocks within. - -=cut - -sub extract_function_declarations_and_update_source { - my $cfile_name = shift; - - open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!"; - my $text = join( '', <$fhin> ); - close $fhin; - - my @func_declarations = $headerizer->extract_function_declarations( $text ); - for my $decl ( @func_declarations ) { - my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl ); - my $name = $specs->{name}; - - my $heading = $headerizer->generate_documentation_signature($decl); - - $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do { - warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD - } - } - open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!"; - print {$fhout} $text; - close $fhout; - - return @func_declarations; -} - - -sub attrs_from_args { - my $func = shift; - my @args = @_; - - my @attrs = (); - my @mods = (); - - my $name = $func->{name}; - my $file = $func->{file}; - my $n = 0; - for my $arg (@args) { - ++$n; - if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) { - my $modified = $1; - if ( $modified =~ s/.*\*/*/ ) { - # We're OK - } - else { - $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"}; - } - push( @mods, "FUNC_MODIFIES($modified)" ); - } - if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) { - push( @attrs, "__attribute__nonnull__($n)" ); - } - if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) { - if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs - $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} ); - } - } - if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) { - $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} ); - } - } - - return (@attrs,@mods); -} - -sub asserts_from_args { - my @args = @_; - my @asserts; - - for my $arg (@args) { - if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) { - my $var = $2; - if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) { - # argument is a function pointer - $var = $1; - } - else { - # try to isolate the variable's name; - # strip off everything before the final space or asterisk. - $var =~ s{.+[* ]([^* ]+)$}{$1}; - # strip off a trailing "[]", if any. - $var =~ s{\[\]$}{}; - } - push( @asserts, "PARROT_ASSERT_ARG($var)" ); - } - if( $arg eq 'PARROT_INTERP' ) { - push( @asserts, "PARROT_ASSERT_ARG(interp)" ); - } - } - - return (@asserts); -} - -sub make_function_decls { - my @funcs = @_; - - my @decls; - foreach my $func (@funcs) { - my $multiline = 0; - - my $return = $func->{return_type}; - my $alt_void = ' '; - - # Splint can't handle /*@alt void@*/ on pointers, although this page - # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html - # seems to say that we can. - if ( $func->{is_ignorable} && ($return !~ /\*/) ) { - $alt_void = " /*\@alt void@*/\n"; - } - - my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} ); - $decl = "static $decl" if $func->{is_static}; - - my @args = @{ $func->{args} }; - my @attrs = attrs_from_args( $func, @args ); - - for my $arg (@args) { - if ( $arg =~ m{SHIM\((.+)\)} ) { - $arg = $1; - if ( $func->{is_static} || ( $arg =~ /\*/ ) ) { - $arg = "SHIM($arg)"; - } - else { - $arg = "NULLOK($arg)"; - } - } - } - - my $argline = join( ", ", @args ); - if ( length( $decl . $argline ) <= 75 ) { - $decl = "$decl$argline)"; - } - else { - if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) { - $decl .= ( shift @args ); - $decl .= "," if @args; - } - $argline = join( ",", map { "\n\t$_" } @args ); - $decl = "$decl$argline)"; - $multiline = 1; - } - - my $attrs = join( "", map { "\n\t\t$_" } @attrs ); - if ($attrs) { - $decl .= $attrs; - $multiline = 1; - } - my @macros = @{ $func->{macros} }; - $multiline = 1 if @macros; - - $decl .= $multiline ? ";\n" : ";"; - $decl = join( "\n", @macros, $decl ); - $decl =~ s/\t/ /g; - push( @decls, $decl ); - } - - foreach my $func (@funcs) { - my @args = @{ $func->{args} }; - my @asserts = asserts_from_args( @args ); - - my $assert = "#define ASSERT_ARGS_" . $func->{name}; - if(length($func->{name}) > 29) { - $assert .= " \\\n "; - } - $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = ("; - if(@asserts) { - $assert .= "\\\n "; - $assert .= join(" \\\n , ", @asserts); - } - else { - $assert .= "0"; - } - $assert .= ")"; - push(@decls, $assert); - } - - return @decls; -} - -sub read_file { - my $filename = shift; - - open my $fh, '<', $filename or die "couldn't read '$filename': $!"; - my $text = do { local $/ = undef; <$fh> }; - close $fh; - - return $text; -} - -sub write_file { - my $filename = shift; - my $text = shift; - - open my $fh, '>', $filename or die "couldn't write '$filename': $!"; - print {$fh} $text; - close $fh; -} - -sub replace_headerized_declarations { - my $source_code = shift; - my $sourcefile = shift; - my $hfile = shift; - my @funcs = @_; - - # Allow a way to not headerize statics - if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) { - return $source_code; - } - - @funcs = sort api_first_then_alpha @funcs; - - my @function_decls = make_function_decls(@funcs); - - my $function_decls = join( "\n", @function_decls ); - my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n}; - my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?}; - my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */}; - - $source_code =~ - s{($STARTMARKER)(?:.*?)($ENDMARKER)} - {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s - or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n"; - - return $source_code; -} - -sub api_first_then_alpha { - return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) ) - || ( lc $a->{name} cmp lc $b->{name} ); -} - -sub main { - my $macro_match; - GetOptions( - 'macro=s' => \$macro_match, - ) or exit(1); - - die 'No files specified.' unless @ARGV; - my %ofiles; - ++$ofiles{$_} for @ARGV; - my @ofiles = sort keys %ofiles; - for (@ofiles) { - print "$_ is specified more than once.\n" if $ofiles{$_} > 1; - } - my %sourcefiles; - my %sourcefiles_with_statics; - my %api; - - # 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/; - - $ofile =~ s/\\/\//g; - - my $is_yacc = ($ofile =~ /\.y$/); - if ( !$is_yacc ) { - my $sfile = $ofile; - $sfile =~ s/\Q$PConfig{o}\E$/.s/; - next if -f $sfile; - } - - my $cfile = $ofile; - $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc - or die "$cfile doesn't look like an object file"; - - my $pmcfile = $ofile; - $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/; - - my $from_pmc = -f $pmcfile && !$is_yacc; - - my $sourcefile = $from_pmc ? $pmcfile : $cfile; - - my $source_code = read_file( $sourcefile ); - die qq{can't find HEADERIZER HFILE directive in "$sourcefile"} - unless $source_code =~ - m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx; - - my $hfile = $1; - if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) { - die qq{"$hfile" not found (referenced from "$sourcefile")}; - } - - my @decls; - if ( $macro_match ) { - @decls = $headerizer->extract_function_declarations( $source_code ); - } - else { - @decls = extract_function_declarations_and_update_source( $sourcefile ); - } - - for my $decl (@decls) { - my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl ); - push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none'; - push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static}; - if ( $macro_match ) { - if ( grep { $_ eq $macro_match } @{$components->{macros}} ) { - push( @{ $api{$sourcefile} }, $components ); - } - } - } - } # for @cfiles - - if ( $macro_match ) { - my $nfuncs = 0; - for my $cfile ( sort keys %api ) { - my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}}; - print "$cfile\n"; - for my $func ( @funcs ) { - print " $func->{name}\n"; - ++$nfuncs; - } - } - my $s = $nfuncs == 1 ? '' : 's'; - print "$nfuncs $macro_match function$s\n"; - } - else { # Normal headerization and updating - # Update all the .h files - for my $hfile ( sort keys %sourcefiles ) { - my $sourcefiles = $sourcefiles{$hfile}; - - my $header = read_file($hfile); - - for my $cfile ( sort keys %{$sourcefiles} ) { - my @funcs = @{ $sourcefiles->{$cfile} }; - @funcs = grep { not $_->{is_static} } @funcs; # skip statics - - $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs ); - } - - write_file( $hfile, $header ); - } - - # Update all the .c files in place - for my $cfile ( sort keys %sourcefiles_with_statics ) { - my @funcs = @{ $sourcefiles_with_statics{$cfile} }; - @funcs = grep { $_->{is_static} } @funcs; - - my $source = read_file($cfile); - $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs ); - - write_file( $cfile, $source ); - } - print "Headerization complete.\n"; - } - - my %warnings = %{$headerizer->{warnings}}; - if ( keys %warnings ) { - my $nwarnings = 0; - my $nwarningfuncs = 0; - my $nwarningfiles = 0; - for my $file ( sort keys %warnings ) { - ++$nwarningfiles; - print "$file\n"; - my $funcs = $warnings{$file}; - for my $func ( sort keys %{$funcs} ) { - ++$nwarningfuncs; - for my $error ( @{ $funcs->{$func} } ) { - print " $func: $error\n"; - ++$nwarnings; - } - } - } - - print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n"; - } - - return; -} - -=head1 NAME - -headerizer.pl - -=head1 SYNOPSIS - - $ tools/build/headerizer.pl [object files] - -Generates C function declarations based on the function definitions in -the C source code. - -=head1 DIRECTIVES - -The headerizer works off of directives in the source and header files. - -One source file's public declarations can only go into one header file. -However, one header file can have declarations from multiple source files. -In other words, headers-to-source is one-to-many. - -=over 4 - -=item HEADERIZER BEGIN: F / HEADERIZER END: F - -Marks the beginning and end of a block of declarations in a header file. - - # In file foo.h - /* HEADERIZER BEGIN: src/foo.c */ - /* HEADERIZER END: src/foo.c */ - - /* HEADERIZER BEGIN: src/bar.c */ - /* HEADERIZER END: src/bar.c */ - -=item HEADERIZER HFILE: F - -Tells the headerizer where the declarations for the functions should go - - # In file foo.c - /* HEADERIZER HFILE: foo.h */ - - # In file bar.c - /* HEADERIZER HFILE: foo.h */ - -=back - -=cut - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/build/parrot_config_c.pl parrot-2.8.0/tools/build/parrot_config_c.pl --- parrot-2.7.0/tools/build/parrot_config_c.pl 2009-03-08 22:01:49.000000000 +0000 +++ parrot-2.8.0/tools/build/parrot_config_c.pl 2010-09-21 07:48:52.000000000 +0000 @@ -1,13 +1,10 @@ #! perl # Copyright (C) 2001-2006, Parrot Foundation. -# $Id: parrot_config_c.pl 37201 2009-03-08 12:07:48Z fperrad $ +# $Id: parrot_config_c.pl 48845 2010-09-08 01:12:20Z dukeleto $ use warnings; use strict; -my ($svnid) = - '$Id: parrot_config_c.pl 37201 2009-03-08 12:07:48Z fperrad $' =~ /^\$[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/; diff -Nru parrot-2.7.0/tools/build/README parrot-2.8.0/tools/build/README --- parrot-2.7.0/tools/build/README 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/build/README 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,13 @@ +# $Id: README 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ +README for tools/build/ + +This directory is intended to hold programs, templates and configuration files +invoked by the default 'make' target ('make all'), with or without +command-line options, during the Parrot build process. + +Programs, templates and configuration files invoked by 'make install' or +'make install-dev' should be placed in tools/release/. + +Other things being equal, programs, templates and configuration files invoked +by all other 'make' targets (e.g., 'make headerizer') should be placed in +tools/dev/. diff -Nru parrot-2.7.0/tools/dev/addopstags.pl parrot-2.8.0/tools/dev/addopstags.pl --- parrot-2.7.0/tools/dev/addopstags.pl 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/addopstags.pl 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,54 @@ +#!perl + +# Copyright (C) 2004-2006, Parrot Foundation. +# $Id: addopstags.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +use strict; +use warnings; + +=head1 NAME + +tools/dev/addopstags.pl - add src/ops/*.ops to tags + +=head1 SYNOPSIS + + perl tools/dev/addopstags.pl src/ops/*.ops + +=head1 DESCRIPTION + +Add src/ops/*.ops to tags file. + +=cut + +my %seen; +my @tags; + +# Pull ops tags +while (<>) { + if (/\bop \s+ (\w+) \s* \(/x) { + next if $seen{$1}++; + + # tag file excmd xflags + push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n"; + } +} +continue { + close ARGV if eof; # reset $. +} + +# Pull existing tags +open my $T, '<', 'tags'; +push @tags, <$T>; +close $T; + +# Spit 'em out sorted +open $T, '>', 'tags'; +print $T sort @tags; +close $T; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/dev/as2c.pl parrot-2.8.0/tools/dev/as2c.pl --- parrot-2.7.0/tools/dev/as2c.pl 2009-03-12 09:10:20.000000000 +0000 +++ parrot-2.8.0/tools/dev/as2c.pl 2010-09-21 07:48:52.000000000 +0000 @@ -2,20 +2,20 @@ # Copyright (C) 2004-2007, Parrot Foundation. -# $Id: as2c.pl 37342 2009-03-12 04:52:54Z Util $ +# $Id: as2c.pl 48605 2010-08-23 00:52:05Z jkeenan $ =head1 NAME -as2c.pl - convert gas assembler listing to i386 code array +as2c.pl - convert GNU Assembler listing to i386 code array =head1 DESCRIPTION -The plan behind of as2c.pl is to create compiler independent -machine code for an architecture. Code in e.g. masm, gas, nasm syntax -doesn't fit all compilers. Therefore as2c.pl translates gas syntax to a +The plan behind of F is to create compiler independent +machine code for an architecture. Code in, I MASM, GAS, NASM syntax +doesn't fit all compilers. Therefore F translates GAS syntax to a bytestring, which is then used as the asm code. -as2c.pl is used very rarely. Once the code is generated and +F is used very rarely. Once the code is generated and checked in, there's usually no need to change it later. =cut @@ -125,6 +125,16 @@ close $IN; } +=head1 REFERENCES + +GNU Assembler: (GAS) L + +Microsoft Macro Assembler (MASM): L + +Netwide Assembler (NASM) L + +=cut + # Local Variables: # mode: cperl # cperl-indent-level: 4 diff -Nru parrot-2.7.0/tools/dev/dump_pbc.pl parrot-2.8.0/tools/dev/dump_pbc.pl --- parrot-2.7.0/tools/dev/dump_pbc.pl 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/dump_pbc.pl 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,125 @@ +#! perl + +# Copyright (C) 2008, Parrot Foundation. +# $Id: dump_pbc.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=head1 NAME + +tools/dev/dump_pbc.pl - Weave together PBC disassembly with PIR source + +=head1 SYNOPSIS + + perl tools/dev/dump_pbc.pl foo.pbc + +=head1 DESCRIPTION + +dump_pbc.pl uses Parrot's F program to disassemble the opcodes +in a PBC (Parrot ByteCode) file, then weaves the disassembly together with +the original PIR source file(s). This makes it easier to see how the PIR +syntactic sugar is desugared into raw Parrot opcodes. + +=head1 BUGS + +This program has only been tested for a few simple cases. Also, the name +might suggest a different use than its actual purpose. + +While it is not a bug in F per se, there is a line numbering +bug for some PBC opcode sequences that will result in the disassembled +opcodes appearing just before the source lines they represent, rather +than just after. There does not appear to be consensus yet about where +this bug actually resides. + +=cut + +use strict; +use warnings; +use Cwd; +use FindBin; + +my ($PARROT_ROOT, $RUNTIME_DIR); +BEGIN { + $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../.."); + $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot"; +} + +use lib "$PARROT_ROOT/lib"; +use Parrot::Config '%PConfig'; + +my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}"; + +go(@ARGV); + +sub go { + my $pbc = shift; + + # The following mess brought to you by Win32, where pipe open doesn't work, + # and thus its greater security and cleaner error handling are unavailable. + + -f $pbc && -r _ + or die "PBC file '$pbc' does not exist or is not readable.\n"; + + -f $DISASSEMBLER && -x _ + or die "Can't find disassembler '$DISASSEMBLER';" + . "did you remember to make parrot first?\n"; + + my @dis = `$DISASSEMBLER $pbc`; + die "No disassembly; errors: $?, $!" unless @dis; + + my $cur_file = ''; + my $cur_line = -1; + my %cache; + + foreach (@dis) { + if (/^(?:# )?Current Source Filename (.*)/) { + my $found = $1; + $found =~ s/^'//; + $found =~ s/'$//; + if ($cur_file ne $found) { + $cur_file = $found; + $cache{$cur_file} ||= slurp_file($cur_file); + $cur_line = -1; + + print "\n#### $cur_file\n"; + } + } + elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) { + my $int_line = int $line; + my $len_line = length $line; + if ($cur_line != $int_line) { + $cur_line = 0 if $cur_line == -1; + print "\n"; + foreach my $i ($cur_line + 1 .. $int_line) { + my $source_code = $cache{$cur_file}[$i-1]; + # next unless $source_code =~ /\S/; + printf "# %*d: %s", $len_line, $i, $source_code; + print "\n" if $source_code =~ /^\.end/; + } + $cur_line = $int_line; + } + + print ' ' x ($len_line + 4), "$code\n"; + } + } +} + +sub slurp_file { + my $file = shift; + my $source; + + open $source, '<', $file + or open $source, '<', "$PARROT_ROOT/$file" + or open $source, '<', "$RUNTIME_DIR/$file" + or die "Could not open source file '$file': $!"; + + my @lines = <$source>; + + return \@lines; +} + + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/dev/faces.pl parrot-2.8.0/tools/dev/faces.pl --- parrot-2.7.0/tools/dev/faces.pl 2010-03-18 04:06:17.000000000 +0000 +++ parrot-2.8.0/tools/dev/faces.pl 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ #! perl -# $Id: faces.pl 44935 2010-03-15 13:25:15Z coke $ +# $Id: faces.pl 48593 2010-08-21 21:22:59Z jkeenan $ # Copyright (C) 2010, Parrot Foundation. use strict; @@ -7,9 +7,21 @@ use Gravatar::URL; -=for usage +=head1 NAME -use to generate source for http://trac.parrot.org/parrot/wiki/ParrotFaces +faces.pl - Generate source for Parrot wiki ParrotFaces page + +=head1 SYNOPSIS + + perl tools/dev/faces.pl + +=head1 DESCRIPTION + +Used to create L + +=head1 PREREQUISITE + +Gravatar::URL (L). =cut diff -Nru parrot-2.7.0/tools/dev/fetch_languages.pl parrot-2.8.0/tools/dev/fetch_languages.pl --- parrot-2.7.0/tools/dev/fetch_languages.pl 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/tools/dev/fetch_languages.pl 2010-09-21 07:48:52.000000000 +0000 @@ -1,9 +1,10 @@ # Copyright (C) 2009, Parrot Foundation. -# $Id: fetch_languages.pl 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: fetch_languages.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ =head1 NAME -fetch_languages.pl - A helper to fetch language implementations from the SCM repoistories +fetch_languages.pl - Fetch language implementations from their source code +management repositories =head1 SYNOPSIS @@ -230,7 +231,7 @@ { name => 'pir', scm => 'GIT', - repository => 'http://github.com/bacek/pir.git' + repository => 'http://github.com/parrot/pir.git' }, { diff -Nru parrot-2.7.0/tools/dev/gen_charset_tables.pl parrot-2.8.0/tools/dev/gen_charset_tables.pl --- parrot-2.7.0/tools/dev/gen_charset_tables.pl 2010-04-30 14:50:45.000000000 +0000 +++ parrot-2.8.0/tools/dev/gen_charset_tables.pl 2010-09-21 07:48:52.000000000 +0000 @@ -20,10 +20,10 @@ =cut my ($svnid) = - '$Id: gen_charset_tables.pl 46044 2010-04-26 20:48:58Z petdance $' =~ + '$Id: gen_charset_tables.pl 48833 2010-09-07 22:58:38Z nwellnhof $' =~ /^\$[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' ); diff -Nru parrot-2.7.0/tools/dev/headerizer.pl parrot-2.8.0/tools/dev/headerizer.pl --- parrot-2.7.0/tools/dev/headerizer.pl 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/headerizer.pl 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,468 @@ +#! perl +# Copyright (C) 2001-2010, Parrot Foundation. +# $Id: headerizer.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=head1 NAME + +tools/dev/headerizer.pl - Generates the function header parts of .h +files from .c files + +=head1 SYNOPSIS + + $ perl tools/dev/headerizer.pl [object files] + +Generates C function declarations based on the function definitions in +the C source code. + +=head1 DESCRIPTION + +The headerizer works off of directives in the source and header files. + +One source file's public declarations can only go into one header file. +However, one header file can have declarations from multiple source files. +In other words, headers-to-source is one-to-many. + +=over 4 + +=item C F / C F + +Marks the beginning and end of a block of declarations in a header file. + + # In file foo.h + /* HEADERIZER BEGIN: src/foo.c */ + /* HEADERIZER END: src/foo.c */ + + /* HEADERIZER BEGIN: src/bar.c */ + /* HEADERIZER END: src/bar.c */ + +=item C F + +Tells the headerizer where the declarations for the functions should go + + # In file foo.c + /* HEADERIZER HFILE: foo.h */ + + # In file bar.c + /* HEADERIZER HFILE: foo.h */ + +=back + +=head1 COMMAND-LINE OPTIONS + +=over 4 + +=item C<--macro=X> + +Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT. + +=back + +=cut + +use strict; +use warnings; + +use Getopt::Long; +use lib qw( lib ); +use Parrot::Config; +use Parrot::Headerizer; + +my $headerizer = Parrot::Headerizer->new; + +main(); + +=head1 FUNCTIONS + +=head2 extract_function_declaration_and_update_source( $cfile_name ) + +Extract all the function declarations from the C file specified by +I<$cfile_name>, and update the comment blocks within. + +=cut + +sub extract_function_declarations_and_update_source { + my $cfile_name = shift; + + open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!"; + my $text = join( '', <$fhin> ); + close $fhin; + + my @func_declarations = $headerizer->extract_function_declarations( $text ); + for my $decl ( @func_declarations ) { + my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl ); + my $name = $specs->{name}; + + my $heading = $headerizer->generate_documentation_signature($decl); + + $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do { + warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD + } + } + open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!"; + print {$fhout} $text; + close $fhout; + + return @func_declarations; +} + + +sub attrs_from_args { + my $func = shift; + my @args = @_; + + my @attrs = (); + my @mods = (); + + my $name = $func->{name}; + my $file = $func->{file}; + my $n = 0; + for my $arg (@args) { + ++$n; + if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) { + my $modified = $1; + if ( $modified =~ s/.*\*/*/ ) { + # We're OK + } + else { + $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"}; + } + push( @mods, "FUNC_MODIFIES($modified)" ); + } + if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) { + push( @attrs, "__attribute__nonnull__($n)" ); + } + if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) { + if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs + $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} ); + } + } + if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) { + $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} ); + } + } + + return (@attrs,@mods); +} + +sub asserts_from_args { + my @args = @_; + my @asserts; + + for my $arg (@args) { + if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) { + my $var = $2; + if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) { + # argument is a function pointer + $var = $1; + } + else { + # try to isolate the variable's name; + # strip off everything before the final space or asterisk. + $var =~ s{.+[* ]([^* ]+)$}{$1}; + # strip off a trailing "[]", if any. + $var =~ s{\[\]$}{}; + } + push( @asserts, "PARROT_ASSERT_ARG($var)" ); + } + if( $arg eq 'PARROT_INTERP' ) { + push( @asserts, "PARROT_ASSERT_ARG(interp)" ); + } + } + + return (@asserts); +} + +sub make_function_decls { + my @funcs = @_; + + my @decls; + foreach my $func (@funcs) { + my $multiline = 0; + + my $return = $func->{return_type}; + my $alt_void = ' '; + + # Splint can't handle /*@alt void@*/ on pointers, although this page + # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html + # seems to say that we can. + if ( $func->{is_ignorable} && ($return !~ /\*/) ) { + $alt_void = " /*\@alt void@*/\n"; + } + + my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} ); + $decl = "static $decl" if $func->{is_static}; + + my @args = @{ $func->{args} }; + my @attrs = attrs_from_args( $func, @args ); + + for my $arg (@args) { + if ( $arg =~ m{SHIM\((.+)\)} ) { + $arg = $1; + if ( $func->{is_static} || ( $arg =~ /\*/ ) ) { + $arg = "SHIM($arg)"; + } + else { + $arg = "NULLOK($arg)"; + } + } + } + + my $argline = join( ", ", @args ); + if ( length( $decl . $argline ) <= 75 ) { + $decl = "$decl$argline)"; + } + else { + if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) { + $decl .= ( shift @args ); + $decl .= "," if @args; + } + $argline = join( ",", map { "\n\t$_" } @args ); + $decl = "$decl$argline)"; + $multiline = 1; + } + + my $attrs = join( "", map { "\n\t\t$_" } @attrs ); + if ($attrs) { + $decl .= $attrs; + $multiline = 1; + } + my @macros = @{ $func->{macros} }; + $multiline = 1 if @macros; + + $decl .= $multiline ? ";\n" : ";"; + $decl = join( "\n", @macros, $decl ); + $decl =~ s/\t/ /g; + push( @decls, $decl ); + } + + foreach my $func (@funcs) { + my @args = @{ $func->{args} }; + my @asserts = asserts_from_args( @args ); + + my $assert = "#define ASSERT_ARGS_" . $func->{name}; + if(length($func->{name}) > 29) { + $assert .= " \\\n "; + } + $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = ("; + if(@asserts) { + $assert .= "\\\n "; + $assert .= join(" \\\n , ", @asserts); + } + else { + $assert .= "0"; + } + $assert .= ")"; + push(@decls, $assert); + } + + return @decls; +} + +sub read_file { + my $filename = shift; + + open my $fh, '<', $filename or die "couldn't read '$filename': $!"; + my $text = do { local $/ = undef; <$fh> }; + close $fh; + + return $text; +} + +sub write_file { + my $filename = shift; + my $text = shift; + + open my $fh, '>', $filename or die "couldn't write '$filename': $!"; + print {$fh} $text; + close $fh; +} + +sub replace_headerized_declarations { + my $source_code = shift; + my $sourcefile = shift; + my $hfile = shift; + my @funcs = @_; + + # Allow a way to not headerize statics + if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) { + return $source_code; + } + + @funcs = sort api_first_then_alpha @funcs; + + my @function_decls = make_function_decls(@funcs); + + my $function_decls = join( "\n", @function_decls ); + my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n}; + my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?}; + my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */}; + + $source_code =~ + s{($STARTMARKER)(?:.*?)($ENDMARKER)} + {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s + or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n"; + + return $source_code; +} + +sub api_first_then_alpha { + return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) ) + || ( lc $a->{name} cmp lc $b->{name} ); +} + +sub main { + my $macro_match; + GetOptions( + 'macro=s' => \$macro_match, + ) or exit(1); + + die 'No files specified.' unless @ARGV; + my %ofiles; + ++$ofiles{$_} for @ARGV; + my @ofiles = sort keys %ofiles; + for (@ofiles) { + print "$_ is specified more than once.\n" if $ofiles{$_} > 1; + } + my %sourcefiles; + my %sourcefiles_with_statics; + my %api; + + # Walk the object files and find corresponding source (either .c or .pmc) + for my $ofile (@ofiles) { + + # 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; + + my $is_yacc = ($ofile =~ /\.y$/); + if ( !$is_yacc ) { + my $sfile = $ofile; + $sfile =~ s/\Q$PConfig{o}\E$/.s/; + next if -f $sfile; + } + + my $cfile = $ofile; + $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc + or die "$cfile doesn't look like an object file"; + + my $pmcfile = $ofile; + $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/; + + my $from_pmc = -f $pmcfile && !$is_yacc; + + my $sourcefile = $from_pmc ? $pmcfile : $cfile; + + my $source_code = read_file( $sourcefile ); + die qq{can't find HEADERIZER HFILE directive in "$sourcefile"} + unless $source_code =~ + m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx; + + my $hfile = $1; + if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) { + die qq{"$hfile" not found (referenced from "$sourcefile")}; + } + + my @decls; + if ( $macro_match ) { + @decls = $headerizer->extract_function_declarations( $source_code ); + } + else { + @decls = extract_function_declarations_and_update_source( $sourcefile ); + } + + for my $decl (@decls) { + my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl ); + push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none'; + push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static}; + if ( $macro_match ) { + if ( grep { $_ eq $macro_match } @{$components->{macros}} ) { + push( @{ $api{$sourcefile} }, $components ); + } + } + } + } # for @cfiles + + if ( $macro_match ) { + my $nfuncs = 0; + for my $cfile ( sort keys %api ) { + my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}}; + print "$cfile\n"; + for my $func ( @funcs ) { + print " $func->{name}\n"; + ++$nfuncs; + } + } + my $s = $nfuncs == 1 ? '' : 's'; + print "$nfuncs $macro_match function$s\n"; + } + else { # Normal headerization and updating + # Update all the .h files + for my $hfile ( sort keys %sourcefiles ) { + my $sourcefiles = $sourcefiles{$hfile}; + + my $header = read_file($hfile); + + for my $cfile ( sort keys %{$sourcefiles} ) { + my @funcs = @{ $sourcefiles->{$cfile} }; + @funcs = grep { not $_->{is_static} } @funcs; # skip statics + + $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs ); + } + + write_file( $hfile, $header ); + } + + # Update all the .c files in place + for my $cfile ( sort keys %sourcefiles_with_statics ) { + my @funcs = @{ $sourcefiles_with_statics{$cfile} }; + @funcs = grep { $_->{is_static} } @funcs; + + my $source = read_file($cfile); + $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs ); + + write_file( $cfile, $source ); + } + print "Headerization complete.\n"; + } + + my %warnings = %{$headerizer->{warnings}}; + if ( keys %warnings ) { + my $nwarnings = 0; + my $nwarningfuncs = 0; + my $nwarningfiles = 0; + for my $file ( sort keys %warnings ) { + ++$nwarningfiles; + print "$file\n"; + my $funcs = $warnings{$file}; + for my $func ( sort keys %{$funcs} ) { + ++$nwarningfuncs; + for my $error ( @{ $funcs->{$func} } ) { + print " $func: $error\n"; + ++$nwarnings; + } + } + } + + print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n"; + } + + return; +} + +# From earlier documentation: +# * Generate docs from funcs +# * Somehow handle static functions in the source file +# * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them +# * Support for multiple .c files pointing at the same .h file +# * Does NOT remove all blocks in the .h file, so if a .c file +# disappears, its block is "orphaned" and will remain there. + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/dev/mk_gitignore.pl parrot-2.8.0/tools/dev/mk_gitignore.pl --- parrot-2.7.0/tools/dev/mk_gitignore.pl 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/tools/dev/mk_gitignore.pl 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ ##! perl -# $Id: mk_gitignore.pl 48412 2010-08-11 05:38:18Z plobsing $ +# $Id: mk_gitignore.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ # Copyright (C) 2009, Parrot Foundation. use strict; diff -Nru parrot-2.7.0/tools/dev/mk_language_shell.in parrot-2.8.0/tools/dev/mk_language_shell.in --- parrot-2.7.0/tools/dev/mk_language_shell.in 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/mk_language_shell.in 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,787 @@ +#!@perl@ +# Copyright (C) 2007-2010, Parrot Foundation. +# $Id: mk_language_shell.in 48659 2010-08-25 23:16:08Z gerd $ + +=head1 NAME + +tools/dev/mk_language_shell.pl -- create initial files for a new language implementation + +=head1 SYNOPSIS + + % perl tools/dev/mk_language_shell.pl [options] Xyz [path] + +option: + + --with-doc + --with-ops + --with-pmc + +=head1 DESCRIPTION + +This script populates a directory with files for building a +new language translator in Parrot. The first argument is the +name of the language to be built. The C argument +says where to populate the directory, if no C is specified +then it is taken to be a subdirectory of the current directory +with the same name as the language (converted to lowercase). + +For a language 'Xyz', this script will create the following +files and directories (relative to C, which defaults +to F if an explicit C isn't given): + + PARROT_REVISION + README + setup.pir + xyz.pir + doc/running.pod + doc/Xyz.pod + src/Xyz.pir + src/Xyz/Grammar.pm + src/Xyz/Actions.pm + src/Xyz/Compiler.pm + src/Xyz/Runtime.pm + src/pmc/xyz.pmc + src/ops/xyz.ops + src/xyz.pir + t/00-sanity.t + xyz/.ignore + +Any files that already exist are skipped, so this script can +be used to repopulate a language directory with omitted files. + +If all goes well, after creating the language shell one can simply +change to the language directory and type + + $ parrot setup.pir + $ parrot setup.pir test + +to verify that the new language compiles and configures properly. + +=cut + +use strict; +use warnings; + +use FindBin qw($Bin); +use lib "$Bin/../lib"; # install location +use lib "$Bin/../../lib"; # build location + +use File::Path; +use File::Spec; +use Getopt::Long; + +use Parrot::Config qw/ %PConfig /; + +my ($with_doc, $with_ops, $with_pmc); +GetOptions( + 'with-doc' => \$with_doc, + 'with-ops' => \$with_ops, + 'with-pmc' => \$with_pmc, +); + +unless (@ARGV) { + die "usage: $0 language [path]\n"; +} + +## determine the language we're trying to build +my $lang = $ARGV[0]; +my $lclang = lc $lang; +my $uclang = uc $lang; + +## the name and revision of the script, for use in the generated README +my $script = $0; +my $rev = '$Revision: 48659 $'; +$rev =~ s/^\D*(\d+)\D*$/$1/; + +my $no_doc = $with_doc ? '' : '#'; +my $no_ops = $with_ops ? '' : '#'; +my $no_pmc = $with_pmc ? '' : '#'; + +## get the path from the command line, or if not supplied then +## use $lclang. +my $path = $ARGV[1] || $lclang; + +## now loop through the file information (see below), substituting +## any instances of @lang@, @lclang@, @UCLANG@, and @Id@ with +## the language name or the svn id tag. If the line has the form +## __filepath__, then start a new file. +my $fh; +while () { + last if /^__DATA__$/; + s{\@lang\@} {$lang}g; + s{\@lclang\@} {$lclang}ig; + s{\@UCLANG\@} {$uclang}ig; + s{\@Id\@} {\$Id\$}ig; + s{\@script\@} {$script}ig; + s{\@rev\@} {$rev}ig; + s{\@no_doc\@} {$no_doc}ig; + s{\@no_ops\@} {$no_ops}ig; + s{\@no_pmc\@} {$no_pmc}ig; + s{\@rev\@} {$rev}ig; + if (/^__(.*)__$/) { start_new_file("$path$PConfig{slash}$1"); } + elsif ($fh) { print $fh $_; } +} +## close the last file +close($fh) if $fh; + +## we're done +1; + + +## this function closes any previous opened file, and determines +## if we're creating a new file. It also calls C to +## create any needed parent subdirectories. +sub start_new_file { + my ($filepath) = @_; + if ($fh) { + close $fh; + undef $fh; + } + if (-e $filepath) { + print "skipping $filepath\n"; + return; + } + if (!$with_doc and $filepath =~ /doc/) { + print "no doc: skipping $filepath\n"; + return; + } + if (!$with_ops and $filepath =~ /ops/) { + print "no ops: skipping $filepath\n"; + return; + } + if (!$with_pmc and $filepath =~ /pmc/) { + print "no pmc: skipping $filepath\n"; + return; + } + if (!$with_ops and!$with_pmc and $filepath =~ /dynext/) { + print "no dynext: skipping $filepath\n"; + return; + } + my ($volume, $dir, $base) = File::Spec->splitpath($filepath); + my $filedir = File::Spec->catpath($volume, $dir); + unless (-d $filedir) { + print "creating $filedir\n"; + mkpath( [ $filedir ], 0, 0777 ); + } + print "creating $filepath\n"; + open $fh, '>', $filepath; + + return; +} + + + +### The section below contains the text of the files to be created. +### The name of the file to be created is given as C<__filepath__>, +### and all subsequent lines up to the next C<__filepath__> are +### placed in the file (performing substitutions on @lang@, @lclang@, +### @UCLANG@, and @Id@ as appropriate). + +__DATA__ +__README__ +Language '@lang@' was created with @script@, r@rev@. + + $ parrot setup.pir + $ parrot setup.pir test + +__setup.pir__ +#!/usr/bin/env parrot +# @Id@ + +=head1 NAME + +setup.pir - Python distutils style + +=head1 DESCRIPTION + +No Configure step, no Makefile generated. + +=head1 USAGE + + $ parrot setup.pir build + $ parrot setup.pir test + $ sudo parrot setup.pir install + +=cut + +.sub 'main' :main + .param pmc args + $S0 = shift args + load_bytecode 'distutils.pbc' + + .local int reqsvn + $P0 = new 'FileHandle' + $P0.'open'('PARROT_REVISION', 'r') + $S0 = $P0.'readline'() + reqsvn = $S0 + $P0.'close'() + + .local pmc config + config = get_config() + $I0 = config['revision'] + unless $I0 goto L1 + unless reqsvn > $I0 goto L1 + $S1 = "Parrot revision r" + $S0 = reqsvn + $S1 .= $S0 + $S1 .= " required (currently r" + $S0 = $I0 + $S1 .= $S0 + $S1 .= ")\n" + print $S1 + end + L1: + + $P0 = new 'Hash' + $P0['name'] = '@lang@' + $P0['abstract'] = 'the @lang@ compiler' + $P0['description'] = 'the @lang@ for Parrot VM.' + + # build +@no_ops@ $P1 = new 'Hash' +@no_ops@ $P1['@lclang@_ops'] = 'src/ops/@lclang@.ops' +@no_ops@ $P0['dynops'] = $P1 + +@no_pmc@ $P2 = new 'Hash' +@no_pmc@ $P3 = split ' ', 'src/pmc/@lclang@.pmc' +@no_pmc@ $P2['@lclang@_group'] = $P3 +@no_pmc@ $P0['dynpmc'] = $P2 + + $P4 = new 'Hash' + $P4['src/gen_actions.pir'] = 'src/@lang@/Actions.pm' + $P4['src/gen_compiler.pir'] = 'src/@lang@/Compiler.pm' + $P4['src/gen_grammar.pir'] = 'src/@lang@/Grammar.pm' + $P4['src/gen_runtime.pir'] = 'src/@lang@/Runtime.pm' + $P0['pir_nqp-rx'] = $P4 + + $P5 = new 'Hash' + $P6 = split "\n", <<'SOURCES' +src/@lclang@.pir +src/gen_actions.pir +src/gen_compiler.pir +src/gen_grammar.pir +src/gen_runtime.pir +SOURCES + $S0 = pop $P6 + $P5['@lclang@/@lclang@.pbc'] = $P6 + $P5['@lclang@.pbc'] = '@lclang@.pir' + $P0['pbc_pir'] = $P5 + + $P7 = new 'Hash' + $P7['parrot-@lclang@'] = '@lclang@.pbc' + $P0['installable_pbc'] = $P7 + + # test + $S0 = get_parrot() + $S0 .= ' @lclang@.pbc' + $P0['prove_exec'] = $S0 + + # install + $P0['inst_lang'] = '@lclang@/@lclang@.pbc' + + # dist + $P0['doc_files'] = 'README' + + .tailcall setup(args :flat, $P0 :flat :named) +.end + + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: + +__PARROT_REVISION__ +@rev@ +__doc/@lang@.pod__ +# @Id@ + +=head1 @lang@ + +=head1 Design + +=head1 SEE ALSO + +=cut + +# Local Variables: +# fill-column:78 +# End: +# vim: expandtab shiftwidth=4: +__doc/running.pod__ +# @Id@ + +=head1 Running + +This document describes how to use the command line @lclang@ program, which +... + +=head2 Usage + + parrot @lclang@.pbc [OPTIONS] + +or + + parrot-@lclang@@exe [OPTIONS] + +A number of additional options are available: + + -q Quiet mode; suppress output of summary at the end. + +=cut + +# Local Variables: +# fill-column:78 +# End: +# vim: expandtab shiftwidth=4: + +__dynext/.ignore__ + +__@lclang@/.ignore__ + +__@lclang@.pir__ +# @Id@ + +=head1 TITLE + +@lclang@.pir - A @lang@ compiler. + +=head2 Description + +This is the entry point for the @lang@ compiler. + +=head2 Functions + +=over 4 + +=item main(args :slurpy) :main + +Start compilation by passing any command line C +to the @lang@ compiler. + +=cut + +.sub 'main' :main + .param pmc args + + load_language '@lclang@' + + $P0 = compreg '@lang@' + $P1 = $P0.'command_line'(args) +.end + +=back + +=cut + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: + +__src/@lclang@.pir__ +# @Id@ + +=head1 TITLE + +@lclang@.pir - A @lang@ compiler. + +=head2 Description + +This is the base file for the @lang@ compiler. + +This file includes the parsing and grammar rules from +the src/ directory, loads the relevant PGE libraries, +and registers the compiler under the name '@lang@'. + +=head2 Functions + +=over 4 + +=item onload() + +Creates the @lang@ compiler using a C +object. + +=cut + +.HLL '@lclang@' +@no_pmc@.loadlib '@lclang@_group' + +.namespace [] + +.sub '' :anon :load + load_bytecode 'HLL.pbc' + + .local pmc hllns, parrotns, imports + hllns = get_hll_namespace + parrotns = get_root_namespace ['parrot'] + imports = split ' ', 'PAST PCT HLL Regex Hash' + parrotns.'export_to'(hllns, imports) +.end + +.include 'src/gen_grammar.pir' +.include 'src/gen_actions.pir' +.include 'src/gen_compiler.pir' +.include 'src/gen_runtime.pir' + +=back + +=cut + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: + +__src/@lang@/Grammar.pm__ +=begin overview + +This is the grammar for @lang@ in Perl 6 rules. + +=end overview + +grammar @lang@::Grammar is HLL::Grammar; + +token TOP { + + [ $ || <.panic: "Syntax error"> ] +} + +## Lexer items + +# This rule treats # as "comment to eol". +token ws { + + [ '#' \N* \n? | \s+ ]* +} + +## Statements + +rule statementlist { [ | ] ** ';' } + +rule statement { + | + | +} + +proto token statement_control { <...> } +rule statement_control:sym { [ ] ** ',' } +rule statement_control:sym { [ ] ** ',' } + +## Terms + +token term:sym { } +token term:sym { } + +proto token quote { <...> } +token quote:sym<'> { } +token quote:sym<"> { } + +## Operators + +INIT { + @lang@::Grammar.O(':prec, :assoc', '%multiplicative'); + @lang@::Grammar.O(':prec, :assoc', '%additive'); +} + +token circumfix:sym<( )> { '(' <.ws> ')' } + +token infix:sym<*> { ')> } +token infix:sym { ')> } + +token infix:sym<+> { ')> } +token infix:sym<-> { ')> } +__src/@lang@/Actions.pm__ +class @lang@::Actions is HLL::Actions; + +method TOP($/) { + make PAST::Block.new( $.ast , :hll<@lclang@>, :node($/) ); +} + +method statementlist($/) { + my $past := PAST::Stmts.new( :node($/) ); + for $ { $past.push( $_.ast ); } + make $past; +} + +method statement($/) { + make $ ?? $.ast !! $.ast; +} + +method statement_control:sym($/) { + my $past := PAST::Op.new( :name, :pasttype, :node($/) ); + for $ { $past.push( $_.ast ); } + make $past; +} + +method statement_control:sym($/) { + my $past := PAST::Op.new( :name, :pasttype, :node($/) ); + for $ { $past.push( $_.ast ); } + make $past; +} + +method term:sym($/) { make $.ast; } +method term:sym($/) { make $.ast; } + +method quote:sym<'>($/) { make $.ast; } +method quote:sym<">($/) { make $.ast; } + +method circumfix:sym<( )>($/) { make $.ast; } + +__src/@lang@/Compiler.pm__ +class @lang@::Compiler is HLL::Compiler; + +INIT { + @lang@::Compiler.language('@lang@'); + @lang@::Compiler.parsegrammar(@lang@::Grammar); + @lang@::Compiler.parseactions(@lang@::Actions); +} +__src/@lang@/Runtime.pm__ +# language-specific runtime functions go here + +sub print(*@args) { + pir::print(pir::join('', @args)); + 1; +} + +sub say(*@args) { + pir::say(pir::join('', @args)); + 1; +} +__src/pmc/@lclang@.pmc__ +/* +Copyright (C) 20xx, Parrot Foundation. +@Id@ + +=head1 NAME + +src/pmc/@lang@.pmc - @lang@ + +=head1 DESCRIPTION + +These are the vtable functions for the @lang@ class. + +=cut + +=head2 Helper functions + +=over 4 + +=item INTVAL size(INTERP, PMC, PMC) + +*/ + +#include "parrot/parrot.h" + +static INTVAL +size(Interp *interp, PMC* self, PMC* obj) +{ + INTVAL retval; + INTVAL dimension; + INTVAL length; + INTVAL pos; + + if (!obj || PMC_IS_NULL(obj)) { + /* not set, so a simple 1D */ + return VTABLE_get_integer(interp, self); + } + + retval = 1; + dimension = VTABLE_get_integer(interp, obj); + for (pos = 0; pos < dimension; pos++) + { + length = VTABLE_get_integer_keyed_int(interp, obj, pos); + retval *= length; + } + return retval; +} + +/* + +=back + +=head2 Methods + +=over 4 + +=cut + +*/ + +pmclass @lang@ + extends ResizablePMCArray + provides array + group @lclang@_group + auto_attrs + dynpmc + { +/* + +=item C + +initialize the pmc class. Store some constants, etc. + +=cut + +*/ + + void class_init() { + } + + +/* + +=item C + +initialize the instance. + +=cut + +*/ + +void init() { + SUPER(); +}; + +=item C + +Returns a vector-like PMC. + +=cut + +*/ + + METHOD PMC* get() { + PMC* property; + INTVAL array_t; + STRING* property_name; + + property_name = string_from_literal(INTERP, "property"); + shape = VTABLE_getprop(INTERP, SELF, property_name); + if (PMC_IS_NULL(property)) { + /* + * No property has been set yet. This means that we are + * a simple vector + * + * we use our own type here. Perhaps a better way to + * specify it? + */ + /* + array_t = Parrot_pmc_get_type_str(INTERP, + string_from_literal(INTERP, "@lang@")); + */ + property = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); + + VTABLE_set_integer_native(INTERP, property, 1); + VTABLE_set_integer_keyed_int(INTERP, property, 0, + VTABLE_get_integer(INTERP, SELF)); + VTABLE_setprop(INTERP, SELF, property_name, property); + } + RETURN(PMC* property); + } + +/* + +=item C + +Change the existing @lang@ by passing in an existing vector. + +If the new property is larger than our old property, pad the end of the vector +with elements from the beginning. + +If the new property is shorter than our old property, truncate elements from +the end of the vector. + +=cut + +*/ + + METHOD set(PMC *new_property) { + STRING* property_name; + PMC* old_property; + INTVAL old_size, new_size, pos; + + /* save the old property momentarily, set the new property */ + property_name = string_from_literal(INTERP, "property"); + old_property = VTABLE_getprop(INTERP, SELF, property_name); + VTABLE_setprop(INTERP, SELF, property_name, new_property); + + /* how big are these property? */ + old_size = size(INTERP, SELF, old_property); + new_size = size(INTERP, SELF, new_property); + + if (old_size > new_size) { + for (; new_size != old_size; new_size++) { + VTABLE_pop_pmc(INTERP, SELF); + } + } else if (new_size > old_size) { + pos = 0; + for (; new_size != old_size; old_size++, pos++) { + VTABLE_push_pmc(INTERP, SELF, + VTABLE_get_pmc_keyed_int(INTERP, SELF, pos)); + } + } + } + +/* + +=back + +=cut + +*/ + +} + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ +__src/ops/@lclang@.ops__ +/* + * @id@ + * Copyright (C) 20xx, Parrot Foundation. + */ + +BEGIN_OPS_PREAMBLE + +#include "parrot/dynext.h" + +END_OPS_PREAMBLE + +/* Op to get the address of a PMC. */ +inline op @lclang@_pmc_addr(out INT, invar PMC) :base_core { + $1 = (int) $2; + goto NEXT(); +} + +/* + * Local variables: + * c-file-style: "parrot" + * End: + * vim: expandtab shiftwidth=4: + */ + +__t/00-sanity.t__ +# This just checks that the basic parsing and call to builtin say() works. +say '1..4'; +say 'ok 1'; +say 'ok ', 2; +say 'ok ', 2 + 1; +say 'ok', ' ', 4; +__DATA__ + + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: + diff -Nru parrot-2.7.0/tools/dev/mk_language_shell.pl parrot-2.8.0/tools/dev/mk_language_shell.pl --- parrot-2.7.0/tools/dev/mk_language_shell.pl 2010-05-30 21:14:08.000000000 +0000 +++ parrot-2.8.0/tools/dev/mk_language_shell.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,787 +0,0 @@ -#! perl -# Copyright (C) 2007-2010, Parrot Foundation. -# $Id: mk_language_shell.pl 47087 2010-05-28 13:17:32Z fperrad $ - -=head1 NAME - -tools/dev/mk_language_shell.pl -- create initial files for a new language implementation - -=head1 SYNOPSIS - - % perl tools/dev/mk_language_shell.pl [options] Xyz [path] - -option: - - --with-doc - --with-ops - --with-pmc - -=head1 DESCRIPTION - -This script populates a directory with files for building a -new language translator in Parrot. The first argument is the -name of the language to be built. The C argument -says where to populate the directory, if no C is specified -then it is taken to be a subdirectory of the current directory -with the same name as the language (converted to lowercase). - -For a language 'Xyz', this script will create the following -files and directories (relative to C, which defaults -to F if an explicit C isn't given): - - PARROT_REVISION - README - setup.pir - xyz.pir - doc/running.pod - doc/Xyz.pod - src/Xyz.pir - src/Xyz/Grammar.pm - src/Xyz/Actions.pm - src/Xyz/Compiler.pm - src/Xyz/Runtime.pm - src/pmc/xyz.pmc - src/ops/xyz.ops - src/xyz.pir - t/00-sanity.t - xyz/.ignore - -Any files that already exist are skipped, so this script can -be used to repopulate a language directory with omitted files. - -If all goes well, after creating the language shell one can simply -change to the language directory and type - - $ parrot setup.pir - $ parrot setup.pir test - -to verify that the new language compiles and configures properly. - -=cut - -use strict; -use warnings; - -use FindBin qw($Bin); -use lib "$Bin/../lib"; # install location -use lib "$Bin/../../lib"; # build location - -use File::Path; -use File::Spec; -use Getopt::Long; - -use Parrot::Config qw/ %PConfig /; - -my ($with_doc, $with_ops, $with_pmc); -GetOptions( - 'with-doc' => \$with_doc, - 'with-ops' => \$with_ops, - 'with-pmc' => \$with_pmc, -); - -unless (@ARGV) { - die "usage: $0 language [path]\n"; -} - -## determine the language we're trying to build -my $lang = $ARGV[0]; -my $lclang = lc $lang; -my $uclang = uc $lang; - -## the name and revision of the script, for use in the generated README -my $script = $0; -my $rev = '$Revision: 47087 $'; -$rev =~ s/^\D*(\d+)\D*$/$1/; - -my $no_doc = $with_doc ? '' : '#'; -my $no_ops = $with_ops ? '' : '#'; -my $no_pmc = $with_pmc ? '' : '#'; - -## get the path from the command line, or if not supplied then -## use $lclang. -my $path = $ARGV[1] || $lclang; - -## now loop through the file information (see below), substituting -## any instances of @lang@, @lclang@, @UCLANG@, and @Id@ with -## the language name or the svn id tag. If the line has the form -## __filepath__, then start a new file. -my $fh; -while () { - last if /^__DATA__$/; - s{\@lang\@} {$lang}g; - s{\@lclang\@} {$lclang}ig; - s{\@UCLANG\@} {$uclang}ig; - s{\@Id\@} {\$Id\$}ig; - s{\@script\@} {$script}ig; - s{\@rev\@} {$rev}ig; - s{\@no_doc\@} {$no_doc}ig; - s{\@no_ops\@} {$no_ops}ig; - s{\@no_pmc\@} {$no_pmc}ig; - s{\@rev\@} {$rev}ig; - if (/^__(.*)__$/) { start_new_file("$path$PConfig{slash}$1"); } - elsif ($fh) { print $fh $_; } -} -## close the last file -close($fh) if $fh; - -## we're done -1; - - -## this function closes any previous opened file, and determines -## if we're creating a new file. It also calls C to -## create any needed parent subdirectories. -sub start_new_file { - my ($filepath) = @_; - if ($fh) { - close $fh; - undef $fh; - } - if (-e $filepath) { - print "skipping $filepath\n"; - return; - } - if (!$with_doc and $filepath =~ /doc/) { - print "no doc: skipping $filepath\n"; - return; - } - if (!$with_ops and $filepath =~ /ops/) { - print "no ops: skipping $filepath\n"; - return; - } - if (!$with_pmc and $filepath =~ /pmc/) { - print "no pmc: skipping $filepath\n"; - return; - } - if (!$with_ops and!$with_pmc and $filepath =~ /dynext/) { - print "no dynext: skipping $filepath\n"; - return; - } - my ($volume, $dir, $base) = File::Spec->splitpath($filepath); - my $filedir = File::Spec->catpath($volume, $dir); - unless (-d $filedir) { - print "creating $filedir\n"; - mkpath( [ $filedir ], 0, 0777 ); - } - print "creating $filepath\n"; - open $fh, '>', $filepath; - - return; -} - - - -### The section below contains the text of the files to be created. -### The name of the file to be created is given as C<__filepath__>, -### and all subsequent lines up to the next C<__filepath__> are -### placed in the file (performing substitutions on @lang@, @lclang@, -### @UCLANG@, and @Id@ as appropriate). - -__DATA__ -__README__ -Language '@lang@' was created with @script@, r@rev@. - - $ parrot setup.pir - $ parrot setup.pir test - -__setup.pir__ -#!/usr/bin/env parrot -# @Id@ - -=head1 NAME - -setup.pir - Python distutils style - -=head1 DESCRIPTION - -No Configure step, no Makefile generated. - -=head1 USAGE - - $ parrot setup.pir build - $ parrot setup.pir test - $ sudo parrot setup.pir install - -=cut - -.sub 'main' :main - .param pmc args - $S0 = shift args - load_bytecode 'distutils.pbc' - - .local int reqsvn - $P0 = new 'FileHandle' - $P0.'open'('PARROT_REVISION', 'r') - $S0 = $P0.'readline'() - reqsvn = $S0 - $P0.'close'() - - .local pmc config - config = get_config() - $I0 = config['revision'] - unless $I0 goto L1 - unless reqsvn > $I0 goto L1 - $S1 = "Parrot revision r" - $S0 = reqsvn - $S1 .= $S0 - $S1 .= " required (currently r" - $S0 = $I0 - $S1 .= $S0 - $S1 .= ")\n" - print $S1 - end - L1: - - $P0 = new 'Hash' - $P0['name'] = '@lang@' - $P0['abstract'] = 'the @lang@ compiler' - $P0['description'] = 'the @lang@ for Parrot VM.' - - # build -@no_ops@ $P1 = new 'Hash' -@no_ops@ $P1['@lclang@_ops'] = 'src/ops/@lclang@.ops' -@no_ops@ $P0['dynops'] = $P1 - -@no_pmc@ $P2 = new 'Hash' -@no_pmc@ $P3 = split ' ', 'src/pmc/@lclang@.pmc' -@no_pmc@ $P2['@lclang@_group'] = $P3 -@no_pmc@ $P0['dynpmc'] = $P2 - - $P4 = new 'Hash' - $P4['src/gen_actions.pir'] = 'src/@lang@/Actions.pm' - $P4['src/gen_compiler.pir'] = 'src/@lang@/Compiler.pm' - $P4['src/gen_grammar.pir'] = 'src/@lang@/Grammar.pm' - $P4['src/gen_runtime.pir'] = 'src/@lang@/Runtime.pm' - $P0['pir_nqp-rx'] = $P4 - - $P5 = new 'Hash' - $P6 = split "\n", <<'SOURCES' -src/@lclang@.pir -src/gen_actions.pir -src/gen_compiler.pir -src/gen_grammar.pir -src/gen_runtime.pir -SOURCES - $S0 = pop $P6 - $P5['@lclang@/@lclang@.pbc'] = $P6 - $P5['@lclang@.pbc'] = '@lclang@.pir' - $P0['pbc_pir'] = $P5 - - $P7 = new 'Hash' - $P7['parrot-@lclang@'] = '@lclang@.pbc' - $P0['installable_pbc'] = $P7 - - # test - $S0 = get_parrot() - $S0 .= ' @lclang@.pbc' - $P0['prove_exec'] = $S0 - - # install - $P0['inst_lang'] = '@lclang@/@lclang@.pbc' - - # dist - $P0['doc_files'] = 'README' - - .tailcall setup(args :flat, $P0 :flat :named) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - -__PARROT_REVISION__ -@rev@ -__doc/@lang@.pod__ -# @Id@ - -=head1 @lang@ - -=head1 Design - -=head1 SEE ALSO - -=cut - -# Local Variables: -# fill-column:78 -# End: -# vim: expandtab shiftwidth=4: -__doc/running.pod__ -# @Id@ - -=head1 Running - -This document describes how to use the command line @lclang@ program, which -... - -=head2 Usage - - parrot @lclang@.pbc [OPTIONS] - -or - - parrot-@lclang@@exe [OPTIONS] - -A number of additional options are available: - - -q Quiet mode; suppress output of summary at the end. - -=cut - -# Local Variables: -# fill-column:78 -# End: -# vim: expandtab shiftwidth=4: - -__dynext/.ignore__ - -__@lclang@/.ignore__ - -__@lclang@.pir__ -# @Id@ - -=head1 TITLE - -@lclang@.pir - A @lang@ compiler. - -=head2 Description - -This is the entry point for the @lang@ compiler. - -=head2 Functions - -=over 4 - -=item main(args :slurpy) :main - -Start compilation by passing any command line C -to the @lang@ compiler. - -=cut - -.sub 'main' :main - .param pmc args - - load_language '@lclang@' - - $P0 = compreg '@lang@' - $P1 = $P0.'command_line'(args) -.end - -=back - -=cut - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - -__src/@lclang@.pir__ -# @Id@ - -=head1 TITLE - -@lclang@.pir - A @lang@ compiler. - -=head2 Description - -This is the base file for the @lang@ compiler. - -This file includes the parsing and grammar rules from -the src/ directory, loads the relevant PGE libraries, -and registers the compiler under the name '@lang@'. - -=head2 Functions - -=over 4 - -=item onload() - -Creates the @lang@ compiler using a C -object. - -=cut - -.HLL '@lclang@' -@no_pmc@.loadlib '@lclang@_group' - -.namespace [] - -.sub '' :anon :load - load_bytecode 'HLL.pbc' - - .local pmc hllns, parrotns, imports - hllns = get_hll_namespace - parrotns = get_root_namespace ['parrot'] - imports = split ' ', 'PAST PCT HLL Regex Hash' - parrotns.'export_to'(hllns, imports) -.end - -.include 'src/gen_grammar.pir' -.include 'src/gen_actions.pir' -.include 'src/gen_compiler.pir' -.include 'src/gen_runtime.pir' - -=back - -=cut - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: - -__src/@lang@/Grammar.pm__ -=begin overview - -This is the grammar for @lang@ in Perl 6 rules. - -=end overview - -grammar @lang@::Grammar is HLL::Grammar; - -token TOP { - - [ $ || <.panic: "Syntax error"> ] -} - -## Lexer items - -# This rule treats # as "comment to eol". -token ws { - - [ '#' \N* \n? | \s+ ]* -} - -## Statements - -rule statementlist { [ | ] ** ';' } - -rule statement { - | - | -} - -proto token statement_control { <...> } -rule statement_control:sym { [ ] ** ',' } -rule statement_control:sym { [ ] ** ',' } - -## Terms - -token term:sym { } -token term:sym { } - -proto token quote { <...> } -token quote:sym<'> { } -token quote:sym<"> { } - -## Operators - -INIT { - @lang@::Grammar.O(':prec, :assoc', '%multiplicative'); - @lang@::Grammar.O(':prec, :assoc', '%additive'); -} - -token circumfix:sym<( )> { '(' <.ws> ')' } - -token infix:sym<*> { ')> } -token infix:sym { ')> } - -token infix:sym<+> { ')> } -token infix:sym<-> { ')> } -__src/@lang@/Actions.pm__ -class @lang@::Actions is HLL::Actions; - -method TOP($/) { - make PAST::Block.new( $.ast , :hll<@lclang@>, :node($/) ); -} - -method statementlist($/) { - my $past := PAST::Stmts.new( :node($/) ); - for $ { $past.push( $_.ast ); } - make $past; -} - -method statement($/) { - make $ ?? $.ast !! $.ast; -} - -method statement_control:sym($/) { - my $past := PAST::Op.new( :name, :pasttype, :node($/) ); - for $ { $past.push( $_.ast ); } - make $past; -} - -method statement_control:sym($/) { - my $past := PAST::Op.new( :name, :pasttype, :node($/) ); - for $ { $past.push( $_.ast ); } - make $past; -} - -method term:sym($/) { make $.ast; } -method term:sym($/) { make $.ast; } - -method quote:sym<'>($/) { make $.ast; } -method quote:sym<">($/) { make $.ast; } - -method circumfix:sym<( )>($/) { make $.ast; } - -__src/@lang@/Compiler.pm__ -class @lang@::Compiler is HLL::Compiler; - -INIT { - @lang@::Compiler.language('@lang@'); - @lang@::Compiler.parsegrammar(@lang@::Grammar); - @lang@::Compiler.parseactions(@lang@::Actions); -} -__src/@lang@/Runtime.pm__ -# language-specific runtime functions go here - -sub print(*@args) { - pir::print(pir::join('', @args)); - 1; -} - -sub say(*@args) { - pir::say(pir::join('', @args)); - 1; -} -__src/pmc/@lclang@.pmc__ -/* -Copyright (C) 20xx, Parrot Foundation. -@Id@ - -=head1 NAME - -src/pmc/@lang@.pmc - @lang@ - -=head1 DESCRIPTION - -These are the vtable functions for the @lang@ class. - -=cut - -=head2 Helper functions - -=over 4 - -=item INTVAL size(INTERP, PMC, PMC) - -*/ - -#include "parrot/parrot.h" - -static INTVAL -size(Interp *interp, PMC* self, PMC* obj) -{ - INTVAL retval; - INTVAL dimension; - INTVAL length; - INTVAL pos; - - if (!obj || PMC_IS_NULL(obj)) { - /* not set, so a simple 1D */ - return VTABLE_get_integer(interp, self); - } - - retval = 1; - dimension = VTABLE_get_integer(interp, obj); - for (pos = 0; pos < dimension; pos++) - { - length = VTABLE_get_integer_keyed_int(interp, obj, pos); - retval *= length; - } - return retval; -} - -/* - -=back - -=head2 Methods - -=over 4 - -=cut - -*/ - -pmclass @lang@ - extends ResizablePMCArray - provides array - group @lclang@_group - auto_attrs - dynpmc - { -/* - -=item C - -initialize the pmc class. Store some constants, etc. - -=cut - -*/ - - void class_init() { - } - - -/* - -=item C - -initialize the instance. - -=cut - -*/ - -void init() { - SUPER(); -}; - -=item C - -Returns a vector-like PMC. - -=cut - -*/ - - METHOD PMC* get() { - PMC* property; - INTVAL array_t; - STRING* property_name; - - property_name = string_from_literal(INTERP, "property"); - shape = VTABLE_getprop(INTERP, SELF, property_name); - if (PMC_IS_NULL(property)) { - /* - * No property has been set yet. This means that we are - * a simple vector - * - * we use our own type here. Perhaps a better way to - * specify it? - */ - /* - array_t = Parrot_pmc_get_type_str(INTERP, - string_from_literal(INTERP, "@lang@")); - */ - property = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF)); - - VTABLE_set_integer_native(INTERP, property, 1); - VTABLE_set_integer_keyed_int(INTERP, property, 0, - VTABLE_get_integer(INTERP, SELF)); - VTABLE_setprop(INTERP, SELF, property_name, property); - } - RETURN(PMC* property); - } - -/* - -=item C - -Change the existing @lang@ by passing in an existing vector. - -If the new property is larger than our old property, pad the end of the vector -with elements from the beginning. - -If the new property is shorter than our old property, truncate elements from -the end of the vector. - -=cut - -*/ - - METHOD set(PMC *new_property) { - STRING* property_name; - PMC* old_property; - INTVAL old_size, new_size, pos; - - /* save the old property momentarily, set the new property */ - property_name = string_from_literal(INTERP, "property"); - old_property = VTABLE_getprop(INTERP, SELF, property_name); - VTABLE_setprop(INTERP, SELF, property_name, new_property); - - /* how big are these property? */ - old_size = size(INTERP, SELF, old_property); - new_size = size(INTERP, SELF, new_property); - - if (old_size > new_size) { - for (; new_size != old_size; new_size++) { - VTABLE_pop_pmc(INTERP, SELF); - } - } else if (new_size > old_size) { - pos = 0; - for (; new_size != old_size; old_size++, pos++) { - VTABLE_push_pmc(INTERP, SELF, - VTABLE_get_pmc_keyed_int(INTERP, SELF, pos)); - } - } - } - -/* - -=back - -=cut - -*/ - -} - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ -__src/ops/@lclang@.ops__ -/* - * @id@ - * Copyright (C) 20xx, Parrot Foundation. - */ - -BEGIN_OPS_PREAMBLE - -#include "parrot/dynext.h" - -END_OPS_PREAMBLE - -/* Op to get the address of a PMC. */ -inline op @lclang@_pmc_addr(out INT, invar PMC) :base_core { - $1 = (int) $2; - goto NEXT(); -} - -/* - * Local variables: - * c-file-style: "parrot" - * End: - * vim: expandtab shiftwidth=4: - */ - -__t/00-sanity.t__ -# This just checks that the basic parsing and call to builtin say() works. -say '1..4'; -say 'ok 1'; -say 'ok ', 2; -say 'ok ', 2 + 1; -say 'ok', ' ', 4; -__DATA__ - - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: - diff -Nru parrot-2.7.0/tools/dev/mk_native_pbc parrot-2.8.0/tools/dev/mk_native_pbc --- parrot-2.7.0/tools/dev/mk_native_pbc 2010-04-30 14:50:45.000000000 +0000 +++ parrot-2.8.0/tools/dev/mk_native_pbc 2010-09-21 07:48:52.000000000 +0000 @@ -137,18 +137,6 @@ perl t/harness t/native_pbc/number.t && \ perl t/harness t/native_pbc/string.t -./parrot -o t/native_pbc/annotations.pbc - <', "$to_file" or die "Can't open up $to_file, error $!"; + +# To start, save all the registers, just in case +print $OUTPUT "saveall\n"; + +my @libs; +my ( $cur_package, $line, $cur_section ); + +# Our dispatch table +my (%dispatch) = ( + package => \&package_line, + lib => \&lib_line, + defs => \&def_line, +); + +while ( $line = <$INPUT> ) { + + # Throw away trailing newlines, comments, and whitespace. If the + # line's empty, then off to the next line + chomp $line; + $line =~ s/#.*//; + $line =~ s/\s*$//; + next unless $line; + + # Is it a section line? If so, extract the section and set it. + if ( $line =~ /\[(\w+)\]/ ) { + $cur_section = $1; + next; + } + + # Everything else goes to the handler + $dispatch{$cur_section}->($line); + +} + +# Put the registers back and end +print $OUTPUT "restoreall\n"; +print $OUTPUT "end\n"; +close $OUTPUT; + +sub package_line { + my $line = shift; + + # Trim leading and trailing spaces + $line =~ s/^\s*//; + $line =~ s/\s*$//; + + # Set the global current package + $cur_package = $line; + +} + +sub lib_line { + my $line = shift; + print $OUTPUT "loadlib P1, '$line'\n"; +} + +sub def_line { + my $line = shift; + my ( $return_type, $name, @params ) = split ' ', $line; + unshift @params, $return_type; + my $signature = join( "", @params ); + print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n"; + print $OUTPUT "store_global '${cur_package}::${name}', P2\n"; +} + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/dev/nci_thunk_gen.pir parrot-2.8.0/tools/dev/nci_thunk_gen.pir --- parrot-2.7.0/tools/dev/nci_thunk_gen.pir 2010-07-05 02:47:04.000000000 +0000 +++ parrot-2.8.0/tools/dev/nci_thunk_gen.pir 2010-09-21 07:48:52.000000000 +0000 @@ -1,5 +1,5 @@ # Copyright (C) 2010, Parrot Foundation. -# $Id: nci_thunk_gen.pir 47887 2010-06-27 03:50:08Z petdance $ +# $Id: nci_thunk_gen.pir 48898 2010-09-10 01:25:08Z NotFound $ =head1 NAME @@ -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: nci_thunk_gen.pir 47887 2010-06-27 03:50:08Z petdance $ +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", diff -Nru parrot-2.7.0/tools/dev/nm.pl parrot-2.8.0/tools/dev/nm.pl --- parrot-2.7.0/tools/dev/nm.pl 2009-03-08 22:01:50.000000000 +0000 +++ parrot-2.8.0/tools/dev/nm.pl 2010-09-21 07:48:52.000000000 +0000 @@ -143,7 +143,7 @@ $VERSION = sprintf "%d.%d", q$Revision: 37201 $ =~ /(\d+)/g; # jhi@iki.fi; my $ME = basename($0); -my $RCS_DATE = q$Date: 2009-03-08 12:07:48 +0000 (Sun, 08 Mar 2009) $; +my $RCS_DATE = q$Date: 2009-03-08 13:07:48 +0100 (So, 08. Mär 2009) $; my $nm_cmd = 'nm'; my $nm_opt = ''; diff -Nru parrot-2.7.0/tools/dev/parrot-config.pir parrot-2.8.0/tools/dev/parrot-config.pir --- parrot-2.7.0/tools/dev/parrot-config.pir 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/parrot-config.pir 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,103 @@ +#!/usr/bin/env parrot +# $Id: parrot-config.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=head1 NAME + +config.pir - Print a Parrot configuration item + +=head1 VERSION + +version 0.01 + +=head1 SYNOPSIS + + ./parrot parrot-config.pir VERSION + ./parrot parrot-config.pir ccflags + ./parrot parrot-config.pir --dump + +=head1 DESCRIPTION + +Print out configuration items. + +=head1 AUTHOR + +Leopold Toetsch Elt@toetsch.atE. + +=head1 COPYRIGHT + +Copyright (C) 2004-2009, Parrot Foundation. + +=cut + +.sub _main :main + .param pmc argv + .local int argc + argc = argv + if argc < 2 goto usage + .local pmc interp, conf_hash + .local string key + .include "iglobals.pasm" + interp = getinterp + conf_hash = interp[.IGLOBALS_CONFIG_HASH] + .local int i + i = 1 +loop: + key = argv[i] + if key == '--help' goto usage + if key == '--dump' goto dump + $I0 = defined conf_hash[key] + unless $I0 goto failkey + dec argc + if i < argc goto dumpsome + $S0 = conf_hash[key] + print $S0 + inc i + if i < argc goto loop + print "\n" + end +dumpsome: + key = argv[i] + $I0 = defined conf_hash[key] + unless $I0 goto failkey + print key + print " => '" + $S1 = conf_hash[key] + print $S1 + say "'" + inc i + if i <= argc goto dumpsome + end +failkey: + print " no such key: '" + print key + print "'\n" + end +dump: + .local pmc iterator + iterator = iter conf_hash +iter_loop: + unless iterator goto iter_end + shift $S0, iterator + print $S0 + print " => '" + $S1 = conf_hash[$S0] + print $S1 + say "'" + goto iter_loop +iter_end: + end +usage: + $S0 = argv[0] + $P0 = getinterp + .include 'stdio.pasm' + $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO) + $P1.'print'($S0) + $P1.'print'(" [ [ ... ] | --dump | --help ]\n") + exit 1 +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/dev/pbc_to_exe.pir parrot-2.8.0/tools/dev/pbc_to_exe.pir --- parrot-2.7.0/tools/dev/pbc_to_exe.pir 2010-08-06 11:23:31.000000000 +0000 +++ parrot-2.8.0/tools/dev/pbc_to_exe.pir 2010-09-21 07:48:52.000000000 +0000 @@ -1,6 +1,6 @@ #! parrot # Copyright (C) 2009-2010, Parrot Foundation. -# $Id: pbc_to_exe.pir 48279 2010-08-03 06:11:34Z petdance $ +# $Id: pbc_to_exe.pir 48809 2010-09-06 09:59:02Z gerd $ =head1 NAME @@ -18,10 +18,10 @@ pbc_to_exe my.pbc --install => installable_my.exe -Warning! With --install there must be no directory prefix in the first arg yet. - =cut +.include 'interpcores.pasm' + .sub 'main' :main .param pmc argv @@ -31,8 +31,10 @@ .local string cfile .local string objfile .local string exefile + .local int runcore + .local int install - (infile :optional, cfile :optional, objfile :optional, exefile :optional) = 'handle_args'(argv) + (infile, cfile, objfile, exefile, runcore, install) = 'handle_args'(argv) unless infile > '' goto err_infile .local string code_type @@ -66,6 +68,10 @@ print outfh, codestring + print outfh, '#define RUNCORE ' + print outfh, runcore + print outfh, "\n" + print outfh, <<'MAIN' int main(int argc, const char *argv[]) { @@ -86,6 +92,7 @@ Parrot_init_stacktop(interp, &interp); Parrot_set_executable_name(interp, Parrot_str_new(interp, argv[0], 0)); + Parrot_set_run_core(interp, (Parrot_Run_core_t)RUNCORE); Parrot_set_flag(interp, PARROT_DESTROY_FLAG); pf = PackFile_new(interp, 0); @@ -122,8 +129,8 @@ no_extra: - 'compile_file'(cfile, objfile) - 'link_file'(objfile, exefile, extra_obj) + 'compile_file'(cfile, objfile, install) + 'link_file'(objfile, exefile, extra_obj, install) .return () err_infile: @@ -143,49 +150,99 @@ obj = $P0['o'] exe = $P0['exe'] - .local pmc args - args = argv - - .local int argc - argc = args + load_bytecode 'Getopt/Obj.pbc' + .local pmc getopt + getopt = new ['Getopt';'Obj'] + push getopt, 'install|i' + push getopt, 'runcore|R:s' + push getopt, 'output|o:s' + push getopt, 'help|h' + + $P0 = shift argv # ignore program name + .local pmc opts + opts = getopt.'get_options'(argv) + + .local int help + .local int install + .local string runcore + .local string outfile + help = opts['help'] + install = opts['install'] + runcore = opts['runcore'] + outfile = opts['output'] + + unless help goto end_help + $P0 = getstderr + print $P0, <<'HELP' +pbc_to_exe [options] + Options: + -h --help + -i --install + -R --runcore=slow|fast + -o --output=FILE +HELP + exit 0 + end_help: - if argc == 2 goto proper_args - if argc == 3 goto check_install - .return () - - check_install: - .local string infile, install + .local string infile + infile = shift argv - $P0 = shift args - infile = shift args - install = shift args - if install == '--install' goto proper_install - .return () + $S0 = substr infile, -4, 4 + $S0 = downcase $S0 + unless $S0 != '.pbc' goto done_pbc_extn_check + die "input pbc file name does not end in '.pbc'" + done_pbc_extn_check: - proper_install: .local string cfile, objfile, exefile + if outfile == '' goto no_outfile + $I0 = length exe + $I1 = - $I0 + $S0 = substr outfile, $I1, $I0 + $S0 = downcase $S0 + $S1 = downcase exe + unless $S0 != $S1 goto done_exe_extn_check + $S0 = "output executable name does not end in `" . exe + $S0 = $S0 . "'" + die $S0 + done_exe_extn_check: + outfile = replace outfile, $I1, $I0, '' + + cfile = outfile . '.c' + objfile = outfile . obj + exefile = outfile . exe + goto end_outfile + no_outfile: + # substitute .c for .pbc + # remove .c for executable + outfile = replace infile, -4, 4, '' # remove .pbc extension + cfile = outfile . '.c' + objfile = outfile . obj + exefile = outfile . exe + unless install goto end_installable + exefile = 'prepend_installable'(exefile) + end_installable: + end_outfile: + + .local int runcore_code + unless runcore == 'slow' goto end_slow_core + runcore_code = .PARROT_SLOW_CORE + goto done_runcore + end_slow_core: + unless runcore == 'fast' goto end_fast_core + runcore_code = .PARROT_FAST_CORE + goto done_runcore + end_fast_core: + unless runcore == '' goto end_unspecified_core + runcore_code = .PARROT_FAST_CORE + goto done_runcore + end_unspecified_core: + # invalid runcore name + $S0 = "Unsupported runcore: `" . runcore + $S0 = $S0 . "'" + die $S0 + done_runcore: - cfile = 'replace_pbc_extension'(infile, '.c') - objfile = 'replace_pbc_extension'(infile, obj) - $S0 = 'replace_pbc_extension'(infile, exe) - exefile = 'prepend_installable'($S0) - - .return(infile, cfile, objfile, exefile) - - proper_args: - - $P0 = shift args - infile = shift args - - cfile = 'replace_pbc_extension'(infile, '.c') - objfile = 'replace_pbc_extension'(infile, obj) - exefile = 'replace_pbc_extension'(infile, exe) - - # substitute .c for .pbc - # remove .c for executable - - # TODO this should complain about results/returns mismatch - .return(infile, cfile, objfile, exefile) + .return (infile, cfile, objfile, exefile, runcore_code, install) .end .sub 'determine_code_type' @@ -518,13 +575,14 @@ .sub 'compile_file' .param string cfile .param string objfile - .param int install :optional + .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'] @@ -558,6 +616,8 @@ compile .= pathquote compile .= ' ' compile .= ccflags + compile .= ' ' + compile .= optimize compile .= ' -c ' compile .= cfile @@ -578,7 +638,7 @@ .param string objfile .param string exefile .param string extra_obj - .param int install :optional + .param int install $P0 = '_config'() .local string cc, link, link_dynamic, linkflags, ld_out, libparrot, libs, o @@ -607,7 +667,7 @@ config = concat build_dir, slash config .= 'src' config .= slash - if exeprefix == 'installable_' goto config_to_install + if install goto config_to_install config .= 'parrot_config' goto config_cont config_to_install: diff -Nru parrot-2.7.0/tools/dev/perlcritic-cage.conf parrot-2.8.0/tools/dev/perlcritic-cage.conf --- parrot-2.7.0/tools/dev/perlcritic-cage.conf 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/perlcritic-cage.conf 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,37 @@ +# A more stringent set of rules for cage cleaners + +[-CodeLayout::ProhibitParensWithBuiltins] +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 + +[-CodeLayout::RequireTidyCode] + +[-ControlStructures::ProhibitPostfixControls] +[-ControlStructures::ProhibitUnlessBlocks] + +[-Documentation::PodSpelling] +[-Documentation::RequirePodAtEnd] +[-Documentation::RequirePodSections] + +[-ErrorHandling::RequireCarping] + +[-InputOutput::ProhibitBacktickOperators] +[-InputOutput::ProhibitInteractiveTest] +[-InputOutput::RequireCheckedSyscalls] +functions = :builtins +exclude_functions = print + +[-Miscellanea::RequireRcsKeywords] + +[-Modules::RequireVersionVar] + +[-RegularExpressions::ProhibitEscapedMetacharacters] +[-RegularExpressions::RequireDotMatchAnything] +[-RegularExpressions::RequireExtendedFormatting] +[-RegularExpressions::RequireLineBoundaryMatching] + +[-ValuesAndExpressions::ProhibitConstantPragma] +[-ValuesAndExpressions::ProhibitEmptyQuotes] +[-ValuesAndExpressions::ProhibitMagicNumbers] + +[-Variables::ProhibitPunctuationVars] diff -Nru parrot-2.7.0/tools/dev/perlcritic.conf parrot-2.8.0/tools/dev/perlcritic.conf --- parrot-2.7.0/tools/dev/perlcritic.conf 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/perlcritic.conf 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,75 @@ +verbose = 3 + +# not all the profiles listed here are installed by default, even if you have +# Perl::Critic. Shhhh. +profile-strictness = quiet + +[BuiltinFunctions::ProhibitStringySplit] +add_themes = parrot + +[CodeLayout::ProhibitDuplicateCoda] +add_themes = parrot + +[CodeLayout::ProhibitHardTabs] +allow_leading_tabs = 0 +add_themes = parrot + +[CodeLayout::ProhibitTrailingWhitespace] +add_themes = parrot + +[CodeLayout::RequireTidyCode] +perltidyrc = tools/dev/perltidy.conf +add_themes = extra + +[CodeLayout::UseParrotCoda] +add_themes = parrot + +[InputOutput::ProhibitBarewordFileHandles] +add_themes = parrot + +[InputOutput::ProhibitTwoArgOpen] +add_themes = parrot + +[NamingConventions::ProhibitAmbiguousNames] +# remove abstract from the list of forbidden names +forbid = bases close contract last left no record right second set +add_themes = extra + +[Subroutines::ProhibitBuiltinHomonyms] +add_themes = extra + +[Subroutines::ProhibitExplicitReturnUndef] +add_themes = parrot + +[Subroutines::ProhibitSubroutinePrototypes] +add_themes = parrot + +[Subroutines::RequireFinalReturn] +add_themes = extra + +[TestingAndDebugging::MisplacedShebang] +add_themes = parrot + +[TestingAndDebugging::ProhibitShebangWarningsArg] +add_themes = parrot + +[TestingAndDebugging::RequirePortableShebang] +add_themes = parrot + +[TestingAndDebugging::RequireUseStrict] +add_themes = parrot + +[TestingAndDebugging::RequireUseWarnings] +add_themes = parrot + +[ValuesAndExpressions::ProhibitInterpolationOfLiterals] +add_themes = extra + +[Variables::ProhibitConditionalDeclarations] +add_themes = parrot + +[Bangs::ProhibitFlagComments] +add_themes = extra + +[Bangs::ProhibitRefProtoOrProto] +add_themes = extra diff -Nru parrot-2.7.0/tools/dev/perltidy.conf parrot-2.8.0/tools/dev/perltidy.conf --- parrot-2.7.0/tools/dev/perltidy.conf 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/perltidy.conf 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,15 @@ +# A declarative version of PDD07 for perl. + +# Must apply... + +-l=100 # Source line width is limited to 100 characters. +-i=4 # must be indented four columns (no tabs) +-ola # Labels (including case labels) must be outdented two columns +-ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line. +-ce # Cuddled elses are forbidden: i.e. avoid } else { . + +# Nice to haves... + +# Freeze new lines; some really short lines look good the way they +# are, this should stop perltidy from merging them together +-fnl diff -Nru parrot-2.7.0/tools/dev/README parrot-2.8.0/tools/dev/README --- parrot-2.7.0/tools/dev/README 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/README 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,7 @@ +# $Id: README 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ +README for tools/dev/ + +This directory is intended to hold programs, templates and configuration files +found useful by Parrot developed other than those (a) invoked by the default +'make' target ('make all'), with or without command-line options, during the +Parrot build process; or (b) invoked by 'make install' or 'make install-dev'. diff -Nru parrot-2.7.0/tools/dev/update_copyright.pl parrot-2.8.0/tools/dev/update_copyright.pl --- parrot-2.7.0/tools/dev/update_copyright.pl 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/dev/update_copyright.pl 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,63 @@ +#! perl +# $Id: update_copyright.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +# Copyright (C) 2008, Parrot Foundation. + +use strict; +use warnings; +use Fatal qw( open close ); + +=head1 NAME + +F + +=head1 DESCRIPTION + +Given a list of files as command line arguments, update the copyright +notice to go from the earliest year noted to the current year. + +Edits the files in place. You should update the copyright on a modified +file before you commit it back to the repository. + +=cut + +use lib 'lib'; +use Parrot::Test; + +# Accept a little fuzz in the original copyright notice.. +my $copyright_re = qr/ + Copyright \s+ \(C\) \s+ + (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s* + The \s+ Perl \s+ Foundation\.? +/xi; + +my $year = (localtime())[5]+1900; + +# loop over all the files specified on the command line +foreach my $file (@ARGV) { + my $contents = Parrot::Test::slurp_file( $file ); + if ( $contents =~ $copyright_re) { + my $old_year = $1; + if ($old_year eq $year) { + warn "$file already up to date.\n"; + next; + } + else { + $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./; + open my $ofh, '>', $file; + print {$ofh} $contents; + close $ofh; + } + } + else { + warn "$file doesn't have a valid copyright line.\n"; + } +} + + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/release/crow.pir parrot-2.8.0/tools/release/crow.pir --- parrot-2.7.0/tools/release/crow.pir 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/crow.pir 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,107 @@ +#! ./parrot +# Copyright (C) 2007-2008, Parrot Foundation. +# $Id: crow.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +=head1 TITLE + +crow.pir -- Make noise about the new Parrot release + +=head1 DESCRIPTION + +This utility is used to help Release Managers format announcement messages. +It uses a *very* simple and fast templating system, described in the related +module, L. + +=head1 SYNOPSIS + + # see + % parrot tools/release/crow.pir --help + +=cut + + +.sub 'main' :main + .param pmc args + + load_bytecode 'Crow.pbc' + + .local pmc exports, curr_namespace, test_namespace + curr_namespace = get_namespace + test_namespace = get_namespace ['Crow'] + exports = split ' ', 'get_news get_args process' + test_namespace.'export_to'(curr_namespace, exports) + + .local pmc opts + opts = get_args(args) + + unless null opts goto got_opts + opts = new 'Hash' + got_opts: + + .local pmc templates + templates = 'get_json'('tools/release/templates.json') + + .local string template, type + type = opts['type'] + if type != '' goto got_type + type = 'text' + +got_type: + template = 'get_template'(templates, type) + + .local pmc data + data = 'get_json'('tools/release/release.json') + + .local string version + version = data['release.version'] + + $S0 = concat type, '.news' + $I0 = templates[$S0] + if $I0 goto get_news + data['NEWS'] = '' + goto process + get_news: + $S0 = 'get_news'(version) + data['NEWS'] = $S0 + + + process: + .local string result + result = process(template, data) + say result +.end + + +.sub 'get_json' + .param string filename + + load_bytecode 'Config/JSON.pbc' + + .local pmc exports, curr_namespace, test_namespace + curr_namespace = get_namespace + test_namespace = get_namespace [ 'Config';'JSON' ] + exports = split ' ', 'ReadConfig' + test_namespace.'export_to'(curr_namespace, exports) + + .local pmc result + result = ReadConfig(filename) + + .return (result) +.end + + +.sub 'get_template' + .param pmc templates + .param string type + + $S0 = concat type, '.text' + $S1 = templates[$S0] + .return ($S1) +.end + + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/release/gen_release_info.pl parrot-2.8.0/tools/release/gen_release_info.pl --- parrot-2.7.0/tools/release/gen_release_info.pl 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/gen_release_info.pl 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,63 @@ +#! perl +# Copyright (C) 2008, Parrot Foundation. +# $Id: gen_release_info.pl 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +use strict; +use warnings; + +=head1 NAME + +tools/release/gen_release_info.pl - generate release info for graphs and charts + +=head1 DESCRIPTION + +This utility generates release information from subversion in csv format, +suitable for graphs, charts, and reports. + +=cut + + +my $repo_url = 'https://svn.parrot.org/parrot/tags'; + +## create a release information data structure +my $r = { + map { $_->{number} => $_ } + map { m{^(RELEASE_)(.*)/} + ? { + tag => "$1$2", + number => sub{$a = shift; $a =~ y/_/./; $a }->($2), + } + : () + } + qx { svn ls $repo_url } +}; + +## gather interesting release-related information from the tag +map { + ## ask subversion for info about the tag + my $readme = $repo_url . '/' . $r->{$_}{tag}; + warn "retrieving info on $readme\n"; + my $info = qx{ LANG=C svn info $readme }; + + ## pull the interesting items + $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1; + $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1; + $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1; +} keys %{ $r }; + + +## output info in csv format +print + map { "$_\n" } + map { my $n = $_; join ',' => + map { $r->{$n}{$_} || '' } + qw{ tag number author revision date } + } + sort keys %$r; + +# Local Variables: +# mode: cperl +# cperl-indent-level: 4 +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/release/inc_ver.pir parrot-2.8.0/tools/release/inc_ver.pir --- parrot-2.7.0/tools/release/inc_ver.pir 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/inc_ver.pir 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,48 @@ +#!/usr/bin/env parrot +# Copyright (C) 2010, Parrot Foundation. +# $Id: inc_ver.pir 48965 2010-09-12 16:31:59Z Paul C. Anagnostopoulos $ + +.sub 'main' :main + .local string version_file_name + version_file_name = 'VERSION' + + # read the version + $P0 = new 'FileHandle' + $P0.'open'( version_file_name, 'r' ) + $S0 = $P0.'readline'() + $P0.'close'() + + print 'version: ' + print $S0 + + # split the version + $P1 = split '.', $S0 + + # increment version + $I0 = $P1[1] + inc $I0 + if $I0 != 12 goto NOT_NILL + $I0 = $P1[0] + inc $I0 + $P1[0] = $I0 + $I0 = 0 +NOT_NILL: + $P1[1] = $I0 + + # join the incremented version + $S0 = join '.', $P1 + + print 'new version: ' + print $S0 + + # write the new version to the version_file + $P0.'open'( version_file_name, 'w' ) + $P0.'print'( $S0 ) + $P0.'close'() +.end + +# Local Variables: +# mode: pir +# fill-column: 100 +# End: +# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/release/README parrot-2.8.0/tools/release/README --- parrot-2.7.0/tools/release/README 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/README 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,5 @@ +# $Id: README 48706 2010-08-28 02:39:25Z jkeenan $ +README for tools/release/ + +This directory is intended to hold programs, templates and configuration files +useful during the release process. diff -Nru parrot-2.7.0/tools/release/release.json parrot-2.8.0/tools/release/release.json --- parrot-2.7.0/tools/release/release.json 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/release.json 2010-09-21 07:50:27.000000000 +0000 @@ -0,0 +1,21 @@ +{ + "release.version" : "2.8.0", + "release.name" : "Tui Parakeet", + "release.day" : "Tuesday", + "release.date" : "21 September 2010", + "release.nextdate" : "19 October 2010", + + "web.root" : "http://parrot.org/", + "web.source" : "download", + "web.openpatches" : "openpatches.html", + "web.repository" : "https://svn.parrot.org/parrot/trunk/", + + "bugday.day" : "Saturday", + "bugday.date" : "16 October 2010", + + "wiki.root" : "https://trac.parrot.org/parrot/wiki/", + "wiki.bugday" : "bug_day_2010_10_16", + + "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.8.0/", + "subversion.root" : "http://subversion.apache.org/" +} diff -Nru parrot-2.7.0/tools/release/templates.json parrot-2.8.0/tools/release/templates.json --- parrot-2.7.0/tools/release/templates.json 1970-01-01 00:00:00.000000000 +0000 +++ parrot-2.8.0/tools/release/templates.json 2010-09-21 07:48:52.000000000 +0000 @@ -0,0 +1,83 @@ +{ + "text.news" : true, + "text.text" : " + +On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ +\"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed +at running all dynamic languages. + +Parrot @release.version@ is available on Parrot's FTP site, or follow the +download instructions at @web.root@@web.source@. For those who would like to +develop on Parrot, or help develop Parrot itself, we recommend using Subversion +on the source code repository to get the latest and best Parrot code. + +Parrot @release.version@ News: +@NEWS@ + +Many thanks to all our contributors for making this possible, and our sponsors +for supporting this project. Our next scheduled release is @release.nextdate@. + +Enjoy! + +", + + "html.news" : true, + "html.text" : " + + +

Parrot @release.version@ is available on Parrot's FTP +site, or follow the download +instructions. For those who would like to develop on Parrot, or help +develop Parrot itself, we recommend using Subversion on our +source code repository to get the latest and best Parrot code.

+ +

Parrot @release.version@ News:
+

@NEWS@

+ +

Thanks to all our contributors for making this possible, and our sponsors +for supporting this project. Our next release is @release.nextdate@.

+ +

Enjoy!

+", + + "bugday.news" : false, + "bugday.text" : " +Bug Day + +On @bugday.day@, @bugday.date@, please join us on IRC in #parrot +(irc.parrot.org) to work on closing out as many Trac tickets +(https://trac.parrot.org) tickets as possible in the parrot queue. This will +help us get ready for the next release of parrot: @release.version@, scheduled +for @release.day@, @release.date@. You'll find C, parrot assembly, perl, +documentation, and plenty of tasks to go around. Core developers will be +available most of the day (starting at around 10am GMT) to answer questions. + +No experience with parrot necessary. + +--From: @wiki.root@@wiki.bugday@-- + +Check the list at: + +https://trac.parrot.org/parrot/report/3 + +Which contains all the tickets I'd like to see resolved in @version@. To +see all the open tickets, use: + +https://trac.parrot.org/parrot/report + +If you've got something you're working on that you think you'll be +getting done before the release, please +- add a ticket for it (if necessary); +- set its milestone to this release. + +Thanks in advance for your patches and commits. ^_^ + +... Speaking of patches, we should also get through as many of these +(accept or reject) as possible. + +@web.root@@web.openpatches@ +" +} diff -Nru parrot-2.7.0/tools/util/crow.pir parrot-2.8.0/tools/util/crow.pir --- parrot-2.7.0/tools/util/crow.pir 2010-05-19 09:28:42.000000000 +0000 +++ parrot-2.8.0/tools/util/crow.pir 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -#! ./parrot -# Copyright (C) 2007-2008, Parrot Foundation. -# $Id: crow.pir 46732 2010-05-17 13:31:36Z coke $ - -=head1 TITLE - -crow.pir -- Make noise about the new Parrot release - -=head1 DESCRIPTION - -This utility is used to help Release Managers format announcement messages. -It uses a *very* simple and fast templating system, described in the related -module, L. - -=head1 SYNOPSIS - - # see - % parrot tools/util/crow.pir --help - -=cut - - -.sub 'main' :main - .param pmc args - - load_bytecode 'Crow.pbc' - - .local pmc exports, curr_namespace, test_namespace - curr_namespace = get_namespace - test_namespace = get_namespace ['Crow'] - exports = split ' ', 'get_news get_args process' - test_namespace.'export_to'(curr_namespace, exports) - - .local pmc opts - opts = get_args(args) - - unless null opts goto got_opts - opts = new 'Hash' - got_opts: - - .local pmc templates - templates = 'get_json'('tools/util/templates.json') - - .local string template, type - type = opts['type'] - if type != '' goto got_type - type = 'text' - -got_type: - template = 'get_template'(templates, type) - - .local pmc data - data = 'get_json'('tools/util/release.json') - - .local string version - version = data['release.version'] - - $S0 = concat type, '.news' - $I0 = templates[$S0] - if $I0 goto get_news - data['NEWS'] = '' - goto process - get_news: - $S0 = 'get_news'(version) - data['NEWS'] = $S0 - - - process: - .local string result - result = process(template, data) - say result -.end - - -.sub 'get_json' - .param string filename - - load_bytecode 'Config/JSON.pbc' - - .local pmc exports, curr_namespace, test_namespace - curr_namespace = get_namespace - test_namespace = get_namespace [ 'Config';'JSON' ] - exports = split ' ', 'ReadConfig' - test_namespace.'export_to'(curr_namespace, exports) - - .local pmc result - result = ReadConfig(filename) - - .return (result) -.end - - -.sub 'get_template' - .param pmc templates - .param string type - - $S0 = concat type, '.text' - $S1 = templates[$S0] - .return ($S1) -.end - - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/util/dump_pbc.pl parrot-2.8.0/tools/util/dump_pbc.pl --- parrot-2.7.0/tools/util/dump_pbc.pl 2009-02-17 21:01:40.000000000 +0000 +++ parrot-2.8.0/tools/util/dump_pbc.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,125 +0,0 @@ -#! perl - -# Copyright (C) 2008, Parrot Foundation. -# $Id: dump_pbc.pl 36833 2009-02-17 20:09:26Z allison $ - -=head1 NAME - -tools/util/dump_pbc.pl - Weave together PBC disassembly with PIR source - -=head1 SYNOPSIS - - perl tools/util/dump_pbc.pl foo.pbc - -=head1 DESCRIPTION - -dump_pbc.pl uses Parrot's F program to disassemble the opcodes -in a PBC (Parrot ByteCode) file, then weaves the disassembly together with -the original PIR source file(s). This makes it easier to see how the PIR -syntactic sugar is desugared into raw Parrot opcodes. - -=head1 BUGS - -This program has only been tested for a few simple cases. Also, the name -might suggest a different use than its actual purpose. - -While it is not a bug in F per se, there is a line numbering -bug for some PBC opcode sequences that will result in the disassembled -opcodes appearing just before the source lines they represent, rather -than just after. There does not appear to be consensus yet about where -this bug actually resides. - -=cut - -use strict; -use warnings; -use Cwd; -use FindBin; - -my ($PARROT_ROOT, $RUNTIME_DIR); -BEGIN { - $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../.."); - $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot"; -} - -use lib "$PARROT_ROOT/lib"; -use Parrot::Config '%PConfig'; - -my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}"; - -go(@ARGV); - -sub go { - my $pbc = shift; - - # The following mess brought to you by Win32, where pipe open doesn't work, - # and thus its greater security and cleaner error handling are unavailable. - - -f $pbc && -r _ - or die "PBC file '$pbc' does not exist or is not readable.\n"; - - -f $DISASSEMBLER && -x _ - or die "Can't find disassembler '$DISASSEMBLER';" - . "did you remember to make parrot first?\n"; - - my @dis = `$DISASSEMBLER $pbc`; - die "No disassembly; errors: $?, $!" unless @dis; - - my $cur_file = ''; - my $cur_line = -1; - my %cache; - - foreach (@dis) { - if (/^(?:# )?Current Source Filename (.*)/) { - my $found = $1; - $found =~ s/^'//; - $found =~ s/'$//; - if ($cur_file ne $found) { - $cur_file = $found; - $cache{$cur_file} ||= slurp_file($cur_file); - $cur_line = -1; - - print "\n#### $cur_file\n"; - } - } - elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) { - my $int_line = int $line; - my $len_line = length $line; - if ($cur_line != $int_line) { - $cur_line = 0 if $cur_line == -1; - print "\n"; - foreach my $i ($cur_line + 1 .. $int_line) { - my $source_code = $cache{$cur_file}[$i-1]; - # next unless $source_code =~ /\S/; - printf "# %*d: %s", $len_line, $i, $source_code; - print "\n" if $source_code =~ /^\.end/; - } - $cur_line = $int_line; - } - - print ' ' x ($len_line + 4), "$code\n"; - } - } -} - -sub slurp_file { - my $file = shift; - my $source; - - open $source, '<', $file - or open $source, '<', "$PARROT_ROOT/$file" - or open $source, '<', "$RUNTIME_DIR/$file" - or die "Could not open source file '$file': $!"; - - my @lines = <$source>; - - return \@lines; -} - - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/util/gen_release_info.pl parrot-2.8.0/tools/util/gen_release_info.pl --- parrot-2.7.0/tools/util/gen_release_info.pl 2009-03-16 05:50:26.000000000 +0000 +++ parrot-2.8.0/tools/util/gen_release_info.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -#! perl -# Copyright (C) 2008, Parrot Foundation. -# $Id: gen_release_info.pl 37442 2009-03-15 16:22:12Z rurban $ - -use strict; -use warnings; - -=head1 NAME - -tools/util/gen_release_info.pl - generate release info for graphs and charts - -=head1 DESCRIPTION - -This utility generates release information from subversion in csv format, -suitable for graphs, charts, and reports. - -=cut - - -my $repo_url = 'https://svn.parrot.org/parrot/tags'; - -## create a release information data structure -my $r = { - map { $_->{number} => $_ } - map { m{^(RELEASE_)(.*)/} - ? { - tag => "$1$2", - number => sub{$a = shift; $a =~ y/_/./; $a }->($2), - } - : () - } - qx { svn ls $repo_url } -}; - -## gather interesting release-related information from the tag -map { - ## ask subversion for info about the tag - my $readme = $repo_url . '/' . $r->{$_}{tag}; - warn "retrieving info on $readme\n"; - my $info = qx{ LANG=C svn info $readme }; - - ## pull the interesting items - $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1; - $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1; - $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1; -} keys %{ $r }; - - -## output info in csv format -print - map { "$_\n" } - map { my $n = $_; join ',' => - map { $r->{$n}{$_} || '' } - qw{ tag number author revision date } - } - sort keys %$r; - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/util/inc_ver.pir parrot-2.8.0/tools/util/inc_ver.pir --- parrot-2.7.0/tools/util/inc_ver.pir 2010-06-11 08:06:07.000000000 +0000 +++ parrot-2.8.0/tools/util/inc_ver.pir 1970-01-01 00:00:00.000000000 +0000 @@ -1,48 +0,0 @@ -#!/usr/bin/env parrot -# Copyright (C) 2010, Parrot Foundation. -# $Id: inc_ver.pir 47351 2010-06-04 12:33:52Z gerd $ - -.sub 'main' :main - .local string version_file_name - version_file_name = 'VERSION' - - # read the version - $P0 = new 'FileHandle' - $P0.'open'( version_file_name, 'r' ) - $S0 = $P0.'readline'() - $P0.'close'() - - print 'version: ' - print $S0 - - # split the version - $P1 = split '.', $S0 - - # increment version - $I0 = $P1[1] - inc $I0 - if $I0 != 12 goto NOT_NILL - $I0 = $P1[0] - inc $I0 - $P1[0] = $I0 - $I0 = 0 -NOT_NILL: - $P1[1] = $I0 - - # join the incremented version - $S0 = join '.', $P1 - - print 'new version: ' - print $S0 - - # write the new version to the version_file - $P0.'open'( version_file_name, 'w' ) - $P0.'print'( $S0 ) - $P0.'close'() -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/util/ncidef2pasm.pl parrot-2.8.0/tools/util/ncidef2pasm.pl --- parrot-2.7.0/tools/util/ncidef2pasm.pl 2009-11-24 11:58:37.000000000 +0000 +++ parrot-2.8.0/tools/util/ncidef2pasm.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,233 +0,0 @@ -#! perl - -# Copyright (C) 2003-2007, Parrot Foundation. -# $Id: ncidef2pasm.pl 42770 2009-11-21 20:00:08Z jkeenan $ - -=head1 NAME - -F - -=head1 DESCRIPTION - -Take an NCI library definition file and turn it into PASM. - -An NCI library definition file provides the information needed to -generate a parrot wrapper for the named library (or libraries). Its -format is simple, and looks like: - - [package] - ncurses - - [lib] - libform.so - - [defs] - p new_field i i i i i i - - [lib] - libncurses.so - - [defs] - i is_term_resized i i - -Note that the assembly file is generated in the order you specify, so -if there are library dependencies, make sure you have them in the -correct order. - -=head2 package - -Declares the package that all subsequent sub PMCs will be put -into. The name is a simple concatenation of the package name, double -colon, and the routine name, with no preceding punctuation. - -=head2 lib - -The name of the library to be loaded. Should be as qualified as -necessary for your platform--generally the full filename is required, -though the directory generally isn't. - -You may load multiple libraries here, but only the last one loaded -will be exposed to subsequent defs. - -=head2 defs - -This section holds the definitions of functions. Each function is -assumed to be in the immediate preceding library. The definition of -the function is: - - return_type name [param [param [param ...]]] - -The param and return_type parameters use the NCI standard, which for -reference is: - -=over 4 - -=item p - -Parameter is a void pointer, taken from the PMC's data pointer. PMC is -assumed to be an unmanagedstruct or child class. - -Taken from a P register - -=item c - -Parameter is a character. - -Taken from an I register - -=item s - -Parameter is a short - -Taken from an I register - -=item i - -Parameter is an int - -Taken from an I register - -=item l - -Parameter is a long - -Taken from an I register - -=item f - -Paramter is a float - -Taken from an N register. - -=item d - -Parameter is a double. - -Taken from an N register. - -=item t - -Paramter is a char *, presumably a C string - -Taken from an S register - -=item v - -Void. Only valid as a return type, noting that the function returns no data. - -=item I - -Interpreter pointer. The current interpreter pointer is passed in - -=item P - -PMC. - -=item 2 - -Pointer to short. - -Taken from an I register. - -=item 3 - -Pointer to int. - -Taken from an I register - -=item 4 - -Pointer to long - -Taken from an I register - -=back - -=cut - -use strict; -use warnings; - -my ( $from_file, $to_file ) = @ARGV; - -# If there is no destination file, strip off the extension of the -# source file and add a .pasm to it -if ( !defined $to_file ) { - $to_file = $from_file; - $to_file =~ s/\..*$//; - $to_file .= ".pasm"; -} - -open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!"; -open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!"; - -# To start, save all the registers, just in case -print $OUTPUT "saveall\n"; - -my @libs; -my ( $cur_package, $line, $cur_section ); - -# Our dispatch table -my (%dispatch) = ( - package => \&package_line, - lib => \&lib_line, - defs => \&def_line, -); - -while ( $line = <$INPUT> ) { - - # Throw away trailing newlines, comments, and whitespace. If the - # line's empty, then off to the next line - chomp $line; - $line =~ s/#.*//; - $line =~ s/\s*$//; - next unless $line; - - # Is it a section line? If so, extract the section and set it. - if ( $line =~ /\[(\w+)\]/ ) { - $cur_section = $1; - next; - } - - # Everything else goes to the handler - $dispatch{$cur_section}->($line); - -} - -# Put the registers back and end -print $OUTPUT "restoreall\n"; -print $OUTPUT "end\n"; -close $OUTPUT; - -sub package_line { - my $line = shift; - - # Trim leading and trailing spaces - $line =~ s/^\s*//; - $line =~ s/\s*$//; - - # Set the global current package - $cur_package = $line; - -} - -sub lib_line { - my $line = shift; - print $OUTPUT "loadlib P1, '$line'\n"; -} - -sub def_line { - my $line = shift; - my ( $return_type, $name, @params ) = split ' ', $line; - unshift @params, $return_type; - my $signature = join( "", @params ); - print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n"; - print $OUTPUT "store_global '${cur_package}::${name}', P2\n"; -} - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/tools/util/parrot-config.pir parrot-2.8.0/tools/util/parrot-config.pir --- parrot-2.7.0/tools/util/parrot-config.pir 2010-06-15 13:26:59.000000000 +0000 +++ parrot-2.8.0/tools/util/parrot-config.pir 1970-01-01 00:00:00.000000000 +0000 @@ -1,103 +0,0 @@ -#!/usr/bin/env parrot -# $Id: parrot-config.pir 47623 2010-06-14 16:42:15Z coke $ - -=head1 NAME - -config.pir - Print a Parrot configuration item - -=head1 VERSION - -version 0.01 - -=head1 SYNOPSIS - - ./parrot parrot-config.pir VERSION - ./parrot parrot-config.pir ccflags - ./parrot parrot-config.pir --dump - -=head1 DESCRIPTION - -Print out configuration items. - -=head1 AUTHOR - -Leopold Toetsch Elt@toetsch.atE. - -=head1 COPYRIGHT - -Copyright (C) 2004-2009, Parrot Foundation. - -=cut - -.sub _main :main - .param pmc argv - .local int argc - argc = argv - if argc < 2 goto usage - .local pmc interp, conf_hash - .local string key - .include "iglobals.pasm" - interp = getinterp - conf_hash = interp[.IGLOBALS_CONFIG_HASH] - .local int i - i = 1 -loop: - key = argv[i] - if key == '--help' goto usage - if key == '--dump' goto dump - $I0 = defined conf_hash[key] - unless $I0 goto failkey - dec argc - if i < argc goto dumpsome - $S0 = conf_hash[key] - print $S0 - inc i - if i < argc goto loop - print "\n" - end -dumpsome: - key = argv[i] - $I0 = defined conf_hash[key] - unless $I0 goto failkey - print key - print " => '" - $S1 = conf_hash[key] - print $S1 - say "'" - inc i - if i <= argc goto dumpsome - end -failkey: - print " no such key: '" - print key - print "'\n" - end -dump: - .local pmc iterator - iterator = iter conf_hash -iter_loop: - unless iterator goto iter_end - shift $S0, iterator - print $S0 - print " => '" - $S1 = conf_hash[$S0] - print $S1 - say "'" - goto iter_loop -iter_end: - end -usage: - $S0 = argv[0] - $P0 = getinterp - .include 'stdio.pasm' - $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO) - $P1.'print'($S0) - $P1.'print'(" [ [ ... ] | --dump | --help ]\n") - exit 1 -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/util/perlcritic-cage.conf parrot-2.8.0/tools/util/perlcritic-cage.conf --- parrot-2.7.0/tools/util/perlcritic-cage.conf 2010-08-15 00:39:35.000000000 +0000 +++ parrot-2.8.0/tools/util/perlcritic-cage.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -# A more stringent set of rules for cage cleaners - -[-CodeLayout::ProhibitParensWithBuiltins] -[CodeLayout::ProhibitHardTabs] -allow_leading_tabs = 0 - -[-CodeLayout::RequireTidyCode] - -[-ControlStructures::ProhibitPostfixControls] -[-ControlStructures::ProhibitUnlessBlocks] - -[-Documentation::PodSpelling] -[-Documentation::RequirePodAtEnd] -[-Documentation::RequirePodSections] - -[-ErrorHandling::RequireCarping] - -[-InputOutput::ProhibitBacktickOperators] -[-InputOutput::ProhibitInteractiveTest] -[-InputOutput::RequireCheckedSyscalls] -functions = :builtins -exclude_functions = print - -[-Miscellanea::RequireRcsKeywords] - -[-Modules::RequireVersionVar] - -[-RegularExpressions::ProhibitEscapedMetacharacters] -[-RegularExpressions::RequireDotMatchAnything] -[-RegularExpressions::RequireExtendedFormatting] -[-RegularExpressions::RequireLineBoundaryMatching] - -[-ValuesAndExpressions::ProhibitConstantPragma] -[-ValuesAndExpressions::ProhibitEmptyQuotes] -[-ValuesAndExpressions::ProhibitMagicNumbers] - -[-Variables::ProhibitPunctuationVars] diff -Nru parrot-2.7.0/tools/util/perlcritic.conf parrot-2.8.0/tools/util/perlcritic.conf --- parrot-2.7.0/tools/util/perlcritic.conf 2010-05-30 21:14:08.000000000 +0000 +++ parrot-2.8.0/tools/util/perlcritic.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,75 +0,0 @@ -verbose = 3 - -# not all the profiles listed here are installed by default, even if you have -# Perl::Critic. Shhhh. -profile-strictness = quiet - -[BuiltinFunctions::ProhibitStringySplit] -add_themes = parrot - -[CodeLayout::ProhibitDuplicateCoda] -add_themes = parrot - -[CodeLayout::ProhibitHardTabs] -allow_leading_tabs = 0 -add_themes = parrot - -[CodeLayout::ProhibitTrailingWhitespace] -add_themes = parrot - -[CodeLayout::RequireTidyCode] -perltidyrc = tools/util/perltidy.conf -add_themes = extra - -[CodeLayout::UseParrotCoda] -add_themes = parrot - -[InputOutput::ProhibitBarewordFileHandles] -add_themes = parrot - -[InputOutput::ProhibitTwoArgOpen] -add_themes = parrot - -[NamingConventions::ProhibitAmbiguousNames] -# remove abstract from the list of forbidden names -forbid = bases close contract last left no record right second set -add_themes = extra - -[Subroutines::ProhibitBuiltinHomonyms] -add_themes = extra - -[Subroutines::ProhibitExplicitReturnUndef] -add_themes = parrot - -[Subroutines::ProhibitSubroutinePrototypes] -add_themes = parrot - -[Subroutines::RequireFinalReturn] -add_themes = extra - -[TestingAndDebugging::MisplacedShebang] -add_themes = parrot - -[TestingAndDebugging::ProhibitShebangWarningsArg] -add_themes = parrot - -[TestingAndDebugging::RequirePortableShebang] -add_themes = parrot - -[TestingAndDebugging::RequireUseStrict] -add_themes = parrot - -[TestingAndDebugging::RequireUseWarnings] -add_themes = parrot - -[ValuesAndExpressions::ProhibitInterpolationOfLiterals] -add_themes = extra - -[Variables::ProhibitConditionalDeclarations] -add_themes = parrot - -[Bangs::ProhibitFlagComments] -add_themes = extra - -[Bangs::ProhibitRefProtoOrProto] -add_themes = extra diff -Nru parrot-2.7.0/tools/util/perltidy.conf parrot-2.8.0/tools/util/perltidy.conf --- parrot-2.7.0/tools/util/perltidy.conf 2009-02-09 13:13:50.000000000 +0000 +++ parrot-2.8.0/tools/util/perltidy.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -# A declarative version of PDD07 for perl. - -# Must apply... - --l=100 # Source line width is limited to 100 characters. --i=4 # must be indented four columns (no tabs) --ola # Labels (including case labels) must be outdented two columns --ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line. --ce # Cuddled elses are forbidden: i.e. avoid } else { . - -# Nice to haves... - -# Freeze new lines; some really short lines look good the way they -# are, this should stop perltidy from merging them together --fnl diff -Nru parrot-2.7.0/tools/util/pgegrep parrot-2.8.0/tools/util/pgegrep --- parrot-2.7.0/tools/util/pgegrep 2010-05-28 05:23:31.000000000 +0000 +++ parrot-2.8.0/tools/util/pgegrep 1970-01-01 00:00:00.000000000 +0000 @@ -1,308 +0,0 @@ -#! parrot - -=head1 NAME - -pgegrep - A simple grep using PGE for matching - -=head1 SYNOPSIS - -B [I] B [I] - -=head1 DESCRIPTION - -pgegrep aims to be a small and easy to use program in replacement of the -standard grep utility. Regex support is whatever PGE will allow. It -searches through files line by line and tests if the given pattern matches. - -=head1 OPTIONS - -=over 4 - -=item -v - -=item --invert-match - -print lines not matching PATTERN - -=item -V - -=item --version - -print the version and exit - -=item --help - -show this help and exit - -=item -r - -=item --recursive - -recursively descend into directories - -=item -L - -=item --files-without-matches - -print a list of files that do not match PATTERN - -=item -l - -=item --files-with-matches - -print a list of files that do match PATTERN - -=item -a - -=item --text - -treat binary files as text. - -This uses a basic heuristic to discover if a file is binary or not. Files are -read line by line, and it keeps processing "normally" until a control character -is found, and then stops and goes onto the next file is that line matches. - -=item -n - -=item --line-number - -print the line number for each match - -=item -H - -=item --with-filename - -print the filename for each match - -=back - -=cut - -# Readability improved! -.include 'hllmacros.pir' - -# for getstdin and friends -.loadlib 'io_ops' - -.sub main :main - .param pmc argv # the script name, then our options. - .local string progname - progname = shift argv - load_bytecode 'Getopt/Obj.pbc' - load_bytecode 'PGE.pbc' - .local pmc getopts - getopts = new [ 'Getopt';'Obj' ] - getopts.'notOptStop'(1) - push getopts, 'with-filename|H' - push getopts, 'files-with-matches|l' - push getopts, 'files-without-matches|L' - push getopts, 'line-number|n' - push getopts, 'text|a' - push getopts, 'recursive|r' - push getopts, 'invert-match|v' - push getopts, 'version|V' - push getopts, 'help' - push_eh handler - .local pmc opts - opts = getopts.'get_options'(argv) - $I0 = defined opts['help'] - .If($I0, { - showhelp() - }) - $I0 = defined opts['version'] - .If($I0, { - showversion() - }) - - .local int argc - argc = elements argv - .Unless(argc>1, { showhelp() }) # need rule and at least one file - - .local string rule - .local pmc p6rule_compile, matchsub - rule = shift argv - p6rule_compile = compreg 'PGE::Perl6Regex' - matchsub = p6rule_compile(rule) - .If(null matchsub, { die 'Unable to compile regex' }) - - .local int i, filecount - .local string filename - .local pmc File, OS, files, handle - files = new 'ResizableStringArray' - files = argv - filecount = files - # define with-filename if there's more than one file - .If(filecount >= 2, { opts['with-filename'] = 1 }) - $P0 = loadlib 'file' - File = new 'File' - $P0 = loadlib 'os' - OS = new 'OS' - # This must be here, or else it'll get filled with junk data we use stdin... - i = 0 - - .Unless(filecount, { - # no args, use stdin - stdindashhack: - handle = getstdin - filename = '(standard input)' - goto stdinhack - }) - .For(, i < filecount, inc i, { - filename = files[i] - .If(filename == '-', { - goto stdindashhack - }) - $I1 = File.'is_file'(filename) - .IfElse($I1, { - # Is a file - handle = open filename, 'r' - },{ - # Not a file, hopefully a directory - $I1 = File.'is_dir'(filename) - $I0 = defined opts['recursive'] - $I1 &= $I0 - .Unless($I1, { - printerr "pgegrep: '" - printerr filename - printerr "': Operation not supported.\n" - goto nextfor_0 - }) - $P0 = OS.'readdir'(filename) - .Foreach($S0, $P0, { - .If($S0 != '.', { - .If($S0 != '..', { - $S1 = filename . '/' - $S0 = $S1 . $S0 - $P1 = new 'ResizableStringArray' - $P1[0] = $S0 - $I0 = i + 1 - splice files, $P1, $I0, 0 - }) }) - }) - filecount = files - goto nextfor_0 - }) - stdinhack: - checkfile(handle, filename, matchsub, opts) - close handle - nextfor_0: - }) - - end -handler: - .local pmc exception, pmcmsg - .local string message - .get_results (exception) - pmcmsg = getattribute exception, 'message' - pop_eh - message = pmcmsg - message = "pgegrep: " . message - die message -.end - -.sub checkfile - .param pmc handle - .param string filename - .param pmc matchsub - .param pmc opts - - .local pmc match - .local string line - .local int lineno, linelen, matched - lineno = 1 - matched = 0 # Only used for --files-without-matches - line = readline handle - linelen = length line - - .local pmc p6rule_compile, cntrlchar - $S0 = '<+cntrl-[\t\r\n]>' - p6rule_compile = compreg 'PGE::Perl6Regex' - cntrlchar = p6rule_compile($S0) - - .For(, linelen, { - line = readline handle - linelen = length line - inc lineno - }, { - match = matchsub(line) - $I1 = istrue match - match = cntrlchar(line) - - $I2 = istrue match - $I0 = defined opts['files-without-matches'] - .If($I0, { - .If($I1, { matched = 1 }) - goto next - }) - $I0 = defined opts['files-with-matches'] - $I0 = $I0 && $I1 - .If($I0, { - say filename - .return() - }) - - $I0 = defined opts['invert-match'] - not $I0 - $I1 = xor $I1, $I0 - .Unless($I1, { - $I0 = defined opts['text'] - $I0 = xor $I0, $I2 - .If($I0, { - print 'Binary file ' - print filename - say ' matches' - .return() - }) - $I0 = defined opts['with-filename'] - $I1 = defined opts['recursive'] - $I0 = $I0 || $I1 - .If($I0, { - print filename - print ':' - }) - $I0 = defined opts['line-number'] - .If($I0, { - print lineno - print ':' - }) - print line - }) - #--------- - next: - }) - $I0 = defined opts['files-without-matches'] - .If($I0, { say filename }) - .return() -.end - -.sub showhelp - print <<'HELP' -Usage: pgegrep [OPTIONS] PATTERN [FILE...] -Search for the Perl 6 Rule PATTERN in each file. - - -v --invert-match print lines not matching PATTERN - -V --version print the version and exit - --help show this help and exit - -r --recursive recursively descend into directories - -L --files-without-matches print a list of files that do not match PATTERN - -l --files-with-matches print a list of files that do match PATTERN - -a --text treat binary files as text - -n --line-number print the line number for each match - -H --with-filename print the filename for each match - -HELP - end -.end - -.sub showversion - print <<'VERSION' -pgegrep v0.0.1 -VERSION - end -.end - -# Local Variables: -# mode: pir -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4 ft=pir: diff -Nru parrot-2.7.0/tools/util/release.json parrot-2.8.0/tools/util/release.json --- parrot-2.7.0/tools/util/release.json 2010-08-18 00:46:48.000000000 +0000 +++ parrot-2.8.0/tools/util/release.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -{ - "release.version" : "2.7.0", - "release.name" : "Australian King", - "release.day" : "Tuesday", - "release.date" : "17 August 2010", - "release.nextdate" : "21 September 2010", - - "web.root" : "http://parrot.org/", - "web.source" : "download", - "web.openpatches" : "openpatches.html", - "web.repository" : "https://svn.parrot.org/parrot/trunk/", - - "bugday.day" : "Saturday", - "bugday.date" : "18 September 2010", - - "wiki.root" : "https://trac.parrot.org/parrot/wiki/", - "wiki.bugday" : "bug_day_2010_09_18", - - "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/", - "subversion.root" : "http://subversion.apache.org/" -} diff -Nru parrot-2.7.0/tools/util/templates.json parrot-2.8.0/tools/util/templates.json --- parrot-2.7.0/tools/util/templates.json 2009-11-24 11:58:37.000000000 +0000 +++ parrot-2.8.0/tools/util/templates.json 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -{ - "text.news" : true, - "text.text" : " - -On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ -\"@release.name@.\" Parrot (@web.root@) is a virtual machine aimed -at running all dynamic languages. - -Parrot @release.version@ is available on Parrot's FTP site, or follow the -download instructions at @web.root@@web.source@. For those who would like to -develop on Parrot, or help develop Parrot itself, we recommend using Subversion -on the source code repository to get the latest and best Parrot code. - -Parrot @release.version@ News: -@NEWS@ - -Many thanks to all our contributors for making this possible, and our sponsors -for supporting this project. Our next scheduled release is @release.nextdate@. - -Enjoy! - -", - - "html.news" : true, - "html.text" : " -

On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ -"@release.name@." Parrot -is a virtual machine aimed at running all dynamic languages.

- -

Parrot @release.version@ is available on Parrot's FTP -site, or follow the download -instructions. For those who would like to develop on Parrot, or help -develop Parrot itself, we recommend using Subversion on our -source code repository to get the latest and best Parrot code.

- -

Parrot @release.version@ News:
-

@NEWS@

- -

Thanks to all our contributors for making this possible, and our sponsors -for supporting this project. Our next release is @release.nextdate@.

- -

Enjoy!

-", - - "bugday.news" : false, - "bugday.text" : " -Bug Day - -On @bugday.day@, @bugday.date@, please join us on IRC in #parrot -(irc.parrot.org) to work on closing out as many Trac tickets -(https://trac.parrot.org) tickets as possible in the parrot queue. This will -help us get ready for the next release of parrot: @release.version@, scheduled -for @release.day@, @release.date@. You'll find C, parrot assembly, perl, -documentation, and plenty of tasks to go around. Core developers will be -available most of the day (starting at around 10am GMT) to answer questions. - -No experience with parrot necessary. - ---From: @wiki.root@@wiki.bugday@-- - -Check the list at: - -https://trac.parrot.org/parrot/report/3 - -Which contains all the tickets I'd like to see resolved in @version@. To -see all the open tickets, use: - -https://trac.parrot.org/parrot/report - -If you've got something you're working on that you think you'll be -getting done before the release, please -- add a ticket for it (if necessary); -- set its milestone to this release. - -Thanks in advance for your patches and commits. ^_^ - -... Speaking of patches, we should also get through as many of these -(accept or reject) as possible. - -@web.root@@web.openpatches@ -" -} diff -Nru parrot-2.7.0/tools/util/update_copyright.pl parrot-2.8.0/tools/util/update_copyright.pl --- parrot-2.7.0/tools/util/update_copyright.pl 2009-11-24 11:58:37.000000000 +0000 +++ parrot-2.8.0/tools/util/update_copyright.pl 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -#! perl -# $Id: update_copyright.pl 42770 2009-11-21 20:00:08Z jkeenan $ - -# Copyright (C) 2008, Parrot Foundation. - -use strict; -use warnings; -use Fatal qw( open close ); - -=head1 NAME - -F - -=head1 DESCRIPTION - -Given a list of files as command line arguments, update the copyright -notice to go from the earliest year noted to the current year. - -Edits the files in place. You should update the copyright on a modified -file before you commit it back to the repository. - -=cut - -use lib 'lib'; -use Parrot::Test; - -# Accept a little fuzz in the original copyright notice.. -my $copyright_re = qr/ - Copyright \s+ \(C\) \s+ - (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s* - The \s+ Perl \s+ Foundation\.? -/xi; - -my $year = (localtime())[5]+1900; - -# loop over all the files specified on the command line -foreach my $file (@ARGV) { - my $contents = Parrot::Test::slurp_file( $file ); - if ( $contents =~ $copyright_re) { - my $old_year = $1; - if ($old_year eq $year) { - warn "$file already up to date.\n"; - next; - } - else { - $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./; - open my $ofh, '>', $file; - print {$ofh} $contents; - close $ofh; - } - } - else { - warn "$file doesn't have a valid copyright line.\n"; - } -} - - -# Local Variables: -# mode: cperl -# cperl-indent-level: 4 -# fill-column: 100 -# End: -# vim: expandtab shiftwidth=4: diff -Nru parrot-2.7.0/VERSION parrot-2.8.0/VERSION --- parrot-2.7.0/VERSION 2010-08-18 00:46:49.000000000 +0000 +++ parrot-2.8.0/VERSION 2010-09-21 07:50:26.000000000 +0000 @@ -1 +1 @@ -2.7.0 +2.8.0

On behalf of the Parrot team, I'm proud to announce Parrot @release.version@ +"@release.name@." Parrot +is a virtual machine aimed at running all dynamic languages.