[svn:parrot] r49162 - in branches/typesafe_consttable: compilers/imcc src
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Mon Sep 20 02:33:52 UTC 2010
Author: plobsing
Date: Mon Sep 20 02:33:52 2010
New Revision: 49162
URL: https://trac.parrot.org/parrot/changeset/49162
Log:
fix find_constants.
necessary for cloning HLL namespaced items into new interps
Modified:
branches/typesafe_consttable/compilers/imcc/imcparser.c
branches/typesafe_consttable/compilers/imcc/imcparser.h
branches/typesafe_consttable/compilers/imcc/pbc.c
branches/typesafe_consttable/src/packfile.c
Modified: branches/typesafe_consttable/compilers/imcc/imcparser.c
==============================================================================
--- branches/typesafe_consttable/compilers/imcc/imcparser.c Sun Sep 19 20:57:18 2010 (r49161)
+++ branches/typesafe_consttable/compilers/imcc/imcparser.c Mon Sep 20 02:33:52 2010 (r49162)
@@ -9,27 +9,25 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
-
- 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
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
+
+ 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 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -40,7 +38,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. */
@@ -58,7 +56,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -66,259 +64,20 @@
/* Pure parsers. */
#define YYPURE 1
-/* Using locations. */
-#define YYLSP_NEEDED 0
-
-
+/* Push parsers. */
+#define YYPUSH 0
-/* 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
+/* Pull parsers. */
+#define YYPULL 1
+/* Using locations. */
+#define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 1 "compilers/imcc/imcc.y"
/*
@@ -1305,49 +1064,304 @@
+/* Line 189 of yacc.c */
+#line 1058 "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 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
+
+
-/* 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"
{
+
+/* Line 214 of yacc.c */
+#line 986 "compilers/imcc/imcc.y"
+
IdList * idlist;
int t;
char * s;
SymReg * sr;
Instruction *i;
-}
-/* Line 187 of yacc.c. */
-#line 1327 "compilers/imcc/imcparser.c"
- YYSTYPE;
+
+
+
+/* Line 214 of yacc.c */
+#line 1342 "compilers/imcc/imcparser.c"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# 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 216 of yacc.c. */
-#line 1340 "compilers/imcc/imcparser.c"
+/* Line 264 of yacc.c */
+#line 1354 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1397,7 +1411,7 @@
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1422,14 +1436,14 @@
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
@@ -1510,9 +1524,9 @@
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@@ -1546,12 +1560,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) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@@ -1835,28 +1849,29 @@
"DOT", "CONCAT", "'='", "'['", "']'", "';'", "'('", "')'", "'!'", "'~'",
"'-'", "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "$accept", "program",
"compilation_units", "compilation_unit", "pragma", "location_directive",
- "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",
+ "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", "@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
+ "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
@@ -2339,9 +2354,18 @@
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2398,7 +2422,7 @@
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -2515,17 +2539,20 @@
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
-yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
-yy_stack_print (bottom, top)
- yytype_int16 *bottom;
- yytype_int16 *top;
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
- for (; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
YYFPRINTF (stderr, "\n");
}
@@ -2561,11 +2588,11 @@
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
- fprintf (stderr, " $%d = ", yyi + 1);
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, yyscanner, interp);
- fprintf (stderr, "\n");
+ YYFPRINTF (stderr, "\n");
}
}
@@ -2849,10 +2876,8 @@
break;
}
}
-
/* Prevent warnings from -Wmissing-prototypes. */
-
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@@ -2871,10 +2896,9 @@
-
-/*----------.
-| yyparse. |
-`----------*/
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@@ -2899,22 +2923,46 @@
#endif
#endif
{
- /* The look-ahead symbol. */
+/* The lookahead symbol. */
int yychar;
-/* The semantic value of the look-ahead symbol. */
+/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
-/* Number of syntax errors so far. */
-int yynerrs;
+ /* 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;
- int yystate;
int yyn;
int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
+ /* 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;
+
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@@ -2922,51 +2970,28 @@
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;
@@ -2996,7 +3021,6 @@
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
@@ -3004,7 +3028,6 @@
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
-
&yystacksize);
yyss = yyss1;
@@ -3027,9 +3050,8 @@
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@@ -3040,7 +3062,6 @@
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@@ -3050,6 +3071,9 @@
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+ if (yystate == YYFINAL)
+ YYACCEPT;
+
goto yybackup;
/*-----------.
@@ -3058,16 +3082,16 @@
yybackup:
/* Do appropriate processing given the current state. Read a
- look-ahead token if we need one and don't already have one. */
+ lookahead token if we need one and don't already have one. */
- /* First try to decide what to do without reference to look-ahead token. */
+ /* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a look-ahead token if don't already have one. */
+ /* Not known => get a lookahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -3099,20 +3123,16 @@
goto yyreduce;
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
- /* Shift the look-ahead token. */
+ /* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
- /* Discard the shifted token unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
@@ -3152,21 +3172,29 @@
switch (yyn)
{
case 2:
+
+/* Line 1464 of yacc.c */
#line 1081 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
+
+/* Line 1464 of yacc.c */
#line 1090 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
+
+/* Line 1464 of yacc.c */
#line 1091 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
+
+/* Line 1464 of yacc.c */
#line 1093 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
@@ -3176,6 +3204,8 @@
break;
case 8:
+
+/* Line 1464 of yacc.c */
#line 1099 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
@@ -3185,31 +3215,43 @@
break;
case 9:
+
+/* Line 1464 of yacc.c */
#line 1104 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
+
+/* Line 1464 of yacc.c */
#line 1105 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
+
+/* Line 1464 of yacc.c */
#line 1106 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
+
+/* Line 1464 of yacc.c */
#line 1107 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
+
+/* Line 1464 of yacc.c */
#line 1111 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
+
+/* Line 1464 of yacc.c */
#line 1113 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
@@ -3219,6 +3261,8 @@
break;
case 15:
+
+/* Line 1464 of yacc.c */
#line 1122 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
@@ -3228,6 +3272,8 @@
break;
case 16:
+
+/* Line 1464 of yacc.c */
#line 1128 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
@@ -3236,6 +3282,8 @@
break;
case 17:
+
+/* Line 1464 of yacc.c */
#line 1136 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
@@ -3247,6 +3295,8 @@
break;
case 18:
+
+/* Line 1464 of yacc.c */
#line 1148 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
@@ -3260,11 +3310,15 @@
break;
case 19:
+
+/* Line 1464 of yacc.c */
#line 1160 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
+
+/* Line 1464 of yacc.c */
#line 1161 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
@@ -3274,11 +3328,15 @@
break;
case 21:
+
+/* Line 1464 of yacc.c */
#line 1169 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
+
+/* Line 1464 of yacc.c */
#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));
@@ -3289,36 +3347,50 @@
break;
case 27:
+
+/* Line 1464 of yacc.c */
#line 1188 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 28:
+
+/* Line 1464 of yacc.c */
#line 1189 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 29:
+
+/* Line 1464 of yacc.c */
#line 1190 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 30:
+
+/* Line 1464 of yacc.c */
#line 1191 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 31:
+
+/* Line 1464 of yacc.c */
#line 1192 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 34:
+
+/* Line 1464 of yacc.c */
#line 1197 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 35:
+
+/* Line 1464 of yacc.c */
#line 1199 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
@@ -3329,6 +3401,8 @@
break;
case 36:
+
+/* Line 1464 of yacc.c */
#line 1206 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3337,6 +3411,8 @@
break;
case 37:
+
+/* Line 1464 of yacc.c */
#line 1211 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
@@ -3348,6 +3424,8 @@
break;
case 38:
+
+/* Line 1464 of yacc.c */
#line 1219 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
@@ -3355,6 +3433,8 @@
break;
case 39:
+
+/* Line 1464 of yacc.c */
#line 1223 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
@@ -3371,16 +3451,22 @@
break;
case 40:
+
+/* Line 1464 of yacc.c */
#line 1235 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 42:
+
+/* Line 1464 of yacc.c */
#line 1243 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
case 43:
+
+/* Line 1464 of yacc.c */
#line 1246 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
@@ -3392,6 +3478,8 @@
break;
case 46:
+
+/* Line 1464 of yacc.c */
#line 1262 "compilers/imcc/imcc.y"
{
int re_open = 0;
@@ -3407,16 +3495,22 @@
break;
case 47:
+
+/* Line 1464 of yacc.c */
#line 1276 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 48:
+
+/* Line 1464 of yacc.c */
#line 1277 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 49:
+
+/* Line 1464 of yacc.c */
#line 1281 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
@@ -3424,6 +3518,8 @@
break;
case 50:
+
+/* Line 1464 of yacc.c */
#line 1285 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
@@ -3433,11 +3529,15 @@
break;
case 51:
+
+/* Line 1464 of yacc.c */
#line 1293 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
case 52:
+
+/* Line 1464 of yacc.c */
#line 1295 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
@@ -3446,6 +3546,8 @@
break;
case 53:
+
+/* Line 1464 of yacc.c */
#line 1303 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
@@ -3453,6 +3555,8 @@
break;
case 54:
+
+/* Line 1464 of yacc.c */
#line 1307 "compilers/imcc/imcc.y"
{
iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
@@ -3460,6 +3564,8 @@
break;
case 55:
+
+/* Line 1464 of yacc.c */
#line 1311 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
@@ -3471,21 +3577,29 @@
break;
case 56:
+
+/* Line 1464 of yacc.c */
#line 1319 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 57:
+
+/* Line 1464 of yacc.c */
#line 1323 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 58:
+
+/* Line 1464 of yacc.c */
#line 1324 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 59:
+
+/* Line 1464 of yacc.c */
#line 1326 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
@@ -3499,16 +3613,22 @@
break;
case 60:
+
+/* Line 1464 of yacc.c */
#line 1338 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 61:
+
+/* Line 1464 of yacc.c */
#line 1338 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
case 62:
+
+/* Line 1464 of yacc.c */
#line 1343 "compilers/imcc/imcc.y"
{
if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') {
@@ -3532,11 +3652,15 @@
break;
case 63:
+
+/* Line 1464 of yacc.c */
#line 1367 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 64:
+
+/* Line 1464 of yacc.c */
#line 1372 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3546,6 +3670,8 @@
break;
case 65:
+
+/* Line 1464 of yacc.c */
#line 1378 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3555,6 +3681,8 @@
break;
case 66:
+
+/* Line 1464 of yacc.c */
#line 1387 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
@@ -3564,6 +3692,8 @@
break;
case 67:
+
+/* Line 1464 of yacc.c */
#line 1393 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
@@ -3573,6 +3703,8 @@
break;
case 68:
+
+/* Line 1464 of yacc.c */
#line 1402 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
@@ -3582,6 +3714,8 @@
break;
case 69:
+
+/* Line 1464 of yacc.c */
#line 1408 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
@@ -3591,6 +3725,8 @@
break;
case 70:
+
+/* Line 1464 of yacc.c */
#line 1417 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
@@ -3600,6 +3736,8 @@
break;
case 71:
+
+/* Line 1464 of yacc.c */
#line 1423 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
@@ -3609,6 +3747,8 @@
break;
case 72:
+
+/* Line 1464 of yacc.c */
#line 1432 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3617,6 +3757,8 @@
break;
case 73:
+
+/* Line 1464 of yacc.c */
#line 1440 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3625,6 +3767,8 @@
break;
case 74:
+
+/* Line 1464 of yacc.c */
#line 1445 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3635,6 +3779,8 @@
break;
case 75:
+
+/* Line 1464 of yacc.c */
#line 1455 "compilers/imcc/imcc.y"
{
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
@@ -3642,6 +3788,8 @@
break;
case 76:
+
+/* Line 1464 of yacc.c */
#line 1459 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3650,6 +3798,8 @@
break;
case 77:
+
+/* Line 1464 of yacc.c */
#line 1464 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
@@ -3658,26 +3808,36 @@
break;
case 78:
+
+/* Line 1464 of yacc.c */
#line 1471 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
case 79:
+
+/* Line 1464 of yacc.c */
#line 1472 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
case 80:
+
+/* Line 1464 of yacc.c */
#line 1473 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
case 81:
+
+/* Line 1464 of yacc.c */
#line 1474 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
case 82:
+
+/* Line 1464 of yacc.c */
#line 1476 "compilers/imcc/imcc.y"
{
SymReg *r;
@@ -3692,6 +3852,8 @@
break;
case 83:
+
+/* Line 1464 of yacc.c */
#line 1487 "compilers/imcc/imcc.y"
{
SymReg *r;
@@ -3706,11 +3868,15 @@
break;
case 84:
+
+/* Line 1464 of yacc.c */
#line 1497 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 87:
+
+/* Line 1464 of yacc.c */
#line 1507 "compilers/imcc/imcc.y"
{
char name[128];
@@ -3736,81 +3902,113 @@
break;
case 88:
+
+/* Line 1464 of yacc.c */
#line 1533 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 89:
+
+/* Line 1464 of yacc.c */
#line 1537 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
case 90:
+
+/* Line 1464 of yacc.c */
#line 1538 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
case 91:
+
+/* Line 1464 of yacc.c */
#line 1542 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 92:
+
+/* Line 1464 of yacc.c */
#line 1543 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
case 93:
+
+/* Line 1464 of yacc.c */
#line 1547 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 95:
+
+/* Line 1464 of yacc.c */
#line 1552 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
case 96:
+
+/* Line 1464 of yacc.c */
#line 1553 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 97:
+
+/* Line 1464 of yacc.c */
#line 1557 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
case 98:
+
+/* Line 1464 of yacc.c */
#line 1558 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
case 99:
+
+/* Line 1464 of yacc.c */
#line 1559 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
case 100:
+
+/* Line 1464 of yacc.c */
#line 1560 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
case 101:
+
+/* Line 1464 of yacc.c */
#line 1561 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
case 102:
+
+/* Line 1464 of yacc.c */
#line 1562 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
case 103:
+
+/* Line 1464 of yacc.c */
#line 1563 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
case 111:
+
+/* Line 1464 of yacc.c */
#line 1575 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
@@ -3819,6 +4017,8 @@
break;
case 112:
+
+/* Line 1464 of yacc.c */
#line 1580 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
@@ -3826,6 +4026,8 @@
break;
case 113:
+
+/* Line 1464 of yacc.c */
#line 1584 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
@@ -3833,6 +4035,8 @@
break;
case 114:
+
+/* Line 1464 of yacc.c */
#line 1588 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
@@ -3840,6 +4044,8 @@
break;
case 115:
+
+/* Line 1464 of yacc.c */
#line 1592 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
@@ -3847,6 +4053,8 @@
break;
case 116:
+
+/* Line 1464 of yacc.c */
#line 1596 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
@@ -3855,6 +4063,8 @@
break;
case 117:
+
+/* Line 1464 of yacc.c */
#line 1601 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
@@ -3863,11 +4073,15 @@
break;
case 118:
+
+/* Line 1464 of yacc.c */
#line 1609 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 119:
+
+/* Line 1464 of yacc.c */
#line 1610 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
@@ -3881,16 +4095,22 @@
break;
case 120:
+
+/* Line 1464 of yacc.c */
#line 1622 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
case 121:
+
+/* Line 1464 of yacc.c */
#line 1627 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 122:
+
+/* Line 1464 of yacc.c */
#line 1629 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
@@ -3899,16 +4119,22 @@
break;
case 123:
+
+/* Line 1464 of yacc.c */
#line 1636 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 124:
+
+/* Line 1464 of yacc.c */
#line 1637 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 125:
+
+/* Line 1464 of yacc.c */
#line 1638 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
@@ -3921,66 +4147,92 @@
break;
case 126:
+
+/* Line 1464 of yacc.c */
#line 1649 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 127:
+
+/* Line 1464 of yacc.c */
#line 1650 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 128:
+
+/* Line 1464 of yacc.c */
#line 1654 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 129:
+
+/* Line 1464 of yacc.c */
#line 1655 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
case 130:
+
+/* Line 1464 of yacc.c */
#line 1656 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
case 131:
+
+/* Line 1464 of yacc.c */
#line 1657 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 132:
+
+/* Line 1464 of yacc.c */
#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 133:
+
+/* Line 1464 of yacc.c */
#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 134:
+
+/* Line 1464 of yacc.c */
#line 1660 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 135:
+
+/* Line 1464 of yacc.c */
#line 1661 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
case 136:
+
+/* Line 1464 of yacc.c */
#line 1666 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
case 137:
+
+/* Line 1464 of yacc.c */
#line 1668 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 138:
+
+/* Line 1464 of yacc.c */
#line 1670 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
@@ -3989,21 +4241,29 @@
break;
case 139:
+
+/* Line 1464 of yacc.c */
#line 1677 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
case 140:
+
+/* Line 1464 of yacc.c */
#line 1679 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 141:
+
+/* Line 1464 of yacc.c */
#line 1683 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 142:
+
+/* Line 1464 of yacc.c */
#line 1685 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
@@ -4012,6 +4272,8 @@
break;
case 143:
+
+/* Line 1464 of yacc.c */
#line 1690 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
@@ -4020,11 +4282,15 @@
break;
case 144:
+
+/* Line 1464 of yacc.c */
#line 1697 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 145:
+
+/* Line 1464 of yacc.c */
#line 1699 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
@@ -4033,6 +4299,8 @@
break;
case 146:
+
+/* Line 1464 of yacc.c */
#line 1704 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
@@ -4041,16 +4309,22 @@
break;
case 147:
+
+/* Line 1464 of yacc.c */
#line 1711 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 148:
+
+/* Line 1464 of yacc.c */
#line 1715 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 149:
+
+/* Line 1464 of yacc.c */
#line 1720 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
@@ -4059,6 +4333,8 @@
break;
case 150:
+
+/* Line 1464 of yacc.c */
#line 1725 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
@@ -4067,21 +4343,29 @@
break;
case 151:
+
+/* Line 1464 of yacc.c */
#line 1732 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 152:
+
+/* Line 1464 of yacc.c */
#line 1733 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 153:
+
+/* Line 1464 of yacc.c */
#line 1737 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 154:
+
+/* Line 1464 of yacc.c */
#line 1739 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4095,6 +4379,8 @@
break;
case 155:
+
+/* Line 1464 of yacc.c */
#line 1749 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
@@ -4103,6 +4389,8 @@
break;
case 156:
+
+/* Line 1464 of yacc.c */
#line 1754 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
@@ -4116,6 +4404,8 @@
break;
case 157:
+
+/* Line 1464 of yacc.c */
#line 1764 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
@@ -4124,46 +4414,64 @@
break;
case 160:
+
+/* Line 1464 of yacc.c */
#line 1785 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 161:
+
+/* Line 1464 of yacc.c */
#line 1790 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
case 162:
+
+/* Line 1464 of yacc.c */
#line 1791 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 163:
+
+/* Line 1464 of yacc.c */
#line 1792 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 164:
+
+/* Line 1464 of yacc.c */
#line 1793 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 165:
+
+/* Line 1464 of yacc.c */
#line 1794 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 166:
+
+/* Line 1464 of yacc.c */
#line 1795 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 167:
+
+/* Line 1464 of yacc.c */
#line 1799 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 171:
+
+/* Line 1464 of yacc.c */
#line 1810 "compilers/imcc/imcc.y"
{
Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
@@ -4173,11 +4481,15 @@
break;
case 172:
+
+/* Line 1464 of yacc.c */
#line 1820 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
case 173:
+
+/* Line 1464 of yacc.c */
#line 1822 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
@@ -4189,6 +4501,8 @@
break;
case 174:
+
+/* Line 1464 of yacc.c */
#line 1833 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
@@ -4198,6 +4512,8 @@
break;
case 175:
+
+/* Line 1464 of yacc.c */
#line 1840 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
@@ -4207,6 +4523,8 @@
break;
case 176:
+
+/* Line 1464 of yacc.c */
#line 1849 "compilers/imcc/imcc.y"
{
IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
@@ -4216,11 +4534,15 @@
break;
case 181:
+
+/* Line 1464 of yacc.c */
#line 1865 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 182:
+
+/* Line 1464 of yacc.c */
#line 1866 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
@@ -4237,6 +4559,8 @@
break;
case 183:
+
+/* Line 1464 of yacc.c */
#line 1879 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
@@ -4257,6 +4581,8 @@
break;
case 184:
+
+/* Line 1464 of yacc.c */
#line 1896 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
@@ -4273,11 +4599,15 @@
break;
case 185:
+
+/* Line 1464 of yacc.c */
#line 1908 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 186:
+
+/* Line 1464 of yacc.c */
#line 1909 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
@@ -4287,11 +4617,15 @@
break;
case 188:
+
+/* Line 1464 of yacc.c */
#line 1916 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 189:
+
+/* Line 1464 of yacc.c */
#line 1917 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
@@ -4301,6 +4635,8 @@
break;
case 190:
+
+/* Line 1464 of yacc.c */
#line 1923 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
@@ -4310,6 +4646,8 @@
break;
case 191:
+
+/* Line 1464 of yacc.c */
#line 1929 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
@@ -4317,6 +4655,8 @@
break;
case 192:
+
+/* Line 1464 of yacc.c */
#line 1933 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
@@ -4332,71 +4672,99 @@
break;
case 193:
+
+/* Line 1464 of yacc.c */
#line 1944 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
case 194:
+
+/* Line 1464 of yacc.c */
#line 1945 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 195:
+
+/* Line 1464 of yacc.c */
#line 1946 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 198:
+
+/* Line 1464 of yacc.c */
#line 1949 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 199:
+
+/* Line 1464 of yacc.c */
#line 1953 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
case 200:
+
+/* Line 1464 of yacc.c */
#line 1954 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
case 201:
+
+/* Line 1464 of yacc.c */
#line 1955 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
case 202:
+
+/* Line 1464 of yacc.c */
#line 1956 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
case 203:
+
+/* Line 1464 of yacc.c */
#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 204:
+
+/* Line 1464 of yacc.c */
#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 205:
+
+/* Line 1464 of yacc.c */
#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 206:
+
+/* Line 1464 of yacc.c */
#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 207:
+
+/* Line 1464 of yacc.c */
#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 208:
+
+/* Line 1464 of yacc.c */
#line 1972 "compilers/imcc/imcc.y"
{
add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
@@ -4406,6 +4774,8 @@
break;
case 209:
+
+/* Line 1464 of yacc.c */
#line 1978 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
@@ -4413,6 +4783,8 @@
break;
case 210:
+
+/* Line 1464 of yacc.c */
#line 1982 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
@@ -4421,6 +4793,8 @@
break;
case 214:
+
+/* Line 1464 of yacc.c */
#line 1990 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
@@ -4428,136 +4802,190 @@
break;
case 215:
+
+/* Line 1464 of yacc.c */
#line 1997 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
case 216:
+
+/* Line 1464 of yacc.c */
#line 1998 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
case 217:
+
+/* Line 1464 of yacc.c */
#line 1999 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
case 218:
+
+/* Line 1464 of yacc.c */
#line 2003 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 219:
+
+/* Line 1464 of yacc.c */
#line 2004 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 220:
+
+/* Line 1464 of yacc.c */
#line 2005 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 221:
+
+/* Line 1464 of yacc.c */
#line 2006 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 222:
+
+/* Line 1464 of yacc.c */
#line 2007 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 223:
+
+/* Line 1464 of yacc.c */
#line 2008 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 224:
+
+/* Line 1464 of yacc.c */
#line 2009 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
case 225:
+
+/* Line 1464 of yacc.c */
#line 2010 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 226:
+
+/* Line 1464 of yacc.c */
#line 2011 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
case 227:
+
+/* Line 1464 of yacc.c */
#line 2012 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
case 228:
+
+/* Line 1464 of yacc.c */
#line 2013 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
case 229:
+
+/* Line 1464 of yacc.c */
#line 2014 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
case 230:
+
+/* Line 1464 of yacc.c */
#line 2015 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
case 231:
+
+/* Line 1464 of yacc.c */
#line 2016 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
case 232:
+
+/* Line 1464 of yacc.c */
#line 2017 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 233:
+
+/* Line 1464 of yacc.c */
#line 2018 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 234:
+
+/* Line 1464 of yacc.c */
#line 2019 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 235:
+
+/* Line 1464 of yacc.c */
#line 2020 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
case 236:
+
+/* Line 1464 of yacc.c */
#line 2021 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
case 237:
+
+/* Line 1464 of yacc.c */
#line 2022 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
case 238:
+
+/* Line 1464 of yacc.c */
#line 2023 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 239:
+
+/* Line 1464 of yacc.c */
#line 2024 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 240:
+
+/* Line 1464 of yacc.c */
#line 2025 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 241:
+
+/* Line 1464 of yacc.c */
#line 2031 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
@@ -4567,81 +4995,113 @@
break;
case 242:
+
+/* Line 1464 of yacc.c */
#line 2036 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 243:
+
+/* Line 1464 of yacc.c */
#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 244:
+
+/* Line 1464 of yacc.c */
#line 2047 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 245:
+
+/* Line 1464 of yacc.c */
#line 2048 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 246:
+
+/* Line 1464 of yacc.c */
#line 2049 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 247:
+
+/* Line 1464 of yacc.c */
#line 2050 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 248:
+
+/* Line 1464 of yacc.c */
#line 2051 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 249:
+
+/* Line 1464 of yacc.c */
#line 2052 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 250:
+
+/* Line 1464 of yacc.c */
#line 2053 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 251:
+
+/* Line 1464 of yacc.c */
#line 2054 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 252:
+
+/* Line 1464 of yacc.c */
#line 2055 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 253:
+
+/* Line 1464 of yacc.c */
#line 2056 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 254:
+
+/* Line 1464 of yacc.c */
#line 2057 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 255:
+
+/* Line 1464 of yacc.c */
#line 2058 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 256:
+
+/* Line 1464 of yacc.c */
#line 2059 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 257:
+
+/* Line 1464 of yacc.c */
#line 2065 "compilers/imcc/imcc.y"
{
(yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
@@ -4653,21 +5113,29 @@
break;
case 258:
+
+/* Line 1464 of yacc.c */
#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 259:
+
+/* Line 1464 of yacc.c */
#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 260:
+
+/* Line 1464 of yacc.c */
#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 261:
+
+/* Line 1464 of yacc.c */
#line 2079 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
@@ -4677,6 +5145,8 @@
break;
case 262:
+
+/* Line 1464 of yacc.c */
#line 2085 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
@@ -4694,6 +5164,8 @@
break;
case 263:
+
+/* Line 1464 of yacc.c */
#line 2099 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
@@ -4703,6 +5175,8 @@
break;
case 264:
+
+/* Line 1464 of yacc.c */
#line 2105 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
@@ -4712,11 +5186,15 @@
break;
case 265:
+
+/* Line 1464 of yacc.c */
#line 2110 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
case 266:
+
+/* Line 1464 of yacc.c */
#line 2116 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
@@ -4725,16 +5203,22 @@
break;
case 267:
+
+/* Line 1464 of yacc.c */
#line 2120 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
case 268:
+
+/* Line 1464 of yacc.c */
#line 2124 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 269:
+
+/* Line 1464 of yacc.c */
#line 2126 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4748,6 +5232,8 @@
break;
case 270:
+
+/* Line 1464 of yacc.c */
#line 2136 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4761,6 +5247,8 @@
break;
case 271:
+
+/* Line 1464 of yacc.c */
#line 2146 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4771,6 +5259,8 @@
break;
case 272:
+
+/* Line 1464 of yacc.c */
#line 2153 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4779,6 +5269,8 @@
break;
case 273:
+
+/* Line 1464 of yacc.c */
#line 2158 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4789,51 +5281,71 @@
break;
case 274:
+
+/* Line 1464 of yacc.c */
#line 2167 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 275:
+
+/* Line 1464 of yacc.c */
#line 2171 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 276:
+
+/* Line 1464 of yacc.c */
#line 2172 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 277:
+
+/* Line 1464 of yacc.c */
#line 2176 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 278:
+
+/* Line 1464 of yacc.c */
#line 2177 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 279:
+
+/* Line 1464 of yacc.c */
#line 2178 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
case 280:
+
+/* Line 1464 of yacc.c */
#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 281:
+
+/* Line 1464 of yacc.c */
#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 282:
+
+/* Line 1464 of yacc.c */
#line 2185 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 283:
+
+/* Line 1464 of yacc.c */
#line 2190 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4847,6 +5359,8 @@
break;
case 284:
+
+/* Line 1464 of yacc.c */
#line 2200 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
@@ -4856,6 +5370,8 @@
break;
case 285:
+
+/* Line 1464 of yacc.c */
#line 2206 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
@@ -4869,6 +5385,8 @@
break;
case 286:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4877,21 +5395,29 @@
break;
case 287:
+
+/* Line 1464 of yacc.c */
#line 2220 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 288:
+
+/* Line 1464 of yacc.c */
#line 2224 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 289:
+
+/* Line 1464 of yacc.c */
#line 2225 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 290:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4899,6 +5425,8 @@
break;
case 291:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4906,6 +5434,8 @@
break;
case 292:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4913,6 +5443,8 @@
break;
case 293:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4920,6 +5452,8 @@
break;
case 294:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4927,6 +5461,8 @@
break;
case 295:
+
+/* Line 1464 of yacc.c */
#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));
@@ -4934,66 +5470,92 @@
break;
case 296:
+
+/* Line 1464 of yacc.c */
#line 2259 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 297:
+
+/* Line 1464 of yacc.c */
#line 2260 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 298:
+
+/* Line 1464 of yacc.c */
#line 2264 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
case 299:
+
+/* Line 1464 of yacc.c */
#line 2265 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
case 300:
+
+/* Line 1464 of yacc.c */
#line 2266 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
case 301:
+
+/* Line 1464 of yacc.c */
#line 2267 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
case 302:
+
+/* Line 1464 of yacc.c */
#line 2268 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
case 303:
+
+/* Line 1464 of yacc.c */
#line 2269 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
case 306:
+
+/* Line 1464 of yacc.c */
#line 2278 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 307:
+
+/* Line 1464 of yacc.c */
#line 2279 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
case 308:
+
+/* Line 1464 of yacc.c */
#line 2283 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
case 310:
+
+/* Line 1464 of yacc.c */
#line 2288 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
case 311:
+
+/* Line 1464 of yacc.c */
#line 2290 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
@@ -5004,6 +5566,8 @@
break;
case 312:
+
+/* Line 1464 of yacc.c */
#line 2297 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
@@ -5012,36 +5576,50 @@
break;
case 314:
+
+/* Line 1464 of yacc.c */
#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 315:
+
+/* Line 1464 of yacc.c */
#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 316:
+
+/* Line 1464 of yacc.c */
#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 317:
+
+/* Line 1464 of yacc.c */
#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 318:
+
+/* Line 1464 of yacc.c */
#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 319:
+
+/* Line 1464 of yacc.c */
#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 324:
+
+/* Line 1464 of yacc.c */
#line 2329 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
@@ -5049,6 +5627,8 @@
break;
case 325:
+
+/* Line 1464 of yacc.c */
#line 2333 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
@@ -5058,6 +5638,8 @@
break;
case 326:
+
+/* Line 1464 of yacc.c */
#line 2341 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
@@ -5065,6 +5647,8 @@
break;
case 327:
+
+/* Line 1464 of yacc.c */
#line 2345 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
@@ -5074,11 +5658,15 @@
break;
case 328:
+
+/* Line 1464 of yacc.c */
#line 2353 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
case 329:
+
+/* Line 1464 of yacc.c */
#line 2355 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
@@ -5087,6 +5675,8 @@
break;
case 330:
+
+/* Line 1464 of yacc.c */
#line 2363 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
@@ -5094,58 +5684,79 @@
break;
case 331:
+
+/* Line 1464 of yacc.c */
#line 2369 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
case 332:
+
+/* Line 1464 of yacc.c */
#line 2370 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
case 333:
+
+/* Line 1464 of yacc.c */
#line 2371 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
case 334:
+
+/* Line 1464 of yacc.c */
#line 2372 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
case 335:
+
+/* Line 1464 of yacc.c */
#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 336:
+
+/* Line 1464 of yacc.c */
#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 337:
+
+/* Line 1464 of yacc.c */
#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 338:
+
+/* Line 1464 of yacc.c */
#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 339:
+
+/* Line 1464 of yacc.c */
#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 340:
+
+/* Line 1464 of yacc.c */
#line 2384 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
-/* Line 1267 of yacc.c. */
-#line 5138 "compilers/imcc/imcparser.c"
+
+/* Line 1464 of yacc.c */
+#line 5749 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5156,7 +5767,6 @@
*++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. */
@@ -5221,7 +5831,7 @@
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse look-ahead token after an
+ /* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@@ -5238,7 +5848,7 @@
}
}
- /* Else will try to reuse look-ahead token after shifting the error
+ /* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@@ -5295,9 +5905,6 @@
YY_STACK_PRINT (yyss, yyssp);
}
- if (yyn == YYFINAL)
- YYACCEPT;
-
*++yyvsp = yylval;
@@ -5322,7 +5929,7 @@
yyresult = 1;
goto yyreturn;
-#ifndef yyoverflow
+#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@@ -5333,7 +5940,7 @@
#endif
yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
+ if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, yyscanner, interp);
/* Do not reclaim the symbols of the rule which action triggered
@@ -5359,6 +5966,8 @@
}
+
+/* Line 1684 of yacc.c */
#line 2390 "compilers/imcc/imcc.y"
Modified: branches/typesafe_consttable/compilers/imcc/imcparser.h
==============================================================================
--- branches/typesafe_consttable/compilers/imcc/imcparser.h Sun Sep 19 20:57:18 2010 (r49161)
+++ branches/typesafe_consttable/compilers/imcc/imcparser.h Mon Sep 20 02:33:52 2010 (r49162)
@@ -9,27 +9,25 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/* A Bison parser, made by GNU Bison 2.3. */
+/* A Bison parser, made by GNU Bison 2.4.3. */
/* Skeleton interface for Bison's Yacc-like parsers in C
-
- 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
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010 Free Software Foundation, Inc.
+
+ 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 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, 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, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
@@ -40,10 +38,11 @@
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,21 +292,27 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 986 "compilers/imcc/imcc.y"
{
+
+/* Line 1685 of yacc.c */
+#line 986 "compilers/imcc/imcc.y"
+
IdList * idlist;
int t;
char * s;
SymReg * sr;
Instruction *i;
-}
-/* Line 1489 of yacc.c. */
-#line 295 "compilers/imcc/imcparser.h"
- YYSTYPE;
+
+
+
+/* Line 1685 of yacc.c */
+#line 299 "compilers/imcc/imcparser.h"
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
+
Modified: branches/typesafe_consttable/compilers/imcc/pbc.c
==============================================================================
--- branches/typesafe_consttable/compilers/imcc/pbc.c Sun Sep 19 20:57:18 2010 (r49161)
+++ branches/typesafe_consttable/compilers/imcc/pbc.c Mon Sep 20 02:33:52 2010 (r49162)
@@ -59,12 +59,10 @@
FUNC_MODIFIES(*r);
static int add_const_key(PARROT_INTERP,
- ARGIN(const opcode_t *key),
+ const opcode_t *key,
int size,
- ARGIN(const char *s_key))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(4);
+ const char *s_key)
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
static int add_const_num(PARROT_INTERP, ARGIN_NULLOK(const char *buf))
@@ -85,13 +83,6 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-static int add_const_table(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-static int add_const_table_key(PARROT_INTERP, ARGIN(PMC *key))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static int add_const_table_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -215,9 +206,7 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_add_const_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(key) \
- , PARROT_ASSERT_ARG(s_key))
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_add_const_num __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_add_const_pmc_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -226,11 +215,6 @@
#define ASSERT_ARGS_add_const_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(s))
-#define ASSERT_ARGS_add_const_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_add_const_table_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_add_const_table_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
Modified: branches/typesafe_consttable/src/packfile.c
==============================================================================
--- branches/typesafe_consttable/src/packfile.c Sun Sep 19 20:57:18 2010 (r49161)
+++ branches/typesafe_consttable/src/packfile.c Mon Sep 20 02:33:52 2010 (r49162)
@@ -81,13 +81,9 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*self);
-static void clone_constant(PARROT_INTERP,
- ARGIN(PackFile_Constant *old_const),
- ARGMOD(PackFile_Constant *new_const))
+static void clone_constant(PARROT_INTERP, ARGIN(PMC **c))
__attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*new_const);
+ __attribute__nonnull__(2);
static void compile_or_load_file(PARROT_INTERP,
ARGIN(STRING *path),
@@ -215,7 +211,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant * find_constants(PARROT_INTERP,
+static PackFile_ConstTable * find_constants(PARROT_INTERP,
ARGIN(PackFile_ConstTable *ct))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -402,8 +398,7 @@
, PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_clone_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(old_const) \
- , PARROT_ASSERT_ARG(new_const))
+ , PARROT_ASSERT_ARG(c))
#define ASSERT_ARGS_compile_or_load_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(path))
@@ -3343,12 +3338,9 @@
interp->code = new_cs;
-#if 0
Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), really
? find_constants(interp, new_cs->const_table)
: new_cs->const_table);
-#endif
- Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), new_cs->const_table);
if (really)
prepare_for_run(interp);
@@ -3359,8 +3351,7 @@
/*
-=item C<static void clone_constant(PARROT_INTERP, PackFile_Constant *old_const,
-PackFile_Constant *new_const)>
+=item C<static void clone_constant(PARROT_INTERP, PMC **c)>
Clones a constant (at least, if it's a Sub PMC), returning the clone.
@@ -3369,20 +3360,16 @@
*/
static void
-clone_constant(PARROT_INTERP, ARGIN(PackFile_Constant *old_const),
-ARGMOD(PackFile_Constant *new_const))
+clone_constant(PARROT_INTERP, ARGIN(PMC **c))
{
ASSERT_ARGS(clone_constant)
STRING * const _sub = CONST_STRING(interp, "Sub");
- memcpy(new_const, old_const, sizeof (PackFile_Constant));
-
- if (old_const->type == PFC_PMC
- && VTABLE_isa(interp, old_const->u.key, _sub)) {
+ if (VTABLE_isa(interp, *c, _sub)) {
PMC *old_sub_pmc, *new_sub_pmc;
Parrot_Sub_attributes *old_sub, *new_sub;
- old_sub_pmc = old_const->u.key;
+ old_sub_pmc = *c;
new_sub_pmc = Parrot_thaw_constants(interp, Parrot_freeze(interp, old_sub_pmc));
PMC_get_sub(interp, new_sub_pmc, new_sub);
@@ -3394,14 +3381,14 @@
&& !(old_sub->comp_flags & SUB_COMP_FLAG_METHOD))
Parrot_ns_store_sub(interp, new_sub_pmc);
- new_const->u.key = new_sub_pmc;
+ *c = new_sub_pmc;
}
}
/*
-=item C<static PackFile_Constant * find_constants(PARROT_INTERP,
+=item C<static PackFile_ConstTable * find_constants(PARROT_INTERP,
PackFile_ConstTable *ct)>
Finds the constant table associated with a thread. For now, we need to copy
@@ -3412,20 +3399,19 @@
*/
-#if 0
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Constant *
+static PackFile_ConstTable *
find_constants(PARROT_INTERP, ARGIN(PackFile_ConstTable *ct))
{
ASSERT_ARGS(find_constants)
if (!n_interpreters
|| !interp->thread_data
|| interp->thread_data->tid == 0)
- return ct->constants;
+ return ct;
else {
- Hash *tables;
- PackFile_Constant *new_consts;
+ Hash *tables;
+ PackFile_ConstTable *new_ct;
PARROT_ASSERT(interp->thread_data);
@@ -3433,28 +3419,42 @@
interp->thread_data->const_tables = parrot_new_pointer_hash(interp);
}
- tables = interp->thread_data->const_tables;
- new_consts = (PackFile_Constant *)parrot_hash_get(interp, tables, ct);
+ tables = interp->thread_data->const_tables;
+ new_ct = (PackFile_ConstTable *)parrot_hash_get(interp, tables, ct);
- if (!new_consts) {
+ if (!new_ct) {
/* need to construct it */
- PackFile_Constant * const old_consts = ct->constants;
- INTVAL const num_consts = ct->const_count;
- INTVAL i;
- new_consts = mem_gc_allocate_n_zeroed_typed(interp,
- num_consts, PackFile_Constant);
+ int i;
- for (i = 0; i < num_consts; ++i)
- clone_constant(interp, &old_consts[i], &new_consts[i]);
+ new_ct = mem_gc_allocate_zeroed_typed(interp, PackFile_ConstTable);
- parrot_hash_put(interp, tables, ct, new_consts);
+ new_ct->num.const_count = ct->num.const_count;
+ new_ct->num.constants = mem_gc_allocate_n_zeroed_typed(interp,
+ ct->num.const_count, FLOATVAL);
+ memcpy(new_ct->num.constants, ct->num.constants,
+ ct->num.const_count * sizeof (FLOATVAL));
+
+ new_ct->str.const_count = ct->str.const_count;
+ new_ct->str.constants = mem_gc_allocate_n_zeroed_typed(interp,
+ ct->str.const_count, STRING *);
+ memcpy(new_ct->str.constants, ct->str.constants,
+ ct->str.const_count * sizeof (STRING *));
+
+ new_ct->pmc.const_count = ct->pmc.const_count;
+ new_ct->pmc.constants = mem_gc_allocate_n_zeroed_typed(interp,
+ ct->pmc.const_count, PMC *);
+ memcpy(new_ct->pmc.constants, ct->pmc.constants,
+ ct->pmc.const_count * sizeof (PMC *));
+ for (i = 0; i < new_ct->pmc.const_count; ++i)
+ clone_constant(interp, &new_ct->pmc.constants[i]);
+
+ parrot_hash_put(interp, tables, ct, new_ct);
}
- return new_consts;
+ return new_ct;
}
}
-#endif
/*
@@ -3477,7 +3477,6 @@
return;
-#if 0
if (!interp->thread_data)
return;
@@ -3488,11 +3487,10 @@
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););
+ PackFile_ConstTable * const ct = (PackFile_ConstTable *)_bucket->value;
+ PackFile_ConstTable_clear(interp, ct);
+ mem_gc_free(interp, ct););
parrot_hash_destroy(interp, hash);
-#endif
}
@@ -3920,6 +3918,8 @@
EMPTY_CONSTS(str);
EMPTY_CONSTS(pmc);
+#undef EMPTY_CONSTS
+
if (self->string_hash) {
parrot_hash_destroy(interp, self->string_hash);
self->string_hash = NULL;
More information about the parrot-commits
mailing list